]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
Update XHTML info.
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
2 \lyxformat 410
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_non_tex_fonts false
78 \font_sc false
79 \font_osf false
80 \font_sf_scale 100
81 \font_tt_scale 100
82
83 \graphics default
84 \default_output_format default
85 \output_sync 0
86 \bibtex_command default
87 \index_command default
88 \paperfontsize 12
89 \spacing single
90 \use_hyperref true
91 \pdf_title "LyX's Additional Features manual"
92 \pdf_author "LyX Team"
93 \pdf_subject "LyX's additional features documentation"
94 \pdf_keywords "LyX, Documentation, Additional"
95 \pdf_bookmarks true
96 \pdf_bookmarksnumbered true
97 \pdf_bookmarksopen false
98 \pdf_bookmarksopenlevel 1
99 \pdf_breaklinks false
100 \pdf_pdfborder false
101 \pdf_colorlinks true
102 \pdf_backref false
103 \pdf_pdfusetitle false
104 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,  pdfpagelayout=OneColumn, pdfnewwindow=true,  pdfstartview=XYZ, plainpages=false, pdfpagelabels"
105 \papersize default
106 \use_geometry false
107 \use_amsmath 0
108 \use_esint 0
109 \use_mhchem 1
110 \use_mathdots 1
111 \cite_engine basic
112 \use_bibtopic false
113 \use_indices false
114 \paperorientation portrait
115 \suppress_date false
116 \use_refstyle 0
117 \index Index
118 \shortcut idx
119 \color #008000
120 \end_index
121 \secnumdepth 3
122 \tocdepth 3
123 \paragraph_separation indent
124 \paragraph_indentation default
125 \quotes_language english
126 \papercolumns 1
127 \papersides 2
128 \paperpagestyle headings
129 \tracking_changes false
130 \output_changes false
131 \html_math_output 0
132 \html_be_strict true
133 \end_header
134
135 \begin_body
136
137 \begin_layout Title
138 Additional LyX Features
139 \end_layout
140
141 \begin_layout Author
142 by the LyX Team
143 \begin_inset Foot
144 status collapsed
145
146 \begin_layout Plain Layout
147 \noindent
148 Principal maintainer of this file is
149 \noun on
150  Richard Heck
151 \noun default
152 .
153  If you have comments or error corrections, please send them to the LyX
154  Documentation mailing list, 
155 \begin_inset Flex Code
156 status collapsed
157
158 \begin_layout Plain Layout
159 \noindent
160 <lyx-docs@lists.lyx.org>
161 \end_layout
162
163 \end_inset
164
165 .
166 \end_layout
167
168 \end_inset
169
170  
171 \end_layout
172
173 \begin_layout Standard
174 \begin_inset CommandInset toc
175 LatexCommand tableofcontents
176
177 \end_inset
178
179
180 \end_layout
181
182 \begin_layout Chapter
183 Introduction
184 \end_layout
185
186 \begin_layout Standard
187 This manual is essentially Part II of the 
188 \emph on
189 User's Guide\SpecialChar \@.
190
191 \emph default
192  The reason for separating this document out is simple: the 
193 \emph on
194 User's Guide
195 \emph default
196  is already quite lengthy, and it contains information on all of the basic
197  features one needs to know in order to prepare most documents.
198  However, the LyX Team has worked to make LyX extensible through various
199  configuration files and external packages.
200  That means that if you want to support the Fizzwizzle LaTeX package, you
201  can create a layout file (or module) for it without having to alter LyX
202  itself.
203  We've already had contributions of several new features this way, and some
204  of them are documented here.
205  There are also some more `advanced' features, such as how to control the
206  presentation of bibliographies and how to work with multi-part documents,
207  that are not covered in the 
208 \emph on
209 User's Guide
210 \emph default
211  and are discussed here.
212 \end_layout
213
214 \begin_layout Standard
215 This manual also documents some special features, like fax support, version
216  control, and SGML support, which require additional software to work properly.
217  There is also a chapter on LyX's support for HTML.
218  And lastly, there's a chapter of LaTeX tools and tips, things you can use
219  to spruce up your documents by directly using the powerful features of
220  LaTeX.
221  After all, LyX 
222 \emph on
223 is
224 \emph default
225  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
226 \end_layout
227
228 \begin_layout Standard
229 If you haven't read the 
230 \emph on
231 Introduction
232 \emph default
233  yet, you are definitely in the wrong manual.
234  The 
235 \emph on
236 Introduction
237 \emph default
238  is the first place to go, since it describes the notation and format of
239  all of the manuals.
240  You should also be thoroughly familiar with the 
241 \emph on
242 User's Guide
243 \emph default
244  and all of the basic features of LyX before attempting to read this one.
245 \end_layout
246
247 \begin_layout Standard
248 Since many of the topics in this manual depend heavily on LyX's interaction
249  with LaTeX, this first chapter covers the inner workings of LyX and how
250  to direct LyX to generate exactly the LaTeX code you want.
251  It is obviously for more seasoned LyX users.
252 \end_layout
253
254 \begin_layout Chapter
255 LyX and LaTeX
256 \end_layout
257
258 \begin_layout Section
259 How LyX Uses LaTeX
260 \end_layout
261
262 \begin_layout Standard
263 This chapter is for both TeX-nicians and the LaTeX-curious.
264  In it, we'll explain how LyX and LaTeX work together to produce printable
265  output.
266  This is the only place in any of the manuals where we assume you know something
267  about LaTeX.
268 \end_layout
269
270 \begin_layout Standard
271 At one time, LyX was called a 
272 \begin_inset Quotes eld
273 \end_inset
274
275 WYSIWYM frontend to LaTeX,
276 \begin_inset Quotes erd
277 \end_inset
278
279  but that's no longer true.
280  There are frontends to LaTeX out there.
281 \begin_inset Foot
282 status collapsed
283
284 \begin_layout Plain Layout
285 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
286  There are also the LaTeX modes for vi and emacs, of course.
287 \end_layout
288
289 \end_inset
290
291  These are basically text editors with the ability to run LaTeX and mark
292  any errors in the file you're editing.
293  Although LyX 
294 \emph on
295 is
296 \emph default
297  an editor, and it 
298 \emph on
299 does
300 \emph default
301  run LaTeX, and it also indicates errors in the file, it also does much,
302  much more.
303  For one thing, you don't need to know LaTeX to use LyX effectively.
304  And LyX has added its own extensions to LaTeX.
305  Try the following sometime: select 
306 \begin_inset Flex MenuItem
307 status collapsed
308
309 \begin_layout Plain Layout
310 Export\SpecialChar \menuseparator
311 LaTeX
312 \end_layout
313
314 \end_inset
315
316  from the 
317 \begin_inset Flex MenuItem
318 status collapsed
319
320 \begin_layout Plain Layout
321 File
322 \end_layout
323
324 \end_inset
325
326  menu (or 
327 \begin_inset Flex MenuItem
328 status collapsed
329
330 \begin_layout Plain Layout
331 View\SpecialChar \menuseparator
332 Source
333 \end_layout
334
335 \end_inset
336
337 ), then look at the preamble of the resulting 
338 \begin_inset Flex Code
339 status collapsed
340
341 \begin_layout Plain Layout
342 .tex
343 \end_layout
344
345 \end_inset
346
347  file.
348  You'll notice a variety of new macros defined specifically by LyX.
349  These macros are defined automatically, according to the features you use
350  in the document.
351 \end_layout
352
353 \begin_layout Standard
354 There are several commands that automatically invoke LaTeX.
355  They are:
356 \end_layout
357
358 \begin_layout Itemize
359 \begin_inset Flex MenuItem
360 status collapsed
361
362 \begin_layout Plain Layout
363 View\SpecialChar \menuseparator
364 Format
365 \end_layout
366
367 \end_inset
368
369
370 \end_layout
371
372 \begin_layout Itemize
373 \begin_inset Flex MenuItem
374 status collapsed
375
376 \begin_layout Plain Layout
377 View\SpecialChar \menuseparator
378 Update\SpecialChar \menuseparator
379 Format
380 \end_layout
381
382 \end_inset
383
384
385 \end_layout
386
387 \begin_layout Itemize
388 \begin_inset Flex MenuItem
389 status collapsed
390
391 \begin_layout Plain Layout
392 File\SpecialChar \menuseparator
393 Print
394 \end_layout
395
396 \end_inset
397
398
399 \end_layout
400
401 \begin_layout Itemize
402 \begin_inset Flex MenuItem
403 status collapsed
404
405 \begin_layout Plain Layout
406 File\SpecialChar \menuseparator
407 Fax
408 \end_layout
409
410 \end_inset
411
412
413 \end_layout
414
415 \begin_layout Standard
416 They will only invoke LaTeX if the file has changed since the last time
417  LaTeX was run.
418  
419 \end_layout
420
421 \begin_layout Standard
422 When LyX runs LaTeX on the file you're editing, it performs these steps:
423 \end_layout
424
425 \begin_layout Enumerate
426 Convert the document to LaTeX and save to a file with the extension 
427 \begin_inset Flex Code
428 status collapsed
429
430 \begin_layout Plain Layout
431 .tex
432 \end_layout
433
434 \end_inset
435
436  in place of 
437 \begin_inset Flex Code
438 status collapsed
439
440 \begin_layout Plain Layout
441 .lyx
442 \end_layout
443
444 \end_inset
445
446 .
447 \end_layout
448
449 \begin_layout Enumerate
450 Run LaTeX on the 
451 \begin_inset Flex Code
452 status collapsed
453
454 \begin_layout Plain Layout
455 .tex
456 \end_layout
457
458 \end_inset
459
460  file (maybe several times), and run any other commands (such as 
461 \begin_inset Flex Code
462 status collapsed
463
464 \begin_layout Plain Layout
465 bibtex
466 \end_layout
467
468 \end_inset
469
470  or 
471 \begin_inset Flex Code
472 status collapsed
473
474 \begin_layout Plain Layout
475 makeindex
476 \end_layout
477
478 \end_inset
479
480 ) needed to compile the LaTeX file.
481 \end_layout
482
483 \begin_layout Enumerate
484 If there are any errors, show the error log.
485 \end_layout
486
487 \begin_layout Standard
488 If you've run LaTeX using 
489 \begin_inset Flex MenuItem
490 status collapsed
491
492 \begin_layout Plain Layout
493 View
494 \bar under
495 \SpecialChar \menuseparator
496
497 \bar default
498 DVI
499 \end_layout
500
501 \end_inset
502
503 , LyX then runs a DVI viewer to display the DVI-file.
504  If you've used 
505 \begin_inset Flex MenuItem
506 status collapsed
507
508 \begin_layout Plain Layout
509 View
510 \bar under
511 \SpecialChar \menuseparator
512
513 \bar default
514 PostScript
515 \end_layout
516
517 \end_inset
518
519 , LyX performs further steps:
520 \end_layout
521
522 \begin_layout Itemize
523 Run 
524 \begin_inset Flex Code
525 status collapsed
526
527 \begin_layout Plain Layout
528 dvips
529 \end_layout
530
531 \end_inset
532
533  to convert the DVI file to PostScript.
534 \end_layout
535
536 \begin_layout Itemize
537 Run a PostScript viewer, such as 
538 \begin_inset Flex Code
539 status collapsed
540
541 \begin_layout Plain Layout
542 ghostview
543 \end_layout
544
545 \end_inset
546
547 , to display the PostScript file.
548 \end_layout
549
550 \begin_layout Standard
551 LyX does similar things when viewing, or exporting, other formats.
552 \end_layout
553
554 \begin_layout Section
555 Translating LaTeX files into LyX
556 \end_layout
557
558 \begin_layout Standard
559 You can import a LaTeX file into LyX by using the 
560 \begin_inset Flex MenuItem
561 status collapsed
562
563 \begin_layout Plain Layout
564 File\SpecialChar \menuseparator
565 Import\SpecialChar \menuseparator
566 LaTeX
567 \end_layout
568
569 \end_inset
570
571  command in LyX.
572  This will call a program named 
573 \begin_inset Flex Code
574 status collapsed
575
576 \begin_layout Plain Layout
577 tex2lyx
578 \end_layout
579
580 \end_inset
581
582  which will create a file 
583 \begin_inset Flex Code
584 status collapsed
585
586 \begin_layout Plain Layout
587 foo.lyx
588 \end_layout
589
590 \end_inset
591
592  from the file 
593 \begin_inset Flex Code
594 status collapsed
595
596 \begin_layout Plain Layout
597 foo.tex
598 \end_layout
599
600 \end_inset
601
602 .
603  LyX will then open that file.
604 \begin_inset Foot
605 status collapsed
606
607 \begin_layout Plain Layout
608 \begin_inset Flex Code
609 status collapsed
610
611 \begin_layout Plain Layout
612 tex2lyx
613 \end_layout
614
615 \end_inset
616
617  can also be run from the command line, of course.
618 \end_layout
619
620 \end_inset
621
622
623 \end_layout
624
625 \begin_layout Standard
626 \begin_inset Flex Code
627 status collapsed
628
629 \begin_layout Plain Layout
630 tex2lyx
631 \end_layout
632
633 \end_inset
634
635  will translate most legal LaTeX, but not everything.
636  It will put things it doesn't understand into TeX code, so after translating
637  a file with 
638 \begin_inset Flex Code
639 status collapsed
640
641 \begin_layout Plain Layout
642 tex2lyx
643 \end_layout
644
645 \end_inset
646
647 , you can look for TeX code and hand-edit it until it looks right.
648 \end_layout
649
650 \begin_layout Standard
651 If you don't know what TeX code is, read the next section.
652 \end_layout
653
654 \begin_layout Section
655 \begin_inset CommandInset label
656 LatexCommand label
657 name "sec:Inserting-TeX-Code"
658
659 \end_inset
660
661 Inserting TeX Code into LyX Documents 
662 \end_layout
663
664 \begin_layout Standard
665 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
666  You can always insert TeX code into any LyX document.
667  LyX cannot, and will never be able to, display every possible LaTeX construct.
668  If ever you need to insert LaTeX commands into your LyX document, you can
669  use the 
670 \begin_inset Flex Code
671 status collapsed
672
673 \begin_layout Plain Layout
674 TeX Code
675 \end_layout
676
677 \end_inset
678
679  box, which you can insert into your document with 
680 \begin_inset Flex MenuItem
681 status collapsed
682
683 \begin_layout Plain Layout
684 Insert\SpecialChar \menuseparator
685 TeX Code
686 \end_layout
687
688 \end_inset
689
690 .
691 \end_layout
692
693 \begin_layout Standard
694 Here's an example of inserting LaTeX commands in a LyX document.
695  The code looks like this:
696 \end_layout
697
698 \begin_layout LyX-Code
699
700 \backslash
701 begin{tabular}{ll}
702 \begin_inset Newline newline
703 \end_inset
704
705
706 \backslash
707 begin{minipage}{5cm}
708 \begin_inset Newline newline
709 \end_inset
710
711 This is an example for a minipage environment.
712  You 
713 \begin_inset Newline newline
714 \end_inset
715
716 can put nearly everything in it, even (non-floating) 
717 \begin_inset Newline newline
718 \end_inset
719
720 figures and tables.
721  
722 \begin_inset Newline newline
723 \end_inset
724
725
726 \backslash
727 end{minipage}
728 \begin_inset Newline newline
729 \end_inset
730
731 &
732 \begin_inset Newline newline
733 \end_inset
734
735
736 \backslash
737 begin{minipage}{5cm}
738 \begin_inset Newline newline
739 \end_inset
740
741
742 \backslash
743 begin{verbatim}
744 \begin_inset Newline newline
745 \end_inset
746
747
748 \backslash
749 begin{minipage}{5cm}
750 \begin_inset Newline newline
751 \end_inset
752
753 This ...
754  
755 \begin_inset Newline newline
756 \end_inset
757
758
759 \backslash
760 end{minipage}
761 \begin_inset Newline newline
762 \end_inset
763
764
765 \backslash
766 end{verbatim}
767 \begin_inset Newline newline
768 \end_inset
769
770
771 \backslash
772 end{minipage}
773 \begin_inset Newline newline
774 \end_inset
775
776
777 \backslash
778 end{tabular}
779 \end_layout
780
781 \begin_layout LyX-Code
782
783 \end_layout
784
785 \begin_layout Standard
786 The 
787 \begin_inset Flex Code
788 status collapsed
789
790 \begin_layout Plain Layout
791 TeX Code
792 \end_layout
793
794 \end_inset
795
796  box containing this text is directly after this paragraph.
797  Those of you reading the manual in LyX will only see the TeX code inset.
798  Those reading a printed version of the manuals will see the actual results:
799 \end_layout
800
801 \begin_layout Standard
802 \begin_inset ERT
803 status collapsed
804
805 \begin_layout Plain Layout
806
807
808 \backslash
809 begin{tabular}{ll}
810 \end_layout
811
812 \begin_layout Plain Layout
813
814
815 \backslash
816 begin{minipage}{5cm}
817 \end_layout
818
819 \begin_layout Plain Layout
820
821 This is an example for a minipage environment.
822  You can put nearly everything in it, even (non-floating) figures and tables.
823  
824 \end_layout
825
826 \begin_layout Plain Layout
827
828
829 \backslash
830 end{minipage}
831 \end_layout
832
833 \begin_layout Plain Layout
834
835 &
836 \end_layout
837
838 \begin_layout Plain Layout
839
840
841 \backslash
842 begin{minipage}{5cm}
843 \end_layout
844
845 \begin_layout Plain Layout
846
847
848 \backslash
849 begin{verbatim}
850 \end_layout
851
852 \begin_layout Plain Layout
853
854
855 \backslash
856 begin{minipage}{5cm}
857 \end_layout
858
859 \begin_layout Plain Layout
860
861 This ...
862  
863 \end_layout
864
865 \begin_layout Plain Layout
866
867
868 \backslash
869 end{minipage}
870 \end_layout
871
872 \begin_layout Plain Layout
873
874
875 \backslash
876 end{verbatim}
877 \end_layout
878
879 \begin_layout Plain Layout
880
881
882 \backslash
883 end{minipage}
884 \end_layout
885
886 \begin_layout Plain Layout
887
888
889 \backslash
890 end{tabular}
891 \end_layout
892
893 \end_inset
894
895
896 \end_layout
897
898 \begin_layout Standard
899 In addition to using TeX code, you can also create a separate file containing
900  some complex LaTeX structure and then use 
901 \begin_inset Flex MenuItem
902 status collapsed
903
904 \begin_layout Plain Layout
905 Insert\SpecialChar \menuseparator
906 Child
907 \begin_inset space ~
908 \end_inset
909
910 Document
911 \end_layout
912
913 \end_inset
914
915  to include your file (you should select the type 
916 \begin_inset Flex Code
917 status collapsed
918
919 \begin_layout Plain Layout
920 Input
921 \end_layout
922
923 \end_inset
924
925 ).
926  We recommend that you only do this if you have a 
927 \begin_inset Flex Code
928 status collapsed
929
930 \begin_layout Plain Layout
931 .tex
932 \end_layout
933
934 \end_inset
935
936  file which you 
937 \emph on
938 know
939 \emph default
940  works already.
941  Otherwise, you'll have a big job tracking down LaTeX errors.
942 \end_layout
943
944 \begin_layout Standard
945 There are a few last points to emphasize:
946 \end_layout
947
948 \begin_layout Itemize
949 LyX 
950 \emph on
951 does not
952 \emph default
953  check if your LaTeX code is correct.
954 \end_layout
955
956 \begin_layout Itemize
957 Beware reinventing the wheel.
958 \end_layout
959
960 \begin_layout Standard
961 On that last point, LyX does have quite a few features tucked into it, and
962  more are coming.
963  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
964  feature before you decide you have to do it by hand.
965  Moreover, there are numerous LaTeX packages out there to do all sorts of
966  things, from labels to envelopes to fancy multipage tables.
967  Check out 
968 \begin_inset CommandInset href
969 LatexCommand href
970 name "CTAN"
971 target "http://www.ctan.org/"
972
973 \end_inset
974
975  for details, and see chapter 
976 \begin_inset CommandInset ref
977 LatexCommand ref
978 reference "cha:secrets"
979
980 \end_inset
981
982 .
983 \end_layout
984
985 \begin_layout Standard
986 If you do need to do some wild and fancy things within your document, be
987  sure to check out a good LaTeX book for assistance.
988  There are a number of them listed in the bibliography of the 
989 \emph on
990 User's Guide
991 \emph default
992 .
993 \end_layout
994
995 \begin_layout Section
996 LyX and the LaTeX Preamble
997 \end_layout
998
999 \begin_layout Subsection
1000 About the LaTeX Preamble
1001 \end_layout
1002
1003 \begin_layout Standard
1004 If you already know LaTeX, there is no need to explain here what the preamble
1005  is good for.
1006  If you don't, the following will give you some ideas—we recommend again
1007  that you consult a LaTeX book for further information.
1008  In any case, you should read the points below, because they explain what
1009  you can do and what you don't need to do in the LaTeX preamble of a LyX
1010  document.
1011 \end_layout
1012
1013 \begin_layout Standard
1014 The LaTeX preamble comes at the very beginning of a document, 
1015 \emph on
1016 before
1017 \emph default
1018  the text.
1019  It serves to:
1020 \end_layout
1021
1022 \begin_layout Itemize
1023 Declare the document class.
1024  
1025 \begin_inset Newline newline
1026 \end_inset
1027
1028 LyX already does this for you.
1029  If you're a seasoned LaTeX-nician, and you have a custom document class
1030  you want to use, check out the 
1031 \emph on
1032 Customization Manual
1033 \emph default
1034  for information on how to make LyX interface to it.
1035 \end_layout
1036
1037 \begin_layout Itemize
1038 Declare the usage of packages.
1039  
1040 \begin_inset Newline newline
1041 \end_inset
1042
1043 LaTeX packages provide special commands, which are only available within
1044  a document when the package has been declared in the preamble.
1045  For example, the package 
1046 \begin_inset Flex Code
1047 status collapsed
1048
1049 \begin_layout Plain Layout
1050 indentfirst
1051 \end_layout
1052
1053 \end_inset
1054
1055  forces all paragraphs to be indented.
1056  There are other packages for labels, envelopes, margins, etc.
1057  
1058 \end_layout
1059
1060 \begin_layout Itemize
1061 Set counters, variables, lengths and widths.
1062  
1063 \begin_inset Newline newline
1064 \end_inset
1065
1066 There are several LaTeX counters and variables which 
1067 \emph on
1068 must
1069 \emph default
1070  be set globally from within the preamble in order to have the desired effect.
1071  (There are variables which you can set and reset inside the document, too.)
1072  Margins are a good example of something which must be set in the preamble.
1073  Another example is the label format for lists.
1074  You can actually set these just about anywhere, but it's best to do it
1075  just once, inside the preamble.
1076 \end_layout
1077
1078 \begin_layout Itemize
1079 Declare user defined commands (with 
1080 \begin_inset Flex Code
1081 status collapsed
1082
1083 \begin_layout Plain Layout
1084
1085 \backslash
1086 newcommand
1087 \end_layout
1088
1089 \end_inset
1090
1091  or 
1092 \begin_inset Flex Code
1093 status collapsed
1094
1095 \begin_layout Plain Layout
1096
1097 \backslash
1098 renewcommand
1099 \end_layout
1100
1101 \end_inset
1102
1103 ).
1104 \begin_inset Newline newline
1105 \end_inset
1106
1107 These are abbreviations for LaTeX commands which appear very often inside
1108  a document.
1109  Although the preamble is a good place to declare such commands, they 
1110 \emph on
1111 can
1112 \emph default
1113  be declared anywhere (before they are used for the first time, of course).
1114  This can be useful if there is a lot of raw LaTeX code in your document,
1115  which normally should not be the case.
1116 \end_layout
1117
1118 \begin_layout Standard
1119 LyX adds its own set of definitions to the preamble of the 
1120 \begin_inset Flex Code
1121 status collapsed
1122
1123 \begin_layout Plain Layout
1124 .tex
1125 \end_layout
1126
1127 \end_inset
1128
1129  file it produces.
1130  This makes LaTeX files generated by LyX portable.
1131 \end_layout
1132
1133 \begin_layout Subsection
1134 Changing the Preamble
1135 \end_layout
1136
1137 \begin_layout Standard
1138 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1139  can't change them without patching LyX itself.
1140  You can, however, add your own stuff to the preamble by selecting 
1141 \begin_inset Flex MenuItem
1142 status collapsed
1143
1144 \begin_layout Plain Layout
1145 LaTeX
1146 \begin_inset space ~
1147 \end_inset
1148
1149 Preamble
1150 \end_layout
1151
1152 \end_inset
1153
1154  in the 
1155 \begin_inset Flex MenuItem
1156 status collapsed
1157
1158 \begin_layout Plain Layout
1159 Document\SpecialChar \menuseparator
1160 Settings
1161 \end_layout
1162
1163 \end_inset
1164
1165  dialog.
1166  LyX adds anything in the 
1167 \begin_inset Flex MenuItem
1168 status collapsed
1169
1170 \begin_layout Plain Layout
1171 Preamble
1172 \end_layout
1173
1174 \end_inset
1175
1176  dialog to its own built-in preamble.
1177  Before adding your own declarations in the preamble, you should make sure
1178  that LyX doesn't already support what you want to do.
1179  (Remember what we said about reinventing the wheel?) Also, 
1180 \emph on
1181 make sure your preamble code is correct
1182 \emph default
1183 .
1184  LyX doesn't check it for you.
1185  If there is an error, you're likely to get an error like 
1186 \begin_inset Quotes eld
1187 \end_inset
1188
1189
1190 \begin_inset Flex Code
1191 status collapsed
1192
1193 \begin_layout Plain Layout
1194 Missing 
1195 \backslash
1196 begin{document}
1197 \end_layout
1198
1199 \end_inset
1200
1201
1202 \begin_inset Quotes erd
1203 \end_inset
1204
1205 .
1206  If you see this error, check your preamble.
1207 \end_layout
1208
1209 \begin_layout Subsection
1210 Examples
1211 \end_layout
1212
1213 \begin_layout Standard
1214 Here are some examples of what you can add to a preamble, and what they
1215  do.
1216 \end_layout
1217
1218 \begin_layout Subsubsection
1219 Example #1: Offsets
1220 \end_layout
1221
1222 \begin_layout Standard
1223 There are two variables under LaTeX that control page position: 
1224 \begin_inset Flex Code
1225 status collapsed
1226
1227 \begin_layout Plain Layout
1228
1229 \backslash
1230 hoffset
1231 \end_layout
1232
1233 \end_inset
1234
1235  and 
1236 \begin_inset Flex Code
1237 status collapsed
1238
1239 \begin_layout Plain Layout
1240
1241 \backslash
1242 voffset
1243 \end_layout
1244
1245 \end_inset
1246
1247 .
1248  Their names should be self-explanatory.
1249  These variables are useful if you think for a moment about computer labels.
1250  Sometimes, the size of a print medium and the area of the medium that you
1251  can actually print on aren't the same.
1252  This is where 
1253 \begin_inset Flex Code
1254 status collapsed
1255
1256 \begin_layout Plain Layout
1257
1258 \backslash
1259 hoffset
1260 \end_layout
1261
1262 \end_inset
1263
1264  and 
1265 \begin_inset Flex Code
1266 status collapsed
1267
1268 \begin_layout Plain Layout
1269
1270 \backslash
1271 voffset
1272 \end_layout
1273
1274 \end_inset
1275
1276  come in.
1277 \end_layout
1278
1279 \begin_layout Standard
1280 The default values for 
1281 \begin_inset Flex Code
1282 status collapsed
1283
1284 \begin_layout Plain Layout
1285
1286 \backslash
1287 hoffset
1288 \end_layout
1289
1290 \end_inset
1291
1292  and 
1293 \begin_inset Flex Code
1294 status collapsed
1295
1296 \begin_layout Plain Layout
1297
1298 \backslash
1299 voffset
1300 \end_layout
1301
1302 \end_inset
1303
1304  are both 0
1305 \begin_inset space \thinspace{}
1306 \end_inset
1307
1308 points, i.
1309 \begin_inset space \thinspace{}
1310 \end_inset
1311
1312 e.
1313 \begin_inset space \space{}
1314 \end_inset
1315
1316 the page isn't shifted.
1317  Unfortunately, some DVI drivers always seem to shift the page.
1318  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1319  If you're using LyX on a system that you don't personally maintain, and
1320  your sysadmin is a doofus, 
1321 \begin_inset Flex Code
1322 status collapsed
1323
1324 \begin_layout Plain Layout
1325
1326 \backslash
1327 hoffset
1328 \end_layout
1329
1330 \end_inset
1331
1332  and 
1333 \begin_inset Flex Code
1334 status collapsed
1335
1336 \begin_layout Plain Layout
1337
1338 \backslash
1339 voffset
1340 \end_layout
1341
1342 \end_inset
1343
1344  can save the day.
1345  Suppose your left and top margins are always 0.5
1346 \begin_inset space \thinspace{}
1347 \end_inset
1348
1349 inches too big.
1350  You can add this to the preamble:
1351 \end_layout
1352
1353 \begin_layout LyX-Code
1354
1355 \backslash
1356 setlength{
1357 \backslash
1358 hoffset}{-0.5 in}
1359 \end_layout
1360
1361 \begin_layout LyX-Code
1362
1363 \backslash
1364 setlength{
1365 \backslash
1366 voffset}{-0.5 in}
1367 \end_layout
1368
1369 \begin_layout Standard
1370 and your margins should now be correct.
1371 \end_layout
1372
1373 \begin_layout Subsubsection
1374 Example #2: Labels
1375 \end_layout
1376
1377 \begin_layout Standard
1378 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1379  There's a rather nice package, available at your nearest CTAN archive,
1380  for printing sheets of labels: 
1381 \begin_inset Flex Code
1382 status collapsed
1383
1384 \begin_layout Plain Layout
1385 labels.sty
1386 \end_layout
1387
1388 \end_inset
1389
1390 .
1391  Now, your system may not have this package installed by default.
1392  We leave that up to you to check.
1393  You'll also want to read the documentation for it; we're not going to do
1394  that for you.
1395  Since this is an example, however, we'll give you an example of how you
1396  use this package.
1397 \end_layout
1398
1399 \begin_layout Standard
1400 First, make sure you're using the 
1401 \begin_inset Flex Code
1402 status collapsed
1403
1404 \begin_layout Plain Layout
1405 article
1406 \end_layout
1407
1408 \end_inset
1409
1410  document class.
1411  Next, you need to put the following in your preamble:
1412 \end_layout
1413
1414 \begin_layout LyX-Code
1415
1416 \backslash
1417 usepackage{labels}
1418 \end_layout
1419
1420 \begin_layout LyX-Code
1421
1422 \backslash
1423 LabelCols=3
1424 \end_layout
1425
1426 \begin_layout LyX-Code
1427
1428 \backslash
1429 LabelRows=7
1430 \end_layout
1431
1432 \begin_layout LyX-Code
1433
1434 \backslash
1435 LeftBorder=8mm
1436 \end_layout
1437
1438 \begin_layout LyX-Code
1439
1440 \backslash
1441 RightBorder=8mm
1442 \end_layout
1443
1444 \begin_layout LyX-Code
1445
1446 \backslash
1447 TopBorder=9mm
1448 \end_layout
1449
1450 \begin_layout LyX-Code
1451
1452 \backslash
1453 BottomBorder=2mm
1454 \end_layout
1455
1456 \begin_layout Standard
1457 This sets things up for Avery label sheets, stock #5360.
1458  You're now ready to print labels, but you'll need to insert LaTeX code,
1459  placing the commands 
1460 \begin_inset Flex Code
1461 status collapsed
1462
1463 \begin_layout Plain Layout
1464
1465 \backslash
1466 begin{labels}
1467 \end_layout
1468
1469 \end_inset
1470
1471  and 
1472 \begin_inset Flex Code
1473 status collapsed
1474
1475 \begin_layout Plain Layout
1476
1477 \backslash
1478 end{labels}
1479 \end_layout
1480
1481 \end_inset
1482
1483  around each label text.
1484  This and other special features of 
1485 \begin_inset Flex Code
1486 status collapsed
1487
1488 \begin_layout Plain Layout
1489 labels.sty
1490 \end_layout
1491
1492 \end_inset
1493
1494  are explained in its documentation.
1495 \end_layout
1496
1497 \begin_layout Standard
1498 Someday, someone may write a LyX layout file to support this package directly.
1499  Maybe that someone is you.
1500 \end_layout
1501
1502 \begin_layout Subsubsection
1503 Example #3: Paragraph Indentation
1504 \end_layout
1505
1506 \begin_layout Standard
1507 Americans are trained to indent the first line of 
1508 \emph on
1509 every
1510 \emph default
1511  paragraph.
1512  As with all of their other weird quirks, most Americans will whine and
1513  moan until they can have their way and indent the first line of all paragraphs.
1514  (Yes, we're joking.
1515  (We are?) 
1516 \emph on
1517 Yeah
1518 \emph default
1519 , we are.)
1520 \end_layout
1521
1522 \begin_layout Standard
1523 Of course, this behavior isn't standard typography.
1524  In books, you typically only indent the first line of a paragraph 
1525 \emph on
1526 if
1527 \emph default
1528  it follows another one.
1529  The idea behind indenting the first line of a paragraph is to distinguish
1530  neighboring paragraphs from one another.
1531  If there is no previous paragraph—for example, if it follows a figure or
1532  is the first paragraph in a section—then there is no need for indentation.
1533  
1534 \end_layout
1535
1536 \begin_layout Standard
1537 If you're a typical American (we're still joking!), though, you don't care
1538  about such esoteric things; you want your indentation! Add this to the
1539  preamble:
1540 \end_layout
1541
1542 \begin_layout LyX-Code
1543
1544 \backslash
1545 usepackage{indentfirst}
1546 \end_layout
1547
1548 \begin_layout Standard
1549 If your TeX distribution isn't braindead, you'll have this package, and
1550  all of your paragraphs will get the indentation the Founding Fathers intended
1551  they should have.
1552 \end_layout
1553
1554 \begin_layout Subsubsection
1555 Example #4: This Document
1556 \end_layout
1557
1558 \begin_layout Standard
1559 You can also check out the preamble of this document to get an idea of some
1560  of the advanced things you can do.
1561  Also, there are more examples and an assortment of LaTeX 
1562 \begin_inset Quotes eld
1563 \end_inset
1564
1565 dirty tricks
1566 \begin_inset Quotes erd
1567 \end_inset
1568
1569  given in Chapter
1570 \begin_inset space ~
1571 \end_inset
1572
1573
1574 \begin_inset CommandInset ref
1575 LatexCommand ref
1576 reference "cha:secrets"
1577
1578 \end_inset
1579
1580 .
1581  
1582 \end_layout
1583
1584 \begin_layout Section
1585 LyX and LaTeX Errors
1586 \end_layout
1587
1588 \begin_layout Standard
1589 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1590  going.
1591  It then uses the logfile from the LaTeX run to do a post-mortem.
1592  After analyzing the logfile,LyX displays a dialog listing the errors.
1593  Clicking on any one of them will take you to the position in your LyX file
1594  where the error occurred.
1595 \begin_inset Foot
1596 status collapsed
1597
1598 \begin_layout Plain Layout
1599 Well, usually.
1600  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1601  right line.
1602  There are also cases where LaTeX reports the error on one line, but the
1603  actual error is earlier.
1604  This is not unlike forgetting a closing brace in a program: You'll get
1605  an error, but only later.
1606 \end_layout
1607
1608 \end_inset
1609
1610
1611 \end_layout
1612
1613 \begin_layout Standard
1614 Some folks also like to look at the log file directly: It is available from
1615  
1616 \begin_inset Flex MenuItem
1617 status collapsed
1618
1619 \begin_layout Plain Layout
1620 Document
1621 \bar under
1622 \SpecialChar \menuseparator
1623
1624 \bar default
1625 Latex
1626 \begin_inset space ~
1627 \end_inset
1628
1629 Log
1630 \end_layout
1631
1632 \end_inset
1633
1634 .
1635  There are some fairly common error messages and warnings.
1636  We'll cover those here.
1637  You should look at a good LaTeX book for a complete listing.
1638 \end_layout
1639
1640 \begin_layout Itemize
1641 \begin_inset Flex Code
1642 status collapsed
1643
1644 \begin_layout Plain Layout
1645 LaTeX Warning
1646 \end_layout
1647
1648 \end_inset
1649
1650
1651 \begin_inset Newline newline
1652 \end_inset
1653
1654 Anything beginning with these words is a warning message for the purpose
1655  of 
1656 \begin_inset Quotes eld
1657 \end_inset
1658
1659 debugging
1660 \begin_inset Quotes erd
1661 \end_inset
1662
1663  the LaTeX code itself.
1664  You'll get messages like this if you added or changed cross-references
1665  or bibliography entries, in which case, LaTeX is trying to tell you that
1666  you need to make another run.
1667  You can by-and-large ignore these.
1668 \end_layout
1669
1670 \begin_layout Itemize
1671 \begin_inset Flex Code
1672 status collapsed
1673
1674 \begin_layout Plain Layout
1675 LaTeX Font Warning
1676 \end_layout
1677
1678 \end_inset
1679
1680
1681 \begin_inset Newline newline
1682 \end_inset
1683
1684 Another warning message, this time about fonts which LaTeX couldn't find.
1685  The rest of the message will often say something about a replacement font
1686  that LaTeX used.
1687  You can safely ignore these, too.
1688 \end_layout
1689
1690 \begin_layout Itemize
1691 \begin_inset Flex Code
1692 status collapsed
1693
1694 \begin_layout Plain Layout
1695 Overfull 
1696 \backslash
1697 hbox
1698 \end_layout
1699
1700 \end_inset
1701
1702
1703 \begin_inset Newline newline
1704 \end_inset
1705
1706 LaTeX absolutely 
1707 \emph on
1708 loves
1709 \emph default
1710  to spew these out.
1711  They are warnings about lines that were too long and run past the right
1712  margin.
1713  Almost always, this is unnoticeable in the final output.
1714  (It can be just a point or two.) Or, only one or two characters extend past
1715  the margin.
1716  LaTeX seems to generate at least one of these messages for just about any
1717  document you write.
1718 \begin_inset Newline newline
1719 \end_inset
1720
1721 You can ignore these messages.
1722  Your eyes will tell you if there's a problem with something that's too
1723  wide; just look at the output.
1724 \begin_inset Foot
1725 status collapsed
1726
1727 \begin_layout Plain Layout
1728 You can also enable the `draft' option in 
1729 \begin_inset Flex MenuItem
1730 status collapsed
1731
1732 \begin_layout Plain Layout
1733 Document
1734 \bar under
1735 \SpecialChar \menuseparator
1736
1737 \bar default
1738 Settings
1739 \end_layout
1740
1741 \end_inset
1742
1743 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1744 \end_layout
1745
1746 \end_inset
1747
1748
1749 \end_layout
1750
1751 \begin_layout Itemize
1752 \begin_inset Flex Code
1753 status collapsed
1754
1755 \begin_layout Plain Layout
1756 Underfull 
1757 \backslash
1758 hbox
1759 \end_layout
1760
1761 \end_inset
1762
1763
1764 \begin_inset Newline newline
1765 \end_inset
1766
1767 Not quite as common as its cousin.
1768  LaTeX seems to like to print lines that are a bit too wide as opposed to
1769  ones that are a bit too narrow.
1770  We have no idea why.
1771 \end_layout
1772
1773 \begin_layout Itemize
1774 \begin_inset Flex Code
1775 status collapsed
1776
1777 \begin_layout Plain Layout
1778 Overfull 
1779 \backslash
1780 vbox
1781 \end_layout
1782
1783 \end_inset
1784
1785  and 
1786 \begin_inset Flex Code
1787 status collapsed
1788
1789 \begin_layout Plain Layout
1790 Underfull 
1791 \backslash
1792 vbox
1793 \end_layout
1794
1795 \end_inset
1796
1797
1798 \begin_inset Newline newline
1799 \end_inset
1800
1801 Warnings about troubles breaking the page.
1802  Once again, just look at the output.
1803  Your eyes will tell you where something has gone wrong.
1804 \end_layout
1805
1806 \begin_layout Itemize
1807 \begin_inset Flex Code
1808 status collapsed
1809
1810 \begin_layout Plain Layout
1811  LaTeX Error: File 
1812 \begin_inset Quotes els
1813 \end_inset
1814
1815 Xxxx
1816 \begin_inset Quotes ers
1817 \end_inset
1818
1819  not found
1820 \end_layout
1821
1822 \end_inset
1823
1824
1825 \begin_inset Newline newline
1826 \end_inset
1827
1828 The file 
1829 \begin_inset Quotes eld
1830 \end_inset
1831
1832 Xxxx
1833 \begin_inset Quotes erd
1834 \end_inset
1835
1836  isn't installed on this system.
1837  This usually appears because some package your document needs isn't installed.
1838  If you didn't touch the preamble or didn't use the 
1839 \begin_inset Flex Code
1840 status collapsed
1841
1842 \begin_layout Plain Layout
1843
1844 \backslash
1845 usepackage{}
1846 \end_layout
1847
1848 \end_inset
1849
1850  command, then one of the packages LyX tried to load is missing.
1851  Use 
1852 \begin_inset Flex MenuItem
1853 status collapsed
1854
1855 \begin_layout Plain Layout
1856 Help\SpecialChar \menuseparator
1857 LaTeX Configuration
1858 \end_layout
1859
1860 \end_inset
1861
1862  to get a list of packages that LyX knows about.
1863  This file is updated whenever you reconfigure LyX (using 
1864 \begin_inset Flex MenuItem
1865 status collapsed
1866
1867 \begin_layout Plain Layout
1868 Tools\SpecialChar \menuseparator
1869 Reconfigure
1870 \end_layout
1871
1872 \end_inset
1873
1874 ) and tells you which packages have been detected and what they do.
1875 \begin_inset Newline newline
1876 \end_inset
1877
1878 If you did use the 
1879 \begin_inset Flex Code
1880 status collapsed
1881
1882 \begin_layout Plain Layout
1883
1884 \backslash
1885 usepackage{}
1886 \end_layout
1887
1888 \end_inset
1889
1890  command and the package in question isn't installed, then you'll need to
1891  install it yourself.
1892 \end_layout
1893
1894 \begin_layout Itemize
1895 \begin_inset Flex Code
1896 status collapsed
1897
1898 \begin_layout Plain Layout
1899 LaTeX Error: Unknown option
1900 \end_layout
1901
1902 \end_inset
1903
1904
1905 \begin_inset Newline newline
1906 \end_inset
1907
1908 Error messages beginning with this are trying to tell you that you specified
1909  a bad or undefined option to a package.
1910  Check the package's documentation.
1911 \end_layout
1912
1913 \begin_layout Itemize
1914 \begin_inset Flex Code
1915 status collapsed
1916
1917 \begin_layout Plain Layout
1918 Undefined control sequence
1919 \end_layout
1920
1921 \end_inset
1922
1923
1924 \begin_inset Newline newline
1925 \end_inset
1926
1927 If you've inserted LaTeX code into your document, but made a typo, you'll
1928  get one of these.
1929  You may have forgotten to load a package.
1930  In any case, this error message usually means that you used an undefined
1931  command.
1932  
1933 \end_layout
1934
1935 \begin_layout Standard
1936 There are other error and warning messages.
1937  Some are self-explanatory.
1938  These are usually LaTeX messages.
1939  Others are downright cryptic.
1940  These are usually TeX error messages, and we really have 
1941 \emph on
1942 no clue
1943 \emph default
1944  what they mean or how to decipher them.
1945  No-one does.
1946 \end_layout
1947
1948 \begin_layout Standard
1949 There's a general sequence you should follow if you get error messages:
1950 \end_layout
1951
1952 \begin_layout Enumerate
1953 Look at the LaTeX code you inserted for typos.
1954 \end_layout
1955
1956 \begin_layout Enumerate
1957 If there are no typos, check that you used the command(s) correctly.
1958 \end_layout
1959
1960 \begin_layout Enumerate
1961 If you get a bunch of error boxes piled up at the very top of the document—and
1962  especially if you see a 
1963 \begin_inset Quotes eld
1964 \end_inset
1965
1966
1967 \begin_inset Flex Code
1968 status collapsed
1969
1970 \begin_layout Plain Layout
1971 Missing 
1972 \backslash
1973 begin{document}
1974 \end_layout
1975
1976 \end_inset
1977
1978
1979 \begin_inset Quotes erd
1980 \end_inset
1981
1982  error—it means that there are errors in the preamble.
1983  Start debugging your preamble.
1984 \end_layout
1985
1986 \begin_layout Enumerate
1987 If you didn't add anything to the preamble and didn't add any LaTeX code
1988  to the document, the first suspect is your LaTeX distribution itself.
1989  Check for missing packages and install them.
1990 \end_layout
1991
1992 \begin_layout Enumerate
1993 Okay, so there are no missing packages.
1994  Did you use any of the fine-tuning options in LyX? Specifically, did you
1995  
1996 \emph on
1997 misuse
1998 \emph default
1999  any of them, like trying to manually insert lots of 
2000 \begin_inset Flex Code
2001 status collapsed
2002
2003 \begin_layout Plain Layout
2004 Protected
2005 \begin_inset space ~
2006 \end_inset
2007
2008 Blanks
2009 \end_layout
2010
2011 \end_inset
2012
2013
2014 \begin_inset Flex Code
2015 status collapsed
2016
2017 \begin_layout Plain Layout
2018 Linebreaks
2019 \end_layout
2020
2021 \end_inset
2022
2023 , or 
2024 \begin_inset Flex Code
2025 status collapsed
2026
2027 \begin_layout Plain Layout
2028 Pagebreaks
2029 \end_layout
2030
2031 \end_inset
2032
2033 ? Did you try to kludge something together with these instead of using the
2034  appropriate paragraph environment?
2035 \end_layout
2036
2037 \begin_layout Enumerate
2038 All right, you didn't use any of the fine-tuning options, you played by
2039  the rules.
2040  Did you try to pull a fancy maneuver? Did you do something funky inside
2041  a table or an equation, like inserting a graphic into a table cell?
2042 \end_layout
2043
2044 \begin_layout Enumerate
2045 Do you have long sections of text where LaTeX cannot find a place to break
2046  a line? By default, LaTeX is rather strict about how much extra inter-word
2047  spacing it will add in order to break a line.
2048  Preferably, you should rework the paragraph to avoid the problem.
2049  If this isn't an option, you can wrap your text in 
2050 \begin_inset Flex Code
2051 status collapsed
2052
2053 \begin_layout Plain Layout
2054
2055 \backslash
2056 sloppypar
2057 \end_layout
2058
2059 \end_inset
2060
2061  to make LaTeX's line breaking more, well, sloppy.
2062 \end_layout
2063
2064 \begin_layout Enumerate
2065 Did you go overboard with the nesting? LyX (currently) doesn't check to
2066  make sure you're in the limits for nesting environments.
2067  If you nested a bunch of environments to the 
2068 \begin_inset Formula $17^{\mathrm{th}}$
2069 \end_inset
2070
2071  level, that's the problem.
2072  (The limit in LaTeX is five.)
2073 \end_layout
2074
2075 \begin_layout Enumerate
2076 Okay, you didn't get any error messages, but your output looks awful.
2077  If you have a table or figure that's too wide or long for the page, you
2078  need to:
2079 \end_layout
2080
2081 \begin_deeper
2082 \begin_layout Enumerate
2083 rescale the figure so it fits.
2084 \end_layout
2085
2086 \begin_layout Enumerate
2087 trim down the table so it fits.
2088 \end_layout
2089
2090 \end_deeper
2091 \begin_layout Enumerate
2092 If something else is wrong with the output, and you didn't try to pull anything
2093  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2094 \end_layout
2095
2096 \begin_layout Standard
2097 If all this doesn't help—well, then 
2098 \emph on
2099 perhaps
2100 \emph default
2101  you might have found a bug in LyX\SpecialChar \ldots{}
2102 .
2103 \end_layout
2104
2105 \begin_layout Chapter
2106 Supplemental Tools
2107 \end_layout
2108
2109 \begin_layout Section
2110 Customizing Bibliographies with BibTeX
2111 \end_layout
2112
2113 \begin_layout Standard
2114 The most basic information about how to use BibTeX with LyX is contained
2115  in the section 
2116 \emph on
2117 Bibliography databases (BibTeX)
2118 \emph default
2119  of the 
2120 \emph on
2121 User's Guide
2122 \emph default
2123 .
2124  The following subsections explain special bibliography features supported
2125  by LyX.
2126 \end_layout
2127
2128 \begin_layout Subsection
2129 Alternative Citation Styles
2130 \end_layout
2131
2132 \begin_layout Standard
2133 Standard BibTeX uses numbers (e.
2134 \begin_inset space \thinspace{}
2135 \end_inset
2136
2137 g.
2138 \begin_inset space \space{}
2139 \end_inset
2140
2141
2142 \begin_inset Quotes eld
2143 \end_inset
2144
2145 [12]
2146 \begin_inset Quotes erd
2147 \end_inset
2148
2149 ) to refer to a cited work.
2150  However, in many scientific disciplines, other citation styles are in use.
2151  The most common one is the author-year style (e.
2152 \begin_inset space \thinspace{}
2153 \end_inset
2154
2155 g.
2156 \begin_inset space \space{}
2157 \end_inset
2158
2159
2160 \begin_inset Quotes eld
2161 \end_inset
2162
2163 Knuth 1984a
2164 \begin_inset Quotes erd
2165 \end_inset
2166
2167 ).
2168  LyX supports two packages that provide this style, 
2169 \begin_inset Flex Code
2170 status collapsed
2171
2172 \begin_layout Plain Layout
2173 natbib
2174 \end_layout
2175
2176 \end_inset
2177
2178  and 
2179 \begin_inset Flex Code
2180 status collapsed
2181
2182 \begin_layout Plain Layout
2183 jurabib
2184 \end_layout
2185
2186 \end_inset
2187
2188 .
2189  Both packages have their pros and cons, which cannot be listed in detail.
2190  If you only want to have simple author-year (or author-numerical) style,
2191  or if you want to use one of the countless style files for 
2192 \begin_inset Flex Code
2193 status collapsed
2194
2195 \begin_layout Plain Layout
2196 natbib
2197 \end_layout
2198
2199 \end_inset
2200
2201 , than the established 
2202 \begin_inset Flex Code
2203 status collapsed
2204
2205 \begin_layout Plain Layout
2206 natbib
2207 \end_layout
2208
2209 \end_inset
2210
2211  package is probably your choice.
2212  If you need special features like short title references, ibidem etc., you
2213  might consider the 
2214 \begin_inset Flex Code
2215 status collapsed
2216
2217 \begin_layout Plain Layout
2218 jurabib
2219 \end_layout
2220
2221 \end_inset
2222
2223  package.
2224 \end_layout
2225
2226 \begin_layout Standard
2227 The handling of both packages in LyX is basically the same.
2228  Go to 
2229 \begin_inset Flex MenuItem
2230 status collapsed
2231
2232 \begin_layout Plain Layout
2233 Document\SpecialChar \menuseparator
2234 Settings
2235 \end_layout
2236
2237 \end_inset
2238
2239  and select under 
2240 \begin_inset Flex MenuItem
2241 status collapsed
2242
2243 \begin_layout Plain Layout
2244 Bibliography
2245 \end_layout
2246
2247 \end_inset
2248
2249  the option 
2250 \begin_inset Flex MenuItem
2251 status collapsed
2252
2253 \begin_layout Plain Layout
2254 Natbib
2255 \end_layout
2256
2257 \end_inset
2258
2259  or 
2260 \begin_inset Flex MenuItem
2261 status collapsed
2262
2263 \begin_layout Plain Layout
2264 Jurabib
2265 \end_layout
2266
2267 \end_inset
2268
2269 .
2270  With both packages, you will get some extra features in the citation dialog
2271  and you can select the style of the reference (
2272 \begin_inset Quotes eld
2273 \end_inset
2274
2275 Knuth 1984
2276 \begin_inset Quotes erd
2277 \end_inset
2278
2279
2280 \begin_inset Quotes eld
2281 \end_inset
2282
2283 Knuth (1984)
2284 \begin_inset Quotes erd
2285 \end_inset
2286
2287
2288 \begin_inset Quotes eld
2289 \end_inset
2290
2291 Knuth, 1984
2292 \begin_inset Quotes erd
2293 \end_inset
2294
2295
2296 \begin_inset Quotes eld
2297 \end_inset
2298
2299 1984
2300 \begin_inset Quotes erd
2301 \end_inset
2302
2303  etc.).
2304  Note that both packages need specifically designed style files.
2305  They both ship their own, but there are lots of additional style files,
2306  and there is even an interactive style file builder
2307 \begin_inset Foot
2308 status collapsed
2309
2310 \begin_layout Plain Layout
2311 See 
2312 \begin_inset Flex URL
2313 status open
2314
2315 \begin_layout Plain Layout
2316
2317 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2318 \end_layout
2319
2320 \end_inset
2321
2322
2323 \end_layout
2324
2325 \end_inset
2326
2327  for 
2328 \begin_inset Flex Code
2329 status collapsed
2330
2331 \begin_layout Plain Layout
2332 natbib
2333 \end_layout
2334
2335 \end_inset
2336
2337 .
2338 \end_layout
2339
2340 \begin_layout Subsection
2341 Sectioned Bibliographies
2342 \end_layout
2343
2344 \begin_layout Standard
2345 Sometimes you might need to divide your bibliography into several sections.
2346  If you are for instance a historian, the possibility to separate sources
2347  and scientific works is most likely a 
2348 \begin_inset Quotes eld
2349 \end_inset
2350
2351 must have
2352 \begin_inset Quotes erd
2353 \end_inset
2354
2355 .
2356  Unfortunately, BibTeX itself does not allow you to do this.
2357  But with the help of some LaTeX packages, BibTeX can be extended to fit
2358  your needs.
2359 \end_layout
2360
2361 \begin_layout Standard
2362 LyX provides native support for one of these packages, 
2363 \family typewriter
2364 bibtopic
2365 \family default
2366 .
2367 \begin_inset Foot
2368 status collapsed
2369
2370 \begin_layout Plain Layout
2371 Available from 
2372 \begin_inset Flex URL
2373 status open
2374
2375 \begin_layout Plain Layout
2376
2377 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2378 \end_layout
2379
2380 \end_inset
2381
2382
2383 \end_layout
2384
2385 \end_inset
2386
2387  The advantage of this package (compared to other packages like 
2388 \family typewriter
2389 multibib
2390 \family default
2391 ) is that you don't need to define new citation commands.
2392  Instead, you need to prepare different bibliographic databases which include
2393  the entries for the different sections of the bibliography.
2394  For example: If you want to divide your bibliography into the sections
2395  
2396 \begin_inset Quotes eld
2397 \end_inset
2398
2399 Sources
2400 \begin_inset Quotes erd
2401 \end_inset
2402
2403  and 
2404 \begin_inset Quotes eld
2405 \end_inset
2406
2407 Scientific works
2408 \begin_inset Quotes erd
2409 \end_inset
2410
2411 , you first need to create two bibliographic databases, e.
2412 \begin_inset space \thinspace{}
2413 \end_inset
2414
2415 g.
2416 \begin_inset space \space{}
2417 \end_inset
2418
2419
2420 \begin_inset Flex Code
2421 status collapsed
2422
2423 \begin_layout Plain Layout
2424 sources.bib
2425 \end_layout
2426
2427 \end_inset
2428
2429  and 
2430 \begin_inset Flex Code
2431 status collapsed
2432
2433 \begin_layout Plain Layout
2434 scientific.bib
2435 \end_layout
2436
2437 \end_inset
2438
2439 .
2440  
2441 \end_layout
2442
2443 \begin_layout Standard
2444 Go to 
2445 \begin_inset Flex MenuItem
2446 status collapsed
2447
2448 \begin_layout Plain Layout
2449 Document\SpecialChar \menuseparator
2450 Settings
2451 \end_layout
2452
2453 \end_inset
2454
2455  and check under 
2456 \begin_inset Flex MenuItem
2457 status collapsed
2458
2459 \begin_layout Plain Layout
2460 Bibliography
2461 \end_layout
2462
2463 \end_inset
2464
2465  the option 
2466 \begin_inset Flex MenuItem
2467 status collapsed
2468
2469 \begin_layout Plain Layout
2470 Sectioned bibliography
2471 \end_layout
2472
2473 \end_inset
2474
2475 .
2476  Now you can insert multiple BibTeX bibliographies, one for each section
2477  of your bibliography.
2478  Returning to our example: Insert the BibTeX bibliography 
2479 \begin_inset Flex Code
2480 status collapsed
2481
2482 \begin_layout Plain Layout
2483 sources.bib
2484 \end_layout
2485
2486 \end_inset
2487
2488  and a second one for the database 
2489 \begin_inset Flex Code
2490 status collapsed
2491
2492 \begin_layout Plain Layout
2493 scientific.bib
2494 \end_layout
2495
2496 \end_inset
2497
2498 .
2499  You are free to use the same or different styles for each section.
2500  Additionally, you can chose if the bibliography section should contain
2501  
2502 \begin_inset Quotes eld
2503 \end_inset
2504
2505 all cited references
2506 \begin_inset Quotes erd
2507 \end_inset
2508
2509  of the specified database(s) (which is the default), 
2510 \begin_inset Quotes eld
2511 \end_inset
2512
2513 all uncited references
2514 \begin_inset Quotes erd
2515 \end_inset
2516
2517  or even 
2518 \begin_inset Quotes eld
2519 \end_inset
2520
2521 all references
2522 \begin_inset Quotes erd
2523 \end_inset
2524
2525 .
2526  This might be useful if you would like to separate your bibliography into
2527  three sections: 
2528 \begin_inset Quotes eld
2529 \end_inset
2530
2531 Cited sources
2532 \begin_inset Quotes erd
2533 \end_inset
2534
2535
2536 \begin_inset Quotes eld
2537 \end_inset
2538
2539 Uncited sources
2540 \begin_inset Quotes erd
2541 \end_inset
2542
2543 , and 
2544 \begin_inset Quotes eld
2545 \end_inset
2546
2547 Scientific works
2548 \begin_inset Quotes erd
2549 \end_inset
2550
2551 .
2552  The titles for the sections can be added as ordinary sections or subsections.
2553  Since 
2554 \begin_inset Flex Code
2555 status collapsed
2556
2557 \begin_layout Plain Layout
2558 bibtopic
2559 \end_layout
2560
2561 \end_inset
2562
2563  removes the bibliography title, you have manually re-add that, too (as
2564  a chapter* or section*, for instance).
2565 \end_layout
2566
2567 \begin_layout Subsection
2568 Multiple Bibliographies
2569 \end_layout
2570
2571 \begin_layout Standard
2572 Multiple bibliographies, e.
2573 \begin_inset space \thinspace{}
2574 \end_inset
2575
2576 g.
2577 \begin_inset space \space{}
2578 \end_inset
2579
2580 a bibliography for each section or chapter of the document, are not supported
2581  by BibTeX itself.
2582  But the 
2583 \begin_inset Flex Code
2584 status collapsed
2585
2586 \begin_layout Plain Layout
2587 bibtopic
2588 \end_layout
2589
2590 \end_inset
2591
2592  package, which is used for the creation of sectioned bibliographies in
2593  LyX (see the previous section), provides an easy way to solve this task,
2594  if you are willing to use some 
2595 \begin_inset Flex MenuItem
2596 status collapsed
2597
2598 \begin_layout Plain Layout
2599 TeX Code
2600 \end_layout
2601
2602 \end_inset
2603
2604  (see section
2605 \begin_inset space ~
2606 \end_inset
2607
2608
2609 \begin_inset CommandInset ref
2610 LatexCommand ref
2611 reference "sec:Inserting-TeX-Code"
2612
2613 \end_inset
2614
2615 ).
2616 \begin_inset Foot
2617 status collapsed
2618
2619 \begin_layout Plain Layout
2620 An alternative approach is to use the 
2621 \begin_inset Flex Code
2622 status collapsed
2623
2624 \begin_layout Plain Layout
2625 chapterbib
2626 \end_layout
2627
2628 \end_inset
2629
2630  or 
2631 \begin_inset Flex Code
2632 status collapsed
2633
2634 \begin_layout Plain Layout
2635 bibunits
2636 \end_layout
2637
2638 \end_inset
2639
2640  package, respectively.
2641 \end_layout
2642
2643 \end_inset
2644
2645
2646 \end_layout
2647
2648 \begin_layout Standard
2649 First go to 
2650 \begin_inset Flex MenuItem
2651 status collapsed
2652
2653 \begin_layout Plain Layout
2654 Document\SpecialChar \menuseparator
2655 Settings
2656 \end_layout
2657
2658 \end_inset
2659
2660  and under 
2661 \begin_inset Flex MenuItem
2662 status collapsed
2663
2664 \begin_layout Plain Layout
2665 Bibliography
2666 \end_layout
2667
2668 \end_inset
2669
2670  check 
2671 \begin_inset Flex MenuItem
2672 status collapsed
2673
2674 \begin_layout Plain Layout
2675 Sectioned bibliography
2676 \end_layout
2677
2678 \end_inset
2679
2680 .
2681  In the document, you have to enclose the sections, which shall contain
2682  their own bibliography (including the BibTeX bibliography itself), between
2683  
2684 \begin_inset Flex Code
2685 status collapsed
2686
2687 \begin_layout Plain Layout
2688
2689 \backslash
2690 begin{btUnit}
2691 \end_layout
2692
2693 \end_inset
2694
2695  and 
2696 \begin_inset Flex Code
2697 status collapsed
2698
2699 \begin_layout Plain Layout
2700
2701 \backslash
2702 end{btUnit}
2703 \end_layout
2704
2705 \end_inset
2706
2707  (those commands have to be inserted as TeX code).
2708  The bibliography will contain all references which have been cited in the
2709  current 
2710 \begin_inset Flex Code
2711 status collapsed
2712
2713 \begin_layout Plain Layout
2714 btUnit
2715 \end_layout
2716
2717 \end_inset
2718
2719 .
2720  
2721 \series bold
2722 Note:
2723 \series default
2724  If you are using this approach, then every citation reference has to be
2725  inside some 
2726 \begin_inset Flex Code
2727 status collapsed
2728
2729 \begin_layout Plain Layout
2730 btUnit
2731 \end_layout
2732
2733 \end_inset
2734
2735 .
2736  Also, the 
2737 \begin_inset Flex Code
2738 status collapsed
2739
2740 \begin_layout Plain Layout
2741 btUnit
2742 \end_layout
2743
2744 \end_inset
2745
2746 s cannot be nested.
2747 \end_layout
2748
2749 \begin_layout Section
2750 Multipart Documents
2751 \end_layout
2752
2753 \begin_layout Subsection
2754 General Operation
2755 \end_layout
2756
2757 \begin_layout Standard
2758 When you are working on a large file with many sections, it is often convenient
2759  to break up the document into several files, or perhaps you have something
2760  where a table may change from time to time, but the preceding text does
2761  not.
2762  In these cases, you should seriously consider using multipart documents.
2763  For example, scientific papers often have five major sections: the introduction
2764 , observations, results, discussion, and conclusion.
2765  Each of these could be its own separate LyX file, with one 
2766 \begin_inset Quotes eld
2767 \end_inset
2768
2769 master
2770 \begin_inset Quotes erd
2771 \end_inset
2772
2773  file which contains the title, authors, abstract, references, etc., plus
2774  the five included files.
2775  It is important to note that each of these files is a full LyX file which
2776  can be formatted and printed on its own, as well as included in a master
2777  file.
2778  Each of these files must have the same document class, however—don't attempt
2779  to mix book classes with article classes.
2780  You may also include LaTeX files; however, these files must not have their
2781  own preamble (i.
2782 \begin_inset space \thinspace{}
2783 \end_inset
2784
2785 g.
2786 \begin_inset space \space{}
2787 \end_inset
2788
2789 everything up to and including the 
2790 \begin_inset Flex Code
2791 status collapsed
2792
2793 \begin_layout Plain Layout
2794
2795 \backslash
2796 begin{document}
2797 \end_layout
2798
2799 \end_inset
2800
2801  line as well as the 
2802 \begin_inset Flex Code
2803 status collapsed
2804
2805 \begin_layout Plain Layout
2806
2807 \backslash
2808 end{document}
2809 \end_layout
2810
2811 \end_inset
2812
2813  line must be deleted) or else errors will be generated when you try to
2814  make a DVI file.
2815 \end_layout
2816
2817 \begin_layout Standard
2818 LyX allows you to include files quite easily with 
2819 \begin_inset Flex MenuItem
2820 status collapsed
2821
2822 \begin_layout Plain Layout
2823 Insert\SpecialChar \menuseparator
2824 ChiId
2825 \begin_inset space ~
2826 \end_inset
2827
2828 Document
2829 \end_layout
2830
2831 \end_inset
2832
2833 .
2834  When you click on this selection a small box is inserted into the file
2835  at the current cursor location.
2836  Clicking on the box raises a dialog which allows you to select the file
2837  to be included, and the method of its inclusion.
2838  
2839 \end_layout
2840
2841 \begin_layout Standard
2842 The file selection box should by now be obvious.
2843  The three inclusion methods are 
2844 \begin_inset Quotes eld
2845 \end_inset
2846
2847 include
2848 \begin_inset Quotes erd
2849 \end_inset
2850
2851
2852 \begin_inset Quotes eld
2853 \end_inset
2854
2855 input
2856 \begin_inset Quotes erd
2857 \end_inset
2858
2859 , and 
2860 \begin_inset Quotes eld
2861 \end_inset
2862
2863 verbatim
2864 \begin_inset Quotes erd
2865 \end_inset
2866
2867 .
2868  The difference between 
2869 \begin_inset Quotes eld
2870 \end_inset
2871
2872 include
2873 \begin_inset Quotes erd
2874 \end_inset
2875
2876  and 
2877 \begin_inset Quotes eld
2878 \end_inset
2879
2880 input
2881 \begin_inset Quotes erd
2882 \end_inset
2883
2884  is really only meaningful to LaTeXperts, but the practical difference is
2885  that files which are 
2886 \begin_inset Quotes eld
2887 \end_inset
2888
2889 included
2890 \begin_inset Quotes erd
2891 \end_inset
2892
2893  are typeset beginning on a new page, while files which are 
2894 \begin_inset Quotes eld
2895 \end_inset
2896
2897 inputted
2898 \begin_inset Quotes erd
2899 \end_inset
2900
2901  are typeset starting on the current page.
2902 \end_layout
2903
2904 \begin_layout Standard
2905 Generally, the master file is converted into a full LaTeX file before typesettin
2906 g, while the included files are converted to LaTeX files which do not have
2907  all the preamble information.
2908 \end_layout
2909
2910 \begin_layout Standard
2911
2912 \begin_inset Quotes eld
2913 \end_inset
2914
2915 verbatim
2916 \begin_inset Quotes erd
2917 \end_inset
2918
2919  included file allows you to include a file typeset exactly as it appears
2920  in the file, i.
2921 \begin_inset space \thinspace{}
2922 \end_inset
2923
2924 g.
2925 \begin_inset space \space{}
2926 \end_inset
2927
2928 in 
2929 \begin_inset Flex Code
2930 status collapsed
2931
2932 \begin_layout Plain Layout
2933 verbatim
2934 \end_layout
2935
2936 \end_inset
2937
2938  mode, with the characters set in a fixed-width typewriter font.
2939  Normally, spaces in this file are invisible, though two consecutive spaces
2940  are conserved, unlike LyX's normal treatment of spaces.
2941  However, setting the 
2942 \begin_inset Flex MenuItem
2943 status collapsed
2944
2945 \begin_layout Plain Layout
2946 Mark
2947 \begin_inset space ~
2948 \end_inset
2949
2950 spaces
2951 \begin_inset space ~
2952 \end_inset
2953
2954 in
2955 \begin_inset space ~
2956 \end_inset
2957
2958 output
2959 \end_layout
2960
2961 \end_inset
2962
2963  checkbox typesets a mark to unambiguously define the presence of a space.
2964  
2965 \end_layout
2966
2967 \begin_layout Subsection
2968 Cross-References Between Files
2969 \end_layout
2970
2971 \begin_layout Standard
2972 \begin_inset Box Shadowbox
2973 position "t"
2974 hor_pos "c"
2975 has_inner_box 1
2976 inner_pos "t"
2977 use_parbox 0
2978 use_makebox 0
2979 width "100col%"
2980 special "none"
2981 height "1in"
2982 height_special "totalheight"
2983 status open
2984
2985 \begin_layout Plain Layout
2986 This section is somewhat out of date.
2987  Need to describe default master documents and how children are opened when
2988  the master is.
2989  [[FIXME]]
2990 \end_layout
2991
2992 \end_inset
2993
2994
2995 \end_layout
2996
2997 \begin_layout Standard
2998 It is possible to set up cross-references between the different files.
2999  First, open all the files in question: let's call them A and B in a two
3000  file example, where B is included in A.
3001  Let's say you insert a label in A, then want to reference it in B.
3002  Open the cross-reference dialog in whilst in document B, and you can select
3003  the 
3004 \begin_inset Quotes eld
3005 \end_inset
3006
3007 buffer
3008 \begin_inset Quotes erd
3009 \end_inset
3010
3011  to use.
3012 \end_layout
3013
3014 \begin_layout Subsection
3015 Bibliography Lists in all Subdocuments
3016 \end_layout
3017
3018 \begin_layout Standard
3019 \begin_inset Box Frameless
3020 position "t"
3021 hor_pos "c"
3022 has_inner_box 1
3023 inner_pos "t"
3024 use_parbox 0
3025 use_makebox 0
3026 width "100col%"
3027 special "none"
3028 height "1in"
3029 height_special "totalheight"
3030 status open
3031
3032 \begin_layout Plain Layout
3033 This section also needs updating.
3034  There is now material about this on the wiki, and it could be copied here.
3035 \end_layout
3036
3037 \end_inset
3038
3039
3040 \end_layout
3041
3042 \begin_layout Standard
3043 Copy the bibliography list with all entries to all subdocuments and transform
3044  them to a comment.
3045  This way LyX will find the 
3046 \begin_inset Flex Code
3047 status collapsed
3048
3049 \begin_layout Plain Layout
3050 .bib
3051 \end_layout
3052
3053 \end_inset
3054
3055 -files and you can easily insert references without making the bibliography
3056  list visible.
3057 \end_layout
3058
3059 \begin_layout Standard
3060 As the bibliography list is in a comment, LaTeX won't use use it and the
3061  references will look like this: [?], instead of like this: [1].
3062  One solution is to use the LaTeX-package 
3063 \begin_inset Flex Code
3064 status collapsed
3065
3066 \begin_layout Plain Layout
3067 comment
3068 \end_layout
3069
3070 \end_inset
3071
3072  that will only include comments by processing the files separately.
3073  To do this, add in the LaTeX preamble of every subdocument the following:
3074 \end_layout
3075
3076 \begin_layout LyX-Code
3077
3078 \backslash
3079 usepackage{comment}
3080 \end_layout
3081
3082 \begin_layout LyX-Code
3083
3084 \backslash
3085 includecomment{comment}
3086 \end_layout
3087
3088 \begin_layout Standard
3089 See also 
3090 \begin_inset Flex URL
3091 status collapsed
3092
3093 \begin_layout Plain Layout
3094
3095 http://wiki.lyx.org/FAQ/Unsorted#toc31
3096 \end_layout
3097
3098 \end_inset
3099
3100 .
3101 \end_layout
3102
3103 \begin_layout Section
3104 Fancy Headers and Footers
3105 \end_layout
3106
3107 \begin_layout Standard
3108 The default page layout is rather plain; for an 
3109 \begin_inset Flex Code
3110 status collapsed
3111
3112 \begin_layout Plain Layout
3113 article
3114 \end_layout
3115
3116 \end_inset
3117
3118  document class, all you get is a centered page number at the bottom of
3119  the page.
3120  This document uses KOMA-script's book class, so it appears to be a bit
3121  fancier.
3122  But to really put on a show, you need to set the document page style to
3123  
3124 \begin_inset Quotes eld
3125 \end_inset
3126
3127 fancy
3128 \begin_inset Quotes erd
3129 \end_inset
3130
3131 , as mentioned in the 
3132 \emph on
3133 User Guide
3134 \emph default
3135 .
3136  This section describes the LaTeX code you need to insert in your LaTeX
3137  preamble in order to get the desired effects.
3138 \end_layout
3139
3140 \begin_layout Standard
3141 For more information on fancy headers, see the 
3142 \begin_inset Flex Code
3143 status collapsed
3144
3145 \begin_layout Plain Layout
3146 fancyhdr
3147 \end_layout
3148
3149 \end_inset
3150
3151  package documentation.
3152  (
3153 \begin_inset Flex URL
3154 status collapsed
3155
3156 \begin_layout Plain Layout
3157
3158 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3159 \end_layout
3160
3161 \end_inset
3162
3163 )
3164 \end_layout
3165
3166 \begin_layout Standard
3167 The page header is divided into three fields, not surprisingly labeled 
3168 \begin_inset Quotes eld
3169 \end_inset
3170
3171 left
3172 \begin_inset Quotes erd
3173 \end_inset
3174
3175
3176 \begin_inset Quotes eld
3177 \end_inset
3178
3179 center
3180 \begin_inset Quotes erd
3181 \end_inset
3182
3183 , and 
3184 \begin_inset Quotes eld
3185 \end_inset
3186
3187 right
3188 \begin_inset Quotes erd
3189 \end_inset
3190
3191 .
3192  The footer is also divided into these three fields.
3193  The LaTeX commands to set these fields in the simplest manner are 
3194 \begin_inset Flex Code
3195 status collapsed
3196
3197 \begin_layout Plain Layout
3198
3199 \backslash
3200 lhead
3201 \end_layout
3202
3203 \end_inset
3204
3205
3206 \begin_inset Flex Code
3207 status collapsed
3208
3209 \begin_layout Plain Layout
3210
3211 \backslash
3212 chead
3213 \end_layout
3214
3215 \end_inset
3216
3217
3218 \begin_inset Flex Code
3219 status collapsed
3220
3221 \begin_layout Plain Layout
3222
3223 \backslash
3224 rhead
3225 \end_layout
3226
3227 \end_inset
3228
3229
3230 \begin_inset Flex Code
3231 status collapsed
3232
3233 \begin_layout Plain Layout
3234
3235 \backslash
3236 lfoot
3237 \end_layout
3238
3239 \end_inset
3240
3241 , etc.
3242  Suppose you wish to put your name in the upper left hand corner of each
3243  page.
3244  Simply insert the following command in the preamble: 
3245 \end_layout
3246
3247 \begin_layout Standard
3248
3249 \family typewriter
3250
3251 \backslash
3252 lhead{John Q.
3253  DocWriter}
3254 \end_layout
3255
3256 \begin_layout Standard
3257 You will now see your name in the upper left.
3258  If a field has a default entry that you would like to get rid of (often
3259  the page number appears in the central footer, simply include a command
3260  with a blank argument, e.
3261 \begin_inset space \thinspace{}
3262 \end_inset
3263
3264 g.:
3265 \end_layout
3266
3267 \begin_layout Standard
3268
3269 \family typewriter
3270
3271 \backslash
3272 cfoot{}
3273 \end_layout
3274
3275 \begin_layout Standard
3276 Let's get really fancy: lets put the section number with the word 
3277 \begin_inset Quotes eld
3278 \end_inset
3279
3280 Section
3281 \begin_inset Quotes erd
3282 \end_inset
3283
3284  (e.
3285 \begin_inset space \thinspace{}
3286 \end_inset
3287
3288 g.
3289 \begin_inset space \space{}
3290 \end_inset
3291
3292 Section 3) in the upper left, the page number (e.
3293 \begin_inset space \thinspace{}
3294 \end_inset
3295
3296 g.
3297 \begin_inset space \space{}
3298 \end_inset
3299
3300 Page 4) in the upper right, your name in the lower left, and the date in
3301  the lower right.
3302  The following commands should now appear in the preamble:
3303 \end_layout
3304
3305 \begin_layout Standard
3306
3307 \family typewriter
3308
3309 \backslash
3310 lhead{Section 
3311 \backslash
3312 thesection}
3313 \end_layout
3314
3315 \begin_layout Standard
3316
3317 \family typewriter
3318
3319 \backslash
3320 chead{}
3321 \end_layout
3322
3323 \begin_layout Standard
3324
3325 \family typewriter
3326
3327 \backslash
3328 rhead{Page 
3329 \backslash
3330 thepage}
3331 \end_layout
3332
3333 \begin_layout Standard
3334
3335 \family typewriter
3336
3337 \backslash
3338 lfoot{John Q.
3339  DocWriter}
3340 \end_layout
3341
3342 \begin_layout Standard
3343
3344 \family typewriter
3345
3346 \backslash
3347 cfoot{}
3348 \end_layout
3349
3350 \begin_layout Standard
3351
3352 \family typewriter
3353
3354 \backslash
3355 rfoot{
3356 \backslash
3357 today}
3358 \end_layout
3359
3360 \begin_layout Standard
3361 The commands 
3362 \begin_inset Flex Code
3363 status collapsed
3364
3365 \begin_layout Plain Layout
3366
3367 \backslash
3368 thesection
3369 \end_layout
3370
3371 \end_inset
3372
3373  and 
3374 \begin_inset Flex Code
3375 status collapsed
3376
3377 \begin_layout Plain Layout
3378
3379 \backslash
3380 thepage
3381 \end_layout
3382
3383 \end_inset
3384
3385  access LaTeX's section and page counters, and so print out the current
3386  section and page numbers.
3387  
3388 \begin_inset Flex Code
3389 status collapsed
3390
3391 \begin_layout Plain Layout
3392
3393 \backslash
3394 today
3395 \end_layout
3396
3397 \end_inset
3398
3399  simply prints out today's date.
3400 \end_layout
3401
3402 \begin_layout Standard
3403 The thicknesses of the horizontal rules drawn beneath the header and above
3404  the footer can also be modified.
3405  If you don't want one of the rules, set its thickness to 0.
3406  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3407  Use commands
3408 \family typewriter
3409  
3410 \family default
3411 like 
3412 \begin_inset Flex Code
3413 status collapsed
3414
3415 \begin_layout Plain Layout
3416
3417 \backslash
3418 renewcommand{
3419 \backslash
3420 headrulewidth}{0.4pt}
3421 \end_layout
3422
3423 \end_inset
3424
3425  and 
3426 \begin_inset Flex Code
3427 status collapsed
3428
3429 \begin_layout Plain Layout
3430
3431 \backslash
3432 renewcommand{
3433 \backslash
3434 footrulewidth}{0.4pt}
3435 \end_layout
3436
3437 \end_inset
3438
3439  to set the thicknesses.
3440 \end_layout
3441
3442 \begin_layout Standard
3443 You can switch the header/footer settings on and off for individual pages
3444  using commands like 
3445 \begin_inset Flex Code
3446 status collapsed
3447
3448 \begin_layout Plain Layout
3449
3450 \backslash
3451 thispagestyle{empty}
3452 \end_layout
3453
3454 \end_inset
3455
3456
3457 \begin_inset Flex Code
3458 status collapsed
3459
3460 \begin_layout Plain Layout
3461
3462 \backslash
3463 thispagestyle{plain}
3464 \end_layout
3465
3466 \end_inset
3467
3468 , and 
3469 \begin_inset Flex Code
3470 status collapsed
3471
3472 \begin_layout Plain Layout
3473
3474 \backslash
3475 thispagestyle{fancy}
3476 \end_layout
3477
3478 \end_inset
3479
3480 .
3481  Simply insert them in the text on the page you want changed and mark them
3482  as TeX code.
3483  In fact, title pages are marked as plain by default, while following pages
3484  are marked fancy when using the global fancy setting.
3485 \end_layout
3486
3487 \begin_layout Standard
3488 As a final example, it is possible to include an image in the header or
3489  footer.
3490  Suppose you want to put a company logo in the upper lefthand corner.
3491  You might try something like
3492 \end_layout
3493
3494 \begin_layout Standard
3495
3496 \family typewriter
3497
3498 \backslash
3499 lhead{
3500 \backslash
3501 resizebox{1in}{!}{
3502 \backslash
3503 includegraphics{logo.eps}}}
3504 \end_layout
3505
3506 \begin_layout Standard
3507 \noindent
3508 (you may need to preface this with 
3509 \begin_inset Flex Code
3510 status collapsed
3511
3512 \begin_layout Plain Layout
3513 \noindent
3514
3515 \backslash
3516 usepackage{graphics}
3517 \end_layout
3518
3519 \end_inset
3520
3521  if you don't include graphics elsewhere in your document).
3522 \end_layout
3523
3524 \begin_layout Section
3525 Itemize Bullet Selection
3526 \begin_inset CommandInset label
3527 LatexCommand label
3528 name "sec:bullet"
3529
3530 \end_inset
3531
3532
3533 \end_layout
3534
3535 \begin_layout Standard
3536 by
3537 \noun on
3538  Allan Rae
3539 \end_layout
3540
3541 \begin_layout Subsection
3542 Introduction
3543 \end_layout
3544
3545 \begin_layout Standard
3546 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3547  Using this dialog you can easily specify what bullet shape to use at each
3548  level of an itemized list.
3549  These settings are document-wide so you won't be able to specify different
3550  sets of bullets for different paragraphs.
3551 \begin_inset Foot
3552 status collapsed
3553
3554 \begin_layout Plain Layout
3555 Well, actually you can but you'll have to do it by hand.
3556 \end_layout
3557
3558 \end_inset
3559
3560
3561 \end_layout
3562
3563 \begin_layout Subsection
3564 How it looks
3565 \end_layout
3566
3567 \begin_layout Standard
3568 Open the dialog by selecting the 
3569 \begin_inset Flex MenuItem
3570 status collapsed
3571
3572 \begin_layout Plain Layout
3573 Document\SpecialChar \menuseparator
3574 Settings
3575 \end_layout
3576
3577 \end_inset
3578
3579  menu item and then select the 
3580 \begin_inset Flex MenuItem
3581 status collapsed
3582
3583 \begin_layout Plain Layout
3584 Bullets
3585 \end_layout
3586
3587 \end_inset
3588
3589  tab.
3590 \end_layout
3591
3592 \begin_layout Standard
3593 The dialog provides you with a table of bullet shapes.
3594  A column of buttons on the left of the table provides access to the six
3595  different panels of bullet shapes.
3596  The row of buttons across the top is used to select which bullet depth
3597  you are changing.
3598  A text entry under the table shows the currently selected bullet shape's
3599  LaTeX equivalent and this can be edited if desired.
3600  If you do modify the text you will also need to specify any needed packages
3601  in the LaTeX preamble.
3602 \end_layout
3603
3604 \begin_layout Standard
3605 The six panels are divided up by the packages they require.
3606  The following table shows the mappings from button name to LaTeX packages.
3607 \end_layout
3608
3609 \begin_layout Standard
3610 \align center
3611 \begin_inset Tabular
3612 <lyxtabular version="3" rows="7" columns="2">
3613 <features tabularvalignment="middle">
3614 <column alignment="center" valignment="top" width="0pt">
3615 <column alignment="center" valignment="top" width="0pt">
3616 <row>
3617 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3618 \begin_inset Text
3619
3620 \begin_layout Plain Layout
3621
3622 \family roman
3623 \series medium
3624 \shape up
3625 \size normal
3626 \emph off
3627 \bar no
3628 \noun off
3629 \color none
3630 Button
3631 \end_layout
3632
3633 \end_inset
3634 </cell>
3635 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3636 \begin_inset Text
3637
3638 \begin_layout Plain Layout
3639
3640 \family roman
3641 \series medium
3642 \shape up
3643 \size normal
3644 \emph off
3645 \bar no
3646 \noun off
3647 \color none
3648 Packages Required
3649 \end_layout
3650
3651 \end_inset
3652 </cell>
3653 </row>
3654 <row>
3655 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3656 \begin_inset Text
3657
3658 \begin_layout Plain Layout
3659
3660 \family sans
3661 \series medium
3662 \shape up
3663 \size normal
3664 \emph off
3665 \bar no
3666 \noun off
3667 \color none
3668 Standard
3669 \end_layout
3670
3671 \end_inset
3672 </cell>
3673 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3674 \begin_inset Text
3675
3676 \begin_layout Plain Layout
3677
3678 \series medium
3679 \shape up
3680 \size normal
3681 \emph off
3682 \bar no
3683 \noun off
3684 \color none
3685 base LaTeX
3686 \end_layout
3687
3688 \end_inset
3689 </cell>
3690 </row>
3691 <row>
3692 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3693 \begin_inset Text
3694
3695 \begin_layout Plain Layout
3696
3697 \family sans
3698 \series medium
3699 \shape up
3700 \size normal
3701 \emph off
3702 \bar no
3703 \noun off
3704 \color none
3705 Maths
3706 \end_layout
3707
3708 \end_inset
3709 </cell>
3710 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3711 \begin_inset Text
3712
3713 \begin_layout Plain Layout
3714
3715 \family typewriter
3716 \series medium
3717 \shape up
3718 \size normal
3719 \emph off
3720 \bar no
3721 \noun off
3722 \color none
3723 amssymb.sty
3724 \end_layout
3725
3726 \end_inset
3727 </cell>
3728 </row>
3729 <row>
3730 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3731 \begin_inset Text
3732
3733 \begin_layout Plain Layout
3734
3735 \family sans
3736 \series medium
3737 \shape up
3738 \size normal
3739 \emph off
3740 \bar no
3741 \noun off
3742 \color none
3743 Ding1
3744 \end_layout
3745
3746 \end_inset
3747 </cell>
3748 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3749 \begin_inset Text
3750
3751 \begin_layout Plain Layout
3752
3753 \family typewriter
3754 \series medium
3755 \shape up
3756 \size normal
3757 \emph off
3758 \bar no
3759 \noun off
3760 \color none
3761 pifont.sty
3762 \end_layout
3763
3764 \end_inset
3765 </cell>
3766 </row>
3767 <row>
3768 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3769 \begin_inset Text
3770
3771 \begin_layout Plain Layout
3772
3773 \family sans
3774 \series medium
3775 \shape up
3776 \size normal
3777 \emph off
3778 \bar no
3779 \noun off
3780 \color none
3781 Ding2
3782 \end_layout
3783
3784 \end_inset
3785 </cell>
3786 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3787 \begin_inset Text
3788
3789 \begin_layout Plain Layout
3790
3791 \family typewriter
3792 \series medium
3793 \shape up
3794 \size normal
3795 \emph off
3796 \bar no
3797 \noun off
3798 \color none
3799 pifont.sty
3800 \end_layout
3801
3802 \end_inset
3803 </cell>
3804 </row>
3805 <row>
3806 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3807 \begin_inset Text
3808
3809 \begin_layout Plain Layout
3810
3811 \family sans
3812 \series medium
3813 \shape up
3814 \size normal
3815 \emph off
3816 \bar no
3817 \noun off
3818 \color none
3819 Ding3
3820 \end_layout
3821
3822 \end_inset
3823 </cell>
3824 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3825 \begin_inset Text
3826
3827 \begin_layout Plain Layout
3828
3829 \family typewriter
3830 \series medium
3831 \shape up
3832 \size normal
3833 \emph off
3834 \bar no
3835 \noun off
3836 \color none
3837 pifont.sty
3838 \end_layout
3839
3840 \end_inset
3841 </cell>
3842 </row>
3843 <row>
3844 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3845 \begin_inset Text
3846
3847 \begin_layout Plain Layout
3848
3849 \family sans
3850 \series medium
3851 \shape up
3852 \size normal
3853 \emph off
3854 \bar no
3855 \noun off
3856 \color none
3857 Ding4
3858 \end_layout
3859
3860 \end_inset
3861 </cell>
3862 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3863 \begin_inset Text
3864
3865 \begin_layout Plain Layout
3866
3867 \family typewriter
3868 \series medium
3869 \shape up
3870 \size normal
3871 \emph off
3872 \bar no
3873 \noun off
3874 \color none
3875 pifont.sty
3876 \end_layout
3877
3878 \end_inset
3879 </cell>
3880 </row>
3881 </lyxtabular>
3882
3883 \end_inset
3884
3885
3886 \end_layout
3887
3888 \begin_layout Standard
3889 LyX doesn't stop you using bullets from packages you don't have.
3890  If you get errors from LaTeX when you try to view or print the file, then
3891  it is likely you are missing a package.
3892 \begin_inset Foot
3893 status collapsed
3894
3895 \begin_layout Plain Layout
3896 LyX doesn't restrict your use since you may be editing locally and exporting
3897  elsewhere.
3898 \end_layout
3899
3900 \end_inset
3901
3902
3903 \end_layout
3904
3905 \begin_layout Subsection
3906 How to use it
3907 \end_layout
3908
3909 \begin_layout Standard
3910 Select which bullet depth you want to change then select the bullet shape
3911  and size.
3912  Any changes will not be visible in LyX, but are visible when viewing the
3913  document.
3914 \end_layout
3915
3916 \begin_layout Standard
3917 You can reset a bullet shape to the default simply by clicking your right
3918  mouse button on the appropriate bullet depth button.
3919 \begin_inset Foot
3920 status collapsed
3921
3922 \begin_layout Plain Layout
3923 If you 
3924 \emph on
3925 really
3926 \emph default
3927  want to have multiple sets of paragraphs with different sets of bullets
3928  in each, then you're going to have to get your hands dirty with TeX code.
3929  The bullet selection dialog can help though because it provides you with
3930  the LaTeX code for a wide range of bullet shapes.
3931  To make your own custom paragraphs you have the following options:
3932 \end_layout
3933
3934 \begin_layout Plain Layout
3935 \begin_inset ERT
3936 status open
3937
3938 \begin_layout Plain Layout
3939
3940
3941 \backslash
3942 let
3943 \backslash
3944 savelabelitemi=
3945 \backslash
3946 labelitemi
3947 \end_layout
3948
3949 \end_inset
3950
3951
3952 \end_layout
3953
3954 \begin_layout Plain Layout
3955 \begin_inset ERT
3956 status open
3957
3958 \begin_layout Plain Layout
3959
3960
3961 \backslash
3962 renewcommand
3963 \backslash
3964 labelitemi[0]{
3965 \backslash
3966 small
3967 \backslash
3968 (
3969 \backslash
3970 sharp
3971 \backslash
3972 )}
3973 \end_layout
3974
3975 \end_inset
3976
3977
3978 \end_layout
3979
3980 \begin_layout Itemize
3981 Use the LaTeX command 
3982 \begin_inset Flex Code
3983 status collapsed
3984
3985 \begin_layout Plain Layout
3986
3987 \backslash
3988 renewcommand{}{}
3989 \end_layout
3990
3991 \end_inset
3992
3993  to specify a new bullet shape for a given depth.
3994  You'll also need to save the current bullet shape so you can restore it
3995  again afterwards.
3996  In this itemized list the following LaTeX code was used to change the bullet
3997  used for the first depth.
3998 \end_layout
3999
4000 \begin_deeper
4001 \begin_layout LyX-Code
4002
4003 \backslash
4004 let
4005 \backslash
4006 savelabelitemi=
4007 \backslash
4008 labelitemi 
4009 \end_layout
4010
4011 \begin_layout LyX-Code
4012
4013 \backslash
4014 renewcommand
4015 \backslash
4016 labelitemi[0]{
4017 \backslash
4018 small
4019 \backslash
4020 (
4021 \backslash
4022 sharp
4023 \backslash
4024 )}
4025 \end_layout
4026
4027 \end_deeper
4028 \begin_layout Itemize
4029 Note that the itemize depth is specified in Roman numerals as part of the
4030  
4031 \family typewriter
4032
4033 \backslash
4034 labelitem
4035 \family default
4036  command.
4037 \end_layout
4038
4039 \begin_layout Itemize
4040 \begin_inset ERT
4041 status open
4042
4043 \begin_layout Plain Layout
4044
4045 [
4046 \backslash
4047 (
4048 \backslash
4049 star
4050 \backslash
4051 )]
4052 \end_layout
4053
4054 \end_inset
4055
4056  Specify each individual entry by starting each item with the bullet shape
4057  enclosed in square brackets and set as 
4058 \begin_inset Flex MenuItem
4059 status collapsed
4060
4061 \begin_layout Plain Layout
4062 TeX Code
4063 \end_layout
4064
4065 \end_inset
4066
4067 .
4068  For example, this item was started with 
4069 \begin_inset Flex Code
4070 status collapsed
4071
4072 \begin_layout Plain Layout
4073 [
4074 \backslash
4075 (
4076 \backslash
4077 star
4078 \backslash
4079 )]
4080 \end_layout
4081
4082 \end_inset
4083
4084 .
4085 \end_layout
4086
4087 \begin_layout Plain Layout
4088 \begin_inset ERT
4089 status open
4090
4091 \begin_layout Plain Layout
4092
4093
4094 \backslash
4095 renewcommand
4096 \backslash
4097 labelitemi[0]{
4098 \backslash
4099 savelabelitemi}
4100 \end_layout
4101
4102 \end_inset
4103
4104
4105 \end_layout
4106
4107 \begin_layout Plain Layout
4108 You'll also need to revert the labelitem back to its previous setting for
4109  the global bullet shape settings to remain in effect.
4110  The way used here was:
4111 \end_layout
4112
4113 \begin_layout LyX-Code
4114
4115 \backslash
4116 renewcommand
4117 \backslash
4118 labelitemi[0]{
4119 \backslash
4120 savelabelitemi}
4121 \end_layout
4122
4123 \end_inset
4124
4125
4126 \end_layout
4127
4128 \begin_layout Chapter
4129 LyX and the World Wide Web
4130 \end_layout
4131
4132 \begin_layout Standard
4133 LyX has long supported the export of documents to various web-friendly formats,
4134  such as HTML.
4135  Before verson 2.0, however, HTML export was always accomplished by the use
4136  of external converters.
4137 \begin_inset Foot
4138 status collapsed
4139
4140 \begin_layout Plain Layout
4141 For details on the use of external converters with LyX, see the 
4142 \emph on
4143 Converters
4144 \emph default
4145  section of the Customization manual.
4146 \end_layout
4147
4148 \end_inset
4149
4150  These fall into two large groups: there are converters that use LaTeX as
4151  an intermediate format, such as 
4152 \begin_inset Flex Code
4153 status collapsed
4154
4155 \begin_layout Plain Layout
4156 htlatex
4157 \end_layout
4158
4159 \end_inset
4160
4161
4162 \begin_inset Flex Code
4163 status collapsed
4164
4165 \begin_layout Plain Layout
4166 html2latex
4167 \end_layout
4168
4169 \end_inset
4170
4171 , and 
4172 \begin_inset Flex Code
4173 status collapsed
4174
4175 \begin_layout Plain Layout
4176 plastex
4177 \end_layout
4178
4179 \end_inset
4180
4181 , relying upon LyX to produce the LaTeX; and there is a converter that works
4182  directly on LyX files, 
4183 \begin_inset Flex Code
4184 status collapsed
4185
4186 \begin_layout Plain Layout
4187 eLyXer
4188 \end_layout
4189
4190 \end_inset
4191
4192 .
4193  All of these have different advantages and disadvantages.
4194  
4195 \end_layout
4196
4197 \begin_layout Standard
4198 The LaTeX-based converters have the advantage that, in principle, they know
4199  everything about the exported document that LaTeX does.
4200  Such converters do not care, for example, if a certain block of code was
4201  produced by LyX or was Evil Red Text.
4202  These converters know about 
4203 \begin_inset Flex Code
4204 status collapsed
4205
4206 \begin_layout Plain Layout
4207 aux
4208 \end_layout
4209
4210 \end_inset
4211
4212  files, counters, and references, and can often make use of the 
4213 \begin_inset Flex Code
4214 status collapsed
4215
4216 \begin_layout Plain Layout
4217 bbl
4218 \end_layout
4219
4220 \end_inset
4221
4222  files generated by BibTeX.
4223  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4224  said that only TeX itself understands TeX---and LaTeX-based converters
4225  will often choke on what seem to be quite simple constructs; complex ones
4226  can throw them completely, and as of this writing, for example, the 
4227 \emph on
4228 Embedded Objects
4229 \emph default
4230  manual will not export with 
4231 \begin_inset Flex Code
4232 status collapsed
4233
4234 \begin_layout Plain Layout
4235 htlatex
4236 \end_layout
4237
4238 \end_inset
4239
4240 , though the others will.
4241  The other issue concerns how math is handled.
4242  These converters typically convert the formulae into little pictures that
4243  are then linked from the HTML document.
4244  Since these are actually generated by LaTeX, they are accurate.
4245  But they do not scale well, and just getting them to look as if they are
4246  actually meant to be in your document---so that the font sizes seem to
4247  be roughly the same---can be a challenge.
4248 \end_layout
4249
4250 \begin_layout Standard
4251 Alex Fernandez's 
4252 \begin_inset Flex Code
4253 status collapsed
4254
4255 \begin_layout Plain Layout
4256 eLyXer
4257 \end_layout
4258
4259 \end_inset
4260
4261  (
4262 \begin_inset CommandInset href
4263 LatexCommand href
4264 name "http://elyxer.nongnu.org/"
4265 target "http://elyxer.nongnu.org/"
4266
4267 \end_inset
4268
4269 ) solves some of these problems.
4270  In particular, the formulae it produces scale perfectly, since it renders
4271  math using a combination of HTML and CSS rather than converting the formulae
4272  to images.
4273  But even moderately complex formula are rendered less well than with 
4274 \begin_inset Flex Code
4275 status collapsed
4276
4277 \begin_layout Plain Layout
4278 htlatex
4279 \end_layout
4280
4281 \end_inset
4282
4283 ; this reflects the limitations of HTML.
4284 \begin_inset Foot
4285 status collapsed
4286
4287 \begin_layout Plain Layout
4288 That said, 
4289 \begin_inset Flex Code
4290 status collapsed
4291
4292 \begin_layout Plain Layout
4293 eLyXer
4294 \end_layout
4295
4296 \end_inset
4297
4298  can also use jsMath and MathJax for equations, but this setting is only
4299  available globally and requires one to have access to a server that runs
4300  the backend.
4301 \end_layout
4302
4303 \end_inset
4304
4305  More importantly (as of version 1.1.1, at least), 
4306 \begin_inset Flex Code
4307 status collapsed
4308
4309 \begin_layout Plain Layout
4310 eLyXer
4311 \end_layout
4312
4313 \end_inset
4314
4315  has limited support for math macros and no support for user-defined paragraph
4316  or character styles.
4317  These limitations make 
4318 \begin_inset Flex Code
4319 status collapsed
4320
4321 \begin_layout Plain Layout
4322 eLyXer
4323 \end_layout
4324
4325 \end_inset
4326
4327  unsuitable for many of the documents LyX users produce.
4328  In principle, of course, these problems could be solved, but the LyX developers
4329  have decided to follow a different path and have made LyX itself capable
4330  of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4331  plaintext.
4332 \end_layout
4333
4334 \begin_layout Standard
4335 As of this writing, XHTML output remains under development and should probably
4336  be regarded as 
4337 \begin_inset Quotes eld
4338 \end_inset
4339
4340 experimental
4341 \begin_inset Quotes erd
4342 \end_inset
4343
4344 .
4345 \begin_inset Foot
4346 status collapsed
4347
4348 \begin_layout Plain Layout
4349 The file 
4350 \begin_inset Flex Code
4351 status collapsed
4352
4353 \begin_layout Plain Layout
4354 development/HTML.notes
4355 \end_layout
4356
4357 \end_inset
4358
4359 , which can be found in the LyX source tree or 
4360 \begin_inset CommandInset href
4361 LatexCommand href
4362 name "accessed online"
4363 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4364
4365 \end_inset
4366
4367 , usually contains up-to-date information about the state of XHTML output.
4368  See also the list of XHTML bugs on 
4369 \begin_inset CommandInset href
4370 LatexCommand href
4371 name "the bug tracker"
4372 target "http://www.lyx.org/trac/query?status=reopened&status=assigned&status=new&max=0&component=xhtml+export&order=id&col=id&col=summary&col=reporter&col=keywords&keywords=%21%7Efixedintrunk&desc=1"
4373
4374 \end_inset
4375
4376 .
4377 \end_layout
4378
4379 \end_inset
4380
4381  Still, the developers have chosen this approach because it has several
4382  potential advantages over the other two.
4383 \end_layout
4384
4385 \begin_layout Standard
4386 These advantages are primarily due to the fact that the XHTML output routines,
4387  since they are part of LyX, know everything LyX knows about the document
4388  being exported.
4389 \begin_inset Foot
4390 status collapsed
4391
4392 \begin_layout Plain Layout
4393 Another advantage is that, since these routines are internal to LyX, they
4394  are immune to changes in LyX's file format, or to changes in the semantics
4395  of existing insets.
4396 \end_layout
4397
4398 \end_inset
4399
4400  So they know about the table of contents (as displayed in the outline),
4401  about the counters associated with different paragraph styles, and about
4402  user-defined styles.
4403  The XHTML output routines know what LyX knows about internationalization,
4404  too, so they will output 
4405 \begin_inset Quotes eld
4406 \end_inset
4407
4408 Chapter 1
4409 \begin_inset Quotes erd
4410 \end_inset
4411
4412  or 
4413 \begin_inset Quotes eld
4414 \end_inset
4415
4416
4417 \lang ngerman
4418 Kapitel
4419 \lang english
4420  1
4421 \begin_inset Quotes erd
4422 \end_inset
4423
4424 , depending upon the language in effect at the time.
4425  
4426 \end_layout
4427
4428 \begin_layout Standard
4429 Quite generally, the output routines know what LyX knows about document
4430  layout, that is, about how the document is to be rendered on screen.
4431  We use this information when we output the document as XHTML.
4432  In particular, LyX 
4433 \emph on
4434 automatically
4435 \emph default
4436  generates CSS style information corresponding to the layout information
4437  it uses to render the document on screen: if section headings are supposed
4438  to be sans-serif and bold as seen in LyX, then (by default) they will be
4439  sans-serif and bold when viewed in a web browser, too.
4440  And this is true not just for pre-defined styles, like Section, but for
4441  any style, including user-defined styles.
4442  Indeed, the XHTML output routines make no distinction between user-defined
4443  paragraph and character styles and LyX's own pre-defined styles: in each
4444  case, everything LyX knows about the styles is contained in the layout
4445  files.
4446  And much the same is true as regards pre-defined textual insets, such as
4447  footnotes, and various custom insets.
4448  
4449 \end_layout
4450
4451 \begin_layout Standard
4452 The result is that XHTML output can be customized and extended in exactly
4453  the same way LaTeX output can be customized and extended: through layout
4454  files and modules.
4455  See chapter five of the 
4456 \emph on
4457 Customization 
4458 \emph default
4459 manual for the details.
4460 \end_layout
4461
4462 \begin_layout Standard
4463 The remainder of this chapter contains more detailed information on XHTML
4464  output, its limitations, and ways to work around those limitations.
4465 \end_layout
4466
4467 \begin_layout Section
4468 Math Output in XHTML
4469 \end_layout
4470
4471 \begin_layout Standard
4472 LyX offers four choices for how math is rendered.
4473  These have various advantages and disadvantages:
4474 \end_layout
4475
4476 \begin_layout Itemize
4477 MathML
4478 \begin_inset Newline newline
4479 \end_inset
4480
4481 MathML is a dialect of XML designed specifically for mathematics on the
4482  web, and it typically renders very well in browsers that support it.
4483  The disadvantage is that not all browsers support MathML, and support is
4484  not complete even in the Gecko-based browsers, such as Firefox.
4485 \begin_inset Newline newline
4486 \end_inset
4487
4488 If LyX is unable to render a formula as MathML---for example, if the formula
4489  uses the 
4490 \begin_inset Flex Code
4491 status collapsed
4492
4493 \begin_layout Plain Layout
4494 xymatrix
4495 \end_layout
4496
4497 \end_inset
4498
4499  package or ERT---then it will instead output the formula as an image.
4500  
4501 \end_layout
4502
4503 \begin_layout Itemize
4504 HTML
4505 \begin_inset Newline newline
4506 \end_inset
4507
4508 As mentioned above, 
4509 \begin_inset Flex Code
4510 status collapsed
4511
4512 \begin_layout Plain Layout
4513 elyxer
4514 \end_layout
4515
4516 \end_inset
4517
4518  outputs math as HTML, styled by CSS.
4519 \begin_inset Foot
4520 status collapsed
4521
4522 \begin_layout Plain Layout
4523 LyX has borrowed some of the CSS for its HTML output from 
4524 \begin_inset Flex Code
4525 status collapsed
4526
4527 \begin_layout Plain Layout
4528 elyxer
4529 \end_layout
4530
4531 \end_inset
4532
4533 .
4534 \end_layout
4535
4536 \end_inset
4537
4538  For simple formulae, this can work quite well, though with more complicated
4539  formulae it tends to break down.
4540  Still, this method has the advantage that it is very widely supported and
4541  so it may be appropriate for documents that contain only a little, fairly
4542  simple math.
4543 \begin_inset Newline newline
4544 \end_inset
4545
4546 If Lyx is unable to render a formula as HTML---for example, if the formula
4547  uses the 
4548 \begin_inset Flex Code
4549 status collapsed
4550
4551 \begin_layout Plain Layout
4552 xymatrix
4553 \end_layout
4554
4555 \end_inset
4556
4557  package or ERT---then it will instead output the formula as an image.
4558  
4559 \end_layout
4560
4561 \begin_layout Itemize
4562 Images
4563 \begin_inset Newline newline
4564 \end_inset
4565
4566 Like 
4567 \begin_inset Flex Code
4568 status collapsed
4569
4570 \begin_layout Plain Layout
4571 htlatex
4572 \end_layout
4573
4574 \end_inset
4575
4576 , LyX will output formulae as images, the very same images, in fact, that
4577  are used for instant preview.
4578 \begin_inset Foot
4579 status collapsed
4580
4581 \begin_layout Plain Layout
4582 Instant preview does 
4583 \emph on
4584 not 
4585 \emph default
4586 have to be on for images to be output, however.
4587 \end_layout
4588
4589 \end_inset
4590
4591  The advantage to this method is that the images are simply generated by
4592  LaTeX, so they are very accurate.
4593  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4594  so they do not scale terribly well, and one cannot copy them, etc.
4595  (As of this writing, there are also problems about equation numbering.
4596  See 
4597 \begin_inset CommandInset href
4598 LatexCommand href
4599 name "bug 6894"
4600 target "http://www.lyx.org/trac/ticket/6894"
4601
4602 \end_inset
4603
4604 .)
4605 \begin_inset Newline newline
4606 \end_inset
4607
4608 The size of the images can be controlled by setting the 
4609 \begin_inset Quotes eld
4610 \end_inset
4611
4612 Math Images Scaling
4613 \begin_inset Quotes erd
4614 \end_inset
4615
4616  parameter under 
4617 \begin_inset Flex MenuItem
4618 status collapsed
4619
4620 \begin_layout Plain Layout
4621 Document\SpecialChar \menuseparator
4622 Settings\SpecialChar \menuseparator
4623 Output
4624 \end_layout
4625
4626 \end_inset
4627
4628 .
4629 \begin_inset Foot
4630 status collapsed
4631
4632 \begin_layout Plain Layout
4633 For those who want to know, this controls the resolution of the image in
4634  dots per inch and is based upon a default of 75 dpi.
4635 \end_layout
4636
4637 \end_inset
4638
4639
4640 \begin_inset Newline newline
4641 \end_inset
4642
4643 If LyX for some reason fails to create an image for a formula (e.g., if a
4644  required LaTeX package is not installed), then it will fall back to outputing
4645  the raw LaTeX.
4646 \end_layout
4647
4648 \begin_layout Itemize
4649 LaTeX
4650 \begin_inset Newline newline
4651 \end_inset
4652
4653 Finally, LyX will happily output math as LaTeX.
4654  As well as being the output of last resort, this method can be used with
4655  such tools as 
4656 \begin_inset CommandInset href
4657 LatexCommand href
4658 name "jsMath"
4659 target "http://www.math.union.edu/~dpvc/jsMath/"
4660
4661 \end_inset
4662
4663 , which uses JavaScript to render LaTeX embedded in HTML documents.
4664  LyX wraps the LaTeX in either a 
4665 \begin_inset Flex Code
4666 status collapsed
4667
4668 \begin_layout Plain Layout
4669 span
4670 \end_layout
4671
4672 \end_inset
4673
4674  (for inline formulas) or 
4675 \begin_inset Flex Code
4676 status collapsed
4677
4678 \begin_layout Plain Layout
4679 div
4680 \end_layout
4681
4682 \end_inset
4683
4684  (for displayed formulas) with 
4685 \begin_inset Flex Code
4686 status collapsed
4687
4688 \begin_layout Plain Layout
4689 class='math'
4690 \end_layout
4691
4692 \end_inset
4693
4694 , as is required for jsMath.
4695 \end_layout
4696
4697 \begin_layout Standard
4698 One of these output methods must be selected under 
4699 \begin_inset Flex MenuItem
4700 status collapsed
4701
4702 \begin_layout Plain Layout
4703 Document\SpecialChar \menuseparator
4704 Settings\SpecialChar \menuseparator
4705 Output
4706 \end_layout
4707
4708 \end_inset
4709
4710 .
4711  By default, LyX outputs MathML.
4712  This is a document-wide setting, therefore.
4713 \end_layout
4714
4715 \begin_layout Standard
4716 Eventually, LyX will offer the user the option to select an alternate output
4717  method for a particular inset, say, one that isn't being rendered very
4718  well by MathML.
4719 \begin_inset Foot
4720 status collapsed
4721
4722 \begin_layout Plain Layout
4723 That said, since LyX falls back to images if the inset contains ERT, then
4724  one can force output as an image by putting some harmless ERT into the
4725  math, for example: 
4726 \begin_inset Formula $a=b\relax$
4727 \end_inset
4728
4729 .
4730 \end_layout
4731
4732 \end_inset
4733
4734
4735 \end_layout
4736
4737 \begin_layout Section
4738 Bibliography and Citations
4739 \end_layout
4740
4741 \begin_layout Standard
4742 XHTML output fully supports bibliographies and citations.
4743  
4744 \end_layout
4745
4746 \begin_layout Standard
4747 Citation labels are generated by the same machinery that generates LyX's
4748  on-screen labels, so the labels will look in the output much as they do
4749  in LyX, though better.
4750  If you are using numerical citations, then LyX will output numerical labels,
4751  such as [1] or [17], rather than simply showing the citation key in square
4752  brackets, as it does on-screen.
4753  If you are using author-year citations, then LyX will add lowercase letters
4754  to the years, just as BibTeX does, if it finds more than one citation for
4755  a given author-year combination.
4756  The labels will be printed with the bibliography entries.
4757  Note that there is, at present, no way to customize the appearance of the
4758  labels, for example, to choose between square brackets and parentheses.
4759 \end_layout
4760
4761 \begin_layout Standard
4762 Bibliography output is handled by the same machinery that handles the presentati
4763 on of reference information in the citation dialog, so you will see in the
4764  XHTML output pretty much what you would see if you were to look at a given
4765  entry in the citation dialog.
4766  The formatting can be customized in your layout file or, preferably, in
4767  a module.
4768  See the 
4769 \emph on
4770 Customization
4771 \emph default
4772  manual for the details.
4773 \end_layout
4774
4775 \begin_layout Standard
4776 The main defect at present is that cross-referenced information is printed
4777  with every entry with which it is associated.
4778  So you can see things like this:
4779 \end_layout
4780
4781 \begin_layout Quote
4782 Jason Stanley, 
4783 \begin_inset Quotes eld
4784 \end_inset
4785
4786 Context and Logical Form
4787 \begin_inset Quotes erd
4788 \end_inset
4789
4790 , in 
4791 \emph on
4792 Language in Context: Selected Essays
4793 \emph default
4794  (Oxford: Oxford University Press, 2007), pp.
4795  30--68.
4796 \end_layout
4797
4798 \begin_layout Quote
4799 Jason Stanley, 
4800 \begin_inset Quotes eld
4801 \end_inset
4802
4803 Semantics in Context
4804 \begin_inset Quotes erd
4805 \end_inset
4806
4807 , in 
4808 \emph on
4809 Language in Context: Selected Essays
4810 \emph default
4811  (Oxford: Oxford University Press, 2007), pp.
4812  201--30.
4813 \end_layout
4814
4815 \begin_layout Standard
4816 This should be fixed before long.
4817 \end_layout
4818
4819 \begin_layout Standard
4820 There is no support at present for sectioned bibliographies.
4821  If you have multiple bibliographies, then LyX will print the same bibliography
4822  over and over.
4823 \end_layout
4824
4825 \begin_layout Section
4826 Indexes
4827 \end_layout
4828
4829 \begin_layout Standard
4830 LyX will happily export indexes as XHTML, but with certain limitations at
4831  the moment.
4832 \end_layout
4833
4834 \begin_layout Standard
4835 Index export will be most reliable when you do not attempt to use the fancy
4836  constructs that are described in the section on indexes in the 
4837 \emph on
4838 User's Guide
4839 \emph default
4840 .
4841 \begin_inset Foot
4842 status collapsed
4843
4844 \begin_layout Plain Layout
4845 The main issue here is that LyX itself does not really handle these.
4846  It just lets you enter what you would have to enter in raw LaTeX.
4847 \end_layout
4848
4849 \end_inset
4850
4851  We'll describe how they are handled using the subsection headings from
4852  that section.
4853 \end_layout
4854
4855 \begin_layout Itemize
4856 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4857  these, but the entries must be separated by 
4858 \begin_inset Quotes eld
4859 \end_inset
4860
4861  ! 
4862 \begin_inset Quotes erd
4863 \end_inset
4864
4865 , that is, there must be spaces around the exclamation point.
4866  This is because it is otherwise too difficult to check for escaped exclamation
4867  points, ones in math, and so forth.
4868 \end_layout
4869
4870 \begin_layout Itemize
4871 Page Ranges: There is no support at all for page ranges, since these make
4872  no sense with XHMTL.
4873  Instead, you will just get two index entries, one at either end.
4874 \end_layout
4875
4876 \begin_layout Itemize
4877 Cross-referencing: There is no support for cross-referencing.
4878  If LyX finds an entry containing the 
4879 \begin_inset Quotes eld
4880 \end_inset
4881
4882 |see\SpecialChar \ldots{}
4883
4884 \begin_inset Quotes erd
4885 \end_inset
4886
4887  construct, it is just dropped, and the rest is treated as an ordinary index
4888  entry.
4889 \end_layout
4890
4891 \begin_layout Itemize
4892 Index Entry Order: LyX does support attempts to fix the sorting order.
4893  It will take what is before the first `@' it finds and use that for sorting,
4894  taking what follows the first `@' to be the actual entry.
4895  At present, LyX does not check for escaped `@', so do not try to index
4896  email addresses.
4897 \end_layout
4898
4899 \begin_layout Itemize
4900 Index Entry Layout: You can format entries by using the text style dialog,
4901  or by using any other method available within LyX itself.
4902  There is no support for constructs like: 
4903 \begin_inset Quotes eld
4904 \end_inset
4905
4906 entry|textbf
4907 \begin_inset Quotes erd
4908 \end_inset
4909
4910 .
4911  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
4912  and everything that follows it.
4913 \end_layout
4914
4915 \begin_layout Itemize
4916 Multiple Indexes: There is no support for multiple indexes.
4917  Rather, all index entries will be printed as one large index.
4918  To avoid our printing several versions of the index, we print only the
4919  main index, so make sure you have one.
4920 \end_layout
4921
4922 \begin_layout Section
4923 Nomenclature and Glossary
4924 \end_layout
4925
4926 \begin_layout Standard
4927 There is at present no support for glossaries.
4928  Adding it would be fairly trivial, and welcome.
4929 \end_layout
4930
4931 \begin_layout Chapter
4932 The LyX Server
4933 \end_layout
4934
4935 \begin_layout Section
4936 Introduction
4937 \end_layout
4938
4939 \begin_layout Standard
4940 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4941  and retrieve information about the LyX internal state.
4942  This is only intended for advanced users, but they should find it useful.
4943  It is by writing to the LyX server, for example, that bibliography managers,
4944  such as JabRef, are able to 
4945 \begin_inset Quotes eld
4946 \end_inset
4947
4948 push
4949 \begin_inset Quotes erd
4950 \end_inset
4951
4952  citations to LyX.
4953 \end_layout
4954
4955 \begin_layout Section
4956 Starting the LyX Server
4957 \end_layout
4958
4959 \begin_layout Standard
4960 The LyX server works through the use of a pair of named pipes.
4961  These are usually located in 
4962 \begin_inset Flex Code
4963 status collapsed
4964
4965 \begin_layout Plain Layout
4966 UserDir
4967 \end_layout
4968
4969 \end_inset
4970
4971 , (except on Windows, where 
4972 \emph on
4973 local
4974 \emph default
4975  named pipes are special objects located in 
4976 \begin_inset Flex Code
4977 status collapsed
4978
4979 \begin_layout Plain Layout
4980
4981 \backslash
4982
4983 \backslash
4984 .
4985 \backslash
4986 pipe
4987 \end_layout
4988
4989 \end_inset
4990
4991 ) and have the names 
4992 \begin_inset Quotes eld
4993 \end_inset
4994
4995
4996 \begin_inset Flex Code
4997 status collapsed
4998
4999 \begin_layout Plain Layout
5000 lyxpipe.in
5001 \end_layout
5002
5003 \end_inset
5004
5005
5006 \begin_inset Quotes erd
5007 \end_inset
5008
5009  and 
5010 \begin_inset Quotes eld
5011 \end_inset
5012
5013
5014 \begin_inset Flex Code
5015 status collapsed
5016
5017 \begin_layout Plain Layout
5018 lyxpipe.out
5019 \end_layout
5020
5021 \end_inset
5022
5023
5024 \begin_inset Quotes erd
5025 \end_inset
5026
5027 .
5028  External programs write into 
5029 \begin_inset Flex Code
5030 status collapsed
5031
5032 \begin_layout Plain Layout
5033 lyxpipe.in
5034 \end_layout
5035
5036 \end_inset
5037
5038  and read back data from 
5039 \begin_inset Flex Code
5040 status collapsed
5041
5042 \begin_layout Plain Layout
5043 lyxpipe.out
5044 \end_layout
5045
5046 \end_inset
5047
5048 .
5049  The stem of the pipe names can be defined in the 
5050 \begin_inset Flex MenuItem
5051 status collapsed
5052
5053 \begin_layout Plain Layout
5054 Tools\SpecialChar \menuseparator
5055 Preferences
5056 \end_layout
5057
5058 \end_inset
5059
5060  dialog, for example 
5061 \begin_inset Flex Code
5062 status collapsed
5063
5064 \begin_layout Plain Layout
5065 "/home/myhome/lyxpipe"
5066 \end_layout
5067
5068 \end_inset
5069
5070 , or 
5071 \begin_inset Flex Code
5072 status collapsed
5073
5074 \begin_layout Plain Layout
5075 "
5076 \backslash
5077
5078 \backslash
5079 .
5080 \backslash
5081 pipe
5082 \backslash
5083 lyxpipe"
5084 \end_layout
5085
5086 \end_inset
5087
5088  on Windows.
5089  You 
5090 \emph on
5091 must
5092 \emph default
5093  configure this manually in order for the server to start.
5094 \end_layout
5095
5096 \begin_layout Standard
5097 LyX will add the '
5098 \begin_inset Flex Code
5099 status collapsed
5100
5101 \begin_layout Plain Layout
5102 .in
5103 \end_layout
5104
5105 \end_inset
5106
5107 ' and '
5108 \begin_inset Flex Code
5109 status collapsed
5110
5111 \begin_layout Plain Layout
5112 .out
5113 \end_layout
5114
5115 \end_inset
5116
5117 ' to create the pipes.
5118  If one of the pipes already exists, LyX will assume that another LyX process
5119  is already running and will not start the server.
5120  On POSIX (Unix like) systems, if for some other reason, an unused 
5121 \begin_inset Quotes eld
5122 \end_inset
5123
5124 stale
5125 \begin_inset Quotes erd
5126 \end_inset
5127
5128  pipe is left in existence when LyX closes, then LyX will try to delete
5129  it.
5130  If this fails for some reason, you will need to delete the pipes manually
5131  and then restart LyX.
5132  On Windows, pipes are deleted by the OS on program termination or crash,
5133  so 
5134 \begin_inset Quotes eld
5135 \end_inset
5136
5137 stale
5138 \begin_inset Quotes erd
5139 \end_inset
5140
5141  pipes should not be possible.
5142 \end_layout
5143
5144 \begin_layout Standard
5145 To have several LyX processes with servers at the same time, you have to
5146  use different configurations, perhaps by using separate user directories,
5147  each with its own 
5148 \begin_inset Flex Code
5149 status collapsed
5150
5151 \begin_layout Plain Layout
5152 preferences
5153 \end_layout
5154
5155 \end_inset
5156
5157  file, for each process.
5158 \end_layout
5159
5160 \begin_layout Standard
5161 If you are developing a client program, you might find it useful to enable
5162  debugging information from the LyX server.
5163  Do this by starting LyX as 
5164 \begin_inset Flex Code
5165 status collapsed
5166
5167 \begin_layout Plain Layout
5168 lyx -dbg lyxserver
5169 \end_layout
5170
5171 \end_inset
5172
5173 .
5174 \end_layout
5175
5176 \begin_layout Standard
5177 You can find a complete example client written in C in the source distribution
5178  as 
5179 \begin_inset Flex Code
5180 status collapsed
5181
5182 \begin_layout Plain Layout
5183 development/lyxserver/server_monitor.c
5184 \end_layout
5185
5186 \end_inset
5187
5188 .
5189 \end_layout
5190
5191 \begin_layout Standard
5192 Another useful tool is command-line based client you will find in 
5193 \begin_inset Flex Code
5194 status collapsed
5195
5196 \begin_layout Plain Layout
5197 src/client/lyxclient
5198 \end_layout
5199
5200 \end_inset
5201
5202 .
5203 \end_layout
5204
5205 \begin_layout Section
5206 Normal communication
5207 \end_layout
5208
5209 \begin_layout Standard
5210 To issue a LyX call, the client writes a line of ASCII text into the input
5211  pipe.
5212  This line has the following format:
5213 \end_layout
5214
5215 \begin_layout Quote
5216 LYXCMD:
5217 \emph on
5218 clientname
5219 \emph default
5220 :
5221 \emph on
5222 function
5223 \emph default
5224 :
5225 \emph on
5226 argument
5227 \end_layout
5228
5229 \begin_layout Description
5230 clientname is a name that the client can choose arbitrarily.
5231  Its only use is that LyX will echo it if it sends an answer—so a client
5232  can dispatch results from different requesters.
5233 \end_layout
5234
5235 \begin_layout Description
5236 function is the function you want LyX to perform.
5237  It is the same as the commands you'd use in the minibuffer.
5238 \end_layout
5239
5240 \begin_layout Description
5241 argument is an optional argument which is meaningful only to some functions
5242  (for instance, the 
5243 \begin_inset Quotes eld
5244 \end_inset
5245
5246 self-insert
5247 \begin_inset Quotes erd
5248 \end_inset
5249
5250  LFUN will insert the argument as text at the cursor position).
5251 \end_layout
5252
5253 \begin_layout Standard
5254 The answer from LyX will arrive in the output pipe and be of the form
5255 \end_layout
5256
5257 \begin_layout Quote
5258 INFO:
5259 \emph on
5260 clientname
5261 \emph default
5262 :
5263 \emph on
5264 function
5265 \emph default
5266 :
5267 \emph on
5268 data
5269 \end_layout
5270
5271 \begin_layout Standard
5272 where 
5273 \emph on
5274 clientname
5275 \emph default
5276  and 
5277 \emph on
5278 function
5279 \emph default
5280  are just echoed from the command request, while 
5281 \emph on
5282 data
5283 \emph default
5284  is more or less useful information filled according to how the command
5285  execution worked out.
5286  Some commands, such as 
5287 \begin_inset Quotes eld
5288 \end_inset
5289
5290 font-state
5291 \begin_inset Quotes erd
5292 \end_inset
5293
5294 , will return information about the internal state of LyX, while other will
5295  return an empty data-response.
5296  This means that the command execution went fine.
5297 \end_layout
5298
5299 \begin_layout Standard
5300 In case of errors, the response from LyX will have this form
5301 \end_layout
5302
5303 \begin_layout Quote
5304 ERROR:
5305 \emph on
5306 clientname
5307 \emph default
5308 :
5309 \emph on
5310 function
5311 \emph default
5312 :
5313 \emph on
5314 error message
5315 \end_layout
5316
5317 \begin_layout Standard
5318 where the 
5319 \emph on
5320 error message
5321 \emph default
5322  should contain an explanation of why the command failed.
5323 \end_layout
5324
5325 \begin_layout Standard
5326 Examples:
5327 \end_layout
5328
5329 \begin_layout LyX-Code
5330 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5331 \begin_inset Newline newline
5332 \end_inset
5333
5334 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5335 \begin_inset Newline newline
5336 \end_inset
5337
5338 read a <~/.lyxpipe.out
5339 \begin_inset Newline newline
5340 \end_inset
5341
5342 echo $a
5343 \end_layout
5344
5345 \begin_layout Section
5346 Notification
5347 \end_layout
5348
5349 \begin_layout Standard
5350 LyX can notify clients of events going on asynchronously.
5351  Currently it will only do this if the user binds a key sequence with the
5352  function 
5353 \begin_inset Quotes eld
5354 \end_inset
5355
5356 notify
5357 \begin_inset Quotes erd
5358 \end_inset
5359
5360 .
5361  The format of the string LyX sends is as follows:
5362 \end_layout
5363
5364 \begin_layout Quote
5365 \begin_inset Flex Code
5366 status collapsed
5367
5368 \begin_layout Plain Layout
5369 NOTIFY:
5370 \end_layout
5371
5372 \end_inset
5373
5374
5375 \emph on
5376 key-sequence
5377 \end_layout
5378
5379 \begin_layout Standard
5380 where 
5381 \emph on
5382 key-sequence
5383 \emph default
5384  is the printed representation of the key sequence that was actually typed
5385  by the user.
5386 \end_layout
5387
5388 \begin_layout Standard
5389 This mechanism can be used to extend LyX's command set and implement macros.
5390  Bind some key sequence to 
5391 \begin_inset Quotes eld
5392 \end_inset
5393
5394 notify
5395 \begin_inset Quotes erd
5396 \end_inset
5397
5398 .
5399  Then start a client that listens on the output pipe, dispatches the command
5400  according to the sequence, and starts a function that may use LyX calls
5401  and LyX requests to issue a command or a series of commands to LyX.
5402 \end_layout
5403
5404 \begin_layout Section
5405 The simple LyX Server Protocol
5406 \end_layout
5407
5408 \begin_layout Standard
5409 LyX implements a simple protocol that can be used for session management.
5410  All messages are of the form
5411 \end_layout
5412
5413 \begin_layout Quote
5414 LYXSRV:
5415 \emph on
5416 clientname
5417 \emph default
5418 :
5419 \emph on
5420 protocol message
5421 \end_layout
5422
5423 \begin_layout Standard
5424 where 
5425 \emph on
5426 protocol message
5427 \emph default
5428  can be 
5429 \begin_inset Quotes eld
5430 \end_inset
5431
5432 hello
5433 \begin_inset Quotes erd
5434 \end_inset
5435
5436  or 
5437 \begin_inset Quotes eld
5438 \end_inset
5439
5440 bye
5441 \begin_inset Quotes erd
5442 \end_inset
5443
5444 .
5445  If 
5446 \begin_inset Quotes eld
5447 \end_inset
5448
5449 hello
5450 \begin_inset Quotes erd
5451 \end_inset
5452
5453  is received from a client, LyX will report back to inform the client that
5454  it's listening to it's messages, while 
5455 \begin_inset Quotes eld
5456 \end_inset
5457
5458 bye
5459 \begin_inset Quotes erd
5460 \end_inset
5461
5462  sent from LyX will inform clients that LyX is closing.
5463 \end_layout
5464
5465 \begin_layout Section
5466 Reverse DVI/PDF search
5467 \end_layout
5468
5469 \begin_layout Standard
5470 Some DVI/PDF viewers
5471 \begin_inset Foot
5472 status collapsed
5473
5474 \begin_layout Plain Layout
5475 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5476  Skim on Mac OSX and SumatraPDF on Windows.
5477 \end_layout
5478
5479 \end_inset
5480
5481  provide 
5482 \emph on
5483 reverse search
5484 \emph default
5485  facility (also called 
5486 \emph on
5487 inverse search
5488 \emph default
5489 ).
5490  This means that you can tell LyX to put the cursor to a specific line in
5491  the document by clicking at the respective position in the DVI/PDF output.
5492  To achieve this, the viewer must be able to communicate with LyX.
5493  This is done via the LyX server either by using the named pipe (
5494 \emph on
5495 lyxpipe
5496 \emph default
5497 ), or the UNIX domain socket (
5498 \emph on
5499 lyxsocket
5500 \emph default
5501 ) that LyX creates in its temporary directory (this is the way the 
5502 \begin_inset Flex Code
5503 status collapsed
5504
5505 \begin_layout Plain Layout
5506 lyxclient
5507 \end_layout
5508
5509 \end_inset
5510
5511  program communicates with LyX).
5512  In some cases, you need a helper script that mediates between the viewer
5513  and LyX, in others, the viewer can communicate with LyX directly.
5514  This depends on the selected viewer and on your operating system.
5515  The same applies to the way viewers need to be configured and the way the
5516  reverse search is actually performed.
5517  In what follows, we will thus describe how to setup reverse search for
5518  specific viewers.
5519  Before we turn to this, though, we will explain what needs to be done generally
5520  to enable reverse search in the DVI/PDF output.
5521 \end_layout
5522
5523 \begin_layout Subsection
5524 \begin_inset CommandInset label
5525 LatexCommand label
5526 name "sub:rev-search"
5527
5528 \end_inset
5529
5530 Automatical enabling
5531 \end_layout
5532
5533 \begin_layout Standard
5534 In most cases LyX will do the work for you by enabling 
5535 \begin_inset Flex MenuItem
5536 status collapsed
5537
5538 \begin_layout Plain Layout
5539 Document\SpecialChar \menuseparator
5540 Output\SpecialChar \menuseparator
5541 Output Sync
5542 \end_layout
5543
5544 \end_inset
5545
5546 .
5547  In such a case LyX will automatically insert SyncTeX macro (for PDF) or
5548  srcltx package (for DVI) respectively.
5549  This option can be easily reached also on 
5550 \begin_inset Flex Code
5551 status collapsed
5552
5553 \begin_layout Plain Layout
5554 View/update
5555 \end_layout
5556
5557 \end_inset
5558
5559  Toolbar.
5560 \end_layout
5561
5562 \begin_layout Standard
5563 Plase note that including 
5564 \begin_inset Flex Code
5565 status collapsed
5566
5567 \begin_layout Plain Layout
5568 srcltx
5569 \end_layout
5570
5571 \end_inset
5572
5573  package or 
5574 \begin_inset Flex Code
5575 status collapsed
5576
5577 \begin_layout Plain Layout
5578 src-specials
5579 \end_layout
5580
5581 \end_inset
5582
5583  sometimes have an impact on the typeset and you should switch them off
5584  for the final typesets.
5585 \end_layout
5586
5587 \begin_layout Standard
5588 You can also define custom macro in preferences and in case you need some
5589  special tweaks read the next section about manual enabling.
5590  
5591 \end_layout
5592
5593 \begin_layout Subsection
5594 Manual enabling
5595 \end_layout
5596
5597 \begin_layout Standard
5598 LaTeX provides several different methods for reverse search.
5599  Some are built-in in the 
5600 \begin_inset Flex Code
5601 status collapsed
5602
5603 \begin_layout Plain Layout
5604 latex/pdflatex
5605 \end_layout
5606
5607 \end_inset
5608
5609  program, some are provided by external packages.
5610  Your choice depends on whether your LaTeX distribution already provides
5611  a given method (the built-in methods are rather new) and whether your viewer
5612  can cope with it.
5613  The available methods are described in the following.
5614 \end_layout
5615
5616 \begin_layout Subsubsection*
5617 Built-in DVI-search via src-specials (DVI only) 
5618 \end_layout
5619
5620 \begin_layout Standard
5621 This method provides the DVI file with the necessary information for reverse
5622  search.
5623  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5624  distribution should include it), and it works reliably.
5625  To enable it, change the 
5626 \begin_inset Flex MenuItem
5627 status collapsed
5628
5629 \begin_layout Plain Layout
5630 LaT
5631 \begin_inset ERT
5632 status collapsed
5633
5634 \begin_layout Plain Layout
5635
5636 {}
5637 \end_layout
5638
5639 \end_inset
5640
5641 eX (plain)->DVI
5642 \end_layout
5643
5644 \end_inset
5645
5646  or 
5647 \begin_inset Flex MenuItem
5648 status collapsed
5649
5650 \begin_layout Plain Layout
5651 LaT
5652 \begin_inset ERT
5653 status collapsed
5654
5655 \begin_layout Plain Layout
5656
5657 {}
5658 \end_layout
5659
5660 \end_inset
5661
5662 eX (plain)->DraftDVI
5663 \end_layout
5664
5665 \end_inset
5666
5667  converter in 
5668 \begin_inset Flex MenuItem
5669 status collapsed
5670
5671 \begin_layout Plain Layout
5672 Preferences\SpecialChar \menuseparator
5673 File Handling\SpecialChar \menuseparator
5674 Converters
5675 \end_layout
5676
5677 \end_inset
5678
5679  to 
5680 \begin_inset Flex Code
5681 status collapsed
5682
5683 \begin_layout Plain Layout
5684 latex -src-specials $$i
5685 \end_layout
5686
5687 \end_inset
5688
5689 .
5690  If this doesn't work, check if your TeX engine needs different options
5691  (the syntax might differ in some distributions).
5692 \end_layout
5693
5694 \begin_layout Subsubsection*
5695 External Packages (PDFSync and scrltx) 
5696 \end_layout
5697
5698 \begin_layout Standard
5699 The packages 
5700 \emph on
5701 pdfsync
5702 \emph default
5703  and 
5704 \emph on
5705 scrltx
5706 \emph default
5707  provide reverse search facility for PDF output (via pdflatex) and DVI output,
5708  respectively.
5709  In order to enable it, load the packages in the LyX preamble: 
5710 \end_layout
5711
5712 \begin_layout Itemize
5713 \begin_inset Flex Code
5714 status collapsed
5715
5716 \begin_layout Plain Layout
5717
5718 \backslash
5719 usepackage{pdfsync}
5720 \end_layout
5721
5722 \end_inset
5723
5724  for reverse PDF search,
5725 \end_layout
5726
5727 \begin_layout Itemize
5728  
5729 \begin_inset Flex Code
5730 status collapsed
5731
5732 \begin_layout Plain Layout
5733
5734 \backslash
5735 usepackage[active]{srcltx}
5736 \end_layout
5737
5738 \end_inset
5739
5740  for reverse DVI search.
5741 \end_layout
5742
5743 \begin_layout Standard
5744 If you want to be able to perform both DVI and PDF reverse searches, you
5745  can also insert in the preamble the following lines
5746 \end_layout
5747
5748 \begin_layout LyX-Code
5749
5750 \backslash
5751 usepackage{ifpdf}
5752 \begin_inset Newline newline
5753 \end_inset
5754
5755
5756 \backslash
5757 ifpdf
5758 \begin_inset Newline newline
5759 \end_inset
5760
5761   
5762 \backslash
5763 usepackage{pdfsync}
5764 \begin_inset Newline newline
5765 \end_inset
5766
5767
5768 \backslash
5769 else
5770 \begin_inset Newline newline
5771 \end_inset
5772
5773   
5774 \backslash
5775 usepackage[active]{srcltx}
5776 \begin_inset Newline newline
5777 \end_inset
5778
5779
5780 \backslash
5781 fi
5782 \end_layout
5783
5784 \begin_layout Standard
5785 This way, you can preview the file as either DVI or PDF (pdflatex) and the
5786  right package will be used.
5787 \end_layout
5788
5789 \begin_layout Standard
5790 Note that PDFSync might affect the output layout of your document.
5791  It is therefore advised to disable PDFsync for final documents.
5792 \end_layout
5793
5794 \begin_layout Subsubsection*
5795 Built-in reverse search via SyncTeX (DVI and PDF) 
5796 \end_layout
5797
5798 \begin_layout Standard
5799 Recent versions of 
5800 \begin_inset Flex Code
5801 status collapsed
5802
5803 \begin_layout Plain Layout
5804 (pdf)latex
5805 \end_layout
5806
5807 \end_inset
5808
5809  have built-in support for both PDF and DVI reverse search.
5810  This so-called 
5811 \emph on
5812 SyncTeX
5813 \emph default
5814  facility is basically the result of the integration of the PDFSync package
5815  to the pdftex program and its merge with the 
5816 \emph on
5817 scr-specials
5818 \emph default
5819  approach.
5820  You need at least TeXLive 2008 or a recent MikTeX distribution in order
5821  to use it.
5822  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
5823  already provide SyncTeX support.
5824 \end_layout
5825
5826 \begin_layout Standard
5827 To enable SyncTeX for DVI output, change the 
5828 \begin_inset Flex MenuItem
5829 status collapsed
5830
5831 \begin_layout Plain Layout
5832 LaT
5833 \begin_inset ERT
5834 status collapsed
5835
5836 \begin_layout Plain Layout
5837
5838 {}
5839 \end_layout
5840
5841 \end_inset
5842
5843 eX (plain) -> DVI
5844 \end_layout
5845
5846 \end_inset
5847
5848  or 
5849 \begin_inset Flex MenuItem
5850 status collapsed
5851
5852 \begin_layout Plain Layout
5853 LaT
5854 \begin_inset ERT
5855 status collapsed
5856
5857 \begin_layout Plain Layout
5858
5859 {}
5860 \end_layout
5861
5862 \end_inset
5863
5864 eX (plain) -> DraftDVI
5865 \end_layout
5866
5867 \end_inset
5868
5869  converter in 
5870 \begin_inset Flex MenuItem
5871 status collapsed
5872
5873 \begin_layout Plain Layout
5874 Preferences\SpecialChar \menuseparator
5875 File Handling\SpecialChar \menuseparator
5876 Converters
5877 \end_layout
5878
5879 \end_inset
5880
5881  to 
5882 \begin_inset Flex Code
5883 status collapsed
5884
5885 \begin_layout Plain Layout
5886 latex -synctex=1 $$i
5887 \end_layout
5888
5889 \end_inset
5890
5891 , and for PDF output, change the 
5892 \begin_inset Flex MenuItem
5893 status collapsed
5894
5895 \begin_layout Plain Layout
5896 LaT
5897 \begin_inset ERT
5898 status collapsed
5899
5900 \begin_layout Plain Layout
5901
5902 {}
5903 \end_layout
5904
5905 \end_inset
5906
5907 eX (pdflatex) -> PDF (pdflatex)
5908 \end_layout
5909
5910 \end_inset
5911
5912  or converter to 
5913 \begin_inset Flex Code
5914 status collapsed
5915
5916 \begin_layout Plain Layout
5917 pdflatex -synctex=1 $$i
5918 \end_layout
5919
5920 \end_inset
5921
5922 .
5923  Check the documentation of your viewer whether the viewer needs to be configure
5924 d for the use with SyncTeX.
5925 \begin_inset Foot
5926 status collapsed
5927
5928 \begin_layout Plain Layout
5929 The 
5930 \begin_inset Flex Code
5931 status collapsed
5932
5933 \begin_layout Plain Layout
5934 -synctex=1
5935 \end_layout
5936
5937 \end_inset
5938
5939  option enables gzip compression.
5940  If your viewer does not support it, you should instead use 
5941 \begin_inset Flex Code
5942 status collapsed
5943
5944 \begin_layout Plain Layout
5945 -synctex=-1
5946 \end_layout
5947
5948 \end_inset
5949
5950 .
5951 \end_layout
5952
5953 \end_inset
5954
5955
5956 \end_layout
5957
5958 \begin_layout Subsection
5959 Configuring and using specific viewers
5960 \end_layout
5961
5962 \begin_layout Subsubsection*
5963 Xdvi (all platforms)
5964 \end_layout
5965
5966 \begin_layout Standard
5967 If you use 
5968 \begin_inset Flex Code
5969 status collapsed
5970
5971 \begin_layout Plain Layout
5972 xdvi
5973 \end_layout
5974
5975 \end_inset
5976
5977 , you don't need to do anything else for performing a reverse DVI search,
5978  as LyX already provides the necessary hooks for automatically using the
5979  
5980 \begin_inset Flex Code
5981 status collapsed
5982
5983 \begin_layout Plain Layout
5984 lyxclient
5985 \end_layout
5986
5987 \end_inset
5988
5989  program.
5990  Just setup your document as described above (reverse search is triggered
5991  by Ctrl-click or Alt-click on Mac OSX, respectively).
5992 \end_layout
5993
5994 \begin_layout Standard
5995 However, if for whatever reason you want to use the named pipe instead of
5996  the socket for communicating with LyX, simply change the DVI viewer in
5997  
5998 \begin_inset Flex MenuItem
5999 status collapsed
6000
6001 \begin_layout Plain Layout
6002 Preferences\SpecialChar \menuseparator
6003 File Handling\SpecialChar \menuseparator
6004 File formats
6005 \end_layout
6006
6007 \end_inset
6008
6009  to
6010 \begin_inset Foot
6011 status collapsed
6012
6013 \begin_layout Plain Layout
6014 On Mac OSX you have to use 
6015 \begin_inset Flex Code
6016 status collapsed
6017
6018 \begin_layout Plain Layout
6019 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6020 \end_layout
6021
6022 \end_inset
6023
6024
6025 \end_layout
6026
6027 \end_inset
6028
6029  
6030 \begin_inset Flex Code
6031 status collapsed
6032
6033 \begin_layout Plain Layout
6034 xdvi -editor 'lyxeditor.sh %f %l'
6035 \end_layout
6036
6037 \end_inset
6038
6039 , where 
6040 \begin_inset Flex Code
6041 status collapsed
6042
6043 \begin_layout Plain Layout
6044 lyxeditor.sh
6045 \end_layout
6046
6047 \end_inset
6048
6049  is a suitable script.
6050  For example, a minimal shell script is the following one:
6051 \end_layout
6052
6053 \begin_layout LyX-Code
6054 #!/bin/sh
6055 \begin_inset Newline newline
6056 \end_inset
6057
6058 LYXPIPE="/path/to/lyxpipe"
6059 \begin_inset Newline newline
6060 \end_inset
6061
6062 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6063 \begin_inset Newline newline
6064 \end_inset
6065
6066 echo "$COMMAND" > "${LYXPIPE}".in || exit
6067 \begin_inset Newline newline
6068 \end_inset
6069
6070 read < "${LYXPIPE}".out || exit
6071 \end_layout
6072
6073 \begin_layout Standard
6074 where 
6075 \begin_inset Flex Code
6076 status collapsed
6077
6078 \begin_layout Plain Layout
6079 /path/to/lyxpipe
6080 \end_layout
6081
6082 \end_inset
6083
6084  is the Ly
6085 \begin_inset ERT
6086 status collapsed
6087
6088 \begin_layout Plain Layout
6089
6090 {}
6091 \end_layout
6092
6093 \end_inset
6094
6095 XServer pipe path specified in 
6096 \begin_inset Flex MenuItem
6097 status collapsed
6098
6099 \begin_layout Plain Layout
6100 Preferences\SpecialChar \menuseparator
6101 Paths
6102 \end_layout
6103
6104 \end_inset
6105
6106 .
6107 \begin_inset Foot
6108 status collapsed
6109
6110 \begin_layout Plain Layout
6111 In the 
6112 \begin_inset Flex Code
6113 status collapsed
6114
6115 \begin_layout Plain Layout
6116 development/tools
6117 \end_layout
6118
6119 \end_inset
6120
6121  folder of a source distribution you can find a 
6122 \begin_inset Flex Code
6123 status collapsed
6124
6125 \begin_layout Plain Layout
6126 lyxeditor
6127 \end_layout
6128
6129 \end_inset
6130
6131  script which is able to locate the 
6132 \emph on
6133 lyxpipe
6134 \emph default
6135  based on your preferences.
6136 \end_layout
6137
6138 \end_inset
6139
6140
6141 \end_layout
6142
6143 \begin_layout Subsubsection*
6144 MacDviX (Mac OSX)
6145 \end_layout
6146
6147 \begin_layout Standard
6148 At the end of 
6149 \begin_inset Flex Code
6150 status collapsed
6151
6152 \begin_layout Plain Layout
6153 /Applications/MacDviX_Folder/calleditor.script
6154 \end_layout
6155
6156 \end_inset
6157
6158 , add the following lines:
6159 \end_layout
6160
6161 \begin_layout LyX-Code
6162 /Applications/Ly
6163 \begin_inset ERT
6164 status collapsed
6165
6166 \begin_layout Plain Layout
6167
6168 {}
6169 \end_layout
6170
6171 \end_inset
6172
6173 X.app/Contents/MacOS/lyxeditor "$2" $1
6174 \begin_inset Newline newline
6175 \end_inset
6176
6177 exit 1
6178 \end_layout
6179
6180 \begin_layout Standard
6181 Modify the lines accordingly if you install LyX somewhere else than in the
6182  Applications folder.
6183 \end_layout
6184
6185 \begin_layout Standard
6186 Reverse search is triggered by Alt-click (OPTION-click).
6187 \end_layout
6188
6189 \begin_layout Subsubsection*
6190 Skim (Mac OSX)
6191 \end_layout
6192
6193 \begin_layout Standard
6194 Enter 
6195 \begin_inset Flex Code
6196 status collapsed
6197
6198 \begin_layout Plain Layout
6199 open -a Skim.app $$i
6200 \end_layout
6201
6202 \end_inset
6203
6204  to the viewer setting in 
6205 \begin_inset Flex MenuItem
6206 status collapsed
6207
6208 \begin_layout Plain Layout
6209 Preferences\SpecialChar \menuseparator
6210 File Handling\SpecialChar \menuseparator
6211 File formats\SpecialChar \menuseparator
6212 PDF (pdflatex)
6213 \end_layout
6214
6215 \end_inset
6216
6217 , and then in 
6218 \begin_inset Flex MenuItem
6219 status collapsed
6220
6221 \begin_layout Plain Layout
6222 Skim\SpecialChar \menuseparator
6223 Preferences\SpecialChar \menuseparator
6224 Sync
6225 \end_layout
6226
6227 \end_inset
6228
6229  select Ly
6230 \begin_inset ERT
6231 status collapsed
6232
6233 \begin_layout Plain Layout
6234
6235 {}
6236 \end_layout
6237
6238 \end_inset
6239
6240 X.
6241 \end_layout
6242
6243 \begin_layout Standard
6244 Reverse search is triggered by COMMAND-SHIFT-click
6245 \end_layout
6246
6247 \begin_layout Subsubsection*
6248 Okular (KDE)
6249 \end_layout
6250
6251 \begin_layout Standard
6252 Go to 
6253 \begin_inset Flex MenuItem
6254 status collapsed
6255
6256 \begin_layout Plain Layout
6257 Settings\SpecialChar \menuseparator
6258 Configure Okular\SpecialChar \ldots{}
6259 \SpecialChar \menuseparator
6260 Editor
6261 \end_layout
6262
6263 \end_inset
6264
6265 , select 
6266 \begin_inset Quotes eld
6267 \end_inset
6268
6269 Custom Text Editor
6270 \begin_inset Quotes erd
6271 \end_inset
6272
6273  and add the command 
6274 \begin_inset Flex Code
6275 status collapsed
6276
6277 \begin_layout Plain Layout
6278 lyxclient -g %f %l
6279 \end_layout
6280
6281 \end_inset
6282
6283 .
6284 \end_layout
6285
6286 \begin_layout Standard
6287 Reverse search is triggered by SHIFT-click.
6288 \end_layout
6289
6290 \begin_layout Subsubsection*
6291 YAP (Windows)
6292 \end_layout
6293
6294 \begin_layout Standard
6295 Launch yap, choose its 
6296 \begin_inset Flex MenuItem
6297 status collapsed
6298
6299 \begin_layout Plain Layout
6300 View\SpecialChar \menuseparator
6301 Options
6302 \end_layout
6303
6304 \end_inset
6305
6306  menu and select the 
6307 \begin_inset Quotes eld
6308 \end_inset
6309
6310 Inverse DVI Search
6311 \begin_inset Quotes erd
6312 \end_inset
6313
6314  tab.
6315  Click on the 
6316 \begin_inset Quotes eld
6317 \end_inset
6318
6319 New\SpecialChar \ldots{}
6320
6321 \begin_inset Quotes erd
6322 \end_inset
6323
6324  button and, in the window that opens, enter 
6325 \begin_inset Quotes eld
6326 \end_inset
6327
6328 LyX Editor
6329 \begin_inset Quotes erd
6330 \end_inset
6331
6332  (or any other name you like) in the 
6333 \begin_inset Quotes eld
6334 \end_inset
6335
6336 Name:
6337 \begin_inset Quotes erd
6338 \end_inset
6339
6340  field.
6341  Now click on the button labeled 
6342 \begin_inset Quotes eld
6343 \end_inset
6344
6345 \SpecialChar \ldots{}
6346
6347 \begin_inset Quotes erd
6348 \end_inset
6349
6350  to open a file dialog and navigate to the directory containing the batch
6351  file 
6352 \begin_inset Flex Code
6353 status collapsed
6354
6355 \begin_layout Plain Layout
6356 lyxeditor.bat
6357 \end_layout
6358
6359 \end_inset
6360
6361  (see below).
6362  Select 
6363 \begin_inset Flex Code
6364 status collapsed
6365
6366 \begin_layout Plain Layout
6367 lyxeditor.bat
6368 \end_layout
6369
6370 \end_inset
6371
6372  and then specify the program arguments as 
6373 \begin_inset Flex Code
6374 status collapsed
6375
6376 \begin_layout Plain Layout
6377 %f %l
6378 \end_layout
6379
6380 \end_inset
6381
6382 .
6383  The 
6384 \begin_inset Flex Code
6385 status collapsed
6386
6387 \begin_layout Plain Layout
6388 lyxeditor.bat
6389 \end_layout
6390
6391 \end_inset
6392
6393  wrapper is used for communicating with LyX through the 
6394 \emph on
6395 lyxpipe
6396 \emph default
6397  and is as follows:
6398 \end_layout
6399
6400 \begin_layout LyX-Code
6401 @echo off
6402 \begin_inset Newline newline
6403 \end_inset
6404
6405 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6406 \backslash
6407
6408 \backslash
6409 .
6410 \backslash
6411 pipe
6412 \backslash
6413 lyxpipe.in
6414 \begin_inset Newline newline
6415 \end_inset
6416
6417 type 
6418 \backslash
6419
6420 \backslash
6421 .
6422 \backslash
6423 pipe
6424 \backslash
6425 lyxpipe.out
6426 \end_layout
6427
6428 \begin_layout Standard
6429 Make sure that the LyXServer pipe path you specified in LyX is 
6430 \begin_inset Flex Code
6431 status collapsed
6432
6433 \begin_layout Plain Layout
6434
6435 \backslash
6436
6437 \backslash
6438 .
6439 \backslash
6440 pipe
6441 \backslash
6442 lyxpipe
6443 \end_layout
6444
6445 \end_inset
6446
6447 , otherwise change the 
6448 \begin_inset Flex Code
6449 status collapsed
6450
6451 \begin_layout Plain Layout
6452 lyxeditor.bat
6453 \end_layout
6454
6455 \end_inset
6456
6457  wrapper accordingly.
6458 \end_layout
6459
6460 \begin_layout Standard
6461 In yap, reverse search is triggered by double-click.
6462 \end_layout
6463
6464 \begin_layout Subsubsection*
6465 SumatraPDF (Windows)
6466 \end_layout
6467
6468 \begin_layout Standard
6469 In order to use SumatraPDF for inverse search, enter 
6470 \begin_inset Flex Code
6471 status collapsed
6472
6473 \begin_layout Plain Layout
6474 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6475 \end_layout
6476
6477 \end_inset
6478
6479  in the viewer setting in 
6480 \begin_inset Flex MenuItem
6481 status collapsed
6482
6483 \begin_layout Plain Layout
6484 Preferences\SpecialChar \menuseparator
6485 File Handling\SpecialChar \menuseparator
6486 File formats\SpecialChar \menuseparator
6487 PDF (pdflatex)
6488 \end_layout
6489
6490 \end_inset
6491
6492 , where 
6493 \begin_inset Flex Code
6494 status collapsed
6495
6496 \begin_layout Plain Layout
6497 lyxeditor.bat
6498 \end_layout
6499
6500 \end_inset
6501
6502  is the previous wrapper.
6503  If SumatraPDF.exe is not in your command PATH, use its full file name.
6504 \end_layout
6505
6506 \begin_layout Standard
6507 Reverse search is triggered by double-click.
6508 \end_layout
6509
6510 \begin_layout Subsubsection*
6511 YAP (Cygwin)
6512 \end_layout
6513
6514 \begin_layout Standard
6515 First of all, make sure that yap is your default DVI viewer in the Windows
6516  environment, then launch it, choose its 
6517 \begin_inset Flex MenuItem
6518 status collapsed
6519
6520 \begin_layout Plain Layout
6521 View\SpecialChar \menuseparator
6522 Options
6523 \end_layout
6524
6525 \end_inset
6526
6527  menu and select the 
6528 \begin_inset Quotes eld
6529 \end_inset
6530
6531 Inverse DVI Search
6532 \begin_inset Quotes erd
6533 \end_inset
6534
6535  tab.
6536  Click on the 
6537 \begin_inset Quotes eld
6538 \end_inset
6539
6540 New\SpecialChar \ldots{}
6541
6542 \begin_inset Quotes erd
6543 \end_inset
6544
6545  button and, in the window that opens, enter 
6546 \begin_inset Quotes eld
6547 \end_inset
6548
6549 LyX Editor
6550 \begin_inset Quotes erd
6551 \end_inset
6552
6553  (or any other name you like) in the 
6554 \begin_inset Quotes eld
6555 \end_inset
6556
6557 Name:
6558 \begin_inset Quotes erd
6559 \end_inset
6560
6561  field.
6562  Now click on the button labeled 
6563 \begin_inset Quotes eld
6564 \end_inset
6565
6566 \SpecialChar \ldots{}
6567
6568 \begin_inset Quotes erd
6569 \end_inset
6570
6571  to open a file dialog and navigate to the directory containing the 
6572 \begin_inset Flex Code
6573 status collapsed
6574
6575 \begin_layout Plain Layout
6576 lyxeditor.exe
6577 \end_layout
6578
6579 \end_inset
6580
6581  program (which is installed by default on Cygwin along with the LyX executable).
6582  Select 
6583 \begin_inset Flex Code
6584 status collapsed
6585
6586 \begin_layout Plain Layout
6587 lyxeditor.exe
6588 \end_layout
6589
6590 \end_inset
6591
6592  and then specify the program arguments as 
6593 \begin_inset Flex Code
6594 status collapsed
6595
6596 \begin_layout Plain Layout
6597 -g %f %l
6598 \end_layout
6599
6600 \end_inset
6601
6602 .
6603  In this way, you will be using the 
6604 \emph on
6605 lyxsocket
6606 \emph default
6607  for communicating with LyX.
6608  If, for whatever reason, you want to use the 
6609 \emph on
6610 lyxpipe
6611 \emph default
6612 , omit the 
6613 \begin_inset Flex Code
6614 status collapsed
6615
6616 \begin_layout Plain Layout
6617 -g
6618 \end_layout
6619
6620 \end_inset
6621
6622  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6623 \end_layout
6624
6625 \begin_layout Standard
6626 In yap, reverse search is triggered by double-click.
6627 \end_layout
6628
6629 \begin_layout Subsubsection*
6630 SumatraPDF (Cygwin)
6631 \end_layout
6632
6633 \begin_layout Standard
6634 In order to use SumatraPDF for inverse search, enter 
6635 \begin_inset Flex Code
6636 status collapsed
6637
6638 \begin_layout Plain Layout
6639 SumatraPDF.sh
6640 \end_layout
6641
6642 \end_inset
6643
6644  in the viewer setting in 
6645 \begin_inset Flex MenuItem
6646 status collapsed
6647
6648 \begin_layout Plain Layout
6649 Preferences\SpecialChar \menuseparator
6650 File Handling\SpecialChar \menuseparator
6651 File formats\SpecialChar \menuseparator
6652 PDF (pdflatex)
6653 \end_layout
6654
6655 \end_inset
6656
6657 , where 
6658 \begin_inset Flex Code
6659 status collapsed
6660
6661 \begin_layout Plain Layout
6662 SumatraPDF.sh
6663 \end_layout
6664
6665 \end_inset
6666
6667  is the following script (to be placed in your command PATH, 
6668 \begin_inset Flex Code
6669 status collapsed
6670
6671 \begin_layout Plain Layout
6672 /usr/local/bin
6673 \end_layout
6674
6675 \end_inset
6676
6677  being the best choice):
6678 \end_layout
6679
6680 \begin_layout LyX-Code
6681 #!/bin/bash
6682 \begin_inset Newline newline
6683 \end_inset
6684
6685 cd $(dirname $1)
6686 \begin_inset Newline newline
6687 \end_inset
6688
6689 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6690 \end_layout
6691
6692 \begin_layout Standard
6693 This wrapper script is needed because SumatraPDF is a native Windows application
6694  and does not understand the posix paths used by the Cygwin version of LyX.
6695  If SumatraPDF.exe is not in your command PATH, use its full posix path in
6696  the script above.
6697  The 
6698 \begin_inset Flex Code
6699 status collapsed
6700
6701 \begin_layout Plain Layout
6702 -g
6703 \end_layout
6704
6705 \end_inset
6706
6707  enables communication via the 
6708 \emph on
6709 lyxsocket
6710 \emph default
6711 .
6712  Again, omit the 
6713 \begin_inset Flex Code
6714 status collapsed
6715
6716 \begin_layout Plain Layout
6717 -g
6718 \end_layout
6719
6720 \end_inset
6721
6722  option if you want to use the 
6723 \emph on
6724 lyxpipe
6725 \emph default
6726 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6727 \end_layout
6728
6729 \begin_layout Standard
6730 Reverse search is triggered by double-click.
6731 \end_layout
6732
6733 \begin_layout Section
6734 Forward search
6735 \end_layout
6736
6737 \begin_layout Standard
6738 To make forward search possible you need to provide generated output PDF/DVI
6739  file with additional information about TeX sources.
6740  This can be done via the methods described in the section 
6741 \begin_inset CommandInset ref
6742 LatexCommand ref
6743 reference "sub:rev-search"
6744
6745 \end_inset
6746
6747 .
6748 \end_layout
6749
6750 \begin_layout Standard
6751 Secondly you need to configure LyX for using your viewers in 
6752 \begin_inset Flex MenuItem
6753 status collapsed
6754
6755 \begin_layout Plain Layout
6756 Preferences\SpecialChar \menuseparator
6757 Output\SpecialChar \menuseparator
6758 General
6759 \end_layout
6760
6761 \end_inset
6762
6763 .
6764  Only some of the viewers allows this operation --- yap, xdvi, okular, Sumatra
6765  PDF
6766 \begin_inset Foot
6767 status collapsed
6768
6769 \begin_layout Plain Layout
6770 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
6771 ip
6772 \end_layout
6773
6774 \end_inset
6775
6776 .
6777  Some other viewers allow at least reloading and positioning to particular
6778  page of the file --- Evince or xpdf --- for these cases you can use external
6779  call of synctex.
6780  Please study the prepared examples in the Preferences dialog.
6781  The values replaced in the setting: 
6782 \begin_inset Flex Code
6783 status collapsed
6784
6785 \begin_layout Plain Layout
6786 $$n
6787 \end_layout
6788
6789 \end_inset
6790
6791  for row number, 
6792 \begin_inset Flex Code
6793 status collapsed
6794
6795 \begin_layout Plain Layout
6796 $$t
6797 \end_layout
6798
6799 \end_inset
6800
6801  for exported temporary .tex file, 
6802 \begin_inset Flex Code
6803 status collapsed
6804
6805 \begin_layout Plain Layout
6806 $$o
6807 \end_layout
6808
6809 \end_inset
6810
6811  exported output file (either dvi or pdf, depending on which one exists
6812  in the temp dir).
6813  
6814 \end_layout
6815
6816 \begin_layout Standard
6817 When viewing, LyX dynamically choose proper preview format based on the
6818  presence of .dvi or .pdf file in the temporary directory (i.e.
6819  what format have you used for viewing this particular document).
6820  
6821 \end_layout
6822
6823 \begin_layout Chapter
6824 Special Document Classes
6825 \end_layout
6826
6827 \begin_layout Section
6828 A&A Paper
6829 \end_layout
6830
6831 \begin_layout Standard
6832 by 
6833 \noun on
6834 Peter Sütterlin
6835 \end_layout
6836
6837 \begin_layout Subsection
6838 Introduction
6839 \end_layout
6840
6841 \begin_layout Standard
6842 This section describes how LyX can be used to write articles for submission
6843  to the scientific journal 
6844 \emph on
6845 Astronomy and Astrophysics
6846 \emph default
6847  (www.edpsciences.fr/aa/ 
6848 \begin_inset Flex URL
6849 status collapsed
6850
6851 \begin_layout Plain Layout
6852
6853 http://www.edpsciences.fr/aa/
6854 \end_layout
6855
6856 \end_inset
6857
6858 ) using Version 5.01 of the document class 
6859 \family typewriter
6860 aa.cls
6861 \family default
6862 .
6863  This package can be downloaded from the ftp site
6864 \end_layout
6865
6866 \begin_layout Standard
6867 \begin_inset VSpace medskip
6868 \end_inset
6869
6870
6871 \end_layout
6872
6873 \begin_layout Standard
6874 \align center
6875 \begin_inset Flex URL
6876 status collapsed
6877
6878 \begin_layout Plain Layout
6879
6880 ftp://ftp.edpsciences.org/pub/aa/readme.html
6881 \end_layout
6882
6883 \end_inset
6884
6885
6886 \end_layout
6887
6888 \begin_layout Standard
6889 \begin_inset VSpace medskip
6890 \end_inset
6891
6892
6893 \end_layout
6894
6895 \begin_layout Standard
6896 A manual comes together with that package, and this text is not meant to
6897  replace the original manual but is merely a short guide in how to realize
6898  the correct form of your paper.
6899  
6900 \end_layout
6901
6902 \begin_layout Standard
6903 Please note that the publisher of the journal was changed from Springer
6904  to EDP Sciences starting January 1, 2001.
6905  That change involved also some slight changes to the style files, namely
6906  the removal of the thesaurus command.
6907  The LyX class aa supports the newest version of these style files, V 5.01.
6908  If you have an older version installed, please upgrade.
6909  For compatibility, the old (version 4) layout has been kept as 
6910 \family sans
6911 article (A&A V4)
6912 \family default
6913 .
6914  Please refer to the comments in 
6915 \family typewriter
6916 LyXDir/layouts/aapaper.layout
6917 \family default
6918 .
6919 \end_layout
6920
6921 \begin_layout Subsection
6922 Getting started
6923 \end_layout
6924
6925 \begin_layout Standard
6926 It is recommended you start from the example template distributed with LyX.
6927  If you are not using a template, note the following settings:
6928 \end_layout
6929
6930 \begin_layout Itemize
6931 Select 
6932 \family sans
6933 article (A&A)
6934 \family default
6935  in the 
6936 \family sans
6937 Document\SpecialChar \menuseparator
6938 Settings
6939 \family default
6940  dialog (OK, that one was obvious).
6941 \end_layout
6942
6943 \begin_layout Itemize
6944 Don't change the option 
6945 \family sans
6946 Page
6947 \begin_inset space ~
6948 \end_inset
6949
6950 style
6951 \family default
6952 : Leave it set to 
6953 \family sans
6954 default
6955 \family default
6956 .
6957  The whole layout is done by the macros, you shouldn't change anything.
6958 \end_layout
6959
6960 \begin_layout Subsection
6961 The header block
6962 \end_layout
6963
6964 \begin_layout Standard
6965 First thing to enter is the header information.
6966  It consists of seven entries, of which some are optional.
6967  They are
6968 \end_layout
6969
6970 \begin_layout Itemize
6971
6972 \family sans
6973 Title
6974 \family default
6975 : [required] 
6976 \end_layout
6977
6978 \begin_layout Itemize
6979
6980 \family sans
6981 Subtitle
6982 \family default
6983 : [optional] 
6984 \end_layout
6985
6986 \begin_layout Itemize
6987
6988 \family sans
6989 Author
6990 \family default
6991 : [required]
6992 \end_layout
6993
6994 \begin_layout Itemize
6995
6996 \family sans
6997 Address
6998 \family default
6999 : [required]
7000 \end_layout
7001
7002 \begin_layout Itemize
7003
7004 \family sans
7005 Offprints
7006 \family default
7007 : [optional] if more than one author: whom to contact for offprint requests.
7008 \end_layout
7009
7010 \begin_layout Itemize
7011
7012 \family sans
7013 Mail
7014 \family default
7015 : [optional] mail address for contacts.
7016 \end_layout
7017
7018 \begin_layout Itemize
7019
7020 \family sans
7021 Date
7022 \family default
7023 : [required].
7024  Suggested format is 
7025 \family typewriter
7026 Received: <date>; Accepted <date> 
7027 \end_layout
7028
7029 \begin_layout Standard
7030 There is no need to issue the 
7031 \family typewriter
7032
7033 \backslash
7034 maketitle
7035 \family default
7036  command, this is done automatically by LyX when the header is finished.
7037  Although the order of the single header entries doesn't matter it is advised
7038  to keep the above sequence, just to get the best optics and meets the layout
7039  of the real document.
7040 \end_layout
7041
7042 \begin_layout Standard
7043 If you want to place footnotes in the header block, e.
7044 \begin_inset space \thinspace{}
7045 \end_inset
7046
7047 g.
7048 \begin_inset space \space{}
7049 \end_inset
7050
7051 to state your present address, just use the standard footnote via the menu
7052  
7053 \family sans
7054 Insert\SpecialChar \menuseparator
7055 Footnote.
7056
7057 \family default
7058  LyX will automagically use the term 
7059 \family typewriter
7060
7061 \backslash
7062 thanks{}
7063 \family default
7064  in that case.
7065 \end_layout
7066
7067 \begin_layout Standard
7068 In addition to these topics, the macros use three additional LaTeX commands
7069  that have no counterpart in LyX:
7070 \end_layout
7071
7072 \begin_layout Itemize
7073
7074 \family typewriter
7075
7076 \backslash
7077 and
7078 \family default
7079  to separate different names for more than one author and institute, respectivel
7080 y.
7081 \end_layout
7082
7083 \begin_layout Itemize
7084
7085 \family typewriter
7086
7087 \backslash
7088 inst{<nr>}
7089 \family default
7090 to mark corresponding author/institute pairs.
7091  The institutes are numbered sequentially as they appear in the 
7092 \family sans
7093 Address
7094 \family default
7095  field, so you have to put a marker to each author.
7096 \end_layout
7097
7098 \begin_layout Itemize
7099
7100 \family typewriter
7101
7102 \backslash
7103 email{address}
7104 \family default
7105  to supply an email address for fast contact.
7106 \end_layout
7107
7108 \begin_layout Standard
7109 In all cases, the appropriate command has to be entered in LyX and marked
7110  as LaTeX code.
7111  See the examples.
7112  
7113 \end_layout
7114
7115 \begin_layout Subsection
7116 The abstract
7117 \end_layout
7118
7119 \begin_layout Standard
7120 The abstract should immediately follow the header block.
7121  With version 5 the abstract environment was changed to a command, and there
7122  is now a resctriction to only one paragraph.
7123  In addition, it should contain an entry with the keywords.
7124  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7125  command 
7126 \family typewriter
7127
7128 \backslash
7129 keywords{}
7130 \family default
7131  by hand and mark it as LaTeX code.
7132  Refer to the example paper.
7133 \end_layout
7134
7135 \begin_layout Subsection
7136 Supported environments
7137 \end_layout
7138
7139 \begin_layout Standard
7140 The A&A paper layout supports the following environments for structuring
7141  your text:
7142 \end_layout
7143
7144 \begin_layout Itemize
7145
7146 \family sans
7147 Standard
7148 \end_layout
7149
7150 \begin_layout Itemize
7151
7152 \family sans
7153 Section
7154 \end_layout
7155
7156 \begin_layout Itemize
7157
7158 \family sans
7159 Subsection
7160 \end_layout
7161
7162 \begin_layout Itemize
7163
7164 \family sans
7165 Subsubsection
7166 \end_layout
7167
7168 \begin_layout Itemize
7169
7170 \family sans
7171 Itemize
7172 \end_layout
7173
7174 \begin_layout Itemize
7175
7176 \family sans
7177 Enumerate
7178 \end_layout
7179
7180 \begin_layout Itemize
7181
7182 \family sans
7183 Description
7184 \end_layout
7185
7186 \begin_layout Itemize
7187
7188 \family sans
7189 Caption
7190 \end_layout
7191
7192 \begin_layout Itemize
7193
7194 \family sans
7195 Abstract
7196 \end_layout
7197
7198 \begin_layout Itemize
7199
7200 \family sans
7201 Acknowledgment
7202 \end_layout
7203
7204 \begin_layout Itemize
7205
7206 \family sans
7207 Bibliography
7208 \end_layout
7209
7210 \begin_layout Itemize
7211
7212 \family sans
7213 LaTeX
7214 \end_layout
7215
7216 \begin_layout Subsection
7217 Commands not supported by LyX
7218 \end_layout
7219
7220 \begin_layout Standard
7221 Some commands are not yet supported by the 
7222 \family sans
7223 paper (A&A)
7224 \family default
7225  layout for LyX.
7226  Some have already been mentioned.
7227  For the sake of completeness, they are listed all together here:
7228 \end_layout
7229
7230 \begin_layout Itemize
7231
7232 \family typewriter
7233
7234 \backslash
7235 and
7236 \end_layout
7237
7238 \begin_layout Itemize
7239
7240 \family typewriter
7241
7242 \backslash
7243 email
7244 \end_layout
7245
7246 \begin_layout Itemize
7247
7248 \family typewriter
7249
7250 \backslash
7251 appendix
7252 \end_layout
7253
7254 \begin_layout Itemize
7255
7256 \family typewriter
7257
7258 \backslash
7259 authorrunning
7260 \end_layout
7261
7262 \begin_layout Itemize
7263
7264 \family typewriter
7265
7266 \backslash
7267 inst{}
7268 \end_layout
7269
7270 \begin_layout Itemize
7271
7272 \family typewriter
7273
7274 \backslash
7275 keywords{}
7276 \end_layout
7277
7278 \begin_layout Itemize
7279
7280 \family typewriter
7281
7282 \backslash
7283 object{}
7284 \end_layout
7285
7286 \begin_layout Itemize
7287
7288 \family typewriter
7289
7290 \backslash
7291 titlerunning{}
7292 \end_layout
7293
7294 \begin_layout Standard
7295 If you want to use any of these commands, you have to enter them yourself.
7296  
7297 \series bold
7298 Do not forget to mark them as LaTeX code!
7299 \end_layout
7300
7301 \begin_layout Subsection
7302 Figure and Table Floats
7303 \end_layout
7304
7305 \begin_layout Standard
7306 LyX provides support for the necessary float environments 
7307 \family sans
7308 figure, figure*, table
7309 \family default
7310  and 
7311 \family sans
7312 table*
7313 \family default
7314 , therefore we won't tell much about it here.
7315  Refer to the 
7316 \emph on
7317 User's
7318 \begin_inset space ~
7319 \end_inset
7320
7321 Guide
7322 \emph default
7323 .
7324  Just remember that tables should be left-aligned.
7325  For that, select the table and change the alignment in 
7326 \family sans
7327 Edit\SpecialChar \menuseparator
7328 Paragraph
7329 \begin_inset space ~
7330 \end_inset
7331
7332 Settings.
7333 \end_layout
7334
7335 \begin_layout Standard
7336 There is only one special thing: the figures with caption besides the figure.
7337  To create such a figure, you have to do the following:
7338 \end_layout
7339
7340 \begin_layout Enumerate
7341 Create a wide figure float: 
7342 \family sans
7343 Insert\SpecialChar \menuseparator
7344 Float\SpecialChar \menuseparator
7345 Figure
7346 \family default
7347 , then right click in the figure and select 
7348 \family sans
7349 \bar under
7350 S
7351 \bar default
7352 pan
7353 \begin_inset space ~
7354 \end_inset
7355
7356 columns
7357 \family default
7358 .
7359 \end_layout
7360
7361 \begin_layout Enumerate
7362 Enter your caption text.
7363 \end_layout
7364
7365 \begin_layout Enumerate
7366 Press 
7367 \family sans
7368 Return
7369 \family default
7370  to move the cursor above the caption.
7371 \end_layout
7372
7373 \begin_layout Enumerate
7374 Insert your figure
7375 \end_layout
7376
7377 \begin_layout Enumerate
7378 Position the cursor behind the figure and insert a horizontal fill: 
7379 \family sans
7380 Insert\SpecialChar \menuseparator
7381 Special
7382 \begin_inset space ~
7383 \end_inset
7384
7385 Character\SpecialChar \menuseparator
7386 Horizontal
7387 \begin_inset space ~
7388 \end_inset
7389
7390 Fill
7391 \family default
7392 .
7393 \end_layout
7394
7395 \begin_layout Enumerate
7396 Switch to LaTeX mode: 
7397 \family sans
7398 M-c
7399 \begin_inset space ~
7400 \end_inset
7401
7402 t
7403 \family default
7404 .
7405 \end_layout
7406
7407 \begin_layout Enumerate
7408 Enter 
7409 \family typewriter
7410
7411 \backslash
7412 parbox[b]{55mm}{
7413 \family default
7414 .
7415  
7416 \series bold
7417 Do not close the brace!
7418 \end_layout
7419
7420 \begin_layout Enumerate
7421 Position the cursor behind the caption text, switch to LaTeX mode and insert
7422  the closing brace: 
7423 \family sans
7424 M-c
7425 \begin_inset space ~
7426 \end_inset
7427
7428 t
7429 \family default
7430  
7431 \family typewriter
7432 }
7433 \family default
7434 .
7435 \end_layout
7436
7437 \begin_layout Standard
7438 Also, refer to the figures in the example paper.
7439 \end_layout
7440
7441 \begin_layout Subsection
7442 Referee layout
7443 \end_layout
7444
7445 \begin_layout Standard
7446 For submission, the paper has to be formated in a special double-spacing
7447  layout.
7448  For this purpose, you have to give the option 
7449 \family typewriter
7450 referee
7451 \family default
7452  to the documentclass.
7453  This must be done using the extra class options field in the 
7454 \family sans
7455 Document\SpecialChar \menuseparator
7456 Settings
7457 \family default
7458  dialog.
7459  Just enter the string 
7460 \family typewriter
7461 referee
7462 \family default
7463  there.
7464 \end_layout
7465
7466 \begin_layout Subsection
7467 The example paper
7468 \end_layout
7469
7470 \begin_layout Standard
7471 The 
7472 \family sans
7473 Examples
7474 \family default
7475  directory contains an example paper written with LyX.
7476  It is the example paper from the original macro package, translated to
7477  LyX.
7478  Use it for inspiration, and compare the original LaTeX code with LyX way
7479  of writing.
7480 \end_layout
7481
7482 \begin_layout Section
7483 AASTeX
7484 \end_layout
7485
7486 \begin_layout Standard
7487 by 
7488 \noun on
7489 Mike Ressler
7490 \end_layout
7491
7492 \begin_layout Subsection
7493 Introduction
7494 \end_layout
7495
7496 \begin_layout Standard
7497 AASTeX is a set of macros produced by the American Astronomical Society
7498  to facilitate electronic manuscript submission to the three journals they
7499  publish: the Astrophysical Journal (including the Letters and Supplement),
7500  the Astronomical Journal, and the Publications of the Astronomical Society
7501  of the Pacific.
7502  LyX has proven to be an excellent tool for generating these documents,
7503  especially given its equation, citation, and figure handling capabilities.
7504  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7505  is the version described here, or higher.
7506  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7507  incompatible with LyX.
7508  The AASTeX package may be downloaded from the AASTeX Web site
7509 \end_layout
7510
7511 \begin_layout Standard
7512 \begin_inset VSpace medskip
7513 \end_inset
7514
7515
7516 \end_layout
7517
7518 \begin_layout Standard
7519 \align center
7520 \begin_inset Flex URL
7521 status collapsed
7522
7523 \begin_layout Plain Layout
7524
7525 http://www.journals.uchicago.edu/AAS/AASTeX
7526 \end_layout
7527
7528 \end_inset
7529
7530
7531 \end_layout
7532
7533 \begin_layout Standard
7534 \begin_inset VSpace medskip
7535 \end_inset
7536
7537
7538 \end_layout
7539
7540 \begin_layout Standard
7541 A complete user guide is contained in that package and you should familiarize
7542  yourself with it thoroughly before embarking on writing a paper in LyX.
7543  LyX will not reduce the need to figure out all the AASTeX commands, it
7544  will only reduce the drudgery of typing everything in.
7545  It is your responsibility to ensure that the final exported LaTeX document
7546  conforms completely to the requirements of the journal to which you are
7547  submitting your paper.
7548 \end_layout
7549
7550 \begin_layout Subsection
7551 Starting a New Paper
7552 \end_layout
7553
7554 \begin_layout Standard
7555 I strongly suggest that you start with the AASTeX template file.
7556  Click on 
7557 \family sans
7558 File\SpecialChar \menuseparator
7559 New from
7560 \family default
7561  
7562 \family sans
7563 Template
7564 \family default
7565 , enter the new file name, then choose the 
7566 \family typewriter
7567 aastex.lyx
7568 \family default
7569  template.
7570  This will show the most common fields found in a manuscript.
7571  Simply overwrite the existing text (including the brackets, 
7572 \family typewriter
7573 <>
7574 \family default
7575 ) with the correct information.
7576  Many of the AASTeX commands and environments can be implemented directly
7577  in LyX, but some cannot: most noticeably 
7578 \family typewriter
7579
7580 \backslash
7581 altaffilmark
7582 \family default
7583  and 
7584 \family typewriter
7585
7586 \backslash
7587 altaffiltext
7588 \family default
7589 , which should stick out like a sore thumb if you actually just opened the
7590  template file.
7591  For commands such as these, the LaTeX code must be entered directly and
7592  marked as such.
7593  Such commands are referred to as TeX code, or Evil Red Text.
7594  I tried to minimize the amount of TeX code needed in an AASTeX document,
7595  but there is still a bit more required than any of us would like.
7596 \end_layout
7597
7598 \begin_layout Subsection
7599 Finishing Your Paper
7600 \end_layout
7601
7602 \begin_layout Standard
7603 When the paper is finished to your satisfaction and previews/prints correctly,
7604  there are a few 
7605 \begin_inset Quotes eld
7606 \end_inset
7607
7608 postprocessing
7609 \begin_inset Quotes erd
7610 \end_inset
7611
7612  actions which need to be done before you submit it to the journals.
7613  
7614 \end_layout
7615
7616 \begin_layout Enumerate
7617 Export your paper as a LaTeX file (
7618 \family sans
7619 File\SpecialChar \menuseparator
7620 Export\SpecialChar \menuseparator
7621 LaTeX
7622 \family default
7623 ).
7624  
7625 \end_layout
7626
7627 \begin_layout Enumerate
7628 Edit the resulting 
7629 \family typewriter
7630 .tex
7631 \family default
7632  file with your favorite text editor
7633 \end_layout
7634
7635 \begin_deeper
7636 \begin_layout Enumerate
7637 remove the comment lines before the 
7638 \family typewriter
7639
7640 \backslash
7641 documentclass
7642 \family default
7643  command
7644 \end_layout
7645
7646 \begin_layout Enumerate
7647 remove the 
7648 \family typewriter
7649
7650 \backslash
7651 usepackage...{fontenc}
7652 \family default
7653  line if it appears (usually just after 
7654 \family typewriter
7655
7656 \backslash
7657 documentclass
7658 \family default
7659 }; also remove the 
7660 \family typewriter
7661
7662 \backslash
7663 secnumdepth
7664 \family default
7665  line if it appears.
7666 \end_layout
7667
7668 \begin_layout Enumerate
7669 remove everything between (and including) the 
7670 \family typewriter
7671
7672 \backslash
7673 makeatletter
7674 \family default
7675  and 
7676 \family typewriter
7677
7678 \backslash
7679 makeatother
7680 \family default
7681  commands, except for any commands you specifically put into the LaTeX preamble
7682  (which should appear immediately after the 
7683 \begin_inset Quotes eld
7684 \end_inset
7685
7686 User specified LaTeX commands
7687 \begin_inset Quotes erd
7688 \end_inset
7689
7690  comment in the 
7691 \family typewriter
7692 .tex
7693 \family default
7694  file).
7695 \end_layout
7696
7697 \end_deeper
7698 \begin_layout Enumerate
7699 Run the resulting file through LaTeX to make sure it still processes correctly.
7700 \end_layout
7701
7702 \begin_layout Enumerate
7703 Reread the journal requirements to make sure your filenames and formats
7704  are correct.
7705 \end_layout
7706
7707 \begin_layout Enumerate
7708 Submit it.
7709 \end_layout
7710
7711 \begin_layout Subsection
7712 Comments On Specific Commands
7713 \end_layout
7714
7715 \begin_layout Standard
7716 I will not describe the detailed usage of the individual AASTeX commands:
7717  the AASTeX User Guide (
7718 \family typewriter
7719 aasguide.tex
7720 \family default
7721 ) gives a good description of each.
7722  Thus it's probably easiest for me to go down the list as found in the guide
7723  and offer comments where necessary.
7724  So let's begin \SpecialChar \ldots{}
7725
7726 \end_layout
7727
7728 \begin_layout Subsubsection
7729 Things that work as expected
7730 \end_layout
7731
7732 \begin_layout Standard
7733 \begin_inset ERT
7734 status open
7735
7736 \begin_layout Plain Layout
7737
7738
7739 \backslash
7740 begin{sloppypar}
7741 \end_layout
7742
7743 \end_inset
7744
7745
7746 \end_layout
7747
7748 \begin_layout Standard
7749 Because they work as you might expect, I simply list them and the section
7750  they are found in: 
7751 \family typewriter
7752
7753 \backslash
7754 documentclass
7755 \family default
7756  (2.1.1), 
7757 \family typewriter
7758
7759 \backslash
7760 begin{document}
7761 \family default
7762  (2.2), 
7763 \family typewriter
7764
7765 \backslash
7766 title
7767 \family default
7768  (2.3), 
7769 \family typewriter
7770
7771 \backslash
7772 author
7773 \family default
7774  (2.3), 
7775 \family typewriter
7776
7777 \backslash
7778 affil
7779 \family default
7780  (2.3), 
7781 \family typewriter
7782
7783 \backslash
7784 abstract
7785 \family default
7786  (2.4), 
7787 \family typewriter
7788
7789 \backslash
7790 keywords
7791 \family default
7792  (2.5), 
7793 \family typewriter
7794
7795 \backslash
7796 section
7797 \family default
7798  (2.7), 
7799 \family typewriter
7800
7801 \backslash
7802 subsection
7803 \family default
7804  (2.7), 
7805 \family typewriter
7806
7807 \backslash
7808 subsubsection
7809 \family default
7810  (2.7), 
7811 \family typewriter
7812
7813 \backslash
7814 paragraph
7815 \family default
7816  (2.7), 
7817 \family typewriter
7818
7819 \backslash
7820 facility
7821 \family default
7822  (2.10), 
7823 \family typewriter
7824
7825 \backslash
7826 begin{displaymath}
7827 \family default
7828  (2.12), 
7829 \family typewriter
7830
7831 \backslash
7832 begin{equation}
7833 \family default
7834  (2.12), 
7835 \family typewriter
7836
7837 \backslash
7838 begin{eqnarray}
7839 \family default
7840  (2.12), 
7841 \family typewriter
7842
7843 \backslash
7844 begin{mathletters}
7845 \family default
7846  (2.12), 
7847 \family typewriter
7848
7849 \backslash
7850 begin{thebibliography}
7851 \family default
7852  (2.13.1), 
7853 \family typewriter
7854
7855 \backslash
7856 bibitem
7857 \family default
7858  (2.13.2), all the cite commands and their variations (2.13.2), the generic
7859  graphicx figure commands (2.14.1), 
7860 \family typewriter
7861
7862 \backslash
7863 begin{table}
7864 \family default
7865  (2.15.4), 
7866 \family typewriter
7867
7868 \backslash
7869 begin{tabular}
7870 \family default
7871  (2.15.4), 
7872 \family typewriter
7873
7874 \backslash
7875 caption
7876 \family default
7877  (2.15.4), 
7878 \family typewriter
7879
7880 \backslash
7881 label
7882 \family default
7883  (2.15.4, amongst other places), 
7884 \family typewriter
7885
7886 \backslash
7887 tablerefs
7888 \family default
7889  (2.15.5), 
7890 \family typewriter
7891
7892 \backslash
7893 tablecomments
7894 \family default
7895  (2.15.5), 
7896 \family typewriter
7897
7898 \backslash
7899 url
7900 \family default
7901  (2.17.4), 
7902 \family typewriter
7903
7904 \backslash
7905 end{document}
7906 \family default
7907  (2.18).
7908 \end_layout
7909
7910 \begin_layout Standard
7911 The following style options also work correctly: 
7912 \family typewriter
7913 longabstract
7914 \family default
7915  (2.4), 
7916 \family typewriter
7917 preprint
7918 \family default
7919  (3.2.1), 
7920 \family typewriter
7921 preprint2
7922 \family default
7923  (3.2.2), 
7924 \family typewriter
7925 eqsecnum
7926 \family default
7927  (3.3), 
7928 \family typewriter
7929 flushrt
7930 \family default
7931  (3.4).
7932  Simply put them in the 
7933 \family sans
7934 Options
7935 \family default
7936  box in 
7937 \family sans
7938 Layout\SpecialChar \menuseparator
7939 Document
7940 \family default
7941 .
7942 \end_layout
7943
7944 \begin_layout Standard
7945 \begin_inset ERT
7946 status open
7947
7948 \begin_layout Plain Layout
7949
7950
7951 \backslash
7952 end{sloppypar}
7953 \end_layout
7954
7955 \end_inset
7956
7957
7958 \end_layout
7959
7960 \begin_layout Subsubsection
7961 Things that work, but require more comment
7962 \end_layout
7963
7964 \begin_layout Standard
7965 The following items work, but require a little more discussion:
7966 \end_layout
7967
7968 \begin_layout Itemize
7969 These items are reserved for use by the journal editors, but you can put
7970  them into the LaTeX preamble if you feel compelled to do so: 
7971 \family typewriter
7972
7973 \backslash
7974 received
7975 \family default
7976
7977 \family typewriter
7978
7979 \backslash
7980 revised
7981 \family default
7982
7983 \family typewriter
7984
7985 \backslash
7986 accepted
7987 \family default
7988
7989 \family typewriter
7990
7991 \backslash
7992 ccc
7993 \family default
7994
7995 \family typewriter
7996
7997 \backslash
7998 cpright
7999 \family default
8000  (all from 2.1.3)
8001 \end_layout
8002
8003 \begin_layout Itemize
8004 These items may be placed in the LaTeX preamble, and are included as blanks
8005  in the template file: 
8006 \family typewriter
8007
8008 \backslash
8009 slugcomment
8010 \family default
8011  (2.1.4), 
8012 \family typewriter
8013
8014 \backslash
8015 shorttitle
8016 \family default
8017  (2.1.5), 
8018 \family typewriter
8019
8020 \backslash
8021 shortauthors
8022 \family default
8023  (2.1.5)
8024 \end_layout
8025
8026 \begin_layout Itemize
8027
8028 \family typewriter
8029
8030 \backslash
8031 email
8032 \family default
8033  (2.3) – can only be used 
8034 \begin_inset Quotes eld
8035 \end_inset
8036
8037 standalone
8038 \begin_inset Quotes erd
8039 \end_inset
8040
8041 , not in the middle of a paragraph.
8042  Use TeX code if you need to embed it.
8043 \end_layout
8044
8045 \begin_layout Itemize
8046
8047 \family typewriter
8048
8049 \backslash
8050 and
8051 \family default
8052  (2.3) – will have extra {} after it.
8053  This should not cause an error.
8054 \end_layout
8055
8056 \begin_layout Itemize
8057
8058 \family typewriter
8059
8060 \backslash
8061 notetoeditor
8062 \family default
8063  (2.6) – can only be used 
8064 \begin_inset Quotes eld
8065 \end_inset
8066
8067 standalone
8068 \begin_inset Quotes erd
8069 \end_inset
8070
8071 , not in the middle of a paragraph.
8072  Use TeX code if you need to embed it.
8073 \end_layout
8074
8075 \begin_layout Itemize
8076
8077 \family typewriter
8078
8079 \backslash
8080 placetable
8081 \family default
8082  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8083  hand
8084 \end_layout
8085
8086 \begin_layout Itemize
8087
8088 \family typewriter
8089
8090 \backslash
8091 placefigure
8092 \family default
8093  (2.8) – same as for 
8094 \family typewriter
8095
8096 \backslash
8097 placetable
8098 \end_layout
8099
8100 \begin_layout Itemize
8101
8102 \family typewriter
8103
8104 \backslash
8105 acknowledgements
8106 \family default
8107  (2.9) – will have extra {} after it.
8108  This should not cause an error.
8109 \end_layout
8110
8111 \begin_layout Itemize
8112
8113 \family typewriter
8114
8115 \backslash
8116 appendix
8117 \family default
8118  (2.11) – will have extra {} after it.
8119  This should not cause an error.
8120 \end_layout
8121
8122 \begin_layout Itemize
8123
8124 \family typewriter
8125
8126 \backslash
8127 figcaption
8128 \family default
8129  (2.14.2) – you can insert an optional filename argument by placing the cursor
8130  at the beginning of the text and selecting 
8131 \family sans
8132 Insert\SpecialChar \menuseparator
8133 Short Title
8134 \family default
8135 .
8136  
8137 \begin_inset Quotes eld
8138 \end_inset
8139
8140 Short Title
8141 \begin_inset Quotes erd
8142 \end_inset
8143
8144  inserts an optional argument of the type needed by 
8145 \family typewriter
8146
8147 \backslash
8148 figcaption
8149 \family default
8150 .
8151  Hopefully it will be renamed someday.
8152 \end_layout
8153
8154 \begin_layout Itemize
8155
8156 \family typewriter
8157
8158 \backslash
8159 objectname
8160 \family default
8161  (2.17.1) – same as 
8162 \family typewriter
8163
8164 \backslash
8165 figcaption
8166 \family default
8167  for the catalog ID optional parameter
8168 \end_layout
8169
8170 \begin_layout Itemize
8171
8172 \family typewriter
8173
8174 \backslash
8175 dataset
8176 \family default
8177  (2.17.1) – same as 
8178 \family typewriter
8179
8180 \backslash
8181 figcaption
8182 \family default
8183  for the catalog ID optional parameter
8184 \end_layout
8185
8186 \begin_layout Subsubsection
8187 Things not implemented, use TeX code
8188 \end_layout
8189
8190 \begin_layout Standard
8191 \begin_inset ERT
8192 status open
8193
8194 \begin_layout Plain Layout
8195
8196
8197 \backslash
8198 begin{sloppypar}
8199 \end_layout
8200
8201 \end_inset
8202
8203
8204 \end_layout
8205
8206 \begin_layout Standard
8207
8208 \family typewriter
8209
8210 \backslash
8211 altaffilmark
8212 \family default
8213  (2.3), 
8214 \family typewriter
8215
8216 \backslash
8217 altaffiltext
8218 \family default
8219  (2.3), 
8220 \family typewriter
8221
8222 \backslash
8223 eqnum
8224 \family default
8225  (2.12), 
8226 \family typewriter
8227
8228 \backslash
8229 setcounter{equation}
8230 \family default
8231  (2.12), Journal name abbreviations (2.13.4), 
8232 \family typewriter
8233
8234 \backslash
8235 figurenum
8236 \family default
8237  (2.14.1), 
8238 \family typewriter
8239
8240 \backslash
8241 epsscale
8242 \family default
8243  (2.14.1), 
8244 \family typewriter
8245
8246 \backslash
8247 plotone
8248 \family default
8249  (2.14.1), 
8250 \family typewriter
8251
8252 \backslash
8253 plottwo
8254 \family default
8255  (2.14.1), 
8256 \family typewriter
8257
8258 \backslash
8259 tablenum
8260 \family default
8261  (2.15.4), 
8262 \family typewriter
8263
8264 \backslash
8265 tableline
8266 \family default
8267  (2.15.4, insert it as the first element in the lefthand cell after where
8268  you want it.
8269  Don't use any of LyX's rules in the table), 
8270 \family typewriter
8271
8272 \backslash
8273 tablenotemark
8274 \family default
8275  (2.15.5), 
8276 \family typewriter
8277
8278 \backslash
8279 tablenotetext
8280 \family default
8281  (2.15.5), much of Misc (2.17, except 
8282 \family typewriter
8283
8284 \backslash
8285 objectname
8286 \family default
8287
8288 \family typewriter
8289
8290 \backslash
8291 dataset
8292 \family default
8293
8294 \family typewriter
8295
8296 \backslash
8297 url
8298 \family default
8299 , and 
8300 \family typewriter
8301
8302 \backslash
8303 email
8304 \family default
8305 ; see above), 
8306 \family typewriter
8307
8308 \backslash
8309 singlespace
8310 \family default
8311  (3.1), 
8312 \family typewriter
8313
8314 \backslash
8315 doublespace
8316 \family default
8317  (3.1), 
8318 \family typewriter
8319
8320 \backslash
8321 onecolumn
8322 \family default
8323  (3.2), 
8324 \family typewriter
8325
8326 \backslash
8327 twocolumn
8328 \family default
8329  (3.2)
8330 \end_layout
8331
8332 \begin_layout Standard
8333 \begin_inset ERT
8334 status open
8335
8336 \begin_layout Plain Layout
8337
8338
8339 \backslash
8340 end{sloppypar}
8341 \end_layout
8342
8343 \end_inset
8344
8345
8346 \end_layout
8347
8348 \begin_layout Subsubsection
8349 Things that cannot be implemented
8350 \end_layout
8351
8352 \begin_layout Standard
8353 \SpecialChar \ldots{}
8354  at least in any meaningful sort of way, so I suggest ignoring them.
8355  They are the references environment (2.13.3), and the deluxetable environment
8356  (2.15).
8357  If you really, really need to use deluxetable, I suggest editing it in
8358  a separate file with a text editor, then using 
8359 \family sans
8360 Insert\SpecialChar \menuseparator
8361 Child
8362 \begin_inset space ~
8363 \end_inset
8364
8365 Document
8366 \family default
8367  to include it in your LyX document.
8368  See the 
8369 \family typewriter
8370 aas_sample.lyx
8371 \family default
8372  file to see an example of this.
8373 \end_layout
8374
8375 \begin_layout Subsection
8376 FAQs, Tips, Tricks, and Other Ruminations
8377 \end_layout
8378
8379 \begin_layout Subsubsection
8380 Getting LyX and AASTeX to cooperate
8381 \end_layout
8382
8383 \begin_layout Standard
8384 It can be a bit tricky to get LyX to recognize a new layout and document
8385  class.
8386  When all else fails, do this:
8387 \end_layout
8388
8389 \begin_layout Enumerate
8390 Make certain that LaTeX can find AASTeX.
8391  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8392  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8393 \family typewriter
8394 sample.tex
8395 \family default
8396 .
8397 \end_layout
8398
8399 \begin_layout Enumerate
8400 Make certain that 
8401 \family typewriter
8402 aastex.layout
8403 \family default
8404  appears in LyX's 
8405 \family typewriter
8406 layouts
8407 \family default
8408  folder
8409 \end_layout
8410
8411 \begin_layout Enumerate
8412 Rerun 
8413 \family sans
8414 Tools\SpecialChar \menuseparator
8415 Reconfigure
8416 \family default
8417  in LyX, then restart LyX.
8418 \end_layout
8419
8420 \begin_layout Enumerate
8421 Open a regular new file, not from a template.
8422  Does AASTeX appear in the class list in 
8423 \family sans
8424 Document\SpecialChar \menuseparator
8425 Settings
8426 \family default
8427 ?
8428 \end_layout
8429
8430 \begin_layout Standard
8431 If you get a warning from an existing AASTeX document about not being able
8432  to find the AASTeX layout or a message about 
8433 \begin_inset Quotes eld
8434 \end_inset
8435
8436 You should not mix title layouts with normal ones
8437 \begin_inset Quotes erd
8438 \end_inset
8439
8440 , things haven't been installed correctly.
8441 \end_layout
8442
8443 \begin_layout Subsubsection
8444 LaTeX error processing a table 
8445 \end_layout
8446
8447 \begin_layout Standard
8448 LyX, by default, attempts to center the table caption/title.
8449  This seems to produce a bad interaction in AASTeX so you should click somewhere
8450  in the caption/title, then select 
8451 \family sans
8452 Edit\SpecialChar \menuseparator
8453 Paragraph
8454 \begin_inset space ~
8455 \end_inset
8456
8457 Settings
8458 \family default
8459 , then set the 
8460 \family sans
8461 Alignment
8462 \family default
8463  to 
8464 \family sans
8465 Block
8466 \family default
8467 .
8468  This took care of it for me.
8469 \end_layout
8470
8471 \begin_layout Subsubsection
8472 References
8473 \end_layout
8474
8475 \begin_layout Standard
8476 A couple of things: 1) I have noticed some funny spacing in the reference
8477  entries in the text.
8478  When you enter the bibliography item data, make sure their is 
8479 \emph on
8480 no
8481 \emph default
8482  space between the last author and the parenthesis setting off the year;
8483  
8484 \emph on
8485 e.
8486 \begin_inset space \thinspace{}
8487 \end_inset
8488
8489 g.
8490 \begin_inset space \space{}
8491 \end_inset
8492
8493
8494 \emph default
8495 type 
8496 \family typewriter
8497 Ressler(1992)
8498 \family default
8499 , not 
8500 \family typewriter
8501 Ressler (1992)
8502 \family default
8503 .
8504  2) Entering the references at all is not obvious.
8505  The easiest thing is to start typing your first reference at the end of
8506  the document, then mark it as type 
8507 \family sans
8508 References
8509 \family default
8510 .
8511  That will put a small gray box in front of what you just typed.
8512  Click on the box to fill in the rest of the information.
8513  For new references, go to the end of an existing reference and press return.
8514  That will create a new line with its own box, etc.
8515 \end_layout
8516
8517 \begin_layout Subsubsection
8518 Including EPS files
8519 \end_layout
8520
8521 \begin_layout Standard
8522 Even though AASTeX provides its own figure commands (
8523 \family typewriter
8524
8525 \backslash
8526 plotone
8527 \family default
8528 , for example), I much prefer LaTeX's standard figure commands (with the
8529  default graphicx).
8530  You can insert the 
8531 \family typewriter
8532
8533 \backslash
8534 plotone
8535 \family default
8536 , etc.
8537 \begin_inset space ~
8538 \end_inset
8539
8540 commands as TeX code into a Figure Float box if you desire, but I never
8541  have much luck getting the layout right.
8542  With the standard graphics, LyX will insert a 
8543 \family typewriter
8544
8545 \backslash
8546 usepackage{graphicx}
8547 \family default
8548  command into the LaTeX preamble and handle the figures in the standard
8549  LaTeX2e way, interspersing the figures in the text.
8550  I believe ApJ accepts figures exactly this way now; AJ might still use
8551  the 
8552 \begin_inset Quotes eld
8553 \end_inset
8554
8555 stack everything at the end
8556 \begin_inset Quotes erd
8557 \end_inset
8558
8559  technique.
8560 \end_layout
8561
8562 \begin_layout Subsubsection
8563 Things I could have done, but didn't
8564 \end_layout
8565
8566 \begin_layout Standard
8567 There are a few 
8568 \begin_inset Quotes eld
8569 \end_inset
8570
8571 pretty
8572 \begin_inset Quotes erd
8573 \end_inset
8574
8575  things I could have implemented, but chose not to.
8576  For instance, I saw no point in double-spacing the text in the LyX window,
8577  even though it is double-spaced in the paper manuscript.
8578  Also, I chose not to make separate layouts for the preprint and preprint2
8579  styles.
8580  Since I assume you will spend most of your time in the plain manuscript
8581  mode anyway, I decided not to chew up more disk space with this.
8582  
8583 \end_layout
8584
8585 \begin_layout Subsection
8586 Final Caveat
8587 \end_layout
8588
8589 \begin_layout Standard
8590 Your mileage may vary.
8591  I've now had papers published by both ApJ and AJ that have had 98% of the
8592  effort done in LyX; the last 2% was the LaTeX post-processing and a few
8593  cleanups.
8594  I have had no trouble with the submission process, and I'm sure the journals
8595  were never aware that there might be a difference.
8596  So, go forth and publish!
8597 \end_layout
8598
8599 \begin_layout Section
8600 AMS LaTeX
8601 \end_layout
8602
8603 \begin_layout Standard
8604 by 
8605 \noun on
8606 David Johnson; updated by Richard Heck
8607 \end_layout
8608
8609 \begin_layout Standard
8610 \begin_inset VSpace bigskip
8611 \end_inset
8612
8613
8614 \end_layout
8615
8616 \begin_layout Standard
8617 \noindent
8618 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8619  papers to be submitted to American Mathematical Society publications.
8620  The layouts are not tailored to a specific journal, but easily can be.
8621  You should refer to the AMS documentation for specific instructions for
8622  each journal (usually it will entail only changing a single line in the
8623  TeX output).
8624  That documentation is available on the Web at 
8625 \begin_inset Flex URL
8626 status open
8627
8628 \begin_layout Plain Layout
8629
8630 http://www.ams.org
8631 \end_layout
8632
8633 \end_inset
8634
8635  or by ftp at 
8636 \begin_inset Flex URL
8637 status open
8638
8639 \begin_layout Plain Layout
8640
8641 ftp://ftp.ams.org/pub/tex/amslatex/
8642 \end_layout
8643
8644 \end_inset
8645
8646 .
8647  These layouts are appropriate, and useful, for any mathematical writing.
8648  
8649 \end_layout
8650
8651 \begin_layout Standard
8652 There are two basic AMS LaTeX layouts: 
8653 \end_layout
8654
8655 \begin_layout Itemize
8656 amsart: The standard AMS article format.
8657 \end_layout
8658
8659 \begin_layout Itemize
8660 amsbook: the standard AMS book (really, monograph) format.
8661  
8662 \end_layout
8663
8664 \begin_layout Standard
8665 The layouts themselves contain only the minimum necessary to use the AMS
8666  classes.
8667  They do not, in particular, contain any of the `theorem' environments used
8668  for setting theorems, lemmas, and the like.
8669  These are contained, instead, in the 
8670 \begin_inset Flex Code
8671 status collapsed
8672
8673 \begin_layout Plain Layout
8674 Theorems (AMS)
8675 \end_layout
8676
8677 \end_inset
8678
8679  module, which is loaded by default when when you select one of the AMS
8680  classes.
8681  (It can also be used with other classes and can be removed, if you would
8682  rather use something else.) Less commonly used environments are in the 
8683 \begin_inset Flex Code
8684 status collapsed
8685
8686 \begin_layout Plain Layout
8687 Theorems (AMS-Extended)
8688 \end_layout
8689
8690 \end_inset
8691
8692  module, which must be loaded manually.
8693 \end_layout
8694
8695 \begin_layout Standard
8696 By default, theorems and the like are numbered consecutively throughout
8697  the document, but this may be modified by loading the module 
8698 \begin_inset Flex Code
8699 status collapsed
8700
8701 \begin_layout Plain Layout
8702 Theorems (Order by Section)
8703 \end_layout
8704
8705 \end_inset
8706
8707  or, if you are using 
8708 \begin_inset Flex Code
8709 status collapsed
8710
8711 \begin_layout Plain Layout
8712 book (AMS)
8713 \end_layout
8714
8715 \end_inset
8716
8717 , the module 
8718 \begin_inset Flex Code
8719 status collapsed
8720
8721 \begin_layout Plain Layout
8722 Theorems (Order by Chapter)
8723 \end_layout
8724
8725 \end_inset
8726
8727 .
8728  These will number the results as 
8729 \begin_inset Formula $n.m$
8730 \end_inset
8731
8732 , where the first number refers to the section (or chapter) and the second
8733  refers to the total number of results so far in that section (or chapter).
8734  Many environments are also available unnumbered.
8735  These are indicated by an asterisk at the end.
8736  If you happen to want 
8737 \emph on
8738 only
8739 \emph default
8740  unnumbered results, the module 
8741 \begin_inset Flex Code
8742 status collapsed
8743
8744 \begin_layout Plain Layout
8745 Theorems (Starred)
8746 \end_layout
8747
8748 \end_inset
8749
8750  provides that option.
8751 \end_layout
8752
8753 \begin_layout Standard
8754 Note that these modules do not 
8755 \emph on
8756 have
8757 \emph default
8758  to be used with the AMS classes.
8759  It is perfectly possible to use the 
8760 \begin_inset Flex Code
8761 status collapsed
8762
8763 \begin_layout Plain Layout
8764 Theorems (AMS)
8765 \end_layout
8766
8767 \end_inset
8768
8769  module, and the others mentioned, with other classes, such as 
8770 \begin_inset Flex Code
8771 status collapsed
8772
8773 \begin_layout Plain Layout
8774 article
8775 \end_layout
8776
8777 \end_inset
8778
8779
8780 \begin_inset Flex Code
8781 status collapsed
8782
8783 \begin_layout Plain Layout
8784 report
8785 \end_layout
8786
8787 \end_inset
8788
8789
8790 \begin_inset Flex Code
8791 status collapsed
8792
8793 \begin_layout Plain Layout
8794 book (KOMA-script)
8795 \end_layout
8796
8797 \end_inset
8798
8799 , and so forth.
8800 \end_layout
8801
8802 \begin_layout Subsection
8803 What these layouts provide
8804 \end_layout
8805
8806 \begin_layout Standard
8807 There is a long list of included environments provided by these layouts.
8808  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
8809  variety of `theorem' environments.
8810  However, the AMS recommends the environments that are available in LyX.
8811  
8812 \end_layout
8813
8814 \begin_layout Standard
8815 The following environments—as well as the standard environments, such as
8816  
8817 \begin_inset Flex Noun
8818 status collapsed
8819
8820 \begin_layout Plain Layout
8821 section
8822 \end_layout
8823
8824 \end_inset
8825
8826
8827 \begin_inset Flex Noun
8828 status collapsed
8829
8830 \begin_layout Plain Layout
8831 bibliography
8832 \end_layout
8833
8834 \end_inset
8835
8836
8837 \begin_inset Flex Noun
8838 status collapsed
8839
8840 \begin_layout Plain Layout
8841 title
8842 \end_layout
8843
8844 \end_inset
8845
8846
8847 \begin_inset Flex Noun
8848 status collapsed
8849
8850 \begin_layout Plain Layout
8851 author
8852 \end_layout
8853
8854 \end_inset
8855
8856 , and 
8857 \begin_inset Flex Noun
8858 status collapsed
8859
8860 \begin_layout Plain Layout
8861 date
8862 \end_layout
8863
8864 \end_inset
8865
8866 —are provided by 
8867 \begin_inset Flex Code
8868 status collapsed
8869
8870 \begin_layout Plain Layout
8871 article (AMS)
8872 \end_layout
8873
8874 \end_inset
8875
8876  and 
8877 \begin_inset Flex Code
8878 status collapsed
8879
8880 \begin_layout Plain Layout
8881 book (AMS)
8882 \end_layout
8883
8884 \end_inset
8885
8886 :
8887 \end_layout
8888
8889 \begin_layout Description
8890 Address This should be the author's permanent address.
8891 \end_layout
8892
8893 \begin_layout Description
8894 Current
8895 \begin_inset space ~
8896 \end_inset
8897
8898 Address This should be the author's temporary address at the time of submission,
8899  if different from the Address.
8900 \end_layout
8901
8902 \begin_layout Description
8903 Email Author's e-mail address
8904 \end_layout
8905
8906 \begin_layout Description
8907 URL Author's Web address, if desired.
8908 \end_layout
8909
8910 \begin_layout Description
8911 Keywords Key words or phrases used to identify specific topics discussed
8912  in the paper.
8913 \end_layout
8914
8915 \begin_layout Description
8916 Subjectclass These refer to the AMS Subject Classifications, published and
8917  described in 
8918 \emph on
8919 Mathematical Reviews
8920 \emph default
8921 .
8922  These are also available online at the AMS cites listed above.
8923 \end_layout
8924
8925 \begin_layout Description
8926 Thanks
8927 \end_layout
8928
8929 \begin_layout Description
8930 Dedicatory
8931 \end_layout
8932
8933 \begin_layout Description
8934 Translator
8935 \end_layout
8936
8937 \begin_layout Standard
8938 The following environments are provided by both the 
8939 \begin_inset Flex Code
8940 status collapsed
8941
8942 \begin_layout Plain Layout
8943 Theorems
8944 \end_layout
8945
8946 \end_inset
8947
8948  and 
8949 \begin_inset Flex Code
8950 status collapsed
8951
8952 \begin_layout Plain Layout
8953 Theorems (AMS)
8954 \end_layout
8955
8956 \end_inset
8957
8958  modules, in the latter case in both starred (unnumbered) and unstarred
8959  (numbered) versions.
8960  These same environments are provided only in the starred versions by the
8961  
8962 \begin_inset Flex Code
8963 status collapsed
8964
8965 \begin_layout Plain Layout
8966 Theorems (Starred)
8967 \end_layout
8968
8969 \end_inset
8970
8971  module:
8972 \end_layout
8973
8974 \begin_layout Theorem
8975 This is typically used for the statements of major results.
8976  
8977 \end_layout
8978
8979 \begin_layout Corollary*
8980 This is used for statements which follow fairly directly from previous statement
8981 s.
8982  Again, these can be major results.
8983  
8984 \end_layout
8985
8986 \begin_layout Lemma
8987 These are smaller results needed to prove other statements.
8988 \end_layout
8989
8990 \begin_layout Proposition
8991 These are less major results which (hopefully) add to the general theory
8992  being discussed.
8993 \end_layout
8994
8995 \begin_layout Conjecture
8996 These are statements provided without justification, which the author does
8997  not know how to prove, but which seem to be true (to the author, at least).
8998 \end_layout
8999
9000 \begin_layout Definition*
9001 Guess what this is for.
9002  The font is different for this environment than for the previous ones.
9003  
9004 \end_layout
9005
9006 \begin_layout Example*
9007 Used for examples illustrating proven results.
9008 \end_layout
9009
9010 \begin_layout Problem
9011 It's not really known what this is for.
9012  You should figure it out.
9013 \end_layout
9014
9015 \begin_layout Exercise*
9016 Write a description for this one.
9017 \end_layout
9018
9019 \begin_layout Remark
9020 This environment is also a type of theorem, usually a lesser sort of observation.
9021 \end_layout
9022
9023 \begin_layout Claim*
9024 Often used in the course of giving a proof of a larger result.
9025 \end_layout
9026
9027 \begin_layout Case
9028 Generally, these are used to break up long arguments, using specific instances
9029  of some condition.
9030  
9031 \end_layout
9032
9033 \begin_layout Case
9034 The numbering scheme for cases is on its own, not together with other numbered
9035  statements.
9036  
9037 \end_layout
9038
9039 \begin_layout Proof
9040 At the end of this environment, a QED symbol (usually a square, but it can
9041  vary with different styles) is placed.
9042  If you want to have other environments within this one—for example, Case
9043  environments—and have the QED symbol appear only after them, then the other
9044  environments need to be nested within the proof environment.
9045  See the section 
9046 \emph on
9047 Nesting Environments
9048 \emph default
9049  of the 
9050 \emph on
9051 User's Guide
9052 \emph default
9053  for information on nesting.
9054 \end_layout
9055
9056 \begin_layout Standard
9057 And these environments are provided by 
9058 \begin_inset Flex Code
9059 status collapsed
9060
9061 \begin_layout Plain Layout
9062 Theorems (AMS-Extended)
9063 \end_layout
9064
9065 \end_inset
9066
9067 :
9068 \end_layout
9069
9070 \begin_layout Criterion*
9071 A required condition.
9072 \end_layout
9073
9074 \begin_layout Algorithm*
9075 A general procedure to be used.
9076 \end_layout
9077
9078 \begin_layout Axiom*
9079 This is a property or statement taken as true within the system being discussed.
9080 \end_layout
9081
9082 \begin_layout Condition*
9083 Sometimes used to state a condition assumed within the present context of
9084  discussion.
9085 \end_layout
9086
9087 \begin_layout Note*
9088 Similar to a Remark.
9089 \end_layout
9090
9091 \begin_layout Notation*
9092 Used for the explanation of, yes, notation.
9093 \end_layout
9094
9095 \begin_layout Summary
9096 Do we really need to tell you? 
9097 \end_layout
9098
9099 \begin_layout Acknowledgement*
9100 Acknowledgement.
9101 \end_layout
9102
9103 \begin_layout Conclusion*
9104 Sometimes used at the end of a long train of argument.
9105 \end_layout
9106
9107 \begin_layout Fact
9108 Used in a way similar to Proposition, though perhaps lower on the scale.
9109 \end_layout
9110
9111 \begin_layout Standard
9112 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9113  fonts packages.
9114  They need to be available on your system in order to use these environments.
9115 \end_layout
9116
9117 \begin_layout Section
9118 AGU journals (
9119 \family sans
9120 aguplus
9121 \family default
9122 )
9123 \end_layout
9124
9125 \begin_layout Standard
9126 by 
9127 \shape smallcaps
9128 Martin Vermeer
9129 \end_layout
9130
9131 \begin_layout Subsection
9132 Description
9133 \end_layout
9134
9135 \begin_layout Standard
9136 These are the layout files for some of the journals of the American Geophysical
9137  Society.
9138  It is assumed that you have both the AGU's own class files and AGUplus
9139  installed (everything to be found at
9140 \begin_inset Flex URL
9141 status collapsed
9142
9143 \begin_layout Plain Layout
9144
9145 ftp://ftp.agu.org/journals/latex/journals
9146 \end_layout
9147
9148 \end_inset
9149
9150 ).
9151 \end_layout
9152
9153 \begin_layout Subsection
9154 New styles
9155 \end_layout
9156
9157 \begin_layout Standard
9158 Redefined are 
9159 \family sans
9160 Paragraph
9161 \family default
9162
9163 \family sans
9164 Paragraph*
9165 \family default
9166 .
9167  They are still called this in the LyX GUI, though their LaTeX equivalents
9168  in the AGU classes are 
9169 \family sans
9170 Subsubsubsection
9171 \family default
9172  and 
9173 \family sans
9174 Subsubsubsection*
9175 \family default
9176 .
9177 \end_layout
9178
9179 \begin_layout Standard
9180 Newly defined styles are 
9181 \family sans
9182 Left_Header
9183 \family default
9184
9185 \family sans
9186 Right_Header
9187 \family default
9188
9189 \family sans
9190 Received
9191 \family default
9192
9193 \family sans
9194 Revised
9195 \family default
9196
9197 \family sans
9198 Accepted
9199 \family default
9200
9201 \family sans
9202 CCC
9203 \family default
9204
9205 \family sans
9206 PaperId
9207 \family default
9208
9209 \family sans
9210 AuthorAddr
9211 \family default
9212
9213 \family sans
9214 SlugComment
9215 \family default
9216 .
9217  These are mostly manuscript attributes and defined in the AGU class documentati
9218 on.
9219 \end_layout
9220
9221 \begin_layout Standard
9222 I suspect this is still badly incomplete.
9223 \end_layout
9224
9225 \begin_layout Subsection
9226 New floats
9227 \end_layout
9228
9229 \begin_layout Standard
9230
9231 \family sans
9232 Planotable
9233 \family default
9234  and 
9235 \family sans
9236 Plate
9237 \family default
9238 .
9239  We also have a new 
9240 \family sans
9241 Table_Caption
9242 \family default
9243 .
9244 \end_layout
9245
9246 \begin_layout Subsection
9247 Supported journals
9248 \end_layout
9249
9250 \begin_layout Itemize
9251
9252 \emph on
9253 Journal of Geophysical Research
9254 \emph default
9255
9256 \family typewriter
9257 jgrga.layout
9258 \family default
9259  — Martin Vermeer
9260 \end_layout
9261
9262 \begin_layout Standard
9263 Add your own, it isn't so hard! Look at the 
9264 \family typewriter
9265 jgrga.layout
9266 \family default
9267  example and 
9268 \family typewriter
9269 aguplus.inc
9270 \family default
9271 .
9272 \end_layout
9273
9274 \begin_layout Subsection
9275 Bugs and things to remember
9276 \end_layout
9277
9278 \begin_layout Standard
9279 In order to use the new layouts, you must remember to do the following for
9280  a new document:
9281 \end_layout
9282
9283 \begin_layout Enumerate
9284
9285 \emph on
9286 Turn off babel
9287 \emph default
9288 .
9289  This can be done in the 
9290 \family sans
9291 Layout\SpecialChar \menuseparator
9292 Document
9293 \family default
9294  or 
9295 \family sans
9296 Document\SpecialChar \menuseparator
9297 Settings
9298 \family default
9299  menu item.
9300  (AGU articles are always in English, right? So 
9301 \emph on
9302 don't
9303 \emph default
9304  choose a language.)
9305 \end_layout
9306
9307 \begin_layout Enumerate
9308 Enter 
9309 \family typewriter
9310 jgrga
9311 \family default
9312  into the document's 
9313 \family sans
9314 Extra Options
9315 \family default
9316  field.
9317  (Yes, this is a bug.)
9318 \end_layout
9319
9320 \begin_layout Enumerate
9321 Make sure you use the 
9322 \family typewriter
9323 agu.bst
9324 \family default
9325  bibliography style, by entering 
9326 \family sans
9327 agu
9328 \family default
9329  into the second field of the BibTeX inset.
9330  None of the standard styles will do.
9331 \end_layout
9332
9333 \begin_layout Section
9334 Broadway
9335 \end_layout
9336
9337 \begin_layout Standard
9338 by 
9339 \shape smallcaps
9340 Garst Reese
9341 \end_layout
9342
9343 \begin_layout Subsection
9344 Introduction
9345 \end_layout
9346
9347 \begin_layout Standard
9348 Broadway is for writing plays.
9349  The format is more decorative than Hollywood, and much less standardized.
9350  This format should be suitable for workshops.
9351 \end_layout
9352
9353 \begin_layout Subsection
9354 Special problems
9355 \end_layout
9356
9357 \begin_layout Standard
9358 The same as in Hollywood.
9359 \end_layout
9360
9361 \begin_layout Subsection
9362 Special features
9363 \end_layout
9364
9365 \begin_layout Standard
9366 Insert the 
9367 \family sans
9368 Speaker
9369 \family default
9370  names as labels then cross-reference the label to insert the name.
9371  The cross-reference dialog will show the current cast of characters.
9372 \end_layout
9373
9374 \begin_layout Subsection
9375 Paper size and Margins
9376 \end_layout
9377
9378 \begin_layout Standard
9379 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9380 \end_layout
9381
9382 \begin_layout Subsection
9383 Environments
9384 \end_layout
9385
9386 \begin_layout Standard
9387 The following environments are available.
9388  You can use broadway.bind to get the bind keys shown at the right.
9389 \end_layout
9390
9391 \begin_layout Itemize
9392
9393 \family sans
9394 Standard
9395 \begin_inset Newline newline
9396 \end_inset
9397
9398
9399 \family default
9400 You should not have to use this, but it is here for anything that does not
9401  fit otherwise.
9402 \end_layout
9403
9404 \begin_layout Itemize
9405
9406 \family sans
9407 Narrative
9408 \begin_inset space \hfill{}
9409 \end_inset
9410
9411 M-z n
9412 \begin_inset Newline newline
9413 \end_inset
9414
9415
9416 \family default
9417 Used to describe stage setting and the action.
9418  First use of speaker names in all CAPs.
9419 \end_layout
9420
9421 \begin_layout Itemize
9422
9423 \family sans
9424 ACT
9425 \begin_inset space \hfill{}
9426 \end_inset
9427
9428 M-z a
9429 \begin_inset Newline newline
9430 \end_inset
9431
9432
9433 \family default
9434 Automatically numbered.
9435  On screen it will be arabic, but will print as Roman.
9436 \end_layout
9437
9438 \begin_layout Itemize
9439
9440 \family sans
9441 ACT*
9442 \begin_inset space \hfill{}
9443 \end_inset
9444
9445 M-z S at
9446 \begin_inset Newline newline
9447 \end_inset
9448
9449
9450 \family default
9451 Subtitle for 
9452 \family sans
9453 ACT.
9454
9455 \family default
9456  It is just centered text.
9457 \end_layout
9458
9459 \begin_layout Itemize
9460
9461 \family sans
9462 SCENE
9463 \begin_inset space \hfill{}
9464 \end_inset
9465
9466 M-z S-S
9467 \begin_inset Newline newline
9468 \end_inset
9469
9470
9471 \family default
9472 Not automatically numbered.
9473  You supply the number.
9474  This is because I couldn't figure out how.
9475 \end_layout
9476
9477 \begin_layout Itemize
9478
9479 \family sans
9480 AT_RISE:
9481 \begin_inset space \hfill{}
9482 \end_inset
9483
9484 M-z S-R
9485 \begin_inset Newline newline
9486 \end_inset
9487
9488
9489 \family default
9490 A special case of Narrative to describe the setting and action as the curtain
9491  rises.
9492 \end_layout
9493
9494 \begin_layout Itemize
9495
9496 \family sans
9497 Speaker
9498 \begin_inset space \hfill{}
9499 \end_inset
9500
9501 M-z s
9502 \begin_inset Newline newline
9503 \end_inset
9504
9505
9506 \family default
9507 The speaker's (actor's) title, centered in all CAPS.
9508 \end_layout
9509
9510 \begin_layout Itemize
9511
9512 \family sans
9513 Parenthetical
9514 \begin_inset space \hfill{}
9515 \end_inset
9516
9517 M-z p
9518 \begin_inset Newline newline
9519 \end_inset
9520
9521
9522 \family default
9523 Instructions to the speaker.
9524  The parentheses are automatically inserted.
9525  The ( will appear on screen, but both will be in the printed play.
9526  This environment is only used within 
9527 \family sans
9528 Dialogue
9529 \family default
9530 .
9531 \end_layout
9532
9533 \begin_layout Itemize
9534
9535 \family sans
9536 Dialogue
9537 \begin_inset space \hfill{}
9538 \end_inset
9539
9540 M-z d
9541 \begin_inset Newline newline
9542 \end_inset
9543
9544
9545 \family default
9546 What the Speaker says.
9547 \end_layout
9548
9549 \begin_layout Itemize
9550
9551 \family sans
9552 CURTAIN
9553 \begin_inset space \hfill{}
9554 \end_inset
9555
9556 M-z S-C
9557 \begin_inset Newline newline
9558 \end_inset
9559
9560
9561 \family default
9562 The curtain comes down.
9563 \end_layout
9564
9565 \begin_layout Itemize
9566
9567 \family sans
9568 Title
9569 \begin_inset space \hfill{}
9570 \end_inset
9571
9572 M-z S-T
9573 \end_layout
9574
9575 \begin_layout Itemize
9576
9577 \family sans
9578 Author
9579 \begin_inset space \hfill{}
9580 \end_inset
9581
9582 M-z S-A
9583 \end_layout
9584
9585 \begin_layout Itemize
9586
9587 \family sans
9588 Right_Address
9589 \begin_inset space \hfill{}
9590 \end_inset
9591
9592 M-z r
9593 \end_layout
9594
9595 \begin_layout Standard
9596 Hello there.
9597 \end_layout
9598
9599 \begin_layout Section
9600 Dinbrief
9601 \end_layout
9602
9603 \begin_layout Standard
9604 The document class 
9605 \family sans
9606 dinbrief
9607 \family default
9608  can be used to type letters according to German conventions.
9609  A template file is included in 
9610 \family typewriter
9611 .../lyx/share/templates
9612 \family default
9613  for you to use as a starting point.
9614 \end_layout
9615
9616 \begin_layout Section
9617 EGS journals (
9618 \family sans
9619 egs
9620 \family default
9621 )
9622 \end_layout
9623
9624 \begin_layout Standard
9625 by 
9626 \shape smallcaps
9627 Martin Vermeer
9628 \end_layout
9629
9630 \begin_layout Subsection
9631 Description
9632 \end_layout
9633
9634 \begin_layout Standard
9635 This is the layout file for the European Geophysical Society journals.
9636  The needed 
9637 \family typewriter
9638 egs.cls
9639 \family default
9640  can be downloaded from the web site of the EGS under 
9641 \begin_inset Flex URL
9642 status collapsed
9643
9644 \begin_layout Plain Layout
9645
9646 www.copernicus.org
9647 \end_layout
9648
9649 \end_inset
9650
9651 .
9652 \end_layout
9653
9654 \begin_layout Subsection
9655 New styles
9656 \end_layout
9657
9658 \begin_layout Standard
9659
9660 \family sans
9661 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9662  Accepted
9663 \family default
9664
9665 \family sans
9666 Offsets
9667 \family default
9668 .
9669  The current layout file is unfortunately very unmodular and would benefit
9670  from using the various 
9671 \family typewriter
9672 std*.inc
9673 \family default
9674  file inclusions.
9675 \end_layout
9676
9677 \begin_layout Section
9678 Elsevier Journals
9679 \end_layout
9680
9681 \begin_layout Standard
9682 By 
9683 \noun on
9684 Rod Pinna
9685 \end_layout
9686
9687 \begin_layout Standard
9688 Elsevier Science Publishers B.V.
9689  provides a standard LaTeX document class (
9690 \family typewriter
9691 elsart.cls
9692 \family default
9693 ) for submitting articles to their various journals.
9694  The style file can be downloaded directly from their web site: 
9695 \begin_inset Flex URL
9696 status collapsed
9697
9698 \begin_layout Plain Layout
9699
9700 http://www.elsevier.com/wps/find/authorsview.authors/latex
9701 \end_layout
9702
9703 \end_inset
9704
9705 .
9706  Instructions are supplied along with the class file, which details the
9707  requirements of the publishers.
9708  LyX includes a package that allows for the use of this class, by a layout
9709  and a template file.
9710  Installation of the class file is the same as for any other LaTeX package;
9711  instructions are provided in the Elsevier documentation.
9712 \end_layout
9713
9714 \begin_layout Standard
9715 To make use of 
9716 \family typewriter
9717 elsart.cls
9718 \family default
9719 , a file 
9720 \family typewriter
9721 elsart.layout
9722 \family default
9723  is supplied.
9724  As the Elsevier class file is based mainly on the standard article class,
9725  most of the normal functionality is provided.
9726  The Elsevier class defines a number of mathematical environments, which
9727  are similar to the AMS environments.
9728  These commands are all described in the Elsevier documentation, and are
9729  available in LyX.
9730 \end_layout
9731
9732 \begin_layout Standard
9733 The easiest way to use the Elsevier style is to base documents on the included
9734  template file.
9735  It is best not to use options such as fancy headings or the geometry package,
9736  as elements such as these are defined by Elsevier in their style file.
9737  Ideally, no extra packages except those mentioned in the Elsevier documentation
9738  should be used.
9739  Essentially, Elsevier require as 
9740 \begin_inset Quotes eld
9741 \end_inset
9742
9743 clean
9744 \begin_inset Quotes erd
9745 \end_inset
9746
9747  a LaTeX file as possible, as their intention is to take the supplied file
9748  and replace the class file with one for the particular journal to which
9749  the paper has been submitted.
9750  This also means that not too much time should be spent on the formating
9751  of the document.
9752  When it comes to be published, this will change anyway.
9753  The rest of the usage for this layout is substantially the same as for
9754  the normal article class.
9755  For details of what Elsevier do and don't allow, refer to their documentation.
9756 \end_layout
9757
9758 \begin_layout Section
9759 Foils [aka 
9760 \family sans
9761 FoilTeX
9762 \family default
9763 ]
9764 \begin_inset CommandInset label
9765 LatexCommand label
9766 name "sec:foiltex"
9767
9768 \end_inset
9769
9770
9771 \end_layout
9772
9773 \begin_layout Standard
9774 by 
9775 \noun on
9776 Allan Rae
9777 \end_layout
9778
9779 \begin_layout Subsection
9780 Introduction
9781 \end_layout
9782
9783 \begin_layout Standard
9784 This section describes how to use LyX to make slides for overhead projectors.
9785  There are two document classes that can do this: the default slides class
9786  and the 
9787 \family sans
9788 FoilTeX
9789 \family default
9790  slides class.
9791  This section documents the latter.
9792 \end_layout
9793
9794 \begin_layout Standard
9795 I'm going to say this again, nice and clear, so that there's no misunderstanding
9796 :
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 \align center
9808
9809 \size large
9810 This section documents the class 
9811 \begin_inset Quotes eld
9812 \end_inset
9813
9814
9815 \family sans
9816 slides (FoilTeX)
9817 \family default
9818
9819 \begin_inset Quotes erd
9820 \end_inset
9821
9822  
9823 \emph on
9824 only.
9825 \end_layout
9826
9827 \begin_layout Standard
9828 \begin_inset VSpace bigskip
9829 \end_inset
9830
9831
9832 \end_layout
9833
9834 \begin_layout Standard
9835 If you're looking for the documentation for 
9836 \begin_inset Quotes eld
9837 \end_inset
9838
9839
9840 \family sans
9841 slides (default)
9842 \family default
9843
9844 \begin_inset Quotes erd
9845 \end_inset
9846
9847 , check out section
9848 \begin_inset space ~
9849 \end_inset
9850
9851
9852 \begin_inset CommandInset ref
9853 LatexCommand ref
9854 reference "sec:slitex"
9855
9856 \end_inset
9857
9858 .
9859  If your machine doesn't have the 
9860 \family sans
9861 foils
9862 \family default
9863  class [
9864 \begin_inset Quotes eld
9865 \end_inset
9866
9867
9868 \family sans
9869 slides (FoilTeX)
9870 \family default
9871
9872 \begin_inset Quotes erd
9873 \end_inset
9874
9875 ] installed, you'll probably have to use the default 
9876 \family sans
9877 slides
9878 \family default
9879  class, which isn't quite as good as 
9880 \family sans
9881 foils.
9882 \end_layout
9883
9884 \begin_layout Standard
9885 The 
9886 \family sans
9887 foils
9888 \family default
9889  class is designed for use with version 2.1 of the 
9890 \family sans
9891 foils.cls
9892 \family default
9893  LaTeX class file which is now an integral part of LaTeX2e.
9894 \end_layout
9895
9896 \begin_layout Subsection
9897 Getting Started
9898 \end_layout
9899
9900 \begin_layout Standard
9901 Obviously, to use this document class, you need to select 
9902 \begin_inset Quotes eld
9903 \end_inset
9904
9905
9906 \family sans
9907 slides (FoilTeX)
9908 \family default
9909
9910 \begin_inset Quotes erd
9911 \end_inset
9912
9913  from the 
9914 \family sans
9915 Class
9916 \family default
9917  entry in the 
9918 \family sans
9919 Document
9920 \begin_inset space ~
9921 \end_inset
9922
9923 Layout
9924 \family default
9925  dialog.
9926  There are some settings in the 
9927 \family sans
9928 Document
9929 \begin_inset space ~
9930 \end_inset
9931
9932 Layout
9933 \family default
9934  dialog that you should know about that are specific to this class:
9935 \end_layout
9936
9937 \begin_layout Itemize
9938 Don't change the options 
9939 \family sans
9940 Sides
9941 \family default
9942  and 
9943 \family sans
9944 Columns
9945 \family default
9946  on the 
9947 \family sans
9948 Document
9949 \begin_inset space ~
9950 \end_inset
9951
9952 Layout
9953 \family default
9954  dialog.
9955  They're ignored by the 
9956 \family sans
9957 foils
9958 \family default
9959  class.
9960 \end_layout
9961
9962 \begin_layout Itemize
9963 The default font size is 20
9964 \begin_inset space \thinspace{}
9965 \end_inset
9966
9967 pt with the other options being 17
9968 \begin_inset space \thinspace{}
9969 \end_inset
9970
9971 pt, 25
9972 \begin_inset space \thinspace{}
9973 \end_inset
9974
9975 pt and 30
9976 \begin_inset space \thinspace{}
9977 \end_inset
9978
9979 pt.
9980 \end_layout
9981
9982 \begin_layout Itemize
9983 The default font is 
9984 \family sans
9985 sans
9986 \family default
9987  
9988 \family sans
9989 serif
9990 \family default
9991  but all math equations are still typeset in the usual roman font.
9992 \end_layout
9993
9994 \begin_layout Itemize
9995
9996 \family sans
9997 FoilTeX
9998 \family default
9999  supports A4 and Letter paper sizes as well as a special size for working
10000  with 35
10001 \begin_inset space \thinspace{}
10002 \end_inset
10003
10004 mm slides.
10005  It doesn't support A5, B5, legal or executive paper sizes.
10006 \end_layout
10007
10008 \begin_layout Itemize
10009 Don't bother changing the 
10010 \family sans
10011 Float Placement
10012 \family default
10013  settings because they are ignored anyway.
10014  All floats appear where they are defined in the text.
10015 \end_layout
10016
10017 \begin_layout Itemize
10018 The 
10019 \family sans
10020 Pagestyle
10021 \family default
10022  setting behaves a bit differently for this class.
10023  
10024 \family sans
10025 FoilTeX
10026 \family default
10027  provides extensive footer and header capabilities including a user-defined
10028  logo.
10029  See section
10030 \begin_inset space ~
10031 \end_inset
10032
10033
10034 \begin_inset CommandInset ref
10035 LatexCommand ref
10036 reference "sec:foilfoot"
10037
10038 \end_inset
10039
10040  for more details.
10041  The title page is treated differently to all other pages in the document
10042  and is 
10043 \emph on
10044 always
10045 \emph default
10046  unnumbered and 
10047 \emph on
10048 always
10049 \emph default
10050  has the logo centered at the bottom of the page (if one is defined).
10051  The possible page style choices and what they do are as follows:
10052 \end_layout
10053
10054 \begin_deeper
10055 \begin_layout Labeling
10056 \labelwidthstring MMMMMMM
10057
10058 \family sans
10059 \series bold
10060 empty
10061 \family default
10062 \series default
10063  The final output contains no page numbers, or other headers or footers
10064  (except footnotes of course).
10065  
10066 \end_layout
10067
10068 \begin_layout Labeling
10069 \labelwidthstring MMMMMMM
10070
10071 \family sans
10072 \series bold
10073 plain
10074 \family default
10075 \series default
10076  The final output contains page numbers centered at the bottom of the page.
10077  No other headings or footers (other than footnotes).
10078 \end_layout
10079
10080 \begin_layout Labeling
10081 \labelwidthstring MMMMMMM
10082
10083 \series bold
10084 foilheadings
10085 \series default
10086  Page numbers in lower right corner.
10087  Additional headers and footers are also shown.
10088  This is also the default.
10089 \end_layout
10090
10091 \begin_layout Labeling
10092 \labelwidthstring MMMMMMM
10093
10094 \series bold
10095 fancy
10096 \series default
10097  Gives you access to the 
10098 \family sans
10099 fancyheadings
10100 \family default
10101  package although its use with 
10102 \family sans
10103 FoilTeX
10104 \family default
10105  is discouraged by the writer of the 
10106 \family sans
10107 FoilTeX
10108 \family default
10109  package because of some potential page layout clashes.
10110 \end_layout
10111
10112 \end_deeper
10113 \begin_layout Subsubsection
10114 Extra Options
10115 \end_layout
10116
10117 \begin_layout Standard
10118 The following options may be used in the extra class options in the 
10119 \family sans
10120 Document\SpecialChar \menuseparator
10121 Settings
10122 \family default
10123  dialog.
10124 \end_layout
10125
10126 \begin_layout Labeling
10127 \labelwidthstring MMMMMMx
10128
10129 \series bold
10130 35mmSlide
10131 \series default
10132  This sets up the page layout for 7.33
10133 \begin_inset space \thinspace{}
10134 \end_inset
10135
10136 in by 11
10137 \begin_inset space \thinspace{}
10138 \end_inset
10139
10140 in paper, which is about the same aspect ratio as a 35
10141 \begin_inset space \thinspace{}
10142 \end_inset
10143
10144 mm slide, making it a bit easier to work with this medium.
10145 \end_layout
10146
10147 \begin_layout Labeling
10148 \labelwidthstring MMMMMMx
10149
10150 \series bold
10151 headrule
10152 \series default
10153  Places a rule across the page below the header on every page except the
10154  title page.
10155 \end_layout
10156
10157 \begin_layout Labeling
10158 \labelwidthstring MMMMMMx
10159
10160 \series bold
10161 footrule
10162 \series default
10163  Places a rule across the page above the footer on every page except the
10164  title page.
10165 \end_layout
10166
10167 \begin_layout Labeling
10168 \labelwidthstring MMMMMMx
10169
10170 \series bold
10171 dvips
10172 \series default
10173  This is automatically set each time you create a new 
10174 \family sans
10175 foils
10176 \family default
10177  document.
10178  This option tells 
10179 \family sans
10180 FoilTeX
10181 \family default
10182  to use the dvips driver to rotate those pages that are set as landscape
10183  foils.
10184 \end_layout
10185
10186 \begin_layout Labeling
10187 \labelwidthstring MMMMMMx
10188
10189 \series bold
10190 landscape
10191 \series default
10192  Simply changes the page dimensions to those of a landscape page but doesn't
10193  do any rotation.
10194  Thus if you use this option you need to use an external program to rotate
10195  each page or feed your paper through your printer as landscape.
10196  Note that this option effectively reverses the roles of the 
10197 \family sans
10198 Foilhead
10199 \family default
10200  and 
10201 \family sans
10202 Rotatefoilhead
10203 \family default
10204  environments (don't worry these are described in the next section).
10205 \end_layout
10206
10207 \begin_layout Labeling
10208 \labelwidthstring MMMMMMx
10209
10210 \series bold
10211 leqno
10212 \series default
10213  Equation numbers on the left.
10214 \end_layout
10215
10216 \begin_layout Labeling
10217 \labelwidthstring MMMMMMx
10218
10219 \series bold
10220 fleqn
10221 \series default
10222  Flush-left equations.
10223 \end_layout
10224
10225 \begin_layout Subsection
10226 Supported Environments
10227 \end_layout
10228
10229 \begin_layout Standard
10230 Most of the environments commonly supported in other classes are also supported
10231  by the 
10232 \family sans
10233 foils
10234 \family default
10235  class.
10236  There are several additional environments provided by 
10237 \family sans
10238 FoilTeX
10239 \family default
10240  as well as a couple added by LyX.
10241  The following environments are shared with other classes:
10242 \end_layout
10243
10244 \begin_layout Standard
10245 \begin_inset ERT
10246 status open
10247
10248 \begin_layout Plain Layout
10249
10250
10251 \backslash
10252 begin{multicols}{2}
10253 \end_layout
10254
10255 \end_inset
10256
10257
10258 \end_layout
10259
10260 \begin_layout Itemize
10261
10262 \family sans
10263 Standard
10264 \end_layout
10265
10266 \begin_layout Itemize
10267
10268 \family sans
10269 Itemize
10270 \end_layout
10271
10272 \begin_layout Itemize
10273
10274 \family sans
10275 Enumerate
10276 \end_layout
10277
10278 \begin_layout Itemize
10279
10280 \family sans
10281 Description
10282 \end_layout
10283
10284 \begin_layout Itemize
10285
10286 \family sans
10287 List
10288 \end_layout
10289
10290 \begin_layout Itemize
10291
10292 \family sans
10293 LyX-Code
10294 \end_layout
10295
10296 \begin_layout Itemize
10297
10298 \family sans
10299 Verse
10300 \end_layout
10301
10302 \begin_layout Itemize
10303
10304 \family sans
10305 Quote
10306 \end_layout
10307
10308 \begin_layout Itemize
10309
10310 \family sans
10311 Quotation
10312 \end_layout
10313
10314 \begin_layout Itemize
10315
10316 \family sans
10317 Title
10318 \end_layout
10319
10320 \begin_layout Itemize
10321
10322 \family sans
10323 Author
10324 \end_layout
10325
10326 \begin_layout Itemize
10327
10328 \family sans
10329 Date
10330 \end_layout
10331
10332 \begin_layout Itemize
10333
10334 \family sans
10335 Abstract
10336 \end_layout
10337
10338 \begin_layout Itemize
10339
10340 \family sans
10341 Bibliography
10342 \end_layout
10343
10344 \begin_layout Itemize
10345
10346 \family sans
10347 Address
10348 \end_layout
10349
10350 \begin_layout Itemize
10351
10352 \family sans
10353 RightAddress
10354 \end_layout
10355
10356 \begin_layout Itemize
10357
10358 \family sans
10359 Caption
10360 \end_layout
10361
10362 \begin_layout Itemize
10363
10364 \family sans
10365 Comment
10366 \end_layout
10367
10368 \begin_layout Standard
10369 \begin_inset ERT
10370 status open
10371
10372 \begin_layout Plain Layout
10373
10374
10375 \backslash
10376 end{multicols}
10377 \end_layout
10378
10379 \end_inset
10380
10381
10382 \end_layout
10383
10384 \begin_layout Standard
10385 That is, all the major environments apart from the sectioning environments.
10386  Since foils are essentially self-contained sections, with a title and body,
10387  
10388 \family sans
10389 FoilTeX
10390 \family default
10391  provides specific commands for starting new foils and these are:
10392 \end_layout
10393
10394 \begin_layout Itemize
10395
10396 \family sans
10397 Foilhead
10398 \end_layout
10399
10400 \begin_layout Itemize
10401
10402 \family sans
10403 Rotatefoilhead
10404 \end_layout
10405
10406 \begin_layout Standard
10407 LyX also provides slightly modified versions of these two environments called:
10408 \end_layout
10409
10410 \begin_layout Itemize
10411
10412 \family sans
10413 ShortFoilhead
10414 \end_layout
10415
10416 \begin_layout Itemize
10417
10418 \family sans
10419 ShortRotatefoilhead
10420 \end_layout
10421
10422 \begin_layout Standard
10423 and the differences will be explained in the next section.
10424 \end_layout
10425
10426 \begin_layout Standard
10427 Since foils are often used in presenting ideas or new theorems and such
10428  
10429 \family sans
10430 FoilTeX
10431 \family default
10432  also provides a comprehensive box of goodies for presenting them:
10433 \end_layout
10434
10435 \begin_layout Standard
10436 \begin_inset ERT
10437 status open
10438
10439 \begin_layout Plain Layout
10440
10441
10442 \backslash
10443 begin{multicols}{2}
10444 \end_layout
10445
10446 \end_inset
10447
10448
10449 \end_layout
10450
10451 \begin_layout Itemize
10452
10453 \family sans
10454 Theorem
10455 \end_layout
10456
10457 \begin_layout Itemize
10458
10459 \family sans
10460 Lemma
10461 \end_layout
10462
10463 \begin_layout Itemize
10464
10465 \family sans
10466 Corollary
10467 \end_layout
10468
10469 \begin_layout Itemize
10470
10471 \family sans
10472 Proposition
10473 \end_layout
10474
10475 \begin_layout Itemize
10476
10477 \family sans
10478 Definition
10479 \end_layout
10480
10481 \begin_layout Itemize
10482
10483 \family sans
10484 Proof
10485 \end_layout
10486
10487 \begin_layout Itemize
10488
10489 \family sans
10490 Theorem*
10491 \end_layout
10492
10493 \begin_layout Itemize
10494
10495 \family sans
10496 Lemma*
10497 \end_layout
10498
10499 \begin_layout Itemize
10500
10501 \family sans
10502 Corollary*
10503 \end_layout
10504
10505 \begin_layout Itemize
10506
10507 \family sans
10508 Proposition*
10509 \end_layout
10510
10511 \begin_layout Itemize
10512
10513 \family sans
10514 Definition*
10515 \end_layout
10516
10517 \begin_layout Standard
10518 \begin_inset ERT
10519 status open
10520
10521 \begin_layout Plain Layout
10522
10523
10524 \backslash
10525 end{multicols}
10526 \end_layout
10527
10528 \end_inset
10529
10530
10531 \end_layout
10532
10533 \begin_layout Standard
10534 The starred versions are unnumbered while the unstarred versions are numbered.
10535  There are also two list environments added by LyX and these are:
10536 \end_layout
10537
10538 \begin_layout Itemize
10539
10540 \family sans
10541 TickList
10542 \end_layout
10543
10544 \begin_layout Itemize
10545
10546 \family sans
10547 CrossList
10548 \end_layout
10549
10550 \begin_layout Standard
10551
10552 \family sans
10553 FoilTeX
10554 \family default
10555  provides some powerful header and footer capabilities that are best set
10556  in the preamble although they may be set at any point in a document.
10557  If you want to change these settings in your document the best place to
10558  do so is at the very top of a foil, i.
10559 \begin_inset space \thinspace{}
10560 \end_inset
10561
10562 g.
10563 \emph on
10564
10565 \begin_inset space \space{}
10566 \end_inset
10567
10568
10569 \emph default
10570 straight after the foilhead.
10571 \end_layout
10572
10573 \begin_layout Standard
10574 For this purpose, the following command styles are provided [
10575 \shape smallcaps
10576 Martin Vermeer
10577 \shape default
10578 ]:
10579 \end_layout
10580
10581 \begin_layout Standard
10582 \begin_inset ERT
10583 status open
10584
10585 \begin_layout Plain Layout
10586
10587
10588 \backslash
10589 begin{multicols}{2}
10590 \end_layout
10591
10592 \end_inset
10593
10594
10595 \end_layout
10596
10597 \begin_layout Itemize
10598
10599 \family sans
10600 My
10601 \begin_inset space ~
10602 \end_inset
10603
10604 Logo
10605 \end_layout
10606
10607 \begin_layout Itemize
10608
10609 \family sans
10610 Restriction
10611 \end_layout
10612
10613 \begin_layout Itemize
10614
10615 \family sans
10616 Right
10617 \begin_inset space ~
10618 \end_inset
10619
10620 Footer
10621 \end_layout
10622
10623 \begin_layout Itemize
10624
10625 \family sans
10626 Right
10627 \begin_inset space ~
10628 \end_inset
10629
10630 Header
10631 \end_layout
10632
10633 \begin_layout Itemize
10634
10635 \family sans
10636 Left
10637 \begin_inset space ~
10638 \end_inset
10639
10640 Header
10641 \end_layout
10642
10643 \begin_deeper
10644 \begin_layout Standard
10645 \begin_inset space ~
10646 \end_inset
10647
10648
10649 \end_layout
10650
10651 \end_deeper
10652 \begin_layout Standard
10653 \begin_inset ERT
10654 status open
10655
10656 \begin_layout Plain Layout
10657
10658
10659 \backslash
10660 end{multicols}
10661 \end_layout
10662
10663 \end_inset
10664
10665
10666 \end_layout
10667
10668 \begin_layout Standard
10669 There are also a few commands provided by 
10670 \family sans
10671 FoilTeX
10672 \family default
10673  that aren't directly supported by LyX but I'll tell you what they do and
10674  how to use them in section
10675 \begin_inset space ~
10676 \end_inset
10677
10678
10679 \begin_inset CommandInset ref
10680 LatexCommand ref
10681 reference "sec:unsuppfoils"
10682
10683 \end_inset
10684
10685 .
10686 \end_layout
10687
10688 \begin_layout Subsection
10689 Building a Set of Foils
10690 \end_layout
10691
10692 \begin_layout Standard
10693 This section will give a simple introduction to using the different environments
10694  to build a set of foils.
10695  If you want to see an example set of foils, take a look at the 
10696 \family typewriter
10697 Foils.lyx
10698 \family default
10699  file you find in LyX's 
10700 \family typewriter
10701 examples
10702 \family default
10703  folder.
10704 \end_layout
10705
10706 \begin_layout Subsubsection
10707 Give It a Title Page
10708 \end_layout
10709
10710 \begin_layout Standard
10711 Unlike other classes that provide 
10712 \family sans
10713 Title
10714 \family default
10715
10716 \family sans
10717 Author
10718 \family default
10719
10720 \family sans
10721 Date
10722 \family default
10723  and 
10724 \family sans
10725 Abstract
10726 \family default
10727  environments, 
10728 \family sans
10729 foils
10730 \family default
10731  creates the title on a page of its own.
10732  If you leave out the 
10733 \family sans
10734 Date
10735 \family default
10736  environment LaTeX will substitute the current date (every time you regenerate
10737  the output).
10738 \end_layout
10739
10740 \begin_layout Subsubsection
10741 Start a New Foil
10742 \end_layout
10743
10744 \begin_layout Standard
10745 As I mentioned earlier, there are four ways of starting a new foil.
10746  For portrait foils you should use 
10747 \family sans
10748 Foilhead
10749 \family default
10750  or 
10751 \family sans
10752 ShortFoilhead.
10753
10754 \family default
10755  The difference between these two environments is the amount of space between
10756  the title of the foil (the foilhead) and the body of the foil.
10757 \end_layout
10758
10759 \begin_layout Standard
10760 Landscape foils are generated using the 
10761 \family sans
10762 Rotatefoilhead
10763 \family default
10764  and 
10765 \family sans
10766 ShortRotatefoilhead
10767 \family default
10768  environments.
10769  Again the only difference is the spacing between foilhead and body.
10770  Both of the short versions have 0.5 inches less separation between the foilhead
10771  and the body.
10772  
10773 \end_layout
10774
10775 \begin_layout Standard
10776 One problem with the support for landscape foils is the requirement that
10777  you have to use the 
10778 \family typewriter
10779 dvips
10780 \family default
10781  driver to generate the PostScript output otherwise the foils won't be rotated.
10782  It is possible to get landscape foils even if you haven't got the 
10783 \family typewriter
10784 dvips
10785 \family default
10786  driver provided you can feed your foils sideways through your printer ;-)
10787 \end_layout
10788
10789 \begin_layout Subsubsection
10790 Theorems, Lemmas, Proofs and more
10791 \end_layout
10792
10793 \begin_layout Standard
10794 Due to a small bug in LyX you can't have two of the same type of these environme
10795 nts directly following each other.
10796  They must be separated by something.
10797  If you try, you will just be extending the previous environment as if you
10798  had merged the two environments together.
10799  So, how do you get around this problem? The simplest option is to insert
10800  some text between the two environments or add a 
10801 \family sans
10802 LaTeX
10803 \family default
10804  environment between the two with just a 
10805 \begin_inset Quotes eld
10806 \end_inset
10807
10808
10809 \family typewriter
10810 %
10811 \family default
10812
10813 \begin_inset Quotes erd
10814 \end_inset
10815
10816  in it.
10817  This will force LyX to produce two separate environments and hence the
10818  correct LaTeX output.
10819  An example is provided in the example file included with the LyX distribution.
10820  Remember, this problem only occurs if you are trying to place two of the
10821  same type of theorem-like environments one directly after the other.
10822 \end_layout
10823
10824 \begin_layout Subsubsection
10825 Lists
10826 \end_layout
10827
10828 \begin_layout Standard
10829 You get all the commonly supported list styles found in other classes as
10830  well as two new ones.
10831  I'll only describe the new ones here.
10832  If you want to find out more about the other list environments check out
10833  the 
10834 \emph on
10835 User's Guide.
10836
10837 \emph default
10838  If you intend to use itemized lists you might also want to read about the
10839  
10840 \family sans
10841 Itemize
10842 \begin_inset space ~
10843 \end_inset
10844
10845 Bullet
10846 \begin_inset space ~
10847 \end_inset
10848
10849 Selection
10850 \family default
10851  dialog described above in section
10852 \begin_inset space ~
10853 \end_inset
10854
10855
10856 \begin_inset CommandInset ref
10857 LatexCommand ref
10858 reference "sec:bullet"
10859
10860 \end_inset
10861
10862 .
10863 \end_layout
10864
10865 \begin_layout Standard
10866 The two new list styles, 
10867 \family sans
10868 TickList
10869 \family default
10870  and 
10871 \family sans
10872 CrossList
10873 \family default
10874 , are designed to make it easier for you to create lists of do's and don'ts
10875  or right and wrong by providing dedicated environments that use a tick
10876  or a cross as the label of the list.
10877  These lists are in fact dedicated variants of the 
10878 \family sans
10879 Itemize
10880 \family default
10881  environment.
10882  They do however require that you have the 
10883 \family typewriter
10884 psnfss
10885 \family default
10886  packages installed.
10887 \end_layout
10888
10889 \begin_layout Subsubsection
10890 Figures and Tables
10891 \end_layout
10892
10893 \begin_layout Standard
10894
10895 \family sans
10896 FoilTeX
10897 \family default
10898  redefines the floating tables and figures so that they appear exactly where
10899  they are in the text rather than pushing them to the top of the page or
10900  to some user specified location.
10901  In fact if you change the float placement settings they are simply ignored.
10902 \end_layout
10903
10904 \begin_layout Subsubsection
10905 Page Headers and Footers
10906 \begin_inset CommandInset label
10907 LatexCommand label
10908 name "sec:foilfoot"
10909
10910 \end_inset
10911
10912
10913 \end_layout
10914
10915 \begin_layout Standard
10916
10917 \family sans
10918 My
10919 \begin_inset space ~
10920 \end_inset
10921
10922 Logo
10923 \family default
10924  and 
10925 \family sans
10926 Restriction
10927 \family default
10928  are two commands used to control the left-footer text string.
10929  The first is meant to allow you to include a graphic logo on your foils
10930  and defaults to 
10931 \begin_inset Quotes eld
10932 \end_inset
10933
10934 -Typeset by 
10935 \family sans
10936 FoilTeX
10937 \family default
10938 -
10939 \begin_inset Quotes erd
10940 \end_inset
10941
10942 .
10943  While the second is meant to provide a classification for the audience,
10944  
10945 \emph on
10946 e.
10947 \begin_inset space \thinspace{}
10948 \end_inset
10949
10950 g.
10951 \emph default
10952
10953 \begin_inset space \space{}
10954 \end_inset
10955
10956 Confidential.
10957  It is empty by default.
10958 \end_layout
10959
10960 \begin_layout Standard
10961 The remaining page corners can be filled by 
10962 \family sans
10963 Right
10964 \begin_inset space ~
10965 \end_inset
10966
10967 Footer
10968 \family default
10969  (which defaults to page numbers), 
10970 \family sans
10971 Right
10972 \begin_inset space ~
10973 \end_inset
10974
10975 Header
10976 \family default
10977  (top right) and 
10978 \family sans
10979 Left
10980 \begin_inset space ~
10981 \end_inset
10982
10983 Header
10984 \family default
10985  (top left).
10986 \end_layout
10987
10988 \begin_layout Subsection
10989 Unsupported 
10990 \family sans
10991 FoilTeX
10992 \family default
10993  Goodies
10994 \begin_inset CommandInset label
10995 LatexCommand label
10996 name "sec:unsuppfoils"
10997
10998 \end_inset
10999
11000
11001 \end_layout
11002
11003 \begin_layout Standard
11004 All the commands mentioned below need to be set in a 
11005 \family sans
11006 LaTeX
11007 \family default
11008  environment or as 
11009 \family sans
11010 TeX
11011 \family default
11012  within another environment.
11013 \end_layout
11014
11015 \begin_layout Subsubsection
11016 Lengths
11017 \end_layout
11018
11019 \begin_layout Standard
11020 All lengths are adjusted using the 
11021 \family typewriter
11022
11023 \backslash
11024 setlength{
11025 \family default
11026 \emph on
11027 lengthname
11028 \family typewriter
11029 \emph default
11030 }{
11031 \family default
11032 \emph on
11033 newlength
11034 \family typewriter
11035 \emph default
11036 }
11037 \family default
11038  command.
11039  Where 
11040 \emph on
11041 lengthname
11042 \emph default
11043  should be replaced by the name given to the length you want to change and
11044  
11045 \emph on
11046 newlength
11047 \emph default
11048  is the length value.
11049  All lengths should be specified in units of length such as inches (
11050 \family typewriter
11051 in
11052 \family default
11053 ), millimeters (
11054 \family typewriter
11055 mm
11056 \family default
11057 ) or points (
11058 \family typewriter
11059 pt
11060 \family default
11061 ) or relative to some document or font-based length such as 
11062 \family typewriter
11063
11064 \backslash
11065 textwidth
11066 \family default
11067 .
11068  
11069 \end_layout
11070
11071 \begin_layout Standard
11072 It's possible to change the spacing between a foilhead and the body of the
11073  foil by adjusting the length specified by 
11074 \family typewriter
11075
11076 \backslash
11077 foilheadskip
11078 \family default
11079 .
11080  For example, to make 
11081 \emph on
11082 all
11083 \emph default
11084  foilheads 0.5
11085 \begin_inset space \space{}
11086 \end_inset
11087
11088 in closer to their bodies put the following in the preamble: 
11089 \family typewriter
11090
11091 \backslash
11092 setlength{
11093 \backslash
11094 foilheadskip}{-0.5in}
11095 \end_layout
11096
11097 \begin_layout Standard
11098 The spacings around floats can be adjusted by setting these lengths:
11099 \end_layout
11100
11101 \begin_layout Labeling
11102 \labelwidthstring MMMMMMMMMMM
11103
11104 \family typewriter
11105
11106 \backslash
11107 abovefloatskip
11108 \family default
11109  Separation between the text and the top of the float
11110 \end_layout
11111
11112 \begin_layout Labeling
11113 \labelwidthstring MMMMMMMMMMM
11114
11115 \family typewriter
11116
11117 \backslash
11118 abovecaptionskip
11119 \family default
11120  Separation between the float and the caption
11121 \end_layout
11122
11123 \begin_layout Labeling
11124 \labelwidthstring MMMMMMMMMMM
11125
11126 \family typewriter
11127
11128 \backslash
11129 belowcaptionskip
11130 \family default
11131  Separation between the caption and the following text
11132 \end_layout
11133
11134 \begin_layout Labeling
11135 \labelwidthstring MMMMMMMMMMM
11136
11137 \family typewriter
11138
11139 \backslash
11140 captionwidth
11141 \family default
11142  You can make the captions narrower than the surrounding text by adjusting
11143  this length.
11144  Best done relative to 
11145 \family typewriter
11146
11147 \backslash
11148 textwidth
11149 \family default
11150 .
11151 \end_layout
11152
11153 \begin_layout Standard
11154 There are also several title page related lengths that you may find useful
11155  if you have a long title or several authors:
11156 \end_layout
11157
11158 \begin_layout Labeling
11159 \labelwidthstring MMMMMMMMMMM
11160
11161 \family typewriter
11162
11163 \backslash
11164 abovetitleskip
11165 \family default
11166  Separation from headers to 
11167 \family sans
11168 Title
11169 \end_layout
11170
11171 \begin_layout Labeling
11172 \labelwidthstring MMMMMMMMMMM
11173
11174 \family typewriter
11175
11176 \backslash
11177 titleauthorskip
11178 \family default
11179  between 
11180 \family sans
11181 Title
11182 \family default
11183  and 
11184 \family sans
11185 Author
11186 \family default
11187  environments
11188 \end_layout
11189
11190 \begin_layout Labeling
11191 \labelwidthstring MMMMMMMMMMM
11192
11193 \family typewriter
11194
11195 \backslash
11196 authorauthorskip
11197 \family default
11198  between multiple 
11199 \family sans
11200 Author
11201 \family default
11202  lines
11203 \end_layout
11204
11205 \begin_layout Labeling
11206 \labelwidthstring MMMMMMMMMMM
11207
11208 \family typewriter
11209
11210 \backslash
11211 authordateskip
11212 \family default
11213  between the 
11214 \family sans
11215 Author
11216 \family default
11217  and the 
11218 \family sans
11219 Date
11220 \end_layout
11221
11222 \begin_layout Labeling
11223 \labelwidthstring MMMMMMMMMMM
11224
11225 \family typewriter
11226
11227 \backslash
11228 dateabstractskip
11229 \family default
11230  between the 
11231 \family sans
11232 Date
11233 \family default
11234  and the 
11235 \family sans
11236 Abstract
11237 \end_layout
11238
11239 \begin_layout Standard
11240 The last length related command affects all the list environments.
11241  If you place 
11242 \family typewriter
11243
11244 \backslash
11245 zerolistvertdimens
11246 \family default
11247  
11248 \emph on
11249 inside
11250 \emph default
11251  a list environment then all the vertical spacing between the list items
11252  is removed.
11253  Note that this is a command not a length so it doesn't require 
11254 \family typewriter
11255
11256 \backslash
11257 setlength
11258 \family default
11259  like the stuff mentioned above.
11260 \end_layout
11261
11262 \begin_layout Subsubsection
11263 Headers and Footers
11264 \end_layout
11265
11266 \begin_layout Standard
11267 The 
11268 \family typewriter
11269
11270 \backslash
11271 LogoOn
11272 \family default
11273  and 
11274 \family typewriter
11275
11276 \backslash
11277 LogoOff
11278 \family default
11279  commands control whether the logo in the 
11280 \family sans
11281 MyLogo
11282 \family default
11283  definition appear on a given page.
11284  If you put 
11285 \family typewriter
11286
11287 \backslash
11288 LogoOff
11289 \family default
11290  in the preamble then none of the foils will have the logo on them.
11291  If you don't want the logo on a particular page place the 
11292 \family typewriter
11293
11294 \backslash
11295 LogoOff
11296 \family default
11297  directly after the foilhead of that page and the 
11298 \family typewriter
11299
11300 \backslash
11301 LogoOn
11302 \family default
11303  directly after the next foilhead.
11304 \end_layout
11305
11306 \begin_layout Standard
11307 If you decide to use the 
11308 \family sans
11309 fancy
11310 \family default
11311  page style setting in the 
11312 \family sans
11313 Document
11314 \begin_inset space ~
11315 \end_inset
11316
11317 Layout
11318 \family default
11319  dialog you should probably add 
11320 \family typewriter
11321
11322 \backslash
11323 let
11324 \backslash
11325 headwidth
11326 \backslash
11327 textwidth
11328 \family default
11329  to your preamble so headers and footers on landscape pages are correctly
11330  placed when rotated.
11331  This is due to some clashes between the page layouts provided by the 
11332 \family sans
11333 fancyheadings
11334 \family default
11335  package and the 
11336 \family sans
11337 foils
11338 \family default
11339  class.
11340 \end_layout
11341
11342 \begin_layout Section
11343 Hollywood (Hollywood spec scripts)
11344 \end_layout
11345
11346 \begin_layout Standard
11347 by 
11348 \shape smallcaps
11349 Garst Reese
11350 \end_layout
11351
11352 \begin_layout Subsection
11353 Introduction
11354 \end_layout
11355
11356 \begin_layout Standard
11357 Getting the format of a Hollywood script right is a 
11358 \begin_inset Quotes eld
11359 \end_inset
11360
11361 rite of passage.
11362 \begin_inset Quotes erd
11363 \end_inset
11364
11365  It is designed to make the readers focus on content and to be easy and
11366  familiar for the actors to read.
11367  Each page of a script should be one minute of film.
11368  Nothing goes in a script that you cannot see or hear on screen.
11369  The courier 12 pt font should be used throughout.
11370  No italics.
11371 \end_layout
11372
11373 \begin_layout Subsection
11374 Special problems
11375 \end_layout
11376
11377 \begin_layout Standard
11378 Speakers' lines should NEVER break in mid-sentence.
11379  If a speaker's lines continue over a page break, repeat the 
11380 \family sans
11381 Speaker
11382 \family default
11383  title followed by (Cont'd).
11384 \end_layout
11385
11386 \begin_layout Subsection
11387 Special features
11388 \end_layout
11389
11390 \begin_layout Standard
11391 Insert the 
11392 \family sans
11393 Speaker
11394 \family default
11395  names as labels then cross-reference the label to insert the name.
11396  The cross-reference dialog will show the current cast of characters.
11397  You can use this to insert the speaker name in narratives also.
11398 \end_layout
11399
11400 \begin_layout Subsection
11401 Paper size and Margins
11402 \end_layout
11403
11404 \begin_layout Standard
11405 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11406 \end_layout
11407
11408 \begin_layout Subsection
11409 Environments
11410 \end_layout
11411
11412 \begin_layout Standard
11413 The following environments are available.
11414  You can use hollywood.bind to get the bind keys shown at the right.
11415 \end_layout
11416
11417 \begin_layout Itemize
11418
11419 \family sans
11420 Standard
11421 \begin_inset Newline newline
11422 \end_inset
11423
11424
11425 \family default
11426 Used where nothing else works.
11427  Try to avoid it.
11428 \end_layout
11429
11430 \begin_layout Itemize
11431
11432 \family sans
11433 FADE_IN
11434 \family default
11435 :
11436 \begin_inset space \hfill{}
11437 \end_inset
11438
11439
11440 \family sans
11441 M-z S-I
11442 \family default
11443
11444 \begin_inset Newline newline
11445 \end_inset
11446
11447 Usually followed by something like 
11448 \begin_inset Quotes eld
11449 \end_inset
11450
11451 on Sally waking up.
11452 \begin_inset Quotes erd
11453 \end_inset
11454
11455
11456 \end_layout
11457
11458 \begin_layout Itemize
11459
11460 \family sans
11461 INT:
11462 \begin_inset space \hfill{}
11463 \end_inset
11464
11465 M-z i
11466 \begin_inset Newline newline
11467 \end_inset
11468
11469
11470 \family default
11471 Introduces a new INTERIOR camera set-up.
11472  Always followed by DAY or NIGHT, or something similar to define the lighting
11473  required.
11474  Everthing on this line in CAPS.
11475 \end_layout
11476
11477 \begin_layout Itemize
11478
11479 \family sans
11480 EXT:
11481 \begin_inset space \hfill{}
11482 \end_inset
11483
11484 M-z e
11485 \begin_inset Newline newline
11486 \end_inset
11487
11488
11489 \family default
11490 Introduces a new EXTERIOR camera set-up.
11491  Everthing on this line in CAPS.
11492 \end_layout
11493
11494 \begin_layout Itemize
11495
11496 \family sans
11497 Speaker
11498 \begin_inset space \hfill{}
11499 \end_inset
11500
11501 M-z s
11502 \begin_inset Newline newline
11503 \end_inset
11504
11505
11506 \family default
11507 The character speaking.
11508 \end_layout
11509
11510 \begin_layout Itemize
11511
11512 \family sans
11513 Parenthetical
11514 \begin_inset space \hfill{}
11515 \end_inset
11516
11517 M-z p
11518 \begin_inset Newline newline
11519 \end_inset
11520
11521
11522 \family default
11523 Instructions to the speaker.
11524  The () are automatically inserted, but only the ( will show in LyX.
11525  Both will be printed.
11526 \end_layout
11527
11528 \begin_layout Itemize
11529
11530 \family sans
11531 Dialogue
11532 \begin_inset space \hfill{}
11533 \end_inset
11534
11535 M-z d
11536 \begin_inset Newline newline
11537 \end_inset
11538
11539
11540 \family default
11541 What the 
11542 \family sans
11543 Speaker
11544 \family default
11545  says.
11546 \end_layout
11547
11548 \begin_layout Itemize
11549
11550 \family sans
11551 Transition
11552 \begin_inset space \hfill{}
11553 \end_inset
11554
11555 M-z t
11556 \begin_inset Newline newline
11557 \end_inset
11558
11559
11560 \family default
11561 Camera movement instruction.
11562  e.
11563 \begin_inset space \thinspace{}
11564 \end_inset
11565
11566 g.
11567 \begin_inset space \space{}
11568 \end_inset
11569
11570 CUT TO:
11571 \end_layout
11572
11573 \begin_layout Itemize
11574
11575 \family sans
11576 FADE OUT:
11577 \begin_inset space \hfill{}
11578 \end_inset
11579
11580 M-z S-I
11581 \end_layout
11582
11583 \begin_layout Itemize
11584
11585 \family sans
11586 Author
11587 \begin_inset space \hfill{}
11588 \end_inset
11589
11590 M-z S-A
11591 \end_layout
11592
11593 \begin_layout Itemize
11594
11595 \family sans
11596 Title
11597 \begin_inset space \hfill{}
11598 \end_inset
11599
11600 M-z S-T
11601 \end_layout
11602
11603 \begin_layout Itemize
11604
11605 \family sans
11606 Right_Address
11607 \begin_inset space \hfill{}
11608 \end_inset
11609
11610 M-z r
11611 \end_layout
11612
11613 \begin_layout Subsection
11614 Script jargon
11615 \end_layout
11616
11617 \begin_layout Itemize
11618 (O.S) — off screen
11619 \end_layout
11620
11621 \begin_layout Itemize
11622 (V.0) — voice over
11623 \end_layout
11624
11625 \begin_layout Itemize
11626 b.
11627 \begin_inset space \thinspace{}
11628 \end_inset
11629
11630 g.
11631  — background
11632 \end_layout
11633
11634 \begin_layout Itemize
11635 C.U.
11636  — close-up
11637 \end_layout
11638
11639 \begin_layout Itemize
11640 PAN — camera movement
11641 \end_layout
11642
11643 \begin_layout Itemize
11644 INSERT — cut to close-up of
11645 \end_layout
11646
11647 \begin_layout Section
11648 ijmpc and ijmpd
11649 \end_layout
11650
11651 \begin_layout Standard
11652 by 
11653 \noun on
11654 Panayotis Papasotiriou
11655 \end_layout
11656
11657 \begin_layout Subsection
11658 Overview
11659 \end_layout
11660
11661 \begin_layout Standard
11662 The ijmpc package is a set of macros that facilitates electronic manuscript
11663  submission to the 
11664 \emph on
11665 International Journal of Modern Physics C
11666 \emph default
11667 .
11668  Similarly, the ijmpd package is for creating manuscripts to be submitted
11669  to the 
11670 \emph on
11671 International Journal of Modern Physics D
11672 \emph default
11673 .
11674  Both journals are published by World Scientific.
11675  The corresponding document classes are named 
11676 \family typewriter
11677 ws-ijmpc.cls
11678 \family default
11679  and 
11680 \family typewriter
11681 ws-ijmpd.cls
11682 \family default
11683 , respectively.
11684  These files, together with instructions for the authors, can be downloaded
11685  from the sites 
11686 \begin_inset Flex URL
11687 status collapsed
11688
11689 \begin_layout Plain Layout
11690
11691 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11692 \end_layout
11693
11694 \end_inset
11695
11696  and 
11697 \begin_inset Flex URL
11698 status collapsed
11699
11700 \begin_layout Plain Layout
11701
11702 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11703 \end_layout
11704
11705 \end_inset
11706
11707 .
11708  Both packages are modified versions of the standard 
11709 \begin_inset Quotes eld
11710 \end_inset
11711
11712 article
11713 \begin_inset Quotes erd
11714 \end_inset
11715
11716  package, and they are almost (but not exactly) identical.
11717  Most of their features are supported by LyX.
11718  I have used LyX successfully to write articles submitted to both journals
11719  without any problem.
11720 \end_layout
11721
11722 \begin_layout Subsection
11723 Writing a paper
11724 \end_layout
11725
11726 \begin_layout Standard
11727 As usual, the easiest way to write a paper is to start with a template.
11728  Click on 
11729 \family sans
11730 File\SpecialChar \menuseparator
11731 New from
11732 \family default
11733  
11734 \family sans
11735 \bar under
11736 T
11737 \bar default
11738 emplate
11739 \family default
11740 , then choose the 
11741 \family typewriter
11742 ijmpc.lyx
11743 \family default
11744  or 
11745 \family typewriter
11746 ijmpd.lyx
11747 \family default
11748  template.
11749  This will give an (almost) empty document that includes the most common
11750  fields found in a manuscript.
11751  Simply overwrite the existing text (including the brackets, 
11752 \family typewriter
11753 <>
11754 \family default
11755 ) with your text.
11756  You should keep in mind the following remarks.
11757 \end_layout
11758
11759 \begin_layout Enumerate
11760 LyX won't let you change the font size and the page style of the document,
11761  because such modifications are not allowed by both packages.
11762 \end_layout
11763
11764 \begin_layout Enumerate
11765 The language of the document should not be changed.
11766  Before previewing your paper, be sure that the babel package is not used.
11767  To do this, click on 
11768 \family sans
11769 Tools\SpecialChar \menuseparator
11770 Preferences
11771 \family default
11772 , select the 
11773 \family sans
11774 Lang Opts
11775 \family default
11776  tab, deselect the 
11777 \family sans
11778 Use babel
11779 \family default
11780  checkbox in the language settings, and click on 
11781 \family sans
11782 Apply
11783 \family default
11784  (or 
11785 \family sans
11786 Save
11787 \family default
11788 , if you wish to make this change permanent).
11789 \end_layout
11790
11791 \begin_layout Enumerate
11792 The 
11793 \begin_inset Quotes eld
11794 \end_inset
11795
11796 Keywords
11797 \begin_inset Quotes erd
11798 \end_inset
11799
11800  style must be used to define keywords.
11801 \end_layout
11802
11803 \begin_layout Enumerate
11804 The ijmpc package provides a style named 
11805 \begin_inset Quotes eld
11806 \end_inset
11807
11808 Classification Codes
11809 \begin_inset Quotes erd
11810 \end_inset
11811
11812 , which can be used to define classification codes, such as PACS numbers.
11813  Note that this facility is not supported by the ijmpd package.
11814 \end_layout
11815
11816 \begin_layout Enumerate
11817 Several new environments are available: 
11818 \begin_inset Quotes eld
11819 \end_inset
11820
11821 Definition
11822 \begin_inset Quotes erd
11823 \end_inset
11824
11825
11826 \begin_inset Quotes eld
11827 \end_inset
11828
11829 Step
11830 \begin_inset Quotes erd
11831 \end_inset
11832
11833
11834 \begin_inset Quotes eld
11835 \end_inset
11836
11837 Example
11838 \begin_inset Quotes erd
11839 \end_inset
11840
11841
11842 \begin_inset Quotes eld
11843 \end_inset
11844
11845 Remark
11846 \begin_inset Quotes erd
11847 \end_inset
11848
11849
11850 \begin_inset Quotes eld
11851 \end_inset
11852
11853 Notation
11854 \begin_inset Quotes erd
11855 \end_inset
11856
11857
11858 \begin_inset Quotes eld
11859 \end_inset
11860
11861 Theorem
11862 \begin_inset Quotes erd
11863 \end_inset
11864
11865
11866 \begin_inset Quotes eld
11867 \end_inset
11868
11869 Proof
11870 \begin_inset Quotes erd
11871 \end_inset
11872
11873
11874 \begin_inset Quotes eld
11875 \end_inset
11876
11877 Corollary
11878 \begin_inset Quotes erd
11879 \end_inset
11880
11881
11882 \begin_inset Quotes eld
11883 \end_inset
11884
11885 Lemma
11886 \begin_inset Quotes erd
11887 \end_inset
11888
11889
11890 \begin_inset Quotes eld
11891 \end_inset
11892
11893 Proposition
11894 \begin_inset Quotes erd
11895 \end_inset
11896
11897
11898 \begin_inset Quotes eld
11899 \end_inset
11900
11901 Prop
11902 \begin_inset Quotes erd
11903 \end_inset
11904
11905
11906 \begin_inset Quotes eld
11907 \end_inset
11908
11909 Question
11910 \begin_inset Quotes erd
11911 \end_inset
11912
11913
11914 \begin_inset Quotes eld
11915 \end_inset
11916
11917 Claim
11918 \begin_inset Quotes erd
11919 \end_inset
11920
11921 , and 
11922 \begin_inset Quotes eld
11923 \end_inset
11924
11925 Conjecture
11926 \begin_inset Quotes erd
11927 \end_inset
11928
11929 .
11930  Their use is more or less obvious.
11931  LyX supports all these environments; it will use the proper label, text
11932  style, and numbering scheme for each of them.
11933 \end_layout
11934
11935 \begin_layout Enumerate
11936 Both packages use basic citations; the natbib package should not be used.
11937  In LyX, citation references are shown as usual; in the output, citations
11938  are shown as superscripts.
11939  If you want to use a citation as normal text, you should use the 
11940 \family typewriter
11941 refcite
11942 \family default
11943  command, e.
11944 \begin_inset space \thinspace{}
11945 \end_inset
11946
11947 g.
11948 \begin_inset space \space{}
11949 \end_inset
11950
11951
11952 \begin_inset Quotes eld
11953 \end_inset
11954
11955 See Ref.
11956 \begin_inset space \space{}
11957 \end_inset
11958
11959
11960 \family typewriter
11961
11962 \backslash
11963 refcite{key}
11964 \family default
11965
11966 \begin_inset Quotes erd
11967 \end_inset
11968
11969 .
11970 \end_layout
11971
11972 \begin_layout Enumerate
11973 There is no 
11974 \begin_inset Quotes eld
11975 \end_inset
11976
11977 Acknowledgments
11978 \begin_inset Quotes erd
11979 \end_inset
11980
11981  section in both packages.
11982  To put acknowledgments, just use the 
11983 \begin_inset Quotes eld
11984 \end_inset
11985
11986 Section*
11987 \begin_inset Quotes erd
11988 \end_inset
11989
11990  environment.
11991 \end_layout
11992
11993 \begin_layout Enumerate
11994 Appendices may be added to the paper, 
11995 \emph on
11996 after
11997 \emph default
11998  the Acknowledgments and 
11999 \shape italic
12000 before
12001 \shape default
12002  the References.
12003  LyX provides a special environment, called 
12004 \begin_inset Quotes eld
12005 \end_inset
12006
12007 Appendices Section
12008 \begin_inset Quotes erd
12009 \end_inset
12010
12011  which marks the beginning of the appendices.
12012  This environment should be left blank; it just sends a LaTeX command, but
12013  nothing is really printed.
12014  In LyX, the word 
12015 \begin_inset Quotes eld
12016 \end_inset
12017
12018 Appendix
12019 \begin_inset Quotes erd
12020 \end_inset
12021
12022  is printed with blue letters, as a signal that all sections after that
12023  point are appendices.
12024  To write an appendix, use the 
12025 \begin_inset Quotes eld
12026 \end_inset
12027
12028 Appendix
12029 \begin_inset Quotes erd
12030 \end_inset
12031
12032  environment.
12033  LyX will number each appendix with capital letters, as required by both
12034  journals.
12035  Note that 
12036 \begin_inset Quotes eld
12037 \end_inset
12038
12039 Appendices Section
12040 \begin_inset Quotes erd
12041 \end_inset
12042
12043  
12044 \emph on
12045 must
12046 \emph default
12047  be present before the first appendix; if not, all appendices will be numbered
12048  as normal sections in the output.
12049 \end_layout
12050
12051 \begin_layout Enumerate
12052 The ijmpc and the ijmpd packages use the 
12053 \family typewriter
12054 tbl
12055 \family default
12056  command to implement table captions.
12057  As a result, a table created by LyX is printed correctly, but its caption
12058  is ignored.
12059  However, you can use some TeX code to overcome this problem, so that captions
12060  are printed as expected.
12061  To do so, create a float table as usual, remove the caption, and replace
12062  it with the TeX code 
12063 \family typewriter
12064
12065 \backslash
12066 tbl{
12067 \emph on
12068 your table caption
12069 \emph default
12070 }{
12071 \family default
12072  (sic); you must also the TeX code 
12073 \family typewriter
12074 }
12075 \family default
12076  immediately after the tabular material.
12077  Study the example table included in the template files to see how this
12078  trick is implemented.
12079  Alternatively, If you need table captions, you should implement the whole
12080  table float in a 
12081 \family typewriter
12082 .tex
12083 \family default
12084  file, then include this file to the LyX document (
12085 \family sans
12086 Insert\SpecialChar \menuseparator
12087 File\SpecialChar \menuseparator
12088 Child
12089 \begin_inset space ~
12090 \end_inset
12091
12092 Document
12093 \family default
12094 ).
12095  Details on how to create a table float can be found in the files 
12096 \family typewriter
12097 ws-ijmpc.tex
12098 \family default
12099  and 
12100 \family typewriter
12101 ws-ijmpd.tex
12102 \family default
12103 , included in the corresponding packages.
12104 \end_layout
12105
12106 \begin_layout Subsection
12107 Preparing a paper for submission
12108 \end_layout
12109
12110 \begin_layout Standard
12111 Before you submit your paper you must export the LyX document as a LaTeX
12112  file (
12113 \family sans
12114 File\SpecialChar \menuseparator
12115 Export\SpecialChar \menuseparator
12116 LaTeX
12117 \family default
12118 )
12119 \begin_inset Foot
12120 status open
12121
12122 \begin_layout Plain Layout
12123 Actually you have the choice between LaTeX (plain) and pdflatex.
12124  If you intend to use pdflatex to prepare the paper, you should use the
12125  pdflatex option so that included graphics are converted to PDF format,
12126  ready for use by pdflatex.
12127 \end_layout
12128
12129 \end_inset
12130
12131 , then make the following changes to the resulting 
12132 \family typewriter
12133 .tex
12134 \family default
12135  file.
12136 \end_layout
12137
12138 \begin_layout Enumerate
12139 Remove the comment lines before the 
12140 \family typewriter
12141
12142 \backslash
12143 documentclass
12144 \family default
12145  command.
12146 \end_layout
12147
12148 \begin_layout Enumerate
12149 Remove everything between (and including) the 
12150 \family typewriter
12151
12152 \backslash
12153 makeatletter
12154 \family default
12155  and 
12156 \family typewriter
12157
12158 \backslash
12159 makeatother
12160 \family default
12161  commands, except for any commands you specifically put into the LaTeX preamble.
12162 \end_layout
12163
12164 \begin_layout Standard
12165 The modified 
12166 \family typewriter
12167 .tex
12168 \family default
12169  file should be saved and processed through LaTeX as many times as necessary.
12170  You may also want to check the resulting 
12171 \family typewriter
12172 .dvi
12173 \family default
12174  document.
12175 \end_layout
12176
12177 \begin_layout Subsection
12178 Use of TeX code
12179 \end_layout
12180
12181 \begin_layout Standard
12182 The use of TeX code is reduced to two commands, which must be placed at
12183  the top of the document.
12184  If you started writing your paper by using the 
12185 \family typewriter
12186 ijmpc.lyx
12187 \family default
12188  or the 
12189 \family typewriter
12190 ijmpd.lyx
12191 \family default
12192  template, the TeX code needed is already in its place; you usually don't
12193  need to delete it.
12194  You may only modify the first TeX code to specify the information printed
12195  to the top of odd and even pages (authors' names and short paper's title,
12196  respectively).
12197  This TeX code must have the form 
12198 \family typewriter
12199
12200 \backslash
12201 markboth{Authors' Names}{Short Paper's Title}
12202 \family default
12203 .
12204 \end_layout
12205
12206 \begin_layout Section
12207 iopart
12208 \end_layout
12209
12210 \begin_layout Standard
12211 by 
12212 \noun on
12213 Uwe Stöhr
12214 \end_layout
12215
12216 \begin_layout Subsection
12217 Overview
12218 \end_layout
12219
12220 \begin_layout Standard
12221 The iopart package provides a document class to create electronic manuscript
12222  submission to the journals published by the Institute of Physics.
12223  Instructions for the authors how to create a paper using the iopart class
12224  can be downloaded together with the iopart package from the site 
12225 \begin_inset Flex URL
12226 status collapsed
12227
12228 \begin_layout Plain Layout
12229
12230 ftp://ftp.iop.org/pub/journals/latex2e
12231 \end_layout
12232
12233 \end_inset
12234
12235 .
12236 \end_layout
12237
12238 \begin_layout Subsection
12239 Writing a paper
12240 \end_layout
12241
12242 \begin_layout Standard
12243 The easiest way to write a paper is to start with the file 
12244 \emph on
12245 IOP-article.lyx
12246 \emph default
12247  that is available in LyX's examples files folder.
12248  Open this file, save it under a new name, and start writing.
12249  The example file explains how to use the special text environments.
12250  Here are the most important advices:
12251 \end_layout
12252
12253 \begin_layout Itemize
12254 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12255  two options 
12256 \family sans
12257 Use AMS math package
12258 \family default
12259  in the document settings under 
12260 \family sans
12261 Math Options
12262 \family default
12263  are not used!
12264 \end_layout
12265
12266 \begin_layout Itemize
12267
12268 \size normal
12269 The title environment defines the kind of your paper.
12270  So use one of the following environments for the title:
12271 \end_layout
12272
12273 \begin_deeper
12274 \begin_layout Itemize
12275
12276 \family sans
12277 \size normal
12278 Title
12279 \family default
12280  for a Paper
12281 \end_layout
12282
12283 \begin_layout Itemize
12284
12285 \family sans
12286 \size normal
12287 Review
12288 \family default
12289  for a Review
12290 \end_layout
12291
12292 \begin_layout Itemize
12293
12294 \family sans
12295 \size normal
12296 Topical
12297 \family default
12298  for a Topical review
12299 \end_layout
12300
12301 \begin_layout Itemize
12302
12303 \family sans
12304 \size normal
12305 Comment
12306 \family default
12307  for a Comment
12308 \end_layout
12309
12310 \begin_layout Itemize
12311
12312 \family sans
12313 \size normal
12314 Note
12315 \family default
12316  for a Note
12317 \end_layout
12318
12319 \begin_layout Itemize
12320
12321 \family sans
12322 \size normal
12323 Paper
12324 \family default
12325  for a Paper (same as Title)
12326 \end_layout
12327
12328 \begin_layout Itemize
12329
12330 \family sans
12331 \size normal
12332 Prelim
12333 \family default
12334  for a Preliminary communication
12335 \end_layout
12336
12337 \begin_layout Itemize
12338
12339 \family sans
12340 \size normal
12341 Rapid
12342 \family default
12343  for a Rapid communication
12344 \end_layout
12345
12346 \begin_layout Itemize
12347
12348 \family sans
12349 \size normal
12350 Letter
12351 \family default
12352  for a Letter to the editor
12353 \end_layout
12354
12355 \end_deeper
12356 \begin_layout Itemize
12357
12358 \size normal
12359 All title environments except of 
12360 \family sans
12361 Letter
12362 \family default
12363  can have an optional short title.
12364 \end_layout
12365
12366 \begin_layout Itemize
12367 There is a general title environment 
12368 \family sans
12369 Article
12370 \family default
12371  which is not directly supported by the LyX.
12372  This can be used as TeX code when your document doesn't fit into one of
12373  the other title types.
12374 \end_layout
12375
12376 \begin_layout Standard
12377 For more informations like hints for special table and formula formatting,
12378  look at the IOP author guidelines.
12379 \end_layout
12380
12381 \begin_layout Section
12382 Kluwer
12383 \end_layout
12384
12385 \begin_layout Standard
12386 by 
12387 \noun on
12388 Panayotis Papasotiriou
12389 \end_layout
12390
12391 \begin_layout Subsection
12392 Overview
12393 \end_layout
12394
12395 \begin_layout Standard
12396 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12397  that facilitates electronic manuscript submission to the journals they
12398  publish.
12399  Most known of them (at least in my domain of interest) are 
12400 \emph on
12401 Astrophysics and Space Science
12402 \emph default
12403  and 
12404 \emph on
12405 Solar Physics
12406 \emph default
12407 , but there are many others (see a complete list at 
12408 \begin_inset Flex URL
12409 status open
12410
12411 \begin_layout Plain Layout
12412
12413 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12414 \end_layout
12415
12416 \end_inset
12417
12418 ).
12419  The Kluwer package may be downloaded from the site 
12420 \begin_inset Flex URL
12421 status collapsed
12422
12423 \begin_layout Plain Layout
12424
12425 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12426 \end_layout
12427
12428 \end_inset
12429
12430 .
12431  A complete user guide is contained in that package (but it can also be
12432  downloaded separately).
12433 \end_layout
12434
12435 \begin_layout Standard
12436 LyX supports many features of the package but not everything.
12437  However, the TeX code needed is reduced to some 
12438 \begin_inset Quotes eld
12439 \end_inset
12440
12441 peculiar
12442 \begin_inset Quotes erd
12443 \end_inset
12444
12445  commands of the package (see
12446 \begin_inset space ~
12447 \end_inset
12448
12449
12450 \begin_inset CommandInset ref
12451 LatexCommand ref
12452 reference "subsec:kluwer_peculiarities"
12453
12454 \end_inset
12455
12456 ).
12457  I have recently used LyX to write an article submitted to the 
12458 \emph on
12459 Astrophysics and Space Science
12460 \emph default
12461  without any problem.
12462 \end_layout
12463
12464 \begin_layout Subsection
12465 Writing a paper
12466 \end_layout
12467
12468 \begin_layout Standard
12469 The easiest way to write a paper is to start with the Kluwer template file.
12470  Click on 
12471 \family sans
12472 File\SpecialChar \menuseparator
12473 New from
12474 \family default
12475  
12476 \family sans
12477 Template
12478 \family default
12479 , then choose the 
12480 \family typewriter
12481 kluwer.lyx
12482 \family default
12483  template.
12484  This will give an (almost) empty document that includes the most common
12485  fields found in a manuscript and a short description of their use.
12486  As in most templates, simply overwrite the existing text (including the
12487  brackets, 
12488 \family typewriter
12489 <>
12490 \family default
12491 ) with the correct information.
12492 \end_layout
12493
12494 \begin_layout Subsection
12495 Preparing a paper for submission
12496 \end_layout
12497
12498 \begin_layout Standard
12499 As in the AASTeX package, before you submit your paper to a journal you
12500  must 
12501 \begin_inset Quotes eld
12502 \end_inset
12503
12504 postprocess
12505 \begin_inset Quotes erd
12506 \end_inset
12507
12508  it as follows.
12509 \end_layout
12510
12511 \begin_layout Enumerate
12512 Export your paper as a LaTeX file.
12513  To do this, click on 
12514 \family sans
12515 File\SpecialChar \menuseparator
12516 Export\SpecialChar \menuseparator
12517 LaTeX
12518 \family default
12519 .
12520  
12521 \end_layout
12522
12523 \begin_layout Enumerate
12524 Edit the resulting 
12525 \family typewriter
12526 .tex
12527 \family default
12528  file with a text editor and make the following changes
12529 \end_layout
12530
12531 \begin_deeper
12532 \begin_layout Enumerate
12533 remove the comment lines before the 
12534 \family typewriter
12535
12536 \backslash
12537 documentclass
12538 \family default
12539  command,
12540 \end_layout
12541
12542 \begin_layout Enumerate
12543 remove everything between (and including) the 
12544 \family typewriter
12545
12546 \backslash
12547 makeatletter
12548 \family default
12549  and 
12550 \family typewriter
12551
12552 \backslash
12553 makeatother
12554 \family default
12555  commands, except for any commands you specifically put into the LaTeX preamble.
12556 \end_layout
12557
12558 \begin_layout Standard
12559 Save the resulting 
12560 \family typewriter
12561 .tex
12562 \family default
12563  file.
12564 \end_layout
12565
12566 \end_deeper
12567 \begin_layout Enumerate
12568 Run the 
12569 \family typewriter
12570 .tex
12571 \family default
12572  file through LaTeX as many times as necessary (usually up to three).
12573 \end_layout
12574
12575 \begin_layout Enumerate
12576 View the resulting 
12577 \family typewriter
12578 .dvi
12579 \family default
12580  document using, e.
12581 \begin_inset space \thinspace{}
12582 \end_inset
12583
12584 g.
12585 \begin_inset space \space{}
12586 \end_inset
12587
12588
12589 \family sans
12590 xdvi
12591 \family default
12592 , and check if everything is OK (it should, if you didn't make any mistake).
12593 \end_layout
12594
12595 \begin_layout Subsection
12596 \begin_inset Quotes eld
12597 \end_inset
12598
12599 Peculiarities
12600 \begin_inset Quotes erd
12601 \end_inset
12602
12603  of the Kluwer package
12604 \begin_inset CommandInset label
12605 LatexCommand label
12606 name "subsec:kluwer_peculiarities"
12607
12608 \end_inset
12609
12610
12611 \end_layout
12612
12613 \begin_layout Standard
12614 The Kluwer package has the following 
12615 \begin_inset Quotes eld
12616 \end_inset
12617
12618 peculiarities
12619 \begin_inset Quotes erd
12620 \end_inset
12621
12622 .
12623 \end_layout
12624
12625 \begin_layout Enumerate
12626 It is possible to write multiple articles in the same LaTeX file
12627 \begin_inset Foot
12628 status collapsed
12629
12630 \begin_layout Plain Layout
12631 I can't imagine any good reason to do this.
12632 \end_layout
12633
12634 \end_inset
12635
12636 .
12637  Each article must be included in the environment 
12638 \begin_inset Quotes eld
12639 \end_inset
12640
12641 article
12642 \begin_inset Quotes erd
12643 \end_inset
12644
12645 .
12646  Unfortunately, this environment cannot be omitted, even if you write just
12647  one article.
12648  Therefore, each article starts with the command 
12649 \family typewriter
12650
12651 \backslash
12652 begin{article}
12653 \family default
12654  and, obviously, ends with the command 
12655 \family typewriter
12656
12657 \backslash
12658 end{article}
12659 \family default
12660 .
12661  Although this can be implemented in LyX, I didn't included it, since it
12662  looks ugly and can confuse the novice user.
12663  Therefore, you need to enter them directly and mark them as LaTeX code
12664  (the well-known 
12665 \begin_inset Quotes eld
12666 \end_inset
12667
12668 TeX code
12669 \begin_inset Quotes erd
12670 \end_inset
12671
12672 ).
12673 \end_layout
12674
12675 \begin_layout Enumerate
12676 Information given at the beginning of the article (i.
12677 \begin_inset space \thinspace{}
12678 \end_inset
12679
12680 g.
12681 \begin_inset space \space{}
12682 \end_inset
12683
12684 title, subtitle, author, institution, running title, running author, abstract
12685  and keywords) must be included in an environment called 
12686 \begin_inset Quotes eld
12687 \end_inset
12688
12689 opening
12690 \begin_inset Quotes erd
12691 \end_inset
12692
12693 .
12694  This is not implemented in LyX, so you must enter title, subtitle etc.
12695 \begin_inset space ~
12696 \end_inset
12697
12698 between two TeX code lines (
12699 \family typewriter
12700
12701 \backslash
12702 begin{opening}
12703 \family default
12704  and 
12705 \family typewriter
12706
12707 \backslash
12708 end{opening}
12709 \family default
12710 ).
12711 \end_layout
12712
12713 \begin_layout Enumerate
12714 According to the user manual, the label of each bibliography item must be
12715  written as 
12716 \family typewriter
12717
12718 \backslash
12719 protect
12720 \backslash
12721 citeauthoryear{
12722 \family default
12723 \emph on
12724 author(s)
12725 \family typewriter
12726 \emph default
12727 }{
12728 \family default
12729 \emph on
12730 year
12731 \family typewriter
12732 \emph default
12733 }
12734 \family default
12735 .
12736 \end_layout
12737
12738 \begin_layout Standard
12739 The 
12740 \family typewriter
12741 kluwer.lyx
12742 \family default
12743  template takes care of all these 
12744 \begin_inset Quotes eld
12745 \end_inset
12746
12747 peculiarities
12748 \begin_inset Quotes erd
12749 \end_inset
12750
12751 .
12752  If you start a new paper using this template you don't need to do anything
12753  special.
12754  Just 
12755 \end_layout
12756
12757 \begin_layout Enumerate
12758 don't delete the TeX code included in the template, and
12759 \end_layout
12760
12761 \begin_layout Enumerate
12762 copy the example bibliography item included in the template and modify it
12763  as necessary to enter new bibliography items.
12764 \end_layout
12765
12766 \begin_layout Section
12767 Koma-Script
12768 \end_layout
12769
12770 \begin_layout Standard
12771 by 
12772 \noun on
12773 Bernd Rellermeyer
12774 \end_layout
12775
12776 \begin_layout Subsection
12777 Overview
12778 \end_layout
12779
12780 \begin_layout Standard
12781 The LyX document classes 
12782 \emph on
12783 article (koma-script)
12784 \emph default
12785
12786 \emph on
12787 report (koma-script)
12788 \emph default
12789
12790 \emph on
12791 book
12792 \emph default
12793  
12794 \emph on
12795 (koma-script)
12796 \emph default
12797 , and 
12798 \emph on
12799 letter
12800 \emph default
12801  
12802 \emph on
12803 (koma-script)
12804 \emph default
12805  correspond to the LaTeX document classes 
12806 \family typewriter
12807 scrartcl.cls
12808 \family default
12809
12810 \family typewriter
12811 scrreprt.cls
12812 \family default
12813
12814 \family typewriter
12815 scrbook.cls
12816 \family default
12817 , and 
12818 \family typewriter
12819 scrlettr.cls
12820 \family default
12821 , resp.
12822 \begin_inset space ~
12823 \end_inset
12824
12825 of the Koma-Script family.
12826  They are replacements for the standard document classes 
12827 \family typewriter
12828 article.cls
12829 \family default
12830
12831 \family typewriter
12832 report.cls
12833 \family default
12834
12835 \family typewriter
12836 book.cls
12837 \family default
12838  and 
12839 \family typewriter
12840 letter.cls
12841 \family default
12842 , resp., and fit better to European typography conventions in a number of
12843  points.
12844 \end_layout
12845
12846 \begin_layout Itemize
12847 Standard character size is 11pt in 
12848 \emph on
12849 article (koma-script)
12850 \emph default
12851
12852 \emph on
12853 report (koma-script)
12854 \emph default
12855 , and 
12856 \emph on
12857 book (koma-script)
12858 \emph default
12859 , and 12pt in 
12860 \emph on
12861 letter (koma-script)
12862 \emph default
12863 .
12864 \end_layout
12865
12866 \begin_layout Itemize
12867 Headings, labels of the description environment, and a number of elements
12868  of the 
12869 \emph on
12870 letter (koma-script)
12871 \emph default
12872  document class are set in a bold sans serif font.
12873 \begin_inset Foot
12874 status collapsed
12875
12876 \begin_layout Plain Layout
12877 There is a big difference between the bold sans serif old cm fonts and new
12878  ec fonts, especially in the appearance of headings.
12879  In comparison, the ec bold sans serif fonts look a bit thin.
12880  Here the LaTeX package 
12881 \family typewriter
12882 cmsd.sty by
12883 \family default
12884  
12885 \shape smallcaps
12886 Walter Schmidt
12887 \shape default
12888  helps to produce the 
12889 \begin_inset Quotes eld
12890 \end_inset
12891
12892 usual
12893 \begin_inset Quotes erd
12894 \end_inset
12895
12896  appearance when using the ec fonts.
12897 \end_layout
12898
12899 \end_inset
12900
12901  The numbering of chapter headings is made in the same way as the numbering
12902  of section headings, that is without the extra line 
12903 \begin_inset Quotes eld
12904 \end_inset
12905
12906 Chapter\SpecialChar \ldots{}
12907
12908 \begin_inset Quotes erd
12909 \end_inset
12910
12911 .
12912  In addition, the appearance of the headings can be modified by using a
12913  number of options (in LyX to be entered in the field 
12914 \family sans
12915 Extra
12916 \begin_inset space ~
12917 \end_inset
12918
12919 Options
12920 \family default
12921  of the dialog 
12922 \family sans
12923 Layout\SpecialChar \menuseparator
12924 Document
12925 \family default
12926 ).
12927  
12928 \end_layout
12929
12930 \begin_layout Itemize
12931 The main means in the Koma-Script document classes to design the type area
12932  are the options 
12933 \family sans
12934 BCOR
12935 \family default
12936  and 
12937 \family sans
12938 DIV
12939 \family default
12940  (in LyX to be entered in the extra class options field in the dialog 
12941 \family sans
12942 Document\SpecialChar \menuseparator
12943 Settings
12944 \family default
12945 ).
12946  They make a clearer modification of page margins possible as do the options
12947  of the dialog 
12948 \family sans
12949 Document\SpecialChar \menuseparator
12950 Settings
12951 \family default
12952 .
12953  
12954 \end_layout
12955
12956 \begin_layout Itemize
12957 The LaTeX document classes of the Koma-Script family define a number of
12958  additional commands.
12959  Those part of it which makes sense in LyX is implemented in corresponding
12960  paragraph types.
12961 \end_layout
12962
12963 \begin_layout Standard
12964 Detailed descriptions of the LaTeX document classes of the Koma-Script family
12965  can be found in the Koma-Script documentation 
12966 \emph on
12967 scrguide
12968 \emph default
12969  (German) and 
12970 \emph on
12971 scrguien
12972 \emph default
12973  (English).
12974 \end_layout
12975
12976 \begin_layout Subsection
12977 article (koma-script), report (koma-script), and book (koma-script)
12978 \end_layout
12979
12980 \begin_layout Standard
12981 The document classes 
12982 \emph on
12983 article (koma-script)
12984 \emph default
12985
12986 \emph on
12987 report (koma-script)
12988 \emph default
12989 , and 
12990 \emph on
12991 book
12992 \emph default
12993  
12994 \emph on
12995 (koma-script)
12996 \emph default
12997  are implemented in the layout files 
12998 \family typewriter
12999 scrartcl.layout
13000 \family default
13001
13002 \family typewriter
13003 scrreprt.layout
13004 \family default
13005 , and 
13006 \family typewriter
13007 scrbook.layout
13008 \family default
13009 , resp.
13010  They contain all the paragraph types of the corresponding standard document
13011  classes 
13012 \emph on
13013 article
13014 \emph default
13015
13016 \emph on
13017 report
13018 \emph default
13019 , and 
13020 \emph on
13021 book
13022 \emph default
13023 , resp., partly modified, with the exception of the LyX specific 
13024 \family sans
13025 List
13026 \family default
13027 -type, which is replaced by the new 
13028 \family sans
13029 Labeling
13030 \family default
13031 -type having the same functionality.
13032  Beside the 
13033 \family sans
13034 Labeling
13035 \family default
13036 -Type there is a number of new paragraph types added.
13037  They are 
13038 \emph on
13039 not
13040 \emph default
13041  part of 
13042 \emph on
13043 letter (koma-script)
13044 \emph default
13045 .
13046 \end_layout
13047
13048 \begin_layout Itemize
13049
13050 \family sans
13051 Addpart, Addchap
13052 \family default
13053
13054 \family sans
13055 Addsec
13056 \family default
13057 : are equivalents to 
13058 \family sans
13059 Part*, Chapter*
13060 \family default
13061  and 
13062 \family sans
13063 Section*
13064 \family default
13065 , resp., additionally inserting an entry in the table of contents.
13066  
13067 \family sans
13068 Addpart
13069 \family default
13070  and 
13071 \family sans
13072 Addchap
13073 \family default
13074  are not contained in 
13075 \emph on
13076 article (koma-script)
13077 \emph default
13078 .
13079 \end_layout
13080
13081 \begin_layout Itemize
13082
13083 \family sans
13084 Addchap*
13085 \family default
13086
13087 \family sans
13088 Addsec*
13089 \family default
13090 : behave exactly as 
13091 \family sans
13092 Addchap
13093 \family default
13094  and 
13095 \family sans
13096 Addsec
13097 \family default
13098 , resp., additionally clearing running heads.
13099  
13100 \family sans
13101 Addchap*
13102 \family default
13103  is not contained in 
13104 \emph on
13105 article (koma-script)
13106 \emph default
13107 .
13108 \begin_inset Foot
13109 status collapsed
13110
13111 \begin_layout Plain Layout
13112 There is also an 
13113 \family typewriter
13114
13115 \backslash
13116 addpart*
13117 \family default
13118  command in 
13119 \emph on
13120 book (koma-script)
13121 \emph default
13122  and in 
13123 \emph on
13124 report (koma-script)
13125 \emph default
13126 , but since this is identical to 
13127 \family sans
13128 Part*
13129 \family default
13130 , is has not been implemented in LyX.
13131 \end_layout
13132
13133 \end_inset
13134
13135
13136 \end_layout
13137
13138 \begin_layout Itemize
13139
13140 \family sans
13141 Minisec
13142 \family default
13143 : generates a heading directly above the following paragraph in the standard
13144  character size without affecting the structure of the document.
13145 \end_layout
13146
13147 \begin_layout Itemize
13148
13149 \family sans
13150 Captionabove
13151 \family default
13152  and 
13153 \family sans
13154 Captionbelow
13155 \family default
13156  are special captions which respect the different space settings needed
13157  for captions placed above or below an element (if you follow strict typographic
13158  rules, you might want to place table captions always above the table).
13159  You can also use the class option 
13160 \family typewriter
13161 tablecaptionsabove
13162 \family default
13163 , which will switch 
13164 \family sans
13165 caption
13166 \family default
13167  to 
13168 \family sans
13169 captionabove
13170 \family default
13171  for tables and 
13172 \family sans
13173 captionbelow
13174 \family default
13175  for figures.
13176  You need at least Koma-Script version 2.8q to use this.
13177 \end_layout
13178
13179 \begin_layout Itemize
13180
13181 \family sans
13182 Dictum
13183 \family default
13184 : can be used to set a bonmot, e.
13185 \begin_inset space \thinspace{}
13186 \end_inset
13187
13188 g.
13189 \begin_inset space \space{}
13190 \end_inset
13191
13192 at the beginning of a chapter.
13193  If you use the optional argument (
13194 \family sans
13195 Insert\SpecialChar \menuseparator
13196 Short
13197 \begin_inset space ~
13198 \end_inset
13199
13200 Title
13201 \family default
13202 ), you can insert the dictum's author there.
13203  Dictum and author are separated by a line.
13204  You need at least Koma-Script version 2.8q to use this.
13205  
13206 \family sans
13207 Dictum
13208 \family default
13209  is not contained in 
13210 \emph on
13211 article (koma-script)
13212 \emph default
13213 .
13214 \end_layout
13215
13216 \begin_layout Standard
13217 The following types, together with the standard types 
13218 \family sans
13219 Title
13220 \family default
13221
13222 \family sans
13223 Author
13224 \family default
13225 , and 
13226 \family sans
13227 Date
13228 \family default
13229 , form the title area of the document.
13230  They must be entered ahead of the first 
13231 \begin_inset Quotes eld
13232 \end_inset
13233
13234 ordinary
13235 \begin_inset Quotes erd
13236 \end_inset
13237
13238  paragraph.
13239 \begin_inset Foot
13240 status collapsed
13241
13242 \begin_layout Plain Layout
13243 The corresponding LaTeX commands must appear before the 
13244 \family typewriter
13245
13246 \backslash
13247 maketitle
13248 \family default
13249  command.
13250 \end_layout
13251
13252 \end_inset
13253
13254  When such a type is used more than once, the latter usage overwrites the
13255  former one, that means, for every type only the latest usage is valid.
13256  The order of the different types however has, like 
13257 \family sans
13258 Title
13259 \family default
13260
13261 \family sans
13262 Author
13263 \family default
13264 , and 
13265 \family sans
13266 Date
13267 \family default
13268 , no effect on the appearance of the produced document.
13269 \end_layout
13270
13271 \begin_layout Itemize
13272
13273 \family sans
13274 Subject
13275 \family default
13276 : produces a centered paragraph above the ordinary title (
13277 \family sans
13278 Title
13279 \family default
13280
13281 \family sans
13282 Author
13283 \family default
13284
13285 \family sans
13286 Date
13287 \family default
13288 ) for the subject of the document.
13289 \end_layout
13290
13291 \begin_layout Itemize
13292
13293 \family sans
13294 Publishers
13295 \family default
13296 : produces a centered paragraph below the ordinary title (
13297 \family sans
13298 Title
13299 \family default
13300
13301 \family sans
13302 Author
13303 \family default
13304
13305 \family sans
13306 Date
13307 \family default
13308 ) for the publishers' name.
13309 \end_layout
13310
13311 \begin_layout Itemize
13312
13313 \family sans
13314 Dedication
13315 \family default
13316 : in 
13317 \emph on
13318 report (koma-script)
13319 \emph default
13320  and 
13321 \emph on
13322 book (koma-script)
13323 \emph default
13324  produces a centered paragraph on its own page behind the title page, or
13325  in 
13326 \emph on
13327 article (koma-script)
13328 \emph default
13329  produces a centered paragraph below the ordinary title (
13330 \family sans
13331 Title
13332 \family default
13333
13334 \family sans
13335 Author
13336 \family default
13337
13338 \family sans
13339 Date
13340 \family default
13341
13342 \family sans
13343 Publishers
13344 \family default
13345 ) for a dedication.
13346 \end_layout
13347
13348 \begin_layout Itemize
13349
13350 \family sans
13351 Titlehead
13352 \family default
13353 : produces a left aligned paragraph above the ordinary title (
13354 \family sans
13355 Title
13356 \family default
13357
13358 \family sans
13359 Author
13360 \family default
13361
13362 \family sans
13363 Date
13364 \family default
13365
13366 \family sans
13367 Subject
13368 \family default
13369 ) for a document`s head.
13370 \end_layout
13371
13372 \begin_layout Itemize
13373
13374 \family sans
13375 Uppertitleback
13376 \family default
13377 : produces in a double-sided print in 
13378 \emph on
13379 report (koma-script)
13380 \emph default
13381  and 
13382 \emph on
13383 book (koma-script)
13384 \emph default
13385  a left-aligned paragraph at the top of the title page`s back or has no
13386  effect in a single-sided print or in 
13387 \emph on
13388 article (koma-script)
13389 \emph default
13390 .
13391 \end_layout
13392
13393 \begin_layout Itemize
13394
13395 \family sans
13396 Lowertitleback
13397 \family default
13398 : produces in a double-sided print in 
13399 \emph on
13400 report (koma-script)
13401 \emph default
13402  and 
13403 \emph on
13404 book (koma-script)
13405 \emph default
13406  a left-aligned paragraph at the bottom of the title page`s back or has
13407  no effect in a single-sided print or in 
13408 \emph on
13409 article (koma-script)
13410 \emph default
13411 .
13412 \end_layout
13413
13414 \begin_layout Itemize
13415
13416 \family sans
13417 Extratitle
13418 \family default
13419 : produces a special 
13420 \begin_inset Quotes eld
13421 \end_inset
13422
13423 dirty
13424 \begin_inset Quotes erd
13425 \end_inset
13426
13427  page ahead of the actual document containing a paragraph without special
13428  formatting.
13429 \end_layout
13430
13431 \begin_layout Standard
13432 The layout files for the document classes 
13433 \emph on
13434 article (koma-script)
13435 \emph default
13436
13437 \emph on
13438 report (koma-script)
13439 \emph default
13440 , and 
13441 \emph on
13442 book (koma-script)
13443 \emph default
13444  do include the file 
13445 \family typewriter
13446 scrmacros.inc
13447 \family default
13448 .
13449  This is thought of as a place to define your own types.
13450  Copy scrmacros
13451 \family typewriter
13452 .inc
13453 \family default
13454  in your personal layout directory and edit the file!
13455 \end_layout
13456
13457 \begin_layout Subsection
13458 letter (koma-script)
13459 \end_layout
13460
13461 \begin_layout Standard
13462 \begin_inset ERT
13463 status open
13464
13465 \begin_layout Plain Layout
13466
13467
13468 \backslash
13469 begin{sloppypar}
13470 \end_layout
13471
13472 \end_inset
13473
13474
13475 \end_layout
13476
13477 \begin_layout Standard
13478 \noindent
13479 The document class 
13480 \emph on
13481 letter (koma-script)
13482 \emph default
13483  is implemented in the layout file 
13484 \family typewriter
13485 scrlettr.layout
13486 \family default
13487 .
13488  It contains all the paragraph types of the corresponding standard document
13489  class 
13490 \emph on
13491 letter
13492 \emph default
13493 , partly modified, with the exception of the LyX specific types 
13494 \family sans
13495 LyX-Code
13496 \family default
13497  and 
13498 \family sans
13499 Comment
13500 \family default
13501  and the 
13502 \family sans
13503 List
13504 \family default
13505  type, which is replaced by the new 
13506 \family sans
13507 Labeling
13508 \family default
13509  type.
13510  In addition, it contains, in contrast to the standard document class, the
13511  standard types 
13512 \family sans
13513 LaTeX
13514 \family default
13515
13516 \family sans
13517 Quotation
13518 \family default
13519
13520 \family sans
13521 Quote
13522 \family default
13523 , and 
13524 \family sans
13525 Verse
13526 \family default
13527 .
13528  Furthermore, there are a number of new letter specific types.
13529 \end_layout
13530
13531 \begin_layout Standard
13532 \begin_inset ERT
13533 status open
13534
13535 \begin_layout Plain Layout
13536
13537
13538 \backslash
13539 end{sloppypar}
13540 \end_layout
13541
13542 \end_inset
13543
13544
13545 \end_layout
13546
13547 \begin_layout Standard
13548 The appearance of the letter produced by this document class can be controlled
13549  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13550 \begin_inset Foot
13551 status collapsed
13552
13553 \begin_layout Plain Layout
13554 For example, the standard appearance of the letter`s heading, consisting
13555  of name and address, is quite self-willed.
13556  An 
13557 \begin_inset Quotes eld
13558 \end_inset
13559
13560 ordinary
13561 \begin_inset Quotes erd
13562 \end_inset
13563
13564  heading is produced by the following LaTeX commands in the preamble:
13565 \end_layout
13566
13567 \begin_layout LyX-Code
13568
13569 \backslash
13570 firsthead{
13571 \backslash
13572 parbox[b]{
13573 \backslash
13574 textwidth}
13575 \end_layout
13576
13577 \begin_layout LyX-Code
13578   {
13579 \backslash
13580 ignorespaces 
13581 \backslash
13582 fromname
13583 \backslash
13584
13585 \backslash
13586  
13587 \backslash
13588 ignorespaces 
13589 \backslash
13590 fromaddress}} 
13591 \end_layout
13592
13593 \begin_layout LyX-Code
13594
13595 \backslash
13596 nexthead{
13597 \backslash
13598 parbox[b]{
13599 \backslash
13600 textwidth}
13601 \end_layout
13602
13603 \begin_layout LyX-Code
13604   {
13605 \backslash
13606 ignorespaces 
13607 \backslash
13608 fromname 
13609 \backslash
13610 hfill 
13611 \backslash
13612 ignorespaces 
13613 \backslash
13614 pagename
13615 \backslash
13616  
13617 \backslash
13618 thepage}}
13619 \end_layout
13620
13621 \end_inset
13622
13623  A detailed German description of such LaTeX commands can be found in the
13624  Koma-Script documentation 
13625 \emph on
13626 scrguide
13627 \emph default
13628 .
13629  With it, the letter's author can produce his personal letter layout.
13630 \end_layout
13631
13632 \begin_layout Standard
13633 The types 
13634 \family sans
13635 Letter
13636 \family default
13637  and 
13638 \family sans
13639 Opening
13640 \family default
13641  define the beginning of the letter and must be used in every letter.
13642  To emphasize them in the LyX document class, they are marked with the letter
13643  
13644 \shape italic
13645 L
13646 \shape default
13647  or 
13648 \shape italic
13649 O
13650 \shape default
13651 , resp.
13652 \begin_inset space ~
13653 \end_inset
13654
13655 in the left margin.
13656  It is possible to write any number of letters in one file.
13657  An 
13658 \family sans
13659 Opening
13660 \family default
13661  type produces a new letter using the same addressee and a 
13662 \family sans
13663 Letter
13664 \family default
13665  type produces a new addressee.
13666  The types 
13667 \family sans
13668 Closing
13669 \family default
13670
13671 \family sans
13672 PS
13673 \family default
13674
13675 \family sans
13676 CC
13677 \family default
13678 , and 
13679 \family sans
13680 Encl
13681 \family default
13682  are ordinary paragraph types and can also be used several times in one
13683  and the same letter.
13684 \end_layout
13685
13686 \begin_layout Itemize
13687
13688 \family sans
13689 Letter
13690 \family default
13691 : produces a paragraph for the addressee and implicitly defines the beginning
13692  of the letter.
13693 \end_layout
13694
13695 \begin_layout Itemize
13696
13697 \family sans
13698 Opening
13699 \family default
13700 : produces a paragraph for the form of address and implicitly produces a
13701  new letter.
13702 \end_layout
13703
13704 \begin_layout Itemize
13705
13706 \family sans
13707 Closing
13708 \family default
13709 : produces a paragraph for a close.
13710 \end_layout
13711
13712 \begin_layout Itemize
13713
13714 \family sans
13715 PS
13716 \family default
13717 : produces a paragraph for a postscript.
13718 \end_layout
13719
13720 \begin_layout Itemize
13721
13722 \family sans
13723 CC
13724 \family default
13725 : produces a paragraph for a distribution list.
13726 \end_layout
13727
13728 \begin_layout Itemize
13729
13730 \family sans
13731 Encl
13732 \family default
13733 : produces a paragraph for enclosures.
13734 \end_layout
13735
13736 \begin_layout Standard
13737 The types 
13738 \family sans
13739 Name
13740 \family default
13741
13742 \family sans
13743 Signature
13744 \family default
13745
13746 \family sans
13747 Address
13748 \family default
13749
13750 \family sans
13751 Telephone
13752 \family default
13753
13754 \family sans
13755 Place
13756 \family default
13757
13758 \family sans
13759 Backaddress
13760 \family default
13761
13762 \family sans
13763 Specialmail
13764 \family default
13765
13766 \family sans
13767 Location
13768 \family default
13769
13770 \family sans
13771 Title
13772 \family default
13773 , and 
13774 \family sans
13775 Subject
13776 \family default
13777  are input types provided with a label to enter information, which will
13778  be processed by the document class.
13779 \begin_inset Foot
13780 status open
13781
13782 \begin_layout Plain Layout
13783 It could be seen as a matter of inconsequence, that the types 
13784 \family sans
13785 Letter
13786 \family default
13787  and 
13788 \family sans
13789 Opening
13790 \family default
13791  described above are not such input types as well.
13792  Because of the special meaning of those types, however, I have implemented
13793  them as ordinary paragraph types with a one letter mark in the left margin.
13794  Moreover, it would affect my feeling of symmetry, if the 
13795 \family sans
13796 Opening
13797 \family default
13798  type and the 
13799 \family sans
13800 Closing
13801 \family default
13802  type had such a serious different appearance.
13803 \end_layout
13804
13805 \end_inset
13806
13807  The types must be used ahead of the corresponding 
13808 \family sans
13809 Opening
13810 \family default
13811  type.
13812 \end_layout
13813
13814 \begin_layout Standard
13815 An implementation of these types in a WYSIWYG fashion does not seem to make
13816  sense, because the real appearance of the produced letter does not only
13817  depend on the usage of the particular type, but also on other factors.
13818  For example, a signature entered in the 
13819 \family sans
13820 Signature
13821 \family default
13822  type will in the standard behavior appear in the produced letter only,
13823  when in the same letter also a 
13824 \family sans
13825 Closing
13826 \family default
13827  type is used.
13828  The entered value of the 
13829 \family sans
13830 Telephone
13831 \family default
13832  type will in the standard behavior not appear in the produced letter at
13833  all.
13834  The possibility to design the letter`s heading freely is already indicated
13835  in a footnote above.
13836 \end_layout
13837
13838 \begin_layout Standard
13839 The input types can also be used as empty paragraphs.
13840  This makes sense e.
13841 \begin_inset space \thinspace{}
13842 \end_inset
13843
13844 g.
13845 \begin_inset space \space{}
13846 \end_inset
13847
13848 for the 
13849 \family sans
13850 Signature
13851 \family default
13852  type.
13853  If the 
13854 \family sans
13855 Signature
13856 \family default
13857  type is not used at all, in the standard behavior the value of the 
13858 \family sans
13859 Name
13860 \family default
13861  type is used as signature, whereas if an empty 
13862 \family sans
13863 Signature
13864 \family default
13865  type is used, no signature value is defined.
13866 \end_layout
13867
13868 \begin_layout Standard
13869 By using the input types it is possible to write a letter template, containing
13870  filled input types with your personal dates (name, address, etc.) and empty
13871  input types for other dates you want to enter.
13872 \end_layout
13873
13874 \begin_layout Itemize
13875
13876 \family sans
13877 Name
13878 \family default
13879 : sender's name, in the standard behavior appears as a centered paragraph
13880  in small caps in the letter`s heading.
13881 \end_layout
13882
13883 \begin_layout Itemize
13884
13885 \family sans
13886 Signature
13887 \family default
13888 : sender's signature, in the standard behavior appears below the 
13889 \family sans
13890 Closing
13891 \family default
13892  type.
13893  If no 
13894 \family sans
13895 Signature
13896 \family default
13897  type is used, the value of the 
13898 \family sans
13899 Name
13900 \family default
13901  type appears instead.
13902 \end_layout
13903
13904 \begin_layout Itemize
13905
13906 \family sans
13907 Address
13908 \family default
13909 : sender's address, in the standard behavior appears in a centered paragraph
13910  in the letter`s heading below the sender's name.
13911 \end_layout
13912
13913 \begin_layout Itemize
13914
13915 \family sans
13916 Telephone
13917 \family default
13918 : sender's telephone number, in the standard behavior only sets the LaTeX
13919  variable 
13920 \family typewriter
13921
13922 \backslash
13923 telephonenum
13924 \family default
13925 .
13926 \end_layout
13927
13928 \begin_layout Itemize
13929
13930 \family sans
13931 Place
13932 \family default
13933 : place of the letter`s making.
13934 \end_layout
13935
13936 \begin_layout Itemize
13937
13938 \family sans
13939 Date
13940 \family default
13941 : date of the letter`s making.
13942  
13943 \family sans
13944 Place
13945 \family default
13946  and 
13947 \family sans
13948 Date
13949 \family default
13950 , in the standard behavior, produce the place and the date in a right-aligned
13951  line below the addressee's field.
13952  If an empty 
13953 \family sans
13954 Date
13955 \family default
13956  type is used, neither place nor date appear, independent of the value of
13957  the 
13958 \family sans
13959 Place
13960 \family default
13961  type.
13962  If no 
13963 \family sans
13964 Date
13965 \family default
13966  type is used, the date of the letter `s production is used.
13967 \end_layout
13968
13969 \begin_layout Itemize
13970
13971 \family sans
13972 Backaddress
13973 \family default
13974 : sender`s back address, in the standard behavior appears above the addressee's
13975  field in a small sans serif font.
13976 \end_layout
13977
13978 \begin_layout Itemize
13979
13980 \family sans
13981 Specialmail
13982 \family default
13983 : special mail information, in the standard behavior appears underlined
13984  above the addressee's field below the back address.
13985 \end_layout
13986
13987 \begin_layout Itemize
13988
13989 \family sans
13990 Location
13991 \family default
13992 : additional information, in the standard behavior appears on right side
13993  below the addressee`s field.
13994 \end_layout
13995
13996 \begin_layout Itemize
13997
13998 \family sans
13999 Title
14000 \family default
14001 : the letter's title, in the standard behavior appears in a big, bold, sans
14002  serif font above the subject.
14003 \end_layout
14004
14005 \begin_layout Itemize
14006
14007 \family sans
14008 Subject
14009 \family default
14010 : the letter's subject, in the standard behavior appears in a bold font
14011  above the 
14012 \family sans
14013 Opening
14014 \family default
14015  paragraph.
14016 \end_layout
14017
14018 \begin_layout Standard
14019 The types 
14020 \family sans
14021 Yourref
14022 \family default
14023
14024 \family sans
14025 Yourmail
14026 \family default
14027
14028 \family sans
14029 Myref
14030 \family default
14031
14032 \family sans
14033 Customer
14034 \family default
14035 , and 
14036 \family sans
14037 Invoice
14038 \family default
14039  produce a business letter like line above the 
14040 \family sans
14041 Title
14042 \family default
14043  line containing the fields 
14044 \begin_inset Quotes eld
14045 \end_inset
14046
14047 Your ref.
14048 \begin_inset Quotes erd
14049 \end_inset
14050
14051
14052 \begin_inset Quotes eld
14053 \end_inset
14054
14055 Your letter of
14056 \begin_inset Quotes erd
14057 \end_inset
14058
14059
14060 \begin_inset Quotes eld
14061 \end_inset
14062
14063 Our ref.
14064 \begin_inset Quotes erd
14065 \end_inset
14066
14067
14068 \begin_inset Quotes eld
14069 \end_inset
14070
14071 Customer no.
14072 \begin_inset Quotes erd
14073 \end_inset
14074
14075
14076 \begin_inset Quotes eld
14077 \end_inset
14078
14079 Invoice no.
14080 \begin_inset Quotes erd
14081 \end_inset
14082
14083 , and 
14084 \begin_inset Quotes eld
14085 \end_inset
14086
14087 Date
14088 \begin_inset Quotes erd
14089 \end_inset
14090
14091 .
14092  For the date field, the value of the 
14093 \family sans
14094 Date
14095 \family default
14096  type is used.
14097  If one of these 
14098 \begin_inset Quotes eld
14099 \end_inset
14100
14101 business letter types
14102 \begin_inset Quotes erd
14103 \end_inset
14104
14105  is used, the value of the 
14106 \family sans
14107 Place
14108 \family default
14109  type however does not appear, but only the LaTeX variable 
14110 \family typewriter
14111
14112 \backslash
14113 fromplace
14114 \family default
14115  is set.
14116  The ordinary output of place and date in a right-aligned line below the
14117  addressee`s field is suppressed.
14118  The types are implemented as input types provided with a label and must
14119  be used ahead of the corresponding 
14120 \family sans
14121 Opening
14122 \family default
14123  type.
14124 \end_layout
14125
14126 \begin_layout Itemize
14127
14128 \family sans
14129 Yourref
14130 \family default
14131 : Your ref.
14132 \end_layout
14133
14134 \begin_layout Itemize
14135
14136 \family sans
14137 Yourmail
14138 \family default
14139 : Your letter of.
14140 \end_layout
14141
14142 \begin_layout Itemize
14143
14144 \family sans
14145 Myref
14146 \family default
14147 : Our ref.
14148 \end_layout
14149
14150 \begin_layout Itemize
14151
14152 \family sans
14153 Customer
14154 \family default
14155 : Customer no.
14156 \end_layout
14157
14158 \begin_layout Itemize
14159
14160 \family sans
14161 Invoice
14162 \family default
14163 : Invoice no.
14164 \end_layout
14165
14166 \begin_layout Subsection
14167 The new letter class: letter (koma-script v.2)
14168 \end_layout
14169
14170 \begin_layout Standard
14171 by 
14172 \noun on
14173 Jürgen Spitzmüller
14174 \end_layout
14175
14176 \begin_layout Standard
14177 \begin_inset VSpace medskip
14178 \end_inset
14179
14180
14181 \end_layout
14182
14183 \begin_layout Standard
14184 \noindent
14185 Koma-Script version 2.8 has introduced a new letter class 
14186 \family typewriter
14187 scrlttr2
14188 \family default
14189  which supersedes the now unsupported 
14190 \family typewriter
14191 scrlettr
14192 \family default
14193 .
14194  It has — on the LaTeX side — a completely new interface and is not compatible
14195  with the old class.
14196  Therefore, LyX supports both, though it is recommended you use the new
14197  class.
14198 \end_layout
14199
14200 \begin_layout Standard
14201 This class covers the same functionality as 
14202 \emph on
14203 letter (koma-script),
14204 \emph default
14205  and a few more.
14206  The basic items are 
14207 \family sans
14208 Address
14209 \family default
14210  (receiver's address, same as 
14211 \family sans
14212 Letter
14213 \family default
14214  in the old layout), 
14215 \family sans
14216 Opening
14217 \family default
14218 , and 
14219 \family sans
14220 Closing
14221 \family default
14222 .
14223  
14224 \family sans
14225 NextAddress
14226 \family default
14227  will start a new letter (i.
14228 \begin_inset space \thinspace{}
14229 \end_inset
14230
14231 g.
14232 \begin_inset space \space{}
14233 \end_inset
14234
14235 you can write several letters per document).
14236  New elements are sender's 
14237 \family sans
14238 E-Mail
14239 \family default
14240
14241 \family sans
14242 URL
14243 \family default
14244
14245 \family sans
14246 Fax
14247 \family default
14248
14249 \family sans
14250 Bank
14251 \family default
14252  and the possibility to use a 
14253 \family sans
14254 Logo
14255 \family default
14256  (via 
14257 \family sans
14258 Insert\SpecialChar \menuseparator
14259 Graphics
14260 \family default
14261 ) in the header.
14262 \end_layout
14263
14264 \begin_layout Standard
14265 The biggest improvement is, though, that the letter's layout is configurable
14266  to meet almost any needs.
14267  This can be done via the preamble or with a special style file (Letter
14268  Class Option, extension 
14269 \family typewriter
14270 *.lco
14271 \family default
14272 ), that will be read in as a class option.
14273 \begin_inset Foot
14274 status collapsed
14275
14276 \begin_layout Plain Layout
14277 The KOMA package comes with some default 
14278 \family typewriter
14279 *.lco
14280 \family default
14281  files.
14282  There is, for instance, a 
14283 \family typewriter
14284 DIN.lco
14285 \family default
14286  file that follows german typesetting rules, or a 
14287 \family typewriter
14288 KOMAold.lco
14289 \family default
14290  that provides the default layout of the old 
14291 \family typewriter
14292 scrlettr
14293 \family default
14294  class.
14295  The latter can be loaded with the class option 
14296 \family typewriter
14297 KOMAold
14298 \family default
14299 , inserted via the 
14300 \family sans
14301 \bar under
14302 L
14303 \bar default
14304 ayout\SpecialChar \menuseparator
14305
14306 \bar under
14307 D
14308 \bar default
14309 ocument\SpecialChar \menuseparator
14310 Extra Options
14311 \family default
14312  field.
14313 \end_layout
14314
14315 \end_inset
14316
14317  Have a look at the 
14318 \emph on
14319 koma-letter2
14320 \emph default
14321  template that is included in LyX for examples.
14322  A detailed description is to be found in the Koma-Script documentation
14323  (
14324 \emph on
14325 scrguide
14326 \emph default
14327 ).
14328 \end_layout
14329
14330 \begin_layout Subsection
14331 Problems
14332 \end_layout
14333
14334 \begin_layout Standard
14335 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14336  some problems.
14337 \end_layout
14338
14339 \begin_layout Itemize
14340 The chapter number of a 
14341 \family sans
14342 Chapter
14343 \family default
14344  type appears on a line of its own above the chapter heading instead of
14345  appearing in the same line ahead of it.
14346  The cause for that is the LyX internal behavior for the labeltype 
14347 \family sans
14348 Counter_Chapter
14349 \family default
14350  in the layout file.
14351 \end_layout
14352
14353 \begin_layout Itemize
14354 The headings of the types 
14355 \family sans
14356 Addchap
14357 \family default
14358  and 
14359 \family sans
14360 Addsec
14361 \family default
14362  are only put in the 
14363 \begin_inset Quotes eld
14364 \end_inset
14365
14366 true
14367 \begin_inset Quotes erd
14368 \end_inset
14369
14370  LaTeX table of contents, but not in the LyX table of contents (
14371 \family sans
14372 Document\SpecialChar \menuseparator
14373 Table
14374 \begin_inset space ~
14375 \end_inset
14376
14377 of
14378 \begin_inset space ~
14379 \end_inset
14380
14381 Contents
14382 \family default
14383 ).
14384 \end_layout
14385
14386 \begin_layout Itemize
14387 The paragraphs in a 
14388 \emph on
14389 letter
14390 \emph default
14391  document class appear in a skip separation mode, not indented.
14392  This is the standard behavior, no special LaTeX commands are needed for
14393  that.
14394  But in the 
14395 \family sans
14396 Document\SpecialChar \menuseparator
14397 Settings
14398 \family default
14399  dialog the corresponding radio button indicates 
14400 \family sans
14401 Indent
14402 \family default
14403 .
14404  A 
14405 \family sans
14406 Skip
14407 \family default
14408  value always has the effect that extra LaTeX commands are inserted in the
14409  document to produce the gap, which is not what is wanted in this case.
14410 \end_layout
14411
14412 \begin_layout Section
14413 Latex8 (IEEE Conference Papers)
14414 \end_layout
14415
14416 \begin_layout Standard
14417 by 
14418 \noun on
14419 Allan Rae
14420 \end_layout
14421
14422 \begin_layout Subsection
14423 Introduction
14424 \end_layout
14425
14426 \begin_layout Standard
14427 Since this class is specifically for writing submissions to IEEE sponsored
14428  conferences I strongly recommend that you get a copy of their Authors Kit.
14429  The 
14430 \family sans
14431 latex.sty
14432 \family default
14433  package and associated bibliography style file is included in the kit.
14434  The Authors Kit is usually sent out by email once your initial submission
14435  has been accepted.
14436  There is a lot of useful information in the Authors Kit explaining formatting
14437  restrictions and so on and I will assume you have read this since that
14438  means I don't have to repeat it all here.
14439 \end_layout
14440
14441 \begin_layout Subsection
14442 Getting Started
14443 \end_layout
14444
14445 \begin_layout Standard
14446 [AR\SpecialChar \@.
14447  more to come]
14448 \end_layout
14449
14450 \begin_layout Subsection
14451 Supported Environments
14452 \end_layout
14453
14454 \begin_layout Itemize
14455
14456 \family sans
14457 Standard
14458 \end_layout
14459
14460 \begin_layout Itemize
14461
14462 \family sans
14463 Title
14464 \end_layout
14465
14466 \begin_layout Itemize
14467
14468 \family sans
14469 Author
14470 \end_layout
14471
14472 \begin_layout Itemize
14473
14474 \family sans
14475 E-mail
14476 \end_layout
14477
14478 \begin_layout Itemize
14479
14480 \family sans
14481 Affiliation
14482 \end_layout
14483
14484 \begin_layout Itemize
14485
14486 \family sans
14487 Abstract
14488 \end_layout
14489
14490 \begin_layout Itemize
14491
14492 \family sans
14493 Section
14494 \end_layout
14495
14496 \begin_layout Itemize
14497
14498 \family sans
14499 SubSection
14500 \end_layout
14501
14502 \begin_layout Itemize
14503
14504 \family sans
14505 Caption
14506 \end_layout
14507
14508 \begin_layout Subsection
14509 Differences Between Screen and Paper
14510 \end_layout
14511
14512 \begin_layout Standard
14513 There are slight differences in appearance mainly with the presentation
14514  of section counters.
14515  On screen the trailing period of the section counter is missing but it
14516  will appear in the output so don't let this worry you.
14517 \end_layout
14518
14519 \begin_layout Section
14520 Memoir
14521 \end_layout
14522
14523 \begin_layout Standard
14524 By 
14525 \noun on
14526 Jürgen Spitzmüller
14527 \end_layout
14528
14529 \begin_layout Subsection
14530 Overview
14531 \end_layout
14532
14533 \begin_layout Standard
14534 Memoir is a very powerful and constantly evolving class.
14535  It has been designed with regard to fictional and non-fictional literature.
14536  Its aim is to let the user have maximum control over the typesetting of
14537  his document.
14538  Memoir is based on the standard book class, but it can also emulate the
14539  article class (see below).
14540 \end_layout
14541
14542 \begin_layout Standard
14543 Peter Wilson, the developer of Memoir, is known as the author of lots of
14544  useful packages in the LaTeX world.
14545  Most of them have been merged with Memoir.
14546  Therefore, it is much easier to layout the table of contents, appendices,
14547  chapter designs and such.
14548  LyX, though, does not support all of these goodies natively.
14549  Some of them might be added to forthcoming releases
14550 \begin_inset Foot
14551 status collapsed
14552
14553 \begin_layout Plain Layout
14554 You are invited to send suggestions to 
14555 \begin_inset Flex URL
14556 status collapsed
14557
14558 \begin_layout Plain Layout
14559
14560 lyx-devel@lists.lyx.org
14561 \end_layout
14562
14563 \end_inset
14564
14565 .
14566 \end_layout
14567
14568 \end_inset
14569
14570 , lots will probably never, due to the limitations of LyX's framework.
14571  Of course you can still use all features with the help of some native LaTeX
14572  commands (TeX code
14573 \begin_inset Foot
14574 status collapsed
14575
14576 \begin_layout Plain Layout
14577 Cf.
14578 \begin_inset ERT
14579 status collapsed
14580
14581 \begin_layout Plain Layout
14582
14583
14584 \backslash
14585  
14586 \end_layout
14587
14588 \end_inset
14589
14590 section
14591 \begin_inset space ~
14592 \end_inset
14593
14594
14595 \begin_inset CommandInset ref
14596 LatexCommand ref
14597 reference "sec:Inserting-TeX-Code"
14598
14599 \end_inset
14600
14601  for details.
14602 \end_layout
14603
14604 \end_inset
14605
14606 ).
14607  In this section, we can only list those features which are natively supported
14608  by LyX.
14609  For detailed descriptions (and for the rest of features) we recommend you
14610  have a look at the detailed manual of the Memoir class
14611 \begin_inset Foot
14612 status collapsed
14613
14614 \begin_layout Plain Layout
14615 Cf.
14616 \begin_inset ERT
14617 status collapsed
14618
14619 \begin_layout Plain Layout
14620
14621
14622 \backslash
14623  
14624 \end_layout
14625
14626 \end_inset
14627
14628
14629 \begin_inset Flex URL
14630 status collapsed
14631
14632 \begin_layout Plain Layout
14633
14634 CTAN:/macros/latex/memoir/memman.pdf
14635 \end_layout
14636
14637 \end_inset
14638
14639 .
14640 \end_layout
14641
14642 \end_inset
14643
14644 , which is not only a user guide for the class, but also both a comprehensive
14645  description on good typesetting and a superb example for good typesetting
14646  itself.
14647 \end_layout
14648
14649 \begin_layout Subsection
14650 Basic features and restrictions
14651 \end_layout
14652
14653 \begin_layout Standard
14654 Memoir supports basically all features of the standard book classes.
14655  There are, however, some differences, as follows:
14656 \end_layout
14657
14658 \begin_layout Description
14659 Font
14660 \begin_inset space ~
14661 \end_inset
14662
14663 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14664 \end_layout
14665
14666 \begin_layout Description
14667 Page
14668 \begin_inset space ~
14669 \end_inset
14670
14671 style: The fancy page style is not supported, due to a command clash between
14672  Memoir and the fancyhdr package (they both define a command with the same
14673  name, which confuses LaTeX).
14674  Instead, Memoir comes with a number of its own page styles (see 
14675 \family sans
14676 Layout\SpecialChar \menuseparator
14677 Document\SpecialChar \menuseparator
14678 Page
14679 \begin_inset space ~
14680 \end_inset
14681
14682 Style
14683 \family default
14684 ).
14685  If you want to use these for the chapter pages, you have to use the command
14686  
14687 \family typewriter
14688
14689 \backslash
14690 chapterstyle
14691 \family default
14692  in the main text or in preamble (e.
14693 \begin_inset space \thinspace{}
14694 \end_inset
14695
14696 g.
14697 \begin_inset space \space{}
14698 \end_inset
14699
14700
14701 \family typewriter
14702
14703 \backslash
14704 chapterstyle{companion}
14705 \family default
14706 ).
14707 \end_layout
14708
14709 \begin_layout Description
14710 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14711  optional argument in the standard classes.
14712  With this, you can specify an alternative version of the title for the
14713  table of contents and the headers (for instance, if the title is too long).
14714  In LyX, you can do this via 
14715 \family sans
14716 Insert\SpecialChar \menuseparator
14717 Short
14718 \begin_inset space ~
14719 \end_inset
14720
14721 Title
14722 \family default
14723  at the beginning of a chapter/section.
14724  Memoir features a second optional argument and thus separates the table
14725  of contents from the header.
14726  You can define three variants of a title with this: one for the main text,
14727  one for the table of contents, and one for the headers.
14728  Simply insert two optional arguments if you need this feature, the first
14729  one containing the short title for the Table of Contents, the second one
14730  containing an alternative short title for the headers.
14731 \end_layout
14732
14733 \begin_layout Description
14734 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14735  of contents, the list of figures and the list of table start a new page
14736  automatically.
14737  Memoir does not follow this route.
14738  You have to insert a page break yourself, if you want to have one.
14739 \end_layout
14740
14741 \begin_layout Description
14742 Titlepage: For some unknown reason, Memoir uses pagination on the title
14743  page (in the standard classes, title pages are 
14744 \begin_inset Quotes eld
14745 \end_inset
14746
14747 empty
14748 \begin_inset Quotes erd
14749 \end_inset
14750
14751 , i.
14752 \begin_inset space \thinspace{}
14753 \end_inset
14754
14755 g.
14756 \begin_inset space \space{}
14757 \end_inset
14758
14759 without pagina).
14760  If you want an empty title page, type 
14761 \family typewriter
14762
14763 \backslash
14764 aliaspagestyle{title}{empty}
14765 \family default
14766  in the preamble.
14767 \end_layout
14768
14769 \begin_layout Description
14770 Article: With the class option 
14771 \emph on
14772 article
14773 \emph default
14774  (to be inserted in 
14775 \family sans
14776 Layout\SpecialChar \menuseparator
14777 Document\SpecialChar \menuseparator
14778 Extra
14779 \begin_inset space ~
14780 \end_inset
14781
14782 Options
14783 \family default
14784 ), you can emulate article style.
14785  That is, counters (footnotes, figures, tables etc.) will not be reset on
14786  new chapters, chapters don't start a new page (but are—in contrary to 
14787 \begin_inset Quotes eld
14788 \end_inset
14789
14790 real
14791 \begin_inset Quotes erd
14792 \end_inset
14793
14794  article classes—still allowed), parts, though, use their own page, as in
14795  book.
14796 \end_layout
14797
14798 \begin_layout Description
14799 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14800  font commands, which have been used in the old LaTeX version 2.09 (e.
14801 \begin_inset space \thinspace{}
14802 \end_inset
14803
14804 g.
14805 \begin_inset space \space{}
14806 \end_inset
14807
14808
14809 \family typewriter
14810
14811 \backslash
14812 rm
14813 \family default
14814
14815 \family typewriter
14816
14817 \backslash
14818 it
14819 \family default
14820 ).
14821  It produces an error and stops LaTeX whenever such a command appears.
14822  The class option 
14823 \emph on
14824 oldfontcommands
14825 \emph default
14826  reallows the commands and spits out warnings instead (which does at least
14827  not stop LaTeX).
14828  Since a lot of packages and particularly BibTeX style files are still using
14829  those commands, we have decided to use this option by default.
14830 \end_layout
14831
14832 \begin_layout Subsection
14833 Extra features
14834 \end_layout
14835
14836 \begin_layout Standard
14837 We will only describe the features supported by LyX (which is not much currently
14838 ).
14839  Please consult the Memoir manual
14840 \begin_inset Foot
14841 status collapsed
14842
14843 \begin_layout Plain Layout
14844 Cf.
14845 \begin_inset ERT
14846 status collapsed
14847
14848 \begin_layout Plain Layout
14849
14850
14851 \backslash
14852  
14853 \end_layout
14854
14855 \end_inset
14856
14857
14858 \begin_inset Flex URL
14859 status collapsed
14860
14861 \begin_layout Plain Layout
14862
14863 CTAN:/macros/latex/memoir/memman.pdf
14864 \end_layout
14865
14866 \end_inset
14867
14868 .
14869 \end_layout
14870
14871 \end_inset
14872
14873  for details.
14874 \end_layout
14875
14876 \begin_layout Description
14877 Abstract: You may wonder why an abstract is an extra feature.
14878  Well, it is in book class.
14879  Usually books don't have abstracts.
14880  Memoir, however, has.
14881  You can use it wherever and how often you like.
14882 \end_layout
14883
14884 \begin_layout Description
14885 Chapterprecis: You may know this older typesetting style: The contents of
14886  a chapter are summarized below the title and also in the table of contents
14887  (e.
14888 \begin_inset space \thinspace{}
14889 \end_inset
14890
14891 g.
14892 \begin_inset space \space{}
14893 \end_inset
14894
14895
14896 \emph on
14897 Our hero arrives in Troia; he loses some friends; he finds others
14898 \emph default
14899 ).
14900  Chapterprecis does exactly this.
14901  It is therefore only sensible below a chapter.
14902 \end_layout
14903
14904 \begin_layout Description
14905 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14906  The epigraph environment provides an elegant way of typesetting such a
14907  motto.
14908  The motto itself (text) and its author (source) are divided by a short
14909  line.
14910  Unfortunately, we have to fool LyX a bit here again, since the environment
14911  needs two arguments (text and source).
14912  In this case, we have to use curly brackets (in TeX mode) between the two
14913  arguments: 
14914 \emph on
14915 <smart slogan>
14916 \emph default
14917  
14918 \family typewriter
14919 }{
14920 \family default
14921  
14922 \emph on
14923 <author of the slogan>.
14924 \end_layout
14925
14926 \begin_layout Description
14927 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14928  complex figurative poems).
14929  LyX can only support a few of them.
14930  One is poemtitle, which is a centered title for poems, which will also
14931  be added to the table of contents (verse is the standard environment for
14932  poems.
14933  Memoir has some enhanced versions of verse, but you need to use TeX code,
14934  because they have to be nested inside regular verse environments, which
14935  is not possible with LyX).
14936 \end_layout
14937
14938 \begin_layout Description
14939 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14940 \end_layout
14941
14942 \begin_layout Section
14943 Article (mwart), book (mwbk) and report (mwrep)
14944 \begin_inset Argument
14945 status collapsed
14946
14947 \begin_layout Plain Layout
14948 The 
14949 \family typewriter
14950 mw
14951 \family default
14952  Classes
14953 \end_layout
14954
14955 \end_inset
14956
14957
14958 \end_layout
14959
14960 \begin_layout Standard
14961 by 
14962 \noun on
14963 Tomasz Luczak
14964 \end_layout
14965
14966 \begin_layout Standard
14967 The LyX document classes 
14968 \emph on
14969 article (mwart)
14970 \emph default
14971
14972 \emph on
14973 report (mwrep)
14974 \emph default
14975  and 
14976 \emph on
14977 book
14978 \emph default
14979  
14980 \emph on
14981 (mwbk)
14982 \emph default
14983  correspond to the LaTeX document classes 
14984 \family typewriter
14985 mwart.cls
14986 \family default
14987
14988 \family typewriter
14989 mwrep.cls
14990 \family default
14991  and 
14992 \family typewriter
14993 mwbk.cls
14994 \family default
14995 , resp.
14996  They are replacements for the standard document classes 
14997 \family typewriter
14998 article.cls
14999 \family default
15000
15001 \family typewriter
15002 report.cls
15003 \family default
15004  and 
15005 \family typewriter
15006 book.cls
15007 \family default
15008 , resp., and fit better to Polish typography conventions in a number of points.
15009  
15010 \end_layout
15011
15012 \begin_layout Standard
15013 Basic differences:
15014 \end_layout
15015
15016 \begin_layout Itemize
15017 Unnumbered titles (with star, e.
15018 \begin_inset space \thinspace{}
15019 \end_inset
15020
15021 g.
15022 \begin_inset space \space{}
15023 \end_inset
15024
15025
15026 \family sans
15027 Section*
15028 \family default
15029 ) are added into table of contents,
15030 \end_layout
15031
15032 \begin_layout Itemize
15033 Additional page styles:
15034 \end_layout
15035
15036 \begin_deeper
15037 \begin_layout Description
15038 uheadings header with separated lines,
15039 \end_layout
15040
15041 \begin_layout Description
15042 myheadings custom header, contents headers via commands: 
15043 \family typewriter
15044
15045 \backslash
15046 markright
15047 \family default
15048  and 
15049 \family typewriter
15050
15051 \backslash
15052 markboth
15053 \family default
15054 ,
15055 \end_layout
15056
15057 \begin_layout Description
15058 myuheadings custom header with separated lines,
15059 \end_layout
15060
15061 \begin_layout Description
15062 outer page number is placed on outer side of page
15063 \end_layout
15064
15065 \end_deeper
15066 \begin_layout Itemize
15067 Options 
15068 \end_layout
15069
15070 \begin_deeper
15071 \begin_layout Description
15072 rmheadings serif titles — default,
15073 \end_layout
15074
15075 \begin_layout Description
15076 sfheadings sansserif titles,
15077 \end_layout
15078
15079 \begin_layout Description
15080 authortitle on title page first placed is author next title — default,
15081 \end_layout
15082
15083 \begin_layout Description
15084 titleauthor on title page first placed is title next author,
15085 \end_layout
15086
15087 \begin_layout Description
15088 withmarginpar reserve place on page for margins.
15089 \end_layout
15090
15091 \end_deeper
15092 \begin_layout Section
15093 Paper
15094 \end_layout
15095
15096 \begin_layout Standard
15097 The document class 
15098 \family sans
15099 paper
15100 \family default
15101  provides an alternative to the standard 
15102 \family sans
15103 article
15104 \family default
15105  class.
15106  It provides similar functionality, but you might prefer this layout with
15107  sans serif sections, headings, and more.
15108 \end_layout
15109
15110 \begin_layout Section
15111 RevTeX4
15112 \end_layout
15113
15114 \begin_layout Standard
15115 by 
15116 \noun on
15117 Amir Karger
15118 \end_layout
15119
15120 \begin_layout Standard
15121 \begin_inset VSpace bigskip
15122 \end_inset
15123
15124
15125 \end_layout
15126
15127 \begin_layout Standard
15128 \noindent
15129 The 
15130 \family sans
15131 Revtex
15132 \begin_inset space ~
15133 \end_inset
15134
15135 4
15136 \family default
15137  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15138 \begin_inset Formula $\beta$
15139 \end_inset
15140
15141  release of May, 1999) class.
15142 \end_layout
15143
15144 \begin_layout Standard
15145 LyX has a 
15146 \family sans
15147 Revtex
15148 \family default
15149  textclass, which works with RevTeX 3.1.
15150  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15151  That means that it doesn't interact very well with LyX, which requires
15152  LaTeX2e, although it has been kludged to work.
15153  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15154  LyX with the 
15155 \family sans
15156 RevTeX
15157 \begin_inset space ~
15158 \end_inset
15159
15160 4
15161 \family default
15162  textclass should also be pretty easy to use.
15163 \end_layout
15164
15165 \begin_layout Standard
15166 These documents are supposed to be used in 
15167 \emph on
15168 addition
15169 \emph default
15170  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15171  macros, and assume you'll know what to put in the preamble if necessary.
15172 \end_layout
15173
15174 \begin_layout Subsection
15175 Installation
15176 \end_layout
15177
15178 \begin_layout Standard
15179 All you need to do is install RevTeX 4, as described in the package's README
15180  file.
15181  The package can be found at The RevTeX 4 Web Site 
15182 \begin_inset Flex URL
15183 status collapsed
15184
15185 \begin_layout Plain Layout
15186
15187 http://publish.aps.org/revtex4/
15188 \end_layout
15189
15190 \end_inset
15191
15192 .
15193  Install it somewhere that LaTeX can see it.
15194  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15195  (i.
15196 \begin_inset space \thinspace{}
15197 \end_inset
15198
15199 g.
15200 \begin_inset space \space{}
15201 \end_inset
15202
15203 not the directory where you installed the class file.) Then, if you reconfigure
15204  LyX, it will find the class file and let you use the RevTeX4 textclass.
15205 \end_layout
15206
15207 \begin_layout Standard
15208 Probably the easiest way to get started is either to import a RevTeX 4 document
15209  using 
15210 \family typewriter
15211 tex2lyx
15212 \family default
15213 , or to use the 
15214 \family sans
15215 Revtex
15216 \begin_inset space ~
15217 \end_inset
15218
15219 4
15220 \family default
15221  template, found in the templates directory.
15222 \end_layout
15223
15224 \begin_layout Subsection
15225 Preamble Matter
15226 \end_layout
15227
15228 \begin_layout Standard
15229 Optional arguments to 
15230 \family typewriter
15231
15232 \backslash
15233 documentclass
15234 \family default
15235 , like 
15236 \begin_inset Quotes eld
15237 \end_inset
15238
15239 preprint
15240 \begin_inset Quotes erd
15241 \end_inset
15242
15243  and 
15244 \begin_inset Quotes eld
15245 \end_inset
15246
15247 aps
15248 \begin_inset Quotes erd
15249 \end_inset
15250
15251 , go in the 
15252 \family sans
15253 E
15254 \bar under
15255 x
15256 \bar default
15257 tra
15258 \begin_inset space ~
15259 \end_inset
15260
15261 Options
15262 \family default
15263  field in the 
15264 \family sans
15265 Document
15266 \begin_inset space ~
15267 \end_inset
15268
15269 Layout
15270 \family default
15271  dialog, as usual.
15272  Remember that in RevTeX, at least one optional argument is required! 
15273 \end_layout
15274
15275 \begin_layout Standard
15276 Other preamble matter, like 
15277 \family typewriter
15278
15279 \backslash
15280 draft
15281 \family default
15282  etc.
15283 \begin_inset space ~
15284 \end_inset
15285
15286 goes in the 
15287 \family sans
15288 LaTeX
15289 \begin_inset space ~
15290 \end_inset
15291
15292 Preamble
15293 \family default
15294  dialog, also as usual.
15295 \end_layout
15296
15297 \begin_layout Subsection
15298 Layouts
15299 \end_layout
15300
15301 \begin_layout Standard
15302 The layouts basically correspond to the commands in RevTeX4.0.
15303  For example, the Email layout corresponds to 
15304 \family typewriter
15305
15306 \backslash
15307 email{}
15308 \family default
15309 .
15310  Note that (at least as of RevTeX 4.0 Beta), the 
15311 \family sans
15312 Address
15313 \family default
15314  and 
15315 \family sans
15316 Affiliation
15317 \family default
15318  layouts are exactly equivalent, so you shouldn't need to use both.
15319 \begin_inset Foot
15320 status collapsed
15321
15322 \begin_layout Plain Layout
15323 In case you're curious, both were included so that 
15324 \family typewriter
15325 tex2lyx
15326 \family default
15327  would be able to translate both 
15328 \family typewriter
15329
15330 \backslash
15331 address
15332 \family default
15333  and 
15334 \family typewriter
15335
15336 \backslash
15337 affiliation
15338 \family default
15339 .
15340 \end_layout
15341
15342 \end_inset
15343
15344
15345 \end_layout
15346
15347 \begin_layout Subsection
15348 Important Notes
15349 \end_layout
15350
15351 \begin_layout Standard
15352 There are a couple of important unique aspects of RevTeX 4 which might cause
15353  bugs that will be even more confusing in LyX.
15354 \end_layout
15355
15356 \begin_layout Standard
15357 In RevTeX, the 
15358 \family typewriter
15359
15360 \backslash
15361 thanks
15362 \family default
15363  command goes 
15364 \emph on
15365 outside
15366 \emph default
15367  the 
15368 \family typewriter
15369
15370 \backslash
15371 author
15372 \family default
15373  command.
15374  The LyX equivalent is that there is a separate Thanks layout.
15375  Do 
15376 \emph on
15377 not
15378 \emph default
15379  write footnotes in the 
15380 \family sans
15381 Author
15382 \family default
15383  layout, or weird things may happen.
15384  See the RevTeX 4 documentation for more details.
15385 \end_layout
15386
15387 \begin_layout Standard
15388 Also, the 
15389 \family sans
15390 Author
15391 \begin_inset space ~
15392 \end_inset
15393
15394 Email
15395 \family default
15396
15397 \family sans
15398 Author
15399 \begin_inset space ~
15400 \end_inset
15401
15402 URL
15403 \family default
15404 , and 
15405 \family sans
15406 Thanks
15407 \family default
15408  layouts must be placed 
15409 \emph on
15410 in between
15411 \emph default
15412  the 
15413 \family sans
15414 Author
15415 \family default
15416  layout and the corresponding 
15417 \family sans
15418 Address
15419 \family default
15420  (or equivalent 
15421 \family sans
15422 Affiliation
15423 \family default
15424 ) layout.
15425  If you put the 
15426 \family sans
15427 Thanks
15428 \family default
15429  after the 
15430 \family sans
15431 Address
15432 \family default
15433 , the LaTeX won't compile.
15434 \end_layout
15435
15436 \begin_layout Subsection
15437 Drawbacks
15438 \end_layout
15439
15440 \begin_layout Standard
15441 The main problem with this layout is that you can't use the optional arguments
15442  to layouts like Email and Title.
15443  (The problem is not unique to this layout; you can't use optional arguments
15444  to the Section layouts either.) This means that after you export that file
15445  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15446  need to edit the LaTeX file with a text editor to add the optional arguments
15447  to set, e.
15448 \begin_inset space \thinspace{}
15449 \end_inset
15450
15451 g.
15452 \begin_inset space \space{}
15453 \end_inset
15454
15455 the running title for the page headers.
15456  Lacking these layouts makes the 
15457 \family typewriter
15458
15459 \backslash
15460 altaffiliation
15461 \family default
15462  (and the equivalent 
15463 \family typewriter
15464
15465 \backslash
15466 altaddress
15467 \family default
15468 ) useless, so the corresponding layouts don't exist, and will have to be
15469  added by hand.
15470 \begin_inset Foot
15471 status collapsed
15472
15473 \begin_layout Plain Layout
15474
15475 \emph on
15476 Note from JMarc:
15477 \emph default
15478  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15479  has not been updated yet to take advantage of it.
15480 \end_layout
15481
15482 \end_inset
15483
15484  
15485 \end_layout
15486
15487 \begin_layout Section
15488 Springer Journals (
15489 \family sans
15490 svjour
15491 \family default
15492 )
15493 \end_layout
15494
15495 \begin_layout Standard
15496 by 
15497 \noun on
15498 Martin Vermeer
15499 \end_layout
15500
15501 \begin_layout Subsection
15502 Description
15503 \end_layout
15504
15505 \begin_layout Standard
15506 These are the layout files for some of the journal formats used by Springer
15507  Verlag and listed on 
15508 \begin_inset Flex URL
15509 status collapsed
15510
15511 \begin_layout Plain Layout
15512
15513 http://www.springer.de/author/tex/help-journals.html
15514 \end_layout
15515
15516 \end_inset
15517
15518 , where you should also go to fetch the class files (yes, these are LaTeX2e
15519  now!).
15520  It is a modular system: the things common to all journals are implemented
15521  in 
15522 \family typewriter
15523 svjour.inc
15524 \family default
15525 , which journal-specific layout files (such as, e.
15526 \begin_inset space \thinspace{}
15527 \end_inset
15528
15529 g.
15530 \begin_inset space \space{}
15531 \end_inset
15532
15533
15534 \family typewriter
15535 svjog.layout
15536 \family default
15537  for Journal of Geodesy) can include.
15538 \end_layout
15539
15540 \begin_layout Standard
15541 This means that implementing support for any other Springer journal on this
15542  list is as simple as writing your own 
15543 \family typewriter
15544 sv
15545 \family default
15546 <myjournal>
15547 \family typewriter
15548 .layout
15549 \family default
15550  file following the outline given in 
15551 \family typewriter
15552 svjog.layout
15553 \family default
15554 .
15555  
15556 \end_layout
15557
15558 \begin_layout Standard
15559 It is reasonably well tested only for the Journal of Geodesy.
15560  
15561 \family typewriter
15562 svjour
15563 \family default
15564  and 
15565 \family typewriter
15566 svjog
15567 \family default
15568  come with the standard LyX distribution.
15569  Install the relevant class file (downloaded from Springer) in a proper
15570  directory, reconfigure LaTeX (in the teTeX case by running 
15571 \family typewriter
15572 texhash
15573 \family default
15574 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15575  and it should work.
15576 \end_layout
15577
15578 \begin_layout Subsection
15579 New styles
15580 \end_layout
15581
15582 \begin_layout Standard
15583 A large number of theorem-like styles — 
15584 \family sans
15585 Claim, Conjecture,
15586 \family default
15587  
15588 \family sans
15589 \SpecialChar \ldots{}
15590 Theorem
15591 \family default
15592 .
15593 \end_layout
15594
15595 \begin_layout Standard
15596
15597 \family sans
15598 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15599  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15600 \family default
15601 .
15602  See the Springer class file documentation for details.
15603 \end_layout
15604
15605 \begin_layout Subsection
15606 Supported journals
15607 \end_layout
15608
15609 \begin_layout Itemize
15610
15611 \emph on
15612 Journal of Geodesy
15613 \emph default
15614
15615 \family typewriter
15616 svjog.layout
15617 \family default
15618  — Martin Vermeer
15619 \end_layout
15620
15621 \begin_layout Itemize
15622
15623 \emph on
15624 Probability Theory and Related Fields
15625 \emph default
15626
15627 \family typewriter
15628 svprobth.layout
15629 \family default
15630  — Jean-Marc Lasgouttes
15631 \end_layout
15632
15633 \begin_layout Standard
15634 Add your own, it isn't so hard!
15635 \end_layout
15636
15637 \begin_layout Subsection
15638 Credits
15639 \end_layout
15640
15641 \begin_layout Standard
15642 These files are partly based on the older 
15643 \family typewriter
15644 ejour2.layout
15645 \family default
15646 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15647  file from Springer.
15648  All this, and the 
15649 \family typewriter
15650 ejour2
15651 \family default
15652  layout, are now defunct.
15653  Jean-Marc Lasgouttes helped out big in making me find my way around the
15654  LyX layout file mechanism.
15655 \end_layout
15656
15657 \begin_layout Subsection
15658 Bugs
15659 \end_layout
15660
15661 \begin_layout Standard
15662 Probably.
15663  But probably less than in the old hacked-LaTeX 
15664 \family typewriter
15665 ejour2
15666 \family default
15667 .
15668 \end_layout
15669
15670 \begin_layout Standard
15671 Limitations e.
15672 \begin_inset space \thinspace{}
15673 \end_inset
15674
15675 g.: does not display the number for theorem-like layouts, just #.
15676 \end_layout
15677
15678 \begin_layout Section
15679 Slides [aka 
15680 \noun on
15681 SliTeX
15682 \noun default
15683 ]
15684 \begin_inset CommandInset label
15685 LatexCommand label
15686 name "sec:slitex"
15687
15688 \end_inset
15689
15690
15691 \end_layout
15692
15693 \begin_layout Standard
15694 by 
15695 \noun on
15696 John Weiss
15697 \noun default
15698  
15699 \end_layout
15700
15701 \begin_layout Subsection
15702 Introduction
15703 \end_layout
15704
15705 \begin_layout Standard
15706 This section describes how to use LyX to make slides for overhead projectors.
15707  There are two document classes that can do this: the default slides class
15708  and the 
15709 \family sans
15710 FoilTeX
15711 \family default
15712  slides class.
15713  This section documents the former.
15714 \end_layout
15715
15716 \begin_layout Standard
15717 I'm going to say this again, nice and clear, so that there's no misunderstanding
15718 :
15719 \end_layout
15720
15721 \begin_layout Standard
15722 \begin_inset VSpace bigskip
15723 \end_inset
15724
15725
15726 \end_layout
15727
15728 \begin_layout Standard
15729 \align center
15730
15731 \size large
15732 This section documents the class 
15733 \begin_inset Quotes eld
15734 \end_inset
15735
15736
15737 \family sans
15738 slides (default)
15739 \family default
15740
15741 \begin_inset Quotes erd
15742 \end_inset
15743
15744  
15745 \emph on
15746 only.
15747 \end_layout
15748
15749 \begin_layout Standard
15750 \begin_inset VSpace bigskip
15751 \end_inset
15752
15753
15754 \end_layout
15755
15756 \begin_layout Standard
15757 If you're looking for the documentation for 
15758 \begin_inset Quotes eld
15759 \end_inset
15760
15761
15762 \family sans
15763 slides (FoilTeX)
15764 \family default
15765
15766 \begin_inset Quotes erd
15767 \end_inset
15768
15769 , check out section
15770 \begin_inset space ~
15771 \end_inset
15772
15773
15774 \begin_inset CommandInset ref
15775 LatexCommand ref
15776 reference "sec:foiltex"
15777
15778 \end_inset
15779
15780 .
15781  The 
15782 \family sans
15783 foils
15784 \family default
15785  class [
15786 \begin_inset Quotes eld
15787 \end_inset
15788
15789
15790 \family sans
15791 slides (FoilTeX)
15792 \family default
15793
15794 \begin_inset Quotes erd
15795 \end_inset
15796
15797 ] is actually somewhat better than the default 
15798 \family sans
15799 slides
15800 \family default
15801  class,
15802 \begin_inset Foot
15803 status collapsed
15804
15805 \begin_layout Plain Layout
15806 \SpecialChar \ldots{}
15807 or so I've been told repeatedly by its advocates.
15808  Having never used it, I have no idea if this claim is true or not.
15809 \end_layout
15810
15811 \end_inset
15812
15813  which this section documents.
15814 \end_layout
15815
15816 \begin_layout Standard
15817 This class is the LaTeX2e improvement of the old 
15818 \noun on
15819 SliTeX
15820 \noun default
15821  package.
15822  Every LaTeX2e distribution includes this class [which I'll just refer to
15823  as 
15824 \begin_inset Quotes eld
15825 \end_inset
15826
15827
15828 \family sans
15829 slides
15830 \family default
15831
15832 \begin_inset Quotes erd
15833 \end_inset
15834
15835  from now on], so you're bound to have it.
15836  As I noted earlier, there are other classes, such as 
15837 \family sans
15838 foils
15839 \family default
15840 , which also produce slides for overhead projectors and do a better job
15841  at it.
15842  However, there are some things which 
15843 \family sans
15844 slides
15845 \family default
15846  can do which the others can't, such as generate overlays.
15847  Read on to learn more!
15848 \end_layout
15849
15850 \begin_layout Subsection
15851 Getting Started
15852 \begin_inset CommandInset label
15853 LatexCommand label
15854 name "sec:slidesetup"
15855
15856 \end_inset
15857
15858
15859 \end_layout
15860
15861 \begin_layout Standard
15862 Obviously, to use this document class, you need to select 
15863 \begin_inset Quotes eld
15864 \end_inset
15865
15866
15867 \family sans
15868 slides (default)
15869 \family default
15870
15871 \begin_inset Quotes erd
15872 \end_inset
15873
15874  from the class list in the 
15875 \family sans
15876 Document\SpecialChar \menuseparator
15877 Settings
15878 \family default
15879  dialog.
15880  There are some other special things you should know about this class:
15881 \end_layout
15882
15883 \begin_layout Itemize
15884 Don't bother changing the options 
15885 \family sans
15886 Sides and Columns
15887 \family default
15888 .
15889  They're not supported by the 
15890 \family sans
15891 slides
15892 \family default
15893  class, anyways.
15894 \end_layout
15895
15896 \begin_layout Itemize
15897 The option 
15898 \family sans
15899 Page
15900 \begin_inset space ~
15901 \end_inset
15902
15903 style
15904 \family default
15905  behaves a bit differently for this class.
15906  The possible choices and what they do are as follows:
15907 \end_layout
15908
15909 \begin_deeper
15910 \begin_layout Description
15911
15912 \family sans
15913 plain
15914 \family default
15915  The final output contains page numbers in the lower right corner.
15916 \end_layout
15917
15918 \begin_layout Description
15919
15920 \family sans
15921 headings
15922 \family default
15923  Like 
15924 \family sans
15925 plain
15926 \family default
15927 , but also prints out any time markers you've put in.
15928  This is the default.
15929 \end_layout
15930
15931 \begin_layout Description
15932
15933 \family sans
15934 empty
15935 \family default
15936  The final output contains no page numbers, time markers, or alignment markers.
15937 \end_layout
15938
15939 \end_deeper
15940 \begin_layout Itemize
15941 The 
15942 \family sans
15943 slides
15944 \family default
15945  class has an extra option: 
15946 \family typewriter
15947 clock
15948 \family default
15949 .
15950  To use it, put 
15951 \begin_inset Quotes eld
15952 \end_inset
15953
15954
15955 \family typewriter
15956 clock
15957 \family default
15958
15959 \begin_inset Quotes erd
15960 \end_inset
15961
15962  in the extra class options.
15963 \end_layout
15964
15965 \begin_deeper
15966 \begin_layout Standard
15967 Using this options allows you to add time markers to 
15968 \family sans
15969 Note
15970 \family default
15971 s.
15972  See section
15973 \begin_inset space ~
15974 \end_inset
15975
15976
15977 \begin_inset CommandInset ref
15978 LatexCommand ref
15979 reference "sec:slideNote"
15980
15981 \end_inset
15982
15983  for more details.
15984 \end_layout
15985
15986 \end_deeper
15987 \begin_layout Standard
15988 You can also use the template file 
15989 \begin_inset Quotes eld
15990 \end_inset
15991
15992
15993 \family typewriter
15994 slides.lyx
15995 \family default
15996
15997 \begin_inset Quotes erd
15998 \end_inset
15999
16000  to automatically set up a document to use the 
16001 \family sans
16002 slides
16003 \family default
16004  class [using 
16005 \family sans
16006 File\SpecialChar \menuseparator
16007 New
16008 \begin_inset space ~
16009 \end_inset
16010
16011 from
16012 \begin_inset space ~
16013 \end_inset
16014
16015 Template
16016 \family default
16017  to open your new document].
16018  The template file also contains some examples of the special paragraph
16019  environments used by this class.
16020  I'll describe those next.
16021 \end_layout
16022
16023 \begin_layout Subsection
16024 Paragraph Environments
16025 \end_layout
16026
16027 \begin_layout Subsubsection
16028 Supported Environments
16029 \end_layout
16030
16031 \begin_layout Standard
16032 The first thing you'll notice when you start up a new 
16033 \family sans
16034 slides
16035 \family default
16036  document is the font size and type: it's the equivalent of the size 
16037 \begin_inset Quotes eld
16038 \end_inset
16039
16040
16041 \family sans
16042 Largest
16043 \family default
16044
16045 \begin_inset Quotes erd
16046 \end_inset
16047
16048  in the 
16049 \family sans
16050 Sans
16051 \begin_inset space ~
16052 \end_inset
16053
16054 Serif
16055 \family default
16056  font.
16057  This is also what's used in the output.
16058  Think of this as a 
16059 \begin_inset Quotes eld
16060 \end_inset
16061
16062 visual cue
16063 \begin_inset Quotes erd
16064 \end_inset
16065
16066  to remind you that this is a slide.
16067  Your final slides will use a larger font; ergo, you'll have less space.
16068  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16069 \end_layout
16070
16071 \begin_layout Standard
16072 The next thing that becomes obvious is the changes to the paragraph environment
16073  pull-down box [at the far-left end of the toolbar].
16074  Most of the paragraph environments you're used to seeing are missing.
16075  There are also five new ones.
16076  That's because the 
16077 \family sans
16078 slides
16079 \family default
16080  class itself only supports certain paragraph environments:
16081 \end_layout
16082
16083 \begin_layout Itemize
16084
16085 \family sans
16086 Standard
16087 \end_layout
16088
16089 \begin_layout Itemize
16090
16091 \family sans
16092 Itemize
16093 \end_layout
16094
16095 \begin_layout Itemize
16096
16097 \family sans
16098 Enumerate
16099 \end_layout
16100
16101 \begin_layout Itemize
16102
16103 \family sans
16104 Description
16105 \end_layout
16106
16107 \begin_layout Itemize
16108
16109 \family sans
16110 List
16111 \end_layout
16112
16113 \begin_layout Itemize
16114
16115 \family sans
16116 Quotation
16117 \end_layout
16118
16119 \begin_layout Itemize
16120
16121 \family sans
16122 Quote
16123 \end_layout
16124
16125 \begin_layout Itemize
16126
16127 \family sans
16128 Verse
16129 \end_layout
16130
16131 \begin_layout Itemize
16132
16133 \family sans
16134 Caption
16135 \end_layout
16136
16137 \begin_layout Itemize
16138
16139 \family sans
16140 LyX-Code
16141 \end_layout
16142
16143 \begin_layout Itemize
16144
16145 \family sans
16146 Comment
16147 \end_layout
16148
16149 \begin_layout Standard
16150 All of the other standard environments, including the section-heading environmen
16151 ts, aren't used in the 
16152 \family sans
16153 slides
16154 \family default
16155  class.
16156 \end_layout
16157
16158 \begin_layout Standard
16159 On the other hand, you'll notice the following new environments:
16160 \end_layout
16161
16162 \begin_layout Itemize
16163
16164 \family sans
16165 Slide
16166 \end_layout
16167
16168 \begin_layout Itemize
16169
16170 \family sans
16171 Overlay
16172 \end_layout
16173
16174 \begin_layout Itemize
16175
16176 \family sans
16177 Note
16178 \end_layout
16179
16180 \begin_layout Itemize
16181
16182 \family sans
16183 InvisibleText
16184 \end_layout
16185
16186 \begin_layout Itemize
16187
16188 \family sans
16189 VisibleText
16190 \end_layout
16191
16192 \begin_layout Standard
16193 These five are kind of quirky, due to a 
16194 \begin_inset Quotes eld
16195 \end_inset
16196
16197 feature
16198 \begin_inset Quotes erd
16199 \end_inset
16200
16201  in LyX.
16202  You see, LyX doesn't permit you to nest any other paragraph environment
16203  into an empty environment.
16204  Now, that's fine and dandy, but it means that you wouldn't be able to start
16205  a slide with anything except plain text.
16206  To deal with this, I've performed a little 
16207 \begin_inset Quotes eld
16208 \end_inset
16209
16210 LaTeX magic.
16211 \begin_inset Quotes erd
16212 \end_inset
16213
16214  
16215 \end_layout
16216
16217 \begin_layout Subsubsection
16218 Quirks of the New Environments
16219 \begin_inset CommandInset label
16220 LatexCommand label
16221 name "sec:slideQuirk"
16222
16223 \end_inset
16224
16225
16226 \end_layout
16227
16228 \begin_layout Standard
16229 All five of the new paragraph environments are somewhat quirky due to inherent
16230  limitiations in the current version of LyX.
16231  As I just mentioned, LyX forbids environments that begin with another environme
16232 nt.
16233  To get around this, the 
16234 \family sans
16235 Slide
16236 \family default
16237  environment isn't a paragraph environment as described in the 
16238 \emph on
16239 User's Guide
16240 \emph default
16241 .
16242  
16243 \end_layout
16244
16245 \begin_layout Standard
16246 You should consider 
16247 \family sans
16248 Slide
16249 \family default
16250
16251 \family sans
16252 Overlay
16253 \family default
16254 , and 
16255 \family sans
16256 Note
16257 \family default
16258  to be 
16259 \begin_inset Quotes eld
16260 \end_inset
16261
16262 pseudo-environments.
16263 \begin_inset Quotes erd
16264 \end_inset
16265
16266  They look like a section heading or a 
16267 \begin_inset Quotes eld
16268 \end_inset
16269
16270
16271 \family sans
16272 Caption
16273 \family default
16274 ,
16275 \begin_inset Quotes erd
16276 \end_inset
16277
16278  but really begin a [and, if necessary, end the previous] paragraph environment.
16279  Likewise, treat 
16280 \family sans
16281 InvisibleText
16282 \family default
16283  and 
16284 \family sans
16285 VisibleText
16286 \family default
16287  as 
16288 \begin_inset Quotes eld
16289 \end_inset
16290
16291 pseudo-commands.
16292 \begin_inset Quotes erd
16293 \end_inset
16294
16295  These two perform some action.
16296 \end_layout
16297
16298 \begin_layout Standard
16299 A common feature of all five environments, 
16300 \family sans
16301 Slide
16302 \family default
16303
16304 \family sans
16305 Overlay
16306 \family default
16307
16308 \family sans
16309 Note
16310 \family default
16311
16312 \family sans
16313 InvisibleText
16314 \family default
16315  and 
16316 \family sans
16317 VisibleText
16318 \family default
16319 , is a rather long-ish label.
16320  The text following this label — ordinarily the contents of the paragraph
16321  environment — is utterly irrelevant for 
16322 \family sans
16323 Slide
16324 \family default
16325
16326 \family sans
16327 Overlay
16328 \family default
16329
16330 \family sans
16331 Note
16332 \family default
16333
16334 \family sans
16335 InvisibleText
16336 \family default
16337  and 
16338 \family sans
16339 VisibleText
16340 \family default
16341 .
16342  LyX completely ignores it.
16343  In fact, you can leave these five environments completely empty.
16344  
16345 \end_layout
16346
16347 \begin_layout Standard
16348 While you don't 
16349 \emph on
16350 have
16351 \emph default
16352  to put any text after the rather long-ish label, you might want to.
16353  This could be a short description of the contents of the 
16354 \family sans
16355 Slide
16356 \family default
16357 , for example.
16358  In that case, enter your descriptive comment and hit 
16359 \family sans
16360 Return
16361 \family default
16362  as you normally would.
16363 \end_layout
16364
16365 \begin_layout Standard
16366 If, on the other hand, you don't want to enter any descriptive text, you'll
16367  hit another LyX quirk.
16368  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16369  environment until you put something in the old one.
16370  So, do this:
16371 \end_layout
16372
16373 \begin_layout Itemize
16374 Start entering the text that will 
16375 \emph on
16376 follow
16377 \emph default
16378  the new 
16379 \family sans
16380 Slide
16381 \family default
16382
16383 \family sans
16384 Overlay
16385 \family default
16386
16387 \family sans
16388 Note
16389 \family default
16390
16391 \family sans
16392 InvisibleText
16393 \family default
16394  or 
16395 \family sans
16396 VisibleText
16397 \family default
16398 .
16399  
16400 \end_layout
16401
16402 \begin_layout Itemize
16403 Now move to the beginning of that paragraph.
16404  
16405 \end_layout
16406
16407 \begin_layout Itemize
16408 Next, hit 
16409 \family sans
16410 Return
16411 \family default
16412 .
16413  
16414 \end_layout
16415
16416 \begin_layout Itemize
16417 Finally, change this new, empty paragraph to a 
16418 \family sans
16419 Slide
16420 \family default
16421
16422 \family sans
16423 Overlay
16424 \family default
16425
16426 \family sans
16427 Note
16428 \family default
16429
16430 \family sans
16431 InvisibleText
16432 \family default
16433  or 
16434 \family sans
16435 VisibleText
16436 \family default
16437 .
16438  
16439 \end_layout
16440
16441 \begin_layout Standard
16442 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16443
16444 \end_layout
16445
16446 \begin_layout Subsection
16447 Making a Presentation with 
16448 \family sans
16449 Slide
16450 \family default
16451
16452 \family sans
16453 Overlay
16454 \family default
16455  and 
16456 \family sans
16457 Note
16458 \end_layout
16459
16460 \begin_layout Subsubsection
16461 Using the 
16462 \family sans
16463 Slide
16464 \family default
16465  Environment
16466 \end_layout
16467
16468 \begin_layout Standard
16469 If you're expecting this section to teach you how to actually make a presentatio
16470 n, you'll be sorely disappointed.
16471  Naturally, I'll describe all of the ways the 
16472 \family sans
16473 slides
16474 \family default
16475  class can assist you in preparing the materials for a presentation.
16476  Filling in the contents, however, is up to you.
16477  [Then again, that 
16478 \emph on
16479 is
16480 \emph default
16481  the LyX philosophy.]
16482 \end_layout
16483
16484 \begin_layout Standard
16485 Choosing the 
16486 \family sans
16487 Slide
16488 \family default
16489  environment [in the manner described in section
16490 \begin_inset space ~
16491 \end_inset
16492
16493
16494 \begin_inset CommandInset ref
16495 LatexCommand ref
16496 reference "sec:slideQuirk"
16497
16498 \end_inset
16499
16500 ] tells LyX to begin a new slide [duh].
16501  The label for this environment/
16502 \begin_inset Quotes erd
16503 \end_inset
16504
16505 pseudo-command
16506 \begin_inset Quotes erd
16507 \end_inset
16508
16509  is an 
16510 \begin_inset Quotes eld
16511 \end_inset
16512
16513 ASCII line,
16514 \begin_inset Quotes erd
16515 \end_inset
16516
16517  in cool blue, followed by the label, 
16518 \begin_inset Quotes eld
16519 \end_inset
16520
16521 NewSlide:
16522 \begin_inset Quotes erd
16523 \end_inset
16524
16525 .
16526  Any text or paragraph environments that follow this one go on the new slide.
16527  It's that simple.
16528 \end_layout
16529
16530 \begin_layout Standard
16531 Slides are probably the only time you'll need to forcibly end pages in LyX
16532  (this can be specified in the 
16533 \family sans
16534 Paragraph Layout
16535 \family default
16536  dialog).
16537  In fact, you'll want to, once you finish entering the contents of one slide.
16538  If you've entered more text than can physically fit on a slide, the extra
16539  overflows onto a new slide.
16540  I don't recommend doing this, however, since the overflow slide won't have
16541  any page number on it.
16542  Furthermore, it may interfere with any 
16543 \family sans
16544 Overlay
16545 \family default
16546  you've made to accompany the oversized 
16547 \family sans
16548 Slide
16549 \family default
16550 .
16551 \end_layout
16552
16553 \begin_layout Standard
16554 The 
16555 \family sans
16556 Overlay
16557 \family default
16558  and 
16559 \family sans
16560 Note
16561 \family default
16562  environments work the same way as the 
16563 \family sans
16564 Slide
16565 \family default
16566  environment.
16567  They both create an 
16568 \begin_inset Quotes eld
16569 \end_inset
16570
16571 ASCII line
16572 \begin_inset Quotes erd
16573 \end_inset
16574
16575  followed by a label [
16576 \begin_inset Quotes eld
16577 \end_inset
16578
16579 NewOverlay:
16580 \begin_inset Quotes erd
16581 \end_inset
16582
16583  and 
16584 \begin_inset Quotes eld
16585 \end_inset
16586
16587 NewNote:
16588 \begin_inset Quotes erd
16589 \end_inset
16590
16591 , respectively].
16592  The color is a stunning magenta instead of blue, and the 
16593 \begin_inset Quotes eld
16594 \end_inset
16595
16596 ASCII line
16597 \begin_inset Quotes erd
16598 \end_inset
16599
16600  will look different, in style and in length.
16601  The label fonts of all three also differ from one another.
16602 \end_layout
16603
16604 \begin_layout Standard
16605 As with a 
16606 \family sans
16607 Slide
16608 \family default
16609 , if the contents of a 
16610 \family sans
16611 Note
16612 \family default
16613  or 
16614 \family sans
16615 Overlay
16616 \family default
16617  exceed the physical size of a slide or sheet of paper, the extra will overflow
16618  onto a new sheet.
16619  Again, you should avoid this.
16620  It defeats the whole purpose of 
16621 \family sans
16622 Note
16623 \family default
16624 s and 
16625 \family sans
16626 Overlay
16627 \family default
16628 s.
16629 \end_layout
16630
16631 \begin_layout Subsubsection
16632 Using 
16633 \family sans
16634 Overlay
16635 \family default
16636  with 
16637 \family sans
16638 Slide
16639 \end_layout
16640
16641 \begin_layout Standard
16642 The idea behind an 
16643 \family sans
16644 Overlay
16645 \family default
16646  is a slide that sits atop another slide.
16647  Perhaps you wish to discuss a figure on the main 
16648 \family sans
16649 Slide
16650 \family default
16651  before displaying the text associated with it.
16652  One way to accomplish this is tape a flap of dark paper over the part of
16653  the 
16654 \family sans
16655 Slide
16656 \family default
16657  you want to display later.
16658  This method fails, however, if you wish to overlap one graph with another,
16659  for example.
16660  You would then have to fumble while speaking to align the two separate,
16661  overlapping 
16662 \family sans
16663 Slide
16664 \family default
16665 s to align the two graphs.
16666  The use of an 
16667 \family sans
16668 Overlay
16669 \family default
16670  environment in both cases makes life much easier.
16671 \end_layout
16672
16673 \begin_layout Standard
16674 Each 
16675 \family sans
16676 Overlay
16677 \family default
16678  receives the page number of its 
16679 \begin_inset Quotes eld
16680 \end_inset
16681
16682 parent
16683 \begin_inset Quotes erd
16684 \end_inset
16685
16686  
16687 \family sans
16688 Slide
16689 \family default
16690 , appended by 
16691 \begin_inset Quotes eld
16692 \end_inset
16693
16694
16695 \family typewriter
16696 -a
16697 \family default
16698
16699 \begin_inset Quotes erd
16700 \end_inset
16701
16702 .
16703 \begin_inset Foot
16704 status collapsed
16705
16706 \begin_layout Plain Layout
16707 Presumably, mutliple 
16708 \family sans
16709 Overlay
16710 \family default
16711 s would have 
16712 \begin_inset Quotes eld
16713 \end_inset
16714
16715
16716 \family typewriter
16717 -a
16718 \family default
16719
16720 \begin_inset Quotes erd
16721 \end_inset
16722
16723
16724 \begin_inset Quotes eld
16725 \end_inset
16726
16727
16728 \family typewriter
16729 -b
16730 \family default
16731
16732 \begin_inset Quotes erd
16733 \end_inset
16734
16735
16736 \begin_inset Quotes eld
16737 \end_inset
16738
16739
16740 \family typewriter
16741 -c
16742 \family default
16743
16744 \begin_inset Quotes erd
16745 \end_inset
16746
16747 , etc.
16748 \begin_inset space ~
16749 \end_inset
16750
16751 appended to the page number of the parent 
16752 \family sans
16753 Slide
16754 \family default
16755 .
16756  
16757 \end_layout
16758
16759 \end_inset
16760
16761  Clearly, you want the contents of both the 
16762 \family sans
16763 Slide
16764 \family default
16765  and the 
16766 \family sans
16767 Overlay
16768 \family default
16769  to each fit on a single physical slide! You should probably consider an
16770  
16771 \family sans
16772 Overlay
16773 \family default
16774  as 
16775 \begin_inset Quotes eld
16776 \end_inset
16777
16778 part of
16779 \begin_inset Quotes erd
16780 \end_inset
16781
16782  a 
16783 \family sans
16784 Slide
16785 \family default
16786 .
16787  Indeed, the LyX 
16788 \family sans
16789 slides
16790 \family default
16791  class provides a visual cue for this: the label at the start of an 
16792 \family sans
16793 Overlay
16794 \family default
16795  is shorter than that at the start of a 
16796 \family sans
16797 Slide
16798 \family default
16799 .
16800  Lastly, when you generate printable output, you'll find alignment markers
16801  in all four corners of both the 
16802 \family sans
16803 Overlay
16804 \family default
16805  page and its parent 
16806 \family sans
16807 Slide
16808 \family default
16809 .
16810  These will assist you in lining up the two physical slides.
16811 \end_layout
16812
16813 \begin_layout Standard
16814 The major problem in overlaying two slides is aligning the contents of the
16815  two transparencies.
16816  How much space should you leave for that graph on the second slide? Worse
16817  still, what if you want a graph and a sentence on second slide, but there
16818  is text on the main transparency that goes in between them? You could try
16819  and insert vertical space of the right size.
16820  The better way is to use 
16821 \family sans
16822 InvisibleText
16823 \family default
16824  and 
16825 \family sans
16826 VisibleText
16827 \family default
16828 .
16829 \end_layout
16830
16831 \begin_layout Standard
16832 As their names imply, 
16833 \family sans
16834 InvisibleText
16835 \family default
16836  and 
16837 \family sans
16838 VisibleText
16839 \family default
16840  are two command-like paragraph environments that make all subsequent text
16841  invisible and visible, respectively.
16842  Note from section
16843 \begin_inset space ~
16844 \end_inset
16845
16846
16847 \begin_inset CommandInset ref
16848 LatexCommand ref
16849 reference "sec:slideQuirk"
16850
16851 \end_inset
16852
16853  that you don't place anything 
16854 \emph on
16855 into
16856 \emph default
16857  these two environments, however.
16858  When you create an 
16859 \family sans
16860 InvisibleText
16861 \family default
16862 , it inserts a centered, sky-blue label into the page reading 
16863 \begin_inset Quotes eld
16864 \end_inset
16865
16866 <Invisible Text Follows>
16867 \begin_inset Quotes erd
16868 \end_inset
16869
16870 .
16871  For paragraphs following this label, the parts of the 
16872 \family sans
16873 Slide
16874 \family default
16875  [or 
16876 \family sans
16877 Overlay
16878 \family default
16879 ; it doesn't matter which] where they would be contain instead blank space.
16880  
16881 \end_layout
16882
16883 \begin_layout Standard
16884 For 
16885 \family sans
16886 VisibleText
16887 \family default
16888 , the corresponding centered label is 
16889 \begin_inset Quotes eld
16890 \end_inset
16891
16892 <Visible Text Follows>
16893 \begin_inset Quotes erd
16894 \end_inset
16895
16896  in blazing green.
16897  Paragraphs following this label behave normally.
16898  Note that the beginning of a new 
16899 \family sans
16900 Slide
16901 \family default
16902
16903 \family sans
16904 Overlay
16905 \family default
16906 , or 
16907 \family sans
16908 Note
16909 \family default
16910  automatically shuts off an 
16911 \family sans
16912 InvisibleText
16913 \family default
16914 .
16915  It's therefore not necessary to use 
16916 \family sans
16917 VisibleText
16918 \family default
16919  at the end of a 
16920 \family sans
16921 Slide
16922 \family default
16923 .
16924 \end_layout
16925
16926 \begin_layout Standard
16927 By now, it should be obvious how to create overlay transparencies using
16928  the proper combination of 
16929 \family sans
16930 InvisibleText
16931 \family default
16932  and 
16933 \family sans
16934 VisibleText
16935 \family default
16936  on a 
16937 \family sans
16938 Slide
16939 \family default
16940  and 
16941 \family sans
16942 Overlay
16943 \family default
16944 :
16945 \end_layout
16946
16947 \begin_layout Enumerate
16948 Create a 
16949 \family sans
16950 Slide
16951 \family default
16952 , including everything that will appear on it, whether on the main slide
16953  or on the 
16954 \family sans
16955 Overlay
16956 \family default
16957 .
16958 \end_layout
16959
16960 \begin_layout Enumerate
16961 Before each figure or paragraph that will appear only on the 
16962 \family sans
16963 Overlay
16964 \family default
16965 , insert an 
16966 \family sans
16967 InvisibleText
16968 \family default
16969  environment.
16970  If necessary, insert a 
16971 \family sans
16972 VisibleText
16973 \family default
16974  environment after the 
16975 \family sans
16976 Overlay
16977 \family default
16978 -only text.
16979 \end_layout
16980
16981 \begin_layout Enumerate
16982 Start an 
16983 \family sans
16984 Overlay
16985 \family default
16986  immediately following the 
16987 \family sans
16988 Slide
16989 \family default
16990 .
16991 \end_layout
16992
16993 \begin_layout Enumerate
16994 Copy the contents of this 
16995 \family sans
16996 Slide
16997 \family default
16998  into the 
16999 \family sans
17000 Overlay
17001 \family default
17002 .
17003 \end_layout
17004
17005 \begin_layout Enumerate
17006 Within the 
17007 \family sans
17008 Overlay
17009 \family default
17010 , change all of the 
17011 \family sans
17012 InvisibleText
17013 \family default
17014  lines to 
17015 \family sans
17016 VisibleText
17017 \family default
17018  and vice-versa.
17019 \end_layout
17020
17021 \begin_layout Standard
17022 That's it.
17023  You've just made an 
17024 \family sans
17025 Overlay
17026 \family default
17027 .
17028 \end_layout
17029
17030 \begin_layout Standard
17031 There's one problem with the way I've designed the LyX 
17032 \family sans
17033 slides
17034 \family default
17035  class: you can't make text in the middle of a paragraph invisible, nor
17036  make text in the middle of an invisible paragraph visible again.
17037  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17038 \begin_inset Foot
17039 status collapsed
17040
17041 \begin_layout Plain Layout
17042 The commands of interest are: 
17043 \end_layout
17044
17045 \begin_layout Itemize
17046
17047 \family typewriter
17048 {
17049 \backslash
17050 invisible \SpecialChar \ldots{}
17051  }
17052 \end_layout
17053
17054 \begin_layout Itemize
17055
17056 \family typewriter
17057 {
17058 \backslash
17059 visible \SpecialChar \ldots{}
17060  }
17061 \end_layout
17062
17063 \begin_layout Plain Layout
17064 \SpecialChar \ldots{}
17065 and need to be marked as TeX.
17066  The text whose 
17067 \begin_inset Quotes eld
17068 \end_inset
17069
17070 visibility
17071 \begin_inset Quotes erd
17072 \end_inset
17073
17074  you wish to change goes in between the brackets [and after the 
17075 \family typewriter
17076
17077 \backslash
17078 invisible
17079 \family default
17080  or 
17081 \family typewriter
17082
17083 \backslash
17084 visible
17085 \family default
17086  command].
17087  If you don't know how to mark text as TeX, see the appropriate section
17088  of the 
17089 \emph on
17090 User's Guide
17091 \emph default
17092 .
17093 \end_layout
17094
17095 \end_inset
17096
17097
17098 \end_layout
17099
17100 \begin_layout Subsubsection
17101 Using 
17102 \family sans
17103 Note
17104 \family default
17105  with 
17106 \family sans
17107 Slide
17108 \family default
17109
17110 \begin_inset CommandInset label
17111 LatexCommand label
17112 name "sec:slideNote"
17113
17114 \end_inset
17115
17116
17117 \end_layout
17118
17119 \begin_layout Standard
17120 Like an 
17121 \family sans
17122 Overlay
17123 \family default
17124 , a 
17125 \family sans
17126 Note
17127 \family default
17128  is associated with a 
17129 \begin_inset Quotes eld
17130 \end_inset
17131
17132 parent
17133 \begin_inset Quotes erd
17134 \end_inset
17135
17136  
17137 \family sans
17138 Slide
17139 \family default
17140 .
17141  Here, too, the LyX 
17142 \family sans
17143 slides
17144 \family default
17145  class provides visual cues.
17146  The label for a 
17147 \family sans
17148 Note
17149 \family default
17150  is shorter than that of a 
17151 \family sans
17152 Slide
17153 \family default
17154  [yet longer than that of an 
17155 \family sans
17156 Overlay
17157 \family default
17158 ] and, like the label of an 
17159 \family sans
17160 Overlay
17161 \family default
17162  is shockingly magenta.
17163  Additionally, the printed 
17164 \family sans
17165 Note
17166 \family default
17167  has the page number of its 
17168 \begin_inset Quotes eld
17169 \end_inset
17170
17171 parent
17172 \begin_inset Quotes erd
17173 \end_inset
17174
17175  
17176 \family sans
17177 Slide
17178 \family default
17179 , appended by 
17180 \begin_inset Quotes eld
17181 \end_inset
17182
17183
17184 \family typewriter
17185 -
17186 \family default
17187 1
17188 \begin_inset Quotes erd
17189 \end_inset
17190
17191
17192 \begin_inset Quotes eld
17193 \end_inset
17194
17195
17196 \family typewriter
17197 -
17198 \family default
17199 2
17200 \begin_inset Quotes erd
17201 \end_inset
17202
17203
17204 \begin_inset Quotes eld
17205 \end_inset
17206
17207
17208 \family typewriter
17209 -
17210 \family default
17211 3
17212 \begin_inset Quotes erd
17213 \end_inset
17214
17215 , etc.
17216  You can have multiple 
17217 \family sans
17218 Note
17219 \family default
17220 s associated with a single 
17221 \family sans
17222 Slide
17223 \family default
17224 , and, as with 
17225 \family sans
17226 Slide
17227 \family default
17228  and 
17229 \family sans
17230 Overlay
17231 \family default
17232 , you'll probably want to break up long 
17233 \family sans
17234 Note
17235 \family default
17236 s so that they fit on a single sheet of paper.
17237 \end_layout
17238
17239 \begin_layout Standard
17240 The purpose of a 
17241 \family sans
17242 Note
17243 \family default
17244  is obvious: it contains anything additional you might want to say about
17245  a 
17246 \family sans
17247 Slide
17248 \family default
17249 .
17250  It could also be used as a sheet of reminders for a particular 
17251 \family sans
17252 Slide
17253 \family default
17254 .
17255  In the case of the latter, you might want to make use of time markers.
17256  Currently, the LyX 
17257 \family sans
17258 slides
17259 \family default
17260  class has no 
17261 \begin_inset Quotes eld
17262 \end_inset
17263
17264 native
17265 \begin_inset Quotes erd
17266 \end_inset
17267
17268  support for time markers, a 
17269 \noun on
17270 SliTeX
17271 \noun default
17272  feature.
17273  So, you'll have to resort to using the LaTeX codes.
17274 \end_layout
17275
17276 \begin_layout Standard
17277 To use time markers, you'll need to specify the extra class option 
17278 \begin_inset Quotes eld
17279 \end_inset
17280
17281
17282 \family typewriter
17283 clock
17284 \family default
17285
17286 \begin_inset Quotes erd
17287 \end_inset
17288
17289  [see section
17290 \begin_inset space ~
17291 \end_inset
17292
17293
17294 \begin_inset CommandInset ref
17295 LatexCommand ref
17296 reference "sec:slidesetup"
17297
17298 \end_inset
17299
17300 ].
17301  This option turns on timing marks, which will appear in the lower-left-hand
17302  corner of every 
17303 \family sans
17304 Note
17305 \family default
17306  you generate.
17307  To set what appears in the time marker, you use the LaTeX commands 
17308 \begin_inset Quotes eld
17309 \end_inset
17310
17311
17312 \family typewriter
17313
17314 \backslash
17315 settime{}
17316 \family default
17317
17318 \begin_inset Quotes erd
17319 \end_inset
17320
17321  and 
17322 \begin_inset Quotes eld
17323 \end_inset
17324
17325
17326 \family typewriter
17327
17328 \backslash
17329 addtime{}
17330 \family default
17331
17332 \begin_inset Quotes erd
17333 \end_inset
17334
17335 .
17336  The arguments of both commands are time measured in seconds.
17337  
17338 \begin_inset Quotes eld
17339 \end_inset
17340
17341
17342 \family typewriter
17343
17344 \backslash
17345 settime{}
17346 \family default
17347
17348 \begin_inset Quotes erd
17349 \end_inset
17350
17351  sets the time marker to a given time.
17352  
17353 \begin_inset Quotes eld
17354 \end_inset
17355
17356
17357 \family typewriter
17358
17359 \backslash
17360 addtime{}
17361 \family default
17362
17363 \begin_inset Quotes erd
17364 \end_inset
17365
17366  increments the time marker by the specified amount.
17367  Using time markers and 
17368 \family sans
17369 Note
17370 \family default
17371 s in this fashion, you can remind yourself how much time to spend on a particula
17372
17373 \family sans
17374 Slide
17375 \family default
17376 .
17377 \end_layout
17378
17379 \begin_layout Standard
17380 There's one last feature to describe.
17381  Clearly, you'd like to print out all of your 
17382 \family sans
17383 Slide
17384 \family default
17385 s and 
17386 \family sans
17387 Overlay
17388 \family default
17389 s on transparencies while printing all of your 
17390 \family sans
17391 Note
17392 \family default
17393 s on plain paper.
17394  However, a 
17395 \family sans
17396 Note
17397 \family default
17398  
17399 \emph on
17400 must
17401 \emph default
17402  follow the 
17403 \family sans
17404 Slide
17405 \family default
17406  with which it is associated.
17407  What's a person to do?
17408 \end_layout
17409
17410 \begin_layout Standard
17411 Luckily, there are two LaTeX commands that allow you to select what to print
17412  out.
17413  Both must be placed into the preamble of your document.
17414  The command 
17415 \begin_inset Quotes eld
17416 \end_inset
17417
17418
17419 \family typewriter
17420
17421 \backslash
17422 onlyslides{
17423 \backslash
17424 slides}
17425 \family default
17426
17427 \begin_inset Quotes erd
17428 \end_inset
17429
17430  will cause the output to contain only the 
17431 \family sans
17432 Slide
17433 \family default
17434 s and 
17435 \family sans
17436 Overlay
17437 \family default
17438 s.
17439  Correspondingly, the command 
17440 \begin_inset Quotes eld
17441 \end_inset
17442
17443
17444 \family typewriter
17445
17446 \backslash
17447 onlynotes{
17448 \backslash
17449 notes}
17450 \family default
17451
17452 \begin_inset Quotes erd
17453 \end_inset
17454
17455  prevents the output of anything but 
17456 \family sans
17457 Note
17458 \family default
17459 s.
17460  I'd advise placing both commands in the preamble and initially comment
17461  both out.
17462  You can then preview your entire presentation as you write.
17463  When you're done writing, you can then uncomment one of the two to select
17464  what you want to print.
17465  I like to uncomment 
17466 \begin_inset Quotes eld
17467 \end_inset
17468
17469
17470 \family typewriter
17471
17472 \backslash
17473 onlyslides{
17474 \backslash
17475 slides}
17476 \family default
17477
17478 \begin_inset Quotes erd
17479 \end_inset
17480
17481  , print to a file with 
17482 \begin_inset Quotes eld
17483 \end_inset
17484
17485
17486 \family typewriter
17487 -slides
17488 \family default
17489
17490 \begin_inset Quotes erd
17491 \end_inset
17492
17493  in its name, comment it back out, then uncomment 
17494 \begin_inset Quotes eld
17495 \end_inset
17496
17497
17498 \family typewriter
17499
17500 \backslash
17501 onlynotes{
17502 \backslash
17503 notes}
17504 \family default
17505
17506 \begin_inset Quotes erd
17507 \end_inset
17508
17509  and print to a 
17510 \begin_inset Quotes eld
17511 \end_inset
17512
17513
17514 \family typewriter
17515 *-notes.ps
17516 \family default
17517
17518 \begin_inset Quotes erd
17519 \end_inset
17520
17521  file.
17522  I can then send either file to a printer, loading transparencies or plain
17523  paper as appropriate.
17524 \end_layout
17525
17526 \begin_layout Standard
17527 You can also provide other arguments to the 
17528 \begin_inset Quotes eld
17529 \end_inset
17530
17531
17532 \family typewriter
17533
17534 \backslash
17535 onlyslides{}
17536 \family default
17537
17538 \begin_inset Quotes erd
17539 \end_inset
17540
17541  and 
17542 \begin_inset Quotes eld
17543 \end_inset
17544
17545
17546 \family typewriter
17547
17548 \backslash
17549 onlynotes{}
17550 \family default
17551
17552 \begin_inset Quotes erd
17553 \end_inset
17554
17555  commands.
17556  See a good LaTeX book for details.
17557 \end_layout
17558
17559 \begin_layout Subsection
17560 The 
17561 \family sans
17562 slides
17563 \family default
17564  Class Template File
17565 \end_layout
17566
17567 \begin_layout Standard
17568 I have also provided a template file, 
17569 \begin_inset Quotes eld
17570 \end_inset
17571
17572
17573 \family typewriter
17574 slides.lyx
17575 \family default
17576
17577 \begin_inset Quotes erd
17578 \end_inset
17579
17580 , with the 
17581 \family sans
17582 slides
17583 \family default
17584  class.
17585  To use it, begin your new presentation with 
17586 \family sans
17587 \bar under
17588 F
17589 \bar default
17590 ile\SpecialChar \menuseparator
17591 New
17592 \begin_inset space ~
17593 \end_inset
17594
17595 from
17596 \begin_inset space ~
17597 \end_inset
17598
17599
17600 \bar under
17601 T
17602 \bar default
17603 emplate
17604 \family default
17605 .
17606  Your new LyX presentation file will contain an example 
17607 \family sans
17608 Slide
17609 \family default
17610  – 
17611 \family sans
17612 Overlay
17613 \family default
17614  – 
17615 \family sans
17616 Note
17617 \family default
17618  triplet.
17619  The 
17620 \family sans
17621 Slide
17622 \family default
17623  and 
17624 \family sans
17625 Overlay
17626 \family default
17627  additionally contain an example of the use of 
17628 \family sans
17629 InvisibleText
17630 \family default
17631  and 
17632 \family sans
17633 VisibleText
17634 \family default
17635 .
17636  Lastly, the preamble will contain:
17637 \end_layout
17638
17639 \begin_layout LyX-Code
17640 % Uncomment to print out only slides and overlays
17641 \end_layout
17642
17643 \begin_layout LyX-Code
17644 %
17645 \end_layout
17646
17647 \begin_layout LyX-Code
17648 %
17649 \backslash
17650 onlyslides{
17651 \backslash
17652 slides}
17653 \begin_inset Newline newline
17654 \end_inset
17655
17656  
17657 \end_layout
17658
17659 \begin_layout LyX-Code
17660 % Uncomment to print out only notes
17661 \end_layout
17662
17663 \begin_layout LyX-Code
17664 %
17665 \end_layout
17666
17667 \begin_layout LyX-Code
17668 %
17669 \backslash
17670 onlynotes{
17671 \backslash
17672 notes}
17673 \end_layout
17674
17675 \begin_layout Standard
17676 One final thing: I created this class to support the LaTeX2e 
17677 \begin_inset Quotes eld
17678 \end_inset
17679
17680
17681 \noun on
17682 SliTeX
17683 \noun default
17684  emulation
17685 \begin_inset Quotes erd
17686 \end_inset
17687
17688  class, one of the built-in LaTeX2e classes.
17689  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17690  built-in slide class.
17691  It's here if you want it or need it.
17692  There exist other LaTeX2e classes for creating presentations, such as the
17693  
17694 \family sans
17695 Foils
17696 \family default
17697  class [see section
17698 \begin_inset space ~
17699 \end_inset
17700
17701
17702 \begin_inset CommandInset ref
17703 LatexCommand ref
17704 reference "sec:foiltex"
17705
17706 \end_inset
17707
17708 ] or the 
17709 \begin_inset Quotes eld
17710 \end_inset
17711
17712
17713 \family typewriter
17714 seminar
17715 \family default
17716
17717 \begin_inset Quotes erd
17718 \end_inset
17719
17720  package [present on some TeX distributions].
17721  The latter is not yet supported under LyX.
17722 \begin_inset Foot
17723 status collapsed
17724
17725 \begin_layout Plain Layout
17726 Perhaps you can take on the task\SpecialChar \ldots{}
17727
17728 \end_layout
17729
17730 \end_inset
17731
17732  I know nothing about these other classes.
17733  Try them out to see what sort of alternative they provide.
17734 \end_layout
17735
17736 \begin_layout Chapter
17737 LyX Features needing Extra Software
17738 \end_layout
17739
17740 \begin_layout Section
17741 Checking TeX
17742 \end_layout
17743
17744 \begin_layout Standard
17745 by 
17746 \noun on
17747 Asger Alstrup
17748 \end_layout
17749
17750 \begin_layout Subsection
17751 Introduction
17752 \end_layout
17753
17754 \begin_layout Standard
17755 If you have the 
17756 \family typewriter
17757 chktex
17758 \family default
17759  program installed
17760 \begin_inset Foot
17761 status collapsed
17762
17763 \begin_layout Plain Layout
17764
17765 \family typewriter
17766 chktex
17767 \family default
17768  is not yet available when you are using the LaTeX distribution MiKTeX.
17769 \end_layout
17770
17771 \end_inset
17772
17773 , you'll find in the 
17774 \family sans
17775 Tools
17776 \family default
17777  menu the entry: 
17778 \family sans
17779 Check
17780 \begin_inset space ~
17781 \end_inset
17782
17783 TeX
17784 \family default
17785 .
17786  You can get 
17787 \family typewriter
17788 chktex
17789 \family default
17790  it from CTAN, 
17791 \begin_inset CommandInset href
17792 LatexCommand href
17793 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17794
17795 \end_inset
17796
17797 .
17798 \end_layout
17799
17800 \begin_layout Standard
17801 The 
17802 \family sans
17803 ChkTeX
17804 \family default
17805  package is a program that was written by 
17806 \begin_inset Flex Noun
17807 status collapsed
17808
17809 \begin_layout Plain Layout
17810 Jens T.
17811 \begin_inset space ~
17812 \end_inset
17813
17814 Berger Thielemann
17815 \end_layout
17816
17817 \end_inset
17818
17819  in frustration because some constructs in LaTeX are sometimes non-intuitive,
17820  and easy to forget.
17821  The program runs over your LaTeX file, checks the integrity of the file,
17822  and flags some common errors.
17823  In other technical words, it is 
17824 \family typewriter
17825 lint
17826 \family default
17827  for LaTeX.
17828 \end_layout
17829
17830 \begin_layout Standard
17831 Well, what is a syntax checker doing in LyX which is supposed to produce
17832  correct LaTeX anyways? The answer is simple: Just as 
17833 \family typewriter
17834 Lint
17835 \family default
17836  not only checks the 
17837 \emph on
17838 syntax
17839 \emph default
17840  of C programs, but also does 
17841 \emph on
17842 semantic
17843 \emph default
17844  checks for type-errors, 
17845 \family sans
17846 ChkTeX
17847 \family default
17848  catches some common 
17849 \emph on
17850 typographic
17851 \emph default
17852  errors, in addition to the syntactical ones.
17853  Specifically, 
17854 \family sans
17855 ChkTeX
17856 \family default
17857  is capable of detecting several common errors, such as
17858 \end_layout
17859
17860 \begin_layout Itemize
17861 Ellipsis detection:
17862 \begin_inset Newline newline
17863 \end_inset
17864
17865 Use \SpecialChar \ldots{}
17866  instead of ...
17867 \end_layout
17868
17869 \begin_layout Itemize
17870 No space in front of/after parenthesis:
17871 \begin_inset Newline newline
17872 \end_inset
17873
17874 ( wrong spacing )
17875 \end_layout
17876
17877 \begin_layout Itemize
17878 Enforcement of normal space after common abbreviations:
17879 \begin_inset Newline newline
17880 \end_inset
17881
17882 e.
17883 \begin_inset space \thinspace{}
17884 \end_inset
17885
17886 g.
17887 \begin_inset space \space{}
17888 \end_inset
17889
17890 is too wide spacing.
17891 \end_layout
17892
17893 \begin_layout Itemize
17894 Enforcement of end-of-sentence space when the last sentence ends with a
17895  capital letter:
17896 \begin_inset Newline newline
17897 \end_inset
17898
17899 This is a TEST.
17900  And this is wrong spacing.
17901 \end_layout
17902
17903 \begin_layout Itemize
17904 Space in front of labels and similar commands:
17905 \begin_inset Newline newline
17906 \end_inset
17907
17908 The label should stick right up to the text to avoid falling to a wrong
17909  page.
17910  
17911 \begin_inset CommandInset label
17912 LatexCommand label
17913 name "sec:chktex"
17914
17915 \end_inset
17916
17917  
17918 \begin_inset Foot
17919 status collapsed
17920
17921 \begin_layout Plain Layout
17922 This footnote is in danger of falling off to a wrong page
17923 \end_layout
17924
17925 \end_inset
17926
17927  The label is separated too much.
17928 \end_layout
17929
17930 \begin_layout Itemize
17931 Space in front of references, instead of hard spaces:
17932 \begin_inset Newline newline
17933 \end_inset
17934
17935 In you are in bad luck, the text will break right between the referenced
17936  text and reference number, and that's a pity.
17937  See section 
17938 \begin_inset CommandInset ref
17939 LatexCommand ref
17940 reference "sec:chktex"
17941
17942 \end_inset
17943
17944 .
17945 \end_layout
17946
17947 \begin_layout Itemize
17948 Use of 
17949 \begin_inset Quotes eld
17950 \end_inset
17951
17952 x
17953 \begin_inset Quotes erd
17954 \end_inset
17955
17956  instead of 
17957 \begin_inset Formula $\times$
17958 \end_inset
17959
17960  between numbers:
17961 \begin_inset Newline newline
17962 \end_inset
17963
17964 2x2 looks cheap compared to 
17965 \begin_inset Formula $2\times2$
17966 \end_inset
17967
17968 .
17969 \end_layout
17970
17971 \begin_layout Standard
17972 and more \SpecialChar \ldots{}
17973  It is an invaluable tool when you are 
17974 \begin_inset Quotes eld
17975 \end_inset
17976
17977 finishing up
17978 \begin_inset Quotes erd
17979 \end_inset
17980
17981  your document before printing, and you should run it right after the obligatory
17982  spelling check, and before you go fine tuning the typesetting.
17983 \end_layout
17984
17985 \begin_layout Subsection
17986 How to use it
17987 \end_layout
17988
17989 \begin_layout Standard
17990 If you have the program installed, usage is as simple as choosing 
17991 \family sans
17992 Tools\SpecialChar \menuseparator
17993 Check
17994 \begin_inset space ~
17995 \end_inset
17996
17997 TeX
17998 \family default
17999 .
18000  This will make LyX generate a LaTeX file of your document, start 
18001 \family sans
18002 ChkTeX
18003 \family default
18004  to check it, and then make LyX insert 
18005 \begin_inset Quotes eld
18006 \end_inset
18007
18008 error boxes
18009 \begin_inset Quotes erd
18010 \end_inset
18011
18012  with the warnings from 
18013 \family sans
18014 ChkTeX
18015 \family default
18016 , if there were any.
18017  The warnings will be placed close to the point of the mistake, and you
18018  can quickly find them by using the 
18019 \family sans
18020 Navigate\SpecialChar \menuseparator
18021 Error
18022 \family default
18023  menu item, or the shortcut key 
18024 \family sans
18025 C-g
18026 \family default
18027  from the default 
18028 \family typewriter
18029 cua
18030 \family default
18031  bind file.
18032  Open the error boxes by clicking on them with the mouse, or use the shortcut
18033  key 
18034 \family sans
18035 C-i
18036 \family default
18037  from 
18038 \family typewriter
18039 cua
18040 \family default
18041  bindings, or the corresponding 
18042 \family sans
18043 C-o
18044 \family default
18045  for the alternate 
18046 \family typewriter
18047 emacs
18048 \family default
18049  bind file.
18050  Read the warning and correct the mistake, if it is a mistake.
18051  If you have trouble understanding what the warning is about, you can safely
18052  ignore it.
18053  Remember that there is a hidden layer between the document on screen and
18054  the technical details in invoking 
18055 \family sans
18056 ChkTeX
18057 \family default
18058 , and this gap can make some warnings seem arcane or just right down plain
18059  silly.
18060 \end_layout
18061
18062 \begin_layout Standard
18063 This document is an excellent testing bed for the feature, and it should
18064  provide quite a few warnings for you to fiddle with.
18065  Since computers are only so smart, expect most of the warnings to be false
18066  alarms, though.
18067 \end_layout
18068
18069 \begin_layout Subsection
18070 How to fine tune it
18071 \end_layout
18072
18073 \begin_layout Standard
18074 Sometimes, you'll find that 
18075 \family sans
18076 ChkTeX
18077 \family default
18078  makes more noise than suits your mood.
18079  Then you can choose not to use it, wait until your mood changes, or try
18080  to customize 
18081 \family sans
18082 ChkTeX
18083 \family default
18084  to get better along with you.
18085  Another choice in the most desperate situations is to use 
18086 \family sans
18087 View\SpecialChar \menuseparator
18088 Remove
18089 \begin_inset space ~
18090 \end_inset
18091
18092 All
18093 \begin_inset space ~
18094 \end_inset
18095
18096 Error
18097 \begin_inset space ~
18098 \end_inset
18099
18100 Boxes
18101 \family default
18102 , which will get rid of all warnings instantly.
18103 \end_layout
18104
18105 \begin_layout Standard
18106 Although 
18107 \family sans
18108 ChkTeX
18109 \family default
18110  
18111 \emph on
18112 is
18113 \emph default
18114  very configurable and extensible, you shouldn't expect to solve all problems
18115  with 
18116 \family sans
18117 ChkTeX
18118 \family default
18119  in LyX this way.
18120  Since LyX has to generate a somewhat special LaTeX file to be able to match
18121  the line numbers from the 
18122 \family sans
18123 ChkTeX
18124 \family default
18125  output
18126 \begin_inset Foot
18127 status collapsed
18128
18129 \begin_layout Plain Layout
18130 You can inspect the specific output from 
18131 \family sans
18132 chktex
18133 \family default
18134  by using 
18135 \family sans
18136 Edit\SpecialChar \menuseparator
18137 View
18138 \begin_inset space ~
18139 \end_inset
18140
18141 LaTeX
18142 \begin_inset space ~
18143 \end_inset
18144
18145 Log
18146 \family default
18147  right after a 
18148 \family sans
18149 chktex
18150 \family default
18151  run.
18152 \end_layout
18153
18154 \end_inset
18155
18156  to the internal document structure, some of the warnings will not seen
18157  to appear correctly.
18158  There are two things you can do about this:
18159 \end_layout
18160
18161 \begin_layout Itemize
18162 Fine tune the 
18163 \family sans
18164 ChkTeX
18165 \family default
18166  invocation command line in 
18167 \family sans
18168 Preferences
18169 \family default
18170  (tabs 
18171 \family sans
18172 Outputs
18173 \family default
18174
18175 \family sans
18176 Misc
18177 \family default
18178 ), or the global 
18179 \family sans
18180 ChkTeX
18181 \family default
18182  installation configuration file (usually with the file 
18183 \family typewriter
18184 chktexrc
18185 \family default
18186 ).
18187  See below to learn what warnings can be enabled and disabled on the command
18188  line.
18189  
18190 \end_layout
18191
18192 \begin_layout Itemize
18193 Export your document as a raw LaTeX file using 
18194 \family sans
18195 File\SpecialChar \menuseparator
18196 Export\SpecialChar \menuseparator
18197 LaTeX
18198 \family default
18199  and run 
18200 \family typewriter
18201 chktex
18202 \family default
18203  manually on that.
18204  Invoked in this way, it can be a hassle to find the corresponding place
18205  in the document inside LyX, but with a little patience, you should be able
18206  to do it.
18207 \end_layout
18208
18209 \begin_layout Standard
18210 Here follows the warning messages that can be enabled and disabled in 
18211 \family sans
18212 Preferences
18213 \family default
18214 .
18215  Use 
18216 \family typewriter
18217 -n#
18218 \family default
18219  to disable a warning, and 
18220 \family typewriter
18221 -w#
18222 \family default
18223  to enable a warning.
18224  The emphasized entries are disabled by default, because the default is
18225  "
18226 \family typewriter
18227 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18228 \family default
18229 ".
18230 \end_layout
18231
18232 \begin_layout Standard
18233 Notice that you should only use the options that enable and disable warnings,
18234  because LyX relies on some of the other command line parameters to be set
18235  in a specific way to have a chance to communicate with 
18236 \family typewriter
18237 chktex
18238 \family default
18239 .
18240 \end_layout
18241
18242 \begin_layout Enumerate
18243
18244 \size small
18245 \emph on
18246 Command terminated with space.
18247 \end_layout
18248
18249 \begin_layout Enumerate
18250
18251 \size small
18252 Non-breaking space (
18253 \begin_inset Quotes eld
18254 \end_inset
18255
18256
18257 \family typewriter
18258 ~
18259 \family default
18260
18261 \begin_inset Quotes erd
18262 \end_inset
18263
18264 ) should have been used.
18265 \end_layout
18266
18267 \begin_layout Enumerate
18268
18269 \size small
18270 \emph on
18271 You should enclose the previous parenthesis with 
18272 \begin_inset Quotes eld
18273 \end_inset
18274
18275
18276 \family typewriter
18277 {}
18278 \family default
18279
18280 \begin_inset Quotes erd
18281 \end_inset
18282
18283 .
18284 \end_layout
18285
18286 \begin_layout Enumerate
18287
18288 \size small
18289 Italic correction (
18290 \begin_inset Quotes eld
18291 \end_inset
18292
18293
18294 \family typewriter
18295
18296 \backslash
18297 /
18298 \family default
18299
18300 \begin_inset Quotes erd
18301 \end_inset
18302
18303 ) found in non-italic buffer.
18304 \end_layout
18305
18306 \begin_layout Enumerate
18307
18308 \size small
18309 Italic correction (
18310 \begin_inset Quotes eld
18311 \end_inset
18312
18313
18314 \family typewriter
18315
18316 \backslash
18317 /
18318 \family default
18319
18320 \begin_inset Quotes erd
18321 \end_inset
18322
18323 ) found more than once.
18324 \end_layout
18325
18326 \begin_layout Enumerate
18327
18328 \size small
18329 \emph on
18330 No italic correction (
18331 \begin_inset Quotes eld
18332 \end_inset
18333
18334
18335 \family typewriter
18336
18337 \backslash
18338 /
18339 \family default
18340
18341 \begin_inset Quotes erd
18342 \end_inset
18343
18344 ) found.
18345 \end_layout
18346
18347 \begin_layout Enumerate
18348
18349 \size small
18350 Accent command 
18351 \begin_inset Quotes eld
18352 \end_inset
18353
18354
18355 \family typewriter
18356 cmd
18357 \family default
18358
18359 \begin_inset Quotes erd
18360 \end_inset
18361
18362  needs use of 
18363 \begin_inset Quotes eld
18364 \end_inset
18365
18366
18367 \family typewriter
18368 cmd
18369 \family default
18370
18371 \begin_inset Quotes erd
18372 \end_inset
18373
18374 .
18375 \end_layout
18376
18377 \begin_layout Enumerate
18378
18379 \size small
18380 Wrong length of dash may have been used.
18381 \end_layout
18382
18383 \begin_layout Enumerate
18384
18385 \size small
18386 \emph on
18387 \begin_inset Quotes eld
18388 \end_inset
18389
18390
18391 \family typewriter
18392 %s
18393 \family default
18394
18395 \begin_inset Quotes erd
18396 \end_inset
18397
18398  expected, found 
18399 \begin_inset Quotes eld
18400 \end_inset
18401
18402
18403 \family typewriter
18404 %s
18405 \family default
18406
18407 \begin_inset Quotes erd
18408 \end_inset
18409
18410 .
18411 \end_layout
18412
18413 \begin_layout Enumerate
18414
18415 \size small
18416 Solo 
18417 \begin_inset Quotes eld
18418 \end_inset
18419
18420
18421 \family typewriter
18422 %s
18423 \family default
18424
18425 \begin_inset Quotes erd
18426 \end_inset
18427
18428  found.
18429 \end_layout
18430
18431 \begin_layout Enumerate
18432
18433 \size small
18434 You should use 
18435 \begin_inset Quotes eld
18436 \end_inset
18437
18438
18439 \family typewriter
18440 %s
18441 \family default
18442
18443 \begin_inset Quotes erd
18444 \end_inset
18445
18446  to achieve an ellipsis.
18447 \end_layout
18448
18449 \begin_layout Enumerate
18450
18451 \size small
18452 Inter-word spacing (
18453 \begin_inset Quotes eld
18454 \end_inset
18455
18456
18457 \family typewriter
18458
18459 \backslash
18460
18461 \family default
18462  
18463 \begin_inset Quotes eld
18464 \end_inset
18465
18466 ) should perhaps be used.
18467 \end_layout
18468
18469 \begin_layout Enumerate
18470
18471 \size small
18472 Inter-sentence spacing (
18473 \begin_inset Quotes eld
18474 \end_inset
18475
18476
18477 \family typewriter
18478
18479 \backslash
18480 @
18481 \family default
18482
18483 \begin_inset Quotes erd
18484 \end_inset
18485
18486 ) should perhaps be used.
18487 \end_layout
18488
18489 \begin_layout Enumerate
18490
18491 \size small
18492 Could not find argument for command.
18493 \end_layout
18494
18495 \begin_layout Enumerate
18496
18497 \size small
18498 No match found for 
18499 \begin_inset Quotes eld
18500 \end_inset
18501
18502
18503 \family typewriter
18504 %s
18505 \family default
18506
18507 \begin_inset Quotes erd
18508 \end_inset
18509
18510 .
18511 \end_layout
18512
18513 \begin_layout Enumerate
18514
18515 \size small
18516 Math mode still on at end of LaTeX file.
18517 \end_layout
18518
18519 \begin_layout Enumerate
18520
18521 \size small
18522 Number of 
18523 \begin_inset Quotes eld
18524 \end_inset
18525
18526
18527 \family typewriter
18528 char
18529 \family default
18530
18531 \begin_inset Quotes erd
18532 \end_inset
18533
18534  doesn't match the number of 
18535 \begin_inset Quotes eld
18536 \end_inset
18537
18538
18539 \family typewriter
18540 char
18541 \family default
18542
18543 \begin_inset Quotes erd
18544 \end_inset
18545
18546 .
18547 \end_layout
18548
18549 \begin_layout Enumerate
18550
18551 \size small
18552 You should use either 
18553 \family typewriter
18554
18555 \begin_inset Quotes eld
18556 \end_inset
18557
18558
18559 \family default
18560  or 
18561 \family typewriter
18562
18563 \begin_inset Quotes erd
18564 \end_inset
18565
18566
18567 \family default
18568  as an alternative to 
18569 \begin_inset Quotes eld
18570 \end_inset
18571
18572
18573 \family typewriter
18574 "
18575 \family default
18576
18577 \begin_inset Quotes erd
18578 \end_inset
18579
18580 .
18581 \end_layout
18582
18583 \begin_layout Enumerate
18584
18585 \size small
18586 You should use "
18587 \family typewriter
18588 '
18589 \family default
18590 " (ASCII 39) instead of "
18591 \family typewriter
18592 ´
18593 \family default
18594 " (ASCII 180).
18595 \end_layout
18596
18597 \begin_layout Enumerate
18598
18599 \size small
18600 User-specified pattern found.
18601 \end_layout
18602
18603 \begin_layout Enumerate
18604
18605 \size small
18606 This command might not be intended.
18607 \end_layout
18608
18609 \begin_layout Enumerate
18610
18611 \size small
18612 \emph on
18613 Comment displayed.
18614 \end_layout
18615
18616 \begin_layout Enumerate
18617
18618 \size small
18619 Either 
18620 \family typewriter
18621 ''
18622 \backslash
18623 ,'
18624 \family default
18625  or 
18626 \family typewriter
18627 '
18628 \backslash
18629 ,''
18630 \family default
18631  will look better.
18632 \end_layout
18633
18634 \begin_layout Enumerate
18635
18636 \size small
18637 Delete this space to maintain correct page references.
18638 \end_layout
18639
18640 \begin_layout Enumerate
18641
18642 \size small
18643 \emph on
18644 You might wish to put this between a pair of 
18645 \begin_inset Quotes eld
18646 \end_inset
18647
18648
18649 \family typewriter
18650 {}
18651 \family default
18652
18653 \begin_inset Quotes erd
18654 \end_inset
18655
18656 .
18657 \end_layout
18658
18659 \begin_layout Enumerate
18660
18661 \size small
18662 You ought to remove spaces in front of punctuation.
18663 \end_layout
18664
18665 \begin_layout Enumerate
18666
18667 \size small
18668 Could not execute LaTeX command.
18669 \end_layout
18670
18671 \begin_layout Enumerate
18672
18673 \size small
18674 Don't use 
18675 \family typewriter
18676
18677 \backslash
18678 /
18679 \family default
18680  in front of small punctuation.
18681 \end_layout
18682
18683 \begin_layout Enumerate
18684
18685 \family typewriter
18686 \size small
18687 $
18688 \backslash
18689 times$
18690 \family default
18691  may look prettier here.
18692 \end_layout
18693
18694 \begin_layout Enumerate
18695
18696 \size small
18697 \emph on
18698 Multiple spaces detected in output.
18699 \end_layout
18700
18701 \begin_layout Enumerate
18702
18703 \size small
18704 This text may be ignored.
18705 \end_layout
18706
18707 \begin_layout Enumerate
18708
18709 \size small
18710 Use 
18711 \family typewriter
18712
18713 \begin_inset Quotes eld
18714 \end_inset
18715
18716
18717 \family default
18718  to begin quotation, not 
18719 \family typewriter
18720 '
18721 \family default
18722 .
18723 \end_layout
18724
18725 \begin_layout Enumerate
18726
18727 \size small
18728 Use 
18729 \family typewriter
18730 '
18731 \family default
18732  to end quotation, not 
18733 \family typewriter
18734
18735 \begin_inset Quotes eld
18736 \end_inset
18737
18738
18739 \family default
18740 .
18741 \end_layout
18742
18743 \begin_layout Enumerate
18744
18745 \size small
18746 Don't mix quotes.
18747 \end_layout
18748
18749 \begin_layout Enumerate
18750
18751 \size small
18752 You should perhaps use 
18753 \begin_inset Quotes eld
18754 \end_inset
18755
18756
18757 \family typewriter
18758 cmd
18759 \family default
18760
18761 \begin_inset Quotes erd
18762 \end_inset
18763
18764  instead.
18765 \end_layout
18766
18767 \begin_layout Enumerate
18768
18769 \size small
18770 You should put a space in front of/after parenthesis.
18771 \end_layout
18772
18773 \begin_layout Enumerate
18774
18775 \size small
18776 You should avoid spaces in front of/after parenthesis.
18777 \end_layout
18778
18779 \begin_layout Enumerate
18780
18781 \size small
18782 \emph on
18783 You should not use punctuation in front of/after quotes.
18784 \end_layout
18785
18786 \begin_layout Enumerate
18787
18788 \size small
18789 Double space found.
18790 \end_layout
18791
18792 \begin_layout Enumerate
18793
18794 \size small
18795 You should put punctuation outside inner/inside display math mode.
18796 \end_layout
18797
18798 \begin_layout Enumerate
18799
18800 \size small
18801 You ought to not use primitive TeX in LaTeX code.
18802 \end_layout
18803
18804 \begin_layout Enumerate
18805
18806 \size small
18807 You should remove spaces in front of 
18808 \begin_inset Quotes eld
18809 \end_inset
18810
18811
18812 \family typewriter
18813 %s
18814 \family default
18815
18816 \begin_inset Quotes erd
18817 \end_inset
18818
18819
18820 \end_layout
18821
18822 \begin_layout Enumerate
18823
18824 \size small
18825 \begin_inset Quotes eld
18826 \end_inset
18827
18828
18829 \family typewriter
18830 %s
18831 \family default
18832
18833 \begin_inset Quotes erd
18834 \end_inset
18835
18836  is normally not followed by 
18837 \begin_inset Quotes eld
18838 \end_inset
18839
18840
18841 \family typewriter
18842 %c
18843 \family default
18844
18845 \begin_inset Quotes erd
18846 \end_inset
18847
18848 .
18849 \end_layout
18850
18851 \begin_layout Standard
18852 In later versions of LyX, we hope to provide a more complete interface to
18853  this tool (and it's smaller cousin 
18854 \family typewriter
18855 lacheck
18856 \family default
18857 ) to exploit the full power of it.
18858  But it's not exactly useless as it is now: go try it on one of your existing
18859  documents of a certain length and be surprised.
18860 \end_layout
18861
18862 \begin_layout Section
18863 Version Control in LyX
18864 \end_layout
18865
18866 \begin_layout Standard
18867 by
18868 \noun on
18869  Lars Gullik Bjønnes 
18870 \noun default
18871 and 
18872 \noun on
18873 Pavel Sanda
18874 \end_layout
18875
18876 \begin_layout Subsection
18877 Introduction
18878 \end_layout
18879
18880 \begin_layout Standard
18881 A friend of mine wanted to try LyX for a group project.
18882  When he didn't find support for version control or file locking, he dropped
18883  it.
18884  This angered me a bit, so I thought that I should at least make support
18885  for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18886  This has been done.
18887  LyX now supports some of the most basic RCS/CVS/SVN commands.
18888  If you need something a bit more sophisticated you will have to do that
18889  manually in a terminal.
18890 \end_layout
18891
18892 \begin_layout Standard
18893 Before you begin to use the version control features in LyX, you should
18894  be familiar with RCS/CVS/SVN usage before start using it under LyX.
18895  Also note that CVS support is not as good as subversion support so we advice
18896  using SVN instead.
18897  Good place to start with Subversion is SVN Book
18898 \begin_inset Foot
18899 status open
18900
18901 \begin_layout Plain Layout
18902 \begin_inset CommandInset href
18903 LatexCommand href
18904 target "http://svnbook.red-bean.com/"
18905
18906 \end_inset
18907
18908
18909 \end_layout
18910
18911 \end_inset
18912
18913 .
18914  In case of RCS you should read 
18915 \begin_inset Quotes eld
18916 \end_inset
18917
18918 rcsintro
18919 \begin_inset Quotes erd
18920 \end_inset
18921
18922  (a man file, read it with 
18923 \family typewriter
18924 man rcsintro
18925 \family default
18926 ).
18927  This file describes all the basic features of RCS.
18928  You should especially notice the comment about a RCS directory, and the
18929  notion of a master RCS file (the file ending in 
18930 \family typewriter
18931 ,v
18932 \family default
18933 ).
18934 \end_layout
18935
18936 \begin_layout Standard
18937 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18938  package—no guarantees are made for older versions.
18939  Most of the log messages are not currently displayed after operations —
18940  you can check them in Messages pane if unsure.
18941 \end_layout
18942
18943 \begin_layout Standard
18944 For introducing your own external commands consult vc-command in the manual
18945  of LyX functions.
18946 \end_layout
18947
18948 \begin_layout Subsection
18949 RCS commands in LyX
18950 \end_layout
18951
18952 \begin_layout Standard
18953 The following sections describe the RCS commands supported by LyX.
18954  You can find them in the 
18955 \family sans
18956 File\SpecialChar \menuseparator
18957 Version
18958 \begin_inset space ~
18959 \end_inset
18960
18961 Control
18962 \family default
18963  submenu.
18964  LyX was tested against RCS 5.7.
18965 \end_layout
18966
18967 \begin_layout Subsubsection
18968
18969 \family sans
18970 Register
18971 \end_layout
18972
18973 \begin_layout Standard
18974 If your document is not under revision control, this is the only item shown
18975  in the menu.
18976  And if it is under revision control, the 
18977 \family sans
18978 Register
18979 \family default
18980  item is not visible.
18981  
18982 \end_layout
18983
18984 \begin_layout Standard
18985 This command registers your document with RCS (unless you are under the
18986  directory managed by CVS)\SpecialChar \@.
18987  You are asked interactively to supply an initial
18988  description of the document.
18989  The document is now set in Read-Only mode and you have to 
18990 \family sans
18991 Check
18992 \begin_inset space ~
18993 \end_inset
18994
18995 Out
18996 \begin_inset space ~
18997 \end_inset
18998
18999 For
19000 \begin_inset space ~
19001 \end_inset
19002
19003 Edit
19004 \family default
19005 , before making any changes to it.
19006  A document under revision control has a 
19007 \begin_inset Quotes eld
19008 \end_inset
19009
19010 [RCS:<version> <locker>]
19011 \begin_inset Quotes erd
19012 \end_inset
19013
19014  item tagged to the filename in the minibuffer.
19015 \end_layout
19016
19017 \begin_layout Standard
19018 RCS command that is run: 
19019 \family typewriter
19020 ci -q -u -i -t-"<initial description>" <file-name>
19021 \end_layout
19022
19023 \begin_layout Standard
19024 Read 
19025 \family typewriter
19026 man ci
19027 \family default
19028  to understand the switches.
19029  
19030 \end_layout
19031
19032 \begin_layout Subsubsection
19033
19034 \family sans
19035 Check In Changes
19036 \end_layout
19037
19038 \begin_layout Standard
19039 When you are finished editing a file, you check in your changes.
19040  When you do this, you are asked for a description of the changes.
19041  This is stored in the history log.
19042  The version number is bumped, your changes are applied to the master RCS
19043  file, the document is unlocked and set to Read-Only mode.
19044  
19045 \end_layout
19046
19047 \begin_layout Standard
19048 RCS command: 
19049 \family typewriter
19050 ci -q -u -m"<description>" <file-name>
19051 \end_layout
19052
19053 \begin_layout Subsubsection
19054
19055 \family sans
19056 Check Out For Edit
19057 \end_layout
19058
19059 \begin_layout Standard
19060 By doing this you lock the document so that only you can edit it.
19061  This will also make the document Read-Write only for you.
19062  You will usually continue editing for a while and when you are finished
19063  you check in your changes.
19064  The status line is changed to reflect that you have locked the file.
19065  
19066 \end_layout
19067
19068 \begin_layout Standard
19069 RCS command: 
19070 \family typewriter
19071 co -q -l <file-name>
19072 \end_layout
19073
19074 \begin_layout Subsubsection
19075
19076 \family sans
19077 Revert To Repository Version
19078 \end_layout
19079
19080 \begin_layout Standard
19081 This will discard all changes made to the document since the last check
19082  in.
19083  You get a warning before changes are discarded.
19084 \end_layout
19085
19086 \begin_layout Standard
19087 RCS command: 
19088 \family typewriter
19089 co -f -u<version> <file-name>
19090 \end_layout
19091
19092 \begin_layout Subsubsection
19093
19094 \family sans
19095 Undo Last Checkin
19096 \end_layout
19097
19098 \begin_layout Standard
19099 This makes as if the last check in never happened.
19100  No changes are made to the document loaded into LyX, but the last version
19101  is removed from the master RCS file.
19102  
19103 \end_layout
19104
19105 \begin_layout Standard
19106 RCS command: 
19107 \family typewriter
19108 rcs -o<version> <file-name>
19109 \end_layout
19110
19111 \begin_layout Subsubsection
19112
19113 \family sans
19114 Show History
19115 \end_layout
19116
19117 \begin_layout Standard
19118 This shows the complete history of the RCS document.
19119  The output of 
19120 \family typewriter
19121 rlog <file-name>
19122 \family default
19123  is shown in a browser.
19124  See 
19125 \family typewriter
19126 man rlog
19127 \family default
19128  for more info.
19129 \end_layout
19130
19131 \begin_layout Subsubsection
19132 Revision info
19133 \end_layout
19134
19135 \begin_layout Standard
19136 LyX supports RCS version number information (only), see 
19137 \begin_inset CommandInset ref
19138 LatexCommand ref
19139 reference "sub:VCS-Revision-Information"
19140
19141 \end_inset
19142
19143  for details.
19144 \end_layout
19145
19146 \begin_layout Subsection
19147 CVS commands in LyX
19148 \end_layout
19149
19150 \begin_layout Standard
19151 A subset of CVS operations is supported by LyX.
19152  You can find the commands in the 
19153 \family sans
19154 File\SpecialChar \menuseparator
19155 Version
19156 \begin_inset space ~
19157 \end_inset
19158
19159 Control
19160 \family default
19161  submenu.
19162  The version control system SVN is more powerful, so please use it instead
19163  of CVS if possible.
19164 \end_layout
19165
19166 \begin_layout Subsubsection
19167
19168 \family sans
19169 General CVS usage
19170 \end_layout
19171
19172 \begin_layout Standard
19173 If you start from scratch with CVS you have to create your repository and
19174  checkout the working copy with external tools.
19175  If you're using a client-server setup you may need to login before doing
19176  the first repository checkout.
19177 \end_layout
19178
19179 \begin_layout Standard
19180 If your documents are under revision control and others are using the same
19181  repository problems arise when different changes to the same document at
19182  the same location happen.
19183  Standard CVS repositories doesn't operate with a file locking mechanism.
19184  This may be surprising, but conflicts only occur if people disagree on
19185  the proper content of the same part of a document.
19186  So, if co-workers are used to communicate regularly, these conflicts occur
19187  rarely.
19188  If they don't communicate they have a fundamental problem anyway.
19189  Nevertheless some people like to work with so called 
19190 \begin_inset Quotes eld
19191 \end_inset
19192
19193 reserved checkouts
19194 \begin_inset Quotes erd
19195 \end_inset
19196
19197 .
19198  If they do so the working copy of all files is readonly when checked out
19199  first and the user starts editing after using a special command to make
19200  the working copy writable.
19201  When the changes are checked in the working copy returns to readonly state.
19202  With LyX one has to edit the 
19203 \begin_inset Flex Code
19204 status collapsed
19205
19206 \begin_layout Plain Layout
19207 .cvsrc
19208 \end_layout
19209
19210 \end_inset
19211
19212  file and add the line 
19213 \begin_inset Flex Code
19214 status collapsed
19215
19216 \begin_layout Plain Layout
19217 cvs -r
19218 \end_layout
19219
19220 \end_inset
19221
19222  to work with reserved checkouts.
19223  The benefit is the possibility to see who is using a writable copy of some
19224  document.
19225  It's not guaranteed only one user makes a copy writable.
19226 \end_layout
19227
19228 \begin_layout Standard
19229 LyX tries to guess if you're using reserved or non-reserved checkouts.
19230  If your working copy is readonly or it is writable and an additional copy
19231  of your document exists in the CVS/Base sub-directory a reserved otherwise
19232  a non-reserved checkout is assumed.
19233  When a reserved checkout is detected you have to use 
19234 \begin_inset Flex MenuItem
19235 status collapsed
19236
19237 \begin_layout Plain Layout
19238 Check Out
19239 \end_layout
19240
19241 \end_inset
19242
19243  to make your working copy writable if it's readonly.
19244  After doing so the 
19245 \begin_inset Flex MenuItem
19246 status collapsed
19247
19248 \begin_layout Plain Layout
19249 Check In
19250 \end_layout
19251
19252 \end_inset
19253
19254  operation is possible and that makes your working copy readonly again after
19255  transferring your changes to the repository.
19256 \end_layout
19257
19258 \begin_layout Standard
19259 More information about CVS can be found here 
19260 \begin_inset Flex URL
19261 status collapsed
19262
19263 \begin_layout Plain Layout
19264
19265 http://www.nongnu.org/cvs
19266 \end_layout
19267
19268 \end_inset
19269
19270  and here 
19271 \begin_inset Flex URL
19272 status collapsed
19273
19274 \begin_layout Plain Layout
19275
19276 http://ximbiot.com/cvs
19277 \end_layout
19278
19279 \end_inset
19280
19281 .
19282 \end_layout
19283
19284 \begin_layout Standard
19285 Read 
19286 \family typewriter
19287 man cvs
19288 \family default
19289  to understand the sub-commands and the switches mentioned below.
19290 \end_layout
19291
19292 \begin_layout Subsubsection
19293
19294 \family sans
19295 Register
19296 \end_layout
19297
19298 \begin_layout Standard
19299 If your document is not under revision control, this is the only item shown
19300  in the menu.
19301  And if it is under revision control, the 
19302 \family sans
19303 \bar under
19304 R
19305 \bar default
19306 egister
19307 \family default
19308  item is not visible.
19309  
19310 \end_layout
19311
19312 \begin_layout Standard
19313 This command registers in CVS your document 
19314 \emph on
19315
19316 \begin_inset Flex Strong
19317 status collapsed
19318
19319 \begin_layout Plain Layout
19320
19321 \emph on
19322 only
19323 \end_layout
19324
19325 \end_inset
19326
19327
19328 \emph default
19329  in case you have already the documents directory under CVS control (in
19330  particular 
19331 \family typewriter
19332 CVS/Entries
19333 \family default
19334  file exists).
19335  This means you have to create or checkout the archive by yourself using
19336  external tools.
19337  (In case you forget that step LyX registers the document with RCS.)
19338 \end_layout
19339
19340 \begin_layout Standard
19341 Then you are asked interactively to supply an initial description of the
19342  document.
19343  Don't forget that registered file is not yet checked in.
19344 \end_layout
19345
19346 \begin_layout Standard
19347 CVS command that is run: 
19348 \family typewriter
19349 cvs -q add -m"<entered message>" "<file-name>"
19350 \end_layout
19351
19352 \begin_layout Standard
19353 The term 
19354 \family typewriter
19355 "<file-name>"
19356 \family default
19357  above and for all other CVS commands is an abbreviation for 
19358 \begin_inset Quotes eld
19359 \end_inset
19360
19361 change the current working directory to file location and use the file name
19362  without path component as argument
19363 \begin_inset Quotes erd
19364 \end_inset
19365
19366 .
19367 \end_layout
19368
19369 \begin_layout Subsubsection
19370
19371 \family sans
19372 Check In Changes
19373 \end_layout
19374
19375 \begin_layout Standard
19376 When you are finished editing a file, you commit your changes.
19377  When you do this and you had changed the document, you are asked for a
19378  description of the changes.
19379  After that changes are written to the repository.
19380  In case you didn't change the document and a reserved checkout is detected
19381  the reservation made on 
19382 \begin_inset Flex MenuItem
19383 status collapsed
19384
19385 \begin_layout Plain Layout
19386 Check Out
19387 \end_layout
19388
19389 \end_inset
19390
19391  is undone.
19392 \end_layout
19393
19394 \begin_layout Labeling
19395 \labelwidthstring 00.00.0000
19396 CVS
19397 \begin_inset space ~
19398 \end_inset
19399
19400 command: 
19401 \begin_inset space ~
19402 \end_inset
19403
19404
19405 \begin_inset Newline newline
19406 \end_inset
19407
19408
19409 \begin_inset Flex Code
19410 status collapsed
19411
19412 \begin_layout Plain Layout
19413 cvs 
19414 \family typewriter
19415 -q commit -m"<description>" "<file-name>"
19416 \end_layout
19417
19418 \end_inset
19419
19420  or
19421 \begin_inset Newline newline
19422 \end_inset
19423
19424
19425 \begin_inset Flex Code
19426 status collapsed
19427
19428 \begin_layout Plain Layout
19429 cvs -q unedit 
19430 \family typewriter
19431 "<file-name>"
19432 \end_layout
19433
19434 \end_inset
19435
19436
19437 \end_layout
19438
19439 \begin_layout Subsubsection
19440
19441 \family sans
19442 Check Out Changes
19443 \end_layout
19444
19445 \begin_layout Standard
19446 When you are sharing a repository with others, you may have to incorporate
19447  their changes into your working copy.
19448 \end_layout
19449
19450 \begin_layout Standard
19451 CVS command: 
19452 \family typewriter
19453 cvs -q update "<file-name>"
19454 \end_layout
19455
19456 \begin_layout Standard
19457 If a readonly checkout is detected the working copy is made writable and
19458  reserved.
19459 \end_layout
19460
19461 \begin_layout Standard
19462 CVS command: 
19463 \family typewriter
19464 cvs -q edit "<file-name>"
19465 \end_layout
19466
19467 \begin_layout Subsubsection
19468
19469 \family sans
19470 Revert To Repository Version
19471 \end_layout
19472
19473 \begin_layout Standard
19474 This will discard all changes made to the document since the last check
19475  in.
19476  You get a warning before changes are discarded.
19477  Firstly the file is deleted, secondly CVS update command is run.
19478 \end_layout
19479
19480 \begin_layout Standard
19481 CVS command: 
19482 \family typewriter
19483 cvs -q update "<file-name>"
19484 \end_layout
19485
19486 \begin_layout Standard
19487 If a reserved checkout is detected and the working copy has no changes only
19488  the reservation is undone.
19489 \end_layout
19490
19491 \begin_layout Standard
19492 CVS command: 
19493 \family typewriter
19494 cvs -q unedit "<file-name>"
19495 \end_layout
19496
19497 \begin_layout Subsubsection
19498 Update of the local directory checkout from repository
19499 \end_layout
19500
19501 \begin_layout Standard
19502 Once your documents gets more complex, containing sub-documents and pictures,
19503  including external 
19504 \begin_inset Flex Code
19505 status collapsed
19506
19507 \begin_layout Plain Layout
19508 .tex
19509 \end_layout
19510
19511 \end_inset
19512
19513  files and so on using version control becomes more complicated.
19514  LyX supports updating the whole tree in which resides the document.
19515  This become especially useful once you cooperate with people which neither
19516  have detailed knowledge about CVS usage nor they have ambition to commit
19517  additional material to the repository.
19518  You have to organize the files structure so that all external files are
19519  in the same directory or subdirectories of the document.
19520  It's good practice anyway to store multipart documents in an extra directory.
19521 \end_layout
19522
19523 \begin_layout Standard
19524 The 
19525 \begin_inset Flex Code
19526 status collapsed
19527
19528 \begin_layout Plain Layout
19529 Update local directory from repository
19530 \end_layout
19531
19532 \end_inset
19533
19534  command updates the whole directory.
19535  If local changes are detected user is warned before update starts.
19536  In case of merge conflicts both versions of the conflicting document parts
19537  are placed in the final document.
19538  You have to review and correct the result of the merge.
19539  You'll find the conflicts enclosed in pairs of 
19540 \begin_inset Flex Code
19541 status collapsed
19542
19543 \begin_layout Plain Layout
19544 <<<<<<<
19545 \end_layout
19546
19547 \end_inset
19548
19549  and 
19550 \begin_inset Flex Code
19551 status collapsed
19552
19553 \begin_layout Plain Layout
19554 >>>>>>>
19555 \end_layout
19556
19557 \end_inset
19558
19559  separated by 
19560 \begin_inset Flex Code
19561 status collapsed
19562
19563 \begin_layout Plain Layout
19564 =======
19565 \end_layout
19566
19567 \end_inset
19568
19569 .
19570  The first part is your version as before the update operation with the
19571  document name prepended.
19572  The second one is the repository version with the version number after
19573  the sequence of 
19574 \begin_inset Flex Code
19575 status collapsed
19576
19577 \begin_layout Plain Layout
19578 >
19579 \end_layout
19580
19581 \end_inset
19582
19583  signs.
19584 \end_layout
19585
19586 \begin_layout Labeling
19587 \labelwidthstring 00.00.0000
19588 CVS
19589 \begin_inset space ~
19590 \end_inset
19591
19592 commands: 
19593 \begin_inset space ~
19594 \end_inset
19595
19596
19597 \begin_inset Newline newline
19598 \end_inset
19599
19600
19601 \begin_inset Flex Code
19602 status collapsed
19603
19604 \begin_layout Plain Layout
19605 cd $path; cvs diff 
19606 \family typewriter
19607 "."
19608 \end_layout
19609
19610 \end_inset
19611
19612  (Ask if changes are detected.)
19613 \begin_inset Newline newline
19614 \end_inset
19615
19616
19617 \begin_inset Flex Code
19618 status collapsed
19619
19620 \begin_layout Plain Layout
19621 cd $path; cvs -q update 
19622 \family typewriter
19623 "."
19624 \end_layout
19625
19626 \end_inset
19627
19628
19629 \end_layout
19630
19631 \begin_layout Standard
19632 where 
19633 \begin_inset Flex Code
19634 status collapsed
19635
19636 \begin_layout Plain Layout
19637 $path
19638 \end_layout
19639
19640 \end_inset
19641
19642  stands for the path to the document.
19643 \end_layout
19644
19645 \begin_layout Subsubsection
19646
19647 \family sans
19648 Show History
19649 \end_layout
19650
19651 \begin_layout Standard
19652 This shows the complete history of the CVS document.
19653  The output of 
19654 \family typewriter
19655 cvs log "<file-name>"
19656 \family default
19657  is shown in a browser.
19658 \end_layout
19659
19660 \begin_layout Subsection
19661 SVN commands in LyX
19662 \end_layout
19663
19664 \begin_layout Standard
19665 SVN is now partially supported by LyX.
19666  You can find the commands in the 
19667 \family sans
19668 File\SpecialChar \menuseparator
19669 Version
19670 \begin_inset space ~
19671 \end_inset
19672
19673 Control
19674 \family default
19675  submenu.
19676  Please note that if you use password protected access to repository via
19677  ssh, you will be asked in terminal window.
19678  LyX was tested against SVN 1.5 and 1.6
19679 \begin_inset Foot
19680 status open
19681
19682 \begin_layout Plain Layout
19683 Most of the commands will work with 1.4 too, see 
19684 \begin_inset CommandInset ref
19685 LatexCommand ref
19686 reference "sub:SVN-Repo-Update"
19687
19688 \end_inset
19689
19690 .
19691 \end_layout
19692
19693 \end_inset
19694
19695
19696 \end_layout
19697
19698 \begin_layout Subsubsection
19699
19700 \family sans
19701 Register
19702 \end_layout
19703
19704 \begin_layout Standard
19705 If your document is not under revision control, this is the only item shown
19706  in the menu.
19707  And if it is under revision control, the 
19708 \family sans
19709 \bar under
19710 R
19711 \bar default
19712 egister
19713 \family default
19714  item is not visible.
19715  
19716 \end_layout
19717
19718 \begin_layout Standard
19719 This command registers in SVN your document ONLY in case you have already
19720  the documents directory under SVN control (in particular 
19721 \family typewriter
19722 .svn/entries
19723 \family default
19724  file exists).
19725  This means you have to checkout the archive by yourself.
19726  
19727 \end_layout
19728
19729 \begin_layout Standard
19730 Then you are asked interactively to supply an initial description of the
19731  document.
19732  Don't forget that registered file is not yet commited.
19733 \end_layout
19734
19735 \begin_layout Standard
19736 SVN command that is run: 
19737 \family typewriter
19738 svn add -q 
19739 \begin_inset Quotes eld
19740 \end_inset
19741
19742 <file-name>
19743 \begin_inset Quotes erd
19744 \end_inset
19745
19746
19747 \end_layout
19748
19749 \begin_layout Standard
19750 Read 
19751 \family typewriter
19752 man svn
19753 \family default
19754  to understand the switches.
19755  
19756 \end_layout
19757
19758 \begin_layout Subsubsection
19759
19760 \family sans
19761 Check In Changes
19762 \end_layout
19763
19764 \begin_layout Standard
19765 When you are finished editing a file, you commit your changes.
19766  When you do this, you are asked for a description of the changes.
19767  After that changes are commited.
19768 \end_layout
19769
19770 \begin_layout Standard
19771 SVN command:
19772 \begin_inset Foot
19773 status collapsed
19774
19775 \begin_layout Plain Layout
19776 In case locking is not enabled.
19777  See Section 
19778 \begin_inset CommandInset ref
19779 LatexCommand ref
19780 reference "subsec:SVN-File-Locking"
19781
19782 \end_inset
19783
19784 .
19785 \end_layout
19786
19787 \end_inset
19788
19789  
19790 \family typewriter
19791 svn commit -q -m"<description>" <file-name>
19792 \end_layout
19793
19794 \begin_layout Subsubsection
19795
19796 \family sans
19797 Check Out For Edit
19798 \end_layout
19799
19800 \begin_layout Standard
19801 Updates the changes of this file from the repository.
19802  Be sure you understand SVN merging and conflicts resolving before using
19803  this function, because all conflicts has to be resolved manually by you!
19804 \end_layout
19805
19806 \begin_layout Standard
19807 SVN command:
19808 \begin_inset Foot
19809 status collapsed
19810
19811 \begin_layout Plain Layout
19812 Ditto.
19813 \end_layout
19814
19815 \end_inset
19816
19817  
19818 \family typewriter
19819 svn update --non-interactive 
19820 \begin_inset Quotes eld
19821 \end_inset
19822
19823 <file-name>
19824 \begin_inset Quotes erd
19825 \end_inset
19826
19827
19828 \end_layout
19829
19830 \begin_layout Subsubsection
19831
19832 \family sans
19833 Revert To Repository Version
19834 \end_layout
19835
19836 \begin_layout Standard
19837 This will discard all changes made to the document since the last check
19838  in.
19839  You get a warning before changes are discarded.
19840  
19841 \end_layout
19842
19843 \begin_layout Standard
19844 SVN command: 
19845 \family typewriter
19846 svn revert -q 
19847 \begin_inset Quotes eld
19848 \end_inset
19849
19850 <file-name>
19851 \begin_inset Quotes erd
19852 \end_inset
19853
19854
19855 \end_layout
19856
19857 \begin_layout Subsubsection
19858 \begin_inset CommandInset label
19859 LatexCommand label
19860 name "sub:SVN-Repo-Update"
19861
19862 \end_inset
19863
19864 Update of the local directory checkout from repository
19865 \begin_inset Foot
19866 status collapsed
19867
19868 \begin_layout Plain Layout
19869 Note that this command will work only with subversion 
19870 \begin_inset Formula $\geqq1.5$
19871 \end_inset
19872
19873
19874 \end_layout
19875
19876 \end_inset
19877
19878
19879 \end_layout
19880
19881 \begin_layout Standard
19882 All the commands above have one shortcomming - they deal with the current
19883  document only.
19884  Once your document contains pictures, includes external 
19885 \begin_inset Flex Code
19886 status collapsed
19887
19888 \begin_layout Plain Layout
19889 .tex
19890 \end_layout
19891
19892 \end_inset
19893
19894  files and so on administration becomes more complicated.
19895  LyX now supports updating the whole tree in which resides the document
19896 \begin_inset Foot
19897 status collapsed
19898
19899 \begin_layout Plain Layout
19900 One need to organize the files structure so that all external files are
19901  in the same directory or subdirectories of the document.
19902  
19903 \end_layout
19904
19905 \end_inset
19906
19907 .
19908  This become especially useful once you cooperate with people which neither
19909  know about subversion management nor they have ambition to commit additional
19910  material to the repository.
19911  
19912 \end_layout
19913
19914 \begin_layout Standard
19915 \begin_inset Flex Code
19916 status collapsed
19917
19918 \begin_layout Plain Layout
19919 Update local directory from repository
19920 \end_layout
19921
19922 \end_inset
19923
19924  command updates the whole directory and in case of merge conflicts local
19925  version of the files are left, so no unintended data loss occurs.
19926  If local changes are detected user is warned before update starts.
19927 \end_layout
19928
19929 \begin_layout Labeling
19930 \labelwidthstring 00.00.0000
19931 SVN
19932 \begin_inset space ~
19933 \end_inset
19934
19935 commands: 
19936 \begin_inset space ~
19937 \end_inset
19938
19939
19940 \begin_inset Newline newline
19941 \end_inset
19942
19943
19944 \begin_inset Flex Code
19945 status collapsed
19946
19947 \begin_layout Plain Layout
19948 svn diff $path
19949 \end_layout
19950
19951 \end_inset
19952
19953  (Ask if changes are detected.)
19954 \begin_inset Newline newline
19955 \end_inset
19956
19957
19958 \begin_inset Flex Code
19959 status collapsed
19960
19961 \begin_layout Plain Layout
19962 svn update --accept mine-full $path
19963 \end_layout
19964
19965 \end_inset
19966
19967
19968 \end_layout
19969
19970 \begin_layout Standard
19971 where 
19972 \begin_inset Flex Code
19973 status collapsed
19974
19975 \begin_layout Plain Layout
19976 $path
19977 \end_layout
19978
19979 \end_inset
19980
19981  stands for the path to the document.
19982 \end_layout
19983
19984 \begin_layout Subsubsection
19985
19986 \family sans
19987 Show History
19988 \end_layout
19989
19990 \begin_layout Standard
19991 This shows the complete history of the SVN document.
19992  The output of 
19993 \family typewriter
19994 svn log 
19995 \begin_inset Quotes eld
19996 \end_inset
19997
19998 <file-name>
19999 \begin_inset Quotes erd
20000 \end_inset
20001
20002
20003 \family default
20004  is shown in a browser.
20005 \end_layout
20006
20007 \begin_layout Subsubsection
20008 File Locking
20009 \begin_inset CommandInset label
20010 LatexCommand label
20011 name "subsec:SVN-File-Locking"
20012
20013 \end_inset
20014
20015
20016 \end_layout
20017
20018 \begin_layout Standard
20019 The file exchange through various revision control systems brings the problem
20020  of merge conflicts in case two different users try to edit the same (parts
20021  of) document.
20022  When such a conflict happens it needs manual resolving and one reasonable
20023  alternative is to provide some kind of locking mechanism, which guarantees
20024  that only one user is allowed to edit file at the given time.
20025 \end_layout
20026
20027 \begin_layout Standard
20028 SVN has two such mechanisms to provide mutual exclusivity for file access
20029  - locks and automatic setting of write permissions (see sec.
20030  
20031 \begin_inset CommandInset ref
20032 LatexCommand ref
20033 reference "subsec:Automatical-Locking-Property"
20034
20035 \end_inset
20036
20037 ) based on 
20038 \begin_inset Flex Code
20039 status collapsed
20040
20041 \begin_layout Plain Layout
20042 svn:needs-lock
20043 \end_layout
20044
20045 \end_inset
20046
20047  file svn property
20048 \begin_inset Foot
20049 status open
20050
20051 \begin_layout Plain Layout
20052 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20053 \end_layout
20054
20055 \end_inset
20056
20057 .
20058  If this property is detected for a given document LyX starts to use SVN
20059  locks for document editing automatically and the whole check-in/out mechanism
20060  switches to the same regimen as for RCS.
20061  This in particular means there are two different modes of file use in LyX:
20062 \end_layout
20063
20064 \begin_layout Itemize
20065 Unlocked state.
20066  The loaded file is in the read-only mode.
20067  For editing on needs to check-out.
20068  
20069 \emph on
20070 Check-out
20071 \emph default
20072  consists of updating from the repository and gaining write lock.
20073  If the lock is not possible to obtain, we remain in unlocked state.
20074 \end_layout
20075
20076 \begin_layout Itemize
20077 Locked state.
20078  The loaded file is in the 'normal' edit mode.
20079  No other user is allowed to edit the file.
20080  
20081 \emph on
20082 Check-in
20083 \emph default
20084  consists of commiting changes and releasing write-lock.
20085  If no changes have been made to the document, no commit will be produced
20086 \begin_inset Foot
20087 status collapsed
20088
20089 \begin_layout Plain Layout
20090 Don't be puzzled by the fact that you will be asked for commit message anyway.
20091 \end_layout
20092
20093 \end_inset
20094
20095  and only the write-lock will be released.
20096 \end_layout
20097
20098 \begin_layout Standard
20099 SVN commands:
20100 \end_layout
20101
20102 \begin_layout Labeling
20103 \labelwidthstring 00.00.0000
20104 Check-in:
20105 \family typewriter
20106  svn commit -q -m"<description>" "<file-name>"
20107 \begin_inset Newline newline
20108 \end_inset
20109
20110 svn unlock "<file-name>"
20111 \end_layout
20112
20113 \begin_layout Labeling
20114 \labelwidthstring 00.00.0000
20115 Check-out: 
20116 \family typewriter
20117 svn update "<file-name>"
20118 \begin_inset Newline newline
20119 \end_inset
20120
20121 svn lock "<file-name>"
20122 \end_layout
20123
20124 \begin_layout Subsubsection
20125
20126 \family typewriter
20127 \begin_inset CommandInset label
20128 LatexCommand label
20129 name "subsec:Automatical-Locking-Property"
20130
20131 \end_inset
20132
20133
20134 \family default
20135 Automatic Locking Property
20136 \end_layout
20137
20138 \begin_layout Standard
20139 The above mentioned automatic setting of write permissions of the .lyx file
20140  can be set through
20141 \family sans
20142 \bar under
20143  F
20144 \bar default
20145 ile\SpecialChar \menuseparator
20146
20147 \bar under
20148 V
20149 \bar default
20150 ersion
20151 \begin_inset space ~
20152 \end_inset
20153
20154 Control\SpecialChar \menuseparator
20155
20156 \bar under
20157 T
20158 \bar default
20159 oggle locking property
20160 \family default
20161 .
20162  This command is active only when the file is not locked on the svn server
20163  (i.e.
20164  you need to check-out before proceeding).
20165 \end_layout
20166
20167 \begin_layout Labeling
20168 \labelwidthstring 00.00.0000
20169 SVN
20170 \begin_inset space ~
20171 \end_inset
20172
20173 commands:
20174 \end_layout
20175
20176 \begin_layout Labeling
20177 \labelwidthstring 00.00.0000
20178 Set:
20179 \family typewriter
20180  svn propset svn:needs-lock ON "<file-name>"
20181 \end_layout
20182
20183 \begin_layout Labeling
20184 \labelwidthstring 00.00.0000
20185 Unset: 
20186 \family typewriter
20187 svn propdel svn:needs-lock "<file-name>"
20188 \end_layout
20189
20190 \begin_layout Subsubsection
20191 \begin_inset CommandInset label
20192 LatexCommand label
20193 name "sub:VCS-Revision-Information"
20194
20195 \end_inset
20196
20197 Revision Information in Documents
20198 \end_layout
20199
20200 \begin_layout Standard
20201 There are more possibilities how to activate revision information in our
20202  document.
20203 \end_layout
20204
20205 \begin_layout Itemize
20206 LyX supports directly:
20207 \end_layout
20208
20209 \begin_deeper
20210 \begin_layout Itemize
20211 tree revision information (
20212 \begin_inset Flex Code
20213 status collapsed
20214
20215 \begin_layout Plain Layout
20216 vcs-tree-revision
20217 \end_layout
20218
20219 \end_inset
20220
20221 ).
20222  The result is the output of the 
20223 \begin_inset Flex Code
20224 status collapsed
20225
20226 \begin_layout Plain Layout
20227 svnversion
20228 \end_layout
20229
20230 \end_inset
20231
20232  command, the following table gives you an idea, how to read the results.
20233 \end_layout
20234
20235 \begin_layout Standard
20236 \align center
20237 \begin_inset Tabular
20238 <lyxtabular version="3" rows="6" columns="2">
20239 <features tabularvalignment="middle">
20240 <column alignment="center" valignment="top" width="0">
20241 <column alignment="center" valignment="top" width="0">
20242 <row>
20243 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20244 \begin_inset Text
20245
20246 \begin_layout Plain Layout
20247 Output
20248 \end_layout
20249
20250 \end_inset
20251 </cell>
20252 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20253 \begin_inset Text
20254
20255 \begin_layout Plain Layout
20256 Meaning
20257 \end_layout
20258
20259 \end_inset
20260 </cell>
20261 </row>
20262 <row>
20263 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20264 \begin_inset Text
20265
20266 \begin_layout Plain Layout
20267 4123:4168
20268 \end_layout
20269
20270 \end_inset
20271 </cell>
20272 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20273 \begin_inset Text
20274
20275 \begin_layout Plain Layout
20276 mixed revision working copy
20277 \end_layout
20278
20279 \end_inset
20280 </cell>
20281 </row>
20282 <row>
20283 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20284 \begin_inset Text
20285
20286 \begin_layout Plain Layout
20287 4168M
20288 \end_layout
20289
20290 \end_inset
20291 </cell>
20292 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20293 \begin_inset Text
20294
20295 \begin_layout Plain Layout
20296 modified working copy
20297 \end_layout
20298
20299 \end_inset
20300 </cell>
20301 </row>
20302 <row>
20303 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20304 \begin_inset Text
20305
20306 \begin_layout Plain Layout
20307 4123S
20308 \end_layout
20309
20310 \end_inset
20311 </cell>
20312 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20313 \begin_inset Text
20314
20315 \begin_layout Plain Layout
20316 switched working copy
20317 \end_layout
20318
20319 \end_inset
20320 </cell>
20321 </row>
20322 <row>
20323 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20324 \begin_inset Text
20325
20326 \begin_layout Plain Layout
20327 4123P
20328 \end_layout
20329
20330 \end_inset
20331 </cell>
20332 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20333 \begin_inset Text
20334
20335 \begin_layout Plain Layout
20336 partial working copy, from a sparse checkout
20337 \end_layout
20338
20339 \end_inset
20340 </cell>
20341 </row>
20342 <row>
20343 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20344 \begin_inset Text
20345
20346 \begin_layout Plain Layout
20347 4123:4168MS
20348 \end_layout
20349
20350 \end_inset
20351 </cell>
20352 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20353 \begin_inset Text
20354
20355 \begin_layout Plain Layout
20356 mixed revision, modified, switched working copy
20357 \end_layout
20358
20359 \end_inset
20360 </cell>
20361 </row>
20362 </lyxtabular>
20363
20364 \end_inset
20365
20366
20367 \end_layout
20368
20369 \begin_layout Itemize
20370 file revision information.
20371  The result comes from parsing the output of 
20372 \begin_inset Flex Code
20373 status collapsed
20374
20375 \begin_layout Plain Layout
20376 svn
20377 \begin_inset space ~
20378 \end_inset
20379
20380 info
20381 \begin_inset space ~
20382 \end_inset
20383
20384 --xml
20385 \begin_inset space ~
20386 \end_inset
20387
20388 file.lyx
20389 \end_layout
20390
20391 \end_inset
20392
20393 .
20394  Supported flags are:
20395 \end_layout
20396
20397 \begin_deeper
20398 \begin_layout Itemize
20399 version number of the last commit (
20400 \begin_inset Flex Code
20401 status collapsed
20402
20403 \begin_layout Plain Layout
20404 vcs-revision
20405 \end_layout
20406
20407 \end_inset
20408
20409 )
20410 \end_layout
20411
20412 \begin_layout Itemize
20413 author of the last commit (
20414 \begin_inset Flex Code
20415 status collapsed
20416
20417 \begin_layout Plain Layout
20418 vcs-author
20419 \end_layout
20420
20421 \end_inset
20422
20423 )
20424 \end_layout
20425
20426 \begin_layout Itemize
20427 date of the last commit (
20428 \begin_inset Flex Code
20429 status collapsed
20430
20431 \begin_layout Plain Layout
20432 vcs-date
20433 \end_layout
20434
20435 \end_inset
20436
20437 )
20438 \end_layout
20439
20440 \begin_layout Itemize
20441 time of the last commit (
20442 \begin_inset Flex Code
20443 status collapsed
20444
20445 \begin_layout Plain Layout
20446 vcs-time
20447 \end_layout
20448
20449 \end_inset
20450
20451 )
20452 \end_layout
20453
20454 \end_deeper
20455 \begin_layout Standard
20456 You can obtain this info via InsetInfo (e.g.
20457  
20458 \begin_inset Flex Code
20459 status collapsed
20460
20461 \begin_layout Plain Layout
20462 info-insert buffer vcs-date
20463 \end_layout
20464
20465 \end_inset
20466
20467 ).
20468  The information will be available only when you have the file stored under
20469  svn managment (i.e.
20470  the 
20471 \begin_inset Flex Code
20472 status collapsed
20473
20474 \begin_layout Plain Layout
20475 .svn
20476 \end_layout
20477
20478 \end_inset
20479
20480  directory is available with your document).
20481 \end_layout
20482
20483 \end_deeper
20484 \begin_layout Itemize
20485 Another---a hacking one---possibility is to use svn keywords
20486 \begin_inset Foot
20487 status collapsed
20488
20489 \begin_layout Plain Layout
20490 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20491 \end_layout
20492
20493 \end_inset
20494
20495 .
20496  In short -- you set file keywords property (e.g.
20497  
20498 \family sans
20499 svn propset svn:keywords 'Rev' file.lyx
20500 \family default
20501 ) and then paste keyword TeX code
20502 \begin_inset Foot
20503 status collapsed
20504
20505 \begin_layout Plain Layout
20506 This is an easy way how to ensure that LyX won't break the line in the middle
20507  of keyword tag.
20508 \end_layout
20509
20510 \end_inset
20511
20512  tag in your document (e.g.
20513  
20514 \begin_inset ERT
20515 status open
20516
20517 \begin_layout Plain Layout
20518
20519 $Rev$
20520 \end_layout
20521
20522 \end_inset
20523
20524 ).
20525  This way svn client will automatically substitute revision number (e.g.
20526  
20527 \begin_inset ERT
20528 status open
20529
20530 \begin_layout Plain Layout
20531
20532 $Rev: 59 $
20533 \end_layout
20534
20535 \end_inset
20536
20537 ) after each update and commit.
20538  There are more problems with this approach.
20539  Firstly, the '$' character is used in TeX world for math equations, so
20540  any occurence of math formula 
20541 \begin_inset Formula $Rev$
20542 \end_inset
20543
20544  become 
20545 \begin_inset Formula $Rev:59$
20546 \end_inset
20547
20548  in your LyX document.
20549  Similarly for other keywords like Id, Date, Author, etc.
20550  Secondly svn output is dependent on your locales, so its very easy that
20551  svn would produce some problematic strings once Date is used.
20552  Thirdly you get the whole 'Rev: 59' string in your document instead of
20553  the plain number.
20554  Until subversion implements user's custom keywords it will be hard to use
20555  this approach reliably or let LyX to support it directly.
20556 \end_layout
20557
20558 \begin_layout Subsection
20559 SVN and Windows Environment
20560 \end_layout
20561
20562 \begin_layout Quote
20563 My inclination is to say that if the user cannot figure out the command
20564  line operations on their own fairly quickly, they would be well advised
20565  to use TortoiseSVN.
20566  ---P.
20567  A.
20568  Rubin
20569 \end_layout
20570
20571 \begin_layout Subsubsection
20572 Preparation
20573 \end_layout
20574
20575 \begin_layout Standard
20576 In addition to installing LyX, and having access to a Subversion repository,
20577  the user will need to install the Subversion client program.
20578  A Windows installer for the client program is available from 
20579 \begin_inset CommandInset href
20580 LatexCommand href
20581 name "CollabNet"
20582 target "http://www.collab.net/nonav/downloads/subversion/"
20583
20584 \end_inset
20585
20586 .
20587  The user may also want to install 
20588 \begin_inset CommandInset href
20589 LatexCommand href
20590 name "TortoiseSVN"
20591 target "http://tortoisesvn.tigris.org/"
20592
20593 \end_inset
20594
20595 , which integrates Subversion operations into the context (rightclick) menu
20596  of Windows Explorer.
20597  Operations done outside LyX will typically be more convenient using the
20598  Explorer context menu.
20599  Note that TortoiseSVN is not a replacement for the client program, which
20600  is what LyX itself will use.
20601 \end_layout
20602
20603 \begin_layout Subsubsection
20604 Bringing a document under Subversion control
20605 \end_layout
20606
20607 \begin_layout Standard
20608 Before a LyX document can be brought under version control in Subversion,
20609  its parent directory needs to be under version control.
20610  If the document is being added to a project already in the repository,
20611  this is accomplished by checking the project out to the directory where
20612  the new document will be placed.
20613  If the project itself is not yet under version control (for instance, if
20614  this document starts a new project), the directory must be imported into
20615  the repository.
20616  This is done outside LyX.
20617  Both import and checkout are easily accomplished from the Explorer context
20618  menu using TortoiseSVN, or alternatively can be done using the command
20619  line client at a DOS prompt.
20620  The procedure for importing the project using TortoiseSVN is described
20621  below, assuming an existing repository and a new project being started
20622  in 
20623 \family typewriter
20624 C:
20625 \backslash
20626 new project
20627 \family default
20628 .
20629  For information on using the Subversion client program, run 
20630 \family typewriter
20631 svn --help 
20632 \family default
20633 in a DOS shell.
20634 \end_layout
20635
20636 \begin_layout Enumerate
20637 Locate 
20638 \family typewriter
20639 C:
20640 \backslash
20641 new project 
20642 \family default
20643 in Windows Explorer, right click it, and select 
20644 \family typewriter
20645 TortoiseSVN > Repo-browser
20646 \family default
20647 .
20648  If necessary, adjust the URL for the repository, then click OK.
20649 \end_layout
20650
20651 \begin_layout Enumerate
20652 Right click the level of the repository under which you want to place the
20653  new project folder (typically the top level) and click 
20654 \family typewriter
20655 Create folder\SpecialChar \ldots{}
20656
20657 \family default
20658  Supply a name for the project folder and click OK.
20659  Add a message for the log file if desired, then click OK again.
20660  The new project folder should appear in the repository.
20661  Finally, click OK again to exit the repository browser.
20662 \end_layout
20663
20664 \begin_layout Enumerate
20665 Once again right click 
20666 \family typewriter
20667 C:
20668 \backslash
20669 new project
20670 \family default
20671 , this time selecting SVN Checkout\SpecialChar \ldots{}
20672  Select the URL of the project folder
20673  you just created in the repository, and set the checkout directory to 
20674 \family typewriter
20675 C:
20676 \backslash
20677 new project.
20678
20679 \family default
20680  Click OK.
20681  You will be warned about a non-empty folder; click OK to proceed.
20682  You should now have a 
20683 \family typewriter
20684 .svn
20685 \family default
20686  directory under 
20687 \family typewriter
20688 C:
20689 \backslash
20690 new project.
20691 \end_layout
20692
20693 \begin_layout Enumerate
20694 Create or open your document in LyX and click 
20695 \family sans
20696 \bar under
20697 F
20698 \bar default
20699 ile\SpecialChar \menuseparator
20700
20701 \bar under
20702 V
20703 \bar default
20704 ersion
20705 \begin_inset space ~
20706 \end_inset
20707
20708 Control\SpecialChar \menuseparator
20709
20710 \bar under
20711 R
20712 \bar default
20713 egister.
20714  
20715 \family default
20716 Add a log message and click OK to commit the document to version control.
20717 \end_layout
20718
20719 \begin_layout Standard
20720 From this point onward, you should have full functionality in the 
20721 \family sans
20722 \bar under
20723 F
20724 \bar default
20725 ile\SpecialChar \menuseparator
20726
20727 \bar under
20728 V
20729 \bar default
20730 ersion
20731 \begin_inset space ~
20732 \end_inset
20733
20734 Control
20735 \family default
20736  menu.
20737  You also have the option of checking the document in and out, viewing its
20738  history, etc.
20739  using the TortoiseSVN context menu in Windows Explorer or the Subversion
20740  client program from a command prompt.
20741 \end_layout
20742
20743 \begin_layout Subsubsection
20744 SSH tunnel used with SVN under Windows
20745 \end_layout
20746
20747 \begin_layout Standard
20748 Compared with Linux setting up svn client to communicate over ssh under
20749  Windows is a rather troublesome task.
20750  We will at least offer some hints how to setup the client side but prior
20751  knowledge about ssh and the Windows command line is needed, also be prepared
20752  for a great deal of frustration\SpecialChar \ldots{}
20753
20754 \end_layout
20755
20756 \begin_layout Enumerate
20757 Get a svn client for windows, as described in the previous sections.
20758  When it is a fresh install run some svn command (e.g.
20759  
20760 \begin_inset Flex Code
20761 status collapsed
20762
20763 \begin_layout Plain Layout
20764 svn --version
20765 \end_layout
20766
20767 \end_inset
20768
20769 ) to create config files, which you will need to change later on.
20770 \end_layout
20771
20772 \begin_layout Enumerate
20773 Choose a ssh client for Windows.
20774  There are several possibilities, we will use the one from Putty tools
20775 \begin_inset Foot
20776 status open
20777
20778 \begin_layout Plain Layout
20779 \begin_inset Flex URL
20780 status collapsed
20781
20782 \begin_layout Plain Layout
20783
20784 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20785 \end_layout
20786
20787 \end_inset
20788
20789
20790 \end_layout
20791
20792 \end_inset
20793
20794 .
20795  You will need to set the connection up so that the client doesn't ask for
20796  any password from you.
20797  To keep things easy we will use only keys without any additional password
20798  protection etc.
20799 \end_layout
20800
20801 \begin_deeper
20802 \begin_layout Enumerate
20803 Generate keys by 
20804 \begin_inset Flex Code
20805 status collapsed
20806
20807 \begin_layout Plain Layout
20808 puttygen
20809 \end_layout
20810
20811 \end_inset
20812
20813 .
20814  Save your private .ppk key file and put the public one on the server side.
20815  If the SVN server runs on Linux, note that the format of the public key
20816  is not compatible with Linux openssh and you will need to direcly copy-paste
20817  the key from the “
20818 \emph on
20819 Public key for pasting into OpenSSH authorized_keys file
20820 \emph default
20821 :” edit field into the server's 
20822 \begin_inset Flex Code
20823 status collapsed
20824
20825 \begin_layout Plain Layout
20826 ~/.ssh/authorized_keys
20827 \end_layout
20828
20829 \end_inset
20830
20831
20832 \begin_inset Flex Code
20833 status collapsed
20834
20835 \begin_layout Plain Layout
20836 authorized_keys2
20837 \end_layout
20838
20839 \end_inset
20840
20841  file.
20842 \end_layout
20843
20844 \begin_layout Enumerate
20845 Get the Putty's 
20846 \begin_inset Flex Code
20847 status collapsed
20848
20849 \begin_layout Plain Layout
20850 plink
20851 \end_layout
20852
20853 \end_inset
20854
20855 .
20856  In the SVN config file
20857 \begin_inset Foot
20858 status collapsed
20859
20860 \begin_layout Plain Layout
20861 Exact path depends on Windows version, usually somewhere around 
20862 \begin_inset Flex Code
20863 status collapsed
20864
20865 \begin_layout Plain Layout
20866 c:
20867 \backslash
20868 Documents and Settings
20869 \backslash
20870 user
20871 \backslash
20872 Application Data
20873 \backslash
20874 Subversion
20875 \backslash
20876 config
20877 \end_layout
20878
20879 \end_inset
20880
20881  / 
20882 \begin_inset Flex Code
20883 status collapsed
20884
20885 \begin_layout Plain Layout
20886 AppData
20887 \backslash
20888 Roaming
20889 \backslash
20890 Subversion
20891 \end_layout
20892
20893 \end_inset
20894
20895 .
20896 \end_layout
20897
20898 \end_inset
20899
20900 , section [tunnels], setup ssh command, e.g.
20901  
20902 \begin_inset Flex Code
20903 status collapsed
20904
20905 \begin_layout Plain Layout
20906 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20907 \end_layout
20908
20909 \end_inset
20910
20911 .
20912 \begin_inset Foot
20913 status collapsed
20914
20915 \begin_layout Plain Layout
20916 It will usually take a lot of time to get exact command right and it depends
20917  on many things.
20918  For example do not have some remote server saved as a default session in
20919  Putty etc.
20920  If things fail, try to connect via plink without SVN first.
20921 \end_layout
20922
20923 \end_inset
20924
20925
20926 \end_layout
20927
20928 \end_deeper
20929 \begin_layout Enumerate
20930 Checkout the SVN archive, e.g.
20931  
20932 \begin_inset Flex Code
20933 status collapsed
20934
20935 \begin_layout Plain Layout
20936 svn co svn+ssh://user@server/repository_path
20937 \end_layout
20938
20939 \end_inset
20940
20941 .
20942 \end_layout
20943
20944 \begin_layout Subsubsection
20945 End-of-Line Conversions
20946 \end_layout
20947
20948 \begin_layout Standard
20949 When the collsraborators are mixing Linux and Windows environments, LyX
20950  will use different line endings inside the .lyx files.
20951  This is not a problem as far as LyX functionality is concerned, but the
20952  commit diffs will be huge and merge-conflicts prone.
20953  Fortunately SVN itself knows
20954 \begin_inset Foot
20955 status collapsed
20956
20957 \begin_layout Plain Layout
20958 \begin_inset Flex URL
20959 status collapsed
20960
20961 \begin_layout Plain Layout
20962
20963 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20964 \end_layout
20965
20966 \end_inset
20967
20968
20969 \end_layout
20970
20971 \end_inset
20972
20973  how to deal with CR/LF problems when switching .lyx files to the 
20974 \begin_inset Flex Code
20975 status collapsed
20976
20977 \begin_layout Plain Layout
20978 native
20979 \end_layout
20980
20981 \end_inset
20982
20983  mode.
20984 \begin_inset Foot
20985 status collapsed
20986
20987 \begin_layout Plain Layout
20988 For the lazy guys: 
20989 \begin_inset Flex Code
20990 status collapsed
20991
20992 \begin_layout Plain Layout
20993 svn propset svn:eol-style native FILE_NAME
20994 \end_layout
20995
20996 \end_inset
20997
20998
20999 \end_layout
21000
21001 \end_inset
21002
21003
21004 \end_layout
21005
21006 \begin_layout Subsection
21007 Further tuning
21008 \end_layout
21009
21010 \begin_layout Standard
21011 With the recent addition of the vc-command function LyX power users are
21012  allowed to create their own commands for revision control.
21013 \end_layout
21014
21015 \begin_layout Standard
21016 As an example you can see how two TortoiseSVN commands could be integrated
21017  directly:
21018 \end_layout
21019
21020 \begin_layout Description
21021 Commit: 
21022 \begin_inset Flex Code
21023 status collapsed
21024
21025 \begin_layout Plain Layout
21026 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21027 \end_layout
21028
21029 \end_inset
21030
21031
21032 \end_layout
21033
21034 \begin_layout Description
21035 Revert: 
21036 \begin_inset Flex Code
21037 status collapsed
21038
21039 \begin_layout Plain Layout
21040 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21041 \end_layout
21042
21043 \end_inset
21044
21045
21046 \end_layout
21047
21048 \begin_layout Subsection
21049 Version control and Document comparison
21050 \end_layout
21051
21052 \begin_layout Standard
21053 One of the typical uses of version control is to inspect the changes between
21054  revisions, usually by creating 
21055 \begin_inset Flex Code
21056 status collapsed
21057
21058 \begin_layout Plain Layout
21059 diff
21060 \end_layout
21061
21062 \end_inset
21063
21064  dumps.
21065  While this is useful for plain text files, it is much less useful in the
21066  case of LyX files, which have more complicated structure.
21067  Hence we provide binding to the Document comparison feature.
21068  They are two ways of calling this feature - either by direct call of 
21069 \begin_inset Flex Code
21070 status collapsed
21071
21072 \begin_layout Plain Layout
21073 VC_COMPARE
21074 \end_layout
21075
21076 \end_inset
21077
21078  LyX function (for details see LyX functions manual) or by icon/menu item
21079  
21080 \begin_inset Flex MenuItem
21081 status collapsed
21082
21083 \begin_layout Plain Layout
21084 Compare with older revision...
21085 \end_layout
21086
21087 \end_inset
21088
21089 .
21090  One can either compare two chosen revisions of the document or he can simply
21091  compare the current version of edited text with older revisions (where
21092  '
21093 \begin_inset Flex MenuItem
21094 status collapsed
21095
21096 \begin_layout Plain Layout
21097 0
21098 \end_layout
21099
21100 \end_inset
21101
21102 ' revisions back means comparison of the edited file with last commited
21103  revision).
21104  
21105 \end_layout
21106
21107 \begin_layout Standard
21108 This feature is supported for SVN and RCS though due to the more complicated
21109  versioning scheme of RCS there is a constraint -- when addressing the revisions
21110  in dialog, numbers always point to the last number in RCS revision number,
21111  i.e.
21112  '35' in '1.2.35'.
21113 \end_layout
21114
21115 \begin_layout Section
21116 Literate Programming
21117 \end_layout
21118
21119 \begin_layout Standard
21120 Updated by 
21121 \noun on
21122 Kayvan Sylvan 
21123 \noun default
21124 (kayvan@sylvan.com)
21125 \noun on
21126
21127 \noun default
21128 original documentation written by 
21129 \noun on
21130 Edmar Wienskoski Jr.
21131
21132 \noun default
21133  (edmar-w-jr@technologist.com)
21134 \end_layout
21135
21136 \begin_layout Subsection
21137 Introduction
21138 \end_layout
21139
21140 \begin_layout Standard
21141 The main purpose of this documentation is to show you how to use LyX for
21142  literate programming, where it is assumed that you are familiar with this
21143  programming technique, and know what 
21144 \begin_inset Quotes eld
21145 \end_inset
21146
21147 tangling
21148 \begin_inset Quotes erd
21149 \end_inset
21150
21151  and 
21152 \begin_inset Quotes eld
21153 \end_inset
21154
21155 weaving
21156 \begin_inset Quotes erd
21157 \end_inset
21158
21159  means.
21160  If that is not the case, please follow the web links provided in the following
21161  sections.
21162  There is a lot of good documentation out there covering old development
21163  history to the latest tools tips.
21164 \end_layout
21165
21166 \begin_layout Standard
21167 It is also assumed that you are familiar with LyX itself to a point that
21168  you are comfortable changing your LyX preferences, and X resources file.
21169  If that is not the case please refer to other LyX documentation to cover
21170  your specific needs.
21171 \end_layout
21172
21173 \begin_layout Subsection
21174 Literate Programming
21175 \end_layout
21176
21177 \begin_layout Standard
21178 From the Literate Programming FAQ: 
21179 \end_layout
21180
21181 \begin_layout Quotation
21182 Literate programming is the combination of documentation and source together
21183  in a fashion suited for reading by human beings.
21184  In fact, literate programs should be enjoyable reading, even inviting!
21185  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21186  and documentation in a single file.
21187  Literate programming tools then parse the file to produce either readable
21188  documentation or compilable source.
21189  The WEB style of literate programming was created by D.
21190 \begin_inset space \thinspace{}
21191 \end_inset
21192
21193 E.
21194  Knuth during the development of his TeX typesetting software.
21195  
21196 \end_layout
21197
21198 \begin_layout Standard
21199 Another excerpt says:
21200 \end_layout
21201
21202 \begin_layout Quotation
21203
21204 \emph on
21205 How is literate programming different from verbose commenting?
21206 \end_layout
21207
21208 \begin_layout Quotation
21209 There are three distinguishing characteristics.
21210  In order of importance, they are: 
21211 \end_layout
21212
21213 \begin_deeper
21214 \begin_layout Itemize
21215 flexible order of elaboration 
21216 \end_layout
21217
21218 \begin_layout Itemize
21219 automatic support for browsing 
21220 \end_layout
21221
21222 \begin_layout Itemize
21223 typeset documentation, especially diagrams and mathematics 
21224 \end_layout
21225
21226 \end_deeper
21227 \begin_layout Standard
21228 Now that I sparked your curiosity, take a look in the references.
21229 \end_layout
21230
21231 \begin_layout Subsubsection
21232 References
21233 \end_layout
21234
21235 \begin_layout Standard
21236 The complete Literate Programming FAQ can be found at:
21237 \end_layout
21238
21239 \begin_layout Quote
21240 Literate Programming FAQ 
21241 \begin_inset Flex URL
21242 status collapsed
21243
21244 \begin_layout Plain Layout
21245
21246 http://www.literateprogramming.com/lpfaq.pdf
21247 \end_layout
21248
21249 \end_inset
21250
21251
21252 \end_layout
21253
21254 \begin_layout Standard
21255 The FAQ lists 23 (twenty three!) different literate programming tools.
21256  Where some are specialized or 
21257 \begin_inset Quotes eld
21258 \end_inset
21259
21260 tailored
21261 \begin_inset Quotes erd
21262 \end_inset
21263
21264  for particular programming languages, while other have general scope.
21265  I selected 
21266 \noun on
21267 Noweb
21268 \noun default
21269  for my own use for several reasons:
21270 \end_layout
21271
21272 \begin_layout Itemize
21273 It can generate the documentation either in LaTeX or HTML.
21274 \end_layout
21275
21276 \begin_layout Itemize
21277 It has a open architecture, i.
21278 \begin_inset space \thinspace{}
21279 \end_inset
21280
21281 g.
21282 \begin_inset space \space{}
21283 \end_inset
21284
21285 it is easy to plug in new filters and to perform special processing that
21286  you may need.
21287  
21288 \end_layout
21289
21290 \begin_layout Itemize
21291 There is a good selection of filters available already (the HTML is one
21292  of them).
21293 \end_layout
21294
21295 \begin_layout Itemize
21296 It is free.
21297 \end_layout
21298
21299 \begin_layout Standard
21300 The Noweb web page can be found at: 
21301 \end_layout
21302
21303 \begin_layout Quote
21304 Noweb home page 
21305 \begin_inset Flex URL
21306 status collapsed
21307
21308 \begin_layout Plain Layout
21309
21310 http://www.cs.virginia.edu/~nr/noweb/
21311 \end_layout
21312
21313 \end_inset
21314
21315
21316 \end_layout
21317
21318 \begin_layout Standard
21319 Starting from there you can reach many other interesting links and even
21320  some literate program examples.
21321 \end_layout
21322
21323 \begin_layout Subsection
21324 LyX and Literate Programming
21325 \end_layout
21326
21327 \begin_layout Standard
21328 The LyX support for Literate Programming is provided by using the generic
21329  LyX converters mechanism.
21330  This support is provided in a 
21331 \begin_inset Quotes eld
21332 \end_inset
21333
21334 Noweb independent
21335 \begin_inset Quotes erd
21336 \end_inset
21337
21338  way, i.
21339 \begin_inset space \thinspace{}
21340 \end_inset
21341
21342 g.
21343 \begin_inset space \space{}
21344 \end_inset
21345
21346 you will be able to use this new LyX feature with some other literate programmin
21347 g tool of your choice by just changing your LyX preferences.
21348 \end_layout
21349
21350 \begin_layout Subsubsection
21351 Generating documents and code (weaving and tangling)
21352 \end_layout
21353
21354 \begin_layout Paragraph
21355 Selecting the document class
21356 \end_layout
21357
21358 \begin_layout Standard
21359 If you have installed Noweb and LyX successfully, whenever you open a new
21360  document or try to change the document class of an existing one, you will
21361  find that there are three new document classes available:
21362 \end_layout
21363
21364 \begin_layout Itemize
21365 Article (Noweb)
21366 \end_layout
21367
21368 \begin_layout Itemize
21369 Book (Noweb)
21370 \end_layout
21371
21372 \begin_layout Itemize
21373 Report (Noweb)
21374 \end_layout
21375
21376 \begin_layout Standard
21377 You must select one of them to create your literate documents from.
21378  
21379 \end_layout
21380
21381 \begin_layout Standard
21382 Note that literate documents are not limited to these three classes.
21383  New classes can be generated from other styles like letter or in combination
21384  with other class variations like Article (AMS).
21385  If you have special needs that cannot be covered by one of the existing
21386  classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21387  will arrange to insert a new entry, or teach you how to do it.
21388 \begin_inset Foot
21389 status collapsed
21390
21391 \begin_layout Plain Layout
21392 It is very simple, it involves the creation of a file with four lines, and
21393  re-running of the auto configuration.
21394 \end_layout
21395
21396 \end_inset
21397
21398  Moreover, if you use a literate tool other than Noweb you may need to create
21399  a new set of document classes for it.
21400 \end_layout
21401
21402 \begin_layout Paragraph
21403 Typing code in
21404 \end_layout
21405
21406 \begin_layout Standard
21407 LyX enables you to write code with a layout named 
21408 \noun on
21409 Scrap
21410 \noun default
21411 .
21412 \begin_inset Foot
21413 status collapsed
21414
21415 \begin_layout Plain Layout
21416 The equivalent Noweb term is 
21417 \begin_inset Quotes eld
21418 \end_inset
21419
21420 Chunk
21421 \begin_inset Quotes erd
21422 \end_inset
21423
21424 .
21425  For historical reasons, I got used to the term 
21426 \begin_inset Quotes eld
21427 \end_inset
21428
21429 scrap
21430 \begin_inset Quotes erd
21431 \end_inset
21432
21433  introduced by other literate tool named Nuweb, which I used for many years
21434  before rendering myself to Noweb.
21435 \end_layout
21436
21437 \end_inset
21438
21439  Noweb delimits scraps like this:
21440 \end_layout
21441
21442 \begin_layout LyX-Code
21443 <<My scrap>>=
21444 \end_layout
21445
21446 \begin_layout LyX-Code
21447   code
21448 \end_layout
21449
21450 \begin_layout LyX-Code
21451   more code
21452 \end_layout
21453
21454 \begin_layout LyX-Code
21455   even more code
21456 \end_layout
21457
21458 \begin_layout LyX-Code
21459   @
21460 \end_layout
21461
21462 \begin_layout Standard
21463 The problem is that whatever is written in between the << and the 
21464 \family typewriter
21465 @
21466 \family default
21467  must be taken literally, i.
21468 \begin_inset space \thinspace{}
21469 \end_inset
21470
21471 g.
21472 \begin_inset space \space{}
21473 \end_inset
21474
21475 LyX should be prevented from making any special interpretation of what has
21476  been written.
21477  This is handled by a special layout named Scrap, that works like a normal
21478  paragraph but has a free spacing capability.
21479 \end_layout
21480
21481 \begin_layout Standard
21482 The down side of the Scrap paragraph layout is that consecutive paragraphs
21483  of code will be spaced with one empty line in the source code and also
21484  in the printed documentation.
21485  The work around is to enter each line of code within a single Scrap, with
21486  a newline (ctrl-return).
21487  The example above will look like this:
21488 \begin_inset Foot
21489 status collapsed
21490
21491 \begin_layout Plain Layout
21492 If you have a printed version of this document you will not see any difference
21493  between the previous example and this one.
21494 \end_layout
21495
21496 \end_inset
21497
21498
21499 \end_layout
21500
21501 \begin_layout LyX-Code
21502 <<My scrap>>=
21503 \begin_inset Newline newline
21504 \end_inset
21505
21506   code
21507 \begin_inset Newline newline
21508 \end_inset
21509
21510   more code
21511 \begin_inset Newline newline
21512 \end_inset
21513
21514   even more code
21515 \begin_inset Newline newline
21516 \end_inset
21517
21518   @
21519 \end_layout
21520
21521 \begin_layout Standard
21522 This layout works fine.
21523  The only real inconvenience is that you have to type ctrl-return instead
21524  of a plain return.
21525 \begin_inset Foot
21526 status collapsed
21527
21528 \begin_layout Plain Layout
21529 It is in my list of 
21530 \begin_inset Quotes eld
21531 \end_inset
21532
21533 improvements
21534 \begin_inset Quotes erd
21535 \end_inset
21536
21537  to fix that.
21538 \end_layout
21539
21540 \end_inset
21541
21542
21543 \end_layout
21544
21545 \begin_layout Standard
21546 As a special note, you can also use the 
21547 \begin_inset Quotes eld
21548 \end_inset
21549
21550 %def
21551 \begin_inset Quotes erd
21552 \end_inset
21553
21554  construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21555 rence:
21556 \end_layout
21557
21558 \begin_layout LyX-Code
21559 <<My scrap>>=
21560 \begin_inset Newline newline
21561 \end_inset
21562
21563   def some_function(args):
21564 \begin_inset Newline newline
21565 \end_inset
21566
21567     "This is the doc string for this function."
21568 \begin_inset Newline newline
21569 \end_inset
21570
21571     print "My args: ", args
21572 \end_layout
21573
21574 \begin_layout LyX-Code
21575 @ %def some_function
21576 \end_layout
21577
21578 \begin_layout Standard
21579 For an example of this usage and the resulting cross-reference output, look
21580  at the Literate python program in 
21581 \emph on
21582 LIBDIR/examples/listerrors.lyx
21583 \emph default
21584  which should make this all clear.
21585 \end_layout
21586
21587 \begin_layout Paragraph
21588 Generating the documentation
21589 \end_layout
21590
21591 \begin_layout Standard
21592 At this point you already have a new document file with a proper document
21593  class, and with some code and text on it.
21594  How do I print it? The answer is simple, you select 
21595 \family sans
21596 View\SpecialChar \menuseparator
21597 DVI,
21598 \family default
21599  etc.
21600  Just like you would do for a plain document.
21601  No special procedure is required.
21602 \end_layout
21603
21604 \begin_layout Standard
21605 To help orientate you, I will now explain what happens inside LyX:
21606 \end_layout
21607
21608 \begin_layout Enumerate
21609 When the 
21610 \family sans
21611 Update\SpecialChar \menuseparator
21612 DVI
21613 \family default
21614  menu option is chosen, a LaTeX file is generated.
21615  
21616 \end_layout
21617
21618 \begin_deeper
21619 \begin_layout Standard
21620 If the document is of any literate class the generated file will be named
21621  with an extension name defined by the 
21622 \begin_inset Quotes eld
21623 \end_inset
21624
21625 literate
21626 \begin_inset Quotes erd
21627 \end_inset
21628
21629  format (defined in the Preferences panel), otherwise the file will have
21630  the usual 
21631 \family typewriter
21632 .tex
21633 \family default
21634  extension.
21635 \end_layout
21636
21637 \end_deeper
21638 \begin_layout Enumerate
21639 Note that the only difference so far is in the name of the file, no special
21640  processing is required by LyX.
21641  Given that you formatted the code using the Scrap layout that, by itself,
21642  takes care of the business.
21643 \end_layout
21644
21645 \begin_layout Enumerate
21646 If the document is of any literate class LyX will then use the internal
21647  LyX to Noweb converter, followed by the Noweb to LaTeX converter
21648 \begin_inset Foot
21649 status collapsed
21650
21651 \begin_layout Plain Layout
21652 The converters are defined in the 
21653 \family sans
21654 Tools\SpecialChar \menuseparator
21655 Preferences
21656 \family default
21657  panel, under the 
21658 \begin_inset Quotes eld
21659 \end_inset
21660
21661 Conversion
21662 \begin_inset Quotes erd
21663 \end_inset
21664
21665  tab.
21666  See section 
21667 \emph on
21668 Converters
21669 \emph default
21670  of the 
21671 \emph on
21672 Customization
21673 \emph default
21674  manual for general information about converters.
21675 \end_layout
21676
21677 \end_inset
21678
21679  to generate the LaTeX file.
21680 \end_layout
21681
21682 \begin_deeper
21683 \begin_layout Standard
21684 Otherwise it will just skip this step.
21685 \end_layout
21686
21687 \end_deeper
21688 \begin_layout Enumerate
21689 Finally, LaTeX is invoked and the regular post processing continues as in
21690  a plain document.
21691 \end_layout
21692
21693 \begin_layout Standard
21694 Independence from a particular 
21695 \begin_inset Quotes eld
21696 \end_inset
21697
21698 literate tool
21699 \begin_inset Quotes erd
21700 \end_inset
21701
21702  is easily achieved by changing the commands that are run by the various
21703  converters.
21704 \end_layout
21705
21706 \begin_layout Paragraph
21707 Generating the code
21708 \end_layout
21709
21710 \begin_layout Standard
21711 When the build menu option is chosen or the corresponding button in the
21712  toolbar is pressed, a LaTeX file is generated just like step 1 above.
21713  Next, LyX invokes the 
21714 \family typewriter
21715 Noweb->Program
21716 \family default
21717  converter.
21718  This converter needs to be defined by the user and is not installed by
21719  default, though the Program format is.
21720  This converter (like any other converter) will have two parts:
21721 \end_layout
21722
21723 \begin_layout Enumerate
21724 The converter program itself.
21725  This program performs the conversion from the one format to the other (in
21726  this case, from the Noweb format to the Program pseudo-format).
21727 \end_layout
21728
21729 \begin_layout Enumerate
21730 The error log parser.
21731  This is a program whose sole purpose is to rewrite error messages in a
21732  format that LyX understands.
21733  This makes it possible for LyX to place error boxes in the right places
21734  in the file buffer.
21735 \end_layout
21736
21737 \begin_layout Standard
21738 The first part, the 
21739 \begin_inset Quotes eld
21740 \end_inset
21741
21742 Converter
21743 \begin_inset Quotes erd
21744 \end_inset
21745
21746  setting, should be set to 
21747 \begin_inset Quotes eld
21748 \end_inset
21749
21750
21751 \family typewriter
21752 build-script $$i
21753 \family default
21754
21755 \begin_inset Quotes erd
21756 \end_inset
21757
21758 .
21759  This basically means that LyX will call 
21760 \begin_inset Quotes eld
21761 \end_inset
21762
21763 build-script
21764 \begin_inset Quotes erd
21765 \end_inset
21766
21767  (a program or script) with the name of the Noweb file (normally a file
21768  in the LyX temp directory).
21769  
21770 \end_layout
21771
21772 \begin_layout Standard
21773 This is an implementation of 
21774 \begin_inset Quotes eld
21775 \end_inset
21776
21777 build-script
21778 \begin_inset Quotes erd
21779 \end_inset
21780
21781  that you can place in a directory on your path:
21782 \end_layout
21783
21784 \begin_layout LyX-Code
21785 #!/bin/sh
21786 \end_layout
21787
21788 \begin_layout LyX-Code
21789 #
21790 \end_layout
21791
21792 \begin_layout LyX-Code
21793 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21794 \end_layout
21795
21796 \begin_layout Standard
21797 The next part of the converter setting is the 
21798 \begin_inset Quotes eld
21799 \end_inset
21800
21801 Flags
21802 \begin_inset Quotes erd
21803 \end_inset
21804
21805  which is to be set to 
21806 \begin_inset Quotes eld
21807 \end_inset
21808
21809
21810 \family typewriter
21811 parselog=listerrors
21812 \family default
21813
21814 \begin_inset Quotes erd
21815 \end_inset
21816
21817 .
21818  This will run any errors that are generated by the 
21819 \begin_inset Quotes eld
21820 \end_inset
21821
21822 build-script
21823 \begin_inset Quotes erd
21824 \end_inset
21825
21826  process through the 
21827 \begin_inset Quotes eld
21828 \end_inset
21829
21830 listerrors
21831 \begin_inset Quotes erd
21832 \end_inset
21833
21834  program.
21835 \end_layout
21836
21837 \begin_layout Standard
21838 The converter code looks in 
21839 \emph on
21840 MYLYXDIR/scripts
21841 \emph default
21842  first, then in 
21843 \emph on
21844 LIBDIR/scripts
21845 \emph default
21846  then on the path for the 
21847 \begin_inset Quotes eld
21848 \end_inset
21849
21850 listerrors
21851 \begin_inset Quotes erd
21852 \end_inset
21853
21854  program.
21855 \end_layout
21856
21857 \begin_layout Standard
21858 The build will normally take place in LyX's temporary directory, so the
21859  files produced by the conversion will be in that directory.
21860  LyX will copy out what it regards as the `main' file, but the 
21861 \family typewriter
21862 Noweb->Program
21863 \family default
21864  conversion may produce several files, and so most of these would then be
21865  deleted when LyX was closed.
21866  The present solution is to use a `copier',
21867 \begin_inset Foot
21868 status collapsed
21869
21870 \begin_layout Plain Layout
21871 See section 
21872 \emph on
21873 Copiers
21874 \emph default
21875  of the 
21876 \emph on
21877 Customization
21878 \emph default
21879  manual for information on these.
21880 \end_layout
21881
21882 \end_inset
21883
21884  in this case, the 
21885 \family typewriter
21886 ext_copy.py
21887 \family default
21888  script in its default mode, so that the entire contents of the temporary
21889  directory is copied.
21890  More will get copied than is needed, to be sure, but nothing will be lost.
21891  If, however, you know what extensions the generated files will have, this
21892  can be improved by using the 
21893 \family typewriter
21894 -e
21895 \family default
21896  option to 
21897 \family typewriter
21898 ext_copy
21899 \family default
21900 .
21901  This option takes a comma-separated list of extensions to copy.
21902  So, for example, if the conversion will generate only files with the extensions
21903  
21904 \family typewriter
21905 .c
21906 \family default
21907  and 
21908 \family typewriter
21909 .h
21910 \family default
21911 , then the correct definition would be:
21912 \end_layout
21913
21914 \begin_layout LyX-Code
21915 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21916 \end_layout
21917
21918 \begin_layout Standard
21919 The result will be that only files with these two extensions will be copied
21920  out.
21921 \end_layout
21922
21923 \begin_layout Paragraph
21924 Build instructions in the document
21925 \end_layout
21926
21927 \begin_layout Standard
21928 The last piece of the integration between LyX and noweb is the 
21929 \begin_inset Quotes eld
21930 \end_inset
21931
21932 build-script
21933 \begin_inset Quotes erd
21934 \end_inset
21935
21936  scrap.
21937  Generally, the instructions for building your program should be embedded
21938  in a scrap of its own.
21939  The noweb-specific 
21940 \begin_inset Quotes eld
21941 \end_inset
21942
21943 build-script
21944 \begin_inset Quotes erd
21945 \end_inset
21946
21947  above uses the notangle command to look for this scrap (called 
21948 \begin_inset Quotes eld
21949 \end_inset
21950
21951 build-script
21952 \begin_inset Quotes erd
21953 \end_inset
21954
21955 ) and runs its contents through 
21956 \begin_inset Quotes eld
21957 \end_inset
21958
21959 sh
21960 \begin_inset Quotes erd
21961 \end_inset
21962
21963 .
21964 \end_layout
21965
21966 \begin_layout Standard
21967 Typically, such a scrap would look something like this:
21968 \end_layout
21969
21970 \begin_layout LyX-Code
21971 <<build-script>>=
21972 \begin_inset Newline newline
21973 \end_inset
21974
21975 #!/bin/sh
21976 \begin_inset Newline newline
21977 \end_inset
21978
21979
21980 \begin_inset Newline newline
21981 \end_inset
21982
21983 if [ -z "${NOWEB_SOURCE}" ]
21984 \begin_inset Newline newline
21985 \end_inset
21986
21987 then
21988 \begin_inset Newline newline
21989 \end_inset
21990
21991   NOWEB_SOURCE=myfile.nw
21992 \begin_inset Newline newline
21993 \end_inset
21994
21995 fi
21996 \begin_inset Newline newline
21997 \end_inset
21998
21999 [...
22000  code to extract files ...]
22001 \begin_inset Newline newline
22002 \end_inset
22003
22004 [...
22005  code to compile files ...]
22006 \begin_inset Newline newline
22007 \end_inset
22008
22009 @
22010 \end_layout
22011
22012 \begin_layout Standard
22013 Look in 
22014 \emph on
22015 LIBDIR/examples/listerrors.lyx
22016 \emph default
22017  or in 
22018 \emph on
22019 LIBDIR/examples/Literate.lyx
22020 \emph default
22021  which implement two versions of the 
22022 \begin_inset Quotes eld
22023 \end_inset
22024
22025 listerrors
22026 \begin_inset Quotes erd
22027 \end_inset
22028
22029  program for some illustrations of how all of these pieces go together or
22030  in 
22031 \emph on
22032 LIBDIR/examples/noweb2lyx.lyx.
22033
22034 \emph default
22035  Interestingly, these three files show off the language-indepence of the
22036  LyX literate programming support since they are written in Python, C and
22037  Perl respectively.
22038 \end_layout
22039
22040 \begin_layout Subsubsection
22041 Configuring LyX
22042 \end_layout
22043
22044 \begin_layout Standard
22045 All the Literate Programming support is configured by the 
22046 \family sans
22047 Tools\SpecialChar \menuseparator
22048 Preferences
22049 \family default
22050  panel in the 
22051 \begin_inset Quotes eld
22052 \end_inset
22053
22054 Conversion
22055 \begin_inset Quotes erd
22056 \end_inset
22057
22058  tab.
22059  The important parts are:
22060 \end_layout
22061
22062 \begin_layout Description
22063 the
22064 \begin_inset space ~
22065 \end_inset
22066
22067
22068 \begin_inset Quotes eld
22069 \end_inset
22070
22071 literate
22072 \begin_inset Quotes erd
22073 \end_inset
22074
22075
22076 \begin_inset space ~
22077 \end_inset
22078
22079 format Set up via the Formats tab, this is where the Noweb-specific pieces
22080  are set up.
22081  The 
22082 \family sans
22083 GUI Name
22084 \family default
22085  is set to 
22086 \family typewriter
22087 NoWeb
22088 \family default
22089 , the file extension is set to 
22090 \family typewriter
22091 .nw
22092 \family default
22093 .
22094  This tells LyX to create a file with a 
22095 \family typewriter
22096 .nw
22097 \family default
22098  extension in the first step of the conversion process.
22099 \end_layout
22100
22101 \begin_layout Description
22102 the
22103 \begin_inset space ~
22104 \end_inset
22105
22106
22107 \family sans
22108 Program
22109 \family default
22110
22111 \begin_inset space ~
22112 \end_inset
22113
22114 format This is an empty format whose sole purpose is to be the endpoint
22115  of a conversion (which then allows us to set up a converter for it).
22116 \end_layout
22117
22118 \begin_layout Description
22119
22120 \family sans
22121 NoWeb
22122 \family default
22123 ->
22124 \family sans
22125 LaTeX
22126 \family default
22127  This converter performs the 
22128 \begin_inset Quotes eld
22129 \end_inset
22130
22131 weaving
22132 \begin_inset Quotes erd
22133 \end_inset
22134
22135  of the literate document.
22136  For Noweb, it is set to 
22137 \begin_inset Quotes eld
22138 \end_inset
22139
22140
22141 \family typewriter
22142 noweave -delay -index $$i > $$o
22143 \family default
22144
22145 \begin_inset Quotes erd
22146 \end_inset
22147
22148
22149 \end_layout
22150
22151 \begin_layout Description
22152
22153 \family sans
22154 NoWeb
22155 \family default
22156 ->
22157 \family sans
22158 Program
22159 \family default
22160  This performs the 
22161 \begin_inset Quotes eld
22162 \end_inset
22163
22164 tangling step
22165 \begin_inset Quotes erd
22166 \end_inset
22167
22168 .
22169  As stated above, the Converter is set to 
22170 \begin_inset Quotes eld
22171 \end_inset
22172
22173
22174 \family typewriter
22175 build-script $$i
22176 \family default
22177
22178 \begin_inset Quotes erd
22179 \end_inset
22180
22181 , with Flags set to 
22182 \begin_inset Quotes eld
22183 \end_inset
22184
22185
22186 \family typewriter
22187 originaldir,parselog=listerrors
22188 \family default
22189
22190 \begin_inset Quotes erd
22191 \end_inset
22192
22193 .
22194 \end_layout
22195
22196 \begin_layout Subsubsection
22197 Debug extensions
22198 \end_layout
22199
22200 \begin_layout Standard
22201 There is also a new function implemented in the LyX server, the 
22202 \begin_inset Quotes eld
22203 \end_inset
22204
22205 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22206  
22207 \end_layout
22208
22209 \begin_layout Standard
22210 When debugging code with ddd/gdb, it is possible to invoke a text editor
22211  at the current execution position with a single key stroke.
22212  The default ddd configuration for that is shift-ctrl-V.
22213  It happens that you can define the editor command line invocation in ddd
22214  by accessing the 
22215 \family sans
22216 Edit\SpecialChar \menuseparator
22217 Preferences\SpecialChar \menuseparator
22218 Helpers
22219 \family default
22220  dialog and changing the "Edit Sources" entry.
22221 \end_layout
22222
22223 \begin_layout Standard
22224 I take advantage of the new created LyX server function and this ddd feature,
22225  and set 
22226 \begin_inset Quotes eld
22227 \end_inset
22228
22229 Edit Sources
22230 \begin_inset Quotes erd
22231 \end_inset
22232
22233  to:
22234 \end_layout
22235
22236 \begin_layout LyX-Code
22237 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22238 \end_layout
22239
22240 \begin_layout Standard
22241 With this, whenever you are using ddd and find a point in the program that
22242  you want to edit, you just press shift-ctrl-V (in the ddd window), and
22243  ddd you forward this information to LyX through the LyX server and then
22244  the LyX window will show the same file with the cursor at the same position
22245  ddd was pointing to.
22246  No more guessing or long scrolling to locate a point in the program back
22247  from debugging !
22248 \end_layout
22249
22250 \begin_layout Standard
22251 Note however that you must enable the LyX server to get this feature working
22252  (it is disabled by default).
22253  You can enable it in 
22254 \family sans
22255 Preferences
22256 \family default
22257  (tabs 
22258 \family sans
22259 Inputs
22260 \family default
22261
22262 \family sans
22263 Paths
22264 \family default
22265 ) by entering in the 
22266 \family sans
22267 LyXserver pipe
22268 \family default
22269  a path like 
22270 \begin_inset Quotes eld
22271 \end_inset
22272
22273
22274 \family typewriter
22275 /home/<your-home-directory>/.lyx/lyxpipe
22276 \family default
22277
22278 \begin_inset Quotes erd
22279 \end_inset
22280
22281
22282 \end_layout
22283
22284 \begin_layout Standard
22285 Read the LyX server documentation in the 
22286 \emph on
22287 Customization Manual
22288 \emph default
22289  for further information.
22290 \end_layout
22291
22292 \begin_layout Subsubsection
22293 Toolbar extensions
22294 \end_layout
22295
22296 \begin_layout Standard
22297 There are six new buttons that can be added to your LyX toolbar.
22298  Five of these buttons are short cuts to layout styles: 
22299 \family sans
22300 Standard
22301 \family default
22302
22303 \family sans
22304 Section
22305 \family default
22306
22307 \family sans
22308 LaTeX
22309 \family default
22310
22311 \family sans
22312 LyX-Code
22313 \family default
22314 , and 
22315 \family sans
22316 Scrap
22317 \family default
22318 .
22319  The last one is a short cut to the 
22320 \begin_inset Quotes eld
22321 \end_inset
22322
22323 Build Program
22324 \begin_inset Quotes erd
22325 \end_inset
22326
22327  File menu entry.
22328  
22329 \end_layout
22330
22331 \begin_layout Standard
22332 LyX has a range of buttons that are available for tool bar customization.
22333  In my toolbar I like to combine the six short cuts above with two more:
22334  One for 
22335 \family sans
22336 View
22337 \family default
22338 \SpecialChar \menuseparator
22339
22340 \family sans
22341 Update
22342 \family default
22343 \SpecialChar \menuseparator
22344
22345 \family sans
22346 DVI
22347 \family default
22348  and the other for 
22349 \family sans
22350 View\SpecialChar \menuseparator
22351 DVI
22352 \family default
22353  File menu entries.
22354  Here is how it looks like:
22355 \end_layout
22356
22357 \begin_layout LyX-Code
22358 Toolbar
22359 \end_layout
22360
22361 \begin_layout LyX-Code
22362   Layouts
22363 \end_layout
22364
22365 \begin_layout LyX-Code
22366   Icon "layout Standard"
22367 \end_layout
22368
22369 \begin_layout LyX-Code
22370   Icon "layout Section"
22371 \end_layout
22372
22373 \begin_layout LyX-Code
22374   Icon "layout LaTeX"
22375 \end_layout
22376
22377 \begin_layout LyX-Code
22378   Icon "layout LyX-Code"
22379 \end_layout
22380
22381 \begin_layout LyX-Code
22382   Icon "layout Scrap"
22383 \end_layout
22384
22385 \begin_layout LyX-Code
22386   Separator
22387 \end_layout
22388
22389 \begin_layout LyX-Code
22390   Icon "buffer-view"
22391 \end_layout
22392
22393 \begin_layout LyX-Code
22394   Icon "buffer-typeset"
22395 \end_layout
22396
22397 \begin_layout LyX-Code
22398   Icon "build-program"
22399 \end_layout
22400
22401 \begin_layout LyX-Code
22402   Separator
22403 \end_layout
22404
22405 \begin_layout LyX-Code
22406 .
22407 \end_layout
22408
22409 \begin_layout LyX-Code
22410 .
22411 \end_layout
22412
22413 \begin_layout LyX-Code
22414 .
22415 \end_layout
22416
22417 \begin_layout LyX-Code
22418 End
22419 \end_layout
22420
22421 \begin_layout Subsubsection
22422 Colors customization
22423 \end_layout
22424
22425 \begin_layout Standard
22426 There are a number of colors in LyX that can be customized in 
22427 \family sans
22428 Preferences
22429 \family default
22430 .
22431  One of the things that bothers people is the LaTeX font color.
22432  The default color is red, since the scraps uses LaTeX font, and there is
22433  a lot of scraps in literate documents, you may get tired of seeing everything
22434  in red.
22435  You can change it by going to the tabs 
22436 \family sans
22437 Look&Feel
22438 \family default
22439
22440 \family sans
22441 Colors.
22442 \end_layout
22443
22444 \begin_layout Standard
22445 The next thing is the visible presence of the newline character in the screen.
22446  You can choose the color of this particular character and make it blend
22447  in the background.
22448  I recommend you choosing a color that is close to the background but not
22449  equal, that way you still can see it is there, but it is not bothering
22450  you anymore.
22451  
22452 \end_layout
22453
22454 \begin_layout Chapter
22455 Secrets of the LaTeX Masters
22456 \begin_inset CommandInset label
22457 LatexCommand label
22458 name "cha:secrets"
22459
22460 \end_inset
22461
22462
22463 \end_layout
22464
22465 \begin_layout Standard
22466 Though LyX is a powerful tool, it cannot hope to support everything that
22467  can be done with pure TeX/LaTeX.
22468  However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22469  as long as you are not afraid to use that 
22470 \begin_inset Quotes eld
22471 \end_inset
22472
22473 TeX
22474 \begin_inset Quotes erd
22475 \end_inset
22476
22477  button on the toolbar or add things to the LaTeX preamble.
22478  This section lists some tips, tricks, and otherwise cool ideas to give
22479  your document that extra little flair.
22480  
22481 \emph on
22482 Do try this at home
22483 \emph default
22484 , just start with something a little smaller and less important than your
22485  dissertation!
22486 \end_layout
22487
22488 \begin_layout Standard
22489 Most ideas in this section require less common files in your LaTeX installation.
22490  If you have a system like TeXLive, most will already be available.
22491  A few, however, will need to be downloaded from one of the CTAN archives.
22492  Often, there are several ways to do something, or several LaTeX style files
22493  which do the same thing.
22494  We do not endorse one choice over another, we simply claim that we have
22495  done a particular task with a particular file.
22496  Put on your wizard hat, keep an eye out for dragons, and let us begin.
22497 \end_layout
22498
22499 \begin_layout Section
22500 Multiple Columns
22501 \end_layout
22502
22503 \begin_layout Standard
22504 by 
22505 \noun on
22506 Lars Gullik Bjønnes
22507 \end_layout
22508
22509 \begin_layout Subsection
22510 Purpose
22511 \end_layout
22512
22513 \begin_layout Standard
22514 The aim for this chapter
22515 \begin_inset Foot
22516 status collapsed
22517
22518 \begin_layout Plain Layout
22519 Editor's note: Lars' original chapter was a masterful description of how
22520  to use the 
22521 \family typewriter
22522 multicol
22523 \family default
22524  package.
22525  However, it was too long to flow smoothly in this document.
22526  I have therefore chosen to excerpt the most important sections here (sorry,
22527  Lars); you can read the original chapter (and more of the story!) in the
22528  example file 
22529 \family typewriter
22530 examples/multicol.lyx
22531 \family default
22532 .
22533  — mer
22534 \end_layout
22535
22536 \end_inset
22537
22538  is to show how the LaTeX package 
22539 \family typewriter
22540 multicol
22541 \family default
22542  can be used in a LyX document.
22543  As LyX doesn't support the 
22544 \family typewriter
22545 multicol
22546 \family default
22547  package natively yet, we have to use some small hacks.
22548  By reading this section it should be obvious how to do this.
22549 \end_layout
22550
22551 \begin_layout Subsection
22552 Limitations 
22553 \end_layout
22554
22555 \begin_layout Standard
22556 The 
22557 \family typewriter
22558 multicol
22559 \family default
22560  package allows switching between one and multicolumn format on the same
22561  page.
22562  Footnotes are handled correctly (for the most part), but will be placed
22563  at the bottom of the page and not under each column.
22564  LaTeX's float mechanism, however, is partly disabled in the current implementat
22565 ion.
22566  At the moment only page-wide floats can be used within the scope of the
22567  environment.
22568 \end_layout
22569
22570 \begin_layout Subsection
22571 Examples
22572 \end_layout
22573
22574 \begin_layout Subsubsection
22575 Two columns
22576 \end_layout
22577
22578 \begin_layout Standard
22579 If you want to have two columns in your text, you have use LaTeX mode to
22580  insert 
22581 \family typewriter
22582
22583 \backslash
22584 begin{multicols}{2}
22585 \family default
22586  at the point where you want the two column layout to start, and then 
22587 \family typewriter
22588
22589 \backslash
22590 end{multicols}
22591 \family default
22592  where you want it to end.
22593  Like this:
22594 \end_layout
22595
22596 \begin_layout Standard
22597 \begin_inset ERT
22598 status open
22599
22600 \begin_layout Plain Layout
22601
22602
22603 \backslash
22604 begin{multicols}{2}
22605 \end_layout
22606
22607 \end_inset
22608
22609
22610 \end_layout
22611
22612 \begin_layout Standard
22613 \noindent
22614
22615 \series bold
22616 \size small
22617 The Adventure of the Empty House
22618 \series default
22619
22620 \begin_inset Newline newline
22621 \end_inset
22622
22623 by 
22624 \noun on
22625 Sir Arthur Conan Doyle
22626 \end_layout
22627
22628 \begin_layout Standard
22629
22630 \size small
22631 It was in the spring of the year 1894 that all London was interested, and
22632  the fashionable world dismayed, by the murder of the Honourable Ronald
22633  Adair under most unusual and inexplicable circumstances.
22634  The public has already learned those particulars of the crime which came
22635  out in the police investigation, but a good deal was suppressed upon that
22636  occasion, since the case for the prosecution was so overwhelmingly strong
22637  that it was not necessary to bring forward all the facts.
22638  Only now, at the end of nearly ten years, am I allowed to supply those
22639  missing links which make up the whole of that remarkable chain.
22640  The crime was of interest in itself, but that interest was as nothing to
22641  me compared to the inconceivable sequel, which afforded me the greatest
22642  shock and surprise of any event in my adventurous life.
22643  Even now, after this long interval, I find myself thrilling as I think
22644  of it, and feeling once more that sudden flood of joy, amazement, and increduli
22645 ty which utterly submerged my mind.
22646  Let me say to that public, which has shown some interest in those glimpses
22647  which I have occasionally given them of the thoughts and actions of a very
22648  remarkable man, that they are not to blame me if I have not shared my knowledge
22649  with them, for I should have considered it my first duty to do so, had
22650  I not been barred by a positive prohibition from his own lips, which was
22651  only withdrawn upon the third of last month.
22652 \end_layout
22653
22654 \begin_layout Standard
22655 \begin_inset ERT
22656 status open
22657
22658 \begin_layout Plain Layout
22659
22660
22661 \backslash
22662 end{multicols}
22663 \end_layout
22664
22665 \end_inset
22666
22667
22668 \end_layout
22669
22670 \begin_layout Subsubsection
22671 Multiple columns
22672 \end_layout
22673
22674 \begin_layout Standard
22675 The same pattern is used when you want more than two columns:
22676 \end_layout
22677
22678 \begin_layout Standard
22679 \begin_inset ERT
22680 status open
22681
22682 \begin_layout Plain Layout
22683
22684
22685 \backslash
22686 begin{multicols}{3}
22687 \end_layout
22688
22689 \end_inset
22690
22691
22692 \end_layout
22693
22694 \begin_layout Standard
22695
22696 \size footnotesize
22697 It can be imagined that my close intimacy with Sherlock Holmes had interested
22698  me deeply in crime, and that after his disappearance I never failed to
22699  read with care the various problems which came before the public.
22700  And I even attempted, more than once, for my own private satisfaction,
22701  to employ his methods in their solution, though with indifferent success.
22702  There was none, however, which appealed to me like this tragedy of Ronald
22703  Adair.
22704  As I read the evidence at the inquest, which led up to a verdict of willful
22705  murder against some person or persons unknown, I realized more clearly
22706  than I had ever done the loss which the community had sustained by the
22707  death of Sherlock Holmes.
22708  There were points about this strange business which would, I was sure,
22709  have specially appealed to him, and the efforts of the police would have
22710  been supplemented, or more probably anticipated, by the trained observation
22711  and the alert mind of the first criminal agent in Europe.
22712  All day, as I drove upon my round, I turned over the case in my mind and
22713  found no explanation which appeared to me to be adequate.
22714  At the risk of telling a twice-told tale, I will recapitulate the facts
22715  as they were known to the public at the conclusion of the inquest.
22716 \end_layout
22717
22718 \begin_layout Standard
22719 \begin_inset ERT
22720 status open
22721
22722 \begin_layout Plain Layout
22723
22724
22725 \backslash
22726 end{multicols}
22727 \end_layout
22728
22729 \end_inset
22730
22731
22732 \end_layout
22733
22734 \begin_layout Standard
22735 You can have more than 3 columns if you want to, but that might not be very
22736  pleasant for the eye.
22737 \end_layout
22738
22739 \begin_layout Subsubsection
22740 Columns inside columns
22741 \end_layout
22742
22743 \begin_layout Standard
22744 You can even have columns inside columns:
22745 \end_layout
22746
22747 \begin_layout Standard
22748 \begin_inset ERT
22749 status open
22750
22751 \begin_layout Plain Layout
22752
22753
22754 \backslash
22755 begin{multicols}{2}
22756 \end_layout
22757
22758 \end_inset
22759
22760
22761 \end_layout
22762
22763 \begin_layout Standard
22764
22765 \size footnotesize
22766 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22767  at that time governor of one of the Australian colonies.
22768  Adair's mother had returned from Australia to undergo the operation for
22769  cataract, and she, her son Ronald, and her daughter Hilda were living together
22770  at 427 Park Lane.
22771 \end_layout
22772
22773 \begin_layout Standard
22774 \begin_inset ERT
22775 status open
22776
22777 \begin_layout Plain Layout
22778
22779
22780 \backslash
22781 begin{multicols}{2}
22782 \end_layout
22783
22784 \end_inset
22785
22786
22787 \end_layout
22788
22789 \begin_layout Standard
22790
22791 \size footnotesize
22792 The youth moved in the best society–had, so far as was known, no enemies
22793  and no particular vices.
22794  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22795  had been broken off by mutual consent some months before, and there was
22796  no sign that it had left any very profound feeling behind it.
22797  For the rest {sic} the man's life moved in a narrow and conventional circle,
22798  for his habits were quiet and his nature unemotional.
22799  Yet it was upon this easy-going young aristocrat that death came, in most
22800  strange and unexpected form, between the hours of ten and eleven-twenty
22801  on the night of March 30, 1894.
22802 \end_layout
22803
22804 \begin_layout Standard
22805 \begin_inset ERT
22806 status open
22807
22808 \begin_layout Plain Layout
22809
22810
22811 \backslash
22812 end{multicols}
22813 \end_layout
22814
22815 \end_inset
22816
22817
22818 \end_layout
22819
22820 \begin_layout Standard
22821
22822 \size footnotesize
22823 Ronald Adair was fond of cards–playing continually, but never for such stakes
22824  as would hurt him.
22825  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22826  It was shown that, after dinner on the day of his death, he had played
22827  a rubber of whist at the latter club.
22828  He had also played there in the afternoon.
22829
22830 \size default
22831  
22832 \size footnotesize
22833 The evidence of those who had played with him– Mr.
22834  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22835  and that there was a fairly equal fall of the cards.
22836  Adair might have lost five pounds, but not more.
22837  His fortune was a considerable one, and such a loss could not in any way
22838  affect him.
22839  He had played nearly every day at one club or other, but he was a cautious
22840  player, and usually rose a winner.
22841  It came out in evidence that, in partnership with Colonel Moran, he had
22842  actually won as much as four hundred and twenty pounds in a sitting, some
22843  weeks before, from Godfrey Milner and Lord Balmoral.
22844  So much for his recent history as it came out at the inquest.
22845 \end_layout
22846
22847 \begin_layout Standard
22848 \begin_inset ERT
22849 status open
22850
22851 \begin_layout Plain Layout
22852
22853
22854 \backslash
22855 end{multicols}
22856 \end_layout
22857
22858 \end_inset
22859
22860
22861 \end_layout
22862
22863 \begin_layout Standard
22864 Please do read the file 
22865 \family typewriter
22866 examples/multicol.lyx
22867 \family default
22868  for more advanced examples including column and header spacing, vertical
22869  separator lines, and more.
22870 \end_layout
22871
22872 \begin_layout Section
22873 Numbering in the 
22874 \family sans
22875 Enumerate
22876 \family default
22877  Paragraph Environment
22878 \begin_inset Argument
22879 status collapsed
22880
22881 \begin_layout Plain Layout
22882 Numbering in Enumerate
22883 \end_layout
22884
22885 \end_inset
22886
22887
22888 \end_layout
22889
22890 \begin_layout Standard
22891 by 
22892 \noun on
22893 John Weiss
22894 \end_layout
22895
22896 \begin_layout Standard
22897 \begin_inset VSpace bigskip
22898 \end_inset
22899
22900
22901 \end_layout
22902
22903 \begin_layout Standard
22904 \noindent
22905 The default numbering for the 
22906 \family sans
22907 Enumerate
22908 \family default
22909  paragraph environment begins with Arabic numbers and ends with uppercase
22910  letters.
22911  Suppose, however, you wanted a different type of numbering scheme.
22912  Here's a quickie example of how to change the numbering scheme:
22913 \end_layout
22914
22915 \begin_layout LyX-Code
22916
22917 \backslash
22918 renewcommand{
22919 \backslash
22920 labelenumi}{
22921 \backslash
22922 Roman{enumi}.}
22923 \end_layout
22924
22925 \begin_layout LyX-Code
22926
22927 \backslash
22928 renewcommand{
22929 \backslash
22930 labelenumii}{
22931 \backslash
22932 Alph{enumii}.}
22933 \end_layout
22934
22935 \begin_layout LyX-Code
22936
22937 \backslash
22938 renewcommand{
22939 \backslash
22940 labelenumiii}{
22941 \backslash
22942 arabic{enumiii}.}
22943 \end_layout
22944
22945 \begin_layout LyX-Code
22946
22947 \backslash
22948 renewcommand{
22949 \backslash
22950 labelenumiv}{
22951 \backslash
22952 alph{enumiv}.)}
22953 \end_layout
22954
22955 \begin_layout Standard
22956 \SpecialChar \ldots{}
22957  which changes the numbering scheme to uppercase Roman numerals, uppercase
22958  letters, Arabic numbers, and lowercase letter.
22959 \end_layout
22960
22961 \begin_layout Standard
22962 Additionally, the previous example also adds a little bit extra to the numbering
22963  scheme.
22964  For example, the first level label actually looks like: 
22965 \begin_inset Quotes eld
22966 \end_inset
22967
22968 I.
22969 \begin_inset Quotes erd
22970 \end_inset
22971
22972 .
22973  For ease of reading, we'll describe what the numbering schemes look like
22974  using a notation something like this: <
22975 \begin_inset Quotes eld
22976 \end_inset
22977
22978 I.
22979 \begin_inset Quotes erd
22980 \end_inset
22981
22982 ,
22983 \begin_inset space ~
22984 \end_inset
22985
22986
22987 \begin_inset Quotes erd
22988 \end_inset
22989
22990 A.
22991 \begin_inset Quotes erd
22992 \end_inset
22993
22994 ,
22995 \begin_inset space ~
22996 \end_inset
22997
22998
22999 \begin_inset Quotes erd
23000 \end_inset
23001
23002 1.
23003 \begin_inset Quotes erd
23004 \end_inset
23005
23006 ,
23007 \begin_inset space ~
23008 \end_inset
23009
23010
23011 \begin_inset Quotes eld
23012 \end_inset
23013
23014 a.)
23015 \begin_inset Quotes erd
23016 \end_inset
23017
23018 >.
23019  
23020 \end_layout
23021
23022 \begin_layout Standard
23023 As you can see in the example, there is a label command for each nesting
23024  level, 
23025 \family typewriter
23026
23027 \backslash
23028 labelenumi
23029 \family default
23030  \SpecialChar \ldots{}
23031  
23032 \family typewriter
23033
23034 \backslash
23035 labelenumiv
23036 \family default
23037 , as well as a counter, 
23038 \family typewriter
23039 enumi
23040 \family default
23041  \SpecialChar \ldots{}
23042  
23043 \family typewriter
23044 enumiv
23045 \family default
23046 .
23047  There are also five 
23048 \begin_inset Quotes eld
23049 \end_inset
23050
23051 number printing
23052 \begin_inset Quotes erd
23053 \end_inset
23054
23055  commands, 
23056 \family typewriter
23057
23058 \backslash
23059 arabic{}
23060 \family default
23061
23062 \family typewriter
23063
23064 \backslash
23065 roman{}
23066 \family default
23067
23068 \family typewriter
23069
23070 \backslash
23071 Roman{}
23072 \family default
23073
23074 \family typewriter
23075
23076 \backslash
23077 alph{}
23078 \family default
23079 , and 
23080 \family typewriter
23081
23082 \backslash
23083 Alph{}
23084 \family default
23085 , each of which take one counter as an argument.
23086  You can add characters before or after these, but there's no need to add
23087  spaces.
23088 \end_layout
23089
23090 \begin_layout Standard
23091 You can get really fancy with these.
23092  For example:
23093 \end_layout
23094
23095 \begin_layout LyX-Code
23096
23097 \backslash
23098 renewcommand{
23099 \backslash
23100 labelenumi}{
23101 \backslash
23102 #
23103 \backslash
23104 Alph{enumi}
23105 \backslash
23106 #}
23107 \end_layout
23108
23109 \begin_layout LyX-Code
23110
23111 \backslash
23112 renewcommand{
23113 \backslash
23114 labelenumii}{
23115 \backslash
23116 Alph{enumi}.
23117 \backslash
23118 arabic{enumii}}
23119 \end_layout
23120
23121 \begin_layout LyX-Code
23122
23123 \backslash
23124 renewcommand{
23125 \backslash
23126 labelenumiii}{
23127 \backslash
23128 alph{enumiii}+}
23129 \end_layout
23130
23131 \begin_layout LyX-Code
23132
23133 \backslash
23134 renewcommand{
23135 \backslash
23136 labelenumiv}{(
23137 \backslash
23138 roman{enumiv})}
23139 \end_layout
23140
23141 \begin_layout Standard
23142 produces the somewhat out of hand numbering scheme: <
23143 \begin_inset Quotes eld
23144 \end_inset
23145
23146 #A#
23147 \begin_inset Quotes erd
23148 \end_inset
23149
23150 ,
23151 \begin_inset space ~
23152 \end_inset
23153
23154
23155 \begin_inset Quotes erd
23156 \end_inset
23157
23158 A.1
23159 \begin_inset Quotes erd
23160 \end_inset
23161
23162 ,
23163 \begin_inset space ~
23164 \end_inset
23165
23166
23167 \begin_inset Quotes erd
23168 \end_inset
23169
23170 a+
23171 \begin_inset Quotes erd
23172 \end_inset
23173
23174 ,
23175 \begin_inset space ~
23176 \end_inset
23177
23178
23179 \begin_inset Quotes eld
23180 \end_inset
23181
23182 (i)
23183 \begin_inset Quotes erd
23184 \end_inset
23185
23186 >.
23187  
23188 \end_layout
23189
23190 \begin_layout Section
23191 Dropped Capitals
23192 \end_layout
23193
23194 \begin_layout Standard
23195 by 
23196 \noun on
23197 Mike Ressler
23198 \end_layout
23199
23200 \begin_layout Standard
23201 \begin_inset VSpace bigskip
23202 \end_inset
23203
23204
23205 \end_layout
23206
23207 \begin_layout Standard
23208 \noindent
23209 \begin_inset ERT
23210 status collapsed
23211
23212 \begin_layout Plain Layout
23213
23214
23215 \backslash
23216 newfont{
23217 \backslash
23218 tmpfont}{cmr17 scaled 2500}{
23219 \backslash
23220 tmpfont T}
23221 \backslash
23222 vspace*{-8.4ex}
23223 \end_layout
23224
23225 \end_inset
23226
23227
23228 \end_layout
23229
23230 \begin_layout Standard
23231 \noindent
23232 \begin_inset ERT
23233 status open
23234
23235 \begin_layout Plain Layout
23236
23237
23238 \backslash
23239 hangindent=3.3em 
23240 \backslash
23241 hangafter=-3
23242 \end_layout
23243
23244 \end_inset
23245
23246  hose of you who like the style of old books probably also like 
23247 \begin_inset Quotes eld
23248 \end_inset
23249
23250 dropped capitals
23251 \begin_inset Quotes erd
23252 \end_inset
23253
23254 —those large capital letters which begin each new chapter or section.
23255  Implementing them with plain LyX/LaTeX is straightforward (assuming you
23256  know some plain TeX!) but does require a lot of work and many iterations,
23257  as you can see by all the ugly TeX-mode stuff at the beginning of this
23258  paragraph.
23259 \end_layout
23260
23261 \begin_layout Standard
23262 \begin_inset ERT
23263 status open
23264
23265 \begin_layout Plain Layout
23266
23267
23268 \backslash
23269 verb+
23270 \backslash
23271 bigdrop{-1em}{3}{ptmri}{T}+
23272 \end_layout
23273
23274 \end_inset
23275
23276 here is a much easier way of doing this, of course.
23277  The 
23278 \family typewriter
23279 dropcaps
23280 \family default
23281  (or the newer 
23282 \family typewriter
23283 dropping
23284 \family default
23285 ) package from CTAN allows a simple way to add such letters to your documents.
23286  Since this package is not a standard part of TeXLive, I can't demonstrate
23287  it within this document, but if you copy this paragraph to a new document,
23288  delete the 
23289 \begin_inset Quotes eld
23290 \end_inset
23291
23292
23293 \family typewriter
23294
23295 \backslash
23296 verb
23297 \family default
23298
23299 \begin_inset Quotes erd
23300 \end_inset
23301
23302  and the pluses from the TeX code at the beginning of the paragraph, and
23303  add 
23304 \family typewriter
23305
23306 \backslash
23307 usepackage{dropcaps}
23308 \family default
23309  to your LaTeX preamble, you will get a nice Times Roman Italic 
23310 \begin_inset Quotes eld
23311 \end_inset
23312
23313 T
23314 \begin_inset Quotes erd
23315 \end_inset
23316
23317 , whose height is three lines of text and which protrudes 1 em into the
23318  margin.
23319  (Make certain you have copied 
23320 \begin_inset Quotes eld
23321 \end_inset
23322
23323
23324 \family typewriter
23325 dropcaps.sty
23326 \family default
23327
23328 \begin_inset Quotes erd
23329 \end_inset
23330
23331  into a directory where TeX can see it.) The first argument is the amount
23332  of indentation; in this case the negative sign moves it into the margin.
23333  The second argument is the height of the letter in number of lines of text.
23334  The third argument is the font name: virtually anything which has a tfm
23335  file should work (wade through the 
23336 \family typewriter
23337 .../texmf/fonts/tfm
23338 \family default
23339  directory for possibilities).
23340  My personal favorite is 
23341 \begin_inset Quotes eld
23342 \end_inset
23343
23344
23345 \family typewriter
23346 yinit
23347 \family default
23348
23349 \begin_inset Quotes erd
23350 \end_inset
23351
23352 , a fancy German font specifically designed for dropped capitals.
23353  The fourth argument is the letter (or letters) to be dropped.
23354  The 
23355 \family typewriter
23356 dropping
23357 \family default
23358  package also offers the 
23359 \family typewriter
23360
23361 \backslash
23362 bigdrop
23363 \family default
23364  command, as well as a slightly simplified 
23365 \family typewriter
23366
23367 \backslash
23368 dropping
23369 \family default
23370  command.
23371 \end_layout
23372
23373 \begin_layout Section
23374 Non-standard Paragraph Shapes
23375 \end_layout
23376
23377 \begin_layout Standard
23378 by 
23379 \noun on
23380 Mike Ressler
23381 \end_layout
23382
23383 \begin_layout Standard
23384 \begin_inset VSpace bigskip
23385 \end_inset
23386
23387
23388 \end_layout
23389
23390 \begin_layout Standard
23391 \begin_inset ERT
23392 status collapsed
23393
23394 \begin_layout Plain Layout
23395
23396
23397 \backslash
23398 begin{sloppypar}
23399 \end_layout
23400
23401 \end_inset
23402
23403
23404 \end_layout
23405
23406 \begin_layout Standard
23407 \begin_inset ERT
23408 status collapsed
23409
23410 \begin_layout Plain Layout
23411
23412
23413 \backslash
23414 newdimen
23415 \backslash
23416 varunit 
23417 \end_layout
23418
23419 \begin_layout Plain Layout
23420
23421
23422 \backslash
23423 setlength{
23424 \backslash
23425 varunit}{4.5in}
23426 \end_layout
23427
23428 \end_inset
23429
23430
23431 \end_layout
23432
23433 \begin_layout Standard
23434 \noindent
23435 \begin_inset ERT
23436 status collapsed
23437
23438 \begin_layout Plain Layout
23439
23440
23441 \backslash
23442 parshape 19 0.45
23443 \backslash
23444 varunit 0.332
23445 \backslash
23446 varunit
23447 \end_layout
23448
23449 \begin_layout Plain Layout
23450
23451 0.40
23452 \backslash
23453 varunit 0.300
23454 \backslash
23455 varunit
23456 \end_layout
23457
23458 \begin_layout Plain Layout
23459
23460 0.35
23461 \backslash
23462 varunit 0.293
23463 \backslash
23464 varunit
23465 \end_layout
23466
23467 \begin_layout Plain Layout
23468
23469 0.30
23470 \backslash
23471 varunit 0.300
23472 \backslash
23473 varunit
23474 \end_layout
23475
23476 \begin_layout Plain Layout
23477
23478 0.25
23479 \backslash
23480 varunit 0.317
23481 \backslash
23482 varunit
23483 \end_layout
23484
23485 \begin_layout Plain Layout
23486
23487 0.20
23488 \backslash
23489 varunit 0.342
23490 \backslash
23491 varunit
23492 \end_layout
23493
23494 \begin_layout Plain Layout
23495
23496 0.15
23497 \backslash
23498 varunit 0.373
23499 \backslash
23500 varunit
23501 \end_layout
23502
23503 \begin_layout Plain Layout
23504
23505 0.10
23506 \backslash
23507 varunit 0.410
23508 \backslash
23509 varunit
23510 \end_layout
23511
23512 \begin_layout Plain Layout
23513
23514 0.05
23515 \backslash
23516 varunit 0.453
23517 \backslash
23518 varunit
23519 \end_layout
23520
23521 \begin_layout Plain Layout
23522
23523 0.00
23524 \backslash
23525 varunit 0.500
23526 \backslash
23527 varunit
23528 \end_layout
23529
23530 \begin_layout Plain Layout
23531
23532 0.05
23533 \backslash
23534 varunit 0.453
23535 \backslash
23536 varunit
23537 \end_layout
23538
23539 \begin_layout Plain Layout
23540
23541 0.10
23542 \backslash
23543 varunit 0.410
23544 \backslash
23545 varunit
23546 \end_layout
23547
23548 \begin_layout Plain Layout
23549
23550 0.15
23551 \backslash
23552 varunit 0.373
23553 \backslash
23554 varunit
23555 \end_layout
23556
23557 \begin_layout Plain Layout
23558
23559 0.20
23560 \backslash
23561 varunit 0.342
23562 \backslash
23563 varunit
23564 \end_layout
23565
23566 \begin_layout Plain Layout
23567
23568 0.25
23569 \backslash
23570 varunit 0.317
23571 \backslash
23572 varunit
23573 \end_layout
23574
23575 \begin_layout Plain Layout
23576
23577 0.30
23578 \backslash
23579 varunit 0.300
23580 \backslash
23581 varunit
23582 \end_layout
23583
23584 \begin_layout Plain Layout
23585
23586 0.35
23587 \backslash
23588 varunit 0.293
23589 \backslash
23590 varunit
23591 \end_layout
23592
23593 \begin_layout Plain Layout
23594
23595 0.40
23596 \backslash
23597 varunit 0.300
23598 \backslash
23599 varunit
23600 \end_layout
23601
23602 \begin_layout Plain Layout
23603
23604 0.45
23605 \backslash
23606 varunit 0.332
23607 \backslash
23608 varunit
23609 \end_layout
23610
23611 \begin_layout Plain Layout
23612
23613 \end_layout
23614
23615 \end_inset
23616
23617 There are times when the tyranny of rectangular paragraphs must be overthrown.
23618  In such situations, a call to the delightful plain TeX command 
23619 \family typewriter
23620
23621 \backslash
23622 parshape
23623 \family default
23624  is called for.
23625  As you can see, completely arbitrary shapes can be laid out with a suitable
23626  set of linelength definitions.
23627  While this parshape may look a bit silly and useless, one could conceive
23628  of situations such as finely tuned dropped capitals, word wrapping around
23629  non-rectangular graphics, etc.
23630  which will benefit from such handcrafting.
23631 \end_layout
23632
23633 \begin_layout Standard
23634 \begin_inset VSpace bigskip
23635 \end_inset
23636
23637
23638 \end_layout
23639
23640 \begin_layout Standard
23641 The syntax is 
23642 \family typewriter
23643
23644 \backslash
23645 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23646  #nindent #nlength
23647 \family default
23648 , where 
23649 \family typewriter
23650 numlines
23651 \family default
23652  is the number of lines of text which define the paragraph.
23653  If there turn out to be fewer lines, the shape is truncated; if there are
23654  more, the excess lines have the same dimensions as the last line of the
23655  definition.
23656  The 
23657 \family typewriter
23658 #nindent
23659 \family default
23660  and 
23661 \family typewriter
23662 #nlength
23663 \family default
23664  entries specify the indentation of the line from the left margin, and the
23665  length of the line as measured from that point.
23666  The shape applies only to the current paragraph; everything is reset to
23667  normal for the next paragraph.
23668 \end_layout
23669
23670 \begin_layout Standard
23671 \begin_inset ERT
23672 status collapsed
23673
23674 \begin_layout Plain Layout
23675
23676
23677 \backslash
23678 end{sloppypar}
23679 \end_layout
23680
23681 \end_inset
23682
23683
23684 \end_layout
23685
23686 \begin_layout Section
23687 Summary
23688 \end_layout
23689
23690 \begin_layout Standard
23691 As you can see, the examples in this section range from the useful to the
23692  whimsical.
23693  While I don't expect that anyone will ever need the paragraph shape demonstrate
23694 d in the last section, the important point is that you can do almost anything
23695  you want in LyX if you are willing to figure out how to do it in TeX and
23696  LaTeX.
23697  TeX is a fantastically powerful typesetting system and all that power is
23698  available to you since LyX uses it as its backend.
23699  Happy LyXing!
23700 \end_layout
23701
23702 \end_body
23703 \end_document