]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
Another mistake of mine, though it in fact had no effect.
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
2 \lyxformat 404
3 \begin_document
4 \begin_header
5 \textclass scrbook
6 \begin_preamble
7 % DO NOT ALTER THIS PREAMBLE!!!
8 %
9 % This preamble is designed to ensure that the manual prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the manual may not print out as expected.  If you
12 % have problems LaTeXing this file, please contact 
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
15
16 % if pdflatex is used
17 \usepackage{ifpdf}
18 \ifpdf
19
20  % set fonts for nicer pdf view
21  \IfFileExists{lmodern.sty}
22   {\usepackage{lmodern}}{}
23
24 \fi % end if pdflatex is used
25
26 % the pages of the TOC are numbered roman
27 % and a PDF-bookmark for the TOC is added
28 \pagenumbering{roman}
29 \let\myTOC\tableofcontents
30 \renewcommand{\tableofcontents}{%
31  \pdfbookmark[1]{\contentsname}{}
32  \myTOC
33  \cleardoublepage
34  \pagenumbering{arabic}}
35
36 % redefine the \LyX macro for PDF bookmarks
37 \def\LyX{\texorpdfstring{%
38   L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
39   {LyX}}
40
41 % used for multi-column text
42 \usepackage{multicol}
43
44 % extra space for tables
45 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
46 \end_preamble
47 \options fleqn,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage,tablecaptionabove
48 \use_default_options false
49 \begin_modules
50 logicalmkup
51 theorems-ams
52 theorems-ams-extended
53 \end_modules
54 \maintain_unincluded_children false
55 \begin_local_layout
56 Format 7
57 InsetLayout CharStyle:MenuItem
58 LyxType               charstyle
59 LabelString           menu
60 LatexType             command
61 LatexName             menuitem
62 Font
63 Family              Sans
64 EndFont
65 Preamble
66 \newcommand*{\menuitem}[1]{{\sffamily #1}}
67 EndPreamble
68 End
69 \end_local_layout
70 \language english
71 \inputencoding latin1
72 \fontencoding global
73 \font_roman default
74 \font_sans default
75 \font_typewriter default
76 \font_default_family default
77 \use_xetex false
78 \font_sc false
79 \font_osf false
80 \font_sf_scale 100
81 \font_tt_scale 100
82
83 \graphics default
84 \default_output_format default
85 \output_sync 0
86 \bibtex_command default
87 \index_command default
88 \paperfontsize 12
89 \spacing single
90 \use_hyperref true
91 \pdf_title "LyX's Additional Features manual"
92 \pdf_author "LyX Team"
93 \pdf_subject "LyX's additional features documentation"
94 \pdf_keywords "LyX, Documentation, Additional"
95 \pdf_bookmarks true
96 \pdf_bookmarksnumbered true
97 \pdf_bookmarksopen false
98 \pdf_bookmarksopenlevel 1
99 \pdf_breaklinks false
100 \pdf_pdfborder false
101 \pdf_colorlinks true
102 \pdf_backref false
103 \pdf_pdfusetitle false
104 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,  pdfpagelayout=OneColumn, pdfnewwindow=true,  pdfstartview=XYZ, plainpages=false, pdfpagelabels"
105 \papersize default
106 \use_geometry false
107 \use_amsmath 0
108 \use_esint 0
109 \use_mhchem 1
110 \use_mathdots 1
111 \cite_engine basic
112 \use_bibtopic false
113 \use_indices false
114 \paperorientation portrait
115 \suppress_date false
116 \use_refstyle 0
117 \index Index
118 \shortcut idx
119 \color #008000
120 \end_index
121 \secnumdepth 3
122 \tocdepth 3
123 \paragraph_separation indent
124 \paragraph_indentation default
125 \quotes_language english
126 \papercolumns 1
127 \papersides 2
128 \paperpagestyle headings
129 \tracking_changes true
130 \output_changes false
131 \html_math_output 0
132 \html_be_strict true
133 \author 1 "ab" 
134 \author 2 "bbb" 
135 \author 3 "Stephan Witt" 
136 \end_header
137
138 \begin_body
139
140 \begin_layout Title
141 Additional LyX Features
142 \end_layout
143
144 \begin_layout Author
145 by the LyX Team
146 \begin_inset Foot
147 status collapsed
148
149 \begin_layout Plain Layout
150 \noindent
151 Principal maintainer of this file is
152 \noun on
153  Richard Heck
154 \noun default
155 .
156  If you have comments or error corrections, please send them to the LyX
157  Documentation mailing list, 
158 \begin_inset Flex Code
159 status collapsed
160
161 \begin_layout Plain Layout
162 \noindent
163 <lyx-docs@lists.lyx.org>
164 \end_layout
165
166 \end_inset
167
168 .
169 \end_layout
170
171 \end_inset
172
173  
174 \end_layout
175
176 \begin_layout Standard
177 \begin_inset CommandInset toc
178 LatexCommand tableofcontents
179
180 \end_inset
181
182
183 \end_layout
184
185 \begin_layout Chapter
186 Introduction
187 \end_layout
188
189 \begin_layout Standard
190 This manual is essentially Part II of the 
191 \emph on
192 User's Guide\SpecialChar \@.
193
194 \emph default
195  The reason for separating this document out is simple: the 
196 \emph on
197 User's Guide
198 \emph default
199  is already quite lengthy, and it contains information on all of the basic
200  features one needs to know in order to prepare most documents.
201  However, the LyX Team has worked to make LyX extensible through various
202  configuration files and external packages.
203  That means that if you want to support the Fizzwizzle LaTeX package, you
204  can create a layout file (or module) for it without having to alter LyX
205  itself.
206  We've already had contributions of several new features this way, and some
207  of them are documented here.
208  There are also some more `advanced' features, such as how to control the
209  presentation of bibliographies and how to work with multi-part documents,
210  that are not covered in the 
211 \emph on
212 User's Guide
213 \emph default
214  and are discussed here.
215 \end_layout
216
217 \begin_layout Standard
218 This manual also documents some special features, like fax support, version
219  control, and SGML support, which require additional software to work properly.
220  There is also a chapter on LyX's support for HTML.
221  And lastly, there's a chapter of LaTeX tools and tips, things you can use
222  to spruce up your documents by directly using the powerful features of
223  LaTeX.
224  After all, LyX 
225 \emph on
226 is
227 \emph default
228  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
229 \end_layout
230
231 \begin_layout Standard
232 If you haven't read the 
233 \emph on
234 Introduction
235 \emph default
236  yet, you are definitely in the wrong manual.
237  The 
238 \emph on
239 Introduction
240 \emph default
241  is the first place to go, since it describes the notation and format of
242  all of the manuals.
243  You should also be thoroughly familiar with the 
244 \emph on
245 User's Guide
246 \emph default
247  and all of the basic features of LyX before attempting to read this one.
248 \end_layout
249
250 \begin_layout Standard
251 Since many of the topics in this manual depend heavily on LyX's interaction
252  with LaTeX, this first chapter covers the inner workings of LyX and how
253  to direct LyX to generate exactly the LaTeX code you want.
254  It is obviously for more seasoned LyX users.
255 \end_layout
256
257 \begin_layout Chapter
258 LyX and LaTeX
259 \end_layout
260
261 \begin_layout Section
262 How LyX Uses LaTeX
263 \end_layout
264
265 \begin_layout Standard
266 This chapter is for both TeX-nicians and the LaTeX-curious.
267  In it, we'll explain how LyX and LaTeX work together to produce printable
268  output.
269  This is the only place in any of the manuals where we assume you know something
270  about LaTeX.
271 \end_layout
272
273 \begin_layout Standard
274 At one time, LyX was called a 
275 \begin_inset Quotes eld
276 \end_inset
277
278 WYSIWYM frontend to LaTeX,
279 \begin_inset Quotes erd
280 \end_inset
281
282  but that's no longer true.
283  There are frontends to LaTeX out there.
284 \begin_inset Foot
285 status collapsed
286
287 \begin_layout Plain Layout
288 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
289  There are also the LaTeX modes for vi and emacs, of course.
290 \end_layout
291
292 \end_inset
293
294  These are basically text editors with the ability to run LaTeX and mark
295  any errors in the file you're editing.
296  Although LyX 
297 \emph on
298 is
299 \emph default
300  an editor, and it 
301 \emph on
302 does
303 \emph default
304  run LaTeX, and it also indicates errors in the file, it also does much,
305  much more.
306  For one thing, you don't need to know LaTeX to use LyX effectively.
307  And LyX has added its own extensions to LaTeX.
308  Try the following sometime: select 
309 \begin_inset Flex MenuItem
310 status collapsed
311
312 \begin_layout Plain Layout
313 Export\SpecialChar \menuseparator
314 LaTeX
315 \end_layout
316
317 \end_inset
318
319  from the 
320 \begin_inset Flex MenuItem
321 status collapsed
322
323 \begin_layout Plain Layout
324 File
325 \end_layout
326
327 \end_inset
328
329  menu (or 
330 \begin_inset Flex MenuItem
331 status collapsed
332
333 \begin_layout Plain Layout
334 View\SpecialChar \menuseparator
335 Source
336 \end_layout
337
338 \end_inset
339
340 ), then look at the preamble of the resulting 
341 \begin_inset Flex Code
342 status collapsed
343
344 \begin_layout Plain Layout
345 .tex
346 \end_layout
347
348 \end_inset
349
350  file.
351  You'll notice a variety of new macros defined specifically by LyX.
352  These macros are defined automatically, according to the features you use
353  in the document.
354 \end_layout
355
356 \begin_layout Standard
357 There are several commands that automatically invoke LaTeX.
358  They are:
359 \end_layout
360
361 \begin_layout Itemize
362 \begin_inset Flex MenuItem
363 status collapsed
364
365 \begin_layout Plain Layout
366 View\SpecialChar \menuseparator
367 Format
368 \end_layout
369
370 \end_inset
371
372
373 \end_layout
374
375 \begin_layout Itemize
376 \begin_inset Flex MenuItem
377 status collapsed
378
379 \begin_layout Plain Layout
380 View\SpecialChar \menuseparator
381 Update\SpecialChar \menuseparator
382 Format
383 \end_layout
384
385 \end_inset
386
387
388 \end_layout
389
390 \begin_layout Itemize
391 \begin_inset Flex MenuItem
392 status collapsed
393
394 \begin_layout Plain Layout
395 File\SpecialChar \menuseparator
396 Print
397 \end_layout
398
399 \end_inset
400
401
402 \end_layout
403
404 \begin_layout Itemize
405 \begin_inset Flex MenuItem
406 status collapsed
407
408 \begin_layout Plain Layout
409 File\SpecialChar \menuseparator
410 Fax
411 \end_layout
412
413 \end_inset
414
415
416 \end_layout
417
418 \begin_layout Standard
419 They will only invoke LaTeX if the file has changed since the last time
420  LaTeX was run.
421  
422 \end_layout
423
424 \begin_layout Standard
425 When LyX runs LaTeX on the file you're editing, it performs these steps:
426 \end_layout
427
428 \begin_layout Enumerate
429 Convert the document to LaTeX and save to a file with the extension 
430 \begin_inset Flex Code
431 status collapsed
432
433 \begin_layout Plain Layout
434 .tex
435 \end_layout
436
437 \end_inset
438
439  in place of 
440 \begin_inset Flex Code
441 status collapsed
442
443 \begin_layout Plain Layout
444 .lyx
445 \end_layout
446
447 \end_inset
448
449 .
450 \end_layout
451
452 \begin_layout Enumerate
453 Run LaTeX on the 
454 \begin_inset Flex Code
455 status collapsed
456
457 \begin_layout Plain Layout
458 .tex
459 \end_layout
460
461 \end_inset
462
463  file (maybe several times), and run any other commands (such as 
464 \begin_inset Flex Code
465 status collapsed
466
467 \begin_layout Plain Layout
468 bibtex
469 \end_layout
470
471 \end_inset
472
473  or 
474 \begin_inset Flex Code
475 status collapsed
476
477 \begin_layout Plain Layout
478 makeindex
479 \end_layout
480
481 \end_inset
482
483 ) needed to compile the LaTeX file.
484 \end_layout
485
486 \begin_layout Enumerate
487 If there are any errors, show the error log.
488 \end_layout
489
490 \begin_layout Standard
491 If you've run LaTeX using 
492 \begin_inset Flex MenuItem
493 status collapsed
494
495 \begin_layout Plain Layout
496 View
497 \bar under
498 \SpecialChar \menuseparator
499
500 \bar default
501 DVI
502 \end_layout
503
504 \end_inset
505
506 , LyX then runs a DVI viewer to display the DVI-file.
507  If you've used 
508 \begin_inset Flex MenuItem
509 status collapsed
510
511 \begin_layout Plain Layout
512 View
513 \bar under
514 \SpecialChar \menuseparator
515
516 \bar default
517 PostScript
518 \end_layout
519
520 \end_inset
521
522 , LyX performs further steps:
523 \end_layout
524
525 \begin_layout Itemize
526 Run 
527 \begin_inset Flex Code
528 status collapsed
529
530 \begin_layout Plain Layout
531 dvips
532 \end_layout
533
534 \end_inset
535
536  to convert the DVI file to PostScript.
537 \end_layout
538
539 \begin_layout Itemize
540 Run a PostScript viewer, such as 
541 \begin_inset Flex Code
542 status collapsed
543
544 \begin_layout Plain Layout
545 ghostview
546 \end_layout
547
548 \end_inset
549
550 , to display the PostScript file.
551 \end_layout
552
553 \begin_layout Standard
554 LyX does similar things when viewing, or exporting, other formats.
555 \end_layout
556
557 \begin_layout Section
558 Translating LaTeX files into LyX
559 \end_layout
560
561 \begin_layout Standard
562 You can import a LaTeX file into LyX by using the 
563 \begin_inset Flex MenuItem
564 status collapsed
565
566 \begin_layout Plain Layout
567 File\SpecialChar \menuseparator
568 Import\SpecialChar \menuseparator
569 LaTeX
570 \end_layout
571
572 \end_inset
573
574  command in LyX.
575  This will call a program named 
576 \begin_inset Flex Code
577 status collapsed
578
579 \begin_layout Plain Layout
580 tex2lyx
581 \end_layout
582
583 \end_inset
584
585  which will create a file 
586 \begin_inset Flex Code
587 status collapsed
588
589 \begin_layout Plain Layout
590 foo.lyx
591 \end_layout
592
593 \end_inset
594
595  from the file 
596 \begin_inset Flex Code
597 status collapsed
598
599 \begin_layout Plain Layout
600 foo.tex
601 \end_layout
602
603 \end_inset
604
605 .
606  LyX will then open that file.
607 \begin_inset Foot
608 status collapsed
609
610 \begin_layout Plain Layout
611 \begin_inset Flex Code
612 status collapsed
613
614 \begin_layout Plain Layout
615 tex2lyx
616 \end_layout
617
618 \end_inset
619
620  can also be run from the command line, of course.
621 \end_layout
622
623 \end_inset
624
625
626 \end_layout
627
628 \begin_layout Standard
629 \begin_inset Flex Code
630 status collapsed
631
632 \begin_layout Plain Layout
633 tex2lyx
634 \end_layout
635
636 \end_inset
637
638  will translate most legal LaTeX, but not everything.
639  It will put things it doesn't understand into TeX code, so after translating
640  a file with 
641 \begin_inset Flex Code
642 status collapsed
643
644 \begin_layout Plain Layout
645 tex2lyx
646 \end_layout
647
648 \end_inset
649
650 , you can look for TeX code and hand-edit it until it looks right.
651 \end_layout
652
653 \begin_layout Standard
654 If you don't know what TeX code is, read the next section.
655 \end_layout
656
657 \begin_layout Section
658 \begin_inset CommandInset label
659 LatexCommand label
660 name "sec:Inserting-TeX-Code"
661
662 \end_inset
663
664 Inserting TeX Code into LyX Documents 
665 \end_layout
666
667 \begin_layout Standard
668 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
669  You can always insert TeX code into any LyX document.
670  LyX cannot, and will never be able to, display every possible LaTeX construct.
671  If ever you need to insert LaTeX commands into your LyX document, you can
672  use the 
673 \begin_inset Flex Code
674 status collapsed
675
676 \begin_layout Plain Layout
677 TeX Code
678 \end_layout
679
680 \end_inset
681
682  box, which you can insert into your document with 
683 \begin_inset Flex MenuItem
684 status collapsed
685
686 \begin_layout Plain Layout
687 Insert\SpecialChar \menuseparator
688 TeX Code
689 \end_layout
690
691 \end_inset
692
693 .
694 \end_layout
695
696 \begin_layout Standard
697 Here's an example of inserting LaTeX commands in a LyX document.
698  The code looks like this:
699 \end_layout
700
701 \begin_layout LyX-Code
702
703 \backslash
704 begin{tabular}{ll}
705 \begin_inset Newline newline
706 \end_inset
707
708
709 \backslash
710 begin{minipage}{5cm}
711 \begin_inset Newline newline
712 \end_inset
713
714 This is an example for a minipage environment.
715  You 
716 \begin_inset Newline newline
717 \end_inset
718
719 can put nearly everything in it, even (non-floating) 
720 \begin_inset Newline newline
721 \end_inset
722
723 figures and tables.
724  
725 \begin_inset Newline newline
726 \end_inset
727
728
729 \backslash
730 end{minipage}
731 \begin_inset Newline newline
732 \end_inset
733
734 &
735 \begin_inset Newline newline
736 \end_inset
737
738
739 \backslash
740 begin{minipage}{5cm}
741 \begin_inset Newline newline
742 \end_inset
743
744
745 \backslash
746 begin{verbatim}
747 \begin_inset Newline newline
748 \end_inset
749
750
751 \backslash
752 begin{minipage}{5cm}
753 \begin_inset Newline newline
754 \end_inset
755
756 This ...
757  
758 \begin_inset Newline newline
759 \end_inset
760
761
762 \backslash
763 end{minipage}
764 \begin_inset Newline newline
765 \end_inset
766
767
768 \backslash
769 end{verbatim}
770 \begin_inset Newline newline
771 \end_inset
772
773
774 \backslash
775 end{minipage}
776 \begin_inset Newline newline
777 \end_inset
778
779
780 \backslash
781 end{tabular}
782 \end_layout
783
784 \begin_layout LyX-Code
785
786 \end_layout
787
788 \begin_layout Standard
789 The 
790 \begin_inset Flex Code
791 status collapsed
792
793 \begin_layout Plain Layout
794 TeX Code
795 \end_layout
796
797 \end_inset
798
799  box containing this text is directly after this paragraph.
800  Those of you reading the manual in LyX will only see the TeX code inset.
801  Those reading a printed version of the manuals will see the actual results:
802 \end_layout
803
804 \begin_layout Standard
805 \begin_inset ERT
806 status collapsed
807
808 \begin_layout Plain Layout
809
810
811 \backslash
812 begin{tabular}{ll}
813 \end_layout
814
815 \begin_layout Plain Layout
816
817
818 \backslash
819 begin{minipage}{5cm}
820 \end_layout
821
822 \begin_layout Plain Layout
823
824 This is an example for a minipage environment.
825  You can put nearly everything in it, even (non-floating) figures and tables.
826  
827 \end_layout
828
829 \begin_layout Plain Layout
830
831
832 \backslash
833 end{minipage}
834 \end_layout
835
836 \begin_layout Plain Layout
837
838 &
839 \end_layout
840
841 \begin_layout Plain Layout
842
843
844 \backslash
845 begin{minipage}{5cm}
846 \end_layout
847
848 \begin_layout Plain Layout
849
850
851 \backslash
852 begin{verbatim}
853 \end_layout
854
855 \begin_layout Plain Layout
856
857
858 \backslash
859 begin{minipage}{5cm}
860 \end_layout
861
862 \begin_layout Plain Layout
863
864 This ...
865  
866 \end_layout
867
868 \begin_layout Plain Layout
869
870
871 \backslash
872 end{minipage}
873 \end_layout
874
875 \begin_layout Plain Layout
876
877
878 \backslash
879 end{verbatim}
880 \end_layout
881
882 \begin_layout Plain Layout
883
884
885 \backslash
886 end{minipage}
887 \end_layout
888
889 \begin_layout Plain Layout
890
891
892 \backslash
893 end{tabular}
894 \end_layout
895
896 \end_inset
897
898
899 \end_layout
900
901 \begin_layout Standard
902 In addition to using TeX code, you can also create a separate file containing
903  some complex LaTeX structure and then use 
904 \begin_inset Flex MenuItem
905 status collapsed
906
907 \begin_layout Plain Layout
908 Insert\SpecialChar \menuseparator
909 Child
910 \begin_inset space ~
911 \end_inset
912
913 Document
914 \end_layout
915
916 \end_inset
917
918  to include your file (you should select the type 
919 \begin_inset Flex Code
920 status collapsed
921
922 \begin_layout Plain Layout
923 Input
924 \end_layout
925
926 \end_inset
927
928 ).
929  We recommend that you only do this if you have a 
930 \begin_inset Flex Code
931 status collapsed
932
933 \begin_layout Plain Layout
934 .tex
935 \end_layout
936
937 \end_inset
938
939  file which you 
940 \emph on
941 know
942 \emph default
943  works already.
944  Otherwise, you'll have a big job tracking down LaTeX errors.
945 \end_layout
946
947 \begin_layout Standard
948 There are a few last points to emphasize:
949 \end_layout
950
951 \begin_layout Itemize
952 LyX 
953 \emph on
954 does not
955 \emph default
956  check if your LaTeX code is correct.
957 \end_layout
958
959 \begin_layout Itemize
960 Beware reinventing the wheel.
961 \end_layout
962
963 \begin_layout Standard
964 On that last point, LyX does have quite a few features tucked into it, and
965  more are coming.
966  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
967  feature before you decide you have to do it by hand.
968  Moreover, there are numerous LaTeX packages out there to do all sorts of
969  things, from labels to envelopes to fancy multipage tables.
970  Check out 
971 \begin_inset CommandInset href
972 LatexCommand href
973 name "CTAN"
974 target "http://www.ctan.org/"
975
976 \end_inset
977
978  for details, and see chapter 
979 \begin_inset CommandInset ref
980 LatexCommand ref
981 reference "cha:secrets"
982
983 \end_inset
984
985 .
986 \end_layout
987
988 \begin_layout Standard
989 If you do need to do some wild and fancy things within your document, be
990  sure to check out a good LaTeX book for assistance.
991  There are a number of them listed in the bibliography of the 
992 \emph on
993 User's Guide
994 \emph default
995 .
996 \end_layout
997
998 \begin_layout Section
999 LyX and the LaTeX Preamble
1000 \end_layout
1001
1002 \begin_layout Subsection
1003 About the LaTeX Preamble
1004 \end_layout
1005
1006 \begin_layout Standard
1007 If you already know LaTeX, there is no need to explain here what the preamble
1008  is good for.
1009  If you don't, the following will give you some ideas—we recommend again
1010  that you consult a LaTeX book for further information.
1011  In any case, you should read the points below, because they explain what
1012  you can do and what you don't need to do in the LaTeX preamble of a LyX
1013  document.
1014 \end_layout
1015
1016 \begin_layout Standard
1017 The LaTeX preamble comes at the very beginning of a document, 
1018 \emph on
1019 before
1020 \emph default
1021  the text.
1022  It serves to:
1023 \end_layout
1024
1025 \begin_layout Itemize
1026 Declare the document class.
1027  
1028 \begin_inset Newline newline
1029 \end_inset
1030
1031 LyX already does this for you.
1032  If you're a seasoned LaTeX-nician, and you have a custom document class
1033  you want to use, check out the 
1034 \emph on
1035 Customization Manual
1036 \emph default
1037  for information on how to make LyX interface to it.
1038 \end_layout
1039
1040 \begin_layout Itemize
1041 Declare the usage of packages.
1042  
1043 \begin_inset Newline newline
1044 \end_inset
1045
1046 LaTeX packages provide special commands, which are only available within
1047  a document when the package has been declared in the preamble.
1048  For example, the package 
1049 \begin_inset Flex Code
1050 status collapsed
1051
1052 \begin_layout Plain Layout
1053 indentfirst
1054 \end_layout
1055
1056 \end_inset
1057
1058  forces all paragraphs to be indented.
1059  There are other packages for labels, envelopes, margins, etc.
1060  
1061 \end_layout
1062
1063 \begin_layout Itemize
1064 Set counters, variables, lengths and widths.
1065  
1066 \begin_inset Newline newline
1067 \end_inset
1068
1069 There are several LaTeX counters and variables which 
1070 \emph on
1071 must
1072 \emph default
1073  be set globally from within the preamble in order to have the desired effect.
1074  (There are variables which you can set and reset inside the document, too.)
1075  Margins are a good example of something which must be set in the preamble.
1076  Another example is the label format for lists.
1077  You can actually set these just about anywhere, but it's best to do it
1078  just once, inside the preamble.
1079 \end_layout
1080
1081 \begin_layout Itemize
1082 Declare user defined commands (with 
1083 \begin_inset Flex Code
1084 status collapsed
1085
1086 \begin_layout Plain Layout
1087
1088 \backslash
1089 newcommand
1090 \end_layout
1091
1092 \end_inset
1093
1094  or 
1095 \begin_inset Flex Code
1096 status collapsed
1097
1098 \begin_layout Plain Layout
1099
1100 \backslash
1101 renewcommand
1102 \end_layout
1103
1104 \end_inset
1105
1106 ).
1107 \begin_inset Newline newline
1108 \end_inset
1109
1110 These are abbreviations for LaTeX commands which appear very often inside
1111  a document.
1112  Although the preamble is a good place to declare such commands, they 
1113 \emph on
1114 can
1115 \emph default
1116  be declared anywhere (before they are used for the first time, of course).
1117  This can be useful if there is a lot of raw LaTeX code in your document,
1118  which normally should not be the case.
1119 \end_layout
1120
1121 \begin_layout Standard
1122 LyX adds its own set of definitions to the preamble of the 
1123 \begin_inset Flex Code
1124 status collapsed
1125
1126 \begin_layout Plain Layout
1127 .tex
1128 \end_layout
1129
1130 \end_inset
1131
1132  file it produces.
1133  This makes LaTeX files generated by LyX portable.
1134 \end_layout
1135
1136 \begin_layout Subsection
1137 Changing the Preamble
1138 \end_layout
1139
1140 \begin_layout Standard
1141 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1142  can't change them without patching LyX itself.
1143  You can, however, add your own stuff to the preamble by selecting 
1144 \begin_inset Flex MenuItem
1145 status collapsed
1146
1147 \begin_layout Plain Layout
1148 LaTeX
1149 \begin_inset space ~
1150 \end_inset
1151
1152 Preamble
1153 \end_layout
1154
1155 \end_inset
1156
1157  in the 
1158 \begin_inset Flex MenuItem
1159 status collapsed
1160
1161 \begin_layout Plain Layout
1162 Document\SpecialChar \menuseparator
1163 Settings
1164 \end_layout
1165
1166 \end_inset
1167
1168  dialog.
1169  LyX adds anything in the 
1170 \begin_inset Flex MenuItem
1171 status collapsed
1172
1173 \begin_layout Plain Layout
1174 Preamble
1175 \end_layout
1176
1177 \end_inset
1178
1179  dialog to its own built-in preamble.
1180  Before adding your own declarations in the preamble, you should make sure
1181  that LyX doesn't already support what you want to do.
1182  (Remember what we said about reinventing the wheel?) Also, 
1183 \emph on
1184 make sure your preamble code is correct
1185 \emph default
1186 .
1187  LyX doesn't check it for you.
1188  If there is an error, you're likely to get an error like 
1189 \begin_inset Quotes eld
1190 \end_inset
1191
1192
1193 \begin_inset Flex Code
1194 status collapsed
1195
1196 \begin_layout Plain Layout
1197 Missing 
1198 \backslash
1199 begin{document}
1200 \end_layout
1201
1202 \end_inset
1203
1204
1205 \begin_inset Quotes erd
1206 \end_inset
1207
1208 .
1209  If you see this error, check your preamble.
1210 \end_layout
1211
1212 \begin_layout Subsection
1213 Examples
1214 \end_layout
1215
1216 \begin_layout Standard
1217 Here are some examples of what you can add to a preamble, and what they
1218  do.
1219 \end_layout
1220
1221 \begin_layout Subsubsection
1222 Example #1: Offsets
1223 \end_layout
1224
1225 \begin_layout Standard
1226 There are two variables under LaTeX that control page position: 
1227 \begin_inset Flex Code
1228 status collapsed
1229
1230 \begin_layout Plain Layout
1231
1232 \backslash
1233 hoffset
1234 \end_layout
1235
1236 \end_inset
1237
1238  and 
1239 \begin_inset Flex Code
1240 status collapsed
1241
1242 \begin_layout Plain Layout
1243
1244 \backslash
1245 voffset
1246 \end_layout
1247
1248 \end_inset
1249
1250 .
1251  Their names should be self-explanatory.
1252  These variables are useful if you think for a moment about computer labels.
1253  Sometimes, the size of a print medium and the area of the medium that you
1254  can actually print on aren't the same.
1255  This is where 
1256 \begin_inset Flex Code
1257 status collapsed
1258
1259 \begin_layout Plain Layout
1260
1261 \backslash
1262 hoffset
1263 \end_layout
1264
1265 \end_inset
1266
1267  and 
1268 \begin_inset Flex Code
1269 status collapsed
1270
1271 \begin_layout Plain Layout
1272
1273 \backslash
1274 voffset
1275 \end_layout
1276
1277 \end_inset
1278
1279  come in.
1280 \end_layout
1281
1282 \begin_layout Standard
1283 The default values for 
1284 \begin_inset Flex Code
1285 status collapsed
1286
1287 \begin_layout Plain Layout
1288
1289 \backslash
1290 hoffset
1291 \end_layout
1292
1293 \end_inset
1294
1295  and 
1296 \begin_inset Flex Code
1297 status collapsed
1298
1299 \begin_layout Plain Layout
1300
1301 \backslash
1302 voffset
1303 \end_layout
1304
1305 \end_inset
1306
1307  are both 0
1308 \begin_inset space \thinspace{}
1309 \end_inset
1310
1311 points, i.
1312 \begin_inset space \thinspace{}
1313 \end_inset
1314
1315 e.
1316 \begin_inset space \space{}
1317 \end_inset
1318
1319 the page isn't shifted.
1320  Unfortunately, some DVI drivers always seem to shift the page.
1321  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1322  If you're using LyX on a system that you don't personally maintain, and
1323  your sysadmin is a doofus, 
1324 \begin_inset Flex Code
1325 status collapsed
1326
1327 \begin_layout Plain Layout
1328
1329 \backslash
1330 hoffset
1331 \end_layout
1332
1333 \end_inset
1334
1335  and 
1336 \begin_inset Flex Code
1337 status collapsed
1338
1339 \begin_layout Plain Layout
1340
1341 \backslash
1342 voffset
1343 \end_layout
1344
1345 \end_inset
1346
1347  can save the day.
1348  Suppose your left and top margins are always 0.5
1349 \begin_inset space \thinspace{}
1350 \end_inset
1351
1352 inches too big.
1353  You can add this to the preamble:
1354 \end_layout
1355
1356 \begin_layout LyX-Code
1357
1358 \backslash
1359 setlength{
1360 \backslash
1361 hoffset}{-0.5 in}
1362 \end_layout
1363
1364 \begin_layout LyX-Code
1365
1366 \backslash
1367 setlength{
1368 \backslash
1369 voffset}{-0.5 in}
1370 \end_layout
1371
1372 \begin_layout Standard
1373 and your margins should now be correct.
1374 \end_layout
1375
1376 \begin_layout Subsubsection
1377 Example #2: Labels
1378 \end_layout
1379
1380 \begin_layout Standard
1381 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1382  There's a rather nice package, available at your nearest CTAN archive,
1383  for printing sheets of labels: 
1384 \begin_inset Flex Code
1385 status collapsed
1386
1387 \begin_layout Plain Layout
1388 labels.sty
1389 \end_layout
1390
1391 \end_inset
1392
1393 .
1394  Now, your system may not have this package installed by default.
1395  We leave that up to you to check.
1396  You'll also want to read the documentation for it; we're not going to do
1397  that for you.
1398  Since this is an example, however, we'll give you an example of how you
1399  use this package.
1400 \end_layout
1401
1402 \begin_layout Standard
1403 First, make sure you're using the 
1404 \begin_inset Flex Code
1405 status collapsed
1406
1407 \begin_layout Plain Layout
1408 article
1409 \end_layout
1410
1411 \end_inset
1412
1413  document class.
1414  Next, you need to put the following in your preamble:
1415 \end_layout
1416
1417 \begin_layout LyX-Code
1418
1419 \backslash
1420 usepackage{labels}
1421 \end_layout
1422
1423 \begin_layout LyX-Code
1424
1425 \backslash
1426 LabelCols=3
1427 \end_layout
1428
1429 \begin_layout LyX-Code
1430
1431 \backslash
1432 LabelRows=7
1433 \end_layout
1434
1435 \begin_layout LyX-Code
1436
1437 \backslash
1438 LeftBorder=8mm
1439 \end_layout
1440
1441 \begin_layout LyX-Code
1442
1443 \backslash
1444 RightBorder=8mm
1445 \end_layout
1446
1447 \begin_layout LyX-Code
1448
1449 \backslash
1450 TopBorder=9mm
1451 \end_layout
1452
1453 \begin_layout LyX-Code
1454
1455 \backslash
1456 BottomBorder=2mm
1457 \end_layout
1458
1459 \begin_layout Standard
1460 This sets things up for Avery label sheets, stock #5360.
1461  You're now ready to print labels, but you'll need to insert LaTeX code,
1462  placing the commands 
1463 \begin_inset Flex Code
1464 status collapsed
1465
1466 \begin_layout Plain Layout
1467
1468 \backslash
1469 begin{labels}
1470 \end_layout
1471
1472 \end_inset
1473
1474  and 
1475 \begin_inset Flex Code
1476 status collapsed
1477
1478 \begin_layout Plain Layout
1479
1480 \backslash
1481 end{labels}
1482 \end_layout
1483
1484 \end_inset
1485
1486  around each label text.
1487  This and other special features of 
1488 \begin_inset Flex Code
1489 status collapsed
1490
1491 \begin_layout Plain Layout
1492 labels.sty
1493 \end_layout
1494
1495 \end_inset
1496
1497  are explained in its documentation.
1498 \end_layout
1499
1500 \begin_layout Standard
1501 Someday, someone may write a LyX layout file to support this package directly.
1502  Maybe that someone is you.
1503 \end_layout
1504
1505 \begin_layout Subsubsection
1506 Example #3: Paragraph Indentation
1507 \end_layout
1508
1509 \begin_layout Standard
1510 Americans are trained to indent the first line of 
1511 \emph on
1512 every
1513 \emph default
1514  paragraph.
1515  As with all of their other weird quirks, most Americans will whine and
1516  moan until they can have their way and indent the first line of all paragraphs.
1517  (Yes, we're joking.
1518  (We are?) 
1519 \emph on
1520 Yeah
1521 \emph default
1522 , we are.)
1523 \end_layout
1524
1525 \begin_layout Standard
1526 Of course, this behavior isn't standard typography.
1527  In books, you typically only indent the first line of a paragraph 
1528 \emph on
1529 if
1530 \emph default
1531  it follows another one.
1532  The idea behind indenting the first line of a paragraph is to distinguish
1533  neighboring paragraphs from one another.
1534  If there is no previous paragraph—for example, if it follows a figure or
1535  is the first paragraph in a section—then there is no need for indentation.
1536  
1537 \end_layout
1538
1539 \begin_layout Standard
1540 If you're a typical American (we're still joking!), though, you don't care
1541  about such esoteric things; you want your indentation! Add this to the
1542  preamble:
1543 \end_layout
1544
1545 \begin_layout LyX-Code
1546
1547 \backslash
1548 usepackage{indentfirst}
1549 \end_layout
1550
1551 \begin_layout Standard
1552 If your TeX distribution isn't braindead, you'll have this package, and
1553  all of your paragraphs will get the indentation the Founding Fathers intended
1554  they should have.
1555 \end_layout
1556
1557 \begin_layout Subsubsection
1558 Example #4: This Document
1559 \end_layout
1560
1561 \begin_layout Standard
1562 You can also check out the preamble of this document to get an idea of some
1563  of the advanced things you can do.
1564  Also, there are more examples and an assortment of LaTeX 
1565 \begin_inset Quotes eld
1566 \end_inset
1567
1568 dirty tricks
1569 \begin_inset Quotes erd
1570 \end_inset
1571
1572  given in Chapter
1573 \begin_inset space ~
1574 \end_inset
1575
1576
1577 \begin_inset CommandInset ref
1578 LatexCommand ref
1579 reference "cha:secrets"
1580
1581 \end_inset
1582
1583 .
1584  
1585 \end_layout
1586
1587 \begin_layout Section
1588 LyX and LaTeX Errors
1589 \end_layout
1590
1591 \begin_layout Standard
1592 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1593  going.
1594  It then uses the logfile from the LaTeX run to do a post-mortem.
1595  After analyzing the logfile,LyX displays a dialog listing the errors.
1596  Clicking on any one of them will take you to the position in your LyX file
1597  where the error occurred.
1598 \begin_inset Foot
1599 status collapsed
1600
1601 \begin_layout Plain Layout
1602 Well, usually.
1603  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1604  right line.
1605  There are also cases where LaTeX reports the error on one line, but the
1606  actual error is earlier.
1607  This is not unlike forgetting a closing brace in a program: You'll get
1608  an error, but only later.
1609 \end_layout
1610
1611 \end_inset
1612
1613
1614 \end_layout
1615
1616 \begin_layout Standard
1617 Some folks also like to look at the log file directly: It is available from
1618  
1619 \begin_inset Flex MenuItem
1620 status collapsed
1621
1622 \begin_layout Plain Layout
1623 Document
1624 \bar under
1625 \SpecialChar \menuseparator
1626
1627 \bar default
1628 Latex
1629 \begin_inset space ~
1630 \end_inset
1631
1632 Log
1633 \end_layout
1634
1635 \end_inset
1636
1637 .
1638  There are some fairly common error messages and warnings.
1639  We'll cover those here.
1640  You should look at a good LaTeX book for a complete listing.
1641 \end_layout
1642
1643 \begin_layout Itemize
1644 \begin_inset Flex Code
1645 status collapsed
1646
1647 \begin_layout Plain Layout
1648 LaTeX Warning
1649 \end_layout
1650
1651 \end_inset
1652
1653
1654 \begin_inset Newline newline
1655 \end_inset
1656
1657 Anything beginning with these words is a warning message for the purpose
1658  of 
1659 \begin_inset Quotes eld
1660 \end_inset
1661
1662 debugging
1663 \begin_inset Quotes erd
1664 \end_inset
1665
1666  the LaTeX code itself.
1667  You'll get messages like this if you added or changed cross-references
1668  or bibliography entries, in which case, LaTeX is trying to tell you that
1669  you need to make another run.
1670  You can by-and-large ignore these.
1671 \end_layout
1672
1673 \begin_layout Itemize
1674 \begin_inset Flex Code
1675 status collapsed
1676
1677 \begin_layout Plain Layout
1678 LaTeX Font Warning
1679 \end_layout
1680
1681 \end_inset
1682
1683
1684 \begin_inset Newline newline
1685 \end_inset
1686
1687 Another warning message, this time about fonts which LaTeX couldn't find.
1688  The rest of the message will often say something about a replacement font
1689  that LaTeX used.
1690  You can safely ignore these, too.
1691 \end_layout
1692
1693 \begin_layout Itemize
1694 \begin_inset Flex Code
1695 status collapsed
1696
1697 \begin_layout Plain Layout
1698 Overfull 
1699 \backslash
1700 hbox
1701 \end_layout
1702
1703 \end_inset
1704
1705
1706 \begin_inset Newline newline
1707 \end_inset
1708
1709 LaTeX absolutely 
1710 \emph on
1711 loves
1712 \emph default
1713  to spew these out.
1714  They are warnings about lines that were too long and run past the right
1715  margin.
1716  Almost always, this is unnoticeable in the final output.
1717  (It can be just a point or two.) Or, only one or two characters extend past
1718  the margin.
1719  LaTeX seems to generate at least one of these messages for just about any
1720  document you write.
1721 \begin_inset Newline newline
1722 \end_inset
1723
1724 You can ignore these messages.
1725  Your eyes will tell you if there's a problem with something that's too
1726  wide; just look at the output.
1727 \begin_inset Foot
1728 status collapsed
1729
1730 \begin_layout Plain Layout
1731 You can also enable the `draft' option in 
1732 \begin_inset Flex MenuItem
1733 status collapsed
1734
1735 \begin_layout Plain Layout
1736 Document
1737 \bar under
1738 \SpecialChar \menuseparator
1739
1740 \bar default
1741 Settings
1742 \end_layout
1743
1744 \end_inset
1745
1746 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1747 \end_layout
1748
1749 \end_inset
1750
1751
1752 \end_layout
1753
1754 \begin_layout Itemize
1755 \begin_inset Flex Code
1756 status collapsed
1757
1758 \begin_layout Plain Layout
1759 Underfull 
1760 \backslash
1761 hbox
1762 \end_layout
1763
1764 \end_inset
1765
1766
1767 \begin_inset Newline newline
1768 \end_inset
1769
1770 Not quite as common as its cousin.
1771  LaTeX seems to like to print lines that are a bit too wide as opposed to
1772  ones that are a bit too narrow.
1773  We have no idea why.
1774 \end_layout
1775
1776 \begin_layout Itemize
1777 \begin_inset Flex Code
1778 status collapsed
1779
1780 \begin_layout Plain Layout
1781 Overfull 
1782 \backslash
1783 vbox
1784 \end_layout
1785
1786 \end_inset
1787
1788  and 
1789 \begin_inset Flex Code
1790 status collapsed
1791
1792 \begin_layout Plain Layout
1793 Underfull 
1794 \backslash
1795 vbox
1796 \end_layout
1797
1798 \end_inset
1799
1800
1801 \begin_inset Newline newline
1802 \end_inset
1803
1804 Warnings about troubles breaking the page.
1805  Once again, just look at the output.
1806  Your eyes will tell you where something has gone wrong.
1807 \end_layout
1808
1809 \begin_layout Itemize
1810 \begin_inset Flex Code
1811 status collapsed
1812
1813 \begin_layout Plain Layout
1814  LaTeX Error: File 
1815 \begin_inset Quotes els
1816 \end_inset
1817
1818 Xxxx
1819 \begin_inset Quotes ers
1820 \end_inset
1821
1822  not found
1823 \end_layout
1824
1825 \end_inset
1826
1827
1828 \begin_inset Newline newline
1829 \end_inset
1830
1831 The file 
1832 \begin_inset Quotes eld
1833 \end_inset
1834
1835 Xxxx
1836 \begin_inset Quotes erd
1837 \end_inset
1838
1839  isn't installed on this system.
1840  This usually appears because some package your document needs isn't installed.
1841  If you didn't touch the preamble or didn't use the 
1842 \begin_inset Flex Code
1843 status collapsed
1844
1845 \begin_layout Plain Layout
1846
1847 \backslash
1848 usepackage{}
1849 \end_layout
1850
1851 \end_inset
1852
1853  command, then one of the packages LyX tried to load is missing.
1854  Use 
1855 \begin_inset Flex MenuItem
1856 status collapsed
1857
1858 \begin_layout Plain Layout
1859 Help\SpecialChar \menuseparator
1860 LaTeX Configuration
1861 \end_layout
1862
1863 \end_inset
1864
1865  to get a list of packages that LyX knows about.
1866  This file is updated whenever you reconfigure LyX (using 
1867 \begin_inset Flex MenuItem
1868 status collapsed
1869
1870 \begin_layout Plain Layout
1871 Tools\SpecialChar \menuseparator
1872 Reconfigure
1873 \end_layout
1874
1875 \end_inset
1876
1877 ) and tells you which packages have been detected and what they do.
1878 \begin_inset Newline newline
1879 \end_inset
1880
1881 If you did use the 
1882 \begin_inset Flex Code
1883 status collapsed
1884
1885 \begin_layout Plain Layout
1886
1887 \backslash
1888 usepackage{}
1889 \end_layout
1890
1891 \end_inset
1892
1893  command and the package in question isn't installed, then you'll need to
1894  install it yourself.
1895 \end_layout
1896
1897 \begin_layout Itemize
1898 \begin_inset Flex Code
1899 status collapsed
1900
1901 \begin_layout Plain Layout
1902 LaTeX Error: Unknown option
1903 \end_layout
1904
1905 \end_inset
1906
1907
1908 \begin_inset Newline newline
1909 \end_inset
1910
1911 Error messages beginning with this are trying to tell you that you specified
1912  a bad or undefined option to a package.
1913  Check the package's documentation.
1914 \end_layout
1915
1916 \begin_layout Itemize
1917 \begin_inset Flex Code
1918 status collapsed
1919
1920 \begin_layout Plain Layout
1921 Undefined control sequence
1922 \end_layout
1923
1924 \end_inset
1925
1926
1927 \begin_inset Newline newline
1928 \end_inset
1929
1930 If you've inserted LaTeX code into your document, but made a typo, you'll
1931  get one of these.
1932  You may have forgotten to load a package.
1933  In any case, this error message usually means that you used an undefined
1934  command.
1935  
1936 \end_layout
1937
1938 \begin_layout Standard
1939 There are other error and warning messages.
1940  Some are self-explanatory.
1941  These are usually LaTeX messages.
1942  Others are downright cryptic.
1943  These are usually TeX error messages, and we really have 
1944 \emph on
1945 no clue
1946 \emph default
1947  what they mean or how to decipher them.
1948  No-one does.
1949 \end_layout
1950
1951 \begin_layout Standard
1952 There's a general sequence you should follow if you get error messages:
1953 \end_layout
1954
1955 \begin_layout Enumerate
1956 Look at the LaTeX code you inserted for typos.
1957 \end_layout
1958
1959 \begin_layout Enumerate
1960 If there are no typos, check that you used the command(s) correctly.
1961 \end_layout
1962
1963 \begin_layout Enumerate
1964 If you get a bunch of error boxes piled up at the very top of the document—and
1965  especially if you see a 
1966 \begin_inset Quotes eld
1967 \end_inset
1968
1969
1970 \begin_inset Flex Code
1971 status collapsed
1972
1973 \begin_layout Plain Layout
1974 Missing 
1975 \backslash
1976 begin{document}
1977 \end_layout
1978
1979 \end_inset
1980
1981
1982 \begin_inset Quotes erd
1983 \end_inset
1984
1985  error—it means that there are errors in the preamble.
1986  Start debugging your preamble.
1987 \end_layout
1988
1989 \begin_layout Enumerate
1990 If you didn't add anything to the preamble and didn't add any LaTeX code
1991  to the document, the first suspect is your LaTeX distribution itself.
1992  Check for missing packages and install them.
1993 \end_layout
1994
1995 \begin_layout Enumerate
1996 Okay, so there are no missing packages.
1997  Did you use any of the fine-tuning options in LyX? Specifically, did you
1998  
1999 \emph on
2000 misuse
2001 \emph default
2002  any of them, like trying to manually insert lots of 
2003 \begin_inset Flex Code
2004 status collapsed
2005
2006 \begin_layout Plain Layout
2007 Protected
2008 \begin_inset space ~
2009 \end_inset
2010
2011 Blanks
2012 \end_layout
2013
2014 \end_inset
2015
2016
2017 \begin_inset Flex Code
2018 status collapsed
2019
2020 \begin_layout Plain Layout
2021 Linebreaks
2022 \end_layout
2023
2024 \end_inset
2025
2026 , or 
2027 \begin_inset Flex Code
2028 status collapsed
2029
2030 \begin_layout Plain Layout
2031 Pagebreaks
2032 \end_layout
2033
2034 \end_inset
2035
2036 ? Did you try to kludge something together with these instead of using the
2037  appropriate paragraph environment?
2038 \end_layout
2039
2040 \begin_layout Enumerate
2041 All right, you didn't use any of the fine-tuning options, you played by
2042  the rules.
2043  Did you try to pull a fancy maneuver? Did you do something funky inside
2044  a table or an equation, like inserting a graphic into a table cell?
2045 \end_layout
2046
2047 \begin_layout Enumerate
2048 Do you have long sections of text where LaTeX cannot find a place to break
2049  a line? By default, LaTeX is rather strict about how much extra inter-word
2050  spacing it will add in order to break a line.
2051  Preferably, you should rework the paragraph to avoid the problem.
2052  If this isn't an option, you can wrap your text in 
2053 \begin_inset Flex Code
2054 status collapsed
2055
2056 \begin_layout Plain Layout
2057
2058 \backslash
2059 sloppypar
2060 \end_layout
2061
2062 \end_inset
2063
2064  to make LaTeX's line breaking more, well, sloppy.
2065 \end_layout
2066
2067 \begin_layout Enumerate
2068 Did you go overboard with the nesting? LyX (currently) doesn't check to
2069  make sure you're in the limits for nesting environments.
2070  If you nested a bunch of environments to the 
2071 \begin_inset Formula $17^{\mathrm{th}}$
2072 \end_inset
2073
2074  level, that's the problem.
2075  (The limit in LaTeX is five.)
2076 \end_layout
2077
2078 \begin_layout Enumerate
2079 Okay, you didn't get any error messages, but your output looks awful.
2080  If you have a table or figure that's too wide or long for the page, you
2081  need to:
2082 \end_layout
2083
2084 \begin_deeper
2085 \begin_layout Enumerate
2086 rescale the figure so it fits.
2087 \end_layout
2088
2089 \begin_layout Enumerate
2090 trim down the table so it fits.
2091 \end_layout
2092
2093 \end_deeper
2094 \begin_layout Enumerate
2095 If something else is wrong with the output, and you didn't try to pull anything
2096  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2097 \end_layout
2098
2099 \begin_layout Standard
2100 If all this doesn't help—well, then 
2101 \emph on
2102 perhaps
2103 \emph default
2104  you might have found a bug in LyX\SpecialChar \ldots{}
2105 .
2106 \end_layout
2107
2108 \begin_layout Chapter
2109 Supplemental Tools
2110 \end_layout
2111
2112 \begin_layout Section
2113 Customizing Bibliographies with BibTeX
2114 \end_layout
2115
2116 \begin_layout Standard
2117 The most basic information about how to use BibTeX with LyX is contained
2118  in the section 
2119 \emph on
2120 Bibliography databases (BibTeX)
2121 \emph default
2122  of the 
2123 \emph on
2124 User's Guide
2125 \emph default
2126 .
2127  The following subsections explain special bibliography features supported
2128  by LyX.
2129 \end_layout
2130
2131 \begin_layout Subsection
2132 Alternative Citation Styles
2133 \end_layout
2134
2135 \begin_layout Standard
2136 Standard BibTeX uses numbers (e.
2137 \begin_inset space \thinspace{}
2138 \end_inset
2139
2140 g.
2141 \begin_inset space \space{}
2142 \end_inset
2143
2144
2145 \begin_inset Quotes eld
2146 \end_inset
2147
2148 [12]
2149 \begin_inset Quotes erd
2150 \end_inset
2151
2152 ) to refer to a cited work.
2153  However, in many scientific disciplines, other citation styles are in use.
2154  The most common one is the author-year style (e.
2155 \begin_inset space \thinspace{}
2156 \end_inset
2157
2158 g.
2159 \begin_inset space \space{}
2160 \end_inset
2161
2162
2163 \begin_inset Quotes eld
2164 \end_inset
2165
2166 Knuth 1984a
2167 \begin_inset Quotes erd
2168 \end_inset
2169
2170 ).
2171  LyX supports two packages that provide this style, 
2172 \begin_inset Flex Code
2173 status collapsed
2174
2175 \begin_layout Plain Layout
2176 natbib
2177 \end_layout
2178
2179 \end_inset
2180
2181  and 
2182 \begin_inset Flex Code
2183 status collapsed
2184
2185 \begin_layout Plain Layout
2186 jurabib
2187 \end_layout
2188
2189 \end_inset
2190
2191 .
2192  Both packages have their pros and cons, which cannot be listed in detail.
2193  If you only want to have simple author-year (or author-numerical) style,
2194  or if you want to use one of the countless style files for 
2195 \begin_inset Flex Code
2196 status collapsed
2197
2198 \begin_layout Plain Layout
2199 natbib
2200 \end_layout
2201
2202 \end_inset
2203
2204 , than the established 
2205 \begin_inset Flex Code
2206 status collapsed
2207
2208 \begin_layout Plain Layout
2209 natbib
2210 \end_layout
2211
2212 \end_inset
2213
2214  package is probably your choice.
2215  If you need special features like short title references, ibidem etc., you
2216  might consider the 
2217 \begin_inset Flex Code
2218 status collapsed
2219
2220 \begin_layout Plain Layout
2221 jurabib
2222 \end_layout
2223
2224 \end_inset
2225
2226  package.
2227 \end_layout
2228
2229 \begin_layout Standard
2230 The handling of both packages in LyX is basically the same.
2231  Go to 
2232 \begin_inset Flex MenuItem
2233 status collapsed
2234
2235 \begin_layout Plain Layout
2236 Document\SpecialChar \menuseparator
2237 Settings
2238 \end_layout
2239
2240 \end_inset
2241
2242  and select under 
2243 \begin_inset Flex MenuItem
2244 status collapsed
2245
2246 \begin_layout Plain Layout
2247 Bibliography
2248 \end_layout
2249
2250 \end_inset
2251
2252  the option 
2253 \begin_inset Flex MenuItem
2254 status collapsed
2255
2256 \begin_layout Plain Layout
2257 Natbib
2258 \end_layout
2259
2260 \end_inset
2261
2262  or 
2263 \begin_inset Flex MenuItem
2264 status collapsed
2265
2266 \begin_layout Plain Layout
2267 Jurabib
2268 \end_layout
2269
2270 \end_inset
2271
2272 .
2273  With both packages, you will get some extra features in the citation dialog
2274  and you can select the style of the reference (
2275 \begin_inset Quotes eld
2276 \end_inset
2277
2278 Knuth 1984
2279 \begin_inset Quotes erd
2280 \end_inset
2281
2282
2283 \begin_inset Quotes eld
2284 \end_inset
2285
2286 Knuth (1984)
2287 \begin_inset Quotes erd
2288 \end_inset
2289
2290
2291 \begin_inset Quotes eld
2292 \end_inset
2293
2294 Knuth, 1984
2295 \begin_inset Quotes erd
2296 \end_inset
2297
2298
2299 \begin_inset Quotes eld
2300 \end_inset
2301
2302 1984
2303 \begin_inset Quotes erd
2304 \end_inset
2305
2306  etc.).
2307  Note that both packages need specifically designed style files.
2308  They both ship their own, but there are lots of additional style files,
2309  and there is even an interactive style file builder
2310 \begin_inset Foot
2311 status collapsed
2312
2313 \begin_layout Plain Layout
2314 See 
2315 \begin_inset Flex URL
2316 status open
2317
2318 \begin_layout Plain Layout
2319
2320 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2321 \end_layout
2322
2323 \end_inset
2324
2325
2326 \end_layout
2327
2328 \end_inset
2329
2330  for 
2331 \begin_inset Flex Code
2332 status collapsed
2333
2334 \begin_layout Plain Layout
2335 natbib
2336 \end_layout
2337
2338 \end_inset
2339
2340 .
2341 \end_layout
2342
2343 \begin_layout Subsection
2344 Sectioned Bibliographies
2345 \end_layout
2346
2347 \begin_layout Standard
2348 Sometimes you might need to divide your bibliography into several sections.
2349  If you are for instance a historian, the possibility to separate sources
2350  and scientific works is most likely a 
2351 \begin_inset Quotes eld
2352 \end_inset
2353
2354 must have
2355 \begin_inset Quotes erd
2356 \end_inset
2357
2358 .
2359  Unfortunately, BibTeX itself does not allow you to do this.
2360  But with the help of some LaTeX packages, BibTeX can be extended to fit
2361  your needs.
2362 \end_layout
2363
2364 \begin_layout Standard
2365 LyX provides native support for one of these packages, 
2366 \family typewriter
2367 bibtopic
2368 \family default
2369 .
2370 \begin_inset Foot
2371 status collapsed
2372
2373 \begin_layout Plain Layout
2374 Available from 
2375 \begin_inset Flex URL
2376 status open
2377
2378 \begin_layout Plain Layout
2379
2380 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2381 \end_layout
2382
2383 \end_inset
2384
2385
2386 \end_layout
2387
2388 \end_inset
2389
2390  The advantage of this package (compared to other packages like 
2391 \family typewriter
2392 multibib
2393 \family default
2394 ) is that you don't need to define new citation commands.
2395  Instead, you need to prepare different bibliographic databases which include
2396  the entries for the different sections of the bibliography.
2397  For example: If you want to divide your bibliography into the sections
2398  
2399 \begin_inset Quotes eld
2400 \end_inset
2401
2402 Sources
2403 \begin_inset Quotes erd
2404 \end_inset
2405
2406  and 
2407 \begin_inset Quotes eld
2408 \end_inset
2409
2410 Scientific works
2411 \begin_inset Quotes erd
2412 \end_inset
2413
2414 , you first need to create two bibliographic databases, e.
2415 \begin_inset space \thinspace{}
2416 \end_inset
2417
2418 g.
2419 \begin_inset space \space{}
2420 \end_inset
2421
2422
2423 \begin_inset Flex Code
2424 status collapsed
2425
2426 \begin_layout Plain Layout
2427 sources.bib
2428 \end_layout
2429
2430 \end_inset
2431
2432  and 
2433 \begin_inset Flex Code
2434 status collapsed
2435
2436 \begin_layout Plain Layout
2437 scientific.bib
2438 \end_layout
2439
2440 \end_inset
2441
2442 .
2443  
2444 \end_layout
2445
2446 \begin_layout Standard
2447 Go to 
2448 \begin_inset Flex MenuItem
2449 status collapsed
2450
2451 \begin_layout Plain Layout
2452 Document\SpecialChar \menuseparator
2453 Settings
2454 \end_layout
2455
2456 \end_inset
2457
2458  and check under 
2459 \begin_inset Flex MenuItem
2460 status collapsed
2461
2462 \begin_layout Plain Layout
2463 Bibliography
2464 \end_layout
2465
2466 \end_inset
2467
2468  the option 
2469 \begin_inset Flex MenuItem
2470 status collapsed
2471
2472 \begin_layout Plain Layout
2473 Sectioned bibliography
2474 \end_layout
2475
2476 \end_inset
2477
2478 .
2479  Now you can insert multiple BibTeX bibliographies, one for each section
2480  of your bibliography.
2481  Returning to our example: Insert the BibTeX bibliography 
2482 \begin_inset Flex Code
2483 status collapsed
2484
2485 \begin_layout Plain Layout
2486 sources.bib
2487 \end_layout
2488
2489 \end_inset
2490
2491  and a second one for the database 
2492 \begin_inset Flex Code
2493 status collapsed
2494
2495 \begin_layout Plain Layout
2496 scientific.bib
2497 \end_layout
2498
2499 \end_inset
2500
2501 .
2502  You are free to use the same or different styles for each section.
2503  Additionally, you can chose if the bibliography section should contain
2504  
2505 \begin_inset Quotes eld
2506 \end_inset
2507
2508 all cited references
2509 \begin_inset Quotes erd
2510 \end_inset
2511
2512  of the specified database(s) (which is the default), 
2513 \begin_inset Quotes eld
2514 \end_inset
2515
2516 all uncited references
2517 \begin_inset Quotes erd
2518 \end_inset
2519
2520  or even 
2521 \begin_inset Quotes eld
2522 \end_inset
2523
2524 all references
2525 \begin_inset Quotes erd
2526 \end_inset
2527
2528 .
2529  This might be useful if you would like to separate your bibliography into
2530  three sections: 
2531 \begin_inset Quotes eld
2532 \end_inset
2533
2534 Cited sources
2535 \begin_inset Quotes erd
2536 \end_inset
2537
2538
2539 \begin_inset Quotes eld
2540 \end_inset
2541
2542 Uncited sources
2543 \begin_inset Quotes erd
2544 \end_inset
2545
2546 , and 
2547 \begin_inset Quotes eld
2548 \end_inset
2549
2550 Scientific works
2551 \begin_inset Quotes erd
2552 \end_inset
2553
2554 .
2555  The titles for the sections can be added as ordinary sections or subsections.
2556  Since 
2557 \begin_inset Flex Code
2558 status collapsed
2559
2560 \begin_layout Plain Layout
2561 bibtopic
2562 \end_layout
2563
2564 \end_inset
2565
2566  removes the bibliography title, you have manually re-add that, too (as
2567  a chapter* or section*, for instance).
2568 \end_layout
2569
2570 \begin_layout Subsection
2571 Multiple Bibliographies
2572 \end_layout
2573
2574 \begin_layout Standard
2575 Multiple bibliographies, e.
2576 \begin_inset space \thinspace{}
2577 \end_inset
2578
2579 g.
2580 \begin_inset space \space{}
2581 \end_inset
2582
2583 a bibliography for each section or chapter of the document, are not supported
2584  by BibTeX itself.
2585  But the 
2586 \begin_inset Flex Code
2587 status collapsed
2588
2589 \begin_layout Plain Layout
2590 bibtopic
2591 \end_layout
2592
2593 \end_inset
2594
2595  package, which is used for the creation of sectioned bibliographies in
2596  LyX (see the previous section), provides an easy way to solve this task,
2597  if you are willing to use some 
2598 \begin_inset Flex MenuItem
2599 status collapsed
2600
2601 \begin_layout Plain Layout
2602 TeX Code
2603 \end_layout
2604
2605 \end_inset
2606
2607  (see section
2608 \begin_inset space ~
2609 \end_inset
2610
2611
2612 \begin_inset CommandInset ref
2613 LatexCommand ref
2614 reference "sec:Inserting-TeX-Code"
2615
2616 \end_inset
2617
2618 ).
2619 \begin_inset Foot
2620 status collapsed
2621
2622 \begin_layout Plain Layout
2623 An alternative approach is to use the 
2624 \begin_inset Flex Code
2625 status collapsed
2626
2627 \begin_layout Plain Layout
2628 chapterbib
2629 \end_layout
2630
2631 \end_inset
2632
2633  or 
2634 \begin_inset Flex Code
2635 status collapsed
2636
2637 \begin_layout Plain Layout
2638 bibunits
2639 \end_layout
2640
2641 \end_inset
2642
2643  package, respectively.
2644 \end_layout
2645
2646 \end_inset
2647
2648
2649 \end_layout
2650
2651 \begin_layout Standard
2652 First go to 
2653 \begin_inset Flex MenuItem
2654 status collapsed
2655
2656 \begin_layout Plain Layout
2657 Document\SpecialChar \menuseparator
2658 Settings
2659 \end_layout
2660
2661 \end_inset
2662
2663  and under 
2664 \begin_inset Flex MenuItem
2665 status collapsed
2666
2667 \begin_layout Plain Layout
2668 Bibliography
2669 \end_layout
2670
2671 \end_inset
2672
2673  check 
2674 \begin_inset Flex MenuItem
2675 status collapsed
2676
2677 \begin_layout Plain Layout
2678 Sectioned bibliography
2679 \end_layout
2680
2681 \end_inset
2682
2683 .
2684  In the document, you have to enclose the sections, which shall contain
2685  their own bibliography (including the BibTeX bibliography itself), between
2686  
2687 \begin_inset Flex Code
2688 status collapsed
2689
2690 \begin_layout Plain Layout
2691
2692 \backslash
2693 begin{btUnit}
2694 \end_layout
2695
2696 \end_inset
2697
2698  and 
2699 \begin_inset Flex Code
2700 status collapsed
2701
2702 \begin_layout Plain Layout
2703
2704 \backslash
2705 end{btUnit}
2706 \end_layout
2707
2708 \end_inset
2709
2710  (those commands have to be inserted as TeX code).
2711  The bibliography will contain all references which have been cited in the
2712  current 
2713 \begin_inset Flex Code
2714 status collapsed
2715
2716 \begin_layout Plain Layout
2717 btUnit
2718 \end_layout
2719
2720 \end_inset
2721
2722 .
2723  
2724 \series bold
2725 Note:
2726 \series default
2727  If you are using this approach, then every citation reference has to be
2728  inside some 
2729 \begin_inset Flex Code
2730 status collapsed
2731
2732 \begin_layout Plain Layout
2733 btUnit
2734 \end_layout
2735
2736 \end_inset
2737
2738 .
2739  Also, the 
2740 \begin_inset Flex Code
2741 status collapsed
2742
2743 \begin_layout Plain Layout
2744 btUnit
2745 \end_layout
2746
2747 \end_inset
2748
2749 s cannot be nested.
2750 \end_layout
2751
2752 \begin_layout Section
2753 Multipart Documents
2754 \end_layout
2755
2756 \begin_layout Subsection
2757 General Operation
2758 \end_layout
2759
2760 \begin_layout Standard
2761 When you are working on a large file with many sections, it is often convenient
2762  to break up the document into several files, or perhaps you have something
2763  where a table may change from time to time, but the preceding text does
2764  not.
2765  In these cases, you should seriously consider using multipart documents.
2766  For example, scientific papers often have five major sections: the introduction
2767 , observations, results, discussion, and conclusion.
2768  Each of these could be its own separate LyX file, with one 
2769 \begin_inset Quotes eld
2770 \end_inset
2771
2772 master
2773 \begin_inset Quotes erd
2774 \end_inset
2775
2776  file which contains the title, authors, abstract, references, etc., plus
2777  the five included files.
2778  It is important to note that each of these files is a full LyX file which
2779  can be formatted and printed on its own, as well as included in a master
2780  file.
2781  Each of these files must have the same document class, however—don't attempt
2782  to mix book classes with article classes.
2783  You may also include LaTeX files; however, these files must not have their
2784  own preamble (i.
2785 \begin_inset space \thinspace{}
2786 \end_inset
2787
2788 g.
2789 \begin_inset space \space{}
2790 \end_inset
2791
2792 everything up to and including the 
2793 \begin_inset Flex Code
2794 status collapsed
2795
2796 \begin_layout Plain Layout
2797
2798 \backslash
2799 begin{document}
2800 \end_layout
2801
2802 \end_inset
2803
2804  line as well as the 
2805 \begin_inset Flex Code
2806 status collapsed
2807
2808 \begin_layout Plain Layout
2809
2810 \backslash
2811 end{document}
2812 \end_layout
2813
2814 \end_inset
2815
2816  line must be deleted) or else errors will be generated when you try to
2817  make a DVI file.
2818 \end_layout
2819
2820 \begin_layout Standard
2821 LyX allows you to include files quite easily with 
2822 \begin_inset Flex MenuItem
2823 status collapsed
2824
2825 \begin_layout Plain Layout
2826 Insert\SpecialChar \menuseparator
2827 ChiId
2828 \begin_inset space ~
2829 \end_inset
2830
2831 Document
2832 \end_layout
2833
2834 \end_inset
2835
2836 .
2837  When you click on this selection a small box is inserted into the file
2838  at the current cursor location.
2839  Clicking on the box raises a dialog which allows you to select the file
2840  to be included, and the method of its inclusion.
2841  
2842 \end_layout
2843
2844 \begin_layout Standard
2845 The file selection box should by now be obvious.
2846  The three inclusion methods are 
2847 \begin_inset Quotes eld
2848 \end_inset
2849
2850 include
2851 \begin_inset Quotes erd
2852 \end_inset
2853
2854
2855 \begin_inset Quotes eld
2856 \end_inset
2857
2858 input
2859 \begin_inset Quotes erd
2860 \end_inset
2861
2862 , and 
2863 \begin_inset Quotes eld
2864 \end_inset
2865
2866 verbatim
2867 \begin_inset Quotes erd
2868 \end_inset
2869
2870 .
2871  The difference between 
2872 \begin_inset Quotes eld
2873 \end_inset
2874
2875 include
2876 \begin_inset Quotes erd
2877 \end_inset
2878
2879  and 
2880 \begin_inset Quotes eld
2881 \end_inset
2882
2883 input
2884 \begin_inset Quotes erd
2885 \end_inset
2886
2887  is really only meaningful to LaTeXperts, but the practical difference is
2888  that files which are 
2889 \begin_inset Quotes eld
2890 \end_inset
2891
2892 included
2893 \begin_inset Quotes erd
2894 \end_inset
2895
2896  are typeset beginning on a new page, while files which are 
2897 \begin_inset Quotes eld
2898 \end_inset
2899
2900 inputted
2901 \begin_inset Quotes erd
2902 \end_inset
2903
2904  are typeset starting on the current page.
2905 \end_layout
2906
2907 \begin_layout Standard
2908 Generally, the master file is converted into a full LaTeX file before typesettin
2909 g, while the included files are converted to LaTeX files which do not have
2910  all the preamble information.
2911 \end_layout
2912
2913 \begin_layout Standard
2914
2915 \begin_inset Quotes eld
2916 \end_inset
2917
2918 verbatim
2919 \begin_inset Quotes erd
2920 \end_inset
2921
2922  included file allows you to include a file typeset exactly as it appears
2923  in the file, i.
2924 \begin_inset space \thinspace{}
2925 \end_inset
2926
2927 g.
2928 \begin_inset space \space{}
2929 \end_inset
2930
2931 in 
2932 \begin_inset Flex Code
2933 status collapsed
2934
2935 \begin_layout Plain Layout
2936 verbatim
2937 \end_layout
2938
2939 \end_inset
2940
2941  mode, with the characters set in a fixed-width typewriter font.
2942  Normally, spaces in this file are invisible, though two consecutive spaces
2943  are conserved, unlike LyX's normal treatment of spaces.
2944  However, setting the 
2945 \begin_inset Flex MenuItem
2946 status collapsed
2947
2948 \begin_layout Plain Layout
2949 Mark
2950 \begin_inset space ~
2951 \end_inset
2952
2953 spaces
2954 \begin_inset space ~
2955 \end_inset
2956
2957 in
2958 \begin_inset space ~
2959 \end_inset
2960
2961 output
2962 \end_layout
2963
2964 \end_inset
2965
2966  checkbox typesets a mark to unambiguously define the presence of a space.
2967  
2968 \end_layout
2969
2970 \begin_layout Subsection
2971 Cross-References Between Files
2972 \end_layout
2973
2974 \begin_layout Standard
2975 \begin_inset Box Shadowbox
2976 position "t"
2977 hor_pos "c"
2978 has_inner_box 1
2979 inner_pos "t"
2980 use_parbox 0
2981 use_makebox 0
2982 width "100col%"
2983 special "none"
2984 height "1in"
2985 height_special "totalheight"
2986 status open
2987
2988 \begin_layout Plain Layout
2989 This section is somewhat out of date.
2990  Need to describe default master documents and how children are opened when
2991  the master is.
2992  [[FIXME]]
2993 \end_layout
2994
2995 \end_inset
2996
2997
2998 \end_layout
2999
3000 \begin_layout Standard
3001 It is possible to set up cross-references between the different files.
3002  First, open all the files in question: let's call them A and B in a two
3003  file example, where B is included in A.
3004  Let's say you insert a label in A, then want to reference it in B.
3005  Open the cross-reference dialog in whilst in document B, and you can select
3006  the 
3007 \begin_inset Quotes eld
3008 \end_inset
3009
3010 buffer
3011 \begin_inset Quotes erd
3012 \end_inset
3013
3014  to use.
3015 \end_layout
3016
3017 \begin_layout Subsection
3018 Bibliography Lists in all Subdocuments
3019 \end_layout
3020
3021 \begin_layout Standard
3022 \begin_inset Box Frameless
3023 position "t"
3024 hor_pos "c"
3025 has_inner_box 1
3026 inner_pos "t"
3027 use_parbox 0
3028 use_makebox 0
3029 width "100col%"
3030 special "none"
3031 height "1in"
3032 height_special "totalheight"
3033 status open
3034
3035 \begin_layout Plain Layout
3036 This section also needs updating.
3037  There is now material about this on the wiki, and it could be copied here.
3038 \end_layout
3039
3040 \end_inset
3041
3042
3043 \end_layout
3044
3045 \begin_layout Standard
3046 Copy the bibliography list with all entries to all subdocuments and transform
3047  them to a comment.
3048  This way LyX will find the 
3049 \begin_inset Flex Code
3050 status collapsed
3051
3052 \begin_layout Plain Layout
3053 .bib
3054 \end_layout
3055
3056 \end_inset
3057
3058 -files and you can easily insert references without making the bibliography
3059  list visible.
3060 \end_layout
3061
3062 \begin_layout Standard
3063 As the bibliography list is in a comment, LaTeX won't use use it and the
3064  references will look like this: [?], instead of like this: [1].
3065  One solution is to use the LaTeX-package 
3066 \begin_inset Flex Code
3067 status collapsed
3068
3069 \begin_layout Plain Layout
3070 comment
3071 \end_layout
3072
3073 \end_inset
3074
3075  that will only include comments by processing the files separately.
3076  To do this, add in the LaTeX preamble of every subdocument the following:
3077 \end_layout
3078
3079 \begin_layout LyX-Code
3080
3081 \backslash
3082 usepackage{comment}
3083 \end_layout
3084
3085 \begin_layout LyX-Code
3086
3087 \backslash
3088 includecomment{comment}
3089 \end_layout
3090
3091 \begin_layout Standard
3092 See also 
3093 \begin_inset Flex URL
3094 status collapsed
3095
3096 \begin_layout Plain Layout
3097
3098 http://wiki.lyx.org/FAQ/Unsorted#toc31
3099 \end_layout
3100
3101 \end_inset
3102
3103 .
3104 \end_layout
3105
3106 \begin_layout Section
3107 Fancy Headers and Footers
3108 \end_layout
3109
3110 \begin_layout Standard
3111 The default page layout is rather plain; for an 
3112 \begin_inset Flex Code
3113 status collapsed
3114
3115 \begin_layout Plain Layout
3116 article
3117 \end_layout
3118
3119 \end_inset
3120
3121  document class, all you get is a centered page number at the bottom of
3122  the page.
3123  This document uses KOMA-script's book class, so it appears to be a bit
3124  fancier.
3125  But to really put on a show, you need to set the document page style to
3126  
3127 \begin_inset Quotes eld
3128 \end_inset
3129
3130 fancy
3131 \begin_inset Quotes erd
3132 \end_inset
3133
3134 , as mentioned in the 
3135 \emph on
3136 User Guide
3137 \emph default
3138 .
3139  This section describes the LaTeX code you need to insert in your LaTeX
3140  preamble in order to get the desired effects.
3141 \end_layout
3142
3143 \begin_layout Standard
3144 For more information on fancy headers, see the 
3145 \begin_inset Flex Code
3146 status collapsed
3147
3148 \begin_layout Plain Layout
3149 fancyhdr
3150 \end_layout
3151
3152 \end_inset
3153
3154  package documentation.
3155  (
3156 \begin_inset Flex URL
3157 status collapsed
3158
3159 \begin_layout Plain Layout
3160
3161 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3162 \end_layout
3163
3164 \end_inset
3165
3166 )
3167 \end_layout
3168
3169 \begin_layout Standard
3170 The page header is divided into three fields, not surprisingly labeled 
3171 \begin_inset Quotes eld
3172 \end_inset
3173
3174 left
3175 \begin_inset Quotes erd
3176 \end_inset
3177
3178
3179 \begin_inset Quotes eld
3180 \end_inset
3181
3182 center
3183 \begin_inset Quotes erd
3184 \end_inset
3185
3186 , and 
3187 \begin_inset Quotes eld
3188 \end_inset
3189
3190 right
3191 \begin_inset Quotes erd
3192 \end_inset
3193
3194 .
3195  The footer is also divided into these three fields.
3196  The LaTeX commands to set these fields in the simplest manner are 
3197 \begin_inset Flex Code
3198 status collapsed
3199
3200 \begin_layout Plain Layout
3201
3202 \backslash
3203 lhead
3204 \end_layout
3205
3206 \end_inset
3207
3208
3209 \begin_inset Flex Code
3210 status collapsed
3211
3212 \begin_layout Plain Layout
3213
3214 \backslash
3215 chead
3216 \end_layout
3217
3218 \end_inset
3219
3220
3221 \begin_inset Flex Code
3222 status collapsed
3223
3224 \begin_layout Plain Layout
3225
3226 \backslash
3227 rhead
3228 \end_layout
3229
3230 \end_inset
3231
3232
3233 \begin_inset Flex Code
3234 status collapsed
3235
3236 \begin_layout Plain Layout
3237
3238 \backslash
3239 lfoot
3240 \end_layout
3241
3242 \end_inset
3243
3244 , etc.
3245  Suppose you wish to put your name in the upper left hand corner of each
3246  page.
3247  Simply insert the following command in the preamble: 
3248 \end_layout
3249
3250 \begin_layout Standard
3251
3252 \family typewriter
3253
3254 \backslash
3255 lhead{John Q.
3256  DocWriter}
3257 \end_layout
3258
3259 \begin_layout Standard
3260 You will now see your name in the upper left.
3261  If a field has a default entry that you would like to get rid of (often
3262  the page number appears in the central footer, simply include a command
3263  with a blank argument, e.
3264 \begin_inset space \thinspace{}
3265 \end_inset
3266
3267 g.:
3268 \end_layout
3269
3270 \begin_layout Standard
3271
3272 \family typewriter
3273
3274 \backslash
3275 cfoot{}
3276 \end_layout
3277
3278 \begin_layout Standard
3279 Let's get really fancy: lets put the section number with the word 
3280 \begin_inset Quotes eld
3281 \end_inset
3282
3283 Section
3284 \begin_inset Quotes erd
3285 \end_inset
3286
3287  (e.
3288 \begin_inset space \thinspace{}
3289 \end_inset
3290
3291 g.
3292 \begin_inset space \space{}
3293 \end_inset
3294
3295 Section 3) in the upper left, the page number (e.
3296 \begin_inset space \thinspace{}
3297 \end_inset
3298
3299 g.
3300 \begin_inset space \space{}
3301 \end_inset
3302
3303 Page 4) in the upper right, your name in the lower left, and the date in
3304  the lower right.
3305  The following commands should now appear in the preamble:
3306 \end_layout
3307
3308 \begin_layout Standard
3309
3310 \family typewriter
3311
3312 \backslash
3313 lhead{Section 
3314 \backslash
3315 thesection}
3316 \end_layout
3317
3318 \begin_layout Standard
3319
3320 \family typewriter
3321
3322 \backslash
3323 chead{}
3324 \end_layout
3325
3326 \begin_layout Standard
3327
3328 \family typewriter
3329
3330 \backslash
3331 rhead{Page 
3332 \backslash
3333 thepage}
3334 \end_layout
3335
3336 \begin_layout Standard
3337
3338 \family typewriter
3339
3340 \backslash
3341 lfoot{John Q.
3342  DocWriter}
3343 \end_layout
3344
3345 \begin_layout Standard
3346
3347 \family typewriter
3348
3349 \backslash
3350 cfoot{}
3351 \end_layout
3352
3353 \begin_layout Standard
3354
3355 \family typewriter
3356
3357 \backslash
3358 rfoot{
3359 \backslash
3360 today}
3361 \end_layout
3362
3363 \begin_layout Standard
3364 The commands 
3365 \begin_inset Flex Code
3366 status collapsed
3367
3368 \begin_layout Plain Layout
3369
3370 \backslash
3371 thesection
3372 \end_layout
3373
3374 \end_inset
3375
3376  and 
3377 \begin_inset Flex Code
3378 status collapsed
3379
3380 \begin_layout Plain Layout
3381
3382 \backslash
3383 thepage
3384 \end_layout
3385
3386 \end_inset
3387
3388  access LaTeX's section and page counters, and so print out the current
3389  section and page numbers.
3390  
3391 \begin_inset Flex Code
3392 status collapsed
3393
3394 \begin_layout Plain Layout
3395
3396 \backslash
3397 today
3398 \end_layout
3399
3400 \end_inset
3401
3402  simply prints out today's date.
3403 \end_layout
3404
3405 \begin_layout Standard
3406 The thicknesses of the horizontal rules drawn beneath the header and above
3407  the footer can also be modified.
3408  If you don't want one of the rules, set its thickness to 0.
3409  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3410  Use commands
3411 \family typewriter
3412  
3413 \family default
3414 like 
3415 \begin_inset Flex Code
3416 status collapsed
3417
3418 \begin_layout Plain Layout
3419
3420 \backslash
3421 renewcommand{
3422 \backslash
3423 headrulewidth}{0.4pt}
3424 \end_layout
3425
3426 \end_inset
3427
3428  and 
3429 \begin_inset Flex Code
3430 status collapsed
3431
3432 \begin_layout Plain Layout
3433
3434 \backslash
3435 renewcommand{
3436 \backslash
3437 footrulewidth}{0.4pt}
3438 \end_layout
3439
3440 \end_inset
3441
3442  to set the thicknesses.
3443 \end_layout
3444
3445 \begin_layout Standard
3446 You can switch the header/footer settings on and off for individual pages
3447  using commands like 
3448 \begin_inset Flex Code
3449 status collapsed
3450
3451 \begin_layout Plain Layout
3452
3453 \backslash
3454 thispagestyle{empty}
3455 \end_layout
3456
3457 \end_inset
3458
3459
3460 \begin_inset Flex Code
3461 status collapsed
3462
3463 \begin_layout Plain Layout
3464
3465 \backslash
3466 thispagestyle{plain}
3467 \end_layout
3468
3469 \end_inset
3470
3471 , and 
3472 \begin_inset Flex Code
3473 status collapsed
3474
3475 \begin_layout Plain Layout
3476
3477 \backslash
3478 thispagestyle{fancy}
3479 \end_layout
3480
3481 \end_inset
3482
3483 .
3484  Simply insert them in the text on the page you want changed and mark them
3485  as TeX code.
3486  In fact, title pages are marked as plain by default, while following pages
3487  are marked fancy when using the global fancy setting.
3488 \end_layout
3489
3490 \begin_layout Standard
3491 As a final example, it is possible to include an image in the header or
3492  footer.
3493  Suppose you want to put a company logo in the upper lefthand corner.
3494  You might try something like
3495 \end_layout
3496
3497 \begin_layout Standard
3498
3499 \family typewriter
3500
3501 \backslash
3502 lhead{
3503 \backslash
3504 resizebox{1in}{!}{
3505 \backslash
3506 includegraphics{logo.eps}}}
3507 \end_layout
3508
3509 \begin_layout Standard
3510 \noindent
3511 (you may need to preface this with 
3512 \begin_inset Flex Code
3513 status collapsed
3514
3515 \begin_layout Plain Layout
3516 \noindent
3517
3518 \backslash
3519 usepackage{graphics}
3520 \end_layout
3521
3522 \end_inset
3523
3524  if you don't include graphics elsewhere in your document).
3525 \end_layout
3526
3527 \begin_layout Section
3528 Itemize Bullet Selection
3529 \begin_inset CommandInset label
3530 LatexCommand label
3531 name "sec:bullet"
3532
3533 \end_inset
3534
3535
3536 \end_layout
3537
3538 \begin_layout Standard
3539 by
3540 \noun on
3541  Allan Rae
3542 \end_layout
3543
3544 \begin_layout Subsection
3545 Introduction
3546 \end_layout
3547
3548 \begin_layout Standard
3549 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3550  Using this dialog you can easily specify what bullet shape to use at each
3551  level of an itemized list.
3552  These settings are document-wide so you won't be able to specify different
3553  sets of bullets for different paragraphs.
3554 \begin_inset Foot
3555 status collapsed
3556
3557 \begin_layout Plain Layout
3558 Well, actually you can but you'll have to do it by hand.
3559 \end_layout
3560
3561 \end_inset
3562
3563
3564 \end_layout
3565
3566 \begin_layout Subsection
3567 How it looks
3568 \end_layout
3569
3570 \begin_layout Standard
3571 Open the dialog by selecting the 
3572 \begin_inset Flex MenuItem
3573 status collapsed
3574
3575 \begin_layout Plain Layout
3576 Document\SpecialChar \menuseparator
3577 Settings
3578 \end_layout
3579
3580 \end_inset
3581
3582  menu item and then select the 
3583 \begin_inset Flex MenuItem
3584 status collapsed
3585
3586 \begin_layout Plain Layout
3587 Bullets
3588 \end_layout
3589
3590 \end_inset
3591
3592  tab.
3593 \end_layout
3594
3595 \begin_layout Standard
3596 The dialog provides you with a table of bullet shapes.
3597  A column of buttons on the left of the table provides access to the six
3598  different panels of bullet shapes.
3599  The row of buttons across the top is used to select which bullet depth
3600  you are changing.
3601  A text entry under the table shows the currently selected bullet shape's
3602  LaTeX equivalent and this can be edited if desired.
3603  If you do modify the text you will also need to specify any needed packages
3604  in the LaTeX preamble.
3605 \end_layout
3606
3607 \begin_layout Standard
3608 The six panels are divided up by the packages they require.
3609  The following table shows the mappings from button name to LaTeX packages.
3610 \end_layout
3611
3612 \begin_layout Standard
3613 \align center
3614 \begin_inset Tabular
3615 <lyxtabular version="3" rows="7" columns="2">
3616 <features tabularvalignment="middle">
3617 <column alignment="center" valignment="top" width="0pt">
3618 <column alignment="center" valignment="top" width="0pt">
3619 <row>
3620 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3621 \begin_inset Text
3622
3623 \begin_layout Plain Layout
3624
3625 \family roman
3626 \series medium
3627 \shape up
3628 \size normal
3629 \emph off
3630 \bar no
3631 \noun off
3632 \color none
3633 Button
3634 \end_layout
3635
3636 \end_inset
3637 </cell>
3638 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3639 \begin_inset Text
3640
3641 \begin_layout Plain Layout
3642
3643 \family roman
3644 \series medium
3645 \shape up
3646 \size normal
3647 \emph off
3648 \bar no
3649 \noun off
3650 \color none
3651 Packages Required
3652 \end_layout
3653
3654 \end_inset
3655 </cell>
3656 </row>
3657 <row>
3658 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3659 \begin_inset Text
3660
3661 \begin_layout Plain Layout
3662
3663 \family sans
3664 \series medium
3665 \shape up
3666 \size normal
3667 \emph off
3668 \bar no
3669 \noun off
3670 \color none
3671 Standard
3672 \end_layout
3673
3674 \end_inset
3675 </cell>
3676 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3677 \begin_inset Text
3678
3679 \begin_layout Plain Layout
3680
3681 \series medium
3682 \shape up
3683 \size normal
3684 \emph off
3685 \bar no
3686 \noun off
3687 \color none
3688 base LaTeX
3689 \end_layout
3690
3691 \end_inset
3692 </cell>
3693 </row>
3694 <row>
3695 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3696 \begin_inset Text
3697
3698 \begin_layout Plain Layout
3699
3700 \family sans
3701 \series medium
3702 \shape up
3703 \size normal
3704 \emph off
3705 \bar no
3706 \noun off
3707 \color none
3708 Maths
3709 \end_layout
3710
3711 \end_inset
3712 </cell>
3713 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3714 \begin_inset Text
3715
3716 \begin_layout Plain Layout
3717
3718 \family typewriter
3719 \series medium
3720 \shape up
3721 \size normal
3722 \emph off
3723 \bar no
3724 \noun off
3725 \color none
3726 amssymb.sty
3727 \end_layout
3728
3729 \end_inset
3730 </cell>
3731 </row>
3732 <row>
3733 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3734 \begin_inset Text
3735
3736 \begin_layout Plain Layout
3737
3738 \family sans
3739 \series medium
3740 \shape up
3741 \size normal
3742 \emph off
3743 \bar no
3744 \noun off
3745 \color none
3746 Ding1
3747 \end_layout
3748
3749 \end_inset
3750 </cell>
3751 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3752 \begin_inset Text
3753
3754 \begin_layout Plain Layout
3755
3756 \family typewriter
3757 \series medium
3758 \shape up
3759 \size normal
3760 \emph off
3761 \bar no
3762 \noun off
3763 \color none
3764 pifont.sty
3765 \end_layout
3766
3767 \end_inset
3768 </cell>
3769 </row>
3770 <row>
3771 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3772 \begin_inset Text
3773
3774 \begin_layout Plain Layout
3775
3776 \family sans
3777 \series medium
3778 \shape up
3779 \size normal
3780 \emph off
3781 \bar no
3782 \noun off
3783 \color none
3784 Ding2
3785 \end_layout
3786
3787 \end_inset
3788 </cell>
3789 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3790 \begin_inset Text
3791
3792 \begin_layout Plain Layout
3793
3794 \family typewriter
3795 \series medium
3796 \shape up
3797 \size normal
3798 \emph off
3799 \bar no
3800 \noun off
3801 \color none
3802 pifont.sty
3803 \end_layout
3804
3805 \end_inset
3806 </cell>
3807 </row>
3808 <row>
3809 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3810 \begin_inset Text
3811
3812 \begin_layout Plain Layout
3813
3814 \family sans
3815 \series medium
3816 \shape up
3817 \size normal
3818 \emph off
3819 \bar no
3820 \noun off
3821 \color none
3822 Ding3
3823 \end_layout
3824
3825 \end_inset
3826 </cell>
3827 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3828 \begin_inset Text
3829
3830 \begin_layout Plain Layout
3831
3832 \family typewriter
3833 \series medium
3834 \shape up
3835 \size normal
3836 \emph off
3837 \bar no
3838 \noun off
3839 \color none
3840 pifont.sty
3841 \end_layout
3842
3843 \end_inset
3844 </cell>
3845 </row>
3846 <row>
3847 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3848 \begin_inset Text
3849
3850 \begin_layout Plain Layout
3851
3852 \family sans
3853 \series medium
3854 \shape up
3855 \size normal
3856 \emph off
3857 \bar no
3858 \noun off
3859 \color none
3860 Ding4
3861 \end_layout
3862
3863 \end_inset
3864 </cell>
3865 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3866 \begin_inset Text
3867
3868 \begin_layout Plain Layout
3869
3870 \family typewriter
3871 \series medium
3872 \shape up
3873 \size normal
3874 \emph off
3875 \bar no
3876 \noun off
3877 \color none
3878 pifont.sty
3879 \end_layout
3880
3881 \end_inset
3882 </cell>
3883 </row>
3884 </lyxtabular>
3885
3886 \end_inset
3887
3888
3889 \end_layout
3890
3891 \begin_layout Standard
3892 LyX doesn't stop you using bullets from packages you don't have.
3893  If you get errors from LaTeX when you try to view or print the file, then
3894  it is likely you are missing a package.
3895 \begin_inset Foot
3896 status collapsed
3897
3898 \begin_layout Plain Layout
3899 LyX doesn't restrict your use since you may be editing locally and exporting
3900  elsewhere.
3901 \end_layout
3902
3903 \end_inset
3904
3905
3906 \end_layout
3907
3908 \begin_layout Subsection
3909 How to use it
3910 \end_layout
3911
3912 \begin_layout Standard
3913 Select which bullet depth you want to change then select the bullet shape
3914  and size.
3915  Any changes will not be visible in LyX, but are visible when viewing the
3916  document.
3917 \end_layout
3918
3919 \begin_layout Standard
3920 You can reset a bullet shape to the default simply by clicking your right
3921  mouse button on the appropriate bullet depth button.
3922 \begin_inset Foot
3923 status collapsed
3924
3925 \begin_layout Plain Layout
3926 If you 
3927 \emph on
3928 really
3929 \emph default
3930  want to have multiple sets of paragraphs with different sets of bullets
3931  in each, then you're going to have to get your hands dirty with TeX code.
3932  The bullet selection dialog can help though because it provides you with
3933  the LaTeX code for a wide range of bullet shapes.
3934  To make your own custom paragraphs you have the following options:
3935 \end_layout
3936
3937 \begin_layout Plain Layout
3938 \begin_inset ERT
3939 status open
3940
3941 \begin_layout Plain Layout
3942
3943
3944 \backslash
3945 let
3946 \backslash
3947 savelabelitemi=
3948 \backslash
3949 labelitemi
3950 \end_layout
3951
3952 \end_inset
3953
3954
3955 \end_layout
3956
3957 \begin_layout Plain Layout
3958 \begin_inset ERT
3959 status open
3960
3961 \begin_layout Plain Layout
3962
3963
3964 \backslash
3965 renewcommand
3966 \backslash
3967 labelitemi[0]{
3968 \backslash
3969 small
3970 \backslash
3971 (
3972 \backslash
3973 sharp
3974 \backslash
3975 )}
3976 \end_layout
3977
3978 \end_inset
3979
3980
3981 \end_layout
3982
3983 \begin_layout Itemize
3984 Use the LaTeX command 
3985 \begin_inset Flex Code
3986 status collapsed
3987
3988 \begin_layout Plain Layout
3989
3990 \backslash
3991 renewcommand{}{}
3992 \end_layout
3993
3994 \end_inset
3995
3996  to specify a new bullet shape for a given depth.
3997  You'll also need to save the current bullet shape so you can restore it
3998  again afterwards.
3999  In this itemized list the following LaTeX code was used to change the bullet
4000  used for the first depth.
4001 \end_layout
4002
4003 \begin_deeper
4004 \begin_layout LyX-Code
4005
4006 \backslash
4007 let
4008 \backslash
4009 savelabelitemi=
4010 \backslash
4011 labelitemi 
4012 \end_layout
4013
4014 \begin_layout LyX-Code
4015
4016 \backslash
4017 renewcommand
4018 \backslash
4019 labelitemi[0]{
4020 \backslash
4021 small
4022 \backslash
4023 (
4024 \backslash
4025 sharp
4026 \backslash
4027 )}
4028 \end_layout
4029
4030 \end_deeper
4031 \begin_layout Itemize
4032 Note that the itemize depth is specified in Roman numerals as part of the
4033  
4034 \family typewriter
4035
4036 \backslash
4037 labelitem
4038 \family default
4039  command.
4040 \end_layout
4041
4042 \begin_layout Itemize
4043 \begin_inset ERT
4044 status open
4045
4046 \begin_layout Plain Layout
4047
4048 [
4049 \backslash
4050 (
4051 \backslash
4052 star
4053 \backslash
4054 )]
4055 \end_layout
4056
4057 \end_inset
4058
4059  Specify each individual entry by starting each item with the bullet shape
4060  enclosed in square brackets and set as 
4061 \begin_inset Flex MenuItem
4062 status collapsed
4063
4064 \begin_layout Plain Layout
4065 TeX Code
4066 \end_layout
4067
4068 \end_inset
4069
4070 .
4071  For example, this item was started with 
4072 \begin_inset Flex Code
4073 status collapsed
4074
4075 \begin_layout Plain Layout
4076 [
4077 \backslash
4078 (
4079 \backslash
4080 star
4081 \backslash
4082 )]
4083 \end_layout
4084
4085 \end_inset
4086
4087 .
4088 \end_layout
4089
4090 \begin_layout Plain Layout
4091 \begin_inset ERT
4092 status open
4093
4094 \begin_layout Plain Layout
4095
4096
4097 \backslash
4098 renewcommand
4099 \backslash
4100 labelitemi[0]{
4101 \backslash
4102 savelabelitemi}
4103 \end_layout
4104
4105 \end_inset
4106
4107
4108 \end_layout
4109
4110 \begin_layout Plain Layout
4111 You'll also need to revert the labelitem back to its previous setting for
4112  the global bullet shape settings to remain in effect.
4113  The way used here was:
4114 \end_layout
4115
4116 \begin_layout LyX-Code
4117
4118 \backslash
4119 renewcommand
4120 \backslash
4121 labelitemi[0]{
4122 \backslash
4123 savelabelitemi}
4124 \end_layout
4125
4126 \end_inset
4127
4128
4129 \end_layout
4130
4131 \begin_layout Chapter
4132 LyX and the World Wide Web
4133 \end_layout
4134
4135 \begin_layout Standard
4136 LyX has long supported the export of documents to various web-friendly formats,
4137  such as HTML.
4138  Before verson 2.0, however, HTML export was always accomplished by the use
4139  of external converters.
4140 \begin_inset Foot
4141 status collapsed
4142
4143 \begin_layout Plain Layout
4144 For details on the use of external converters with LyX, see the 
4145 \emph on
4146 Converters
4147 \emph default
4148  section of the Customization manual.
4149 \end_layout
4150
4151 \end_inset
4152
4153  These fall into two large groups: there are converters that use LaTeX as
4154  an intermediate format, such as 
4155 \begin_inset Flex Code
4156 status collapsed
4157
4158 \begin_layout Plain Layout
4159 htlatex
4160 \end_layout
4161
4162 \end_inset
4163
4164
4165 \begin_inset Flex Code
4166 status collapsed
4167
4168 \begin_layout Plain Layout
4169 html2latex
4170 \end_layout
4171
4172 \end_inset
4173
4174 , and 
4175 \begin_inset Flex Code
4176 status collapsed
4177
4178 \begin_layout Plain Layout
4179 plastex
4180 \end_layout
4181
4182 \end_inset
4183
4184 , relying upon LyX to produce the LaTeX; and there is a converter that works
4185  directly on LyX files, 
4186 \begin_inset Flex Code
4187 status collapsed
4188
4189 \begin_layout Plain Layout
4190 eLyXer
4191 \end_layout
4192
4193 \end_inset
4194
4195 .
4196  All of these have different advantages and disadvantages.
4197  
4198 \end_layout
4199
4200 \begin_layout Standard
4201 The LaTeX-based converters have the advantage that, in principle, they know
4202  everything about the exported document that LaTeX does.
4203  Such converters do not care, for example, if a certain block of code was
4204  produced by LyX or was Evil Red Text.
4205  These converters know about 
4206 \begin_inset Flex Code
4207 status collapsed
4208
4209 \begin_layout Plain Layout
4210 aux
4211 \end_layout
4212
4213 \end_inset
4214
4215  files, counters, and references, and can often make use of the 
4216 \begin_inset Flex Code
4217 status collapsed
4218
4219 \begin_layout Plain Layout
4220 bbl
4221 \end_layout
4222
4223 \end_inset
4224
4225  files generated by BibTeX.
4226  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4227  said that only TeX itself understands TeX---and LaTeX-based converters
4228  will often choke on what seem to be quite simple constructs; complex ones
4229  can throw them completely, and as of this writing, for example, the 
4230 \emph on
4231 Embedded Objects
4232 \emph default
4233  manual will not export with 
4234 \begin_inset Flex Code
4235 status collapsed
4236
4237 \begin_layout Plain Layout
4238 htlatex
4239 \end_layout
4240
4241 \end_inset
4242
4243 , though the others will.
4244  The other issue concerns how math is handled.
4245  These converters typically convert the formulae into little pictures that
4246  are then linked from the HTML document.
4247  Since these are actually generated by LaTeX, they are accurate.
4248  But they do not scale well, and just getting them to look as if they are
4249  actually meant to be in your document---so that the font sizes seem to
4250  be roughly the same---can be a challenge.
4251 \end_layout
4252
4253 \begin_layout Standard
4254 Alex Fernandez's 
4255 \begin_inset Flex Code
4256 status collapsed
4257
4258 \begin_layout Plain Layout
4259 eLyXer
4260 \end_layout
4261
4262 \end_inset
4263
4264  solves some of these problems.
4265  In particular, its rendering of math tends to look better than 
4266 \begin_inset Flex Code
4267 status collapsed
4268
4269 \begin_layout Plain Layout
4270 htlatex
4271 \end_layout
4272
4273 \end_inset
4274
4275 's, at least in simpler cases, since it renders math using a combination
4276  of HTML and CSS rather than converting the formulae to images.
4277  But more complex formula tend to be rendered less well than with 
4278 \begin_inset Flex Code
4279 status collapsed
4280
4281 \begin_layout Plain Layout
4282 htlatex
4283 \end_layout
4284
4285 \end_inset
4286
4287 , since there is no reasonable way of scaling parentheses in HTML, for example.
4288  More importantly (as of version 0.39, at least), 
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  has no support for math macros, for user-defined paragraph or character
4299  styles, or for tables of contents and figures, and its treatment of cross-refer
4300 ences is minimal.
4301  These limitations make 
4302 \begin_inset Flex Code
4303 status collapsed
4304
4305 \begin_layout Plain Layout
4306 eLyXer
4307 \end_layout
4308
4309 \end_inset
4310
4311  unsuitable for many of the documents more advanced LyX users would produce.
4312  In principle, of course, all of these problems could be solved, but the
4313  LyX developers have decided to follow a different path and have made LyX
4314  itself capable of writing XHTML, just as it is capable of writing LaTeX,
4315  DocBook, and plaintext.
4316 \end_layout
4317
4318 \begin_layout Standard
4319 As of this writing, XHTML output remains under development and should probably
4320  be regarded as 
4321 \begin_inset Quotes eld
4322 \end_inset
4323
4324 experimental
4325 \begin_inset Quotes erd
4326 \end_inset
4327
4328 .
4329 \begin_inset Foot
4330 status collapsed
4331
4332 \begin_layout Plain Layout
4333 The file 
4334 \begin_inset Flex Code
4335 status collapsed
4336
4337 \begin_layout Plain Layout
4338 development/HTML.notes
4339 \end_layout
4340
4341 \end_inset
4342
4343 , which can be found in the LyX source tree or 
4344 \begin_inset CommandInset href
4345 LatexCommand href
4346 name "accessed online"
4347 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4348
4349 \end_inset
4350
4351 , usually contains up-to-date information about the state of XHTML output.
4352 \end_layout
4353
4354 \end_inset
4355
4356  Still, the developers have chosen this approach because it has several
4357  potential advantages over the other two.
4358 \end_layout
4359
4360 \begin_layout Standard
4361 These advantages are primarily due to the fact that the XHTML output routines,
4362  since they are part of LyX, know everything LyX knows about the document
4363  being exported.
4364 \begin_inset Foot
4365 status collapsed
4366
4367 \begin_layout Plain Layout
4368 Another advantege is that, since these routines are internal to LyX, they
4369  are immune to changes in LyX's file format, or to changes in the semantics
4370  of existing insets.
4371 \end_layout
4372
4373 \end_inset
4374
4375  So they know about the table of contents (as displayed in the outline),
4376  about the counters associated with different paragraph styles, and about
4377  user-defined styles.
4378  The XHTML output routines know what LyX knows about internationalization,
4379  too, so they will output 
4380 \begin_inset Quotes eld
4381 \end_inset
4382
4383 Chapter 1
4384 \begin_inset Quotes erd
4385 \end_inset
4386
4387  or 
4388 \begin_inset Quotes eld
4389 \end_inset
4390
4391
4392 \lang ngerman
4393 Kapitel
4394 \lang english
4395  1
4396 \begin_inset Quotes erd
4397 \end_inset
4398
4399 , depending upon the language in effect at the time.
4400  
4401 \end_layout
4402
4403 \begin_layout Standard
4404 Quite generally, the output routines know everything LyX knows about document
4405  layout, that is, about how the document is to be rendered on screen.
4406  We use this information when we output the document as XHTML.
4407  In particular, LyX 
4408 \emph on
4409 automatically
4410 \emph default
4411  generates CSS style information corresponding to the layout information
4412  it uses to render the document on screen: if section headings are supposed
4413  to be sans-serif and bold as seen in LyX, then (by default) they will be
4414  sans-serif and bold when viewed in a web browser, too.
4415  And this is true not just for pre-defined styles, like Section, but for
4416  any style, including user-defined styles.
4417  Indeed, the XHTML output routines make no distinction between user-defined
4418  paragraph and character styles and LyX's own pre-defined styles: in each
4419  case, everything LyX knows about the styles is contained in the layout
4420  files.
4421  And much the same is true as regards pre-defined textual insets, such as
4422  footnotes, and various custom insets.
4423  
4424 \end_layout
4425
4426 \begin_layout Standard
4427 The result is that XHTML output can be customized and extended in 
4428 \emph on
4429 exactly
4430 \emph default
4431  the same way LaTeX output can be customized and extended: through layout
4432  files and modules.
4433  See chapter five of the 
4434 \emph on
4435 Customization 
4436 \emph default
4437 manual for the details.
4438 \end_layout
4439
4440 \begin_layout Standard
4441 The remainder of this chapter contains more detailed information on XHTML
4442  output, its limitations, and ways to work around those limitations.
4443 \end_layout
4444
4445 \begin_layout Section
4446 Math Output in XHTML
4447 \end_layout
4448
4449 \begin_layout Standard
4450 LyX offers four choices for how math is rendered.
4451  These have various advantages and disadvantages:
4452 \end_layout
4453
4454 \begin_layout Itemize
4455 MathML
4456 \begin_inset Newline newline
4457 \end_inset
4458
4459 MathML is a dialect of XML designed specifically for mathematics on the
4460  web, and it typically renders very well in browsers that support it.
4461  The disadvantage is that not all browsers support MathML, and support is
4462  not complete even in the Gecko-based browsers, such as Firefox.
4463 \begin_inset Newline newline
4464 \end_inset
4465
4466 If Lyx is unable to render a formula as MathML---for example, if the formula
4467  uses the 
4468 \begin_inset Flex Code
4469 status collapsed
4470
4471 \begin_layout Plain Layout
4472 xymatrix
4473 \end_layout
4474
4475 \end_inset
4476
4477  package or ERT---then it will instead output the formula as an image.
4478  
4479 \end_layout
4480
4481 \begin_layout Itemize
4482 HTML
4483 \begin_inset Newline newline
4484 \end_inset
4485
4486 As mentioned above, 
4487 \begin_inset Flex Code
4488 status collapsed
4489
4490 \begin_layout Plain Layout
4491 elyxer
4492 \end_layout
4493
4494 \end_inset
4495
4496  outputs math as HTML, styled by CSS.
4497 \begin_inset Foot
4498 status collapsed
4499
4500 \begin_layout Plain Layout
4501 LyX has borrowed some of the CSS for its HTML output from 
4502 \begin_inset Flex Code
4503 status collapsed
4504
4505 \begin_layout Plain Layout
4506 elyxer
4507 \end_layout
4508
4509 \end_inset
4510
4511 .
4512 \end_layout
4513
4514 \end_inset
4515
4516  For simple formulae, this can work quite well, though with more complicated
4517  formulae it tends to break down.
4518  Still, this method has the advantage that it is very widely supported and
4519  so it may be appropriate for documents that contain only a little, fairly
4520  simple math.
4521 \begin_inset Newline newline
4522 \end_inset
4523
4524 If Lyx is unable to render a formula as MathML---for example, if the formula
4525  uses the 
4526 \begin_inset Flex Code
4527 status collapsed
4528
4529 \begin_layout Plain Layout
4530 xymatrix
4531 \end_layout
4532
4533 \end_inset
4534
4535  package or ERT---then it will instead output the formula as an image.
4536  
4537 \end_layout
4538
4539 \begin_layout Itemize
4540 Images
4541 \begin_inset Newline newline
4542 \end_inset
4543
4544 Like 
4545 \begin_inset Flex Code
4546 status collapsed
4547
4548 \begin_layout Plain Layout
4549 htlatex
4550 \end_layout
4551
4552 \end_inset
4553
4554 , LyX will output formulae as images, the very same images, in fact, that
4555  are used for instant preview.
4556 \begin_inset Foot
4557 status collapsed
4558
4559 \begin_layout Plain Layout
4560 Instant preview does 
4561 \emph on
4562 not 
4563 \emph default
4564 have to be on for images to be output, however.
4565 \end_layout
4566
4567 \end_inset
4568
4569  The advantage to this method is that the images are simply generated by
4570  LaTeX, so they are very accurate.
4571  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4572  so they do not scale terribly well, and one cannot copy them, etc.
4573 \begin_inset Newline newline
4574 \end_inset
4575
4576 The size of the images can be controlled by setting the 
4577 \begin_inset Quotes eld
4578 \end_inset
4579
4580 Math Images Scaling
4581 \begin_inset Quotes erd
4582 \end_inset
4583
4584  parameter under 
4585 \begin_inset Flex MenuItem
4586 status collapsed
4587
4588 \begin_layout Plain Layout
4589 Document\SpecialChar \menuseparator
4590 Settings\SpecialChar \menuseparator
4591 Output
4592 \end_layout
4593
4594 \end_inset
4595
4596 .
4597 \begin_inset Foot
4598 status collapsed
4599
4600 \begin_layout Plain Layout
4601 For those who want to know, this controls the resolution of the image in
4602  dots per inch and is based upon a default of 75 dpi.
4603 \end_layout
4604
4605 \end_inset
4606
4607
4608 \begin_inset Newline newline
4609 \end_inset
4610
4611 If LyX for some reason fails to create an image for a formula (e.g., if a
4612  required LaTeX package is not installed), then it will fall back to outputing
4613  the raw LaTeX.
4614 \end_layout
4615
4616 \begin_layout Itemize
4617 LaTeX
4618 \begin_inset Newline newline
4619 \end_inset
4620
4621 Finally, LyX will happily output math as LaTeX.
4622  As well as being the output of last resort, this method can be used with
4623  such tools as 
4624 \begin_inset CommandInset href
4625 LatexCommand href
4626 name "jsMath"
4627 target "http://www.math.union.edu/~dpvc/jsMath/"
4628
4629 \end_inset
4630
4631 , which uses JavaScript to render LaTeX embedded in HTML documents.
4632  LyX wraps the LaTeX in either a 
4633 \begin_inset Flex Code
4634 status collapsed
4635
4636 \begin_layout Plain Layout
4637 span
4638 \end_layout
4639
4640 \end_inset
4641
4642  (for inline formulas) or 
4643 \begin_inset Flex Code
4644 status collapsed
4645
4646 \begin_layout Plain Layout
4647 div
4648 \end_layout
4649
4650 \end_inset
4651
4652  (for displayed formulas) with 
4653 \begin_inset Flex Code
4654 status collapsed
4655
4656 \begin_layout Plain Layout
4657 class='math'
4658 \end_layout
4659
4660 \end_inset
4661
4662 , as is required for jsMath.
4663 \end_layout
4664
4665 \begin_layout Standard
4666 One of these output methods must be selected under 
4667 \begin_inset Flex MenuItem
4668 status collapsed
4669
4670 \begin_layout Plain Layout
4671 Document\SpecialChar \menuseparator
4672 Settings\SpecialChar \menuseparator
4673 Output
4674 \end_layout
4675
4676 \end_inset
4677
4678 .
4679  By default, LyX outputs MathML.
4680  This is a document-wide setting, therefore.
4681 \end_layout
4682
4683 \begin_layout Standard
4684 Eventually, LyX will offer the user the option to select an alternate output
4685  method for a particular inset, say, one that isn't being rendered very
4686  well by MathML.
4687 \begin_inset Foot
4688 status collapsed
4689
4690 \begin_layout Plain Layout
4691 That said, since LyX falls back to images if the inset contains ERT, then
4692  one can force output as an image by putting some harmless ERT into the
4693  math, for example: 
4694 \begin_inset Formula $a=b\relax$
4695 \end_inset
4696
4697 .
4698 \end_layout
4699
4700 \end_inset
4701
4702
4703 \end_layout
4704
4705 \begin_layout Section
4706 Bibliography and Citations
4707 \end_layout
4708
4709 \begin_layout Standard
4710 XHTML output fully supports bibliographies and citations.
4711  
4712 \end_layout
4713
4714 \begin_layout Standard
4715 Citation labels are generated by the same machinery that generates LyX's
4716  on-screen labels, so the labels will look in the output much as they do
4717  in LyX, though better.
4718  If you are using numerical citations, then LyX will output numerical labels,
4719  such as [1] or [17], rather than simply showing the citation key in square
4720  brackets, as it does on-screen.
4721  If you are using author-year citations, then LyX will add lowercase letters
4722  to the years, just as BibTeX does, if it finds more than one citation for
4723  a given author-year combination.
4724  The labels will be printed with the bibliography entries.
4725  Note that there is, at present, no way to customize the appearance of the
4726  labels, for example, to choose between square brackets and parentheses.
4727 \end_layout
4728
4729 \begin_layout Standard
4730 Bibliography output is handled by the same machinery that handles the presentati
4731 on of reference information in the citation dialog, so you will see in the
4732  XHTML output pretty much what you would see if you were to look at a given
4733  entry in the citation dialog.
4734  The formatting can be customized in your layout file or, preferably, in
4735  a module.
4736  See the 
4737 \emph on
4738 Customization
4739 \emph default
4740  manual for the details.
4741 \end_layout
4742
4743 \begin_layout Standard
4744 The main defect at present is that cross-referenced information is printed
4745  with every entry with which it is associated.
4746  So you can see things like this:
4747 \end_layout
4748
4749 \begin_layout Quote
4750 Jason Stanley, 
4751 \begin_inset Quotes eld
4752 \end_inset
4753
4754 Context and Logical Form
4755 \begin_inset Quotes erd
4756 \end_inset
4757
4758 , in 
4759 \emph on
4760 Language in Context: Selected Essays
4761 \emph default
4762  (Oxford: Oxford University Press, 2007), pp.
4763  30--68.
4764 \end_layout
4765
4766 \begin_layout Quote
4767 Jason Stanley, 
4768 \begin_inset Quotes eld
4769 \end_inset
4770
4771 Semantics in Context
4772 \begin_inset Quotes erd
4773 \end_inset
4774
4775 , in 
4776 \emph on
4777 Language in Context: Selected Essays
4778 \emph default
4779  (Oxford: Oxford University Press, 2007), pp.
4780  201--30.
4781 \end_layout
4782
4783 \begin_layout Standard
4784 This should be fixed before long.
4785 \end_layout
4786
4787 \begin_layout Standard
4788 There is no support at present for sectioned bibliographies.
4789  If you have multiple bibliographies, then LyX will print the same bibliography
4790  over and over.
4791 \end_layout
4792
4793 \begin_layout Section
4794 Indexes
4795 \end_layout
4796
4797 \begin_layout Standard
4798 LyX will happily export indexes as XHTML, but with certain limitations at
4799  the moment.
4800 \end_layout
4801
4802 \begin_layout Standard
4803 Index export will be most reliable when you do not attempt to use the fancy
4804  constructs that are described in the section on indexes in the 
4805 \emph on
4806 User's Guide
4807 \emph default
4808 .
4809 \begin_inset Foot
4810 status collapsed
4811
4812 \begin_layout Plain Layout
4813 The main issue here is that LyX itself does not really handle these.
4814  It just lets you enter what you would have to enter in raw LaTeX.
4815 \end_layout
4816
4817 \end_inset
4818
4819  We'll describe how they are handled using the subsection headings from
4820  that section.
4821 \end_layout
4822
4823 \begin_layout Itemize
4824 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4825  these, but the entries must be separated by 
4826 \begin_inset Quotes eld
4827 \end_inset
4828
4829  ! 
4830 \begin_inset Quotes erd
4831 \end_inset
4832
4833 , that is, there must be spaces around the exclamation point.
4834  This is because it is otherwise too difficult to check for escaped exclamation
4835  points, ones in math, and so forth.
4836 \end_layout
4837
4838 \begin_layout Itemize
4839 Page Ranges: There is no support at all for page ranges, since these make
4840  no sense with XHMTL.
4841  Instead, you will just get two index entries, one at either end.
4842 \end_layout
4843
4844 \begin_layout Itemize
4845 Cross-referencing: There is no support for cross-referencing.
4846  If LyX finds an entry containing the 
4847 \begin_inset Quotes eld
4848 \end_inset
4849
4850 |see\SpecialChar \ldots{}
4851
4852 \begin_inset Quotes erd
4853 \end_inset
4854
4855  construct, it is just dropped, and the rest is treated as an ordinary index
4856  entry.
4857 \end_layout
4858
4859 \begin_layout Itemize
4860 Index Entry Order: LyX does support attempts to fix the sorting order.
4861  It will take what is before the first `@' it finds and use that for sorting,
4862  taking what follows the first `@' to be the actual entry.
4863  At present, LyX does not check for escaped `@', so do not try to index
4864  email addresses.
4865 \end_layout
4866
4867 \begin_layout Itemize
4868 Index Entry Layout: You can format entries by using the text style dialog,
4869  or by using any other method available within LyX itself.
4870  There is no support for constructs like: 
4871 \begin_inset Quotes eld
4872 \end_inset
4873
4874 entry|textbf
4875 \begin_inset Quotes erd
4876 \end_inset
4877
4878 .
4879  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
4880  and everything that follows it.
4881 \end_layout
4882
4883 \begin_layout Itemize
4884 Multiple Indexes: There is no support for multiple indexes.
4885  Rather, all index entries will be printed as one large index.
4886  To avoid our printing several versions of the index, we print only the
4887  main index, so make sure you have one.
4888 \end_layout
4889
4890 \begin_layout Section
4891 Nomenclature and Glossary
4892 \end_layout
4893
4894 \begin_layout Standard
4895 There is at present no support for glossaries.
4896 \end_layout
4897
4898 \begin_layout Chapter
4899 The LyX Server
4900 \end_layout
4901
4902 \begin_layout Section
4903 Introduction
4904 \end_layout
4905
4906 \begin_layout Standard
4907 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4908  and retrieve information about the LyX internal state.
4909  This is only intended for advanced users, but they should find it useful.
4910  It is by writing to the LyX server, for example, that bibliography managers,
4911  such as JabRef, are able to 
4912 \begin_inset Quotes eld
4913 \end_inset
4914
4915 push
4916 \begin_inset Quotes erd
4917 \end_inset
4918
4919  citations to LyX.
4920 \end_layout
4921
4922 \begin_layout Section
4923 Starting the LyX Server
4924 \end_layout
4925
4926 \begin_layout Standard
4927 The LyX server works through the use of a pair of named pipes.
4928  These are usually located in 
4929 \begin_inset Flex Code
4930 status collapsed
4931
4932 \begin_layout Plain Layout
4933 UserDir
4934 \end_layout
4935
4936 \end_inset
4937
4938 , (except on Windows, where 
4939 \emph on
4940 local
4941 \emph default
4942  named pipes are special objects located in 
4943 \begin_inset Flex Code
4944 status collapsed
4945
4946 \begin_layout Plain Layout
4947
4948 \backslash
4949
4950 \backslash
4951 .
4952 \backslash
4953 pipe
4954 \end_layout
4955
4956 \end_inset
4957
4958 ) and have the names 
4959 \begin_inset Quotes eld
4960 \end_inset
4961
4962
4963 \begin_inset Flex Code
4964 status collapsed
4965
4966 \begin_layout Plain Layout
4967 lyxpipe.in
4968 \end_layout
4969
4970 \end_inset
4971
4972
4973 \begin_inset Quotes erd
4974 \end_inset
4975
4976  and 
4977 \begin_inset Quotes eld
4978 \end_inset
4979
4980
4981 \begin_inset Flex Code
4982 status collapsed
4983
4984 \begin_layout Plain Layout
4985 lyxpipe.out
4986 \end_layout
4987
4988 \end_inset
4989
4990
4991 \begin_inset Quotes erd
4992 \end_inset
4993
4994 .
4995  External programs write into 
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  and read back data from 
5006 \begin_inset Flex Code
5007 status collapsed
5008
5009 \begin_layout Plain Layout
5010 lyxpipe.out
5011 \end_layout
5012
5013 \end_inset
5014
5015 .
5016  The stem of the pipe names can be defined in the 
5017 \begin_inset Flex MenuItem
5018 status collapsed
5019
5020 \begin_layout Plain Layout
5021 Tools\SpecialChar \menuseparator
5022 Preferences
5023 \end_layout
5024
5025 \end_inset
5026
5027  dialog, for example 
5028 \begin_inset Flex Code
5029 status collapsed
5030
5031 \begin_layout Plain Layout
5032 "/home/myhome/lyxpipe"
5033 \end_layout
5034
5035 \end_inset
5036
5037 , or 
5038 \begin_inset Flex Code
5039 status collapsed
5040
5041 \begin_layout Plain Layout
5042 "
5043 \backslash
5044
5045 \backslash
5046 .
5047 \backslash
5048 pipe
5049 \backslash
5050 lyxpipe"
5051 \end_layout
5052
5053 \end_inset
5054
5055  on Windows.
5056  You 
5057 \emph on
5058 must
5059 \emph default
5060  configure this manually in order for the server to start.
5061 \end_layout
5062
5063 \begin_layout Standard
5064 LyX will add the '
5065 \begin_inset Flex Code
5066 status collapsed
5067
5068 \begin_layout Plain Layout
5069 .in
5070 \end_layout
5071
5072 \end_inset
5073
5074 ' and '
5075 \begin_inset Flex Code
5076 status collapsed
5077
5078 \begin_layout Plain Layout
5079 .out
5080 \end_layout
5081
5082 \end_inset
5083
5084 ' to create the pipes.
5085  If one of the pipes already exists, LyX will assume that another LyX process
5086  is already running and will not start the server.
5087  On POSIX (Unix like) systems, if for some other reason, an unused 
5088 \begin_inset Quotes eld
5089 \end_inset
5090
5091 stale
5092 \begin_inset Quotes erd
5093 \end_inset
5094
5095  pipe is left in existence when LyX closes, then LyX will try to delete
5096  it.
5097  If this fails for some reason, you will need to delete the pipes manually
5098  and then restart LyX.
5099  On Windows, pipes are deleted by the OS on program termination or crash,
5100  so 
5101 \begin_inset Quotes eld
5102 \end_inset
5103
5104 stale
5105 \begin_inset Quotes erd
5106 \end_inset
5107
5108  pipes should not be possible.
5109 \end_layout
5110
5111 \begin_layout Standard
5112 To have several LyX processes with servers at the same time, you have to
5113  use different configurations, perhaps by using separate user directories,
5114  each with its own 
5115 \begin_inset Flex Code
5116 status collapsed
5117
5118 \begin_layout Plain Layout
5119 preferences
5120 \end_layout
5121
5122 \end_inset
5123
5124  file, for each process.
5125 \end_layout
5126
5127 \begin_layout Standard
5128 If you are developing a client program, you might find it useful to enable
5129  debugging information from the LyX server.
5130  Do this by starting LyX as 
5131 \begin_inset Flex Code
5132 status collapsed
5133
5134 \begin_layout Plain Layout
5135 lyx -dbg lyxserver
5136 \end_layout
5137
5138 \end_inset
5139
5140 .
5141 \end_layout
5142
5143 \begin_layout Standard
5144 You can find a complete example client written in C in the source distribution
5145  as 
5146 \begin_inset Flex Code
5147 status collapsed
5148
5149 \begin_layout Plain Layout
5150 development/lyxserver/server_monitor.c
5151 \end_layout
5152
5153 \end_inset
5154
5155 .
5156 \end_layout
5157
5158 \begin_layout Standard
5159 Another useful tool is command-line based client you will find in 
5160 \begin_inset Flex Code
5161 status collapsed
5162
5163 \begin_layout Plain Layout
5164 src/client/lyxclient
5165 \end_layout
5166
5167 \end_inset
5168
5169 .
5170 \end_layout
5171
5172 \begin_layout Section
5173 Normal communication
5174 \end_layout
5175
5176 \begin_layout Standard
5177 To issue a LyX call, the client writes a line of ASCII text into the input
5178  pipe.
5179  This line has the following format:
5180 \end_layout
5181
5182 \begin_layout Quote
5183 LYXCMD:
5184 \emph on
5185 clientname
5186 \emph default
5187 :
5188 \emph on
5189 function
5190 \emph default
5191 :
5192 \emph on
5193 argument
5194 \end_layout
5195
5196 \begin_layout Description
5197 clientname is a name that the client can choose arbitrarily.
5198  Its only use is that LyX will echo it if it sends an answer—so a client
5199  can dispatch results from different requesters.
5200 \end_layout
5201
5202 \begin_layout Description
5203 function is the function you want LyX to perform.
5204  It is the same as the commands you'd use in the minibuffer.
5205 \end_layout
5206
5207 \begin_layout Description
5208 argument is an optional argument which is meaningful only to some functions
5209  (for instance, the 
5210 \begin_inset Quotes eld
5211 \end_inset
5212
5213 self-insert
5214 \begin_inset Quotes erd
5215 \end_inset
5216
5217  LFUN will insert the argument as text at the cursor position).
5218 \end_layout
5219
5220 \begin_layout Standard
5221 The answer from LyX will arrive in the output pipe and be of the form
5222 \end_layout
5223
5224 \begin_layout Quote
5225 INFO:
5226 \emph on
5227 clientname
5228 \emph default
5229 :
5230 \emph on
5231 function
5232 \emph default
5233 :
5234 \emph on
5235 data
5236 \end_layout
5237
5238 \begin_layout Standard
5239 where 
5240 \emph on
5241 clientname
5242 \emph default
5243  and 
5244 \emph on
5245 function
5246 \emph default
5247  are just echoed from the command request, while 
5248 \emph on
5249 data
5250 \emph default
5251  is more or less useful information filled according to how the command
5252  execution worked out.
5253  Some commands, such as 
5254 \begin_inset Quotes eld
5255 \end_inset
5256
5257 font-state
5258 \begin_inset Quotes erd
5259 \end_inset
5260
5261 , will return information about the internal state of LyX, while other will
5262  return an empty data-response.
5263  This means that the command execution went fine.
5264 \end_layout
5265
5266 \begin_layout Standard
5267 In case of errors, the response from LyX will have this form
5268 \end_layout
5269
5270 \begin_layout Quote
5271 ERROR:
5272 \emph on
5273 clientname
5274 \emph default
5275 :
5276 \emph on
5277 function
5278 \emph default
5279 :
5280 \emph on
5281 error message
5282 \end_layout
5283
5284 \begin_layout Standard
5285 where the 
5286 \emph on
5287 error message
5288 \emph default
5289  should contain an explanation of why the command failed.
5290 \end_layout
5291
5292 \begin_layout Standard
5293 Examples:
5294 \end_layout
5295
5296 \begin_layout LyX-Code
5297 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5298 \begin_inset Newline newline
5299 \end_inset
5300
5301 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5302 \begin_inset Newline newline
5303 \end_inset
5304
5305 read a <~/.lyxpipe.out
5306 \begin_inset Newline newline
5307 \end_inset
5308
5309 echo $a
5310 \end_layout
5311
5312 \begin_layout Section
5313 Notification
5314 \end_layout
5315
5316 \begin_layout Standard
5317 LyX can notify clients of events going on asynchronously.
5318  Currently it will only do this if the user binds a key sequence with the
5319  function 
5320 \begin_inset Quotes eld
5321 \end_inset
5322
5323 notify
5324 \begin_inset Quotes erd
5325 \end_inset
5326
5327 .
5328  The format of the string LyX sends is as follows:
5329 \end_layout
5330
5331 \begin_layout Quote
5332 \begin_inset Flex Code
5333 status collapsed
5334
5335 \begin_layout Plain Layout
5336 NOTIFY:
5337 \end_layout
5338
5339 \end_inset
5340
5341
5342 \emph on
5343 key-sequence
5344 \end_layout
5345
5346 \begin_layout Standard
5347 where 
5348 \emph on
5349 key-sequence
5350 \emph default
5351  is the printed representation of the key sequence that was actually typed
5352  by the user.
5353 \end_layout
5354
5355 \begin_layout Standard
5356 This mechanism can be used to extend LyX's command set and implement macros.
5357  Bind some key sequence to 
5358 \begin_inset Quotes eld
5359 \end_inset
5360
5361 notify
5362 \begin_inset Quotes erd
5363 \end_inset
5364
5365 .
5366  Then start a client that listens on the output pipe, dispatches the command
5367  according to the sequence, and starts a function that may use LyX calls
5368  and LyX requests to issue a command or a series of commands to LyX.
5369 \end_layout
5370
5371 \begin_layout Section
5372 The simple LyX Server Protocol
5373 \end_layout
5374
5375 \begin_layout Standard
5376 LyX implements a simple protocol that can be used for session management.
5377  All messages are of the form
5378 \end_layout
5379
5380 \begin_layout Quote
5381 LYXSRV:
5382 \emph on
5383 clientname
5384 \emph default
5385 :
5386 \emph on
5387 protocol message
5388 \end_layout
5389
5390 \begin_layout Standard
5391 where 
5392 \emph on
5393 protocol message
5394 \emph default
5395  can be 
5396 \begin_inset Quotes eld
5397 \end_inset
5398
5399 hello
5400 \begin_inset Quotes erd
5401 \end_inset
5402
5403  or 
5404 \begin_inset Quotes eld
5405 \end_inset
5406
5407 bye
5408 \begin_inset Quotes erd
5409 \end_inset
5410
5411 .
5412  If 
5413 \begin_inset Quotes eld
5414 \end_inset
5415
5416 hello
5417 \begin_inset Quotes erd
5418 \end_inset
5419
5420  is received from a client, LyX will report back to inform the client that
5421  it's listening to it's messages, while 
5422 \begin_inset Quotes eld
5423 \end_inset
5424
5425 bye
5426 \begin_inset Quotes erd
5427 \end_inset
5428
5429  sent from LyX will inform clients that LyX is closing.
5430 \end_layout
5431
5432 \begin_layout Section
5433 Reverse DVI/PDF search
5434 \end_layout
5435
5436 \begin_layout Standard
5437 Some DVI/PDF viewers
5438 \begin_inset Foot
5439 status collapsed
5440
5441 \begin_layout Plain Layout
5442 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5443  Skim on Mac OSX and SumatraPDF on Windows.
5444 \end_layout
5445
5446 \end_inset
5447
5448  provide 
5449 \emph on
5450 reverse search
5451 \emph default
5452  facility (also called 
5453 \emph on
5454 inverse search
5455 \emph default
5456 ).
5457  This means that you can tell LyX to put the cursor to a specific line in
5458  the document by clicking at the respective position in the DVI/PDF output.
5459  To achieve this, the viewer must be able to communicate with LyX.
5460  This is done via the LyX server either by using the named pipe (
5461 \emph on
5462 lyxpipe
5463 \emph default
5464 ), or the UNIX domain socket (
5465 \emph on
5466 lyxsocket
5467 \emph default
5468 ) that LyX creates in its temporary directory (this is the way the 
5469 \begin_inset Flex Code
5470 status collapsed
5471
5472 \begin_layout Plain Layout
5473 lyxclient
5474 \end_layout
5475
5476 \end_inset
5477
5478  program communicates with LyX).
5479  In some cases, you need a helper script that mediates between the viewer
5480  and LyX, in others, the viewer can communicate with LyX directly.
5481  This depends on the selected viewer and on your operating system.
5482  The same applies to the way viewers need to be configured and the way the
5483  reverse search is actually performed.
5484  In what follows, we will thus describe how to setup reverse search for
5485  specific viewers.
5486  Before we turn to this, though, we will explain what needs to be done generally
5487  to enable reverse search in the DVI/PDF output.
5488 \end_layout
5489
5490 \begin_layout Subsection
5491
5492 \change_inserted 2 1274788899
5493 \begin_inset CommandInset label
5494 LatexCommand label
5495 name "sub:rev-search"
5496
5497 \end_inset
5498
5499 Automatical enabling
5500 \end_layout
5501
5502 \begin_layout Standard
5503
5504 \change_inserted 2 1274789582
5505 In most cases LyX will do the work for you by enabling 
5506 \begin_inset Flex MenuItem
5507 status collapsed
5508
5509 \begin_layout Plain Layout
5510
5511 \change_inserted 2 1274789026
5512 Document\SpecialChar \menuseparator
5513 Output\SpecialChar \menuseparator
5514 Output Sync
5515 \end_layout
5516
5517 \end_inset
5518
5519 .
5520  In such a case LyX will automatically insert SyncTeX macro (for PDF) or
5521  srcltx package (for DVI) respectively.
5522  This option can be easily reached also on 
5523 \begin_inset Flex Code
5524 status collapsed
5525
5526 \begin_layout Plain Layout
5527
5528 \change_inserted 2 1274789582
5529 View/update
5530 \change_unchanged
5531
5532 \end_layout
5533
5534 \end_inset
5535
5536  Toolbar.
5537 \end_layout
5538
5539 \begin_layout Standard
5540
5541 \change_inserted 2 1274789534
5542 Plase note that including 
5543 \begin_inset Flex Code
5544 status collapsed
5545
5546 \begin_layout Plain Layout
5547
5548 \change_inserted 2 1274789498
5549 srcltx
5550 \change_unchanged
5551
5552 \end_layout
5553
5554 \end_inset
5555
5556  package or 
5557 \begin_inset Flex Code
5558 status collapsed
5559
5560 \begin_layout Plain Layout
5561
5562 \change_inserted 2 1274789484
5563 src-specials
5564 \change_unchanged
5565
5566 \end_layout
5567
5568 \end_inset
5569
5570  sometimes have an impact on the typeset and you should switch them off
5571  for the final typesets.
5572 \change_unchanged
5573
5574 \end_layout
5575
5576 \begin_layout Standard
5577
5578 \change_inserted 2 1274789340
5579 You can also define custom macro in preferences and in case you need some
5580  special tweaks read the next section about manual enabling.
5581  
5582 \change_unchanged
5583
5584 \end_layout
5585
5586 \begin_layout Subsection
5587
5588 \change_inserted 2 1274788680
5589 Manual enabling
5590 \change_unchanged
5591
5592 \end_layout
5593
5594 \begin_layout Standard
5595 LaTeX provides several different methods for reverse search.
5596  Some are built-in in the 
5597 \begin_inset Flex Code
5598 status collapsed
5599
5600 \begin_layout Plain Layout
5601 latex/pdflatex
5602 \end_layout
5603
5604 \end_inset
5605
5606  program, some are provided by external packages.
5607  Your choice depends on whether your LaTeX distribution already provides
5608  a given method (the built-in methods are rather new) and whether your viewer
5609  can cope with it.
5610  The available methods are described in the following.
5611 \change_inserted 2 1274788557
5612
5613 \end_layout
5614
5615 \begin_layout Subsubsection*
5616 Built-in DVI-search via src-specials (DVI only) 
5617 \end_layout
5618
5619 \begin_layout Standard
5620 This method provides the DVI file with the necessary information for reverse
5621  search.
5622  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5623  distribution should include it), and it works reliably.
5624  To enable it, change the 
5625 \begin_inset Flex MenuItem
5626 status collapsed
5627
5628 \begin_layout Plain Layout
5629 LaT
5630 \begin_inset ERT
5631 status collapsed
5632
5633 \begin_layout Plain Layout
5634
5635 {}
5636 \end_layout
5637
5638 \end_inset
5639
5640 eX (plain)->DVI
5641 \end_layout
5642
5643 \end_inset
5644
5645  or 
5646 \begin_inset Flex MenuItem
5647 status collapsed
5648
5649 \begin_layout Plain Layout
5650 LaT
5651 \begin_inset ERT
5652 status collapsed
5653
5654 \begin_layout Plain Layout
5655
5656 {}
5657 \end_layout
5658
5659 \end_inset
5660
5661 eX (plain)->DraftDVI
5662 \end_layout
5663
5664 \end_inset
5665
5666  converter in 
5667 \begin_inset Flex MenuItem
5668 status collapsed
5669
5670 \begin_layout Plain Layout
5671 Preferences\SpecialChar \menuseparator
5672 File Handling\SpecialChar \menuseparator
5673 Converters
5674 \end_layout
5675
5676 \end_inset
5677
5678  to 
5679 \begin_inset Flex Code
5680 status collapsed
5681
5682 \begin_layout Plain Layout
5683 latex -src-specials $$i
5684 \end_layout
5685
5686 \end_inset
5687
5688 .
5689  If this doesn't work, check if your TeX engine needs different options
5690  (the syntax might differ in some distributions).
5691 \end_layout
5692
5693 \begin_layout Subsubsection*
5694 External Packages (PDFSync and scrltx) 
5695 \end_layout
5696
5697 \begin_layout Standard
5698 The packages 
5699 \emph on
5700 pdfsync
5701 \emph default
5702  and 
5703 \emph on
5704 scrltx
5705 \emph default
5706  provide reverse search facility for PDF output (via pdflatex) and DVI output,
5707  respectively.
5708  In order to enable it, load the packages in the LyX preamble: 
5709 \end_layout
5710
5711 \begin_layout Itemize
5712 \begin_inset Flex Code
5713 status collapsed
5714
5715 \begin_layout Plain Layout
5716
5717 \backslash
5718 usepackage{pdfsync}
5719 \end_layout
5720
5721 \end_inset
5722
5723  for reverse PDF search,
5724 \end_layout
5725
5726 \begin_layout Itemize
5727  
5728 \begin_inset Flex Code
5729 status collapsed
5730
5731 \begin_layout Plain Layout
5732
5733 \backslash
5734 usepackage[active]{srcltx}
5735 \end_layout
5736
5737 \end_inset
5738
5739  for reverse DVI search.
5740 \end_layout
5741
5742 \begin_layout Standard
5743 If you want to be able to perform both DVI and PDF reverse searches, you
5744  can also insert in the preamble the following lines
5745 \end_layout
5746
5747 \begin_layout LyX-Code
5748
5749 \backslash
5750 usepackage{ifpdf}
5751 \begin_inset Newline newline
5752 \end_inset
5753
5754
5755 \backslash
5756 ifpdf
5757 \begin_inset Newline newline
5758 \end_inset
5759
5760   
5761 \backslash
5762 usepackage{pdfsync}
5763 \begin_inset Newline newline
5764 \end_inset
5765
5766
5767 \backslash
5768 else
5769 \begin_inset Newline newline
5770 \end_inset
5771
5772   
5773 \backslash
5774 usepackage[active]{srcltx}
5775 \begin_inset Newline newline
5776 \end_inset
5777
5778
5779 \backslash
5780 fi
5781 \end_layout
5782
5783 \begin_layout Standard
5784 This way, you can preview the file as either DVI or PDF (pdflatex) and the
5785  right package will be used.
5786 \end_layout
5787
5788 \begin_layout Standard
5789 Note that PDFSync might affect the output layout of your document.
5790  It is therefore advised to disable PDFsync for final documents.
5791 \end_layout
5792
5793 \begin_layout Subsubsection*
5794 Built-in reverse search via SyncTeX (DVI and PDF) 
5795 \end_layout
5796
5797 \begin_layout Standard
5798 Recent versions of 
5799 \begin_inset Flex Code
5800 status collapsed
5801
5802 \begin_layout Plain Layout
5803 (pdf)latex
5804 \end_layout
5805
5806 \end_inset
5807
5808  have built-in support for both PDF and DVI reverse search.
5809  This so-called 
5810 \emph on
5811 SyncTeX
5812 \emph default
5813  facility is basically the result of the integration of the PDFSync package
5814  to the pdftex program and its merge with the 
5815 \emph on
5816 scr-specials
5817 \emph default
5818  approach.
5819  You need at least TeXLive 2008 or a recent MikTeX distribution in order
5820  to use it.
5821  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
5822  already provide SyncTeX support.
5823 \end_layout
5824
5825 \begin_layout Standard
5826 To enable SyncTeX for DVI output, change the 
5827 \begin_inset Flex MenuItem
5828 status collapsed
5829
5830 \begin_layout Plain Layout
5831 LaT
5832 \begin_inset ERT
5833 status collapsed
5834
5835 \begin_layout Plain Layout
5836
5837 {}
5838 \end_layout
5839
5840 \end_inset
5841
5842 eX (plain) -> DVI
5843 \end_layout
5844
5845 \end_inset
5846
5847  or 
5848 \begin_inset Flex MenuItem
5849 status collapsed
5850
5851 \begin_layout Plain Layout
5852 LaT
5853 \begin_inset ERT
5854 status collapsed
5855
5856 \begin_layout Plain Layout
5857
5858 {}
5859 \end_layout
5860
5861 \end_inset
5862
5863 eX (plain) -> DraftDVI
5864 \end_layout
5865
5866 \end_inset
5867
5868  converter in 
5869 \begin_inset Flex MenuItem
5870 status collapsed
5871
5872 \begin_layout Plain Layout
5873 Preferences\SpecialChar \menuseparator
5874 File Handling\SpecialChar \menuseparator
5875 Converters
5876 \end_layout
5877
5878 \end_inset
5879
5880  to 
5881 \begin_inset Flex Code
5882 status collapsed
5883
5884 \begin_layout Plain Layout
5885 latex -synctex=1 $$i
5886 \end_layout
5887
5888 \end_inset
5889
5890 , and for PDF output, change the 
5891 \begin_inset Flex MenuItem
5892 status collapsed
5893
5894 \begin_layout Plain Layout
5895 LaT
5896 \begin_inset ERT
5897 status collapsed
5898
5899 \begin_layout Plain Layout
5900
5901 {}
5902 \end_layout
5903
5904 \end_inset
5905
5906 eX (pdflatex) -> PDF (pdflatex)
5907 \end_layout
5908
5909 \end_inset
5910
5911  or converter to 
5912 \begin_inset Flex Code
5913 status collapsed
5914
5915 \begin_layout Plain Layout
5916 pdflatex -synctex=1 $$i
5917 \end_layout
5918
5919 \end_inset
5920
5921 .
5922  Check the documentation of your viewer whether the viewer needs to be configure
5923 d for the use with SyncTeX.
5924 \begin_inset Foot
5925 status collapsed
5926
5927 \begin_layout Plain Layout
5928 The 
5929 \begin_inset Flex Code
5930 status collapsed
5931
5932 \begin_layout Plain Layout
5933 -synctex=1
5934 \end_layout
5935
5936 \end_inset
5937
5938  option enables gzip compression.
5939  If your viewer does not support it, you should instead use 
5940 \begin_inset Flex Code
5941 status collapsed
5942
5943 \begin_layout Plain Layout
5944 -synctex=-1
5945 \end_layout
5946
5947 \end_inset
5948
5949 .
5950 \end_layout
5951
5952 \end_inset
5953
5954
5955 \end_layout
5956
5957 \begin_layout Subsection
5958 Configuring and using specific viewers
5959 \end_layout
5960
5961 \begin_layout Subsubsection*
5962 Xdvi (all platforms)
5963 \end_layout
5964
5965 \begin_layout Standard
5966 If you use 
5967 \begin_inset Flex Code
5968 status collapsed
5969
5970 \begin_layout Plain Layout
5971 xdvi
5972 \end_layout
5973
5974 \end_inset
5975
5976 , you don't need to do anything else for performing a reverse DVI search,
5977  as LyX already provides the necessary hooks for automatically using the
5978  
5979 \begin_inset Flex Code
5980 status collapsed
5981
5982 \begin_layout Plain Layout
5983 lyxclient
5984 \end_layout
5985
5986 \end_inset
5987
5988  program.
5989  Just setup your document as described above (reverse search is triggered
5990  by Ctrl-click or Alt-click on Mac OSX, respectively).
5991 \end_layout
5992
5993 \begin_layout Standard
5994 However, if for whatever reason you want to use the named pipe instead of
5995  the socket for communicating with LyX, simply change the DVI viewer in
5996  
5997 \begin_inset Flex MenuItem
5998 status collapsed
5999
6000 \begin_layout Plain Layout
6001 Preferences\SpecialChar \menuseparator
6002 File Handling\SpecialChar \menuseparator
6003 File formats
6004 \end_layout
6005
6006 \end_inset
6007
6008  to
6009 \begin_inset Foot
6010 status collapsed
6011
6012 \begin_layout Plain Layout
6013 On Mac OSX you have to use 
6014 \begin_inset Flex Code
6015 status collapsed
6016
6017 \begin_layout Plain Layout
6018 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6019 \end_layout
6020
6021 \end_inset
6022
6023
6024 \end_layout
6025
6026 \end_inset
6027
6028  
6029 \begin_inset Flex Code
6030 status collapsed
6031
6032 \begin_layout Plain Layout
6033 xdvi -editor 'lyxeditor.sh %f %l'
6034 \end_layout
6035
6036 \end_inset
6037
6038 , where 
6039 \begin_inset Flex Code
6040 status collapsed
6041
6042 \begin_layout Plain Layout
6043 lyxeditor.sh
6044 \end_layout
6045
6046 \end_inset
6047
6048  is a suitable script.
6049  For example, a minimal shell script is the following one:
6050 \end_layout
6051
6052 \begin_layout LyX-Code
6053 #!/bin/sh
6054 \begin_inset Newline newline
6055 \end_inset
6056
6057 LYXPIPE="/path/to/lyxpipe"
6058 \begin_inset Newline newline
6059 \end_inset
6060
6061 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6062 \begin_inset Newline newline
6063 \end_inset
6064
6065 echo "$COMMAND" > "${LYXPIPE}".in || exit
6066 \begin_inset Newline newline
6067 \end_inset
6068
6069 read < "${LYXPIPE}".out || exit
6070 \end_layout
6071
6072 \begin_layout Standard
6073 where 
6074 \begin_inset Flex Code
6075 status collapsed
6076
6077 \begin_layout Plain Layout
6078 /path/to/lyxpipe
6079 \end_layout
6080
6081 \end_inset
6082
6083  is the Ly
6084 \begin_inset ERT
6085 status collapsed
6086
6087 \begin_layout Plain Layout
6088
6089 {}
6090 \end_layout
6091
6092 \end_inset
6093
6094 XServer pipe path specified in 
6095 \begin_inset Flex MenuItem
6096 status collapsed
6097
6098 \begin_layout Plain Layout
6099 Preferences\SpecialChar \menuseparator
6100 Paths
6101 \end_layout
6102
6103 \end_inset
6104
6105 .
6106 \begin_inset Foot
6107 status collapsed
6108
6109 \begin_layout Plain Layout
6110 In the 
6111 \begin_inset Flex Code
6112 status collapsed
6113
6114 \begin_layout Plain Layout
6115 development/tools
6116 \end_layout
6117
6118 \end_inset
6119
6120  folder of a source distribution you can find a 
6121 \begin_inset Flex Code
6122 status collapsed
6123
6124 \begin_layout Plain Layout
6125 lyxeditor
6126 \end_layout
6127
6128 \end_inset
6129
6130  script which is able to locate the 
6131 \emph on
6132 lyxpipe
6133 \emph default
6134  based on your preferences.
6135 \end_layout
6136
6137 \end_inset
6138
6139
6140 \end_layout
6141
6142 \begin_layout Subsubsection*
6143 MacDviX (Mac OSX)
6144 \end_layout
6145
6146 \begin_layout Standard
6147 At the end of 
6148 \begin_inset Flex Code
6149 status collapsed
6150
6151 \begin_layout Plain Layout
6152 /Applications/MacDviX_Folder/calleditor.script
6153 \end_layout
6154
6155 \end_inset
6156
6157 , add the following lines:
6158 \end_layout
6159
6160 \begin_layout LyX-Code
6161 /Applications/Ly
6162 \begin_inset ERT
6163 status collapsed
6164
6165 \begin_layout Plain Layout
6166
6167 {}
6168 \end_layout
6169
6170 \end_inset
6171
6172 X.app/Contents/MacOS/lyxeditor "$2" $1
6173 \begin_inset Newline newline
6174 \end_inset
6175
6176 exit 1
6177 \end_layout
6178
6179 \begin_layout Standard
6180 Modify the lines accordingly if you install LyX somewhere else than in the
6181  Applications folder.
6182 \end_layout
6183
6184 \begin_layout Standard
6185 Reverse search is triggered by Alt-click (OPTION-click).
6186 \end_layout
6187
6188 \begin_layout Subsubsection*
6189 Skim (Mac OSX)
6190 \end_layout
6191
6192 \begin_layout Standard
6193 Enter 
6194 \begin_inset Flex Code
6195 status collapsed
6196
6197 \begin_layout Plain Layout
6198 open -a Skim.app $$i
6199 \end_layout
6200
6201 \end_inset
6202
6203  to the viewer setting in 
6204 \begin_inset Flex MenuItem
6205 status collapsed
6206
6207 \begin_layout Plain Layout
6208 Preferences\SpecialChar \menuseparator
6209 File Handling\SpecialChar \menuseparator
6210 File formats\SpecialChar \menuseparator
6211 PDF (pdflatex)
6212 \end_layout
6213
6214 \end_inset
6215
6216 , and then in 
6217 \begin_inset Flex MenuItem
6218 status collapsed
6219
6220 \begin_layout Plain Layout
6221 Skim\SpecialChar \menuseparator
6222 Preferences\SpecialChar \menuseparator
6223 Sync
6224 \end_layout
6225
6226 \end_inset
6227
6228  select Ly
6229 \begin_inset ERT
6230 status collapsed
6231
6232 \begin_layout Plain Layout
6233
6234 {}
6235 \end_layout
6236
6237 \end_inset
6238
6239 X.
6240 \end_layout
6241
6242 \begin_layout Standard
6243 Reverse search is triggered by COMMAND-SHIFT-click
6244 \end_layout
6245
6246 \begin_layout Subsubsection*
6247 Okular (KDE)
6248 \end_layout
6249
6250 \begin_layout Standard
6251 Go to 
6252 \begin_inset Flex MenuItem
6253 status collapsed
6254
6255 \begin_layout Plain Layout
6256 Settings\SpecialChar \menuseparator
6257 Configure Okular\SpecialChar \ldots{}
6258 \SpecialChar \menuseparator
6259 Editor
6260 \end_layout
6261
6262 \end_inset
6263
6264 , select 
6265 \begin_inset Quotes eld
6266 \end_inset
6267
6268 Custom Text Editor
6269 \begin_inset Quotes erd
6270 \end_inset
6271
6272  and add the command 
6273 \begin_inset Flex Code
6274 status collapsed
6275
6276 \begin_layout Plain Layout
6277 lyxclient -g %f %l
6278 \end_layout
6279
6280 \end_inset
6281
6282 .
6283 \end_layout
6284
6285 \begin_layout Standard
6286 Reverse search is triggered by SHIFT-click.
6287 \end_layout
6288
6289 \begin_layout Subsubsection*
6290 YAP (Windows)
6291 \end_layout
6292
6293 \begin_layout Standard
6294 Launch yap, choose its 
6295 \begin_inset Flex MenuItem
6296 status collapsed
6297
6298 \begin_layout Plain Layout
6299 View\SpecialChar \menuseparator
6300 Options
6301 \end_layout
6302
6303 \end_inset
6304
6305  menu and select the 
6306 \begin_inset Quotes eld
6307 \end_inset
6308
6309 Inverse DVI Search
6310 \begin_inset Quotes erd
6311 \end_inset
6312
6313  tab.
6314  Click on the 
6315 \begin_inset Quotes eld
6316 \end_inset
6317
6318 New\SpecialChar \ldots{}
6319
6320 \begin_inset Quotes erd
6321 \end_inset
6322
6323  button and, in the window that opens, enter 
6324 \begin_inset Quotes eld
6325 \end_inset
6326
6327 LyX Editor
6328 \begin_inset Quotes erd
6329 \end_inset
6330
6331  (or any other name you like) in the 
6332 \begin_inset Quotes eld
6333 \end_inset
6334
6335 Name:
6336 \begin_inset Quotes erd
6337 \end_inset
6338
6339  field.
6340  Now click on the button labeled 
6341 \begin_inset Quotes eld
6342 \end_inset
6343
6344 \SpecialChar \ldots{}
6345
6346 \begin_inset Quotes erd
6347 \end_inset
6348
6349  to open a file dialog and navigate to the directory containing the batch
6350  file 
6351 \begin_inset Flex Code
6352 status collapsed
6353
6354 \begin_layout Plain Layout
6355 lyxeditor.bat
6356 \end_layout
6357
6358 \end_inset
6359
6360  (see below).
6361  Select 
6362 \begin_inset Flex Code
6363 status collapsed
6364
6365 \begin_layout Plain Layout
6366 lyxeditor.bat
6367 \end_layout
6368
6369 \end_inset
6370
6371  and then specify the program arguments as 
6372 \begin_inset Flex Code
6373 status collapsed
6374
6375 \begin_layout Plain Layout
6376 %f %l
6377 \end_layout
6378
6379 \end_inset
6380
6381 .
6382  The 
6383 \begin_inset Flex Code
6384 status collapsed
6385
6386 \begin_layout Plain Layout
6387 lyxeditor.bat
6388 \end_layout
6389
6390 \end_inset
6391
6392  wrapper is used for communicating with LyX through the 
6393 \emph on
6394 lyxpipe
6395 \emph default
6396  and is as follows:
6397 \end_layout
6398
6399 \begin_layout LyX-Code
6400 @echo off
6401 \begin_inset Newline newline
6402 \end_inset
6403
6404 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6405 \backslash
6406
6407 \backslash
6408 .
6409 \backslash
6410 pipe
6411 \backslash
6412 lyxpipe.in
6413 \begin_inset Newline newline
6414 \end_inset
6415
6416 type 
6417 \backslash
6418
6419 \backslash
6420 .
6421 \backslash
6422 pipe
6423 \backslash
6424 lyxpipe.out
6425 \end_layout
6426
6427 \begin_layout Standard
6428 Make sure that the LyXServer pipe path you specified in LyX is 
6429 \begin_inset Flex Code
6430 status collapsed
6431
6432 \begin_layout Plain Layout
6433
6434 \backslash
6435
6436 \backslash
6437 .
6438 \backslash
6439 pipe
6440 \backslash
6441 lyxpipe
6442 \end_layout
6443
6444 \end_inset
6445
6446 , otherwise change the 
6447 \begin_inset Flex Code
6448 status collapsed
6449
6450 \begin_layout Plain Layout
6451 lyxeditor.bat
6452 \end_layout
6453
6454 \end_inset
6455
6456  wrapper accordingly.
6457 \end_layout
6458
6459 \begin_layout Standard
6460 In yap, reverse search is triggered by double-click.
6461 \end_layout
6462
6463 \begin_layout Subsubsection*
6464 SumatraPDF (Windows)
6465 \end_layout
6466
6467 \begin_layout Standard
6468 In order to use SumatraPDF for inverse search, enter 
6469 \begin_inset Flex Code
6470 status collapsed
6471
6472 \begin_layout Plain Layout
6473 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6474 \end_layout
6475
6476 \end_inset
6477
6478  in the viewer setting in 
6479 \begin_inset Flex MenuItem
6480 status collapsed
6481
6482 \begin_layout Plain Layout
6483 Preferences\SpecialChar \menuseparator
6484 File Handling\SpecialChar \menuseparator
6485 File formats\SpecialChar \menuseparator
6486 PDF (pdflatex)
6487 \end_layout
6488
6489 \end_inset
6490
6491 , where 
6492 \begin_inset Flex Code
6493 status collapsed
6494
6495 \begin_layout Plain Layout
6496 lyxeditor.bat
6497 \end_layout
6498
6499 \end_inset
6500
6501  is the previous wrapper.
6502  If SumatraPDF.exe is not in your command PATH, use its full file name.
6503 \end_layout
6504
6505 \begin_layout Standard
6506 Reverse search is triggered by double-click.
6507 \end_layout
6508
6509 \begin_layout Subsubsection*
6510 YAP (Cygwin)
6511 \end_layout
6512
6513 \begin_layout Standard
6514 First of all, make sure that yap is your default DVI viewer in the Windows
6515  environment, then launch it, choose its 
6516 \begin_inset Flex MenuItem
6517 status collapsed
6518
6519 \begin_layout Plain Layout
6520 View\SpecialChar \menuseparator
6521 Options
6522 \end_layout
6523
6524 \end_inset
6525
6526  menu and select the 
6527 \begin_inset Quotes eld
6528 \end_inset
6529
6530 Inverse DVI Search
6531 \begin_inset Quotes erd
6532 \end_inset
6533
6534  tab.
6535  Click on the 
6536 \begin_inset Quotes eld
6537 \end_inset
6538
6539 New\SpecialChar \ldots{}
6540
6541 \begin_inset Quotes erd
6542 \end_inset
6543
6544  button and, in the window that opens, enter 
6545 \begin_inset Quotes eld
6546 \end_inset
6547
6548 LyX Editor
6549 \begin_inset Quotes erd
6550 \end_inset
6551
6552  (or any other name you like) in the 
6553 \begin_inset Quotes eld
6554 \end_inset
6555
6556 Name:
6557 \begin_inset Quotes erd
6558 \end_inset
6559
6560  field.
6561  Now click on the button labeled 
6562 \begin_inset Quotes eld
6563 \end_inset
6564
6565 \SpecialChar \ldots{}
6566
6567 \begin_inset Quotes erd
6568 \end_inset
6569
6570  to open a file dialog and navigate to the directory containing the 
6571 \begin_inset Flex Code
6572 status collapsed
6573
6574 \begin_layout Plain Layout
6575 lyxeditor.exe
6576 \end_layout
6577
6578 \end_inset
6579
6580  program (which is installed by default on Cygwin along with the LyX executable).
6581  Select 
6582 \begin_inset Flex Code
6583 status collapsed
6584
6585 \begin_layout Plain Layout
6586 lyxeditor.exe
6587 \end_layout
6588
6589 \end_inset
6590
6591  and then specify the program arguments as 
6592 \begin_inset Flex Code
6593 status collapsed
6594
6595 \begin_layout Plain Layout
6596 -g %f %l
6597 \end_layout
6598
6599 \end_inset
6600
6601 .
6602  In this way, you will be using the 
6603 \emph on
6604 lyxsocket
6605 \emph default
6606  for communicating with LyX.
6607  If, for whatever reason, you want to use the 
6608 \emph on
6609 lyxpipe
6610 \emph default
6611 , omit the 
6612 \begin_inset Flex Code
6613 status collapsed
6614
6615 \begin_layout Plain Layout
6616 -g
6617 \end_layout
6618
6619 \end_inset
6620
6621  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6622 \end_layout
6623
6624 \begin_layout Standard
6625 In yap, reverse search is triggered by double-click.
6626 \end_layout
6627
6628 \begin_layout Subsubsection*
6629 SumatraPDF (Cygwin)
6630 \end_layout
6631
6632 \begin_layout Standard
6633 In order to use SumatraPDF for inverse search, enter 
6634 \begin_inset Flex Code
6635 status collapsed
6636
6637 \begin_layout Plain Layout
6638 SumatraPDF.sh
6639 \end_layout
6640
6641 \end_inset
6642
6643  in the viewer setting in 
6644 \begin_inset Flex MenuItem
6645 status collapsed
6646
6647 \begin_layout Plain Layout
6648 Preferences\SpecialChar \menuseparator
6649 File Handling\SpecialChar \menuseparator
6650 File formats\SpecialChar \menuseparator
6651 PDF (pdflatex)
6652 \end_layout
6653
6654 \end_inset
6655
6656 , where 
6657 \begin_inset Flex Code
6658 status collapsed
6659
6660 \begin_layout Plain Layout
6661 SumatraPDF.sh
6662 \end_layout
6663
6664 \end_inset
6665
6666  is the following script (to be placed in your command PATH, 
6667 \begin_inset Flex Code
6668 status collapsed
6669
6670 \begin_layout Plain Layout
6671 /usr/local/bin
6672 \end_layout
6673
6674 \end_inset
6675
6676  being the best choice):
6677 \end_layout
6678
6679 \begin_layout LyX-Code
6680 #!/bin/bash
6681 \begin_inset Newline newline
6682 \end_inset
6683
6684 cd $(dirname $1)
6685 \begin_inset Newline newline
6686 \end_inset
6687
6688 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6689 \end_layout
6690
6691 \begin_layout Standard
6692 This wrapper script is needed because SumatraPDF is a native Windows application
6693  and does not understand the posix paths used by the Cygwin version of LyX.
6694  If SumatraPDF.exe is not in your command PATH, use its full posix path in
6695  the script above.
6696  The 
6697 \begin_inset Flex Code
6698 status collapsed
6699
6700 \begin_layout Plain Layout
6701 -g
6702 \end_layout
6703
6704 \end_inset
6705
6706  enables communication via the 
6707 \emph on
6708 lyxsocket
6709 \emph default
6710 .
6711  Again, omit the 
6712 \begin_inset Flex Code
6713 status collapsed
6714
6715 \begin_layout Plain Layout
6716 -g
6717 \end_layout
6718
6719 \end_inset
6720
6721  option if you want to use the 
6722 \emph on
6723 lyxpipe
6724 \emph default
6725 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6726 \end_layout
6727
6728 \begin_layout Standard
6729 Reverse search is triggered by double-click.
6730 \change_inserted 1 1271453423
6731
6732 \end_layout
6733
6734 \begin_layout Section
6735
6736 \change_inserted 1 1271453442
6737 Forward search
6738 \end_layout
6739
6740 \begin_layout Standard
6741
6742 \change_inserted 1 1271454338
6743 To make forward search possible you need to provide generated output PDF/DVI
6744  file with additional information about TeX sources.
6745  This can be done via the methods described in the section 
6746 \begin_inset CommandInset ref
6747 LatexCommand ref
6748 reference "sub:rev-search"
6749
6750 \end_inset
6751
6752 .
6753 \end_layout
6754
6755 \begin_layout Standard
6756
6757 \change_inserted 1 1271454479
6758 Secondly you need to configure LyX for using your viewers in 
6759 \begin_inset Flex MenuItem
6760 status collapsed
6761
6762 \begin_layout Plain Layout
6763
6764 \change_inserted 1 1271453866
6765 Preferences\SpecialChar \menuseparator
6766 Output\SpecialChar \menuseparator
6767 General
6768 \end_layout
6769
6770 \end_inset
6771
6772 .
6773  Only some of the viewers allows this operation --- yap, xdvi, okular, Sumatra
6774  PDF
6775 \begin_inset Foot
6776 status collapsed
6777
6778 \begin_layout Plain Layout
6779
6780 \change_inserted 1 1271454273
6781 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
6782 ip
6783 \change_unchanged
6784
6785 \end_layout
6786
6787 \end_inset
6788
6789 .
6790  Some other viewers allow at least reloading and positioning to particular
6791  page of the file --- Evince or xpdf --- for these cases you can use external
6792  call of synctex.
6793  Please study the prepared examples in the Preferences dialog.
6794 \change_unchanged
6795
6796 \end_layout
6797
6798 \begin_layout Chapter
6799 Special Document Classes
6800 \end_layout
6801
6802 \begin_layout Section
6803 A&A Paper
6804 \end_layout
6805
6806 \begin_layout Standard
6807 by 
6808 \noun on
6809 Peter Sütterlin
6810 \end_layout
6811
6812 \begin_layout Subsection
6813 Introduction
6814 \end_layout
6815
6816 \begin_layout Standard
6817 This section describes how LyX can be used to write articles for submission
6818  to the scientific journal 
6819 \emph on
6820 Astronomy and Astrophysics
6821 \emph default
6822  (www.edpsciences.fr/aa/ 
6823 \begin_inset Flex URL
6824 status collapsed
6825
6826 \begin_layout Plain Layout
6827
6828 http://www.edpsciences.fr/aa/
6829 \end_layout
6830
6831 \end_inset
6832
6833 ) using Version 5.01 of the document class 
6834 \family typewriter
6835 aa.cls
6836 \family default
6837 .
6838  This package can be downloaded from the ftp site
6839 \end_layout
6840
6841 \begin_layout Standard
6842 \begin_inset VSpace medskip
6843 \end_inset
6844
6845
6846 \end_layout
6847
6848 \begin_layout Standard
6849 \align center
6850 \begin_inset Flex URL
6851 status collapsed
6852
6853 \begin_layout Plain Layout
6854
6855 ftp://ftp.edpsciences.org/pub/aa/readme.html
6856 \end_layout
6857
6858 \end_inset
6859
6860
6861 \end_layout
6862
6863 \begin_layout Standard
6864 \begin_inset VSpace medskip
6865 \end_inset
6866
6867
6868 \end_layout
6869
6870 \begin_layout Standard
6871 A manual comes together with that package, and this text is not meant to
6872  replace the original manual but is merely a short guide in how to realize
6873  the correct form of your paper.
6874  
6875 \end_layout
6876
6877 \begin_layout Standard
6878 Please note that the publisher of the journal was changed from Springer
6879  to EDP Sciences starting January 1, 2001.
6880  That change involved also some slight changes to the style files, namely
6881  the removal of the thesaurus command.
6882  The LyX class aa supports the newest version of these style files, V 5.01.
6883  If you have an older version installed, please upgrade.
6884  For compatibility, the old (version 4) layout has been kept as 
6885 \family sans
6886 article (A&A V4)
6887 \family default
6888 .
6889  Please refer to the comments in 
6890 \family typewriter
6891 LyXDir/layouts/aapaper.layout
6892 \family default
6893 .
6894 \end_layout
6895
6896 \begin_layout Subsection
6897 Getting started
6898 \end_layout
6899
6900 \begin_layout Standard
6901 It is recommended you start from the example template distributed with LyX.
6902  If you are not using a template, note the following settings:
6903 \end_layout
6904
6905 \begin_layout Itemize
6906 Select 
6907 \family sans
6908 article (A&A)
6909 \family default
6910  in the 
6911 \family sans
6912 Document\SpecialChar \menuseparator
6913 Settings
6914 \family default
6915  dialog (OK, that one was obvious).
6916 \end_layout
6917
6918 \begin_layout Itemize
6919 Don't change the option 
6920 \family sans
6921 Page
6922 \begin_inset space ~
6923 \end_inset
6924
6925 style
6926 \family default
6927 : Leave it set to 
6928 \family sans
6929 default
6930 \family default
6931 .
6932  The whole layout is done by the macros, you shouldn't change anything.
6933 \end_layout
6934
6935 \begin_layout Subsection
6936 The header block
6937 \end_layout
6938
6939 \begin_layout Standard
6940 First thing to enter is the header information.
6941  It consists of seven entries, of which some are optional.
6942  They are
6943 \end_layout
6944
6945 \begin_layout Itemize
6946
6947 \family sans
6948 Title
6949 \family default
6950 : [required] 
6951 \end_layout
6952
6953 \begin_layout Itemize
6954
6955 \family sans
6956 Subtitle
6957 \family default
6958 : [optional] 
6959 \end_layout
6960
6961 \begin_layout Itemize
6962
6963 \family sans
6964 Author
6965 \family default
6966 : [required]
6967 \end_layout
6968
6969 \begin_layout Itemize
6970
6971 \family sans
6972 Address
6973 \family default
6974 : [required]
6975 \end_layout
6976
6977 \begin_layout Itemize
6978
6979 \family sans
6980 Offprints
6981 \family default
6982 : [optional] if more than one author: whom to contact for offprint requests.
6983 \end_layout
6984
6985 \begin_layout Itemize
6986
6987 \family sans
6988 Mail
6989 \family default
6990 : [optional] mail address for contacts.
6991 \end_layout
6992
6993 \begin_layout Itemize
6994
6995 \family sans
6996 Date
6997 \family default
6998 : [required].
6999  Suggested format is 
7000 \family typewriter
7001 Received: <date>; Accepted <date> 
7002 \end_layout
7003
7004 \begin_layout Standard
7005 There is no need to issue the 
7006 \family typewriter
7007
7008 \backslash
7009 maketitle
7010 \family default
7011  command, this is done automatically by LyX when the header is finished.
7012  Although the order of the single header entries doesn't matter it is advised
7013  to keep the above sequence, just to get the best optics and meets the layout
7014  of the real document.
7015 \end_layout
7016
7017 \begin_layout Standard
7018 If you want to place footnotes in the header block, e.
7019 \begin_inset space \thinspace{}
7020 \end_inset
7021
7022 g.
7023 \begin_inset space \space{}
7024 \end_inset
7025
7026 to state your present address, just use the standard footnote via the menu
7027  
7028 \family sans
7029 Insert\SpecialChar \menuseparator
7030 Footnote.
7031
7032 \family default
7033  LyX will automagically use the term 
7034 \family typewriter
7035
7036 \backslash
7037 thanks{}
7038 \family default
7039  in that case.
7040 \end_layout
7041
7042 \begin_layout Standard
7043 In addition to these topics, the macros use three additional LaTeX commands
7044  that have no counterpart in LyX:
7045 \end_layout
7046
7047 \begin_layout Itemize
7048
7049 \family typewriter
7050
7051 \backslash
7052 and
7053 \family default
7054  to separate different names for more than one author and institute, respectivel
7055 y.
7056 \end_layout
7057
7058 \begin_layout Itemize
7059
7060 \family typewriter
7061
7062 \backslash
7063 inst{<nr>}
7064 \family default
7065 to mark corresponding author/institute pairs.
7066  The institutes are numbered sequentially as they appear in the 
7067 \family sans
7068 Address
7069 \family default
7070  field, so you have to put a marker to each author.
7071 \end_layout
7072
7073 \begin_layout Itemize
7074
7075 \family typewriter
7076
7077 \backslash
7078 email{address}
7079 \family default
7080  to supply an email address for fast contact.
7081 \end_layout
7082
7083 \begin_layout Standard
7084 In all cases, the appropriate command has to be entered in LyX and marked
7085  as LaTeX code.
7086  See the examples.
7087  
7088 \end_layout
7089
7090 \begin_layout Subsection
7091 The abstract
7092 \end_layout
7093
7094 \begin_layout Standard
7095 The abstract should immediately follow the header block.
7096  With version 5 the abstract environment was changed to a command, and there
7097  is now a resctriction to only one paragraph.
7098  In addition, it should contain an entry with the keywords.
7099  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7100  command 
7101 \family typewriter
7102
7103 \backslash
7104 keywords{}
7105 \family default
7106  by hand and mark it as LaTeX code.
7107  Refer to the example paper.
7108 \end_layout
7109
7110 \begin_layout Subsection
7111 Supported environments
7112 \end_layout
7113
7114 \begin_layout Standard
7115 The A&A paper layout supports the following environments for structuring
7116  your text:
7117 \end_layout
7118
7119 \begin_layout Itemize
7120
7121 \family sans
7122 Standard
7123 \end_layout
7124
7125 \begin_layout Itemize
7126
7127 \family sans
7128 Section
7129 \end_layout
7130
7131 \begin_layout Itemize
7132
7133 \family sans
7134 Subsection
7135 \end_layout
7136
7137 \begin_layout Itemize
7138
7139 \family sans
7140 Subsubsection
7141 \end_layout
7142
7143 \begin_layout Itemize
7144
7145 \family sans
7146 Itemize
7147 \end_layout
7148
7149 \begin_layout Itemize
7150
7151 \family sans
7152 Enumerate
7153 \end_layout
7154
7155 \begin_layout Itemize
7156
7157 \family sans
7158 Description
7159 \end_layout
7160
7161 \begin_layout Itemize
7162
7163 \family sans
7164 Caption
7165 \end_layout
7166
7167 \begin_layout Itemize
7168
7169 \family sans
7170 Abstract
7171 \end_layout
7172
7173 \begin_layout Itemize
7174
7175 \family sans
7176 Acknowledgment
7177 \end_layout
7178
7179 \begin_layout Itemize
7180
7181 \family sans
7182 Bibliography
7183 \end_layout
7184
7185 \begin_layout Itemize
7186
7187 \family sans
7188 LaTeX
7189 \end_layout
7190
7191 \begin_layout Subsection
7192 Commands not supported by LyX
7193 \end_layout
7194
7195 \begin_layout Standard
7196 Some commands are not yet supported by the 
7197 \family sans
7198 paper (A&A)
7199 \family default
7200  layout for LyX.
7201  Some have already been mentioned.
7202  For the sake of completeness, they are listed all together here:
7203 \end_layout
7204
7205 \begin_layout Itemize
7206
7207 \family typewriter
7208
7209 \backslash
7210 and
7211 \end_layout
7212
7213 \begin_layout Itemize
7214
7215 \family typewriter
7216
7217 \backslash
7218 email
7219 \end_layout
7220
7221 \begin_layout Itemize
7222
7223 \family typewriter
7224
7225 \backslash
7226 appendix
7227 \end_layout
7228
7229 \begin_layout Itemize
7230
7231 \family typewriter
7232
7233 \backslash
7234 authorrunning
7235 \end_layout
7236
7237 \begin_layout Itemize
7238
7239 \family typewriter
7240
7241 \backslash
7242 inst{}
7243 \end_layout
7244
7245 \begin_layout Itemize
7246
7247 \family typewriter
7248
7249 \backslash
7250 keywords{}
7251 \end_layout
7252
7253 \begin_layout Itemize
7254
7255 \family typewriter
7256
7257 \backslash
7258 object{}
7259 \end_layout
7260
7261 \begin_layout Itemize
7262
7263 \family typewriter
7264
7265 \backslash
7266 titlerunning{}
7267 \end_layout
7268
7269 \begin_layout Standard
7270 If you want to use any of these commands, you have to enter them yourself.
7271  
7272 \series bold
7273 Do not forget to mark them as LaTeX code!
7274 \end_layout
7275
7276 \begin_layout Subsection
7277 Figure and Table Floats
7278 \end_layout
7279
7280 \begin_layout Standard
7281 LyX provides support for the necessary float environments 
7282 \family sans
7283 figure, figure*, table
7284 \family default
7285  and 
7286 \family sans
7287 table*
7288 \family default
7289 , therefore we won't tell much about it here.
7290  Refer to the 
7291 \emph on
7292 User's
7293 \begin_inset space ~
7294 \end_inset
7295
7296 Guide
7297 \emph default
7298 .
7299  Just remember that tables should be left-aligned.
7300  For that, select the table and change the alignment in 
7301 \family sans
7302 Edit\SpecialChar \menuseparator
7303 Paragraph
7304 \begin_inset space ~
7305 \end_inset
7306
7307 Settings.
7308 \end_layout
7309
7310 \begin_layout Standard
7311 There is only one special thing: the figures with caption besides the figure.
7312  To create such a figure, you have to do the following:
7313 \end_layout
7314
7315 \begin_layout Enumerate
7316 Create a wide figure float: 
7317 \family sans
7318 Insert\SpecialChar \menuseparator
7319 Float\SpecialChar \menuseparator
7320 Figure
7321 \family default
7322 , then right click in the figure and select 
7323 \family sans
7324 \bar under
7325 S
7326 \bar default
7327 pan
7328 \begin_inset space ~
7329 \end_inset
7330
7331 columns
7332 \family default
7333 .
7334 \end_layout
7335
7336 \begin_layout Enumerate
7337 Enter your caption text.
7338 \end_layout
7339
7340 \begin_layout Enumerate
7341 Press 
7342 \family sans
7343 Return
7344 \family default
7345  to move the cursor above the caption.
7346 \end_layout
7347
7348 \begin_layout Enumerate
7349 Insert your figure
7350 \end_layout
7351
7352 \begin_layout Enumerate
7353 Position the cursor behind the figure and insert a horizontal fill: 
7354 \family sans
7355 Insert\SpecialChar \menuseparator
7356 Special
7357 \begin_inset space ~
7358 \end_inset
7359
7360 Character\SpecialChar \menuseparator
7361 Horizontal
7362 \begin_inset space ~
7363 \end_inset
7364
7365 Fill
7366 \family default
7367 .
7368 \end_layout
7369
7370 \begin_layout Enumerate
7371 Switch to LaTeX mode: 
7372 \family sans
7373 M-c
7374 \begin_inset space ~
7375 \end_inset
7376
7377 t
7378 \family default
7379 .
7380 \end_layout
7381
7382 \begin_layout Enumerate
7383 Enter 
7384 \family typewriter
7385
7386 \backslash
7387 parbox[b]{55mm}{
7388 \family default
7389 .
7390  
7391 \series bold
7392 Do not close the brace!
7393 \end_layout
7394
7395 \begin_layout Enumerate
7396 Position the cursor behind the caption text, switch to LaTeX mode and insert
7397  the closing brace: 
7398 \family sans
7399 M-c
7400 \begin_inset space ~
7401 \end_inset
7402
7403 t
7404 \family default
7405  
7406 \family typewriter
7407 }
7408 \family default
7409 .
7410 \end_layout
7411
7412 \begin_layout Standard
7413 Also, refer to the figures in the example paper.
7414 \end_layout
7415
7416 \begin_layout Subsection
7417 Referee layout
7418 \end_layout
7419
7420 \begin_layout Standard
7421 For submission, the paper has to be formated in a special double-spacing
7422  layout.
7423  For this purpose, you have to give the option 
7424 \family typewriter
7425 referee
7426 \family default
7427  to the documentclass.
7428  This must be done using the extra class options field in the 
7429 \family sans
7430 Document\SpecialChar \menuseparator
7431 Settings
7432 \family default
7433  dialog.
7434  Just enter the string 
7435 \family typewriter
7436 referee
7437 \family default
7438  there.
7439 \end_layout
7440
7441 \begin_layout Subsection
7442 The example paper
7443 \end_layout
7444
7445 \begin_layout Standard
7446 The 
7447 \family sans
7448 Examples
7449 \family default
7450  directory contains an example paper written with LyX.
7451  It is the example paper from the original macro package, translated to
7452  LyX.
7453  Use it for inspiration, and compare the original LaTeX code with LyX way
7454  of writing.
7455 \end_layout
7456
7457 \begin_layout Section
7458 AASTeX
7459 \end_layout
7460
7461 \begin_layout Standard
7462 by 
7463 \noun on
7464 Mike Ressler
7465 \end_layout
7466
7467 \begin_layout Subsection
7468 Introduction
7469 \end_layout
7470
7471 \begin_layout Standard
7472 AASTeX is a set of macros produced by the American Astronomical Society
7473  to facilitate electronic manuscript submission to the three journals they
7474  publish: the Astrophysical Journal (including the Letters and Supplement),
7475  the Astronomical Journal, and the Publications of the Astronomical Society
7476  of the Pacific.
7477  LyX has proven to be an excellent tool for generating these documents,
7478  especially given its equation, citation, and figure handling capabilities.
7479  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7480  is the version described here, or higher.
7481  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7482  incompatible with LyX.
7483  The AASTeX package may be downloaded from the AASTeX Web site
7484 \end_layout
7485
7486 \begin_layout Standard
7487 \begin_inset VSpace medskip
7488 \end_inset
7489
7490
7491 \end_layout
7492
7493 \begin_layout Standard
7494 \align center
7495 \begin_inset Flex URL
7496 status collapsed
7497
7498 \begin_layout Plain Layout
7499
7500 http://www.journals.uchicago.edu/AAS/AASTeX
7501 \end_layout
7502
7503 \end_inset
7504
7505
7506 \end_layout
7507
7508 \begin_layout Standard
7509 \begin_inset VSpace medskip
7510 \end_inset
7511
7512
7513 \end_layout
7514
7515 \begin_layout Standard
7516 A complete user guide is contained in that package and you should familiarize
7517  yourself with it thoroughly before embarking on writing a paper in LyX.
7518  LyX will not reduce the need to figure out all the AASTeX commands, it
7519  will only reduce the drudgery of typing everything in.
7520  It is your responsibility to ensure that the final exported LaTeX document
7521  conforms completely to the requirements of the journal to which you are
7522  submitting your paper.
7523 \end_layout
7524
7525 \begin_layout Subsection
7526 Starting a New Paper
7527 \end_layout
7528
7529 \begin_layout Standard
7530 I strongly suggest that you start with the AASTeX template file.
7531  Click on 
7532 \family sans
7533 File\SpecialChar \menuseparator
7534 New from
7535 \family default
7536  
7537 \family sans
7538 Template
7539 \family default
7540 , enter the new file name, then choose the 
7541 \family typewriter
7542 aastex.lyx
7543 \family default
7544  template.
7545  This will show the most common fields found in a manuscript.
7546  Simply overwrite the existing text (including the brackets, 
7547 \family typewriter
7548 <>
7549 \family default
7550 ) with the correct information.
7551  Many of the AASTeX commands and environments can be implemented directly
7552  in LyX, but some cannot: most noticeably 
7553 \family typewriter
7554
7555 \backslash
7556 altaffilmark
7557 \family default
7558  and 
7559 \family typewriter
7560
7561 \backslash
7562 altaffiltext
7563 \family default
7564 , which should stick out like a sore thumb if you actually just opened the
7565  template file.
7566  For commands such as these, the LaTeX code must be entered directly and
7567  marked as such.
7568  Such commands are referred to as TeX code, or Evil Red Text.
7569  I tried to minimize the amount of TeX code needed in an AASTeX document,
7570  but there is still a bit more required than any of us would like.
7571 \end_layout
7572
7573 \begin_layout Subsection
7574 Finishing Your Paper
7575 \end_layout
7576
7577 \begin_layout Standard
7578 When the paper is finished to your satisfaction and previews/prints correctly,
7579  there are a few 
7580 \begin_inset Quotes eld
7581 \end_inset
7582
7583 postprocessing
7584 \begin_inset Quotes erd
7585 \end_inset
7586
7587  actions which need to be done before you submit it to the journals.
7588  
7589 \end_layout
7590
7591 \begin_layout Enumerate
7592 Export your paper as a LaTeX file (
7593 \family sans
7594 File\SpecialChar \menuseparator
7595 Export\SpecialChar \menuseparator
7596 LaTeX
7597 \family default
7598 ).
7599  
7600 \end_layout
7601
7602 \begin_layout Enumerate
7603 Edit the resulting 
7604 \family typewriter
7605 .tex
7606 \family default
7607  file with your favorite text editor
7608 \end_layout
7609
7610 \begin_deeper
7611 \begin_layout Enumerate
7612 remove the comment lines before the 
7613 \family typewriter
7614
7615 \backslash
7616 documentclass
7617 \family default
7618  command
7619 \end_layout
7620
7621 \begin_layout Enumerate
7622 remove the 
7623 \family typewriter
7624
7625 \backslash
7626 usepackage...{fontenc}
7627 \family default
7628  line if it appears (usually just after 
7629 \family typewriter
7630
7631 \backslash
7632 documentclass
7633 \family default
7634 }; also remove the 
7635 \family typewriter
7636
7637 \backslash
7638 secnumdepth
7639 \family default
7640  line if it appears.
7641 \end_layout
7642
7643 \begin_layout Enumerate
7644 remove everything between (and including) the 
7645 \family typewriter
7646
7647 \backslash
7648 makeatletter
7649 \family default
7650  and 
7651 \family typewriter
7652
7653 \backslash
7654 makeatother
7655 \family default
7656  commands, except for any commands you specifically put into the LaTeX preamble
7657  (which should appear immediately after the 
7658 \begin_inset Quotes eld
7659 \end_inset
7660
7661 User specified LaTeX commands
7662 \begin_inset Quotes erd
7663 \end_inset
7664
7665  comment in the 
7666 \family typewriter
7667 .tex
7668 \family default
7669  file).
7670 \end_layout
7671
7672 \end_deeper
7673 \begin_layout Enumerate
7674 Run the resulting file through LaTeX to make sure it still processes correctly.
7675 \end_layout
7676
7677 \begin_layout Enumerate
7678 Reread the journal requirements to make sure your filenames and formats
7679  are correct.
7680 \end_layout
7681
7682 \begin_layout Enumerate
7683 Submit it.
7684 \end_layout
7685
7686 \begin_layout Subsection
7687 Comments On Specific Commands
7688 \end_layout
7689
7690 \begin_layout Standard
7691 I will not describe the detailed usage of the individual AASTeX commands:
7692  the AASTeX User Guide (
7693 \family typewriter
7694 aasguide.tex
7695 \family default
7696 ) gives a good description of each.
7697  Thus it's probably easiest for me to go down the list as found in the guide
7698  and offer comments where necessary.
7699  So let's begin \SpecialChar \ldots{}
7700
7701 \end_layout
7702
7703 \begin_layout Subsubsection
7704 Things that work as expected
7705 \end_layout
7706
7707 \begin_layout Standard
7708 \begin_inset ERT
7709 status open
7710
7711 \begin_layout Plain Layout
7712
7713
7714 \backslash
7715 begin{sloppypar}
7716 \end_layout
7717
7718 \end_inset
7719
7720
7721 \end_layout
7722
7723 \begin_layout Standard
7724 Because they work as you might expect, I simply list them and the section
7725  they are found in: 
7726 \family typewriter
7727
7728 \backslash
7729 documentclass
7730 \family default
7731  (2.1.1), 
7732 \family typewriter
7733
7734 \backslash
7735 begin{document}
7736 \family default
7737  (2.2), 
7738 \family typewriter
7739
7740 \backslash
7741 title
7742 \family default
7743  (2.3), 
7744 \family typewriter
7745
7746 \backslash
7747 author
7748 \family default
7749  (2.3), 
7750 \family typewriter
7751
7752 \backslash
7753 affil
7754 \family default
7755  (2.3), 
7756 \family typewriter
7757
7758 \backslash
7759 abstract
7760 \family default
7761  (2.4), 
7762 \family typewriter
7763
7764 \backslash
7765 keywords
7766 \family default
7767  (2.5), 
7768 \family typewriter
7769
7770 \backslash
7771 section
7772 \family default
7773  (2.7), 
7774 \family typewriter
7775
7776 \backslash
7777 subsection
7778 \family default
7779  (2.7), 
7780 \family typewriter
7781
7782 \backslash
7783 subsubsection
7784 \family default
7785  (2.7), 
7786 \family typewriter
7787
7788 \backslash
7789 paragraph
7790 \family default
7791  (2.7), 
7792 \family typewriter
7793
7794 \backslash
7795 facility
7796 \family default
7797  (2.10), 
7798 \family typewriter
7799
7800 \backslash
7801 begin{displaymath}
7802 \family default
7803  (2.12), 
7804 \family typewriter
7805
7806 \backslash
7807 begin{equation}
7808 \family default
7809  (2.12), 
7810 \family typewriter
7811
7812 \backslash
7813 begin{eqnarray}
7814 \family default
7815  (2.12), 
7816 \family typewriter
7817
7818 \backslash
7819 begin{mathletters}
7820 \family default
7821  (2.12), 
7822 \family typewriter
7823
7824 \backslash
7825 begin{thebibliography}
7826 \family default
7827  (2.13.1), 
7828 \family typewriter
7829
7830 \backslash
7831 bibitem
7832 \family default
7833  (2.13.2), all the cite commands and their variations (2.13.2), the generic
7834  graphicx figure commands (2.14.1), 
7835 \family typewriter
7836
7837 \backslash
7838 begin{table}
7839 \family default
7840  (2.15.4), 
7841 \family typewriter
7842
7843 \backslash
7844 begin{tabular}
7845 \family default
7846  (2.15.4), 
7847 \family typewriter
7848
7849 \backslash
7850 caption
7851 \family default
7852  (2.15.4), 
7853 \family typewriter
7854
7855 \backslash
7856 label
7857 \family default
7858  (2.15.4, amongst other places), 
7859 \family typewriter
7860
7861 \backslash
7862 tablerefs
7863 \family default
7864  (2.15.5), 
7865 \family typewriter
7866
7867 \backslash
7868 tablecomments
7869 \family default
7870  (2.15.5), 
7871 \family typewriter
7872
7873 \backslash
7874 url
7875 \family default
7876  (2.17.4), 
7877 \family typewriter
7878
7879 \backslash
7880 end{document}
7881 \family default
7882  (2.18).
7883 \end_layout
7884
7885 \begin_layout Standard
7886 The following style options also work correctly: 
7887 \family typewriter
7888 longabstract
7889 \family default
7890  (2.4), 
7891 \family typewriter
7892 preprint
7893 \family default
7894  (3.2.1), 
7895 \family typewriter
7896 preprint2
7897 \family default
7898  (3.2.2), 
7899 \family typewriter
7900 eqsecnum
7901 \family default
7902  (3.3), 
7903 \family typewriter
7904 flushrt
7905 \family default
7906  (3.4).
7907  Simply put them in the 
7908 \family sans
7909 Options
7910 \family default
7911  box in 
7912 \family sans
7913 Layout\SpecialChar \menuseparator
7914 Document
7915 \family default
7916 .
7917 \end_layout
7918
7919 \begin_layout Standard
7920 \begin_inset ERT
7921 status open
7922
7923 \begin_layout Plain Layout
7924
7925
7926 \backslash
7927 end{sloppypar}
7928 \end_layout
7929
7930 \end_inset
7931
7932
7933 \end_layout
7934
7935 \begin_layout Subsubsection
7936 Things that work, but require more comment
7937 \end_layout
7938
7939 \begin_layout Standard
7940 The following items work, but require a little more discussion:
7941 \end_layout
7942
7943 \begin_layout Itemize
7944 These items are reserved for use by the journal editors, but you can put
7945  them into the LaTeX preamble if you feel compelled to do so: 
7946 \family typewriter
7947
7948 \backslash
7949 received
7950 \family default
7951
7952 \family typewriter
7953
7954 \backslash
7955 revised
7956 \family default
7957
7958 \family typewriter
7959
7960 \backslash
7961 accepted
7962 \family default
7963
7964 \family typewriter
7965
7966 \backslash
7967 ccc
7968 \family default
7969
7970 \family typewriter
7971
7972 \backslash
7973 cpright
7974 \family default
7975  (all from 2.1.3)
7976 \end_layout
7977
7978 \begin_layout Itemize
7979 These items may be placed in the LaTeX preamble, and are included as blanks
7980  in the template file: 
7981 \family typewriter
7982
7983 \backslash
7984 slugcomment
7985 \family default
7986  (2.1.4), 
7987 \family typewriter
7988
7989 \backslash
7990 shorttitle
7991 \family default
7992  (2.1.5), 
7993 \family typewriter
7994
7995 \backslash
7996 shortauthors
7997 \family default
7998  (2.1.5)
7999 \end_layout
8000
8001 \begin_layout Itemize
8002
8003 \family typewriter
8004
8005 \backslash
8006 email
8007 \family default
8008  (2.3) – can only be used 
8009 \begin_inset Quotes eld
8010 \end_inset
8011
8012 standalone
8013 \begin_inset Quotes erd
8014 \end_inset
8015
8016 , not in the middle of a paragraph.
8017  Use TeX code if you need to embed it.
8018 \end_layout
8019
8020 \begin_layout Itemize
8021
8022 \family typewriter
8023
8024 \backslash
8025 and
8026 \family default
8027  (2.3) – will have extra {} after it.
8028  This should not cause an error.
8029 \end_layout
8030
8031 \begin_layout Itemize
8032
8033 \family typewriter
8034
8035 \backslash
8036 notetoeditor
8037 \family default
8038  (2.6) – can only be used 
8039 \begin_inset Quotes eld
8040 \end_inset
8041
8042 standalone
8043 \begin_inset Quotes erd
8044 \end_inset
8045
8046 , not in the middle of a paragraph.
8047  Use TeX code if you need to embed it.
8048 \end_layout
8049
8050 \begin_layout Itemize
8051
8052 \family typewriter
8053
8054 \backslash
8055 placetable
8056 \family default
8057  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8058  hand
8059 \end_layout
8060
8061 \begin_layout Itemize
8062
8063 \family typewriter
8064
8065 \backslash
8066 placefigure
8067 \family default
8068  (2.8) – same as for 
8069 \family typewriter
8070
8071 \backslash
8072 placetable
8073 \end_layout
8074
8075 \begin_layout Itemize
8076
8077 \family typewriter
8078
8079 \backslash
8080 acknowledgements
8081 \family default
8082  (2.9) – will have extra {} after it.
8083  This should not cause an error.
8084 \end_layout
8085
8086 \begin_layout Itemize
8087
8088 \family typewriter
8089
8090 \backslash
8091 appendix
8092 \family default
8093  (2.11) – will have extra {} after it.
8094  This should not cause an error.
8095 \end_layout
8096
8097 \begin_layout Itemize
8098
8099 \family typewriter
8100
8101 \backslash
8102 figcaption
8103 \family default
8104  (2.14.2) – you can insert an optional filename argument by placing the cursor
8105  at the beginning of the text and selecting 
8106 \family sans
8107 Insert\SpecialChar \menuseparator
8108 Short Title
8109 \family default
8110 .
8111  
8112 \begin_inset Quotes eld
8113 \end_inset
8114
8115 Short Title
8116 \begin_inset Quotes erd
8117 \end_inset
8118
8119  inserts an optional argument of the type needed by 
8120 \family typewriter
8121
8122 \backslash
8123 figcaption
8124 \family default
8125 .
8126  Hopefully it will be renamed someday.
8127 \end_layout
8128
8129 \begin_layout Itemize
8130
8131 \family typewriter
8132
8133 \backslash
8134 objectname
8135 \family default
8136  (2.17.1) – same as 
8137 \family typewriter
8138
8139 \backslash
8140 figcaption
8141 \family default
8142  for the catalog ID optional parameter
8143 \end_layout
8144
8145 \begin_layout Itemize
8146
8147 \family typewriter
8148
8149 \backslash
8150 dataset
8151 \family default
8152  (2.17.1) – same as 
8153 \family typewriter
8154
8155 \backslash
8156 figcaption
8157 \family default
8158  for the catalog ID optional parameter
8159 \end_layout
8160
8161 \begin_layout Subsubsection
8162 Things not implemented, use TeX code
8163 \end_layout
8164
8165 \begin_layout Standard
8166 \begin_inset ERT
8167 status open
8168
8169 \begin_layout Plain Layout
8170
8171
8172 \backslash
8173 begin{sloppypar}
8174 \end_layout
8175
8176 \end_inset
8177
8178
8179 \end_layout
8180
8181 \begin_layout Standard
8182
8183 \family typewriter
8184
8185 \backslash
8186 altaffilmark
8187 \family default
8188  (2.3), 
8189 \family typewriter
8190
8191 \backslash
8192 altaffiltext
8193 \family default
8194  (2.3), 
8195 \family typewriter
8196
8197 \backslash
8198 eqnum
8199 \family default
8200  (2.12), 
8201 \family typewriter
8202
8203 \backslash
8204 setcounter{equation}
8205 \family default
8206  (2.12), Journal name abbreviations (2.13.4), 
8207 \family typewriter
8208
8209 \backslash
8210 figurenum
8211 \family default
8212  (2.14.1), 
8213 \family typewriter
8214
8215 \backslash
8216 epsscale
8217 \family default
8218  (2.14.1), 
8219 \family typewriter
8220
8221 \backslash
8222 plotone
8223 \family default
8224  (2.14.1), 
8225 \family typewriter
8226
8227 \backslash
8228 plottwo
8229 \family default
8230  (2.14.1), 
8231 \family typewriter
8232
8233 \backslash
8234 tablenum
8235 \family default
8236  (2.15.4), 
8237 \family typewriter
8238
8239 \backslash
8240 tableline
8241 \family default
8242  (2.15.4, insert it as the first element in the lefthand cell after where
8243  you want it.
8244  Don't use any of LyX's rules in the table), 
8245 \family typewriter
8246
8247 \backslash
8248 tablenotemark
8249 \family default
8250  (2.15.5), 
8251 \family typewriter
8252
8253 \backslash
8254 tablenotetext
8255 \family default
8256  (2.15.5), much of Misc (2.17, except 
8257 \family typewriter
8258
8259 \backslash
8260 objectname
8261 \family default
8262
8263 \family typewriter
8264
8265 \backslash
8266 dataset
8267 \family default
8268
8269 \family typewriter
8270
8271 \backslash
8272 url
8273 \family default
8274 , and 
8275 \family typewriter
8276
8277 \backslash
8278 email
8279 \family default
8280 ; see above), 
8281 \family typewriter
8282
8283 \backslash
8284 singlespace
8285 \family default
8286  (3.1), 
8287 \family typewriter
8288
8289 \backslash
8290 doublespace
8291 \family default
8292  (3.1), 
8293 \family typewriter
8294
8295 \backslash
8296 onecolumn
8297 \family default
8298  (3.2), 
8299 \family typewriter
8300
8301 \backslash
8302 twocolumn
8303 \family default
8304  (3.2)
8305 \end_layout
8306
8307 \begin_layout Standard
8308 \begin_inset ERT
8309 status open
8310
8311 \begin_layout Plain Layout
8312
8313
8314 \backslash
8315 end{sloppypar}
8316 \end_layout
8317
8318 \end_inset
8319
8320
8321 \end_layout
8322
8323 \begin_layout Subsubsection
8324 Things that cannot be implemented
8325 \end_layout
8326
8327 \begin_layout Standard
8328 \SpecialChar \ldots{}
8329  at least in any meaningful sort of way, so I suggest ignoring them.
8330  They are the references environment (2.13.3), and the deluxetable environment
8331  (2.15).
8332  If you really, really need to use deluxetable, I suggest editing it in
8333  a separate file with a text editor, then using 
8334 \family sans
8335 Insert\SpecialChar \menuseparator
8336 Child
8337 \begin_inset space ~
8338 \end_inset
8339
8340 Document
8341 \family default
8342  to include it in your LyX document.
8343  See the 
8344 \family typewriter
8345 aas_sample.lyx
8346 \family default
8347  file to see an example of this.
8348 \end_layout
8349
8350 \begin_layout Subsection
8351 FAQs, Tips, Tricks, and Other Ruminations
8352 \end_layout
8353
8354 \begin_layout Subsubsection
8355 Getting LyX and AASTeX to cooperate
8356 \end_layout
8357
8358 \begin_layout Standard
8359 It can be a bit tricky to get LyX to recognize a new layout and document
8360  class.
8361  When all else fails, do this:
8362 \end_layout
8363
8364 \begin_layout Enumerate
8365 Make certain that LaTeX can find AASTeX.
8366  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8367  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8368 \family typewriter
8369 sample.tex
8370 \family default
8371 .
8372 \end_layout
8373
8374 \begin_layout Enumerate
8375 Make certain that 
8376 \family typewriter
8377 aastex.layout
8378 \family default
8379  appears in LyX's 
8380 \family typewriter
8381 layouts
8382 \family default
8383  folder
8384 \end_layout
8385
8386 \begin_layout Enumerate
8387 Rerun 
8388 \family sans
8389 Tools\SpecialChar \menuseparator
8390 Reconfigure
8391 \family default
8392  in LyX, then restart LyX.
8393 \end_layout
8394
8395 \begin_layout Enumerate
8396 Open a regular new file, not from a template.
8397  Does AASTeX appear in the class list in 
8398 \family sans
8399 Document\SpecialChar \menuseparator
8400 Settings
8401 \family default
8402 ?
8403 \end_layout
8404
8405 \begin_layout Standard
8406 If you get a warning from an existing AASTeX document about not being able
8407  to find the AASTeX layout or a message about 
8408 \begin_inset Quotes eld
8409 \end_inset
8410
8411 You should not mix title layouts with normal ones
8412 \begin_inset Quotes erd
8413 \end_inset
8414
8415 , things haven't been installed correctly.
8416 \end_layout
8417
8418 \begin_layout Subsubsection
8419 LaTeX error processing a table 
8420 \end_layout
8421
8422 \begin_layout Standard
8423 LyX, by default, attempts to center the table caption/title.
8424  This seems to produce a bad interaction in AASTeX so you should click somewhere
8425  in the caption/title, then select 
8426 \family sans
8427 Edit\SpecialChar \menuseparator
8428 Paragraph
8429 \begin_inset space ~
8430 \end_inset
8431
8432 Settings
8433 \family default
8434 , then set the 
8435 \family sans
8436 Alignment
8437 \family default
8438  to 
8439 \family sans
8440 Block
8441 \family default
8442 .
8443  This took care of it for me.
8444 \end_layout
8445
8446 \begin_layout Subsubsection
8447 References
8448 \end_layout
8449
8450 \begin_layout Standard
8451 A couple of things: 1) I have noticed some funny spacing in the reference
8452  entries in the text.
8453  When you enter the bibliography item data, make sure their is 
8454 \emph on
8455 no
8456 \emph default
8457  space between the last author and the parenthesis setting off the year;
8458  
8459 \emph on
8460 e.
8461 \begin_inset space \thinspace{}
8462 \end_inset
8463
8464 g.
8465 \begin_inset space \space{}
8466 \end_inset
8467
8468
8469 \emph default
8470 type 
8471 \family typewriter
8472 Ressler(1992)
8473 \family default
8474 , not 
8475 \family typewriter
8476 Ressler (1992)
8477 \family default
8478 .
8479  2) Entering the references at all is not obvious.
8480  The easiest thing is to start typing your first reference at the end of
8481  the document, then mark it as type 
8482 \family sans
8483 References
8484 \family default
8485 .
8486  That will put a small gray box in front of what you just typed.
8487  Click on the box to fill in the rest of the information.
8488  For new references, go to the end of an existing reference and press return.
8489  That will create a new line with its own box, etc.
8490 \end_layout
8491
8492 \begin_layout Subsubsection
8493 Including EPS files
8494 \end_layout
8495
8496 \begin_layout Standard
8497 Even though AASTeX provides its own figure commands (
8498 \family typewriter
8499
8500 \backslash
8501 plotone
8502 \family default
8503 , for example), I much prefer LaTeX's standard figure commands (with the
8504  default graphicx).
8505  You can insert the 
8506 \family typewriter
8507
8508 \backslash
8509 plotone
8510 \family default
8511 , etc.
8512 \begin_inset space ~
8513 \end_inset
8514
8515 commands as TeX code into a Figure Float box if you desire, but I never
8516  have much luck getting the layout right.
8517  With the standard graphics, LyX will insert a 
8518 \family typewriter
8519
8520 \backslash
8521 usepackage{graphicx}
8522 \family default
8523  command into the LaTeX preamble and handle the figures in the standard
8524  LaTeX2e way, interspersing the figures in the text.
8525  I believe ApJ accepts figures exactly this way now; AJ might still use
8526  the 
8527 \begin_inset Quotes eld
8528 \end_inset
8529
8530 stack everything at the end
8531 \begin_inset Quotes erd
8532 \end_inset
8533
8534  technique.
8535 \end_layout
8536
8537 \begin_layout Subsubsection
8538 Things I could have done, but didn't
8539 \end_layout
8540
8541 \begin_layout Standard
8542 There are a few 
8543 \begin_inset Quotes eld
8544 \end_inset
8545
8546 pretty
8547 \begin_inset Quotes erd
8548 \end_inset
8549
8550  things I could have implemented, but chose not to.
8551  For instance, I saw no point in double-spacing the text in the LyX window,
8552  even though it is double-spaced in the paper manuscript.
8553  Also, I chose not to make separate layouts for the preprint and preprint2
8554  styles.
8555  Since I assume you will spend most of your time in the plain manuscript
8556  mode anyway, I decided not to chew up more disk space with this.
8557  
8558 \end_layout
8559
8560 \begin_layout Subsection
8561 Final Caveat
8562 \end_layout
8563
8564 \begin_layout Standard
8565 Your mileage may vary.
8566  I've now had papers published by both ApJ and AJ that have had 98% of the
8567  effort done in LyX; the last 2% was the LaTeX post-processing and a few
8568  cleanups.
8569  I have had no trouble with the submission process, and I'm sure the journals
8570  were never aware that there might be a difference.
8571  So, go forth and publish!
8572 \end_layout
8573
8574 \begin_layout Section
8575 AMS LaTeX
8576 \end_layout
8577
8578 \begin_layout Standard
8579 by 
8580 \noun on
8581 David Johnson; updated by Richard Heck
8582 \end_layout
8583
8584 \begin_layout Standard
8585 \begin_inset VSpace bigskip
8586 \end_inset
8587
8588
8589 \end_layout
8590
8591 \begin_layout Standard
8592 \noindent
8593 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8594  papers to be submitted to American Mathematical Society publications.
8595  The layouts are not tailored to a specific journal, but easily can be.
8596  You should refer to the AMS documentation for specific instructions for
8597  each journal (usually it will entail only changing a single line in the
8598  TeX output).
8599  That documentation is available on the Web at 
8600 \begin_inset Flex URL
8601 status open
8602
8603 \begin_layout Plain Layout
8604
8605 http://www.ams.org
8606 \end_layout
8607
8608 \end_inset
8609
8610  or by ftp at 
8611 \begin_inset Flex URL
8612 status open
8613
8614 \begin_layout Plain Layout
8615
8616 ftp://ftp.ams.org/pub/tex/amslatex/
8617 \end_layout
8618
8619 \end_inset
8620
8621 .
8622  These layouts are appropriate, and useful, for any mathematical writing.
8623  
8624 \end_layout
8625
8626 \begin_layout Standard
8627 There are two basic AMS LaTeX layouts: 
8628 \end_layout
8629
8630 \begin_layout Itemize
8631 amsart: The standard AMS article format.
8632 \end_layout
8633
8634 \begin_layout Itemize
8635 amsbook: the standard AMS book (really, monograph) format.
8636  
8637 \end_layout
8638
8639 \begin_layout Standard
8640 The layouts themselves contain only the minimum necessary to use the AMS
8641  classes.
8642  They do not, in particular, contain any of the `theorem' environments used
8643  for setting theorems, lemmas, and the like.
8644  These are contained, instead, in the 
8645 \begin_inset Flex Code
8646 status collapsed
8647
8648 \begin_layout Plain Layout
8649 Theorems (AMS)
8650 \end_layout
8651
8652 \end_inset
8653
8654  module, which is loaded by default when when you select one of the AMS
8655  classes.
8656  (It can also be used with other classes and can be removed, if you would
8657  rather use something else.) Less commonly used environments are in the 
8658 \begin_inset Flex Code
8659 status collapsed
8660
8661 \begin_layout Plain Layout
8662 Theorems (AMS-Extended)
8663 \end_layout
8664
8665 \end_inset
8666
8667  module, which must be loaded manually.
8668 \end_layout
8669
8670 \begin_layout Standard
8671 By default, theorems and the like are numbered consecutively throughout
8672  the document, but this may be modified by loading the module 
8673 \begin_inset Flex Code
8674 status collapsed
8675
8676 \begin_layout Plain Layout
8677 Theorems (Order by Section)
8678 \end_layout
8679
8680 \end_inset
8681
8682  or, if you are using 
8683 \begin_inset Flex Code
8684 status collapsed
8685
8686 \begin_layout Plain Layout
8687 book (AMS)
8688 \end_layout
8689
8690 \end_inset
8691
8692 , the module 
8693 \begin_inset Flex Code
8694 status collapsed
8695
8696 \begin_layout Plain Layout
8697 Theorems (Order by Chapter)
8698 \end_layout
8699
8700 \end_inset
8701
8702 .
8703  These will number the results as 
8704 \begin_inset Formula $n.m$
8705 \end_inset
8706
8707 , where the first number refers to the section (or chapter) and the second
8708  refers to the total number of results so far in that section (or chapter).
8709  Many environments are also available unnumbered.
8710  These are indicated by an asterisk at the end.
8711  If you happen to want 
8712 \emph on
8713 only
8714 \emph default
8715  unnumbered results, the module 
8716 \begin_inset Flex Code
8717 status collapsed
8718
8719 \begin_layout Plain Layout
8720 Theorems (Starred)
8721 \end_layout
8722
8723 \end_inset
8724
8725  provides that option.
8726 \end_layout
8727
8728 \begin_layout Standard
8729 Note that these modules do not 
8730 \emph on
8731 have
8732 \emph default
8733  to be used with the AMS classes.
8734  It is perfectly possible to use the 
8735 \begin_inset Flex Code
8736 status collapsed
8737
8738 \begin_layout Plain Layout
8739 Theorems (AMS)
8740 \end_layout
8741
8742 \end_inset
8743
8744  module, and the others mentioned, with other classes, such as 
8745 \begin_inset Flex Code
8746 status collapsed
8747
8748 \begin_layout Plain Layout
8749 article
8750 \end_layout
8751
8752 \end_inset
8753
8754
8755 \begin_inset Flex Code
8756 status collapsed
8757
8758 \begin_layout Plain Layout
8759 report
8760 \end_layout
8761
8762 \end_inset
8763
8764
8765 \begin_inset Flex Code
8766 status collapsed
8767
8768 \begin_layout Plain Layout
8769 book (KOMA-script)
8770 \end_layout
8771
8772 \end_inset
8773
8774 , and so forth.
8775 \end_layout
8776
8777 \begin_layout Subsection
8778 What these layouts provide
8779 \end_layout
8780
8781 \begin_layout Standard
8782 There is a long list of included environments provided by these layouts.
8783  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
8784  variety of `theorem' environments.
8785  However, the AMS recommends the environments that are available in LyX.
8786  
8787 \end_layout
8788
8789 \begin_layout Standard
8790 The following environments—as well as the standard environments, such as
8791  
8792 \begin_inset Flex Noun
8793 status collapsed
8794
8795 \begin_layout Plain Layout
8796 section
8797 \end_layout
8798
8799 \end_inset
8800
8801
8802 \begin_inset Flex Noun
8803 status collapsed
8804
8805 \begin_layout Plain Layout
8806 bibliography
8807 \end_layout
8808
8809 \end_inset
8810
8811
8812 \begin_inset Flex Noun
8813 status collapsed
8814
8815 \begin_layout Plain Layout
8816 title
8817 \end_layout
8818
8819 \end_inset
8820
8821
8822 \begin_inset Flex Noun
8823 status collapsed
8824
8825 \begin_layout Plain Layout
8826 author
8827 \end_layout
8828
8829 \end_inset
8830
8831 , and 
8832 \begin_inset Flex Noun
8833 status collapsed
8834
8835 \begin_layout Plain Layout
8836 date
8837 \end_layout
8838
8839 \end_inset
8840
8841 —are provided by 
8842 \begin_inset Flex Code
8843 status collapsed
8844
8845 \begin_layout Plain Layout
8846 article (AMS)
8847 \end_layout
8848
8849 \end_inset
8850
8851  and 
8852 \begin_inset Flex Code
8853 status collapsed
8854
8855 \begin_layout Plain Layout
8856 book (AMS)
8857 \end_layout
8858
8859 \end_inset
8860
8861 :
8862 \end_layout
8863
8864 \begin_layout Description
8865 Address This should be the author's permanent address.
8866 \end_layout
8867
8868 \begin_layout Description
8869 Current
8870 \begin_inset space ~
8871 \end_inset
8872
8873 Address This should be the author's temporary address at the time of submission,
8874  if different from the Address.
8875 \end_layout
8876
8877 \begin_layout Description
8878 Email Author's e-mail address
8879 \end_layout
8880
8881 \begin_layout Description
8882 URL Author's Web address, if desired.
8883 \end_layout
8884
8885 \begin_layout Description
8886 Keywords Key words or phrases used to identify specific topics discussed
8887  in the paper.
8888 \end_layout
8889
8890 \begin_layout Description
8891 Subjectclass These refer to the AMS Subject Classifications, published and
8892  described in 
8893 \emph on
8894 Mathematical Reviews
8895 \emph default
8896 .
8897  These are also available online at the AMS cites listed above.
8898 \end_layout
8899
8900 \begin_layout Description
8901 Thanks
8902 \end_layout
8903
8904 \begin_layout Description
8905 Dedicatory
8906 \end_layout
8907
8908 \begin_layout Description
8909 Translator
8910 \end_layout
8911
8912 \begin_layout Standard
8913 The following environments are provided by both the 
8914 \begin_inset Flex Code
8915 status collapsed
8916
8917 \begin_layout Plain Layout
8918 Theorems
8919 \end_layout
8920
8921 \end_inset
8922
8923  and 
8924 \begin_inset Flex Code
8925 status collapsed
8926
8927 \begin_layout Plain Layout
8928 Theorems (AMS)
8929 \end_layout
8930
8931 \end_inset
8932
8933  modules, in the latter case in both starred (unnumbered) and unstarred
8934  (numbered) versions.
8935  These same environments are provided only in the starred versions by the
8936  
8937 \begin_inset Flex Code
8938 status collapsed
8939
8940 \begin_layout Plain Layout
8941 Theorems (Starred)
8942 \end_layout
8943
8944 \end_inset
8945
8946  module:
8947 \end_layout
8948
8949 \begin_layout Theorem
8950 This is typically used for the statements of major results.
8951  
8952 \end_layout
8953
8954 \begin_layout Corollary*
8955 This is used for statements which follow fairly directly from previous statement
8956 s.
8957  Again, these can be major results.
8958  
8959 \end_layout
8960
8961 \begin_layout Lemma
8962 These are smaller results needed to prove other statements.
8963 \end_layout
8964
8965 \begin_layout Proposition
8966 These are less major results which (hopefully) add to the general theory
8967  being discussed.
8968 \end_layout
8969
8970 \begin_layout Conjecture
8971 These are statements provided without justification, which the author does
8972  not know how to prove, but which seem to be true (to the author, at least).
8973 \end_layout
8974
8975 \begin_layout Definition*
8976 Guess what this is for.
8977  The font is different for this environment than for the previous ones.
8978  
8979 \end_layout
8980
8981 \begin_layout Example*
8982 Used for examples illustrating proven results.
8983 \end_layout
8984
8985 \begin_layout Problem
8986 It's not really known what this is for.
8987  You should figure it out.
8988 \end_layout
8989
8990 \begin_layout Exercise*
8991 Write a description for this one.
8992 \end_layout
8993
8994 \begin_layout Remark
8995 This environment is also a type of theorem, usually a lesser sort of observation.
8996 \end_layout
8997
8998 \begin_layout Claim*
8999 Often used in the course of giving a proof of a larger result.
9000 \end_layout
9001
9002 \begin_layout Case
9003 Generally, these are used to break up long arguments, using specific instances
9004  of some condition.
9005  
9006 \end_layout
9007
9008 \begin_layout Case
9009 The numbering scheme for cases is on its own, not together with other numbered
9010  statements.
9011  
9012 \end_layout
9013
9014 \begin_layout Proof
9015 At the end of this environment, a QED symbol (usually a square, but it can
9016  vary with different styles) is placed.
9017  If you want to have other environments within this one—for example, Case
9018  environments—and have the QED symbol appear only after them, then the other
9019  environments need to be nested within the proof environment.
9020  See the section 
9021 \emph on
9022 Nesting Environments
9023 \emph default
9024  of the 
9025 \emph on
9026 User's Guide
9027 \emph default
9028  for information on nesting.
9029 \end_layout
9030
9031 \begin_layout Standard
9032 And these environments are provided by 
9033 \begin_inset Flex Code
9034 status collapsed
9035
9036 \begin_layout Plain Layout
9037 Theorems (AMS-Extended)
9038 \end_layout
9039
9040 \end_inset
9041
9042 :
9043 \end_layout
9044
9045 \begin_layout Criterion*
9046 A required condition.
9047 \end_layout
9048
9049 \begin_layout Algorithm*
9050 A general procedure to be used.
9051 \end_layout
9052
9053 \begin_layout Axiom*
9054 This is a property or statement taken as true within the system being discussed.
9055 \end_layout
9056
9057 \begin_layout Condition*
9058 Sometimes used to state a condition assumed within the present context of
9059  discussion.
9060 \end_layout
9061
9062 \begin_layout Note*
9063 Similar to a Remark.
9064 \end_layout
9065
9066 \begin_layout Notation*
9067 Used for the explanation of, yes, notation.
9068 \end_layout
9069
9070 \begin_layout Summary
9071 Do we really need to tell you? 
9072 \end_layout
9073
9074 \begin_layout Acknowledgement*
9075 Acknowledgement.
9076 \end_layout
9077
9078 \begin_layout Conclusion*
9079 Sometimes used at the end of a long train of argument.
9080 \end_layout
9081
9082 \begin_layout Fact
9083 Used in a way similar to Proposition, though perhaps lower on the scale.
9084 \end_layout
9085
9086 \begin_layout Standard
9087 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9088  fonts packages.
9089  They need to be available on your system in order to use these environments.
9090 \end_layout
9091
9092 \begin_layout Section
9093 AGU journals (
9094 \family sans
9095 aguplus
9096 \family default
9097 )
9098 \end_layout
9099
9100 \begin_layout Standard
9101 by 
9102 \shape smallcaps
9103 Martin Vermeer
9104 \end_layout
9105
9106 \begin_layout Subsection
9107 Description
9108 \end_layout
9109
9110 \begin_layout Standard
9111 These are the layout files for some of the journals of the American Geophysical
9112  Society.
9113  It is assumed that you have both the AGU's own class files and AGUplus
9114  installed (everything to be found at
9115 \begin_inset Flex URL
9116 status collapsed
9117
9118 \begin_layout Plain Layout
9119
9120 ftp://ftp.agu.org/journals/latex/journals
9121 \end_layout
9122
9123 \end_inset
9124
9125 ).
9126 \end_layout
9127
9128 \begin_layout Subsection
9129 New styles
9130 \end_layout
9131
9132 \begin_layout Standard
9133 Redefined are 
9134 \family sans
9135 Paragraph
9136 \family default
9137
9138 \family sans
9139 Paragraph*
9140 \family default
9141 .
9142  They are still called this in the LyX GUI, though their LaTeX equivalents
9143  in the AGU classes are 
9144 \family sans
9145 Subsubsubsection
9146 \family default
9147  and 
9148 \family sans
9149 Subsubsubsection*
9150 \family default
9151 .
9152 \end_layout
9153
9154 \begin_layout Standard
9155 Newly defined styles are 
9156 \family sans
9157 Left_Header
9158 \family default
9159
9160 \family sans
9161 Right_Header
9162 \family default
9163
9164 \family sans
9165 Received
9166 \family default
9167
9168 \family sans
9169 Revised
9170 \family default
9171
9172 \family sans
9173 Accepted
9174 \family default
9175
9176 \family sans
9177 CCC
9178 \family default
9179
9180 \family sans
9181 PaperId
9182 \family default
9183
9184 \family sans
9185 AuthorAddr
9186 \family default
9187
9188 \family sans
9189 SlugComment
9190 \family default
9191 .
9192  These are mostly manuscript attributes and defined in the AGU class documentati
9193 on.
9194 \end_layout
9195
9196 \begin_layout Standard
9197 I suspect this is still badly incomplete.
9198 \end_layout
9199
9200 \begin_layout Subsection
9201 New floats
9202 \end_layout
9203
9204 \begin_layout Standard
9205
9206 \family sans
9207 Planotable
9208 \family default
9209  and 
9210 \family sans
9211 Plate
9212 \family default
9213 .
9214  We also have a new 
9215 \family sans
9216 Table_Caption
9217 \family default
9218 .
9219 \end_layout
9220
9221 \begin_layout Subsection
9222 Supported journals
9223 \end_layout
9224
9225 \begin_layout Itemize
9226
9227 \emph on
9228 Journal of Geophysical Research
9229 \emph default
9230
9231 \family typewriter
9232 jgrga.layout
9233 \family default
9234  — Martin Vermeer
9235 \end_layout
9236
9237 \begin_layout Standard
9238 Add your own, it isn't so hard! Look at the 
9239 \family typewriter
9240 jgrga.layout
9241 \family default
9242  example and 
9243 \family typewriter
9244 aguplus.inc
9245 \family default
9246 .
9247 \end_layout
9248
9249 \begin_layout Subsection
9250 Bugs and things to remember
9251 \end_layout
9252
9253 \begin_layout Standard
9254 In order to use the new layouts, you must remember to do the following for
9255  a new document:
9256 \end_layout
9257
9258 \begin_layout Enumerate
9259
9260 \emph on
9261 Turn off babel
9262 \emph default
9263 .
9264  This can be done in the 
9265 \family sans
9266 Layout\SpecialChar \menuseparator
9267 Document
9268 \family default
9269  or 
9270 \family sans
9271 Document\SpecialChar \menuseparator
9272 Settings
9273 \family default
9274  menu item.
9275  (AGU articles are always in English, right? So 
9276 \emph on
9277 don't
9278 \emph default
9279  choose a language.)
9280 \end_layout
9281
9282 \begin_layout Enumerate
9283 Enter 
9284 \family typewriter
9285 jgrga
9286 \family default
9287  into the document's 
9288 \family sans
9289 Extra Options
9290 \family default
9291  field.
9292  (Yes, this is a bug.)
9293 \end_layout
9294
9295 \begin_layout Enumerate
9296 Make sure you use the 
9297 \family typewriter
9298 agu.bst
9299 \family default
9300  bibliography style, by entering 
9301 \family sans
9302 agu
9303 \family default
9304  into the second field of the BibTeX inset.
9305  None of the standard styles will do.
9306 \end_layout
9307
9308 \begin_layout Section
9309 Broadway
9310 \end_layout
9311
9312 \begin_layout Standard
9313 by 
9314 \shape smallcaps
9315 Garst Reese
9316 \end_layout
9317
9318 \begin_layout Subsection
9319 Introduction
9320 \end_layout
9321
9322 \begin_layout Standard
9323 Broadway is for writing plays.
9324  The format is more decorative than Hollywood, and much less standardized.
9325  This format should be suitable for workshops.
9326 \end_layout
9327
9328 \begin_layout Subsection
9329 Special problems
9330 \end_layout
9331
9332 \begin_layout Standard
9333 The same as in Hollywood.
9334 \end_layout
9335
9336 \begin_layout Subsection
9337 Special features
9338 \end_layout
9339
9340 \begin_layout Standard
9341 Insert the 
9342 \family sans
9343 Speaker
9344 \family default
9345  names as labels then cross-reference the label to insert the name.
9346  The cross-reference dialog will show the current cast of characters.
9347 \end_layout
9348
9349 \begin_layout Subsection
9350 Paper size and Margins
9351 \end_layout
9352
9353 \begin_layout Standard
9354 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9355 \end_layout
9356
9357 \begin_layout Subsection
9358 Environments
9359 \end_layout
9360
9361 \begin_layout Standard
9362 The following environments are available.
9363  You can use broadway.bind to get the bind keys shown at the right.
9364 \end_layout
9365
9366 \begin_layout Itemize
9367
9368 \family sans
9369 Standard
9370 \begin_inset Newline newline
9371 \end_inset
9372
9373
9374 \family default
9375 You should not have to use this, but it is here for anything that does not
9376  fit otherwise.
9377 \end_layout
9378
9379 \begin_layout Itemize
9380
9381 \family sans
9382 Narrative
9383 \begin_inset space \hfill{}
9384 \end_inset
9385
9386 M-z n
9387 \begin_inset Newline newline
9388 \end_inset
9389
9390
9391 \family default
9392 Used to describe stage setting and the action.
9393  First use of speaker names in all CAPs.
9394 \end_layout
9395
9396 \begin_layout Itemize
9397
9398 \family sans
9399 ACT
9400 \begin_inset space \hfill{}
9401 \end_inset
9402
9403 M-z a
9404 \begin_inset Newline newline
9405 \end_inset
9406
9407
9408 \family default
9409 Automatically numbered.
9410  On screen it will be arabic, but will print as Roman.
9411 \end_layout
9412
9413 \begin_layout Itemize
9414
9415 \family sans
9416 ACT*
9417 \begin_inset space \hfill{}
9418 \end_inset
9419
9420 M-z S at
9421 \begin_inset Newline newline
9422 \end_inset
9423
9424
9425 \family default
9426 Subtitle for 
9427 \family sans
9428 ACT.
9429
9430 \family default
9431  It is just centered text.
9432 \end_layout
9433
9434 \begin_layout Itemize
9435
9436 \family sans
9437 SCENE
9438 \begin_inset space \hfill{}
9439 \end_inset
9440
9441 M-z S-S
9442 \begin_inset Newline newline
9443 \end_inset
9444
9445
9446 \family default
9447 Not automatically numbered.
9448  You supply the number.
9449  This is because I couldn't figure out how.
9450 \end_layout
9451
9452 \begin_layout Itemize
9453
9454 \family sans
9455 AT_RISE:
9456 \begin_inset space \hfill{}
9457 \end_inset
9458
9459 M-z S-R
9460 \begin_inset Newline newline
9461 \end_inset
9462
9463
9464 \family default
9465 A special case of Narrative to describe the setting and action as the curtain
9466  rises.
9467 \end_layout
9468
9469 \begin_layout Itemize
9470
9471 \family sans
9472 Speaker
9473 \begin_inset space \hfill{}
9474 \end_inset
9475
9476 M-z s
9477 \begin_inset Newline newline
9478 \end_inset
9479
9480
9481 \family default
9482 The speaker's (actor's) title, centered in all CAPS.
9483 \end_layout
9484
9485 \begin_layout Itemize
9486
9487 \family sans
9488 Parenthetical
9489 \begin_inset space \hfill{}
9490 \end_inset
9491
9492 M-z p
9493 \begin_inset Newline newline
9494 \end_inset
9495
9496
9497 \family default
9498 Instructions to the speaker.
9499  The parentheses are automatically inserted.
9500  The ( will appear on screen, but both will be in the printed play.
9501  This environment is only used within 
9502 \family sans
9503 Dialogue
9504 \family default
9505 .
9506 \end_layout
9507
9508 \begin_layout Itemize
9509
9510 \family sans
9511 Dialogue
9512 \begin_inset space \hfill{}
9513 \end_inset
9514
9515 M-z d
9516 \begin_inset Newline newline
9517 \end_inset
9518
9519
9520 \family default
9521 What the Speaker says.
9522 \end_layout
9523
9524 \begin_layout Itemize
9525
9526 \family sans
9527 CURTAIN
9528 \begin_inset space \hfill{}
9529 \end_inset
9530
9531 M-z S-C
9532 \begin_inset Newline newline
9533 \end_inset
9534
9535
9536 \family default
9537 The curtain comes down.
9538 \end_layout
9539
9540 \begin_layout Itemize
9541
9542 \family sans
9543 Title
9544 \begin_inset space \hfill{}
9545 \end_inset
9546
9547 M-z S-T
9548 \end_layout
9549
9550 \begin_layout Itemize
9551
9552 \family sans
9553 Author
9554 \begin_inset space \hfill{}
9555 \end_inset
9556
9557 M-z S-A
9558 \end_layout
9559
9560 \begin_layout Itemize
9561
9562 \family sans
9563 Right_Address
9564 \begin_inset space \hfill{}
9565 \end_inset
9566
9567 M-z r
9568 \end_layout
9569
9570 \begin_layout Standard
9571 Hello there.
9572 \end_layout
9573
9574 \begin_layout Section
9575 Dinbrief
9576 \end_layout
9577
9578 \begin_layout Standard
9579 The document class 
9580 \family sans
9581 dinbrief
9582 \family default
9583  can be used to type letters according to German conventions.
9584  A template file is included in 
9585 \family typewriter
9586 .../lyx/share/templates
9587 \family default
9588  for you to use as a starting point.
9589 \end_layout
9590
9591 \begin_layout Section
9592 EGS journals (
9593 \family sans
9594 egs
9595 \family default
9596 )
9597 \end_layout
9598
9599 \begin_layout Standard
9600 by 
9601 \shape smallcaps
9602 Martin Vermeer
9603 \end_layout
9604
9605 \begin_layout Subsection
9606 Description
9607 \end_layout
9608
9609 \begin_layout Standard
9610 This is the layout file for the European Geophysical Society journals.
9611  The needed 
9612 \family typewriter
9613 egs.cls
9614 \family default
9615  can be downloaded from the web site of the EGS under 
9616 \begin_inset Flex URL
9617 status collapsed
9618
9619 \begin_layout Plain Layout
9620
9621 www.copernicus.org
9622 \end_layout
9623
9624 \end_inset
9625
9626 .
9627 \end_layout
9628
9629 \begin_layout Subsection
9630 New styles
9631 \end_layout
9632
9633 \begin_layout Standard
9634
9635 \family sans
9636 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9637  Accepted
9638 \family default
9639
9640 \family sans
9641 Offsets
9642 \family default
9643 .
9644  The current layout file is unfortunately very unmodular and would benefit
9645  from using the various 
9646 \family typewriter
9647 std*.inc
9648 \family default
9649  file inclusions.
9650 \end_layout
9651
9652 \begin_layout Section
9653 Elsevier Journals
9654 \end_layout
9655
9656 \begin_layout Standard
9657 By 
9658 \noun on
9659 Rod Pinna
9660 \end_layout
9661
9662 \begin_layout Standard
9663 Elsevier Science Publishers B.V.
9664  provides a standard LaTeX document class (
9665 \family typewriter
9666 elsart.cls
9667 \family default
9668 ) for submitting articles to their various journals.
9669  The style file can be downloaded directly from their web site: 
9670 \begin_inset Flex URL
9671 status collapsed
9672
9673 \begin_layout Plain Layout
9674
9675 http://www.elsevier.com/wps/find/authorsview.authors/latex
9676 \end_layout
9677
9678 \end_inset
9679
9680 .
9681  Instructions are supplied along with the class file, which details the
9682  requirements of the publishers.
9683  LyX includes a package that allows for the use of this class, by a layout
9684  and a template file.
9685  Installation of the class file is the same as for any other LaTeX package;
9686  instructions are provided in the Elsevier documentation.
9687 \end_layout
9688
9689 \begin_layout Standard
9690 To make use of 
9691 \family typewriter
9692 elsart.cls
9693 \family default
9694 , a file 
9695 \family typewriter
9696 elsart.layout
9697 \family default
9698  is supplied.
9699  As the Elsevier class file is based mainly on the standard article class,
9700  most of the normal functionality is provided.
9701  The Elsevier class defines a number of mathematical environments, which
9702  are similar to the AMS environments.
9703  These commands are all described in the Elsevier documentation, and are
9704  available in LyX.
9705 \end_layout
9706
9707 \begin_layout Standard
9708 The easiest way to use the Elsevier style is to base documents on the included
9709  template file.
9710  It is best not to use options such as fancy headings or the geometry package,
9711  as elements such as these are defined by Elsevier in their style file.
9712  Ideally, no extra packages except those mentioned in the Elsevier documentation
9713  should be used.
9714  Essentially, Elsevier require as 
9715 \begin_inset Quotes eld
9716 \end_inset
9717
9718 clean
9719 \begin_inset Quotes erd
9720 \end_inset
9721
9722  a LaTeX file as possible, as their intention is to take the supplied file
9723  and replace the class file with one for the particular journal to which
9724  the paper has been submitted.
9725  This also means that not too much time should be spent on the formating
9726  of the document.
9727  When it comes to be published, this will change anyway.
9728  The rest of the usage for this layout is substantially the same as for
9729  the normal article class.
9730  For details of what Elsevier do and don't allow, refer to their documentation.
9731 \end_layout
9732
9733 \begin_layout Section
9734 Foils [aka 
9735 \family sans
9736 FoilTeX
9737 \family default
9738 ]
9739 \begin_inset CommandInset label
9740 LatexCommand label
9741 name "sec:foiltex"
9742
9743 \end_inset
9744
9745
9746 \end_layout
9747
9748 \begin_layout Standard
9749 by 
9750 \noun on
9751 Allan Rae
9752 \end_layout
9753
9754 \begin_layout Subsection
9755 Introduction
9756 \end_layout
9757
9758 \begin_layout Standard
9759 This section describes how to use LyX to make slides for overhead projectors.
9760  There are two document classes that can do this: the default slides class
9761  and the 
9762 \family sans
9763 FoilTeX
9764 \family default
9765  slides class.
9766  This section documents the latter.
9767 \end_layout
9768
9769 \begin_layout Standard
9770 I'm going to say this again, nice and clear, so that there's no misunderstanding
9771 :
9772 \end_layout
9773
9774 \begin_layout Standard
9775 \begin_inset VSpace bigskip
9776 \end_inset
9777
9778
9779 \end_layout
9780
9781 \begin_layout Standard
9782 \align center
9783
9784 \size large
9785 This section documents the class 
9786 \begin_inset Quotes eld
9787 \end_inset
9788
9789
9790 \family sans
9791 slides (FoilTeX)
9792 \family default
9793
9794 \begin_inset Quotes erd
9795 \end_inset
9796
9797  
9798 \emph on
9799 only.
9800 \end_layout
9801
9802 \begin_layout Standard
9803 \begin_inset VSpace bigskip
9804 \end_inset
9805
9806
9807 \end_layout
9808
9809 \begin_layout Standard
9810 If you're looking for the documentation for 
9811 \begin_inset Quotes eld
9812 \end_inset
9813
9814
9815 \family sans
9816 slides (default)
9817 \family default
9818
9819 \begin_inset Quotes erd
9820 \end_inset
9821
9822 , check out section
9823 \begin_inset space ~
9824 \end_inset
9825
9826
9827 \begin_inset CommandInset ref
9828 LatexCommand ref
9829 reference "sec:slitex"
9830
9831 \end_inset
9832
9833 .
9834  If your machine doesn't have the 
9835 \family sans
9836 foils
9837 \family default
9838  class [
9839 \begin_inset Quotes eld
9840 \end_inset
9841
9842
9843 \family sans
9844 slides (FoilTeX)
9845 \family default
9846
9847 \begin_inset Quotes erd
9848 \end_inset
9849
9850 ] installed, you'll probably have to use the default 
9851 \family sans
9852 slides
9853 \family default
9854  class, which isn't quite as good as 
9855 \family sans
9856 foils.
9857 \end_layout
9858
9859 \begin_layout Standard
9860 The 
9861 \family sans
9862 foils
9863 \family default
9864  class is designed for use with version 2.1 of the 
9865 \family sans
9866 foils.cls
9867 \family default
9868  LaTeX class file which is now an integral part of LaTeX2e.
9869 \end_layout
9870
9871 \begin_layout Subsection
9872 Getting Started
9873 \end_layout
9874
9875 \begin_layout Standard
9876 Obviously, to use this document class, you need to select 
9877 \begin_inset Quotes eld
9878 \end_inset
9879
9880
9881 \family sans
9882 slides (FoilTeX)
9883 \family default
9884
9885 \begin_inset Quotes erd
9886 \end_inset
9887
9888  from the 
9889 \family sans
9890 Class
9891 \family default
9892  entry in the 
9893 \family sans
9894 Document
9895 \begin_inset space ~
9896 \end_inset
9897
9898 Layout
9899 \family default
9900  dialog.
9901  There are some settings in the 
9902 \family sans
9903 Document
9904 \begin_inset space ~
9905 \end_inset
9906
9907 Layout
9908 \family default
9909  dialog that you should know about that are specific to this class:
9910 \end_layout
9911
9912 \begin_layout Itemize
9913 Don't change the options 
9914 \family sans
9915 Sides
9916 \family default
9917  and 
9918 \family sans
9919 Columns
9920 \family default
9921  on the 
9922 \family sans
9923 Document
9924 \begin_inset space ~
9925 \end_inset
9926
9927 Layout
9928 \family default
9929  dialog.
9930  They're ignored by the 
9931 \family sans
9932 foils
9933 \family default
9934  class.
9935 \end_layout
9936
9937 \begin_layout Itemize
9938 The default font size is 20
9939 \begin_inset space \thinspace{}
9940 \end_inset
9941
9942 pt with the other options being 17
9943 \begin_inset space \thinspace{}
9944 \end_inset
9945
9946 pt, 25
9947 \begin_inset space \thinspace{}
9948 \end_inset
9949
9950 pt and 30
9951 \begin_inset space \thinspace{}
9952 \end_inset
9953
9954 pt.
9955 \end_layout
9956
9957 \begin_layout Itemize
9958 The default font is 
9959 \family sans
9960 sans
9961 \family default
9962  
9963 \family sans
9964 serif
9965 \family default
9966  but all math equations are still typeset in the usual roman font.
9967 \end_layout
9968
9969 \begin_layout Itemize
9970
9971 \family sans
9972 FoilTeX
9973 \family default
9974  supports A4 and Letter paper sizes as well as a special size for working
9975  with 35
9976 \begin_inset space \thinspace{}
9977 \end_inset
9978
9979 mm slides.
9980  It doesn't support A5, B5, legal or executive paper sizes.
9981 \end_layout
9982
9983 \begin_layout Itemize
9984 Don't bother changing the 
9985 \family sans
9986 Float Placement
9987 \family default
9988  settings because they are ignored anyway.
9989  All floats appear where they are defined in the text.
9990 \end_layout
9991
9992 \begin_layout Itemize
9993 The 
9994 \family sans
9995 Pagestyle
9996 \family default
9997  setting behaves a bit differently for this class.
9998  
9999 \family sans
10000 FoilTeX
10001 \family default
10002  provides extensive footer and header capabilities including a user-defined
10003  logo.
10004  See section
10005 \begin_inset space ~
10006 \end_inset
10007
10008
10009 \begin_inset CommandInset ref
10010 LatexCommand ref
10011 reference "sec:foilfoot"
10012
10013 \end_inset
10014
10015  for more details.
10016  The title page is treated differently to all other pages in the document
10017  and is 
10018 \emph on
10019 always
10020 \emph default
10021  unnumbered and 
10022 \emph on
10023 always
10024 \emph default
10025  has the logo centered at the bottom of the page (if one is defined).
10026  The possible page style choices and what they do are as follows:
10027 \end_layout
10028
10029 \begin_deeper
10030 \begin_layout Labeling
10031 \labelwidthstring MMMMMMM
10032
10033 \family sans
10034 \series bold
10035 empty
10036 \family default
10037 \series default
10038  The final output contains no page numbers, or other headers or footers
10039  (except footnotes of course).
10040  
10041 \end_layout
10042
10043 \begin_layout Labeling
10044 \labelwidthstring MMMMMMM
10045
10046 \family sans
10047 \series bold
10048 plain
10049 \family default
10050 \series default
10051  The final output contains page numbers centered at the bottom of the page.
10052  No other headings or footers (other than footnotes).
10053 \end_layout
10054
10055 \begin_layout Labeling
10056 \labelwidthstring MMMMMMM
10057
10058 \series bold
10059 foilheadings
10060 \series default
10061  Page numbers in lower right corner.
10062  Additional headers and footers are also shown.
10063  This is also the default.
10064 \end_layout
10065
10066 \begin_layout Labeling
10067 \labelwidthstring MMMMMMM
10068
10069 \series bold
10070 fancy
10071 \series default
10072  Gives you access to the 
10073 \family sans
10074 fancyheadings
10075 \family default
10076  package although its use with 
10077 \family sans
10078 FoilTeX
10079 \family default
10080  is discouraged by the writer of the 
10081 \family sans
10082 FoilTeX
10083 \family default
10084  package because of some potential page layout clashes.
10085 \end_layout
10086
10087 \end_deeper
10088 \begin_layout Subsubsection
10089 Extra Options
10090 \end_layout
10091
10092 \begin_layout Standard
10093 The following options may be used in the extra class options in the 
10094 \family sans
10095 Document\SpecialChar \menuseparator
10096 Settings
10097 \family default
10098  dialog.
10099 \end_layout
10100
10101 \begin_layout Labeling
10102 \labelwidthstring MMMMMMx
10103
10104 \series bold
10105 35mmSlide
10106 \series default
10107  This sets up the page layout for 7.33
10108 \begin_inset space \thinspace{}
10109 \end_inset
10110
10111 in by 11
10112 \begin_inset space \thinspace{}
10113 \end_inset
10114
10115 in paper, which is about the same aspect ratio as a 35
10116 \begin_inset space \thinspace{}
10117 \end_inset
10118
10119 mm slide, making it a bit easier to work with this medium.
10120 \end_layout
10121
10122 \begin_layout Labeling
10123 \labelwidthstring MMMMMMx
10124
10125 \series bold
10126 headrule
10127 \series default
10128  Places a rule across the page below the header on every page except the
10129  title page.
10130 \end_layout
10131
10132 \begin_layout Labeling
10133 \labelwidthstring MMMMMMx
10134
10135 \series bold
10136 footrule
10137 \series default
10138  Places a rule across the page above the footer on every page except the
10139  title page.
10140 \end_layout
10141
10142 \begin_layout Labeling
10143 \labelwidthstring MMMMMMx
10144
10145 \series bold
10146 dvips
10147 \series default
10148  This is automatically set each time you create a new 
10149 \family sans
10150 foils
10151 \family default
10152  document.
10153  This option tells 
10154 \family sans
10155 FoilTeX
10156 \family default
10157  to use the dvips driver to rotate those pages that are set as landscape
10158  foils.
10159 \end_layout
10160
10161 \begin_layout Labeling
10162 \labelwidthstring MMMMMMx
10163
10164 \series bold
10165 landscape
10166 \series default
10167  Simply changes the page dimensions to those of a landscape page but doesn't
10168  do any rotation.
10169  Thus if you use this option you need to use an external program to rotate
10170  each page or feed your paper through your printer as landscape.
10171  Note that this option effectively reverses the roles of the 
10172 \family sans
10173 Foilhead
10174 \family default
10175  and 
10176 \family sans
10177 Rotatefoilhead
10178 \family default
10179  environments (don't worry these are described in the next section).
10180 \end_layout
10181
10182 \begin_layout Labeling
10183 \labelwidthstring MMMMMMx
10184
10185 \series bold
10186 leqno
10187 \series default
10188  Equation numbers on the left.
10189 \end_layout
10190
10191 \begin_layout Labeling
10192 \labelwidthstring MMMMMMx
10193
10194 \series bold
10195 fleqn
10196 \series default
10197  Flush-left equations.
10198 \end_layout
10199
10200 \begin_layout Subsection
10201 Supported Environments
10202 \end_layout
10203
10204 \begin_layout Standard
10205 Most of the environments commonly supported in other classes are also supported
10206  by the 
10207 \family sans
10208 foils
10209 \family default
10210  class.
10211  There are several additional environments provided by 
10212 \family sans
10213 FoilTeX
10214 \family default
10215  as well as a couple added by LyX.
10216  The following environments are shared with other classes:
10217 \end_layout
10218
10219 \begin_layout Standard
10220 \begin_inset ERT
10221 status open
10222
10223 \begin_layout Plain Layout
10224
10225
10226 \backslash
10227 begin{multicols}{2}
10228 \end_layout
10229
10230 \end_inset
10231
10232
10233 \end_layout
10234
10235 \begin_layout Itemize
10236
10237 \family sans
10238 Standard
10239 \end_layout
10240
10241 \begin_layout Itemize
10242
10243 \family sans
10244 Itemize
10245 \end_layout
10246
10247 \begin_layout Itemize
10248
10249 \family sans
10250 Enumerate
10251 \end_layout
10252
10253 \begin_layout Itemize
10254
10255 \family sans
10256 Description
10257 \end_layout
10258
10259 \begin_layout Itemize
10260
10261 \family sans
10262 List
10263 \end_layout
10264
10265 \begin_layout Itemize
10266
10267 \family sans
10268 LyX-Code
10269 \end_layout
10270
10271 \begin_layout Itemize
10272
10273 \family sans
10274 Verse
10275 \end_layout
10276
10277 \begin_layout Itemize
10278
10279 \family sans
10280 Quote
10281 \end_layout
10282
10283 \begin_layout Itemize
10284
10285 \family sans
10286 Quotation
10287 \end_layout
10288
10289 \begin_layout Itemize
10290
10291 \family sans
10292 Title
10293 \end_layout
10294
10295 \begin_layout Itemize
10296
10297 \family sans
10298 Author
10299 \end_layout
10300
10301 \begin_layout Itemize
10302
10303 \family sans
10304 Date
10305 \end_layout
10306
10307 \begin_layout Itemize
10308
10309 \family sans
10310 Abstract
10311 \end_layout
10312
10313 \begin_layout Itemize
10314
10315 \family sans
10316 Bibliography
10317 \end_layout
10318
10319 \begin_layout Itemize
10320
10321 \family sans
10322 Address
10323 \end_layout
10324
10325 \begin_layout Itemize
10326
10327 \family sans
10328 RightAddress
10329 \end_layout
10330
10331 \begin_layout Itemize
10332
10333 \family sans
10334 Caption
10335 \end_layout
10336
10337 \begin_layout Itemize
10338
10339 \family sans
10340 Comment
10341 \end_layout
10342
10343 \begin_layout Standard
10344 \begin_inset ERT
10345 status open
10346
10347 \begin_layout Plain Layout
10348
10349
10350 \backslash
10351 end{multicols}
10352 \end_layout
10353
10354 \end_inset
10355
10356
10357 \end_layout
10358
10359 \begin_layout Standard
10360 That is, all the major environments apart from the sectioning environments.
10361  Since foils are essentially self-contained sections, with a title and body,
10362  
10363 \family sans
10364 FoilTeX
10365 \family default
10366  provides specific commands for starting new foils and these are:
10367 \end_layout
10368
10369 \begin_layout Itemize
10370
10371 \family sans
10372 Foilhead
10373 \end_layout
10374
10375 \begin_layout Itemize
10376
10377 \family sans
10378 Rotatefoilhead
10379 \end_layout
10380
10381 \begin_layout Standard
10382 LyX also provides slightly modified versions of these two environments called:
10383 \end_layout
10384
10385 \begin_layout Itemize
10386
10387 \family sans
10388 ShortFoilhead
10389 \end_layout
10390
10391 \begin_layout Itemize
10392
10393 \family sans
10394 ShortRotatefoilhead
10395 \end_layout
10396
10397 \begin_layout Standard
10398 and the differences will be explained in the next section.
10399 \end_layout
10400
10401 \begin_layout Standard
10402 Since foils are often used in presenting ideas or new theorems and such
10403  
10404 \family sans
10405 FoilTeX
10406 \family default
10407  also provides a comprehensive box of goodies for presenting them:
10408 \end_layout
10409
10410 \begin_layout Standard
10411 \begin_inset ERT
10412 status open
10413
10414 \begin_layout Plain Layout
10415
10416
10417 \backslash
10418 begin{multicols}{2}
10419 \end_layout
10420
10421 \end_inset
10422
10423
10424 \end_layout
10425
10426 \begin_layout Itemize
10427
10428 \family sans
10429 Theorem
10430 \end_layout
10431
10432 \begin_layout Itemize
10433
10434 \family sans
10435 Lemma
10436 \end_layout
10437
10438 \begin_layout Itemize
10439
10440 \family sans
10441 Corollary
10442 \end_layout
10443
10444 \begin_layout Itemize
10445
10446 \family sans
10447 Proposition
10448 \end_layout
10449
10450 \begin_layout Itemize
10451
10452 \family sans
10453 Definition
10454 \end_layout
10455
10456 \begin_layout Itemize
10457
10458 \family sans
10459 Proof
10460 \end_layout
10461
10462 \begin_layout Itemize
10463
10464 \family sans
10465 Theorem*
10466 \end_layout
10467
10468 \begin_layout Itemize
10469
10470 \family sans
10471 Lemma*
10472 \end_layout
10473
10474 \begin_layout Itemize
10475
10476 \family sans
10477 Corollary*
10478 \end_layout
10479
10480 \begin_layout Itemize
10481
10482 \family sans
10483 Proposition*
10484 \end_layout
10485
10486 \begin_layout Itemize
10487
10488 \family sans
10489 Definition*
10490 \end_layout
10491
10492 \begin_layout Standard
10493 \begin_inset ERT
10494 status open
10495
10496 \begin_layout Plain Layout
10497
10498
10499 \backslash
10500 end{multicols}
10501 \end_layout
10502
10503 \end_inset
10504
10505
10506 \end_layout
10507
10508 \begin_layout Standard
10509 The starred versions are unnumbered while the unstarred versions are numbered.
10510  There are also two list environments added by LyX and these are:
10511 \end_layout
10512
10513 \begin_layout Itemize
10514
10515 \family sans
10516 TickList
10517 \end_layout
10518
10519 \begin_layout Itemize
10520
10521 \family sans
10522 CrossList
10523 \end_layout
10524
10525 \begin_layout Standard
10526
10527 \family sans
10528 FoilTeX
10529 \family default
10530  provides some powerful header and footer capabilities that are best set
10531  in the preamble although they may be set at any point in a document.
10532  If you want to change these settings in your document the best place to
10533  do so is at the very top of a foil, i.
10534 \begin_inset space \thinspace{}
10535 \end_inset
10536
10537 g.
10538 \emph on
10539
10540 \begin_inset space \space{}
10541 \end_inset
10542
10543
10544 \emph default
10545 straight after the foilhead.
10546 \end_layout
10547
10548 \begin_layout Standard
10549 For this purpose, the following command styles are provided [
10550 \shape smallcaps
10551 Martin Vermeer
10552 \shape default
10553 ]:
10554 \end_layout
10555
10556 \begin_layout Standard
10557 \begin_inset ERT
10558 status open
10559
10560 \begin_layout Plain Layout
10561
10562
10563 \backslash
10564 begin{multicols}{2}
10565 \end_layout
10566
10567 \end_inset
10568
10569
10570 \end_layout
10571
10572 \begin_layout Itemize
10573
10574 \family sans
10575 My
10576 \begin_inset space ~
10577 \end_inset
10578
10579 Logo
10580 \end_layout
10581
10582 \begin_layout Itemize
10583
10584 \family sans
10585 Restriction
10586 \end_layout
10587
10588 \begin_layout Itemize
10589
10590 \family sans
10591 Right
10592 \begin_inset space ~
10593 \end_inset
10594
10595 Footer
10596 \end_layout
10597
10598 \begin_layout Itemize
10599
10600 \family sans
10601 Right
10602 \begin_inset space ~
10603 \end_inset
10604
10605 Header
10606 \end_layout
10607
10608 \begin_layout Itemize
10609
10610 \family sans
10611 Left
10612 \begin_inset space ~
10613 \end_inset
10614
10615 Header
10616 \end_layout
10617
10618 \begin_deeper
10619 \begin_layout Standard
10620 \begin_inset space ~
10621 \end_inset
10622
10623
10624 \end_layout
10625
10626 \end_deeper
10627 \begin_layout Standard
10628 \begin_inset ERT
10629 status open
10630
10631 \begin_layout Plain Layout
10632
10633
10634 \backslash
10635 end{multicols}
10636 \end_layout
10637
10638 \end_inset
10639
10640
10641 \end_layout
10642
10643 \begin_layout Standard
10644 There are also a few commands provided by 
10645 \family sans
10646 FoilTeX
10647 \family default
10648  that aren't directly supported by LyX but I'll tell you what they do and
10649  how to use them in section
10650 \begin_inset space ~
10651 \end_inset
10652
10653
10654 \begin_inset CommandInset ref
10655 LatexCommand ref
10656 reference "sec:unsuppfoils"
10657
10658 \end_inset
10659
10660 .
10661 \end_layout
10662
10663 \begin_layout Subsection
10664 Building a Set of Foils
10665 \end_layout
10666
10667 \begin_layout Standard
10668 This section will give a simple introduction to using the different environments
10669  to build a set of foils.
10670  If you want to see an example set of foils, take a look at the 
10671 \family typewriter
10672 Foils.lyx
10673 \family default
10674  file you find in LyX's 
10675 \family typewriter
10676 examples
10677 \family default
10678  folder.
10679 \end_layout
10680
10681 \begin_layout Subsubsection
10682 Give It a Title Page
10683 \end_layout
10684
10685 \begin_layout Standard
10686 Unlike other classes that provide 
10687 \family sans
10688 Title
10689 \family default
10690
10691 \family sans
10692 Author
10693 \family default
10694
10695 \family sans
10696 Date
10697 \family default
10698  and 
10699 \family sans
10700 Abstract
10701 \family default
10702  environments, 
10703 \family sans
10704 foils
10705 \family default
10706  creates the title on a page of its own.
10707  If you leave out the 
10708 \family sans
10709 Date
10710 \family default
10711  environment LaTeX will substitute the current date (every time you regenerate
10712  the output).
10713 \end_layout
10714
10715 \begin_layout Subsubsection
10716 Start a New Foil
10717 \end_layout
10718
10719 \begin_layout Standard
10720 As I mentioned earlier, there are four ways of starting a new foil.
10721  For portrait foils you should use 
10722 \family sans
10723 Foilhead
10724 \family default
10725  or 
10726 \family sans
10727 ShortFoilhead.
10728
10729 \family default
10730  The difference between these two environments is the amount of space between
10731  the title of the foil (the foilhead) and the body of the foil.
10732 \end_layout
10733
10734 \begin_layout Standard
10735 Landscape foils are generated using the 
10736 \family sans
10737 Rotatefoilhead
10738 \family default
10739  and 
10740 \family sans
10741 ShortRotatefoilhead
10742 \family default
10743  environments.
10744  Again the only difference is the spacing between foilhead and body.
10745  Both of the short versions have 0.5 inches less separation between the foilhead
10746  and the body.
10747  
10748 \end_layout
10749
10750 \begin_layout Standard
10751 One problem with the support for landscape foils is the requirement that
10752  you have to use the 
10753 \family typewriter
10754 dvips
10755 \family default
10756  driver to generate the PostScript output otherwise the foils won't be rotated.
10757  It is possible to get landscape foils even if you haven't got the 
10758 \family typewriter
10759 dvips
10760 \family default
10761  driver provided you can feed your foils sideways through your printer ;-)
10762 \end_layout
10763
10764 \begin_layout Subsubsection
10765 Theorems, Lemmas, Proofs and more
10766 \end_layout
10767
10768 \begin_layout Standard
10769 Due to a small bug in LyX you can't have two of the same type of these environme
10770 nts directly following each other.
10771  They must be separated by something.
10772  If you try, you will just be extending the previous environment as if you
10773  had merged the two environments together.
10774  So, how do you get around this problem? The simplest option is to insert
10775  some text between the two environments or add a 
10776 \family sans
10777 LaTeX
10778 \family default
10779  environment between the two with just a 
10780 \begin_inset Quotes eld
10781 \end_inset
10782
10783
10784 \family typewriter
10785 %
10786 \family default
10787
10788 \begin_inset Quotes erd
10789 \end_inset
10790
10791  in it.
10792  This will force LyX to produce two separate environments and hence the
10793  correct LaTeX output.
10794  An example is provided in the example file included with the LyX distribution.
10795  Remember, this problem only occurs if you are trying to place two of the
10796  same type of theorem-like environments one directly after the other.
10797 \end_layout
10798
10799 \begin_layout Subsubsection
10800 Lists
10801 \end_layout
10802
10803 \begin_layout Standard
10804 You get all the commonly supported list styles found in other classes as
10805  well as two new ones.
10806  I'll only describe the new ones here.
10807  If you want to find out more about the other list environments check out
10808  the 
10809 \emph on
10810 User's Guide.
10811
10812 \emph default
10813  If you intend to use itemized lists you might also want to read about the
10814  
10815 \family sans
10816 Itemize
10817 \begin_inset space ~
10818 \end_inset
10819
10820 Bullet
10821 \begin_inset space ~
10822 \end_inset
10823
10824 Selection
10825 \family default
10826  dialog described above in section
10827 \begin_inset space ~
10828 \end_inset
10829
10830
10831 \begin_inset CommandInset ref
10832 LatexCommand ref
10833 reference "sec:bullet"
10834
10835 \end_inset
10836
10837 .
10838 \end_layout
10839
10840 \begin_layout Standard
10841 The two new list styles, 
10842 \family sans
10843 TickList
10844 \family default
10845  and 
10846 \family sans
10847 CrossList
10848 \family default
10849 , are designed to make it easier for you to create lists of do's and don'ts
10850  or right and wrong by providing dedicated environments that use a tick
10851  or a cross as the label of the list.
10852  These lists are in fact dedicated variants of the 
10853 \family sans
10854 Itemize
10855 \family default
10856  environment.
10857  They do however require that you have the 
10858 \family typewriter
10859 psnfss
10860 \family default
10861  packages installed.
10862 \end_layout
10863
10864 \begin_layout Subsubsection
10865 Figures and Tables
10866 \end_layout
10867
10868 \begin_layout Standard
10869
10870 \family sans
10871 FoilTeX
10872 \family default
10873  redefines the floating tables and figures so that they appear exactly where
10874  they are in the text rather than pushing them to the top of the page or
10875  to some user specified location.
10876  In fact if you change the float placement settings they are simply ignored.
10877 \end_layout
10878
10879 \begin_layout Subsubsection
10880 Page Headers and Footers
10881 \begin_inset CommandInset label
10882 LatexCommand label
10883 name "sec:foilfoot"
10884
10885 \end_inset
10886
10887
10888 \end_layout
10889
10890 \begin_layout Standard
10891
10892 \family sans
10893 My
10894 \begin_inset space ~
10895 \end_inset
10896
10897 Logo
10898 \family default
10899  and 
10900 \family sans
10901 Restriction
10902 \family default
10903  are two commands used to control the left-footer text string.
10904  The first is meant to allow you to include a graphic logo on your foils
10905  and defaults to 
10906 \begin_inset Quotes eld
10907 \end_inset
10908
10909 -Typeset by 
10910 \family sans
10911 FoilTeX
10912 \family default
10913 -
10914 \begin_inset Quotes erd
10915 \end_inset
10916
10917 .
10918  While the second is meant to provide a classification for the audience,
10919  
10920 \emph on
10921 e.
10922 \begin_inset space \thinspace{}
10923 \end_inset
10924
10925 g.
10926 \emph default
10927
10928 \begin_inset space \space{}
10929 \end_inset
10930
10931 Confidential.
10932  It is empty by default.
10933 \end_layout
10934
10935 \begin_layout Standard
10936 The remaining page corners can be filled by 
10937 \family sans
10938 Right
10939 \begin_inset space ~
10940 \end_inset
10941
10942 Footer
10943 \family default
10944  (which defaults to page numbers), 
10945 \family sans
10946 Right
10947 \begin_inset space ~
10948 \end_inset
10949
10950 Header
10951 \family default
10952  (top right) and 
10953 \family sans
10954 Left
10955 \begin_inset space ~
10956 \end_inset
10957
10958 Header
10959 \family default
10960  (top left).
10961 \end_layout
10962
10963 \begin_layout Subsection
10964 Unsupported 
10965 \family sans
10966 FoilTeX
10967 \family default
10968  Goodies
10969 \begin_inset CommandInset label
10970 LatexCommand label
10971 name "sec:unsuppfoils"
10972
10973 \end_inset
10974
10975
10976 \end_layout
10977
10978 \begin_layout Standard
10979 All the commands mentioned below need to be set in a 
10980 \family sans
10981 LaTeX
10982 \family default
10983  environment or as 
10984 \family sans
10985 TeX
10986 \family default
10987  within another environment.
10988 \end_layout
10989
10990 \begin_layout Subsubsection
10991 Lengths
10992 \end_layout
10993
10994 \begin_layout Standard
10995 All lengths are adjusted using the 
10996 \family typewriter
10997
10998 \backslash
10999 setlength{
11000 \family default
11001 \emph on
11002 lengthname
11003 \family typewriter
11004 \emph default
11005 }{
11006 \family default
11007 \emph on
11008 newlength
11009 \family typewriter
11010 \emph default
11011 }
11012 \family default
11013  command.
11014  Where 
11015 \emph on
11016 lengthname
11017 \emph default
11018  should be replaced by the name given to the length you want to change and
11019  
11020 \emph on
11021 newlength
11022 \emph default
11023  is the length value.
11024  All lengths should be specified in units of length such as inches (
11025 \family typewriter
11026 in
11027 \family default
11028 ), millimeters (
11029 \family typewriter
11030 mm
11031 \family default
11032 ) or points (
11033 \family typewriter
11034 pt
11035 \family default
11036 ) or relative to some document or font-based length such as 
11037 \family typewriter
11038
11039 \backslash
11040 textwidth
11041 \family default
11042 .
11043  
11044 \end_layout
11045
11046 \begin_layout Standard
11047 It's possible to change the spacing between a foilhead and the body of the
11048  foil by adjusting the length specified by 
11049 \family typewriter
11050
11051 \backslash
11052 foilheadskip
11053 \family default
11054 .
11055  For example, to make 
11056 \emph on
11057 all
11058 \emph default
11059  foilheads 0.5
11060 \begin_inset space \space{}
11061 \end_inset
11062
11063 in closer to their bodies put the following in the preamble: 
11064 \family typewriter
11065
11066 \backslash
11067 setlength{
11068 \backslash
11069 foilheadskip}{-0.5in}
11070 \end_layout
11071
11072 \begin_layout Standard
11073 The spacings around floats can be adjusted by setting these lengths:
11074 \end_layout
11075
11076 \begin_layout Labeling
11077 \labelwidthstring MMMMMMMMMMM
11078
11079 \family typewriter
11080
11081 \backslash
11082 abovefloatskip
11083 \family default
11084  Separation between the text and the top of the float
11085 \end_layout
11086
11087 \begin_layout Labeling
11088 \labelwidthstring MMMMMMMMMMM
11089
11090 \family typewriter
11091
11092 \backslash
11093 abovecaptionskip
11094 \family default
11095  Separation between the float and the caption
11096 \end_layout
11097
11098 \begin_layout Labeling
11099 \labelwidthstring MMMMMMMMMMM
11100
11101 \family typewriter
11102
11103 \backslash
11104 belowcaptionskip
11105 \family default
11106  Separation between the caption and the following text
11107 \end_layout
11108
11109 \begin_layout Labeling
11110 \labelwidthstring MMMMMMMMMMM
11111
11112 \family typewriter
11113
11114 \backslash
11115 captionwidth
11116 \family default
11117  You can make the captions narrower than the surrounding text by adjusting
11118  this length.
11119  Best done relative to 
11120 \family typewriter
11121
11122 \backslash
11123 textwidth
11124 \family default
11125 .
11126 \end_layout
11127
11128 \begin_layout Standard
11129 There are also several title page related lengths that you may find useful
11130  if you have a long title or several authors:
11131 \end_layout
11132
11133 \begin_layout Labeling
11134 \labelwidthstring MMMMMMMMMMM
11135
11136 \family typewriter
11137
11138 \backslash
11139 abovetitleskip
11140 \family default
11141  Separation from headers to 
11142 \family sans
11143 Title
11144 \end_layout
11145
11146 \begin_layout Labeling
11147 \labelwidthstring MMMMMMMMMMM
11148
11149 \family typewriter
11150
11151 \backslash
11152 titleauthorskip
11153 \family default
11154  between 
11155 \family sans
11156 Title
11157 \family default
11158  and 
11159 \family sans
11160 Author
11161 \family default
11162  environments
11163 \end_layout
11164
11165 \begin_layout Labeling
11166 \labelwidthstring MMMMMMMMMMM
11167
11168 \family typewriter
11169
11170 \backslash
11171 authorauthorskip
11172 \family default
11173  between multiple 
11174 \family sans
11175 Author
11176 \family default
11177  lines
11178 \end_layout
11179
11180 \begin_layout Labeling
11181 \labelwidthstring MMMMMMMMMMM
11182
11183 \family typewriter
11184
11185 \backslash
11186 authordateskip
11187 \family default
11188  between the 
11189 \family sans
11190 Author
11191 \family default
11192  and the 
11193 \family sans
11194 Date
11195 \end_layout
11196
11197 \begin_layout Labeling
11198 \labelwidthstring MMMMMMMMMMM
11199
11200 \family typewriter
11201
11202 \backslash
11203 dateabstractskip
11204 \family default
11205  between the 
11206 \family sans
11207 Date
11208 \family default
11209  and the 
11210 \family sans
11211 Abstract
11212 \end_layout
11213
11214 \begin_layout Standard
11215 The last length related command affects all the list environments.
11216  If you place 
11217 \family typewriter
11218
11219 \backslash
11220 zerolistvertdimens
11221 \family default
11222  
11223 \emph on
11224 inside
11225 \emph default
11226  a list environment then all the vertical spacing between the list items
11227  is removed.
11228  Note that this is a command not a length so it doesn't require 
11229 \family typewriter
11230
11231 \backslash
11232 setlength
11233 \family default
11234  like the stuff mentioned above.
11235 \end_layout
11236
11237 \begin_layout Subsubsection
11238 Headers and Footers
11239 \end_layout
11240
11241 \begin_layout Standard
11242 The 
11243 \family typewriter
11244
11245 \backslash
11246 LogoOn
11247 \family default
11248  and 
11249 \family typewriter
11250
11251 \backslash
11252 LogoOff
11253 \family default
11254  commands control whether the logo in the 
11255 \family sans
11256 MyLogo
11257 \family default
11258  definition appear on a given page.
11259  If you put 
11260 \family typewriter
11261
11262 \backslash
11263 LogoOff
11264 \family default
11265  in the preamble then none of the foils will have the logo on them.
11266  If you don't want the logo on a particular page place the 
11267 \family typewriter
11268
11269 \backslash
11270 LogoOff
11271 \family default
11272  directly after the foilhead of that page and the 
11273 \family typewriter
11274
11275 \backslash
11276 LogoOn
11277 \family default
11278  directly after the next foilhead.
11279 \end_layout
11280
11281 \begin_layout Standard
11282 If you decide to use the 
11283 \family sans
11284 fancy
11285 \family default
11286  page style setting in the 
11287 \family sans
11288 Document
11289 \begin_inset space ~
11290 \end_inset
11291
11292 Layout
11293 \family default
11294  dialog you should probably add 
11295 \family typewriter
11296
11297 \backslash
11298 let
11299 \backslash
11300 headwidth
11301 \backslash
11302 textwidth
11303 \family default
11304  to your preamble so headers and footers on landscape pages are correctly
11305  placed when rotated.
11306  This is due to some clashes between the page layouts provided by the 
11307 \family sans
11308 fancyheadings
11309 \family default
11310  package and the 
11311 \family sans
11312 foils
11313 \family default
11314  class.
11315 \end_layout
11316
11317 \begin_layout Section
11318 Hollywood (Hollywood spec scripts)
11319 \end_layout
11320
11321 \begin_layout Standard
11322 by 
11323 \shape smallcaps
11324 Garst Reese
11325 \end_layout
11326
11327 \begin_layout Subsection
11328 Introduction
11329 \end_layout
11330
11331 \begin_layout Standard
11332 Getting the format of a Hollywood script right is a 
11333 \begin_inset Quotes eld
11334 \end_inset
11335
11336 rite of passage.
11337 \begin_inset Quotes erd
11338 \end_inset
11339
11340  It is designed to make the readers focus on content and to be easy and
11341  familiar for the actors to read.
11342  Each page of a script should be one minute of film.
11343  Nothing goes in a script that you cannot see or hear on screen.
11344  The courier 12 pt font should be used throughout.
11345  No italics.
11346 \end_layout
11347
11348 \begin_layout Subsection
11349 Special problems
11350 \end_layout
11351
11352 \begin_layout Standard
11353 Speakers' lines should NEVER break in mid-sentence.
11354  If a speaker's lines continue over a page break, repeat the 
11355 \family sans
11356 Speaker
11357 \family default
11358  title followed by (Cont'd).
11359 \end_layout
11360
11361 \begin_layout Subsection
11362 Special features
11363 \end_layout
11364
11365 \begin_layout Standard
11366 Insert the 
11367 \family sans
11368 Speaker
11369 \family default
11370  names as labels then cross-reference the label to insert the name.
11371  The cross-reference dialog will show the current cast of characters.
11372  You can use this to insert the speaker name in narratives also.
11373 \end_layout
11374
11375 \begin_layout Subsection
11376 Paper size and Margins
11377 \end_layout
11378
11379 \begin_layout Standard
11380 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11381 \end_layout
11382
11383 \begin_layout Subsection
11384 Environments
11385 \end_layout
11386
11387 \begin_layout Standard
11388 The following environments are available.
11389  You can use hollywood.bind to get the bind keys shown at the right.
11390 \end_layout
11391
11392 \begin_layout Itemize
11393
11394 \family sans
11395 Standard
11396 \begin_inset Newline newline
11397 \end_inset
11398
11399
11400 \family default
11401 Used where nothing else works.
11402  Try to avoid it.
11403 \end_layout
11404
11405 \begin_layout Itemize
11406
11407 \family sans
11408 FADE_IN
11409 \family default
11410 :
11411 \begin_inset space \hfill{}
11412 \end_inset
11413
11414
11415 \family sans
11416 M-z S-I
11417 \family default
11418
11419 \begin_inset Newline newline
11420 \end_inset
11421
11422 Usually followed by something like 
11423 \begin_inset Quotes eld
11424 \end_inset
11425
11426 on Sally waking up.
11427 \begin_inset Quotes erd
11428 \end_inset
11429
11430
11431 \end_layout
11432
11433 \begin_layout Itemize
11434
11435 \family sans
11436 INT:
11437 \begin_inset space \hfill{}
11438 \end_inset
11439
11440 M-z i
11441 \begin_inset Newline newline
11442 \end_inset
11443
11444
11445 \family default
11446 Introduces a new INTERIOR camera set-up.
11447  Always followed by DAY or NIGHT, or something similar to define the lighting
11448  required.
11449  Everthing on this line in CAPS.
11450 \end_layout
11451
11452 \begin_layout Itemize
11453
11454 \family sans
11455 EXT:
11456 \begin_inset space \hfill{}
11457 \end_inset
11458
11459 M-z e
11460 \begin_inset Newline newline
11461 \end_inset
11462
11463
11464 \family default
11465 Introduces a new EXTERIOR camera set-up.
11466  Everthing on this line in CAPS.
11467 \end_layout
11468
11469 \begin_layout Itemize
11470
11471 \family sans
11472 Speaker
11473 \begin_inset space \hfill{}
11474 \end_inset
11475
11476 M-z s
11477 \begin_inset Newline newline
11478 \end_inset
11479
11480
11481 \family default
11482 The character speaking.
11483 \end_layout
11484
11485 \begin_layout Itemize
11486
11487 \family sans
11488 Parenthetical
11489 \begin_inset space \hfill{}
11490 \end_inset
11491
11492 M-z p
11493 \begin_inset Newline newline
11494 \end_inset
11495
11496
11497 \family default
11498 Instructions to the speaker.
11499  The () are automatically inserted, but only the ( will show in LyX.
11500  Both will be printed.
11501 \end_layout
11502
11503 \begin_layout Itemize
11504
11505 \family sans
11506 Dialogue
11507 \begin_inset space \hfill{}
11508 \end_inset
11509
11510 M-z d
11511 \begin_inset Newline newline
11512 \end_inset
11513
11514
11515 \family default
11516 What the 
11517 \family sans
11518 Speaker
11519 \family default
11520  says.
11521 \end_layout
11522
11523 \begin_layout Itemize
11524
11525 \family sans
11526 Transition
11527 \begin_inset space \hfill{}
11528 \end_inset
11529
11530 M-z t
11531 \begin_inset Newline newline
11532 \end_inset
11533
11534
11535 \family default
11536 Camera movement instruction.
11537  e.
11538 \begin_inset space \thinspace{}
11539 \end_inset
11540
11541 g.
11542 \begin_inset space \space{}
11543 \end_inset
11544
11545 CUT TO:
11546 \end_layout
11547
11548 \begin_layout Itemize
11549
11550 \family sans
11551 FADE OUT:
11552 \begin_inset space \hfill{}
11553 \end_inset
11554
11555 M-z S-I
11556 \end_layout
11557
11558 \begin_layout Itemize
11559
11560 \family sans
11561 Author
11562 \begin_inset space \hfill{}
11563 \end_inset
11564
11565 M-z S-A
11566 \end_layout
11567
11568 \begin_layout Itemize
11569
11570 \family sans
11571 Title
11572 \begin_inset space \hfill{}
11573 \end_inset
11574
11575 M-z S-T
11576 \end_layout
11577
11578 \begin_layout Itemize
11579
11580 \family sans
11581 Right_Address
11582 \begin_inset space \hfill{}
11583 \end_inset
11584
11585 M-z r
11586 \end_layout
11587
11588 \begin_layout Subsection
11589 Script jargon
11590 \end_layout
11591
11592 \begin_layout Itemize
11593 (O.S) — off screen
11594 \end_layout
11595
11596 \begin_layout Itemize
11597 (V.0) — voice over
11598 \end_layout
11599
11600 \begin_layout Itemize
11601 b.
11602 \begin_inset space \thinspace{}
11603 \end_inset
11604
11605 g.
11606  — background
11607 \end_layout
11608
11609 \begin_layout Itemize
11610 C.U.
11611  — close-up
11612 \end_layout
11613
11614 \begin_layout Itemize
11615 PAN — camera movement
11616 \end_layout
11617
11618 \begin_layout Itemize
11619 INSERT — cut to close-up of
11620 \end_layout
11621
11622 \begin_layout Section
11623 ijmpc and ijmpd
11624 \end_layout
11625
11626 \begin_layout Standard
11627 by 
11628 \noun on
11629 Panayotis Papasotiriou
11630 \end_layout
11631
11632 \begin_layout Subsection
11633 Overview
11634 \end_layout
11635
11636 \begin_layout Standard
11637 The ijmpc package is a set of macros that facilitates electronic manuscript
11638  submission to the 
11639 \emph on
11640 International Journal of Modern Physics C
11641 \emph default
11642 .
11643  Similarly, the ijmpd package is for creating manuscripts to be submitted
11644  to the 
11645 \emph on
11646 International Journal of Modern Physics D
11647 \emph default
11648 .
11649  Both journals are published by World Scientific.
11650  The corresponding document classes are named 
11651 \family typewriter
11652 ws-ijmpc.cls
11653 \family default
11654  and 
11655 \family typewriter
11656 ws-ijmpd.cls
11657 \family default
11658 , respectively.
11659  These files, together with instructions for the authors, can be downloaded
11660  from the sites 
11661 \begin_inset Flex URL
11662 status collapsed
11663
11664 \begin_layout Plain Layout
11665
11666 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11667 \end_layout
11668
11669 \end_inset
11670
11671  and 
11672 \begin_inset Flex URL
11673 status collapsed
11674
11675 \begin_layout Plain Layout
11676
11677 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11678 \end_layout
11679
11680 \end_inset
11681
11682 .
11683  Both packages are modified versions of the standard 
11684 \begin_inset Quotes eld
11685 \end_inset
11686
11687 article
11688 \begin_inset Quotes erd
11689 \end_inset
11690
11691  package, and they are almost (but not exactly) identical.
11692  Most of their features are supported by LyX.
11693  I have used LyX successfully to write articles submitted to both journals
11694  without any problem.
11695 \end_layout
11696
11697 \begin_layout Subsection
11698 Writing a paper
11699 \end_layout
11700
11701 \begin_layout Standard
11702 As usual, the easiest way to write a paper is to start with a template.
11703  Click on 
11704 \family sans
11705 File\SpecialChar \menuseparator
11706 New from
11707 \family default
11708  
11709 \family sans
11710 \bar under
11711 T
11712 \bar default
11713 emplate
11714 \family default
11715 , then choose the 
11716 \family typewriter
11717 ijmpc.lyx
11718 \family default
11719  or 
11720 \family typewriter
11721 ijmpd.lyx
11722 \family default
11723  template.
11724  This will give an (almost) empty document that includes the most common
11725  fields found in a manuscript.
11726  Simply overwrite the existing text (including the brackets, 
11727 \family typewriter
11728 <>
11729 \family default
11730 ) with your text.
11731  You should keep in mind the following remarks.
11732 \end_layout
11733
11734 \begin_layout Enumerate
11735 LyX won't let you change the font size and the page style of the document,
11736  because such modifications are not allowed by both packages.
11737 \end_layout
11738
11739 \begin_layout Enumerate
11740 The language of the document should not be changed.
11741  Before previewing your paper, be sure that the babel package is not used.
11742  To do this, click on 
11743 \family sans
11744 Tools\SpecialChar \menuseparator
11745 Preferences
11746 \family default
11747 , select the 
11748 \family sans
11749 Lang Opts
11750 \family default
11751  tab, deselect the 
11752 \family sans
11753 Use babel
11754 \family default
11755  checkbox in the language settings, and click on 
11756 \family sans
11757 Apply
11758 \family default
11759  (or 
11760 \family sans
11761 Save
11762 \family default
11763 , if you wish to make this change permanent).
11764 \end_layout
11765
11766 \begin_layout Enumerate
11767 The 
11768 \begin_inset Quotes eld
11769 \end_inset
11770
11771 Keywords
11772 \begin_inset Quotes erd
11773 \end_inset
11774
11775  style must be used to define keywords.
11776 \end_layout
11777
11778 \begin_layout Enumerate
11779 The ijmpc package provides a style named 
11780 \begin_inset Quotes eld
11781 \end_inset
11782
11783 Classification Codes
11784 \begin_inset Quotes erd
11785 \end_inset
11786
11787 , which can be used to define classification codes, such as PACS numbers.
11788  Note that this facility is not supported by the ijmpd package.
11789 \end_layout
11790
11791 \begin_layout Enumerate
11792 Several new environments are available: 
11793 \begin_inset Quotes eld
11794 \end_inset
11795
11796 Definition
11797 \begin_inset Quotes erd
11798 \end_inset
11799
11800
11801 \begin_inset Quotes eld
11802 \end_inset
11803
11804 Step
11805 \begin_inset Quotes erd
11806 \end_inset
11807
11808
11809 \begin_inset Quotes eld
11810 \end_inset
11811
11812 Example
11813 \begin_inset Quotes erd
11814 \end_inset
11815
11816
11817 \begin_inset Quotes eld
11818 \end_inset
11819
11820 Remark
11821 \begin_inset Quotes erd
11822 \end_inset
11823
11824
11825 \begin_inset Quotes eld
11826 \end_inset
11827
11828 Notation
11829 \begin_inset Quotes erd
11830 \end_inset
11831
11832
11833 \begin_inset Quotes eld
11834 \end_inset
11835
11836 Theorem
11837 \begin_inset Quotes erd
11838 \end_inset
11839
11840
11841 \begin_inset Quotes eld
11842 \end_inset
11843
11844 Proof
11845 \begin_inset Quotes erd
11846 \end_inset
11847
11848
11849 \begin_inset Quotes eld
11850 \end_inset
11851
11852 Corollary
11853 \begin_inset Quotes erd
11854 \end_inset
11855
11856
11857 \begin_inset Quotes eld
11858 \end_inset
11859
11860 Lemma
11861 \begin_inset Quotes erd
11862 \end_inset
11863
11864
11865 \begin_inset Quotes eld
11866 \end_inset
11867
11868 Proposition
11869 \begin_inset Quotes erd
11870 \end_inset
11871
11872
11873 \begin_inset Quotes eld
11874 \end_inset
11875
11876 Prop
11877 \begin_inset Quotes erd
11878 \end_inset
11879
11880
11881 \begin_inset Quotes eld
11882 \end_inset
11883
11884 Question
11885 \begin_inset Quotes erd
11886 \end_inset
11887
11888
11889 \begin_inset Quotes eld
11890 \end_inset
11891
11892 Claim
11893 \begin_inset Quotes erd
11894 \end_inset
11895
11896 , and 
11897 \begin_inset Quotes eld
11898 \end_inset
11899
11900 Conjecture
11901 \begin_inset Quotes erd
11902 \end_inset
11903
11904 .
11905  Their use is more or less obvious.
11906  LyX supports all these environments; it will use the proper label, text
11907  style, and numbering scheme for each of them.
11908 \end_layout
11909
11910 \begin_layout Enumerate
11911 Both packages use basic citations; the natbib package should not be used.
11912  In LyX, citation references are shown as usual; in the output, citations
11913  are shown as superscripts.
11914  If you want to use a citation as normal text, you should use the 
11915 \family typewriter
11916 refcite
11917 \family default
11918  command, e.
11919 \begin_inset space \thinspace{}
11920 \end_inset
11921
11922 g.
11923 \begin_inset space \space{}
11924 \end_inset
11925
11926
11927 \begin_inset Quotes eld
11928 \end_inset
11929
11930 See Ref.
11931 \begin_inset space \space{}
11932 \end_inset
11933
11934
11935 \family typewriter
11936
11937 \backslash
11938 refcite{key}
11939 \family default
11940
11941 \begin_inset Quotes erd
11942 \end_inset
11943
11944 .
11945 \end_layout
11946
11947 \begin_layout Enumerate
11948 There is no 
11949 \begin_inset Quotes eld
11950 \end_inset
11951
11952 Acknowledgments
11953 \begin_inset Quotes erd
11954 \end_inset
11955
11956  section in both packages.
11957  To put acknowledgments, just use the 
11958 \begin_inset Quotes eld
11959 \end_inset
11960
11961 Section*
11962 \begin_inset Quotes erd
11963 \end_inset
11964
11965  environment.
11966 \end_layout
11967
11968 \begin_layout Enumerate
11969 Appendices may be added to the paper, 
11970 \emph on
11971 after
11972 \emph default
11973  the Acknowledgments and 
11974 \shape italic
11975 before
11976 \shape default
11977  the References.
11978  LyX provides a special environment, called 
11979 \begin_inset Quotes eld
11980 \end_inset
11981
11982 Appendices Section
11983 \begin_inset Quotes erd
11984 \end_inset
11985
11986  which marks the beginning of the appendices.
11987  This environment should be left blank; it just sends a LaTeX command, but
11988  nothing is really printed.
11989  In LyX, the word 
11990 \begin_inset Quotes eld
11991 \end_inset
11992
11993 Appendix
11994 \begin_inset Quotes erd
11995 \end_inset
11996
11997  is printed with blue letters, as a signal that all sections after that
11998  point are appendices.
11999  To write an appendix, use the 
12000 \begin_inset Quotes eld
12001 \end_inset
12002
12003 Appendix
12004 \begin_inset Quotes erd
12005 \end_inset
12006
12007  environment.
12008  LyX will number each appendix with capital letters, as required by both
12009  journals.
12010  Note that 
12011 \begin_inset Quotes eld
12012 \end_inset
12013
12014 Appendices Section
12015 \begin_inset Quotes erd
12016 \end_inset
12017
12018  
12019 \emph on
12020 must
12021 \emph default
12022  be present before the first appendix; if not, all appendices will be numbered
12023  as normal sections in the output.
12024 \end_layout
12025
12026 \begin_layout Enumerate
12027 The ijmpc and the ijmpd packages use the 
12028 \family typewriter
12029 tbl
12030 \family default
12031  command to implement table captions.
12032  As a result, a table created by LyX is printed correctly, but its caption
12033  is ignored.
12034  However, you can use some TeX code to overcome this problem, so that captions
12035  are printed as expected.
12036  To do so, create a float table as usual, remove the caption, and replace
12037  it with the TeX code 
12038 \family typewriter
12039
12040 \backslash
12041 tbl{
12042 \emph on
12043 your table caption
12044 \emph default
12045 }{
12046 \family default
12047  (sic); you must also the TeX code 
12048 \family typewriter
12049 }
12050 \family default
12051  immediately after the tabular material.
12052  Study the example table included in the template files to see how this
12053  trick is implemented.
12054  Alternatively, If you need table captions, you should implement the whole
12055  table float in a 
12056 \family typewriter
12057 .tex
12058 \family default
12059  file, then include this file to the LyX document (
12060 \family sans
12061 Insert\SpecialChar \menuseparator
12062 File\SpecialChar \menuseparator
12063 Child
12064 \begin_inset space ~
12065 \end_inset
12066
12067 Document
12068 \family default
12069 ).
12070  Details on how to create a table float can be found in the files 
12071 \family typewriter
12072 ws-ijmpc.tex
12073 \family default
12074  and 
12075 \family typewriter
12076 ws-ijmpd.tex
12077 \family default
12078 , included in the corresponding packages.
12079 \end_layout
12080
12081 \begin_layout Subsection
12082 Preparing a paper for submission
12083 \end_layout
12084
12085 \begin_layout Standard
12086 Before you submit your paper you must export the LyX document as a LaTeX
12087  file (
12088 \family sans
12089 File\SpecialChar \menuseparator
12090 Export\SpecialChar \menuseparator
12091 LaTeX
12092 \family default
12093 )
12094 \begin_inset Foot
12095 status open
12096
12097 \begin_layout Plain Layout
12098 Actually you have the choice between LaTeX (plain) and pdflatex.
12099  If you intend to use pdflatex to prepare the paper, you should use the
12100  pdflatex option so that included graphics are converted to PDF format,
12101  ready for use by pdflatex.
12102 \end_layout
12103
12104 \end_inset
12105
12106 , then make the following changes to the resulting 
12107 \family typewriter
12108 .tex
12109 \family default
12110  file.
12111 \end_layout
12112
12113 \begin_layout Enumerate
12114 Remove the comment lines before the 
12115 \family typewriter
12116
12117 \backslash
12118 documentclass
12119 \family default
12120  command.
12121 \end_layout
12122
12123 \begin_layout Enumerate
12124 Remove everything between (and including) the 
12125 \family typewriter
12126
12127 \backslash
12128 makeatletter
12129 \family default
12130  and 
12131 \family typewriter
12132
12133 \backslash
12134 makeatother
12135 \family default
12136  commands, except for any commands you specifically put into the LaTeX preamble.
12137 \end_layout
12138
12139 \begin_layout Standard
12140 The modified 
12141 \family typewriter
12142 .tex
12143 \family default
12144  file should be saved and processed through LaTeX as many times as necessary.
12145  You may also want to check the resulting 
12146 \family typewriter
12147 .dvi
12148 \family default
12149  document.
12150 \end_layout
12151
12152 \begin_layout Subsection
12153 Use of TeX code
12154 \end_layout
12155
12156 \begin_layout Standard
12157 The use of TeX code is reduced to two commands, which must be placed at
12158  the top of the document.
12159  If you started writing your paper by using the 
12160 \family typewriter
12161 ijmpc.lyx
12162 \family default
12163  or the 
12164 \family typewriter
12165 ijmpd.lyx
12166 \family default
12167  template, the TeX code needed is already in its place; you usually don't
12168  need to delete it.
12169  You may only modify the first TeX code to specify the information printed
12170  to the top of odd and even pages (authors' names and short paper's title,
12171  respectively).
12172  This TeX code must have the form 
12173 \family typewriter
12174
12175 \backslash
12176 markboth{Authors' Names}{Short Paper's Title}
12177 \family default
12178 .
12179 \end_layout
12180
12181 \begin_layout Section
12182 iopart
12183 \end_layout
12184
12185 \begin_layout Standard
12186 by 
12187 \noun on
12188 Uwe Stöhr
12189 \end_layout
12190
12191 \begin_layout Subsection
12192 Overview
12193 \end_layout
12194
12195 \begin_layout Standard
12196 The iopart package provides a document class to create electronic manuscript
12197  submission to the journals published by the Institute of Physics.
12198  Instructions for the authors how to create a paper using the iopart class
12199  can be downloaded together with the iopart package from the site 
12200 \begin_inset Flex URL
12201 status collapsed
12202
12203 \begin_layout Plain Layout
12204
12205 ftp://ftp.iop.org/pub/journals/latex2e
12206 \end_layout
12207
12208 \end_inset
12209
12210 .
12211 \end_layout
12212
12213 \begin_layout Subsection
12214 Writing a paper
12215 \end_layout
12216
12217 \begin_layout Standard
12218 The easiest way to write a paper is to start with the file 
12219 \emph on
12220 IOP-article.lyx
12221 \emph default
12222  that is available in LyX's examples files folder.
12223  Open this file, save it under a new name, and start writing.
12224  The example file explains how to use the special text environments.
12225  Here are the most important advices:
12226 \end_layout
12227
12228 \begin_layout Itemize
12229 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12230  two options 
12231 \family sans
12232 Use AMS math package
12233 \family default
12234  in the document settings under 
12235 \family sans
12236 Math Options
12237 \family default
12238  are not used!
12239 \end_layout
12240
12241 \begin_layout Itemize
12242
12243 \size normal
12244 The title environment defines the kind of your paper.
12245  So use one of the following environments for the title:
12246 \end_layout
12247
12248 \begin_deeper
12249 \begin_layout Itemize
12250
12251 \family sans
12252 \size normal
12253 Title
12254 \family default
12255  for a Paper
12256 \end_layout
12257
12258 \begin_layout Itemize
12259
12260 \family sans
12261 \size normal
12262 Review
12263 \family default
12264  for a Review
12265 \end_layout
12266
12267 \begin_layout Itemize
12268
12269 \family sans
12270 \size normal
12271 Topical
12272 \family default
12273  for a Topical review
12274 \end_layout
12275
12276 \begin_layout Itemize
12277
12278 \family sans
12279 \size normal
12280 Comment
12281 \family default
12282  for a Comment
12283 \end_layout
12284
12285 \begin_layout Itemize
12286
12287 \family sans
12288 \size normal
12289 Note
12290 \family default
12291  for a Note
12292 \end_layout
12293
12294 \begin_layout Itemize
12295
12296 \family sans
12297 \size normal
12298 Paper
12299 \family default
12300  for a Paper (same as Title)
12301 \end_layout
12302
12303 \begin_layout Itemize
12304
12305 \family sans
12306 \size normal
12307 Prelim
12308 \family default
12309  for a Preliminary communication
12310 \end_layout
12311
12312 \begin_layout Itemize
12313
12314 \family sans
12315 \size normal
12316 Rapid
12317 \family default
12318  for a Rapid communication
12319 \end_layout
12320
12321 \begin_layout Itemize
12322
12323 \family sans
12324 \size normal
12325 Letter
12326 \family default
12327  for a Letter to the editor
12328 \end_layout
12329
12330 \end_deeper
12331 \begin_layout Itemize
12332
12333 \size normal
12334 All title environments except of 
12335 \family sans
12336 Letter
12337 \family default
12338  can have an optional short title.
12339 \end_layout
12340
12341 \begin_layout Itemize
12342 There is a general title environment 
12343 \family sans
12344 Article
12345 \family default
12346  which is not directly supported by the LyX.
12347  This can be used as TeX code when your document doesn't fit into one of
12348  the other title types.
12349 \end_layout
12350
12351 \begin_layout Standard
12352 For more informations like hints for special table and formula formatting,
12353  look at the IOP author guidelines.
12354 \end_layout
12355
12356 \begin_layout Section
12357 Kluwer
12358 \end_layout
12359
12360 \begin_layout Standard
12361 by 
12362 \noun on
12363 Panayotis Papasotiriou
12364 \end_layout
12365
12366 \begin_layout Subsection
12367 Overview
12368 \end_layout
12369
12370 \begin_layout Standard
12371 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12372  that facilitates electronic manuscript submission to the journals they
12373  publish.
12374  Most known of them (at least in my domain of interest) are 
12375 \emph on
12376 Astrophysics and Space Science
12377 \emph default
12378  and 
12379 \emph on
12380 Solar Physics
12381 \emph default
12382 , but there are many others (see a complete list at 
12383 \begin_inset Flex URL
12384 status open
12385
12386 \begin_layout Plain Layout
12387
12388 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12389 \end_layout
12390
12391 \end_inset
12392
12393 ).
12394  The Kluwer package may be downloaded from the site 
12395 \begin_inset Flex URL
12396 status collapsed
12397
12398 \begin_layout Plain Layout
12399
12400 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12401 \end_layout
12402
12403 \end_inset
12404
12405 .
12406  A complete user guide is contained in that package (but it can also be
12407  downloaded separately).
12408 \end_layout
12409
12410 \begin_layout Standard
12411 LyX supports many features of the package but not everything.
12412  However, the TeX code needed is reduced to some 
12413 \begin_inset Quotes eld
12414 \end_inset
12415
12416 peculiar
12417 \begin_inset Quotes erd
12418 \end_inset
12419
12420  commands of the package (see
12421 \begin_inset space ~
12422 \end_inset
12423
12424
12425 \begin_inset CommandInset ref
12426 LatexCommand ref
12427 reference "subsec:kluwer_peculiarities"
12428
12429 \end_inset
12430
12431 ).
12432  I have recently used LyX to write an article submitted to the 
12433 \emph on
12434 Astrophysics and Space Science
12435 \emph default
12436  without any problem.
12437 \end_layout
12438
12439 \begin_layout Subsection
12440 Writing a paper
12441 \end_layout
12442
12443 \begin_layout Standard
12444 The easiest way to write a paper is to start with the Kluwer template file.
12445  Click on 
12446 \family sans
12447 File\SpecialChar \menuseparator
12448 New from
12449 \family default
12450  
12451 \family sans
12452 Template
12453 \family default
12454 , then choose the 
12455 \family typewriter
12456 kluwer.lyx
12457 \family default
12458  template.
12459  This will give an (almost) empty document that includes the most common
12460  fields found in a manuscript and a short description of their use.
12461  As in most templates, simply overwrite the existing text (including the
12462  brackets, 
12463 \family typewriter
12464 <>
12465 \family default
12466 ) with the correct information.
12467 \end_layout
12468
12469 \begin_layout Subsection
12470 Preparing a paper for submission
12471 \end_layout
12472
12473 \begin_layout Standard
12474 As in the AASTeX package, before you submit your paper to a journal you
12475  must 
12476 \begin_inset Quotes eld
12477 \end_inset
12478
12479 postprocess
12480 \begin_inset Quotes erd
12481 \end_inset
12482
12483  it as follows.
12484 \end_layout
12485
12486 \begin_layout Enumerate
12487 Export your paper as a LaTeX file.
12488  To do this, click on 
12489 \family sans
12490 File\SpecialChar \menuseparator
12491 Export\SpecialChar \menuseparator
12492 LaTeX
12493 \family default
12494 .
12495  
12496 \end_layout
12497
12498 \begin_layout Enumerate
12499 Edit the resulting 
12500 \family typewriter
12501 .tex
12502 \family default
12503  file with a text editor and make the following changes
12504 \end_layout
12505
12506 \begin_deeper
12507 \begin_layout Enumerate
12508 remove the comment lines before the 
12509 \family typewriter
12510
12511 \backslash
12512 documentclass
12513 \family default
12514  command,
12515 \end_layout
12516
12517 \begin_layout Enumerate
12518 remove everything between (and including) the 
12519 \family typewriter
12520
12521 \backslash
12522 makeatletter
12523 \family default
12524  and 
12525 \family typewriter
12526
12527 \backslash
12528 makeatother
12529 \family default
12530  commands, except for any commands you specifically put into the LaTeX preamble.
12531 \end_layout
12532
12533 \begin_layout Standard
12534 Save the resulting 
12535 \family typewriter
12536 .tex
12537 \family default
12538  file.
12539 \end_layout
12540
12541 \end_deeper
12542 \begin_layout Enumerate
12543 Run the 
12544 \family typewriter
12545 .tex
12546 \family default
12547  file through LaTeX as many times as necessary (usually up to three).
12548 \end_layout
12549
12550 \begin_layout Enumerate
12551 View the resulting 
12552 \family typewriter
12553 .dvi
12554 \family default
12555  document using, e.
12556 \begin_inset space \thinspace{}
12557 \end_inset
12558
12559 g.
12560 \begin_inset space \space{}
12561 \end_inset
12562
12563
12564 \family sans
12565 xdvi
12566 \family default
12567 , and check if everything is OK (it should, if you didn't make any mistake).
12568 \end_layout
12569
12570 \begin_layout Subsection
12571 \begin_inset Quotes eld
12572 \end_inset
12573
12574 Peculiarities
12575 \begin_inset Quotes erd
12576 \end_inset
12577
12578  of the Kluwer package
12579 \begin_inset CommandInset label
12580 LatexCommand label
12581 name "subsec:kluwer_peculiarities"
12582
12583 \end_inset
12584
12585
12586 \end_layout
12587
12588 \begin_layout Standard
12589 The Kluwer package has the following 
12590 \begin_inset Quotes eld
12591 \end_inset
12592
12593 peculiarities
12594 \begin_inset Quotes erd
12595 \end_inset
12596
12597 .
12598 \end_layout
12599
12600 \begin_layout Enumerate
12601 It is possible to write multiple articles in the same LaTeX file
12602 \begin_inset Foot
12603 status collapsed
12604
12605 \begin_layout Plain Layout
12606 I can't imagine any good reason to do this.
12607 \end_layout
12608
12609 \end_inset
12610
12611 .
12612  Each article must be included in the environment 
12613 \begin_inset Quotes eld
12614 \end_inset
12615
12616 article
12617 \begin_inset Quotes erd
12618 \end_inset
12619
12620 .
12621  Unfortunately, this environment cannot be omitted, even if you write just
12622  one article.
12623  Therefore, each article starts with the command 
12624 \family typewriter
12625
12626 \backslash
12627 begin{article}
12628 \family default
12629  and, obviously, ends with the command 
12630 \family typewriter
12631
12632 \backslash
12633 end{article}
12634 \family default
12635 .
12636  Although this can be implemented in LyX, I didn't included it, since it
12637  looks ugly and can confuse the novice user.
12638  Therefore, you need to enter them directly and mark them as LaTeX code
12639  (the well-known 
12640 \begin_inset Quotes eld
12641 \end_inset
12642
12643 TeX code
12644 \begin_inset Quotes erd
12645 \end_inset
12646
12647 ).
12648 \end_layout
12649
12650 \begin_layout Enumerate
12651 Information given at the beginning of the article (i.
12652 \begin_inset space \thinspace{}
12653 \end_inset
12654
12655 g.
12656 \begin_inset space \space{}
12657 \end_inset
12658
12659 title, subtitle, author, institution, running title, running author, abstract
12660  and keywords) must be included in an environment called 
12661 \begin_inset Quotes eld
12662 \end_inset
12663
12664 opening
12665 \begin_inset Quotes erd
12666 \end_inset
12667
12668 .
12669  This is not implemented in LyX, so you must enter title, subtitle etc.
12670 \begin_inset space ~
12671 \end_inset
12672
12673 between two TeX code lines (
12674 \family typewriter
12675
12676 \backslash
12677 begin{opening}
12678 \family default
12679  and 
12680 \family typewriter
12681
12682 \backslash
12683 end{opening}
12684 \family default
12685 ).
12686 \end_layout
12687
12688 \begin_layout Enumerate
12689 According to the user manual, the label of each bibliography item must be
12690  written as 
12691 \family typewriter
12692
12693 \backslash
12694 protect
12695 \backslash
12696 citeauthoryear{
12697 \family default
12698 \emph on
12699 author(s)
12700 \family typewriter
12701 \emph default
12702 }{
12703 \family default
12704 \emph on
12705 year
12706 \family typewriter
12707 \emph default
12708 }
12709 \family default
12710 .
12711 \end_layout
12712
12713 \begin_layout Standard
12714 The 
12715 \family typewriter
12716 kluwer.lyx
12717 \family default
12718  template takes care of all these 
12719 \begin_inset Quotes eld
12720 \end_inset
12721
12722 peculiarities
12723 \begin_inset Quotes erd
12724 \end_inset
12725
12726 .
12727  If you start a new paper using this template you don't need to do anything
12728  special.
12729  Just 
12730 \end_layout
12731
12732 \begin_layout Enumerate
12733 don't delete the TeX code included in the template, and
12734 \end_layout
12735
12736 \begin_layout Enumerate
12737 copy the example bibliography item included in the template and modify it
12738  as necessary to enter new bibliography items.
12739 \end_layout
12740
12741 \begin_layout Section
12742 Koma-Script
12743 \end_layout
12744
12745 \begin_layout Standard
12746 by 
12747 \noun on
12748 Bernd Rellermeyer
12749 \end_layout
12750
12751 \begin_layout Subsection
12752 Overview
12753 \end_layout
12754
12755 \begin_layout Standard
12756 The LyX document classes 
12757 \emph on
12758 article (koma-script)
12759 \emph default
12760
12761 \emph on
12762 report (koma-script)
12763 \emph default
12764
12765 \emph on
12766 book
12767 \emph default
12768  
12769 \emph on
12770 (koma-script)
12771 \emph default
12772 , and 
12773 \emph on
12774 letter
12775 \emph default
12776  
12777 \emph on
12778 (koma-script)
12779 \emph default
12780  correspond to the LaTeX document classes 
12781 \family typewriter
12782 scrartcl.cls
12783 \family default
12784
12785 \family typewriter
12786 scrreprt.cls
12787 \family default
12788
12789 \family typewriter
12790 scrbook.cls
12791 \family default
12792 , and 
12793 \family typewriter
12794 scrlettr.cls
12795 \family default
12796 , resp.
12797 \begin_inset space ~
12798 \end_inset
12799
12800 of the Koma-Script family.
12801  They are replacements for the standard document classes 
12802 \family typewriter
12803 article.cls
12804 \family default
12805
12806 \family typewriter
12807 report.cls
12808 \family default
12809
12810 \family typewriter
12811 book.cls
12812 \family default
12813  and 
12814 \family typewriter
12815 letter.cls
12816 \family default
12817 , resp., and fit better to European typography conventions in a number of
12818  points.
12819 \end_layout
12820
12821 \begin_layout Itemize
12822 Standard character size is 11pt in 
12823 \emph on
12824 article (koma-script)
12825 \emph default
12826
12827 \emph on
12828 report (koma-script)
12829 \emph default
12830 , and 
12831 \emph on
12832 book (koma-script)
12833 \emph default
12834 , and 12pt in 
12835 \emph on
12836 letter (koma-script)
12837 \emph default
12838 .
12839 \end_layout
12840
12841 \begin_layout Itemize
12842 Headings, labels of the description environment, and a number of elements
12843  of the 
12844 \emph on
12845 letter (koma-script)
12846 \emph default
12847  document class are set in a bold sans serif font.
12848 \begin_inset Foot
12849 status collapsed
12850
12851 \begin_layout Plain Layout
12852 There is a big difference between the bold sans serif old cm fonts and new
12853  ec fonts, especially in the appearance of headings.
12854  In comparison, the ec bold sans serif fonts look a bit thin.
12855  Here the LaTeX package 
12856 \family typewriter
12857 cmsd.sty by
12858 \family default
12859  
12860 \shape smallcaps
12861 Walter Schmidt
12862 \shape default
12863  helps to produce the 
12864 \begin_inset Quotes eld
12865 \end_inset
12866
12867 usual
12868 \begin_inset Quotes erd
12869 \end_inset
12870
12871  appearance when using the ec fonts.
12872 \end_layout
12873
12874 \end_inset
12875
12876  The numbering of chapter headings is made in the same way as the numbering
12877  of section headings, that is without the extra line 
12878 \begin_inset Quotes eld
12879 \end_inset
12880
12881 Chapter\SpecialChar \ldots{}
12882
12883 \begin_inset Quotes erd
12884 \end_inset
12885
12886 .
12887  In addition, the appearance of the headings can be modified by using a
12888  number of options (in LyX to be entered in the field 
12889 \family sans
12890 Extra
12891 \begin_inset space ~
12892 \end_inset
12893
12894 Options
12895 \family default
12896  of the dialog 
12897 \family sans
12898 Layout\SpecialChar \menuseparator
12899 Document
12900 \family default
12901 ).
12902  
12903 \end_layout
12904
12905 \begin_layout Itemize
12906 The main means in the Koma-Script document classes to design the type area
12907  are the options 
12908 \family sans
12909 BCOR
12910 \family default
12911  and 
12912 \family sans
12913 DIV
12914 \family default
12915  (in LyX to be entered in the extra class options field in the dialog 
12916 \family sans
12917 Document\SpecialChar \menuseparator
12918 Settings
12919 \family default
12920 ).
12921  They make a clearer modification of page margins possible as do the options
12922  of the dialog 
12923 \family sans
12924 Document\SpecialChar \menuseparator
12925 Settings
12926 \family default
12927 .
12928  
12929 \end_layout
12930
12931 \begin_layout Itemize
12932 The LaTeX document classes of the Koma-Script family define a number of
12933  additional commands.
12934  Those part of it which makes sense in LyX is implemented in corresponding
12935  paragraph types.
12936 \end_layout
12937
12938 \begin_layout Standard
12939 Detailed descriptions of the LaTeX document classes of the Koma-Script family
12940  can be found in the Koma-Script documentation 
12941 \emph on
12942 scrguide
12943 \emph default
12944  (German) and 
12945 \emph on
12946 scrguien
12947 \emph default
12948  (English).
12949 \end_layout
12950
12951 \begin_layout Subsection
12952 article (koma-script), report (koma-script), and book (koma-script)
12953 \end_layout
12954
12955 \begin_layout Standard
12956 The document classes 
12957 \emph on
12958 article (koma-script)
12959 \emph default
12960
12961 \emph on
12962 report (koma-script)
12963 \emph default
12964 , and 
12965 \emph on
12966 book
12967 \emph default
12968  
12969 \emph on
12970 (koma-script)
12971 \emph default
12972  are implemented in the layout files 
12973 \family typewriter
12974 scrartcl.layout
12975 \family default
12976
12977 \family typewriter
12978 scrreprt.layout
12979 \family default
12980 , and 
12981 \family typewriter
12982 scrbook.layout
12983 \family default
12984 , resp.
12985  They contain all the paragraph types of the corresponding standard document
12986  classes 
12987 \emph on
12988 article
12989 \emph default
12990
12991 \emph on
12992 report
12993 \emph default
12994 , and 
12995 \emph on
12996 book
12997 \emph default
12998 , resp., partly modified, with the exception of the LyX specific 
12999 \family sans
13000 List
13001 \family default
13002 -type, which is replaced by the new 
13003 \family sans
13004 Labeling
13005 \family default
13006 -type having the same functionality.
13007  Beside the 
13008 \family sans
13009 Labeling
13010 \family default
13011 -Type there is a number of new paragraph types added.
13012  They are 
13013 \emph on
13014 not
13015 \emph default
13016  part of 
13017 \emph on
13018 letter (koma-script)
13019 \emph default
13020 .
13021 \end_layout
13022
13023 \begin_layout Itemize
13024
13025 \family sans
13026 Addpart, Addchap
13027 \family default
13028
13029 \family sans
13030 Addsec
13031 \family default
13032 : are equivalents to 
13033 \family sans
13034 Part*, Chapter*
13035 \family default
13036  and 
13037 \family sans
13038 Section*
13039 \family default
13040 , resp., additionally inserting an entry in the table of contents.
13041  
13042 \family sans
13043 Addpart
13044 \family default
13045  and 
13046 \family sans
13047 Addchap
13048 \family default
13049  are not contained in 
13050 \emph on
13051 article (koma-script)
13052 \emph default
13053 .
13054 \end_layout
13055
13056 \begin_layout Itemize
13057
13058 \family sans
13059 Addchap*
13060 \family default
13061
13062 \family sans
13063 Addsec*
13064 \family default
13065 : behave exactly as 
13066 \family sans
13067 Addchap
13068 \family default
13069  and 
13070 \family sans
13071 Addsec
13072 \family default
13073 , resp., additionally clearing running heads.
13074  
13075 \family sans
13076 Addchap*
13077 \family default
13078  is not contained in 
13079 \emph on
13080 article (koma-script)
13081 \emph default
13082 .
13083 \begin_inset Foot
13084 status collapsed
13085
13086 \begin_layout Plain Layout
13087 There is also an 
13088 \family typewriter
13089
13090 \backslash
13091 addpart*
13092 \family default
13093  command in 
13094 \emph on
13095 book (koma-script)
13096 \emph default
13097  and in 
13098 \emph on
13099 report (koma-script)
13100 \emph default
13101 , but since this is identical to 
13102 \family sans
13103 Part*
13104 \family default
13105 , is has not been implemented in LyX.
13106 \end_layout
13107
13108 \end_inset
13109
13110
13111 \end_layout
13112
13113 \begin_layout Itemize
13114
13115 \family sans
13116 Minisec
13117 \family default
13118 : generates a heading directly above the following paragraph in the standard
13119  character size without affecting the structure of the document.
13120 \end_layout
13121
13122 \begin_layout Itemize
13123
13124 \family sans
13125 Captionabove
13126 \family default
13127  and 
13128 \family sans
13129 Captionbelow
13130 \family default
13131  are special captions which respect the different space settings needed
13132  for captions placed above or below an element (if you follow strict typographic
13133  rules, you might want to place table captions always above the table).
13134  You can also use the class option 
13135 \family typewriter
13136 tablecaptionsabove
13137 \family default
13138 , which will switch 
13139 \family sans
13140 caption
13141 \family default
13142  to 
13143 \family sans
13144 captionabove
13145 \family default
13146  for tables and 
13147 \family sans
13148 captionbelow
13149 \family default
13150  for figures.
13151  You need at least Koma-Script version 2.8q to use this.
13152 \end_layout
13153
13154 \begin_layout Itemize
13155
13156 \family sans
13157 Dictum
13158 \family default
13159 : can be used to set a bonmot, e.
13160 \begin_inset space \thinspace{}
13161 \end_inset
13162
13163 g.
13164 \begin_inset space \space{}
13165 \end_inset
13166
13167 at the beginning of a chapter.
13168  If you use the optional argument (
13169 \family sans
13170 Insert\SpecialChar \menuseparator
13171 Short
13172 \begin_inset space ~
13173 \end_inset
13174
13175 Title
13176 \family default
13177 ), you can insert the dictum's author there.
13178  Dictum and author are separated by a line.
13179  You need at least Koma-Script version 2.8q to use this.
13180  
13181 \family sans
13182 Dictum
13183 \family default
13184  is not contained in 
13185 \emph on
13186 article (koma-script)
13187 \emph default
13188 .
13189 \end_layout
13190
13191 \begin_layout Standard
13192 The following types, together with the standard types 
13193 \family sans
13194 Title
13195 \family default
13196
13197 \family sans
13198 Author
13199 \family default
13200 , and 
13201 \family sans
13202 Date
13203 \family default
13204 , form the title area of the document.
13205  They must be entered ahead of the first 
13206 \begin_inset Quotes eld
13207 \end_inset
13208
13209 ordinary
13210 \begin_inset Quotes erd
13211 \end_inset
13212
13213  paragraph.
13214 \begin_inset Foot
13215 status collapsed
13216
13217 \begin_layout Plain Layout
13218 The corresponding LaTeX commands must appear before the 
13219 \family typewriter
13220
13221 \backslash
13222 maketitle
13223 \family default
13224  command.
13225 \end_layout
13226
13227 \end_inset
13228
13229  When such a type is used more than once, the latter usage overwrites the
13230  former one, that means, for every type only the latest usage is valid.
13231  The order of the different types however has, like 
13232 \family sans
13233 Title
13234 \family default
13235
13236 \family sans
13237 Author
13238 \family default
13239 , and 
13240 \family sans
13241 Date
13242 \family default
13243 , no effect on the appearance of the produced document.
13244 \end_layout
13245
13246 \begin_layout Itemize
13247
13248 \family sans
13249 Subject
13250 \family default
13251 : produces a centered paragraph above the ordinary title (
13252 \family sans
13253 Title
13254 \family default
13255
13256 \family sans
13257 Author
13258 \family default
13259
13260 \family sans
13261 Date
13262 \family default
13263 ) for the subject of the document.
13264 \end_layout
13265
13266 \begin_layout Itemize
13267
13268 \family sans
13269 Publishers
13270 \family default
13271 : produces a centered paragraph below the ordinary title (
13272 \family sans
13273 Title
13274 \family default
13275
13276 \family sans
13277 Author
13278 \family default
13279
13280 \family sans
13281 Date
13282 \family default
13283 ) for the publishers' name.
13284 \end_layout
13285
13286 \begin_layout Itemize
13287
13288 \family sans
13289 Dedication
13290 \family default
13291 : in 
13292 \emph on
13293 report (koma-script)
13294 \emph default
13295  and 
13296 \emph on
13297 book (koma-script)
13298 \emph default
13299  produces a centered paragraph on its own page behind the title page, or
13300  in 
13301 \emph on
13302 article (koma-script)
13303 \emph default
13304  produces a centered paragraph below the ordinary title (
13305 \family sans
13306 Title
13307 \family default
13308
13309 \family sans
13310 Author
13311 \family default
13312
13313 \family sans
13314 Date
13315 \family default
13316
13317 \family sans
13318 Publishers
13319 \family default
13320 ) for a dedication.
13321 \end_layout
13322
13323 \begin_layout Itemize
13324
13325 \family sans
13326 Titlehead
13327 \family default
13328 : produces a left aligned paragraph above the ordinary title (
13329 \family sans
13330 Title
13331 \family default
13332
13333 \family sans
13334 Author
13335 \family default
13336
13337 \family sans
13338 Date
13339 \family default
13340
13341 \family sans
13342 Subject
13343 \family default
13344 ) for a document`s head.
13345 \end_layout
13346
13347 \begin_layout Itemize
13348
13349 \family sans
13350 Uppertitleback
13351 \family default
13352 : produces in a double-sided print in 
13353 \emph on
13354 report (koma-script)
13355 \emph default
13356  and 
13357 \emph on
13358 book (koma-script)
13359 \emph default
13360  a left-aligned paragraph at the top of the title page`s back or has no
13361  effect in a single-sided print or in 
13362 \emph on
13363 article (koma-script)
13364 \emph default
13365 .
13366 \end_layout
13367
13368 \begin_layout Itemize
13369
13370 \family sans
13371 Lowertitleback
13372 \family default
13373 : produces in a double-sided print in 
13374 \emph on
13375 report (koma-script)
13376 \emph default
13377  and 
13378 \emph on
13379 book (koma-script)
13380 \emph default
13381  a left-aligned paragraph at the bottom of the title page`s back or has
13382  no effect in a single-sided print or in 
13383 \emph on
13384 article (koma-script)
13385 \emph default
13386 .
13387 \end_layout
13388
13389 \begin_layout Itemize
13390
13391 \family sans
13392 Extratitle
13393 \family default
13394 : produces a special 
13395 \begin_inset Quotes eld
13396 \end_inset
13397
13398 dirty
13399 \begin_inset Quotes erd
13400 \end_inset
13401
13402  page ahead of the actual document containing a paragraph without special
13403  formatting.
13404 \end_layout
13405
13406 \begin_layout Standard
13407 The layout files for the document classes 
13408 \emph on
13409 article (koma-script)
13410 \emph default
13411
13412 \emph on
13413 report (koma-script)
13414 \emph default
13415 , and 
13416 \emph on
13417 book (koma-script)
13418 \emph default
13419  do include the file 
13420 \family typewriter
13421 scrmacros.inc
13422 \family default
13423 .
13424  This is thought of as a place to define your own types.
13425  Copy scrmacros
13426 \family typewriter
13427 .inc
13428 \family default
13429  in your personal layout directory and edit the file!
13430 \end_layout
13431
13432 \begin_layout Subsection
13433 letter (koma-script)
13434 \end_layout
13435
13436 \begin_layout Standard
13437 \begin_inset ERT
13438 status open
13439
13440 \begin_layout Plain Layout
13441
13442
13443 \backslash
13444 begin{sloppypar}
13445 \end_layout
13446
13447 \end_inset
13448
13449
13450 \end_layout
13451
13452 \begin_layout Standard
13453 \noindent
13454 The document class 
13455 \emph on
13456 letter (koma-script)
13457 \emph default
13458  is implemented in the layout file 
13459 \family typewriter
13460 scrlettr.layout
13461 \family default
13462 .
13463  It contains all the paragraph types of the corresponding standard document
13464  class 
13465 \emph on
13466 letter
13467 \emph default
13468 , partly modified, with the exception of the LyX specific types 
13469 \family sans
13470 LyX-Code
13471 \family default
13472  and 
13473 \family sans
13474 Comment
13475 \family default
13476  and the 
13477 \family sans
13478 List
13479 \family default
13480  type, which is replaced by the new 
13481 \family sans
13482 Labeling
13483 \family default
13484  type.
13485  In addition, it contains, in contrast to the standard document class, the
13486  standard types 
13487 \family sans
13488 LaTeX
13489 \family default
13490
13491 \family sans
13492 Quotation
13493 \family default
13494
13495 \family sans
13496 Quote
13497 \family default
13498 , and 
13499 \family sans
13500 Verse
13501 \family default
13502 .
13503  Furthermore, there are a number of new letter specific types.
13504 \end_layout
13505
13506 \begin_layout Standard
13507 \begin_inset ERT
13508 status open
13509
13510 \begin_layout Plain Layout
13511
13512
13513 \backslash
13514 end{sloppypar}
13515 \end_layout
13516
13517 \end_inset
13518
13519
13520 \end_layout
13521
13522 \begin_layout Standard
13523 The appearance of the letter produced by this document class can be controlled
13524  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13525 \begin_inset Foot
13526 status collapsed
13527
13528 \begin_layout Plain Layout
13529 For example, the standard appearance of the letter`s heading, consisting
13530  of name and address, is quite self-willed.
13531  An 
13532 \begin_inset Quotes eld
13533 \end_inset
13534
13535 ordinary
13536 \begin_inset Quotes erd
13537 \end_inset
13538
13539  heading is produced by the following LaTeX commands in the preamble:
13540 \end_layout
13541
13542 \begin_layout LyX-Code
13543
13544 \backslash
13545 firsthead{
13546 \backslash
13547 parbox[b]{
13548 \backslash
13549 textwidth}
13550 \end_layout
13551
13552 \begin_layout LyX-Code
13553   {
13554 \backslash
13555 ignorespaces 
13556 \backslash
13557 fromname
13558 \backslash
13559
13560 \backslash
13561  
13562 \backslash
13563 ignorespaces 
13564 \backslash
13565 fromaddress}} 
13566 \end_layout
13567
13568 \begin_layout LyX-Code
13569
13570 \backslash
13571 nexthead{
13572 \backslash
13573 parbox[b]{
13574 \backslash
13575 textwidth}
13576 \end_layout
13577
13578 \begin_layout LyX-Code
13579   {
13580 \backslash
13581 ignorespaces 
13582 \backslash
13583 fromname 
13584 \backslash
13585 hfill 
13586 \backslash
13587 ignorespaces 
13588 \backslash
13589 pagename
13590 \backslash
13591  
13592 \backslash
13593 thepage}}
13594 \end_layout
13595
13596 \end_inset
13597
13598  A detailed German description of such LaTeX commands can be found in the
13599  Koma-Script documentation 
13600 \emph on
13601 scrguide
13602 \emph default
13603 .
13604  With it, the letter's author can produce his personal letter layout.
13605 \end_layout
13606
13607 \begin_layout Standard
13608 The types 
13609 \family sans
13610 Letter
13611 \family default
13612  and 
13613 \family sans
13614 Opening
13615 \family default
13616  define the beginning of the letter and must be used in every letter.
13617  To emphasize them in the LyX document class, they are marked with the letter
13618  
13619 \shape italic
13620 L
13621 \shape default
13622  or 
13623 \shape italic
13624 O
13625 \shape default
13626 , resp.
13627 \begin_inset space ~
13628 \end_inset
13629
13630 in the left margin.
13631  It is possible to write any number of letters in one file.
13632  An 
13633 \family sans
13634 Opening
13635 \family default
13636  type produces a new letter using the same addressee and a 
13637 \family sans
13638 Letter
13639 \family default
13640  type produces a new addressee.
13641  The types 
13642 \family sans
13643 Closing
13644 \family default
13645
13646 \family sans
13647 PS
13648 \family default
13649
13650 \family sans
13651 CC
13652 \family default
13653 , and 
13654 \family sans
13655 Encl
13656 \family default
13657  are ordinary paragraph types and can also be used several times in one
13658  and the same letter.
13659 \end_layout
13660
13661 \begin_layout Itemize
13662
13663 \family sans
13664 Letter
13665 \family default
13666 : produces a paragraph for the addressee and implicitly defines the beginning
13667  of the letter.
13668 \end_layout
13669
13670 \begin_layout Itemize
13671
13672 \family sans
13673 Opening
13674 \family default
13675 : produces a paragraph for the form of address and implicitly produces a
13676  new letter.
13677 \end_layout
13678
13679 \begin_layout Itemize
13680
13681 \family sans
13682 Closing
13683 \family default
13684 : produces a paragraph for a close.
13685 \end_layout
13686
13687 \begin_layout Itemize
13688
13689 \family sans
13690 PS
13691 \family default
13692 : produces a paragraph for a postscript.
13693 \end_layout
13694
13695 \begin_layout Itemize
13696
13697 \family sans
13698 CC
13699 \family default
13700 : produces a paragraph for a distribution list.
13701 \end_layout
13702
13703 \begin_layout Itemize
13704
13705 \family sans
13706 Encl
13707 \family default
13708 : produces a paragraph for enclosures.
13709 \end_layout
13710
13711 \begin_layout Standard
13712 The types 
13713 \family sans
13714 Name
13715 \family default
13716
13717 \family sans
13718 Signature
13719 \family default
13720
13721 \family sans
13722 Address
13723 \family default
13724
13725 \family sans
13726 Telephone
13727 \family default
13728
13729 \family sans
13730 Place
13731 \family default
13732
13733 \family sans
13734 Backaddress
13735 \family default
13736
13737 \family sans
13738 Specialmail
13739 \family default
13740
13741 \family sans
13742 Location
13743 \family default
13744
13745 \family sans
13746 Title
13747 \family default
13748 , and 
13749 \family sans
13750 Subject
13751 \family default
13752  are input types provided with a label to enter information, which will
13753  be processed by the document class.
13754 \begin_inset Foot
13755 status open
13756
13757 \begin_layout Plain Layout
13758 It could be seen as a matter of inconsequence, that the types 
13759 \family sans
13760 Letter
13761 \family default
13762  and 
13763 \family sans
13764 Opening
13765 \family default
13766  described above are not such input types as well.
13767  Because of the special meaning of those types, however, I have implemented
13768  them as ordinary paragraph types with a one letter mark in the left margin.
13769  Moreover, it would affect my feeling of symmetry, if the 
13770 \family sans
13771 Opening
13772 \family default
13773  type and the 
13774 \family sans
13775 Closing
13776 \family default
13777  type had such a serious different appearance.
13778 \end_layout
13779
13780 \end_inset
13781
13782  The types must be used ahead of the corresponding 
13783 \family sans
13784 Opening
13785 \family default
13786  type.
13787 \end_layout
13788
13789 \begin_layout Standard
13790 An implementation of these types in a WYSIWYG fashion does not seem to make
13791  sense, because the real appearance of the produced letter does not only
13792  depend on the usage of the particular type, but also on other factors.
13793  For example, a signature entered in the 
13794 \family sans
13795 Signature
13796 \family default
13797  type will in the standard behavior appear in the produced letter only,
13798  when in the same letter also a 
13799 \family sans
13800 Closing
13801 \family default
13802  type is used.
13803  The entered value of the 
13804 \family sans
13805 Telephone
13806 \family default
13807  type will in the standard behavior not appear in the produced letter at
13808  all.
13809  The possibility to design the letter`s heading freely is already indicated
13810  in a footnote above.
13811 \end_layout
13812
13813 \begin_layout Standard
13814 The input types can also be used as empty paragraphs.
13815  This makes sense e.
13816 \begin_inset space \thinspace{}
13817 \end_inset
13818
13819 g.
13820 \begin_inset space \space{}
13821 \end_inset
13822
13823 for the 
13824 \family sans
13825 Signature
13826 \family default
13827  type.
13828  If the 
13829 \family sans
13830 Signature
13831 \family default
13832  type is not used at all, in the standard behavior the value of the 
13833 \family sans
13834 Name
13835 \family default
13836  type is used as signature, whereas if an empty 
13837 \family sans
13838 Signature
13839 \family default
13840  type is used, no signature value is defined.
13841 \end_layout
13842
13843 \begin_layout Standard
13844 By using the input types it is possible to write a letter template, containing
13845  filled input types with your personal dates (name, address, etc.) and empty
13846  input types for other dates you want to enter.
13847 \end_layout
13848
13849 \begin_layout Itemize
13850
13851 \family sans
13852 Name
13853 \family default
13854 : sender's name, in the standard behavior appears as a centered paragraph
13855  in small caps in the letter`s heading.
13856 \end_layout
13857
13858 \begin_layout Itemize
13859
13860 \family sans
13861 Signature
13862 \family default
13863 : sender's signature, in the standard behavior appears below the 
13864 \family sans
13865 Closing
13866 \family default
13867  type.
13868  If no 
13869 \family sans
13870 Signature
13871 \family default
13872  type is used, the value of the 
13873 \family sans
13874 Name
13875 \family default
13876  type appears instead.
13877 \end_layout
13878
13879 \begin_layout Itemize
13880
13881 \family sans
13882 Address
13883 \family default
13884 : sender's address, in the standard behavior appears in a centered paragraph
13885  in the letter`s heading below the sender's name.
13886 \end_layout
13887
13888 \begin_layout Itemize
13889
13890 \family sans
13891 Telephone
13892 \family default
13893 : sender's telephone number, in the standard behavior only sets the LaTeX
13894  variable 
13895 \family typewriter
13896
13897 \backslash
13898 telephonenum
13899 \family default
13900 .
13901 \end_layout
13902
13903 \begin_layout Itemize
13904
13905 \family sans
13906 Place
13907 \family default
13908 : place of the letter`s making.
13909 \end_layout
13910
13911 \begin_layout Itemize
13912
13913 \family sans
13914 Date
13915 \family default
13916 : date of the letter`s making.
13917  
13918 \family sans
13919 Place
13920 \family default
13921  and 
13922 \family sans
13923 Date
13924 \family default
13925 , in the standard behavior, produce the place and the date in a right-aligned
13926  line below the addressee's field.
13927  If an empty 
13928 \family sans
13929 Date
13930 \family default
13931  type is used, neither place nor date appear, independent of the value of
13932  the 
13933 \family sans
13934 Place
13935 \family default
13936  type.
13937  If no 
13938 \family sans
13939 Date
13940 \family default
13941  type is used, the date of the letter `s production is used.
13942 \end_layout
13943
13944 \begin_layout Itemize
13945
13946 \family sans
13947 Backaddress
13948 \family default
13949 : sender`s back address, in the standard behavior appears above the addressee's
13950  field in a small sans serif font.
13951 \end_layout
13952
13953 \begin_layout Itemize
13954
13955 \family sans
13956 Specialmail
13957 \family default
13958 : special mail information, in the standard behavior appears underlined
13959  above the addressee's field below the back address.
13960 \end_layout
13961
13962 \begin_layout Itemize
13963
13964 \family sans
13965 Location
13966 \family default
13967 : additional information, in the standard behavior appears on right side
13968  below the addressee`s field.
13969 \end_layout
13970
13971 \begin_layout Itemize
13972
13973 \family sans
13974 Title
13975 \family default
13976 : the letter's title, in the standard behavior appears in a big, bold, sans
13977  serif font above the subject.
13978 \end_layout
13979
13980 \begin_layout Itemize
13981
13982 \family sans
13983 Subject
13984 \family default
13985 : the letter's subject, in the standard behavior appears in a bold font
13986  above the 
13987 \family sans
13988 Opening
13989 \family default
13990  paragraph.
13991 \end_layout
13992
13993 \begin_layout Standard
13994 The types 
13995 \family sans
13996 Yourref
13997 \family default
13998
13999 \family sans
14000 Yourmail
14001 \family default
14002
14003 \family sans
14004 Myref
14005 \family default
14006
14007 \family sans
14008 Customer
14009 \family default
14010 , and 
14011 \family sans
14012 Invoice
14013 \family default
14014  produce a business letter like line above the 
14015 \family sans
14016 Title
14017 \family default
14018  line containing the fields 
14019 \begin_inset Quotes eld
14020 \end_inset
14021
14022 Your ref.
14023 \begin_inset Quotes erd
14024 \end_inset
14025
14026
14027 \begin_inset Quotes eld
14028 \end_inset
14029
14030 Your letter of
14031 \begin_inset Quotes erd
14032 \end_inset
14033
14034
14035 \begin_inset Quotes eld
14036 \end_inset
14037
14038 Our ref.
14039 \begin_inset Quotes erd
14040 \end_inset
14041
14042
14043 \begin_inset Quotes eld
14044 \end_inset
14045
14046 Customer no.
14047 \begin_inset Quotes erd
14048 \end_inset
14049
14050
14051 \begin_inset Quotes eld
14052 \end_inset
14053
14054 Invoice no.
14055 \begin_inset Quotes erd
14056 \end_inset
14057
14058 , and 
14059 \begin_inset Quotes eld
14060 \end_inset
14061
14062 Date
14063 \begin_inset Quotes erd
14064 \end_inset
14065
14066 .
14067  For the date field, the value of the 
14068 \family sans
14069 Date
14070 \family default
14071  type is used.
14072  If one of these 
14073 \begin_inset Quotes eld
14074 \end_inset
14075
14076 business letter types
14077 \begin_inset Quotes erd
14078 \end_inset
14079
14080  is used, the value of the 
14081 \family sans
14082 Place
14083 \family default
14084  type however does not appear, but only the LaTeX variable 
14085 \family typewriter
14086
14087 \backslash
14088 fromplace
14089 \family default
14090  is set.
14091  The ordinary output of place and date in a right-aligned line below the
14092  addressee`s field is suppressed.
14093  The types are implemented as input types provided with a label and must
14094  be used ahead of the corresponding 
14095 \family sans
14096 Opening
14097 \family default
14098  type.
14099 \end_layout
14100
14101 \begin_layout Itemize
14102
14103 \family sans
14104 Yourref
14105 \family default
14106 : Your ref.
14107 \end_layout
14108
14109 \begin_layout Itemize
14110
14111 \family sans
14112 Yourmail
14113 \family default
14114 : Your letter of.
14115 \end_layout
14116
14117 \begin_layout Itemize
14118
14119 \family sans
14120 Myref
14121 \family default
14122 : Our ref.
14123 \end_layout
14124
14125 \begin_layout Itemize
14126
14127 \family sans
14128 Customer
14129 \family default
14130 : Customer no.
14131 \end_layout
14132
14133 \begin_layout Itemize
14134
14135 \family sans
14136 Invoice
14137 \family default
14138 : Invoice no.
14139 \end_layout
14140
14141 \begin_layout Subsection
14142 The new letter class: letter (koma-script v.2)
14143 \end_layout
14144
14145 \begin_layout Standard
14146 by 
14147 \noun on
14148 Jürgen Spitzmüller
14149 \end_layout
14150
14151 \begin_layout Standard
14152 \begin_inset VSpace medskip
14153 \end_inset
14154
14155
14156 \end_layout
14157
14158 \begin_layout Standard
14159 \noindent
14160 Koma-Script version 2.8 has introduced a new letter class 
14161 \family typewriter
14162 scrlttr2
14163 \family default
14164  which supersedes the now unsupported 
14165 \family typewriter
14166 scrlettr
14167 \family default
14168 .
14169  It has — on the LaTeX side — a completely new interface and is not compatible
14170  with the old class.
14171  Therefore, LyX supports both, though it is recommended you use the new
14172  class.
14173 \end_layout
14174
14175 \begin_layout Standard
14176 This class covers the same functionality as 
14177 \emph on
14178 letter (koma-script),
14179 \emph default
14180  and a few more.
14181  The basic items are 
14182 \family sans
14183 Address
14184 \family default
14185  (receiver's address, same as 
14186 \family sans
14187 Letter
14188 \family default
14189  in the old layout), 
14190 \family sans
14191 Opening
14192 \family default
14193 , and 
14194 \family sans
14195 Closing
14196 \family default
14197 .
14198  
14199 \family sans
14200 NextAddress
14201 \family default
14202  will start a new letter (i.
14203 \begin_inset space \thinspace{}
14204 \end_inset
14205
14206 g.
14207 \begin_inset space \space{}
14208 \end_inset
14209
14210 you can write several letters per document).
14211  New elements are sender's 
14212 \family sans
14213 E-Mail
14214 \family default
14215
14216 \family sans
14217 URL
14218 \family default
14219
14220 \family sans
14221 Fax
14222 \family default
14223
14224 \family sans
14225 Bank
14226 \family default
14227  and the possibility to use a 
14228 \family sans
14229 Logo
14230 \family default
14231  (via 
14232 \family sans
14233 Insert\SpecialChar \menuseparator
14234 Graphics
14235 \family default
14236 ) in the header.
14237 \end_layout
14238
14239 \begin_layout Standard
14240 The biggest improvement is, though, that the letter's layout is configurable
14241  to meet almost any needs.
14242  This can be done via the preamble or with a special style file (Letter
14243  Class Option, extension 
14244 \family typewriter
14245 *.lco
14246 \family default
14247 ), that will be read in as a class option.
14248 \begin_inset Foot
14249 status collapsed
14250
14251 \begin_layout Plain Layout
14252 The KOMA package comes with some default 
14253 \family typewriter
14254 *.lco
14255 \family default
14256  files.
14257  There is, for instance, a 
14258 \family typewriter
14259 DIN.lco
14260 \family default
14261  file that follows german typesetting rules, or a 
14262 \family typewriter
14263 KOMAold.lco
14264 \family default
14265  that provides the default layout of the old 
14266 \family typewriter
14267 scrlettr
14268 \family default
14269  class.
14270  The latter can be loaded with the class option 
14271 \family typewriter
14272 KOMAold
14273 \family default
14274 , inserted via the 
14275 \family sans
14276 \bar under
14277 L
14278 \bar default
14279 ayout\SpecialChar \menuseparator
14280
14281 \bar under
14282 D
14283 \bar default
14284 ocument\SpecialChar \menuseparator
14285 Extra Options
14286 \family default
14287  field.
14288 \end_layout
14289
14290 \end_inset
14291
14292  Have a look at the 
14293 \emph on
14294 koma-letter2
14295 \emph default
14296  template that is included in LyX for examples.
14297  A detailed description is to be found in the Koma-Script documentation
14298  (
14299 \emph on
14300 scrguide
14301 \emph default
14302 ).
14303 \end_layout
14304
14305 \begin_layout Subsection
14306 Problems
14307 \end_layout
14308
14309 \begin_layout Standard
14310 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14311  some problems.
14312 \end_layout
14313
14314 \begin_layout Itemize
14315 The chapter number of a 
14316 \family sans
14317 Chapter
14318 \family default
14319  type appears on a line of its own above the chapter heading instead of
14320  appearing in the same line ahead of it.
14321  The cause for that is the LyX internal behavior for the labeltype 
14322 \family sans
14323 Counter_Chapter
14324 \family default
14325  in the layout file.
14326 \end_layout
14327
14328 \begin_layout Itemize
14329 The headings of the types 
14330 \family sans
14331 Addchap
14332 \family default
14333  and 
14334 \family sans
14335 Addsec
14336 \family default
14337  are only put in the 
14338 \begin_inset Quotes eld
14339 \end_inset
14340
14341 true
14342 \begin_inset Quotes erd
14343 \end_inset
14344
14345  LaTeX table of contents, but not in the LyX table of contents (
14346 \family sans
14347 Document\SpecialChar \menuseparator
14348 Table
14349 \begin_inset space ~
14350 \end_inset
14351
14352 of
14353 \begin_inset space ~
14354 \end_inset
14355
14356 Contents
14357 \family default
14358 ).
14359 \end_layout
14360
14361 \begin_layout Itemize
14362 The paragraphs in a 
14363 \emph on
14364 letter
14365 \emph default
14366  document class appear in a skip separation mode, not indented.
14367  This is the standard behavior, no special LaTeX commands are needed for
14368  that.
14369  But in the 
14370 \family sans
14371 Document\SpecialChar \menuseparator
14372 Settings
14373 \family default
14374  dialog the corresponding radio button indicates 
14375 \family sans
14376 Indent
14377 \family default
14378 .
14379  A 
14380 \family sans
14381 Skip
14382 \family default
14383  value always has the effect that extra LaTeX commands are inserted in the
14384  document to produce the gap, which is not what is wanted in this case.
14385 \end_layout
14386
14387 \begin_layout Section
14388 Latex8 (IEEE Conference Papers)
14389 \end_layout
14390
14391 \begin_layout Standard
14392 by 
14393 \noun on
14394 Allan Rae
14395 \end_layout
14396
14397 \begin_layout Subsection
14398 Introduction
14399 \end_layout
14400
14401 \begin_layout Standard
14402 Since this class is specifically for writing submissions to IEEE sponsored
14403  conferences I strongly recommend that you get a copy of their Authors Kit.
14404  The 
14405 \family sans
14406 latex.sty
14407 \family default
14408  package and associated bibliography style file is included in the kit.
14409  The Authors Kit is usually sent out by email once your initial submission
14410  has been accepted.
14411  There is a lot of useful information in the Authors Kit explaining formatting
14412  restrictions and so on and I will assume you have read this since that
14413  means I don't have to repeat it all here.
14414 \end_layout
14415
14416 \begin_layout Subsection
14417 Getting Started
14418 \end_layout
14419
14420 \begin_layout Standard
14421 [AR\SpecialChar \@.
14422  more to come]
14423 \end_layout
14424
14425 \begin_layout Subsection
14426 Supported Environments
14427 \end_layout
14428
14429 \begin_layout Itemize
14430
14431 \family sans
14432 Standard
14433 \end_layout
14434
14435 \begin_layout Itemize
14436
14437 \family sans
14438 Title
14439 \end_layout
14440
14441 \begin_layout Itemize
14442
14443 \family sans
14444 Author
14445 \end_layout
14446
14447 \begin_layout Itemize
14448
14449 \family sans
14450 E-mail
14451 \end_layout
14452
14453 \begin_layout Itemize
14454
14455 \family sans
14456 Affiliation
14457 \end_layout
14458
14459 \begin_layout Itemize
14460
14461 \family sans
14462 Abstract
14463 \end_layout
14464
14465 \begin_layout Itemize
14466
14467 \family sans
14468 Section
14469 \end_layout
14470
14471 \begin_layout Itemize
14472
14473 \family sans
14474 SubSection
14475 \end_layout
14476
14477 \begin_layout Itemize
14478
14479 \family sans
14480 Caption
14481 \end_layout
14482
14483 \begin_layout Subsection
14484 Differences Between Screen and Paper
14485 \end_layout
14486
14487 \begin_layout Standard
14488 There are slight differences in appearance mainly with the presentation
14489  of section counters.
14490  On screen the trailing period of the section counter is missing but it
14491  will appear in the output so don't let this worry you.
14492 \end_layout
14493
14494 \begin_layout Section
14495 Memoir
14496 \end_layout
14497
14498 \begin_layout Standard
14499 By 
14500 \noun on
14501 Jürgen Spitzmüller
14502 \end_layout
14503
14504 \begin_layout Subsection
14505 Overview
14506 \end_layout
14507
14508 \begin_layout Standard
14509 Memoir is a very powerful and constantly evolving class.
14510  It has been designed with regard to fictional and non-fictional literature.
14511  Its aim is to let the user have maximum control over the typesetting of
14512  his document.
14513  Memoir is based on the standard book class, but it can also emulate the
14514  article class (see below).
14515 \end_layout
14516
14517 \begin_layout Standard
14518 Peter Wilson, the developer of Memoir, is known as the author of lots of
14519  useful packages in the LaTeX world.
14520  Most of them have been merged with Memoir.
14521  Therefore, it is much easier to layout the table of contents, appendices,
14522  chapter designs and such.
14523  LyX, though, does not support all of these goodies natively.
14524  Some of them might be added to forthcoming releases
14525 \begin_inset Foot
14526 status collapsed
14527
14528 \begin_layout Plain Layout
14529 You are invited to send suggestions to 
14530 \begin_inset Flex URL
14531 status collapsed
14532
14533 \begin_layout Plain Layout
14534
14535 lyx-devel@lists.lyx.org
14536 \end_layout
14537
14538 \end_inset
14539
14540 .
14541 \end_layout
14542
14543 \end_inset
14544
14545 , lots will probably never, due to the limitations of LyX's framework.
14546  Of course you can still use all features with the help of some native LaTeX
14547  commands (TeX code
14548 \begin_inset Foot
14549 status collapsed
14550
14551 \begin_layout Plain Layout
14552 Cf.
14553 \begin_inset ERT
14554 status collapsed
14555
14556 \begin_layout Plain Layout
14557
14558
14559 \backslash
14560  
14561 \end_layout
14562
14563 \end_inset
14564
14565 section
14566 \begin_inset space ~
14567 \end_inset
14568
14569
14570 \begin_inset CommandInset ref
14571 LatexCommand ref
14572 reference "sec:Inserting-TeX-Code"
14573
14574 \end_inset
14575
14576  for details.
14577 \end_layout
14578
14579 \end_inset
14580
14581 ).
14582  In this section, we can only list those features which are natively supported
14583  by LyX.
14584  For detailed descriptions (and for the rest of features) we recommend you
14585  have a look at the detailed manual of the Memoir class
14586 \begin_inset Foot
14587 status collapsed
14588
14589 \begin_layout Plain Layout
14590 Cf.
14591 \begin_inset ERT
14592 status collapsed
14593
14594 \begin_layout Plain Layout
14595
14596
14597 \backslash
14598  
14599 \end_layout
14600
14601 \end_inset
14602
14603
14604 \begin_inset Flex URL
14605 status collapsed
14606
14607 \begin_layout Plain Layout
14608
14609 CTAN:/macros/latex/memoir/memman.pdf
14610 \end_layout
14611
14612 \end_inset
14613
14614 .
14615 \end_layout
14616
14617 \end_inset
14618
14619 , which is not only a user guide for the class, but also both a comprehensive
14620  description on good typesetting and a superb example for good typesetting
14621  itself.
14622 \end_layout
14623
14624 \begin_layout Subsection
14625 Basic features and restrictions
14626 \end_layout
14627
14628 \begin_layout Standard
14629 Memoir supports basically all features of the standard book classes.
14630  There are, however, some differences, as follows:
14631 \end_layout
14632
14633 \begin_layout Description
14634 Font
14635 \begin_inset space ~
14636 \end_inset
14637
14638 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14639 \end_layout
14640
14641 \begin_layout Description
14642 Page
14643 \begin_inset space ~
14644 \end_inset
14645
14646 style: The fancy page style is not supported, due to a command clash between
14647  Memoir and the fancyhdr package (they both define a command with the same
14648  name, which confuses LaTeX).
14649  Instead, Memoir comes with a number of its own page styles (see 
14650 \family sans
14651 Layout\SpecialChar \menuseparator
14652 Document\SpecialChar \menuseparator
14653 Page
14654 \begin_inset space ~
14655 \end_inset
14656
14657 Style
14658 \family default
14659 ).
14660  If you want to use these for the chapter pages, you have to use the command
14661  
14662 \family typewriter
14663
14664 \backslash
14665 chapterstyle
14666 \family default
14667  in the main text or in preamble (e.
14668 \begin_inset space \thinspace{}
14669 \end_inset
14670
14671 g.
14672 \begin_inset space \space{}
14673 \end_inset
14674
14675
14676 \family typewriter
14677
14678 \backslash
14679 chapterstyle{companion}
14680 \family default
14681 ).
14682 \end_layout
14683
14684 \begin_layout Description
14685 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14686  optional argument in the standard classes.
14687  With this, you can specify an alternative version of the title for the
14688  table of contents and the headers (for instance, if the title is too long).
14689  In LyX, you can do this via 
14690 \family sans
14691 Insert\SpecialChar \menuseparator
14692 Short
14693 \begin_inset space ~
14694 \end_inset
14695
14696 Title
14697 \family default
14698  at the beginning of a chapter/section.
14699  Memoir features a second optional argument and thus separates the table
14700  of contents from the header.
14701  You can define three variants of a title with this: one for the main text,
14702  one for the table of contents, and one for the headers.
14703  Simply insert two optional arguments if you need this feature, the first
14704  one containing the short title for the Table of Contents, the second one
14705  containing an alternative short title for the headers.
14706 \end_layout
14707
14708 \begin_layout Description
14709 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14710  of contents, the list of figures and the list of table start a new page
14711  automatically.
14712  Memoir does not follow this route.
14713  You have to insert a page break yourself, if you want to have one.
14714 \end_layout
14715
14716 \begin_layout Description
14717 Titlepage: For some unknown reason, Memoir uses pagination on the title
14718  page (in the standard classes, title pages are 
14719 \begin_inset Quotes eld
14720 \end_inset
14721
14722 empty
14723 \begin_inset Quotes erd
14724 \end_inset
14725
14726 , i.
14727 \begin_inset space \thinspace{}
14728 \end_inset
14729
14730 g.
14731 \begin_inset space \space{}
14732 \end_inset
14733
14734 without pagina).
14735  If you want an empty title page, type 
14736 \family typewriter
14737
14738 \backslash
14739 aliaspagestyle{title}{empty}
14740 \family default
14741  in the preamble.
14742 \end_layout
14743
14744 \begin_layout Description
14745 Article: With the class option 
14746 \emph on
14747 article
14748 \emph default
14749  (to be inserted in 
14750 \family sans
14751 Layout\SpecialChar \menuseparator
14752 Document\SpecialChar \menuseparator
14753 Extra
14754 \begin_inset space ~
14755 \end_inset
14756
14757 Options
14758 \family default
14759 ), you can emulate article style.
14760  That is, counters (footnotes, figures, tables etc.) will not be reset on
14761  new chapters, chapters don't start a new page (but are—in contrary to 
14762 \begin_inset Quotes eld
14763 \end_inset
14764
14765 real
14766 \begin_inset Quotes erd
14767 \end_inset
14768
14769  article classes—still allowed), parts, though, use their own page, as in
14770  book.
14771 \end_layout
14772
14773 \begin_layout Description
14774 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14775  font commands, which have been used in the old LaTeX version 2.09 (e.
14776 \begin_inset space \thinspace{}
14777 \end_inset
14778
14779 g.
14780 \begin_inset space \space{}
14781 \end_inset
14782
14783
14784 \family typewriter
14785
14786 \backslash
14787 rm
14788 \family default
14789
14790 \family typewriter
14791
14792 \backslash
14793 it
14794 \family default
14795 ).
14796  It produces an error and stops LaTeX whenever such a command appears.
14797  The class option 
14798 \emph on
14799 oldfontcommands
14800 \emph default
14801  reallows the commands and spits out warnings instead (which does at least
14802  not stop LaTeX).
14803  Since a lot of packages and particularly BibTeX style files are still using
14804  those commands, we have decided to use this option by default.
14805 \end_layout
14806
14807 \begin_layout Subsection
14808 Extra features
14809 \end_layout
14810
14811 \begin_layout Standard
14812 We will only describe the features supported by LyX (which is not much currently
14813 ).
14814  Please consult the Memoir manual
14815 \begin_inset Foot
14816 status collapsed
14817
14818 \begin_layout Plain Layout
14819 Cf.
14820 \begin_inset ERT
14821 status collapsed
14822
14823 \begin_layout Plain Layout
14824
14825
14826 \backslash
14827  
14828 \end_layout
14829
14830 \end_inset
14831
14832
14833 \begin_inset Flex URL
14834 status collapsed
14835
14836 \begin_layout Plain Layout
14837
14838 CTAN:/macros/latex/memoir/memman.pdf
14839 \end_layout
14840
14841 \end_inset
14842
14843 .
14844 \end_layout
14845
14846 \end_inset
14847
14848  for details.
14849 \end_layout
14850
14851 \begin_layout Description
14852 Abstract: You may wonder why an abstract is an extra feature.
14853  Well, it is in book class.
14854  Usually books don't have abstracts.
14855  Memoir, however, has.
14856  You can use it wherever and how often you like.
14857 \end_layout
14858
14859 \begin_layout Description
14860 Chapterprecis: You may know this older typesetting style: The contents of
14861  a chapter are summarized below the title and also in the table of contents
14862  (e.
14863 \begin_inset space \thinspace{}
14864 \end_inset
14865
14866 g.
14867 \begin_inset space \space{}
14868 \end_inset
14869
14870
14871 \emph on
14872 Our hero arrives in Troia; he loses some friends; he finds others
14873 \emph default
14874 ).
14875  Chapterprecis does exactly this.
14876  It is therefore only sensible below a chapter.
14877 \end_layout
14878
14879 \begin_layout Description
14880 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14881  The epigraph environment provides an elegant way of typesetting such a
14882  motto.
14883  The motto itself (text) and its author (source) are divided by a short
14884  line.
14885  Unfortunately, we have to fool LyX a bit here again, since the environment
14886  needs two arguments (text and source).
14887  In this case, we have to use curly brackets (in TeX mode) between the two
14888  arguments: 
14889 \emph on
14890 <smart slogan>
14891 \emph default
14892  
14893 \family typewriter
14894 }{
14895 \family default
14896  
14897 \emph on
14898 <author of the slogan>.
14899 \end_layout
14900
14901 \begin_layout Description
14902 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14903  complex figurative poems).
14904  LyX can only support a few of them.
14905  One is poemtitle, which is a centered title for poems, which will also
14906  be added to the table of contents (verse is the standard environment for
14907  poems.
14908  Memoir has some enhanced versions of verse, but you need to use TeX code,
14909  because they have to be nested inside regular verse environments, which
14910  is not possible with LyX).
14911 \end_layout
14912
14913 \begin_layout Description
14914 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14915 \end_layout
14916
14917 \begin_layout Section
14918 Article (mwart), book (mwbk) and report (mwrep)
14919 \begin_inset Argument
14920 status collapsed
14921
14922 \begin_layout Plain Layout
14923 The 
14924 \family typewriter
14925 mw
14926 \family default
14927  Classes
14928 \end_layout
14929
14930 \end_inset
14931
14932
14933 \end_layout
14934
14935 \begin_layout Standard
14936 by 
14937 \noun on
14938 Tomasz Luczak
14939 \end_layout
14940
14941 \begin_layout Standard
14942 The LyX document classes 
14943 \emph on
14944 article (mwart)
14945 \emph default
14946
14947 \emph on
14948 report (mwrep)
14949 \emph default
14950  and 
14951 \emph on
14952 book
14953 \emph default
14954  
14955 \emph on
14956 (mwbk)
14957 \emph default
14958  correspond to the LaTeX document classes 
14959 \family typewriter
14960 mwart.cls
14961 \family default
14962
14963 \family typewriter
14964 mwrep.cls
14965 \family default
14966  and 
14967 \family typewriter
14968 mwbk.cls
14969 \family default
14970 , resp.
14971  They are replacements for the standard document classes 
14972 \family typewriter
14973 article.cls
14974 \family default
14975
14976 \family typewriter
14977 report.cls
14978 \family default
14979  and 
14980 \family typewriter
14981 book.cls
14982 \family default
14983 , resp., and fit better to Polish typography conventions in a number of points.
14984  
14985 \end_layout
14986
14987 \begin_layout Standard
14988 Basic differences:
14989 \end_layout
14990
14991 \begin_layout Itemize
14992 Unnumbered titles (with star, e.
14993 \begin_inset space \thinspace{}
14994 \end_inset
14995
14996 g.
14997 \begin_inset space \space{}
14998 \end_inset
14999
15000
15001 \family sans
15002 Section*
15003 \family default
15004 ) are added into table of contents,
15005 \end_layout
15006
15007 \begin_layout Itemize
15008 Additional page styles:
15009 \end_layout
15010
15011 \begin_deeper
15012 \begin_layout Description
15013 uheadings header with separated lines,
15014 \end_layout
15015
15016 \begin_layout Description
15017 myheadings custom header, contents headers via commands: 
15018 \family typewriter
15019
15020 \backslash
15021 markright
15022 \family default
15023  and 
15024 \family typewriter
15025
15026 \backslash
15027 markboth
15028 \family default
15029 ,
15030 \end_layout
15031
15032 \begin_layout Description
15033 myuheadings custom header with separated lines,
15034 \end_layout
15035
15036 \begin_layout Description
15037 outer page number is placed on outer side of page
15038 \end_layout
15039
15040 \end_deeper
15041 \begin_layout Itemize
15042 Options 
15043 \end_layout
15044
15045 \begin_deeper
15046 \begin_layout Description
15047 rmheadings serif titles — default,
15048 \end_layout
15049
15050 \begin_layout Description
15051 sfheadings sansserif titles,
15052 \end_layout
15053
15054 \begin_layout Description
15055 authortitle on title page first placed is author next title — default,
15056 \end_layout
15057
15058 \begin_layout Description
15059 titleauthor on title page first placed is title next author,
15060 \end_layout
15061
15062 \begin_layout Description
15063 withmarginpar reserve place on page for margins.
15064 \end_layout
15065
15066 \end_deeper
15067 \begin_layout Section
15068 Paper
15069 \end_layout
15070
15071 \begin_layout Standard
15072 The document class 
15073 \family sans
15074 paper
15075 \family default
15076  provides an alternative to the standard 
15077 \family sans
15078 article
15079 \family default
15080  class.
15081  It provides similar functionality, but you might prefer this layout with
15082  sans serif sections, headings, and more.
15083 \end_layout
15084
15085 \begin_layout Section
15086 RevTeX4
15087 \end_layout
15088
15089 \begin_layout Standard
15090 by 
15091 \noun on
15092 Amir Karger
15093 \end_layout
15094
15095 \begin_layout Standard
15096 \begin_inset VSpace bigskip
15097 \end_inset
15098
15099
15100 \end_layout
15101
15102 \begin_layout Standard
15103 \noindent
15104 The 
15105 \family sans
15106 Revtex
15107 \begin_inset space ~
15108 \end_inset
15109
15110 4
15111 \family default
15112  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15113 \begin_inset Formula $\beta$
15114 \end_inset
15115
15116  release of May, 1999) class.
15117 \end_layout
15118
15119 \begin_layout Standard
15120 LyX has a 
15121 \family sans
15122 Revtex
15123 \family default
15124  textclass, which works with RevTeX 3.1.
15125  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15126  That means that it doesn't interact very well with LyX, which requires
15127  LaTeX2e, although it has been kludged to work.
15128  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15129  LyX with the 
15130 \family sans
15131 RevTeX
15132 \begin_inset space ~
15133 \end_inset
15134
15135 4
15136 \family default
15137  textclass should also be pretty easy to use.
15138 \end_layout
15139
15140 \begin_layout Standard
15141 These documents are supposed to be used in 
15142 \emph on
15143 addition
15144 \emph default
15145  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15146  macros, and assume you'll know what to put in the preamble if necessary.
15147 \end_layout
15148
15149 \begin_layout Subsection
15150 Installation
15151 \end_layout
15152
15153 \begin_layout Standard
15154 All you need to do is install RevTeX 4, as described in the package's README
15155  file.
15156  The package can be found at The RevTeX 4 Web Site 
15157 \begin_inset Flex URL
15158 status collapsed
15159
15160 \begin_layout Plain Layout
15161
15162 http://publish.aps.org/revtex4/
15163 \end_layout
15164
15165 \end_inset
15166
15167 .
15168  Install it somewhere that LaTeX can see it.
15169  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15170  (i.
15171 \begin_inset space \thinspace{}
15172 \end_inset
15173
15174 g.
15175 \begin_inset space \space{}
15176 \end_inset
15177
15178 not the directory where you installed the class file.) Then, if you reconfigure
15179  LyX, it will find the class file and let you use the RevTeX4 textclass.
15180 \end_layout
15181
15182 \begin_layout Standard
15183 Probably the easiest way to get started is either to import a RevTeX 4 document
15184  using 
15185 \family typewriter
15186 tex2lyx
15187 \family default
15188 , or to use the 
15189 \family sans
15190 Revtex
15191 \begin_inset space ~
15192 \end_inset
15193
15194 4
15195 \family default
15196  template, found in the templates directory.
15197 \end_layout
15198
15199 \begin_layout Subsection
15200 Preamble Matter
15201 \end_layout
15202
15203 \begin_layout Standard
15204 Optional arguments to 
15205 \family typewriter
15206
15207 \backslash
15208 documentclass
15209 \family default
15210 , like 
15211 \begin_inset Quotes eld
15212 \end_inset
15213
15214 preprint
15215 \begin_inset Quotes erd
15216 \end_inset
15217
15218  and 
15219 \begin_inset Quotes eld
15220 \end_inset
15221
15222 aps
15223 \begin_inset Quotes erd
15224 \end_inset
15225
15226 , go in the 
15227 \family sans
15228 E
15229 \bar under
15230 x
15231 \bar default
15232 tra
15233 \begin_inset space ~
15234 \end_inset
15235
15236 Options
15237 \family default
15238  field in the 
15239 \family sans
15240 Document
15241 \begin_inset space ~
15242 \end_inset
15243
15244 Layout
15245 \family default
15246  dialog, as usual.
15247  Remember that in RevTeX, at least one optional argument is required! 
15248 \end_layout
15249
15250 \begin_layout Standard
15251 Other preamble matter, like 
15252 \family typewriter
15253
15254 \backslash
15255 draft
15256 \family default
15257  etc.
15258 \begin_inset space ~
15259 \end_inset
15260
15261 goes in the 
15262 \family sans
15263 LaTeX
15264 \begin_inset space ~
15265 \end_inset
15266
15267 Preamble
15268 \family default
15269  dialog, also as usual.
15270 \end_layout
15271
15272 \begin_layout Subsection
15273 Layouts
15274 \end_layout
15275
15276 \begin_layout Standard
15277 The layouts basically correspond to the commands in RevTeX4.0.
15278  For example, the Email layout corresponds to 
15279 \family typewriter
15280
15281 \backslash
15282 email{}
15283 \family default
15284 .
15285  Note that (at least as of RevTeX 4.0 Beta), the 
15286 \family sans
15287 Address
15288 \family default
15289  and 
15290 \family sans
15291 Affiliation
15292 \family default
15293  layouts are exactly equivalent, so you shouldn't need to use both.
15294 \begin_inset Foot
15295 status collapsed
15296
15297 \begin_layout Plain Layout
15298 In case you're curious, both were included so that 
15299 \family typewriter
15300 tex2lyx
15301 \family default
15302  would be able to translate both 
15303 \family typewriter
15304
15305 \backslash
15306 address
15307 \family default
15308  and 
15309 \family typewriter
15310
15311 \backslash
15312 affiliation
15313 \family default
15314 .
15315 \end_layout
15316
15317 \end_inset
15318
15319
15320 \end_layout
15321
15322 \begin_layout Subsection
15323 Important Notes
15324 \end_layout
15325
15326 \begin_layout Standard
15327 There are a couple of important unique aspects of RevTeX 4 which might cause
15328  bugs that will be even more confusing in LyX.
15329 \end_layout
15330
15331 \begin_layout Standard
15332 In RevTeX, the 
15333 \family typewriter
15334
15335 \backslash
15336 thanks
15337 \family default
15338  command goes 
15339 \emph on
15340 outside
15341 \emph default
15342  the 
15343 \family typewriter
15344
15345 \backslash
15346 author
15347 \family default
15348  command.
15349  The LyX equivalent is that there is a separate Thanks layout.
15350  Do 
15351 \emph on
15352 not
15353 \emph default
15354  write footnotes in the 
15355 \family sans
15356 Author
15357 \family default
15358  layout, or weird things may happen.
15359  See the RevTeX 4 documentation for more details.
15360 \end_layout
15361
15362 \begin_layout Standard
15363 Also, the 
15364 \family sans
15365 Author
15366 \begin_inset space ~
15367 \end_inset
15368
15369 Email
15370 \family default
15371
15372 \family sans
15373 Author
15374 \begin_inset space ~
15375 \end_inset
15376
15377 URL
15378 \family default
15379 , and 
15380 \family sans
15381 Thanks
15382 \family default
15383  layouts must be placed 
15384 \emph on
15385 in between
15386 \emph default
15387  the 
15388 \family sans
15389 Author
15390 \family default
15391  layout and the corresponding 
15392 \family sans
15393 Address
15394 \family default
15395  (or equivalent 
15396 \family sans
15397 Affiliation
15398 \family default
15399 ) layout.
15400  If you put the 
15401 \family sans
15402 Thanks
15403 \family default
15404  after the 
15405 \family sans
15406 Address
15407 \family default
15408 , the LaTeX won't compile.
15409 \end_layout
15410
15411 \begin_layout Subsection
15412 Drawbacks
15413 \end_layout
15414
15415 \begin_layout Standard
15416 The main problem with this layout is that you can't use the optional arguments
15417  to layouts like Email and Title.
15418  (The problem is not unique to this layout; you can't use optional arguments
15419  to the Section layouts either.) This means that after you export that file
15420  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15421  need to edit the LaTeX file with a text editor to add the optional arguments
15422  to set, e.
15423 \begin_inset space \thinspace{}
15424 \end_inset
15425
15426 g.
15427 \begin_inset space \space{}
15428 \end_inset
15429
15430 the running title for the page headers.
15431  Lacking these layouts makes the 
15432 \family typewriter
15433
15434 \backslash
15435 altaffiliation
15436 \family default
15437  (and the equivalent 
15438 \family typewriter
15439
15440 \backslash
15441 altaddress
15442 \family default
15443 ) useless, so the corresponding layouts don't exist, and will have to be
15444  added by hand.
15445 \begin_inset Foot
15446 status collapsed
15447
15448 \begin_layout Plain Layout
15449
15450 \emph on
15451 Note from JMarc:
15452 \emph default
15453  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15454  has not been updated yet to take advantage of it.
15455 \end_layout
15456
15457 \end_inset
15458
15459  
15460 \end_layout
15461
15462 \begin_layout Section
15463 Springer Journals (
15464 \family sans
15465 svjour
15466 \family default
15467 )
15468 \end_layout
15469
15470 \begin_layout Standard
15471 by 
15472 \noun on
15473 Martin Vermeer
15474 \end_layout
15475
15476 \begin_layout Subsection
15477 Description
15478 \end_layout
15479
15480 \begin_layout Standard
15481 These are the layout files for some of the journal formats used by Springer
15482  Verlag and listed on 
15483 \begin_inset Flex URL
15484 status collapsed
15485
15486 \begin_layout Plain Layout
15487
15488 http://www.springer.de/author/tex/help-journals.html
15489 \end_layout
15490
15491 \end_inset
15492
15493 , where you should also go to fetch the class files (yes, these are LaTeX2e
15494  now!).
15495  It is a modular system: the things common to all journals are implemented
15496  in 
15497 \family typewriter
15498 svjour.inc
15499 \family default
15500 , which journal-specific layout files (such as, e.
15501 \begin_inset space \thinspace{}
15502 \end_inset
15503
15504 g.
15505 \begin_inset space \space{}
15506 \end_inset
15507
15508
15509 \family typewriter
15510 svjog.layout
15511 \family default
15512  for Journal of Geodesy) can include.
15513 \end_layout
15514
15515 \begin_layout Standard
15516 This means that implementing support for any other Springer journal on this
15517  list is as simple as writing your own 
15518 \family typewriter
15519 sv
15520 \family default
15521 <myjournal>
15522 \family typewriter
15523 .layout
15524 \family default
15525  file following the outline given in 
15526 \family typewriter
15527 svjog.layout
15528 \family default
15529 .
15530  
15531 \end_layout
15532
15533 \begin_layout Standard
15534 It is reasonably well tested only for the Journal of Geodesy.
15535  
15536 \family typewriter
15537 svjour
15538 \family default
15539  and 
15540 \family typewriter
15541 svjog
15542 \family default
15543  come with the standard LyX distribution.
15544  Install the relevant class file (downloaded from Springer) in a proper
15545  directory, reconfigure LaTeX (in the teTeX case by running 
15546 \family typewriter
15547 texhash
15548 \family default
15549 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15550  and it should work.
15551 \end_layout
15552
15553 \begin_layout Subsection
15554 New styles
15555 \end_layout
15556
15557 \begin_layout Standard
15558 A large number of theorem-like styles — 
15559 \family sans
15560 Claim, Conjecture,
15561 \family default
15562  
15563 \family sans
15564 \SpecialChar \ldots{}
15565 Theorem
15566 \family default
15567 .
15568 \end_layout
15569
15570 \begin_layout Standard
15571
15572 \family sans
15573 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15574  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15575 \family default
15576 .
15577  See the Springer class file documentation for details.
15578 \end_layout
15579
15580 \begin_layout Subsection
15581 Supported journals
15582 \end_layout
15583
15584 \begin_layout Itemize
15585
15586 \emph on
15587 Journal of Geodesy
15588 \emph default
15589
15590 \family typewriter
15591 svjog.layout
15592 \family default
15593  — Martin Vermeer
15594 \end_layout
15595
15596 \begin_layout Itemize
15597
15598 \emph on
15599 Probability Theory and Related Fields
15600 \emph default
15601
15602 \family typewriter
15603 svprobth.layout
15604 \family default
15605  — Jean-Marc Lasgouttes
15606 \end_layout
15607
15608 \begin_layout Standard
15609 Add your own, it isn't so hard!
15610 \end_layout
15611
15612 \begin_layout Subsection
15613 Credits
15614 \end_layout
15615
15616 \begin_layout Standard
15617 These files are partly based on the older 
15618 \family typewriter
15619 ejour2.layout
15620 \family default
15621 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15622  file from Springer.
15623  All this, and the 
15624 \family typewriter
15625 ejour2
15626 \family default
15627  layout, are now defunct.
15628  Jean-Marc Lasgouttes helped out big in making me find my way around the
15629  LyX layout file mechanism.
15630 \end_layout
15631
15632 \begin_layout Subsection
15633 Bugs
15634 \end_layout
15635
15636 \begin_layout Standard
15637 Probably.
15638  But probably less than in the old hacked-LaTeX 
15639 \family typewriter
15640 ejour2
15641 \family default
15642 .
15643 \end_layout
15644
15645 \begin_layout Standard
15646 Limitations e.
15647 \begin_inset space \thinspace{}
15648 \end_inset
15649
15650 g.: does not display the number for theorem-like layouts, just #.
15651 \end_layout
15652
15653 \begin_layout Section
15654 Slides [aka 
15655 \noun on
15656 SliTeX
15657 \noun default
15658 ]
15659 \begin_inset CommandInset label
15660 LatexCommand label
15661 name "sec:slitex"
15662
15663 \end_inset
15664
15665
15666 \end_layout
15667
15668 \begin_layout Standard
15669 by 
15670 \noun on
15671 John Weiss
15672 \noun default
15673  
15674 \end_layout
15675
15676 \begin_layout Subsection
15677 Introduction
15678 \end_layout
15679
15680 \begin_layout Standard
15681 This section describes how to use LyX to make slides for overhead projectors.
15682  There are two document classes that can do this: the default slides class
15683  and the 
15684 \family sans
15685 FoilTeX
15686 \family default
15687  slides class.
15688  This section documents the former.
15689 \end_layout
15690
15691 \begin_layout Standard
15692 I'm going to say this again, nice and clear, so that there's no misunderstanding
15693 :
15694 \end_layout
15695
15696 \begin_layout Standard
15697 \begin_inset VSpace bigskip
15698 \end_inset
15699
15700
15701 \end_layout
15702
15703 \begin_layout Standard
15704 \align center
15705
15706 \size large
15707 This section documents the class 
15708 \begin_inset Quotes eld
15709 \end_inset
15710
15711
15712 \family sans
15713 slides (default)
15714 \family default
15715
15716 \begin_inset Quotes erd
15717 \end_inset
15718
15719  
15720 \emph on
15721 only.
15722 \end_layout
15723
15724 \begin_layout Standard
15725 \begin_inset VSpace bigskip
15726 \end_inset
15727
15728
15729 \end_layout
15730
15731 \begin_layout Standard
15732 If you're looking for the documentation for 
15733 \begin_inset Quotes eld
15734 \end_inset
15735
15736
15737 \family sans
15738 slides (FoilTeX)
15739 \family default
15740
15741 \begin_inset Quotes erd
15742 \end_inset
15743
15744 , check out section
15745 \begin_inset space ~
15746 \end_inset
15747
15748
15749 \begin_inset CommandInset ref
15750 LatexCommand ref
15751 reference "sec:foiltex"
15752
15753 \end_inset
15754
15755 .
15756  The 
15757 \family sans
15758 foils
15759 \family default
15760  class [
15761 \begin_inset Quotes eld
15762 \end_inset
15763
15764
15765 \family sans
15766 slides (FoilTeX)
15767 \family default
15768
15769 \begin_inset Quotes erd
15770 \end_inset
15771
15772 ] is actually somewhat better than the default 
15773 \family sans
15774 slides
15775 \family default
15776  class,
15777 \begin_inset Foot
15778 status collapsed
15779
15780 \begin_layout Plain Layout
15781 \SpecialChar \ldots{}
15782 or so I've been told repeatedly by its advocates.
15783  Having never used it, I have no idea if this claim is true or not.
15784 \end_layout
15785
15786 \end_inset
15787
15788  which this section documents.
15789 \end_layout
15790
15791 \begin_layout Standard
15792 This class is the LaTeX2e improvement of the old 
15793 \noun on
15794 SliTeX
15795 \noun default
15796  package.
15797  Every LaTeX2e distribution includes this class [which I'll just refer to
15798  as 
15799 \begin_inset Quotes eld
15800 \end_inset
15801
15802
15803 \family sans
15804 slides
15805 \family default
15806
15807 \begin_inset Quotes erd
15808 \end_inset
15809
15810  from now on], so you're bound to have it.
15811  As I noted earlier, there are other classes, such as 
15812 \family sans
15813 foils
15814 \family default
15815 , which also produce slides for overhead projectors and do a better job
15816  at it.
15817  However, there are some things which 
15818 \family sans
15819 slides
15820 \family default
15821  can do which the others can't, such as generate overlays.
15822  Read on to learn more!
15823 \end_layout
15824
15825 \begin_layout Subsection
15826 Getting Started
15827 \begin_inset CommandInset label
15828 LatexCommand label
15829 name "sec:slidesetup"
15830
15831 \end_inset
15832
15833
15834 \end_layout
15835
15836 \begin_layout Standard
15837 Obviously, to use this document class, you need to select 
15838 \begin_inset Quotes eld
15839 \end_inset
15840
15841
15842 \family sans
15843 slides (default)
15844 \family default
15845
15846 \begin_inset Quotes erd
15847 \end_inset
15848
15849  from the class list in the 
15850 \family sans
15851 Document\SpecialChar \menuseparator
15852 Settings
15853 \family default
15854  dialog.
15855  There are some other special things you should know about this class:
15856 \end_layout
15857
15858 \begin_layout Itemize
15859 Don't bother changing the options 
15860 \family sans
15861 Sides and Columns
15862 \family default
15863 .
15864  They're not supported by the 
15865 \family sans
15866 slides
15867 \family default
15868  class, anyways.
15869 \end_layout
15870
15871 \begin_layout Itemize
15872 The option 
15873 \family sans
15874 Page
15875 \begin_inset space ~
15876 \end_inset
15877
15878 style
15879 \family default
15880  behaves a bit differently for this class.
15881  The possible choices and what they do are as follows:
15882 \end_layout
15883
15884 \begin_deeper
15885 \begin_layout Description
15886
15887 \family sans
15888 plain
15889 \family default
15890  The final output contains page numbers in the lower right corner.
15891 \end_layout
15892
15893 \begin_layout Description
15894
15895 \family sans
15896 headings
15897 \family default
15898  Like 
15899 \family sans
15900 plain
15901 \family default
15902 , but also prints out any time markers you've put in.
15903  This is the default.
15904 \end_layout
15905
15906 \begin_layout Description
15907
15908 \family sans
15909 empty
15910 \family default
15911  The final output contains no page numbers, time markers, or alignment markers.
15912 \end_layout
15913
15914 \end_deeper
15915 \begin_layout Itemize
15916 The 
15917 \family sans
15918 slides
15919 \family default
15920  class has an extra option: 
15921 \family typewriter
15922 clock
15923 \family default
15924 .
15925  To use it, put 
15926 \begin_inset Quotes eld
15927 \end_inset
15928
15929
15930 \family typewriter
15931 clock
15932 \family default
15933
15934 \begin_inset Quotes erd
15935 \end_inset
15936
15937  in the extra class options.
15938 \end_layout
15939
15940 \begin_deeper
15941 \begin_layout Standard
15942 Using this options allows you to add time markers to 
15943 \family sans
15944 Note
15945 \family default
15946 s.
15947  See section
15948 \begin_inset space ~
15949 \end_inset
15950
15951
15952 \begin_inset CommandInset ref
15953 LatexCommand ref
15954 reference "sec:slideNote"
15955
15956 \end_inset
15957
15958  for more details.
15959 \end_layout
15960
15961 \end_deeper
15962 \begin_layout Standard
15963 You can also use the template file 
15964 \begin_inset Quotes eld
15965 \end_inset
15966
15967
15968 \family typewriter
15969 slides.lyx
15970 \family default
15971
15972 \begin_inset Quotes erd
15973 \end_inset
15974
15975  to automatically set up a document to use the 
15976 \family sans
15977 slides
15978 \family default
15979  class [using 
15980 \family sans
15981 File\SpecialChar \menuseparator
15982 New
15983 \begin_inset space ~
15984 \end_inset
15985
15986 from
15987 \begin_inset space ~
15988 \end_inset
15989
15990 Template
15991 \family default
15992  to open your new document].
15993  The template file also contains some examples of the special paragraph
15994  environments used by this class.
15995  I'll describe those next.
15996 \end_layout
15997
15998 \begin_layout Subsection
15999 Paragraph Environments
16000 \end_layout
16001
16002 \begin_layout Subsubsection
16003 Supported Environments
16004 \end_layout
16005
16006 \begin_layout Standard
16007 The first thing you'll notice when you start up a new 
16008 \family sans
16009 slides
16010 \family default
16011  document is the font size and type: it's the equivalent of the size 
16012 \begin_inset Quotes eld
16013 \end_inset
16014
16015
16016 \family sans
16017 Largest
16018 \family default
16019
16020 \begin_inset Quotes erd
16021 \end_inset
16022
16023  in the 
16024 \family sans
16025 Sans
16026 \begin_inset space ~
16027 \end_inset
16028
16029 Serif
16030 \family default
16031  font.
16032  This is also what's used in the output.
16033  Think of this as a 
16034 \begin_inset Quotes eld
16035 \end_inset
16036
16037 visual cue
16038 \begin_inset Quotes erd
16039 \end_inset
16040
16041  to remind you that this is a slide.
16042  Your final slides will use a larger font; ergo, you'll have less space.
16043  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16044 \end_layout
16045
16046 \begin_layout Standard
16047 The next thing that becomes obvious is the changes to the paragraph environment
16048  pull-down box [at the far-left end of the toolbar].
16049  Most of the paragraph environments you're used to seeing are missing.
16050  There are also five new ones.
16051  That's because the 
16052 \family sans
16053 slides
16054 \family default
16055  class itself only supports certain paragraph environments:
16056 \end_layout
16057
16058 \begin_layout Itemize
16059
16060 \family sans
16061 Standard
16062 \end_layout
16063
16064 \begin_layout Itemize
16065
16066 \family sans
16067 Itemize
16068 \end_layout
16069
16070 \begin_layout Itemize
16071
16072 \family sans
16073 Enumerate
16074 \end_layout
16075
16076 \begin_layout Itemize
16077
16078 \family sans
16079 Description
16080 \end_layout
16081
16082 \begin_layout Itemize
16083
16084 \family sans
16085 List
16086 \end_layout
16087
16088 \begin_layout Itemize
16089
16090 \family sans
16091 Quotation
16092 \end_layout
16093
16094 \begin_layout Itemize
16095
16096 \family sans
16097 Quote
16098 \end_layout
16099
16100 \begin_layout Itemize
16101
16102 \family sans
16103 Verse
16104 \end_layout
16105
16106 \begin_layout Itemize
16107
16108 \family sans
16109 Caption
16110 \end_layout
16111
16112 \begin_layout Itemize
16113
16114 \family sans
16115 LyX-Code
16116 \end_layout
16117
16118 \begin_layout Itemize
16119
16120 \family sans
16121 Comment
16122 \end_layout
16123
16124 \begin_layout Standard
16125 All of the other standard environments, including the section-heading environmen
16126 ts, aren't used in the 
16127 \family sans
16128 slides
16129 \family default
16130  class.
16131 \end_layout
16132
16133 \begin_layout Standard
16134 On the other hand, you'll notice the following new environments:
16135 \end_layout
16136
16137 \begin_layout Itemize
16138
16139 \family sans
16140 Slide
16141 \end_layout
16142
16143 \begin_layout Itemize
16144
16145 \family sans
16146 Overlay
16147 \end_layout
16148
16149 \begin_layout Itemize
16150
16151 \family sans
16152 Note
16153 \end_layout
16154
16155 \begin_layout Itemize
16156
16157 \family sans
16158 InvisibleText
16159 \end_layout
16160
16161 \begin_layout Itemize
16162
16163 \family sans
16164 VisibleText
16165 \end_layout
16166
16167 \begin_layout Standard
16168 These five are kind of quirky, due to a 
16169 \begin_inset Quotes eld
16170 \end_inset
16171
16172 feature
16173 \begin_inset Quotes erd
16174 \end_inset
16175
16176  in LyX.
16177  You see, LyX doesn't permit you to nest any other paragraph environment
16178  into an empty environment.
16179  Now, that's fine and dandy, but it means that you wouldn't be able to start
16180  a slide with anything except plain text.
16181  To deal with this, I've performed a little 
16182 \begin_inset Quotes eld
16183 \end_inset
16184
16185 LaTeX magic.
16186 \begin_inset Quotes erd
16187 \end_inset
16188
16189  
16190 \end_layout
16191
16192 \begin_layout Subsubsection
16193 Quirks of the New Environments
16194 \begin_inset CommandInset label
16195 LatexCommand label
16196 name "sec:slideQuirk"
16197
16198 \end_inset
16199
16200
16201 \end_layout
16202
16203 \begin_layout Standard
16204 All five of the new paragraph environments are somewhat quirky due to inherent
16205  limitiations in the current version of LyX.
16206  As I just mentioned, LyX forbids environments that begin with another environme
16207 nt.
16208  To get around this, the 
16209 \family sans
16210 Slide
16211 \family default
16212  environment isn't a paragraph environment as described in the 
16213 \emph on
16214 User's Guide
16215 \emph default
16216 .
16217  
16218 \end_layout
16219
16220 \begin_layout Standard
16221 You should consider 
16222 \family sans
16223 Slide
16224 \family default
16225
16226 \family sans
16227 Overlay
16228 \family default
16229 , and 
16230 \family sans
16231 Note
16232 \family default
16233  to be 
16234 \begin_inset Quotes eld
16235 \end_inset
16236
16237 pseudo-environments.
16238 \begin_inset Quotes erd
16239 \end_inset
16240
16241  They look like a section heading or a 
16242 \begin_inset Quotes eld
16243 \end_inset
16244
16245
16246 \family sans
16247 Caption
16248 \family default
16249 ,
16250 \begin_inset Quotes erd
16251 \end_inset
16252
16253  but really begin a [and, if necessary, end the previous] paragraph environment.
16254  Likewise, treat 
16255 \family sans
16256 InvisibleText
16257 \family default
16258  and 
16259 \family sans
16260 VisibleText
16261 \family default
16262  as 
16263 \begin_inset Quotes eld
16264 \end_inset
16265
16266 pseudo-commands.
16267 \begin_inset Quotes erd
16268 \end_inset
16269
16270  These two perform some action.
16271 \end_layout
16272
16273 \begin_layout Standard
16274 A common feature of all five environments, 
16275 \family sans
16276 Slide
16277 \family default
16278
16279 \family sans
16280 Overlay
16281 \family default
16282
16283 \family sans
16284 Note
16285 \family default
16286
16287 \family sans
16288 InvisibleText
16289 \family default
16290  and 
16291 \family sans
16292 VisibleText
16293 \family default
16294 , is a rather long-ish label.
16295  The text following this label — ordinarily the contents of the paragraph
16296  environment — is utterly irrelevant for 
16297 \family sans
16298 Slide
16299 \family default
16300
16301 \family sans
16302 Overlay
16303 \family default
16304
16305 \family sans
16306 Note
16307 \family default
16308
16309 \family sans
16310 InvisibleText
16311 \family default
16312  and 
16313 \family sans
16314 VisibleText
16315 \family default
16316 .
16317  LyX completely ignores it.
16318  In fact, you can leave these five environments completely empty.
16319  
16320 \end_layout
16321
16322 \begin_layout Standard
16323 While you don't 
16324 \emph on
16325 have
16326 \emph default
16327  to put any text after the rather long-ish label, you might want to.
16328  This could be a short description of the contents of the 
16329 \family sans
16330 Slide
16331 \family default
16332 , for example.
16333  In that case, enter your descriptive comment and hit 
16334 \family sans
16335 Return
16336 \family default
16337  as you normally would.
16338 \end_layout
16339
16340 \begin_layout Standard
16341 If, on the other hand, you don't want to enter any descriptive text, you'll
16342  hit another LyX quirk.
16343  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16344  environment until you put something in the old one.
16345  So, do this:
16346 \end_layout
16347
16348 \begin_layout Itemize
16349 Start entering the text that will 
16350 \emph on
16351 follow
16352 \emph default
16353  the new 
16354 \family sans
16355 Slide
16356 \family default
16357
16358 \family sans
16359 Overlay
16360 \family default
16361
16362 \family sans
16363 Note
16364 \family default
16365
16366 \family sans
16367 InvisibleText
16368 \family default
16369  or 
16370 \family sans
16371 VisibleText
16372 \family default
16373 .
16374  
16375 \end_layout
16376
16377 \begin_layout Itemize
16378 Now move to the beginning of that paragraph.
16379  
16380 \end_layout
16381
16382 \begin_layout Itemize
16383 Next, hit 
16384 \family sans
16385 Return
16386 \family default
16387 .
16388  
16389 \end_layout
16390
16391 \begin_layout Itemize
16392 Finally, change this new, empty paragraph to a 
16393 \family sans
16394 Slide
16395 \family default
16396
16397 \family sans
16398 Overlay
16399 \family default
16400
16401 \family sans
16402 Note
16403 \family default
16404
16405 \family sans
16406 InvisibleText
16407 \family default
16408  or 
16409 \family sans
16410 VisibleText
16411 \family default
16412 .
16413  
16414 \end_layout
16415
16416 \begin_layout Standard
16417 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16418
16419 \end_layout
16420
16421 \begin_layout Subsection
16422 Making a Presentation with 
16423 \family sans
16424 Slide
16425 \family default
16426
16427 \family sans
16428 Overlay
16429 \family default
16430  and 
16431 \family sans
16432 Note
16433 \end_layout
16434
16435 \begin_layout Subsubsection
16436 Using the 
16437 \family sans
16438 Slide
16439 \family default
16440  Environment
16441 \end_layout
16442
16443 \begin_layout Standard
16444 If you're expecting this section to teach you how to actually make a presentatio
16445 n, you'll be sorely disappointed.
16446  Naturally, I'll describe all of the ways the 
16447 \family sans
16448 slides
16449 \family default
16450  class can assist you in preparing the materials for a presentation.
16451  Filling in the contents, however, is up to you.
16452  [Then again, that 
16453 \emph on
16454 is
16455 \emph default
16456  the LyX philosophy.]
16457 \end_layout
16458
16459 \begin_layout Standard
16460 Choosing the 
16461 \family sans
16462 Slide
16463 \family default
16464  environment [in the manner described in section
16465 \begin_inset space ~
16466 \end_inset
16467
16468
16469 \begin_inset CommandInset ref
16470 LatexCommand ref
16471 reference "sec:slideQuirk"
16472
16473 \end_inset
16474
16475 ] tells LyX to begin a new slide [duh].
16476  The label for this environment/
16477 \begin_inset Quotes erd
16478 \end_inset
16479
16480 pseudo-command
16481 \begin_inset Quotes erd
16482 \end_inset
16483
16484  is an 
16485 \begin_inset Quotes eld
16486 \end_inset
16487
16488 ASCII line,
16489 \begin_inset Quotes erd
16490 \end_inset
16491
16492  in cool blue, followed by the label, 
16493 \begin_inset Quotes eld
16494 \end_inset
16495
16496 NewSlide:
16497 \begin_inset Quotes erd
16498 \end_inset
16499
16500 .
16501  Any text or paragraph environments that follow this one go on the new slide.
16502  It's that simple.
16503 \end_layout
16504
16505 \begin_layout Standard
16506 Slides are probably the only time you'll need to forcibly end pages in LyX
16507  (this can be specified in the 
16508 \family sans
16509 Paragraph Layout
16510 \family default
16511  dialog).
16512  In fact, you'll want to, once you finish entering the contents of one slide.
16513  If you've entered more text than can physically fit on a slide, the extra
16514  overflows onto a new slide.
16515  I don't recommend doing this, however, since the overflow slide won't have
16516  any page number on it.
16517  Furthermore, it may interfere with any 
16518 \family sans
16519 Overlay
16520 \family default
16521  you've made to accompany the oversized 
16522 \family sans
16523 Slide
16524 \family default
16525 .
16526 \end_layout
16527
16528 \begin_layout Standard
16529 The 
16530 \family sans
16531 Overlay
16532 \family default
16533  and 
16534 \family sans
16535 Note
16536 \family default
16537  environments work the same way as the 
16538 \family sans
16539 Slide
16540 \family default
16541  environment.
16542  They both create an 
16543 \begin_inset Quotes eld
16544 \end_inset
16545
16546 ASCII line
16547 \begin_inset Quotes erd
16548 \end_inset
16549
16550  followed by a label [
16551 \begin_inset Quotes eld
16552 \end_inset
16553
16554 NewOverlay:
16555 \begin_inset Quotes erd
16556 \end_inset
16557
16558  and 
16559 \begin_inset Quotes eld
16560 \end_inset
16561
16562 NewNote:
16563 \begin_inset Quotes erd
16564 \end_inset
16565
16566 , respectively].
16567  The color is a stunning magenta instead of blue, and the 
16568 \begin_inset Quotes eld
16569 \end_inset
16570
16571 ASCII line
16572 \begin_inset Quotes erd
16573 \end_inset
16574
16575  will look different, in style and in length.
16576  The label fonts of all three also differ from one another.
16577 \end_layout
16578
16579 \begin_layout Standard
16580 As with a 
16581 \family sans
16582 Slide
16583 \family default
16584 , if the contents of a 
16585 \family sans
16586 Note
16587 \family default
16588  or 
16589 \family sans
16590 Overlay
16591 \family default
16592  exceed the physical size of a slide or sheet of paper, the extra will overflow
16593  onto a new sheet.
16594  Again, you should avoid this.
16595  It defeats the whole purpose of 
16596 \family sans
16597 Note
16598 \family default
16599 s and 
16600 \family sans
16601 Overlay
16602 \family default
16603 s.
16604 \end_layout
16605
16606 \begin_layout Subsubsection
16607 Using 
16608 \family sans
16609 Overlay
16610 \family default
16611  with 
16612 \family sans
16613 Slide
16614 \end_layout
16615
16616 \begin_layout Standard
16617 The idea behind an 
16618 \family sans
16619 Overlay
16620 \family default
16621  is a slide that sits atop another slide.
16622  Perhaps you wish to discuss a figure on the main 
16623 \family sans
16624 Slide
16625 \family default
16626  before displaying the text associated with it.
16627  One way to accomplish this is tape a flap of dark paper over the part of
16628  the 
16629 \family sans
16630 Slide
16631 \family default
16632  you want to display later.
16633  This method fails, however, if you wish to overlap one graph with another,
16634  for example.
16635  You would then have to fumble while speaking to align the two separate,
16636  overlapping 
16637 \family sans
16638 Slide
16639 \family default
16640 s to align the two graphs.
16641  The use of an 
16642 \family sans
16643 Overlay
16644 \family default
16645  environment in both cases makes life much easier.
16646 \end_layout
16647
16648 \begin_layout Standard
16649 Each 
16650 \family sans
16651 Overlay
16652 \family default
16653  receives the page number of its 
16654 \begin_inset Quotes eld
16655 \end_inset
16656
16657 parent
16658 \begin_inset Quotes erd
16659 \end_inset
16660
16661  
16662 \family sans
16663 Slide
16664 \family default
16665 , appended by 
16666 \begin_inset Quotes eld
16667 \end_inset
16668
16669
16670 \family typewriter
16671 -a
16672 \family default
16673
16674 \begin_inset Quotes erd
16675 \end_inset
16676
16677 .
16678 \begin_inset Foot
16679 status collapsed
16680
16681 \begin_layout Plain Layout
16682 Presumably, mutliple 
16683 \family sans
16684 Overlay
16685 \family default
16686 s would have 
16687 \begin_inset Quotes eld
16688 \end_inset
16689
16690
16691 \family typewriter
16692 -a
16693 \family default
16694
16695 \begin_inset Quotes erd
16696 \end_inset
16697
16698
16699 \begin_inset Quotes eld
16700 \end_inset
16701
16702
16703 \family typewriter
16704 -b
16705 \family default
16706
16707 \begin_inset Quotes erd
16708 \end_inset
16709
16710
16711 \begin_inset Quotes eld
16712 \end_inset
16713
16714
16715 \family typewriter
16716 -c
16717 \family default
16718
16719 \begin_inset Quotes erd
16720 \end_inset
16721
16722 , etc.
16723 \begin_inset space ~
16724 \end_inset
16725
16726 appended to the page number of the parent 
16727 \family sans
16728 Slide
16729 \family default
16730 .
16731  
16732 \end_layout
16733
16734 \end_inset
16735
16736  Clearly, you want the contents of both the 
16737 \family sans
16738 Slide
16739 \family default
16740  and the 
16741 \family sans
16742 Overlay
16743 \family default
16744  to each fit on a single physical slide! You should probably consider an
16745  
16746 \family sans
16747 Overlay
16748 \family default
16749  as 
16750 \begin_inset Quotes eld
16751 \end_inset
16752
16753 part of
16754 \begin_inset Quotes erd
16755 \end_inset
16756
16757  a 
16758 \family sans
16759 Slide
16760 \family default
16761 .
16762  Indeed, the LyX 
16763 \family sans
16764 slides
16765 \family default
16766  class provides a visual cue for this: the label at the start of an 
16767 \family sans
16768 Overlay
16769 \family default
16770  is shorter than that at the start of a 
16771 \family sans
16772 Slide
16773 \family default
16774 .
16775  Lastly, when you generate printable output, you'll find alignment markers
16776  in all four corners of both the 
16777 \family sans
16778 Overlay
16779 \family default
16780  page and its parent 
16781 \family sans
16782 Slide
16783 \family default
16784 .
16785  These will assist you in lining up the two physical slides.
16786 \end_layout
16787
16788 \begin_layout Standard
16789 The major problem in overlaying two slides is aligning the contents of the
16790  two transparencies.
16791  How much space should you leave for that graph on the second slide? Worse
16792  still, what if you want a graph and a sentence on second slide, but there
16793  is text on the main transparency that goes in between them? You could try
16794  and insert vertical space of the right size.
16795  The better way is to use 
16796 \family sans
16797 InvisibleText
16798 \family default
16799  and 
16800 \family sans
16801 VisibleText
16802 \family default
16803 .
16804 \end_layout
16805
16806 \begin_layout Standard
16807 As their names imply, 
16808 \family sans
16809 InvisibleText
16810 \family default
16811  and 
16812 \family sans
16813 VisibleText
16814 \family default
16815  are two command-like paragraph environments that make all subsequent text
16816  invisible and visible, respectively.
16817  Note from section
16818 \begin_inset space ~
16819 \end_inset
16820
16821
16822 \begin_inset CommandInset ref
16823 LatexCommand ref
16824 reference "sec:slideQuirk"
16825
16826 \end_inset
16827
16828  that you don't place anything 
16829 \emph on
16830 into
16831 \emph default
16832  these two environments, however.
16833  When you create an 
16834 \family sans
16835 InvisibleText
16836 \family default
16837 , it inserts a centered, sky-blue label into the page reading 
16838 \begin_inset Quotes eld
16839 \end_inset
16840
16841 <Invisible Text Follows>
16842 \begin_inset Quotes erd
16843 \end_inset
16844
16845 .
16846  For paragraphs following this label, the parts of the 
16847 \family sans
16848 Slide
16849 \family default
16850  [or 
16851 \family sans
16852 Overlay
16853 \family default
16854 ; it doesn't matter which] where they would be contain instead blank space.
16855  
16856 \end_layout
16857
16858 \begin_layout Standard
16859 For 
16860 \family sans
16861 VisibleText
16862 \family default
16863 , the corresponding centered label is 
16864 \begin_inset Quotes eld
16865 \end_inset
16866
16867 <Visible Text Follows>
16868 \begin_inset Quotes erd
16869 \end_inset
16870
16871  in blazing green.
16872  Paragraphs following this label behave normally.
16873  Note that the beginning of a new 
16874 \family sans
16875 Slide
16876 \family default
16877
16878 \family sans
16879 Overlay
16880 \family default
16881 , or 
16882 \family sans
16883 Note
16884 \family default
16885  automatically shuts off an 
16886 \family sans
16887 InvisibleText
16888 \family default
16889 .
16890  It's therefore not necessary to use 
16891 \family sans
16892 VisibleText
16893 \family default
16894  at the end of a 
16895 \family sans
16896 Slide
16897 \family default
16898 .
16899 \end_layout
16900
16901 \begin_layout Standard
16902 By now, it should be obvious how to create overlay transparencies using
16903  the proper combination of 
16904 \family sans
16905 InvisibleText
16906 \family default
16907  and 
16908 \family sans
16909 VisibleText
16910 \family default
16911  on a 
16912 \family sans
16913 Slide
16914 \family default
16915  and 
16916 \family sans
16917 Overlay
16918 \family default
16919 :
16920 \end_layout
16921
16922 \begin_layout Enumerate
16923 Create a 
16924 \family sans
16925 Slide
16926 \family default
16927 , including everything that will appear on it, whether on the main slide
16928  or on the 
16929 \family sans
16930 Overlay
16931 \family default
16932 .
16933 \end_layout
16934
16935 \begin_layout Enumerate
16936 Before each figure or paragraph that will appear only on the 
16937 \family sans
16938 Overlay
16939 \family default
16940 , insert an 
16941 \family sans
16942 InvisibleText
16943 \family default
16944  environment.
16945  If necessary, insert a 
16946 \family sans
16947 VisibleText
16948 \family default
16949  environment after the 
16950 \family sans
16951 Overlay
16952 \family default
16953 -only text.
16954 \end_layout
16955
16956 \begin_layout Enumerate
16957 Start an 
16958 \family sans
16959 Overlay
16960 \family default
16961  immediately following the 
16962 \family sans
16963 Slide
16964 \family default
16965 .
16966 \end_layout
16967
16968 \begin_layout Enumerate
16969 Copy the contents of this 
16970 \family sans
16971 Slide
16972 \family default
16973  into the 
16974 \family sans
16975 Overlay
16976 \family default
16977 .
16978 \end_layout
16979
16980 \begin_layout Enumerate
16981 Within the 
16982 \family sans
16983 Overlay
16984 \family default
16985 , change all of the 
16986 \family sans
16987 InvisibleText
16988 \family default
16989  lines to 
16990 \family sans
16991 VisibleText
16992 \family default
16993  and vice-versa.
16994 \end_layout
16995
16996 \begin_layout Standard
16997 That's it.
16998  You've just made an 
16999 \family sans
17000 Overlay
17001 \family default
17002 .
17003 \end_layout
17004
17005 \begin_layout Standard
17006 There's one problem with the way I've designed the LyX 
17007 \family sans
17008 slides
17009 \family default
17010  class: you can't make text in the middle of a paragraph invisible, nor
17011  make text in the middle of an invisible paragraph visible again.
17012  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17013 \begin_inset Foot
17014 status collapsed
17015
17016 \begin_layout Plain Layout
17017 The commands of interest are: 
17018 \end_layout
17019
17020 \begin_layout Itemize
17021
17022 \family typewriter
17023 {
17024 \backslash
17025 invisible \SpecialChar \ldots{}
17026  }
17027 \end_layout
17028
17029 \begin_layout Itemize
17030
17031 \family typewriter
17032 {
17033 \backslash
17034 visible \SpecialChar \ldots{}
17035  }
17036 \end_layout
17037
17038 \begin_layout Plain Layout
17039 \SpecialChar \ldots{}
17040 and need to be marked as TeX.
17041  The text whose 
17042 \begin_inset Quotes eld
17043 \end_inset
17044
17045 visibility
17046 \begin_inset Quotes erd
17047 \end_inset
17048
17049  you wish to change goes in between the brackets [and after the 
17050 \family typewriter
17051
17052 \backslash
17053 invisible
17054 \family default
17055  or 
17056 \family typewriter
17057
17058 \backslash
17059 visible
17060 \family default
17061  command].
17062  If you don't know how to mark text as TeX, see the appropriate section
17063  of the 
17064 \emph on
17065 User's Guide
17066 \emph default
17067 .
17068 \end_layout
17069
17070 \end_inset
17071
17072
17073 \end_layout
17074
17075 \begin_layout Subsubsection
17076 Using 
17077 \family sans
17078 Note
17079 \family default
17080  with 
17081 \family sans
17082 Slide
17083 \family default
17084
17085 \begin_inset CommandInset label
17086 LatexCommand label
17087 name "sec:slideNote"
17088
17089 \end_inset
17090
17091
17092 \end_layout
17093
17094 \begin_layout Standard
17095 Like an 
17096 \family sans
17097 Overlay
17098 \family default
17099 , a 
17100 \family sans
17101 Note
17102 \family default
17103  is associated with a 
17104 \begin_inset Quotes eld
17105 \end_inset
17106
17107 parent
17108 \begin_inset Quotes erd
17109 \end_inset
17110
17111  
17112 \family sans
17113 Slide
17114 \family default
17115 .
17116  Here, too, the LyX 
17117 \family sans
17118 slides
17119 \family default
17120  class provides visual cues.
17121  The label for a 
17122 \family sans
17123 Note
17124 \family default
17125  is shorter than that of a 
17126 \family sans
17127 Slide
17128 \family default
17129  [yet longer than that of an 
17130 \family sans
17131 Overlay
17132 \family default
17133 ] and, like the label of an 
17134 \family sans
17135 Overlay
17136 \family default
17137  is shockingly magenta.
17138  Additionally, the printed 
17139 \family sans
17140 Note
17141 \family default
17142  has the page number of its 
17143 \begin_inset Quotes eld
17144 \end_inset
17145
17146 parent
17147 \begin_inset Quotes erd
17148 \end_inset
17149
17150  
17151 \family sans
17152 Slide
17153 \family default
17154 , appended by 
17155 \begin_inset Quotes eld
17156 \end_inset
17157
17158
17159 \family typewriter
17160 -
17161 \family default
17162 1
17163 \begin_inset Quotes erd
17164 \end_inset
17165
17166
17167 \begin_inset Quotes eld
17168 \end_inset
17169
17170
17171 \family typewriter
17172 -
17173 \family default
17174 2
17175 \begin_inset Quotes erd
17176 \end_inset
17177
17178
17179 \begin_inset Quotes eld
17180 \end_inset
17181
17182
17183 \family typewriter
17184 -
17185 \family default
17186 3
17187 \begin_inset Quotes erd
17188 \end_inset
17189
17190 , etc.
17191  You can have multiple 
17192 \family sans
17193 Note
17194 \family default
17195 s associated with a single 
17196 \family sans
17197 Slide
17198 \family default
17199 , and, as with 
17200 \family sans
17201 Slide
17202 \family default
17203  and 
17204 \family sans
17205 Overlay
17206 \family default
17207 , you'll probably want to break up long 
17208 \family sans
17209 Note
17210 \family default
17211 s so that they fit on a single sheet of paper.
17212 \end_layout
17213
17214 \begin_layout Standard
17215 The purpose of a 
17216 \family sans
17217 Note
17218 \family default
17219  is obvious: it contains anything additional you might want to say about
17220  a 
17221 \family sans
17222 Slide
17223 \family default
17224 .
17225  It could also be used as a sheet of reminders for a particular 
17226 \family sans
17227 Slide
17228 \family default
17229 .
17230  In the case of the latter, you might want to make use of time markers.
17231  Currently, the LyX 
17232 \family sans
17233 slides
17234 \family default
17235  class has no 
17236 \begin_inset Quotes eld
17237 \end_inset
17238
17239 native
17240 \begin_inset Quotes erd
17241 \end_inset
17242
17243  support for time markers, a 
17244 \noun on
17245 SliTeX
17246 \noun default
17247  feature.
17248  So, you'll have to resort to using the LaTeX codes.
17249 \end_layout
17250
17251 \begin_layout Standard
17252 To use time markers, you'll need to specify the extra class option 
17253 \begin_inset Quotes eld
17254 \end_inset
17255
17256
17257 \family typewriter
17258 clock
17259 \family default
17260
17261 \begin_inset Quotes erd
17262 \end_inset
17263
17264  [see section
17265 \begin_inset space ~
17266 \end_inset
17267
17268
17269 \begin_inset CommandInset ref
17270 LatexCommand ref
17271 reference "sec:slidesetup"
17272
17273 \end_inset
17274
17275 ].
17276  This option turns on timing marks, which will appear in the lower-left-hand
17277  corner of every 
17278 \family sans
17279 Note
17280 \family default
17281  you generate.
17282  To set what appears in the time marker, you use the LaTeX commands 
17283 \begin_inset Quotes eld
17284 \end_inset
17285
17286
17287 \family typewriter
17288
17289 \backslash
17290 settime{}
17291 \family default
17292
17293 \begin_inset Quotes erd
17294 \end_inset
17295
17296  and 
17297 \begin_inset Quotes eld
17298 \end_inset
17299
17300
17301 \family typewriter
17302
17303 \backslash
17304 addtime{}
17305 \family default
17306
17307 \begin_inset Quotes erd
17308 \end_inset
17309
17310 .
17311  The arguments of both commands are time measured in seconds.
17312  
17313 \begin_inset Quotes eld
17314 \end_inset
17315
17316
17317 \family typewriter
17318
17319 \backslash
17320 settime{}
17321 \family default
17322
17323 \begin_inset Quotes erd
17324 \end_inset
17325
17326  sets the time marker to a given time.
17327  
17328 \begin_inset Quotes eld
17329 \end_inset
17330
17331
17332 \family typewriter
17333
17334 \backslash
17335 addtime{}
17336 \family default
17337
17338 \begin_inset Quotes erd
17339 \end_inset
17340
17341  increments the time marker by the specified amount.
17342  Using time markers and 
17343 \family sans
17344 Note
17345 \family default
17346 s in this fashion, you can remind yourself how much time to spend on a particula
17347
17348 \family sans
17349 Slide
17350 \family default
17351 .
17352 \end_layout
17353
17354 \begin_layout Standard
17355 There's one last feature to describe.
17356  Clearly, you'd like to print out all of your 
17357 \family sans
17358 Slide
17359 \family default
17360 s and 
17361 \family sans
17362 Overlay
17363 \family default
17364 s on transparencies while printing all of your 
17365 \family sans
17366 Note
17367 \family default
17368 s on plain paper.
17369  However, a 
17370 \family sans
17371 Note
17372 \family default
17373  
17374 \emph on
17375 must
17376 \emph default
17377  follow the 
17378 \family sans
17379 Slide
17380 \family default
17381  with which it is associated.
17382  What's a person to do?
17383 \end_layout
17384
17385 \begin_layout Standard
17386 Luckily, there are two LaTeX commands that allow you to select what to print
17387  out.
17388  Both must be placed into the preamble of your document.
17389  The command 
17390 \begin_inset Quotes eld
17391 \end_inset
17392
17393
17394 \family typewriter
17395
17396 \backslash
17397 onlyslides{
17398 \backslash
17399 slides}
17400 \family default
17401
17402 \begin_inset Quotes erd
17403 \end_inset
17404
17405  will cause the output to contain only the 
17406 \family sans
17407 Slide
17408 \family default
17409 s and 
17410 \family sans
17411 Overlay
17412 \family default
17413 s.
17414  Correspondingly, the command 
17415 \begin_inset Quotes eld
17416 \end_inset
17417
17418
17419 \family typewriter
17420
17421 \backslash
17422 onlynotes{
17423 \backslash
17424 notes}
17425 \family default
17426
17427 \begin_inset Quotes erd
17428 \end_inset
17429
17430  prevents the output of anything but 
17431 \family sans
17432 Note
17433 \family default
17434 s.
17435  I'd advise placing both commands in the preamble and initially comment
17436  both out.
17437  You can then preview your entire presentation as you write.
17438  When you're done writing, you can then uncomment one of the two to select
17439  what you want to print.
17440  I like to uncomment 
17441 \begin_inset Quotes eld
17442 \end_inset
17443
17444
17445 \family typewriter
17446
17447 \backslash
17448 onlyslides{
17449 \backslash
17450 slides}
17451 \family default
17452
17453 \begin_inset Quotes erd
17454 \end_inset
17455
17456  , print to a file with 
17457 \begin_inset Quotes eld
17458 \end_inset
17459
17460
17461 \family typewriter
17462 -slides
17463 \family default
17464
17465 \begin_inset Quotes erd
17466 \end_inset
17467
17468  in its name, comment it back out, then uncomment 
17469 \begin_inset Quotes eld
17470 \end_inset
17471
17472
17473 \family typewriter
17474
17475 \backslash
17476 onlynotes{
17477 \backslash
17478 notes}
17479 \family default
17480
17481 \begin_inset Quotes erd
17482 \end_inset
17483
17484  and print to a 
17485 \begin_inset Quotes eld
17486 \end_inset
17487
17488
17489 \family typewriter
17490 *-notes.ps
17491 \family default
17492
17493 \begin_inset Quotes erd
17494 \end_inset
17495
17496  file.
17497  I can then send either file to a printer, loading transparencies or plain
17498  paper as appropriate.
17499 \end_layout
17500
17501 \begin_layout Standard
17502 You can also provide other arguments to the 
17503 \begin_inset Quotes eld
17504 \end_inset
17505
17506
17507 \family typewriter
17508
17509 \backslash
17510 onlyslides{}
17511 \family default
17512
17513 \begin_inset Quotes erd
17514 \end_inset
17515
17516  and 
17517 \begin_inset Quotes eld
17518 \end_inset
17519
17520
17521 \family typewriter
17522
17523 \backslash
17524 onlynotes{}
17525 \family default
17526
17527 \begin_inset Quotes erd
17528 \end_inset
17529
17530  commands.
17531  See a good LaTeX book for details.
17532 \end_layout
17533
17534 \begin_layout Subsection
17535 The 
17536 \family sans
17537 slides
17538 \family default
17539  Class Template File
17540 \end_layout
17541
17542 \begin_layout Standard
17543 I have also provided a template file, 
17544 \begin_inset Quotes eld
17545 \end_inset
17546
17547
17548 \family typewriter
17549 slides.lyx
17550 \family default
17551
17552 \begin_inset Quotes erd
17553 \end_inset
17554
17555 , with the 
17556 \family sans
17557 slides
17558 \family default
17559  class.
17560  To use it, begin your new presentation with 
17561 \family sans
17562 \bar under
17563 F
17564 \bar default
17565 ile\SpecialChar \menuseparator
17566 New
17567 \begin_inset space ~
17568 \end_inset
17569
17570 from
17571 \begin_inset space ~
17572 \end_inset
17573
17574
17575 \bar under
17576 T
17577 \bar default
17578 emplate
17579 \family default
17580 .
17581  Your new LyX presentation file will contain an example 
17582 \family sans
17583 Slide
17584 \family default
17585  – 
17586 \family sans
17587 Overlay
17588 \family default
17589  – 
17590 \family sans
17591 Note
17592 \family default
17593  triplet.
17594  The 
17595 \family sans
17596 Slide
17597 \family default
17598  and 
17599 \family sans
17600 Overlay
17601 \family default
17602  additionally contain an example of the use of 
17603 \family sans
17604 InvisibleText
17605 \family default
17606  and 
17607 \family sans
17608 VisibleText
17609 \family default
17610 .
17611  Lastly, the preamble will contain:
17612 \end_layout
17613
17614 \begin_layout LyX-Code
17615 % Uncomment to print out only slides and overlays
17616 \end_layout
17617
17618 \begin_layout LyX-Code
17619 %
17620 \end_layout
17621
17622 \begin_layout LyX-Code
17623 %
17624 \backslash
17625 onlyslides{
17626 \backslash
17627 slides}
17628 \begin_inset Newline newline
17629 \end_inset
17630
17631  
17632 \end_layout
17633
17634 \begin_layout LyX-Code
17635 % Uncomment to print out only notes
17636 \end_layout
17637
17638 \begin_layout LyX-Code
17639 %
17640 \end_layout
17641
17642 \begin_layout LyX-Code
17643 %
17644 \backslash
17645 onlynotes{
17646 \backslash
17647 notes}
17648 \end_layout
17649
17650 \begin_layout Standard
17651 One final thing: I created this class to support the LaTeX2e 
17652 \begin_inset Quotes eld
17653 \end_inset
17654
17655
17656 \noun on
17657 SliTeX
17658 \noun default
17659  emulation
17660 \begin_inset Quotes erd
17661 \end_inset
17662
17663  class, one of the built-in LaTeX2e classes.
17664  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17665  built-in slide class.
17666  It's here if you want it or need it.
17667  There exist other LaTeX2e classes for creating presentations, such as the
17668  
17669 \family sans
17670 Foils
17671 \family default
17672  class [see section
17673 \begin_inset space ~
17674 \end_inset
17675
17676
17677 \begin_inset CommandInset ref
17678 LatexCommand ref
17679 reference "sec:foiltex"
17680
17681 \end_inset
17682
17683 ] or the 
17684 \begin_inset Quotes eld
17685 \end_inset
17686
17687
17688 \family typewriter
17689 seminar
17690 \family default
17691
17692 \begin_inset Quotes erd
17693 \end_inset
17694
17695  package [present on some TeX distributions].
17696  The latter is not yet supported under LyX.
17697 \begin_inset Foot
17698 status collapsed
17699
17700 \begin_layout Plain Layout
17701 Perhaps you can take on the task\SpecialChar \ldots{}
17702
17703 \end_layout
17704
17705 \end_inset
17706
17707  I know nothing about these other classes.
17708  Try them out to see what sort of alternative they provide.
17709 \end_layout
17710
17711 \begin_layout Chapter
17712 LyX Features needing Extra Software
17713 \end_layout
17714
17715 \begin_layout Section
17716 Checking TeX
17717 \end_layout
17718
17719 \begin_layout Standard
17720 by 
17721 \noun on
17722 Asger Alstrup
17723 \end_layout
17724
17725 \begin_layout Subsection
17726 Introduction
17727 \end_layout
17728
17729 \begin_layout Standard
17730 If you have the 
17731 \family typewriter
17732 chktex
17733 \family default
17734  program installed
17735 \begin_inset Foot
17736 status collapsed
17737
17738 \begin_layout Plain Layout
17739
17740 \family typewriter
17741 chktex
17742 \family default
17743  is not yet available when you are using the LaTeX distribution MiKTeX.
17744 \end_layout
17745
17746 \end_inset
17747
17748 , you'll find in the 
17749 \family sans
17750 Tools
17751 \family default
17752  menu the entry: 
17753 \family sans
17754 Check
17755 \begin_inset space ~
17756 \end_inset
17757
17758 TeX
17759 \family default
17760 .
17761  You can get 
17762 \family typewriter
17763 chktex
17764 \family default
17765  it from CTAN, 
17766 \begin_inset CommandInset href
17767 LatexCommand href
17768 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17769
17770 \end_inset
17771
17772 .
17773 \end_layout
17774
17775 \begin_layout Standard
17776 The 
17777 \family sans
17778 ChkTeX
17779 \family default
17780  package is a program that was written by 
17781 \begin_inset Flex Noun
17782 status collapsed
17783
17784 \begin_layout Plain Layout
17785 Jens T.
17786 \begin_inset space ~
17787 \end_inset
17788
17789 Berger Thielemann
17790 \end_layout
17791
17792 \end_inset
17793
17794  in frustration because some constructs in LaTeX are sometimes non-intuitive,
17795  and easy to forget.
17796  The program runs over your LaTeX file, checks the integrity of the file,
17797  and flags some common errors.
17798  In other technical words, it is 
17799 \family typewriter
17800 lint
17801 \family default
17802  for LaTeX.
17803 \end_layout
17804
17805 \begin_layout Standard
17806 Well, what is a syntax checker doing in LyX which is supposed to produce
17807  correct LaTeX anyways? The answer is simple: Just as 
17808 \family typewriter
17809 Lint
17810 \family default
17811  not only checks the 
17812 \emph on
17813 syntax
17814 \emph default
17815  of C programs, but also does 
17816 \emph on
17817 semantic
17818 \emph default
17819  checks for type-errors, 
17820 \family sans
17821 ChkTeX
17822 \family default
17823  catches some common 
17824 \emph on
17825 typographic
17826 \emph default
17827  errors, in addition to the syntactical ones.
17828  Specifically, 
17829 \family sans
17830 ChkTeX
17831 \family default
17832  is capable of detecting several common errors, such as
17833 \end_layout
17834
17835 \begin_layout Itemize
17836 Ellipsis detection:
17837 \begin_inset Newline newline
17838 \end_inset
17839
17840 Use \SpecialChar \ldots{}
17841  instead of ...
17842 \end_layout
17843
17844 \begin_layout Itemize
17845 No space in front of/after parenthesis:
17846 \begin_inset Newline newline
17847 \end_inset
17848
17849 ( wrong spacing )
17850 \end_layout
17851
17852 \begin_layout Itemize
17853 Enforcement of normal space after common abbreviations:
17854 \begin_inset Newline newline
17855 \end_inset
17856
17857 e.
17858 \begin_inset space \thinspace{}
17859 \end_inset
17860
17861 g.
17862 \begin_inset space \space{}
17863 \end_inset
17864
17865 is too wide spacing.
17866 \end_layout
17867
17868 \begin_layout Itemize
17869 Enforcement of end-of-sentence space when the last sentence ends with a
17870  capital letter:
17871 \begin_inset Newline newline
17872 \end_inset
17873
17874 This is a TEST.
17875  And this is wrong spacing.
17876 \end_layout
17877
17878 \begin_layout Itemize
17879 Space in front of labels and similar commands:
17880 \begin_inset Newline newline
17881 \end_inset
17882
17883 The label should stick right up to the text to avoid falling to a wrong
17884  page.
17885  
17886 \begin_inset CommandInset label
17887 LatexCommand label
17888 name "sec:chktex"
17889
17890 \end_inset
17891
17892  
17893 \begin_inset Foot
17894 status collapsed
17895
17896 \begin_layout Plain Layout
17897 This footnote is in danger of falling off to a wrong page
17898 \end_layout
17899
17900 \end_inset
17901
17902  The label is separated too much.
17903 \end_layout
17904
17905 \begin_layout Itemize
17906 Space in front of references, instead of hard spaces:
17907 \begin_inset Newline newline
17908 \end_inset
17909
17910 In you are in bad luck, the text will break right between the referenced
17911  text and reference number, and that's a pity.
17912  See section 
17913 \begin_inset CommandInset ref
17914 LatexCommand ref
17915 reference "sec:chktex"
17916
17917 \end_inset
17918
17919 .
17920 \end_layout
17921
17922 \begin_layout Itemize
17923 Use of 
17924 \begin_inset Quotes eld
17925 \end_inset
17926
17927 x
17928 \begin_inset Quotes erd
17929 \end_inset
17930
17931  instead of 
17932 \begin_inset Formula $\times$
17933 \end_inset
17934
17935  between numbers:
17936 \begin_inset Newline newline
17937 \end_inset
17938
17939 2x2 looks cheap compared to 
17940 \begin_inset Formula $2\times2$
17941 \end_inset
17942
17943 .
17944 \end_layout
17945
17946 \begin_layout Standard
17947 and more \SpecialChar \ldots{}
17948  It is an invaluable tool when you are 
17949 \begin_inset Quotes eld
17950 \end_inset
17951
17952 finishing up
17953 \begin_inset Quotes erd
17954 \end_inset
17955
17956  your document before printing, and you should run it right after the obligatory
17957  spelling check, and before you go fine tuning the typesetting.
17958 \end_layout
17959
17960 \begin_layout Subsection
17961 How to use it
17962 \end_layout
17963
17964 \begin_layout Standard
17965 If you have the program installed, usage is as simple as choosing 
17966 \family sans
17967 Tools\SpecialChar \menuseparator
17968 Check
17969 \begin_inset space ~
17970 \end_inset
17971
17972 TeX
17973 \family default
17974 .
17975  This will make LyX generate a LaTeX file of your document, start 
17976 \family sans
17977 ChkTeX
17978 \family default
17979  to check it, and then make LyX insert 
17980 \begin_inset Quotes eld
17981 \end_inset
17982
17983 error boxes
17984 \begin_inset Quotes erd
17985 \end_inset
17986
17987  with the warnings from 
17988 \family sans
17989 ChkTeX
17990 \family default
17991 , if there were any.
17992  The warnings will be placed close to the point of the mistake, and you
17993  can quickly find them by using the 
17994 \family sans
17995 Navigate\SpecialChar \menuseparator
17996 Error
17997 \family default
17998  menu item, or the shortcut key 
17999 \family sans
18000 C-g
18001 \family default
18002  from the default 
18003 \family typewriter
18004 cua
18005 \family default
18006  bind file.
18007  Open the error boxes by clicking on them with the mouse, or use the shortcut
18008  key 
18009 \family sans
18010 C-i
18011 \family default
18012  from 
18013 \family typewriter
18014 cua
18015 \family default
18016  bindings, or the corresponding 
18017 \family sans
18018 C-o
18019 \family default
18020  for the alternate 
18021 \family typewriter
18022 emacs
18023 \family default
18024  bind file.
18025  Read the warning and correct the mistake, if it is a mistake.
18026  If you have trouble understanding what the warning is about, you can safely
18027  ignore it.
18028  Remember that there is a hidden layer between the document on screen and
18029  the technical details in invoking 
18030 \family sans
18031 ChkTeX
18032 \family default
18033 , and this gap can make some warnings seem arcane or just right down plain
18034  silly.
18035 \end_layout
18036
18037 \begin_layout Standard
18038 This document is an excellent testing bed for the feature, and it should
18039  provide quite a few warnings for you to fiddle with.
18040  Since computers are only so smart, expect most of the warnings to be false
18041  alarms, though.
18042 \end_layout
18043
18044 \begin_layout Subsection
18045 How to fine tune it
18046 \end_layout
18047
18048 \begin_layout Standard
18049 Sometimes, you'll find that 
18050 \family sans
18051 ChkTeX
18052 \family default
18053  makes more noise than suits your mood.
18054  Then you can choose not to use it, wait until your mood changes, or try
18055  to customize 
18056 \family sans
18057 ChkTeX
18058 \family default
18059  to get better along with you.
18060  Another choice in the most desperate situations is to use 
18061 \family sans
18062 View\SpecialChar \menuseparator
18063 Remove
18064 \begin_inset space ~
18065 \end_inset
18066
18067 All
18068 \begin_inset space ~
18069 \end_inset
18070
18071 Error
18072 \begin_inset space ~
18073 \end_inset
18074
18075 Boxes
18076 \family default
18077 , which will get rid of all warnings instantly.
18078 \end_layout
18079
18080 \begin_layout Standard
18081 Although 
18082 \family sans
18083 ChkTeX
18084 \family default
18085  
18086 \emph on
18087 is
18088 \emph default
18089  very configurable and extensible, you shouldn't expect to solve all problems
18090  with 
18091 \family sans
18092 ChkTeX
18093 \family default
18094  in LyX this way.
18095  Since LyX has to generate a somewhat special LaTeX file to be able to match
18096  the line numbers from the 
18097 \family sans
18098 ChkTeX
18099 \family default
18100  output
18101 \begin_inset Foot
18102 status collapsed
18103
18104 \begin_layout Plain Layout
18105 You can inspect the specific output from 
18106 \family sans
18107 chktex
18108 \family default
18109  by using 
18110 \family sans
18111 Edit\SpecialChar \menuseparator
18112 View
18113 \begin_inset space ~
18114 \end_inset
18115
18116 LaTeX
18117 \begin_inset space ~
18118 \end_inset
18119
18120 Log
18121 \family default
18122  right after a 
18123 \family sans
18124 chktex
18125 \family default
18126  run.
18127 \end_layout
18128
18129 \end_inset
18130
18131  to the internal document structure, some of the warnings will not seen
18132  to appear correctly.
18133  There are two things you can do about this:
18134 \end_layout
18135
18136 \begin_layout Itemize
18137 Fine tune the 
18138 \family sans
18139 ChkTeX
18140 \family default
18141  invocation command line in 
18142 \family sans
18143 Preferences
18144 \family default
18145  (tabs 
18146 \family sans
18147 Outputs
18148 \family default
18149
18150 \family sans
18151 Misc
18152 \family default
18153 ), or the global 
18154 \family sans
18155 ChkTeX
18156 \family default
18157  installation configuration file (usually with the file 
18158 \family typewriter
18159 chktexrc
18160 \family default
18161 ).
18162  See below to learn what warnings can be enabled and disabled on the command
18163  line.
18164  
18165 \end_layout
18166
18167 \begin_layout Itemize
18168 Export your document as a raw LaTeX file using 
18169 \family sans
18170 File\SpecialChar \menuseparator
18171 Export\SpecialChar \menuseparator
18172 LaTeX
18173 \family default
18174  and run 
18175 \family typewriter
18176 chktex
18177 \family default
18178  manually on that.
18179  Invoked in this way, it can be a hassle to find the corresponding place
18180  in the document inside LyX, but with a little patience, you should be able
18181  to do it.
18182 \end_layout
18183
18184 \begin_layout Standard
18185 Here follows the warning messages that can be enabled and disabled in 
18186 \family sans
18187 Preferences
18188 \family default
18189 .
18190  Use 
18191 \family typewriter
18192 -n#
18193 \family default
18194  to disable a warning, and 
18195 \family typewriter
18196 -w#
18197 \family default
18198  to enable a warning.
18199  The emphasized entries are disabled by default, because the default is
18200  "
18201 \family typewriter
18202 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18203 \family default
18204 ".
18205 \end_layout
18206
18207 \begin_layout Standard
18208 Notice that you should only use the options that enable and disable warnings,
18209  because LyX relies on some of the other command line parameters to be set
18210  in a specific way to have a chance to communicate with 
18211 \family typewriter
18212 chktex
18213 \family default
18214 .
18215 \end_layout
18216
18217 \begin_layout Enumerate
18218
18219 \size small
18220 \emph on
18221 Command terminated with space.
18222 \end_layout
18223
18224 \begin_layout Enumerate
18225
18226 \size small
18227 Non-breaking space (
18228 \begin_inset Quotes eld
18229 \end_inset
18230
18231
18232 \family typewriter
18233 ~
18234 \family default
18235
18236 \begin_inset Quotes erd
18237 \end_inset
18238
18239 ) should have been used.
18240 \end_layout
18241
18242 \begin_layout Enumerate
18243
18244 \size small
18245 \emph on
18246 You should enclose the previous parenthesis with 
18247 \begin_inset Quotes eld
18248 \end_inset
18249
18250
18251 \family typewriter
18252 {}
18253 \family default
18254
18255 \begin_inset Quotes erd
18256 \end_inset
18257
18258 .
18259 \end_layout
18260
18261 \begin_layout Enumerate
18262
18263 \size small
18264 Italic correction (
18265 \begin_inset Quotes eld
18266 \end_inset
18267
18268
18269 \family typewriter
18270
18271 \backslash
18272 /
18273 \family default
18274
18275 \begin_inset Quotes erd
18276 \end_inset
18277
18278 ) found in non-italic buffer.
18279 \end_layout
18280
18281 \begin_layout Enumerate
18282
18283 \size small
18284 Italic correction (
18285 \begin_inset Quotes eld
18286 \end_inset
18287
18288
18289 \family typewriter
18290
18291 \backslash
18292 /
18293 \family default
18294
18295 \begin_inset Quotes erd
18296 \end_inset
18297
18298 ) found more than once.
18299 \end_layout
18300
18301 \begin_layout Enumerate
18302
18303 \size small
18304 \emph on
18305 No italic correction (
18306 \begin_inset Quotes eld
18307 \end_inset
18308
18309
18310 \family typewriter
18311
18312 \backslash
18313 /
18314 \family default
18315
18316 \begin_inset Quotes erd
18317 \end_inset
18318
18319 ) found.
18320 \end_layout
18321
18322 \begin_layout Enumerate
18323
18324 \size small
18325 Accent command 
18326 \begin_inset Quotes eld
18327 \end_inset
18328
18329
18330 \family typewriter
18331 cmd
18332 \family default
18333
18334 \begin_inset Quotes erd
18335 \end_inset
18336
18337  needs use of 
18338 \begin_inset Quotes eld
18339 \end_inset
18340
18341
18342 \family typewriter
18343 cmd
18344 \family default
18345
18346 \begin_inset Quotes erd
18347 \end_inset
18348
18349 .
18350 \end_layout
18351
18352 \begin_layout Enumerate
18353
18354 \size small
18355 Wrong length of dash may have been used.
18356 \end_layout
18357
18358 \begin_layout Enumerate
18359
18360 \size small
18361 \emph on
18362 \begin_inset Quotes eld
18363 \end_inset
18364
18365
18366 \family typewriter
18367 %s
18368 \family default
18369
18370 \begin_inset Quotes erd
18371 \end_inset
18372
18373  expected, found 
18374 \begin_inset Quotes eld
18375 \end_inset
18376
18377
18378 \family typewriter
18379 %s
18380 \family default
18381
18382 \begin_inset Quotes erd
18383 \end_inset
18384
18385 .
18386 \end_layout
18387
18388 \begin_layout Enumerate
18389
18390 \size small
18391 Solo 
18392 \begin_inset Quotes eld
18393 \end_inset
18394
18395
18396 \family typewriter
18397 %s
18398 \family default
18399
18400 \begin_inset Quotes erd
18401 \end_inset
18402
18403  found.
18404 \end_layout
18405
18406 \begin_layout Enumerate
18407
18408 \size small
18409 You should use 
18410 \begin_inset Quotes eld
18411 \end_inset
18412
18413
18414 \family typewriter
18415 %s
18416 \family default
18417
18418 \begin_inset Quotes erd
18419 \end_inset
18420
18421  to achieve an ellipsis.
18422 \end_layout
18423
18424 \begin_layout Enumerate
18425
18426 \size small
18427 Inter-word spacing (
18428 \begin_inset Quotes eld
18429 \end_inset
18430
18431
18432 \family typewriter
18433
18434 \backslash
18435
18436 \family default
18437  
18438 \begin_inset Quotes eld
18439 \end_inset
18440
18441 ) should perhaps be used.
18442 \end_layout
18443
18444 \begin_layout Enumerate
18445
18446 \size small
18447 Inter-sentence spacing (
18448 \begin_inset Quotes eld
18449 \end_inset
18450
18451
18452 \family typewriter
18453
18454 \backslash
18455 @
18456 \family default
18457
18458 \begin_inset Quotes erd
18459 \end_inset
18460
18461 ) should perhaps be used.
18462 \end_layout
18463
18464 \begin_layout Enumerate
18465
18466 \size small
18467 Could not find argument for command.
18468 \end_layout
18469
18470 \begin_layout Enumerate
18471
18472 \size small
18473 No match found for 
18474 \begin_inset Quotes eld
18475 \end_inset
18476
18477
18478 \family typewriter
18479 %s
18480 \family default
18481
18482 \begin_inset Quotes erd
18483 \end_inset
18484
18485 .
18486 \end_layout
18487
18488 \begin_layout Enumerate
18489
18490 \size small
18491 Math mode still on at end of LaTeX file.
18492 \end_layout
18493
18494 \begin_layout Enumerate
18495
18496 \size small
18497 Number of 
18498 \begin_inset Quotes eld
18499 \end_inset
18500
18501
18502 \family typewriter
18503 char
18504 \family default
18505
18506 \begin_inset Quotes erd
18507 \end_inset
18508
18509  doesn't match the number of 
18510 \begin_inset Quotes eld
18511 \end_inset
18512
18513
18514 \family typewriter
18515 char
18516 \family default
18517
18518 \begin_inset Quotes erd
18519 \end_inset
18520
18521 .
18522 \end_layout
18523
18524 \begin_layout Enumerate
18525
18526 \size small
18527 You should use either 
18528 \family typewriter
18529
18530 \begin_inset Quotes eld
18531 \end_inset
18532
18533
18534 \family default
18535  or 
18536 \family typewriter
18537
18538 \begin_inset Quotes erd
18539 \end_inset
18540
18541
18542 \family default
18543  as an alternative to 
18544 \begin_inset Quotes eld
18545 \end_inset
18546
18547
18548 \family typewriter
18549 "
18550 \family default
18551
18552 \begin_inset Quotes erd
18553 \end_inset
18554
18555 .
18556 \end_layout
18557
18558 \begin_layout Enumerate
18559
18560 \size small
18561 You should use "
18562 \family typewriter
18563 '
18564 \family default
18565 " (ASCII 39) instead of "
18566 \family typewriter
18567 ´
18568 \family default
18569 " (ASCII 180).
18570 \end_layout
18571
18572 \begin_layout Enumerate
18573
18574 \size small
18575 User-specified pattern found.
18576 \end_layout
18577
18578 \begin_layout Enumerate
18579
18580 \size small
18581 This command might not be intended.
18582 \end_layout
18583
18584 \begin_layout Enumerate
18585
18586 \size small
18587 \emph on
18588 Comment displayed.
18589 \end_layout
18590
18591 \begin_layout Enumerate
18592
18593 \size small
18594 Either 
18595 \family typewriter
18596 ''
18597 \backslash
18598 ,'
18599 \family default
18600  or 
18601 \family typewriter
18602 '
18603 \backslash
18604 ,''
18605 \family default
18606  will look better.
18607 \end_layout
18608
18609 \begin_layout Enumerate
18610
18611 \size small
18612 Delete this space to maintain correct page references.
18613 \end_layout
18614
18615 \begin_layout Enumerate
18616
18617 \size small
18618 \emph on
18619 You might wish to put this between a pair of 
18620 \begin_inset Quotes eld
18621 \end_inset
18622
18623
18624 \family typewriter
18625 {}
18626 \family default
18627
18628 \begin_inset Quotes erd
18629 \end_inset
18630
18631 .
18632 \end_layout
18633
18634 \begin_layout Enumerate
18635
18636 \size small
18637 You ought to remove spaces in front of punctuation.
18638 \end_layout
18639
18640 \begin_layout Enumerate
18641
18642 \size small
18643 Could not execute LaTeX command.
18644 \end_layout
18645
18646 \begin_layout Enumerate
18647
18648 \size small
18649 Don't use 
18650 \family typewriter
18651
18652 \backslash
18653 /
18654 \family default
18655  in front of small punctuation.
18656 \end_layout
18657
18658 \begin_layout Enumerate
18659
18660 \family typewriter
18661 \size small
18662 $
18663 \backslash
18664 times$
18665 \family default
18666  may look prettier here.
18667 \end_layout
18668
18669 \begin_layout Enumerate
18670
18671 \size small
18672 \emph on
18673 Multiple spaces detected in output.
18674 \end_layout
18675
18676 \begin_layout Enumerate
18677
18678 \size small
18679 This text may be ignored.
18680 \end_layout
18681
18682 \begin_layout Enumerate
18683
18684 \size small
18685 Use 
18686 \family typewriter
18687
18688 \begin_inset Quotes eld
18689 \end_inset
18690
18691
18692 \family default
18693  to begin quotation, not 
18694 \family typewriter
18695 '
18696 \family default
18697 .
18698 \end_layout
18699
18700 \begin_layout Enumerate
18701
18702 \size small
18703 Use 
18704 \family typewriter
18705 '
18706 \family default
18707  to end quotation, not 
18708 \family typewriter
18709
18710 \begin_inset Quotes eld
18711 \end_inset
18712
18713
18714 \family default
18715 .
18716 \end_layout
18717
18718 \begin_layout Enumerate
18719
18720 \size small
18721 Don't mix quotes.
18722 \end_layout
18723
18724 \begin_layout Enumerate
18725
18726 \size small
18727 You should perhaps use 
18728 \begin_inset Quotes eld
18729 \end_inset
18730
18731
18732 \family typewriter
18733 cmd
18734 \family default
18735
18736 \begin_inset Quotes erd
18737 \end_inset
18738
18739  instead.
18740 \end_layout
18741
18742 \begin_layout Enumerate
18743
18744 \size small
18745 You should put a space in front of/after parenthesis.
18746 \end_layout
18747
18748 \begin_layout Enumerate
18749
18750 \size small
18751 You should avoid spaces in front of/after parenthesis.
18752 \end_layout
18753
18754 \begin_layout Enumerate
18755
18756 \size small
18757 \emph on
18758 You should not use punctuation in front of/after quotes.
18759 \end_layout
18760
18761 \begin_layout Enumerate
18762
18763 \size small
18764 Double space found.
18765 \end_layout
18766
18767 \begin_layout Enumerate
18768
18769 \size small
18770 You should put punctuation outside inner/inside display math mode.
18771 \end_layout
18772
18773 \begin_layout Enumerate
18774
18775 \size small
18776 You ought to not use primitive TeX in LaTeX code.
18777 \end_layout
18778
18779 \begin_layout Enumerate
18780
18781 \size small
18782 You should remove spaces in front of 
18783 \begin_inset Quotes eld
18784 \end_inset
18785
18786
18787 \family typewriter
18788 %s
18789 \family default
18790
18791 \begin_inset Quotes erd
18792 \end_inset
18793
18794
18795 \end_layout
18796
18797 \begin_layout Enumerate
18798
18799 \size small
18800 \begin_inset Quotes eld
18801 \end_inset
18802
18803
18804 \family typewriter
18805 %s
18806 \family default
18807
18808 \begin_inset Quotes erd
18809 \end_inset
18810
18811  is normally not followed by 
18812 \begin_inset Quotes eld
18813 \end_inset
18814
18815
18816 \family typewriter
18817 %c
18818 \family default
18819
18820 \begin_inset Quotes erd
18821 \end_inset
18822
18823 .
18824 \end_layout
18825
18826 \begin_layout Standard
18827 In later versions of LyX, we hope to provide a more complete interface to
18828  this tool (and it's smaller cousin 
18829 \family typewriter
18830 lacheck
18831 \family default
18832 ) to exploit the full power of it.
18833  But it's not exactly useless as it is now: go try it on one of your existing
18834  documents of a certain length and be surprised.
18835 \end_layout
18836
18837 \begin_layout Section
18838 Version Control in LyX
18839 \end_layout
18840
18841 \begin_layout Standard
18842 by
18843 \noun on
18844  Lars Gullik Bjønnes 
18845 \noun default
18846 and 
18847 \noun on
18848 Pavel Sanda
18849 \end_layout
18850
18851 \begin_layout Subsection
18852 Introduction
18853 \end_layout
18854
18855 \begin_layout Standard
18856 A friend of mine wanted to try LyX for a group project.
18857  When he didn't find support for version control or file locking, he dropped
18858  it.
18859  This angered me a bit, so I thought that I should at least make support
18860  for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18861  This has been done.
18862  LyX now supports some of the most basic RCS/CVS/SVN commands.
18863  If you need something a bit more sophisticated you will have to do that
18864  manually in a terminal.
18865 \end_layout
18866
18867 \begin_layout Standard
18868 Before you begin to use the version control features in LyX, you should
18869  be familiar with RCS/CVS/SVN usage before start using it under LyX.
18870  Also note that CVS support 
18871 \change_deleted 3 1288125350
18872 was
18873 \change_inserted 3 1288125359
18874 is not as good as
18875 \change_deleted 3 1288125367
18876  obsoloted by introducing
18877 \change_unchanged
18878  subversion support so we advice using SVN instead.
18879  Good place to start with Subversion is SVN Book
18880 \begin_inset Foot
18881 status open
18882
18883 \begin_layout Plain Layout
18884 \begin_inset CommandInset href
18885 LatexCommand href
18886 target "http://svnbook.red-bean.com/"
18887
18888 \end_inset
18889
18890
18891 \end_layout
18892
18893 \end_inset
18894
18895 .
18896  In case of RCS you should read 
18897 \begin_inset Quotes eld
18898 \end_inset
18899
18900 rcsintro
18901 \begin_inset Quotes erd
18902 \end_inset
18903
18904  (a man file, read it with 
18905 \family typewriter
18906 man rcsintro
18907 \family default
18908 ).
18909  This file describes all the basic features of RCS.
18910  You should especially notice the comment about a RCS directory, and the
18911  notion of a master RCS file (the file ending in 
18912 \family typewriter
18913 ,v
18914 \family default
18915 ).
18916 \end_layout
18917
18918 \begin_layout Standard
18919 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18920  package—no guarantees are made for older versions.
18921  Most of the log messages are not currently displayed after operations 
18922 \change_deleted 3 1288125419
18923 -
18924 \change_inserted 3 1288125419
18925
18926 \change_unchanged
18927  you can check them in Messages pane if unsure.
18928 \end_layout
18929
18930 \begin_layout Standard
18931 For introducing your own external commands consult vc-command in the manual
18932  of LyX functions.
18933 \end_layout
18934
18935 \begin_layout Subsection
18936 RCS commands in LyX
18937 \end_layout
18938
18939 \begin_layout Standard
18940 The following sections describe the RCS commands supported by LyX.
18941  You can find them in the 
18942 \family sans
18943 File\SpecialChar \menuseparator
18944 Version
18945 \begin_inset space ~
18946 \end_inset
18947
18948 Control
18949 \family default
18950  submenu.
18951  LyX was tested against RCS 5.7.
18952 \end_layout
18953
18954 \begin_layout Subsubsection
18955
18956 \family sans
18957 Register
18958 \end_layout
18959
18960 \begin_layout Standard
18961 If your document is not under revision control, this is the only item shown
18962  in the menu.
18963  And if it is under revision control, the 
18964 \family sans
18965 Register
18966 \family default
18967  item is not visible.
18968  
18969 \end_layout
18970
18971 \begin_layout Standard
18972 This command registers your document with RCS (unless you are under the
18973  directory managed by CVS)\SpecialChar \@.
18974  You are asked interactively to supply an initial
18975  description of the document.
18976  The document is now set in Read-Only mode and you have to 
18977 \family sans
18978 Check
18979 \begin_inset space ~
18980 \end_inset
18981
18982 Out
18983 \begin_inset space ~
18984 \end_inset
18985
18986 For
18987 \begin_inset space ~
18988 \end_inset
18989
18990 Edit
18991 \family default
18992 , before making any changes to it.
18993  A document under revision control has a 
18994 \begin_inset Quotes eld
18995 \end_inset
18996
18997 [RCS:<version> <locker>]
18998 \begin_inset Quotes erd
18999 \end_inset
19000
19001  item tagged to the filename in the minibuffer.
19002 \end_layout
19003
19004 \begin_layout Standard
19005 RCS command that is run: 
19006 \family typewriter
19007 ci -q -u -i -t-"<initial description>" <file-name>
19008 \end_layout
19009
19010 \begin_layout Standard
19011 Read 
19012 \family typewriter
19013 man ci
19014 \family default
19015  to understand the switches.
19016  
19017 \end_layout
19018
19019 \begin_layout Subsubsection
19020
19021 \family sans
19022 Check In Changes
19023 \end_layout
19024
19025 \begin_layout Standard
19026 When you are finished editing a file, you check in your changes.
19027  When you do this, you are asked for a description of the changes.
19028  This is stored in the history log.
19029  The version number is bumped, your changes are applied to the master RCS
19030  file, the document is unlocked and set to Read-Only mode.
19031  
19032 \end_layout
19033
19034 \begin_layout Standard
19035 RCS command: 
19036 \family typewriter
19037 ci -q -u -m"<description>" <file-name>
19038 \end_layout
19039
19040 \begin_layout Subsubsection
19041
19042 \family sans
19043 Check Out For Edit
19044 \end_layout
19045
19046 \begin_layout Standard
19047 By doing this you lock the document so that only you can edit it.
19048  This will also make the document Read-Write only for you.
19049  You will usually continue editing for a while and when you are finished
19050  you check in your changes.
19051  The status line is changed to reflect that you have locked the file.
19052  
19053 \end_layout
19054
19055 \begin_layout Standard
19056 RCS command: 
19057 \family typewriter
19058 co -q -l <file-name>
19059 \end_layout
19060
19061 \begin_layout Subsubsection
19062
19063 \family sans
19064 Revert To Repository Version
19065 \end_layout
19066
19067 \begin_layout Standard
19068 This will discard all changes made to the document since the last check
19069  in.
19070  You get a warning before changes are discarded.
19071 \end_layout
19072
19073 \begin_layout Standard
19074 RCS command: 
19075 \family typewriter
19076 co -f -u<version> <file-name>
19077 \end_layout
19078
19079 \begin_layout Subsubsection
19080
19081 \family sans
19082 Undo Last Checkin
19083 \end_layout
19084
19085 \begin_layout Standard
19086 This makes as if the last check in never happened.
19087  No changes are made to the document loaded into LyX, but the last version
19088  is removed from the master RCS file.
19089  
19090 \end_layout
19091
19092 \begin_layout Standard
19093 RCS command: 
19094 \family typewriter
19095 rcs -o<version> <file-name>
19096 \end_layout
19097
19098 \begin_layout Subsubsection
19099
19100 \family sans
19101 Show History
19102 \end_layout
19103
19104 \begin_layout Standard
19105 This shows the complete history of the RCS document.
19106  The output of 
19107 \family typewriter
19108 rlog <file-name>
19109 \family default
19110  is shown in a browser.
19111  See 
19112 \family typewriter
19113 man rlog
19114 \family default
19115  for more info.
19116 \end_layout
19117
19118 \begin_layout Subsubsection
19119 Revision info
19120 \end_layout
19121
19122 \begin_layout Standard
19123 LyX supports RCS version number information (only), see 
19124 \begin_inset CommandInset ref
19125 LatexCommand ref
19126 reference "sub:VCS-Revision-Information"
19127
19128 \end_inset
19129
19130  for details.
19131 \end_layout
19132
19133 \begin_layout Subsection
19134 CVS commands in LyX
19135 \end_layout
19136
19137 \begin_layout Standard
19138
19139 \change_inserted 3 1288247612
19140 A subset of 
19141 \change_unchanged
19142 CVS
19143 \change_inserted 3 1288247626
19144  operations
19145 \change_unchanged
19146  is 
19147 \change_deleted 3 1288243981
19148 now partially 
19149 \change_unchanged
19150 supported by LyX.
19151  You can find the commands in the 
19152 \family sans
19153 File\SpecialChar \menuseparator
19154 Version
19155 \begin_inset space ~
19156 \end_inset
19157
19158 Control
19159 \family default
19160  submenu.
19161  
19162 \change_inserted 3 1288244251
19163 The version control system SVN is more powerful
19164 \change_deleted 3 1288244024
19165 Focus of the development moved to SVN support
19166 \change_unchanged
19167 , so please use it instead of CVS if possible.
19168 \end_layout
19169
19170 \begin_layout Subsubsection
19171
19172 \change_inserted 3 1288247508
19173
19174 \family sans
19175 General CVS usage
19176 \end_layout
19177
19178 \begin_layout Standard
19179
19180 \change_inserted 3 1288250722
19181 If you start from scratch with CVS you have to create your repository and
19182  checkout the working copy with external tools.
19183  If you're using a client-server setup you may need to login before doing
19184  the first repository checkout.
19185 \end_layout
19186
19187 \begin_layout Standard
19188
19189 \change_inserted 3 1288334713
19190 If your documents are under revision control and others are using the same
19191  repository problems arise when different changes to the same document at
19192  the same location happen.
19193  Standard CVS repositories doesn't operate with a file locking mechanism.
19194  This may be surprising, but conflicts only occur if people disagree on
19195  the proper content of the same part of a document.
19196  So, if co-workers are used to communicate regularly, these conflicts occur
19197  rarely.
19198  If they don't communicate they have a fundamental problem anyway.
19199  Nevertheless some people like to work with so called 
19200 \begin_inset Quotes eld
19201 \end_inset
19202
19203 reserved checkouts
19204 \begin_inset Quotes erd
19205 \end_inset
19206
19207 .
19208  If they do so the working copy of all files is readonly when checked out
19209  first and the user starts editing after using a special command to make
19210  the working copy writable.
19211  When the changes are checked in the working copy returns to readonly state.
19212  With LyX one has to edit the 
19213 \begin_inset Flex Code
19214 status collapsed
19215
19216 \begin_layout Plain Layout
19217
19218 \change_inserted 3 1288249115
19219 .cvsrc
19220 \change_unchanged
19221
19222 \end_layout
19223
19224 \end_inset
19225
19226  file and add the line 
19227 \begin_inset Flex Code
19228 status collapsed
19229
19230 \begin_layout Plain Layout
19231
19232 \change_inserted 3 1288249133
19233 cvs -r
19234 \change_unchanged
19235
19236 \end_layout
19237
19238 \end_inset
19239
19240  to work with reserved checkouts.
19241  The benefit is the possibility to see who is using a writable copy of some
19242  document.
19243  It's not guaranteed only one user makes a copy writable.
19244 \end_layout
19245
19246 \begin_layout Standard
19247
19248 \change_inserted 3 1288335184
19249 LyX tries to guess if you're using reserved or non-reserved checkouts.
19250  If your working copy is readonly or it is writable and an additional copy
19251  of your document exists in the CVS/Base sub-directory a reserved otherwise
19252  a non-reserved checkout is assumed.
19253  When a reserved checkout is detected you have to use 
19254 \begin_inset Flex MenuItem
19255 status collapsed
19256
19257 \begin_layout Plain Layout
19258
19259 \change_inserted 3 1288250009
19260 Check Out
19261 \change_unchanged
19262
19263 \end_layout
19264
19265 \end_inset
19266
19267  to make your working copy writable if it's readonly.
19268  After doing so the 
19269 \begin_inset Flex MenuItem
19270 status collapsed
19271
19272 \begin_layout Plain Layout
19273
19274 \change_inserted 3 1288250087
19275 Check In
19276 \change_unchanged
19277
19278 \end_layout
19279
19280 \end_inset
19281
19282  operation is possible and that makes your working copy readonly again after
19283  transferring your changes to the repository.
19284 \change_unchanged
19285
19286 \end_layout
19287
19288 \begin_layout Standard
19289
19290 \change_inserted 3 1288334864
19291 More information about CVS can be found here 
19292 \begin_inset Flex URL
19293 status collapsed
19294
19295 \begin_layout Plain Layout
19296
19297 \change_inserted 3 1288247651
19298
19299 http://www.nongnu.org/cvs
19300 \end_layout
19301
19302 \end_inset
19303
19304  and here 
19305 \begin_inset Flex URL
19306 status collapsed
19307
19308 \begin_layout Plain Layout
19309
19310 \change_inserted 3 1288249216
19311
19312 http://ximbiot.com/cvs
19313 \change_unchanged
19314
19315 \end_layout
19316
19317 \end_inset
19318
19319 .
19320 \end_layout
19321
19322 \begin_layout Standard
19323
19324 \change_inserted 3 1288334912
19325 Read 
19326 \family typewriter
19327 man cvs
19328 \family default
19329  to understand the sub-commands and the switches mentioned below.
19330 \end_layout
19331
19332 \begin_layout Subsubsection
19333
19334 \family sans
19335 Register
19336 \end_layout
19337
19338 \begin_layout Standard
19339 If your document is not under revision control, this is the only item shown
19340  in the menu.
19341  And if it is under revision control, the 
19342 \family sans
19343 \bar under
19344 R
19345 \bar default
19346 egister
19347 \family default
19348  item is not visible.
19349  
19350 \end_layout
19351
19352 \begin_layout Standard
19353 This command registers in CVS your document 
19354 \change_deleted 3 1288340087
19355 ONLY
19356 \change_inserted 3 1288340119
19357
19358 \emph on
19359
19360 \begin_inset Flex Strong
19361 status collapsed
19362
19363 \begin_layout Plain Layout
19364
19365 \change_inserted 3 1288340119
19366
19367 \emph on
19368 only
19369 \change_unchanged
19370
19371 \end_layout
19372
19373 \end_inset
19374
19375
19376 \change_unchanged
19377
19378 \emph default
19379  in case you have already the documents directory under CVS control (in
19380  particular 
19381 \family typewriter
19382 CVS/Entries
19383 \family default
19384  file exists).
19385  This means you have to 
19386 \change_inserted 3 1288244315
19387 create or 
19388 \change_unchanged
19389 checkout the archive by yourself
19390 \change_inserted 3 1288250891
19391  using external tools
19392 \change_unchanged
19393 .
19394  
19395 \change_inserted 3 1288340303
19396 (In case you forget that step LyX registers the document with RCS.)
19397 \change_unchanged
19398
19399 \end_layout
19400
19401 \begin_layout Standard
19402 Then you are asked interactively to supply an initial description of the
19403  document.
19404  Don't forget that registered file is not yet 
19405 \change_deleted 3 1288335206
19406 commited
19407 \change_inserted 3 1288335207
19408 checked in
19409 \change_unchanged
19410 .
19411 \end_layout
19412
19413 \begin_layout Standard
19414 CVS command that is run: 
19415 \family typewriter
19416 cvs -q add -m
19417 \change_deleted 3 1288125821
19418
19419 \begin_inset Quotes erd
19420 \end_inset
19421
19422
19423 \change_inserted 3 1288125838
19424 "
19425 \change_unchanged
19426 <entered message>" 
19427 \change_deleted 3 1288125821
19428
19429 \begin_inset Quotes eld
19430 \end_inset
19431
19432
19433 \change_inserted 3 1288125844
19434 "
19435 \change_unchanged
19436 <file-name>
19437 \change_deleted 3 1288125847
19438
19439 \begin_inset Quotes erd
19440 \end_inset
19441
19442
19443 \change_inserted 3 1288125847
19444 "
19445 \change_unchanged
19446
19447 \end_layout
19448
19449 \begin_layout Standard
19450
19451 \change_deleted 3 1288334858
19452 Read 
19453 \family typewriter
19454 man svn
19455 \family default
19456  to understand the switches.
19457 \change_inserted 3 1288333847
19458
19459 \end_layout
19460
19461 \begin_layout Standard
19462
19463 \change_inserted 3 1288334097
19464 The term 
19465 \family typewriter
19466 "<file-name>"
19467 \family default
19468  above and for all other CVS commands is an abbreviation for 
19469 \begin_inset Quotes eld
19470 \end_inset
19471
19472 change the current working directory to file location and use the file name
19473  without path component as argument
19474 \begin_inset Quotes erd
19475 \end_inset
19476
19477 .
19478
19479 \change_deleted 3 1288333847
19480  
19481 \change_unchanged
19482
19483 \end_layout
19484
19485 \begin_layout Subsubsection
19486
19487 \family sans
19488 Check In Changes
19489 \end_layout
19490
19491 \begin_layout Standard
19492 When you are finished editing a file, you commit your changes.
19493  When you do this
19494 \change_inserted 3 1288250244
19495  and you had changed the document
19496 \change_unchanged
19497 , you are asked for a description of the changes.
19498  After that changes are 
19499 \change_deleted 3 1288335277
19500 commited
19501 \change_inserted 3 1288335294
19502 written to the repository
19503 \change_unchanged
19504 .
19505
19506 \change_inserted 3 1288339925
19507  In case you didn't change the document and a reserved checkout is detected
19508  the reservation made on 
19509 \begin_inset Flex MenuItem
19510 status collapsed
19511
19512 \begin_layout Plain Layout
19513
19514 \change_inserted 3 1288250359
19515 Check Out
19516 \change_unchanged
19517
19518 \end_layout
19519
19520 \end_inset
19521
19522  is undone.
19523 \change_unchanged
19524
19525 \end_layout
19526
19527 \begin_layout Labeling
19528 \labelwidthstring 00.00.0000
19529
19530 \change_inserted 3 1288250487
19531 CVS
19532 \begin_inset space ~
19533 \end_inset
19534
19535 command: 
19536 \begin_inset space ~
19537 \end_inset
19538
19539
19540 \begin_inset Newline newline
19541 \end_inset
19542
19543
19544 \begin_inset Flex Code
19545 status collapsed
19546
19547 \begin_layout Plain Layout
19548
19549 \change_inserted 3 1288250469
19550 cvs 
19551 \family typewriter
19552 -q commit -m"<description>" "<file-name>"
19553 \end_layout
19554
19555 \end_inset
19556
19557  or
19558 \begin_inset Newline newline
19559 \end_inset
19560
19561
19562 \begin_inset Flex Code
19563 status collapsed
19564
19565 \begin_layout Plain Layout
19566
19567 \change_inserted 3 1288250960
19568 cvs -q unedit 
19569 \family typewriter
19570 "<file-name>"
19571 \change_unchanged
19572
19573 \end_layout
19574
19575 \end_inset
19576
19577
19578 \change_deleted 3 1288250529
19579 CVS command: 
19580 \family typewriter
19581 cvs -q commit -m"<description>" "<file-name>"
19582 \change_unchanged
19583
19584 \end_layout
19585
19586 \begin_layout Subsubsection
19587
19588 \change_inserted 3 1288246619
19589
19590 \family sans
19591 Check Out Changes
19592 \end_layout
19593
19594 \begin_layout Standard
19595
19596 \change_inserted 3 1288249364
19597 When you are sharing a repository with others, you may have to incorporate
19598  their changes into your working copy.
19599 \end_layout
19600
19601 \begin_layout Standard
19602
19603 \change_inserted 3 1288250585
19604 CVS command: 
19605 \family typewriter
19606 cvs -q update "<file-name>"
19607 \end_layout
19608
19609 \begin_layout Standard
19610
19611 \change_inserted 3 1288334180
19612 If a readonly checkout is detected the working copy is made writable and
19613  reserved.
19614 \end_layout
19615
19616 \begin_layout Standard
19617
19618 \change_inserted 3 1288250685
19619 CVS command: 
19620 \family typewriter
19621 cvs -q edit "<file-name>"
19622 \end_layout
19623
19624 \begin_layout Subsubsection
19625
19626 \family sans
19627 Revert To Repository Version
19628 \end_layout
19629
19630 \begin_layout Standard
19631 This will discard all changes made to the document since the last check
19632  in.
19633  You get a warning before changes are discarded.
19634  Firstly the file is deleted, secondly CVS update command is run.
19635 \end_layout
19636
19637 \begin_layout Standard
19638 CVS command: 
19639 \family typewriter
19640 cvs 
19641 \change_inserted 3 1288246762
19642 -q 
19643 \change_unchanged
19644 update 
19645 \change_deleted 3 1288125856
19646
19647 \begin_inset Quotes eld
19648 \end_inset
19649
19650
19651 \change_inserted 3 1288125856
19652 "
19653 \change_unchanged
19654 <file-name>
19655 \change_deleted 3 1288125856
19656
19657 \begin_inset Quotes erd
19658 \end_inset
19659
19660
19661 \change_inserted 3 1288251381
19662 "
19663 \end_layout
19664
19665 \begin_layout Standard
19666
19667 \change_inserted 3 1288334211
19668 If a reserved checkout is detected and the working copy has no changes only
19669  the reservation is undone.
19670 \end_layout
19671
19672 \begin_layout Standard
19673
19674 \change_inserted 3 1288251440
19675 CVS command: 
19676 \family typewriter
19677 cvs -q unedit "<file-name>"
19678 \change_unchanged
19679
19680 \end_layout
19681
19682 \begin_layout Subsubsection
19683
19684 \change_inserted 3 1288126016
19685 Update of the local directory checkout from repository
19686 \end_layout
19687
19688 \begin_layout Standard
19689
19690 \change_inserted 3 1288339359
19691 Once your documents gets more complex, containing sub-documents and pictures,
19692  including external 
19693 \begin_inset Flex Code
19694 status collapsed
19695
19696 \begin_layout Plain Layout
19697
19698 \change_inserted 3 1288126016
19699 .tex
19700 \end_layout
19701
19702 \end_inset
19703
19704  files and so on using version control becomes more complicated.
19705  LyX supports updating the whole tree in which resides the document.
19706  This become especially useful once you cooperate with people which neither
19707  have detailed knowledge about CVS usage nor they have ambition to commit
19708  additional material to the repository.
19709  You have to organize the files structure so that all external files are
19710  in the same directory or subdirectories of the document.
19711  It's good practice anyway to store multipart documents in an extra directory.
19712 \change_unchanged
19713
19714 \end_layout
19715
19716 \begin_layout Standard
19717
19718 \change_inserted 3 1288341358
19719 The 
19720 \begin_inset Flex Code
19721 status collapsed
19722
19723 \begin_layout Plain Layout
19724
19725 \change_inserted 3 1288126016
19726 Update local directory from repository
19727 \end_layout
19728
19729 \end_inset
19730
19731  command updates the whole directory.
19732  If local changes are detected user is warned before update starts.
19733  In case of merge conflicts both versions of the conflicting document parts
19734  are placed in the final document.
19735  You have to review and correct the result of the merge.
19736  You'll find the conflicts enclosed in pairs of 
19737 \begin_inset Flex Code
19738 status collapsed
19739
19740 \begin_layout Plain Layout
19741
19742 \change_inserted 3 1288341002
19743 <<<<<<<
19744 \change_unchanged
19745
19746 \end_layout
19747
19748 \end_inset
19749
19750  and 
19751 \begin_inset Flex Code
19752 status collapsed
19753
19754 \begin_layout Plain Layout
19755
19756 \change_inserted 3 1288340987
19757 >>>>>>>
19758 \change_unchanged
19759
19760 \end_layout
19761
19762 \end_inset
19763
19764  separated by 
19765 \begin_inset Flex Code
19766 status collapsed
19767
19768 \begin_layout Plain Layout
19769
19770 \change_inserted 3 1288341043
19771 =======
19772 \change_unchanged
19773
19774 \end_layout
19775
19776 \end_inset
19777
19778 .
19779  The first part is your version as before the update operation with the
19780  document name prepended.
19781  The second one is the repository version with the version number after
19782  the sequence of 
19783 \begin_inset Flex Code
19784 status collapsed
19785
19786 \begin_layout Plain Layout
19787
19788 \change_inserted 3 1288341281
19789 >
19790 \change_unchanged
19791
19792 \end_layout
19793
19794 \end_inset
19795
19796  signs.
19797 \change_unchanged
19798
19799 \end_layout
19800
19801 \begin_layout Labeling
19802 \labelwidthstring 00.00.0000
19803
19804 \change_inserted 3 1288340598
19805 CVS
19806 \begin_inset space ~
19807 \end_inset
19808
19809 commands: 
19810 \begin_inset space ~
19811 \end_inset
19812
19813
19814 \begin_inset Newline newline
19815 \end_inset
19816
19817
19818 \begin_inset Flex Code
19819 status collapsed
19820
19821 \begin_layout Plain Layout
19822
19823 \change_inserted 3 1288334066
19824 cd $path; cvs diff 
19825 \family typewriter
19826 "."
19827 \change_unchanged
19828
19829 \end_layout
19830
19831 \end_inset
19832
19833  (Ask if changes are detected.)
19834 \begin_inset Newline newline
19835 \end_inset
19836
19837
19838 \begin_inset Flex Code
19839 status collapsed
19840
19841 \begin_layout Plain Layout
19842
19843 \change_inserted 3 1288334063
19844 cd $path; cvs -q update 
19845 \family typewriter
19846 "."
19847 \change_unchanged
19848
19849 \end_layout
19850
19851 \end_inset
19852
19853
19854 \end_layout
19855
19856 \begin_layout Standard
19857
19858 \change_inserted 3 1288126016
19859 where 
19860 \begin_inset Flex Code
19861 status collapsed
19862
19863 \begin_layout Plain Layout
19864
19865 \change_inserted 3 1288126016
19866 $path
19867 \end_layout
19868
19869 \end_inset
19870
19871  stands for the path to the document.
19872 \end_layout
19873
19874 \begin_layout Subsubsection
19875
19876 \family sans
19877 Show History
19878 \end_layout
19879
19880 \begin_layout Standard
19881 This shows the complete history of the CVS document.
19882  The output of 
19883 \family typewriter
19884 cvs log 
19885 \change_deleted 3 1288125861
19886
19887 \begin_inset Quotes eld
19888 \end_inset
19889
19890
19891 \change_inserted 3 1288125861
19892 "
19893 \change_unchanged
19894 <file-name>
19895 \change_deleted 3 1288125864
19896
19897 \begin_inset Quotes erd
19898 \end_inset
19899
19900
19901 \change_inserted 3 1288125864
19902 "
19903 \change_unchanged
19904
19905 \family default
19906  is shown in a browser.
19907 \end_layout
19908
19909 \begin_layout Subsection
19910 SVN commands in LyX
19911 \end_layout
19912
19913 \begin_layout Standard
19914 SVN is now partially supported by LyX.
19915  You can find the commands in the 
19916 \family sans
19917 File\SpecialChar \menuseparator
19918 Version
19919 \begin_inset space ~
19920 \end_inset
19921
19922 Control
19923 \family default
19924  submenu.
19925  Please note that if you use password protected access to repository via
19926  ssh, you will be asked in terminal window.
19927  LyX was tested against SVN 1.5 and 1.6
19928 \begin_inset Foot
19929 status open
19930
19931 \begin_layout Plain Layout
19932 Most of the commands will work with 1.4 too, see 
19933 \begin_inset CommandInset ref
19934 LatexCommand ref
19935 reference "sub:SVN-Repo-Update"
19936
19937 \end_inset
19938
19939 .
19940 \end_layout
19941
19942 \end_inset
19943
19944
19945 \end_layout
19946
19947 \begin_layout Subsubsection
19948
19949 \family sans
19950 Register
19951 \end_layout
19952
19953 \begin_layout Standard
19954 If your document is not under revision control, this is the only item shown
19955  in the menu.
19956  And if it is under revision control, the 
19957 \family sans
19958 \bar under
19959 R
19960 \bar default
19961 egister
19962 \family default
19963  item is not visible.
19964  
19965 \end_layout
19966
19967 \begin_layout Standard
19968 This command registers in SVN your document ONLY in case you have already
19969  the documents directory under SVN control (in particular 
19970 \family typewriter
19971 .svn/entries
19972 \family default
19973  file exists).
19974  This means you have to checkout the archive by yourself.
19975  
19976 \end_layout
19977
19978 \begin_layout Standard
19979 Then you are asked interactively to supply an initial description of the
19980  document.
19981  Don't forget that registered file is not yet commited.
19982 \end_layout
19983
19984 \begin_layout Standard
19985 SVN command that is run: 
19986 \family typewriter
19987 svn add -q 
19988 \begin_inset Quotes eld
19989 \end_inset
19990
19991 <file-name>
19992 \begin_inset Quotes erd
19993 \end_inset
19994
19995
19996 \end_layout
19997
19998 \begin_layout Standard
19999 Read 
20000 \family typewriter
20001 man svn
20002 \family default
20003  to understand the switches.
20004  
20005 \end_layout
20006
20007 \begin_layout Subsubsection
20008
20009 \family sans
20010 Check In Changes
20011 \end_layout
20012
20013 \begin_layout Standard
20014 When you are finished editing a file, you commit your changes.
20015  When you do this, you are asked for a description of the changes.
20016  After that changes are commited.
20017 \end_layout
20018
20019 \begin_layout Standard
20020 SVN command:
20021 \begin_inset Foot
20022 status collapsed
20023
20024 \begin_layout Plain Layout
20025 In case locking is not enabled.
20026  See Section 
20027 \begin_inset CommandInset ref
20028 LatexCommand ref
20029 reference "subsec:SVN-File-Locking"
20030
20031 \end_inset
20032
20033 .
20034 \end_layout
20035
20036 \end_inset
20037
20038  
20039 \family typewriter
20040 svn commit -q -m"<description>" <file-name>
20041 \end_layout
20042
20043 \begin_layout Subsubsection
20044
20045 \family sans
20046 Check Out For Edit
20047 \end_layout
20048
20049 \begin_layout Standard
20050 Updates the changes of this file from the repository.
20051  Be sure you understand SVN merging and conflicts resolving before using
20052  this function, because all conflicts has to be resolved manually by you!
20053 \end_layout
20054
20055 \begin_layout Standard
20056 SVN command:
20057 \begin_inset Foot
20058 status collapsed
20059
20060 \begin_layout Plain Layout
20061 Ditto.
20062 \end_layout
20063
20064 \end_inset
20065
20066  
20067 \family typewriter
20068 svn update --non-interactive 
20069 \begin_inset Quotes eld
20070 \end_inset
20071
20072 <file-name>
20073 \begin_inset Quotes erd
20074 \end_inset
20075
20076
20077 \end_layout
20078
20079 \begin_layout Subsubsection
20080
20081 \family sans
20082 Revert To Repository Version
20083 \end_layout
20084
20085 \begin_layout Standard
20086 This will discard all changes made to the document since the last check
20087  in.
20088  You get a warning before changes are discarded.
20089  
20090 \end_layout
20091
20092 \begin_layout Standard
20093 SVN command: 
20094 \family typewriter
20095 svn revert -q 
20096 \begin_inset Quotes eld
20097 \end_inset
20098
20099 <file-name>
20100 \begin_inset Quotes erd
20101 \end_inset
20102
20103
20104 \end_layout
20105
20106 \begin_layout Subsubsection
20107 \begin_inset CommandInset label
20108 LatexCommand label
20109 name "sub:SVN-Repo-Update"
20110
20111 \end_inset
20112
20113 Update of the local directory checkout from repository
20114 \begin_inset Foot
20115 status collapsed
20116
20117 \begin_layout Plain Layout
20118 Note that this command will work only with subversion 
20119 \begin_inset Formula $\geqq1.5$
20120 \end_inset
20121
20122
20123 \end_layout
20124
20125 \end_inset
20126
20127
20128 \end_layout
20129
20130 \begin_layout Standard
20131 All the commands above have one shortcomming - they deal with the current
20132  document only.
20133  Once your document contains pictures, includes external 
20134 \begin_inset Flex Code
20135 status collapsed
20136
20137 \begin_layout Plain Layout
20138 .tex
20139 \end_layout
20140
20141 \end_inset
20142
20143  files and so on administration becomes more complicated.
20144  LyX now supports updating the whole tree in which resides the document
20145 \begin_inset Foot
20146 status collapsed
20147
20148 \begin_layout Plain Layout
20149 One need to organize the files structure so that all external files are
20150  in the same directory or subdirectories of the document.
20151  
20152 \end_layout
20153
20154 \end_inset
20155
20156 .
20157  This become especially useful once you cooperate with people which neither
20158  know about subversion management nor they have ambition to commit additional
20159  material to the repository.
20160  
20161 \end_layout
20162
20163 \begin_layout Standard
20164 \begin_inset Flex Code
20165 status collapsed
20166
20167 \begin_layout Plain Layout
20168 Update local directory from repository
20169 \end_layout
20170
20171 \end_inset
20172
20173  command updates the whole directory and in case of merge conflicts local
20174  version of the files are left, so no unintended data loss occurs.
20175  If local changes are detected user is warned before update starts.
20176 \end_layout
20177
20178 \begin_layout Labeling
20179 \labelwidthstring 00.00.0000
20180 SVN
20181 \begin_inset space ~
20182 \end_inset
20183
20184 commands: 
20185 \begin_inset space ~
20186 \end_inset
20187
20188
20189 \begin_inset Newline newline
20190 \end_inset
20191
20192
20193 \begin_inset Flex Code
20194 status collapsed
20195
20196 \begin_layout Plain Layout
20197 svn diff $path
20198 \end_layout
20199
20200 \end_inset
20201
20202  (Ask if changes are detected.)
20203 \begin_inset Newline newline
20204 \end_inset
20205
20206
20207 \begin_inset Flex Code
20208 status collapsed
20209
20210 \begin_layout Plain Layout
20211 svn update --accept mine-full $path
20212 \end_layout
20213
20214 \end_inset
20215
20216
20217 \end_layout
20218
20219 \begin_layout Standard
20220 where 
20221 \begin_inset Flex Code
20222 status collapsed
20223
20224 \begin_layout Plain Layout
20225 $path
20226 \end_layout
20227
20228 \end_inset
20229
20230  stands for the path to the document.
20231 \end_layout
20232
20233 \begin_layout Subsubsection
20234
20235 \family sans
20236 Show History
20237 \end_layout
20238
20239 \begin_layout Standard
20240 This shows the complete history of the SVN document.
20241  The output of 
20242 \family typewriter
20243 svn log 
20244 \begin_inset Quotes eld
20245 \end_inset
20246
20247 <file-name>
20248 \begin_inset Quotes erd
20249 \end_inset
20250
20251
20252 \family default
20253  is shown in a browser.
20254 \end_layout
20255
20256 \begin_layout Subsubsection
20257 File Locking
20258 \begin_inset CommandInset label
20259 LatexCommand label
20260 name "subsec:SVN-File-Locking"
20261
20262 \end_inset
20263
20264
20265 \end_layout
20266
20267 \begin_layout Standard
20268 The file exchange through various revision control systems brings the problem
20269  of merge conflicts in case two different users try to edit the same (parts
20270  of) document.
20271  When such a conflict happens it needs manual resolving and one reasonable
20272  alternative is to provide some kind of locking mechanism, which guarantees
20273  that only one user is allowed to edit file at the given time.
20274 \end_layout
20275
20276 \begin_layout Standard
20277 SVN has two such mechanisms to provide mutual exclusivity for file access
20278  - locks and automatic setting of write permissions (see sec.
20279  
20280 \begin_inset CommandInset ref
20281 LatexCommand ref
20282 reference "subsec:Automatical-Locking-Property"
20283
20284 \end_inset
20285
20286 ) based on 
20287 \begin_inset Flex Code
20288 status collapsed
20289
20290 \begin_layout Plain Layout
20291 svn:needs-lock
20292 \end_layout
20293
20294 \end_inset
20295
20296  file svn property
20297 \begin_inset Foot
20298 status open
20299
20300 \begin_layout Plain Layout
20301 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20302 \end_layout
20303
20304 \end_inset
20305
20306 .
20307  If this property is detected for a given document LyX starts to use SVN
20308  locks for document editing automatically and the whole check-in/out mechanism
20309  switches to the same regimen as for RCS.
20310  This in particular means there are two different modes of file use in LyX:
20311 \end_layout
20312
20313 \begin_layout Itemize
20314 Unlocked state.
20315  The loaded file is in the read-only mode.
20316  For editing on needs to check-out.
20317  
20318 \emph on
20319 Check-out
20320 \emph default
20321  consists of updating from the repository and gaining write lock.
20322  If the lock is not possible to obtain, we remain in unlocked state.
20323 \end_layout
20324
20325 \begin_layout Itemize
20326 Locked state.
20327  The loaded file is in the 'normal' edit mode.
20328  No other user is allowed to edit the file.
20329  
20330 \emph on
20331 Check-in
20332 \emph default
20333  consists of commiting changes and releasing write-lock.
20334  If no changes have been made to the document, no commit will be produced
20335 \begin_inset Foot
20336 status collapsed
20337
20338 \begin_layout Plain Layout
20339 Don't be puzzled by the fact that you will be asked for commit message anyway.
20340 \end_layout
20341
20342 \end_inset
20343
20344  and only the write-lock will be released.
20345 \end_layout
20346
20347 \begin_layout Standard
20348 SVN commands:
20349 \end_layout
20350
20351 \begin_layout Labeling
20352 \labelwidthstring 00.00.0000
20353 Check-in:
20354 \family typewriter
20355  svn commit -q -m"<description>" "<file-name>"
20356 \begin_inset Newline newline
20357 \end_inset
20358
20359 svn unlock "<file-name>"
20360 \end_layout
20361
20362 \begin_layout Labeling
20363 \labelwidthstring 00.00.0000
20364 Check-out: 
20365 \family typewriter
20366 svn update "<file-name>"
20367 \begin_inset Newline newline
20368 \end_inset
20369
20370 svn lock "<file-name>"
20371 \end_layout
20372
20373 \begin_layout Subsubsection
20374
20375 \family typewriter
20376 \begin_inset CommandInset label
20377 LatexCommand label
20378 name "subsec:Automatical-Locking-Property"
20379
20380 \end_inset
20381
20382
20383 \family default
20384 Automatic Locking Property
20385 \end_layout
20386
20387 \begin_layout Standard
20388 The above mentioned automatic setting of write permissions of the .lyx file
20389  can be set through
20390 \family sans
20391 \bar under
20392  F
20393 \bar default
20394 ile\SpecialChar \menuseparator
20395
20396 \bar under
20397 V
20398 \bar default
20399 ersion
20400 \begin_inset space ~
20401 \end_inset
20402
20403 Control\SpecialChar \menuseparator
20404
20405 \bar under
20406 T
20407 \bar default
20408 oggle locking property
20409 \family default
20410 .
20411  This command is active only when the file is not locked on the svn server
20412  (i.e.
20413  you need to check-out before proceeding).
20414 \end_layout
20415
20416 \begin_layout Labeling
20417 \labelwidthstring 00.00.0000
20418 SVN
20419 \begin_inset space ~
20420 \end_inset
20421
20422 commands:
20423 \end_layout
20424
20425 \begin_layout Labeling
20426 \labelwidthstring 00.00.0000
20427 Set:
20428 \family typewriter
20429  svn propset svn:needs-lock ON "<file-name>"
20430 \end_layout
20431
20432 \begin_layout Labeling
20433 \labelwidthstring 00.00.0000
20434 Unset: 
20435 \family typewriter
20436 svn propdel svn:needs-lock "<file-name>"
20437 \end_layout
20438
20439 \begin_layout Subsubsection
20440 \begin_inset CommandInset label
20441 LatexCommand label
20442 name "sub:VCS-Revision-Information"
20443
20444 \end_inset
20445
20446 Revision Information in Documents
20447 \end_layout
20448
20449 \begin_layout Standard
20450 There are more possibilities how to activate revision information in our
20451  document.
20452 \end_layout
20453
20454 \begin_layout Itemize
20455 LyX supports directly:
20456 \end_layout
20457
20458 \begin_deeper
20459 \begin_layout Itemize
20460 tree revision information (
20461 \begin_inset Flex Code
20462 status collapsed
20463
20464 \begin_layout Plain Layout
20465 vcs-tree-revision
20466 \end_layout
20467
20468 \end_inset
20469
20470 ).
20471  The result is the output of the 
20472 \begin_inset Flex Code
20473 status collapsed
20474
20475 \begin_layout Plain Layout
20476 svnversion
20477 \end_layout
20478
20479 \end_inset
20480
20481  command, the following table gives you an idea, how to read the results.
20482 \end_layout
20483
20484 \begin_layout Standard
20485 \align center
20486 \begin_inset Tabular
20487 <lyxtabular version="3" rows="6" columns="2">
20488 <features tabularvalignment="middle">
20489 <column alignment="center" valignment="top" width="0">
20490 <column alignment="center" valignment="top" width="0">
20491 <row>
20492 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20493 \begin_inset Text
20494
20495 \begin_layout Plain Layout
20496 Output
20497 \end_layout
20498
20499 \end_inset
20500 </cell>
20501 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20502 \begin_inset Text
20503
20504 \begin_layout Plain Layout
20505 Meaning
20506 \end_layout
20507
20508 \end_inset
20509 </cell>
20510 </row>
20511 <row>
20512 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20513 \begin_inset Text
20514
20515 \begin_layout Plain Layout
20516 4123:4168
20517 \end_layout
20518
20519 \end_inset
20520 </cell>
20521 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20522 \begin_inset Text
20523
20524 \begin_layout Plain Layout
20525 mixed revision working copy
20526 \end_layout
20527
20528 \end_inset
20529 </cell>
20530 </row>
20531 <row>
20532 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20533 \begin_inset Text
20534
20535 \begin_layout Plain Layout
20536 4168M
20537 \end_layout
20538
20539 \end_inset
20540 </cell>
20541 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20542 \begin_inset Text
20543
20544 \begin_layout Plain Layout
20545 modified working copy
20546 \end_layout
20547
20548 \end_inset
20549 </cell>
20550 </row>
20551 <row>
20552 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20553 \begin_inset Text
20554
20555 \begin_layout Plain Layout
20556 4123S
20557 \end_layout
20558
20559 \end_inset
20560 </cell>
20561 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20562 \begin_inset Text
20563
20564 \begin_layout Plain Layout
20565 switched working copy
20566 \end_layout
20567
20568 \end_inset
20569 </cell>
20570 </row>
20571 <row>
20572 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20573 \begin_inset Text
20574
20575 \begin_layout Plain Layout
20576 4123P
20577 \end_layout
20578
20579 \end_inset
20580 </cell>
20581 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20582 \begin_inset Text
20583
20584 \begin_layout Plain Layout
20585 partial working copy, from a sparse checkout
20586 \end_layout
20587
20588 \end_inset
20589 </cell>
20590 </row>
20591 <row>
20592 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20593 \begin_inset Text
20594
20595 \begin_layout Plain Layout
20596 4123:4168MS
20597 \end_layout
20598
20599 \end_inset
20600 </cell>
20601 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20602 \begin_inset Text
20603
20604 \begin_layout Plain Layout
20605 mixed revision, modified, switched working copy
20606 \end_layout
20607
20608 \end_inset
20609 </cell>
20610 </row>
20611 </lyxtabular>
20612
20613 \end_inset
20614
20615
20616 \end_layout
20617
20618 \begin_layout Itemize
20619 file revision information.
20620  The result comes from parsing the output of 
20621 \begin_inset Flex Code
20622 status collapsed
20623
20624 \begin_layout Plain Layout
20625 svn
20626 \begin_inset space ~
20627 \end_inset
20628
20629 info
20630 \begin_inset space ~
20631 \end_inset
20632
20633 --xml
20634 \begin_inset space ~
20635 \end_inset
20636
20637 file.lyx
20638 \end_layout
20639
20640 \end_inset
20641
20642 .
20643  Supported flags are:
20644 \end_layout
20645
20646 \begin_deeper
20647 \begin_layout Itemize
20648 version number of the last commit (
20649 \begin_inset Flex Code
20650 status collapsed
20651
20652 \begin_layout Plain Layout
20653 vcs-revision
20654 \end_layout
20655
20656 \end_inset
20657
20658 )
20659 \end_layout
20660
20661 \begin_layout Itemize
20662 author of the last commit (
20663 \begin_inset Flex Code
20664 status collapsed
20665
20666 \begin_layout Plain Layout
20667 vcs-author
20668 \end_layout
20669
20670 \end_inset
20671
20672 )
20673 \end_layout
20674
20675 \begin_layout Itemize
20676 date of the last commit (
20677 \begin_inset Flex Code
20678 status collapsed
20679
20680 \begin_layout Plain Layout
20681 vcs-date
20682 \end_layout
20683
20684 \end_inset
20685
20686 )
20687 \end_layout
20688
20689 \begin_layout Itemize
20690 time of the last commit (
20691 \begin_inset Flex Code
20692 status collapsed
20693
20694 \begin_layout Plain Layout
20695 vcs-time
20696 \end_layout
20697
20698 \end_inset
20699
20700 )
20701 \end_layout
20702
20703 \end_deeper
20704 \begin_layout Standard
20705 You can obtain this info via InsetInfo (e.g.
20706  
20707 \begin_inset Flex Code
20708 status collapsed
20709
20710 \begin_layout Plain Layout
20711 info-insert buffer vcs-date
20712 \end_layout
20713
20714 \end_inset
20715
20716 ).
20717  The information will be available only when you have the file stored under
20718  svn managment (i.e.
20719  the 
20720 \begin_inset Flex Code
20721 status collapsed
20722
20723 \begin_layout Plain Layout
20724 .svn
20725 \end_layout
20726
20727 \end_inset
20728
20729  directory is available with your document).
20730 \end_layout
20731
20732 \end_deeper
20733 \begin_layout Itemize
20734 Another---a hacking one---possibility is to use svn keywords
20735 \begin_inset Foot
20736 status collapsed
20737
20738 \begin_layout Plain Layout
20739 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20740 \end_layout
20741
20742 \end_inset
20743
20744 .
20745  In short -- you set file keywords property (e.g.
20746  
20747 \family sans
20748 svn propset svn:keywords 'Rev' file.lyx
20749 \family default
20750 ) and then paste keyword ERT
20751 \begin_inset Foot
20752 status collapsed
20753
20754 \begin_layout Plain Layout
20755 This is an easy way how to ensure that LyX won't break the line in the middle
20756  of keyword tag.
20757 \end_layout
20758
20759 \end_inset
20760
20761  tag in your document (e.g.
20762  
20763 \begin_inset ERT
20764 status open
20765
20766 \begin_layout Plain Layout
20767
20768 $Rev$
20769 \end_layout
20770
20771 \end_inset
20772
20773 ).
20774  This way svn client will automatically substitute revision number (e.g.
20775  
20776 \begin_inset ERT
20777 status open
20778
20779 \begin_layout Plain Layout
20780
20781 $Rev: 59 $
20782 \end_layout
20783
20784 \end_inset
20785
20786 ) after each update and commit.
20787  There are more problems with this approach.
20788  Firstly, the '$' character is used in TeX world for math equations, so
20789  any occurence of math formula 
20790 \begin_inset Formula $Rev$
20791 \end_inset
20792
20793  become 
20794 \begin_inset Formula $Rev:59$
20795 \end_inset
20796
20797  in your LyX document.
20798  Similarly for other keywords like Id, Date, Author, etc.
20799  Secondly svn output is dependent on your locales, so its very easy that
20800  svn would produce some problematic strings once Date is used.
20801  Thirdly you get the whole 'Rev: 59' string in your document instead of
20802  the plain number.
20803  Until subversion implements user's custom keywords it will be hard to use
20804  this approach reliably or let LyX to support it directly.
20805 \end_layout
20806
20807 \begin_layout Subsection
20808 SVN and Windows Environment
20809 \end_layout
20810
20811 \begin_layout Quote
20812 My inclination is to say that if the user cannot figure out the command
20813  line operations on their own fairly quickly, they would be well advised
20814  to use TortoiseSVN.
20815  ---P.
20816  A.
20817  Rubin
20818 \end_layout
20819
20820 \begin_layout Subsubsection
20821 Preparation
20822 \end_layout
20823
20824 \begin_layout Standard
20825 In addition to installing LyX, and having access to a Subversion repository,
20826  the user will need to install the Subversion client program.
20827  A Windows installer for the client program is available from 
20828 \begin_inset CommandInset href
20829 LatexCommand href
20830 name "CollabNet"
20831 target "http://www.collab.net/nonav/downloads/subversion/"
20832
20833 \end_inset
20834
20835 .
20836  The user may also want to install 
20837 \begin_inset CommandInset href
20838 LatexCommand href
20839 name "TortoiseSVN"
20840 target "http://tortoisesvn.tigris.org/"
20841
20842 \end_inset
20843
20844 , which integrates Subversion operations into the context (rightclick) menu
20845  of Windows Explorer.
20846  Operations done outside LyX will typically be more convenient using the
20847  Explorer context menu.
20848  Note that TortoiseSVN is not a replacement for the client program, which
20849  is what LyX itself will use.
20850 \end_layout
20851
20852 \begin_layout Subsubsection
20853 Bringing a document under Subversion control
20854 \end_layout
20855
20856 \begin_layout Standard
20857 Before a LyX document can be brought under version control in Subversion,
20858  its parent directory needs to be under version control.
20859  If the document is being added to a project already in the repository,
20860  this is accomplished by checking the project out to the directory where
20861  the new document will be placed.
20862  If the project itself is not yet under version control (for instance, if
20863  this document starts a new project), the directory must be imported into
20864  the repository.
20865  This is done outside LyX.
20866  Both import and checkout are easily accomplished from the Explorer context
20867  menu using TortoiseSVN, or alternatively can be done using the command
20868  line client at a DOS prompt.
20869  The procedure for importing the project using TortoiseSVN is described
20870  below, assuming an existing repository and a new project being started
20871  in 
20872 \family typewriter
20873 C:
20874 \backslash
20875 new project
20876 \family default
20877 .
20878  For information on using the Subversion client program, run 
20879 \family typewriter
20880 svn --help 
20881 \family default
20882 in a DOS shell.
20883 \end_layout
20884
20885 \begin_layout Enumerate
20886 Locate 
20887 \family typewriter
20888 C:
20889 \backslash
20890 new project 
20891 \family default
20892 in Windows Explorer, right click it, and select 
20893 \family typewriter
20894 TortoiseSVN > Repo-browser
20895 \family default
20896 .
20897  If necessary, adjust the URL for the repository, then click OK.
20898 \end_layout
20899
20900 \begin_layout Enumerate
20901 Right click the level of the repository under which you want to place the
20902  new project folder (typically the top level) and click 
20903 \family typewriter
20904 Create folder\SpecialChar \ldots{}
20905
20906 \family default
20907  Supply a name for the project folder and click OK.
20908  Add a message for the log file if desired, then click OK again.
20909  The new project folder should appear in the repository.
20910  Finally, click OK again to exit the repository browser.
20911 \end_layout
20912
20913 \begin_layout Enumerate
20914 Once again right click 
20915 \family typewriter
20916 C:
20917 \backslash
20918 new project
20919 \family default
20920 , this time selecting SVN Checkout\SpecialChar \ldots{}
20921  Select the URL of the project folder
20922  you just created in the repository, and set the checkout directory to 
20923 \family typewriter
20924 C:
20925 \backslash
20926 new project.
20927
20928 \family default
20929  Click OK.
20930  You will be warned about a non-empty folder; click OK to proceed.
20931  You should now have a 
20932 \family typewriter
20933 .svn
20934 \family default
20935  directory under 
20936 \family typewriter
20937 C:
20938 \backslash
20939 new project.
20940 \end_layout
20941
20942 \begin_layout Enumerate
20943 Create or open your document in LyX and click 
20944 \family sans
20945 \bar under
20946 F
20947 \bar default
20948 ile\SpecialChar \menuseparator
20949
20950 \bar under
20951 V
20952 \bar default
20953 ersion
20954 \begin_inset space ~
20955 \end_inset
20956
20957 Control\SpecialChar \menuseparator
20958
20959 \bar under
20960 R
20961 \bar default
20962 egister.
20963  
20964 \family default
20965 Add a log message and click OK to commit the document to version control.
20966 \end_layout
20967
20968 \begin_layout Standard
20969 From this point onward, you should have full functionality in the 
20970 \family sans
20971 \bar under
20972 F
20973 \bar default
20974 ile\SpecialChar \menuseparator
20975
20976 \bar under
20977 V
20978 \bar default
20979 ersion
20980 \begin_inset space ~
20981 \end_inset
20982
20983 Control
20984 \family default
20985  menu.
20986  You also have the option of checking the document in and out, viewing its
20987  history, etc.
20988  using the TortoiseSVN context menu in Windows Explorer or the Subversion
20989  client program from a command prompt.
20990 \end_layout
20991
20992 \begin_layout Subsubsection
20993 SSH tu
20994 \change_inserted 3 1288376976
20995 n
20996 \change_unchanged
20997 nel used with SVN under Windows
20998 \end_layout
20999
21000 \begin_layout Standard
21001 Compared with Linux setting up svn client to communicate over ssh under
21002  Windows is a rather troublesome task.
21003  We will at least offer some hints how to setup the client side but prior
21004  knowledge about ssh and the Windows command line is needed, also be prepared
21005  for a great deal of frustration\SpecialChar \ldots{}
21006
21007 \end_layout
21008
21009 \begin_layout Enumerate
21010 Get a svn client for windows, as described in the previous sections.
21011  When it is a fresh install run some svn command (e.g.
21012  
21013 \begin_inset Flex Code
21014 status collapsed
21015
21016 \begin_layout Plain Layout
21017 svn --version
21018 \end_layout
21019
21020 \end_inset
21021
21022 ) to create config files, which you will need to change later on.
21023 \end_layout
21024
21025 \begin_layout Enumerate
21026 Choose a ssh client for Windows.
21027  There are several possibilities, we will use the one from Putty tools
21028 \begin_inset Foot
21029 status open
21030
21031 \begin_layout Plain Layout
21032 \begin_inset Flex URL
21033 status collapsed
21034
21035 \begin_layout Plain Layout
21036
21037 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21038 \end_layout
21039
21040 \end_inset
21041
21042
21043 \end_layout
21044
21045 \end_inset
21046
21047 .
21048  You will need to set the connection up so that the client doesn't ask for
21049  any password from you.
21050  To keep things easy we will use only keys without any additional password
21051  protection etc.
21052 \end_layout
21053
21054 \begin_deeper
21055 \begin_layout Enumerate
21056 Generate keys by 
21057 \begin_inset Flex Code
21058 status collapsed
21059
21060 \begin_layout Plain Layout
21061 puttygen
21062 \end_layout
21063
21064 \end_inset
21065
21066 .
21067  Save your private .ppk key file and put the public one on the server side.
21068  If the SVN server runs on Linux, note that the format of the public key
21069  is not compatible with Linux openssh and you will need to direcly copy-paste
21070  the key from the “
21071 \emph on
21072 Public key for pasting into OpenSSH authorized_keys file
21073 \emph default
21074 :” edit field into the server's 
21075 \begin_inset Flex Code
21076 status collapsed
21077
21078 \begin_layout Plain Layout
21079 ~/.ssh/authorized_keys
21080 \end_layout
21081
21082 \end_inset
21083
21084
21085 \begin_inset Flex Code
21086 status collapsed
21087
21088 \begin_layout Plain Layout
21089 authorized_keys2
21090 \end_layout
21091
21092 \end_inset
21093
21094  file.
21095 \end_layout
21096
21097 \begin_layout Enumerate
21098 Get the Putty's 
21099 \begin_inset Flex Code
21100 status collapsed
21101
21102 \begin_layout Plain Layout
21103 plink
21104 \end_layout
21105
21106 \end_inset
21107
21108 .
21109  In the SVN config file
21110 \begin_inset Foot
21111 status collapsed
21112
21113 \begin_layout Plain Layout
21114 Exact path depends on Windows version, usually somewhere around 
21115 \begin_inset Flex Code
21116 status collapsed
21117
21118 \begin_layout Plain Layout
21119 c:
21120 \backslash
21121 Documents and Settings
21122 \backslash
21123 user
21124 \backslash
21125 Application Data
21126 \backslash
21127 Subversion
21128 \backslash
21129 config
21130 \end_layout
21131
21132 \end_inset
21133
21134  / 
21135 \begin_inset Flex Code
21136 status collapsed
21137
21138 \begin_layout Plain Layout
21139 AppData
21140 \backslash
21141 Roaming
21142 \backslash
21143 Subversion
21144 \end_layout
21145
21146 \end_inset
21147
21148 .
21149 \end_layout
21150
21151 \end_inset
21152
21153 , section [tunnels], setup ssh command, e.g.
21154  
21155 \begin_inset Flex Code
21156 status collapsed
21157
21158 \begin_layout Plain Layout
21159 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21160 \end_layout
21161
21162 \end_inset
21163
21164 .
21165 \begin_inset Foot
21166 status collapsed
21167
21168 \begin_layout Plain Layout
21169 It will usually take a lot of time to get exact command right and it depends
21170  on many things.
21171  For example do not have some remote server saved as a default session in
21172  Putty etc.
21173  If things fail, try to connect via plink without SVN first.
21174 \end_layout
21175
21176 \end_inset
21177
21178
21179 \end_layout
21180
21181 \end_deeper
21182 \begin_layout Enumerate
21183 Checkout the SVN archive, e.g.
21184  
21185 \begin_inset Flex Code
21186 status collapsed
21187
21188 \begin_layout Plain Layout
21189 svn co svn+ssh://user@server/repository_path
21190 \end_layout
21191
21192 \end_inset
21193
21194 .
21195 \end_layout
21196
21197 \begin_layout Subsubsection
21198 End-of-Line Conversions
21199 \end_layout
21200
21201 \begin_layout Standard
21202 When the collsraborators are mixing Linux and Windows environments, LyX
21203  will use different line endings inside the .lyx files.
21204  This is not a problem as far as LyX functionality is concerned, but the
21205  commit diffs will be huge and merge-conflicts prone.
21206  Fortunately SVN itself knows
21207 \begin_inset Foot
21208 status collapsed
21209
21210 \begin_layout Plain Layout
21211 \begin_inset Flex URL
21212 status collapsed
21213
21214 \begin_layout Plain Layout
21215
21216 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21217 \end_layout
21218
21219 \end_inset
21220
21221
21222 \end_layout
21223
21224 \end_inset
21225
21226  how to deal with CR/LF problems when switching .lyx files to the 
21227 \begin_inset Flex Code
21228 status collapsed
21229
21230 \begin_layout Plain Layout
21231 native
21232 \end_layout
21233
21234 \end_inset
21235
21236  mode.
21237 \begin_inset Foot
21238 status collapsed
21239
21240 \begin_layout Plain Layout
21241 For the lazy guys: 
21242 \begin_inset Flex Code
21243 status collapsed
21244
21245 \begin_layout Plain Layout
21246 svn propset svn:eol-style native FILE_NAME
21247 \end_layout
21248
21249 \end_inset
21250
21251
21252 \end_layout
21253
21254 \end_inset
21255
21256
21257 \end_layout
21258
21259 \begin_layout Subsection
21260 Further tuning
21261 \end_layout
21262
21263 \begin_layout Standard
21264 With the recent addition of the vc-command function LyX power users are
21265  allowed to create their own commands for revision control.
21266 \end_layout
21267
21268 \begin_layout Standard
21269 As an example you can see how two TortoiseSVN commands could be integrated
21270  directly:
21271 \end_layout
21272
21273 \begin_layout Description
21274 Commit: 
21275 \begin_inset Flex Code
21276 status collapsed
21277
21278 \begin_layout Plain Layout
21279 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21280 \end_layout
21281
21282 \end_inset
21283
21284
21285 \end_layout
21286
21287 \begin_layout Description
21288 Revert: 
21289 \begin_inset Flex Code
21290 status collapsed
21291
21292 \begin_layout Plain Layout
21293 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21294 \end_layout
21295
21296 \end_inset
21297
21298
21299 \end_layout
21300
21301 \begin_layout Subsection
21302 Version control and Document comparison
21303 \end_layout
21304
21305 \begin_layout Standard
21306 One of the typical uses of version control is to inspect the changes between
21307  revisions, usually by creating 
21308 \begin_inset Flex Code
21309 status collapsed
21310
21311 \begin_layout Plain Layout
21312 diff
21313 \end_layout
21314
21315 \end_inset
21316
21317  dumps.
21318  While this is useful for plain text files, it is much less useful in the
21319  case of LyX files, which have more complicated structure.
21320  Hence we provide binding to the Document comparison feature.
21321  They are two ways of calling this feature - either by direct call of 
21322 \begin_inset Flex Code
21323 status collapsed
21324
21325 \begin_layout Plain Layout
21326 VC_COMPARE
21327 \end_layout
21328
21329 \end_inset
21330
21331  LyX function (for details see LyX functions manual) or by icon/menu item
21332  
21333 \begin_inset Flex MenuItem
21334 status collapsed
21335
21336 \begin_layout Plain Layout
21337 Compare with older revision...
21338 \end_layout
21339
21340 \end_inset
21341
21342 .
21343  One can either compare two chosen revisions of the document or he can simply
21344  compare the current version of edited text with older revisions (where
21345  '
21346 \begin_inset Flex MenuItem
21347 status collapsed
21348
21349 \begin_layout Plain Layout
21350 0
21351 \end_layout
21352
21353 \end_inset
21354
21355 ' revisions back means comparison of the edited file with last commited
21356  revision).
21357  
21358 \end_layout
21359
21360 \begin_layout Standard
21361 This feature is supported for SVN and RCS though due to the more complicated
21362  versioning scheme of RCS there is a constraint -- when addressing the revisions
21363  in dialog, numbers always point to the last number in RCS revision number,
21364  i.e.
21365  '35' in '1.2.35'.
21366 \end_layout
21367
21368 \begin_layout Section
21369 Literate Programming
21370 \end_layout
21371
21372 \begin_layout Standard
21373 Updated by 
21374 \noun on
21375 Kayvan Sylvan 
21376 \noun default
21377 (kayvan@sylvan.com)
21378 \noun on
21379
21380 \noun default
21381 original documentation written by 
21382 \noun on
21383 Edmar Wienskoski Jr.
21384
21385 \noun default
21386  (edmar-w-jr@technologist.com)
21387 \end_layout
21388
21389 \begin_layout Subsection
21390 Introduction
21391 \end_layout
21392
21393 \begin_layout Standard
21394 The main purpose of this documentation is to show you how to use LyX for
21395  literate programming, where it is assumed that you are familiar with this
21396  programming technique, and know what 
21397 \begin_inset Quotes eld
21398 \end_inset
21399
21400 tangling
21401 \begin_inset Quotes erd
21402 \end_inset
21403
21404  and 
21405 \begin_inset Quotes eld
21406 \end_inset
21407
21408 weaving
21409 \begin_inset Quotes erd
21410 \end_inset
21411
21412  means.
21413  If that is not the case, please follow the web links provided in the following
21414  sections.
21415  There is a lot of good documentation out there covering old development
21416  history to the latest tools tips.
21417 \end_layout
21418
21419 \begin_layout Standard
21420 It is also assumed that you are familiar with LyX itself to a point that
21421  you are comfortable changing your LyX preferences, and X resources file.
21422  If that is not the case please refer to other LyX documentation to cover
21423  your specific needs.
21424 \end_layout
21425
21426 \begin_layout Subsection
21427 Literate Programming
21428 \end_layout
21429
21430 \begin_layout Standard
21431 From the Literate Programming FAQ: 
21432 \end_layout
21433
21434 \begin_layout Quotation
21435 Literate programming is the combination of documentation and source together
21436  in a fashion suited for reading by human beings.
21437  In fact, literate programs should be enjoyable reading, even inviting!
21438  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21439  and documentation in a single file.
21440  Literate programming tools then parse the file to produce either readable
21441  documentation or compilable source.
21442  The WEB style of literate programming was created by D.
21443 \begin_inset space \thinspace{}
21444 \end_inset
21445
21446 E.
21447  Knuth during the development of his TeX typesetting software.
21448  
21449 \end_layout
21450
21451 \begin_layout Standard
21452 Another excerpt says:
21453 \end_layout
21454
21455 \begin_layout Quotation
21456
21457 \emph on
21458 How is literate programming different from verbose commenting?
21459 \end_layout
21460
21461 \begin_layout Quotation
21462 There are three distinguishing characteristics.
21463  In order of importance, they are: 
21464 \end_layout
21465
21466 \begin_deeper
21467 \begin_layout Itemize
21468 flexible order of elaboration 
21469 \end_layout
21470
21471 \begin_layout Itemize
21472 automatic support for browsing 
21473 \end_layout
21474
21475 \begin_layout Itemize
21476 typeset documentation, especially diagrams and mathematics 
21477 \end_layout
21478
21479 \end_deeper
21480 \begin_layout Standard
21481 Now that I sparked your curiosity, take a look in the references.
21482 \end_layout
21483
21484 \begin_layout Subsubsection
21485 References
21486 \end_layout
21487
21488 \begin_layout Standard
21489 The complete Literate Programming FAQ can be found at:
21490 \end_layout
21491
21492 \begin_layout Quote
21493 Literate Programming FAQ 
21494 \begin_inset Flex URL
21495 status collapsed
21496
21497 \begin_layout Plain Layout
21498
21499 http://www.literateprogramming.com/lpfaq.pdf
21500 \end_layout
21501
21502 \end_inset
21503
21504
21505 \end_layout
21506
21507 \begin_layout Standard
21508 The FAQ lists 23 (twenty three!) different literate programming tools.
21509  Where some are specialized or 
21510 \begin_inset Quotes eld
21511 \end_inset
21512
21513 tailored
21514 \begin_inset Quotes erd
21515 \end_inset
21516
21517  for particular programming languages, while other have general scope.
21518  I selected 
21519 \noun on
21520 Noweb
21521 \noun default
21522  for my own use for several reasons:
21523 \end_layout
21524
21525 \begin_layout Itemize
21526 It can generate the documentation either in LaTeX or HTML.
21527 \end_layout
21528
21529 \begin_layout Itemize
21530 It has a open architecture, i.
21531 \begin_inset space \thinspace{}
21532 \end_inset
21533
21534 g.
21535 \begin_inset space \space{}
21536 \end_inset
21537
21538 it is easy to plug in new filters and to perform special processing that
21539  you may need.
21540  
21541 \end_layout
21542
21543 \begin_layout Itemize
21544 There is a good selection of filters available already (the HTML is one
21545  of them).
21546 \end_layout
21547
21548 \begin_layout Itemize
21549 It is free.
21550 \end_layout
21551
21552 \begin_layout Standard
21553 The Noweb web page can be found at: 
21554 \end_layout
21555
21556 \begin_layout Quote
21557 Noweb home page 
21558 \begin_inset Flex URL
21559 status collapsed
21560
21561 \begin_layout Plain Layout
21562
21563 http://www.cs.virginia.edu/~nr/noweb/
21564 \end_layout
21565
21566 \end_inset
21567
21568
21569 \end_layout
21570
21571 \begin_layout Standard
21572 Starting from there you can reach many other interesting links and even
21573  some literate program examples.
21574 \end_layout
21575
21576 \begin_layout Subsection
21577 LyX and Literate Programming
21578 \end_layout
21579
21580 \begin_layout Standard
21581 The LyX support for Literate Programming is provided by using the generic
21582  LyX converters mechanism.
21583  This support is provided in a 
21584 \begin_inset Quotes eld
21585 \end_inset
21586
21587 Noweb independent
21588 \begin_inset Quotes erd
21589 \end_inset
21590
21591  way, i.
21592 \begin_inset space \thinspace{}
21593 \end_inset
21594
21595 g.
21596 \begin_inset space \space{}
21597 \end_inset
21598
21599 you will be able to use this new LyX feature with some other literate programmin
21600 g tool of your choice by just changing your LyX preferences.
21601 \end_layout
21602
21603 \begin_layout Subsubsection
21604 Generating documents and code (weaving and tangling)
21605 \end_layout
21606
21607 \begin_layout Paragraph
21608 Selecting the document class
21609 \end_layout
21610
21611 \begin_layout Standard
21612 If you have installed Noweb and LyX successfully, whenever you open a new
21613  document or try to change the document class of an existing one, you will
21614  find that there are three new document classes available:
21615 \end_layout
21616
21617 \begin_layout Itemize
21618 Article (Noweb)
21619 \end_layout
21620
21621 \begin_layout Itemize
21622 Book (Noweb)
21623 \end_layout
21624
21625 \begin_layout Itemize
21626 Report (Noweb)
21627 \end_layout
21628
21629 \begin_layout Standard
21630 You must select one of them to create your literate documents from.
21631  
21632 \end_layout
21633
21634 \begin_layout Standard
21635 Note that literate documents are not limited to these three classes.
21636  New classes can be generated from other styles like letter or in combination
21637  with other class variations like Article (AMS).
21638  If you have special needs that cannot be covered by one of the existing
21639  classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21640  will arrange to insert a new entry, or teach you how to do it.
21641 \begin_inset Foot
21642 status collapsed
21643
21644 \begin_layout Plain Layout
21645 It is very simple, it involves the creation of a file with four lines, and
21646  re-running of the auto configuration.
21647 \end_layout
21648
21649 \end_inset
21650
21651  Moreover, if you use a literate tool other than Noweb you may need to create
21652  a new set of document classes for it.
21653 \end_layout
21654
21655 \begin_layout Paragraph
21656 Typing code in
21657 \end_layout
21658
21659 \begin_layout Standard
21660 LyX enables you to write code with a layout named 
21661 \noun on
21662 Scrap
21663 \noun default
21664 .
21665 \begin_inset Foot
21666 status collapsed
21667
21668 \begin_layout Plain Layout
21669 The equivalent Noweb term is 
21670 \begin_inset Quotes eld
21671 \end_inset
21672
21673 Chunk
21674 \begin_inset Quotes erd
21675 \end_inset
21676
21677 .
21678  For historical reasons, I got used to the term 
21679 \begin_inset Quotes eld
21680 \end_inset
21681
21682 scrap
21683 \begin_inset Quotes erd
21684 \end_inset
21685
21686  introduced by other literate tool named Nuweb, which I used for many years
21687  before rendering myself to Noweb.
21688 \end_layout
21689
21690 \end_inset
21691
21692  Noweb delimits scraps like this:
21693 \end_layout
21694
21695 \begin_layout LyX-Code
21696 <<My scrap>>=
21697 \end_layout
21698
21699 \begin_layout LyX-Code
21700   code
21701 \end_layout
21702
21703 \begin_layout LyX-Code
21704   more code
21705 \end_layout
21706
21707 \begin_layout LyX-Code
21708   even more code
21709 \end_layout
21710
21711 \begin_layout LyX-Code
21712   @
21713 \end_layout
21714
21715 \begin_layout Standard
21716 The problem is that whatever is written in between the << and the 
21717 \family typewriter
21718 @
21719 \family default
21720  must be taken literally, i.
21721 \begin_inset space \thinspace{}
21722 \end_inset
21723
21724 g.
21725 \begin_inset space \space{}
21726 \end_inset
21727
21728 LyX should be prevented from making any special interpretation of what has
21729  been written.
21730  This is handled by a special layout named Scrap, that works like a normal
21731  paragraph but has a free spacing capability.
21732 \end_layout
21733
21734 \begin_layout Standard
21735 The down side of the Scrap paragraph layout is that consecutive paragraphs
21736  of code will be spaced with one empty line in the source code and also
21737  in the printed documentation.
21738  The work around is to enter each line of code within a single Scrap, with
21739  a newline (ctrl-return).
21740  The example above will look like this:
21741 \begin_inset Foot
21742 status collapsed
21743
21744 \begin_layout Plain Layout
21745 If you have a printed version of this document you will not see any difference
21746  between the previous example and this one.
21747 \end_layout
21748
21749 \end_inset
21750
21751
21752 \end_layout
21753
21754 \begin_layout LyX-Code
21755 <<My scrap>>=
21756 \begin_inset Newline newline
21757 \end_inset
21758
21759   code
21760 \begin_inset Newline newline
21761 \end_inset
21762
21763   more code
21764 \begin_inset Newline newline
21765 \end_inset
21766
21767   even more code
21768 \begin_inset Newline newline
21769 \end_inset
21770
21771   @
21772 \end_layout
21773
21774 \begin_layout Standard
21775 This layout works fine.
21776  The only real inconvenience is that you have to type ctrl-return instead
21777  of a plain return.
21778 \begin_inset Foot
21779 status collapsed
21780
21781 \begin_layout Plain Layout
21782 It is in my list of 
21783 \begin_inset Quotes eld
21784 \end_inset
21785
21786 improvements
21787 \begin_inset Quotes erd
21788 \end_inset
21789
21790  to fix that.
21791 \end_layout
21792
21793 \end_inset
21794
21795
21796 \end_layout
21797
21798 \begin_layout Standard
21799 As a special note, you can also use the 
21800 \begin_inset Quotes eld
21801 \end_inset
21802
21803 %def
21804 \begin_inset Quotes erd
21805 \end_inset
21806
21807  construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21808 rence:
21809 \end_layout
21810
21811 \begin_layout LyX-Code
21812 <<My scrap>>=
21813 \begin_inset Newline newline
21814 \end_inset
21815
21816   def some_function(args):
21817 \begin_inset Newline newline
21818 \end_inset
21819
21820     "This is the doc string for this function."
21821 \begin_inset Newline newline
21822 \end_inset
21823
21824     print "My args: ", args
21825 \end_layout
21826
21827 \begin_layout LyX-Code
21828 @ %def some_function
21829 \end_layout
21830
21831 \begin_layout Standard
21832 For an example of this usage and the resulting cross-reference output, look
21833  at the Literate python program in 
21834 \emph on
21835 LIBDIR/examples/listerrors.lyx
21836 \emph default
21837  which should make this all clear.
21838 \end_layout
21839
21840 \begin_layout Paragraph
21841 Generating the documentation
21842 \end_layout
21843
21844 \begin_layout Standard
21845 At this point you already have a new document file with a proper document
21846  class, and with some code and text on it.
21847  How do I print it? The answer is simple, you select 
21848 \family sans
21849 View\SpecialChar \menuseparator
21850 DVI,
21851 \family default
21852  etc.
21853  Just like you would do for a plain document.
21854  No special procedure is required.
21855 \end_layout
21856
21857 \begin_layout Standard
21858 To help orientate you, I will now explain what happens inside LyX:
21859 \end_layout
21860
21861 \begin_layout Enumerate
21862 When the 
21863 \family sans
21864 Update\SpecialChar \menuseparator
21865 DVI
21866 \family default
21867  menu option is chosen, a LaTeX file is generated.
21868  
21869 \end_layout
21870
21871 \begin_deeper
21872 \begin_layout Standard
21873 If the document is of any literate class the generated file will be named
21874  with an extension name defined by the 
21875 \begin_inset Quotes eld
21876 \end_inset
21877
21878 literate
21879 \begin_inset Quotes erd
21880 \end_inset
21881
21882  format (defined in the Preferences panel), otherwise the file will have
21883  the usual 
21884 \family typewriter
21885 .tex
21886 \family default
21887  extension.
21888 \end_layout
21889
21890 \end_deeper
21891 \begin_layout Enumerate
21892 Note that the only difference so far is in the name of the file, no special
21893  processing is required by LyX.
21894  Given that you formatted the code using the Scrap layout that, by itself,
21895  takes care of the business.
21896 \end_layout
21897
21898 \begin_layout Enumerate
21899 If the document is of any literate class LyX will then use the internal
21900  LyX to Noweb converter, followed by the Noweb to LaTeX converter
21901 \begin_inset Foot
21902 status collapsed
21903
21904 \begin_layout Plain Layout
21905 The converters are defined in the 
21906 \family sans
21907 Tools\SpecialChar \menuseparator
21908 Preferences
21909 \family default
21910  panel, under the 
21911 \begin_inset Quotes eld
21912 \end_inset
21913
21914 Conversion
21915 \begin_inset Quotes erd
21916 \end_inset
21917
21918  tab.
21919  See section 
21920 \emph on
21921 Converters
21922 \emph default
21923  of the 
21924 \emph on
21925 Customization
21926 \emph default
21927  manual for general information about converters.
21928 \end_layout
21929
21930 \end_inset
21931
21932  to generate the LaTeX file.
21933 \end_layout
21934
21935 \begin_deeper
21936 \begin_layout Standard
21937 Otherwise it will just skip this step.
21938 \end_layout
21939
21940 \end_deeper
21941 \begin_layout Enumerate
21942 Finally, LaTeX is invoked and the regular post processing continues as in
21943  a plain document.
21944 \end_layout
21945
21946 \begin_layout Standard
21947 Independence from a particular 
21948 \begin_inset Quotes eld
21949 \end_inset
21950
21951 literate tool
21952 \begin_inset Quotes erd
21953 \end_inset
21954
21955  is easily achieved by changing the commands that are run by the various
21956  converters.
21957 \end_layout
21958
21959 \begin_layout Paragraph
21960 Generating the code
21961 \end_layout
21962
21963 \begin_layout Standard
21964 When the build menu option is chosen or the corresponding button in the
21965  toolbar is pressed, a LaTeX file is generated just like step 1 above.
21966  Next, LyX invokes the 
21967 \family typewriter
21968 Noweb->Program
21969 \family default
21970  converter.
21971  This converter needs to be defined by the user and is not installed by
21972  default, though the Program format is.
21973  This converter (like any other converter) will have two parts:
21974 \end_layout
21975
21976 \begin_layout Enumerate
21977 The converter program itself.
21978  This program performs the conversion from the one format to the other (in
21979  this case, from the Noweb format to the Program pseudo-format).
21980 \end_layout
21981
21982 \begin_layout Enumerate
21983 The error log parser.
21984  This is a program whose sole purpose is to rewrite error messages in a
21985  format that LyX understands.
21986  This makes it possible for LyX to place error boxes in the right places
21987  in the file buffer.
21988 \end_layout
21989
21990 \begin_layout Standard
21991 The first part, the 
21992 \begin_inset Quotes eld
21993 \end_inset
21994
21995 Converter
21996 \begin_inset Quotes erd
21997 \end_inset
21998
21999  setting, should be set to 
22000 \begin_inset Quotes eld
22001 \end_inset
22002
22003
22004 \family typewriter
22005 build-script $$i
22006 \family default
22007
22008 \begin_inset Quotes erd
22009 \end_inset
22010
22011 .
22012  This basically means that LyX will call 
22013 \begin_inset Quotes eld
22014 \end_inset
22015
22016 build-script
22017 \begin_inset Quotes erd
22018 \end_inset
22019
22020  (a program or script) with the name of the Noweb file (normally a file
22021  in the LyX temp directory).
22022  
22023 \end_layout
22024
22025 \begin_layout Standard
22026 This is an implementation of 
22027 \begin_inset Quotes eld
22028 \end_inset
22029
22030 build-script
22031 \begin_inset Quotes erd
22032 \end_inset
22033
22034  that you can place in a directory on your path:
22035 \end_layout
22036
22037 \begin_layout LyX-Code
22038 #!/bin/sh
22039 \end_layout
22040
22041 \begin_layout LyX-Code
22042 #
22043 \end_layout
22044
22045 \begin_layout LyX-Code
22046 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
22047 \end_layout
22048
22049 \begin_layout Standard
22050 The next part of the converter setting is the 
22051 \begin_inset Quotes eld
22052 \end_inset
22053
22054 Flags
22055 \begin_inset Quotes erd
22056 \end_inset
22057
22058  which is to be set to 
22059 \begin_inset Quotes eld
22060 \end_inset
22061
22062
22063 \family typewriter
22064 parselog=listerrors
22065 \family default
22066
22067 \begin_inset Quotes erd
22068 \end_inset
22069
22070 .
22071  This will run any errors that are generated by the 
22072 \begin_inset Quotes eld
22073 \end_inset
22074
22075 build-script
22076 \begin_inset Quotes erd
22077 \end_inset
22078
22079  process through the 
22080 \begin_inset Quotes eld
22081 \end_inset
22082
22083 listerrors
22084 \begin_inset Quotes erd
22085 \end_inset
22086
22087  program.
22088 \end_layout
22089
22090 \begin_layout Standard
22091 The converter code looks in 
22092 \emph on
22093 MYLYXDIR/scripts
22094 \emph default
22095  first, then in 
22096 \emph on
22097 LIBDIR/scripts
22098 \emph default
22099  then on the path for the 
22100 \begin_inset Quotes eld
22101 \end_inset
22102
22103 listerrors
22104 \begin_inset Quotes erd
22105 \end_inset
22106
22107  program.
22108 \end_layout
22109
22110 \begin_layout Standard
22111 The build will normally take place in LyX's temporary directory, so the
22112  files produced by the conversion will be in that directory.
22113  LyX will copy out what it regards as the `main' file, but the 
22114 \family typewriter
22115 Noweb->Program
22116 \family default
22117  conversion may produce several files, and so most of these would then be
22118  deleted when LyX was closed.
22119  The present solution is to use a `copier',
22120 \begin_inset Foot
22121 status collapsed
22122
22123 \begin_layout Plain Layout
22124 See section 
22125 \emph on
22126 Copiers
22127 \emph default
22128  of the 
22129 \emph on
22130 Customization
22131 \emph default
22132  manual for information on these.
22133 \end_layout
22134
22135 \end_inset
22136
22137  in this case, the 
22138 \family typewriter
22139 ext_copy.py
22140 \family default
22141  script in its default mode, so that the entire contents of the temporary
22142  directory is copied.
22143  More will get copied than is needed, to be sure, but nothing will be lost.
22144  If, however, you know what extensions the generated files will have, this
22145  can be improved by using the 
22146 \family typewriter
22147 -e
22148 \family default
22149  option to 
22150 \family typewriter
22151 ext_copy
22152 \family default
22153 .
22154  This option takes a comma-separated list of extensions to copy.
22155  So, for example, if the conversion will generate only files with the extensions
22156  
22157 \family typewriter
22158 .c
22159 \family default
22160  and 
22161 \family typewriter
22162 .h
22163 \family default
22164 , then the correct definition would be:
22165 \end_layout
22166
22167 \begin_layout LyX-Code
22168 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
22169 \end_layout
22170
22171 \begin_layout Standard
22172 The result will be that only files with these two extensions will be copied
22173  out.
22174 \end_layout
22175
22176 \begin_layout Paragraph
22177 Build instructions in the document
22178 \end_layout
22179
22180 \begin_layout Standard
22181 The last piece of the integration between LyX and noweb is the 
22182 \begin_inset Quotes eld
22183 \end_inset
22184
22185 build-script
22186 \begin_inset Quotes erd
22187 \end_inset
22188
22189  scrap.
22190  Generally, the instructions for building your program should be embedded
22191  in a scrap of its own.
22192  The noweb-specific 
22193 \begin_inset Quotes eld
22194 \end_inset
22195
22196 build-script
22197 \begin_inset Quotes erd
22198 \end_inset
22199
22200  above uses the notangle command to look for this scrap (called 
22201 \begin_inset Quotes eld
22202 \end_inset
22203
22204 build-script
22205 \begin_inset Quotes erd
22206 \end_inset
22207
22208 ) and runs its contents through 
22209 \begin_inset Quotes eld
22210 \end_inset
22211
22212 sh
22213 \begin_inset Quotes erd
22214 \end_inset
22215
22216 .
22217 \end_layout
22218
22219 \begin_layout Standard
22220 Typically, such a scrap would look something like this:
22221 \end_layout
22222
22223 \begin_layout LyX-Code
22224 <<build-script>>=
22225 \begin_inset Newline newline
22226 \end_inset
22227
22228 #!/bin/sh
22229 \begin_inset Newline newline
22230 \end_inset
22231
22232
22233 \begin_inset Newline newline
22234 \end_inset
22235
22236 if [ -z "${NOWEB_SOURCE}" ]
22237 \begin_inset Newline newline
22238 \end_inset
22239
22240 then
22241 \begin_inset Newline newline
22242 \end_inset
22243
22244   NOWEB_SOURCE=myfile.nw
22245 \begin_inset Newline newline
22246 \end_inset
22247
22248 fi
22249 \begin_inset Newline newline
22250 \end_inset
22251
22252 [...
22253  code to extract files ...]
22254 \begin_inset Newline newline
22255 \end_inset
22256
22257 [...
22258  code to compile files ...]
22259 \begin_inset Newline newline
22260 \end_inset
22261
22262 @
22263 \end_layout
22264
22265 \begin_layout Standard
22266 Look in 
22267 \emph on
22268 LIBDIR/examples/listerrors.lyx
22269 \emph default
22270  or in 
22271 \emph on
22272 LIBDIR/examples/Literate.lyx
22273 \emph default
22274  which implement two versions of the 
22275 \begin_inset Quotes eld
22276 \end_inset
22277
22278 listerrors
22279 \begin_inset Quotes erd
22280 \end_inset
22281
22282  program for some illustrations of how all of these pieces go together or
22283  in 
22284 \emph on
22285 LIBDIR/examples/noweb2lyx.lyx.
22286
22287 \emph default
22288  Interestingly, these three files show off the language-indepence of the
22289  LyX literate programming support since they are written in Python, C and
22290  Perl respectively.
22291 \end_layout
22292
22293 \begin_layout Subsubsection
22294 Configuring LyX
22295 \end_layout
22296
22297 \begin_layout Standard
22298 All the Literate Programming support is configured by the 
22299 \family sans
22300 Tools\SpecialChar \menuseparator
22301 Preferences
22302 \family default
22303  panel in the 
22304 \begin_inset Quotes eld
22305 \end_inset
22306
22307 Conversion
22308 \begin_inset Quotes erd
22309 \end_inset
22310
22311  tab.
22312  The important parts are:
22313 \end_layout
22314
22315 \begin_layout Description
22316 the
22317 \begin_inset space ~
22318 \end_inset
22319
22320
22321 \begin_inset Quotes eld
22322 \end_inset
22323
22324 literate
22325 \begin_inset Quotes erd
22326 \end_inset
22327
22328
22329 \begin_inset space ~
22330 \end_inset
22331
22332 format Set up via the Formats tab, this is where the Noweb-specific pieces
22333  are set up.
22334  The 
22335 \family sans
22336 GUI Name
22337 \family default
22338  is set to 
22339 \family typewriter
22340 NoWeb
22341 \family default
22342 , the file extension is set to 
22343 \family typewriter
22344 .nw
22345 \family default
22346 .
22347  This tells LyX to create a file with a 
22348 \family typewriter
22349 .nw
22350 \family default
22351  extension in the first step of the conversion process.
22352 \end_layout
22353
22354 \begin_layout Description
22355 the
22356 \begin_inset space ~
22357 \end_inset
22358
22359
22360 \family sans
22361 Program
22362 \family default
22363
22364 \begin_inset space ~
22365 \end_inset
22366
22367 format This is an empty format whose sole purpose is to be the endpoint
22368  of a conversion (which then allows us to set up a converter for it).
22369 \end_layout
22370
22371 \begin_layout Description
22372
22373 \family sans
22374 NoWeb
22375 \family default
22376 ->
22377 \family sans
22378 LaTeX
22379 \family default
22380  This converter performs the 
22381 \begin_inset Quotes eld
22382 \end_inset
22383
22384 weaving
22385 \begin_inset Quotes erd
22386 \end_inset
22387
22388  of the literate document.
22389  For Noweb, it is set to 
22390 \begin_inset Quotes eld
22391 \end_inset
22392
22393
22394 \family typewriter
22395 noweave -delay -index $$i > $$o
22396 \family default
22397
22398 \begin_inset Quotes erd
22399 \end_inset
22400
22401
22402 \end_layout
22403
22404 \begin_layout Description
22405
22406 \family sans
22407 NoWeb
22408 \family default
22409 ->
22410 \family sans
22411 Program
22412 \family default
22413  This performs the 
22414 \begin_inset Quotes eld
22415 \end_inset
22416
22417 tangling step
22418 \begin_inset Quotes erd
22419 \end_inset
22420
22421 .
22422  As stated above, the Converter is set to 
22423 \begin_inset Quotes eld
22424 \end_inset
22425
22426
22427 \family typewriter
22428 build-script $$i
22429 \family default
22430
22431 \begin_inset Quotes erd
22432 \end_inset
22433
22434 , with Flags set to 
22435 \begin_inset Quotes eld
22436 \end_inset
22437
22438
22439 \family typewriter
22440 originaldir,parselog=listerrors
22441 \family default
22442
22443 \begin_inset Quotes erd
22444 \end_inset
22445
22446 .
22447 \end_layout
22448
22449 \begin_layout Subsubsection
22450 Debug extensions
22451 \end_layout
22452
22453 \begin_layout Standard
22454 There is also a new function implemented in the LyX server, the 
22455 \begin_inset Quotes eld
22456 \end_inset
22457
22458 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22459  
22460 \end_layout
22461
22462 \begin_layout Standard
22463 When debugging code with ddd/gdb, it is possible to invoke a text editor
22464  at the current execution position with a single key stroke.
22465  The default ddd configuration for that is shift-ctrl-V.
22466  It happens that you can define the editor command line invocation in ddd
22467  by accessing the 
22468 \family sans
22469 Edit\SpecialChar \menuseparator
22470 Preferences\SpecialChar \menuseparator
22471 Helpers
22472 \family default
22473  dialog and changing the "Edit Sources" entry.
22474 \end_layout
22475
22476 \begin_layout Standard
22477 I take advantage of the new created LyX server function and this ddd feature,
22478  and set 
22479 \begin_inset Quotes eld
22480 \end_inset
22481
22482 Edit Sources
22483 \begin_inset Quotes erd
22484 \end_inset
22485
22486  to:
22487 \end_layout
22488
22489 \begin_layout LyX-Code
22490 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22491 \end_layout
22492
22493 \begin_layout Standard
22494 With this, whenever you are using ddd and find a point in the program that
22495  you want to edit, you just press shift-ctrl-V (in the ddd window), and
22496  ddd you forward this information to LyX through the LyX server and then
22497  the LyX window will show the same file with the cursor at the same position
22498  ddd was pointing to.
22499  No more guessing or long scrolling to locate a point in the program back
22500  from debugging !
22501 \end_layout
22502
22503 \begin_layout Standard
22504 Note however that you must enable the LyX server to get this feature working
22505  (it is disabled by default).
22506  You can enable it in 
22507 \family sans
22508 Preferences
22509 \family default
22510  (tabs 
22511 \family sans
22512 Inputs
22513 \family default
22514
22515 \family sans
22516 Paths
22517 \family default
22518 ) by entering in the 
22519 \family sans
22520 LyXserver pipe
22521 \family default
22522  a path like 
22523 \begin_inset Quotes eld
22524 \end_inset
22525
22526
22527 \family typewriter
22528 /home/<your-home-directory>/.lyx/lyxpipe
22529 \family default
22530
22531 \begin_inset Quotes erd
22532 \end_inset
22533
22534
22535 \end_layout
22536
22537 \begin_layout Standard
22538 Read the LyX server documentation in the 
22539 \emph on
22540 Customization Manual
22541 \emph default
22542  for further information.
22543 \end_layout
22544
22545 \begin_layout Subsubsection
22546 Toolbar extensions
22547 \end_layout
22548
22549 \begin_layout Standard
22550 There are six new buttons that can be added to your LyX toolbar.
22551  Five of these buttons are short cuts to layout styles: 
22552 \family sans
22553 Standard
22554 \family default
22555
22556 \family sans
22557 Section
22558 \family default
22559
22560 \family sans
22561 LaTeX
22562 \family default
22563
22564 \family sans
22565 LyX-Code
22566 \family default
22567 , and 
22568 \family sans
22569 Scrap
22570 \family default
22571 .
22572  The last one is a short cut to the 
22573 \begin_inset Quotes eld
22574 \end_inset
22575
22576 Build Program
22577 \begin_inset Quotes erd
22578 \end_inset
22579
22580  File menu entry.
22581  
22582 \end_layout
22583
22584 \begin_layout Standard
22585 LyX has a range of buttons that are available for tool bar customization.
22586  In my toolbar I like to combine the six short cuts above with two more:
22587  One for 
22588 \family sans
22589 View
22590 \family default
22591 \SpecialChar \menuseparator
22592
22593 \family sans
22594 Update
22595 \family default
22596 \SpecialChar \menuseparator
22597
22598 \family sans
22599 DVI
22600 \family default
22601  and the other for 
22602 \family sans
22603 View\SpecialChar \menuseparator
22604 DVI
22605 \family default
22606  File menu entries.
22607  Here is how it looks like:
22608 \end_layout
22609
22610 \begin_layout LyX-Code
22611 Toolbar
22612 \end_layout
22613
22614 \begin_layout LyX-Code
22615   Layouts
22616 \end_layout
22617
22618 \begin_layout LyX-Code
22619   Icon "layout Standard"
22620 \end_layout
22621
22622 \begin_layout LyX-Code
22623   Icon "layout Section"
22624 \end_layout
22625
22626 \begin_layout LyX-Code
22627   Icon "layout LaTeX"
22628 \end_layout
22629
22630 \begin_layout LyX-Code
22631   Icon "layout LyX-Code"
22632 \end_layout
22633
22634 \begin_layout LyX-Code
22635   Icon "layout Scrap"
22636 \end_layout
22637
22638 \begin_layout LyX-Code
22639   Separator
22640 \end_layout
22641
22642 \begin_layout LyX-Code
22643   Icon "buffer-view"
22644 \end_layout
22645
22646 \begin_layout LyX-Code
22647   Icon "buffer-typeset"
22648 \end_layout
22649
22650 \begin_layout LyX-Code
22651   Icon "build-program"
22652 \end_layout
22653
22654 \begin_layout LyX-Code
22655   Separator
22656 \end_layout
22657
22658 \begin_layout LyX-Code
22659 .
22660 \end_layout
22661
22662 \begin_layout LyX-Code
22663 .
22664 \end_layout
22665
22666 \begin_layout LyX-Code
22667 .
22668 \end_layout
22669
22670 \begin_layout LyX-Code
22671 End
22672 \end_layout
22673
22674 \begin_layout Subsubsection
22675 Colors customization
22676 \end_layout
22677
22678 \begin_layout Standard
22679 There are a number of colors in LyX that can be customized in 
22680 \family sans
22681 Preferences
22682 \family default
22683 .
22684  One of the things that bothers people is the LaTeX font color.
22685  The default color is red, since the scraps uses LaTeX font, and there is
22686  a lot of scraps in literate documents, you may get tired of seeing everything
22687  in red.
22688  You can change it by going to the tabs 
22689 \family sans
22690 Look&Feel
22691 \family default
22692
22693 \family sans
22694 Colors.
22695 \end_layout
22696
22697 \begin_layout Standard
22698 The next thing is the visible presence of the newline character in the screen.
22699  You can choose the color of this particular character and make it blend
22700  in the background.
22701  I recommend you choosing a color that is close to the background but not
22702  equal, that way you still can see it is there, but it is not bothering
22703  you anymore.
22704  
22705 \end_layout
22706
22707 \begin_layout Chapter
22708 Secrets of the LaTeX Masters
22709 \begin_inset CommandInset label
22710 LatexCommand label
22711 name "cha:secrets"
22712
22713 \end_inset
22714
22715
22716 \end_layout
22717
22718 \begin_layout Standard
22719 Though LyX is a powerful tool, it cannot hope to support everything that
22720  can be done with pure TeX/LaTeX.
22721  However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22722  as long as you are not afraid to use that 
22723 \begin_inset Quotes eld
22724 \end_inset
22725
22726 TeX
22727 \begin_inset Quotes erd
22728 \end_inset
22729
22730  button on the toolbar or add things to the LaTeX preamble.
22731  This section lists some tips, tricks, and otherwise cool ideas to give
22732  your document that extra little flair.
22733  
22734 \emph on
22735 Do try this at home
22736 \emph default
22737 , just start with something a little smaller and less important than your
22738  dissertation!
22739 \end_layout
22740
22741 \begin_layout Standard
22742 Most ideas in this section require less common files in your LaTeX installation.
22743  If you have a system like TeXLive, most will already be available.
22744  A few, however, will need to be downloaded from one of the CTAN archives.
22745  Often, there are several ways to do something, or several LaTeX style files
22746  which do the same thing.
22747  We do not endorse one choice over another, we simply claim that we have
22748  done a particular task with a particular file.
22749  Put on your wizard hat, keep an eye out for dragons, and let us begin.
22750 \end_layout
22751
22752 \begin_layout Section
22753 Multiple Columns
22754 \end_layout
22755
22756 \begin_layout Standard
22757 by 
22758 \noun on
22759 Lars Gullik Bjønnes
22760 \end_layout
22761
22762 \begin_layout Subsection
22763 Purpose
22764 \end_layout
22765
22766 \begin_layout Standard
22767 The aim for this chapter
22768 \begin_inset Foot
22769 status collapsed
22770
22771 \begin_layout Plain Layout
22772 Editor's note: Lars' original chapter was a masterful description of how
22773  to use the 
22774 \family typewriter
22775 multicol
22776 \family default
22777  package.
22778  However, it was too long to flow smoothly in this document.
22779  I have therefore chosen to excerpt the most important sections here (sorry,
22780  Lars); you can read the original chapter (and more of the story!) in the
22781  example file 
22782 \family typewriter
22783 examples/multicol.lyx
22784 \family default
22785 .
22786  — mer
22787 \end_layout
22788
22789 \end_inset
22790
22791  is to show how the LaTeX package 
22792 \family typewriter
22793 multicol
22794 \family default
22795  can be used in a LyX document.
22796  As LyX doesn't support the 
22797 \family typewriter
22798 multicol
22799 \family default
22800  package natively yet, we have to use some small hacks.
22801  By reading this section it should be obvious how to do this.
22802 \end_layout
22803
22804 \begin_layout Subsection
22805 Limitations 
22806 \end_layout
22807
22808 \begin_layout Standard
22809 The 
22810 \family typewriter
22811 multicol
22812 \family default
22813  package allows switching between one and multicolumn format on the same
22814  page.
22815  Footnotes are handled correctly (for the most part), but will be placed
22816  at the bottom of the page and not under each column.
22817  LaTeX's float mechanism, however, is partly disabled in the current implementat
22818 ion.
22819  At the moment only page-wide floats can be used within the scope of the
22820  environment.
22821 \end_layout
22822
22823 \begin_layout Subsection
22824 Examples
22825 \end_layout
22826
22827 \begin_layout Subsubsection
22828 Two columns
22829 \end_layout
22830
22831 \begin_layout Standard
22832 If you want to have two columns in your text, you have use LaTeX mode to
22833  insert 
22834 \family typewriter
22835
22836 \backslash
22837 begin{multicols}{2}
22838 \family default
22839  at the point where you want the two column layout to start, and then 
22840 \family typewriter
22841
22842 \backslash
22843 end{multicols}
22844 \family default
22845  where you want it to end.
22846  Like this:
22847 \end_layout
22848
22849 \begin_layout Standard
22850 \begin_inset ERT
22851 status open
22852
22853 \begin_layout Plain Layout
22854
22855
22856 \backslash
22857 begin{multicols}{2}
22858 \end_layout
22859
22860 \end_inset
22861
22862
22863 \end_layout
22864
22865 \begin_layout Standard
22866 \noindent
22867
22868 \series bold
22869 \size small
22870 The Adventure of the Empty House
22871 \series default
22872
22873 \begin_inset Newline newline
22874 \end_inset
22875
22876 by 
22877 \noun on
22878 Sir Arthur Conan Doyle
22879 \end_layout
22880
22881 \begin_layout Standard
22882
22883 \size small
22884 It was in the spring of the year 1894 that all London was interested, and
22885  the fashionable world dismayed, by the murder of the Honourable Ronald
22886  Adair under most unusual and inexplicable circumstances.
22887  The public has already learned those particulars of the crime which came
22888  out in the police investigation, but a good deal was suppressed upon that
22889  occasion, since the case for the prosecution was so overwhelmingly strong
22890  that it was not necessary to bring forward all the facts.
22891  Only now, at the end of nearly ten years, am I allowed to supply those
22892  missing links which make up the whole of that remarkable chain.
22893  The crime was of interest in itself, but that interest was as nothing to
22894  me compared to the inconceivable sequel, which afforded me the greatest
22895  shock and surprise of any event in my adventurous life.
22896  Even now, after this long interval, I find myself thrilling as I think
22897  of it, and feeling once more that sudden flood of joy, amazement, and increduli
22898 ty which utterly submerged my mind.
22899  Let me say to that public, which has shown some interest in those glimpses
22900  which I have occasionally given them of the thoughts and actions of a very
22901  remarkable man, that they are not to blame me if I have not shared my knowledge
22902  with them, for I should have considered it my first duty to do so, had
22903  I not been barred by a positive prohibition from his own lips, which was
22904  only withdrawn upon the third of last month.
22905 \end_layout
22906
22907 \begin_layout Standard
22908 \begin_inset ERT
22909 status open
22910
22911 \begin_layout Plain Layout
22912
22913
22914 \backslash
22915 end{multicols}
22916 \end_layout
22917
22918 \end_inset
22919
22920
22921 \end_layout
22922
22923 \begin_layout Subsubsection
22924 Multiple columns
22925 \end_layout
22926
22927 \begin_layout Standard
22928 The same pattern is used when you want more than two columns:
22929 \end_layout
22930
22931 \begin_layout Standard
22932 \begin_inset ERT
22933 status open
22934
22935 \begin_layout Plain Layout
22936
22937
22938 \backslash
22939 begin{multicols}{3}
22940 \end_layout
22941
22942 \end_inset
22943
22944
22945 \end_layout
22946
22947 \begin_layout Standard
22948
22949 \size footnotesize
22950 It can be imagined that my close intimacy with Sherlock Holmes had interested
22951  me deeply in crime, and that after his disappearance I never failed to
22952  read with care the various problems which came before the public.
22953  And I even attempted, more than once, for my own private satisfaction,
22954  to employ his methods in their solution, though with indifferent success.
22955  There was none, however, which appealed to me like this tragedy of Ronald
22956  Adair.
22957  As I read the evidence at the inquest, which led up to a verdict of willful
22958  murder against some person or persons unknown, I realized more clearly
22959  than I had ever done the loss which the community had sustained by the
22960  death of Sherlock Holmes.
22961  There were points about this strange business which would, I was sure,
22962  have specially appealed to him, and the efforts of the police would have
22963  been supplemented, or more probably anticipated, by the trained observation
22964  and the alert mind of the first criminal agent in Europe.
22965  All day, as I drove upon my round, I turned over the case in my mind and
22966  found no explanation which appeared to me to be adequate.
22967  At the risk of telling a twice-told tale, I will recapitulate the facts
22968  as they were known to the public at the conclusion of the inquest.
22969 \end_layout
22970
22971 \begin_layout Standard
22972 \begin_inset ERT
22973 status open
22974
22975 \begin_layout Plain Layout
22976
22977
22978 \backslash
22979 end{multicols}
22980 \end_layout
22981
22982 \end_inset
22983
22984
22985 \end_layout
22986
22987 \begin_layout Standard
22988 You can have more than 3 columns if you want to, but that might not be very
22989  pleasant for the eye.
22990 \end_layout
22991
22992 \begin_layout Subsubsection
22993 Columns inside columns
22994 \end_layout
22995
22996 \begin_layout Standard
22997 You can even have columns inside columns:
22998 \end_layout
22999
23000 \begin_layout Standard
23001 \begin_inset ERT
23002 status open
23003
23004 \begin_layout Plain Layout
23005
23006
23007 \backslash
23008 begin{multicols}{2}
23009 \end_layout
23010
23011 \end_inset
23012
23013
23014 \end_layout
23015
23016 \begin_layout Standard
23017
23018 \size footnotesize
23019 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
23020  at that time governor of one of the Australian colonies.
23021  Adair's mother had returned from Australia to undergo the operation for
23022  cataract, and she, her son Ronald, and her daughter Hilda were living together
23023  at 427 Park Lane.
23024 \end_layout
23025
23026 \begin_layout Standard
23027 \begin_inset ERT
23028 status open
23029
23030 \begin_layout Plain Layout
23031
23032
23033 \backslash
23034 begin{multicols}{2}
23035 \end_layout
23036
23037 \end_inset
23038
23039
23040 \end_layout
23041
23042 \begin_layout Standard
23043
23044 \size footnotesize
23045 The youth moved in the best society–had, so far as was known, no enemies
23046  and no particular vices.
23047  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
23048  had been broken off by mutual consent some months before, and there was
23049  no sign that it had left any very profound feeling behind it.
23050  For the rest {sic} the man's life moved in a narrow and conventional circle,
23051  for his habits were quiet and his nature unemotional.
23052  Yet it was upon this easy-going young aristocrat that death came, in most
23053  strange and unexpected form, between the hours of ten and eleven-twenty
23054  on the night of March 30, 1894.
23055 \end_layout
23056
23057 \begin_layout Standard
23058 \begin_inset ERT
23059 status open
23060
23061 \begin_layout Plain Layout
23062
23063
23064 \backslash
23065 end{multicols}
23066 \end_layout
23067
23068 \end_inset
23069
23070
23071 \end_layout
23072
23073 \begin_layout Standard
23074
23075 \size footnotesize
23076 Ronald Adair was fond of cards–playing continually, but never for such stakes
23077  as would hurt him.
23078  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
23079  It was shown that, after dinner on the day of his death, he had played
23080  a rubber of whist at the latter club.
23081  He had also played there in the afternoon.
23082
23083 \size default
23084  
23085 \size footnotesize
23086 The evidence of those who had played with him– Mr.
23087  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
23088  and that there was a fairly equal fall of the cards.
23089  Adair might have lost five pounds, but not more.
23090  His fortune was a considerable one, and such a loss could not in any way
23091  affect him.
23092  He had played nearly every day at one club or other, but he was a cautious
23093  player, and usually rose a winner.
23094  It came out in evidence that, in partnership with Colonel Moran, he had
23095  actually won as much as four hundred and twenty pounds in a sitting, some
23096  weeks before, from Godfrey Milner and Lord Balmoral.
23097  So much for his recent history as it came out at the inquest.
23098 \end_layout
23099
23100 \begin_layout Standard
23101 \begin_inset ERT
23102 status open
23103
23104 \begin_layout Plain Layout
23105
23106
23107 \backslash
23108 end{multicols}
23109 \end_layout
23110
23111 \end_inset
23112
23113
23114 \end_layout
23115
23116 \begin_layout Standard
23117 Please do read the file 
23118 \family typewriter
23119 examples/multicol.lyx
23120 \family default
23121  for more advanced examples including column and header spacing, vertical
23122  separator lines, and more.
23123 \end_layout
23124
23125 \begin_layout Section
23126 Numbering in the 
23127 \family sans
23128 Enumerate
23129 \family default
23130  Paragraph Environment
23131 \begin_inset Argument
23132 status collapsed
23133
23134 \begin_layout Plain Layout
23135 Numbering in Enumerate
23136 \end_layout
23137
23138 \end_inset
23139
23140
23141 \end_layout
23142
23143 \begin_layout Standard
23144 by 
23145 \noun on
23146 John Weiss
23147 \end_layout
23148
23149 \begin_layout Standard
23150 \begin_inset VSpace bigskip
23151 \end_inset
23152
23153
23154 \end_layout
23155
23156 \begin_layout Standard
23157 \noindent
23158 The default numbering for the 
23159 \family sans
23160 Enumerate
23161 \family default
23162  paragraph environment begins with Arabic numbers and ends with uppercase
23163  letters.
23164  Suppose, however, you wanted a different type of numbering scheme.
23165  Here's a quickie example of how to change the numbering scheme:
23166 \end_layout
23167
23168 \begin_layout LyX-Code
23169
23170 \backslash
23171 renewcommand{
23172 \backslash
23173 labelenumi}{
23174 \backslash
23175 Roman{enumi}.}
23176 \end_layout
23177
23178 \begin_layout LyX-Code
23179
23180 \backslash
23181 renewcommand{
23182 \backslash
23183 labelenumii}{
23184 \backslash
23185 Alph{enumii}.}
23186 \end_layout
23187
23188 \begin_layout LyX-Code
23189
23190 \backslash
23191 renewcommand{
23192 \backslash
23193 labelenumiii}{
23194 \backslash
23195 arabic{enumiii}.}
23196 \end_layout
23197
23198 \begin_layout LyX-Code
23199
23200 \backslash
23201 renewcommand{
23202 \backslash
23203 labelenumiv}{
23204 \backslash
23205 alph{enumiv}.)}
23206 \end_layout
23207
23208 \begin_layout Standard
23209 \SpecialChar \ldots{}
23210  which changes the numbering scheme to uppercase Roman numerals, uppercase
23211  letters, Arabic numbers, and lowercase letter.
23212 \end_layout
23213
23214 \begin_layout Standard
23215 Additionally, the previous example also adds a little bit extra to the numbering
23216  scheme.
23217  For example, the first level label actually looks like: 
23218 \begin_inset Quotes eld
23219 \end_inset
23220
23221 I.
23222 \begin_inset Quotes erd
23223 \end_inset
23224
23225 .
23226  For ease of reading, we'll describe what the numbering schemes look like
23227  using a notation something like this: <
23228 \begin_inset Quotes eld
23229 \end_inset
23230
23231 I.
23232 \begin_inset Quotes erd
23233 \end_inset
23234
23235 ,
23236 \begin_inset space ~
23237 \end_inset
23238
23239
23240 \begin_inset Quotes erd
23241 \end_inset
23242
23243 A.
23244 \begin_inset Quotes erd
23245 \end_inset
23246
23247 ,
23248 \begin_inset space ~
23249 \end_inset
23250
23251
23252 \begin_inset Quotes erd
23253 \end_inset
23254
23255 1.
23256 \begin_inset Quotes erd
23257 \end_inset
23258
23259 ,
23260 \begin_inset space ~
23261 \end_inset
23262
23263
23264 \begin_inset Quotes eld
23265 \end_inset
23266
23267 a.)
23268 \begin_inset Quotes erd
23269 \end_inset
23270
23271 >.
23272  
23273 \end_layout
23274
23275 \begin_layout Standard
23276 As you can see in the example, there is a label command for each nesting
23277  level, 
23278 \family typewriter
23279
23280 \backslash
23281 labelenumi
23282 \family default
23283  \SpecialChar \ldots{}
23284  
23285 \family typewriter
23286
23287 \backslash
23288 labelenumiv
23289 \family default
23290 , as well as a counter, 
23291 \family typewriter
23292 enumi
23293 \family default
23294  \SpecialChar \ldots{}
23295  
23296 \family typewriter
23297 enumiv
23298 \family default
23299 .
23300  There are also five 
23301 \begin_inset Quotes eld
23302 \end_inset
23303
23304 number printing
23305 \begin_inset Quotes erd
23306 \end_inset
23307
23308  commands, 
23309 \family typewriter
23310
23311 \backslash
23312 arabic{}
23313 \family default
23314
23315 \family typewriter
23316
23317 \backslash
23318 roman{}
23319 \family default
23320
23321 \family typewriter
23322
23323 \backslash
23324 Roman{}
23325 \family default
23326
23327 \family typewriter
23328
23329 \backslash
23330 alph{}
23331 \family default
23332 , and 
23333 \family typewriter
23334
23335 \backslash
23336 Alph{}
23337 \family default
23338 , each of which take one counter as an argument.
23339  You can add characters before or after these, but there's no need to add
23340  spaces.
23341 \end_layout
23342
23343 \begin_layout Standard
23344 You can get really fancy with these.
23345  For example:
23346 \end_layout
23347
23348 \begin_layout LyX-Code
23349
23350 \backslash
23351 renewcommand{
23352 \backslash
23353 labelenumi}{
23354 \backslash
23355 #
23356 \backslash
23357 Alph{enumi}
23358 \backslash
23359 #}
23360 \end_layout
23361
23362 \begin_layout LyX-Code
23363
23364 \backslash
23365 renewcommand{
23366 \backslash
23367 labelenumii}{
23368 \backslash
23369 Alph{enumi}.
23370 \backslash
23371 arabic{enumii}}
23372 \end_layout
23373
23374 \begin_layout LyX-Code
23375
23376 \backslash
23377 renewcommand{
23378 \backslash
23379 labelenumiii}{
23380 \backslash
23381 alph{enumiii}+}
23382 \end_layout
23383
23384 \begin_layout LyX-Code
23385
23386 \backslash
23387 renewcommand{
23388 \backslash
23389 labelenumiv}{(
23390 \backslash
23391 roman{enumiv})}
23392 \end_layout
23393
23394 \begin_layout Standard
23395 produces the somewhat out of hand numbering scheme: <
23396 \begin_inset Quotes eld
23397 \end_inset
23398
23399 #A#
23400 \begin_inset Quotes erd
23401 \end_inset
23402
23403 ,
23404 \begin_inset space ~
23405 \end_inset
23406
23407
23408 \begin_inset Quotes erd
23409 \end_inset
23410
23411 A.1
23412 \begin_inset Quotes erd
23413 \end_inset
23414
23415 ,
23416 \begin_inset space ~
23417 \end_inset
23418
23419
23420 \begin_inset Quotes erd
23421 \end_inset
23422
23423 a+
23424 \begin_inset Quotes erd
23425 \end_inset
23426
23427 ,
23428 \begin_inset space ~
23429 \end_inset
23430
23431
23432 \begin_inset Quotes eld
23433 \end_inset
23434
23435 (i)
23436 \begin_inset Quotes erd
23437 \end_inset
23438
23439 >.
23440  
23441 \end_layout
23442
23443 \begin_layout Section
23444 Dropped Capitals
23445 \end_layout
23446
23447 \begin_layout Standard
23448 by 
23449 \noun on
23450 Mike Ressler
23451 \end_layout
23452
23453 \begin_layout Standard
23454 \begin_inset VSpace bigskip
23455 \end_inset
23456
23457
23458 \end_layout
23459
23460 \begin_layout Standard
23461 \noindent
23462 \begin_inset ERT
23463 status collapsed
23464
23465 \begin_layout Plain Layout
23466
23467
23468 \backslash
23469 newfont{
23470 \backslash
23471 tmpfont}{cmr17 scaled 2500}{
23472 \backslash
23473 tmpfont T}
23474 \backslash
23475 vspace*{-8.4ex}
23476 \end_layout
23477
23478 \end_inset
23479
23480
23481 \end_layout
23482
23483 \begin_layout Standard
23484 \noindent
23485 \begin_inset ERT
23486 status open
23487
23488 \begin_layout Plain Layout
23489
23490
23491 \backslash
23492 hangindent=3.3em 
23493 \backslash
23494 hangafter=-3
23495 \end_layout
23496
23497 \end_inset
23498
23499  hose of you who like the style of old books probably also like 
23500 \begin_inset Quotes eld
23501 \end_inset
23502
23503 dropped capitals
23504 \begin_inset Quotes erd
23505 \end_inset
23506
23507 —those large capital letters which begin each new chapter or section.
23508  Implementing them with plain LyX/LaTeX is straightforward (assuming you
23509  know some plain TeX!) but does require a lot of work and many iterations,
23510  as you can see by all the ugly TeX-mode stuff at the beginning of this
23511  paragraph.
23512 \end_layout
23513
23514 \begin_layout Standard
23515 \begin_inset ERT
23516 status open
23517
23518 \begin_layout Plain Layout
23519
23520
23521 \backslash
23522 verb+
23523 \backslash
23524 bigdrop{-1em}{3}{ptmri}{T}+
23525 \end_layout
23526
23527 \end_inset
23528
23529 here is a much easier way of doing this, of course.
23530  The 
23531 \family typewriter
23532 dropcaps
23533 \family default
23534  (or the newer 
23535 \family typewriter
23536 dropping
23537 \family default
23538 ) package from CTAN allows a simple way to add such letters to your documents.
23539  Since this package is not a standard part of TeXLive, I can't demonstrate
23540  it within this document, but if you copy this paragraph to a new document,
23541  delete the 
23542 \begin_inset Quotes eld
23543 \end_inset
23544
23545
23546 \family typewriter
23547
23548 \backslash
23549 verb
23550 \family default
23551
23552 \begin_inset Quotes erd
23553 \end_inset
23554
23555  and the pluses from the TeX code at the beginning of the paragraph, and
23556  add 
23557 \family typewriter
23558
23559 \backslash
23560 usepackage{dropcaps}
23561 \family default
23562  to your LaTeX preamble, you will get a nice Times Roman Italic 
23563 \begin_inset Quotes eld
23564 \end_inset
23565
23566 T
23567 \begin_inset Quotes erd
23568 \end_inset
23569
23570 , whose height is three lines of text and which protrudes 1 em into the
23571  margin.
23572  (Make certain you have copied 
23573 \begin_inset Quotes eld
23574 \end_inset
23575
23576
23577 \family typewriter
23578 dropcaps.sty
23579 \family default
23580
23581 \begin_inset Quotes erd
23582 \end_inset
23583
23584  into a directory where TeX can see it.) The first argument is the amount
23585  of indentation; in this case the negative sign moves it into the margin.
23586  The second argument is the height of the letter in number of lines of text.
23587  The third argument is the font name: virtually anything which has a tfm
23588  file should work (wade through the 
23589 \family typewriter
23590 .../texmf/fonts/tfm
23591 \family default
23592  directory for possibilities).
23593  My personal favorite is 
23594 \begin_inset Quotes eld
23595 \end_inset
23596
23597
23598 \family typewriter
23599 yinit
23600 \family default
23601
23602 \begin_inset Quotes erd
23603 \end_inset
23604
23605 , a fancy German font specifically designed for dropped capitals.
23606  The fourth argument is the letter (or letters) to be dropped.
23607  The 
23608 \family typewriter
23609 dropping
23610 \family default
23611  package also offers the 
23612 \family typewriter
23613
23614 \backslash
23615 bigdrop
23616 \family default
23617  command, as well as a slightly simplified 
23618 \family typewriter
23619
23620 \backslash
23621 dropping
23622 \family default
23623  command.
23624 \end_layout
23625
23626 \begin_layout Section
23627 Non-standard Paragraph Shapes
23628 \end_layout
23629
23630 \begin_layout Standard
23631 by 
23632 \noun on
23633 Mike Ressler
23634 \end_layout
23635
23636 \begin_layout Standard
23637 \begin_inset VSpace bigskip
23638 \end_inset
23639
23640
23641 \end_layout
23642
23643 \begin_layout Standard
23644 \begin_inset ERT
23645 status collapsed
23646
23647 \begin_layout Plain Layout
23648
23649
23650 \backslash
23651 begin{sloppypar}
23652 \end_layout
23653
23654 \end_inset
23655
23656
23657 \end_layout
23658
23659 \begin_layout Standard
23660 \begin_inset ERT
23661 status collapsed
23662
23663 \begin_layout Plain Layout
23664
23665
23666 \backslash
23667 newdimen
23668 \backslash
23669 varunit 
23670 \end_layout
23671
23672 \begin_layout Plain Layout
23673
23674
23675 \backslash
23676 setlength{
23677 \backslash
23678 varunit}{4.5in}
23679 \end_layout
23680
23681 \end_inset
23682
23683
23684 \end_layout
23685
23686 \begin_layout Standard
23687 \noindent
23688 \begin_inset ERT
23689 status collapsed
23690
23691 \begin_layout Plain Layout
23692
23693
23694 \backslash
23695 parshape 19 0.45
23696 \backslash
23697 varunit 0.332
23698 \backslash
23699 varunit
23700 \end_layout
23701
23702 \begin_layout Plain Layout
23703
23704 0.40
23705 \backslash
23706 varunit 0.300
23707 \backslash
23708 varunit
23709 \end_layout
23710
23711 \begin_layout Plain Layout
23712
23713 0.35
23714 \backslash
23715 varunit 0.293
23716 \backslash
23717 varunit
23718 \end_layout
23719
23720 \begin_layout Plain Layout
23721
23722 0.30
23723 \backslash
23724 varunit 0.300
23725 \backslash
23726 varunit
23727 \end_layout
23728
23729 \begin_layout Plain Layout
23730
23731 0.25
23732 \backslash
23733 varunit 0.317
23734 \backslash
23735 varunit
23736 \end_layout
23737
23738 \begin_layout Plain Layout
23739
23740 0.20
23741 \backslash
23742 varunit 0.342
23743 \backslash
23744 varunit
23745 \end_layout
23746
23747 \begin_layout Plain Layout
23748
23749 0.15
23750 \backslash
23751 varunit 0.373
23752 \backslash
23753 varunit
23754 \end_layout
23755
23756 \begin_layout Plain Layout
23757
23758 0.10
23759 \backslash
23760 varunit 0.410
23761 \backslash
23762 varunit
23763 \end_layout
23764
23765 \begin_layout Plain Layout
23766
23767 0.05
23768 \backslash
23769 varunit 0.453
23770 \backslash
23771 varunit
23772 \end_layout
23773
23774 \begin_layout Plain Layout
23775
23776 0.00
23777 \backslash
23778 varunit 0.500
23779 \backslash
23780 varunit
23781 \end_layout
23782
23783 \begin_layout Plain Layout
23784
23785 0.05
23786 \backslash
23787 varunit 0.453
23788 \backslash
23789 varunit
23790 \end_layout
23791
23792 \begin_layout Plain Layout
23793
23794 0.10
23795 \backslash
23796 varunit 0.410
23797 \backslash
23798 varunit
23799 \end_layout
23800
23801 \begin_layout Plain Layout
23802
23803 0.15
23804 \backslash
23805 varunit 0.373
23806 \backslash
23807 varunit
23808 \end_layout
23809
23810 \begin_layout Plain Layout
23811
23812 0.20
23813 \backslash
23814 varunit 0.342
23815 \backslash
23816 varunit
23817 \end_layout
23818
23819 \begin_layout Plain Layout
23820
23821 0.25
23822 \backslash
23823 varunit 0.317
23824 \backslash
23825 varunit
23826 \end_layout
23827
23828 \begin_layout Plain Layout
23829
23830 0.30
23831 \backslash
23832 varunit 0.300
23833 \backslash
23834 varunit
23835 \end_layout
23836
23837 \begin_layout Plain Layout
23838
23839 0.35
23840 \backslash
23841 varunit 0.293
23842 \backslash
23843 varunit
23844 \end_layout
23845
23846 \begin_layout Plain Layout
23847
23848 0.40
23849 \backslash
23850 varunit 0.300
23851 \backslash
23852 varunit
23853 \end_layout
23854
23855 \begin_layout Plain Layout
23856
23857 0.45
23858 \backslash
23859 varunit 0.332
23860 \backslash
23861 varunit
23862 \end_layout
23863
23864 \begin_layout Plain Layout
23865
23866 \end_layout
23867
23868 \end_inset
23869
23870 There are times when the tyranny of rectangular paragraphs must be overthrown.
23871  In such situations, a call to the delightful plain TeX command 
23872 \family typewriter
23873
23874 \backslash
23875 parshape
23876 \family default
23877  is called for.
23878  As you can see, completely arbitrary shapes can be laid out with a suitable
23879  set of linelength definitions.
23880  While this parshape may look a bit silly and useless, one could conceive
23881  of situations such as finely tuned dropped capitals, word wrapping around
23882  non-rectangular graphics, etc.
23883  which will benefit from such handcrafting.
23884 \end_layout
23885
23886 \begin_layout Standard
23887 \begin_inset VSpace bigskip
23888 \end_inset
23889
23890
23891 \end_layout
23892
23893 \begin_layout Standard
23894 The syntax is 
23895 \family typewriter
23896
23897 \backslash
23898 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23899  #nindent #nlength
23900 \family default
23901 , where 
23902 \family typewriter
23903 numlines
23904 \family default
23905  is the number of lines of text which define the paragraph.
23906  If there turn out to be fewer lines, the shape is truncated; if there are
23907  more, the excess lines have the same dimensions as the last line of the
23908  definition.
23909  The 
23910 \family typewriter
23911 #nindent
23912 \family default
23913  and 
23914 \family typewriter
23915 #nlength
23916 \family default
23917  entries specify the indentation of the line from the left margin, and the
23918  length of the line as measured from that point.
23919  The shape applies only to the current paragraph; everything is reset to
23920  normal for the next paragraph.
23921 \end_layout
23922
23923 \begin_layout Standard
23924 \begin_inset ERT
23925 status collapsed
23926
23927 \begin_layout Plain Layout
23928
23929
23930 \backslash
23931 end{sloppypar}
23932 \end_layout
23933
23934 \end_inset
23935
23936
23937 \end_layout
23938
23939 \begin_layout Section
23940 Summary
23941 \end_layout
23942
23943 \begin_layout Standard
23944 As you can see, the examples in this section range from the useful to the
23945  whimsical.
23946  While I don't expect that anyone will ever need the paragraph shape demonstrate
23947 d in the last section, the important point is that you can do almost anything
23948  you want in LyX if you are willing to figure out how to do it in TeX and
23949  LaTeX.
23950  TeX is a fantastically powerful typesetting system and all that power is
23951  available to you since LyX uses it as its backend.
23952  Happy LyXing!
23953 \end_layout
23954
23955 \end_body
23956 \end_document