]> git.lyx.org Git - features.git/blob - lib/doc/Additional.lyx
Small clarification about 'LyX Archives'
[features.git] / lib / doc / Additional.lyx
1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
2 \lyxformat 413
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 \language_package default
72 \inputencoding latin1
73 \fontencoding global
74 \font_roman default
75 \font_sans default
76 \font_typewriter default
77 \font_default_family default
78 \use_non_tex_fonts false
79 \font_sc false
80 \font_osf false
81 \font_sf_scale 100
82 \font_tt_scale 100
83
84 \graphics default
85 \default_output_format default
86 \output_sync 0
87 \bibtex_command default
88 \index_command default
89 \paperfontsize 12
90 \spacing single
91 \use_hyperref true
92 \pdf_title "LyX's Additional Features manual"
93 \pdf_author "LyX Team"
94 \pdf_subject "LyX's additional features documentation"
95 \pdf_keywords "LyX, Documentation, Additional"
96 \pdf_bookmarks true
97 \pdf_bookmarksnumbered true
98 \pdf_bookmarksopen false
99 \pdf_bookmarksopenlevel 1
100 \pdf_breaklinks false
101 \pdf_pdfborder false
102 \pdf_colorlinks true
103 \pdf_backref false
104 \pdf_pdfusetitle false
105 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,  pdfpagelayout=OneColumn, pdfnewwindow=true,  pdfstartview=XYZ, plainpages=false, pdfpagelabels"
106 \papersize default
107 \use_geometry false
108 \use_amsmath 0
109 \use_esint 0
110 \use_mhchem 1
111 \use_mathdots 1
112 \cite_engine basic
113 \use_bibtopic false
114 \use_indices false
115 \paperorientation portrait
116 \suppress_date false
117 \use_refstyle 0
118 \index Index
119 \shortcut idx
120 \color #008000
121 \end_index
122 \secnumdepth 3
123 \tocdepth 3
124 \paragraph_separation indent
125 \paragraph_indentation default
126 \quotes_language english
127 \papercolumns 1
128 \papersides 2
129 \paperpagestyle headings
130 \tracking_changes true
131 \output_changes false
132 \html_math_output 0
133 \html_css_as_file 0
134 \html_be_strict true
135 \author 711066561 "Enrico Forestieri" 
136 \author 1414654397 "Richard Heck" 
137 \end_header
138
139 \begin_body
140
141 \begin_layout Title
142 Additional LyX Features
143 \end_layout
144
145 \begin_layout Author
146 by the LyX Team
147 \begin_inset Foot
148 status collapsed
149
150 \begin_layout Plain Layout
151 \noindent
152 Principal maintainer of this file is
153 \noun on
154  Richard Heck
155 \noun default
156 .
157  If you have comments or error corrections, please send them to the LyX
158  Documentation mailing list, 
159 \begin_inset Flex Code
160 status collapsed
161
162 \begin_layout Plain Layout
163 \noindent
164 <lyx-docs@lists.lyx.org>
165 \end_layout
166
167 \end_inset
168
169 .
170 \end_layout
171
172 \end_inset
173
174  
175 \end_layout
176
177 \begin_layout Standard
178 \begin_inset CommandInset toc
179 LatexCommand tableofcontents
180
181 \end_inset
182
183
184 \end_layout
185
186 \begin_layout Chapter
187 Introduction
188 \end_layout
189
190 \begin_layout Standard
191 This manual is essentially Part II of the 
192 \emph on
193 User's Guide\SpecialChar \@.
194
195 \emph default
196  The reason for separating this document out is simple: the 
197 \emph on
198 User's Guide
199 \emph default
200  is already quite lengthy, and it contains information on all of the basic
201  features one needs to know in order to prepare most documents.
202  However, the LyX Team has worked to make LyX extensible through various
203  configuration files and external packages.
204  That means that if you want to support the Fizzwizzle LaTeX package, you
205  can create a layout file (or module) for it without having to alter LyX
206  itself.
207  We've already had contributions of several new features this way, and some
208  of them are documented here.
209  There are also some more `advanced' features, such as how to control the
210  presentation of bibliographies and how to work with multi-part documents,
211  that are not covered in the 
212 \emph on
213 User's Guide
214 \emph default
215  and are discussed here.
216 \end_layout
217
218 \begin_layout Standard
219 This manual also documents some special features, like fax support, version
220  control, and SGML support, which require additional software to work properly.
221  There is also a chapter on LyX's support for HTML.
222  And lastly, there's a chapter of LaTeX tools and tips, things you can use
223  to spruce up your documents by directly using the powerful features of
224  LaTeX.
225  After all, LyX 
226 \emph on
227 is
228 \emph default
229  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
230 \end_layout
231
232 \begin_layout Standard
233 If you haven't read the 
234 \emph on
235 Introduction
236 \emph default
237  yet, you are definitely in the wrong manual.
238  The 
239 \emph on
240 Introduction
241 \emph default
242  is the first place to go, since it describes the notation and format of
243  all of the manuals.
244  You should also be thoroughly familiar with the 
245 \emph on
246 User's Guide
247 \emph default
248  and all of the basic features of LyX before attempting to read this one.
249 \end_layout
250
251 \begin_layout Standard
252 Since many of the topics in this manual depend heavily on LyX's interaction
253  with LaTeX, this first chapter covers the inner workings of LyX and how
254  to direct LyX to generate exactly the LaTeX code you want.
255  It is obviously for more seasoned LyX users.
256 \end_layout
257
258 \begin_layout Chapter
259 LyX and LaTeX
260 \end_layout
261
262 \begin_layout Section
263 How LyX Uses LaTeX
264 \end_layout
265
266 \begin_layout Standard
267 This chapter is for both TeX-nicians and the LaTeX-curious.
268  In it, we'll explain how LyX and LaTeX work together to produce printable
269  output.
270  This is the only place in any of the manuals where we assume you know something
271  about LaTeX.
272 \end_layout
273
274 \begin_layout Standard
275 At one time, LyX was called a 
276 \begin_inset Quotes eld
277 \end_inset
278
279 WYSIWYM frontend to LaTeX,
280 \begin_inset Quotes erd
281 \end_inset
282
283  but that's no longer true.
284  There are frontends to LaTeX out there.
285 \begin_inset Foot
286 status collapsed
287
288 \begin_layout Plain Layout
289 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
290  There are also the LaTeX modes for vi and emacs, of course.
291 \end_layout
292
293 \end_inset
294
295  These are basically text editors with the ability to run LaTeX and mark
296  any errors in the file you're editing.
297  Although LyX 
298 \emph on
299 is
300 \emph default
301  an editor, and it 
302 \emph on
303 does
304 \emph default
305  run LaTeX, and it also indicates errors in the file, it also does much,
306  much more.
307  For one thing, you don't need to know LaTeX to use LyX effectively.
308  And LyX has added its own extensions to LaTeX.
309  Try the following sometime: select 
310 \begin_inset Flex MenuItem
311 status collapsed
312
313 \begin_layout Plain Layout
314 Export\SpecialChar \menuseparator
315 LaTeX
316 \end_layout
317
318 \end_inset
319
320  from the 
321 \begin_inset Flex MenuItem
322 status collapsed
323
324 \begin_layout Plain Layout
325 File
326 \end_layout
327
328 \end_inset
329
330  menu (or 
331 \begin_inset Flex MenuItem
332 status collapsed
333
334 \begin_layout Plain Layout
335 View\SpecialChar \menuseparator
336 Source
337 \end_layout
338
339 \end_inset
340
341 ), then look at the preamble of the resulting 
342 \begin_inset Flex Code
343 status collapsed
344
345 \begin_layout Plain Layout
346 .tex
347 \end_layout
348
349 \end_inset
350
351  file.
352  You'll notice a variety of new macros defined specifically by LyX.
353  These macros are defined automatically, according to the features you use
354  in the document.
355 \end_layout
356
357 \begin_layout Standard
358 There are several commands that automatically invoke LaTeX.
359  They are:
360 \end_layout
361
362 \begin_layout Itemize
363 \begin_inset Flex MenuItem
364 status collapsed
365
366 \begin_layout Plain Layout
367 View\SpecialChar \menuseparator
368 Format
369 \end_layout
370
371 \end_inset
372
373
374 \end_layout
375
376 \begin_layout Itemize
377 \begin_inset Flex MenuItem
378 status collapsed
379
380 \begin_layout Plain Layout
381 View\SpecialChar \menuseparator
382 Update\SpecialChar \menuseparator
383 Format
384 \end_layout
385
386 \end_inset
387
388
389 \end_layout
390
391 \begin_layout Itemize
392 \begin_inset Flex MenuItem
393 status collapsed
394
395 \begin_layout Plain Layout
396 File\SpecialChar \menuseparator
397 Print
398 \end_layout
399
400 \end_inset
401
402
403 \end_layout
404
405 \begin_layout Itemize
406 \begin_inset Flex MenuItem
407 status collapsed
408
409 \begin_layout Plain Layout
410 File\SpecialChar \menuseparator
411 Fax
412 \end_layout
413
414 \end_inset
415
416
417 \end_layout
418
419 \begin_layout Standard
420 They will only invoke LaTeX if the file has changed since the last time
421  LaTeX was run.
422  
423 \end_layout
424
425 \begin_layout Standard
426 When LyX runs LaTeX on the file you're editing, it performs these steps:
427 \end_layout
428
429 \begin_layout Enumerate
430 Convert the document to LaTeX and save to a file with the extension 
431 \begin_inset Flex Code
432 status collapsed
433
434 \begin_layout Plain Layout
435 .tex
436 \end_layout
437
438 \end_inset
439
440  in place of 
441 \begin_inset Flex Code
442 status collapsed
443
444 \begin_layout Plain Layout
445 .lyx
446 \end_layout
447
448 \end_inset
449
450 .
451 \end_layout
452
453 \begin_layout Enumerate
454 Run LaTeX on the 
455 \begin_inset Flex Code
456 status collapsed
457
458 \begin_layout Plain Layout
459 .tex
460 \end_layout
461
462 \end_inset
463
464  file (maybe several times), and run any other commands (such as 
465 \begin_inset Flex Code
466 status collapsed
467
468 \begin_layout Plain Layout
469 bibtex
470 \end_layout
471
472 \end_inset
473
474  or 
475 \begin_inset Flex Code
476 status collapsed
477
478 \begin_layout Plain Layout
479 makeindex
480 \end_layout
481
482 \end_inset
483
484 ) needed to compile the LaTeX file.
485 \end_layout
486
487 \begin_layout Enumerate
488 If there are any errors, show the error log.
489 \end_layout
490
491 \begin_layout Standard
492 If you've run LaTeX using 
493 \begin_inset Flex MenuItem
494 status collapsed
495
496 \begin_layout Plain Layout
497 View
498 \bar under
499 \SpecialChar \menuseparator
500
501 \bar default
502 DVI
503 \end_layout
504
505 \end_inset
506
507 , LyX then runs a DVI viewer to display the DVI-file.
508  If you've used 
509 \begin_inset Flex MenuItem
510 status collapsed
511
512 \begin_layout Plain Layout
513 View
514 \bar under
515 \SpecialChar \menuseparator
516
517 \bar default
518 PostScript
519 \end_layout
520
521 \end_inset
522
523 , LyX performs further steps:
524 \end_layout
525
526 \begin_layout Itemize
527 Run 
528 \begin_inset Flex Code
529 status collapsed
530
531 \begin_layout Plain Layout
532 dvips
533 \end_layout
534
535 \end_inset
536
537  to convert the DVI file to PostScript.
538 \end_layout
539
540 \begin_layout Itemize
541 Run a PostScript viewer, such as 
542 \begin_inset Flex Code
543 status collapsed
544
545 \begin_layout Plain Layout
546 ghostview
547 \end_layout
548
549 \end_inset
550
551 , to display the PostScript file.
552 \end_layout
553
554 \begin_layout Standard
555 LyX does similar things when viewing, or exporting, other formats.
556 \end_layout
557
558 \begin_layout Section
559 Translating LaTeX files into LyX
560 \end_layout
561
562 \begin_layout Standard
563 You can import a LaTeX file into LyX by using the 
564 \begin_inset Flex MenuItem
565 status collapsed
566
567 \begin_layout Plain Layout
568 File\SpecialChar \menuseparator
569 Import\SpecialChar \menuseparator
570 LaTeX
571 \end_layout
572
573 \end_inset
574
575  command in LyX.
576  This will call a program named 
577 \begin_inset Flex Code
578 status collapsed
579
580 \begin_layout Plain Layout
581 tex2lyx
582 \end_layout
583
584 \end_inset
585
586  which will create a file 
587 \begin_inset Flex Code
588 status collapsed
589
590 \begin_layout Plain Layout
591 foo.lyx
592 \end_layout
593
594 \end_inset
595
596  from the file 
597 \begin_inset Flex Code
598 status collapsed
599
600 \begin_layout Plain Layout
601 foo.tex
602 \end_layout
603
604 \end_inset
605
606 .
607  LyX will then open that file.
608 \begin_inset Foot
609 status collapsed
610
611 \begin_layout Plain Layout
612 \begin_inset Flex Code
613 status collapsed
614
615 \begin_layout Plain Layout
616 tex2lyx
617 \end_layout
618
619 \end_inset
620
621  can also be run from the command line, of course.
622 \end_layout
623
624 \end_inset
625
626
627 \end_layout
628
629 \begin_layout Standard
630 \begin_inset Flex Code
631 status collapsed
632
633 \begin_layout Plain Layout
634 tex2lyx
635 \end_layout
636
637 \end_inset
638
639  will translate most legal LaTeX, but not everything.
640  It will put things it doesn't understand into TeX code, so after translating
641  a file with 
642 \begin_inset Flex Code
643 status collapsed
644
645 \begin_layout Plain Layout
646 tex2lyx
647 \end_layout
648
649 \end_inset
650
651 , you can look for TeX code and hand-edit it until it looks right.
652 \end_layout
653
654 \begin_layout Standard
655 If you don't know what TeX code is, read the next section.
656 \end_layout
657
658 \begin_layout Section
659 \begin_inset CommandInset label
660 LatexCommand label
661 name "sec:Inserting-TeX-Code"
662
663 \end_inset
664
665 Inserting TeX Code into LyX Documents 
666 \end_layout
667
668 \begin_layout Standard
669 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
670  You can always insert TeX code into any LyX document.
671  LyX cannot, and will never be able to, display every possible LaTeX construct.
672  If ever you need to insert LaTeX commands into your LyX document, you can
673  use the 
674 \begin_inset Flex Code
675 status collapsed
676
677 \begin_layout Plain Layout
678 TeX Code
679 \end_layout
680
681 \end_inset
682
683  box, which you can insert into your document with 
684 \begin_inset Flex MenuItem
685 status collapsed
686
687 \begin_layout Plain Layout
688 Insert\SpecialChar \menuseparator
689 TeX Code
690 \end_layout
691
692 \end_inset
693
694 .
695 \end_layout
696
697 \begin_layout Standard
698 Here's an example of inserting LaTeX commands in a LyX document.
699  The code looks like this:
700 \end_layout
701
702 \begin_layout LyX-Code
703
704 \backslash
705 begin{tabular}{ll}
706 \begin_inset Newline newline
707 \end_inset
708
709
710 \backslash
711 begin{minipage}{5cm}
712 \begin_inset Newline newline
713 \end_inset
714
715 This is an example for a minipage environment.
716  You 
717 \begin_inset Newline newline
718 \end_inset
719
720 can put nearly everything in it, even (non-floating) 
721 \begin_inset Newline newline
722 \end_inset
723
724 figures and tables.
725  
726 \begin_inset Newline newline
727 \end_inset
728
729
730 \backslash
731 end{minipage}
732 \begin_inset Newline newline
733 \end_inset
734
735 &
736 \begin_inset Newline newline
737 \end_inset
738
739
740 \backslash
741 begin{minipage}{5cm}
742 \begin_inset Newline newline
743 \end_inset
744
745
746 \backslash
747 begin{verbatim}
748 \begin_inset Newline newline
749 \end_inset
750
751
752 \backslash
753 begin{minipage}{5cm}
754 \begin_inset Newline newline
755 \end_inset
756
757 This ...
758  
759 \begin_inset Newline newline
760 \end_inset
761
762
763 \backslash
764 end{minipage}
765 \begin_inset Newline newline
766 \end_inset
767
768
769 \backslash
770 end{verbatim}
771 \begin_inset Newline newline
772 \end_inset
773
774
775 \backslash
776 end{minipage}
777 \begin_inset Newline newline
778 \end_inset
779
780
781 \backslash
782 end{tabular}
783 \end_layout
784
785 \begin_layout LyX-Code
786
787 \end_layout
788
789 \begin_layout Standard
790 The 
791 \begin_inset Flex Code
792 status collapsed
793
794 \begin_layout Plain Layout
795 TeX Code
796 \end_layout
797
798 \end_inset
799
800  box containing this text is directly after this paragraph.
801  Those of you reading the manual in LyX will only see the TeX code inset.
802  Those reading a printed version of the manuals will see the actual results:
803 \end_layout
804
805 \begin_layout Standard
806 \begin_inset ERT
807 status collapsed
808
809 \begin_layout Plain Layout
810
811
812 \backslash
813 begin{tabular}{ll}
814 \end_layout
815
816 \begin_layout Plain Layout
817
818
819 \backslash
820 begin{minipage}{5cm}
821 \end_layout
822
823 \begin_layout Plain Layout
824
825 This is an example for a minipage environment.
826  You can put nearly everything in it, even (non-floating) figures and tables.
827  
828 \end_layout
829
830 \begin_layout Plain Layout
831
832
833 \backslash
834 end{minipage}
835 \end_layout
836
837 \begin_layout Plain Layout
838
839 &
840 \end_layout
841
842 \begin_layout Plain Layout
843
844
845 \backslash
846 begin{minipage}{5cm}
847 \end_layout
848
849 \begin_layout Plain Layout
850
851
852 \backslash
853 begin{verbatim}
854 \end_layout
855
856 \begin_layout Plain Layout
857
858
859 \backslash
860 begin{minipage}{5cm}
861 \end_layout
862
863 \begin_layout Plain Layout
864
865 This ...
866  
867 \end_layout
868
869 \begin_layout Plain Layout
870
871
872 \backslash
873 end{minipage}
874 \end_layout
875
876 \begin_layout Plain Layout
877
878
879 \backslash
880 end{verbatim}
881 \end_layout
882
883 \begin_layout Plain Layout
884
885
886 \backslash
887 end{minipage}
888 \end_layout
889
890 \begin_layout Plain Layout
891
892
893 \backslash
894 end{tabular}
895 \end_layout
896
897 \end_inset
898
899
900 \end_layout
901
902 \begin_layout Standard
903 In addition to using TeX code, you can also create a separate file containing
904  some complex LaTeX structure and then use 
905 \begin_inset Flex MenuItem
906 status collapsed
907
908 \begin_layout Plain Layout
909 Insert\SpecialChar \menuseparator
910 Child
911 \begin_inset space ~
912 \end_inset
913
914 Document
915 \end_layout
916
917 \end_inset
918
919  to include your file (you should select the type 
920 \begin_inset Flex Code
921 status collapsed
922
923 \begin_layout Plain Layout
924 Input
925 \end_layout
926
927 \end_inset
928
929 ).
930  We recommend that you only do this if you have a 
931 \begin_inset Flex Code
932 status collapsed
933
934 \begin_layout Plain Layout
935 .tex
936 \end_layout
937
938 \end_inset
939
940  file which you 
941 \emph on
942 know
943 \emph default
944  works already.
945  Otherwise, you'll have a big job tracking down LaTeX errors.
946 \end_layout
947
948 \begin_layout Standard
949 There are a few last points to emphasize:
950 \end_layout
951
952 \begin_layout Itemize
953 LyX 
954 \emph on
955 does not
956 \emph default
957  check if your LaTeX code is correct.
958 \end_layout
959
960 \begin_layout Itemize
961 Beware reinventing the wheel.
962 \end_layout
963
964 \begin_layout Standard
965 On that last point, LyX does have quite a few features tucked into it, and
966  more are coming.
967  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
968  feature before you decide you have to do it by hand.
969  Moreover, there are numerous LaTeX packages out there to do all sorts of
970  things, from labels to envelopes to fancy multipage tables.
971  Check out 
972 \begin_inset CommandInset href
973 LatexCommand href
974 name "CTAN"
975 target "http://www.ctan.org/"
976
977 \end_inset
978
979  for details, and see chapter 
980 \begin_inset CommandInset ref
981 LatexCommand ref
982 reference "cha:secrets"
983
984 \end_inset
985
986 .
987 \end_layout
988
989 \begin_layout Standard
990 If you do need to do some wild and fancy things within your document, be
991  sure to check out a good LaTeX book for assistance.
992  There are a number of them listed in the bibliography of the 
993 \emph on
994 User's Guide
995 \emph default
996 .
997 \end_layout
998
999 \begin_layout Section
1000 LyX and the LaTeX Preamble
1001 \end_layout
1002
1003 \begin_layout Subsection
1004 About the LaTeX Preamble
1005 \end_layout
1006
1007 \begin_layout Standard
1008 If you already know LaTeX, there is no need to explain here what the preamble
1009  is good for.
1010  If you don't, the following will give you some ideas—we recommend again
1011  that you consult a LaTeX book for further information.
1012  In any case, you should read the points below, because they explain what
1013  you can do and what you don't need to do in the LaTeX preamble of a LyX
1014  document.
1015 \end_layout
1016
1017 \begin_layout Standard
1018 The LaTeX preamble comes at the very beginning of a document, 
1019 \emph on
1020 before
1021 \emph default
1022  the text.
1023  It serves to:
1024 \end_layout
1025
1026 \begin_layout Itemize
1027 Declare the document class.
1028  
1029 \begin_inset Newline newline
1030 \end_inset
1031
1032 LyX already does this for you.
1033  If you're a seasoned LaTeX-nician, and you have a custom document class
1034  you want to use, check out the 
1035 \emph on
1036 Customization Manual
1037 \emph default
1038  for information on how to make LyX interface to it.
1039 \end_layout
1040
1041 \begin_layout Itemize
1042 Declare the usage of packages.
1043  
1044 \begin_inset Newline newline
1045 \end_inset
1046
1047 LaTeX packages provide special commands, which are only available within
1048  a document when the package has been declared in the preamble.
1049  For example, the package 
1050 \begin_inset Flex Code
1051 status collapsed
1052
1053 \begin_layout Plain Layout
1054 indentfirst
1055 \end_layout
1056
1057 \end_inset
1058
1059  forces all paragraphs to be indented.
1060  There are other packages for labels, envelopes, margins, etc.
1061  
1062 \end_layout
1063
1064 \begin_layout Itemize
1065 Set counters, variables, lengths and widths.
1066  
1067 \begin_inset Newline newline
1068 \end_inset
1069
1070 There are several LaTeX counters and variables which 
1071 \emph on
1072 must
1073 \emph default
1074  be set globally from within the preamble in order to have the desired effect.
1075  (There are variables which you can set and reset inside the document, too.)
1076  Margins are a good example of something which must be set in the preamble.
1077  Another example is the label format for lists.
1078  You can actually set these just about anywhere, but it's best to do it
1079  just once, inside the preamble.
1080 \end_layout
1081
1082 \begin_layout Itemize
1083 Declare user defined commands (with 
1084 \begin_inset Flex Code
1085 status collapsed
1086
1087 \begin_layout Plain Layout
1088
1089 \backslash
1090 newcommand
1091 \end_layout
1092
1093 \end_inset
1094
1095  or 
1096 \begin_inset Flex Code
1097 status collapsed
1098
1099 \begin_layout Plain Layout
1100
1101 \backslash
1102 renewcommand
1103 \end_layout
1104
1105 \end_inset
1106
1107 ).
1108 \begin_inset Newline newline
1109 \end_inset
1110
1111 These are abbreviations for LaTeX commands which appear very often inside
1112  a document.
1113  Although the preamble is a good place to declare such commands, they 
1114 \emph on
1115 can
1116 \emph default
1117  be declared anywhere (before they are used for the first time, of course).
1118  This can be useful if there is a lot of raw LaTeX code in your document,
1119  which normally should not be the case.
1120 \end_layout
1121
1122 \begin_layout Standard
1123 LyX adds its own set of definitions to the preamble of the 
1124 \begin_inset Flex Code
1125 status collapsed
1126
1127 \begin_layout Plain Layout
1128 .tex
1129 \end_layout
1130
1131 \end_inset
1132
1133  file it produces.
1134  This makes LaTeX files generated by LyX portable.
1135 \end_layout
1136
1137 \begin_layout Subsection
1138 Changing the Preamble
1139 \end_layout
1140
1141 \begin_layout Standard
1142 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1143  can't change them without patching LyX itself.
1144  You can, however, add your own stuff to the preamble by selecting 
1145 \begin_inset Flex MenuItem
1146 status collapsed
1147
1148 \begin_layout Plain Layout
1149 LaTeX
1150 \begin_inset space ~
1151 \end_inset
1152
1153 Preamble
1154 \end_layout
1155
1156 \end_inset
1157
1158  in the 
1159 \begin_inset Flex MenuItem
1160 status collapsed
1161
1162 \begin_layout Plain Layout
1163 Document\SpecialChar \menuseparator
1164 Settings
1165 \end_layout
1166
1167 \end_inset
1168
1169  dialog.
1170  LyX adds anything in the 
1171 \begin_inset Flex MenuItem
1172 status collapsed
1173
1174 \begin_layout Plain Layout
1175 Preamble
1176 \end_layout
1177
1178 \end_inset
1179
1180  dialog to its own built-in preamble.
1181  Before adding your own declarations in the preamble, you should make sure
1182  that LyX doesn't already support what you want to do.
1183  (Remember what we said about reinventing the wheel?) Also, 
1184 \emph on
1185 make sure your preamble code is correct
1186 \emph default
1187 .
1188  LyX doesn't check it for you.
1189  If there is an error, you're likely to get an error like 
1190 \begin_inset Quotes eld
1191 \end_inset
1192
1193
1194 \begin_inset Flex Code
1195 status collapsed
1196
1197 \begin_layout Plain Layout
1198 Missing 
1199 \backslash
1200 begin{document}
1201 \end_layout
1202
1203 \end_inset
1204
1205
1206 \begin_inset Quotes erd
1207 \end_inset
1208
1209 .
1210  If you see this error, check your preamble.
1211 \end_layout
1212
1213 \begin_layout Subsection
1214 Examples
1215 \end_layout
1216
1217 \begin_layout Standard
1218 Here are some examples of what you can add to a preamble, and what they
1219  do.
1220 \end_layout
1221
1222 \begin_layout Subsubsection
1223 Example #1: Offsets
1224 \end_layout
1225
1226 \begin_layout Standard
1227 There are two variables under LaTeX that control page position: 
1228 \begin_inset Flex Code
1229 status collapsed
1230
1231 \begin_layout Plain Layout
1232
1233 \backslash
1234 hoffset
1235 \end_layout
1236
1237 \end_inset
1238
1239  and 
1240 \begin_inset Flex Code
1241 status collapsed
1242
1243 \begin_layout Plain Layout
1244
1245 \backslash
1246 voffset
1247 \end_layout
1248
1249 \end_inset
1250
1251 .
1252  Their names should be self-explanatory.
1253  These variables are useful if you think for a moment about computer labels.
1254  Sometimes, the size of a print medium and the area of the medium that you
1255  can actually print on aren't the same.
1256  This is where 
1257 \begin_inset Flex Code
1258 status collapsed
1259
1260 \begin_layout Plain Layout
1261
1262 \backslash
1263 hoffset
1264 \end_layout
1265
1266 \end_inset
1267
1268  and 
1269 \begin_inset Flex Code
1270 status collapsed
1271
1272 \begin_layout Plain Layout
1273
1274 \backslash
1275 voffset
1276 \end_layout
1277
1278 \end_inset
1279
1280  come in.
1281 \end_layout
1282
1283 \begin_layout Standard
1284 The default values for 
1285 \begin_inset Flex Code
1286 status collapsed
1287
1288 \begin_layout Plain Layout
1289
1290 \backslash
1291 hoffset
1292 \end_layout
1293
1294 \end_inset
1295
1296  and 
1297 \begin_inset Flex Code
1298 status collapsed
1299
1300 \begin_layout Plain Layout
1301
1302 \backslash
1303 voffset
1304 \end_layout
1305
1306 \end_inset
1307
1308  are both 0
1309 \begin_inset space \thinspace{}
1310 \end_inset
1311
1312 points, i.
1313 \begin_inset space \thinspace{}
1314 \end_inset
1315
1316 e.
1317 \begin_inset space \space{}
1318 \end_inset
1319
1320 the page isn't shifted.
1321  Unfortunately, some DVI drivers always seem to shift the page.
1322  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1323  If you're using LyX on a system that you don't personally maintain, and
1324  your sysadmin is a doofus, 
1325 \begin_inset Flex Code
1326 status collapsed
1327
1328 \begin_layout Plain Layout
1329
1330 \backslash
1331 hoffset
1332 \end_layout
1333
1334 \end_inset
1335
1336  and 
1337 \begin_inset Flex Code
1338 status collapsed
1339
1340 \begin_layout Plain Layout
1341
1342 \backslash
1343 voffset
1344 \end_layout
1345
1346 \end_inset
1347
1348  can save the day.
1349  Suppose your left and top margins are always 0.5
1350 \begin_inset space \thinspace{}
1351 \end_inset
1352
1353 inches too big.
1354  You can add this to the preamble:
1355 \end_layout
1356
1357 \begin_layout LyX-Code
1358
1359 \backslash
1360 setlength{
1361 \backslash
1362 hoffset}{-0.5 in}
1363 \end_layout
1364
1365 \begin_layout LyX-Code
1366
1367 \backslash
1368 setlength{
1369 \backslash
1370 voffset}{-0.5 in}
1371 \end_layout
1372
1373 \begin_layout Standard
1374 and your margins should now be correct.
1375 \end_layout
1376
1377 \begin_layout Subsubsection
1378 Example #2: Labels
1379 \end_layout
1380
1381 \begin_layout Standard
1382 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1383  There's a rather nice package, available at your nearest CTAN archive,
1384  for printing sheets of labels: 
1385 \begin_inset Flex Code
1386 status collapsed
1387
1388 \begin_layout Plain Layout
1389 labels.sty
1390 \end_layout
1391
1392 \end_inset
1393
1394 .
1395  Now, your system may not have this package installed by default.
1396  We leave that up to you to check.
1397  You'll also want to read the documentation for it; we're not going to do
1398  that for you.
1399  Since this is an example, however, we'll give you an example of how you
1400  use this package.
1401 \end_layout
1402
1403 \begin_layout Standard
1404 First, make sure you're using the 
1405 \begin_inset Flex Code
1406 status collapsed
1407
1408 \begin_layout Plain Layout
1409 article
1410 \end_layout
1411
1412 \end_inset
1413
1414  document class.
1415  Next, you need to put the following in your preamble:
1416 \end_layout
1417
1418 \begin_layout LyX-Code
1419
1420 \backslash
1421 usepackage{labels}
1422 \end_layout
1423
1424 \begin_layout LyX-Code
1425
1426 \backslash
1427 LabelCols=3
1428 \end_layout
1429
1430 \begin_layout LyX-Code
1431
1432 \backslash
1433 LabelRows=7
1434 \end_layout
1435
1436 \begin_layout LyX-Code
1437
1438 \backslash
1439 LeftBorder=8mm
1440 \end_layout
1441
1442 \begin_layout LyX-Code
1443
1444 \backslash
1445 RightBorder=8mm
1446 \end_layout
1447
1448 \begin_layout LyX-Code
1449
1450 \backslash
1451 TopBorder=9mm
1452 \end_layout
1453
1454 \begin_layout LyX-Code
1455
1456 \backslash
1457 BottomBorder=2mm
1458 \end_layout
1459
1460 \begin_layout Standard
1461 This sets things up for Avery label sheets, stock #5360.
1462  You're now ready to print labels, but you'll need to insert LaTeX code,
1463  placing the commands 
1464 \begin_inset Flex Code
1465 status collapsed
1466
1467 \begin_layout Plain Layout
1468
1469 \backslash
1470 begin{labels}
1471 \end_layout
1472
1473 \end_inset
1474
1475  and 
1476 \begin_inset Flex Code
1477 status collapsed
1478
1479 \begin_layout Plain Layout
1480
1481 \backslash
1482 end{labels}
1483 \end_layout
1484
1485 \end_inset
1486
1487  around each label text.
1488  This and other special features of 
1489 \begin_inset Flex Code
1490 status collapsed
1491
1492 \begin_layout Plain Layout
1493 labels.sty
1494 \end_layout
1495
1496 \end_inset
1497
1498  are explained in its documentation.
1499 \end_layout
1500
1501 \begin_layout Standard
1502 Someday, someone may write a LyX layout file to support this package directly.
1503  Maybe that someone is you.
1504 \end_layout
1505
1506 \begin_layout Subsubsection
1507 Example #3: Paragraph Indentation
1508 \end_layout
1509
1510 \begin_layout Standard
1511 Americans are trained to indent the first line of 
1512 \emph on
1513 every
1514 \emph default
1515  paragraph.
1516  As with all of their other weird quirks, most Americans will whine and
1517  moan until they can have their way and indent the first line of all paragraphs.
1518  (Yes, we're joking.
1519  (We are?) 
1520 \emph on
1521 Yeah
1522 \emph default
1523 , we are.)
1524 \end_layout
1525
1526 \begin_layout Standard
1527 Of course, this behavior isn't standard typography.
1528  In books, you typically only indent the first line of a paragraph 
1529 \emph on
1530 if
1531 \emph default
1532  it follows another one.
1533  The idea behind indenting the first line of a paragraph is to distinguish
1534  neighboring paragraphs from one another.
1535  If there is no previous paragraph—for example, if it follows a figure or
1536  is the first paragraph in a section—then there is no need for indentation.
1537  
1538 \end_layout
1539
1540 \begin_layout Standard
1541 If you're a typical American (we're still joking!), though, you don't care
1542  about such esoteric things; you want your indentation! Add this to the
1543  preamble:
1544 \end_layout
1545
1546 \begin_layout LyX-Code
1547
1548 \backslash
1549 usepackage{indentfirst}
1550 \end_layout
1551
1552 \begin_layout Standard
1553 If your TeX distribution isn't braindead, you'll have this package, and
1554  all of your paragraphs will get the indentation the Founding Fathers intended
1555  they should have.
1556 \end_layout
1557
1558 \begin_layout Subsubsection
1559 Example #4: This Document
1560 \end_layout
1561
1562 \begin_layout Standard
1563 You can also check out the preamble of this document to get an idea of some
1564  of the advanced things you can do.
1565  Also, there are more examples and an assortment of LaTeX 
1566 \begin_inset Quotes eld
1567 \end_inset
1568
1569 dirty tricks
1570 \begin_inset Quotes erd
1571 \end_inset
1572
1573  given in Chapter
1574 \begin_inset space ~
1575 \end_inset
1576
1577
1578 \begin_inset CommandInset ref
1579 LatexCommand ref
1580 reference "cha:secrets"
1581
1582 \end_inset
1583
1584 .
1585  
1586 \end_layout
1587
1588 \begin_layout Section
1589 LyX and LaTeX Errors
1590 \end_layout
1591
1592 \begin_layout Standard
1593 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1594  going.
1595  It then uses the logfile from the LaTeX run to do a post-mortem.
1596  After analyzing the logfile,LyX displays a dialog listing the errors.
1597  Clicking on any one of them will take you to the position in your LyX file
1598  where the error occurred.
1599 \begin_inset Foot
1600 status collapsed
1601
1602 \begin_layout Plain Layout
1603 Well, usually.
1604  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1605  right line.
1606  There are also cases where LaTeX reports the error on one line, but the
1607  actual error is earlier.
1608  This is not unlike forgetting a closing brace in a program: You'll get
1609  an error, but only later.
1610 \end_layout
1611
1612 \end_inset
1613
1614
1615 \end_layout
1616
1617 \begin_layout Standard
1618 Some folks also like to look at the log file directly: It is available from
1619  
1620 \begin_inset Flex MenuItem
1621 status collapsed
1622
1623 \begin_layout Plain Layout
1624 Document
1625 \bar under
1626 \SpecialChar \menuseparator
1627
1628 \bar default
1629 Latex
1630 \begin_inset space ~
1631 \end_inset
1632
1633 Log
1634 \end_layout
1635
1636 \end_inset
1637
1638 .
1639  There are some fairly common error messages and warnings.
1640  We'll cover those here.
1641  You should look at a good LaTeX book for a complete listing.
1642 \end_layout
1643
1644 \begin_layout Itemize
1645 \begin_inset Flex Code
1646 status collapsed
1647
1648 \begin_layout Plain Layout
1649 LaTeX Warning
1650 \end_layout
1651
1652 \end_inset
1653
1654
1655 \begin_inset Newline newline
1656 \end_inset
1657
1658 Anything beginning with these words is a warning message for the purpose
1659  of 
1660 \begin_inset Quotes eld
1661 \end_inset
1662
1663 debugging
1664 \begin_inset Quotes erd
1665 \end_inset
1666
1667  the LaTeX code itself.
1668  You'll get messages like this if you added or changed cross-references
1669  or bibliography entries, in which case, LaTeX is trying to tell you that
1670  you need to make another run.
1671  You can by-and-large ignore these.
1672 \end_layout
1673
1674 \begin_layout Itemize
1675 \begin_inset Flex Code
1676 status collapsed
1677
1678 \begin_layout Plain Layout
1679 LaTeX Font Warning
1680 \end_layout
1681
1682 \end_inset
1683
1684
1685 \begin_inset Newline newline
1686 \end_inset
1687
1688 Another warning message, this time about fonts which LaTeX couldn't find.
1689  The rest of the message will often say something about a replacement font
1690  that LaTeX used.
1691  You can safely ignore these, too.
1692 \end_layout
1693
1694 \begin_layout Itemize
1695 \begin_inset Flex Code
1696 status collapsed
1697
1698 \begin_layout Plain Layout
1699 Overfull 
1700 \backslash
1701 hbox
1702 \end_layout
1703
1704 \end_inset
1705
1706
1707 \begin_inset Newline newline
1708 \end_inset
1709
1710 LaTeX absolutely 
1711 \emph on
1712 loves
1713 \emph default
1714  to spew these out.
1715  They are warnings about lines that were too long and run past the right
1716  margin.
1717  Almost always, this is unnoticeable in the final output.
1718  (It can be just a point or two.) Or, only one or two characters extend past
1719  the margin.
1720  LaTeX seems to generate at least one of these messages for just about any
1721  document you write.
1722 \begin_inset Newline newline
1723 \end_inset
1724
1725 You can ignore these messages.
1726  Your eyes will tell you if there's a problem with something that's too
1727  wide; just look at the output.
1728 \begin_inset Foot
1729 status collapsed
1730
1731 \begin_layout Plain Layout
1732 You can also enable the `draft' option in 
1733 \begin_inset Flex MenuItem
1734 status collapsed
1735
1736 \begin_layout Plain Layout
1737 Document
1738 \bar under
1739 \SpecialChar \menuseparator
1740
1741 \bar default
1742 Settings
1743 \end_layout
1744
1745 \end_inset
1746
1747 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1748 \end_layout
1749
1750 \end_inset
1751
1752
1753 \end_layout
1754
1755 \begin_layout Itemize
1756 \begin_inset Flex Code
1757 status collapsed
1758
1759 \begin_layout Plain Layout
1760 Underfull 
1761 \backslash
1762 hbox
1763 \end_layout
1764
1765 \end_inset
1766
1767
1768 \begin_inset Newline newline
1769 \end_inset
1770
1771 Not quite as common as its cousin.
1772  LaTeX seems to like to print lines that are a bit too wide as opposed to
1773  ones that are a bit too narrow.
1774  We have no idea why.
1775 \end_layout
1776
1777 \begin_layout Itemize
1778 \begin_inset Flex Code
1779 status collapsed
1780
1781 \begin_layout Plain Layout
1782 Overfull 
1783 \backslash
1784 vbox
1785 \end_layout
1786
1787 \end_inset
1788
1789  and 
1790 \begin_inset Flex Code
1791 status collapsed
1792
1793 \begin_layout Plain Layout
1794 Underfull 
1795 \backslash
1796 vbox
1797 \end_layout
1798
1799 \end_inset
1800
1801
1802 \begin_inset Newline newline
1803 \end_inset
1804
1805 Warnings about troubles breaking the page.
1806  Once again, just look at the output.
1807  Your eyes will tell you where something has gone wrong.
1808 \end_layout
1809
1810 \begin_layout Itemize
1811 \begin_inset Flex Code
1812 status collapsed
1813
1814 \begin_layout Plain Layout
1815  LaTeX Error: File 
1816 \begin_inset Quotes els
1817 \end_inset
1818
1819 Xxxx
1820 \begin_inset Quotes ers
1821 \end_inset
1822
1823  not found
1824 \end_layout
1825
1826 \end_inset
1827
1828
1829 \begin_inset Newline newline
1830 \end_inset
1831
1832 The file 
1833 \begin_inset Quotes eld
1834 \end_inset
1835
1836 Xxxx
1837 \begin_inset Quotes erd
1838 \end_inset
1839
1840  isn't installed on this system.
1841  This usually appears because some package your document needs isn't installed.
1842  If you didn't touch the preamble or didn't use the 
1843 \begin_inset Flex Code
1844 status collapsed
1845
1846 \begin_layout Plain Layout
1847
1848 \backslash
1849 usepackage{}
1850 \end_layout
1851
1852 \end_inset
1853
1854  command, then one of the packages LyX tried to load is missing.
1855  Use 
1856 \begin_inset Flex MenuItem
1857 status collapsed
1858
1859 \begin_layout Plain Layout
1860 Help\SpecialChar \menuseparator
1861 LaTeX Configuration
1862 \end_layout
1863
1864 \end_inset
1865
1866  to get a list of packages that LyX knows about.
1867  This file is updated whenever you reconfigure LyX (using 
1868 \begin_inset Flex MenuItem
1869 status collapsed
1870
1871 \begin_layout Plain Layout
1872 Tools\SpecialChar \menuseparator
1873 Reconfigure
1874 \end_layout
1875
1876 \end_inset
1877
1878 ) and tells you which packages have been detected and what they do.
1879 \begin_inset Newline newline
1880 \end_inset
1881
1882 If you did use the 
1883 \begin_inset Flex Code
1884 status collapsed
1885
1886 \begin_layout Plain Layout
1887
1888 \backslash
1889 usepackage{}
1890 \end_layout
1891
1892 \end_inset
1893
1894  command and the package in question isn't installed, then you'll need to
1895  install it yourself.
1896 \end_layout
1897
1898 \begin_layout Itemize
1899 \begin_inset Flex Code
1900 status collapsed
1901
1902 \begin_layout Plain Layout
1903 LaTeX Error: Unknown option
1904 \end_layout
1905
1906 \end_inset
1907
1908
1909 \begin_inset Newline newline
1910 \end_inset
1911
1912 Error messages beginning with this are trying to tell you that you specified
1913  a bad or undefined option to a package.
1914  Check the package's documentation.
1915 \end_layout
1916
1917 \begin_layout Itemize
1918 \begin_inset Flex Code
1919 status collapsed
1920
1921 \begin_layout Plain Layout
1922 Undefined control sequence
1923 \end_layout
1924
1925 \end_inset
1926
1927
1928 \begin_inset Newline newline
1929 \end_inset
1930
1931 If you've inserted LaTeX code into your document, but made a typo, you'll
1932  get one of these.
1933  You may have forgotten to load a package.
1934  In any case, this error message usually means that you used an undefined
1935  command.
1936  
1937 \end_layout
1938
1939 \begin_layout Standard
1940 There are other error and warning messages.
1941  Some are self-explanatory.
1942  These are usually LaTeX messages.
1943  Others are downright cryptic.
1944  These are usually TeX error messages, and we really have 
1945 \emph on
1946 no clue
1947 \emph default
1948  what they mean or how to decipher them.
1949  No-one does.
1950 \end_layout
1951
1952 \begin_layout Standard
1953 There's a general sequence you should follow if you get error messages:
1954 \end_layout
1955
1956 \begin_layout Enumerate
1957 Look at the LaTeX code you inserted for typos.
1958 \end_layout
1959
1960 \begin_layout Enumerate
1961 If there are no typos, check that you used the command(s) correctly.
1962 \end_layout
1963
1964 \begin_layout Enumerate
1965 If you get a bunch of error boxes piled up at the very top of the document—and
1966  especially if you see a 
1967 \begin_inset Quotes eld
1968 \end_inset
1969
1970
1971 \begin_inset Flex Code
1972 status collapsed
1973
1974 \begin_layout Plain Layout
1975 Missing 
1976 \backslash
1977 begin{document}
1978 \end_layout
1979
1980 \end_inset
1981
1982
1983 \begin_inset Quotes erd
1984 \end_inset
1985
1986  error—it means that there are errors in the preamble.
1987  Start debugging your preamble.
1988 \end_layout
1989
1990 \begin_layout Enumerate
1991 If you didn't add anything to the preamble and didn't add any LaTeX code
1992  to the document, the first suspect is your LaTeX distribution itself.
1993  Check for missing packages and install them.
1994 \end_layout
1995
1996 \begin_layout Enumerate
1997 Okay, so there are no missing packages.
1998  Did you use any of the fine-tuning options in LyX? Specifically, did you
1999  
2000 \emph on
2001 misuse
2002 \emph default
2003  any of them, like trying to manually insert lots of 
2004 \begin_inset Flex Code
2005 status collapsed
2006
2007 \begin_layout Plain Layout
2008 Protected
2009 \begin_inset space ~
2010 \end_inset
2011
2012 Blanks
2013 \end_layout
2014
2015 \end_inset
2016
2017
2018 \begin_inset Flex Code
2019 status collapsed
2020
2021 \begin_layout Plain Layout
2022 Linebreaks
2023 \end_layout
2024
2025 \end_inset
2026
2027 , or 
2028 \begin_inset Flex Code
2029 status collapsed
2030
2031 \begin_layout Plain Layout
2032 Pagebreaks
2033 \end_layout
2034
2035 \end_inset
2036
2037 ? Did you try to kludge something together with these instead of using the
2038  appropriate paragraph environment?
2039 \end_layout
2040
2041 \begin_layout Enumerate
2042 All right, you didn't use any of the fine-tuning options, you played by
2043  the rules.
2044  Did you try to pull a fancy maneuver? Did you do something funky inside
2045  a table or an equation, like inserting a graphic into a table cell?
2046 \end_layout
2047
2048 \begin_layout Enumerate
2049 Do you have long sections of text where LaTeX cannot find a place to break
2050  a line? By default, LaTeX is rather strict about how much extra inter-word
2051  spacing it will add in order to break a line.
2052  Preferably, you should rework the paragraph to avoid the problem.
2053  If this isn't an option, you can wrap your text in 
2054 \begin_inset Flex Code
2055 status collapsed
2056
2057 \begin_layout Plain Layout
2058
2059 \backslash
2060 sloppypar
2061 \end_layout
2062
2063 \end_inset
2064
2065  to make LaTeX's line breaking more, well, sloppy.
2066 \end_layout
2067
2068 \begin_layout Enumerate
2069 Did you go overboard with the nesting? LyX (currently) doesn't check to
2070  make sure you're in the limits for nesting environments.
2071  If you nested a bunch of environments to the 
2072 \begin_inset Formula $17^{\mathrm{th}}$
2073 \end_inset
2074
2075  level, that's the problem.
2076  (The limit in LaTeX is five.)
2077 \end_layout
2078
2079 \begin_layout Enumerate
2080 Okay, you didn't get any error messages, but your output looks awful.
2081  If you have a table or figure that's too wide or long for the page, you
2082  need to:
2083 \end_layout
2084
2085 \begin_deeper
2086 \begin_layout Enumerate
2087 rescale the figure so it fits.
2088 \end_layout
2089
2090 \begin_layout Enumerate
2091 trim down the table so it fits.
2092 \end_layout
2093
2094 \end_deeper
2095 \begin_layout Enumerate
2096 If something else is wrong with the output, and you didn't try to pull anything
2097  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2098 \end_layout
2099
2100 \begin_layout Standard
2101 If all this doesn't help—well, then 
2102 \emph on
2103 perhaps
2104 \emph default
2105  you might have found a bug in LyX\SpecialChar \ldots{}
2106 .
2107 \end_layout
2108
2109 \begin_layout Chapter
2110 Supplemental Tools
2111 \end_layout
2112
2113 \begin_layout Section
2114 Customizing Bibliographies with BibTeX
2115 \end_layout
2116
2117 \begin_layout Standard
2118 The most basic information about how to use BibTeX with LyX is contained
2119  in the section 
2120 \emph on
2121 Bibliography databases (BibTeX)
2122 \emph default
2123  of the 
2124 \emph on
2125 User's Guide
2126 \emph default
2127 .
2128  The following subsections explain special bibliography features supported
2129  by LyX.
2130 \end_layout
2131
2132 \begin_layout Subsection
2133 Alternative Citation Styles
2134 \end_layout
2135
2136 \begin_layout Standard
2137 Standard BibTeX uses numbers (e.
2138 \begin_inset space \thinspace{}
2139 \end_inset
2140
2141 g.
2142 \begin_inset space \space{}
2143 \end_inset
2144
2145
2146 \begin_inset Quotes eld
2147 \end_inset
2148
2149 [12]
2150 \begin_inset Quotes erd
2151 \end_inset
2152
2153 ) to refer to a cited work.
2154  However, in many scientific disciplines, other citation styles are in use.
2155  The most common one is the author-year style (e.
2156 \begin_inset space \thinspace{}
2157 \end_inset
2158
2159 g.
2160 \begin_inset space \space{}
2161 \end_inset
2162
2163
2164 \begin_inset Quotes eld
2165 \end_inset
2166
2167 Knuth 1984a
2168 \begin_inset Quotes erd
2169 \end_inset
2170
2171 ).
2172  LyX supports two packages that provide this style, 
2173 \begin_inset Flex Code
2174 status collapsed
2175
2176 \begin_layout Plain Layout
2177 natbib
2178 \end_layout
2179
2180 \end_inset
2181
2182  and 
2183 \begin_inset Flex Code
2184 status collapsed
2185
2186 \begin_layout Plain Layout
2187 jurabib
2188 \end_layout
2189
2190 \end_inset
2191
2192 .
2193  Both packages have their pros and cons, which cannot be listed in detail.
2194  If you only want to have simple author-year (or author-numerical) style,
2195  or if you want to use one of the countless style files for 
2196 \begin_inset Flex Code
2197 status collapsed
2198
2199 \begin_layout Plain Layout
2200 natbib
2201 \end_layout
2202
2203 \end_inset
2204
2205 , than the established 
2206 \begin_inset Flex Code
2207 status collapsed
2208
2209 \begin_layout Plain Layout
2210 natbib
2211 \end_layout
2212
2213 \end_inset
2214
2215  package is probably your choice.
2216  If you need special features like short title references, ibidem etc., you
2217  might consider the 
2218 \begin_inset Flex Code
2219 status collapsed
2220
2221 \begin_layout Plain Layout
2222 jurabib
2223 \end_layout
2224
2225 \end_inset
2226
2227  package.
2228 \end_layout
2229
2230 \begin_layout Standard
2231 The handling of both packages in LyX is basically the same.
2232  Go to 
2233 \begin_inset Flex MenuItem
2234 status collapsed
2235
2236 \begin_layout Plain Layout
2237 Document\SpecialChar \menuseparator
2238 Settings
2239 \end_layout
2240
2241 \end_inset
2242
2243  and select under 
2244 \begin_inset Flex MenuItem
2245 status collapsed
2246
2247 \begin_layout Plain Layout
2248 Bibliography
2249 \end_layout
2250
2251 \end_inset
2252
2253  the option 
2254 \begin_inset Flex MenuItem
2255 status collapsed
2256
2257 \begin_layout Plain Layout
2258 Natbib
2259 \end_layout
2260
2261 \end_inset
2262
2263  or 
2264 \begin_inset Flex MenuItem
2265 status collapsed
2266
2267 \begin_layout Plain Layout
2268 Jurabib
2269 \end_layout
2270
2271 \end_inset
2272
2273 .
2274  With both packages, you will get some extra features in the citation dialog
2275  and you can select the style of the reference (
2276 \begin_inset Quotes eld
2277 \end_inset
2278
2279 Knuth 1984
2280 \begin_inset Quotes erd
2281 \end_inset
2282
2283
2284 \begin_inset Quotes eld
2285 \end_inset
2286
2287 Knuth (1984)
2288 \begin_inset Quotes erd
2289 \end_inset
2290
2291
2292 \begin_inset Quotes eld
2293 \end_inset
2294
2295 Knuth, 1984
2296 \begin_inset Quotes erd
2297 \end_inset
2298
2299
2300 \begin_inset Quotes eld
2301 \end_inset
2302
2303 1984
2304 \begin_inset Quotes erd
2305 \end_inset
2306
2307  etc.).
2308  Note that both packages need specifically designed style files.
2309  They both ship their own, but there are lots of additional style files,
2310  and there is even an interactive style file builder
2311 \begin_inset Foot
2312 status collapsed
2313
2314 \begin_layout Plain Layout
2315 See 
2316 \begin_inset Flex URL
2317 status open
2318
2319 \begin_layout Plain Layout
2320
2321 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2322 \end_layout
2323
2324 \end_inset
2325
2326
2327 \end_layout
2328
2329 \end_inset
2330
2331  for 
2332 \begin_inset Flex Code
2333 status collapsed
2334
2335 \begin_layout Plain Layout
2336 natbib
2337 \end_layout
2338
2339 \end_inset
2340
2341 .
2342 \end_layout
2343
2344 \begin_layout Subsection
2345 Sectioned Bibliographies
2346 \end_layout
2347
2348 \begin_layout Standard
2349 Sometimes you might need to divide your bibliography into several sections.
2350  If you are for instance a historian, the possibility to separate sources
2351  and scientific works is most likely a 
2352 \begin_inset Quotes eld
2353 \end_inset
2354
2355 must have
2356 \begin_inset Quotes erd
2357 \end_inset
2358
2359 .
2360  Unfortunately, BibTeX itself does not allow you to do this.
2361  But with the help of some LaTeX packages, BibTeX can be extended to fit
2362  your needs.
2363 \end_layout
2364
2365 \begin_layout Standard
2366 LyX provides native support for one of these packages, 
2367 \family typewriter
2368 bibtopic
2369 \family default
2370 .
2371 \begin_inset Foot
2372 status collapsed
2373
2374 \begin_layout Plain Layout
2375 Available from 
2376 \begin_inset Flex URL
2377 status open
2378
2379 \begin_layout Plain Layout
2380
2381 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2382 \end_layout
2383
2384 \end_inset
2385
2386
2387 \end_layout
2388
2389 \end_inset
2390
2391  The advantage of this package (compared to other packages like 
2392 \family typewriter
2393 multibib
2394 \family default
2395 ) is that you don't need to define new citation commands.
2396  Instead, you need to prepare different bibliographic databases which include
2397  the entries for the different sections of the bibliography.
2398  For example: If you want to divide your bibliography into the sections
2399  
2400 \begin_inset Quotes eld
2401 \end_inset
2402
2403 Sources
2404 \begin_inset Quotes erd
2405 \end_inset
2406
2407  and 
2408 \begin_inset Quotes eld
2409 \end_inset
2410
2411 Scientific works
2412 \begin_inset Quotes erd
2413 \end_inset
2414
2415 , you first need to create two bibliographic databases, e.
2416 \begin_inset space \thinspace{}
2417 \end_inset
2418
2419 g.
2420 \begin_inset space \space{}
2421 \end_inset
2422
2423
2424 \begin_inset Flex Code
2425 status collapsed
2426
2427 \begin_layout Plain Layout
2428 sources.bib
2429 \end_layout
2430
2431 \end_inset
2432
2433  and 
2434 \begin_inset Flex Code
2435 status collapsed
2436
2437 \begin_layout Plain Layout
2438 scientific.bib
2439 \end_layout
2440
2441 \end_inset
2442
2443 .
2444  
2445 \end_layout
2446
2447 \begin_layout Standard
2448 Go to 
2449 \begin_inset Flex MenuItem
2450 status collapsed
2451
2452 \begin_layout Plain Layout
2453 Document\SpecialChar \menuseparator
2454 Settings
2455 \end_layout
2456
2457 \end_inset
2458
2459  and check under 
2460 \begin_inset Flex MenuItem
2461 status collapsed
2462
2463 \begin_layout Plain Layout
2464 Bibliography
2465 \end_layout
2466
2467 \end_inset
2468
2469  the option 
2470 \begin_inset Flex MenuItem
2471 status collapsed
2472
2473 \begin_layout Plain Layout
2474 Sectioned bibliography
2475 \end_layout
2476
2477 \end_inset
2478
2479 .
2480  Now you can insert multiple BibTeX bibliographies, one for each section
2481  of your bibliography.
2482  Returning to our example: Insert the BibTeX bibliography 
2483 \begin_inset Flex Code
2484 status collapsed
2485
2486 \begin_layout Plain Layout
2487 sources.bib
2488 \end_layout
2489
2490 \end_inset
2491
2492  and a second one for the database 
2493 \begin_inset Flex Code
2494 status collapsed
2495
2496 \begin_layout Plain Layout
2497 scientific.bib
2498 \end_layout
2499
2500 \end_inset
2501
2502 .
2503  You are free to use the same or different styles for each section.
2504  Additionally, you can chose if the bibliography section should contain
2505  
2506 \begin_inset Quotes eld
2507 \end_inset
2508
2509 all cited references
2510 \begin_inset Quotes erd
2511 \end_inset
2512
2513  of the specified database(s) (which is the default), 
2514 \begin_inset Quotes eld
2515 \end_inset
2516
2517 all uncited references
2518 \begin_inset Quotes erd
2519 \end_inset
2520
2521  or even 
2522 \begin_inset Quotes eld
2523 \end_inset
2524
2525 all references
2526 \begin_inset Quotes erd
2527 \end_inset
2528
2529 .
2530  This might be useful if you would like to separate your bibliography into
2531  three sections: 
2532 \begin_inset Quotes eld
2533 \end_inset
2534
2535 Cited sources
2536 \begin_inset Quotes erd
2537 \end_inset
2538
2539
2540 \begin_inset Quotes eld
2541 \end_inset
2542
2543 Uncited sources
2544 \begin_inset Quotes erd
2545 \end_inset
2546
2547 , and 
2548 \begin_inset Quotes eld
2549 \end_inset
2550
2551 Scientific works
2552 \begin_inset Quotes erd
2553 \end_inset
2554
2555 .
2556  The titles for the sections can be added as ordinary sections or subsections.
2557  Since 
2558 \begin_inset Flex Code
2559 status collapsed
2560
2561 \begin_layout Plain Layout
2562 bibtopic
2563 \end_layout
2564
2565 \end_inset
2566
2567  removes the bibliography title, you have manually re-add that, too (as
2568  a chapter* or section*, for instance).
2569 \end_layout
2570
2571 \begin_layout Subsection
2572 Multiple Bibliographies
2573 \end_layout
2574
2575 \begin_layout Standard
2576 Multiple bibliographies, e.
2577 \begin_inset space \thinspace{}
2578 \end_inset
2579
2580 g.
2581 \begin_inset space \space{}
2582 \end_inset
2583
2584 a bibliography for each section or chapter of the document, are not supported
2585  by BibTeX itself.
2586  But the 
2587 \begin_inset Flex Code
2588 status collapsed
2589
2590 \begin_layout Plain Layout
2591 bibtopic
2592 \end_layout
2593
2594 \end_inset
2595
2596  package, which is used for the creation of sectioned bibliographies in
2597  LyX (see the previous section), provides an easy way to solve this task,
2598  if you are willing to use some 
2599 \begin_inset Flex MenuItem
2600 status collapsed
2601
2602 \begin_layout Plain Layout
2603 TeX Code
2604 \end_layout
2605
2606 \end_inset
2607
2608  (see section
2609 \begin_inset space ~
2610 \end_inset
2611
2612
2613 \begin_inset CommandInset ref
2614 LatexCommand ref
2615 reference "sec:Inserting-TeX-Code"
2616
2617 \end_inset
2618
2619 ).
2620 \begin_inset Foot
2621 status collapsed
2622
2623 \begin_layout Plain Layout
2624 An alternative approach is to use the 
2625 \begin_inset Flex Code
2626 status collapsed
2627
2628 \begin_layout Plain Layout
2629 chapterbib
2630 \end_layout
2631
2632 \end_inset
2633
2634  or 
2635 \begin_inset Flex Code
2636 status collapsed
2637
2638 \begin_layout Plain Layout
2639 bibunits
2640 \end_layout
2641
2642 \end_inset
2643
2644  package, respectively.
2645 \end_layout
2646
2647 \end_inset
2648
2649
2650 \end_layout
2651
2652 \begin_layout Standard
2653 First go to 
2654 \begin_inset Flex MenuItem
2655 status collapsed
2656
2657 \begin_layout Plain Layout
2658 Document\SpecialChar \menuseparator
2659 Settings
2660 \end_layout
2661
2662 \end_inset
2663
2664  and under 
2665 \begin_inset Flex MenuItem
2666 status collapsed
2667
2668 \begin_layout Plain Layout
2669 Bibliography
2670 \end_layout
2671
2672 \end_inset
2673
2674  check 
2675 \begin_inset Flex MenuItem
2676 status collapsed
2677
2678 \begin_layout Plain Layout
2679 Sectioned bibliography
2680 \end_layout
2681
2682 \end_inset
2683
2684 .
2685  In the document, you have to enclose the sections, which shall contain
2686  their own bibliography (including the BibTeX bibliography itself), between
2687  
2688 \begin_inset Flex Code
2689 status collapsed
2690
2691 \begin_layout Plain Layout
2692
2693 \backslash
2694 begin{btUnit}
2695 \end_layout
2696
2697 \end_inset
2698
2699  and 
2700 \begin_inset Flex Code
2701 status collapsed
2702
2703 \begin_layout Plain Layout
2704
2705 \backslash
2706 end{btUnit}
2707 \end_layout
2708
2709 \end_inset
2710
2711  (those commands have to be inserted as TeX code).
2712  The bibliography will contain all references which have been cited in the
2713  current 
2714 \begin_inset Flex Code
2715 status collapsed
2716
2717 \begin_layout Plain Layout
2718 btUnit
2719 \end_layout
2720
2721 \end_inset
2722
2723 .
2724  
2725 \series bold
2726 Note:
2727 \series default
2728  If you are using this approach, then every citation reference has to be
2729  inside some 
2730 \begin_inset Flex Code
2731 status collapsed
2732
2733 \begin_layout Plain Layout
2734 btUnit
2735 \end_layout
2736
2737 \end_inset
2738
2739 .
2740  Also, the 
2741 \begin_inset Flex Code
2742 status collapsed
2743
2744 \begin_layout Plain Layout
2745 btUnit
2746 \end_layout
2747
2748 \end_inset
2749
2750 s cannot be nested.
2751 \end_layout
2752
2753 \begin_layout Section
2754 Multipart Documents
2755 \end_layout
2756
2757 \begin_layout Subsection
2758 General Operation
2759 \end_layout
2760
2761 \begin_layout Standard
2762 When you are working on a large file with many sections, it is often convenient
2763  to break up the document into several files, or perhaps you have something
2764  where a table may change from time to time, but the preceding text does
2765  not.
2766  In these cases, you should seriously consider using multipart documents.
2767  For example, scientific papers often have five major sections: the introduction
2768 , observations, results, discussion, and conclusion.
2769  Each of these could be its own separate LyX file, with one 
2770 \begin_inset Quotes eld
2771 \end_inset
2772
2773 master
2774 \begin_inset Quotes erd
2775 \end_inset
2776
2777  file which contains the title, authors, abstract, references, etc., plus
2778  the five included files.
2779  It is important to note that each of these files is a full LyX file which
2780  can be formatted and printed on its own, as well as included in a master
2781  file.
2782  Each of these files must have the same document class, however—don't attempt
2783  to mix book classes with article classes.
2784  You may also include LaTeX files; however, these files must not have their
2785  own preamble (i.
2786 \begin_inset space \thinspace{}
2787 \end_inset
2788
2789 g.
2790 \begin_inset space \space{}
2791 \end_inset
2792
2793 everything up to and including the 
2794 \begin_inset Flex Code
2795 status collapsed
2796
2797 \begin_layout Plain Layout
2798
2799 \backslash
2800 begin{document}
2801 \end_layout
2802
2803 \end_inset
2804
2805  line as well as the 
2806 \begin_inset Flex Code
2807 status collapsed
2808
2809 \begin_layout Plain Layout
2810
2811 \backslash
2812 end{document}
2813 \end_layout
2814
2815 \end_inset
2816
2817  line must be deleted) or else errors will be generated when you try to
2818  make a DVI file.
2819 \end_layout
2820
2821 \begin_layout Standard
2822 LyX allows you to include files quite easily with 
2823 \begin_inset Flex MenuItem
2824 status collapsed
2825
2826 \begin_layout Plain Layout
2827 Insert\SpecialChar \menuseparator
2828 ChiId
2829 \begin_inset space ~
2830 \end_inset
2831
2832 Document
2833 \end_layout
2834
2835 \end_inset
2836
2837 .
2838  When you click on this selection a small box is inserted into the file
2839  at the current cursor location.
2840  Clicking on the box raises a dialog which allows you to select the file
2841  to be included, and the method of its inclusion.
2842  
2843 \end_layout
2844
2845 \begin_layout Standard
2846 The file selection box should by now be obvious.
2847  The three inclusion methods are 
2848 \begin_inset Quotes eld
2849 \end_inset
2850
2851 include
2852 \begin_inset Quotes erd
2853 \end_inset
2854
2855
2856 \begin_inset Quotes eld
2857 \end_inset
2858
2859 input
2860 \begin_inset Quotes erd
2861 \end_inset
2862
2863 , and 
2864 \begin_inset Quotes eld
2865 \end_inset
2866
2867 verbatim
2868 \begin_inset Quotes erd
2869 \end_inset
2870
2871 .
2872  The difference between 
2873 \begin_inset Quotes eld
2874 \end_inset
2875
2876 include
2877 \begin_inset Quotes erd
2878 \end_inset
2879
2880  and 
2881 \begin_inset Quotes eld
2882 \end_inset
2883
2884 input
2885 \begin_inset Quotes erd
2886 \end_inset
2887
2888  is really only meaningful to LaTeXperts, but the practical difference is
2889  that files which are 
2890 \begin_inset Quotes eld
2891 \end_inset
2892
2893 included
2894 \begin_inset Quotes erd
2895 \end_inset
2896
2897  are typeset beginning on a new page, while files which are 
2898 \begin_inset Quotes eld
2899 \end_inset
2900
2901 inputted
2902 \begin_inset Quotes erd
2903 \end_inset
2904
2905  are typeset starting on the current page.
2906 \end_layout
2907
2908 \begin_layout Standard
2909 Generally, the master file is converted into a full LaTeX file before typesettin
2910 g, while the included files are converted to LaTeX files which do not have
2911  all the preamble information.
2912 \end_layout
2913
2914 \begin_layout Standard
2915
2916 \begin_inset Quotes eld
2917 \end_inset
2918
2919 verbatim
2920 \begin_inset Quotes erd
2921 \end_inset
2922
2923  included file allows you to include a file typeset exactly as it appears
2924  in the file, i.
2925 \begin_inset space \thinspace{}
2926 \end_inset
2927
2928 g.
2929 \begin_inset space \space{}
2930 \end_inset
2931
2932 in 
2933 \begin_inset Flex Code
2934 status collapsed
2935
2936 \begin_layout Plain Layout
2937 verbatim
2938 \end_layout
2939
2940 \end_inset
2941
2942  mode, with the characters set in a fixed-width typewriter font.
2943  Normally, spaces in this file are invisible, though two consecutive spaces
2944  are conserved, unlike LyX's normal treatment of spaces.
2945  However, setting the 
2946 \begin_inset Flex MenuItem
2947 status collapsed
2948
2949 \begin_layout Plain Layout
2950 Mark
2951 \begin_inset space ~
2952 \end_inset
2953
2954 spaces
2955 \begin_inset space ~
2956 \end_inset
2957
2958 in
2959 \begin_inset space ~
2960 \end_inset
2961
2962 output
2963 \end_layout
2964
2965 \end_inset
2966
2967  checkbox typesets a mark to unambiguously define the presence of a space.
2968  
2969 \end_layout
2970
2971 \begin_layout Subsection
2972 Cross-References Between Files
2973 \end_layout
2974
2975 \begin_layout Standard
2976 \begin_inset Box Shadowbox
2977 position "t"
2978 hor_pos "c"
2979 has_inner_box 1
2980 inner_pos "t"
2981 use_parbox 0
2982 use_makebox 0
2983 width "100col%"
2984 special "none"
2985 height "1in"
2986 height_special "totalheight"
2987 status open
2988
2989 \begin_layout Plain Layout
2990 This section is somewhat out of date.
2991  Need to describe default master documents and how children are opened when
2992  the master is.
2993  [[FIXME]]
2994 \end_layout
2995
2996 \end_inset
2997
2998
2999 \end_layout
3000
3001 \begin_layout Standard
3002 It is possible to set up cross-references between the different files.
3003  First, open all the files in question: let's call them A and B in a two
3004  file example, where B is included in A.
3005  Let's say you insert a label in A, then want to reference it in B.
3006  Open the cross-reference dialog in whilst in document B, and you can select
3007  the 
3008 \begin_inset Quotes eld
3009 \end_inset
3010
3011 buffer
3012 \begin_inset Quotes erd
3013 \end_inset
3014
3015  to use.
3016 \end_layout
3017
3018 \begin_layout Subsection
3019 Bibliography Lists in all Subdocuments
3020 \end_layout
3021
3022 \begin_layout Standard
3023 \begin_inset Box Frameless
3024 position "t"
3025 hor_pos "c"
3026 has_inner_box 1
3027 inner_pos "t"
3028 use_parbox 0
3029 use_makebox 0
3030 width "100col%"
3031 special "none"
3032 height "1in"
3033 height_special "totalheight"
3034 status open
3035
3036 \begin_layout Plain Layout
3037 This section also needs updating.
3038  There is now material about this on the wiki, and it could be copied here.
3039 \end_layout
3040
3041 \end_inset
3042
3043
3044 \end_layout
3045
3046 \begin_layout Standard
3047 Copy the bibliography list with all entries to all subdocuments and transform
3048  them to a comment.
3049  This way LyX will find the 
3050 \begin_inset Flex Code
3051 status collapsed
3052
3053 \begin_layout Plain Layout
3054 .bib
3055 \end_layout
3056
3057 \end_inset
3058
3059 -files and you can easily insert references without making the bibliography
3060  list visible.
3061 \end_layout
3062
3063 \begin_layout Standard
3064 As the bibliography list is in a comment, LaTeX won't use use it and the
3065  references will look like this: [?], instead of like this: [1].
3066  One solution is to use the LaTeX-package 
3067 \begin_inset Flex Code
3068 status collapsed
3069
3070 \begin_layout Plain Layout
3071 comment
3072 \end_layout
3073
3074 \end_inset
3075
3076  that will only include comments by processing the files separately.
3077  To do this, add in the LaTeX preamble of every subdocument the following:
3078 \end_layout
3079
3080 \begin_layout LyX-Code
3081
3082 \backslash
3083 usepackage{comment}
3084 \end_layout
3085
3086 \begin_layout LyX-Code
3087
3088 \backslash
3089 includecomment{comment}
3090 \end_layout
3091
3092 \begin_layout Standard
3093 See also 
3094 \begin_inset Flex URL
3095 status collapsed
3096
3097 \begin_layout Plain Layout
3098
3099 http://wiki.lyx.org/FAQ/Unsorted#toc31
3100 \end_layout
3101
3102 \end_inset
3103
3104 .
3105 \end_layout
3106
3107 \begin_layout Section
3108
3109 \change_inserted 1414654397 1302963669
3110 LyX Archives
3111 \end_layout
3112
3113 \begin_layout Standard
3114
3115 \change_inserted 1414654397 1302963893
3116 Users sometimes need to be able to 
3117 \begin_inset Quotes eld
3118 \end_inset
3119
3120 bundle
3121 \begin_inset Quotes erd
3122 \end_inset
3123
3124  a LyX file together with all the images (and other files) on which it depends,
3125  either for sending to a publisher or for sharing with a co-author.
3126  LyX 2.0 includes a Python script 
3127 \change_inserted 711066561 1302968890
3128 (
3129 \begin_inset Flex Code
3130 status collapsed
3131
3132 \begin_layout Plain Layout
3133
3134 \change_inserted 711066561 1302968879
3135 lyxpak.py
3136 \change_unchanged
3137
3138 \end_layout
3139
3140 \end_inset
3141
3142
3143 \change_deleted 711066561 1302967226
3144 (written by Enrico Forestieri) 
3145 \change_inserted 1414654397 1302963893
3146 that automates this process.
3147  To use it, you must have either 
3148 \change_inserted 711066561 1302967360
3149 the 
3150 \change_inserted 1414654397 1302963893
3151
3152 \begin_inset Flex Code
3153 status collapsed
3154
3155 \begin_layout Plain Layout
3156
3157 \change_inserted 1414654397 1302963710
3158 zip
3159 \change_inserted 711066561 1302967333
3160 file
3161 \change_unchanged
3162
3163 \end_layout
3164
3165 \end_inset
3166
3167  or 
3168 \begin_inset Flex Code
3169 status collapsed
3170
3171 \begin_layout Plain Layout
3172
3173 \change_inserted 1414654397 1302963714
3174 tar
3175 \change_inserted 711066561 1302967339
3176 file
3177 \change_unchanged
3178
3179 \end_layout
3180
3181 \end_inset
3182
3183  
3184 \change_inserted 711066561 1302967345
3185 python modules 
3186 \change_inserted 1414654397 1302963893
3187 installed on your system.
3188  
3189 \change_deleted 711066561 1302967469
3190 At present, t
3191 \change_inserted 711066561 1302968934
3192 By deafult, t
3193 \change_inserted 1414654397 1302963893
3194 he script prefers 
3195 \change_inserted 711066561 1302967645
3196 the 
3197 \begin_inset Flex Code
3198 status collapsed
3199
3200 \begin_layout Plain Layout
3201
3202 \change_inserted 711066561 1302967636
3203 gzip
3204 \change_unchanged
3205
3206 \end_layout
3207
3208 \end_inset
3209
3210 -compressed 
3211 \change_inserted 1414654397 1302963893
3212
3213 \begin_inset Flex Code
3214 status collapsed
3215
3216 \begin_layout Plain Layout
3217
3218 \change_inserted 1414654397 1302963720
3219 tar
3220 \change_unchanged
3221
3222 \end_layout
3223
3224 \end_inset
3225
3226  
3227 \change_inserted 711066561 1302967527
3228 format on Unix-like systems 
3229 \change_inserted 1414654397 1302963893
3230 and
3231 \change_inserted 711066561 1302967699
3232  the 
3233 \begin_inset Flex Code
3234 status collapsed
3235
3236 \begin_layout Plain Layout
3237
3238 \change_inserted 711066561 1302967678
3239 zip
3240 \change_unchanged
3241
3242 \end_layout
3243
3244 \end_inset
3245
3246  format on Windows.
3247 \change_deleted 711066561 1302967705
3248 , if it is available, then it will compress the archive using 
3249 \begin_inset Flex Code
3250 status collapsed
3251
3252 \begin_layout Plain Layout
3253
3254 \change_inserted 1414654397 1302963726
3255 gzip
3256 \change_unchanged
3257
3258 \end_layout
3259
3260 \end_inset
3261
3262  or 
3263 \begin_inset Flex Code
3264 status collapsed
3265
3266 \begin_layout Plain Layout
3267
3268 \change_inserted 1414654397 1302963730
3269 bunzip2
3270 \change_unchanged
3271
3272 \end_layout
3273
3274 \end_inset
3275
3276 .
3277  (If only 
3278 \begin_inset Flex Code
3279 status collapsed
3280
3281 \begin_layout Plain Layout
3282
3283 \change_inserted 1414654397 1302963866
3284 zip
3285 \change_unchanged
3286
3287 \end_layout
3288
3289 \end_inset
3290
3291  is available, then it will use that.) 
3292 \change_inserted 1414654397 1302963893
3293
3294 \end_layout
3295
3296 \begin_layout Standard
3297
3298 \change_deleted 711066561 1302967868
3299 If the appropriate programs are available, then
3300 \change_inserted 711066561 1302967868
3301 The
3302 \change_inserted 1414654397 1302963889
3303  LyX's configuration process will set the script up to export a `LyX Archive',
3304  and this format will then be available under 
3305 \begin_inset Flex Code
3306 status collapsed
3307
3308 \begin_layout Plain Layout
3309
3310 \change_inserted 1414654397 1302963776
3311 File\SpecialChar \menuseparator
3312 Export
3313 \change_unchanged
3314
3315 \end_layout
3316
3317 \end_inset
3318
3319 .
3320 \change_inserted 711066561 1302968080
3321
3322 \end_layout
3323
3324 \begin_layout Standard
3325
3326 \change_inserted 711066561 1302970799
3327 Independently of the platform, the generation of a particular archive format
3328  can be forced by adding either the 
3329 \begin_inset Flex Code
3330 status collapsed
3331
3332 \begin_layout Plain Layout
3333
3334 \change_inserted 711066561 1302968170
3335 -t
3336 \change_unchanged
3337
3338 \end_layout
3339
3340 \end_inset
3341
3342  (for the 
3343 \begin_inset Flex Code
3344 status collapsed
3345
3346 \begin_layout Plain Layout
3347
3348 \change_inserted 711066561 1302968192
3349 tar
3350 \change_unchanged
3351
3352 \end_layout
3353
3354 \end_inset
3355
3356  format) or 
3357 \begin_inset Flex Code
3358 status collapsed
3359
3360 \begin_layout Plain Layout
3361
3362 \change_inserted 711066561 1302968216
3363 -z
3364 \change_unchanged
3365
3366 \end_layout
3367
3368 \end_inset
3369
3370  (for the 
3371 \begin_inset Flex Code
3372 status collapsed
3373
3374 \begin_layout Plain Layout
3375
3376 \change_inserted 711066561 1302968265
3377 zip
3378 \change_unchanged
3379
3380 \end_layout
3381
3382 \end_inset
3383
3384  format) switch to the 
3385 \begin_inset Flex MenuItem
3386 status collapsed
3387
3388 \begin_layout Plain Layout
3389
3390 \change_inserted 711066561 1302968420
3391 LyX\SpecialChar \menuseparator
3392 LyX Archive
3393 \change_unchanged
3394
3395 \end_layout
3396
3397 \end_inset
3398
3399  converter in 
3400 \begin_inset Flex MenuItem
3401 status collapsed
3402
3403 \begin_layout Plain Layout
3404
3405 \change_inserted 711066561 1302968494
3406 Tools\SpecialChar \menuseparator
3407 Preferences\SpecialChar \menuseparator
3408 File Handling\SpecialChar \menuseparator
3409 Converters
3410 \change_unchanged
3411
3412 \end_layout
3413
3414 \end_inset
3415
3416  (pay attention to add the switch after the script name, not before it).
3417 \change_inserted 1414654397 1302963889
3418
3419 \end_layout
3420
3421 \begin_layout Section
3422 Fancy Headers and Footers
3423 \end_layout
3424
3425 \begin_layout Standard
3426 The default page layout is rather plain; for an 
3427 \begin_inset Flex Code
3428 status collapsed
3429
3430 \begin_layout Plain Layout
3431 article
3432 \end_layout
3433
3434 \end_inset
3435
3436  document class, all you get is a centered page number at the bottom of
3437  the page.
3438  This document uses KOMA-script's book class, so it appears to be a bit
3439  fancier.
3440  But to really put on a show, you need to set the document page style to
3441  
3442 \begin_inset Quotes eld
3443 \end_inset
3444
3445 fancy
3446 \begin_inset Quotes erd
3447 \end_inset
3448
3449 , as mentioned in the 
3450 \emph on
3451 User Guide
3452 \emph default
3453 .
3454  This section describes the LaTeX code you need to insert in your LaTeX
3455  preamble in order to get the desired effects.
3456 \end_layout
3457
3458 \begin_layout Standard
3459 For more information on fancy headers, see the 
3460 \begin_inset Flex Code
3461 status collapsed
3462
3463 \begin_layout Plain Layout
3464 fancyhdr
3465 \end_layout
3466
3467 \end_inset
3468
3469  package documentation.
3470  (
3471 \begin_inset Flex URL
3472 status collapsed
3473
3474 \begin_layout Plain Layout
3475
3476 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3477 \end_layout
3478
3479 \end_inset
3480
3481 )
3482 \end_layout
3483
3484 \begin_layout Standard
3485 The page header is divided into three fields, not surprisingly labeled 
3486 \begin_inset Quotes eld
3487 \end_inset
3488
3489 left
3490 \begin_inset Quotes erd
3491 \end_inset
3492
3493
3494 \begin_inset Quotes eld
3495 \end_inset
3496
3497 center
3498 \begin_inset Quotes erd
3499 \end_inset
3500
3501 , and 
3502 \begin_inset Quotes eld
3503 \end_inset
3504
3505 right
3506 \begin_inset Quotes erd
3507 \end_inset
3508
3509 .
3510  The footer is also divided into these three fields.
3511  The LaTeX commands to set these fields in the simplest manner are 
3512 \begin_inset Flex Code
3513 status collapsed
3514
3515 \begin_layout Plain Layout
3516
3517 \backslash
3518 lhead
3519 \end_layout
3520
3521 \end_inset
3522
3523
3524 \begin_inset Flex Code
3525 status collapsed
3526
3527 \begin_layout Plain Layout
3528
3529 \backslash
3530 chead
3531 \end_layout
3532
3533 \end_inset
3534
3535
3536 \begin_inset Flex Code
3537 status collapsed
3538
3539 \begin_layout Plain Layout
3540
3541 \backslash
3542 rhead
3543 \end_layout
3544
3545 \end_inset
3546
3547
3548 \begin_inset Flex Code
3549 status collapsed
3550
3551 \begin_layout Plain Layout
3552
3553 \backslash
3554 lfoot
3555 \end_layout
3556
3557 \end_inset
3558
3559 , etc.
3560  Suppose you wish to put your name in the upper left hand corner of each
3561  page.
3562  Simply insert the following command in the preamble: 
3563 \end_layout
3564
3565 \begin_layout Standard
3566
3567 \family typewriter
3568
3569 \backslash
3570 lhead{John Q.
3571  DocWriter}
3572 \end_layout
3573
3574 \begin_layout Standard
3575 You will now see your name in the upper left.
3576  If a field has a default entry that you would like to get rid of (often
3577  the page number appears in the central footer, simply include a command
3578  with a blank argument, e.
3579 \begin_inset space \thinspace{}
3580 \end_inset
3581
3582 g.:
3583 \end_layout
3584
3585 \begin_layout Standard
3586
3587 \family typewriter
3588
3589 \backslash
3590 cfoot{}
3591 \end_layout
3592
3593 \begin_layout Standard
3594 Let's get really fancy: lets put the section number with the word 
3595 \begin_inset Quotes eld
3596 \end_inset
3597
3598 Section
3599 \begin_inset Quotes erd
3600 \end_inset
3601
3602  (e.
3603 \begin_inset space \thinspace{}
3604 \end_inset
3605
3606 g.
3607 \begin_inset space \space{}
3608 \end_inset
3609
3610 Section 3) in the upper left, the page number (e.
3611 \begin_inset space \thinspace{}
3612 \end_inset
3613
3614 g.
3615 \begin_inset space \space{}
3616 \end_inset
3617
3618 Page 4) in the upper right, your name in the lower left, and the date in
3619  the lower right.
3620  The following commands should now appear in the preamble:
3621 \end_layout
3622
3623 \begin_layout Standard
3624
3625 \family typewriter
3626
3627 \backslash
3628 lhead{Section 
3629 \backslash
3630 thesection}
3631 \end_layout
3632
3633 \begin_layout Standard
3634
3635 \family typewriter
3636
3637 \backslash
3638 chead{}
3639 \end_layout
3640
3641 \begin_layout Standard
3642
3643 \family typewriter
3644
3645 \backslash
3646 rhead{Page 
3647 \backslash
3648 thepage}
3649 \end_layout
3650
3651 \begin_layout Standard
3652
3653 \family typewriter
3654
3655 \backslash
3656 lfoot{John Q.
3657  DocWriter}
3658 \end_layout
3659
3660 \begin_layout Standard
3661
3662 \family typewriter
3663
3664 \backslash
3665 cfoot{}
3666 \end_layout
3667
3668 \begin_layout Standard
3669
3670 \family typewriter
3671
3672 \backslash
3673 rfoot{
3674 \backslash
3675 today}
3676 \end_layout
3677
3678 \begin_layout Standard
3679 The commands 
3680 \begin_inset Flex Code
3681 status collapsed
3682
3683 \begin_layout Plain Layout
3684
3685 \backslash
3686 thesection
3687 \end_layout
3688
3689 \end_inset
3690
3691  and 
3692 \begin_inset Flex Code
3693 status collapsed
3694
3695 \begin_layout Plain Layout
3696
3697 \backslash
3698 thepage
3699 \end_layout
3700
3701 \end_inset
3702
3703  access LaTeX's section and page counters, and so print out the current
3704  section and page numbers.
3705  
3706 \begin_inset Flex Code
3707 status collapsed
3708
3709 \begin_layout Plain Layout
3710
3711 \backslash
3712 today
3713 \end_layout
3714
3715 \end_inset
3716
3717  simply prints out today's date.
3718 \end_layout
3719
3720 \begin_layout Standard
3721 The thicknesses of the horizontal rules drawn beneath the header and above
3722  the footer can also be modified.
3723  If you don't want one of the rules, set its thickness to 0.
3724  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3725  Use commands
3726 \family typewriter
3727  
3728 \family default
3729 like 
3730 \begin_inset Flex Code
3731 status collapsed
3732
3733 \begin_layout Plain Layout
3734
3735 \backslash
3736 renewcommand{
3737 \backslash
3738 headrulewidth}{0.4pt}
3739 \end_layout
3740
3741 \end_inset
3742
3743  and 
3744 \begin_inset Flex Code
3745 status collapsed
3746
3747 \begin_layout Plain Layout
3748
3749 \backslash
3750 renewcommand{
3751 \backslash
3752 footrulewidth}{0.4pt}
3753 \end_layout
3754
3755 \end_inset
3756
3757  to set the thicknesses.
3758 \end_layout
3759
3760 \begin_layout Standard
3761 You can switch the header/footer settings on and off for individual pages
3762  using commands like 
3763 \begin_inset Flex Code
3764 status collapsed
3765
3766 \begin_layout Plain Layout
3767
3768 \backslash
3769 thispagestyle{empty}
3770 \end_layout
3771
3772 \end_inset
3773
3774
3775 \begin_inset Flex Code
3776 status collapsed
3777
3778 \begin_layout Plain Layout
3779
3780 \backslash
3781 thispagestyle{plain}
3782 \end_layout
3783
3784 \end_inset
3785
3786 , and 
3787 \begin_inset Flex Code
3788 status collapsed
3789
3790 \begin_layout Plain Layout
3791
3792 \backslash
3793 thispagestyle{fancy}
3794 \end_layout
3795
3796 \end_inset
3797
3798 .
3799  Simply insert them in the text on the page you want changed and mark them
3800  as TeX code.
3801  In fact, title pages are marked as plain by default, while following pages
3802  are marked fancy when using the global fancy setting.
3803 \end_layout
3804
3805 \begin_layout Standard
3806 As a final example, it is possible to include an image in the header or
3807  footer.
3808  Suppose you want to put a company logo in the upper lefthand corner.
3809  You might try something like
3810 \end_layout
3811
3812 \begin_layout Standard
3813
3814 \family typewriter
3815
3816 \backslash
3817 lhead{
3818 \backslash
3819 resizebox{1in}{!}{
3820 \backslash
3821 includegraphics{logo.eps}}}
3822 \end_layout
3823
3824 \begin_layout Standard
3825 \noindent
3826 (you may need to preface this with 
3827 \begin_inset Flex Code
3828 status collapsed
3829
3830 \begin_layout Plain Layout
3831 \noindent
3832
3833 \backslash
3834 usepackage{graphics}
3835 \end_layout
3836
3837 \end_inset
3838
3839  if you don't include graphics elsewhere in your document).
3840 \end_layout
3841
3842 \begin_layout Section
3843 Itemize Bullet Selection
3844 \begin_inset CommandInset label
3845 LatexCommand label
3846 name "sec:bullet"
3847
3848 \end_inset
3849
3850
3851 \end_layout
3852
3853 \begin_layout Standard
3854 by
3855 \noun on
3856  Allan Rae
3857 \end_layout
3858
3859 \begin_layout Subsection
3860 Introduction
3861 \end_layout
3862
3863 \begin_layout Standard
3864 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3865  Using this dialog you can easily specify what bullet shape to use at each
3866  level of an itemized list.
3867  These settings are document-wide so you won't be able to specify different
3868  sets of bullets for different paragraphs.
3869 \begin_inset Foot
3870 status collapsed
3871
3872 \begin_layout Plain Layout
3873 Well, actually you can but you'll have to do it by hand.
3874 \end_layout
3875
3876 \end_inset
3877
3878
3879 \end_layout
3880
3881 \begin_layout Subsection
3882 How it looks
3883 \end_layout
3884
3885 \begin_layout Standard
3886 Open the dialog by selecting the 
3887 \begin_inset Flex MenuItem
3888 status collapsed
3889
3890 \begin_layout Plain Layout
3891 Document\SpecialChar \menuseparator
3892 Settings
3893 \end_layout
3894
3895 \end_inset
3896
3897  menu item and then select the 
3898 \begin_inset Flex MenuItem
3899 status collapsed
3900
3901 \begin_layout Plain Layout
3902 Bullets
3903 \end_layout
3904
3905 \end_inset
3906
3907  tab.
3908 \end_layout
3909
3910 \begin_layout Standard
3911 The dialog provides you with a table of bullet shapes.
3912  A column of buttons on the left of the table provides access to the six
3913  different panels of bullet shapes.
3914  The row of buttons across the top is used to select which bullet depth
3915  you are changing.
3916  A text entry under the table shows the currently selected bullet shape's
3917  LaTeX equivalent and this can be edited if desired.
3918  If you do modify the text you will also need to specify any needed packages
3919  in the LaTeX preamble.
3920 \end_layout
3921
3922 \begin_layout Standard
3923 The six panels are divided up by the packages they require.
3924  The following table shows the mappings from button name to LaTeX packages.
3925 \end_layout
3926
3927 \begin_layout Standard
3928 \align center
3929 \begin_inset Tabular
3930 <lyxtabular version="3" rows="7" columns="2">
3931 <features tabularvalignment="middle">
3932 <column alignment="center" valignment="top" width="0pt">
3933 <column alignment="center" valignment="top" width="0pt">
3934 <row>
3935 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3936 \begin_inset Text
3937
3938 \begin_layout Plain Layout
3939
3940 \family roman
3941 \series medium
3942 \shape up
3943 \size normal
3944 \emph off
3945 \bar no
3946 \noun off
3947 \color none
3948 Button
3949 \end_layout
3950
3951 \end_inset
3952 </cell>
3953 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3954 \begin_inset Text
3955
3956 \begin_layout Plain Layout
3957
3958 \family roman
3959 \series medium
3960 \shape up
3961 \size normal
3962 \emph off
3963 \bar no
3964 \noun off
3965 \color none
3966 Packages Required
3967 \end_layout
3968
3969 \end_inset
3970 </cell>
3971 </row>
3972 <row>
3973 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3974 \begin_inset Text
3975
3976 \begin_layout Plain Layout
3977
3978 \family sans
3979 \series medium
3980 \shape up
3981 \size normal
3982 \emph off
3983 \bar no
3984 \noun off
3985 \color none
3986 Standard
3987 \end_layout
3988
3989 \end_inset
3990 </cell>
3991 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3992 \begin_inset Text
3993
3994 \begin_layout Plain Layout
3995
3996 \series medium
3997 \shape up
3998 \size normal
3999 \emph off
4000 \bar no
4001 \noun off
4002 \color none
4003 base LaTeX
4004 \end_layout
4005
4006 \end_inset
4007 </cell>
4008 </row>
4009 <row>
4010 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4011 \begin_inset Text
4012
4013 \begin_layout Plain Layout
4014
4015 \family sans
4016 \series medium
4017 \shape up
4018 \size normal
4019 \emph off
4020 \bar no
4021 \noun off
4022 \color none
4023 Maths
4024 \end_layout
4025
4026 \end_inset
4027 </cell>
4028 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4029 \begin_inset Text
4030
4031 \begin_layout Plain Layout
4032
4033 \family typewriter
4034 \series medium
4035 \shape up
4036 \size normal
4037 \emph off
4038 \bar no
4039 \noun off
4040 \color none
4041 amssymb.sty
4042 \end_layout
4043
4044 \end_inset
4045 </cell>
4046 </row>
4047 <row>
4048 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4049 \begin_inset Text
4050
4051 \begin_layout Plain Layout
4052
4053 \family sans
4054 \series medium
4055 \shape up
4056 \size normal
4057 \emph off
4058 \bar no
4059 \noun off
4060 \color none
4061 Ding1
4062 \end_layout
4063
4064 \end_inset
4065 </cell>
4066 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4067 \begin_inset Text
4068
4069 \begin_layout Plain Layout
4070
4071 \family typewriter
4072 \series medium
4073 \shape up
4074 \size normal
4075 \emph off
4076 \bar no
4077 \noun off
4078 \color none
4079 pifont.sty
4080 \end_layout
4081
4082 \end_inset
4083 </cell>
4084 </row>
4085 <row>
4086 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4087 \begin_inset Text
4088
4089 \begin_layout Plain Layout
4090
4091 \family sans
4092 \series medium
4093 \shape up
4094 \size normal
4095 \emph off
4096 \bar no
4097 \noun off
4098 \color none
4099 Ding2
4100 \end_layout
4101
4102 \end_inset
4103 </cell>
4104 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4105 \begin_inset Text
4106
4107 \begin_layout Plain Layout
4108
4109 \family typewriter
4110 \series medium
4111 \shape up
4112 \size normal
4113 \emph off
4114 \bar no
4115 \noun off
4116 \color none
4117 pifont.sty
4118 \end_layout
4119
4120 \end_inset
4121 </cell>
4122 </row>
4123 <row>
4124 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4125 \begin_inset Text
4126
4127 \begin_layout Plain Layout
4128
4129 \family sans
4130 \series medium
4131 \shape up
4132 \size normal
4133 \emph off
4134 \bar no
4135 \noun off
4136 \color none
4137 Ding3
4138 \end_layout
4139
4140 \end_inset
4141 </cell>
4142 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4143 \begin_inset Text
4144
4145 \begin_layout Plain Layout
4146
4147 \family typewriter
4148 \series medium
4149 \shape up
4150 \size normal
4151 \emph off
4152 \bar no
4153 \noun off
4154 \color none
4155 pifont.sty
4156 \end_layout
4157
4158 \end_inset
4159 </cell>
4160 </row>
4161 <row>
4162 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4163 \begin_inset Text
4164
4165 \begin_layout Plain Layout
4166
4167 \family sans
4168 \series medium
4169 \shape up
4170 \size normal
4171 \emph off
4172 \bar no
4173 \noun off
4174 \color none
4175 Ding4
4176 \end_layout
4177
4178 \end_inset
4179 </cell>
4180 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4181 \begin_inset Text
4182
4183 \begin_layout Plain Layout
4184
4185 \family typewriter
4186 \series medium
4187 \shape up
4188 \size normal
4189 \emph off
4190 \bar no
4191 \noun off
4192 \color none
4193 pifont.sty
4194 \end_layout
4195
4196 \end_inset
4197 </cell>
4198 </row>
4199 </lyxtabular>
4200
4201 \end_inset
4202
4203
4204 \end_layout
4205
4206 \begin_layout Standard
4207 LyX doesn't stop you using bullets from packages you don't have.
4208  If you get errors from LaTeX when you try to view or print the file, then
4209  it is likely you are missing a package.
4210 \begin_inset Foot
4211 status collapsed
4212
4213 \begin_layout Plain Layout
4214 LyX doesn't restrict your use since you may be editing locally and exporting
4215  elsewhere.
4216 \end_layout
4217
4218 \end_inset
4219
4220
4221 \end_layout
4222
4223 \begin_layout Subsection
4224 How to use it
4225 \end_layout
4226
4227 \begin_layout Standard
4228 Select which bullet depth you want to change then select the bullet shape
4229  and size.
4230  Any changes will not be visible in LyX, but are visible when viewing the
4231  document.
4232 \end_layout
4233
4234 \begin_layout Standard
4235 You can reset a bullet shape to the default simply by clicking your right
4236  mouse button on the appropriate bullet depth button.
4237 \begin_inset Foot
4238 status collapsed
4239
4240 \begin_layout Plain Layout
4241 If you 
4242 \emph on
4243 really
4244 \emph default
4245  want to have multiple sets of paragraphs with different sets of bullets
4246  in each, then you're going to have to get your hands dirty with TeX code.
4247  The bullet selection dialog can help though because it provides you with
4248  the LaTeX code for a wide range of bullet shapes.
4249  To make your own custom paragraphs you have the following options:
4250 \end_layout
4251
4252 \begin_layout Plain Layout
4253 \begin_inset ERT
4254 status open
4255
4256 \begin_layout Plain Layout
4257
4258
4259 \backslash
4260 let
4261 \backslash
4262 savelabelitemi=
4263 \backslash
4264 labelitemi
4265 \end_layout
4266
4267 \end_inset
4268
4269
4270 \end_layout
4271
4272 \begin_layout Plain Layout
4273 \begin_inset ERT
4274 status open
4275
4276 \begin_layout Plain Layout
4277
4278
4279 \backslash
4280 renewcommand
4281 \backslash
4282 labelitemi[0]{
4283 \backslash
4284 small
4285 \backslash
4286 (
4287 \backslash
4288 sharp
4289 \backslash
4290 )}
4291 \end_layout
4292
4293 \end_inset
4294
4295
4296 \end_layout
4297
4298 \begin_layout Itemize
4299 Use the LaTeX command 
4300 \begin_inset Flex Code
4301 status collapsed
4302
4303 \begin_layout Plain Layout
4304
4305 \backslash
4306 renewcommand{}{}
4307 \end_layout
4308
4309 \end_inset
4310
4311  to specify a new bullet shape for a given depth.
4312  You'll also need to save the current bullet shape so you can restore it
4313  again afterwards.
4314  In this itemized list the following LaTeX code was used to change the bullet
4315  used for the first depth.
4316 \end_layout
4317
4318 \begin_deeper
4319 \begin_layout LyX-Code
4320
4321 \backslash
4322 let
4323 \backslash
4324 savelabelitemi=
4325 \backslash
4326 labelitemi 
4327 \end_layout
4328
4329 \begin_layout LyX-Code
4330
4331 \backslash
4332 renewcommand
4333 \backslash
4334 labelitemi[0]{
4335 \backslash
4336 small
4337 \backslash
4338 (
4339 \backslash
4340 sharp
4341 \backslash
4342 )}
4343 \end_layout
4344
4345 \end_deeper
4346 \begin_layout Itemize
4347 Note that the itemize depth is specified in Roman numerals as part of the
4348  
4349 \family typewriter
4350
4351 \backslash
4352 labelitem
4353 \family default
4354  command.
4355 \end_layout
4356
4357 \begin_layout Itemize
4358 \begin_inset ERT
4359 status open
4360
4361 \begin_layout Plain Layout
4362
4363 [
4364 \backslash
4365 (
4366 \backslash
4367 star
4368 \backslash
4369 )]
4370 \end_layout
4371
4372 \end_inset
4373
4374  Specify each individual entry by starting each item with the bullet shape
4375  enclosed in square brackets and set as 
4376 \begin_inset Flex MenuItem
4377 status collapsed
4378
4379 \begin_layout Plain Layout
4380 TeX Code
4381 \end_layout
4382
4383 \end_inset
4384
4385 .
4386  For example, this item was started with 
4387 \begin_inset Flex Code
4388 status collapsed
4389
4390 \begin_layout Plain Layout
4391 [
4392 \backslash
4393 (
4394 \backslash
4395 star
4396 \backslash
4397 )]
4398 \end_layout
4399
4400 \end_inset
4401
4402 .
4403 \end_layout
4404
4405 \begin_layout Plain Layout
4406 \begin_inset ERT
4407 status open
4408
4409 \begin_layout Plain Layout
4410
4411
4412 \backslash
4413 renewcommand
4414 \backslash
4415 labelitemi[0]{
4416 \backslash
4417 savelabelitemi}
4418 \end_layout
4419
4420 \end_inset
4421
4422
4423 \end_layout
4424
4425 \begin_layout Plain Layout
4426 You'll also need to revert the labelitem back to its previous setting for
4427  the global bullet shape settings to remain in effect.
4428  The way used here was:
4429 \end_layout
4430
4431 \begin_layout LyX-Code
4432
4433 \backslash
4434 renewcommand
4435 \backslash
4436 labelitemi[0]{
4437 \backslash
4438 savelabelitemi}
4439 \end_layout
4440
4441 \end_inset
4442
4443
4444 \end_layout
4445
4446 \begin_layout Chapter
4447 LyX and the World Wide Web
4448 \end_layout
4449
4450 \begin_layout Standard
4451 LyX has long supported the export of documents to various web-friendly formats,
4452  such as HTML.
4453  Before verson 2.0, however, HTML export was always accomplished by the use
4454  of external converters.
4455 \begin_inset Foot
4456 status collapsed
4457
4458 \begin_layout Plain Layout
4459 For details on the use of external converters with LyX, see the 
4460 \emph on
4461 Converters
4462 \emph default
4463  section of the Customization manual.
4464 \end_layout
4465
4466 \end_inset
4467
4468  These fall into two large groups: there are converters that use LaTeX as
4469  an intermediate format, such as 
4470 \begin_inset Flex Code
4471 status collapsed
4472
4473 \begin_layout Plain Layout
4474 htlatex
4475 \end_layout
4476
4477 \end_inset
4478
4479
4480 \begin_inset Flex Code
4481 status collapsed
4482
4483 \begin_layout Plain Layout
4484 html2latex
4485 \end_layout
4486
4487 \end_inset
4488
4489 , and 
4490 \begin_inset Flex Code
4491 status collapsed
4492
4493 \begin_layout Plain Layout
4494 plastex
4495 \end_layout
4496
4497 \end_inset
4498
4499 , relying upon LyX to produce the LaTeX; and there is a converter that works
4500  directly on LyX files, 
4501 \begin_inset Flex Code
4502 status collapsed
4503
4504 \begin_layout Plain Layout
4505 eLyXer
4506 \end_layout
4507
4508 \end_inset
4509
4510 .
4511  All of these have different advantages and disadvantages.
4512  
4513 \end_layout
4514
4515 \begin_layout Standard
4516 The LaTeX-based converters have the advantage that, in principle, they know
4517  everything about the exported document that LaTeX does.
4518  Such converters do not care, for example, if a certain block of code was
4519  produced by LyX or was Evil Red Text.
4520  These converters know about 
4521 \begin_inset Flex Code
4522 status collapsed
4523
4524 \begin_layout Plain Layout
4525 aux
4526 \end_layout
4527
4528 \end_inset
4529
4530  files, counters, and references, and can often make use of the 
4531 \begin_inset Flex Code
4532 status collapsed
4533
4534 \begin_layout Plain Layout
4535 bbl
4536 \end_layout
4537
4538 \end_inset
4539
4540  files generated by BibTeX.
4541  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4542  said that only TeX itself understands TeX---and LaTeX-based converters
4543  will often choke on what seem to be quite simple constructs; complex ones
4544  can throw them completely, and as of this writing, for example, the 
4545 \emph on
4546 Embedded Objects
4547 \emph default
4548  manual will not export with 
4549 \begin_inset Flex Code
4550 status collapsed
4551
4552 \begin_layout Plain Layout
4553 htlatex
4554 \end_layout
4555
4556 \end_inset
4557
4558 , though the others will.
4559  The other issue concerns how math is handled.
4560  These converters typically convert the formulae into little pictures that
4561  are then linked from the HTML document.
4562  Since these are actually generated by LaTeX, they are accurate.
4563  But they do not scale well, and just getting them to look as if they are
4564  actually meant to be in your document---so that the font sizes seem to
4565  be roughly the same---can be a challenge.
4566 \end_layout
4567
4568 \begin_layout Standard
4569 Alex Fernandez's 
4570 \begin_inset Flex Code
4571 status collapsed
4572
4573 \begin_layout Plain Layout
4574 eLyXer
4575 \end_layout
4576
4577 \end_inset
4578
4579  (
4580 \begin_inset CommandInset href
4581 LatexCommand href
4582 name "http://elyxer.nongnu.org/"
4583 target "http://elyxer.nongnu.org/"
4584
4585 \end_inset
4586
4587 ) solves some of these problems.
4588  In particular, the formulae it produces scale perfectly, since it renders
4589  math using a combination of HTML and CSS rather than converting the formulae
4590  to images.
4591  But even moderately complex formula are rendered less well than with 
4592 \begin_inset Flex Code
4593 status collapsed
4594
4595 \begin_layout Plain Layout
4596 htlatex
4597 \end_layout
4598
4599 \end_inset
4600
4601 ; this reflects the limitations of HTML.
4602 \begin_inset Foot
4603 status collapsed
4604
4605 \begin_layout Plain Layout
4606 That said, 
4607 \begin_inset Flex Code
4608 status collapsed
4609
4610 \begin_layout Plain Layout
4611 eLyXer
4612 \end_layout
4613
4614 \end_inset
4615
4616  can also use jsMath and MathJax for equations, but this setting is only
4617  available globally and requires one to have access to a server that runs
4618  the backend.
4619 \end_layout
4620
4621 \end_inset
4622
4623  More importantly (as of version 1.1.1, at least), 
4624 \begin_inset Flex Code
4625 status collapsed
4626
4627 \begin_layout Plain Layout
4628 eLyXer
4629 \end_layout
4630
4631 \end_inset
4632
4633  has limited support for math macros and no support for user-defined paragraph
4634  or character styles.
4635  These limitations make 
4636 \begin_inset Flex Code
4637 status collapsed
4638
4639 \begin_layout Plain Layout
4640 eLyXer
4641 \end_layout
4642
4643 \end_inset
4644
4645  unsuitable for many of the documents LyX users produce.
4646  In principle, of course, these problems could be solved, but the LyX developers
4647  have decided to follow a different path and have made LyX itself capable
4648  of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4649  plaintext.
4650 \end_layout
4651
4652 \begin_layout Standard
4653 As of this writing, XHTML output remains under development and should probably
4654  be regarded as 
4655 \begin_inset Quotes eld
4656 \end_inset
4657
4658 experimental
4659 \begin_inset Quotes erd
4660 \end_inset
4661
4662 .
4663 \begin_inset Foot
4664 status collapsed
4665
4666 \begin_layout Plain Layout
4667 The file 
4668 \begin_inset Flex Code
4669 status collapsed
4670
4671 \begin_layout Plain Layout
4672 development/HTML.notes
4673 \end_layout
4674
4675 \end_inset
4676
4677 , which can be found in the LyX source tree or 
4678 \begin_inset CommandInset href
4679 LatexCommand href
4680 name "accessed online"
4681 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4682
4683 \end_inset
4684
4685 , usually contains up-to-date information about the state of XHTML output.
4686  See also the list of XHTML bugs on 
4687 \begin_inset CommandInset href
4688 LatexCommand href
4689 name "the bug tracker"
4690 target "http://www.lyx.org/trac/query?status=reopened&status=assigned&status=new&max=0&component=xhtml+export&order=id&col=id&col=summary&col=reporter&col=keywords&keywords=%21%7Efixedintrunk&desc=1"
4691
4692 \end_inset
4693
4694 .
4695 \end_layout
4696
4697 \end_inset
4698
4699  Still, the developers have chosen this approach because it has several
4700  potential advantages over the other two.
4701 \end_layout
4702
4703 \begin_layout Standard
4704 These advantages are primarily due to the fact that the XHTML output routines,
4705  since they are part of LyX, know everything LyX knows about the document
4706  being exported.
4707 \begin_inset Foot
4708 status collapsed
4709
4710 \begin_layout Plain Layout
4711 Another advantage is that, since these routines are internal to LyX, they
4712  are immune to changes in LyX's file format, or to changes in the semantics
4713  of existing insets.
4714 \end_layout
4715
4716 \end_inset
4717
4718  So they know about the table of contents (as displayed in the outline),
4719  about the counters associated with different paragraph styles, and about
4720  user-defined styles.
4721  The XHTML output routines know what LyX knows about internationalization,
4722  too, so they will output 
4723 \begin_inset Quotes eld
4724 \end_inset
4725
4726 Chapter 1
4727 \begin_inset Quotes erd
4728 \end_inset
4729
4730  or 
4731 \begin_inset Quotes eld
4732 \end_inset
4733
4734
4735 \lang ngerman
4736 Kapitel
4737 \lang english
4738  1
4739 \begin_inset Quotes erd
4740 \end_inset
4741
4742 , depending upon the language in effect at the time.
4743  
4744 \end_layout
4745
4746 \begin_layout Standard
4747 Quite generally, the output routines know what LyX knows about document
4748  layout, that is, about how the document is to be rendered on screen.
4749  We use this information when we output the document as XHTML.
4750  In particular, LyX 
4751 \emph on
4752 automatically
4753 \emph default
4754  generates CSS style information corresponding to the layout information
4755  it uses to render the document on screen: if section headings are supposed
4756  to be sans-serif and bold as seen in LyX, then (by default) they will be
4757  sans-serif and bold when viewed in a web browser, too.
4758  And this is true not just for pre-defined styles, like Section, but for
4759  any style, including user-defined styles.
4760  Indeed, the XHTML output routines make no distinction between user-defined
4761  paragraph and character styles and LyX's own pre-defined styles: in each
4762  case, everything LyX knows about the styles is contained in the layout
4763  files.
4764  And much the same is true as regards pre-defined textual insets, such as
4765  footnotes, and various custom insets.
4766  
4767 \end_layout
4768
4769 \begin_layout Standard
4770 The result is that XHTML output can be customized and extended in exactly
4771  the same way LaTeX output can be customized and extended: through layout
4772  files and modules.
4773  See chapter five of the 
4774 \emph on
4775 Customization 
4776 \emph default
4777 manual for the details.
4778 \end_layout
4779
4780 \begin_layout Standard
4781 The remainder of this chapter contains more detailed information on XHTML
4782  output, its limitations, and ways to work around those limitations.
4783 \end_layout
4784
4785 \begin_layout Section
4786 Math Output in XHTML
4787 \end_layout
4788
4789 \begin_layout Standard
4790 LyX offers four choices for how math is rendered.
4791  These have various advantages and disadvantages:
4792 \end_layout
4793
4794 \begin_layout Itemize
4795 MathML
4796 \begin_inset Newline newline
4797 \end_inset
4798
4799 MathML is a dialect of XML designed specifically for mathematics on the
4800  web, and it typically renders very well in browsers that support it.
4801  The disadvantage is that not all browsers support MathML, and support is
4802  not complete even in the Gecko-based browsers, such as Firefox.
4803 \begin_inset Newline newline
4804 \end_inset
4805
4806 If LyX is unable to render a formula as MathML---for example, if the formula
4807  uses the 
4808 \begin_inset Flex Code
4809 status collapsed
4810
4811 \begin_layout Plain Layout
4812 xymatrix
4813 \end_layout
4814
4815 \end_inset
4816
4817  package or ERT---then it will instead output the formula as an image.
4818  
4819 \end_layout
4820
4821 \begin_layout Itemize
4822 HTML
4823 \begin_inset Newline newline
4824 \end_inset
4825
4826 As mentioned above, 
4827 \begin_inset Flex Code
4828 status collapsed
4829
4830 \begin_layout Plain Layout
4831 elyxer
4832 \end_layout
4833
4834 \end_inset
4835
4836  outputs math as HTML, styled by CSS.
4837 \begin_inset Foot
4838 status collapsed
4839
4840 \begin_layout Plain Layout
4841 LyX has borrowed some of the CSS for its HTML output from 
4842 \begin_inset Flex Code
4843 status collapsed
4844
4845 \begin_layout Plain Layout
4846 elyxer
4847 \end_layout
4848
4849 \end_inset
4850
4851 .
4852 \end_layout
4853
4854 \end_inset
4855
4856  For simple formulae, this can work quite well, though with more complicated
4857  formulae it tends to break down.
4858  Still, this method has the advantage that it is very widely supported and
4859  so it may be appropriate for documents that contain only a little, fairly
4860  simple math.
4861 \begin_inset Newline newline
4862 \end_inset
4863
4864 If Lyx is unable to render a formula as HTML---for example, if the formula
4865  uses the 
4866 \begin_inset Flex Code
4867 status collapsed
4868
4869 \begin_layout Plain Layout
4870 xymatrix
4871 \end_layout
4872
4873 \end_inset
4874
4875  package or ERT---then it will instead output the formula as an image.
4876  
4877 \end_layout
4878
4879 \begin_layout Itemize
4880 Images
4881 \begin_inset Newline newline
4882 \end_inset
4883
4884 Like 
4885 \begin_inset Flex Code
4886 status collapsed
4887
4888 \begin_layout Plain Layout
4889 htlatex
4890 \end_layout
4891
4892 \end_inset
4893
4894 , LyX will output formulae as images, the very same images, in fact, that
4895  are used for instant preview.
4896 \begin_inset Foot
4897 status collapsed
4898
4899 \begin_layout Plain Layout
4900 Instant preview does 
4901 \emph on
4902 not 
4903 \emph default
4904 have to be on for images to be output, however.
4905 \end_layout
4906
4907 \end_inset
4908
4909  The advantage to this method is that the images are simply generated by
4910  LaTeX, so they are very accurate.
4911  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4912  so they do not scale terribly well, and one cannot copy them, etc.
4913  (As of this writing, there are also problems about equation numbering.
4914  See 
4915 \begin_inset CommandInset href
4916 LatexCommand href
4917 name "bug 6894"
4918 target "http://www.lyx.org/trac/ticket/6894"
4919
4920 \end_inset
4921
4922 .)
4923 \begin_inset Newline newline
4924 \end_inset
4925
4926 The size of the images can be controlled by setting the 
4927 \begin_inset Quotes eld
4928 \end_inset
4929
4930 Math Images Scaling
4931 \begin_inset Quotes erd
4932 \end_inset
4933
4934  parameter under 
4935 \begin_inset Flex MenuItem
4936 status collapsed
4937
4938 \begin_layout Plain Layout
4939 Document\SpecialChar \menuseparator
4940 Settings\SpecialChar \menuseparator
4941 Output
4942 \end_layout
4943
4944 \end_inset
4945
4946 .
4947 \begin_inset Foot
4948 status collapsed
4949
4950 \begin_layout Plain Layout
4951 For those who want to know, this controls the resolution of the image in
4952  dots per inch and is based upon a default of 75 dpi.
4953 \end_layout
4954
4955 \end_inset
4956
4957
4958 \begin_inset Newline newline
4959 \end_inset
4960
4961 If LyX for some reason fails to create an image for a formula (e.g., if a
4962  required LaTeX package is not installed), then it will fall back to outputing
4963  the raw LaTeX.
4964 \end_layout
4965
4966 \begin_layout Itemize
4967 LaTeX
4968 \begin_inset Newline newline
4969 \end_inset
4970
4971 Finally, LyX will happily output math as LaTeX.
4972  As well as being the output of last resort, this method can be used with
4973  such tools as 
4974 \begin_inset CommandInset href
4975 LatexCommand href
4976 name "jsMath"
4977 target "http://www.math.union.edu/~dpvc/jsMath/"
4978
4979 \end_inset
4980
4981 , which uses JavaScript to render LaTeX embedded in HTML documents.
4982  LyX wraps the LaTeX in either a 
4983 \begin_inset Flex Code
4984 status collapsed
4985
4986 \begin_layout Plain Layout
4987 span
4988 \end_layout
4989
4990 \end_inset
4991
4992  (for inline formulas) or 
4993 \begin_inset Flex Code
4994 status collapsed
4995
4996 \begin_layout Plain Layout
4997 div
4998 \end_layout
4999
5000 \end_inset
5001
5002  (for displayed formulas) with 
5003 \begin_inset Flex Code
5004 status collapsed
5005
5006 \begin_layout Plain Layout
5007 class='math'
5008 \end_layout
5009
5010 \end_inset
5011
5012 , as is required for jsMath.
5013 \end_layout
5014
5015 \begin_layout Standard
5016 One of these output methods must be selected under 
5017 \begin_inset Flex MenuItem
5018 status collapsed
5019
5020 \begin_layout Plain Layout
5021 Document\SpecialChar \menuseparator
5022 Settings\SpecialChar \menuseparator
5023 Output
5024 \end_layout
5025
5026 \end_inset
5027
5028 .
5029  By default, LyX outputs MathML.
5030  This is a document-wide setting, therefore.
5031 \end_layout
5032
5033 \begin_layout Standard
5034 Eventually, LyX will offer the user the option to select an alternate output
5035  method for a particular inset, say, one that isn't being rendered very
5036  well by MathML.
5037 \begin_inset Foot
5038 status collapsed
5039
5040 \begin_layout Plain Layout
5041 That said, since LyX falls back to images if the inset contains ERT, then
5042  one can force output as an image by putting some harmless ERT into the
5043  math, for example: 
5044 \begin_inset Formula $a=b\relax$
5045 \end_inset
5046
5047 .
5048 \end_layout
5049
5050 \end_inset
5051
5052
5053 \end_layout
5054
5055 \begin_layout Section
5056 Bibliography and Citations
5057 \end_layout
5058
5059 \begin_layout Standard
5060 XHTML output fully supports bibliographies and citations.
5061  
5062 \end_layout
5063
5064 \begin_layout Standard
5065 Citation labels are generated by the same machinery that generates LyX's
5066  on-screen labels, so the labels will look in the output much as they do
5067  in LyX, though better.
5068  If you are using numerical citations, then LyX will output numerical labels,
5069  such as [1] or [17], rather than simply showing the citation key in square
5070  brackets, as it does on-screen.
5071  If you are using author-year citations, then LyX will add lowercase letters
5072  to the years, just as BibTeX does, if it finds more than one citation for
5073  a given author-year combination.
5074  The labels will be printed with the bibliography entries.
5075  Note that there is, at present, no way to customize the appearance of the
5076  labels, for example, to choose between square brackets and parentheses.
5077 \end_layout
5078
5079 \begin_layout Standard
5080 Bibliography output is handled by the same machinery that handles the presentati
5081 on of reference information in the citation dialog, so you will see in the
5082  XHTML output pretty much what you would see if you were to look at a given
5083  entry in the citation dialog.
5084  The formatting can be customized in your layout file or, preferably, in
5085  a module.
5086  See the 
5087 \emph on
5088 Customization
5089 \emph default
5090  manual for the details.
5091 \end_layout
5092
5093 \begin_layout Standard
5094 The main defect at present is that cross-referenced information is printed
5095  with every entry with which it is associated.
5096  So you can see things like this:
5097 \end_layout
5098
5099 \begin_layout Quote
5100 Jason Stanley, 
5101 \begin_inset Quotes eld
5102 \end_inset
5103
5104 Context and Logical Form
5105 \begin_inset Quotes erd
5106 \end_inset
5107
5108 , in 
5109 \emph on
5110 Language in Context: Selected Essays
5111 \emph default
5112  (Oxford: Oxford University Press, 2007), pp.
5113  30--68.
5114 \end_layout
5115
5116 \begin_layout Quote
5117 Jason Stanley, 
5118 \begin_inset Quotes eld
5119 \end_inset
5120
5121 Semantics in Context
5122 \begin_inset Quotes erd
5123 \end_inset
5124
5125 , in 
5126 \emph on
5127 Language in Context: Selected Essays
5128 \emph default
5129  (Oxford: Oxford University Press, 2007), pp.
5130  201--30.
5131 \end_layout
5132
5133 \begin_layout Standard
5134 This should be fixed before long.
5135 \end_layout
5136
5137 \begin_layout Standard
5138 There is no support at present for sectioned bibliographies.
5139  If you have multiple bibliographies, then LyX will print the same bibliography
5140  over and over.
5141 \end_layout
5142
5143 \begin_layout Section
5144 Indexes
5145 \end_layout
5146
5147 \begin_layout Standard
5148 LyX will happily export indexes as XHTML, but with certain limitations at
5149  the moment.
5150 \end_layout
5151
5152 \begin_layout Standard
5153 Index export will be most reliable when you do not attempt to use the fancy
5154  constructs that are described in the section on indexes in the 
5155 \emph on
5156 User's Guide
5157 \emph default
5158 .
5159 \begin_inset Foot
5160 status collapsed
5161
5162 \begin_layout Plain Layout
5163 The main issue here is that LyX itself does not really handle these.
5164  It just lets you enter what you would have to enter in raw LaTeX.
5165 \end_layout
5166
5167 \end_inset
5168
5169  We'll describe how they are handled using the subsection headings from
5170  that section.
5171 \end_layout
5172
5173 \begin_layout Itemize
5174 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5175  these, but the entries must be separated by 
5176 \begin_inset Quotes eld
5177 \end_inset
5178
5179  ! 
5180 \begin_inset Quotes erd
5181 \end_inset
5182
5183 , that is, there must be spaces around the exclamation point.
5184  This is because it is otherwise too difficult to check for escaped exclamation
5185  points, ones in math, and so forth.
5186 \end_layout
5187
5188 \begin_layout Itemize
5189 Page Ranges: There is no support at all for page ranges, since these make
5190  no sense with XHMTL.
5191  Instead, you will just get two index entries, one at either end.
5192 \end_layout
5193
5194 \begin_layout Itemize
5195 Cross-referencing: There is no support for cross-referencing.
5196  If LyX finds an entry containing the 
5197 \begin_inset Quotes eld
5198 \end_inset
5199
5200 |see\SpecialChar \ldots{}
5201
5202 \begin_inset Quotes erd
5203 \end_inset
5204
5205  construct, it is just dropped, and the rest is treated as an ordinary index
5206  entry.
5207 \end_layout
5208
5209 \begin_layout Itemize
5210 Index Entry Order: LyX does support attempts to fix the sorting order.
5211  It will take what is before the first `@' it finds and use that for sorting,
5212  taking what follows the first `@' to be the actual entry.
5213  At present, LyX does not check for escaped `@', so do not try to index
5214  email addresses.
5215 \end_layout
5216
5217 \begin_layout Itemize
5218 Index Entry Layout: You can format entries by using the text style dialog,
5219  or by using any other method available within LyX itself.
5220  There is no support for constructs like: 
5221 \begin_inset Quotes eld
5222 \end_inset
5223
5224 entry|textbf
5225 \begin_inset Quotes erd
5226 \end_inset
5227
5228 .
5229  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5230  and everything that follows it.
5231 \end_layout
5232
5233 \begin_layout Itemize
5234 Multiple Indexes: There is no support for multiple indexes.
5235  Rather, all index entries will be printed as one large index.
5236  To avoid our printing several versions of the index, we print only the
5237  main index, so make sure you have one.
5238 \end_layout
5239
5240 \begin_layout Section
5241 Nomenclature and Glossary
5242 \end_layout
5243
5244 \begin_layout Standard
5245 There is at present no support for glossaries.
5246  Adding it would be fairly trivial, and welcome.
5247 \end_layout
5248
5249 \begin_layout Chapter
5250 The LyX Server
5251 \end_layout
5252
5253 \begin_layout Section
5254 Introduction
5255 \end_layout
5256
5257 \begin_layout Standard
5258 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5259  and retrieve information about the LyX internal state.
5260  This is only intended for advanced users, but they should find it useful.
5261  It is by writing to the LyX server, for example, that bibliography managers,
5262  such as JabRef, are able to 
5263 \begin_inset Quotes eld
5264 \end_inset
5265
5266 push
5267 \begin_inset Quotes erd
5268 \end_inset
5269
5270  citations to LyX.
5271 \end_layout
5272
5273 \begin_layout Section
5274 Starting the LyX Server
5275 \end_layout
5276
5277 \begin_layout Standard
5278 The LyX server works through the use of a pair of named pipes.
5279  These are usually located in 
5280 \begin_inset Flex Code
5281 status collapsed
5282
5283 \begin_layout Plain Layout
5284 UserDir
5285 \end_layout
5286
5287 \end_inset
5288
5289 , (except on Windows, where 
5290 \emph on
5291 local
5292 \emph default
5293  named pipes are special objects located in 
5294 \begin_inset Flex Code
5295 status collapsed
5296
5297 \begin_layout Plain Layout
5298
5299 \backslash
5300
5301 \backslash
5302 .
5303 \backslash
5304 pipe
5305 \end_layout
5306
5307 \end_inset
5308
5309 ) and have the names 
5310 \begin_inset Quotes eld
5311 \end_inset
5312
5313
5314 \begin_inset Flex Code
5315 status collapsed
5316
5317 \begin_layout Plain Layout
5318 lyxpipe.in
5319 \end_layout
5320
5321 \end_inset
5322
5323
5324 \begin_inset Quotes erd
5325 \end_inset
5326
5327  and 
5328 \begin_inset Quotes eld
5329 \end_inset
5330
5331
5332 \begin_inset Flex Code
5333 status collapsed
5334
5335 \begin_layout Plain Layout
5336 lyxpipe.out
5337 \end_layout
5338
5339 \end_inset
5340
5341
5342 \begin_inset Quotes erd
5343 \end_inset
5344
5345 .
5346  External programs write into 
5347 \begin_inset Flex Code
5348 status collapsed
5349
5350 \begin_layout Plain Layout
5351 lyxpipe.in
5352 \end_layout
5353
5354 \end_inset
5355
5356  and read back data from 
5357 \begin_inset Flex Code
5358 status collapsed
5359
5360 \begin_layout Plain Layout
5361 lyxpipe.out
5362 \end_layout
5363
5364 \end_inset
5365
5366 .
5367  The stem of the pipe names can be defined in the 
5368 \begin_inset Flex MenuItem
5369 status collapsed
5370
5371 \begin_layout Plain Layout
5372 Tools\SpecialChar \menuseparator
5373 Preferences
5374 \end_layout
5375
5376 \end_inset
5377
5378  dialog, for example 
5379 \begin_inset Flex Code
5380 status collapsed
5381
5382 \begin_layout Plain Layout
5383 "/home/myhome/lyxpipe"
5384 \end_layout
5385
5386 \end_inset
5387
5388 , or 
5389 \begin_inset Flex Code
5390 status collapsed
5391
5392 \begin_layout Plain Layout
5393 "
5394 \backslash
5395
5396 \backslash
5397 .
5398 \backslash
5399 pipe
5400 \backslash
5401 lyxpipe"
5402 \end_layout
5403
5404 \end_inset
5405
5406  on Windows (but any working path can be used).
5407  You 
5408 \emph on
5409 must
5410 \emph default
5411  configure this manually in order for the server to start.
5412 \end_layout
5413
5414 \begin_layout Standard
5415 LyX will add the '
5416 \begin_inset Flex Code
5417 status collapsed
5418
5419 \begin_layout Plain Layout
5420 .in
5421 \end_layout
5422
5423 \end_inset
5424
5425 ' and '
5426 \begin_inset Flex Code
5427 status collapsed
5428
5429 \begin_layout Plain Layout
5430 .out
5431 \end_layout
5432
5433 \end_inset
5434
5435 ' to create the pipes.
5436  If one of the pipes already exists, LyX will assume that another LyX process
5437  is already running and will not start the server.
5438  On POSIX (Unix like) systems, if for some other reason, an unused 
5439 \begin_inset Quotes eld
5440 \end_inset
5441
5442 stale
5443 \begin_inset Quotes erd
5444 \end_inset
5445
5446  pipe is left in existence when LyX closes, then LyX will try to delete
5447  it.
5448  If this fails for some reason, you will need to delete the pipes manually
5449  and then restart LyX.
5450  On Windows, pipes are deleted by the OS on program termination or crash,
5451  so 
5452 \begin_inset Quotes eld
5453 \end_inset
5454
5455 stale
5456 \begin_inset Quotes erd
5457 \end_inset
5458
5459  pipes should not be possible.
5460 \end_layout
5461
5462 \begin_layout Standard
5463 To have several LyX processes with servers at the same time, you have to
5464  use different configurations, perhaps by using separate user directories,
5465  each with its own 
5466 \begin_inset Flex Code
5467 status collapsed
5468
5469 \begin_layout Plain Layout
5470 preferences
5471 \end_layout
5472
5473 \end_inset
5474
5475  file, for each process.
5476 \end_layout
5477
5478 \begin_layout Standard
5479 If you are developing a client program, you might find it useful to enable
5480  debugging information from the LyX server.
5481  Do this by starting LyX as 
5482 \begin_inset Flex Code
5483 status collapsed
5484
5485 \begin_layout Plain Layout
5486 lyx -dbg lyxserver
5487 \end_layout
5488
5489 \end_inset
5490
5491 .
5492 \end_layout
5493
5494 \begin_layout Standard
5495 You can find a complete example client written in C in the source distribution
5496  as 
5497 \begin_inset Flex Code
5498 status collapsed
5499
5500 \begin_layout Plain Layout
5501 development/lyxserver/server_monitor.c
5502 \end_layout
5503
5504 \end_inset
5505
5506 .
5507 \end_layout
5508
5509 \begin_layout Standard
5510 Another useful tool is command-line based client you will find in 
5511 \begin_inset Flex Code
5512 status collapsed
5513
5514 \begin_layout Plain Layout
5515 src/client/lyxclient
5516 \end_layout
5517
5518 \end_inset
5519
5520 .
5521 \end_layout
5522
5523 \begin_layout Section
5524 Normal communication
5525 \end_layout
5526
5527 \begin_layout Standard
5528 To issue a LyX call, the client writes a line of ASCII text into the input
5529  pipe.
5530  This line has the following format:
5531 \end_layout
5532
5533 \begin_layout Quote
5534 LYXCMD:
5535 \emph on
5536 clientname
5537 \emph default
5538 :
5539 \emph on
5540 function
5541 \emph default
5542 :
5543 \emph on
5544 argument
5545 \end_layout
5546
5547 \begin_layout Description
5548 clientname is a name that the client can choose arbitrarily.
5549  Its only use is that LyX will echo it if it sends an answer—so a client
5550  can dispatch results from different requesters.
5551 \end_layout
5552
5553 \begin_layout Description
5554 function is the function you want LyX to perform.
5555  It is the same as the commands you'd use in the minibuffer.
5556 \end_layout
5557
5558 \begin_layout Description
5559 argument is an optional argument which is meaningful only to some functions
5560  (for instance, the 
5561 \begin_inset Quotes eld
5562 \end_inset
5563
5564 self-insert
5565 \begin_inset Quotes erd
5566 \end_inset
5567
5568  LFUN will insert the argument as text at the cursor position).
5569 \end_layout
5570
5571 \begin_layout Standard
5572 The answer from LyX will arrive in the output pipe and be of the form
5573 \end_layout
5574
5575 \begin_layout Quote
5576 INFO:
5577 \emph on
5578 clientname
5579 \emph default
5580 :
5581 \emph on
5582 function
5583 \emph default
5584 :
5585 \emph on
5586 data
5587 \end_layout
5588
5589 \begin_layout Standard
5590 where 
5591 \emph on
5592 clientname
5593 \emph default
5594  and 
5595 \emph on
5596 function
5597 \emph default
5598  are just echoed from the command request, while 
5599 \emph on
5600 data
5601 \emph default
5602  is more or less useful information filled according to how the command
5603  execution worked out.
5604  Some commands, such as 
5605 \begin_inset Quotes eld
5606 \end_inset
5607
5608 font-state
5609 \begin_inset Quotes erd
5610 \end_inset
5611
5612 , will return information about the internal state of LyX, while other will
5613  return an empty data-response.
5614  This means that the command execution went fine.
5615 \end_layout
5616
5617 \begin_layout Standard
5618 In case of errors, the response from LyX will have this form
5619 \end_layout
5620
5621 \begin_layout Quote
5622 ERROR:
5623 \emph on
5624 clientname
5625 \emph default
5626 :
5627 \emph on
5628 function
5629 \emph default
5630 :
5631 \emph on
5632 error message
5633 \end_layout
5634
5635 \begin_layout Standard
5636 where the 
5637 \emph on
5638 error message
5639 \emph default
5640  should contain an explanation of why the command failed.
5641 \end_layout
5642
5643 \begin_layout Standard
5644 Examples:
5645 \end_layout
5646
5647 \begin_layout LyX-Code
5648 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5649 \begin_inset Newline newline
5650 \end_inset
5651
5652 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5653 \begin_inset Newline newline
5654 \end_inset
5655
5656 read a <~/.lyxpipe.out
5657 \begin_inset Newline newline
5658 \end_inset
5659
5660 echo $a
5661 \end_layout
5662
5663 \begin_layout Section
5664 Notification
5665 \end_layout
5666
5667 \begin_layout Standard
5668 LyX can notify clients of events going on asynchronously.
5669  Currently it will only do this if the user binds a key sequence with the
5670  function 
5671 \begin_inset Quotes eld
5672 \end_inset
5673
5674 notify
5675 \begin_inset Quotes erd
5676 \end_inset
5677
5678 .
5679  The format of the string LyX sends is as follows:
5680 \end_layout
5681
5682 \begin_layout Quote
5683 \begin_inset Flex Code
5684 status collapsed
5685
5686 \begin_layout Plain Layout
5687 NOTIFY:
5688 \end_layout
5689
5690 \end_inset
5691
5692
5693 \emph on
5694 key-sequence
5695 \end_layout
5696
5697 \begin_layout Standard
5698 where 
5699 \emph on
5700 key-sequence
5701 \emph default
5702  is the printed representation of the key sequence that was actually typed
5703  by the user.
5704 \end_layout
5705
5706 \begin_layout Standard
5707 This mechanism can be used to extend LyX's command set and implement macros.
5708  Bind some key sequence to 
5709 \begin_inset Quotes eld
5710 \end_inset
5711
5712 notify
5713 \begin_inset Quotes erd
5714 \end_inset
5715
5716 .
5717  Then start a client that listens on the output pipe, dispatches the command
5718  according to the sequence, and starts a function that may use LyX calls
5719  and LyX requests to issue a command or a series of commands to LyX.
5720 \end_layout
5721
5722 \begin_layout Section
5723 The simple LyX Server Protocol
5724 \end_layout
5725
5726 \begin_layout Standard
5727 LyX implements a simple protocol that can be used for session management.
5728  All messages are of the form
5729 \end_layout
5730
5731 \begin_layout Quote
5732 LYXSRV:
5733 \emph on
5734 clientname
5735 \emph default
5736 :
5737 \emph on
5738 protocol message
5739 \end_layout
5740
5741 \begin_layout Standard
5742 where 
5743 \emph on
5744 protocol message
5745 \emph default
5746  can be 
5747 \begin_inset Quotes eld
5748 \end_inset
5749
5750 hello
5751 \begin_inset Quotes erd
5752 \end_inset
5753
5754  or 
5755 \begin_inset Quotes eld
5756 \end_inset
5757
5758 bye
5759 \begin_inset Quotes erd
5760 \end_inset
5761
5762 .
5763  If 
5764 \begin_inset Quotes eld
5765 \end_inset
5766
5767 hello
5768 \begin_inset Quotes erd
5769 \end_inset
5770
5771  is received from a client, LyX will report back to inform the client that
5772  it's listening to it's messages, while 
5773 \begin_inset Quotes eld
5774 \end_inset
5775
5776 bye
5777 \begin_inset Quotes erd
5778 \end_inset
5779
5780  sent from LyX will inform clients that LyX is closing.
5781 \end_layout
5782
5783 \begin_layout Section
5784 Reverse DVI/PDF search
5785 \end_layout
5786
5787 \begin_layout Standard
5788 Some DVI/PDF viewers
5789 \begin_inset Foot
5790 status collapsed
5791
5792 \begin_layout Plain Layout
5793 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5794  Skim on Mac OSX and SumatraPDF on Windows.
5795 \end_layout
5796
5797 \end_inset
5798
5799  provide 
5800 \emph on
5801 reverse search
5802 \emph default
5803  facility (also called 
5804 \emph on
5805 inverse search
5806 \emph default
5807 ).
5808  This means that you can tell LyX to put the cursor to a specific line in
5809  the document by clicking at the respective position in the DVI/PDF output.
5810  To achieve this, the viewer must be able to communicate with LyX.
5811  This is done via the LyX server either by using the named pipe (
5812 \emph on
5813 lyxpipe
5814 \emph default
5815 ), or the UNIX domain socket (
5816 \emph on
5817 lyxsocket
5818 \emph default
5819 ) that LyX creates in its temporary directory (this is the way the 
5820 \begin_inset Flex Code
5821 status collapsed
5822
5823 \begin_layout Plain Layout
5824 lyxclient
5825 \end_layout
5826
5827 \end_inset
5828
5829  program communicates with LyX).
5830  In some cases, you need a helper script that mediates between the viewer
5831  and LyX, in others, the viewer can communicate with LyX directly.
5832  This depends on the selected viewer and on your operating system.
5833  The same applies to the way viewers need to be configured and the way the
5834  reverse search is actually performed.
5835  In what follows, we will thus describe how to setup reverse search for
5836  specific viewers.
5837  Before we turn to this, though, we will explain what needs to be done generally
5838  to enable reverse search in the DVI/PDF output.
5839 \end_layout
5840
5841 \begin_layout Subsection
5842 \begin_inset CommandInset label
5843 LatexCommand label
5844 name "sub:rev-search"
5845
5846 \end_inset
5847
5848 Automatic setup
5849 \end_layout
5850
5851 \begin_layout Standard
5852 In most cases LyX will do the work for you by enabling 
5853 \begin_inset Flex MenuItem
5854 status collapsed
5855
5856 \begin_layout Plain Layout
5857 Document\SpecialChar \menuseparator
5858 Output\SpecialChar \menuseparator
5859 Synchronize with Output
5860 \end_layout
5861
5862 \end_inset
5863
5864 .
5865  In such a case LyX will automatically insert the necessary SyncTeX macro
5866  (for PDF) or load the srcltx package (for DVI) respectively.
5867  This option can be easily reached also on 
5868 \begin_inset Flex Code
5869 status collapsed
5870
5871 \begin_layout Plain Layout
5872 View/Update
5873 \end_layout
5874
5875 \end_inset
5876
5877  Toolbar.
5878 \end_layout
5879
5880 \begin_layout Standard
5881 If you need a different setting, you can select or input a custom macro
5882  from the drop down box just below 
5883 \begin_inset Flex MenuItem
5884 status collapsed
5885
5886 \begin_layout Plain Layout
5887 Document\SpecialChar \menuseparator
5888 Output\SpecialChar \menuseparator
5889 Synchronize with Output
5890 \end_layout
5891
5892 \end_inset
5893
5894 .
5895 \end_layout
5896
5897 \begin_layout Standard
5898 Please note that including the 
5899 \begin_inset Flex Code
5900 status collapsed
5901
5902 \begin_layout Plain Layout
5903 srcltx
5904 \end_layout
5905
5906 \end_inset
5907
5908  package or 
5909 \begin_inset Flex Code
5910 status collapsed
5911
5912 \begin_layout Plain Layout
5913 src-specials
5914 \end_layout
5915
5916 \end_inset
5917
5918  sometimes has an undesired impact on the typesetting.
5919  Thus, you should switch output synchronization off for the final typesetting
5920  if you use the 
5921 \begin_inset Flex Code
5922 status collapsed
5923
5924 \begin_layout Plain Layout
5925 srcltx
5926 \end_layout
5927
5928 \end_inset
5929
5930  package or 
5931 \begin_inset Flex Code
5932 status collapsed
5933
5934 \begin_layout Plain Layout
5935 src-specials
5936 \end_layout
5937
5938 \end_inset
5939
5940 .
5941 \end_layout
5942
5943 \begin_layout Standard
5944 In case you need some more special settings that are not covered by the
5945  automatic settings, read the next section about how to set up output synchroniz
5946 ation manually.
5947  If the automatic setup suits your needs, you can readily jump to section
5948 \begin_inset space ~
5949 \end_inset
5950
5951
5952 \begin_inset CommandInset ref
5953 LatexCommand ref
5954 reference "sub:configuring-viewers"
5955
5956 \end_inset
5957
5958 , where the necessary configuration steps in your viewer -- needed both
5959  with the automatic and the manual setup -- are described.
5960 \end_layout
5961
5962 \begin_layout Subsection
5963 Manual setup
5964 \end_layout
5965
5966 \begin_layout Standard
5967 LaTeX provides several different methods for reverse search.
5968  Some are built-in in the 
5969 \begin_inset Flex Code
5970 status collapsed
5971
5972 \begin_layout Plain Layout
5973 latex/pdflatex
5974 \end_layout
5975
5976 \end_inset
5977
5978  program, some are provided by external packages.
5979  Your choice depends on whether your LaTeX distribution already provides
5980  a given method (the built-in methods are rather new) and whether your viewer
5981  can cope with it.
5982  The available methods are described in the following.
5983 \end_layout
5984
5985 \begin_layout Subsubsection*
5986 Built-in DVI-search via src-specials (DVI only) 
5987 \end_layout
5988
5989 \begin_layout Standard
5990 This method provides the DVI file with the necessary information for reverse
5991  search.
5992  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5993  distribution should include it), and it works reliably.
5994  To enable it, change the 
5995 \begin_inset Flex MenuItem
5996 status collapsed
5997
5998 \begin_layout Plain Layout
5999 LaT
6000 \begin_inset ERT
6001 status collapsed
6002
6003 \begin_layout Plain Layout
6004
6005 {}
6006 \end_layout
6007
6008 \end_inset
6009
6010 eX (plain)->DVI
6011 \end_layout
6012
6013 \end_inset
6014
6015  or 
6016 \begin_inset Flex MenuItem
6017 status collapsed
6018
6019 \begin_layout Plain Layout
6020 LaT
6021 \begin_inset ERT
6022 status collapsed
6023
6024 \begin_layout Plain Layout
6025
6026 {}
6027 \end_layout
6028
6029 \end_inset
6030
6031 eX (plain)->DraftDVI
6032 \end_layout
6033
6034 \end_inset
6035
6036  converter in 
6037 \begin_inset Flex MenuItem
6038 status collapsed
6039
6040 \begin_layout Plain Layout
6041 Preferences\SpecialChar \menuseparator
6042 File Handling\SpecialChar \menuseparator
6043 Converters
6044 \end_layout
6045
6046 \end_inset
6047
6048  to 
6049 \begin_inset Flex Code
6050 status collapsed
6051
6052 \begin_layout Plain Layout
6053 latex -src-specials $$i
6054 \end_layout
6055
6056 \end_inset
6057
6058 .
6059  If this doesn't work, check if your TeX engine needs different options
6060  (the syntax might differ in some distributions).
6061 \end_layout
6062
6063 \begin_layout Subsubsection*
6064 External Packages (PDFSync and scrltx) 
6065 \end_layout
6066
6067 \begin_layout Standard
6068 The packages 
6069 \emph on
6070 pdfsync
6071 \emph default
6072  and 
6073 \emph on
6074 scrltx
6075 \emph default
6076  provide reverse search facility for PDF output (via pdflatex) and DVI output,
6077  respectively.
6078  In order to enable it, load the packages in the LyX preamble: 
6079 \end_layout
6080
6081 \begin_layout Itemize
6082 \begin_inset Flex Code
6083 status collapsed
6084
6085 \begin_layout Plain Layout
6086
6087 \backslash
6088 usepackage{pdfsync}
6089 \end_layout
6090
6091 \end_inset
6092
6093  for reverse PDF search,
6094 \end_layout
6095
6096 \begin_layout Itemize
6097  
6098 \begin_inset Flex Code
6099 status collapsed
6100
6101 \begin_layout Plain Layout
6102
6103 \backslash
6104 usepackage[active]{srcltx}
6105 \end_layout
6106
6107 \end_inset
6108
6109  for reverse DVI search.
6110 \end_layout
6111
6112 \begin_layout Standard
6113 If you want to be able to perform both DVI and PDF reverse searches, you
6114  can also insert in the preamble the following lines
6115 \end_layout
6116
6117 \begin_layout LyX-Code
6118
6119 \backslash
6120 usepackage{ifpdf}
6121 \begin_inset Newline newline
6122 \end_inset
6123
6124
6125 \backslash
6126 ifpdf
6127 \begin_inset Newline newline
6128 \end_inset
6129
6130   
6131 \backslash
6132 usepackage{pdfsync}
6133 \begin_inset Newline newline
6134 \end_inset
6135
6136
6137 \backslash
6138 else
6139 \begin_inset Newline newline
6140 \end_inset
6141
6142   
6143 \backslash
6144 usepackage[active]{srcltx}
6145 \begin_inset Newline newline
6146 \end_inset
6147
6148
6149 \backslash
6150 fi
6151 \end_layout
6152
6153 \begin_layout Standard
6154 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6155  right package will be used.
6156 \end_layout
6157
6158 \begin_layout Standard
6159 Note that PDFSync might affect the output layout of your document.
6160  It is therefore advised to disable PDFsync for final documents.
6161 \end_layout
6162
6163 \begin_layout Subsubsection*
6164 Built-in reverse search via SyncTeX (DVI and PDF) 
6165 \end_layout
6166
6167 \begin_layout Standard
6168 Recent versions of 
6169 \begin_inset Flex Code
6170 status collapsed
6171
6172 \begin_layout Plain Layout
6173 (pdf)latex
6174 \end_layout
6175
6176 \end_inset
6177
6178  have built-in support for both PDF and DVI reverse search.
6179  This so-called 
6180 \emph on
6181 SyncTeX
6182 \emph default
6183  facility is basically the result of the integration of the PDFSync package
6184  to the pdftex program and its merge with the 
6185 \emph on
6186 scr-specials
6187 \emph default
6188  approach.
6189  You need at least TeXLive 2008 or a recent MikTeX distribution in order
6190  to use it.
6191  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6192  already provide SyncTeX support.
6193 \end_layout
6194
6195 \begin_layout Standard
6196 To enable SyncTeX for DVI output, change the 
6197 \begin_inset Flex MenuItem
6198 status collapsed
6199
6200 \begin_layout Plain Layout
6201 LaT
6202 \begin_inset ERT
6203 status collapsed
6204
6205 \begin_layout Plain Layout
6206
6207 {}
6208 \end_layout
6209
6210 \end_inset
6211
6212 eX (plain) -> DVI
6213 \end_layout
6214
6215 \end_inset
6216
6217  or 
6218 \begin_inset Flex MenuItem
6219 status collapsed
6220
6221 \begin_layout Plain Layout
6222 LaT
6223 \begin_inset ERT
6224 status collapsed
6225
6226 \begin_layout Plain Layout
6227
6228 {}
6229 \end_layout
6230
6231 \end_inset
6232
6233 eX (plain) -> DraftDVI
6234 \end_layout
6235
6236 \end_inset
6237
6238  converter in 
6239 \begin_inset Flex MenuItem
6240 status collapsed
6241
6242 \begin_layout Plain Layout
6243 Preferences\SpecialChar \menuseparator
6244 File Handling\SpecialChar \menuseparator
6245 Converters
6246 \end_layout
6247
6248 \end_inset
6249
6250  to 
6251 \begin_inset Flex Code
6252 status collapsed
6253
6254 \begin_layout Plain Layout
6255 latex -synctex=1 $$i
6256 \end_layout
6257
6258 \end_inset
6259
6260 , and for PDF output, change the 
6261 \begin_inset Flex MenuItem
6262 status collapsed
6263
6264 \begin_layout Plain Layout
6265 LaT
6266 \begin_inset ERT
6267 status collapsed
6268
6269 \begin_layout Plain Layout
6270
6271 {}
6272 \end_layout
6273
6274 \end_inset
6275
6276 eX (pdflatex) -> PDF (pdflatex)
6277 \end_layout
6278
6279 \end_inset
6280
6281  or converter to 
6282 \begin_inset Flex Code
6283 status collapsed
6284
6285 \begin_layout Plain Layout
6286 pdflatex -synctex=1 $$i
6287 \end_layout
6288
6289 \end_inset
6290
6291 .
6292  Check the documentation of your viewer whether the viewer needs to be configure
6293 d for the use with SyncTeX.
6294 \begin_inset Foot
6295 status collapsed
6296
6297 \begin_layout Plain Layout
6298 The 
6299 \begin_inset Flex Code
6300 status collapsed
6301
6302 \begin_layout Plain Layout
6303 -synctex=1
6304 \end_layout
6305
6306 \end_inset
6307
6308  option enables gzip compression.
6309  If your viewer does not support it, you should instead use 
6310 \begin_inset Flex Code
6311 status collapsed
6312
6313 \begin_layout Plain Layout
6314 -synctex=-1
6315 \end_layout
6316
6317 \end_inset
6318
6319 .
6320 \end_layout
6321
6322 \end_inset
6323
6324
6325 \end_layout
6326
6327 \begin_layout Subsection
6328 Configuring and using specific viewers
6329 \begin_inset CommandInset label
6330 LatexCommand label
6331 name "sub:configuring-viewers"
6332
6333 \end_inset
6334
6335
6336 \end_layout
6337
6338 \begin_layout Subsubsection*
6339 Xdvi (all platforms)
6340 \end_layout
6341
6342 \begin_layout Standard
6343 If you use 
6344 \begin_inset Flex Code
6345 status collapsed
6346
6347 \begin_layout Plain Layout
6348 xdvi
6349 \end_layout
6350
6351 \end_inset
6352
6353 , you don't need to do anything else for performing a reverse DVI search,
6354  as LyX already provides the necessary hooks for automatically using the
6355  
6356 \begin_inset Flex Code
6357 status collapsed
6358
6359 \begin_layout Plain Layout
6360 lyxclient
6361 \end_layout
6362
6363 \end_inset
6364
6365  program.
6366  Just setup your document as described above (reverse search is triggered
6367  by Ctrl-click or Alt-click on Mac OSX, respectively).
6368 \end_layout
6369
6370 \begin_layout Standard
6371 However, if for whatever reason you want to use the named pipe instead of
6372  the socket for communicating with LyX, simply change the DVI viewer in
6373  
6374 \begin_inset Flex MenuItem
6375 status collapsed
6376
6377 \begin_layout Plain Layout
6378 Preferences\SpecialChar \menuseparator
6379 File Handling\SpecialChar \menuseparator
6380 File formats
6381 \end_layout
6382
6383 \end_inset
6384
6385  to
6386 \begin_inset Foot
6387 status collapsed
6388
6389 \begin_layout Plain Layout
6390 On Mac OSX you have to use 
6391 \begin_inset Flex Code
6392 status collapsed
6393
6394 \begin_layout Plain Layout
6395 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6396 \end_layout
6397
6398 \end_inset
6399
6400
6401 \end_layout
6402
6403 \end_inset
6404
6405  
6406 \begin_inset Flex Code
6407 status collapsed
6408
6409 \begin_layout Plain Layout
6410 xdvi -editor 'lyxeditor.sh %f %l'
6411 \end_layout
6412
6413 \end_inset
6414
6415 , where 
6416 \begin_inset Flex Code
6417 status collapsed
6418
6419 \begin_layout Plain Layout
6420 lyxeditor.sh
6421 \end_layout
6422
6423 \end_inset
6424
6425  is a suitable script.
6426  For example, a minimal shell script is the following one:
6427 \end_layout
6428
6429 \begin_layout LyX-Code
6430 #!/bin/sh
6431 \begin_inset Newline newline
6432 \end_inset
6433
6434 LYXPIPE="/path/to/lyxpipe"
6435 \begin_inset Newline newline
6436 \end_inset
6437
6438 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6439 \begin_inset Newline newline
6440 \end_inset
6441
6442 echo "$COMMAND" > "${LYXPIPE}".in || exit
6443 \begin_inset Newline newline
6444 \end_inset
6445
6446 read < "${LYXPIPE}".out || exit
6447 \end_layout
6448
6449 \begin_layout Standard
6450 where 
6451 \begin_inset Flex Code
6452 status collapsed
6453
6454 \begin_layout Plain Layout
6455 /path/to/lyxpipe
6456 \end_layout
6457
6458 \end_inset
6459
6460  is the Ly
6461 \begin_inset ERT
6462 status collapsed
6463
6464 \begin_layout Plain Layout
6465
6466 {}
6467 \end_layout
6468
6469 \end_inset
6470
6471 XServer pipe path specified in 
6472 \begin_inset Flex MenuItem
6473 status collapsed
6474
6475 \begin_layout Plain Layout
6476 Preferences\SpecialChar \menuseparator
6477 Paths
6478 \end_layout
6479
6480 \end_inset
6481
6482 .
6483 \begin_inset Foot
6484 status collapsed
6485
6486 \begin_layout Plain Layout
6487 In the 
6488 \begin_inset Flex Code
6489 status collapsed
6490
6491 \begin_layout Plain Layout
6492 development/tools
6493 \end_layout
6494
6495 \end_inset
6496
6497  folder of a source distribution you can find a 
6498 \begin_inset Flex Code
6499 status collapsed
6500
6501 \begin_layout Plain Layout
6502 lyxeditor
6503 \end_layout
6504
6505 \end_inset
6506
6507  script which is able to locate the 
6508 \emph on
6509 lyxpipe
6510 \emph default
6511  based on your preferences.
6512 \end_layout
6513
6514 \end_inset
6515
6516
6517 \end_layout
6518
6519 \begin_layout Subsubsection*
6520 MacDviX (Mac OSX)
6521 \end_layout
6522
6523 \begin_layout Standard
6524 At the end of 
6525 \begin_inset Flex Code
6526 status collapsed
6527
6528 \begin_layout Plain Layout
6529 /Applications/MacDviX_Folder/calleditor.script
6530 \end_layout
6531
6532 \end_inset
6533
6534 , add the following lines:
6535 \end_layout
6536
6537 \begin_layout LyX-Code
6538 /Applications/Ly
6539 \begin_inset ERT
6540 status collapsed
6541
6542 \begin_layout Plain Layout
6543
6544 {}
6545 \end_layout
6546
6547 \end_inset
6548
6549 X.app/Contents/MacOS/lyxeditor "$2" $1
6550 \begin_inset Newline newline
6551 \end_inset
6552
6553 exit 1
6554 \end_layout
6555
6556 \begin_layout Standard
6557 Modify the lines accordingly if you install LyX somewhere else than in the
6558  Applications folder.
6559 \end_layout
6560
6561 \begin_layout Standard
6562 Reverse search is triggered by Alt-click (OPTION-click).
6563 \end_layout
6564
6565 \begin_layout Subsubsection*
6566 Skim (Mac OSX)
6567 \end_layout
6568
6569 \begin_layout Standard
6570 Enter 
6571 \begin_inset Flex Code
6572 status collapsed
6573
6574 \begin_layout Plain Layout
6575 open -a Skim.app $$i
6576 \end_layout
6577
6578 \end_inset
6579
6580  to the viewer setting in 
6581 \begin_inset Flex MenuItem
6582 status collapsed
6583
6584 \begin_layout Plain Layout
6585 Preferences\SpecialChar \menuseparator
6586 File Handling\SpecialChar \menuseparator
6587 File formats\SpecialChar \menuseparator
6588 PDF (pdflatex)
6589 \end_layout
6590
6591 \end_inset
6592
6593 , and then in 
6594 \begin_inset Flex MenuItem
6595 status collapsed
6596
6597 \begin_layout Plain Layout
6598 Skim\SpecialChar \menuseparator
6599 Preferences\SpecialChar \menuseparator
6600 Sync
6601 \end_layout
6602
6603 \end_inset
6604
6605  select Ly
6606 \begin_inset ERT
6607 status collapsed
6608
6609 \begin_layout Plain Layout
6610
6611 {}
6612 \end_layout
6613
6614 \end_inset
6615
6616 X.
6617 \end_layout
6618
6619 \begin_layout Standard
6620 Reverse search is triggered by COMMAND-SHIFT-click
6621 \end_layout
6622
6623 \begin_layout Subsubsection*
6624 Okular (KDE)
6625 \end_layout
6626
6627 \begin_layout Standard
6628 Go to 
6629 \begin_inset Flex MenuItem
6630 status collapsed
6631
6632 \begin_layout Plain Layout
6633 Settings\SpecialChar \menuseparator
6634 Configure Okular\SpecialChar \ldots{}
6635 \SpecialChar \menuseparator
6636 Editor
6637 \end_layout
6638
6639 \end_inset
6640
6641 , select 
6642 \begin_inset Quotes eld
6643 \end_inset
6644
6645 Custom Text Editor
6646 \begin_inset Quotes erd
6647 \end_inset
6648
6649  and add the command 
6650 \begin_inset Flex Code
6651 status collapsed
6652
6653 \begin_layout Plain Layout
6654 lyxclient -g %f %l
6655 \end_layout
6656
6657 \end_inset
6658
6659 .
6660 \end_layout
6661
6662 \begin_layout Standard
6663 Reverse search is triggered by SHIFT-click.
6664 \end_layout
6665
6666 \begin_layout Subsubsection*
6667 YAP (Windows)
6668 \end_layout
6669
6670 \begin_layout Standard
6671 Launch yap, choose its 
6672 \begin_inset Flex MenuItem
6673 status collapsed
6674
6675 \begin_layout Plain Layout
6676 View\SpecialChar \menuseparator
6677 Options
6678 \end_layout
6679
6680 \end_inset
6681
6682  menu and select the 
6683 \begin_inset Quotes eld
6684 \end_inset
6685
6686 Inverse DVI Search
6687 \begin_inset Quotes erd
6688 \end_inset
6689
6690  tab.
6691  Click on the 
6692 \begin_inset Quotes eld
6693 \end_inset
6694
6695 New\SpecialChar \ldots{}
6696
6697 \begin_inset Quotes erd
6698 \end_inset
6699
6700  button and, in the window that opens, enter 
6701 \begin_inset Quotes eld
6702 \end_inset
6703
6704 LyX Editor
6705 \begin_inset Quotes erd
6706 \end_inset
6707
6708  (or any other name you like) in the 
6709 \begin_inset Quotes eld
6710 \end_inset
6711
6712 Name:
6713 \begin_inset Quotes erd
6714 \end_inset
6715
6716  field.
6717  Now click on the button labeled 
6718 \begin_inset Quotes eld
6719 \end_inset
6720
6721 \SpecialChar \ldots{}
6722
6723 \begin_inset Quotes erd
6724 \end_inset
6725
6726  to open a file dialog and navigate to the directory containing the batch
6727  file 
6728 \begin_inset Flex Code
6729 status collapsed
6730
6731 \begin_layout Plain Layout
6732 lyxeditor.bat
6733 \end_layout
6734
6735 \end_inset
6736
6737  (see below).
6738  Select 
6739 \begin_inset Flex Code
6740 status collapsed
6741
6742 \begin_layout Plain Layout
6743 lyxeditor.bat
6744 \end_layout
6745
6746 \end_inset
6747
6748  and then specify the program arguments as 
6749 \begin_inset Flex Code
6750 status collapsed
6751
6752 \begin_layout Plain Layout
6753 %f %l
6754 \end_layout
6755
6756 \end_inset
6757
6758 .
6759  The 
6760 \begin_inset Flex Code
6761 status collapsed
6762
6763 \begin_layout Plain Layout
6764 lyxeditor.bat
6765 \end_layout
6766
6767 \end_inset
6768
6769  wrapper is used for communicating with LyX through the 
6770 \emph on
6771 lyxpipe
6772 \emph default
6773  and is as follows:
6774 \end_layout
6775
6776 \begin_layout LyX-Code
6777 @echo off
6778 \begin_inset Newline newline
6779 \end_inset
6780
6781 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6782 \backslash
6783
6784 \backslash
6785 .
6786 \backslash
6787 pipe
6788 \backslash
6789 lyxpipe.in
6790 \begin_inset Newline newline
6791 \end_inset
6792
6793 type 
6794 \backslash
6795
6796 \backslash
6797 .
6798 \backslash
6799 pipe
6800 \backslash
6801 lyxpipe.out
6802 \end_layout
6803
6804 \begin_layout Standard
6805 Make sure that the LyXServer pipe path you specified in LyX is 
6806 \begin_inset Flex Code
6807 status collapsed
6808
6809 \begin_layout Plain Layout
6810
6811 \backslash
6812
6813 \backslash
6814 .
6815 \backslash
6816 pipe
6817 \backslash
6818 lyxpipe
6819 \end_layout
6820
6821 \end_inset
6822
6823 , otherwise change the 
6824 \begin_inset Flex Code
6825 status collapsed
6826
6827 \begin_layout Plain Layout
6828 lyxeditor.bat
6829 \end_layout
6830
6831 \end_inset
6832
6833  wrapper accordingly.
6834 \end_layout
6835
6836 \begin_layout Standard
6837 In yap, reverse search is triggered by double-click.
6838 \end_layout
6839
6840 \begin_layout Subsubsection*
6841 SumatraPDF (Windows)
6842 \end_layout
6843
6844 \begin_layout Standard
6845 In order to use SumatraPDF for inverse search, enter 
6846 \begin_inset Flex Code
6847 status collapsed
6848
6849 \begin_layout Plain Layout
6850 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6851 \end_layout
6852
6853 \end_inset
6854
6855  in the viewer setting in 
6856 \begin_inset Flex MenuItem
6857 status collapsed
6858
6859 \begin_layout Plain Layout
6860 Preferences\SpecialChar \menuseparator
6861 File Handling\SpecialChar \menuseparator
6862 File formats\SpecialChar \menuseparator
6863 PDF (pdflatex)
6864 \end_layout
6865
6866 \end_inset
6867
6868 , where 
6869 \begin_inset Flex Code
6870 status collapsed
6871
6872 \begin_layout Plain Layout
6873 lyxeditor.bat
6874 \end_layout
6875
6876 \end_inset
6877
6878  is the previous wrapper.
6879  If SumatraPDF.exe is not in your command PATH, use its full file name.
6880 \end_layout
6881
6882 \begin_layout Standard
6883 Reverse search is triggered by double-click.
6884 \end_layout
6885
6886 \begin_layout Subsubsection*
6887 YAP (Cygwin)
6888 \end_layout
6889
6890 \begin_layout Standard
6891 First of all, make sure that yap is your default DVI viewer in the Windows
6892  environment, then launch it, choose its 
6893 \begin_inset Flex MenuItem
6894 status collapsed
6895
6896 \begin_layout Plain Layout
6897 View\SpecialChar \menuseparator
6898 Options
6899 \end_layout
6900
6901 \end_inset
6902
6903  menu and select the 
6904 \begin_inset Quotes eld
6905 \end_inset
6906
6907 Inverse DVI Search
6908 \begin_inset Quotes erd
6909 \end_inset
6910
6911  tab.
6912  Click on the 
6913 \begin_inset Quotes eld
6914 \end_inset
6915
6916 New\SpecialChar \ldots{}
6917
6918 \begin_inset Quotes erd
6919 \end_inset
6920
6921  button and, in the window that opens, enter 
6922 \begin_inset Quotes eld
6923 \end_inset
6924
6925 LyX Editor
6926 \begin_inset Quotes erd
6927 \end_inset
6928
6929  (or any other name you like) in the 
6930 \begin_inset Quotes eld
6931 \end_inset
6932
6933 Name:
6934 \begin_inset Quotes erd
6935 \end_inset
6936
6937  field.
6938  Now click on the button labeled 
6939 \begin_inset Quotes eld
6940 \end_inset
6941
6942 \SpecialChar \ldots{}
6943
6944 \begin_inset Quotes erd
6945 \end_inset
6946
6947  to open a file dialog and navigate to the directory containing the 
6948 \begin_inset Flex Code
6949 status collapsed
6950
6951 \begin_layout Plain Layout
6952 lyxeditor.exe
6953 \end_layout
6954
6955 \end_inset
6956
6957  program (which is installed by default on Cygwin along with the LyX executable).
6958  Select 
6959 \begin_inset Flex Code
6960 status collapsed
6961
6962 \begin_layout Plain Layout
6963 lyxeditor.exe
6964 \end_layout
6965
6966 \end_inset
6967
6968  and then specify the program arguments as 
6969 \begin_inset Flex Code
6970 status collapsed
6971
6972 \begin_layout Plain Layout
6973 -g %f %l
6974 \end_layout
6975
6976 \end_inset
6977
6978 .
6979  In this way, you will be using the 
6980 \emph on
6981 lyxsocket
6982 \emph default
6983  for communicating with LyX.
6984  If, for whatever reason, you want to use the 
6985 \emph on
6986 lyxpipe
6987 \emph default
6988 , omit the 
6989 \begin_inset Flex Code
6990 status collapsed
6991
6992 \begin_layout Plain Layout
6993 -g
6994 \end_layout
6995
6996 \end_inset
6997
6998  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6999 \end_layout
7000
7001 \begin_layout Standard
7002 In yap, reverse search is triggered by double-click.
7003 \end_layout
7004
7005 \begin_layout Subsubsection*
7006 SumatraPDF (Cygwin)
7007 \end_layout
7008
7009 \begin_layout Standard
7010 In order to use SumatraPDF for inverse search, enter 
7011 \begin_inset Flex Code
7012 status collapsed
7013
7014 \begin_layout Plain Layout
7015 SumatraPDF.sh
7016 \end_layout
7017
7018 \end_inset
7019
7020  in the viewer setting in 
7021 \begin_inset Flex MenuItem
7022 status collapsed
7023
7024 \begin_layout Plain Layout
7025 Preferences\SpecialChar \menuseparator
7026 File Handling\SpecialChar \menuseparator
7027 File formats\SpecialChar \menuseparator
7028 PDF (pdflatex)
7029 \end_layout
7030
7031 \end_inset
7032
7033 , where 
7034 \begin_inset Flex Code
7035 status collapsed
7036
7037 \begin_layout Plain Layout
7038 SumatraPDF.sh
7039 \end_layout
7040
7041 \end_inset
7042
7043  is the following script (to be placed in your command PATH, 
7044 \begin_inset Flex Code
7045 status collapsed
7046
7047 \begin_layout Plain Layout
7048 /usr/local/bin
7049 \end_layout
7050
7051 \end_inset
7052
7053  being the best choice):
7054 \end_layout
7055
7056 \begin_layout LyX-Code
7057 #!/bin/bash
7058 \begin_inset Newline newline
7059 \end_inset
7060
7061 cd $(dirname $1)
7062 \begin_inset Newline newline
7063 \end_inset
7064
7065 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
7066 \end_layout
7067
7068 \begin_layout Standard
7069 This wrapper script is needed because SumatraPDF is a native Windows application
7070  and does not understand the posix paths used by the Cygwin version of LyX.
7071  If SumatraPDF.exe is not in your command PATH, use its full posix path in
7072  the script above.
7073  The 
7074 \begin_inset Flex Code
7075 status collapsed
7076
7077 \begin_layout Plain Layout
7078 -g
7079 \end_layout
7080
7081 \end_inset
7082
7083  enables communication via the 
7084 \emph on
7085 lyxsocket
7086 \emph default
7087 .
7088  Again, omit the 
7089 \begin_inset Flex Code
7090 status collapsed
7091
7092 \begin_layout Plain Layout
7093 -g
7094 \end_layout
7095
7096 \end_inset
7097
7098  option if you want to use the 
7099 \emph on
7100 lyxpipe
7101 \emph default
7102 , and be sure to specify the LyXServer pipe path in the LyX preferences.
7103 \end_layout
7104
7105 \begin_layout Standard
7106 Reverse search is triggered by double-click.
7107 \end_layout
7108
7109 \begin_layout Section
7110 Forward search
7111 \end_layout
7112
7113 \begin_layout Standard
7114 Forward search is, as the name implies, in a sense the 
7115 \begin_inset Quotes eld
7116 \end_inset
7117
7118 opposite
7119 \begin_inset Quotes erd
7120 \end_inset
7121
7122  to reverse search.
7123  It allows you to let the viewer jump to a given position from within LyX.
7124  If forward search is set up (as described in what follows), you can put
7125  the cursor anywhere in your LyX document, and hit 
7126 \begin_inset Flex MenuItem
7127 status collapsed
7128
7129 \begin_layout Plain Layout
7130 Navigate\SpecialChar \menuseparator
7131 Forward search
7132 \end_layout
7133
7134 \end_inset
7135
7136  (or select 
7137 \begin_inset Flex MenuItem
7138 status collapsed
7139
7140 \begin_layout Plain Layout
7141 Forward search
7142 \end_layout
7143
7144 \end_inset
7145
7146  in the context menu via right mouse click), and then the viewer will jump
7147  to that position as well.
7148  This implies, of course, that your viewer supports this function.
7149 \end_layout
7150
7151 \begin_layout Standard
7152 To make forward search possible, you first need to provide the generated
7153  output PDF/DVI file with additional information about the TeX sources.
7154  This can be done via the methods described in the section 
7155 \begin_inset CommandInset ref
7156 LatexCommand ref
7157 reference "sub:rev-search"
7158
7159 \end_inset
7160
7161 .
7162 \end_layout
7163
7164 \begin_layout Standard
7165 Additionally, you need to configure LyX for using your viewers in 
7166 \begin_inset Flex MenuItem
7167 status collapsed
7168
7169 \begin_layout Plain Layout
7170 Tools\SpecialChar \menuseparator
7171 Preferences\SpecialChar \menuseparator
7172 Output\SpecialChar \menuseparator
7173 General
7174 \end_layout
7175
7176 \end_inset
7177
7178 .
7179  We provide a range of tested configurations for some viewers, which you
7180  can select from the drop down list.
7181  If none of these configurations suits you, you have to find out and enter
7182  a suitable configuration yourself.
7183  The definition syntax uses the following placeholders: 
7184 \end_layout
7185
7186 \begin_layout Itemize
7187 \noindent
7188 \begin_inset Flex Code
7189 status collapsed
7190
7191 \begin_layout Plain Layout
7192 $$n
7193 \end_layout
7194
7195 \end_inset
7196
7197 : row number
7198 \end_layout
7199
7200 \begin_layout Itemize
7201 \noindent
7202 \begin_inset Flex Code
7203 status collapsed
7204
7205 \begin_layout Plain Layout
7206 $$t
7207 \end_layout
7208
7209 \end_inset
7210
7211 : name of the (temporary) exported .tex file
7212 \end_layout
7213
7214 \begin_layout Itemize
7215 \noindent
7216 \begin_inset Flex Code
7217 status collapsed
7218
7219 \begin_layout Plain Layout
7220 $$o
7221 \end_layout
7222
7223 \end_inset
7224
7225 : name of the exported output file (either dvi or pdf, depending on which
7226  one exists in the temporary directory)
7227 \end_layout
7228
7229 \begin_layout Standard
7230 Note that only some of the viewers provide full forward search functionality,
7231  among them yap, xdvi, okular and Sumatra PDF
7232 \begin_inset Foot
7233 status collapsed
7234
7235 \begin_layout Plain Layout
7236 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
7237 ip
7238 \end_layout
7239
7240 \end_inset
7241
7242 .
7243  While many of the widespread PDF viewers (most notably Adobe Reader) do
7244  not support forward search at all, some other viewers -- e.
7245 \begin_inset space \thinspace{}
7246 \end_inset
7247
7248 g.
7249  evince and xpdf -- allow at least to reload the document and jump to a
7250  specific page of the file, so you can at least navigate 
7251 \begin_inset Quotes eld
7252 \end_inset
7253
7254 near
7255 \begin_inset Quotes erd
7256 \end_inset
7257
7258 .
7259  These latter functionality is provided by an external call of synctex (see
7260  the predefined example configurations).
7261  
7262 \end_layout
7263
7264 \begin_layout Standard
7265 Forward search works both with DVI and PDF output.
7266  LyX simply checks which preview format you have used before (i.
7267 \begin_inset space \thinspace{}
7268 \end_inset
7269
7270 e., which format is already there in the temporary directory) and chooses
7271  the appropriate configuration for the respective format.
7272  
7273 \end_layout
7274
7275 \begin_layout Chapter
7276 Special Document Classes
7277 \end_layout
7278
7279 \begin_layout Section
7280 A&A Paper
7281 \end_layout
7282
7283 \begin_layout Standard
7284 by 
7285 \noun on
7286 Peter Sütterlin
7287 \end_layout
7288
7289 \begin_layout Subsection
7290 Introduction
7291 \end_layout
7292
7293 \begin_layout Standard
7294 This section describes how LyX can be used to write articles for submission
7295  to the scientific journal 
7296 \emph on
7297 Astronomy and Astrophysics
7298 \emph default
7299  (www.edpsciences.fr/aa/ 
7300 \begin_inset Flex URL
7301 status collapsed
7302
7303 \begin_layout Plain Layout
7304
7305 http://www.edpsciences.fr/aa/
7306 \end_layout
7307
7308 \end_inset
7309
7310 ) using Version 5.01 of the document class 
7311 \family typewriter
7312 aa.cls
7313 \family default
7314 .
7315  This package can be downloaded from the ftp site
7316 \end_layout
7317
7318 \begin_layout Standard
7319 \begin_inset VSpace medskip
7320 \end_inset
7321
7322
7323 \end_layout
7324
7325 \begin_layout Standard
7326 \align center
7327 \begin_inset Flex URL
7328 status collapsed
7329
7330 \begin_layout Plain Layout
7331
7332 ftp://ftp.edpsciences.org/pub/aa/readme.html
7333 \end_layout
7334
7335 \end_inset
7336
7337
7338 \end_layout
7339
7340 \begin_layout Standard
7341 \begin_inset VSpace medskip
7342 \end_inset
7343
7344
7345 \end_layout
7346
7347 \begin_layout Standard
7348 A manual comes together with that package, and this text is not meant to
7349  replace the original manual but is merely a short guide in how to realize
7350  the correct form of your paper.
7351  
7352 \end_layout
7353
7354 \begin_layout Standard
7355 Please note that the publisher of the journal was changed from Springer
7356  to EDP Sciences starting January 1, 2001.
7357  That change involved also some slight changes to the style files, namely
7358  the removal of the thesaurus command.
7359  The LyX class aa supports the newest version of these style files, V 5.01.
7360  If you have an older version installed, please upgrade.
7361  For compatibility, the old (version 4) layout has been kept as 
7362 \family sans
7363 article (A&A V4)
7364 \family default
7365 .
7366  Please refer to the comments in 
7367 \family typewriter
7368 LyXDir/layouts/aapaper.layout
7369 \family default
7370 .
7371 \end_layout
7372
7373 \begin_layout Subsection
7374 Getting started
7375 \end_layout
7376
7377 \begin_layout Standard
7378 It is recommended you start from the example template distributed with LyX.
7379  If you are not using a template, note the following settings:
7380 \end_layout
7381
7382 \begin_layout Itemize
7383 Select 
7384 \family sans
7385 article (A&A)
7386 \family default
7387  in the 
7388 \family sans
7389 Document\SpecialChar \menuseparator
7390 Settings
7391 \family default
7392  dialog (OK, that one was obvious).
7393 \end_layout
7394
7395 \begin_layout Itemize
7396 Don't change the option 
7397 \family sans
7398 Page
7399 \begin_inset space ~
7400 \end_inset
7401
7402 style
7403 \family default
7404 : Leave it set to 
7405 \family sans
7406 default
7407 \family default
7408 .
7409  The whole layout is done by the macros, you shouldn't change anything.
7410 \end_layout
7411
7412 \begin_layout Subsection
7413 The header block
7414 \end_layout
7415
7416 \begin_layout Standard
7417 First thing to enter is the header information.
7418  It consists of seven entries, of which some are optional.
7419  They are
7420 \end_layout
7421
7422 \begin_layout Itemize
7423
7424 \family sans
7425 Title
7426 \family default
7427 : [required] 
7428 \end_layout
7429
7430 \begin_layout Itemize
7431
7432 \family sans
7433 Subtitle
7434 \family default
7435 : [optional] 
7436 \end_layout
7437
7438 \begin_layout Itemize
7439
7440 \family sans
7441 Author
7442 \family default
7443 : [required]
7444 \end_layout
7445
7446 \begin_layout Itemize
7447
7448 \family sans
7449 Address
7450 \family default
7451 : [required]
7452 \end_layout
7453
7454 \begin_layout Itemize
7455
7456 \family sans
7457 Offprints
7458 \family default
7459 : [optional] if more than one author: whom to contact for offprint requests.
7460 \end_layout
7461
7462 \begin_layout Itemize
7463
7464 \family sans
7465 Mail
7466 \family default
7467 : [optional] mail address for contacts.
7468 \end_layout
7469
7470 \begin_layout Itemize
7471
7472 \family sans
7473 Date
7474 \family default
7475 : [required].
7476  Suggested format is 
7477 \family typewriter
7478 Received: <date>; Accepted <date> 
7479 \end_layout
7480
7481 \begin_layout Standard
7482 There is no need to issue the 
7483 \family typewriter
7484
7485 \backslash
7486 maketitle
7487 \family default
7488  command, this is done automatically by LyX when the header is finished.
7489  Although the order of the single header entries doesn't matter it is advised
7490  to keep the above sequence, just to get the best optics and meets the layout
7491  of the real document.
7492 \end_layout
7493
7494 \begin_layout Standard
7495 If you want to place footnotes in the header block, e.
7496 \begin_inset space \thinspace{}
7497 \end_inset
7498
7499 g.
7500 \begin_inset space \space{}
7501 \end_inset
7502
7503 to state your present address, just use the standard footnote via the menu
7504  
7505 \family sans
7506 Insert\SpecialChar \menuseparator
7507 Footnote.
7508
7509 \family default
7510  LyX will automagically use the term 
7511 \family typewriter
7512
7513 \backslash
7514 thanks{}
7515 \family default
7516  in that case.
7517 \end_layout
7518
7519 \begin_layout Standard
7520 In addition to these topics, the macros use three additional LaTeX commands
7521  that have no counterpart in LyX:
7522 \end_layout
7523
7524 \begin_layout Itemize
7525
7526 \family typewriter
7527
7528 \backslash
7529 and
7530 \family default
7531  to separate different names for more than one author and institute, respectivel
7532 y.
7533 \end_layout
7534
7535 \begin_layout Itemize
7536
7537 \family typewriter
7538
7539 \backslash
7540 inst{<nr>}
7541 \family default
7542 to mark corresponding author/institute pairs.
7543  The institutes are numbered sequentially as they appear in the 
7544 \family sans
7545 Address
7546 \family default
7547  field, so you have to put a marker to each author.
7548 \end_layout
7549
7550 \begin_layout Itemize
7551
7552 \family typewriter
7553
7554 \backslash
7555 email{address}
7556 \family default
7557  to supply an email address for fast contact.
7558 \end_layout
7559
7560 \begin_layout Standard
7561 In all cases, the appropriate command has to be entered in LyX and marked
7562  as LaTeX code.
7563  See the examples.
7564  
7565 \end_layout
7566
7567 \begin_layout Subsection
7568 The abstract
7569 \end_layout
7570
7571 \begin_layout Standard
7572 The abstract should immediately follow the header block.
7573  With version 5 the abstract environment was changed to a command, and there
7574  is now a resctriction to only one paragraph.
7575  In addition, it should contain an entry with the keywords.
7576  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7577  command 
7578 \family typewriter
7579
7580 \backslash
7581 keywords{}
7582 \family default
7583  by hand and mark it as LaTeX code.
7584  Refer to the example paper.
7585 \end_layout
7586
7587 \begin_layout Subsection
7588 Supported environments
7589 \end_layout
7590
7591 \begin_layout Standard
7592 The A&A paper layout supports the following environments for structuring
7593  your text:
7594 \end_layout
7595
7596 \begin_layout Itemize
7597
7598 \family sans
7599 Standard
7600 \end_layout
7601
7602 \begin_layout Itemize
7603
7604 \family sans
7605 Section
7606 \end_layout
7607
7608 \begin_layout Itemize
7609
7610 \family sans
7611 Subsection
7612 \end_layout
7613
7614 \begin_layout Itemize
7615
7616 \family sans
7617 Subsubsection
7618 \end_layout
7619
7620 \begin_layout Itemize
7621
7622 \family sans
7623 Itemize
7624 \end_layout
7625
7626 \begin_layout Itemize
7627
7628 \family sans
7629 Enumerate
7630 \end_layout
7631
7632 \begin_layout Itemize
7633
7634 \family sans
7635 Description
7636 \end_layout
7637
7638 \begin_layout Itemize
7639
7640 \family sans
7641 Caption
7642 \end_layout
7643
7644 \begin_layout Itemize
7645
7646 \family sans
7647 Abstract
7648 \end_layout
7649
7650 \begin_layout Itemize
7651
7652 \family sans
7653 Acknowledgment
7654 \end_layout
7655
7656 \begin_layout Itemize
7657
7658 \family sans
7659 Bibliography
7660 \end_layout
7661
7662 \begin_layout Itemize
7663
7664 \family sans
7665 LaTeX
7666 \end_layout
7667
7668 \begin_layout Subsection
7669 Commands not supported by LyX
7670 \end_layout
7671
7672 \begin_layout Standard
7673 Some commands are not yet supported by the 
7674 \family sans
7675 paper (A&A)
7676 \family default
7677  layout for LyX.
7678  Some have already been mentioned.
7679  For the sake of completeness, they are listed all together here:
7680 \end_layout
7681
7682 \begin_layout Itemize
7683
7684 \family typewriter
7685
7686 \backslash
7687 and
7688 \end_layout
7689
7690 \begin_layout Itemize
7691
7692 \family typewriter
7693
7694 \backslash
7695 email
7696 \end_layout
7697
7698 \begin_layout Itemize
7699
7700 \family typewriter
7701
7702 \backslash
7703 appendix
7704 \end_layout
7705
7706 \begin_layout Itemize
7707
7708 \family typewriter
7709
7710 \backslash
7711 authorrunning
7712 \end_layout
7713
7714 \begin_layout Itemize
7715
7716 \family typewriter
7717
7718 \backslash
7719 inst{}
7720 \end_layout
7721
7722 \begin_layout Itemize
7723
7724 \family typewriter
7725
7726 \backslash
7727 keywords{}
7728 \end_layout
7729
7730 \begin_layout Itemize
7731
7732 \family typewriter
7733
7734 \backslash
7735 object{}
7736 \end_layout
7737
7738 \begin_layout Itemize
7739
7740 \family typewriter
7741
7742 \backslash
7743 titlerunning{}
7744 \end_layout
7745
7746 \begin_layout Standard
7747 If you want to use any of these commands, you have to enter them yourself.
7748  
7749 \series bold
7750 Do not forget to mark them as LaTeX code!
7751 \end_layout
7752
7753 \begin_layout Subsection
7754 Figure and Table Floats
7755 \end_layout
7756
7757 \begin_layout Standard
7758 LyX provides support for the necessary float environments 
7759 \family sans
7760 figure, figure*, table
7761 \family default
7762  and 
7763 \family sans
7764 table*
7765 \family default
7766 , therefore we won't tell much about it here.
7767  Refer to the 
7768 \emph on
7769 User's
7770 \begin_inset space ~
7771 \end_inset
7772
7773 Guide
7774 \emph default
7775 .
7776  Just remember that tables should be left-aligned.
7777  For that, select the table and change the alignment in 
7778 \family sans
7779 Edit\SpecialChar \menuseparator
7780 Paragraph
7781 \begin_inset space ~
7782 \end_inset
7783
7784 Settings.
7785 \end_layout
7786
7787 \begin_layout Standard
7788 There is only one special thing: the figures with caption besides the figure.
7789  To create such a figure, you have to do the following:
7790 \end_layout
7791
7792 \begin_layout Enumerate
7793 Create a wide figure float: 
7794 \family sans
7795 Insert\SpecialChar \menuseparator
7796 Float\SpecialChar \menuseparator
7797 Figure
7798 \family default
7799 , then right click in the figure and select 
7800 \family sans
7801 \bar under
7802 S
7803 \bar default
7804 pan
7805 \begin_inset space ~
7806 \end_inset
7807
7808 columns
7809 \family default
7810 .
7811 \end_layout
7812
7813 \begin_layout Enumerate
7814 Enter your caption text.
7815 \end_layout
7816
7817 \begin_layout Enumerate
7818 Press 
7819 \family sans
7820 Return
7821 \family default
7822  to move the cursor above the caption.
7823 \end_layout
7824
7825 \begin_layout Enumerate
7826 Insert your figure
7827 \end_layout
7828
7829 \begin_layout Enumerate
7830 Position the cursor behind the figure and insert a horizontal fill: 
7831 \family sans
7832 Insert\SpecialChar \menuseparator
7833 Special
7834 \begin_inset space ~
7835 \end_inset
7836
7837 Character\SpecialChar \menuseparator
7838 Horizontal
7839 \begin_inset space ~
7840 \end_inset
7841
7842 Fill
7843 \family default
7844 .
7845 \end_layout
7846
7847 \begin_layout Enumerate
7848 Switch to LaTeX mode: 
7849 \family sans
7850 M-c
7851 \begin_inset space ~
7852 \end_inset
7853
7854 t
7855 \family default
7856 .
7857 \end_layout
7858
7859 \begin_layout Enumerate
7860 Enter 
7861 \family typewriter
7862
7863 \backslash
7864 parbox[b]{55mm}{
7865 \family default
7866 .
7867  
7868 \series bold
7869 Do not close the brace!
7870 \end_layout
7871
7872 \begin_layout Enumerate
7873 Position the cursor behind the caption text, switch to LaTeX mode and insert
7874  the closing brace: 
7875 \family sans
7876 M-c
7877 \begin_inset space ~
7878 \end_inset
7879
7880 t
7881 \family default
7882  
7883 \family typewriter
7884 }
7885 \family default
7886 .
7887 \end_layout
7888
7889 \begin_layout Standard
7890 Also, refer to the figures in the example paper.
7891 \end_layout
7892
7893 \begin_layout Subsection
7894 Referee layout
7895 \end_layout
7896
7897 \begin_layout Standard
7898 For submission, the paper has to be formated in a special double-spacing
7899  layout.
7900  For this purpose, you have to give the option 
7901 \family typewriter
7902 referee
7903 \family default
7904  to the documentclass.
7905  This must be done using the extra class options field in the 
7906 \family sans
7907 Document\SpecialChar \menuseparator
7908 Settings
7909 \family default
7910  dialog.
7911  Just enter the string 
7912 \family typewriter
7913 referee
7914 \family default
7915  there.
7916 \end_layout
7917
7918 \begin_layout Subsection
7919 The example paper
7920 \end_layout
7921
7922 \begin_layout Standard
7923 The 
7924 \family sans
7925 Examples
7926 \family default
7927  directory contains an example paper written with LyX.
7928  It is the example paper from the original macro package, translated to
7929  LyX.
7930  Use it for inspiration, and compare the original LaTeX code with LyX way
7931  of writing.
7932 \end_layout
7933
7934 \begin_layout Section
7935 AASTeX
7936 \end_layout
7937
7938 \begin_layout Standard
7939 by 
7940 \noun on
7941 Mike Ressler
7942 \end_layout
7943
7944 \begin_layout Subsection
7945 Introduction
7946 \end_layout
7947
7948 \begin_layout Standard
7949 AASTeX is a set of macros produced by the American Astronomical Society
7950  to facilitate electronic manuscript submission to the three journals they
7951  publish: the Astrophysical Journal (including the Letters and Supplement),
7952  the Astronomical Journal, and the Publications of the Astronomical Society
7953  of the Pacific.
7954  LyX has proven to be an excellent tool for generating these documents,
7955  especially given its equation, citation, and figure handling capabilities.
7956  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7957  is the version described here, or higher.
7958  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7959  incompatible with LyX.
7960  The AASTeX package may be downloaded from the AASTeX Web site
7961 \end_layout
7962
7963 \begin_layout Standard
7964 \begin_inset VSpace medskip
7965 \end_inset
7966
7967
7968 \end_layout
7969
7970 \begin_layout Standard
7971 \align center
7972 \begin_inset Flex URL
7973 status collapsed
7974
7975 \begin_layout Plain Layout
7976
7977 http://www.journals.uchicago.edu/AAS/AASTeX
7978 \end_layout
7979
7980 \end_inset
7981
7982
7983 \end_layout
7984
7985 \begin_layout Standard
7986 \begin_inset VSpace medskip
7987 \end_inset
7988
7989
7990 \end_layout
7991
7992 \begin_layout Standard
7993 A complete user guide is contained in that package and you should familiarize
7994  yourself with it thoroughly before embarking on writing a paper in LyX.
7995  LyX will not reduce the need to figure out all the AASTeX commands, it
7996  will only reduce the drudgery of typing everything in.
7997  It is your responsibility to ensure that the final exported LaTeX document
7998  conforms completely to the requirements of the journal to which you are
7999  submitting your paper.
8000 \end_layout
8001
8002 \begin_layout Subsection
8003 Starting a New Paper
8004 \end_layout
8005
8006 \begin_layout Standard
8007 I strongly suggest that you start with the AASTeX template file.
8008  Click on 
8009 \family sans
8010 File\SpecialChar \menuseparator
8011 New from
8012 \family default
8013  
8014 \family sans
8015 Template
8016 \family default
8017 , enter the new file name, then choose the 
8018 \family typewriter
8019 aastex.lyx
8020 \family default
8021  template.
8022  This will show the most common fields found in a manuscript.
8023  Simply overwrite the existing text (including the brackets, 
8024 \family typewriter
8025 <>
8026 \family default
8027 ) with the correct information.
8028  Many of the AASTeX commands and environments can be implemented directly
8029  in LyX, but some cannot: most noticeably 
8030 \family typewriter
8031
8032 \backslash
8033 altaffilmark
8034 \family default
8035  and 
8036 \family typewriter
8037
8038 \backslash
8039 altaffiltext
8040 \family default
8041 , which should stick out like a sore thumb if you actually just opened the
8042  template file.
8043  For commands such as these, the LaTeX code must be entered directly and
8044  marked as such.
8045  Such commands are referred to as TeX code, or Evil Red Text.
8046  I tried to minimize the amount of TeX code needed in an AASTeX document,
8047  but there is still a bit more required than any of us would like.
8048 \end_layout
8049
8050 \begin_layout Subsection
8051 Finishing Your Paper
8052 \end_layout
8053
8054 \begin_layout Standard
8055 When the paper is finished to your satisfaction and previews/prints correctly,
8056  there are a few 
8057 \begin_inset Quotes eld
8058 \end_inset
8059
8060 postprocessing
8061 \begin_inset Quotes erd
8062 \end_inset
8063
8064  actions which need to be done before you submit it to the journals.
8065  
8066 \end_layout
8067
8068 \begin_layout Enumerate
8069 Export your paper as a LaTeX file (
8070 \family sans
8071 File\SpecialChar \menuseparator
8072 Export\SpecialChar \menuseparator
8073 LaTeX
8074 \family default
8075 ).
8076  
8077 \end_layout
8078
8079 \begin_layout Enumerate
8080 Edit the resulting 
8081 \family typewriter
8082 .tex
8083 \family default
8084  file with your favorite text editor
8085 \end_layout
8086
8087 \begin_deeper
8088 \begin_layout Enumerate
8089 remove the comment lines before the 
8090 \family typewriter
8091
8092 \backslash
8093 documentclass
8094 \family default
8095  command
8096 \end_layout
8097
8098 \begin_layout Enumerate
8099 remove the 
8100 \family typewriter
8101
8102 \backslash
8103 usepackage...{fontenc}
8104 \family default
8105  line if it appears (usually just after 
8106 \family typewriter
8107
8108 \backslash
8109 documentclass
8110 \family default
8111 }; also remove the 
8112 \family typewriter
8113
8114 \backslash
8115 secnumdepth
8116 \family default
8117  line if it appears.
8118 \end_layout
8119
8120 \begin_layout Enumerate
8121 remove everything between (and including) the 
8122 \family typewriter
8123
8124 \backslash
8125 makeatletter
8126 \family default
8127  and 
8128 \family typewriter
8129
8130 \backslash
8131 makeatother
8132 \family default
8133  commands, except for any commands you specifically put into the LaTeX preamble
8134  (which should appear immediately after the 
8135 \begin_inset Quotes eld
8136 \end_inset
8137
8138 User specified LaTeX commands
8139 \begin_inset Quotes erd
8140 \end_inset
8141
8142  comment in the 
8143 \family typewriter
8144 .tex
8145 \family default
8146  file).
8147 \end_layout
8148
8149 \end_deeper
8150 \begin_layout Enumerate
8151 Run the resulting file through LaTeX to make sure it still processes correctly.
8152 \end_layout
8153
8154 \begin_layout Enumerate
8155 Reread the journal requirements to make sure your filenames and formats
8156  are correct.
8157 \end_layout
8158
8159 \begin_layout Enumerate
8160 Submit it.
8161 \end_layout
8162
8163 \begin_layout Subsection
8164 Comments On Specific Commands
8165 \end_layout
8166
8167 \begin_layout Standard
8168 I will not describe the detailed usage of the individual AASTeX commands:
8169  the AASTeX User Guide (
8170 \family typewriter
8171 aasguide.tex
8172 \family default
8173 ) gives a good description of each.
8174  Thus it's probably easiest for me to go down the list as found in the guide
8175  and offer comments where necessary.
8176  So let's begin \SpecialChar \ldots{}
8177
8178 \end_layout
8179
8180 \begin_layout Subsubsection
8181 Things that work as expected
8182 \end_layout
8183
8184 \begin_layout Standard
8185 \begin_inset ERT
8186 status open
8187
8188 \begin_layout Plain Layout
8189
8190
8191 \backslash
8192 begin{sloppypar}
8193 \end_layout
8194
8195 \end_inset
8196
8197
8198 \end_layout
8199
8200 \begin_layout Standard
8201 Because they work as you might expect, I simply list them and the section
8202  they are found in: 
8203 \family typewriter
8204
8205 \backslash
8206 documentclass
8207 \family default
8208  (2.1.1), 
8209 \family typewriter
8210
8211 \backslash
8212 begin{document}
8213 \family default
8214  (2.2), 
8215 \family typewriter
8216
8217 \backslash
8218 title
8219 \family default
8220  (2.3), 
8221 \family typewriter
8222
8223 \backslash
8224 author
8225 \family default
8226  (2.3), 
8227 \family typewriter
8228
8229 \backslash
8230 affil
8231 \family default
8232  (2.3), 
8233 \family typewriter
8234
8235 \backslash
8236 abstract
8237 \family default
8238  (2.4), 
8239 \family typewriter
8240
8241 \backslash
8242 keywords
8243 \family default
8244  (2.5), 
8245 \family typewriter
8246
8247 \backslash
8248 section
8249 \family default
8250  (2.7), 
8251 \family typewriter
8252
8253 \backslash
8254 subsection
8255 \family default
8256  (2.7), 
8257 \family typewriter
8258
8259 \backslash
8260 subsubsection
8261 \family default
8262  (2.7), 
8263 \family typewriter
8264
8265 \backslash
8266 paragraph
8267 \family default
8268  (2.7), 
8269 \family typewriter
8270
8271 \backslash
8272 facility
8273 \family default
8274  (2.10), 
8275 \family typewriter
8276
8277 \backslash
8278 begin{displaymath}
8279 \family default
8280  (2.12), 
8281 \family typewriter
8282
8283 \backslash
8284 begin{equation}
8285 \family default
8286  (2.12), 
8287 \family typewriter
8288
8289 \backslash
8290 begin{eqnarray}
8291 \family default
8292  (2.12), 
8293 \family typewriter
8294
8295 \backslash
8296 begin{mathletters}
8297 \family default
8298  (2.12), 
8299 \family typewriter
8300
8301 \backslash
8302 begin{thebibliography}
8303 \family default
8304  (2.13.1), 
8305 \family typewriter
8306
8307 \backslash
8308 bibitem
8309 \family default
8310  (2.13.2), all the cite commands and their variations (2.13.2), the generic
8311  graphicx figure commands (2.14.1), 
8312 \family typewriter
8313
8314 \backslash
8315 begin{table}
8316 \family default
8317  (2.15.4), 
8318 \family typewriter
8319
8320 \backslash
8321 begin{tabular}
8322 \family default
8323  (2.15.4), 
8324 \family typewriter
8325
8326 \backslash
8327 caption
8328 \family default
8329  (2.15.4), 
8330 \family typewriter
8331
8332 \backslash
8333 label
8334 \family default
8335  (2.15.4, amongst other places), 
8336 \family typewriter
8337
8338 \backslash
8339 tablerefs
8340 \family default
8341  (2.15.5), 
8342 \family typewriter
8343
8344 \backslash
8345 tablecomments
8346 \family default
8347  (2.15.5), 
8348 \family typewriter
8349
8350 \backslash
8351 url
8352 \family default
8353  (2.17.4), 
8354 \family typewriter
8355
8356 \backslash
8357 end{document}
8358 \family default
8359  (2.18).
8360 \end_layout
8361
8362 \begin_layout Standard
8363 The following style options also work correctly: 
8364 \family typewriter
8365 longabstract
8366 \family default
8367  (2.4), 
8368 \family typewriter
8369 preprint
8370 \family default
8371  (3.2.1), 
8372 \family typewriter
8373 preprint2
8374 \family default
8375  (3.2.2), 
8376 \family typewriter
8377 eqsecnum
8378 \family default
8379  (3.3), 
8380 \family typewriter
8381 flushrt
8382 \family default
8383  (3.4).
8384  Simply put them in the 
8385 \family sans
8386 Options
8387 \family default
8388  box in 
8389 \family sans
8390 Layout\SpecialChar \menuseparator
8391 Document
8392 \family default
8393 .
8394 \end_layout
8395
8396 \begin_layout Standard
8397 \begin_inset ERT
8398 status open
8399
8400 \begin_layout Plain Layout
8401
8402
8403 \backslash
8404 end{sloppypar}
8405 \end_layout
8406
8407 \end_inset
8408
8409
8410 \end_layout
8411
8412 \begin_layout Subsubsection
8413 Things that work, but require more comment
8414 \end_layout
8415
8416 \begin_layout Standard
8417 The following items work, but require a little more discussion:
8418 \end_layout
8419
8420 \begin_layout Itemize
8421 These items are reserved for use by the journal editors, but you can put
8422  them into the LaTeX preamble if you feel compelled to do so: 
8423 \family typewriter
8424
8425 \backslash
8426 received
8427 \family default
8428
8429 \family typewriter
8430
8431 \backslash
8432 revised
8433 \family default
8434
8435 \family typewriter
8436
8437 \backslash
8438 accepted
8439 \family default
8440
8441 \family typewriter
8442
8443 \backslash
8444 ccc
8445 \family default
8446
8447 \family typewriter
8448
8449 \backslash
8450 cpright
8451 \family default
8452  (all from 2.1.3)
8453 \end_layout
8454
8455 \begin_layout Itemize
8456 These items may be placed in the LaTeX preamble, and are included as blanks
8457  in the template file: 
8458 \family typewriter
8459
8460 \backslash
8461 slugcomment
8462 \family default
8463  (2.1.4), 
8464 \family typewriter
8465
8466 \backslash
8467 shorttitle
8468 \family default
8469  (2.1.5), 
8470 \family typewriter
8471
8472 \backslash
8473 shortauthors
8474 \family default
8475  (2.1.5)
8476 \end_layout
8477
8478 \begin_layout Itemize
8479
8480 \family typewriter
8481
8482 \backslash
8483 email
8484 \family default
8485  (2.3) – can only be used 
8486 \begin_inset Quotes eld
8487 \end_inset
8488
8489 standalone
8490 \begin_inset Quotes erd
8491 \end_inset
8492
8493 , not in the middle of a paragraph.
8494  Use TeX code if you need to embed it.
8495 \end_layout
8496
8497 \begin_layout Itemize
8498
8499 \family typewriter
8500
8501 \backslash
8502 and
8503 \family default
8504  (2.3) – will have extra {} after it.
8505  This should not cause an error.
8506 \end_layout
8507
8508 \begin_layout Itemize
8509
8510 \family typewriter
8511
8512 \backslash
8513 notetoeditor
8514 \family default
8515  (2.6) – can only be used 
8516 \begin_inset Quotes eld
8517 \end_inset
8518
8519 standalone
8520 \begin_inset Quotes erd
8521 \end_inset
8522
8523 , not in the middle of a paragraph.
8524  Use TeX code if you need to embed it.
8525 \end_layout
8526
8527 \begin_layout Itemize
8528
8529 \family typewriter
8530
8531 \backslash
8532 placetable
8533 \family default
8534  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8535  hand
8536 \end_layout
8537
8538 \begin_layout Itemize
8539
8540 \family typewriter
8541
8542 \backslash
8543 placefigure
8544 \family default
8545  (2.8) – same as for 
8546 \family typewriter
8547
8548 \backslash
8549 placetable
8550 \end_layout
8551
8552 \begin_layout Itemize
8553
8554 \family typewriter
8555
8556 \backslash
8557 acknowledgements
8558 \family default
8559  (2.9) – will have extra {} after it.
8560  This should not cause an error.
8561 \end_layout
8562
8563 \begin_layout Itemize
8564
8565 \family typewriter
8566
8567 \backslash
8568 appendix
8569 \family default
8570  (2.11) – will have extra {} after it.
8571  This should not cause an error.
8572 \end_layout
8573
8574 \begin_layout Itemize
8575
8576 \family typewriter
8577
8578 \backslash
8579 figcaption
8580 \family default
8581  (2.14.2) – you can insert an optional filename argument by placing the cursor
8582  at the beginning of the text and selecting 
8583 \family sans
8584 Insert\SpecialChar \menuseparator
8585 Short Title
8586 \family default
8587 .
8588  
8589 \begin_inset Quotes eld
8590 \end_inset
8591
8592 Short Title
8593 \begin_inset Quotes erd
8594 \end_inset
8595
8596  inserts an optional argument of the type needed by 
8597 \family typewriter
8598
8599 \backslash
8600 figcaption
8601 \family default
8602 .
8603  Hopefully it will be renamed someday.
8604 \end_layout
8605
8606 \begin_layout Itemize
8607
8608 \family typewriter
8609
8610 \backslash
8611 objectname
8612 \family default
8613  (2.17.1) – same as 
8614 \family typewriter
8615
8616 \backslash
8617 figcaption
8618 \family default
8619  for the catalog ID optional parameter
8620 \end_layout
8621
8622 \begin_layout Itemize
8623
8624 \family typewriter
8625
8626 \backslash
8627 dataset
8628 \family default
8629  (2.17.1) – same as 
8630 \family typewriter
8631
8632 \backslash
8633 figcaption
8634 \family default
8635  for the catalog ID optional parameter
8636 \end_layout
8637
8638 \begin_layout Subsubsection
8639 Things not implemented, use TeX code
8640 \end_layout
8641
8642 \begin_layout Standard
8643 \begin_inset ERT
8644 status open
8645
8646 \begin_layout Plain Layout
8647
8648
8649 \backslash
8650 begin{sloppypar}
8651 \end_layout
8652
8653 \end_inset
8654
8655
8656 \end_layout
8657
8658 \begin_layout Standard
8659
8660 \family typewriter
8661
8662 \backslash
8663 altaffilmark
8664 \family default
8665  (2.3), 
8666 \family typewriter
8667
8668 \backslash
8669 altaffiltext
8670 \family default
8671  (2.3), 
8672 \family typewriter
8673
8674 \backslash
8675 eqnum
8676 \family default
8677  (2.12), 
8678 \family typewriter
8679
8680 \backslash
8681 setcounter{equation}
8682 \family default
8683  (2.12), Journal name abbreviations (2.13.4), 
8684 \family typewriter
8685
8686 \backslash
8687 figurenum
8688 \family default
8689  (2.14.1), 
8690 \family typewriter
8691
8692 \backslash
8693 epsscale
8694 \family default
8695  (2.14.1), 
8696 \family typewriter
8697
8698 \backslash
8699 plotone
8700 \family default
8701  (2.14.1), 
8702 \family typewriter
8703
8704 \backslash
8705 plottwo
8706 \family default
8707  (2.14.1), 
8708 \family typewriter
8709
8710 \backslash
8711 tablenum
8712 \family default
8713  (2.15.4), 
8714 \family typewriter
8715
8716 \backslash
8717 tableline
8718 \family default
8719  (2.15.4, insert it as the first element in the lefthand cell after where
8720  you want it.
8721  Don't use any of LyX's rules in the table), 
8722 \family typewriter
8723
8724 \backslash
8725 tablenotemark
8726 \family default
8727  (2.15.5), 
8728 \family typewriter
8729
8730 \backslash
8731 tablenotetext
8732 \family default
8733  (2.15.5), much of Misc (2.17, except 
8734 \family typewriter
8735
8736 \backslash
8737 objectname
8738 \family default
8739
8740 \family typewriter
8741
8742 \backslash
8743 dataset
8744 \family default
8745
8746 \family typewriter
8747
8748 \backslash
8749 url
8750 \family default
8751 , and 
8752 \family typewriter
8753
8754 \backslash
8755 email
8756 \family default
8757 ; see above), 
8758 \family typewriter
8759
8760 \backslash
8761 singlespace
8762 \family default
8763  (3.1), 
8764 \family typewriter
8765
8766 \backslash
8767 doublespace
8768 \family default
8769  (3.1), 
8770 \family typewriter
8771
8772 \backslash
8773 onecolumn
8774 \family default
8775  (3.2), 
8776 \family typewriter
8777
8778 \backslash
8779 twocolumn
8780 \family default
8781  (3.2)
8782 \end_layout
8783
8784 \begin_layout Standard
8785 \begin_inset ERT
8786 status open
8787
8788 \begin_layout Plain Layout
8789
8790
8791 \backslash
8792 end{sloppypar}
8793 \end_layout
8794
8795 \end_inset
8796
8797
8798 \end_layout
8799
8800 \begin_layout Subsubsection
8801 Things that cannot be implemented
8802 \end_layout
8803
8804 \begin_layout Standard
8805 \SpecialChar \ldots{}
8806  at least in any meaningful sort of way, so I suggest ignoring them.
8807  They are the references environment (2.13.3), and the deluxetable environment
8808  (2.15).
8809  If you really, really need to use deluxetable, I suggest editing it in
8810  a separate file with a text editor, then using 
8811 \family sans
8812 Insert\SpecialChar \menuseparator
8813 Child
8814 \begin_inset space ~
8815 \end_inset
8816
8817 Document
8818 \family default
8819  to include it in your LyX document.
8820  See the 
8821 \family typewriter
8822 aas_sample.lyx
8823 \family default
8824  file to see an example of this.
8825 \end_layout
8826
8827 \begin_layout Subsection
8828 FAQs, Tips, Tricks, and Other Ruminations
8829 \end_layout
8830
8831 \begin_layout Subsubsection
8832 Getting LyX and AASTeX to cooperate
8833 \end_layout
8834
8835 \begin_layout Standard
8836 It can be a bit tricky to get LyX to recognize a new layout and document
8837  class.
8838  When all else fails, do this:
8839 \end_layout
8840
8841 \begin_layout Enumerate
8842 Make certain that LaTeX can find AASTeX.
8843  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8844  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8845 \family typewriter
8846 sample.tex
8847 \family default
8848 .
8849 \end_layout
8850
8851 \begin_layout Enumerate
8852 Make certain that 
8853 \family typewriter
8854 aastex.layout
8855 \family default
8856  appears in LyX's 
8857 \family typewriter
8858 layouts
8859 \family default
8860  folder
8861 \end_layout
8862
8863 \begin_layout Enumerate
8864 Rerun 
8865 \family sans
8866 Tools\SpecialChar \menuseparator
8867 Reconfigure
8868 \family default
8869  in LyX, then restart LyX.
8870 \end_layout
8871
8872 \begin_layout Enumerate
8873 Open a regular new file, not from a template.
8874  Does AASTeX appear in the class list in 
8875 \family sans
8876 Document\SpecialChar \menuseparator
8877 Settings
8878 \family default
8879 ?
8880 \end_layout
8881
8882 \begin_layout Standard
8883 If you get a warning from an existing AASTeX document about not being able
8884  to find the AASTeX layout or a message about 
8885 \begin_inset Quotes eld
8886 \end_inset
8887
8888 You should not mix title layouts with normal ones
8889 \begin_inset Quotes erd
8890 \end_inset
8891
8892 , things haven't been installed correctly.
8893 \end_layout
8894
8895 \begin_layout Subsubsection
8896 LaTeX error processing a table 
8897 \end_layout
8898
8899 \begin_layout Standard
8900 LyX, by default, attempts to center the table caption/title.
8901  This seems to produce a bad interaction in AASTeX so you should click somewhere
8902  in the caption/title, then select 
8903 \family sans
8904 Edit\SpecialChar \menuseparator
8905 Paragraph
8906 \begin_inset space ~
8907 \end_inset
8908
8909 Settings
8910 \family default
8911 , then set the 
8912 \family sans
8913 Alignment
8914 \family default
8915  to 
8916 \family sans
8917 Block
8918 \family default
8919 .
8920  This took care of it for me.
8921 \end_layout
8922
8923 \begin_layout Subsubsection
8924 References
8925 \end_layout
8926
8927 \begin_layout Standard
8928 A couple of things: 1) I have noticed some funny spacing in the reference
8929  entries in the text.
8930  When you enter the bibliography item data, make sure their is 
8931 \emph on
8932 no
8933 \emph default
8934  space between the last author and the parenthesis setting off the year;
8935  
8936 \emph on
8937 e.
8938 \begin_inset space \thinspace{}
8939 \end_inset
8940
8941 g.
8942 \begin_inset space \space{}
8943 \end_inset
8944
8945
8946 \emph default
8947 type 
8948 \family typewriter
8949 Ressler(1992)
8950 \family default
8951 , not 
8952 \family typewriter
8953 Ressler (1992)
8954 \family default
8955 .
8956  2) Entering the references at all is not obvious.
8957  The easiest thing is to start typing your first reference at the end of
8958  the document, then mark it as type 
8959 \family sans
8960 References
8961 \family default
8962 .
8963  That will put a small gray box in front of what you just typed.
8964  Click on the box to fill in the rest of the information.
8965  For new references, go to the end of an existing reference and press return.
8966  That will create a new line with its own box, etc.
8967 \end_layout
8968
8969 \begin_layout Subsubsection
8970 Including EPS files
8971 \end_layout
8972
8973 \begin_layout Standard
8974 Even though AASTeX provides its own figure commands (
8975 \family typewriter
8976
8977 \backslash
8978 plotone
8979 \family default
8980 , for example), I much prefer LaTeX's standard figure commands (with the
8981  default graphicx).
8982  You can insert the 
8983 \family typewriter
8984
8985 \backslash
8986 plotone
8987 \family default
8988 , etc.
8989 \begin_inset space ~
8990 \end_inset
8991
8992 commands as TeX code into a Figure Float box if you desire, but I never
8993  have much luck getting the layout right.
8994  With the standard graphics, LyX will insert a 
8995 \family typewriter
8996
8997 \backslash
8998 usepackage{graphicx}
8999 \family default
9000  command into the LaTeX preamble and handle the figures in the standard
9001  LaTeX2e way, interspersing the figures in the text.
9002  I believe ApJ accepts figures exactly this way now; AJ might still use
9003  the 
9004 \begin_inset Quotes eld
9005 \end_inset
9006
9007 stack everything at the end
9008 \begin_inset Quotes erd
9009 \end_inset
9010
9011  technique.
9012 \end_layout
9013
9014 \begin_layout Subsubsection
9015 Things I could have done, but didn't
9016 \end_layout
9017
9018 \begin_layout Standard
9019 There are a few 
9020 \begin_inset Quotes eld
9021 \end_inset
9022
9023 pretty
9024 \begin_inset Quotes erd
9025 \end_inset
9026
9027  things I could have implemented, but chose not to.
9028  For instance, I saw no point in double-spacing the text in the LyX window,
9029  even though it is double-spaced in the paper manuscript.
9030  Also, I chose not to make separate layouts for the preprint and preprint2
9031  styles.
9032  Since I assume you will spend most of your time in the plain manuscript
9033  mode anyway, I decided not to chew up more disk space with this.
9034  
9035 \end_layout
9036
9037 \begin_layout Subsection
9038 Final Caveat
9039 \end_layout
9040
9041 \begin_layout Standard
9042 Your mileage may vary.
9043  I've now had papers published by both ApJ and AJ that have had 98% of the
9044  effort done in LyX; the last 2% was the LaTeX post-processing and a few
9045  cleanups.
9046  I have had no trouble with the submission process, and I'm sure the journals
9047  were never aware that there might be a difference.
9048  So, go forth and publish!
9049 \end_layout
9050
9051 \begin_layout Section
9052 AMS LaTeX
9053 \end_layout
9054
9055 \begin_layout Standard
9056 by 
9057 \noun on
9058 David Johnson; updated by Richard Heck
9059 \end_layout
9060
9061 \begin_layout Standard
9062 \begin_inset VSpace bigskip
9063 \end_inset
9064
9065
9066 \end_layout
9067
9068 \begin_layout Standard
9069 \noindent
9070 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
9071  papers to be submitted to American Mathematical Society publications.
9072  The layouts are not tailored to a specific journal, but easily can be.
9073  You should refer to the AMS documentation for specific instructions for
9074  each journal (usually it will entail only changing a single line in the
9075  TeX output).
9076  That documentation is available on the Web at 
9077 \begin_inset Flex URL
9078 status open
9079
9080 \begin_layout Plain Layout
9081
9082 http://www.ams.org
9083 \end_layout
9084
9085 \end_inset
9086
9087  or by ftp at 
9088 \begin_inset Flex URL
9089 status open
9090
9091 \begin_layout Plain Layout
9092
9093 ftp://ftp.ams.org/pub/tex/amslatex/
9094 \end_layout
9095
9096 \end_inset
9097
9098 .
9099  These layouts are appropriate, and useful, for any mathematical writing.
9100  
9101 \end_layout
9102
9103 \begin_layout Standard
9104 There are two basic AMS LaTeX layouts: 
9105 \end_layout
9106
9107 \begin_layout Itemize
9108 amsart: The standard AMS article format.
9109 \end_layout
9110
9111 \begin_layout Itemize
9112 amsbook: the standard AMS book (really, monograph) format.
9113  
9114 \end_layout
9115
9116 \begin_layout Standard
9117 The layouts themselves contain only the minimum necessary to use the AMS
9118  classes.
9119  They do not, in particular, contain any of the `theorem' environments used
9120  for setting theorems, lemmas, and the like.
9121  These are contained, instead, in the 
9122 \begin_inset Flex Code
9123 status collapsed
9124
9125 \begin_layout Plain Layout
9126 Theorems (AMS)
9127 \end_layout
9128
9129 \end_inset
9130
9131  module, which is loaded by default when when you select one of the AMS
9132  classes.
9133  (It can also be used with other classes and can be removed, if you would
9134  rather use something else.) Less commonly used environments are in the 
9135 \begin_inset Flex Code
9136 status collapsed
9137
9138 \begin_layout Plain Layout
9139 Theorems (AMS-Extended)
9140 \end_layout
9141
9142 \end_inset
9143
9144  module, which must be loaded manually.
9145 \end_layout
9146
9147 \begin_layout Standard
9148 By default, theorems and the like are numbered consecutively throughout
9149  the document, but this may be modified by loading the module 
9150 \begin_inset Flex Code
9151 status collapsed
9152
9153 \begin_layout Plain Layout
9154 Theorems (Order by Section)
9155 \end_layout
9156
9157 \end_inset
9158
9159  or, if you are using 
9160 \begin_inset Flex Code
9161 status collapsed
9162
9163 \begin_layout Plain Layout
9164 book (AMS)
9165 \end_layout
9166
9167 \end_inset
9168
9169 , the module 
9170 \begin_inset Flex Code
9171 status collapsed
9172
9173 \begin_layout Plain Layout
9174 Theorems (Order by Chapter)
9175 \end_layout
9176
9177 \end_inset
9178
9179 .
9180  These will number the results as 
9181 \begin_inset Formula $n.m$
9182 \end_inset
9183
9184 , where the first number refers to the section (or chapter) and the second
9185  refers to the total number of results so far in that section (or chapter).
9186  Many environments are also available unnumbered.
9187  These are indicated by an asterisk at the end.
9188  If you happen to want 
9189 \emph on
9190 only
9191 \emph default
9192  unnumbered results, the module 
9193 \begin_inset Flex Code
9194 status collapsed
9195
9196 \begin_layout Plain Layout
9197 Theorems (Starred)
9198 \end_layout
9199
9200 \end_inset
9201
9202  provides that option.
9203 \end_layout
9204
9205 \begin_layout Standard
9206 Note that these modules do not 
9207 \emph on
9208 have
9209 \emph default
9210  to be used with the AMS classes.
9211  It is perfectly possible to use the 
9212 \begin_inset Flex Code
9213 status collapsed
9214
9215 \begin_layout Plain Layout
9216 Theorems (AMS)
9217 \end_layout
9218
9219 \end_inset
9220
9221  module, and the others mentioned, with other classes, such as 
9222 \begin_inset Flex Code
9223 status collapsed
9224
9225 \begin_layout Plain Layout
9226 article
9227 \end_layout
9228
9229 \end_inset
9230
9231
9232 \begin_inset Flex Code
9233 status collapsed
9234
9235 \begin_layout Plain Layout
9236 report
9237 \end_layout
9238
9239 \end_inset
9240
9241
9242 \begin_inset Flex Code
9243 status collapsed
9244
9245 \begin_layout Plain Layout
9246 book (KOMA-script)
9247 \end_layout
9248
9249 \end_inset
9250
9251 , and so forth.
9252 \end_layout
9253
9254 \begin_layout Subsection
9255 What these layouts provide
9256 \end_layout
9257
9258 \begin_layout Standard
9259 There is a long list of included environments provided by these layouts.
9260  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9261  variety of `theorem' environments.
9262  However, the AMS recommends the environments that are available in LyX.
9263  
9264 \end_layout
9265
9266 \begin_layout Standard
9267 The following environments—as well as the standard environments, such as
9268  
9269 \begin_inset Flex Noun
9270 status collapsed
9271
9272 \begin_layout Plain Layout
9273 section
9274 \end_layout
9275
9276 \end_inset
9277
9278
9279 \begin_inset Flex Noun
9280 status collapsed
9281
9282 \begin_layout Plain Layout
9283 bibliography
9284 \end_layout
9285
9286 \end_inset
9287
9288
9289 \begin_inset Flex Noun
9290 status collapsed
9291
9292 \begin_layout Plain Layout
9293 title
9294 \end_layout
9295
9296 \end_inset
9297
9298
9299 \begin_inset Flex Noun
9300 status collapsed
9301
9302 \begin_layout Plain Layout
9303 author
9304 \end_layout
9305
9306 \end_inset
9307
9308 , and 
9309 \begin_inset Flex Noun
9310 status collapsed
9311
9312 \begin_layout Plain Layout
9313 date
9314 \end_layout
9315
9316 \end_inset
9317
9318 —are provided by 
9319 \begin_inset Flex Code
9320 status collapsed
9321
9322 \begin_layout Plain Layout
9323 article (AMS)
9324 \end_layout
9325
9326 \end_inset
9327
9328  and 
9329 \begin_inset Flex Code
9330 status collapsed
9331
9332 \begin_layout Plain Layout
9333 book (AMS)
9334 \end_layout
9335
9336 \end_inset
9337
9338 :
9339 \end_layout
9340
9341 \begin_layout Description
9342 Address This should be the author's permanent address.
9343 \end_layout
9344
9345 \begin_layout Description
9346 Current
9347 \begin_inset space ~
9348 \end_inset
9349
9350 Address This should be the author's temporary address at the time of submission,
9351  if different from the Address.
9352 \end_layout
9353
9354 \begin_layout Description
9355 Email Author's e-mail address
9356 \end_layout
9357
9358 \begin_layout Description
9359 URL Author's Web address, if desired.
9360 \end_layout
9361
9362 \begin_layout Description
9363 Keywords Key words or phrases used to identify specific topics discussed
9364  in the paper.
9365 \end_layout
9366
9367 \begin_layout Description
9368 Subjectclass These refer to the AMS Subject Classifications, published and
9369  described in 
9370 \emph on
9371 Mathematical Reviews
9372 \emph default
9373 .
9374  These are also available online at the AMS cites listed above.
9375 \end_layout
9376
9377 \begin_layout Description
9378 Thanks
9379 \end_layout
9380
9381 \begin_layout Description
9382 Dedicatory
9383 \end_layout
9384
9385 \begin_layout Description
9386 Translator
9387 \end_layout
9388
9389 \begin_layout Standard
9390 The following environments are provided by both the 
9391 \begin_inset Flex Code
9392 status collapsed
9393
9394 \begin_layout Plain Layout
9395 Theorems
9396 \end_layout
9397
9398 \end_inset
9399
9400  and 
9401 \begin_inset Flex Code
9402 status collapsed
9403
9404 \begin_layout Plain Layout
9405 Theorems (AMS)
9406 \end_layout
9407
9408 \end_inset
9409
9410  modules, in the latter case in both starred (unnumbered) and unstarred
9411  (numbered) versions.
9412  These same environments are provided only in the starred versions by the
9413  
9414 \begin_inset Flex Code
9415 status collapsed
9416
9417 \begin_layout Plain Layout
9418 Theorems (Starred)
9419 \end_layout
9420
9421 \end_inset
9422
9423  module:
9424 \end_layout
9425
9426 \begin_layout Theorem
9427 This is typically used for the statements of major results.
9428  
9429 \end_layout
9430
9431 \begin_layout Corollary*
9432 This is used for statements which follow fairly directly from previous statement
9433 s.
9434  Again, these can be major results.
9435  
9436 \end_layout
9437
9438 \begin_layout Lemma
9439 These are smaller results needed to prove other statements.
9440 \end_layout
9441
9442 \begin_layout Proposition
9443 These are less major results which (hopefully) add to the general theory
9444  being discussed.
9445 \end_layout
9446
9447 \begin_layout Conjecture
9448 These are statements provided without justification, which the author does
9449  not know how to prove, but which seem to be true (to the author, at least).
9450 \end_layout
9451
9452 \begin_layout Definition*
9453 Guess what this is for.
9454  The font is different for this environment than for the previous ones.
9455  
9456 \end_layout
9457
9458 \begin_layout Example*
9459 Used for examples illustrating proven results.
9460 \end_layout
9461
9462 \begin_layout Problem
9463 It's not really known what this is for.
9464  You should figure it out.
9465 \end_layout
9466
9467 \begin_layout Exercise*
9468 Write a description for this one.
9469 \end_layout
9470
9471 \begin_layout Remark
9472 This environment is also a type of theorem, usually a lesser sort of observation.
9473 \end_layout
9474
9475 \begin_layout Claim*
9476 Often used in the course of giving a proof of a larger result.
9477 \end_layout
9478
9479 \begin_layout Case
9480 Generally, these are used to break up long arguments, using specific instances
9481  of some condition.
9482  
9483 \end_layout
9484
9485 \begin_layout Case
9486 The numbering scheme for cases is on its own, not together with other numbered
9487  statements.
9488  
9489 \end_layout
9490
9491 \begin_layout Proof
9492 At the end of this environment, a QED symbol (usually a square, but it can
9493  vary with different styles) is placed.
9494  If you want to have other environments within this one—for example, Case
9495  environments—and have the QED symbol appear only after them, then the other
9496  environments need to be nested within the proof environment.
9497  See the section 
9498 \emph on
9499 Nesting Environments
9500 \emph default
9501  of the 
9502 \emph on
9503 User's Guide
9504 \emph default
9505  for information on nesting.
9506 \end_layout
9507
9508 \begin_layout Standard
9509 And these environments are provided by 
9510 \begin_inset Flex Code
9511 status collapsed
9512
9513 \begin_layout Plain Layout
9514 Theorems (AMS-Extended)
9515 \end_layout
9516
9517 \end_inset
9518
9519 :
9520 \end_layout
9521
9522 \begin_layout Criterion*
9523 A required condition.
9524 \end_layout
9525
9526 \begin_layout Algorithm*
9527 A general procedure to be used.
9528 \end_layout
9529
9530 \begin_layout Axiom*
9531 This is a property or statement taken as true within the system being discussed.
9532 \end_layout
9533
9534 \begin_layout Condition*
9535 Sometimes used to state a condition assumed within the present context of
9536  discussion.
9537 \end_layout
9538
9539 \begin_layout Note*
9540 Similar to a Remark.
9541 \end_layout
9542
9543 \begin_layout Notation*
9544 Used for the explanation of, yes, notation.
9545 \end_layout
9546
9547 \begin_layout Summary
9548 Do we really need to tell you? 
9549 \end_layout
9550
9551 \begin_layout Acknowledgement*
9552 Acknowledgement.
9553 \end_layout
9554
9555 \begin_layout Conclusion*
9556 Sometimes used at the end of a long train of argument.
9557 \end_layout
9558
9559 \begin_layout Fact
9560 Used in a way similar to Proposition, though perhaps lower on the scale.
9561 \end_layout
9562
9563 \begin_layout Standard
9564 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9565  fonts packages.
9566  They need to be available on your system in order to use these environments.
9567 \end_layout
9568
9569 \begin_layout Section
9570 AGU journals (
9571 \family sans
9572 aguplus
9573 \family default
9574 )
9575 \end_layout
9576
9577 \begin_layout Standard
9578 by 
9579 \shape smallcaps
9580 Martin Vermeer
9581 \end_layout
9582
9583 \begin_layout Subsection
9584 Description
9585 \end_layout
9586
9587 \begin_layout Standard
9588 These are the layout files for some of the journals of the American Geophysical
9589  Society.
9590  It is assumed that you have both the AGU's own class files and AGUplus
9591  installed (everything to be found at
9592 \begin_inset Flex URL
9593 status collapsed
9594
9595 \begin_layout Plain Layout
9596
9597 ftp://ftp.agu.org/journals/latex/journals
9598 \end_layout
9599
9600 \end_inset
9601
9602 ).
9603 \end_layout
9604
9605 \begin_layout Subsection
9606 New styles
9607 \end_layout
9608
9609 \begin_layout Standard
9610 Redefined are 
9611 \family sans
9612 Paragraph
9613 \family default
9614
9615 \family sans
9616 Paragraph*
9617 \family default
9618 .
9619  They are still called this in the LyX GUI, though their LaTeX equivalents
9620  in the AGU classes are 
9621 \family sans
9622 Subsubsubsection
9623 \family default
9624  and 
9625 \family sans
9626 Subsubsubsection*
9627 \family default
9628 .
9629 \end_layout
9630
9631 \begin_layout Standard
9632 Newly defined styles are 
9633 \family sans
9634 Left_Header
9635 \family default
9636
9637 \family sans
9638 Right_Header
9639 \family default
9640
9641 \family sans
9642 Received
9643 \family default
9644
9645 \family sans
9646 Revised
9647 \family default
9648
9649 \family sans
9650 Accepted
9651 \family default
9652
9653 \family sans
9654 CCC
9655 \family default
9656
9657 \family sans
9658 PaperId
9659 \family default
9660
9661 \family sans
9662 AuthorAddr
9663 \family default
9664
9665 \family sans
9666 SlugComment
9667 \family default
9668 .
9669  These are mostly manuscript attributes and defined in the AGU class documentati
9670 on.
9671 \end_layout
9672
9673 \begin_layout Standard
9674 I suspect this is still badly incomplete.
9675 \end_layout
9676
9677 \begin_layout Subsection
9678 New floats
9679 \end_layout
9680
9681 \begin_layout Standard
9682
9683 \family sans
9684 Planotable
9685 \family default
9686  and 
9687 \family sans
9688 Plate
9689 \family default
9690 .
9691  We also have a new 
9692 \family sans
9693 Table_Caption
9694 \family default
9695 .
9696 \end_layout
9697
9698 \begin_layout Subsection
9699 Supported journals
9700 \end_layout
9701
9702 \begin_layout Itemize
9703
9704 \emph on
9705 Journal of Geophysical Research
9706 \emph default
9707
9708 \family typewriter
9709 jgrga.layout
9710 \family default
9711  — Martin Vermeer
9712 \end_layout
9713
9714 \begin_layout Standard
9715 Add your own, it isn't so hard! Look at the 
9716 \family typewriter
9717 jgrga.layout
9718 \family default
9719  example and 
9720 \family typewriter
9721 aguplus.inc
9722 \family default
9723 .
9724 \end_layout
9725
9726 \begin_layout Subsection
9727 Bugs and things to remember
9728 \end_layout
9729
9730 \begin_layout Standard
9731 In order to use the new layouts, you must remember to do the following for
9732  a new document:
9733 \end_layout
9734
9735 \begin_layout Enumerate
9736
9737 \emph on
9738 Turn off babel
9739 \emph default
9740 .
9741  This can be done in the 
9742 \family sans
9743 Layout\SpecialChar \menuseparator
9744 Document
9745 \family default
9746  or 
9747 \family sans
9748 Document\SpecialChar \menuseparator
9749 Settings
9750 \family default
9751  menu item.
9752  (AGU articles are always in English, right? So 
9753 \emph on
9754 don't
9755 \emph default
9756  choose a language.)
9757 \end_layout
9758
9759 \begin_layout Enumerate
9760 Enter 
9761 \family typewriter
9762 jgrga
9763 \family default
9764  into the document's 
9765 \family sans
9766 Extra Options
9767 \family default
9768  field.
9769  (Yes, this is a bug.)
9770 \end_layout
9771
9772 \begin_layout Enumerate
9773 Make sure you use the 
9774 \family typewriter
9775 agu.bst
9776 \family default
9777  bibliography style, by entering 
9778 \family sans
9779 agu
9780 \family default
9781  into the second field of the BibTeX inset.
9782  None of the standard styles will do.
9783 \end_layout
9784
9785 \begin_layout Section
9786 Broadway
9787 \end_layout
9788
9789 \begin_layout Standard
9790 by 
9791 \shape smallcaps
9792 Garst Reese
9793 \end_layout
9794
9795 \begin_layout Subsection
9796 Introduction
9797 \end_layout
9798
9799 \begin_layout Standard
9800 Broadway is for writing plays.
9801  The format is more decorative than Hollywood, and much less standardized.
9802  This format should be suitable for workshops.
9803 \end_layout
9804
9805 \begin_layout Subsection
9806 Special problems
9807 \end_layout
9808
9809 \begin_layout Standard
9810 The same as in Hollywood.
9811 \end_layout
9812
9813 \begin_layout Subsection
9814 Special features
9815 \end_layout
9816
9817 \begin_layout Standard
9818 Insert the 
9819 \family sans
9820 Speaker
9821 \family default
9822  names as labels then cross-reference the label to insert the name.
9823  The cross-reference dialog will show the current cast of characters.
9824 \end_layout
9825
9826 \begin_layout Subsection
9827 Paper size and Margins
9828 \end_layout
9829
9830 \begin_layout Standard
9831 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9832 \end_layout
9833
9834 \begin_layout Subsection
9835 Environments
9836 \end_layout
9837
9838 \begin_layout Standard
9839 The following environments are available.
9840  You can use broadway.bind to get the bind keys shown at the right.
9841 \end_layout
9842
9843 \begin_layout Itemize
9844
9845 \family sans
9846 Standard
9847 \begin_inset Newline newline
9848 \end_inset
9849
9850
9851 \family default
9852 You should not have to use this, but it is here for anything that does not
9853  fit otherwise.
9854 \end_layout
9855
9856 \begin_layout Itemize
9857
9858 \family sans
9859 Narrative
9860 \begin_inset space \hfill{}
9861 \end_inset
9862
9863 M-z n
9864 \begin_inset Newline newline
9865 \end_inset
9866
9867
9868 \family default
9869 Used to describe stage setting and the action.
9870  First use of speaker names in all CAPs.
9871 \end_layout
9872
9873 \begin_layout Itemize
9874
9875 \family sans
9876 ACT
9877 \begin_inset space \hfill{}
9878 \end_inset
9879
9880 M-z a
9881 \begin_inset Newline newline
9882 \end_inset
9883
9884
9885 \family default
9886 Automatically numbered.
9887  On screen it will be arabic, but will print as Roman.
9888 \end_layout
9889
9890 \begin_layout Itemize
9891
9892 \family sans
9893 ACT*
9894 \begin_inset space \hfill{}
9895 \end_inset
9896
9897 M-z S at
9898 \begin_inset Newline newline
9899 \end_inset
9900
9901
9902 \family default
9903 Subtitle for 
9904 \family sans
9905 ACT.
9906
9907 \family default
9908  It is just centered text.
9909 \end_layout
9910
9911 \begin_layout Itemize
9912
9913 \family sans
9914 SCENE
9915 \begin_inset space \hfill{}
9916 \end_inset
9917
9918 M-z S-S
9919 \begin_inset Newline newline
9920 \end_inset
9921
9922
9923 \family default
9924 Not automatically numbered.
9925  You supply the number.
9926  This is because I couldn't figure out how.
9927 \end_layout
9928
9929 \begin_layout Itemize
9930
9931 \family sans
9932 AT_RISE:
9933 \begin_inset space \hfill{}
9934 \end_inset
9935
9936 M-z S-R
9937 \begin_inset Newline newline
9938 \end_inset
9939
9940
9941 \family default
9942 A special case of Narrative to describe the setting and action as the curtain
9943  rises.
9944 \end_layout
9945
9946 \begin_layout Itemize
9947
9948 \family sans
9949 Speaker
9950 \begin_inset space \hfill{}
9951 \end_inset
9952
9953 M-z s
9954 \begin_inset Newline newline
9955 \end_inset
9956
9957
9958 \family default
9959 The speaker's (actor's) title, centered in all CAPS.
9960 \end_layout
9961
9962 \begin_layout Itemize
9963
9964 \family sans
9965 Parenthetical
9966 \begin_inset space \hfill{}
9967 \end_inset
9968
9969 M-z p
9970 \begin_inset Newline newline
9971 \end_inset
9972
9973
9974 \family default
9975 Instructions to the speaker.
9976  The parentheses are automatically inserted.
9977  The ( will appear on screen, but both will be in the printed play.
9978  This environment is only used within 
9979 \family sans
9980 Dialogue
9981 \family default
9982 .
9983 \end_layout
9984
9985 \begin_layout Itemize
9986
9987 \family sans
9988 Dialogue
9989 \begin_inset space \hfill{}
9990 \end_inset
9991
9992 M-z d
9993 \begin_inset Newline newline
9994 \end_inset
9995
9996
9997 \family default
9998 What the Speaker says.
9999 \end_layout
10000
10001 \begin_layout Itemize
10002
10003 \family sans
10004 CURTAIN
10005 \begin_inset space \hfill{}
10006 \end_inset
10007
10008 M-z S-C
10009 \begin_inset Newline newline
10010 \end_inset
10011
10012
10013 \family default
10014 The curtain comes down.
10015 \end_layout
10016
10017 \begin_layout Itemize
10018
10019 \family sans
10020 Title
10021 \begin_inset space \hfill{}
10022 \end_inset
10023
10024 M-z S-T
10025 \end_layout
10026
10027 \begin_layout Itemize
10028
10029 \family sans
10030 Author
10031 \begin_inset space \hfill{}
10032 \end_inset
10033
10034 M-z S-A
10035 \end_layout
10036
10037 \begin_layout Itemize
10038
10039 \family sans
10040 Right_Address
10041 \begin_inset space \hfill{}
10042 \end_inset
10043
10044 M-z r
10045 \end_layout
10046
10047 \begin_layout Standard
10048 Hello there.
10049 \end_layout
10050
10051 \begin_layout Section
10052 Dinbrief
10053 \end_layout
10054
10055 \begin_layout Standard
10056 The document class 
10057 \family sans
10058 dinbrief
10059 \family default
10060  can be used to type letters according to German conventions.
10061  A template file is included in 
10062 \family typewriter
10063 .../lyx/share/templates
10064 \family default
10065  for you to use as a starting point.
10066 \end_layout
10067
10068 \begin_layout Section
10069 EGS journals (
10070 \family sans
10071 egs
10072 \family default
10073 )
10074 \end_layout
10075
10076 \begin_layout Standard
10077 by 
10078 \shape smallcaps
10079 Martin Vermeer
10080 \end_layout
10081
10082 \begin_layout Subsection
10083 Description
10084 \end_layout
10085
10086 \begin_layout Standard
10087 This is the layout file for the European Geophysical Society journals.
10088  The needed 
10089 \family typewriter
10090 egs.cls
10091 \family default
10092  can be downloaded from the web site of the EGS under 
10093 \begin_inset Flex URL
10094 status collapsed
10095
10096 \begin_layout Plain Layout
10097
10098 www.copernicus.org
10099 \end_layout
10100
10101 \end_inset
10102
10103 .
10104 \end_layout
10105
10106 \begin_layout Subsection
10107 New styles
10108 \end_layout
10109
10110 \begin_layout Standard
10111
10112 \family sans
10113 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
10114  Accepted
10115 \family default
10116
10117 \family sans
10118 Offsets
10119 \family default
10120 .
10121  The current layout file is unfortunately very unmodular and would benefit
10122  from using the various 
10123 \family typewriter
10124 std*.inc
10125 \family default
10126  file inclusions.
10127 \end_layout
10128
10129 \begin_layout Section
10130 Elsevier Journals
10131 \end_layout
10132
10133 \begin_layout Standard
10134 By 
10135 \noun on
10136 Rod Pinna
10137 \end_layout
10138
10139 \begin_layout Standard
10140 Elsevier Science Publishers B.V.
10141  provides a standard LaTeX document class (
10142 \family typewriter
10143 elsart.cls
10144 \family default
10145 ) for submitting articles to their various journals.
10146  The style file can be downloaded directly from their web site: 
10147 \begin_inset Flex URL
10148 status collapsed
10149
10150 \begin_layout Plain Layout
10151
10152 http://www.elsevier.com/wps/find/authorsview.authors/latex
10153 \end_layout
10154
10155 \end_inset
10156
10157 .
10158  Instructions are supplied along with the class file, which details the
10159  requirements of the publishers.
10160  LyX includes a package that allows for the use of this class, by a layout
10161  and a template file.
10162  Installation of the class file is the same as for any other LaTeX package;
10163  instructions are provided in the Elsevier documentation.
10164 \end_layout
10165
10166 \begin_layout Standard
10167 To make use of 
10168 \family typewriter
10169 elsart.cls
10170 \family default
10171 , a file 
10172 \family typewriter
10173 elsart.layout
10174 \family default
10175  is supplied.
10176  As the Elsevier class file is based mainly on the standard article class,
10177  most of the normal functionality is provided.
10178  The Elsevier class defines a number of mathematical environments, which
10179  are similar to the AMS environments.
10180  These commands are all described in the Elsevier documentation, and are
10181  available in LyX.
10182 \end_layout
10183
10184 \begin_layout Standard
10185 The easiest way to use the Elsevier style is to base documents on the included
10186  template file.
10187  It is best not to use options such as fancy headings or the geometry package,
10188  as elements such as these are defined by Elsevier in their style file.
10189  Ideally, no extra packages except those mentioned in the Elsevier documentation
10190  should be used.
10191  Essentially, Elsevier require as 
10192 \begin_inset Quotes eld
10193 \end_inset
10194
10195 clean
10196 \begin_inset Quotes erd
10197 \end_inset
10198
10199  a LaTeX file as possible, as their intention is to take the supplied file
10200  and replace the class file with one for the particular journal to which
10201  the paper has been submitted.
10202  This also means that not too much time should be spent on the formating
10203  of the document.
10204  When it comes to be published, this will change anyway.
10205  The rest of the usage for this layout is substantially the same as for
10206  the normal article class.
10207  For details of what Elsevier do and don't allow, refer to their documentation.
10208 \end_layout
10209
10210 \begin_layout Section
10211 Foils [aka 
10212 \family sans
10213 FoilTeX
10214 \family default
10215 ]
10216 \begin_inset CommandInset label
10217 LatexCommand label
10218 name "sec:foiltex"
10219
10220 \end_inset
10221
10222
10223 \end_layout
10224
10225 \begin_layout Standard
10226 by 
10227 \noun on
10228 Allan Rae
10229 \end_layout
10230
10231 \begin_layout Subsection
10232 Introduction
10233 \end_layout
10234
10235 \begin_layout Standard
10236 This section describes how to use LyX to make slides for overhead projectors.
10237  There are two document classes that can do this: the default slides class
10238  and the 
10239 \family sans
10240 FoilTeX
10241 \family default
10242  slides class.
10243  This section documents the latter.
10244 \end_layout
10245
10246 \begin_layout Standard
10247 I'm going to say this again, nice and clear, so that there's no misunderstanding
10248 :
10249 \end_layout
10250
10251 \begin_layout Standard
10252 \begin_inset VSpace bigskip
10253 \end_inset
10254
10255
10256 \end_layout
10257
10258 \begin_layout Standard
10259 \align center
10260
10261 \size large
10262 This section documents the class 
10263 \begin_inset Quotes eld
10264 \end_inset
10265
10266
10267 \family sans
10268 slides (FoilTeX)
10269 \family default
10270
10271 \begin_inset Quotes erd
10272 \end_inset
10273
10274  
10275 \emph on
10276 only.
10277 \end_layout
10278
10279 \begin_layout Standard
10280 \begin_inset VSpace bigskip
10281 \end_inset
10282
10283
10284 \end_layout
10285
10286 \begin_layout Standard
10287 If you're looking for the documentation for 
10288 \begin_inset Quotes eld
10289 \end_inset
10290
10291
10292 \family sans
10293 slides (default)
10294 \family default
10295
10296 \begin_inset Quotes erd
10297 \end_inset
10298
10299 , check out section
10300 \begin_inset space ~
10301 \end_inset
10302
10303
10304 \begin_inset CommandInset ref
10305 LatexCommand ref
10306 reference "sec:slitex"
10307
10308 \end_inset
10309
10310 .
10311  If your machine doesn't have the 
10312 \family sans
10313 foils
10314 \family default
10315  class [
10316 \begin_inset Quotes eld
10317 \end_inset
10318
10319
10320 \family sans
10321 slides (FoilTeX)
10322 \family default
10323
10324 \begin_inset Quotes erd
10325 \end_inset
10326
10327 ] installed, you'll probably have to use the default 
10328 \family sans
10329 slides
10330 \family default
10331  class, which isn't quite as good as 
10332 \family sans
10333 foils.
10334 \end_layout
10335
10336 \begin_layout Standard
10337 The 
10338 \family sans
10339 foils
10340 \family default
10341  class is designed for use with version 2.1 of the 
10342 \family sans
10343 foils.cls
10344 \family default
10345  LaTeX class file which is now an integral part of LaTeX2e.
10346 \end_layout
10347
10348 \begin_layout Subsection
10349 Getting Started
10350 \end_layout
10351
10352 \begin_layout Standard
10353 Obviously, to use this document class, you need to select 
10354 \begin_inset Quotes eld
10355 \end_inset
10356
10357
10358 \family sans
10359 slides (FoilTeX)
10360 \family default
10361
10362 \begin_inset Quotes erd
10363 \end_inset
10364
10365  from the 
10366 \family sans
10367 Class
10368 \family default
10369  entry in the 
10370 \family sans
10371 Document
10372 \begin_inset space ~
10373 \end_inset
10374
10375 Layout
10376 \family default
10377  dialog.
10378  There are some settings in the 
10379 \family sans
10380 Document
10381 \begin_inset space ~
10382 \end_inset
10383
10384 Layout
10385 \family default
10386  dialog that you should know about that are specific to this class:
10387 \end_layout
10388
10389 \begin_layout Itemize
10390 Don't change the options 
10391 \family sans
10392 Sides
10393 \family default
10394  and 
10395 \family sans
10396 Columns
10397 \family default
10398  on the 
10399 \family sans
10400 Document
10401 \begin_inset space ~
10402 \end_inset
10403
10404 Layout
10405 \family default
10406  dialog.
10407  They're ignored by the 
10408 \family sans
10409 foils
10410 \family default
10411  class.
10412 \end_layout
10413
10414 \begin_layout Itemize
10415 The default font size is 20
10416 \begin_inset space \thinspace{}
10417 \end_inset
10418
10419 pt with the other options being 17
10420 \begin_inset space \thinspace{}
10421 \end_inset
10422
10423 pt, 25
10424 \begin_inset space \thinspace{}
10425 \end_inset
10426
10427 pt and 30
10428 \begin_inset space \thinspace{}
10429 \end_inset
10430
10431 pt.
10432 \end_layout
10433
10434 \begin_layout Itemize
10435 The default font is 
10436 \family sans
10437 sans
10438 \family default
10439  
10440 \family sans
10441 serif
10442 \family default
10443  but all math equations are still typeset in the usual roman font.
10444 \end_layout
10445
10446 \begin_layout Itemize
10447
10448 \family sans
10449 FoilTeX
10450 \family default
10451  supports A4 and Letter paper sizes as well as a special size for working
10452  with 35
10453 \begin_inset space \thinspace{}
10454 \end_inset
10455
10456 mm slides.
10457  It doesn't support A5, B5, legal or executive paper sizes.
10458 \end_layout
10459
10460 \begin_layout Itemize
10461 Don't bother changing the 
10462 \family sans
10463 Float Placement
10464 \family default
10465  settings because they are ignored anyway.
10466  All floats appear where they are defined in the text.
10467 \end_layout
10468
10469 \begin_layout Itemize
10470 The 
10471 \family sans
10472 Pagestyle
10473 \family default
10474  setting behaves a bit differently for this class.
10475  
10476 \family sans
10477 FoilTeX
10478 \family default
10479  provides extensive footer and header capabilities including a user-defined
10480  logo.
10481  See section
10482 \begin_inset space ~
10483 \end_inset
10484
10485
10486 \begin_inset CommandInset ref
10487 LatexCommand ref
10488 reference "sec:foilfoot"
10489
10490 \end_inset
10491
10492  for more details.
10493  The title page is treated differently to all other pages in the document
10494  and is 
10495 \emph on
10496 always
10497 \emph default
10498  unnumbered and 
10499 \emph on
10500 always
10501 \emph default
10502  has the logo centered at the bottom of the page (if one is defined).
10503  The possible page style choices and what they do are as follows:
10504 \end_layout
10505
10506 \begin_deeper
10507 \begin_layout Labeling
10508 \labelwidthstring MMMMMMM
10509
10510 \family sans
10511 \series bold
10512 empty
10513 \family default
10514 \series default
10515  The final output contains no page numbers, or other headers or footers
10516  (except footnotes of course).
10517  
10518 \end_layout
10519
10520 \begin_layout Labeling
10521 \labelwidthstring MMMMMMM
10522
10523 \family sans
10524 \series bold
10525 plain
10526 \family default
10527 \series default
10528  The final output contains page numbers centered at the bottom of the page.
10529  No other headings or footers (other than footnotes).
10530 \end_layout
10531
10532 \begin_layout Labeling
10533 \labelwidthstring MMMMMMM
10534
10535 \series bold
10536 foilheadings
10537 \series default
10538  Page numbers in lower right corner.
10539  Additional headers and footers are also shown.
10540  This is also the default.
10541 \end_layout
10542
10543 \begin_layout Labeling
10544 \labelwidthstring MMMMMMM
10545
10546 \series bold
10547 fancy
10548 \series default
10549  Gives you access to the 
10550 \family sans
10551 fancyheadings
10552 \family default
10553  package although its use with 
10554 \family sans
10555 FoilTeX
10556 \family default
10557  is discouraged by the writer of the 
10558 \family sans
10559 FoilTeX
10560 \family default
10561  package because of some potential page layout clashes.
10562 \end_layout
10563
10564 \end_deeper
10565 \begin_layout Subsubsection
10566 Extra Options
10567 \end_layout
10568
10569 \begin_layout Standard
10570 The following options may be used in the extra class options in the 
10571 \family sans
10572 Document\SpecialChar \menuseparator
10573 Settings
10574 \family default
10575  dialog.
10576 \end_layout
10577
10578 \begin_layout Labeling
10579 \labelwidthstring MMMMMMx
10580
10581 \series bold
10582 35mmSlide
10583 \series default
10584  This sets up the page layout for 7.33
10585 \begin_inset space \thinspace{}
10586 \end_inset
10587
10588 in by 11
10589 \begin_inset space \thinspace{}
10590 \end_inset
10591
10592 in paper, which is about the same aspect ratio as a 35
10593 \begin_inset space \thinspace{}
10594 \end_inset
10595
10596 mm slide, making it a bit easier to work with this medium.
10597 \end_layout
10598
10599 \begin_layout Labeling
10600 \labelwidthstring MMMMMMx
10601
10602 \series bold
10603 headrule
10604 \series default
10605  Places a rule across the page below the header on every page except the
10606  title page.
10607 \end_layout
10608
10609 \begin_layout Labeling
10610 \labelwidthstring MMMMMMx
10611
10612 \series bold
10613 footrule
10614 \series default
10615  Places a rule across the page above the footer on every page except the
10616  title page.
10617 \end_layout
10618
10619 \begin_layout Labeling
10620 \labelwidthstring MMMMMMx
10621
10622 \series bold
10623 dvips
10624 \series default
10625  This is automatically set each time you create a new 
10626 \family sans
10627 foils
10628 \family default
10629  document.
10630  This option tells 
10631 \family sans
10632 FoilTeX
10633 \family default
10634  to use the dvips driver to rotate those pages that are set as landscape
10635  foils.
10636 \end_layout
10637
10638 \begin_layout Labeling
10639 \labelwidthstring MMMMMMx
10640
10641 \series bold
10642 landscape
10643 \series default
10644  Simply changes the page dimensions to those of a landscape page but doesn't
10645  do any rotation.
10646  Thus if you use this option you need to use an external program to rotate
10647  each page or feed your paper through your printer as landscape.
10648  Note that this option effectively reverses the roles of the 
10649 \family sans
10650 Foilhead
10651 \family default
10652  and 
10653 \family sans
10654 Rotatefoilhead
10655 \family default
10656  environments (don't worry these are described in the next section).
10657 \end_layout
10658
10659 \begin_layout Labeling
10660 \labelwidthstring MMMMMMx
10661
10662 \series bold
10663 leqno
10664 \series default
10665  Equation numbers on the left.
10666 \end_layout
10667
10668 \begin_layout Labeling
10669 \labelwidthstring MMMMMMx
10670
10671 \series bold
10672 fleqn
10673 \series default
10674  Flush-left equations.
10675 \end_layout
10676
10677 \begin_layout Subsection
10678 Supported Environments
10679 \end_layout
10680
10681 \begin_layout Standard
10682 Most of the environments commonly supported in other classes are also supported
10683  by the 
10684 \family sans
10685 foils
10686 \family default
10687  class.
10688  There are several additional environments provided by 
10689 \family sans
10690 FoilTeX
10691 \family default
10692  as well as a couple added by LyX.
10693  The following environments are shared with other classes:
10694 \end_layout
10695
10696 \begin_layout Standard
10697 \begin_inset ERT
10698 status open
10699
10700 \begin_layout Plain Layout
10701
10702
10703 \backslash
10704 begin{multicols}{2}
10705 \end_layout
10706
10707 \end_inset
10708
10709
10710 \end_layout
10711
10712 \begin_layout Itemize
10713
10714 \family sans
10715 Standard
10716 \end_layout
10717
10718 \begin_layout Itemize
10719
10720 \family sans
10721 Itemize
10722 \end_layout
10723
10724 \begin_layout Itemize
10725
10726 \family sans
10727 Enumerate
10728 \end_layout
10729
10730 \begin_layout Itemize
10731
10732 \family sans
10733 Description
10734 \end_layout
10735
10736 \begin_layout Itemize
10737
10738 \family sans
10739 List
10740 \end_layout
10741
10742 \begin_layout Itemize
10743
10744 \family sans
10745 LyX-Code
10746 \end_layout
10747
10748 \begin_layout Itemize
10749
10750 \family sans
10751 Verse
10752 \end_layout
10753
10754 \begin_layout Itemize
10755
10756 \family sans
10757 Quote
10758 \end_layout
10759
10760 \begin_layout Itemize
10761
10762 \family sans
10763 Quotation
10764 \end_layout
10765
10766 \begin_layout Itemize
10767
10768 \family sans
10769 Title
10770 \end_layout
10771
10772 \begin_layout Itemize
10773
10774 \family sans
10775 Author
10776 \end_layout
10777
10778 \begin_layout Itemize
10779
10780 \family sans
10781 Date
10782 \end_layout
10783
10784 \begin_layout Itemize
10785
10786 \family sans
10787 Abstract
10788 \end_layout
10789
10790 \begin_layout Itemize
10791
10792 \family sans
10793 Bibliography
10794 \end_layout
10795
10796 \begin_layout Itemize
10797
10798 \family sans
10799 Address
10800 \end_layout
10801
10802 \begin_layout Itemize
10803
10804 \family sans
10805 RightAddress
10806 \end_layout
10807
10808 \begin_layout Itemize
10809
10810 \family sans
10811 Caption
10812 \end_layout
10813
10814 \begin_layout Itemize
10815
10816 \family sans
10817 Comment
10818 \end_layout
10819
10820 \begin_layout Standard
10821 \begin_inset ERT
10822 status open
10823
10824 \begin_layout Plain Layout
10825
10826
10827 \backslash
10828 end{multicols}
10829 \end_layout
10830
10831 \end_inset
10832
10833
10834 \end_layout
10835
10836 \begin_layout Standard
10837 That is, all the major environments apart from the sectioning environments.
10838  Since foils are essentially self-contained sections, with a title and body,
10839  
10840 \family sans
10841 FoilTeX
10842 \family default
10843  provides specific commands for starting new foils and these are:
10844 \end_layout
10845
10846 \begin_layout Itemize
10847
10848 \family sans
10849 Foilhead
10850 \end_layout
10851
10852 \begin_layout Itemize
10853
10854 \family sans
10855 Rotatefoilhead
10856 \end_layout
10857
10858 \begin_layout Standard
10859 LyX also provides slightly modified versions of these two environments called:
10860 \end_layout
10861
10862 \begin_layout Itemize
10863
10864 \family sans
10865 ShortFoilhead
10866 \end_layout
10867
10868 \begin_layout Itemize
10869
10870 \family sans
10871 ShortRotatefoilhead
10872 \end_layout
10873
10874 \begin_layout Standard
10875 and the differences will be explained in the next section.
10876 \end_layout
10877
10878 \begin_layout Standard
10879 Since foils are often used in presenting ideas or new theorems and such
10880  
10881 \family sans
10882 FoilTeX
10883 \family default
10884  also provides a comprehensive box of goodies for presenting them:
10885 \end_layout
10886
10887 \begin_layout Standard
10888 \begin_inset ERT
10889 status open
10890
10891 \begin_layout Plain Layout
10892
10893
10894 \backslash
10895 begin{multicols}{2}
10896 \end_layout
10897
10898 \end_inset
10899
10900
10901 \end_layout
10902
10903 \begin_layout Itemize
10904
10905 \family sans
10906 Theorem
10907 \end_layout
10908
10909 \begin_layout Itemize
10910
10911 \family sans
10912 Lemma
10913 \end_layout
10914
10915 \begin_layout Itemize
10916
10917 \family sans
10918 Corollary
10919 \end_layout
10920
10921 \begin_layout Itemize
10922
10923 \family sans
10924 Proposition
10925 \end_layout
10926
10927 \begin_layout Itemize
10928
10929 \family sans
10930 Definition
10931 \end_layout
10932
10933 \begin_layout Itemize
10934
10935 \family sans
10936 Proof
10937 \end_layout
10938
10939 \begin_layout Itemize
10940
10941 \family sans
10942 Theorem*
10943 \end_layout
10944
10945 \begin_layout Itemize
10946
10947 \family sans
10948 Lemma*
10949 \end_layout
10950
10951 \begin_layout Itemize
10952
10953 \family sans
10954 Corollary*
10955 \end_layout
10956
10957 \begin_layout Itemize
10958
10959 \family sans
10960 Proposition*
10961 \end_layout
10962
10963 \begin_layout Itemize
10964
10965 \family sans
10966 Definition*
10967 \end_layout
10968
10969 \begin_layout Standard
10970 \begin_inset ERT
10971 status open
10972
10973 \begin_layout Plain Layout
10974
10975
10976 \backslash
10977 end{multicols}
10978 \end_layout
10979
10980 \end_inset
10981
10982
10983 \end_layout
10984
10985 \begin_layout Standard
10986 The starred versions are unnumbered while the unstarred versions are numbered.
10987  There are also two list environments added by LyX and these are:
10988 \end_layout
10989
10990 \begin_layout Itemize
10991
10992 \family sans
10993 TickList
10994 \end_layout
10995
10996 \begin_layout Itemize
10997
10998 \family sans
10999 CrossList
11000 \end_layout
11001
11002 \begin_layout Standard
11003
11004 \family sans
11005 FoilTeX
11006 \family default
11007  provides some powerful header and footer capabilities that are best set
11008  in the preamble although they may be set at any point in a document.
11009  If you want to change these settings in your document the best place to
11010  do so is at the very top of a foil, i.
11011 \begin_inset space \thinspace{}
11012 \end_inset
11013
11014 g.
11015 \emph on
11016
11017 \begin_inset space \space{}
11018 \end_inset
11019
11020
11021 \emph default
11022 straight after the foilhead.
11023 \end_layout
11024
11025 \begin_layout Standard
11026 For this purpose, the following command styles are provided [
11027 \shape smallcaps
11028 Martin Vermeer
11029 \shape default
11030 ]:
11031 \end_layout
11032
11033 \begin_layout Standard
11034 \begin_inset ERT
11035 status open
11036
11037 \begin_layout Plain Layout
11038
11039
11040 \backslash
11041 begin{multicols}{2}
11042 \end_layout
11043
11044 \end_inset
11045
11046
11047 \end_layout
11048
11049 \begin_layout Itemize
11050
11051 \family sans
11052 My
11053 \begin_inset space ~
11054 \end_inset
11055
11056 Logo
11057 \end_layout
11058
11059 \begin_layout Itemize
11060
11061 \family sans
11062 Restriction
11063 \end_layout
11064
11065 \begin_layout Itemize
11066
11067 \family sans
11068 Right
11069 \begin_inset space ~
11070 \end_inset
11071
11072 Footer
11073 \end_layout
11074
11075 \begin_layout Itemize
11076
11077 \family sans
11078 Right
11079 \begin_inset space ~
11080 \end_inset
11081
11082 Header
11083 \end_layout
11084
11085 \begin_layout Itemize
11086
11087 \family sans
11088 Left
11089 \begin_inset space ~
11090 \end_inset
11091
11092 Header
11093 \end_layout
11094
11095 \begin_deeper
11096 \begin_layout Standard
11097 \begin_inset space ~
11098 \end_inset
11099
11100
11101 \end_layout
11102
11103 \end_deeper
11104 \begin_layout Standard
11105 \begin_inset ERT
11106 status open
11107
11108 \begin_layout Plain Layout
11109
11110
11111 \backslash
11112 end{multicols}
11113 \end_layout
11114
11115 \end_inset
11116
11117
11118 \end_layout
11119
11120 \begin_layout Standard
11121 There are also a few commands provided by 
11122 \family sans
11123 FoilTeX
11124 \family default
11125  that aren't directly supported by LyX but I'll tell you what they do and
11126  how to use them in section
11127 \begin_inset space ~
11128 \end_inset
11129
11130
11131 \begin_inset CommandInset ref
11132 LatexCommand ref
11133 reference "sec:unsuppfoils"
11134
11135 \end_inset
11136
11137 .
11138 \end_layout
11139
11140 \begin_layout Subsection
11141 Building a Set of Foils
11142 \end_layout
11143
11144 \begin_layout Standard
11145 This section will give a simple introduction to using the different environments
11146  to build a set of foils.
11147  If you want to see an example set of foils, take a look at the 
11148 \family typewriter
11149 Foils.lyx
11150 \family default
11151  file you find in LyX's 
11152 \family typewriter
11153 examples
11154 \family default
11155  folder.
11156 \end_layout
11157
11158 \begin_layout Subsubsection
11159 Give It a Title Page
11160 \end_layout
11161
11162 \begin_layout Standard
11163 Unlike other classes that provide 
11164 \family sans
11165 Title
11166 \family default
11167
11168 \family sans
11169 Author
11170 \family default
11171
11172 \family sans
11173 Date
11174 \family default
11175  and 
11176 \family sans
11177 Abstract
11178 \family default
11179  environments, 
11180 \family sans
11181 foils
11182 \family default
11183  creates the title on a page of its own.
11184  If you leave out the 
11185 \family sans
11186 Date
11187 \family default
11188  environment LaTeX will substitute the current date (every time you regenerate
11189  the output).
11190 \end_layout
11191
11192 \begin_layout Subsubsection
11193 Start a New Foil
11194 \end_layout
11195
11196 \begin_layout Standard
11197 As I mentioned earlier, there are four ways of starting a new foil.
11198  For portrait foils you should use 
11199 \family sans
11200 Foilhead
11201 \family default
11202  or 
11203 \family sans
11204 ShortFoilhead.
11205
11206 \family default
11207  The difference between these two environments is the amount of space between
11208  the title of the foil (the foilhead) and the body of the foil.
11209 \end_layout
11210
11211 \begin_layout Standard
11212 Landscape foils are generated using the 
11213 \family sans
11214 Rotatefoilhead
11215 \family default
11216  and 
11217 \family sans
11218 ShortRotatefoilhead
11219 \family default
11220  environments.
11221  Again the only difference is the spacing between foilhead and body.
11222  Both of the short versions have 0.5 inches less separation between the foilhead
11223  and the body.
11224  
11225 \end_layout
11226
11227 \begin_layout Standard
11228 One problem with the support for landscape foils is the requirement that
11229  you have to use the 
11230 \family typewriter
11231 dvips
11232 \family default
11233  driver to generate the PostScript output otherwise the foils won't be rotated.
11234  It is possible to get landscape foils even if you haven't got the 
11235 \family typewriter
11236 dvips
11237 \family default
11238  driver provided you can feed your foils sideways through your printer ;-)
11239 \end_layout
11240
11241 \begin_layout Subsubsection
11242 Theorems, Lemmas, Proofs and more
11243 \end_layout
11244
11245 \begin_layout Standard
11246 Due to a small bug in LyX you can't have two of the same type of these environme
11247 nts directly following each other.
11248  They must be separated by something.
11249  If you try, you will just be extending the previous environment as if you
11250  had merged the two environments together.
11251  So, how do you get around this problem? The simplest option is to insert
11252  some text between the two environments or add a 
11253 \family sans
11254 LaTeX
11255 \family default
11256  environment between the two with just a 
11257 \begin_inset Quotes eld
11258 \end_inset
11259
11260
11261 \family typewriter
11262 %
11263 \family default
11264
11265 \begin_inset Quotes erd
11266 \end_inset
11267
11268  in it.
11269  This will force LyX to produce two separate environments and hence the
11270  correct LaTeX output.
11271  An example is provided in the example file included with the LyX distribution.
11272  Remember, this problem only occurs if you are trying to place two of the
11273  same type of theorem-like environments one directly after the other.
11274 \end_layout
11275
11276 \begin_layout Subsubsection
11277 Lists
11278 \end_layout
11279
11280 \begin_layout Standard
11281 You get all the commonly supported list styles found in other classes as
11282  well as two new ones.
11283  I'll only describe the new ones here.
11284  If you want to find out more about the other list environments check out
11285  the 
11286 \emph on
11287 User's Guide.
11288
11289 \emph default
11290  If you intend to use itemized lists you might also want to read about the
11291  
11292 \family sans
11293 Itemize
11294 \begin_inset space ~
11295 \end_inset
11296
11297 Bullet
11298 \begin_inset space ~
11299 \end_inset
11300
11301 Selection
11302 \family default
11303  dialog described above in section
11304 \begin_inset space ~
11305 \end_inset
11306
11307
11308 \begin_inset CommandInset ref
11309 LatexCommand ref
11310 reference "sec:bullet"
11311
11312 \end_inset
11313
11314 .
11315 \end_layout
11316
11317 \begin_layout Standard
11318 The two new list styles, 
11319 \family sans
11320 TickList
11321 \family default
11322  and 
11323 \family sans
11324 CrossList
11325 \family default
11326 , are designed to make it easier for you to create lists of do's and don'ts
11327  or right and wrong by providing dedicated environments that use a tick
11328  or a cross as the label of the list.
11329  These lists are in fact dedicated variants of the 
11330 \family sans
11331 Itemize
11332 \family default
11333  environment.
11334  They do however require that you have the 
11335 \family typewriter
11336 psnfss
11337 \family default
11338  packages installed.
11339 \end_layout
11340
11341 \begin_layout Subsubsection
11342 Figures and Tables
11343 \end_layout
11344
11345 \begin_layout Standard
11346
11347 \family sans
11348 FoilTeX
11349 \family default
11350  redefines the floating tables and figures so that they appear exactly where
11351  they are in the text rather than pushing them to the top of the page or
11352  to some user specified location.
11353  In fact if you change the float placement settings they are simply ignored.
11354 \end_layout
11355
11356 \begin_layout Subsubsection
11357 Page Headers and Footers
11358 \begin_inset CommandInset label
11359 LatexCommand label
11360 name "sec:foilfoot"
11361
11362 \end_inset
11363
11364
11365 \end_layout
11366
11367 \begin_layout Standard
11368
11369 \family sans
11370 My
11371 \begin_inset space ~
11372 \end_inset
11373
11374 Logo
11375 \family default
11376  and 
11377 \family sans
11378 Restriction
11379 \family default
11380  are two commands used to control the left-footer text string.
11381  The first is meant to allow you to include a graphic logo on your foils
11382  and defaults to 
11383 \begin_inset Quotes eld
11384 \end_inset
11385
11386 -Typeset by 
11387 \family sans
11388 FoilTeX
11389 \family default
11390 -
11391 \begin_inset Quotes erd
11392 \end_inset
11393
11394 .
11395  While the second is meant to provide a classification for the audience,
11396  
11397 \emph on
11398 e.
11399 \begin_inset space \thinspace{}
11400 \end_inset
11401
11402 g.
11403 \emph default
11404
11405 \begin_inset space \space{}
11406 \end_inset
11407
11408 Confidential.
11409  It is empty by default.
11410 \end_layout
11411
11412 \begin_layout Standard
11413 The remaining page corners can be filled by 
11414 \family sans
11415 Right
11416 \begin_inset space ~
11417 \end_inset
11418
11419 Footer
11420 \family default
11421  (which defaults to page numbers), 
11422 \family sans
11423 Right
11424 \begin_inset space ~
11425 \end_inset
11426
11427 Header
11428 \family default
11429  (top right) and 
11430 \family sans
11431 Left
11432 \begin_inset space ~
11433 \end_inset
11434
11435 Header
11436 \family default
11437  (top left).
11438 \end_layout
11439
11440 \begin_layout Subsection
11441 Unsupported 
11442 \family sans
11443 FoilTeX
11444 \family default
11445  Goodies
11446 \begin_inset CommandInset label
11447 LatexCommand label
11448 name "sec:unsuppfoils"
11449
11450 \end_inset
11451
11452
11453 \end_layout
11454
11455 \begin_layout Standard
11456 All the commands mentioned below need to be set in a 
11457 \family sans
11458 LaTeX
11459 \family default
11460  environment or as 
11461 \family sans
11462 TeX
11463 \family default
11464  within another environment.
11465 \end_layout
11466
11467 \begin_layout Subsubsection
11468 Lengths
11469 \end_layout
11470
11471 \begin_layout Standard
11472 All lengths are adjusted using the 
11473 \family typewriter
11474
11475 \backslash
11476 setlength{
11477 \family default
11478 \emph on
11479 lengthname
11480 \family typewriter
11481 \emph default
11482 }{
11483 \family default
11484 \emph on
11485 newlength
11486 \family typewriter
11487 \emph default
11488 }
11489 \family default
11490  command.
11491  Where 
11492 \emph on
11493 lengthname
11494 \emph default
11495  should be replaced by the name given to the length you want to change and
11496  
11497 \emph on
11498 newlength
11499 \emph default
11500  is the length value.
11501  All lengths should be specified in units of length such as inches (
11502 \family typewriter
11503 in
11504 \family default
11505 ), millimeters (
11506 \family typewriter
11507 mm
11508 \family default
11509 ) or points (
11510 \family typewriter
11511 pt
11512 \family default
11513 ) or relative to some document or font-based length such as 
11514 \family typewriter
11515
11516 \backslash
11517 textwidth
11518 \family default
11519 .
11520  
11521 \end_layout
11522
11523 \begin_layout Standard
11524 It's possible to change the spacing between a foilhead and the body of the
11525  foil by adjusting the length specified by 
11526 \family typewriter
11527
11528 \backslash
11529 foilheadskip
11530 \family default
11531 .
11532  For example, to make 
11533 \emph on
11534 all
11535 \emph default
11536  foilheads 0.5
11537 \begin_inset space \space{}
11538 \end_inset
11539
11540 in closer to their bodies put the following in the preamble: 
11541 \family typewriter
11542
11543 \backslash
11544 setlength{
11545 \backslash
11546 foilheadskip}{-0.5in}
11547 \end_layout
11548
11549 \begin_layout Standard
11550 The spacings around floats can be adjusted by setting these lengths:
11551 \end_layout
11552
11553 \begin_layout Labeling
11554 \labelwidthstring MMMMMMMMMMM
11555
11556 \family typewriter
11557
11558 \backslash
11559 abovefloatskip
11560 \family default
11561  Separation between the text and the top of the float
11562 \end_layout
11563
11564 \begin_layout Labeling
11565 \labelwidthstring MMMMMMMMMMM
11566
11567 \family typewriter
11568
11569 \backslash
11570 abovecaptionskip
11571 \family default
11572  Separation between the float and the caption
11573 \end_layout
11574
11575 \begin_layout Labeling
11576 \labelwidthstring MMMMMMMMMMM
11577
11578 \family typewriter
11579
11580 \backslash
11581 belowcaptionskip
11582 \family default
11583  Separation between the caption and the following text
11584 \end_layout
11585
11586 \begin_layout Labeling
11587 \labelwidthstring MMMMMMMMMMM
11588
11589 \family typewriter
11590
11591 \backslash
11592 captionwidth
11593 \family default
11594  You can make the captions narrower than the surrounding text by adjusting
11595  this length.
11596  Best done relative to 
11597 \family typewriter
11598
11599 \backslash
11600 textwidth
11601 \family default
11602 .
11603 \end_layout
11604
11605 \begin_layout Standard
11606 There are also several title page related lengths that you may find useful
11607  if you have a long title or several authors:
11608 \end_layout
11609
11610 \begin_layout Labeling
11611 \labelwidthstring MMMMMMMMMMM
11612
11613 \family typewriter
11614
11615 \backslash
11616 abovetitleskip
11617 \family default
11618  Separation from headers to 
11619 \family sans
11620 Title
11621 \end_layout
11622
11623 \begin_layout Labeling
11624 \labelwidthstring MMMMMMMMMMM
11625
11626 \family typewriter
11627
11628 \backslash
11629 titleauthorskip
11630 \family default
11631  between 
11632 \family sans
11633 Title
11634 \family default
11635  and 
11636 \family sans
11637 Author
11638 \family default
11639  environments
11640 \end_layout
11641
11642 \begin_layout Labeling
11643 \labelwidthstring MMMMMMMMMMM
11644
11645 \family typewriter
11646
11647 \backslash
11648 authorauthorskip
11649 \family default
11650  between multiple 
11651 \family sans
11652 Author
11653 \family default
11654  lines
11655 \end_layout
11656
11657 \begin_layout Labeling
11658 \labelwidthstring MMMMMMMMMMM
11659
11660 \family typewriter
11661
11662 \backslash
11663 authordateskip
11664 \family default
11665  between the 
11666 \family sans
11667 Author
11668 \family default
11669  and the 
11670 \family sans
11671 Date
11672 \end_layout
11673
11674 \begin_layout Labeling
11675 \labelwidthstring MMMMMMMMMMM
11676
11677 \family typewriter
11678
11679 \backslash
11680 dateabstractskip
11681 \family default
11682  between the 
11683 \family sans
11684 Date
11685 \family default
11686  and the 
11687 \family sans
11688 Abstract
11689 \end_layout
11690
11691 \begin_layout Standard
11692 The last length related command affects all the list environments.
11693  If you place 
11694 \family typewriter
11695
11696 \backslash
11697 zerolistvertdimens
11698 \family default
11699  
11700 \emph on
11701 inside
11702 \emph default
11703  a list environment then all the vertical spacing between the list items
11704  is removed.
11705  Note that this is a command not a length so it doesn't require 
11706 \family typewriter
11707
11708 \backslash
11709 setlength
11710 \family default
11711  like the stuff mentioned above.
11712 \end_layout
11713
11714 \begin_layout Subsubsection
11715 Headers and Footers
11716 \end_layout
11717
11718 \begin_layout Standard
11719 The 
11720 \family typewriter
11721
11722 \backslash
11723 LogoOn
11724 \family default
11725  and 
11726 \family typewriter
11727
11728 \backslash
11729 LogoOff
11730 \family default
11731  commands control whether the logo in the 
11732 \family sans
11733 MyLogo
11734 \family default
11735  definition appear on a given page.
11736  If you put 
11737 \family typewriter
11738
11739 \backslash
11740 LogoOff
11741 \family default
11742  in the preamble then none of the foils will have the logo on them.
11743  If you don't want the logo on a particular page place the 
11744 \family typewriter
11745
11746 \backslash
11747 LogoOff
11748 \family default
11749  directly after the foilhead of that page and the 
11750 \family typewriter
11751
11752 \backslash
11753 LogoOn
11754 \family default
11755  directly after the next foilhead.
11756 \end_layout
11757
11758 \begin_layout Standard
11759 If you decide to use the 
11760 \family sans
11761 fancy
11762 \family default
11763  page style setting in the 
11764 \family sans
11765 Document
11766 \begin_inset space ~
11767 \end_inset
11768
11769 Layout
11770 \family default
11771  dialog you should probably add 
11772 \family typewriter
11773
11774 \backslash
11775 let
11776 \backslash
11777 headwidth
11778 \backslash
11779 textwidth
11780 \family default
11781  to your preamble so headers and footers on landscape pages are correctly
11782  placed when rotated.
11783  This is due to some clashes between the page layouts provided by the 
11784 \family sans
11785 fancyheadings
11786 \family default
11787  package and the 
11788 \family sans
11789 foils
11790 \family default
11791  class.
11792 \end_layout
11793
11794 \begin_layout Section
11795 Hollywood (Hollywood spec scripts)
11796 \end_layout
11797
11798 \begin_layout Standard
11799 by 
11800 \shape smallcaps
11801 Garst Reese
11802 \end_layout
11803
11804 \begin_layout Subsection
11805 Introduction
11806 \end_layout
11807
11808 \begin_layout Standard
11809 Getting the format of a Hollywood script right is a 
11810 \begin_inset Quotes eld
11811 \end_inset
11812
11813 rite of passage.
11814 \begin_inset Quotes erd
11815 \end_inset
11816
11817  It is designed to make the readers focus on content and to be easy and
11818  familiar for the actors to read.
11819  Each page of a script should be one minute of film.
11820  Nothing goes in a script that you cannot see or hear on screen.
11821  The courier 12 pt font should be used throughout.
11822  No italics.
11823 \end_layout
11824
11825 \begin_layout Subsection
11826 Special problems
11827 \end_layout
11828
11829 \begin_layout Standard
11830 Speakers' lines should NEVER break in mid-sentence.
11831  If a speaker's lines continue over a page break, repeat the 
11832 \family sans
11833 Speaker
11834 \family default
11835  title followed by (Cont'd).
11836 \end_layout
11837
11838 \begin_layout Subsection
11839 Special features
11840 \end_layout
11841
11842 \begin_layout Standard
11843 Insert the 
11844 \family sans
11845 Speaker
11846 \family default
11847  names as labels then cross-reference the label to insert the name.
11848  The cross-reference dialog will show the current cast of characters.
11849  You can use this to insert the speaker name in narratives also.
11850 \end_layout
11851
11852 \begin_layout Subsection
11853 Paper size and Margins
11854 \end_layout
11855
11856 \begin_layout Standard
11857 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11858 \end_layout
11859
11860 \begin_layout Subsection
11861 Environments
11862 \end_layout
11863
11864 \begin_layout Standard
11865 The following environments are available.
11866  You can use hollywood.bind to get the bind keys shown at the right.
11867 \end_layout
11868
11869 \begin_layout Itemize
11870
11871 \family sans
11872 Standard
11873 \begin_inset Newline newline
11874 \end_inset
11875
11876
11877 \family default
11878 Used where nothing else works.
11879  Try to avoid it.
11880 \end_layout
11881
11882 \begin_layout Itemize
11883
11884 \family sans
11885 FADE_IN
11886 \family default
11887 :
11888 \begin_inset space \hfill{}
11889 \end_inset
11890
11891
11892 \family sans
11893 M-z S-I
11894 \family default
11895
11896 \begin_inset Newline newline
11897 \end_inset
11898
11899 Usually followed by something like 
11900 \begin_inset Quotes eld
11901 \end_inset
11902
11903 on Sally waking up.
11904 \begin_inset Quotes erd
11905 \end_inset
11906
11907
11908 \end_layout
11909
11910 \begin_layout Itemize
11911
11912 \family sans
11913 INT:
11914 \begin_inset space \hfill{}
11915 \end_inset
11916
11917 M-z i
11918 \begin_inset Newline newline
11919 \end_inset
11920
11921
11922 \family default
11923 Introduces a new INTERIOR camera set-up.
11924  Always followed by DAY or NIGHT, or something similar to define the lighting
11925  required.
11926  Everthing on this line in CAPS.
11927 \end_layout
11928
11929 \begin_layout Itemize
11930
11931 \family sans
11932 EXT:
11933 \begin_inset space \hfill{}
11934 \end_inset
11935
11936 M-z e
11937 \begin_inset Newline newline
11938 \end_inset
11939
11940
11941 \family default
11942 Introduces a new EXTERIOR camera set-up.
11943  Everthing on this line in CAPS.
11944 \end_layout
11945
11946 \begin_layout Itemize
11947
11948 \family sans
11949 Speaker
11950 \begin_inset space \hfill{}
11951 \end_inset
11952
11953 M-z s
11954 \begin_inset Newline newline
11955 \end_inset
11956
11957
11958 \family default
11959 The character speaking.
11960 \end_layout
11961
11962 \begin_layout Itemize
11963
11964 \family sans
11965 Parenthetical
11966 \begin_inset space \hfill{}
11967 \end_inset
11968
11969 M-z p
11970 \begin_inset Newline newline
11971 \end_inset
11972
11973
11974 \family default
11975 Instructions to the speaker.
11976  The () are automatically inserted, but only the ( will show in LyX.
11977  Both will be printed.
11978 \end_layout
11979
11980 \begin_layout Itemize
11981
11982 \family sans
11983 Dialogue
11984 \begin_inset space \hfill{}
11985 \end_inset
11986
11987 M-z d
11988 \begin_inset Newline newline
11989 \end_inset
11990
11991
11992 \family default
11993 What the 
11994 \family sans
11995 Speaker
11996 \family default
11997  says.
11998 \end_layout
11999
12000 \begin_layout Itemize
12001
12002 \family sans
12003 Transition
12004 \begin_inset space \hfill{}
12005 \end_inset
12006
12007 M-z t
12008 \begin_inset Newline newline
12009 \end_inset
12010
12011
12012 \family default
12013 Camera movement instruction.
12014  e.
12015 \begin_inset space \thinspace{}
12016 \end_inset
12017
12018 g.
12019 \begin_inset space \space{}
12020 \end_inset
12021
12022 CUT TO:
12023 \end_layout
12024
12025 \begin_layout Itemize
12026
12027 \family sans
12028 FADE OUT:
12029 \begin_inset space \hfill{}
12030 \end_inset
12031
12032 M-z S-I
12033 \end_layout
12034
12035 \begin_layout Itemize
12036
12037 \family sans
12038 Author
12039 \begin_inset space \hfill{}
12040 \end_inset
12041
12042 M-z S-A
12043 \end_layout
12044
12045 \begin_layout Itemize
12046
12047 \family sans
12048 Title
12049 \begin_inset space \hfill{}
12050 \end_inset
12051
12052 M-z S-T
12053 \end_layout
12054
12055 \begin_layout Itemize
12056
12057 \family sans
12058 Right_Address
12059 \begin_inset space \hfill{}
12060 \end_inset
12061
12062 M-z r
12063 \end_layout
12064
12065 \begin_layout Subsection
12066 Script jargon
12067 \end_layout
12068
12069 \begin_layout Itemize
12070 (O.S) — off screen
12071 \end_layout
12072
12073 \begin_layout Itemize
12074 (V.0) — voice over
12075 \end_layout
12076
12077 \begin_layout Itemize
12078 b.
12079 \begin_inset space \thinspace{}
12080 \end_inset
12081
12082 g.
12083  — background
12084 \end_layout
12085
12086 \begin_layout Itemize
12087 C.U.
12088  — close-up
12089 \end_layout
12090
12091 \begin_layout Itemize
12092 PAN — camera movement
12093 \end_layout
12094
12095 \begin_layout Itemize
12096 INSERT — cut to close-up of
12097 \end_layout
12098
12099 \begin_layout Section
12100 ijmpc and ijmpd
12101 \end_layout
12102
12103 \begin_layout Standard
12104 by 
12105 \noun on
12106 Panayotis Papasotiriou
12107 \end_layout
12108
12109 \begin_layout Subsection
12110 Overview
12111 \end_layout
12112
12113 \begin_layout Standard
12114 The ijmpc package is a set of macros that facilitates electronic manuscript
12115  submission to the 
12116 \emph on
12117 International Journal of Modern Physics C
12118 \emph default
12119 .
12120  Similarly, the ijmpd package is for creating manuscripts to be submitted
12121  to the 
12122 \emph on
12123 International Journal of Modern Physics D
12124 \emph default
12125 .
12126  Both journals are published by World Scientific.
12127  The corresponding document classes are named 
12128 \family typewriter
12129 ws-ijmpc.cls
12130 \family default
12131  and 
12132 \family typewriter
12133 ws-ijmpd.cls
12134 \family default
12135 , respectively.
12136  These files, together with instructions for the authors, can be downloaded
12137  from the sites 
12138 \begin_inset Flex URL
12139 status collapsed
12140
12141 \begin_layout Plain Layout
12142
12143 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
12144 \end_layout
12145
12146 \end_inset
12147
12148  and 
12149 \begin_inset Flex URL
12150 status collapsed
12151
12152 \begin_layout Plain Layout
12153
12154 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
12155 \end_layout
12156
12157 \end_inset
12158
12159 .
12160  Both packages are modified versions of the standard 
12161 \begin_inset Quotes eld
12162 \end_inset
12163
12164 article
12165 \begin_inset Quotes erd
12166 \end_inset
12167
12168  package, and they are almost (but not exactly) identical.
12169  Most of their features are supported by LyX.
12170  I have used LyX successfully to write articles submitted to both journals
12171  without any problem.
12172 \end_layout
12173
12174 \begin_layout Subsection
12175 Writing a paper
12176 \end_layout
12177
12178 \begin_layout Standard
12179 As usual, the easiest way to write a paper is to start with a template.
12180  Click on 
12181 \family sans
12182 File\SpecialChar \menuseparator
12183 New from
12184 \family default
12185  
12186 \family sans
12187 \bar under
12188 T
12189 \bar default
12190 emplate
12191 \family default
12192 , then choose the 
12193 \family typewriter
12194 ijmpc.lyx
12195 \family default
12196  or 
12197 \family typewriter
12198 ijmpd.lyx
12199 \family default
12200  template.
12201  This will give an (almost) empty document that includes the most common
12202  fields found in a manuscript.
12203  Simply overwrite the existing text (including the brackets, 
12204 \family typewriter
12205 <>
12206 \family default
12207 ) with your text.
12208  You should keep in mind the following remarks.
12209 \end_layout
12210
12211 \begin_layout Enumerate
12212 LyX won't let you change the font size and the page style of the document,
12213  because such modifications are not allowed by both packages.
12214 \end_layout
12215
12216 \begin_layout Enumerate
12217 The language of the document should not be changed.
12218  Before previewing your paper, be sure that the babel package is not used.
12219  To do this, click on 
12220 \family sans
12221 Tools\SpecialChar \menuseparator
12222 Preferences
12223 \family default
12224 , select the 
12225 \family sans
12226 Lang Opts
12227 \family default
12228  tab, deselect the 
12229 \family sans
12230 Use babel
12231 \family default
12232  checkbox in the language settings, and click on 
12233 \family sans
12234 Apply
12235 \family default
12236  (or 
12237 \family sans
12238 Save
12239 \family default
12240 , if you wish to make this change permanent).
12241 \end_layout
12242
12243 \begin_layout Enumerate
12244 The 
12245 \begin_inset Quotes eld
12246 \end_inset
12247
12248 Keywords
12249 \begin_inset Quotes erd
12250 \end_inset
12251
12252  style must be used to define keywords.
12253 \end_layout
12254
12255 \begin_layout Enumerate
12256 The ijmpc package provides a style named 
12257 \begin_inset Quotes eld
12258 \end_inset
12259
12260 Classification Codes
12261 \begin_inset Quotes erd
12262 \end_inset
12263
12264 , which can be used to define classification codes, such as PACS numbers.
12265  Note that this facility is not supported by the ijmpd package.
12266 \end_layout
12267
12268 \begin_layout Enumerate
12269 Several new environments are available: 
12270 \begin_inset Quotes eld
12271 \end_inset
12272
12273 Definition
12274 \begin_inset Quotes erd
12275 \end_inset
12276
12277
12278 \begin_inset Quotes eld
12279 \end_inset
12280
12281 Step
12282 \begin_inset Quotes erd
12283 \end_inset
12284
12285
12286 \begin_inset Quotes eld
12287 \end_inset
12288
12289 Example
12290 \begin_inset Quotes erd
12291 \end_inset
12292
12293
12294 \begin_inset Quotes eld
12295 \end_inset
12296
12297 Remark
12298 \begin_inset Quotes erd
12299 \end_inset
12300
12301
12302 \begin_inset Quotes eld
12303 \end_inset
12304
12305 Notation
12306 \begin_inset Quotes erd
12307 \end_inset
12308
12309
12310 \begin_inset Quotes eld
12311 \end_inset
12312
12313 Theorem
12314 \begin_inset Quotes erd
12315 \end_inset
12316
12317
12318 \begin_inset Quotes eld
12319 \end_inset
12320
12321 Proof
12322 \begin_inset Quotes erd
12323 \end_inset
12324
12325
12326 \begin_inset Quotes eld
12327 \end_inset
12328
12329 Corollary
12330 \begin_inset Quotes erd
12331 \end_inset
12332
12333
12334 \begin_inset Quotes eld
12335 \end_inset
12336
12337 Lemma
12338 \begin_inset Quotes erd
12339 \end_inset
12340
12341
12342 \begin_inset Quotes eld
12343 \end_inset
12344
12345 Proposition
12346 \begin_inset Quotes erd
12347 \end_inset
12348
12349
12350 \begin_inset Quotes eld
12351 \end_inset
12352
12353 Prop
12354 \begin_inset Quotes erd
12355 \end_inset
12356
12357
12358 \begin_inset Quotes eld
12359 \end_inset
12360
12361 Question
12362 \begin_inset Quotes erd
12363 \end_inset
12364
12365
12366 \begin_inset Quotes eld
12367 \end_inset
12368
12369 Claim
12370 \begin_inset Quotes erd
12371 \end_inset
12372
12373 , and 
12374 \begin_inset Quotes eld
12375 \end_inset
12376
12377 Conjecture
12378 \begin_inset Quotes erd
12379 \end_inset
12380
12381 .
12382  Their use is more or less obvious.
12383  LyX supports all these environments; it will use the proper label, text
12384  style, and numbering scheme for each of them.
12385 \end_layout
12386
12387 \begin_layout Enumerate
12388 Both packages use basic citations; the natbib package should not be used.
12389  In LyX, citation references are shown as usual; in the output, citations
12390  are shown as superscripts.
12391  If you want to use a citation as normal text, you should use the 
12392 \family typewriter
12393 refcite
12394 \family default
12395  command, e.
12396 \begin_inset space \thinspace{}
12397 \end_inset
12398
12399 g.
12400 \begin_inset space \space{}
12401 \end_inset
12402
12403
12404 \begin_inset Quotes eld
12405 \end_inset
12406
12407 See Ref.
12408 \begin_inset space \space{}
12409 \end_inset
12410
12411
12412 \family typewriter
12413
12414 \backslash
12415 refcite{key}
12416 \family default
12417
12418 \begin_inset Quotes erd
12419 \end_inset
12420
12421 .
12422 \end_layout
12423
12424 \begin_layout Enumerate
12425 There is no 
12426 \begin_inset Quotes eld
12427 \end_inset
12428
12429 Acknowledgments
12430 \begin_inset Quotes erd
12431 \end_inset
12432
12433  section in both packages.
12434  To put acknowledgments, just use the 
12435 \begin_inset Quotes eld
12436 \end_inset
12437
12438 Section*
12439 \begin_inset Quotes erd
12440 \end_inset
12441
12442  environment.
12443 \end_layout
12444
12445 \begin_layout Enumerate
12446 Appendices may be added to the paper, 
12447 \emph on
12448 after
12449 \emph default
12450  the Acknowledgments and 
12451 \shape italic
12452 before
12453 \shape default
12454  the References.
12455  LyX provides a special environment, called 
12456 \begin_inset Quotes eld
12457 \end_inset
12458
12459 Appendices Section
12460 \begin_inset Quotes erd
12461 \end_inset
12462
12463  which marks the beginning of the appendices.
12464  This environment should be left blank; it just sends a LaTeX command, but
12465  nothing is really printed.
12466  In LyX, the word 
12467 \begin_inset Quotes eld
12468 \end_inset
12469
12470 Appendix
12471 \begin_inset Quotes erd
12472 \end_inset
12473
12474  is printed with blue letters, as a signal that all sections after that
12475  point are appendices.
12476  To write an appendix, use the 
12477 \begin_inset Quotes eld
12478 \end_inset
12479
12480 Appendix
12481 \begin_inset Quotes erd
12482 \end_inset
12483
12484  environment.
12485  LyX will number each appendix with capital letters, as required by both
12486  journals.
12487  Note that 
12488 \begin_inset Quotes eld
12489 \end_inset
12490
12491 Appendices Section
12492 \begin_inset Quotes erd
12493 \end_inset
12494
12495  
12496 \emph on
12497 must
12498 \emph default
12499  be present before the first appendix; if not, all appendices will be numbered
12500  as normal sections in the output.
12501 \end_layout
12502
12503 \begin_layout Enumerate
12504 The ijmpc and the ijmpd packages use the 
12505 \family typewriter
12506 tbl
12507 \family default
12508  command to implement table captions.
12509  As a result, a table created by LyX is printed correctly, but its caption
12510  is ignored.
12511  However, you can use some TeX code to overcome this problem, so that captions
12512  are printed as expected.
12513  To do so, create a float table as usual, remove the caption, and replace
12514  it with the TeX code 
12515 \family typewriter
12516
12517 \backslash
12518 tbl{
12519 \emph on
12520 your table caption
12521 \emph default
12522 }{
12523 \family default
12524  (sic); you must also the TeX code 
12525 \family typewriter
12526 }
12527 \family default
12528  immediately after the tabular material.
12529  Study the example table included in the template files to see how this
12530  trick is implemented.
12531  Alternatively, If you need table captions, you should implement the whole
12532  table float in a 
12533 \family typewriter
12534 .tex
12535 \family default
12536  file, then include this file to the LyX document (
12537 \family sans
12538 Insert\SpecialChar \menuseparator
12539 File\SpecialChar \menuseparator
12540 Child
12541 \begin_inset space ~
12542 \end_inset
12543
12544 Document
12545 \family default
12546 ).
12547  Details on how to create a table float can be found in the files 
12548 \family typewriter
12549 ws-ijmpc.tex
12550 \family default
12551  and 
12552 \family typewriter
12553 ws-ijmpd.tex
12554 \family default
12555 , included in the corresponding packages.
12556 \end_layout
12557
12558 \begin_layout Subsection
12559 Preparing a paper for submission
12560 \end_layout
12561
12562 \begin_layout Standard
12563 Before you submit your paper you must export the LyX document as a LaTeX
12564  file (
12565 \family sans
12566 File\SpecialChar \menuseparator
12567 Export\SpecialChar \menuseparator
12568 LaTeX
12569 \family default
12570 )
12571 \begin_inset Foot
12572 status open
12573
12574 \begin_layout Plain Layout
12575 Actually you have the choice between LaTeX (plain) and pdflatex.
12576  If you intend to use pdflatex to prepare the paper, you should use the
12577  pdflatex option so that included graphics are converted to PDF format,
12578  ready for use by pdflatex.
12579 \end_layout
12580
12581 \end_inset
12582
12583 , then make the following changes to the resulting 
12584 \family typewriter
12585 .tex
12586 \family default
12587  file.
12588 \end_layout
12589
12590 \begin_layout Enumerate
12591 Remove the comment lines before the 
12592 \family typewriter
12593
12594 \backslash
12595 documentclass
12596 \family default
12597  command.
12598 \end_layout
12599
12600 \begin_layout Enumerate
12601 Remove everything between (and including) the 
12602 \family typewriter
12603
12604 \backslash
12605 makeatletter
12606 \family default
12607  and 
12608 \family typewriter
12609
12610 \backslash
12611 makeatother
12612 \family default
12613  commands, except for any commands you specifically put into the LaTeX preamble.
12614 \end_layout
12615
12616 \begin_layout Standard
12617 The modified 
12618 \family typewriter
12619 .tex
12620 \family default
12621  file should be saved and processed through LaTeX as many times as necessary.
12622  You may also want to check the resulting 
12623 \family typewriter
12624 .dvi
12625 \family default
12626  document.
12627 \end_layout
12628
12629 \begin_layout Subsection
12630 Use of TeX code
12631 \end_layout
12632
12633 \begin_layout Standard
12634 The use of TeX code is reduced to two commands, which must be placed at
12635  the top of the document.
12636  If you started writing your paper by using the 
12637 \family typewriter
12638 ijmpc.lyx
12639 \family default
12640  or the 
12641 \family typewriter
12642 ijmpd.lyx
12643 \family default
12644  template, the TeX code needed is already in its place; you usually don't
12645  need to delete it.
12646  You may only modify the first TeX code to specify the information printed
12647  to the top of odd and even pages (authors' names and short paper's title,
12648  respectively).
12649  This TeX code must have the form 
12650 \family typewriter
12651
12652 \backslash
12653 markboth{Authors' Names}{Short Paper's Title}
12654 \family default
12655 .
12656 \end_layout
12657
12658 \begin_layout Section
12659 iopart
12660 \end_layout
12661
12662 \begin_layout Standard
12663 by 
12664 \noun on
12665 Uwe Stöhr
12666 \end_layout
12667
12668 \begin_layout Subsection
12669 Overview
12670 \end_layout
12671
12672 \begin_layout Standard
12673 The iopart package provides a document class to create electronic manuscript
12674  submission to the journals published by the Institute of Physics.
12675  Instructions for the authors how to create a paper using the iopart class
12676  can be downloaded together with the iopart package from the site 
12677 \begin_inset Flex URL
12678 status collapsed
12679
12680 \begin_layout Plain Layout
12681
12682 ftp://ftp.iop.org/pub/journals/latex2e
12683 \end_layout
12684
12685 \end_inset
12686
12687 .
12688 \end_layout
12689
12690 \begin_layout Subsection
12691 Writing a paper
12692 \end_layout
12693
12694 \begin_layout Standard
12695 The easiest way to write a paper is to start with the file 
12696 \emph on
12697 IOP-article.lyx
12698 \emph default
12699  that is available in LyX's examples files folder.
12700  Open this file, save it under a new name, and start writing.
12701  The example file explains how to use the special text environments.
12702  Here are the most important advices:
12703 \end_layout
12704
12705 \begin_layout Itemize
12706 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12707  two options 
12708 \family sans
12709 Use AMS math package
12710 \family default
12711  in the document settings under 
12712 \family sans
12713 Math Options
12714 \family default
12715  are not used!
12716 \end_layout
12717
12718 \begin_layout Itemize
12719
12720 \size normal
12721 The title environment defines the kind of your paper.
12722  So use one of the following environments for the title:
12723 \end_layout
12724
12725 \begin_deeper
12726 \begin_layout Itemize
12727
12728 \family sans
12729 \size normal
12730 Title
12731 \family default
12732  for a Paper
12733 \end_layout
12734
12735 \begin_layout Itemize
12736
12737 \family sans
12738 \size normal
12739 Review
12740 \family default
12741  for a Review
12742 \end_layout
12743
12744 \begin_layout Itemize
12745
12746 \family sans
12747 \size normal
12748 Topical
12749 \family default
12750  for a Topical review
12751 \end_layout
12752
12753 \begin_layout Itemize
12754
12755 \family sans
12756 \size normal
12757 Comment
12758 \family default
12759  for a Comment
12760 \end_layout
12761
12762 \begin_layout Itemize
12763
12764 \family sans
12765 \size normal
12766 Note
12767 \family default
12768  for a Note
12769 \end_layout
12770
12771 \begin_layout Itemize
12772
12773 \family sans
12774 \size normal
12775 Paper
12776 \family default
12777  for a Paper (same as Title)
12778 \end_layout
12779
12780 \begin_layout Itemize
12781
12782 \family sans
12783 \size normal
12784 Prelim
12785 \family default
12786  for a Preliminary communication
12787 \end_layout
12788
12789 \begin_layout Itemize
12790
12791 \family sans
12792 \size normal
12793 Rapid
12794 \family default
12795  for a Rapid communication
12796 \end_layout
12797
12798 \begin_layout Itemize
12799
12800 \family sans
12801 \size normal
12802 Letter
12803 \family default
12804  for a Letter to the editor
12805 \end_layout
12806
12807 \end_deeper
12808 \begin_layout Itemize
12809
12810 \size normal
12811 All title environments except of 
12812 \family sans
12813 Letter
12814 \family default
12815  can have an optional short title.
12816 \end_layout
12817
12818 \begin_layout Itemize
12819 There is a general title environment 
12820 \family sans
12821 Article
12822 \family default
12823  which is not directly supported by the LyX.
12824  This can be used as TeX code when your document doesn't fit into one of
12825  the other title types.
12826 \end_layout
12827
12828 \begin_layout Standard
12829 For more informations like hints for special table and formula formatting,
12830  look at the IOP author guidelines.
12831 \end_layout
12832
12833 \begin_layout Section
12834 Kluwer
12835 \end_layout
12836
12837 \begin_layout Standard
12838 by 
12839 \noun on
12840 Panayotis Papasotiriou
12841 \end_layout
12842
12843 \begin_layout Subsection
12844 Overview
12845 \end_layout
12846
12847 \begin_layout Standard
12848 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12849  that facilitates electronic manuscript submission to the journals they
12850  publish.
12851  Most known of them (at least in my domain of interest) are 
12852 \emph on
12853 Astrophysics and Space Science
12854 \emph default
12855  and 
12856 \emph on
12857 Solar Physics
12858 \emph default
12859 , but there are many others (see a complete list at 
12860 \begin_inset Flex URL
12861 status open
12862
12863 \begin_layout Plain Layout
12864
12865 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12866 \end_layout
12867
12868 \end_inset
12869
12870 ).
12871  The Kluwer package may be downloaded from the site 
12872 \begin_inset Flex URL
12873 status collapsed
12874
12875 \begin_layout Plain Layout
12876
12877 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12878 \end_layout
12879
12880 \end_inset
12881
12882 .
12883  A complete user guide is contained in that package (but it can also be
12884  downloaded separately).
12885 \end_layout
12886
12887 \begin_layout Standard
12888 LyX supports many features of the package but not everything.
12889  However, the TeX code needed is reduced to some 
12890 \begin_inset Quotes eld
12891 \end_inset
12892
12893 peculiar
12894 \begin_inset Quotes erd
12895 \end_inset
12896
12897  commands of the package (see
12898 \begin_inset space ~
12899 \end_inset
12900
12901
12902 \begin_inset CommandInset ref
12903 LatexCommand ref
12904 reference "subsec:kluwer_peculiarities"
12905
12906 \end_inset
12907
12908 ).
12909  I have recently used LyX to write an article submitted to the 
12910 \emph on
12911 Astrophysics and Space Science
12912 \emph default
12913  without any problem.
12914 \end_layout
12915
12916 \begin_layout Subsection
12917 Writing a paper
12918 \end_layout
12919
12920 \begin_layout Standard
12921 The easiest way to write a paper is to start with the Kluwer template file.
12922  Click on 
12923 \family sans
12924 File\SpecialChar \menuseparator
12925 New from
12926 \family default
12927  
12928 \family sans
12929 Template
12930 \family default
12931 , then choose the 
12932 \family typewriter
12933 kluwer.lyx
12934 \family default
12935  template.
12936  This will give an (almost) empty document that includes the most common
12937  fields found in a manuscript and a short description of their use.
12938  As in most templates, simply overwrite the existing text (including the
12939  brackets, 
12940 \family typewriter
12941 <>
12942 \family default
12943 ) with the correct information.
12944 \end_layout
12945
12946 \begin_layout Subsection
12947 Preparing a paper for submission
12948 \end_layout
12949
12950 \begin_layout Standard
12951 As in the AASTeX package, before you submit your paper to a journal you
12952  must 
12953 \begin_inset Quotes eld
12954 \end_inset
12955
12956 postprocess
12957 \begin_inset Quotes erd
12958 \end_inset
12959
12960  it as follows.
12961 \end_layout
12962
12963 \begin_layout Enumerate
12964 Export your paper as a LaTeX file.
12965  To do this, click on 
12966 \family sans
12967 File\SpecialChar \menuseparator
12968 Export\SpecialChar \menuseparator
12969 LaTeX
12970 \family default
12971 .
12972  
12973 \end_layout
12974
12975 \begin_layout Enumerate
12976 Edit the resulting 
12977 \family typewriter
12978 .tex
12979 \family default
12980  file with a text editor and make the following changes
12981 \end_layout
12982
12983 \begin_deeper
12984 \begin_layout Enumerate
12985 remove the comment lines before the 
12986 \family typewriter
12987
12988 \backslash
12989 documentclass
12990 \family default
12991  command,
12992 \end_layout
12993
12994 \begin_layout Enumerate
12995 remove everything between (and including) the 
12996 \family typewriter
12997
12998 \backslash
12999 makeatletter
13000 \family default
13001  and 
13002 \family typewriter
13003
13004 \backslash
13005 makeatother
13006 \family default
13007  commands, except for any commands you specifically put into the LaTeX preamble.
13008 \end_layout
13009
13010 \begin_layout Standard
13011 Save the resulting 
13012 \family typewriter
13013 .tex
13014 \family default
13015  file.
13016 \end_layout
13017
13018 \end_deeper
13019 \begin_layout Enumerate
13020 Run the 
13021 \family typewriter
13022 .tex
13023 \family default
13024  file through LaTeX as many times as necessary (usually up to three).
13025 \end_layout
13026
13027 \begin_layout Enumerate
13028 View the resulting 
13029 \family typewriter
13030 .dvi
13031 \family default
13032  document using, e.
13033 \begin_inset space \thinspace{}
13034 \end_inset
13035
13036 g.
13037 \begin_inset space \space{}
13038 \end_inset
13039
13040
13041 \family sans
13042 xdvi
13043 \family default
13044 , and check if everything is OK (it should, if you didn't make any mistake).
13045 \end_layout
13046
13047 \begin_layout Subsection
13048 \begin_inset Quotes eld
13049 \end_inset
13050
13051 Peculiarities
13052 \begin_inset Quotes erd
13053 \end_inset
13054
13055  of the Kluwer package
13056 \begin_inset CommandInset label
13057 LatexCommand label
13058 name "subsec:kluwer_peculiarities"
13059
13060 \end_inset
13061
13062
13063 \end_layout
13064
13065 \begin_layout Standard
13066 The Kluwer package has the following 
13067 \begin_inset Quotes eld
13068 \end_inset
13069
13070 peculiarities
13071 \begin_inset Quotes erd
13072 \end_inset
13073
13074 .
13075 \end_layout
13076
13077 \begin_layout Enumerate
13078 It is possible to write multiple articles in the same LaTeX file
13079 \begin_inset Foot
13080 status collapsed
13081
13082 \begin_layout Plain Layout
13083 I can't imagine any good reason to do this.
13084 \end_layout
13085
13086 \end_inset
13087
13088 .
13089  Each article must be included in the environment 
13090 \begin_inset Quotes eld
13091 \end_inset
13092
13093 article
13094 \begin_inset Quotes erd
13095 \end_inset
13096
13097 .
13098  Unfortunately, this environment cannot be omitted, even if you write just
13099  one article.
13100  Therefore, each article starts with the command 
13101 \family typewriter
13102
13103 \backslash
13104 begin{article}
13105 \family default
13106  and, obviously, ends with the command 
13107 \family typewriter
13108
13109 \backslash
13110 end{article}
13111 \family default
13112 .
13113  Although this can be implemented in LyX, I didn't included it, since it
13114  looks ugly and can confuse the novice user.
13115  Therefore, you need to enter them directly and mark them as LaTeX code
13116  (the well-known 
13117 \begin_inset Quotes eld
13118 \end_inset
13119
13120 TeX code
13121 \begin_inset Quotes erd
13122 \end_inset
13123
13124 ).
13125 \end_layout
13126
13127 \begin_layout Enumerate
13128 Information given at the beginning of the article (i.
13129 \begin_inset space \thinspace{}
13130 \end_inset
13131
13132 g.
13133 \begin_inset space \space{}
13134 \end_inset
13135
13136 title, subtitle, author, institution, running title, running author, abstract
13137  and keywords) must be included in an environment called 
13138 \begin_inset Quotes eld
13139 \end_inset
13140
13141 opening
13142 \begin_inset Quotes erd
13143 \end_inset
13144
13145 .
13146  This is not implemented in LyX, so you must enter title, subtitle etc.
13147 \begin_inset space ~
13148 \end_inset
13149
13150 between two TeX code lines (
13151 \family typewriter
13152
13153 \backslash
13154 begin{opening}
13155 \family default
13156  and 
13157 \family typewriter
13158
13159 \backslash
13160 end{opening}
13161 \family default
13162 ).
13163 \end_layout
13164
13165 \begin_layout Enumerate
13166 According to the user manual, the label of each bibliography item must be
13167  written as 
13168 \family typewriter
13169
13170 \backslash
13171 protect
13172 \backslash
13173 citeauthoryear{
13174 \family default
13175 \emph on
13176 author(s)
13177 \family typewriter
13178 \emph default
13179 }{
13180 \family default
13181 \emph on
13182 year
13183 \family typewriter
13184 \emph default
13185 }
13186 \family default
13187 .
13188 \end_layout
13189
13190 \begin_layout Standard
13191 The 
13192 \family typewriter
13193 kluwer.lyx
13194 \family default
13195  template takes care of all these 
13196 \begin_inset Quotes eld
13197 \end_inset
13198
13199 peculiarities
13200 \begin_inset Quotes erd
13201 \end_inset
13202
13203 .
13204  If you start a new paper using this template you don't need to do anything
13205  special.
13206  Just 
13207 \end_layout
13208
13209 \begin_layout Enumerate
13210 don't delete the TeX code included in the template, and
13211 \end_layout
13212
13213 \begin_layout Enumerate
13214 copy the example bibliography item included in the template and modify it
13215  as necessary to enter new bibliography items.
13216 \end_layout
13217
13218 \begin_layout Section
13219 Koma-Script
13220 \end_layout
13221
13222 \begin_layout Standard
13223 by 
13224 \noun on
13225 Bernd Rellermeyer
13226 \end_layout
13227
13228 \begin_layout Subsection
13229 Overview
13230 \end_layout
13231
13232 \begin_layout Standard
13233 The LyX document classes 
13234 \emph on
13235 article (koma-script)
13236 \emph default
13237
13238 \emph on
13239 report (koma-script)
13240 \emph default
13241
13242 \emph on
13243 book
13244 \emph default
13245  
13246 \emph on
13247 (koma-script)
13248 \emph default
13249 , and 
13250 \emph on
13251 letter
13252 \emph default
13253  
13254 \emph on
13255 (koma-script)
13256 \emph default
13257  correspond to the LaTeX document classes 
13258 \family typewriter
13259 scrartcl.cls
13260 \family default
13261
13262 \family typewriter
13263 scrreprt.cls
13264 \family default
13265
13266 \family typewriter
13267 scrbook.cls
13268 \family default
13269 , and 
13270 \family typewriter
13271 scrlettr.cls
13272 \family default
13273 , resp.
13274 \begin_inset space ~
13275 \end_inset
13276
13277 of the Koma-Script family.
13278  They are replacements for the standard document classes 
13279 \family typewriter
13280 article.cls
13281 \family default
13282
13283 \family typewriter
13284 report.cls
13285 \family default
13286
13287 \family typewriter
13288 book.cls
13289 \family default
13290  and 
13291 \family typewriter
13292 letter.cls
13293 \family default
13294 , resp., and fit better to European typography conventions in a number of
13295  points.
13296 \end_layout
13297
13298 \begin_layout Itemize
13299 Standard character size is 11pt in 
13300 \emph on
13301 article (koma-script)
13302 \emph default
13303
13304 \emph on
13305 report (koma-script)
13306 \emph default
13307 , and 
13308 \emph on
13309 book (koma-script)
13310 \emph default
13311 , and 12pt in 
13312 \emph on
13313 letter (koma-script)
13314 \emph default
13315 .
13316 \end_layout
13317
13318 \begin_layout Itemize
13319 Headings, labels of the description environment, and a number of elements
13320  of the 
13321 \emph on
13322 letter (koma-script)
13323 \emph default
13324  document class are set in a bold sans serif font.
13325 \begin_inset Foot
13326 status collapsed
13327
13328 \begin_layout Plain Layout
13329 There is a big difference between the bold sans serif old cm fonts and new
13330  ec fonts, especially in the appearance of headings.
13331  In comparison, the ec bold sans serif fonts look a bit thin.
13332  Here the LaTeX package 
13333 \family typewriter
13334 cmsd.sty by
13335 \family default
13336  
13337 \shape smallcaps
13338 Walter Schmidt
13339 \shape default
13340  helps to produce the 
13341 \begin_inset Quotes eld
13342 \end_inset
13343
13344 usual
13345 \begin_inset Quotes erd
13346 \end_inset
13347
13348  appearance when using the ec fonts.
13349 \end_layout
13350
13351 \end_inset
13352
13353  The numbering of chapter headings is made in the same way as the numbering
13354  of section headings, that is without the extra line 
13355 \begin_inset Quotes eld
13356 \end_inset
13357
13358 Chapter\SpecialChar \ldots{}
13359
13360 \begin_inset Quotes erd
13361 \end_inset
13362
13363 .
13364  In addition, the appearance of the headings can be modified by using a
13365  number of options (in LyX to be entered in the field 
13366 \family sans
13367 Extra
13368 \begin_inset space ~
13369 \end_inset
13370
13371 Options
13372 \family default
13373  of the dialog 
13374 \family sans
13375 Layout\SpecialChar \menuseparator
13376 Document
13377 \family default
13378 ).
13379  
13380 \end_layout
13381
13382 \begin_layout Itemize
13383 The main means in the Koma-Script document classes to design the type area
13384  are the options 
13385 \family sans
13386 BCOR
13387 \family default
13388  and 
13389 \family sans
13390 DIV
13391 \family default
13392  (in LyX to be entered in the extra class options field in the dialog 
13393 \family sans
13394 Document\SpecialChar \menuseparator
13395 Settings
13396 \family default
13397 ).
13398  They make a clearer modification of page margins possible as do the options
13399  of the dialog 
13400 \family sans
13401 Document\SpecialChar \menuseparator
13402 Settings
13403 \family default
13404 .
13405  
13406 \end_layout
13407
13408 \begin_layout Itemize
13409 The LaTeX document classes of the Koma-Script family define a number of
13410  additional commands.
13411  Those part of it which makes sense in LyX is implemented in corresponding
13412  paragraph types.
13413 \end_layout
13414
13415 \begin_layout Standard
13416 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13417  can be found in the Koma-Script documentation 
13418 \emph on
13419 scrguide
13420 \emph default
13421  (German) and 
13422 \emph on
13423 scrguien
13424 \emph default
13425  (English).
13426 \end_layout
13427
13428 \begin_layout Subsection
13429 article (koma-script), report (koma-script), and book (koma-script)
13430 \end_layout
13431
13432 \begin_layout Standard
13433 The document classes 
13434 \emph on
13435 article (koma-script)
13436 \emph default
13437
13438 \emph on
13439 report (koma-script)
13440 \emph default
13441 , and 
13442 \emph on
13443 book
13444 \emph default
13445  
13446 \emph on
13447 (koma-script)
13448 \emph default
13449  are implemented in the layout files 
13450 \family typewriter
13451 scrartcl.layout
13452 \family default
13453
13454 \family typewriter
13455 scrreprt.layout
13456 \family default
13457 , and 
13458 \family typewriter
13459 scrbook.layout
13460 \family default
13461 , resp.
13462  They contain all the paragraph types of the corresponding standard document
13463  classes 
13464 \emph on
13465 article
13466 \emph default
13467
13468 \emph on
13469 report
13470 \emph default
13471 , and 
13472 \emph on
13473 book
13474 \emph default
13475 , resp., partly modified, with the exception of the LyX specific 
13476 \family sans
13477 List
13478 \family default
13479 -type, which is replaced by the new 
13480 \family sans
13481 Labeling
13482 \family default
13483 -type having the same functionality.
13484  Beside the 
13485 \family sans
13486 Labeling
13487 \family default
13488 -Type there is a number of new paragraph types added.
13489  They are 
13490 \emph on
13491 not
13492 \emph default
13493  part of 
13494 \emph on
13495 letter (koma-script)
13496 \emph default
13497 .
13498 \end_layout
13499
13500 \begin_layout Itemize
13501
13502 \family sans
13503 Addpart, Addchap
13504 \family default
13505
13506 \family sans
13507 Addsec
13508 \family default
13509 : are equivalents to 
13510 \family sans
13511 Part*, Chapter*
13512 \family default
13513  and 
13514 \family sans
13515 Section*
13516 \family default
13517 , resp., additionally inserting an entry in the table of contents.
13518  
13519 \family sans
13520 Addpart
13521 \family default
13522  and 
13523 \family sans
13524 Addchap
13525 \family default
13526  are not contained in 
13527 \emph on
13528 article (koma-script)
13529 \emph default
13530 .
13531 \end_layout
13532
13533 \begin_layout Itemize
13534
13535 \family sans
13536 Addchap*
13537 \family default
13538
13539 \family sans
13540 Addsec*
13541 \family default
13542 : behave exactly as 
13543 \family sans
13544 Addchap
13545 \family default
13546  and 
13547 \family sans
13548 Addsec
13549 \family default
13550 , resp., additionally clearing running heads.
13551  
13552 \family sans
13553 Addchap*
13554 \family default
13555  is not contained in 
13556 \emph on
13557 article (koma-script)
13558 \emph default
13559 .
13560 \begin_inset Foot
13561 status collapsed
13562
13563 \begin_layout Plain Layout
13564 There is also an 
13565 \family typewriter
13566
13567 \backslash
13568 addpart*
13569 \family default
13570  command in 
13571 \emph on
13572 book (koma-script)
13573 \emph default
13574  and in 
13575 \emph on
13576 report (koma-script)
13577 \emph default
13578 , but since this is identical to 
13579 \family sans
13580 Part*
13581 \family default
13582 , is has not been implemented in LyX.
13583 \end_layout
13584
13585 \end_inset
13586
13587
13588 \end_layout
13589
13590 \begin_layout Itemize
13591
13592 \family sans
13593 Minisec
13594 \family default
13595 : generates a heading directly above the following paragraph in the standard
13596  character size without affecting the structure of the document.
13597 \end_layout
13598
13599 \begin_layout Itemize
13600
13601 \family sans
13602 Captionabove
13603 \family default
13604  and 
13605 \family sans
13606 Captionbelow
13607 \family default
13608  are special captions which respect the different space settings needed
13609  for captions placed above or below an element (if you follow strict typographic
13610  rules, you might want to place table captions always above the table).
13611  You can also use the class option 
13612 \family typewriter
13613 tablecaptionsabove
13614 \family default
13615 , which will switch 
13616 \family sans
13617 caption
13618 \family default
13619  to 
13620 \family sans
13621 captionabove
13622 \family default
13623  for tables and 
13624 \family sans
13625 captionbelow
13626 \family default
13627  for figures.
13628  You need at least Koma-Script version 2.8q to use this.
13629 \end_layout
13630
13631 \begin_layout Itemize
13632
13633 \family sans
13634 Dictum
13635 \family default
13636 : can be used to set a bonmot, e.
13637 \begin_inset space \thinspace{}
13638 \end_inset
13639
13640 g.
13641 \begin_inset space \space{}
13642 \end_inset
13643
13644 at the beginning of a chapter.
13645  If you use the optional argument (
13646 \family sans
13647 Insert\SpecialChar \menuseparator
13648 Short
13649 \begin_inset space ~
13650 \end_inset
13651
13652 Title
13653 \family default
13654 ), you can insert the dictum's author there.
13655  Dictum and author are separated by a line.
13656  You need at least Koma-Script version 2.8q to use this.
13657  
13658 \family sans
13659 Dictum
13660 \family default
13661  is not contained in 
13662 \emph on
13663 article (koma-script)
13664 \emph default
13665 .
13666 \end_layout
13667
13668 \begin_layout Standard
13669 The following types, together with the standard types 
13670 \family sans
13671 Title
13672 \family default
13673
13674 \family sans
13675 Author
13676 \family default
13677 , and 
13678 \family sans
13679 Date
13680 \family default
13681 , form the title area of the document.
13682  They must be entered ahead of the first 
13683 \begin_inset Quotes eld
13684 \end_inset
13685
13686 ordinary
13687 \begin_inset Quotes erd
13688 \end_inset
13689
13690  paragraph.
13691 \begin_inset Foot
13692 status collapsed
13693
13694 \begin_layout Plain Layout
13695 The corresponding LaTeX commands must appear before the 
13696 \family typewriter
13697
13698 \backslash
13699 maketitle
13700 \family default
13701  command.
13702 \end_layout
13703
13704 \end_inset
13705
13706  When such a type is used more than once, the latter usage overwrites the
13707  former one, that means, for every type only the latest usage is valid.
13708  The order of the different types however has, like 
13709 \family sans
13710 Title
13711 \family default
13712
13713 \family sans
13714 Author
13715 \family default
13716 , and 
13717 \family sans
13718 Date
13719 \family default
13720 , no effect on the appearance of the produced document.
13721 \end_layout
13722
13723 \begin_layout Itemize
13724
13725 \family sans
13726 Subject
13727 \family default
13728 : produces a centered paragraph above the ordinary title (
13729 \family sans
13730 Title
13731 \family default
13732
13733 \family sans
13734 Author
13735 \family default
13736
13737 \family sans
13738 Date
13739 \family default
13740 ) for the subject of the document.
13741 \end_layout
13742
13743 \begin_layout Itemize
13744
13745 \family sans
13746 Publishers
13747 \family default
13748 : produces a centered paragraph below the ordinary title (
13749 \family sans
13750 Title
13751 \family default
13752
13753 \family sans
13754 Author
13755 \family default
13756
13757 \family sans
13758 Date
13759 \family default
13760 ) for the publishers' name.
13761 \end_layout
13762
13763 \begin_layout Itemize
13764
13765 \family sans
13766 Dedication
13767 \family default
13768 : in 
13769 \emph on
13770 report (koma-script)
13771 \emph default
13772  and 
13773 \emph on
13774 book (koma-script)
13775 \emph default
13776  produces a centered paragraph on its own page behind the title page, or
13777  in 
13778 \emph on
13779 article (koma-script)
13780 \emph default
13781  produces a centered paragraph below the ordinary title (
13782 \family sans
13783 Title
13784 \family default
13785
13786 \family sans
13787 Author
13788 \family default
13789
13790 \family sans
13791 Date
13792 \family default
13793
13794 \family sans
13795 Publishers
13796 \family default
13797 ) for a dedication.
13798 \end_layout
13799
13800 \begin_layout Itemize
13801
13802 \family sans
13803 Titlehead
13804 \family default
13805 : produces a left aligned paragraph above the ordinary title (
13806 \family sans
13807 Title
13808 \family default
13809
13810 \family sans
13811 Author
13812 \family default
13813
13814 \family sans
13815 Date
13816 \family default
13817
13818 \family sans
13819 Subject
13820 \family default
13821 ) for a document`s head.
13822 \end_layout
13823
13824 \begin_layout Itemize
13825
13826 \family sans
13827 Uppertitleback
13828 \family default
13829 : produces in a double-sided print in 
13830 \emph on
13831 report (koma-script)
13832 \emph default
13833  and 
13834 \emph on
13835 book (koma-script)
13836 \emph default
13837  a left-aligned paragraph at the top of the title page`s back or has no
13838  effect in a single-sided print or in 
13839 \emph on
13840 article (koma-script)
13841 \emph default
13842 .
13843 \end_layout
13844
13845 \begin_layout Itemize
13846
13847 \family sans
13848 Lowertitleback
13849 \family default
13850 : produces in a double-sided print in 
13851 \emph on
13852 report (koma-script)
13853 \emph default
13854  and 
13855 \emph on
13856 book (koma-script)
13857 \emph default
13858  a left-aligned paragraph at the bottom of the title page`s back or has
13859  no effect in a single-sided print or in 
13860 \emph on
13861 article (koma-script)
13862 \emph default
13863 .
13864 \end_layout
13865
13866 \begin_layout Itemize
13867
13868 \family sans
13869 Extratitle
13870 \family default
13871 : produces a special 
13872 \begin_inset Quotes eld
13873 \end_inset
13874
13875 dirty
13876 \begin_inset Quotes erd
13877 \end_inset
13878
13879  page ahead of the actual document containing a paragraph without special
13880  formatting.
13881 \end_layout
13882
13883 \begin_layout Standard
13884 The layout files for the document classes 
13885 \emph on
13886 article (koma-script)
13887 \emph default
13888
13889 \emph on
13890 report (koma-script)
13891 \emph default
13892 , and 
13893 \emph on
13894 book (koma-script)
13895 \emph default
13896  do include the file 
13897 \family typewriter
13898 scrmacros.inc
13899 \family default
13900 .
13901  This is thought of as a place to define your own types.
13902  Copy scrmacros
13903 \family typewriter
13904 .inc
13905 \family default
13906  in your personal layout directory and edit the file!
13907 \end_layout
13908
13909 \begin_layout Subsection
13910 letter (koma-script)
13911 \end_layout
13912
13913 \begin_layout Standard
13914 \begin_inset ERT
13915 status open
13916
13917 \begin_layout Plain Layout
13918
13919
13920 \backslash
13921 begin{sloppypar}
13922 \end_layout
13923
13924 \end_inset
13925
13926
13927 \end_layout
13928
13929 \begin_layout Standard
13930 \noindent
13931 The document class 
13932 \emph on
13933 letter (koma-script)
13934 \emph default
13935  is implemented in the layout file 
13936 \family typewriter
13937 scrlettr.layout
13938 \family default
13939 .
13940  It contains all the paragraph types of the corresponding standard document
13941  class 
13942 \emph on
13943 letter
13944 \emph default
13945 , partly modified, with the exception of the LyX specific types 
13946 \family sans
13947 LyX-Code
13948 \family default
13949  and 
13950 \family sans
13951 Comment
13952 \family default
13953  and the 
13954 \family sans
13955 List
13956 \family default
13957  type, which is replaced by the new 
13958 \family sans
13959 Labeling
13960 \family default
13961  type.
13962  In addition, it contains, in contrast to the standard document class, the
13963  standard types 
13964 \family sans
13965 LaTeX
13966 \family default
13967
13968 \family sans
13969 Quotation
13970 \family default
13971
13972 \family sans
13973 Quote
13974 \family default
13975 , and 
13976 \family sans
13977 Verse
13978 \family default
13979 .
13980  Furthermore, there are a number of new letter specific types.
13981 \end_layout
13982
13983 \begin_layout Standard
13984 \begin_inset ERT
13985 status open
13986
13987 \begin_layout Plain Layout
13988
13989
13990 \backslash
13991 end{sloppypar}
13992 \end_layout
13993
13994 \end_inset
13995
13996
13997 \end_layout
13998
13999 \begin_layout Standard
14000 The appearance of the letter produced by this document class can be controlled
14001  by a number of LaTeX commands, which you can put in the LaTeX preamble.
14002 \begin_inset Foot
14003 status collapsed
14004
14005 \begin_layout Plain Layout
14006 For example, the standard appearance of the letter`s heading, consisting
14007  of name and address, is quite self-willed.
14008  An 
14009 \begin_inset Quotes eld
14010 \end_inset
14011
14012 ordinary
14013 \begin_inset Quotes erd
14014 \end_inset
14015
14016  heading is produced by the following LaTeX commands in the preamble:
14017 \end_layout
14018
14019 \begin_layout LyX-Code
14020
14021 \backslash
14022 firsthead{
14023 \backslash
14024 parbox[b]{
14025 \backslash
14026 textwidth}
14027 \end_layout
14028
14029 \begin_layout LyX-Code
14030   {
14031 \backslash
14032 ignorespaces 
14033 \backslash
14034 fromname
14035 \backslash
14036
14037 \backslash
14038  
14039 \backslash
14040 ignorespaces 
14041 \backslash
14042 fromaddress}} 
14043 \end_layout
14044
14045 \begin_layout LyX-Code
14046
14047 \backslash
14048 nexthead{
14049 \backslash
14050 parbox[b]{
14051 \backslash
14052 textwidth}
14053 \end_layout
14054
14055 \begin_layout LyX-Code
14056   {
14057 \backslash
14058 ignorespaces 
14059 \backslash
14060 fromname 
14061 \backslash
14062 hfill 
14063 \backslash
14064 ignorespaces 
14065 \backslash
14066 pagename
14067 \backslash
14068  
14069 \backslash
14070 thepage}}
14071 \end_layout
14072
14073 \end_inset
14074
14075  A detailed German description of such LaTeX commands can be found in the
14076  Koma-Script documentation 
14077 \emph on
14078 scrguide
14079 \emph default
14080 .
14081  With it, the letter's author can produce his personal letter layout.
14082 \end_layout
14083
14084 \begin_layout Standard
14085 The types 
14086 \family sans
14087 Letter
14088 \family default
14089  and 
14090 \family sans
14091 Opening
14092 \family default
14093  define the beginning of the letter and must be used in every letter.
14094  To emphasize them in the LyX document class, they are marked with the letter
14095  
14096 \shape italic
14097 L
14098 \shape default
14099  or 
14100 \shape italic
14101 O
14102 \shape default
14103 , resp.
14104 \begin_inset space ~
14105 \end_inset
14106
14107 in the left margin.
14108  It is possible to write any number of letters in one file.
14109  An 
14110 \family sans
14111 Opening
14112 \family default
14113  type produces a new letter using the same addressee and a 
14114 \family sans
14115 Letter
14116 \family default
14117  type produces a new addressee.
14118  The types 
14119 \family sans
14120 Closing
14121 \family default
14122
14123 \family sans
14124 PS
14125 \family default
14126
14127 \family sans
14128 CC
14129 \family default
14130 , and 
14131 \family sans
14132 Encl
14133 \family default
14134  are ordinary paragraph types and can also be used several times in one
14135  and the same letter.
14136 \end_layout
14137
14138 \begin_layout Itemize
14139
14140 \family sans
14141 Letter
14142 \family default
14143 : produces a paragraph for the addressee and implicitly defines the beginning
14144  of the letter.
14145 \end_layout
14146
14147 \begin_layout Itemize
14148
14149 \family sans
14150 Opening
14151 \family default
14152 : produces a paragraph for the form of address and implicitly produces a
14153  new letter.
14154 \end_layout
14155
14156 \begin_layout Itemize
14157
14158 \family sans
14159 Closing
14160 \family default
14161 : produces a paragraph for a close.
14162 \end_layout
14163
14164 \begin_layout Itemize
14165
14166 \family sans
14167 PS
14168 \family default
14169 : produces a paragraph for a postscript.
14170 \end_layout
14171
14172 \begin_layout Itemize
14173
14174 \family sans
14175 CC
14176 \family default
14177 : produces a paragraph for a distribution list.
14178 \end_layout
14179
14180 \begin_layout Itemize
14181
14182 \family sans
14183 Encl
14184 \family default
14185 : produces a paragraph for enclosures.
14186 \end_layout
14187
14188 \begin_layout Standard
14189 The types 
14190 \family sans
14191 Name
14192 \family default
14193
14194 \family sans
14195 Signature
14196 \family default
14197
14198 \family sans
14199 Address
14200 \family default
14201
14202 \family sans
14203 Telephone
14204 \family default
14205
14206 \family sans
14207 Place
14208 \family default
14209
14210 \family sans
14211 Backaddress
14212 \family default
14213
14214 \family sans
14215 Specialmail
14216 \family default
14217
14218 \family sans
14219 Location
14220 \family default
14221
14222 \family sans
14223 Title
14224 \family default
14225 , and 
14226 \family sans
14227 Subject
14228 \family default
14229  are input types provided with a label to enter information, which will
14230  be processed by the document class.
14231 \begin_inset Foot
14232 status open
14233
14234 \begin_layout Plain Layout
14235 It could be seen as a matter of inconsequence, that the types 
14236 \family sans
14237 Letter
14238 \family default
14239  and 
14240 \family sans
14241 Opening
14242 \family default
14243  described above are not such input types as well.
14244  Because of the special meaning of those types, however, I have implemented
14245  them as ordinary paragraph types with a one letter mark in the left margin.
14246  Moreover, it would affect my feeling of symmetry, if the 
14247 \family sans
14248 Opening
14249 \family default
14250  type and the 
14251 \family sans
14252 Closing
14253 \family default
14254  type had such a serious different appearance.
14255 \end_layout
14256
14257 \end_inset
14258
14259  The types must be used ahead of the corresponding 
14260 \family sans
14261 Opening
14262 \family default
14263  type.
14264 \end_layout
14265
14266 \begin_layout Standard
14267 An implementation of these types in a WYSIWYG fashion does not seem to make
14268  sense, because the real appearance of the produced letter does not only
14269  depend on the usage of the particular type, but also on other factors.
14270  For example, a signature entered in the 
14271 \family sans
14272 Signature
14273 \family default
14274  type will in the standard behavior appear in the produced letter only,
14275  when in the same letter also a 
14276 \family sans
14277 Closing
14278 \family default
14279  type is used.
14280  The entered value of the 
14281 \family sans
14282 Telephone
14283 \family default
14284  type will in the standard behavior not appear in the produced letter at
14285  all.
14286  The possibility to design the letter`s heading freely is already indicated
14287  in a footnote above.
14288 \end_layout
14289
14290 \begin_layout Standard
14291 The input types can also be used as empty paragraphs.
14292  This makes sense e.
14293 \begin_inset space \thinspace{}
14294 \end_inset
14295
14296 g.
14297 \begin_inset space \space{}
14298 \end_inset
14299
14300 for the 
14301 \family sans
14302 Signature
14303 \family default
14304  type.
14305  If the 
14306 \family sans
14307 Signature
14308 \family default
14309  type is not used at all, in the standard behavior the value of the 
14310 \family sans
14311 Name
14312 \family default
14313  type is used as signature, whereas if an empty 
14314 \family sans
14315 Signature
14316 \family default
14317  type is used, no signature value is defined.
14318 \end_layout
14319
14320 \begin_layout Standard
14321 By using the input types it is possible to write a letter template, containing
14322  filled input types with your personal dates (name, address, etc.) and empty
14323  input types for other dates you want to enter.
14324 \end_layout
14325
14326 \begin_layout Itemize
14327
14328 \family sans
14329 Name
14330 \family default
14331 : sender's name, in the standard behavior appears as a centered paragraph
14332  in small caps in the letter`s heading.
14333 \end_layout
14334
14335 \begin_layout Itemize
14336
14337 \family sans
14338 Signature
14339 \family default
14340 : sender's signature, in the standard behavior appears below the 
14341 \family sans
14342 Closing
14343 \family default
14344  type.
14345  If no 
14346 \family sans
14347 Signature
14348 \family default
14349  type is used, the value of the 
14350 \family sans
14351 Name
14352 \family default
14353  type appears instead.
14354 \end_layout
14355
14356 \begin_layout Itemize
14357
14358 \family sans
14359 Address
14360 \family default
14361 : sender's address, in the standard behavior appears in a centered paragraph
14362  in the letter`s heading below the sender's name.
14363 \end_layout
14364
14365 \begin_layout Itemize
14366
14367 \family sans
14368 Telephone
14369 \family default
14370 : sender's telephone number, in the standard behavior only sets the LaTeX
14371  variable 
14372 \family typewriter
14373
14374 \backslash
14375 telephonenum
14376 \family default
14377 .
14378 \end_layout
14379
14380 \begin_layout Itemize
14381
14382 \family sans
14383 Place
14384 \family default
14385 : place of the letter`s making.
14386 \end_layout
14387
14388 \begin_layout Itemize
14389
14390 \family sans
14391 Date
14392 \family default
14393 : date of the letter`s making.
14394  
14395 \family sans
14396 Place
14397 \family default
14398  and 
14399 \family sans
14400 Date
14401 \family default
14402 , in the standard behavior, produce the place and the date in a right-aligned
14403  line below the addressee's field.
14404  If an empty 
14405 \family sans
14406 Date
14407 \family default
14408  type is used, neither place nor date appear, independent of the value of
14409  the 
14410 \family sans
14411 Place
14412 \family default
14413  type.
14414  If no 
14415 \family sans
14416 Date
14417 \family default
14418  type is used, the date of the letter `s production is used.
14419 \end_layout
14420
14421 \begin_layout Itemize
14422
14423 \family sans
14424 Backaddress
14425 \family default
14426 : sender`s back address, in the standard behavior appears above the addressee's
14427  field in a small sans serif font.
14428 \end_layout
14429
14430 \begin_layout Itemize
14431
14432 \family sans
14433 Specialmail
14434 \family default
14435 : special mail information, in the standard behavior appears underlined
14436  above the addressee's field below the back address.
14437 \end_layout
14438
14439 \begin_layout Itemize
14440
14441 \family sans
14442 Location
14443 \family default
14444 : additional information, in the standard behavior appears on right side
14445  below the addressee`s field.
14446 \end_layout
14447
14448 \begin_layout Itemize
14449
14450 \family sans
14451 Title
14452 \family default
14453 : the letter's title, in the standard behavior appears in a big, bold, sans
14454  serif font above the subject.
14455 \end_layout
14456
14457 \begin_layout Itemize
14458
14459 \family sans
14460 Subject
14461 \family default
14462 : the letter's subject, in the standard behavior appears in a bold font
14463  above the 
14464 \family sans
14465 Opening
14466 \family default
14467  paragraph.
14468 \end_layout
14469
14470 \begin_layout Standard
14471 The types 
14472 \family sans
14473 Yourref
14474 \family default
14475
14476 \family sans
14477 Yourmail
14478 \family default
14479
14480 \family sans
14481 Myref
14482 \family default
14483
14484 \family sans
14485 Customer
14486 \family default
14487 , and 
14488 \family sans
14489 Invoice
14490 \family default
14491  produce a business letter like line above the 
14492 \family sans
14493 Title
14494 \family default
14495  line containing the fields 
14496 \begin_inset Quotes eld
14497 \end_inset
14498
14499 Your ref.
14500 \begin_inset Quotes erd
14501 \end_inset
14502
14503
14504 \begin_inset Quotes eld
14505 \end_inset
14506
14507 Your letter of
14508 \begin_inset Quotes erd
14509 \end_inset
14510
14511
14512 \begin_inset Quotes eld
14513 \end_inset
14514
14515 Our ref.
14516 \begin_inset Quotes erd
14517 \end_inset
14518
14519
14520 \begin_inset Quotes eld
14521 \end_inset
14522
14523 Customer no.
14524 \begin_inset Quotes erd
14525 \end_inset
14526
14527
14528 \begin_inset Quotes eld
14529 \end_inset
14530
14531 Invoice no.
14532 \begin_inset Quotes erd
14533 \end_inset
14534
14535 , and 
14536 \begin_inset Quotes eld
14537 \end_inset
14538
14539 Date
14540 \begin_inset Quotes erd
14541 \end_inset
14542
14543 .
14544  For the date field, the value of the 
14545 \family sans
14546 Date
14547 \family default
14548  type is used.
14549  If one of these 
14550 \begin_inset Quotes eld
14551 \end_inset
14552
14553 business letter types
14554 \begin_inset Quotes erd
14555 \end_inset
14556
14557  is used, the value of the 
14558 \family sans
14559 Place
14560 \family default
14561  type however does not appear, but only the LaTeX variable 
14562 \family typewriter
14563
14564 \backslash
14565 fromplace
14566 \family default
14567  is set.
14568  The ordinary output of place and date in a right-aligned line below the
14569  addressee`s field is suppressed.
14570  The types are implemented as input types provided with a label and must
14571  be used ahead of the corresponding 
14572 \family sans
14573 Opening
14574 \family default
14575  type.
14576 \end_layout
14577
14578 \begin_layout Itemize
14579
14580 \family sans
14581 Yourref
14582 \family default
14583 : Your ref.
14584 \end_layout
14585
14586 \begin_layout Itemize
14587
14588 \family sans
14589 Yourmail
14590 \family default
14591 : Your letter of.
14592 \end_layout
14593
14594 \begin_layout Itemize
14595
14596 \family sans
14597 Myref
14598 \family default
14599 : Our ref.
14600 \end_layout
14601
14602 \begin_layout Itemize
14603
14604 \family sans
14605 Customer
14606 \family default
14607 : Customer no.
14608 \end_layout
14609
14610 \begin_layout Itemize
14611
14612 \family sans
14613 Invoice
14614 \family default
14615 : Invoice no.
14616 \end_layout
14617
14618 \begin_layout Subsection
14619 The new letter class: letter (koma-script v.2)
14620 \end_layout
14621
14622 \begin_layout Standard
14623 by 
14624 \noun on
14625 Jürgen Spitzmüller
14626 \end_layout
14627
14628 \begin_layout Standard
14629 \begin_inset VSpace medskip
14630 \end_inset
14631
14632
14633 \end_layout
14634
14635 \begin_layout Standard
14636 \noindent
14637 Koma-Script version 2.8 has introduced a new letter class 
14638 \family typewriter
14639 scrlttr2
14640 \family default
14641  which supersedes the now unsupported 
14642 \family typewriter
14643 scrlettr
14644 \family default
14645 .
14646  It has — on the LaTeX side — a completely new interface and is not compatible
14647  with the old class.
14648  Therefore, LyX supports both, though it is recommended you use the new
14649  class.
14650 \end_layout
14651
14652 \begin_layout Standard
14653 This class covers the same functionality as 
14654 \emph on
14655 letter (koma-script),
14656 \emph default
14657  and a few more.
14658  The basic items are 
14659 \family sans
14660 Address
14661 \family default
14662  (receiver's address, same as 
14663 \family sans
14664 Letter
14665 \family default
14666  in the old layout), 
14667 \family sans
14668 Opening
14669 \family default
14670 , and 
14671 \family sans
14672 Closing
14673 \family default
14674 .
14675  
14676 \family sans
14677 NextAddress
14678 \family default
14679  will start a new letter (i.
14680 \begin_inset space \thinspace{}
14681 \end_inset
14682
14683 g.
14684 \begin_inset space \space{}
14685 \end_inset
14686
14687 you can write several letters per document).
14688  New elements are sender's 
14689 \family sans
14690 E-Mail
14691 \family default
14692
14693 \family sans
14694 URL
14695 \family default
14696
14697 \family sans
14698 Fax
14699 \family default
14700
14701 \family sans
14702 Bank
14703 \family default
14704  and the possibility to use a 
14705 \family sans
14706 Logo
14707 \family default
14708  (via 
14709 \family sans
14710 Insert\SpecialChar \menuseparator
14711 Graphics
14712 \family default
14713 ) in the header.
14714 \end_layout
14715
14716 \begin_layout Standard
14717 The biggest improvement is, though, that the letter's layout is configurable
14718  to meet almost any needs.
14719  This can be done via the preamble or with a special style file (Letter
14720  Class Option, extension 
14721 \family typewriter
14722 *.lco
14723 \family default
14724 ), that will be read in as a class option.
14725 \begin_inset Foot
14726 status collapsed
14727
14728 \begin_layout Plain Layout
14729 The KOMA package comes with some default 
14730 \family typewriter
14731 *.lco
14732 \family default
14733  files.
14734  There is, for instance, a 
14735 \family typewriter
14736 DIN.lco
14737 \family default
14738  file that follows german typesetting rules, or a 
14739 \family typewriter
14740 KOMAold.lco
14741 \family default
14742  that provides the default layout of the old 
14743 \family typewriter
14744 scrlettr
14745 \family default
14746  class.
14747  The latter can be loaded with the class option 
14748 \family typewriter
14749 KOMAold
14750 \family default
14751 , inserted via the 
14752 \family sans
14753 \bar under
14754 L
14755 \bar default
14756 ayout\SpecialChar \menuseparator
14757
14758 \bar under
14759 D
14760 \bar default
14761 ocument\SpecialChar \menuseparator
14762 Extra Options
14763 \family default
14764  field.
14765 \end_layout
14766
14767 \end_inset
14768
14769  Have a look at the 
14770 \emph on
14771 koma-letter2
14772 \emph default
14773  template that is included in LyX for examples.
14774  A detailed description is to be found in the Koma-Script documentation
14775  (
14776 \emph on
14777 scrguide
14778 \emph default
14779 ).
14780 \end_layout
14781
14782 \begin_layout Subsection
14783 Problems
14784 \end_layout
14785
14786 \begin_layout Standard
14787 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14788  some problems.
14789 \end_layout
14790
14791 \begin_layout Itemize
14792 The chapter number of a 
14793 \family sans
14794 Chapter
14795 \family default
14796  type appears on a line of its own above the chapter heading instead of
14797  appearing in the same line ahead of it.
14798  The cause for that is the LyX internal behavior for the labeltype 
14799 \family sans
14800 Counter_Chapter
14801 \family default
14802  in the layout file.
14803 \end_layout
14804
14805 \begin_layout Itemize
14806 The headings of the types 
14807 \family sans
14808 Addchap
14809 \family default
14810  and 
14811 \family sans
14812 Addsec
14813 \family default
14814  are only put in the 
14815 \begin_inset Quotes eld
14816 \end_inset
14817
14818 true
14819 \begin_inset Quotes erd
14820 \end_inset
14821
14822  LaTeX table of contents, but not in the LyX table of contents (
14823 \family sans
14824 Document\SpecialChar \menuseparator
14825 Table
14826 \begin_inset space ~
14827 \end_inset
14828
14829 of
14830 \begin_inset space ~
14831 \end_inset
14832
14833 Contents
14834 \family default
14835 ).
14836 \end_layout
14837
14838 \begin_layout Itemize
14839 The paragraphs in a 
14840 \emph on
14841 letter
14842 \emph default
14843  document class appear in a skip separation mode, not indented.
14844  This is the standard behavior, no special LaTeX commands are needed for
14845  that.
14846  But in the 
14847 \family sans
14848 Document\SpecialChar \menuseparator
14849 Settings
14850 \family default
14851  dialog the corresponding radio button indicates 
14852 \family sans
14853 Indent
14854 \family default
14855 .
14856  A 
14857 \family sans
14858 Skip
14859 \family default
14860  value always has the effect that extra LaTeX commands are inserted in the
14861  document to produce the gap, which is not what is wanted in this case.
14862 \end_layout
14863
14864 \begin_layout Section
14865 Latex8 (IEEE Conference Papers)
14866 \end_layout
14867
14868 \begin_layout Standard
14869 by 
14870 \noun on
14871 Allan Rae
14872 \end_layout
14873
14874 \begin_layout Subsection
14875 Introduction
14876 \end_layout
14877
14878 \begin_layout Standard
14879 Since this class is specifically for writing submissions to IEEE sponsored
14880  conferences I strongly recommend that you get a copy of their Authors Kit.
14881  The 
14882 \family sans
14883 latex.sty
14884 \family default
14885  package and associated bibliography style file is included in the kit.
14886  The Authors Kit is usually sent out by email once your initial submission
14887  has been accepted.
14888  There is a lot of useful information in the Authors Kit explaining formatting
14889  restrictions and so on and I will assume you have read this since that
14890  means I don't have to repeat it all here.
14891 \end_layout
14892
14893 \begin_layout Subsection
14894 Getting Started
14895 \end_layout
14896
14897 \begin_layout Standard
14898 [AR\SpecialChar \@.
14899  more to come]
14900 \end_layout
14901
14902 \begin_layout Subsection
14903 Supported Environments
14904 \end_layout
14905
14906 \begin_layout Itemize
14907
14908 \family sans
14909 Standard
14910 \end_layout
14911
14912 \begin_layout Itemize
14913
14914 \family sans
14915 Title
14916 \end_layout
14917
14918 \begin_layout Itemize
14919
14920 \family sans
14921 Author
14922 \end_layout
14923
14924 \begin_layout Itemize
14925
14926 \family sans
14927 E-mail
14928 \end_layout
14929
14930 \begin_layout Itemize
14931
14932 \family sans
14933 Affiliation
14934 \end_layout
14935
14936 \begin_layout Itemize
14937
14938 \family sans
14939 Abstract
14940 \end_layout
14941
14942 \begin_layout Itemize
14943
14944 \family sans
14945 Section
14946 \end_layout
14947
14948 \begin_layout Itemize
14949
14950 \family sans
14951 SubSection
14952 \end_layout
14953
14954 \begin_layout Itemize
14955
14956 \family sans
14957 Caption
14958 \end_layout
14959
14960 \begin_layout Subsection
14961 Differences Between Screen and Paper
14962 \end_layout
14963
14964 \begin_layout Standard
14965 There are slight differences in appearance mainly with the presentation
14966  of section counters.
14967  On screen the trailing period of the section counter is missing but it
14968  will appear in the output so don't let this worry you.
14969 \end_layout
14970
14971 \begin_layout Section
14972 Memoir
14973 \end_layout
14974
14975 \begin_layout Standard
14976 By 
14977 \noun on
14978 Jürgen Spitzmüller
14979 \end_layout
14980
14981 \begin_layout Subsection
14982 Overview
14983 \end_layout
14984
14985 \begin_layout Standard
14986 Memoir is a very powerful and constantly evolving class.
14987  It has been designed with regard to fictional and non-fictional literature.
14988  Its aim is to let the user have maximum control over the typesetting of
14989  his document.
14990  Memoir is based on the standard book class, but it can also emulate the
14991  article class (see below).
14992 \end_layout
14993
14994 \begin_layout Standard
14995 Peter Wilson, the developer of Memoir, is known as the author of lots of
14996  useful packages in the LaTeX world.
14997  Most of them have been merged with Memoir.
14998  Therefore, it is much easier to layout the table of contents, appendices,
14999  chapter designs and such.
15000  LyX, though, does not support all of these goodies natively.
15001  Some of them might be added to forthcoming releases
15002 \begin_inset Foot
15003 status collapsed
15004
15005 \begin_layout Plain Layout
15006 You are invited to send suggestions to 
15007 \begin_inset Flex URL
15008 status collapsed
15009
15010 \begin_layout Plain Layout
15011
15012 lyx-devel@lists.lyx.org
15013 \end_layout
15014
15015 \end_inset
15016
15017 .
15018 \end_layout
15019
15020 \end_inset
15021
15022 , lots will probably never, due to the limitations of LyX's framework.
15023  Of course you can still use all features with the help of some native LaTeX
15024  commands (TeX code
15025 \begin_inset Foot
15026 status collapsed
15027
15028 \begin_layout Plain Layout
15029 Cf.
15030 \begin_inset ERT
15031 status collapsed
15032
15033 \begin_layout Plain Layout
15034
15035
15036 \backslash
15037  
15038 \end_layout
15039
15040 \end_inset
15041
15042 section
15043 \begin_inset space ~
15044 \end_inset
15045
15046
15047 \begin_inset CommandInset ref
15048 LatexCommand ref
15049 reference "sec:Inserting-TeX-Code"
15050
15051 \end_inset
15052
15053  for details.
15054 \end_layout
15055
15056 \end_inset
15057
15058 ).
15059  In this section, we can only list those features which are natively supported
15060  by LyX.
15061  For detailed descriptions (and for the rest of features) we recommend you
15062  have a look at the detailed manual of the Memoir class
15063 \begin_inset Foot
15064 status collapsed
15065
15066 \begin_layout Plain Layout
15067 Cf.
15068 \begin_inset ERT
15069 status collapsed
15070
15071 \begin_layout Plain Layout
15072
15073
15074 \backslash
15075  
15076 \end_layout
15077
15078 \end_inset
15079
15080
15081 \begin_inset Flex URL
15082 status collapsed
15083
15084 \begin_layout Plain Layout
15085
15086 CTAN:/macros/latex/memoir/memman.pdf
15087 \end_layout
15088
15089 \end_inset
15090
15091 .
15092 \end_layout
15093
15094 \end_inset
15095
15096 , which is not only a user guide for the class, but also both a comprehensive
15097  description on good typesetting and a superb example for good typesetting
15098  itself.
15099 \end_layout
15100
15101 \begin_layout Subsection
15102 Basic features and restrictions
15103 \end_layout
15104
15105 \begin_layout Standard
15106 Memoir supports basically all features of the standard book classes.
15107  There are, however, some differences, as follows:
15108 \end_layout
15109
15110 \begin_layout Description
15111 Font
15112 \begin_inset space ~
15113 \end_inset
15114
15115 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
15116 \end_layout
15117
15118 \begin_layout Description
15119 Page
15120 \begin_inset space ~
15121 \end_inset
15122
15123 style: The fancy page style is not supported, due to a command clash between
15124  Memoir and the fancyhdr package (they both define a command with the same
15125  name, which confuses LaTeX).
15126  Instead, Memoir comes with a number of its own page styles (see 
15127 \family sans
15128 Layout\SpecialChar \menuseparator
15129 Document\SpecialChar \menuseparator
15130 Page
15131 \begin_inset space ~
15132 \end_inset
15133
15134 Style
15135 \family default
15136 ).
15137  If you want to use these for the chapter pages, you have to use the command
15138  
15139 \family typewriter
15140
15141 \backslash
15142 chapterstyle
15143 \family default
15144  in the main text or in preamble (e.
15145 \begin_inset space \thinspace{}
15146 \end_inset
15147
15148 g.
15149 \begin_inset space \space{}
15150 \end_inset
15151
15152
15153 \family typewriter
15154
15155 \backslash
15156 chapterstyle{companion}
15157 \family default
15158 ).
15159 \end_layout
15160
15161 \begin_layout Description
15162 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
15163  optional argument in the standard classes.
15164  With this, you can specify an alternative version of the title for the
15165  table of contents and the headers (for instance, if the title is too long).
15166  In LyX, you can do this via 
15167 \family sans
15168 Insert\SpecialChar \menuseparator
15169 Short
15170 \begin_inset space ~
15171 \end_inset
15172
15173 Title
15174 \family default
15175  at the beginning of a chapter/section.
15176  Memoir features a second optional argument and thus separates the table
15177  of contents from the header.
15178  You can define three variants of a title with this: one for the main text,
15179  one for the table of contents, and one for the headers.
15180  Simply insert two optional arguments if you need this feature, the first
15181  one containing the short title for the Table of Contents, the second one
15182  containing an alternative short title for the headers.
15183 \end_layout
15184
15185 \begin_layout Description
15186 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
15187  of contents, the list of figures and the list of table start a new page
15188  automatically.
15189  Memoir does not follow this route.
15190  You have to insert a page break yourself, if you want to have one.
15191 \end_layout
15192
15193 \begin_layout Description
15194 Titlepage: For some unknown reason, Memoir uses pagination on the title
15195  page (in the standard classes, title pages are 
15196 \begin_inset Quotes eld
15197 \end_inset
15198
15199 empty
15200 \begin_inset Quotes erd
15201 \end_inset
15202
15203 , i.
15204 \begin_inset space \thinspace{}
15205 \end_inset
15206
15207 g.
15208 \begin_inset space \space{}
15209 \end_inset
15210
15211 without pagina).
15212  If you want an empty title page, type 
15213 \family typewriter
15214
15215 \backslash
15216 aliaspagestyle{title}{empty}
15217 \family default
15218  in the preamble.
15219 \end_layout
15220
15221 \begin_layout Description
15222 Article: With the class option 
15223 \emph on
15224 article
15225 \emph default
15226  (to be inserted in 
15227 \family sans
15228 Layout\SpecialChar \menuseparator
15229 Document\SpecialChar \menuseparator
15230 Extra
15231 \begin_inset space ~
15232 \end_inset
15233
15234 Options
15235 \family default
15236 ), you can emulate article style.
15237  That is, counters (footnotes, figures, tables etc.) will not be reset on
15238  new chapters, chapters don't start a new page (but are—in contrary to 
15239 \begin_inset Quotes eld
15240 \end_inset
15241
15242 real
15243 \begin_inset Quotes erd
15244 \end_inset
15245
15246  article classes—still allowed), parts, though, use their own page, as in
15247  book.
15248 \end_layout
15249
15250 \begin_layout Description
15251 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
15252  font commands, which have been used in the old LaTeX version 2.09 (e.
15253 \begin_inset space \thinspace{}
15254 \end_inset
15255
15256 g.
15257 \begin_inset space \space{}
15258 \end_inset
15259
15260
15261 \family typewriter
15262
15263 \backslash
15264 rm
15265 \family default
15266
15267 \family typewriter
15268
15269 \backslash
15270 it
15271 \family default
15272 ).
15273  It produces an error and stops LaTeX whenever such a command appears.
15274  The class option 
15275 \emph on
15276 oldfontcommands
15277 \emph default
15278  reallows the commands and spits out warnings instead (which does at least
15279  not stop LaTeX).
15280  Since a lot of packages and particularly BibTeX style files are still using
15281  those commands, we have decided to use this option by default.
15282 \end_layout
15283
15284 \begin_layout Subsection
15285 Extra features
15286 \end_layout
15287
15288 \begin_layout Standard
15289 We will only describe the features supported by LyX (which is not much currently
15290 ).
15291  Please consult the Memoir manual
15292 \begin_inset Foot
15293 status collapsed
15294
15295 \begin_layout Plain Layout
15296 Cf.
15297 \begin_inset ERT
15298 status collapsed
15299
15300 \begin_layout Plain Layout
15301
15302
15303 \backslash
15304  
15305 \end_layout
15306
15307 \end_inset
15308
15309
15310 \begin_inset Flex URL
15311 status collapsed
15312
15313 \begin_layout Plain Layout
15314
15315 CTAN:/macros/latex/memoir/memman.pdf
15316 \end_layout
15317
15318 \end_inset
15319
15320 .
15321 \end_layout
15322
15323 \end_inset
15324
15325  for details.
15326 \end_layout
15327
15328 \begin_layout Description
15329 Abstract: You may wonder why an abstract is an extra feature.
15330  Well, it is in book class.
15331  Usually books don't have abstracts.
15332  Memoir, however, has.
15333  You can use it wherever and how often you like.
15334 \end_layout
15335
15336 \begin_layout Description
15337 Chapterprecis: You may know this older typesetting style: The contents of
15338  a chapter are summarized below the title and also in the table of contents
15339  (e.
15340 \begin_inset space \thinspace{}
15341 \end_inset
15342
15343 g.
15344 \begin_inset space \space{}
15345 \end_inset
15346
15347
15348 \emph on
15349 Our hero arrives in Troia; he loses some friends; he finds others
15350 \emph default
15351 ).
15352  Chapterprecis does exactly this.
15353  It is therefore only sensible below a chapter.
15354 \end_layout
15355
15356 \begin_layout Description
15357 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
15358  The epigraph environment provides an elegant way of typesetting such a
15359  motto.
15360  The motto itself (text) and its author (source) are divided by a short
15361  line.
15362  Unfortunately, we have to fool LyX a bit here again, since the environment
15363  needs two arguments (text and source).
15364  In this case, we have to use curly brackets (in TeX mode) between the two
15365  arguments: 
15366 \emph on
15367 <smart slogan>
15368 \emph default
15369  
15370 \family typewriter
15371 }{
15372 \family default
15373  
15374 \emph on
15375 <author of the slogan>.
15376 \end_layout
15377
15378 \begin_layout Description
15379 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
15380  complex figurative poems).
15381  LyX can only support a few of them.
15382  One is poemtitle, which is a centered title for poems, which will also
15383  be added to the table of contents (verse is the standard environment for
15384  poems.
15385  Memoir has some enhanced versions of verse, but you need to use TeX code,
15386  because they have to be nested inside regular verse environments, which
15387  is not possible with LyX).
15388 \end_layout
15389
15390 \begin_layout Description
15391 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
15392 \end_layout
15393
15394 \begin_layout Section
15395 Article (mwart), book (mwbk) and report (mwrep)
15396 \begin_inset Argument
15397 status collapsed
15398
15399 \begin_layout Plain Layout
15400 The 
15401 \family typewriter
15402 mw
15403 \family default
15404  Classes
15405 \end_layout
15406
15407 \end_inset
15408
15409
15410 \end_layout
15411
15412 \begin_layout Standard
15413 by 
15414 \noun on
15415 Tomasz Luczak
15416 \end_layout
15417
15418 \begin_layout Standard
15419 The LyX document classes 
15420 \emph on
15421 article (mwart)
15422 \emph default
15423
15424 \emph on
15425 report (mwrep)
15426 \emph default
15427  and 
15428 \emph on
15429 book
15430 \emph default
15431  
15432 \emph on
15433 (mwbk)
15434 \emph default
15435  correspond to the LaTeX document classes 
15436 \family typewriter
15437 mwart.cls
15438 \family default
15439
15440 \family typewriter
15441 mwrep.cls
15442 \family default
15443  and 
15444 \family typewriter
15445 mwbk.cls
15446 \family default
15447 , resp.
15448  They are replacements for the standard document classes 
15449 \family typewriter
15450 article.cls
15451 \family default
15452
15453 \family typewriter
15454 report.cls
15455 \family default
15456  and 
15457 \family typewriter
15458 book.cls
15459 \family default
15460 , resp., and fit better to Polish typography conventions in a number of points.
15461  
15462 \end_layout
15463
15464 \begin_layout Standard
15465 Basic differences:
15466 \end_layout
15467
15468 \begin_layout Itemize
15469 Unnumbered titles (with star, e.
15470 \begin_inset space \thinspace{}
15471 \end_inset
15472
15473 g.
15474 \begin_inset space \space{}
15475 \end_inset
15476
15477
15478 \family sans
15479 Section*
15480 \family default
15481 ) are added into table of contents,
15482 \end_layout
15483
15484 \begin_layout Itemize
15485 Additional page styles:
15486 \end_layout
15487
15488 \begin_deeper
15489 \begin_layout Description
15490 uheadings header with separated lines,
15491 \end_layout
15492
15493 \begin_layout Description
15494 myheadings custom header, contents headers via commands: 
15495 \family typewriter
15496
15497 \backslash
15498 markright
15499 \family default
15500  and 
15501 \family typewriter
15502
15503 \backslash
15504 markboth
15505 \family default
15506 ,
15507 \end_layout
15508
15509 \begin_layout Description
15510 myuheadings custom header with separated lines,
15511 \end_layout
15512
15513 \begin_layout Description
15514 outer page number is placed on outer side of page
15515 \end_layout
15516
15517 \end_deeper
15518 \begin_layout Itemize
15519 Options 
15520 \end_layout
15521
15522 \begin_deeper
15523 \begin_layout Description
15524 rmheadings serif titles — default,
15525 \end_layout
15526
15527 \begin_layout Description
15528 sfheadings sansserif titles,
15529 \end_layout
15530
15531 \begin_layout Description
15532 authortitle on title page first placed is author next title — default,
15533 \end_layout
15534
15535 \begin_layout Description
15536 titleauthor on title page first placed is title next author,
15537 \end_layout
15538
15539 \begin_layout Description
15540 withmarginpar reserve place on page for margins.
15541 \end_layout
15542
15543 \end_deeper
15544 \begin_layout Section
15545 Paper
15546 \end_layout
15547
15548 \begin_layout Standard
15549 The document class 
15550 \family sans
15551 paper
15552 \family default
15553  provides an alternative to the standard 
15554 \family sans
15555 article
15556 \family default
15557  class.
15558  It provides similar functionality, but you might prefer this layout with
15559  sans serif sections, headings, and more.
15560 \end_layout
15561
15562 \begin_layout Section
15563 RevTeX4
15564 \end_layout
15565
15566 \begin_layout Standard
15567 by 
15568 \noun on
15569 Amir Karger
15570 \end_layout
15571
15572 \begin_layout Standard
15573 \begin_inset VSpace bigskip
15574 \end_inset
15575
15576
15577 \end_layout
15578
15579 \begin_layout Standard
15580 \noindent
15581 The 
15582 \family sans
15583 Revtex
15584 \begin_inset space ~
15585 \end_inset
15586
15587 4
15588 \family default
15589  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15590 \begin_inset Formula $\beta$
15591 \end_inset
15592
15593  release of May, 1999) class.
15594 \end_layout
15595
15596 \begin_layout Standard
15597 LyX has a 
15598 \family sans
15599 Revtex
15600 \family default
15601  textclass, which works with RevTeX 3.1.
15602  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15603  That means that it doesn't interact very well with LyX, which requires
15604  LaTeX2e, although it has been kludged to work.
15605  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15606  LyX with the 
15607 \family sans
15608 RevTeX
15609 \begin_inset space ~
15610 \end_inset
15611
15612 4
15613 \family default
15614  textclass should also be pretty easy to use.
15615 \end_layout
15616
15617 \begin_layout Standard
15618 These documents are supposed to be used in 
15619 \emph on
15620 addition
15621 \emph default
15622  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15623  macros, and assume you'll know what to put in the preamble if necessary.
15624 \end_layout
15625
15626 \begin_layout Subsection
15627 Installation
15628 \end_layout
15629
15630 \begin_layout Standard
15631 All you need to do is install RevTeX 4, as described in the package's README
15632  file.
15633  The package can be found at The RevTeX 4 Web Site 
15634 \begin_inset Flex URL
15635 status collapsed
15636
15637 \begin_layout Plain Layout
15638
15639 http://publish.aps.org/revtex4/
15640 \end_layout
15641
15642 \end_inset
15643
15644 .
15645  Install it somewhere that LaTeX can see it.
15646  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15647  (i.
15648 \begin_inset space \thinspace{}
15649 \end_inset
15650
15651 g.
15652 \begin_inset space \space{}
15653 \end_inset
15654
15655 not the directory where you installed the class file.) Then, if you reconfigure
15656  LyX, it will find the class file and let you use the RevTeX4 textclass.
15657 \end_layout
15658
15659 \begin_layout Standard
15660 Probably the easiest way to get started is either to import a RevTeX 4 document
15661  using 
15662 \family typewriter
15663 tex2lyx
15664 \family default
15665 , or to use the 
15666 \family sans
15667 Revtex
15668 \begin_inset space ~
15669 \end_inset
15670
15671 4
15672 \family default
15673  template, found in the templates directory.
15674 \end_layout
15675
15676 \begin_layout Subsection
15677 Preamble Matter
15678 \end_layout
15679
15680 \begin_layout Standard
15681 Optional arguments to 
15682 \family typewriter
15683
15684 \backslash
15685 documentclass
15686 \family default
15687 , like 
15688 \begin_inset Quotes eld
15689 \end_inset
15690
15691 preprint
15692 \begin_inset Quotes erd
15693 \end_inset
15694
15695  and 
15696 \begin_inset Quotes eld
15697 \end_inset
15698
15699 aps
15700 \begin_inset Quotes erd
15701 \end_inset
15702
15703 , go in the 
15704 \family sans
15705 E
15706 \bar under
15707 x
15708 \bar default
15709 tra
15710 \begin_inset space ~
15711 \end_inset
15712
15713 Options
15714 \family default
15715  field in the 
15716 \family sans
15717 Document
15718 \begin_inset space ~
15719 \end_inset
15720
15721 Layout
15722 \family default
15723  dialog, as usual.
15724  Remember that in RevTeX, at least one optional argument is required! 
15725 \end_layout
15726
15727 \begin_layout Standard
15728 Other preamble matter, like 
15729 \family typewriter
15730
15731 \backslash
15732 draft
15733 \family default
15734  etc.
15735 \begin_inset space ~
15736 \end_inset
15737
15738 goes in the 
15739 \family sans
15740 LaTeX
15741 \begin_inset space ~
15742 \end_inset
15743
15744 Preamble
15745 \family default
15746  dialog, also as usual.
15747 \end_layout
15748
15749 \begin_layout Subsection
15750 Layouts
15751 \end_layout
15752
15753 \begin_layout Standard
15754 The layouts basically correspond to the commands in RevTeX4.0.
15755  For example, the Email layout corresponds to 
15756 \family typewriter
15757
15758 \backslash
15759 email{}
15760 \family default
15761 .
15762  Note that (at least as of RevTeX 4.0 Beta), the 
15763 \family sans
15764 Address
15765 \family default
15766  and 
15767 \family sans
15768 Affiliation
15769 \family default
15770  layouts are exactly equivalent, so you shouldn't need to use both.
15771 \begin_inset Foot
15772 status collapsed
15773
15774 \begin_layout Plain Layout
15775 In case you're curious, both were included so that 
15776 \family typewriter
15777 tex2lyx
15778 \family default
15779  would be able to translate both 
15780 \family typewriter
15781
15782 \backslash
15783 address
15784 \family default
15785  and 
15786 \family typewriter
15787
15788 \backslash
15789 affiliation
15790 \family default
15791 .
15792 \end_layout
15793
15794 \end_inset
15795
15796
15797 \end_layout
15798
15799 \begin_layout Subsection
15800 Important Notes
15801 \end_layout
15802
15803 \begin_layout Standard
15804 There are a couple of important unique aspects of RevTeX 4 which might cause
15805  bugs that will be even more confusing in LyX.
15806 \end_layout
15807
15808 \begin_layout Standard
15809 In RevTeX, the 
15810 \family typewriter
15811
15812 \backslash
15813 thanks
15814 \family default
15815  command goes 
15816 \emph on
15817 outside
15818 \emph default
15819  the 
15820 \family typewriter
15821
15822 \backslash
15823 author
15824 \family default
15825  command.
15826  The LyX equivalent is that there is a separate Thanks layout.
15827  Do 
15828 \emph on
15829 not
15830 \emph default
15831  write footnotes in the 
15832 \family sans
15833 Author
15834 \family default
15835  layout, or weird things may happen.
15836  See the RevTeX 4 documentation for more details.
15837 \end_layout
15838
15839 \begin_layout Standard
15840 Also, the 
15841 \family sans
15842 Author
15843 \begin_inset space ~
15844 \end_inset
15845
15846 Email
15847 \family default
15848
15849 \family sans
15850 Author
15851 \begin_inset space ~
15852 \end_inset
15853
15854 URL
15855 \family default
15856 , and 
15857 \family sans
15858 Thanks
15859 \family default
15860  layouts must be placed 
15861 \emph on
15862 in between
15863 \emph default
15864  the 
15865 \family sans
15866 Author
15867 \family default
15868  layout and the corresponding 
15869 \family sans
15870 Address
15871 \family default
15872  (or equivalent 
15873 \family sans
15874 Affiliation
15875 \family default
15876 ) layout.
15877  If you put the 
15878 \family sans
15879 Thanks
15880 \family default
15881  after the 
15882 \family sans
15883 Address
15884 \family default
15885 , the LaTeX won't compile.
15886 \end_layout
15887
15888 \begin_layout Subsection
15889 Drawbacks
15890 \end_layout
15891
15892 \begin_layout Standard
15893 The main problem with this layout is that you can't use the optional arguments
15894  to layouts like Email and Title.
15895  (The problem is not unique to this layout; you can't use optional arguments
15896  to the Section layouts either.) This means that after you export that file
15897  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15898  need to edit the LaTeX file with a text editor to add the optional arguments
15899  to set, e.
15900 \begin_inset space \thinspace{}
15901 \end_inset
15902
15903 g.
15904 \begin_inset space \space{}
15905 \end_inset
15906
15907 the running title for the page headers.
15908  Lacking these layouts makes the 
15909 \family typewriter
15910
15911 \backslash
15912 altaffiliation
15913 \family default
15914  (and the equivalent 
15915 \family typewriter
15916
15917 \backslash
15918 altaddress
15919 \family default
15920 ) useless, so the corresponding layouts don't exist, and will have to be
15921  added by hand.
15922 \begin_inset Foot
15923 status collapsed
15924
15925 \begin_layout Plain Layout
15926
15927 \emph on
15928 Note from JMarc:
15929 \emph default
15930  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15931  has not been updated yet to take advantage of it.
15932 \end_layout
15933
15934 \end_inset
15935
15936  
15937 \end_layout
15938
15939 \begin_layout Section
15940 Springer Journals (
15941 \family sans
15942 svjour
15943 \family default
15944 )
15945 \end_layout
15946
15947 \begin_layout Standard
15948 by 
15949 \noun on
15950 Martin Vermeer
15951 \end_layout
15952
15953 \begin_layout Subsection
15954 Description
15955 \end_layout
15956
15957 \begin_layout Standard
15958 These are the layout files for some of the journal formats used by Springer
15959  Verlag and listed on 
15960 \begin_inset Flex URL
15961 status collapsed
15962
15963 \begin_layout Plain Layout
15964
15965 http://www.springer.de/author/tex/help-journals.html
15966 \end_layout
15967
15968 \end_inset
15969
15970 , where you should also go to fetch the class files (yes, these are LaTeX2e
15971  now!).
15972  It is a modular system: the things common to all journals are implemented
15973  in 
15974 \family typewriter
15975 svjour.inc
15976 \family default
15977 , which journal-specific layout files (such as, e.
15978 \begin_inset space \thinspace{}
15979 \end_inset
15980
15981 g.
15982 \begin_inset space \space{}
15983 \end_inset
15984
15985
15986 \family typewriter
15987 svjog.layout
15988 \family default
15989  for Journal of Geodesy) can include.
15990 \end_layout
15991
15992 \begin_layout Standard
15993 This means that implementing support for any other Springer journal on this
15994  list is as simple as writing your own 
15995 \family typewriter
15996 sv
15997 \family default
15998 <myjournal>
15999 \family typewriter
16000 .layout
16001 \family default
16002  file following the outline given in 
16003 \family typewriter
16004 svjog.layout
16005 \family default
16006 .
16007  
16008 \end_layout
16009
16010 \begin_layout Standard
16011 It is reasonably well tested only for the Journal of Geodesy.
16012  
16013 \family typewriter
16014 svjour
16015 \family default
16016  and 
16017 \family typewriter
16018 svjog
16019 \family default
16020  come with the standard LyX distribution.
16021  Install the relevant class file (downloaded from Springer) in a proper
16022  directory, reconfigure LaTeX (in the teTeX case by running 
16023 \family typewriter
16024 texhash
16025 \family default
16026 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
16027  and it should work.
16028 \end_layout
16029
16030 \begin_layout Subsection
16031 New styles
16032 \end_layout
16033
16034 \begin_layout Standard
16035 A large number of theorem-like styles — 
16036 \family sans
16037 Claim, Conjecture,
16038 \family default
16039  
16040 \family sans
16041 \SpecialChar \ldots{}
16042 Theorem
16043 \family default
16044 .
16045 \end_layout
16046
16047 \begin_layout Standard
16048
16049 \family sans
16050 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
16051  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
16052 \family default
16053 .
16054  See the Springer class file documentation for details.
16055 \end_layout
16056
16057 \begin_layout Subsection
16058 Supported journals
16059 \end_layout
16060
16061 \begin_layout Itemize
16062
16063 \emph on
16064 Journal of Geodesy
16065 \emph default
16066
16067 \family typewriter
16068 svjog.layout
16069 \family default
16070  — Martin Vermeer
16071 \end_layout
16072
16073 \begin_layout Itemize
16074
16075 \emph on
16076 Probability Theory and Related Fields
16077 \emph default
16078
16079 \family typewriter
16080 svprobth.layout
16081 \family default
16082  — Jean-Marc Lasgouttes
16083 \end_layout
16084
16085 \begin_layout Standard
16086 Add your own, it isn't so hard!
16087 \end_layout
16088
16089 \begin_layout Subsection
16090 Credits
16091 \end_layout
16092
16093 \begin_layout Standard
16094 These files are partly based on the older 
16095 \family typewriter
16096 ejour2.layout
16097 \family default
16098 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
16099  file from Springer.
16100  All this, and the 
16101 \family typewriter
16102 ejour2
16103 \family default
16104  layout, are now defunct.
16105  Jean-Marc Lasgouttes helped out big in making me find my way around the
16106  LyX layout file mechanism.
16107 \end_layout
16108
16109 \begin_layout Subsection
16110 Bugs
16111 \end_layout
16112
16113 \begin_layout Standard
16114 Probably.
16115  But probably less than in the old hacked-LaTeX 
16116 \family typewriter
16117 ejour2
16118 \family default
16119 .
16120 \end_layout
16121
16122 \begin_layout Standard
16123 Limitations e.
16124 \begin_inset space \thinspace{}
16125 \end_inset
16126
16127 g.: does not display the number for theorem-like layouts, just #.
16128 \end_layout
16129
16130 \begin_layout Section
16131 Slides [aka 
16132 \noun on
16133 SliTeX
16134 \noun default
16135 ]
16136 \begin_inset CommandInset label
16137 LatexCommand label
16138 name "sec:slitex"
16139
16140 \end_inset
16141
16142
16143 \end_layout
16144
16145 \begin_layout Standard
16146 by 
16147 \noun on
16148 John Weiss
16149 \noun default
16150  
16151 \end_layout
16152
16153 \begin_layout Subsection
16154 Introduction
16155 \end_layout
16156
16157 \begin_layout Standard
16158 This section describes how to use LyX to make slides for overhead projectors.
16159  There are two document classes that can do this: the default slides class
16160  and the 
16161 \family sans
16162 FoilTeX
16163 \family default
16164  slides class.
16165  This section documents the former.
16166 \end_layout
16167
16168 \begin_layout Standard
16169 I'm going to say this again, nice and clear, so that there's no misunderstanding
16170 :
16171 \end_layout
16172
16173 \begin_layout Standard
16174 \begin_inset VSpace bigskip
16175 \end_inset
16176
16177
16178 \end_layout
16179
16180 \begin_layout Standard
16181 \align center
16182
16183 \size large
16184 This section documents the class 
16185 \begin_inset Quotes eld
16186 \end_inset
16187
16188
16189 \family sans
16190 slides (default)
16191 \family default
16192
16193 \begin_inset Quotes erd
16194 \end_inset
16195
16196  
16197 \emph on
16198 only.
16199 \end_layout
16200
16201 \begin_layout Standard
16202 \begin_inset VSpace bigskip
16203 \end_inset
16204
16205
16206 \end_layout
16207
16208 \begin_layout Standard
16209 If you're looking for the documentation for 
16210 \begin_inset Quotes eld
16211 \end_inset
16212
16213
16214 \family sans
16215 slides (FoilTeX)
16216 \family default
16217
16218 \begin_inset Quotes erd
16219 \end_inset
16220
16221 , check out section
16222 \begin_inset space ~
16223 \end_inset
16224
16225
16226 \begin_inset CommandInset ref
16227 LatexCommand ref
16228 reference "sec:foiltex"
16229
16230 \end_inset
16231
16232 .
16233  The 
16234 \family sans
16235 foils
16236 \family default
16237  class [
16238 \begin_inset Quotes eld
16239 \end_inset
16240
16241
16242 \family sans
16243 slides (FoilTeX)
16244 \family default
16245
16246 \begin_inset Quotes erd
16247 \end_inset
16248
16249 ] is actually somewhat better than the default 
16250 \family sans
16251 slides
16252 \family default
16253  class,
16254 \begin_inset Foot
16255 status collapsed
16256
16257 \begin_layout Plain Layout
16258 \SpecialChar \ldots{}
16259 or so I've been told repeatedly by its advocates.
16260  Having never used it, I have no idea if this claim is true or not.
16261 \end_layout
16262
16263 \end_inset
16264
16265  which this section documents.
16266 \end_layout
16267
16268 \begin_layout Standard
16269 This class is the LaTeX2e improvement of the old 
16270 \noun on
16271 SliTeX
16272 \noun default
16273  package.
16274  Every LaTeX2e distribution includes this class [which I'll just refer to
16275  as 
16276 \begin_inset Quotes eld
16277 \end_inset
16278
16279
16280 \family sans
16281 slides
16282 \family default
16283
16284 \begin_inset Quotes erd
16285 \end_inset
16286
16287  from now on], so you're bound to have it.
16288  As I noted earlier, there are other classes, such as 
16289 \family sans
16290 foils
16291 \family default
16292 , which also produce slides for overhead projectors and do a better job
16293  at it.
16294  However, there are some things which 
16295 \family sans
16296 slides
16297 \family default
16298  can do which the others can't, such as generate overlays.
16299  Read on to learn more!
16300 \end_layout
16301
16302 \begin_layout Subsection
16303 Getting Started
16304 \begin_inset CommandInset label
16305 LatexCommand label
16306 name "sec:slidesetup"
16307
16308 \end_inset
16309
16310
16311 \end_layout
16312
16313 \begin_layout Standard
16314 Obviously, to use this document class, you need to select 
16315 \begin_inset Quotes eld
16316 \end_inset
16317
16318
16319 \family sans
16320 slides (default)
16321 \family default
16322
16323 \begin_inset Quotes erd
16324 \end_inset
16325
16326  from the class list in the 
16327 \family sans
16328 Document\SpecialChar \menuseparator
16329 Settings
16330 \family default
16331  dialog.
16332  There are some other special things you should know about this class:
16333 \end_layout
16334
16335 \begin_layout Itemize
16336 Don't bother changing the options 
16337 \family sans
16338 Sides and Columns
16339 \family default
16340 .
16341  They're not supported by the 
16342 \family sans
16343 slides
16344 \family default
16345  class, anyways.
16346 \end_layout
16347
16348 \begin_layout Itemize
16349 The option 
16350 \family sans
16351 Page
16352 \begin_inset space ~
16353 \end_inset
16354
16355 style
16356 \family default
16357  behaves a bit differently for this class.
16358  The possible choices and what they do are as follows:
16359 \end_layout
16360
16361 \begin_deeper
16362 \begin_layout Description
16363
16364 \family sans
16365 plain
16366 \family default
16367  The final output contains page numbers in the lower right corner.
16368 \end_layout
16369
16370 \begin_layout Description
16371
16372 \family sans
16373 headings
16374 \family default
16375  Like 
16376 \family sans
16377 plain
16378 \family default
16379 , but also prints out any time markers you've put in.
16380  This is the default.
16381 \end_layout
16382
16383 \begin_layout Description
16384
16385 \family sans
16386 empty
16387 \family default
16388  The final output contains no page numbers, time markers, or alignment markers.
16389 \end_layout
16390
16391 \end_deeper
16392 \begin_layout Itemize
16393 The 
16394 \family sans
16395 slides
16396 \family default
16397  class has an extra option: 
16398 \family typewriter
16399 clock
16400 \family default
16401 .
16402  To use it, put 
16403 \begin_inset Quotes eld
16404 \end_inset
16405
16406
16407 \family typewriter
16408 clock
16409 \family default
16410
16411 \begin_inset Quotes erd
16412 \end_inset
16413
16414  in the extra class options.
16415 \end_layout
16416
16417 \begin_deeper
16418 \begin_layout Standard
16419 Using this options allows you to add time markers to 
16420 \family sans
16421 Note
16422 \family default
16423 s.
16424  See section
16425 \begin_inset space ~
16426 \end_inset
16427
16428
16429 \begin_inset CommandInset ref
16430 LatexCommand ref
16431 reference "sec:slideNote"
16432
16433 \end_inset
16434
16435  for more details.
16436 \end_layout
16437
16438 \end_deeper
16439 \begin_layout Standard
16440 You can also use the template file 
16441 \begin_inset Quotes eld
16442 \end_inset
16443
16444
16445 \family typewriter
16446 slides.lyx
16447 \family default
16448
16449 \begin_inset Quotes erd
16450 \end_inset
16451
16452  to automatically set up a document to use the 
16453 \family sans
16454 slides
16455 \family default
16456  class [using 
16457 \family sans
16458 File\SpecialChar \menuseparator
16459 New
16460 \begin_inset space ~
16461 \end_inset
16462
16463 from
16464 \begin_inset space ~
16465 \end_inset
16466
16467 Template
16468 \family default
16469  to open your new document].
16470  The template file also contains some examples of the special paragraph
16471  environments used by this class.
16472  I'll describe those next.
16473 \end_layout
16474
16475 \begin_layout Subsection
16476 Paragraph Environments
16477 \end_layout
16478
16479 \begin_layout Subsubsection
16480 Supported Environments
16481 \end_layout
16482
16483 \begin_layout Standard
16484 The first thing you'll notice when you start up a new 
16485 \family sans
16486 slides
16487 \family default
16488  document is the font size and type: it's the equivalent of the size 
16489 \begin_inset Quotes eld
16490 \end_inset
16491
16492
16493 \family sans
16494 Largest
16495 \family default
16496
16497 \begin_inset Quotes erd
16498 \end_inset
16499
16500  in the 
16501 \family sans
16502 Sans
16503 \begin_inset space ~
16504 \end_inset
16505
16506 Serif
16507 \family default
16508  font.
16509  This is also what's used in the output.
16510  Think of this as a 
16511 \begin_inset Quotes eld
16512 \end_inset
16513
16514 visual cue
16515 \begin_inset Quotes erd
16516 \end_inset
16517
16518  to remind you that this is a slide.
16519  Your final slides will use a larger font; ergo, you'll have less space.
16520  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16521 \end_layout
16522
16523 \begin_layout Standard
16524 The next thing that becomes obvious is the changes to the paragraph environment
16525  pull-down box [at the far-left end of the toolbar].
16526  Most of the paragraph environments you're used to seeing are missing.
16527  There are also five new ones.
16528  That's because the 
16529 \family sans
16530 slides
16531 \family default
16532  class itself only supports certain paragraph environments:
16533 \end_layout
16534
16535 \begin_layout Itemize
16536
16537 \family sans
16538 Standard
16539 \end_layout
16540
16541 \begin_layout Itemize
16542
16543 \family sans
16544 Itemize
16545 \end_layout
16546
16547 \begin_layout Itemize
16548
16549 \family sans
16550 Enumerate
16551 \end_layout
16552
16553 \begin_layout Itemize
16554
16555 \family sans
16556 Description
16557 \end_layout
16558
16559 \begin_layout Itemize
16560
16561 \family sans
16562 List
16563 \end_layout
16564
16565 \begin_layout Itemize
16566
16567 \family sans
16568 Quotation
16569 \end_layout
16570
16571 \begin_layout Itemize
16572
16573 \family sans
16574 Quote
16575 \end_layout
16576
16577 \begin_layout Itemize
16578
16579 \family sans
16580 Verse
16581 \end_layout
16582
16583 \begin_layout Itemize
16584
16585 \family sans
16586 Caption
16587 \end_layout
16588
16589 \begin_layout Itemize
16590
16591 \family sans
16592 LyX-Code
16593 \end_layout
16594
16595 \begin_layout Itemize
16596
16597 \family sans
16598 Comment
16599 \end_layout
16600
16601 \begin_layout Standard
16602 All of the other standard environments, including the section-heading environmen
16603 ts, aren't used in the 
16604 \family sans
16605 slides
16606 \family default
16607  class.
16608 \end_layout
16609
16610 \begin_layout Standard
16611 On the other hand, you'll notice the following new environments:
16612 \end_layout
16613
16614 \begin_layout Itemize
16615
16616 \family sans
16617 Slide
16618 \end_layout
16619
16620 \begin_layout Itemize
16621
16622 \family sans
16623 Overlay
16624 \end_layout
16625
16626 \begin_layout Itemize
16627
16628 \family sans
16629 Note
16630 \end_layout
16631
16632 \begin_layout Itemize
16633
16634 \family sans
16635 InvisibleText
16636 \end_layout
16637
16638 \begin_layout Itemize
16639
16640 \family sans
16641 VisibleText
16642 \end_layout
16643
16644 \begin_layout Standard
16645 These five are kind of quirky, due to a 
16646 \begin_inset Quotes eld
16647 \end_inset
16648
16649 feature
16650 \begin_inset Quotes erd
16651 \end_inset
16652
16653  in LyX.
16654  You see, LyX doesn't permit you to nest any other paragraph environment
16655  into an empty environment.
16656  Now, that's fine and dandy, but it means that you wouldn't be able to start
16657  a slide with anything except plain text.
16658  To deal with this, I've performed a little 
16659 \begin_inset Quotes eld
16660 \end_inset
16661
16662 LaTeX magic.
16663 \begin_inset Quotes erd
16664 \end_inset
16665
16666  
16667 \end_layout
16668
16669 \begin_layout Subsubsection
16670 Quirks of the New Environments
16671 \begin_inset CommandInset label
16672 LatexCommand label
16673 name "sec:slideQuirk"
16674
16675 \end_inset
16676
16677
16678 \end_layout
16679
16680 \begin_layout Standard
16681 All five of the new paragraph environments are somewhat quirky due to inherent
16682  limitiations in the current version of LyX.
16683  As I just mentioned, LyX forbids environments that begin with another environme
16684 nt.
16685  To get around this, the 
16686 \family sans
16687 Slide
16688 \family default
16689  environment isn't a paragraph environment as described in the 
16690 \emph on
16691 User's Guide
16692 \emph default
16693 .
16694  
16695 \end_layout
16696
16697 \begin_layout Standard
16698 You should consider 
16699 \family sans
16700 Slide
16701 \family default
16702
16703 \family sans
16704 Overlay
16705 \family default
16706 , and 
16707 \family sans
16708 Note
16709 \family default
16710  to be 
16711 \begin_inset Quotes eld
16712 \end_inset
16713
16714 pseudo-environments.
16715 \begin_inset Quotes erd
16716 \end_inset
16717
16718  They look like a section heading or a 
16719 \begin_inset Quotes eld
16720 \end_inset
16721
16722
16723 \family sans
16724 Caption
16725 \family default
16726 ,
16727 \begin_inset Quotes erd
16728 \end_inset
16729
16730  but really begin a [and, if necessary, end the previous] paragraph environment.
16731  Likewise, treat 
16732 \family sans
16733 InvisibleText
16734 \family default
16735  and 
16736 \family sans
16737 VisibleText
16738 \family default
16739  as 
16740 \begin_inset Quotes eld
16741 \end_inset
16742
16743 pseudo-commands.
16744 \begin_inset Quotes erd
16745 \end_inset
16746
16747  These two perform some action.
16748 \end_layout
16749
16750 \begin_layout Standard
16751 A common feature of all five environments, 
16752 \family sans
16753 Slide
16754 \family default
16755
16756 \family sans
16757 Overlay
16758 \family default
16759
16760 \family sans
16761 Note
16762 \family default
16763
16764 \family sans
16765 InvisibleText
16766 \family default
16767  and 
16768 \family sans
16769 VisibleText
16770 \family default
16771 , is a rather long-ish label.
16772  The text following this label — ordinarily the contents of the paragraph
16773  environment — is utterly irrelevant for 
16774 \family sans
16775 Slide
16776 \family default
16777
16778 \family sans
16779 Overlay
16780 \family default
16781
16782 \family sans
16783 Note
16784 \family default
16785
16786 \family sans
16787 InvisibleText
16788 \family default
16789  and 
16790 \family sans
16791 VisibleText
16792 \family default
16793 .
16794  LyX completely ignores it.
16795  In fact, you can leave these five environments completely empty.
16796  
16797 \end_layout
16798
16799 \begin_layout Standard
16800 While you don't 
16801 \emph on
16802 have
16803 \emph default
16804  to put any text after the rather long-ish label, you might want to.
16805  This could be a short description of the contents of the 
16806 \family sans
16807 Slide
16808 \family default
16809 , for example.
16810  In that case, enter your descriptive comment and hit 
16811 \family sans
16812 Return
16813 \family default
16814  as you normally would.
16815 \end_layout
16816
16817 \begin_layout Standard
16818 If, on the other hand, you don't want to enter any descriptive text, you'll
16819  hit another LyX quirk.
16820  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16821  environment until you put something in the old one.
16822  So, do this:
16823 \end_layout
16824
16825 \begin_layout Itemize
16826 Start entering the text that will 
16827 \emph on
16828 follow
16829 \emph default
16830  the new 
16831 \family sans
16832 Slide
16833 \family default
16834
16835 \family sans
16836 Overlay
16837 \family default
16838
16839 \family sans
16840 Note
16841 \family default
16842
16843 \family sans
16844 InvisibleText
16845 \family default
16846  or 
16847 \family sans
16848 VisibleText
16849 \family default
16850 .
16851  
16852 \end_layout
16853
16854 \begin_layout Itemize
16855 Now move to the beginning of that paragraph.
16856  
16857 \end_layout
16858
16859 \begin_layout Itemize
16860 Next, hit 
16861 \family sans
16862 Return
16863 \family default
16864 .
16865  
16866 \end_layout
16867
16868 \begin_layout Itemize
16869 Finally, change this new, empty paragraph to a 
16870 \family sans
16871 Slide
16872 \family default
16873
16874 \family sans
16875 Overlay
16876 \family default
16877
16878 \family sans
16879 Note
16880 \family default
16881
16882 \family sans
16883 InvisibleText
16884 \family default
16885  or 
16886 \family sans
16887 VisibleText
16888 \family default
16889 .
16890  
16891 \end_layout
16892
16893 \begin_layout Standard
16894 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16895
16896 \end_layout
16897
16898 \begin_layout Subsection
16899 Making a Presentation with 
16900 \family sans
16901 Slide
16902 \family default
16903
16904 \family sans
16905 Overlay
16906 \family default
16907  and 
16908 \family sans
16909 Note
16910 \end_layout
16911
16912 \begin_layout Subsubsection
16913 Using the 
16914 \family sans
16915 Slide
16916 \family default
16917  Environment
16918 \end_layout
16919
16920 \begin_layout Standard
16921 If you're expecting this section to teach you how to actually make a presentatio
16922 n, you'll be sorely disappointed.
16923  Naturally, I'll describe all of the ways the 
16924 \family sans
16925 slides
16926 \family default
16927  class can assist you in preparing the materials for a presentation.
16928  Filling in the contents, however, is up to you.
16929  [Then again, that 
16930 \emph on
16931 is
16932 \emph default
16933  the LyX philosophy.]
16934 \end_layout
16935
16936 \begin_layout Standard
16937 Choosing the 
16938 \family sans
16939 Slide
16940 \family default
16941  environment [in the manner described in section
16942 \begin_inset space ~
16943 \end_inset
16944
16945
16946 \begin_inset CommandInset ref
16947 LatexCommand ref
16948 reference "sec:slideQuirk"
16949
16950 \end_inset
16951
16952 ] tells LyX to begin a new slide [duh].
16953  The label for this environment/
16954 \begin_inset Quotes erd
16955 \end_inset
16956
16957 pseudo-command
16958 \begin_inset Quotes erd
16959 \end_inset
16960
16961  is an 
16962 \begin_inset Quotes eld
16963 \end_inset
16964
16965 ASCII line,
16966 \begin_inset Quotes erd
16967 \end_inset
16968
16969  in cool blue, followed by the label, 
16970 \begin_inset Quotes eld
16971 \end_inset
16972
16973 NewSlide:
16974 \begin_inset Quotes erd
16975 \end_inset
16976
16977 .
16978  Any text or paragraph environments that follow this one go on the new slide.
16979  It's that simple.
16980 \end_layout
16981
16982 \begin_layout Standard
16983 Slides are probably the only time you'll need to forcibly end pages in LyX
16984  (this can be specified in the 
16985 \family sans
16986 Paragraph Layout
16987 \family default
16988  dialog).
16989  In fact, you'll want to, once you finish entering the contents of one slide.
16990  If you've entered more text than can physically fit on a slide, the extra
16991  overflows onto a new slide.
16992  I don't recommend doing this, however, since the overflow slide won't have
16993  any page number on it.
16994  Furthermore, it may interfere with any 
16995 \family sans
16996 Overlay
16997 \family default
16998  you've made to accompany the oversized 
16999 \family sans
17000 Slide
17001 \family default
17002 .
17003 \end_layout
17004
17005 \begin_layout Standard
17006 The 
17007 \family sans
17008 Overlay
17009 \family default
17010  and 
17011 \family sans
17012 Note
17013 \family default
17014  environments work the same way as the 
17015 \family sans
17016 Slide
17017 \family default
17018  environment.
17019  They both create an 
17020 \begin_inset Quotes eld
17021 \end_inset
17022
17023 ASCII line
17024 \begin_inset Quotes erd
17025 \end_inset
17026
17027  followed by a label [
17028 \begin_inset Quotes eld
17029 \end_inset
17030
17031 NewOverlay:
17032 \begin_inset Quotes erd
17033 \end_inset
17034
17035  and 
17036 \begin_inset Quotes eld
17037 \end_inset
17038
17039 NewNote:
17040 \begin_inset Quotes erd
17041 \end_inset
17042
17043 , respectively].
17044  The color is a stunning magenta instead of blue, and the 
17045 \begin_inset Quotes eld
17046 \end_inset
17047
17048 ASCII line
17049 \begin_inset Quotes erd
17050 \end_inset
17051
17052  will look different, in style and in length.
17053  The label fonts of all three also differ from one another.
17054 \end_layout
17055
17056 \begin_layout Standard
17057 As with a 
17058 \family sans
17059 Slide
17060 \family default
17061 , if the contents of a 
17062 \family sans
17063 Note
17064 \family default
17065  or 
17066 \family sans
17067 Overlay
17068 \family default
17069  exceed the physical size of a slide or sheet of paper, the extra will overflow
17070  onto a new sheet.
17071  Again, you should avoid this.
17072  It defeats the whole purpose of 
17073 \family sans
17074 Note
17075 \family default
17076 s and 
17077 \family sans
17078 Overlay
17079 \family default
17080 s.
17081 \end_layout
17082
17083 \begin_layout Subsubsection
17084 Using 
17085 \family sans
17086 Overlay
17087 \family default
17088  with 
17089 \family sans
17090 Slide
17091 \end_layout
17092
17093 \begin_layout Standard
17094 The idea behind an 
17095 \family sans
17096 Overlay
17097 \family default
17098  is a slide that sits atop another slide.
17099  Perhaps you wish to discuss a figure on the main 
17100 \family sans
17101 Slide
17102 \family default
17103  before displaying the text associated with it.
17104  One way to accomplish this is tape a flap of dark paper over the part of
17105  the 
17106 \family sans
17107 Slide
17108 \family default
17109  you want to display later.
17110  This method fails, however, if you wish to overlap one graph with another,
17111  for example.
17112  You would then have to fumble while speaking to align the two separate,
17113  overlapping 
17114 \family sans
17115 Slide
17116 \family default
17117 s to align the two graphs.
17118  The use of an 
17119 \family sans
17120 Overlay
17121 \family default
17122  environment in both cases makes life much easier.
17123 \end_layout
17124
17125 \begin_layout Standard
17126 Each 
17127 \family sans
17128 Overlay
17129 \family default
17130  receives the page number of its 
17131 \begin_inset Quotes eld
17132 \end_inset
17133
17134 parent
17135 \begin_inset Quotes erd
17136 \end_inset
17137
17138  
17139 \family sans
17140 Slide
17141 \family default
17142 , appended by 
17143 \begin_inset Quotes eld
17144 \end_inset
17145
17146
17147 \family typewriter
17148 -a
17149 \family default
17150
17151 \begin_inset Quotes erd
17152 \end_inset
17153
17154 .
17155 \begin_inset Foot
17156 status collapsed
17157
17158 \begin_layout Plain Layout
17159 Presumably, mutliple 
17160 \family sans
17161 Overlay
17162 \family default
17163 s would have 
17164 \begin_inset Quotes eld
17165 \end_inset
17166
17167
17168 \family typewriter
17169 -a
17170 \family default
17171
17172 \begin_inset Quotes erd
17173 \end_inset
17174
17175
17176 \begin_inset Quotes eld
17177 \end_inset
17178
17179
17180 \family typewriter
17181 -b
17182 \family default
17183
17184 \begin_inset Quotes erd
17185 \end_inset
17186
17187
17188 \begin_inset Quotes eld
17189 \end_inset
17190
17191
17192 \family typewriter
17193 -c
17194 \family default
17195
17196 \begin_inset Quotes erd
17197 \end_inset
17198
17199 , etc.
17200 \begin_inset space ~
17201 \end_inset
17202
17203 appended to the page number of the parent 
17204 \family sans
17205 Slide
17206 \family default
17207 .
17208  
17209 \end_layout
17210
17211 \end_inset
17212
17213  Clearly, you want the contents of both the 
17214 \family sans
17215 Slide
17216 \family default
17217  and the 
17218 \family sans
17219 Overlay
17220 \family default
17221  to each fit on a single physical slide! You should probably consider an
17222  
17223 \family sans
17224 Overlay
17225 \family default
17226  as 
17227 \begin_inset Quotes eld
17228 \end_inset
17229
17230 part of
17231 \begin_inset Quotes erd
17232 \end_inset
17233
17234  a 
17235 \family sans
17236 Slide
17237 \family default
17238 .
17239  Indeed, the LyX 
17240 \family sans
17241 slides
17242 \family default
17243  class provides a visual cue for this: the label at the start of an 
17244 \family sans
17245 Overlay
17246 \family default
17247  is shorter than that at the start of a 
17248 \family sans
17249 Slide
17250 \family default
17251 .
17252  Lastly, when you generate printable output, you'll find alignment markers
17253  in all four corners of both the 
17254 \family sans
17255 Overlay
17256 \family default
17257  page and its parent 
17258 \family sans
17259 Slide
17260 \family default
17261 .
17262  These will assist you in lining up the two physical slides.
17263 \end_layout
17264
17265 \begin_layout Standard
17266 The major problem in overlaying two slides is aligning the contents of the
17267  two transparencies.
17268  How much space should you leave for that graph on the second slide? Worse
17269  still, what if you want a graph and a sentence on second slide, but there
17270  is text on the main transparency that goes in between them? You could try
17271  and insert vertical space of the right size.
17272  The better way is to use 
17273 \family sans
17274 InvisibleText
17275 \family default
17276  and 
17277 \family sans
17278 VisibleText
17279 \family default
17280 .
17281 \end_layout
17282
17283 \begin_layout Standard
17284 As their names imply, 
17285 \family sans
17286 InvisibleText
17287 \family default
17288  and 
17289 \family sans
17290 VisibleText
17291 \family default
17292  are two command-like paragraph environments that make all subsequent text
17293  invisible and visible, respectively.
17294  Note from section
17295 \begin_inset space ~
17296 \end_inset
17297
17298
17299 \begin_inset CommandInset ref
17300 LatexCommand ref
17301 reference "sec:slideQuirk"
17302
17303 \end_inset
17304
17305  that you don't place anything 
17306 \emph on
17307 into
17308 \emph default
17309  these two environments, however.
17310  When you create an 
17311 \family sans
17312 InvisibleText
17313 \family default
17314 , it inserts a centered, sky-blue label into the page reading 
17315 \begin_inset Quotes eld
17316 \end_inset
17317
17318 <Invisible Text Follows>
17319 \begin_inset Quotes erd
17320 \end_inset
17321
17322 .
17323  For paragraphs following this label, the parts of the 
17324 \family sans
17325 Slide
17326 \family default
17327  [or 
17328 \family sans
17329 Overlay
17330 \family default
17331 ; it doesn't matter which] where they would be contain instead blank space.
17332  
17333 \end_layout
17334
17335 \begin_layout Standard
17336 For 
17337 \family sans
17338 VisibleText
17339 \family default
17340 , the corresponding centered label is 
17341 \begin_inset Quotes eld
17342 \end_inset
17343
17344 <Visible Text Follows>
17345 \begin_inset Quotes erd
17346 \end_inset
17347
17348  in blazing green.
17349  Paragraphs following this label behave normally.
17350  Note that the beginning of a new 
17351 \family sans
17352 Slide
17353 \family default
17354
17355 \family sans
17356 Overlay
17357 \family default
17358 , or 
17359 \family sans
17360 Note
17361 \family default
17362  automatically shuts off an 
17363 \family sans
17364 InvisibleText
17365 \family default
17366 .
17367  It's therefore not necessary to use 
17368 \family sans
17369 VisibleText
17370 \family default
17371  at the end of a 
17372 \family sans
17373 Slide
17374 \family default
17375 .
17376 \end_layout
17377
17378 \begin_layout Standard
17379 By now, it should be obvious how to create overlay transparencies using
17380  the proper combination of 
17381 \family sans
17382 InvisibleText
17383 \family default
17384  and 
17385 \family sans
17386 VisibleText
17387 \family default
17388  on a 
17389 \family sans
17390 Slide
17391 \family default
17392  and 
17393 \family sans
17394 Overlay
17395 \family default
17396 :
17397 \end_layout
17398
17399 \begin_layout Enumerate
17400 Create a 
17401 \family sans
17402 Slide
17403 \family default
17404 , including everything that will appear on it, whether on the main slide
17405  or on the 
17406 \family sans
17407 Overlay
17408 \family default
17409 .
17410 \end_layout
17411
17412 \begin_layout Enumerate
17413 Before each figure or paragraph that will appear only on the 
17414 \family sans
17415 Overlay
17416 \family default
17417 , insert an 
17418 \family sans
17419 InvisibleText
17420 \family default
17421  environment.
17422  If necessary, insert a 
17423 \family sans
17424 VisibleText
17425 \family default
17426  environment after the 
17427 \family sans
17428 Overlay
17429 \family default
17430 -only text.
17431 \end_layout
17432
17433 \begin_layout Enumerate
17434 Start an 
17435 \family sans
17436 Overlay
17437 \family default
17438  immediately following the 
17439 \family sans
17440 Slide
17441 \family default
17442 .
17443 \end_layout
17444
17445 \begin_layout Enumerate
17446 Copy the contents of this 
17447 \family sans
17448 Slide
17449 \family default
17450  into the 
17451 \family sans
17452 Overlay
17453 \family default
17454 .
17455 \end_layout
17456
17457 \begin_layout Enumerate
17458 Within the 
17459 \family sans
17460 Overlay
17461 \family default
17462 , change all of the 
17463 \family sans
17464 InvisibleText
17465 \family default
17466  lines to 
17467 \family sans
17468 VisibleText
17469 \family default
17470  and vice-versa.
17471 \end_layout
17472
17473 \begin_layout Standard
17474 That's it.
17475  You've just made an 
17476 \family sans
17477 Overlay
17478 \family default
17479 .
17480 \end_layout
17481
17482 \begin_layout Standard
17483 There's one problem with the way I've designed the LyX 
17484 \family sans
17485 slides
17486 \family default
17487  class: you can't make text in the middle of a paragraph invisible, nor
17488  make text in the middle of an invisible paragraph visible again.
17489  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17490 \begin_inset Foot
17491 status collapsed
17492
17493 \begin_layout Plain Layout
17494 The commands of interest are: 
17495 \end_layout
17496
17497 \begin_layout Itemize
17498
17499 \family typewriter
17500 {
17501 \backslash
17502 invisible \SpecialChar \ldots{}
17503  }
17504 \end_layout
17505
17506 \begin_layout Itemize
17507
17508 \family typewriter
17509 {
17510 \backslash
17511 visible \SpecialChar \ldots{}
17512  }
17513 \end_layout
17514
17515 \begin_layout Plain Layout
17516 \SpecialChar \ldots{}
17517 and need to be marked as TeX.
17518  The text whose 
17519 \begin_inset Quotes eld
17520 \end_inset
17521
17522 visibility
17523 \begin_inset Quotes erd
17524 \end_inset
17525
17526  you wish to change goes in between the brackets [and after the 
17527 \family typewriter
17528
17529 \backslash
17530 invisible
17531 \family default
17532  or 
17533 \family typewriter
17534
17535 \backslash
17536 visible
17537 \family default
17538  command].
17539  If you don't know how to mark text as TeX, see the appropriate section
17540  of the 
17541 \emph on
17542 User's Guide
17543 \emph default
17544 .
17545 \end_layout
17546
17547 \end_inset
17548
17549
17550 \end_layout
17551
17552 \begin_layout Subsubsection
17553 Using 
17554 \family sans
17555 Note
17556 \family default
17557  with 
17558 \family sans
17559 Slide
17560 \family default
17561
17562 \begin_inset CommandInset label
17563 LatexCommand label
17564 name "sec:slideNote"
17565
17566 \end_inset
17567
17568
17569 \end_layout
17570
17571 \begin_layout Standard
17572 Like an 
17573 \family sans
17574 Overlay
17575 \family default
17576 , a 
17577 \family sans
17578 Note
17579 \family default
17580  is associated with a 
17581 \begin_inset Quotes eld
17582 \end_inset
17583
17584 parent
17585 \begin_inset Quotes erd
17586 \end_inset
17587
17588  
17589 \family sans
17590 Slide
17591 \family default
17592 .
17593  Here, too, the LyX 
17594 \family sans
17595 slides
17596 \family default
17597  class provides visual cues.
17598  The label for a 
17599 \family sans
17600 Note
17601 \family default
17602  is shorter than that of a 
17603 \family sans
17604 Slide
17605 \family default
17606  [yet longer than that of an 
17607 \family sans
17608 Overlay
17609 \family default
17610 ] and, like the label of an 
17611 \family sans
17612 Overlay
17613 \family default
17614  is shockingly magenta.
17615  Additionally, the printed 
17616 \family sans
17617 Note
17618 \family default
17619  has the page number of its 
17620 \begin_inset Quotes eld
17621 \end_inset
17622
17623 parent
17624 \begin_inset Quotes erd
17625 \end_inset
17626
17627  
17628 \family sans
17629 Slide
17630 \family default
17631 , appended by 
17632 \begin_inset Quotes eld
17633 \end_inset
17634
17635
17636 \family typewriter
17637 -
17638 \family default
17639 1
17640 \begin_inset Quotes erd
17641 \end_inset
17642
17643
17644 \begin_inset Quotes eld
17645 \end_inset
17646
17647
17648 \family typewriter
17649 -
17650 \family default
17651 2
17652 \begin_inset Quotes erd
17653 \end_inset
17654
17655
17656 \begin_inset Quotes eld
17657 \end_inset
17658
17659
17660 \family typewriter
17661 -
17662 \family default
17663 3
17664 \begin_inset Quotes erd
17665 \end_inset
17666
17667 , etc.
17668  You can have multiple 
17669 \family sans
17670 Note
17671 \family default
17672 s associated with a single 
17673 \family sans
17674 Slide
17675 \family default
17676 , and, as with 
17677 \family sans
17678 Slide
17679 \family default
17680  and 
17681 \family sans
17682 Overlay
17683 \family default
17684 , you'll probably want to break up long 
17685 \family sans
17686 Note
17687 \family default
17688 s so that they fit on a single sheet of paper.
17689 \end_layout
17690
17691 \begin_layout Standard
17692 The purpose of a 
17693 \family sans
17694 Note
17695 \family default
17696  is obvious: it contains anything additional you might want to say about
17697  a 
17698 \family sans
17699 Slide
17700 \family default
17701 .
17702  It could also be used as a sheet of reminders for a particular 
17703 \family sans
17704 Slide
17705 \family default
17706 .
17707  In the case of the latter, you might want to make use of time markers.
17708  Currently, the LyX 
17709 \family sans
17710 slides
17711 \family default
17712  class has no 
17713 \begin_inset Quotes eld
17714 \end_inset
17715
17716 native
17717 \begin_inset Quotes erd
17718 \end_inset
17719
17720  support for time markers, a 
17721 \noun on
17722 SliTeX
17723 \noun default
17724  feature.
17725  So, you'll have to resort to using the LaTeX codes.
17726 \end_layout
17727
17728 \begin_layout Standard
17729 To use time markers, you'll need to specify the extra class option 
17730 \begin_inset Quotes eld
17731 \end_inset
17732
17733
17734 \family typewriter
17735 clock
17736 \family default
17737
17738 \begin_inset Quotes erd
17739 \end_inset
17740
17741  [see section
17742 \begin_inset space ~
17743 \end_inset
17744
17745
17746 \begin_inset CommandInset ref
17747 LatexCommand ref
17748 reference "sec:slidesetup"
17749
17750 \end_inset
17751
17752 ].
17753  This option turns on timing marks, which will appear in the lower-left-hand
17754  corner of every 
17755 \family sans
17756 Note
17757 \family default
17758  you generate.
17759  To set what appears in the time marker, you use the LaTeX commands 
17760 \begin_inset Quotes eld
17761 \end_inset
17762
17763
17764 \family typewriter
17765
17766 \backslash
17767 settime{}
17768 \family default
17769
17770 \begin_inset Quotes erd
17771 \end_inset
17772
17773  and 
17774 \begin_inset Quotes eld
17775 \end_inset
17776
17777
17778 \family typewriter
17779
17780 \backslash
17781 addtime{}
17782 \family default
17783
17784 \begin_inset Quotes erd
17785 \end_inset
17786
17787 .
17788  The arguments of both commands are time measured in seconds.
17789  
17790 \begin_inset Quotes eld
17791 \end_inset
17792
17793
17794 \family typewriter
17795
17796 \backslash
17797 settime{}
17798 \family default
17799
17800 \begin_inset Quotes erd
17801 \end_inset
17802
17803  sets the time marker to a given time.
17804  
17805 \begin_inset Quotes eld
17806 \end_inset
17807
17808
17809 \family typewriter
17810
17811 \backslash
17812 addtime{}
17813 \family default
17814
17815 \begin_inset Quotes erd
17816 \end_inset
17817
17818  increments the time marker by the specified amount.
17819  Using time markers and 
17820 \family sans
17821 Note
17822 \family default
17823 s in this fashion, you can remind yourself how much time to spend on a particula
17824
17825 \family sans
17826 Slide
17827 \family default
17828 .
17829 \end_layout
17830
17831 \begin_layout Standard
17832 There's one last feature to describe.
17833  Clearly, you'd like to print out all of your 
17834 \family sans
17835 Slide
17836 \family default
17837 s and 
17838 \family sans
17839 Overlay
17840 \family default
17841 s on transparencies while printing all of your 
17842 \family sans
17843 Note
17844 \family default
17845 s on plain paper.
17846  However, a 
17847 \family sans
17848 Note
17849 \family default
17850  
17851 \emph on
17852 must
17853 \emph default
17854  follow the 
17855 \family sans
17856 Slide
17857 \family default
17858  with which it is associated.
17859  What's a person to do?
17860 \end_layout
17861
17862 \begin_layout Standard
17863 Luckily, there are two LaTeX commands that allow you to select what to print
17864  out.
17865  Both must be placed into the preamble of your document.
17866  The command 
17867 \begin_inset Quotes eld
17868 \end_inset
17869
17870
17871 \family typewriter
17872
17873 \backslash
17874 onlyslides{
17875 \backslash
17876 slides}
17877 \family default
17878
17879 \begin_inset Quotes erd
17880 \end_inset
17881
17882  will cause the output to contain only the 
17883 \family sans
17884 Slide
17885 \family default
17886 s and 
17887 \family sans
17888 Overlay
17889 \family default
17890 s.
17891  Correspondingly, the command 
17892 \begin_inset Quotes eld
17893 \end_inset
17894
17895
17896 \family typewriter
17897
17898 \backslash
17899 onlynotes{
17900 \backslash
17901 notes}
17902 \family default
17903
17904 \begin_inset Quotes erd
17905 \end_inset
17906
17907  prevents the output of anything but 
17908 \family sans
17909 Note
17910 \family default
17911 s.
17912  I'd advise placing both commands in the preamble and initially comment
17913  both out.
17914  You can then preview your entire presentation as you write.
17915  When you're done writing, you can then uncomment one of the two to select
17916  what you want to print.
17917  I like to uncomment 
17918 \begin_inset Quotes eld
17919 \end_inset
17920
17921
17922 \family typewriter
17923
17924 \backslash
17925 onlyslides{
17926 \backslash
17927 slides}
17928 \family default
17929
17930 \begin_inset Quotes erd
17931 \end_inset
17932
17933  , print to a file with 
17934 \begin_inset Quotes eld
17935 \end_inset
17936
17937
17938 \family typewriter
17939 -slides
17940 \family default
17941
17942 \begin_inset Quotes erd
17943 \end_inset
17944
17945  in its name, comment it back out, then uncomment 
17946 \begin_inset Quotes eld
17947 \end_inset
17948
17949
17950 \family typewriter
17951
17952 \backslash
17953 onlynotes{
17954 \backslash
17955 notes}
17956 \family default
17957
17958 \begin_inset Quotes erd
17959 \end_inset
17960
17961  and print to a 
17962 \begin_inset Quotes eld
17963 \end_inset
17964
17965
17966 \family typewriter
17967 *-notes.ps
17968 \family default
17969
17970 \begin_inset Quotes erd
17971 \end_inset
17972
17973  file.
17974  I can then send either file to a printer, loading transparencies or plain
17975  paper as appropriate.
17976 \end_layout
17977
17978 \begin_layout Standard
17979 You can also provide other arguments to the 
17980 \begin_inset Quotes eld
17981 \end_inset
17982
17983
17984 \family typewriter
17985
17986 \backslash
17987 onlyslides{}
17988 \family default
17989
17990 \begin_inset Quotes erd
17991 \end_inset
17992
17993  and 
17994 \begin_inset Quotes eld
17995 \end_inset
17996
17997
17998 \family typewriter
17999
18000 \backslash
18001 onlynotes{}
18002 \family default
18003
18004 \begin_inset Quotes erd
18005 \end_inset
18006
18007  commands.
18008  See a good LaTeX book for details.
18009 \end_layout
18010
18011 \begin_layout Subsection
18012 The 
18013 \family sans
18014 slides
18015 \family default
18016  Class Template File
18017 \end_layout
18018
18019 \begin_layout Standard
18020 I have also provided a template file, 
18021 \begin_inset Quotes eld
18022 \end_inset
18023
18024
18025 \family typewriter
18026 slides.lyx
18027 \family default
18028
18029 \begin_inset Quotes erd
18030 \end_inset
18031
18032 , with the 
18033 \family sans
18034 slides
18035 \family default
18036  class.
18037  To use it, begin your new presentation with 
18038 \family sans
18039 \bar under
18040 F
18041 \bar default
18042 ile\SpecialChar \menuseparator
18043 New
18044 \begin_inset space ~
18045 \end_inset
18046
18047 from
18048 \begin_inset space ~
18049 \end_inset
18050
18051
18052 \bar under
18053 T
18054 \bar default
18055 emplate
18056 \family default
18057 .
18058  Your new LyX presentation file will contain an example 
18059 \family sans
18060 Slide
18061 \family default
18062  – 
18063 \family sans
18064 Overlay
18065 \family default
18066  – 
18067 \family sans
18068 Note
18069 \family default
18070  triplet.
18071  The 
18072 \family sans
18073 Slide
18074 \family default
18075  and 
18076 \family sans
18077 Overlay
18078 \family default
18079  additionally contain an example of the use of 
18080 \family sans
18081 InvisibleText
18082 \family default
18083  and 
18084 \family sans
18085 VisibleText
18086 \family default
18087 .
18088  Lastly, the preamble will contain:
18089 \end_layout
18090
18091 \begin_layout LyX-Code
18092 % Uncomment to print out only slides and overlays
18093 \end_layout
18094
18095 \begin_layout LyX-Code
18096 %
18097 \end_layout
18098
18099 \begin_layout LyX-Code
18100 %
18101 \backslash
18102 onlyslides{
18103 \backslash
18104 slides}
18105 \begin_inset Newline newline
18106 \end_inset
18107
18108  
18109 \end_layout
18110
18111 \begin_layout LyX-Code
18112 % Uncomment to print out only notes
18113 \end_layout
18114
18115 \begin_layout LyX-Code
18116 %
18117 \end_layout
18118
18119 \begin_layout LyX-Code
18120 %
18121 \backslash
18122 onlynotes{
18123 \backslash
18124 notes}
18125 \end_layout
18126
18127 \begin_layout Standard
18128 One final thing: I created this class to support the LaTeX2e 
18129 \begin_inset Quotes eld
18130 \end_inset
18131
18132
18133 \noun on
18134 SliTeX
18135 \noun default
18136  emulation
18137 \begin_inset Quotes erd
18138 \end_inset
18139
18140  class, one of the built-in LaTeX2e classes.
18141  Neither I nor the rest of the LyX Team endorse or oppose the use of this
18142  built-in slide class.
18143  It's here if you want it or need it.
18144  There exist other LaTeX2e classes for creating presentations, such as the
18145  
18146 \family sans
18147 Foils
18148 \family default
18149  class [see section
18150 \begin_inset space ~
18151 \end_inset
18152
18153
18154 \begin_inset CommandInset ref
18155 LatexCommand ref
18156 reference "sec:foiltex"
18157
18158 \end_inset
18159
18160 ] or the 
18161 \begin_inset Quotes eld
18162 \end_inset
18163
18164
18165 \family typewriter
18166 seminar
18167 \family default
18168
18169 \begin_inset Quotes erd
18170 \end_inset
18171
18172  package [present on some TeX distributions].
18173  The latter is not yet supported under LyX.
18174 \begin_inset Foot
18175 status collapsed
18176
18177 \begin_layout Plain Layout
18178 Perhaps you can take on the task\SpecialChar \ldots{}
18179
18180 \end_layout
18181
18182 \end_inset
18183
18184  I know nothing about these other classes.
18185  Try them out to see what sort of alternative they provide.
18186 \end_layout
18187
18188 \begin_layout Chapter
18189 LyX Features needing Extra Software
18190 \end_layout
18191
18192 \begin_layout Section
18193 Checking TeX
18194 \end_layout
18195
18196 \begin_layout Standard
18197 by 
18198 \noun on
18199 Asger Alstrup
18200 \end_layout
18201
18202 \begin_layout Subsection
18203 Introduction
18204 \end_layout
18205
18206 \begin_layout Standard
18207 If you have the 
18208 \family typewriter
18209 chktex
18210 \family default
18211  program installed
18212 \begin_inset Foot
18213 status collapsed
18214
18215 \begin_layout Plain Layout
18216
18217 \family typewriter
18218 chktex
18219 \family default
18220  is not yet available when you are using the LaTeX distribution MiKTeX.
18221 \end_layout
18222
18223 \end_inset
18224
18225 , you'll find in the 
18226 \family sans
18227 Tools
18228 \family default
18229  menu the entry: 
18230 \family sans
18231 Check
18232 \begin_inset space ~
18233 \end_inset
18234
18235 TeX
18236 \family default
18237 .
18238  You can get 
18239 \family typewriter
18240 chktex
18241 \family default
18242  it from CTAN, 
18243 \begin_inset CommandInset href
18244 LatexCommand href
18245 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
18246
18247 \end_inset
18248
18249 .
18250 \end_layout
18251
18252 \begin_layout Standard
18253 The 
18254 \family sans
18255 ChkTeX
18256 \family default
18257  package is a program that was written by 
18258 \begin_inset Flex Noun
18259 status collapsed
18260
18261 \begin_layout Plain Layout
18262 Jens T.
18263 \begin_inset space ~
18264 \end_inset
18265
18266 Berger Thielemann
18267 \end_layout
18268
18269 \end_inset
18270
18271  in frustration because some constructs in LaTeX are sometimes non-intuitive,
18272  and easy to forget.
18273  The program runs over your LaTeX file, checks the integrity of the file,
18274  and flags some common errors.
18275  In other technical words, it is 
18276 \family typewriter
18277 lint
18278 \family default
18279  for LaTeX.
18280 \end_layout
18281
18282 \begin_layout Standard
18283 Well, what is a syntax checker doing in LyX which is supposed to produce
18284  correct LaTeX anyways? The answer is simple: Just as 
18285 \family typewriter
18286 Lint
18287 \family default
18288  not only checks the 
18289 \emph on
18290 syntax
18291 \emph default
18292  of C programs, but also does 
18293 \emph on
18294 semantic
18295 \emph default
18296  checks for type-errors, 
18297 \family sans
18298 ChkTeX
18299 \family default
18300  catches some common 
18301 \emph on
18302 typographic
18303 \emph default
18304  errors, in addition to the syntactical ones.
18305  Specifically, 
18306 \family sans
18307 ChkTeX
18308 \family default
18309  is capable of detecting several common errors, such as
18310 \end_layout
18311
18312 \begin_layout Itemize
18313 Ellipsis detection:
18314 \begin_inset Newline newline
18315 \end_inset
18316
18317 Use \SpecialChar \ldots{}
18318  instead of ...
18319 \end_layout
18320
18321 \begin_layout Itemize
18322 No space in front of/after parenthesis:
18323 \begin_inset Newline newline
18324 \end_inset
18325
18326 ( wrong spacing )
18327 \end_layout
18328
18329 \begin_layout Itemize
18330 Enforcement of normal space after common abbreviations:
18331 \begin_inset Newline newline
18332 \end_inset
18333
18334 e.
18335 \begin_inset space \thinspace{}
18336 \end_inset
18337
18338 g.
18339 \begin_inset space \space{}
18340 \end_inset
18341
18342 is too wide spacing.
18343 \end_layout
18344
18345 \begin_layout Itemize
18346 Enforcement of end-of-sentence space when the last sentence ends with a
18347  capital letter:
18348 \begin_inset Newline newline
18349 \end_inset
18350
18351 This is a TEST.
18352  And this is wrong spacing.
18353 \end_layout
18354
18355 \begin_layout Itemize
18356 Space in front of labels and similar commands:
18357 \begin_inset Newline newline
18358 \end_inset
18359
18360 The label should stick right up to the text to avoid falling to a wrong
18361  page.
18362  
18363 \begin_inset CommandInset label
18364 LatexCommand label
18365 name "sec:chktex"
18366
18367 \end_inset
18368
18369  
18370 \begin_inset Foot
18371 status collapsed
18372
18373 \begin_layout Plain Layout
18374 This footnote is in danger of falling off to a wrong page
18375 \end_layout
18376
18377 \end_inset
18378
18379  The label is separated too much.
18380 \end_layout
18381
18382 \begin_layout Itemize
18383 Space in front of references, instead of hard spaces:
18384 \begin_inset Newline newline
18385 \end_inset
18386
18387 In you are in bad luck, the text will break right between the referenced
18388  text and reference number, and that's a pity.
18389  See section 
18390 \begin_inset CommandInset ref
18391 LatexCommand ref
18392 reference "sec:chktex"
18393
18394 \end_inset
18395
18396 .
18397 \end_layout
18398
18399 \begin_layout Itemize
18400 Use of 
18401 \begin_inset Quotes eld
18402 \end_inset
18403
18404 x
18405 \begin_inset Quotes erd
18406 \end_inset
18407
18408  instead of 
18409 \begin_inset Formula $\times$
18410 \end_inset
18411
18412  between numbers:
18413 \begin_inset Newline newline
18414 \end_inset
18415
18416 2x2 looks cheap compared to 
18417 \begin_inset Formula $2\times2$
18418 \end_inset
18419
18420 .
18421 \end_layout
18422
18423 \begin_layout Standard
18424 and more \SpecialChar \ldots{}
18425  It is an invaluable tool when you are 
18426 \begin_inset Quotes eld
18427 \end_inset
18428
18429 finishing up
18430 \begin_inset Quotes erd
18431 \end_inset
18432
18433  your document before printing, and you should run it right after the obligatory
18434  spelling check, and before you go fine tuning the typesetting.
18435 \end_layout
18436
18437 \begin_layout Subsection
18438 How to use it
18439 \end_layout
18440
18441 \begin_layout Standard
18442 If you have the program installed, usage is as simple as choosing 
18443 \family sans
18444 Tools\SpecialChar \menuseparator
18445 Check
18446 \begin_inset space ~
18447 \end_inset
18448
18449 TeX
18450 \family default
18451 .
18452  This will make LyX generate a LaTeX file of your document, start 
18453 \family sans
18454 ChkTeX
18455 \family default
18456  to check it, and then make LyX insert 
18457 \begin_inset Quotes eld
18458 \end_inset
18459
18460 error boxes
18461 \begin_inset Quotes erd
18462 \end_inset
18463
18464  with the warnings from 
18465 \family sans
18466 ChkTeX
18467 \family default
18468 , if there were any.
18469  The warnings will be placed close to the point of the mistake, and you
18470  can quickly find them by using the 
18471 \family sans
18472 Navigate\SpecialChar \menuseparator
18473 Error
18474 \family default
18475  menu item, or the shortcut key 
18476 \family sans
18477 C-g
18478 \family default
18479  from the default 
18480 \family typewriter
18481 cua
18482 \family default
18483  bind file.
18484  Open the error boxes by clicking on them with the mouse, or use the shortcut
18485  key 
18486 \family sans
18487 C-i
18488 \family default
18489  from 
18490 \family typewriter
18491 cua
18492 \family default
18493  bindings, or the corresponding 
18494 \family sans
18495 C-o
18496 \family default
18497  for the alternate 
18498 \family typewriter
18499 emacs
18500 \family default
18501  bind file.
18502  Read the warning and correct the mistake, if it is a mistake.
18503  If you have trouble understanding what the warning is about, you can safely
18504  ignore it.
18505  Remember that there is a hidden layer between the document on screen and
18506  the technical details in invoking 
18507 \family sans
18508 ChkTeX
18509 \family default
18510 , and this gap can make some warnings seem arcane or just right down plain
18511  silly.
18512 \end_layout
18513
18514 \begin_layout Standard
18515 This document is an excellent testing bed for the feature, and it should
18516  provide quite a few warnings for you to fiddle with.
18517  Since computers are only so smart, expect most of the warnings to be false
18518  alarms, though.
18519 \end_layout
18520
18521 \begin_layout Subsection
18522 How to fine tune it
18523 \end_layout
18524
18525 \begin_layout Standard
18526 Sometimes, you'll find that 
18527 \family sans
18528 ChkTeX
18529 \family default
18530  makes more noise than suits your mood.
18531  Then you can choose not to use it, wait until your mood changes, or try
18532  to customize 
18533 \family sans
18534 ChkTeX
18535 \family default
18536  to get better along with you.
18537  Another choice in the most desperate situations is to use 
18538 \family sans
18539 View\SpecialChar \menuseparator
18540 Remove
18541 \begin_inset space ~
18542 \end_inset
18543
18544 All
18545 \begin_inset space ~
18546 \end_inset
18547
18548 Error
18549 \begin_inset space ~
18550 \end_inset
18551
18552 Boxes
18553 \family default
18554 , which will get rid of all warnings instantly.
18555 \end_layout
18556
18557 \begin_layout Standard
18558 Although 
18559 \family sans
18560 ChkTeX
18561 \family default
18562  
18563 \emph on
18564 is
18565 \emph default
18566  very configurable and extensible, you shouldn't expect to solve all problems
18567  with 
18568 \family sans
18569 ChkTeX
18570 \family default
18571  in LyX this way.
18572  Since LyX has to generate a somewhat special LaTeX file to be able to match
18573  the line numbers from the 
18574 \family sans
18575 ChkTeX
18576 \family default
18577  output
18578 \begin_inset Foot
18579 status collapsed
18580
18581 \begin_layout Plain Layout
18582 You can inspect the specific output from 
18583 \family sans
18584 chktex
18585 \family default
18586  by using 
18587 \family sans
18588 Edit\SpecialChar \menuseparator
18589 View
18590 \begin_inset space ~
18591 \end_inset
18592
18593 LaTeX
18594 \begin_inset space ~
18595 \end_inset
18596
18597 Log
18598 \family default
18599  right after a 
18600 \family sans
18601 chktex
18602 \family default
18603  run.
18604 \end_layout
18605
18606 \end_inset
18607
18608  to the internal document structure, some of the warnings will not seen
18609  to appear correctly.
18610  There are two things you can do about this:
18611 \end_layout
18612
18613 \begin_layout Itemize
18614 Fine tune the 
18615 \family sans
18616 ChkTeX
18617 \family default
18618  invocation command line in 
18619 \family sans
18620 Preferences
18621 \family default
18622  (tabs 
18623 \family sans
18624 Outputs
18625 \family default
18626
18627 \family sans
18628 Misc
18629 \family default
18630 ), or the global 
18631 \family sans
18632 ChkTeX
18633 \family default
18634  installation configuration file (usually with the file 
18635 \family typewriter
18636 chktexrc
18637 \family default
18638 ).
18639  See below to learn what warnings can be enabled and disabled on the command
18640  line.
18641  
18642 \end_layout
18643
18644 \begin_layout Itemize
18645 Export your document as a raw LaTeX file using 
18646 \family sans
18647 File\SpecialChar \menuseparator
18648 Export\SpecialChar \menuseparator
18649 LaTeX
18650 \family default
18651  and run 
18652 \family typewriter
18653 chktex
18654 \family default
18655  manually on that.
18656  Invoked in this way, it can be a hassle to find the corresponding place
18657  in the document inside LyX, but with a little patience, you should be able
18658  to do it.
18659 \end_layout
18660
18661 \begin_layout Standard
18662 Here follows the warning messages that can be enabled and disabled in 
18663 \family sans
18664 Preferences
18665 \family default
18666 .
18667  Use 
18668 \family typewriter
18669 -n#
18670 \family default
18671  to disable a warning, and 
18672 \family typewriter
18673 -w#
18674 \family default
18675  to enable a warning.
18676  The emphasized entries are disabled by default, because the default is
18677  "
18678 \family typewriter
18679 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18680 \family default
18681 ".
18682 \end_layout
18683
18684 \begin_layout Standard
18685 Notice that you should only use the options that enable and disable warnings,
18686  because LyX relies on some of the other command line parameters to be set
18687  in a specific way to have a chance to communicate with 
18688 \family typewriter
18689 chktex
18690 \family default
18691 .
18692 \end_layout
18693
18694 \begin_layout Enumerate
18695
18696 \size small
18697 \emph on
18698 Command terminated with space.
18699 \end_layout
18700
18701 \begin_layout Enumerate
18702
18703 \size small
18704 Non-breaking space (
18705 \begin_inset Quotes eld
18706 \end_inset
18707
18708
18709 \family typewriter
18710 ~
18711 \family default
18712
18713 \begin_inset Quotes erd
18714 \end_inset
18715
18716 ) should have been used.
18717 \end_layout
18718
18719 \begin_layout Enumerate
18720
18721 \size small
18722 \emph on
18723 You should enclose the previous parenthesis with 
18724 \begin_inset Quotes eld
18725 \end_inset
18726
18727
18728 \family typewriter
18729 {}
18730 \family default
18731
18732 \begin_inset Quotes erd
18733 \end_inset
18734
18735 .
18736 \end_layout
18737
18738 \begin_layout Enumerate
18739
18740 \size small
18741 Italic correction (
18742 \begin_inset Quotes eld
18743 \end_inset
18744
18745
18746 \family typewriter
18747
18748 \backslash
18749 /
18750 \family default
18751
18752 \begin_inset Quotes erd
18753 \end_inset
18754
18755 ) found in non-italic buffer.
18756 \end_layout
18757
18758 \begin_layout Enumerate
18759
18760 \size small
18761 Italic correction (
18762 \begin_inset Quotes eld
18763 \end_inset
18764
18765
18766 \family typewriter
18767
18768 \backslash
18769 /
18770 \family default
18771
18772 \begin_inset Quotes erd
18773 \end_inset
18774
18775 ) found more than once.
18776 \end_layout
18777
18778 \begin_layout Enumerate
18779
18780 \size small
18781 \emph on
18782 No italic correction (
18783 \begin_inset Quotes eld
18784 \end_inset
18785
18786
18787 \family typewriter
18788
18789 \backslash
18790 /
18791 \family default
18792
18793 \begin_inset Quotes erd
18794 \end_inset
18795
18796 ) found.
18797 \end_layout
18798
18799 \begin_layout Enumerate
18800
18801 \size small
18802 Accent command 
18803 \begin_inset Quotes eld
18804 \end_inset
18805
18806
18807 \family typewriter
18808 cmd
18809 \family default
18810
18811 \begin_inset Quotes erd
18812 \end_inset
18813
18814  needs use of 
18815 \begin_inset Quotes eld
18816 \end_inset
18817
18818
18819 \family typewriter
18820 cmd
18821 \family default
18822
18823 \begin_inset Quotes erd
18824 \end_inset
18825
18826 .
18827 \end_layout
18828
18829 \begin_layout Enumerate
18830
18831 \size small
18832 Wrong length of dash may have been used.
18833 \end_layout
18834
18835 \begin_layout Enumerate
18836
18837 \size small
18838 \emph on
18839 \begin_inset Quotes eld
18840 \end_inset
18841
18842
18843 \family typewriter
18844 %s
18845 \family default
18846
18847 \begin_inset Quotes erd
18848 \end_inset
18849
18850  expected, found 
18851 \begin_inset Quotes eld
18852 \end_inset
18853
18854
18855 \family typewriter
18856 %s
18857 \family default
18858
18859 \begin_inset Quotes erd
18860 \end_inset
18861
18862 .
18863 \end_layout
18864
18865 \begin_layout Enumerate
18866
18867 \size small
18868 Solo 
18869 \begin_inset Quotes eld
18870 \end_inset
18871
18872
18873 \family typewriter
18874 %s
18875 \family default
18876
18877 \begin_inset Quotes erd
18878 \end_inset
18879
18880  found.
18881 \end_layout
18882
18883 \begin_layout Enumerate
18884
18885 \size small
18886 You should use 
18887 \begin_inset Quotes eld
18888 \end_inset
18889
18890
18891 \family typewriter
18892 %s
18893 \family default
18894
18895 \begin_inset Quotes erd
18896 \end_inset
18897
18898  to achieve an ellipsis.
18899 \end_layout
18900
18901 \begin_layout Enumerate
18902
18903 \size small
18904 Inter-word spacing (
18905 \begin_inset Quotes eld
18906 \end_inset
18907
18908
18909 \family typewriter
18910
18911 \backslash
18912
18913 \family default
18914  
18915 \begin_inset Quotes eld
18916 \end_inset
18917
18918 ) should perhaps be used.
18919 \end_layout
18920
18921 \begin_layout Enumerate
18922
18923 \size small
18924 Inter-sentence spacing (
18925 \begin_inset Quotes eld
18926 \end_inset
18927
18928
18929 \family typewriter
18930
18931 \backslash
18932 @
18933 \family default
18934
18935 \begin_inset Quotes erd
18936 \end_inset
18937
18938 ) should perhaps be used.
18939 \end_layout
18940
18941 \begin_layout Enumerate
18942
18943 \size small
18944 Could not find argument for command.
18945 \end_layout
18946
18947 \begin_layout Enumerate
18948
18949 \size small
18950 No match found for 
18951 \begin_inset Quotes eld
18952 \end_inset
18953
18954
18955 \family typewriter
18956 %s
18957 \family default
18958
18959 \begin_inset Quotes erd
18960 \end_inset
18961
18962 .
18963 \end_layout
18964
18965 \begin_layout Enumerate
18966
18967 \size small
18968 Math mode still on at end of LaTeX file.
18969 \end_layout
18970
18971 \begin_layout Enumerate
18972
18973 \size small
18974 Number of 
18975 \begin_inset Quotes eld
18976 \end_inset
18977
18978
18979 \family typewriter
18980 char
18981 \family default
18982
18983 \begin_inset Quotes erd
18984 \end_inset
18985
18986  doesn't match the number of 
18987 \begin_inset Quotes eld
18988 \end_inset
18989
18990
18991 \family typewriter
18992 char
18993 \family default
18994
18995 \begin_inset Quotes erd
18996 \end_inset
18997
18998 .
18999 \end_layout
19000
19001 \begin_layout Enumerate
19002
19003 \size small
19004 You should use either 
19005 \family typewriter
19006
19007 \begin_inset Quotes eld
19008 \end_inset
19009
19010
19011 \family default
19012  or 
19013 \family typewriter
19014
19015 \begin_inset Quotes erd
19016 \end_inset
19017
19018
19019 \family default
19020  as an alternative to 
19021 \begin_inset Quotes eld
19022 \end_inset
19023
19024
19025 \family typewriter
19026 "
19027 \family default
19028
19029 \begin_inset Quotes erd
19030 \end_inset
19031
19032 .
19033 \end_layout
19034
19035 \begin_layout Enumerate
19036
19037 \size small
19038 You should use "
19039 \family typewriter
19040 '
19041 \family default
19042 " (ASCII 39) instead of "
19043 \family typewriter
19044 ´
19045 \family default
19046 " (ASCII 180).
19047 \end_layout
19048
19049 \begin_layout Enumerate
19050
19051 \size small
19052 User-specified pattern found.
19053 \end_layout
19054
19055 \begin_layout Enumerate
19056
19057 \size small
19058 This command might not be intended.
19059 \end_layout
19060
19061 \begin_layout Enumerate
19062
19063 \size small
19064 \emph on
19065 Comment displayed.
19066 \end_layout
19067
19068 \begin_layout Enumerate
19069
19070 \size small
19071 Either 
19072 \family typewriter
19073 ''
19074 \backslash
19075 ,'
19076 \family default
19077  or 
19078 \family typewriter
19079 '
19080 \backslash
19081 ,''
19082 \family default
19083  will look better.
19084 \end_layout
19085
19086 \begin_layout Enumerate
19087
19088 \size small
19089 Delete this space to maintain correct page references.
19090 \end_layout
19091
19092 \begin_layout Enumerate
19093
19094 \size small
19095 \emph on
19096 You might wish to put this between a pair of 
19097 \begin_inset Quotes eld
19098 \end_inset
19099
19100
19101 \family typewriter
19102 {}
19103 \family default
19104
19105 \begin_inset Quotes erd
19106 \end_inset
19107
19108 .
19109 \end_layout
19110
19111 \begin_layout Enumerate
19112
19113 \size small
19114 You ought to remove spaces in front of punctuation.
19115 \end_layout
19116
19117 \begin_layout Enumerate
19118
19119 \size small
19120 Could not execute LaTeX command.
19121 \end_layout
19122
19123 \begin_layout Enumerate
19124
19125 \size small
19126 Don't use 
19127 \family typewriter
19128
19129 \backslash
19130 /
19131 \family default
19132  in front of small punctuation.
19133 \end_layout
19134
19135 \begin_layout Enumerate
19136
19137 \family typewriter
19138 \size small
19139 $
19140 \backslash
19141 times$
19142 \family default
19143  may look prettier here.
19144 \end_layout
19145
19146 \begin_layout Enumerate
19147
19148 \size small
19149 \emph on
19150 Multiple spaces detected in output.
19151 \end_layout
19152
19153 \begin_layout Enumerate
19154
19155 \size small
19156 This text may be ignored.
19157 \end_layout
19158
19159 \begin_layout Enumerate
19160
19161 \size small
19162 Use 
19163 \family typewriter
19164
19165 \begin_inset Quotes eld
19166 \end_inset
19167
19168
19169 \family default
19170  to begin quotation, not 
19171 \family typewriter
19172 '
19173 \family default
19174 .
19175 \end_layout
19176
19177 \begin_layout Enumerate
19178
19179 \size small
19180 Use 
19181 \family typewriter
19182 '
19183 \family default
19184  to end quotation, not 
19185 \family typewriter
19186
19187 \begin_inset Quotes eld
19188 \end_inset
19189
19190
19191 \family default
19192 .
19193 \end_layout
19194
19195 \begin_layout Enumerate
19196
19197 \size small
19198 Don't mix quotes.
19199 \end_layout
19200
19201 \begin_layout Enumerate
19202
19203 \size small
19204 You should perhaps use 
19205 \begin_inset Quotes eld
19206 \end_inset
19207
19208
19209 \family typewriter
19210 cmd
19211 \family default
19212
19213 \begin_inset Quotes erd
19214 \end_inset
19215
19216  instead.
19217 \end_layout
19218
19219 \begin_layout Enumerate
19220
19221 \size small
19222 You should put a space in front of/after parenthesis.
19223 \end_layout
19224
19225 \begin_layout Enumerate
19226
19227 \size small
19228 You should avoid spaces in front of/after parenthesis.
19229 \end_layout
19230
19231 \begin_layout Enumerate
19232
19233 \size small
19234 \emph on
19235 You should not use punctuation in front of/after quotes.
19236 \end_layout
19237
19238 \begin_layout Enumerate
19239
19240 \size small
19241 Double space found.
19242 \end_layout
19243
19244 \begin_layout Enumerate
19245
19246 \size small
19247 You should put punctuation outside inner/inside display math mode.
19248 \end_layout
19249
19250 \begin_layout Enumerate
19251
19252 \size small
19253 You ought to not use primitive TeX in LaTeX code.
19254 \end_layout
19255
19256 \begin_layout Enumerate
19257
19258 \size small
19259 You should remove spaces in front of 
19260 \begin_inset Quotes eld
19261 \end_inset
19262
19263
19264 \family typewriter
19265 %s
19266 \family default
19267
19268 \begin_inset Quotes erd
19269 \end_inset
19270
19271
19272 \end_layout
19273
19274 \begin_layout Enumerate
19275
19276 \size small
19277 \begin_inset Quotes eld
19278 \end_inset
19279
19280
19281 \family typewriter
19282 %s
19283 \family default
19284
19285 \begin_inset Quotes erd
19286 \end_inset
19287
19288  is normally not followed by 
19289 \begin_inset Quotes eld
19290 \end_inset
19291
19292
19293 \family typewriter
19294 %c
19295 \family default
19296
19297 \begin_inset Quotes erd
19298 \end_inset
19299
19300 .
19301 \end_layout
19302
19303 \begin_layout Standard
19304 In later versions of LyX, we hope to provide a more complete interface to
19305  this tool (and it's smaller cousin 
19306 \family typewriter
19307 lacheck
19308 \family default
19309 ) to exploit the full power of it.
19310  But it's not exactly useless as it is now: go try it on one of your existing
19311  documents of a certain length and be surprised.
19312 \end_layout
19313
19314 \begin_layout Section
19315 Version Control in LyX
19316 \end_layout
19317
19318 \begin_layout Standard
19319 by
19320 \noun on
19321  Lars Gullik Bjønnes 
19322 \noun default
19323 and 
19324 \noun on
19325 Pavel Sanda
19326 \end_layout
19327
19328 \begin_layout Subsection
19329 Introduction
19330 \end_layout
19331
19332 \begin_layout Standard
19333 A friend of mine wanted to try LyX for a group project.
19334  When he didn't find support for version control or file locking, he dropped
19335  it.
19336  This angered me a bit, so I thought that I should at least make support
19337  for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
19338  This has been done.
19339  LyX now supports some of the most basic RCS/CVS/SVN commands.
19340  If you need something a bit more sophisticated you will have to do that
19341  manually in a terminal.
19342 \end_layout
19343
19344 \begin_layout Standard
19345 Before you begin to use the version control features in LyX, you should
19346  be familiar with RCS/CVS/SVN usage before start using it under LyX.
19347  Also note that CVS support is not as good as subversion support so we advice
19348  using SVN instead.
19349  Good place to start with Subversion is SVN Book
19350 \begin_inset Foot
19351 status open
19352
19353 \begin_layout Plain Layout
19354 \begin_inset CommandInset href
19355 LatexCommand href
19356 target "http://svnbook.red-bean.com/"
19357
19358 \end_inset
19359
19360
19361 \end_layout
19362
19363 \end_inset
19364
19365 .
19366  In case of RCS you should read 
19367 \begin_inset Quotes eld
19368 \end_inset
19369
19370 rcsintro
19371 \begin_inset Quotes erd
19372 \end_inset
19373
19374  (a man file, read it with 
19375 \family typewriter
19376 man rcsintro
19377 \family default
19378 ).
19379  This file describes all the basic features of RCS.
19380  You should especially notice the comment about a RCS directory, and the
19381  notion of a master RCS file (the file ending in 
19382 \family typewriter
19383 ,v
19384 \family default
19385 ).
19386 \end_layout
19387
19388 \begin_layout Standard
19389 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
19390  package—no guarantees are made for older versions.
19391  Most of the log messages are not currently displayed after operations —
19392  you can check them in Messages pane if unsure.
19393 \end_layout
19394
19395 \begin_layout Standard
19396 For introducing your own external commands consult vc-command in the manual
19397  of LyX functions.
19398 \end_layout
19399
19400 \begin_layout Subsection
19401 RCS commands in LyX
19402 \end_layout
19403
19404 \begin_layout Standard
19405 The following sections describe the RCS commands supported by LyX.
19406  You can find them in the 
19407 \family sans
19408 File\SpecialChar \menuseparator
19409 Version
19410 \begin_inset space ~
19411 \end_inset
19412
19413 Control
19414 \family default
19415  submenu.
19416  LyX was tested against RCS 5.7.
19417 \end_layout
19418
19419 \begin_layout Subsubsection
19420
19421 \family sans
19422 Register
19423 \end_layout
19424
19425 \begin_layout Standard
19426 If your document is not under revision control, this is the only item shown
19427  in the menu.
19428  And if it is under revision control, the 
19429 \family sans
19430 Register
19431 \family default
19432  item is not visible.
19433  
19434 \end_layout
19435
19436 \begin_layout Standard
19437 This command registers your document with RCS (unless you are under the
19438  directory managed by CVS)\SpecialChar \@.
19439  You are asked interactively to supply an initial
19440  description of the document.
19441  The document is now set in Read-Only mode and you have to 
19442 \family sans
19443 Check
19444 \begin_inset space ~
19445 \end_inset
19446
19447 Out
19448 \begin_inset space ~
19449 \end_inset
19450
19451 For
19452 \begin_inset space ~
19453 \end_inset
19454
19455 Edit
19456 \family default
19457 , before making any changes to it.
19458  A document under revision control has a 
19459 \begin_inset Quotes eld
19460 \end_inset
19461
19462 [RCS:<version> <locker>]
19463 \begin_inset Quotes erd
19464 \end_inset
19465
19466  item tagged to the filename in the minibuffer.
19467 \end_layout
19468
19469 \begin_layout Standard
19470 RCS command that is run: 
19471 \family typewriter
19472 ci -q -u -i -t-"<initial description>" <file-name>
19473 \end_layout
19474
19475 \begin_layout Standard
19476 Read 
19477 \family typewriter
19478 man ci
19479 \family default
19480  to understand the switches.
19481  
19482 \end_layout
19483
19484 \begin_layout Subsubsection
19485
19486 \family sans
19487 Check In Changes
19488 \end_layout
19489
19490 \begin_layout Standard
19491 When you are finished editing a file, you check in your changes.
19492  When you do this, you are asked for a description of the changes.
19493  This is stored in the history log.
19494  The version number is bumped, your changes are applied to the master RCS
19495  file, the document is unlocked and set to Read-Only mode.
19496  
19497 \end_layout
19498
19499 \begin_layout Standard
19500 RCS command: 
19501 \family typewriter
19502 ci -q -u -m"<description>" <file-name>
19503 \end_layout
19504
19505 \begin_layout Subsubsection
19506
19507 \family sans
19508 Check Out For Edit
19509 \end_layout
19510
19511 \begin_layout Standard
19512 By doing this you lock the document so that only you can edit it.
19513  This will also make the document Read-Write only for you.
19514  You will usually continue editing for a while and when you are finished
19515  you check in your changes.
19516  The status line is changed to reflect that you have locked the file.
19517  
19518 \end_layout
19519
19520 \begin_layout Standard
19521 RCS command: 
19522 \family typewriter
19523 co -q -l <file-name>
19524 \end_layout
19525
19526 \begin_layout Subsubsection
19527
19528 \family sans
19529 Revert To Repository Version
19530 \end_layout
19531
19532 \begin_layout Standard
19533 This will discard all changes made to the document since the last check
19534  in.
19535  You get a warning before changes are discarded.
19536 \end_layout
19537
19538 \begin_layout Standard
19539 RCS command: 
19540 \family typewriter
19541 co -f -u<version> <file-name>
19542 \end_layout
19543
19544 \begin_layout Subsubsection
19545
19546 \family sans
19547 Undo Last Checkin
19548 \end_layout
19549
19550 \begin_layout Standard
19551 This makes as if the last check in never happened.
19552  No changes are made to the document loaded into LyX, but the last version
19553  is removed from the master RCS file.
19554  
19555 \end_layout
19556
19557 \begin_layout Standard
19558 RCS command: 
19559 \family typewriter
19560 rcs -o<version> <file-name>
19561 \end_layout
19562
19563 \begin_layout Subsubsection
19564
19565 \family sans
19566 Show History
19567 \end_layout
19568
19569 \begin_layout Standard
19570 This shows the complete history of the RCS document.
19571  The output of 
19572 \family typewriter
19573 rlog <file-name>
19574 \family default
19575  is shown in a browser.
19576  See 
19577 \family typewriter
19578 man rlog
19579 \family default
19580  for more info.
19581 \end_layout
19582
19583 \begin_layout Subsubsection
19584 Revision info
19585 \end_layout
19586
19587 \begin_layout Standard
19588 LyX supports RCS version number information (only), see 
19589 \begin_inset CommandInset ref
19590 LatexCommand ref
19591 reference "sub:VCS-Revision-Information"
19592
19593 \end_inset
19594
19595  for details.
19596 \end_layout
19597
19598 \begin_layout Subsection
19599 CVS commands in LyX
19600 \end_layout
19601
19602 \begin_layout Standard
19603 A subset of CVS operations is supported by LyX.
19604  You can find the commands in the 
19605 \family sans
19606 File\SpecialChar \menuseparator
19607 Version
19608 \begin_inset space ~
19609 \end_inset
19610
19611 Control
19612 \family default
19613  submenu.
19614  The version control system SVN is more powerful, so please use it instead
19615  of CVS if possible.
19616 \end_layout
19617
19618 \begin_layout Subsubsection
19619
19620 \family sans
19621 General CVS usage
19622 \end_layout
19623
19624 \begin_layout Standard
19625 If you start from scratch with CVS you have to create your repository and
19626  checkout the working copy with external tools.
19627  If you're using a client-server setup you may need to login before doing
19628  the first repository checkout.
19629 \end_layout
19630
19631 \begin_layout Standard
19632 If your documents are under revision control and others are using the same
19633  repository problems arise when different changes to the same document at
19634  the same location happen.
19635  Standard CVS repositories doesn't operate with a file locking mechanism.
19636  This may be surprising, but conflicts only occur if people disagree on
19637  the proper content of the same part of a document.
19638  So, if co-workers are used to communicate regularly, these conflicts occur
19639  rarely.
19640  If they don't communicate they have a fundamental problem anyway.
19641  Nevertheless some people like to work with so called 
19642 \begin_inset Quotes eld
19643 \end_inset
19644
19645 reserved checkouts
19646 \begin_inset Quotes erd
19647 \end_inset
19648
19649 .
19650  If they do so the working copy of all files is readonly when checked out
19651  first and the user starts editing after using a special command to make
19652  the working copy writable.
19653  When the changes are checked in the working copy returns to readonly state.
19654  With LyX one has to edit the 
19655 \begin_inset Flex Code
19656 status collapsed
19657
19658 \begin_layout Plain Layout
19659 .cvsrc
19660 \end_layout
19661
19662 \end_inset
19663
19664  file and add the line 
19665 \begin_inset Flex Code
19666 status collapsed
19667
19668 \begin_layout Plain Layout
19669 cvs -r
19670 \end_layout
19671
19672 \end_inset
19673
19674  to work with reserved checkouts.
19675  The benefit is the possibility to see who is using a writable copy of some
19676  document.
19677  It's not guaranteed only one user makes a copy writable.
19678 \end_layout
19679
19680 \begin_layout Standard
19681 LyX tries to guess if you're using reserved or non-reserved checkouts.
19682  If your working copy is readonly or it is writable and an additional copy
19683  of your document exists in the CVS/Base sub-directory a reserved otherwise
19684  a non-reserved checkout is assumed.
19685  When a reserved checkout is detected you have to use 
19686 \begin_inset Flex MenuItem
19687 status collapsed
19688
19689 \begin_layout Plain Layout
19690 Check Out
19691 \end_layout
19692
19693 \end_inset
19694
19695  to make your working copy writable if it's readonly.
19696  After doing so the 
19697 \begin_inset Flex MenuItem
19698 status collapsed
19699
19700 \begin_layout Plain Layout
19701 Check In
19702 \end_layout
19703
19704 \end_inset
19705
19706  operation is possible and that makes your working copy readonly again after
19707  transferring your changes to the repository.
19708 \end_layout
19709
19710 \begin_layout Standard
19711 More information about CVS can be found here 
19712 \begin_inset Flex URL
19713 status collapsed
19714
19715 \begin_layout Plain Layout
19716
19717 http://www.nongnu.org/cvs
19718 \end_layout
19719
19720 \end_inset
19721
19722  and here 
19723 \begin_inset Flex URL
19724 status collapsed
19725
19726 \begin_layout Plain Layout
19727
19728 http://ximbiot.com/cvs
19729 \end_layout
19730
19731 \end_inset
19732
19733 .
19734 \end_layout
19735
19736 \begin_layout Standard
19737 Read 
19738 \family typewriter
19739 man cvs
19740 \family default
19741  to understand the sub-commands and the switches mentioned below.
19742 \end_layout
19743
19744 \begin_layout Subsubsection
19745
19746 \family sans
19747 Register
19748 \end_layout
19749
19750 \begin_layout Standard
19751 If your document is not under revision control, this is the only item shown
19752  in the menu.
19753  And if it is under revision control, the 
19754 \family sans
19755 \bar under
19756 R
19757 \bar default
19758 egister
19759 \family default
19760  item is not visible.
19761  
19762 \end_layout
19763
19764 \begin_layout Standard
19765 This command registers in CVS your document 
19766 \begin_inset Flex Strong
19767 status collapsed
19768
19769 \begin_layout Plain Layout
19770
19771 \emph on
19772 only
19773 \end_layout
19774
19775 \end_inset
19776
19777  in case you have already the documents directory under CVS control (in
19778  particular 
19779 \family typewriter
19780 CVS/Entries
19781 \family default
19782  file exists).
19783  This means you have to create or checkout the archive by yourself using
19784  external tools.
19785  (In case you forget that step LyX registers the document with RCS.)
19786 \end_layout
19787
19788 \begin_layout Standard
19789 Then you are asked interactively to supply an initial description of the
19790  document.
19791  Don't forget that registered file is not yet checked in.
19792 \end_layout
19793
19794 \begin_layout Standard
19795 CVS command that is run: 
19796 \family typewriter
19797 cvs -q add -m"<entered message>" "<file-name>"
19798 \end_layout
19799
19800 \begin_layout Standard
19801 The term 
19802 \family typewriter
19803 "<file-name>"
19804 \family default
19805  above and for all other CVS commands is an abbreviation for 
19806 \begin_inset Quotes eld
19807 \end_inset
19808
19809 change the current working directory to file location and use the file name
19810  without path component as argument
19811 \begin_inset Quotes erd
19812 \end_inset
19813
19814 .
19815 \end_layout
19816
19817 \begin_layout Subsubsection
19818
19819 \family sans
19820 Check In Changes
19821 \end_layout
19822
19823 \begin_layout Standard
19824 When you are finished editing a file, you commit your changes.
19825  When you do this and you had changed the document, you are asked for a
19826  description of the changes.
19827  After that changes are written to the repository.
19828  In case you didn't change the document and a reserved checkout is detected
19829  the reservation made on 
19830 \begin_inset Flex MenuItem
19831 status collapsed
19832
19833 \begin_layout Plain Layout
19834 Check Out
19835 \end_layout
19836
19837 \end_inset
19838
19839  is undone.
19840 \end_layout
19841
19842 \begin_layout Labeling
19843 \labelwidthstring 00.00.0000
19844 CVS
19845 \begin_inset space ~
19846 \end_inset
19847
19848 command: 
19849 \begin_inset space ~
19850 \end_inset
19851
19852
19853 \begin_inset Newline newline
19854 \end_inset
19855
19856
19857 \begin_inset Flex Code
19858 status collapsed
19859
19860 \begin_layout Plain Layout
19861 cvs 
19862 \family typewriter
19863 -q commit -m"<description>" "<file-name>"
19864 \end_layout
19865
19866 \end_inset
19867
19868  or
19869 \begin_inset Newline newline
19870 \end_inset
19871
19872
19873 \begin_inset Flex Code
19874 status collapsed
19875
19876 \begin_layout Plain Layout
19877 cvs -q unedit 
19878 \family typewriter
19879 "<file-name>"
19880 \end_layout
19881
19882 \end_inset
19883
19884
19885 \end_layout
19886
19887 \begin_layout Subsubsection
19888
19889 \family sans
19890 Check Out Changes
19891 \end_layout
19892
19893 \begin_layout Standard
19894 When you are sharing a repository with others, you may have to incorporate
19895  their changes into your working copy.
19896 \end_layout
19897
19898 \begin_layout Standard
19899 CVS command: 
19900 \family typewriter
19901 cvs -q update "<file-name>"
19902 \end_layout
19903
19904 \begin_layout Standard
19905 If a readonly checkout is detected the working copy is made writable and
19906  reserved.
19907 \end_layout
19908
19909 \begin_layout Standard
19910 CVS command: 
19911 \family typewriter
19912 cvs -q edit "<file-name>"
19913 \end_layout
19914
19915 \begin_layout Subsubsection
19916
19917 \family sans
19918 Revert To Repository Version
19919 \end_layout
19920
19921 \begin_layout Standard
19922 This will discard all changes made to the document since the last check
19923  in.
19924  You get a warning before changes are discarded.
19925  Firstly the file is deleted, secondly CVS update command is run.
19926 \end_layout
19927
19928 \begin_layout Standard
19929 CVS command: 
19930 \family typewriter
19931 cvs -q update "<file-name>"
19932 \end_layout
19933
19934 \begin_layout Standard
19935 If a reserved checkout is detected and the working copy has no changes only
19936  the reservation is undone.
19937 \end_layout
19938
19939 \begin_layout Standard
19940 CVS command: 
19941 \family typewriter
19942 cvs -q unedit "<file-name>"
19943 \end_layout
19944
19945 \begin_layout Subsubsection
19946 Update of the local directory checkout from repository
19947 \end_layout
19948
19949 \begin_layout Standard
19950 Once your documents gets more complex, containing sub-documents and pictures,
19951  including external 
19952 \begin_inset Flex Code
19953 status collapsed
19954
19955 \begin_layout Plain Layout
19956 .tex
19957 \end_layout
19958
19959 \end_inset
19960
19961  files and so on using version control becomes more complicated.
19962  LyX supports updating the whole tree in which resides the document.
19963  This become especially useful once you cooperate with people which neither
19964  have detailed knowledge about CVS usage nor they have ambition to commit
19965  additional material to the repository.
19966  You have to organize the files structure so that all external files are
19967  in the same directory or subdirectories of the document.
19968  It's good practice anyway to store multipart documents in an extra directory.
19969 \end_layout
19970
19971 \begin_layout Standard
19972 The 
19973 \begin_inset Flex Code
19974 status collapsed
19975
19976 \begin_layout Plain Layout
19977 Update local directory from repository
19978 \end_layout
19979
19980 \end_inset
19981
19982  command updates the whole directory.
19983  If local changes are detected user is warned before update starts.
19984  In case of merge conflicts both versions of the conflicting document parts
19985  are placed in the final document.
19986  You have to review and correct the result of the merge.
19987  You'll find the conflicts enclosed in pairs of 
19988 \begin_inset Flex Code
19989 status collapsed
19990
19991 \begin_layout Plain Layout
19992 <<<<<<<
19993 \end_layout
19994
19995 \end_inset
19996
19997  and 
19998 \begin_inset Flex Code
19999 status collapsed
20000
20001 \begin_layout Plain Layout
20002 >>>>>>>
20003 \end_layout
20004
20005 \end_inset
20006
20007  separated by 
20008 \begin_inset Flex Code
20009 status collapsed
20010
20011 \begin_layout Plain Layout
20012 =======
20013 \end_layout
20014
20015 \end_inset
20016
20017 .
20018  The first part is your version as before the update operation with the
20019  document name prepended.
20020  The second one is the repository version with the version number after
20021  the sequence of 
20022 \begin_inset Flex Code
20023 status collapsed
20024
20025 \begin_layout Plain Layout
20026 >
20027 \end_layout
20028
20029 \end_inset
20030
20031  signs.
20032 \end_layout
20033
20034 \begin_layout Labeling
20035 \labelwidthstring 00.00.0000
20036 CVS
20037 \begin_inset space ~
20038 \end_inset
20039
20040 commands: 
20041 \begin_inset space ~
20042 \end_inset
20043
20044
20045 \begin_inset Newline newline
20046 \end_inset
20047
20048
20049 \begin_inset Flex Code
20050 status collapsed
20051
20052 \begin_layout Plain Layout
20053 cd $path; cvs diff 
20054 \family typewriter
20055 "."
20056 \end_layout
20057
20058 \end_inset
20059
20060  (Ask if changes are detected.)
20061 \begin_inset Newline newline
20062 \end_inset
20063
20064
20065 \begin_inset Flex Code
20066 status collapsed
20067
20068 \begin_layout Plain Layout
20069 cd $path; cvs -q update 
20070 \family typewriter
20071 "."
20072 \end_layout
20073
20074 \end_inset
20075
20076
20077 \end_layout
20078
20079 \begin_layout Standard
20080 where 
20081 \begin_inset Flex Code
20082 status collapsed
20083
20084 \begin_layout Plain Layout
20085 $path
20086 \end_layout
20087
20088 \end_inset
20089
20090  stands for the path to the document.
20091 \end_layout
20092
20093 \begin_layout Subsubsection
20094
20095 \family sans
20096 Show History
20097 \end_layout
20098
20099 \begin_layout Standard
20100 This shows the complete history of the CVS document.
20101  The output of 
20102 \family typewriter
20103 cvs log "<file-name>"
20104 \family default
20105  is shown in a browser.
20106 \end_layout
20107
20108 \begin_layout Subsection
20109 SVN commands in LyX
20110 \end_layout
20111
20112 \begin_layout Standard
20113 SVN is now partially supported by LyX.
20114  You can find the commands in the 
20115 \family sans
20116 File\SpecialChar \menuseparator
20117 Version
20118 \begin_inset space ~
20119 \end_inset
20120
20121 Control
20122 \family default
20123  submenu.
20124  Please note that if you use password protected access to repository via
20125  ssh, you will be asked in terminal window.
20126  LyX was tested against SVN 1.5 and 1.6
20127 \begin_inset Foot
20128 status open
20129
20130 \begin_layout Plain Layout
20131 Most of the commands will work with 1.4 too, see 
20132 \begin_inset CommandInset ref
20133 LatexCommand ref
20134 reference "sub:SVN-Repo-Update"
20135
20136 \end_inset
20137
20138 .
20139 \end_layout
20140
20141 \end_inset
20142
20143
20144 \end_layout
20145
20146 \begin_layout Subsubsection
20147
20148 \family sans
20149 Register
20150 \end_layout
20151
20152 \begin_layout Standard
20153 If your document is not under revision control, this is the only item shown
20154  in the menu.
20155  And if it is under revision control, the 
20156 \family sans
20157 \bar under
20158 R
20159 \bar default
20160 egister
20161 \family default
20162  item is not visible.
20163  
20164 \end_layout
20165
20166 \begin_layout Standard
20167 This command registers in SVN your document ONLY in case you have already
20168  the documents directory under SVN control (in particular 
20169 \family typewriter
20170 .svn/entries
20171 \family default
20172  file exists).
20173  This means you have to checkout the archive by yourself.
20174  
20175 \end_layout
20176
20177 \begin_layout Standard
20178 Then you are asked interactively to supply an initial description of the
20179  document.
20180  Don't forget that registered file is not yet commited.
20181 \end_layout
20182
20183 \begin_layout Standard
20184 SVN command that is run: 
20185 \family typewriter
20186 svn add -q 
20187 \begin_inset Quotes eld
20188 \end_inset
20189
20190 <file-name>
20191 \begin_inset Quotes erd
20192 \end_inset
20193
20194
20195 \end_layout
20196
20197 \begin_layout Standard
20198 Read 
20199 \family typewriter
20200 man svn
20201 \family default
20202  to understand the switches.
20203  
20204 \end_layout
20205
20206 \begin_layout Subsubsection
20207
20208 \family sans
20209 Check In Changes
20210 \end_layout
20211
20212 \begin_layout Standard
20213 When you are finished editing a file, you commit your changes.
20214  When you do this, you are asked for a description of the changes.
20215  After that changes are commited.
20216 \end_layout
20217
20218 \begin_layout Standard
20219 SVN command:
20220 \begin_inset Foot
20221 status collapsed
20222
20223 \begin_layout Plain Layout
20224 In case locking is not enabled.
20225  See Section 
20226 \begin_inset CommandInset ref
20227 LatexCommand ref
20228 reference "subsec:SVN-File-Locking"
20229
20230 \end_inset
20231
20232 .
20233 \end_layout
20234
20235 \end_inset
20236
20237  
20238 \family typewriter
20239 svn commit -q -m"<description>" <file-name>
20240 \end_layout
20241
20242 \begin_layout Subsubsection
20243
20244 \family sans
20245 Check Out For Edit
20246 \end_layout
20247
20248 \begin_layout Standard
20249 Updates the changes of this file from the repository.
20250  Be sure you understand SVN merging and conflicts resolving before using
20251  this function, because all conflicts has to be resolved manually by you!
20252 \end_layout
20253
20254 \begin_layout Standard
20255 SVN command:
20256 \begin_inset Foot
20257 status collapsed
20258
20259 \begin_layout Plain Layout
20260 Ditto.
20261 \end_layout
20262
20263 \end_inset
20264
20265  
20266 \family typewriter
20267 svn update --non-interactive 
20268 \begin_inset Quotes eld
20269 \end_inset
20270
20271 <file-name>
20272 \begin_inset Quotes erd
20273 \end_inset
20274
20275
20276 \end_layout
20277
20278 \begin_layout Subsubsection
20279
20280 \family sans
20281 Revert To Repository Version
20282 \end_layout
20283
20284 \begin_layout Standard
20285 This will discard all changes made to the document since the last check
20286  in.
20287  You get a warning before changes are discarded.
20288  
20289 \end_layout
20290
20291 \begin_layout Standard
20292 SVN command: 
20293 \family typewriter
20294 svn revert -q 
20295 \begin_inset Quotes eld
20296 \end_inset
20297
20298 <file-name>
20299 \begin_inset Quotes erd
20300 \end_inset
20301
20302
20303 \end_layout
20304
20305 \begin_layout Subsubsection
20306 \begin_inset CommandInset label
20307 LatexCommand label
20308 name "sub:SVN-Repo-Update"
20309
20310 \end_inset
20311
20312 Update of the local directory checkout from repository
20313 \begin_inset Foot
20314 status collapsed
20315
20316 \begin_layout Plain Layout
20317 Note that this command will work only with subversion 
20318 \begin_inset Formula $\geqq1.5$
20319 \end_inset
20320
20321
20322 \end_layout
20323
20324 \end_inset
20325
20326
20327 \end_layout
20328
20329 \begin_layout Standard
20330 All the commands above have one shortcomming - they deal with the current
20331  document only.
20332  Once your document contains pictures, includes external 
20333 \begin_inset Flex Code
20334 status collapsed
20335
20336 \begin_layout Plain Layout
20337 .tex
20338 \end_layout
20339
20340 \end_inset
20341
20342  files and so on administration becomes more complicated.
20343  LyX now supports updating the whole tree in which resides the document
20344 \begin_inset Foot
20345 status collapsed
20346
20347 \begin_layout Plain Layout
20348 One need to organize the files structure so that all external files are
20349  in the same directory or subdirectories of the document.
20350  
20351 \end_layout
20352
20353 \end_inset
20354
20355 .
20356  This become especially useful once you cooperate with people which neither
20357  know about subversion management nor they have ambition to commit additional
20358  material to the repository.
20359  
20360 \end_layout
20361
20362 \begin_layout Standard
20363 \begin_inset Flex Code
20364 status collapsed
20365
20366 \begin_layout Plain Layout
20367 Update local directory from repository
20368 \end_layout
20369
20370 \end_inset
20371
20372  command updates the whole directory and in case of merge conflicts local
20373  version of the files are left, so no unintended data loss occurs.
20374  If local changes are detected user is warned before update starts.
20375 \end_layout
20376
20377 \begin_layout Labeling
20378 \labelwidthstring 00.00.0000
20379 SVN
20380 \begin_inset space ~
20381 \end_inset
20382
20383 commands: 
20384 \begin_inset space ~
20385 \end_inset
20386
20387
20388 \begin_inset Newline newline
20389 \end_inset
20390
20391
20392 \begin_inset Flex Code
20393 status collapsed
20394
20395 \begin_layout Plain Layout
20396 svn diff $path
20397 \end_layout
20398
20399 \end_inset
20400
20401  (Ask if changes are detected.)
20402 \begin_inset Newline newline
20403 \end_inset
20404
20405
20406 \begin_inset Flex Code
20407 status collapsed
20408
20409 \begin_layout Plain Layout
20410 svn update --accept mine-full $path
20411 \end_layout
20412
20413 \end_inset
20414
20415
20416 \end_layout
20417
20418 \begin_layout Standard
20419 where 
20420 \begin_inset Flex Code
20421 status collapsed
20422
20423 \begin_layout Plain Layout
20424 $path
20425 \end_layout
20426
20427 \end_inset
20428
20429  stands for the path to the document.
20430 \end_layout
20431
20432 \begin_layout Subsubsection
20433
20434 \family sans
20435 Show History
20436 \end_layout
20437
20438 \begin_layout Standard
20439 This shows the complete history of the SVN document.
20440  The output of 
20441 \family typewriter
20442 svn log 
20443 \begin_inset Quotes eld
20444 \end_inset
20445
20446 <file-name>
20447 \begin_inset Quotes erd
20448 \end_inset
20449
20450
20451 \family default
20452  is shown in a browser.
20453 \end_layout
20454
20455 \begin_layout Subsubsection
20456 File Locking
20457 \begin_inset CommandInset label
20458 LatexCommand label
20459 name "subsec:SVN-File-Locking"
20460
20461 \end_inset
20462
20463
20464 \end_layout
20465
20466 \begin_layout Standard
20467 The file exchange through various revision control systems brings the problem
20468  of merge conflicts in case two different users try to edit the same (parts
20469  of) document.
20470  When such a conflict happens it needs manual resolving and one reasonable
20471  alternative is to provide some kind of locking mechanism, which guarantees
20472  that only one user is allowed to edit file at the given time.
20473 \end_layout
20474
20475 \begin_layout Standard
20476 SVN has two such mechanisms to provide mutual exclusivity for file access
20477  - locks and automatic setting of write permissions (see sec.
20478  
20479 \begin_inset CommandInset ref
20480 LatexCommand ref
20481 reference "subsec:Automatical-Locking-Property"
20482
20483 \end_inset
20484
20485 ) based on 
20486 \begin_inset Flex Code
20487 status collapsed
20488
20489 \begin_layout Plain Layout
20490 svn:needs-lock
20491 \end_layout
20492
20493 \end_inset
20494
20495  file svn property
20496 \begin_inset Foot
20497 status open
20498
20499 \begin_layout Plain Layout
20500 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20501 \end_layout
20502
20503 \end_inset
20504
20505 .
20506  If this property is detected for a given document LyX starts to use SVN
20507  locks for document editing automatically and the whole check-in/out mechanism
20508  switches to the same regimen as for RCS.
20509  This in particular means there are two different modes of file use in LyX:
20510 \end_layout
20511
20512 \begin_layout Itemize
20513 Unlocked state.
20514  The loaded file is in the read-only mode.
20515  For editing on needs to check-out.
20516  
20517 \emph on
20518 Check-out
20519 \emph default
20520  consists of updating from the repository and gaining write lock.
20521  If the lock is not possible to obtain, we remain in unlocked state.
20522 \end_layout
20523
20524 \begin_layout Itemize
20525 Locked state.
20526  The loaded file is in the 'normal' edit mode.
20527  No other user is allowed to edit the file.
20528  
20529 \emph on
20530 Check-in
20531 \emph default
20532  consists of commiting changes and releasing write-lock.
20533  If no changes have been made to the document, no commit will be produced
20534 \begin_inset Foot
20535 status collapsed
20536
20537 \begin_layout Plain Layout
20538 Don't be puzzled by the fact that you will be asked for commit message anyway.
20539 \end_layout
20540
20541 \end_inset
20542
20543  and only the write-lock will be released.
20544 \end_layout
20545
20546 \begin_layout Standard
20547 SVN commands:
20548 \end_layout
20549
20550 \begin_layout Labeling
20551 \labelwidthstring 00.00.0000
20552 Check-in:
20553 \family typewriter
20554  svn commit -q -m"<description>" "<file-name>"
20555 \begin_inset Newline newline
20556 \end_inset
20557
20558 svn unlock "<file-name>"
20559 \end_layout
20560
20561 \begin_layout Labeling
20562 \labelwidthstring 00.00.0000
20563 Check-out: 
20564 \family typewriter
20565 svn update "<file-name>"
20566 \begin_inset Newline newline
20567 \end_inset
20568
20569 svn lock "<file-name>"
20570 \end_layout
20571
20572 \begin_layout Subsubsection
20573
20574 \family typewriter
20575 \begin_inset CommandInset label
20576 LatexCommand label
20577 name "subsec:Automatical-Locking-Property"
20578
20579 \end_inset
20580
20581
20582 \family default
20583 Automatic Locking Property
20584 \end_layout
20585
20586 \begin_layout Standard
20587 The above mentioned automatic setting of write permissions of the .lyx file
20588  can be set through
20589 \family sans
20590 \bar under
20591  F
20592 \bar default
20593 ile\SpecialChar \menuseparator
20594
20595 \bar under
20596 V
20597 \bar default
20598 ersion
20599 \begin_inset space ~
20600 \end_inset
20601
20602 Control\SpecialChar \menuseparator
20603
20604 \bar under
20605 T
20606 \bar default
20607 oggle locking property
20608 \family default
20609 .
20610  This command is active only when the file is not locked on the svn server
20611  (i.e.
20612  you need to check-out before proceeding).
20613 \end_layout
20614
20615 \begin_layout Labeling
20616 \labelwidthstring 00.00.0000
20617 SVN
20618 \begin_inset space ~
20619 \end_inset
20620
20621 commands:
20622 \end_layout
20623
20624 \begin_layout Labeling
20625 \labelwidthstring 00.00.0000
20626 Set:
20627 \family typewriter
20628  svn propset svn:needs-lock ON "<file-name>"
20629 \end_layout
20630
20631 \begin_layout Labeling
20632 \labelwidthstring 00.00.0000
20633 Unset: 
20634 \family typewriter
20635 svn propdel svn:needs-lock "<file-name>"
20636 \end_layout
20637
20638 \begin_layout Subsubsection
20639 \begin_inset CommandInset label
20640 LatexCommand label
20641 name "sub:VCS-Revision-Information"
20642
20643 \end_inset
20644
20645 Revision Information in Documents
20646 \end_layout
20647
20648 \begin_layout Standard
20649 There are more possibilities how to activate revision information in our
20650  document.
20651 \end_layout
20652
20653 \begin_layout Itemize
20654 LyX supports directly:
20655 \end_layout
20656
20657 \begin_deeper
20658 \begin_layout Itemize
20659 tree revision information (
20660 \begin_inset Flex Code
20661 status collapsed
20662
20663 \begin_layout Plain Layout
20664 vcs-tree-revision
20665 \end_layout
20666
20667 \end_inset
20668
20669 ).
20670  The result is the output of the 
20671 \begin_inset Flex Code
20672 status collapsed
20673
20674 \begin_layout Plain Layout
20675 svnversion
20676 \end_layout
20677
20678 \end_inset
20679
20680  command, the following table gives you an idea, how to read the results.
20681 \end_layout
20682
20683 \begin_layout Standard
20684 \align center
20685 \begin_inset Tabular
20686 <lyxtabular version="3" rows="6" columns="2">
20687 <features tabularvalignment="middle">
20688 <column alignment="center" valignment="top" width="0">
20689 <column alignment="center" valignment="top" width="0">
20690 <row>
20691 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20692 \begin_inset Text
20693
20694 \begin_layout Plain Layout
20695 Output
20696 \end_layout
20697
20698 \end_inset
20699 </cell>
20700 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20701 \begin_inset Text
20702
20703 \begin_layout Plain Layout
20704 Meaning
20705 \end_layout
20706
20707 \end_inset
20708 </cell>
20709 </row>
20710 <row>
20711 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20712 \begin_inset Text
20713
20714 \begin_layout Plain Layout
20715 4123:4168
20716 \end_layout
20717
20718 \end_inset
20719 </cell>
20720 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20721 \begin_inset Text
20722
20723 \begin_layout Plain Layout
20724 mixed revision working copy
20725 \end_layout
20726
20727 \end_inset
20728 </cell>
20729 </row>
20730 <row>
20731 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20732 \begin_inset Text
20733
20734 \begin_layout Plain Layout
20735 4168M
20736 \end_layout
20737
20738 \end_inset
20739 </cell>
20740 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20741 \begin_inset Text
20742
20743 \begin_layout Plain Layout
20744 modified working copy
20745 \end_layout
20746
20747 \end_inset
20748 </cell>
20749 </row>
20750 <row>
20751 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20752 \begin_inset Text
20753
20754 \begin_layout Plain Layout
20755 4123S
20756 \end_layout
20757
20758 \end_inset
20759 </cell>
20760 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20761 \begin_inset Text
20762
20763 \begin_layout Plain Layout
20764 switched working copy
20765 \end_layout
20766
20767 \end_inset
20768 </cell>
20769 </row>
20770 <row>
20771 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20772 \begin_inset Text
20773
20774 \begin_layout Plain Layout
20775 4123P
20776 \end_layout
20777
20778 \end_inset
20779 </cell>
20780 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20781 \begin_inset Text
20782
20783 \begin_layout Plain Layout
20784 partial working copy, from a sparse checkout
20785 \end_layout
20786
20787 \end_inset
20788 </cell>
20789 </row>
20790 <row>
20791 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20792 \begin_inset Text
20793
20794 \begin_layout Plain Layout
20795 4123:4168MS
20796 \end_layout
20797
20798 \end_inset
20799 </cell>
20800 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20801 \begin_inset Text
20802
20803 \begin_layout Plain Layout
20804 mixed revision, modified, switched working copy
20805 \end_layout
20806
20807 \end_inset
20808 </cell>
20809 </row>
20810 </lyxtabular>
20811
20812 \end_inset
20813
20814
20815 \end_layout
20816
20817 \begin_layout Itemize
20818 file revision information.
20819  The result comes from parsing the output of 
20820 \begin_inset Flex Code
20821 status collapsed
20822
20823 \begin_layout Plain Layout
20824 svn
20825 \begin_inset space ~
20826 \end_inset
20827
20828 info
20829 \begin_inset space ~
20830 \end_inset
20831
20832 --xml
20833 \begin_inset space ~
20834 \end_inset
20835
20836 file.lyx
20837 \end_layout
20838
20839 \end_inset
20840
20841 .
20842  Supported flags are:
20843 \end_layout
20844
20845 \begin_deeper
20846 \begin_layout Itemize
20847 version number of the last commit (
20848 \begin_inset Flex Code
20849 status collapsed
20850
20851 \begin_layout Plain Layout
20852 vcs-revision
20853 \end_layout
20854
20855 \end_inset
20856
20857 )
20858 \end_layout
20859
20860 \begin_layout Itemize
20861 author of the last commit (
20862 \begin_inset Flex Code
20863 status collapsed
20864
20865 \begin_layout Plain Layout
20866 vcs-author
20867 \end_layout
20868
20869 \end_inset
20870
20871 )
20872 \end_layout
20873
20874 \begin_layout Itemize
20875 date of the last commit (
20876 \begin_inset Flex Code
20877 status collapsed
20878
20879 \begin_layout Plain Layout
20880 vcs-date
20881 \end_layout
20882
20883 \end_inset
20884
20885 )
20886 \end_layout
20887
20888 \begin_layout Itemize
20889 time of the last commit (
20890 \begin_inset Flex Code
20891 status collapsed
20892
20893 \begin_layout Plain Layout
20894 vcs-time
20895 \end_layout
20896
20897 \end_inset
20898
20899 )
20900 \end_layout
20901
20902 \end_deeper
20903 \begin_layout Standard
20904 You can obtain this info via InsetInfo (e.g.
20905  
20906 \begin_inset Flex Code
20907 status collapsed
20908
20909 \begin_layout Plain Layout
20910 info-insert buffer vcs-date
20911 \end_layout
20912
20913 \end_inset
20914
20915 ).
20916  The information will be available only when you have the file stored under
20917  svn managment (i.e.
20918  the 
20919 \begin_inset Flex Code
20920 status collapsed
20921
20922 \begin_layout Plain Layout
20923 .svn
20924 \end_layout
20925
20926 \end_inset
20927
20928  directory is available with your document).
20929 \end_layout
20930
20931 \end_deeper
20932 \begin_layout Itemize
20933 Another---a hacking one---possibility is to use svn keywords
20934 \begin_inset Foot
20935 status collapsed
20936
20937 \begin_layout Plain Layout
20938 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20939 \end_layout
20940
20941 \end_inset
20942
20943 .
20944  In short -- you set file keywords property (e.g.
20945  
20946 \family sans
20947 svn propset svn:keywords 'Rev' file.lyx
20948 \family default
20949 ) and then paste keyword TeX code
20950 \begin_inset Foot
20951 status collapsed
20952
20953 \begin_layout Plain Layout
20954 This is an easy way how to ensure that LyX won't break the line in the middle
20955  of keyword tag.
20956 \end_layout
20957
20958 \end_inset
20959
20960  tag in your document (e.g.
20961  
20962 \begin_inset ERT
20963 status open
20964
20965 \begin_layout Plain Layout
20966
20967 $Rev$
20968 \end_layout
20969
20970 \end_inset
20971
20972 ).
20973  This way svn client will automatically substitute revision number (e.g.
20974  
20975 \begin_inset ERT
20976 status open
20977
20978 \begin_layout Plain Layout
20979
20980 $Rev: 59 $
20981 \end_layout
20982
20983 \end_inset
20984
20985 ) after each update and commit.
20986  There are more problems with this approach.
20987  Firstly, the '$' character is used in TeX world for math equations, so
20988  any occurence of math formula 
20989 \begin_inset Formula $Rev$
20990 \end_inset
20991
20992  become 
20993 \begin_inset Formula $Rev:59$
20994 \end_inset
20995
20996  in your LyX document.
20997  Similarly for other keywords like Id, Date, Author, etc.
20998  Secondly svn output is dependent on your locales, so its very easy that
20999  svn would produce some problematic strings once Date is used.
21000  Thirdly you get the whole 'Rev: 59' string in your document instead of
21001  the plain number.
21002  Until subversion implements user's custom keywords it will be hard to use
21003  this approach reliably or let LyX to support it directly.
21004 \end_layout
21005
21006 \begin_layout Subsection
21007 SVN and Windows Environment
21008 \end_layout
21009
21010 \begin_layout Quote
21011 My inclination is to say that if the user cannot figure out the command
21012  line operations on their own fairly quickly, they would be well advised
21013  to use TortoiseSVN.
21014  ---P.
21015  A.
21016  Rubin
21017 \end_layout
21018
21019 \begin_layout Subsubsection
21020 Preparation
21021 \end_layout
21022
21023 \begin_layout Standard
21024 In addition to installing LyX, and having access to a Subversion repository,
21025  the user will need to install the Subversion client program.
21026  A Windows installer for the client program is available from 
21027 \begin_inset CommandInset href
21028 LatexCommand href
21029 name "CollabNet"
21030 target "http://www.collab.net/nonav/downloads/subversion/"
21031
21032 \end_inset
21033
21034 .
21035  The user may also want to install 
21036 \begin_inset CommandInset href
21037 LatexCommand href
21038 name "TortoiseSVN"
21039 target "http://tortoisesvn.tigris.org/"
21040
21041 \end_inset
21042
21043 , which integrates Subversion operations into the context (rightclick) menu
21044  of Windows Explorer.
21045  Operations done outside LyX will typically be more convenient using the
21046  Explorer context menu.
21047  Note that TortoiseSVN is not a replacement for the client program, which
21048  is what LyX itself will use.
21049 \end_layout
21050
21051 \begin_layout Subsubsection
21052 Bringing a document under Subversion control
21053 \end_layout
21054
21055 \begin_layout Standard
21056 Before a LyX document can be brought under version control in Subversion,
21057  its parent directory needs to be under version control.
21058  If the document is being added to a project already in the repository,
21059  this is accomplished by checking the project out to the directory where
21060  the new document will be placed.
21061  If the project itself is not yet under version control (for instance, if
21062  this document starts a new project), the directory must be imported into
21063  the repository.
21064  This is done outside LyX.
21065  Both import and checkout are easily accomplished from the Explorer context
21066  menu using TortoiseSVN, or alternatively can be done using the command
21067  line client at a DOS prompt.
21068  The procedure for importing the project using TortoiseSVN is described
21069  below, assuming an existing repository and a new project being started
21070  in 
21071 \family typewriter
21072 C:
21073 \backslash
21074 new project
21075 \family default
21076 .
21077  For information on using the Subversion client program, run 
21078 \family typewriter
21079 svn --help 
21080 \family default
21081 in a DOS shell.
21082 \end_layout
21083
21084 \begin_layout Enumerate
21085 Locate 
21086 \family typewriter
21087 C:
21088 \backslash
21089 new project 
21090 \family default
21091 in Windows Explorer, right click it, and select 
21092 \family typewriter
21093 TortoiseSVN > Repo-browser
21094 \family default
21095 .
21096  If necessary, adjust the URL for the repository, then click OK.
21097 \end_layout
21098
21099 \begin_layout Enumerate
21100 Right click the level of the repository under which you want to place the
21101  new project folder (typically the top level) and click 
21102 \family typewriter
21103 Create folder\SpecialChar \ldots{}
21104
21105 \family default
21106  Supply a name for the project folder and click OK.
21107  Add a message for the log file if desired, then click OK again.
21108  The new project folder should appear in the repository.
21109  Finally, click OK again to exit the repository browser.
21110 \end_layout
21111
21112 \begin_layout Enumerate
21113 Once again right click 
21114 \family typewriter
21115 C:
21116 \backslash
21117 new project
21118 \family default
21119 , this time selecting SVN Checkout\SpecialChar \ldots{}
21120  Select the URL of the project folder
21121  you just created in the repository, and set the checkout directory to 
21122 \family typewriter
21123 C:
21124 \backslash
21125 new project.
21126
21127 \family default
21128  Click OK.
21129  You will be warned about a non-empty folder; click OK to proceed.
21130  You should now have a 
21131 \family typewriter
21132 .svn
21133 \family default
21134  directory under 
21135 \family typewriter
21136 C:
21137 \backslash
21138 new project.
21139 \end_layout
21140
21141 \begin_layout Enumerate
21142 Create or open your document in LyX and click 
21143 \family sans
21144 \bar under
21145 F
21146 \bar default
21147 ile\SpecialChar \menuseparator
21148
21149 \bar under
21150 V
21151 \bar default
21152 ersion
21153 \begin_inset space ~
21154 \end_inset
21155
21156 Control\SpecialChar \menuseparator
21157
21158 \bar under
21159 R
21160 \bar default
21161 egister.
21162  
21163 \family default
21164 Add a log message and click OK to commit the document to version control.
21165 \end_layout
21166
21167 \begin_layout Standard
21168 From this point onward, you should have full functionality in the 
21169 \family sans
21170 \bar under
21171 F
21172 \bar default
21173 ile\SpecialChar \menuseparator
21174
21175 \bar under
21176 V
21177 \bar default
21178 ersion
21179 \begin_inset space ~
21180 \end_inset
21181
21182 Control
21183 \family default
21184  menu.
21185  You also have the option of checking the document in and out, viewing its
21186  history, etc.
21187  using the TortoiseSVN context menu in Windows Explorer or the Subversion
21188  client program from a command prompt.
21189 \end_layout
21190
21191 \begin_layout Subsubsection
21192 SSH tunnel used with SVN under Windows
21193 \end_layout
21194
21195 \begin_layout Standard
21196 Compared with Linux setting up svn client to communicate over ssh under
21197  Windows is a rather troublesome task.
21198  We will at least offer some hints how to setup the client side but prior
21199  knowledge about ssh and the Windows command line is needed, also be prepared
21200  for a great deal of frustration\SpecialChar \ldots{}
21201
21202 \end_layout
21203
21204 \begin_layout Enumerate
21205 Get a svn client for windows, as described in the previous sections.
21206  When it is a fresh install run some svn command (e.g.
21207  
21208 \begin_inset Flex Code
21209 status collapsed
21210
21211 \begin_layout Plain Layout
21212 svn --version
21213 \end_layout
21214
21215 \end_inset
21216
21217 ) to create config files, which you will need to change later on.
21218 \end_layout
21219
21220 \begin_layout Enumerate
21221 Choose a ssh client for Windows.
21222  There are several possibilities, we will use the one from Putty tools
21223 \begin_inset Foot
21224 status open
21225
21226 \begin_layout Plain Layout
21227 \begin_inset Flex URL
21228 status collapsed
21229
21230 \begin_layout Plain Layout
21231
21232 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21233 \end_layout
21234
21235 \end_inset
21236
21237
21238 \end_layout
21239
21240 \end_inset
21241
21242 .
21243  You will need to set the connection up so that the client doesn't ask for
21244  any password from you.
21245  To keep things easy we will use only keys without any additional password
21246  protection etc.
21247 \end_layout
21248
21249 \begin_deeper
21250 \begin_layout Enumerate
21251 Generate keys by 
21252 \begin_inset Flex Code
21253 status collapsed
21254
21255 \begin_layout Plain Layout
21256 puttygen
21257 \end_layout
21258
21259 \end_inset
21260
21261 .
21262  Save your private .ppk key file and put the public one on the server side.
21263  If the SVN server runs on Linux, note that the format of the public key
21264  is not compatible with Linux openssh and you will need to direcly copy-paste
21265  the key from the “
21266 \emph on
21267 Public key for pasting into OpenSSH authorized_keys file
21268 \emph default
21269 :” edit field into the server's 
21270 \begin_inset Flex Code
21271 status collapsed
21272
21273 \begin_layout Plain Layout
21274 ~/.ssh/authorized_keys
21275 \end_layout
21276
21277 \end_inset
21278
21279
21280 \begin_inset Flex Code
21281 status collapsed
21282
21283 \begin_layout Plain Layout
21284 authorized_keys2
21285 \end_layout
21286
21287 \end_inset
21288
21289  file.
21290 \end_layout
21291
21292 \begin_layout Enumerate
21293 Get the Putty's 
21294 \begin_inset Flex Code
21295 status collapsed
21296
21297 \begin_layout Plain Layout
21298 plink
21299 \end_layout
21300
21301 \end_inset
21302
21303 .
21304  In the SVN config file
21305 \begin_inset Foot
21306 status collapsed
21307
21308 \begin_layout Plain Layout
21309 Exact path depends on Windows version, usually somewhere around 
21310 \begin_inset Flex Code
21311 status collapsed
21312
21313 \begin_layout Plain Layout
21314 c:
21315 \backslash
21316 Documents and Settings
21317 \backslash
21318 user
21319 \backslash
21320 Application Data
21321 \backslash
21322 Subversion
21323 \backslash
21324 config
21325 \end_layout
21326
21327 \end_inset
21328
21329  / 
21330 \begin_inset Flex Code
21331 status collapsed
21332
21333 \begin_layout Plain Layout
21334 AppData
21335 \backslash
21336 Roaming
21337 \backslash
21338 Subversion
21339 \end_layout
21340
21341 \end_inset
21342
21343 .
21344 \end_layout
21345
21346 \end_inset
21347
21348 , section [tunnels], setup ssh command, e.g.
21349  
21350 \begin_inset Flex Code
21351 status collapsed
21352
21353 \begin_layout Plain Layout
21354 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21355 \end_layout
21356
21357 \end_inset
21358
21359 .
21360 \begin_inset Foot
21361 status collapsed
21362
21363 \begin_layout Plain Layout
21364 It will usually take a lot of time to get exact command right and it depends
21365  on many things.
21366  For example do not have some remote server saved as a default session in
21367  Putty etc.
21368  If things fail, try to connect via plink without SVN first.
21369 \end_layout
21370
21371 \end_inset
21372
21373
21374 \end_layout
21375
21376 \end_deeper
21377 \begin_layout Enumerate
21378 Checkout the SVN archive, e.g.
21379  
21380 \begin_inset Flex Code
21381 status collapsed
21382
21383 \begin_layout Plain Layout
21384 svn co svn+ssh://user@server/repository_path
21385 \end_layout
21386
21387 \end_inset
21388
21389 .
21390 \end_layout
21391
21392 \begin_layout Subsubsection
21393 End-of-Line Conversions
21394 \end_layout
21395
21396 \begin_layout Standard
21397 When the collsraborators are mixing Linux and Windows environments, LyX
21398  will use different line endings inside the .lyx files.
21399  This is not a problem as far as LyX functionality is concerned, but the
21400  commit diffs will be huge and merge-conflicts prone.
21401  Fortunately SVN itself knows
21402 \begin_inset Foot
21403 status collapsed
21404
21405 \begin_layout Plain Layout
21406 \begin_inset Flex URL
21407 status collapsed
21408
21409 \begin_layout Plain Layout
21410
21411 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21412 \end_layout
21413
21414 \end_inset
21415
21416
21417 \end_layout
21418
21419 \end_inset
21420
21421  how to deal with CR/LF problems when switching .lyx files to the 
21422 \begin_inset Flex Code
21423 status collapsed
21424
21425 \begin_layout Plain Layout
21426 native
21427 \end_layout
21428
21429 \end_inset
21430
21431  mode.
21432 \begin_inset Foot
21433 status collapsed
21434
21435 \begin_layout Plain Layout
21436 For the lazy guys: 
21437 \begin_inset Flex Code
21438 status collapsed
21439
21440 \begin_layout Plain Layout
21441 svn propset svn:eol-style native FILE_NAME
21442 \end_layout
21443
21444 \end_inset
21445
21446
21447 \end_layout
21448
21449 \end_inset
21450
21451
21452 \end_layout
21453
21454 \begin_layout Subsection
21455 Further tuning
21456 \end_layout
21457
21458 \begin_layout Standard
21459 With the recent addition of the vc-command function LyX power users are
21460  allowed to create their own commands for revision control.
21461 \end_layout
21462
21463 \begin_layout Standard
21464 As an example you can see how two TortoiseSVN commands could be integrated
21465  directly:
21466 \end_layout
21467
21468 \begin_layout Description
21469 Commit: 
21470 \begin_inset Flex Code
21471 status collapsed
21472
21473 \begin_layout Plain Layout
21474 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21475 \end_layout
21476
21477 \end_inset
21478
21479
21480 \end_layout
21481
21482 \begin_layout Description
21483 Revert: 
21484 \begin_inset Flex Code
21485 status collapsed
21486
21487 \begin_layout Plain Layout
21488 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21489 \end_layout
21490
21491 \end_inset
21492
21493
21494 \end_layout
21495
21496 \begin_layout Subsection
21497 Version control and Document comparison
21498 \end_layout
21499
21500 \begin_layout Standard
21501 One of the typical uses of version control is to inspect the changes between
21502  revisions, usually by creating 
21503 \begin_inset Flex Code
21504 status collapsed
21505
21506 \begin_layout Plain Layout
21507 diff
21508 \end_layout
21509
21510 \end_inset
21511
21512  dumps.
21513  While this is useful for plain text files, it is much less useful in the
21514  case of LyX files, which have more complicated structure.
21515  Hence we provide binding to the Document comparison feature.
21516  They are two ways of calling this feature - either by direct call of 
21517 \begin_inset Flex Code
21518 status collapsed
21519
21520 \begin_layout Plain Layout
21521 VC_COMPARE
21522 \end_layout
21523
21524 \end_inset
21525
21526  LyX function (for details see LyX functions manual) or by icon/menu item
21527  
21528 \begin_inset Flex MenuItem
21529 status collapsed
21530
21531 \begin_layout Plain Layout
21532 Compare with older revision...
21533 \end_layout
21534
21535 \end_inset
21536
21537 .
21538  One can either compare two chosen revisions of the document or he can simply
21539  compare the current version of edited text with older revisions (where
21540  '
21541 \begin_inset Flex MenuItem
21542 status collapsed
21543
21544 \begin_layout Plain Layout
21545 0
21546 \end_layout
21547
21548 \end_inset
21549
21550 ' revisions back means comparison of the edited file with last commited
21551  revision).
21552  
21553 \end_layout
21554
21555 \begin_layout Standard
21556 This feature is supported for SVN and RCS though due to the more complicated
21557  versioning scheme of RCS there is a constraint -- when addressing the revisions
21558  in dialog, numbers always point to the last number in RCS revision number,
21559  i.e.
21560  '35' in '1.2.35'.
21561 \end_layout
21562
21563 \begin_layout Section
21564 Literate Programming
21565 \end_layout
21566
21567 \begin_layout Standard
21568 Updated by 
21569 \noun on
21570 Kayvan Sylvan 
21571 \noun default
21572 (kayvan@sylvan.com)
21573 \noun on
21574
21575 \noun default
21576 original documentation written by 
21577 \noun on
21578 Edmar Wienskoski Jr.
21579
21580 \noun default
21581  (edmar-w-jr@technologist.com)
21582 \end_layout
21583
21584 \begin_layout Subsection
21585 Introduction
21586 \end_layout
21587
21588 \begin_layout Standard
21589 The main purpose of this documentation is to show you how to use LyX for
21590  literate programming, where it is assumed that you are familiar with this
21591  programming technique, and know what 
21592 \begin_inset Quotes eld
21593 \end_inset
21594
21595 tangling
21596 \begin_inset Quotes erd
21597 \end_inset
21598
21599  and 
21600 \begin_inset Quotes eld
21601 \end_inset
21602
21603 weaving
21604 \begin_inset Quotes erd
21605 \end_inset
21606
21607  means.
21608  If that is not the case, please follow the web links provided in the following
21609  sections.
21610  There is a lot of good documentation out there covering old development
21611  history to the latest tools tips.
21612 \end_layout
21613
21614 \begin_layout Standard
21615 It is also assumed that you are familiar with LyX itself to a point that
21616  you are comfortable changing your LyX preferences, and X resources file.
21617  If that is not the case please refer to other LyX documentation to cover
21618  your specific needs.
21619 \end_layout
21620
21621 \begin_layout Subsection
21622 Literate Programming
21623 \end_layout
21624
21625 \begin_layout Standard
21626 From the Literate Programming FAQ: 
21627 \end_layout
21628
21629 \begin_layout Quotation
21630 Literate programming is the combination of documentation and source together
21631  in a fashion suited for reading by human beings.
21632  In fact, literate programs should be enjoyable reading, even inviting!
21633  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21634  and documentation in a single file.
21635  Literate programming tools then parse the file to produce either readable
21636  documentation or compilable source.
21637  The WEB style of literate programming was created by D.
21638 \begin_inset space \thinspace{}
21639 \end_inset
21640
21641 E.
21642  Knuth during the development of his TeX typesetting software.
21643  
21644 \end_layout
21645
21646 \begin_layout Standard
21647 Another excerpt says:
21648 \end_layout
21649
21650 \begin_layout Quotation
21651
21652 \emph on
21653 How is literate programming different from verbose commenting?
21654 \end_layout
21655
21656 \begin_layout Quotation
21657 There are three distinguishing characteristics.
21658  In order of importance, they are: 
21659 \end_layout
21660
21661 \begin_deeper
21662 \begin_layout Itemize
21663 flexible order of elaboration 
21664 \end_layout
21665
21666 \begin_layout Itemize
21667 automatic support for browsing 
21668 \end_layout
21669
21670 \begin_layout Itemize
21671 typeset documentation, especially diagrams and mathematics 
21672 \end_layout
21673
21674 \end_deeper
21675 \begin_layout Standard
21676 Now that I sparked your curiosity, take a look in the references.
21677 \end_layout
21678
21679 \begin_layout Subsubsection
21680 References
21681 \end_layout
21682
21683 \begin_layout Standard
21684 The complete Literate Programming FAQ can be found at:
21685 \end_layout
21686
21687 \begin_layout Quote
21688 Literate Programming FAQ 
21689 \begin_inset Flex URL
21690 status collapsed
21691
21692 \begin_layout Plain Layout
21693
21694 http://www.literateprogramming.com/lpfaq.pdf
21695 \end_layout
21696
21697 \end_inset
21698
21699
21700 \end_layout
21701
21702 \begin_layout Standard
21703 The FAQ lists 23 (twenty three!) different literate programming tools.
21704  Where some are specialized or 
21705 \begin_inset Quotes eld
21706 \end_inset
21707
21708 tailored
21709 \begin_inset Quotes erd
21710 \end_inset
21711
21712  for particular programming languages, while other have general scope.
21713  I selected 
21714 \noun on
21715 Noweb
21716 \noun default
21717  for my own use for several reasons:
21718 \end_layout
21719
21720 \begin_layout Itemize
21721 It can generate the documentation either in LaTeX or HTML.
21722 \end_layout
21723
21724 \begin_layout Itemize
21725 It has a open architecture, i.
21726 \begin_inset space \thinspace{}
21727 \end_inset
21728
21729 g.
21730 \begin_inset space \space{}
21731 \end_inset
21732
21733 it is easy to plug in new filters and to perform special processing that
21734  you may need.
21735  
21736 \end_layout
21737
21738 \begin_layout Itemize
21739 There is a good selection of filters available already (the HTML is one
21740  of them).
21741 \end_layout
21742
21743 \begin_layout Itemize
21744 It is free.
21745 \end_layout
21746
21747 \begin_layout Standard
21748 The Noweb web page can be found at: 
21749 \end_layout
21750
21751 \begin_layout Quote
21752 Noweb home page 
21753 \begin_inset Flex URL
21754 status collapsed
21755
21756 \begin_layout Plain Layout
21757
21758 http://www.cs.virginia.edu/~nr/noweb/
21759 \end_layout
21760
21761 \end_inset
21762
21763
21764 \end_layout
21765
21766 \begin_layout Standard
21767 Starting from there you can reach many other interesting links and even
21768  some literate program examples.
21769 \end_layout
21770
21771 \begin_layout Subsection
21772 LyX and Literate Programming
21773 \end_layout
21774
21775 \begin_layout Standard
21776 The LyX support for Literate Programming is provided by using the generic
21777  LyX converters mechanism.
21778  This support is provided in a 
21779 \begin_inset Quotes eld
21780 \end_inset
21781
21782 Noweb independent
21783 \begin_inset Quotes erd
21784 \end_inset
21785
21786  way, i.
21787 \begin_inset space \thinspace{}
21788 \end_inset
21789
21790 g.
21791 \begin_inset space \space{}
21792 \end_inset
21793
21794 you will be able to use this new LyX feature with some other literate programmin
21795 g tool of your choice by just changing your LyX preferences.
21796 \end_layout
21797
21798 \begin_layout Subsubsection
21799 Generating documents and code (weaving and tangling)
21800 \end_layout
21801
21802 \begin_layout Paragraph
21803 Selecting the document class
21804 \end_layout
21805
21806 \begin_layout Standard
21807 If you have installed Noweb and LyX successfully, whenever you open a new
21808  document or try to change the document class of an existing one, you will
21809  find that there are three new document classes available:
21810 \end_layout
21811
21812 \begin_layout Itemize
21813 Article (Noweb)
21814 \end_layout
21815
21816 \begin_layout Itemize
21817 Book (Noweb)
21818 \end_layout
21819
21820 \begin_layout Itemize
21821 Report (Noweb)
21822 \end_layout
21823
21824 \begin_layout Standard
21825 You must select one of them to create your literate documents from.
21826  
21827 \end_layout
21828
21829 \begin_layout Standard
21830 Note that literate documents are not limited to these three classes.
21831  New classes can be generated from other styles like letter or in combination
21832  with other class variations like Article (AMS).
21833  If you have special needs that cannot be covered by one of the existing
21834  classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21835  will arrange to insert a new entry, or teach you how to do it.
21836 \begin_inset Foot
21837 status collapsed
21838
21839 \begin_layout Plain Layout
21840 It is very simple, it involves the creation of a file with four lines, and
21841  re-running of the auto configuration.
21842 \end_layout
21843
21844 \end_inset
21845
21846  Moreover, if you use a literate tool other than Noweb you may need to create
21847  a new set of document classes for it.
21848 \end_layout
21849
21850 \begin_layout Paragraph
21851 Typing code in
21852 \end_layout
21853
21854 \begin_layout Standard
21855 LyX enables you to write code with a layout named 
21856 \noun on
21857 Scrap
21858 \noun default
21859 .
21860 \begin_inset Foot
21861 status collapsed
21862
21863 \begin_layout Plain Layout
21864 The equivalent Noweb term is 
21865 \begin_inset Quotes eld
21866 \end_inset
21867
21868 Chunk
21869 \begin_inset Quotes erd
21870 \end_inset
21871
21872 .
21873  For historical reasons, I got used to the term 
21874 \begin_inset Quotes eld
21875 \end_inset
21876
21877 scrap
21878 \begin_inset Quotes erd
21879 \end_inset
21880
21881  introduced by other literate tool named Nuweb, which I used for many years
21882  before rendering myself to Noweb.
21883 \end_layout
21884
21885 \end_inset
21886
21887  Noweb delimits scraps like this:
21888 \end_layout
21889
21890 \begin_layout LyX-Code
21891 <<My scrap>>=
21892 \end_layout
21893
21894 \begin_layout LyX-Code
21895   code
21896 \end_layout
21897
21898 \begin_layout LyX-Code
21899   more code
21900 \end_layout
21901
21902 \begin_layout LyX-Code
21903   even more code
21904 \end_layout
21905
21906 \begin_layout LyX-Code
21907   @
21908 \end_layout
21909
21910 \begin_layout Standard
21911 The problem is that whatever is written in between the << and the 
21912 \family typewriter
21913 @
21914 \family default
21915  must be taken literally, i.
21916 \begin_inset space \thinspace{}
21917 \end_inset
21918
21919 g.
21920 \begin_inset space \space{}
21921 \end_inset
21922
21923 LyX should be prevented from making any special interpretation of what has
21924  been written.
21925  This is handled by a special layout named Scrap, that works like a normal
21926  paragraph but has a free spacing capability.
21927 \end_layout
21928
21929 \begin_layout Standard
21930 The down side of the Scrap paragraph layout is that consecutive paragraphs
21931  of code will be spaced with one empty line in the source code and also
21932  in the printed documentation.
21933  The work around is to enter each line of code within a single Scrap, with
21934  a newline (ctrl-return).
21935  The example above will look like this:
21936 \begin_inset Foot
21937 status collapsed
21938
21939 \begin_layout Plain Layout
21940 If you have a printed version of this document you will not see any difference
21941  between the previous example and this one.
21942 \end_layout
21943
21944 \end_inset
21945
21946
21947 \end_layout
21948
21949 \begin_layout LyX-Code
21950 <<My scrap>>=
21951 \begin_inset Newline newline
21952 \end_inset
21953
21954   code
21955 \begin_inset Newline newline
21956 \end_inset
21957
21958   more code
21959 \begin_inset Newline newline
21960 \end_inset
21961
21962   even more code
21963 \begin_inset Newline newline
21964 \end_inset
21965
21966   @
21967 \end_layout
21968
21969 \begin_layout Standard
21970 This layout works fine.
21971  The only real inconvenience is that you have to type ctrl-return instead
21972  of a plain return.
21973 \begin_inset Foot
21974 status collapsed
21975
21976 \begin_layout Plain Layout
21977 It is in my list of 
21978 \begin_inset Quotes eld
21979 \end_inset
21980
21981 improvements
21982 \begin_inset Quotes erd
21983 \end_inset
21984
21985  to fix that.
21986 \end_layout
21987
21988 \end_inset
21989
21990
21991 \end_layout
21992
21993 \begin_layout Standard
21994 As a special note, you can also use the 
21995 \begin_inset Quotes eld
21996 \end_inset
21997
21998 %def
21999 \begin_inset Quotes erd
22000 \end_inset
22001
22002  construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
22003 rence:
22004 \end_layout
22005
22006 \begin_layout LyX-Code
22007 <<My scrap>>=
22008 \begin_inset Newline newline
22009 \end_inset
22010
22011   def some_function(args):
22012 \begin_inset Newline newline
22013 \end_inset
22014
22015     "This is the doc string for this function."
22016 \begin_inset Newline newline
22017 \end_inset
22018
22019     print "My args: ", args
22020 \end_layout
22021
22022 \begin_layout LyX-Code
22023 @ %def some_function
22024 \end_layout
22025
22026 \begin_layout Standard
22027 For an example of this usage and the resulting cross-reference output, look
22028  at the Literate python program in 
22029 \emph on
22030 LIBDIR/examples/listerrors.lyx
22031 \emph default
22032  which should make this all clear.
22033 \end_layout
22034
22035 \begin_layout Paragraph
22036 Generating the documentation
22037 \end_layout
22038
22039 \begin_layout Standard
22040 At this point you already have a new document file with a proper document
22041  class, and with some code and text on it.
22042  How do I print it? The answer is simple, you select 
22043 \family sans
22044 View\SpecialChar \menuseparator
22045 DVI,
22046 \family default
22047  etc.
22048  Just like you would do for a plain document.
22049  No special procedure is required.
22050 \end_layout
22051
22052 \begin_layout Standard
22053 To help orientate you, I will now explain what happens inside LyX:
22054 \end_layout
22055
22056 \begin_layout Enumerate
22057 When the 
22058 \family sans
22059 Update\SpecialChar \menuseparator
22060 DVI
22061 \family default
22062  menu option is chosen, a LaTeX file is generated.
22063  
22064 \end_layout
22065
22066 \begin_deeper
22067 \begin_layout Standard
22068 If the document is of any literate class the generated file will be named
22069  with an extension name defined by the 
22070 \begin_inset Quotes eld
22071 \end_inset
22072
22073 literate
22074 \begin_inset Quotes erd
22075 \end_inset
22076
22077  format (defined in the Preferences panel), otherwise the file will have
22078  the usual 
22079 \family typewriter
22080 .tex
22081 \family default
22082  extension.
22083 \end_layout
22084
22085 \end_deeper
22086 \begin_layout Enumerate
22087 Note that the only difference so far is in the name of the file, no special
22088  processing is required by LyX.
22089  Given that you formatted the code using the Scrap layout that, by itself,
22090  takes care of the business.
22091 \end_layout
22092
22093 \begin_layout Enumerate
22094 If the document is of any literate class LyX will then use the internal
22095  LyX to Noweb converter, followed by the Noweb to LaTeX converter
22096 \begin_inset Foot
22097 status collapsed
22098
22099 \begin_layout Plain Layout
22100 The converters are defined in the 
22101 \family sans
22102 Tools\SpecialChar \menuseparator
22103 Preferences
22104 \family default
22105  panel, under the 
22106 \begin_inset Quotes eld
22107 \end_inset
22108
22109 Conversion
22110 \begin_inset Quotes erd
22111 \end_inset
22112
22113  tab.
22114  See section 
22115 \emph on
22116 Converters
22117 \emph default
22118  of the 
22119 \emph on
22120 Customization
22121 \emph default
22122  manual for general information about converters.
22123 \end_layout
22124
22125 \end_inset
22126
22127  to generate the LaTeX file.
22128 \end_layout
22129
22130 \begin_deeper
22131 \begin_layout Standard
22132 Otherwise it will just skip this step.
22133 \end_layout
22134
22135 \end_deeper
22136 \begin_layout Enumerate
22137 Finally, LaTeX is invoked and the regular post processing continues as in
22138  a plain document.
22139 \end_layout
22140
22141 \begin_layout Standard
22142 Independence from a particular 
22143 \begin_inset Quotes eld
22144 \end_inset
22145
22146 literate tool
22147 \begin_inset Quotes erd
22148 \end_inset
22149
22150  is easily achieved by changing the commands that are run by the various
22151  converters.
22152 \end_layout
22153
22154 \begin_layout Paragraph
22155 Generating the code
22156 \end_layout
22157
22158 \begin_layout Standard
22159 When the build menu option is chosen or the corresponding button in the
22160  toolbar is pressed, a LaTeX file is generated just like step 1 above.
22161  Next, LyX invokes the 
22162 \family typewriter
22163 Noweb->Program
22164 \family default
22165  converter.
22166  This converter needs to be defined by the user and is not installed by
22167  default, though the Program format is.
22168  This converter (like any other converter) will have two parts:
22169 \end_layout
22170
22171 \begin_layout Enumerate
22172 The converter program itself.
22173  This program performs the conversion from the one format to the other (in
22174  this case, from the Noweb format to the Program pseudo-format).
22175 \end_layout
22176
22177 \begin_layout Enumerate
22178 The error log parser.
22179  This is a program whose sole purpose is to rewrite error messages in a
22180  format that LyX understands.
22181  This makes it possible for LyX to place error boxes in the right places
22182  in the file buffer.
22183 \end_layout
22184
22185 \begin_layout Standard
22186 The first part, the 
22187 \begin_inset Quotes eld
22188 \end_inset
22189
22190 Converter
22191 \begin_inset Quotes erd
22192 \end_inset
22193
22194  setting, should be set to 
22195 \begin_inset Quotes eld
22196 \end_inset
22197
22198
22199 \family typewriter
22200 build-script $$i
22201 \family default
22202
22203 \begin_inset Quotes erd
22204 \end_inset
22205
22206 .
22207  This basically means that LyX will call 
22208 \begin_inset Quotes eld
22209 \end_inset
22210
22211 build-script
22212 \begin_inset Quotes erd
22213 \end_inset
22214
22215  (a program or script) with the name of the Noweb file (normally a file
22216  in the LyX temp directory).
22217  
22218 \end_layout
22219
22220 \begin_layout Standard
22221 This is an implementation of 
22222 \begin_inset Quotes eld
22223 \end_inset
22224
22225 build-script
22226 \begin_inset Quotes erd
22227 \end_inset
22228
22229  that you can place in a directory on your path:
22230 \end_layout
22231
22232 \begin_layout LyX-Code
22233 #!/bin/sh
22234 \end_layout
22235
22236 \begin_layout LyX-Code
22237 #
22238 \end_layout
22239
22240 \begin_layout LyX-Code
22241 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
22242 \end_layout
22243
22244 \begin_layout Standard
22245 The next part of the converter setting is the 
22246 \begin_inset Quotes eld
22247 \end_inset
22248
22249 Flags
22250 \begin_inset Quotes erd
22251 \end_inset
22252
22253  which is to be set to 
22254 \begin_inset Quotes eld
22255 \end_inset
22256
22257
22258 \family typewriter
22259 parselog=listerrors
22260 \family default
22261
22262 \begin_inset Quotes erd
22263 \end_inset
22264
22265 .
22266  This will run any errors that are generated by the 
22267 \begin_inset Quotes eld
22268 \end_inset
22269
22270 build-script
22271 \begin_inset Quotes erd
22272 \end_inset
22273
22274  process through the 
22275 \begin_inset Quotes eld
22276 \end_inset
22277
22278 listerrors
22279 \begin_inset Quotes erd
22280 \end_inset
22281
22282  program.
22283 \end_layout
22284
22285 \begin_layout Standard
22286 The converter code looks in 
22287 \emph on
22288 MYLYXDIR/scripts
22289 \emph default
22290  first, then in 
22291 \emph on
22292 LIBDIR/scripts
22293 \emph default
22294  then on the path for the 
22295 \begin_inset Quotes eld
22296 \end_inset
22297
22298 listerrors
22299 \begin_inset Quotes erd
22300 \end_inset
22301
22302  program.
22303 \end_layout
22304
22305 \begin_layout Standard
22306 The build will normally take place in LyX's temporary directory, so the
22307  files produced by the conversion will be in that directory.
22308  LyX will copy out what it regards as the `main' file, but the 
22309 \family typewriter
22310 Noweb->Program
22311 \family default
22312  conversion may produce several files, and so most of these would then be
22313  deleted when LyX was closed.
22314  The present solution is to use a `copier',
22315 \begin_inset Foot
22316 status collapsed
22317
22318 \begin_layout Plain Layout
22319 See section 
22320 \emph on
22321 Copiers
22322 \emph default
22323  of the 
22324 \emph on
22325 Customization
22326 \emph default
22327  manual for information on these.
22328 \end_layout
22329
22330 \end_inset
22331
22332  in this case, the 
22333 \family typewriter
22334 ext_copy.py
22335 \family default
22336  script in its default mode, so that the entire contents of the temporary
22337  directory is copied.
22338  More will get copied than is needed, to be sure, but nothing will be lost.
22339  If, however, you know what extensions the generated files will have, this
22340  can be improved by using the 
22341 \family typewriter
22342 -e
22343 \family default
22344  option to 
22345 \family typewriter
22346 ext_copy
22347 \family default
22348 .
22349  This option takes a comma-separated list of extensions to copy.
22350  So, for example, if the conversion will generate only files with the extensions
22351  
22352 \family typewriter
22353 .c
22354 \family default
22355  and 
22356 \family typewriter
22357 .h
22358 \family default
22359 , then the correct definition would be:
22360 \end_layout
22361
22362 \begin_layout LyX-Code
22363 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
22364 \end_layout
22365
22366 \begin_layout Standard
22367 The result will be that only files with these two extensions will be copied
22368  out.
22369 \end_layout
22370
22371 \begin_layout Paragraph
22372 Build instructions in the document
22373 \end_layout
22374
22375 \begin_layout Standard
22376 The last piece of the integration between LyX and noweb is the 
22377 \begin_inset Quotes eld
22378 \end_inset
22379
22380 build-script
22381 \begin_inset Quotes erd
22382 \end_inset
22383
22384  scrap.
22385  Generally, the instructions for building your program should be embedded
22386  in a scrap of its own.
22387  The noweb-specific 
22388 \begin_inset Quotes eld
22389 \end_inset
22390
22391 build-script
22392 \begin_inset Quotes erd
22393 \end_inset
22394
22395  above uses the notangle command to look for this scrap (called 
22396 \begin_inset Quotes eld
22397 \end_inset
22398
22399 build-script
22400 \begin_inset Quotes erd
22401 \end_inset
22402
22403 ) and runs its contents through 
22404 \begin_inset Quotes eld
22405 \end_inset
22406
22407 sh
22408 \begin_inset Quotes erd
22409 \end_inset
22410
22411 .
22412 \end_layout
22413
22414 \begin_layout Standard
22415 Typically, such a scrap would look something like this:
22416 \end_layout
22417
22418 \begin_layout LyX-Code
22419 <<build-script>>=
22420 \begin_inset Newline newline
22421 \end_inset
22422
22423 #!/bin/sh
22424 \begin_inset Newline newline
22425 \end_inset
22426
22427
22428 \begin_inset Newline newline
22429 \end_inset
22430
22431 if [ -z "${NOWEB_SOURCE}" ]
22432 \begin_inset Newline newline
22433 \end_inset
22434
22435 then
22436 \begin_inset Newline newline
22437 \end_inset
22438
22439   NOWEB_SOURCE=myfile.nw
22440 \begin_inset Newline newline
22441 \end_inset
22442
22443 fi
22444 \begin_inset Newline newline
22445 \end_inset
22446
22447 [...
22448  code to extract files ...]
22449 \begin_inset Newline newline
22450 \end_inset
22451
22452 [...
22453  code to compile files ...]
22454 \begin_inset Newline newline
22455 \end_inset
22456
22457 @
22458 \end_layout
22459
22460 \begin_layout Standard
22461 Look in 
22462 \emph on
22463 LIBDIR/examples/listerrors.lyx
22464 \emph default
22465  or in 
22466 \emph on
22467 LIBDIR/examples/Literate.lyx
22468 \emph default
22469  which implement two versions of the 
22470 \begin_inset Quotes eld
22471 \end_inset
22472
22473 listerrors
22474 \begin_inset Quotes erd
22475 \end_inset
22476
22477  program for some illustrations of how all of these pieces go together or
22478  in 
22479 \emph on
22480 LIBDIR/examples/noweb2lyx.lyx.
22481
22482 \emph default
22483  Interestingly, these three files show off the language-indepence of the
22484  LyX literate programming support since they are written in Python, C and
22485  Perl respectively.
22486 \end_layout
22487
22488 \begin_layout Subsubsection
22489 Configuring LyX
22490 \end_layout
22491
22492 \begin_layout Standard
22493 All the Literate Programming support is configured by the 
22494 \family sans
22495 Tools\SpecialChar \menuseparator
22496 Preferences
22497 \family default
22498  panel in the 
22499 \begin_inset Quotes eld
22500 \end_inset
22501
22502 Conversion
22503 \begin_inset Quotes erd
22504 \end_inset
22505
22506  tab.
22507  The important parts are:
22508 \end_layout
22509
22510 \begin_layout Description
22511 the
22512 \begin_inset space ~
22513 \end_inset
22514
22515
22516 \begin_inset Quotes eld
22517 \end_inset
22518
22519 literate
22520 \begin_inset Quotes erd
22521 \end_inset
22522
22523
22524 \begin_inset space ~
22525 \end_inset
22526
22527 format Set up via the Formats tab, this is where the Noweb-specific pieces
22528  are set up.
22529  The 
22530 \family sans
22531 GUI Name
22532 \family default
22533  is set to 
22534 \family typewriter
22535 NoWeb
22536 \family default
22537 , the file extension is set to 
22538 \family typewriter
22539 .nw
22540 \family default
22541 .
22542  This tells LyX to create a file with a 
22543 \family typewriter
22544 .nw
22545 \family default
22546  extension in the first step of the conversion process.
22547 \end_layout
22548
22549 \begin_layout Description
22550 the
22551 \begin_inset space ~
22552 \end_inset
22553
22554
22555 \family sans
22556 Program
22557 \family default
22558
22559 \begin_inset space ~
22560 \end_inset
22561
22562 format This is an empty format whose sole purpose is to be the endpoint
22563  of a conversion (which then allows us to set up a converter for it).
22564 \end_layout
22565
22566 \begin_layout Description
22567
22568 \family sans
22569 NoWeb
22570 \family default
22571 ->
22572 \family sans
22573 LaTeX
22574 \family default
22575  This converter performs the 
22576 \begin_inset Quotes eld
22577 \end_inset
22578
22579 weaving
22580 \begin_inset Quotes erd
22581 \end_inset
22582
22583  of the literate document.
22584  For Noweb, it is set to 
22585 \begin_inset Quotes eld
22586 \end_inset
22587
22588
22589 \family typewriter
22590 noweave -delay -index $$i > $$o
22591 \family default
22592
22593 \begin_inset Quotes erd
22594 \end_inset
22595
22596
22597 \end_layout
22598
22599 \begin_layout Description
22600
22601 \family sans
22602 NoWeb
22603 \family default
22604 ->
22605 \family sans
22606 Program
22607 \family default
22608  This performs the 
22609 \begin_inset Quotes eld
22610 \end_inset
22611
22612 tangling step
22613 \begin_inset Quotes erd
22614 \end_inset
22615
22616 .
22617  As stated above, the Converter is set to 
22618 \begin_inset Quotes eld
22619 \end_inset
22620
22621
22622 \family typewriter
22623 build-script $$i
22624 \family default
22625
22626 \begin_inset Quotes erd
22627 \end_inset
22628
22629 , with Flags set to 
22630 \begin_inset Quotes eld
22631 \end_inset
22632
22633
22634 \family typewriter
22635 originaldir,parselog=listerrors
22636 \family default
22637
22638 \begin_inset Quotes erd
22639 \end_inset
22640
22641 .
22642 \end_layout
22643
22644 \begin_layout Subsubsection
22645 Debug extensions
22646 \end_layout
22647
22648 \begin_layout Standard
22649 There is also a new function implemented in the LyX server, the 
22650 \begin_inset Quotes eld
22651 \end_inset
22652
22653 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22654  
22655 \end_layout
22656
22657 \begin_layout Standard
22658 When debugging code with ddd/gdb, it is possible to invoke a text editor
22659  at the current execution position with a single key stroke.
22660  The default ddd configuration for that is shift-ctrl-V.
22661  It happens that you can define the editor command line invocation in ddd
22662  by accessing the 
22663 \family sans
22664 Edit\SpecialChar \menuseparator
22665 Preferences\SpecialChar \menuseparator
22666 Helpers
22667 \family default
22668  dialog and changing the "Edit Sources" entry.
22669 \end_layout
22670
22671 \begin_layout Standard
22672 I take advantage of the new created LyX server function and this ddd feature,
22673  and set 
22674 \begin_inset Quotes eld
22675 \end_inset
22676
22677 Edit Sources
22678 \begin_inset Quotes erd
22679 \end_inset
22680
22681  to:
22682 \end_layout
22683
22684 \begin_layout LyX-Code
22685 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22686 \end_layout
22687
22688 \begin_layout Standard
22689 With this, whenever you are using ddd and find a point in the program that
22690  you want to edit, you just press shift-ctrl-V (in the ddd window), and
22691  ddd you forward this information to LyX through the LyX server and then
22692  the LyX window will show the same file with the cursor at the same position
22693  ddd was pointing to.
22694  No more guessing or long scrolling to locate a point in the program back
22695  from debugging !
22696 \end_layout
22697
22698 \begin_layout Standard
22699 Note however that you must enable the LyX server to get this feature working
22700  (it is disabled by default).
22701  You can enable it in 
22702 \family sans
22703 Preferences
22704 \family default
22705  (tabs 
22706 \family sans
22707 Inputs
22708 \family default
22709
22710 \family sans
22711 Paths
22712 \family default
22713 ) by entering in the 
22714 \family sans
22715 LyXserver pipe
22716 \family default
22717  a path like 
22718 \begin_inset Quotes eld
22719 \end_inset
22720
22721
22722 \family typewriter
22723 /home/<your-home-directory>/.lyx/lyxpipe
22724 \family default
22725
22726 \begin_inset Quotes erd
22727 \end_inset
22728
22729
22730 \end_layout
22731
22732 \begin_layout Standard
22733 Read the LyX server documentation in the 
22734 \emph on
22735 Customization Manual
22736 \emph default
22737  for further information.
22738 \end_layout
22739
22740 \begin_layout Subsubsection
22741 Toolbar extensions
22742 \end_layout
22743
22744 \begin_layout Standard
22745 There are six new buttons that can be added to your LyX toolbar.
22746  Five of these buttons are short cuts to layout styles: 
22747 \family sans
22748 Standard
22749 \family default
22750
22751 \family sans
22752 Section
22753 \family default
22754
22755 \family sans
22756 LaTeX
22757 \family default
22758
22759 \family sans
22760 LyX-Code
22761 \family default
22762 , and 
22763 \family sans
22764 Scrap
22765 \family default
22766 .
22767  The last one is a short cut to the 
22768 \begin_inset Quotes eld
22769 \end_inset
22770
22771 Build Program
22772 \begin_inset Quotes erd
22773 \end_inset
22774
22775  File menu entry.
22776  
22777 \end_layout
22778
22779 \begin_layout Standard
22780 LyX has a range of buttons that are available for tool bar customization.
22781  In my toolbar I like to combine the six short cuts above with two more:
22782  One for 
22783 \family sans
22784 View
22785 \family default
22786 \SpecialChar \menuseparator
22787
22788 \family sans
22789 Update
22790 \family default
22791 \SpecialChar \menuseparator
22792
22793 \family sans
22794 DVI
22795 \family default
22796  and the other for 
22797 \family sans
22798 View\SpecialChar \menuseparator
22799 DVI
22800 \family default
22801  File menu entries.
22802  Here is how it looks like:
22803 \end_layout
22804
22805 \begin_layout LyX-Code
22806 Toolbar
22807 \end_layout
22808
22809 \begin_layout LyX-Code
22810   Layouts
22811 \end_layout
22812
22813 \begin_layout LyX-Code
22814   Icon "layout Standard"
22815 \end_layout
22816
22817 \begin_layout LyX-Code
22818   Icon "layout Section"
22819 \end_layout
22820
22821 \begin_layout LyX-Code
22822   Icon "layout LaTeX"
22823 \end_layout
22824
22825 \begin_layout LyX-Code
22826   Icon "layout LyX-Code"
22827 \end_layout
22828
22829 \begin_layout LyX-Code
22830   Icon "layout Scrap"
22831 \end_layout
22832
22833 \begin_layout LyX-Code
22834   Separator
22835 \end_layout
22836
22837 \begin_layout LyX-Code
22838   Icon "buffer-view"
22839 \end_layout
22840
22841 \begin_layout LyX-Code
22842   Icon "buffer-typeset"
22843 \end_layout
22844
22845 \begin_layout LyX-Code
22846   Icon "build-program"
22847 \end_layout
22848
22849 \begin_layout LyX-Code
22850   Separator
22851 \end_layout
22852
22853 \begin_layout LyX-Code
22854 .
22855 \end_layout
22856
22857 \begin_layout LyX-Code
22858 .
22859 \end_layout
22860
22861 \begin_layout LyX-Code
22862 .
22863 \end_layout
22864
22865 \begin_layout LyX-Code
22866 End
22867 \end_layout
22868
22869 \begin_layout Subsubsection
22870 Colors customization
22871 \end_layout
22872
22873 \begin_layout Standard
22874 There are a number of colors in LyX that can be customized in 
22875 \family sans
22876 Preferences
22877 \family default
22878 .
22879  One of the things that bothers people is the LaTeX font color.
22880  The default color is red, since the scraps uses LaTeX font, and there is
22881  a lot of scraps in literate documents, you may get tired of seeing everything
22882  in red.
22883  You can change it by going to the tabs 
22884 \family sans
22885 Look&Feel
22886 \family default
22887
22888 \family sans
22889 Colors.
22890 \end_layout
22891
22892 \begin_layout Standard
22893 The next thing is the visible presence of the newline character in the screen.
22894  You can choose the color of this particular character and make it blend
22895  in the background.
22896  I recommend you choosing a color that is close to the background but not
22897  equal, that way you still can see it is there, but it is not bothering
22898  you anymore.
22899  
22900 \end_layout
22901
22902 \begin_layout Chapter
22903 Secrets of the LaTeX Masters
22904 \begin_inset CommandInset label
22905 LatexCommand label
22906 name "cha:secrets"
22907
22908 \end_inset
22909
22910
22911 \end_layout
22912
22913 \begin_layout Standard
22914 Though LyX is a powerful tool, it cannot hope to support everything that
22915  can be done with pure TeX/LaTeX.
22916  However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22917  as long as you are not afraid to use that 
22918 \begin_inset Quotes eld
22919 \end_inset
22920
22921 TeX
22922 \begin_inset Quotes erd
22923 \end_inset
22924
22925  button on the toolbar or add things to the LaTeX preamble.
22926  This section lists some tips, tricks, and otherwise cool ideas to give
22927  your document that extra little flair.
22928  
22929 \emph on
22930 Do try this at home
22931 \emph default
22932 , just start with something a little smaller and less important than your
22933  dissertation!
22934 \end_layout
22935
22936 \begin_layout Standard
22937 Most ideas in this section require less common files in your LaTeX installation.
22938  If you have a system like TeXLive, most will already be available.
22939  A few, however, will need to be downloaded from one of the CTAN archives.
22940  Often, there are several ways to do something, or several LaTeX style files
22941  which do the same thing.
22942  We do not endorse one choice over another, we simply claim that we have
22943  done a particular task with a particular file.
22944  Put on your wizard hat, keep an eye out for dragons, and let us begin.
22945 \end_layout
22946
22947 \begin_layout Section
22948 Multiple Columns
22949 \end_layout
22950
22951 \begin_layout Standard
22952 by 
22953 \noun on
22954 Lars Gullik Bjønnes
22955 \end_layout
22956
22957 \begin_layout Subsection
22958 Purpose
22959 \end_layout
22960
22961 \begin_layout Standard
22962 The aim for this chapter
22963 \begin_inset Foot
22964 status collapsed
22965
22966 \begin_layout Plain Layout
22967 Editor's note: Lars' original chapter was a masterful description of how
22968  to use the 
22969 \family typewriter
22970 multicol
22971 \family default
22972  package.
22973  However, it was too long to flow smoothly in this document.
22974  I have therefore chosen to excerpt the most important sections here (sorry,
22975  Lars); you can read the original chapter (and more of the story!) in the
22976  example file 
22977 \family typewriter
22978 examples/multicol.lyx
22979 \family default
22980 .
22981  — mer
22982 \end_layout
22983
22984 \end_inset
22985
22986  is to show how the LaTeX package 
22987 \family typewriter
22988 multicol
22989 \family default
22990  can be used in a LyX document.
22991  As LyX doesn't support the 
22992 \family typewriter
22993 multicol
22994 \family default
22995  package natively yet, we have to use some small hacks.
22996  By reading this section it should be obvious how to do this.
22997 \end_layout
22998
22999 \begin_layout Subsection
23000 Limitations 
23001 \end_layout
23002
23003 \begin_layout Standard
23004 The 
23005 \family typewriter
23006 multicol
23007 \family default
23008  package allows switching between one and multicolumn format on the same
23009  page.
23010  Footnotes are handled correctly (for the most part), but will be placed
23011  at the bottom of the page and not under each column.
23012  LaTeX's float mechanism, however, is partly disabled in the current implementat
23013 ion.
23014  At the moment only page-wide floats can be used within the scope of the
23015  environment.
23016 \end_layout
23017
23018 \begin_layout Subsection
23019 Examples
23020 \end_layout
23021
23022 \begin_layout Subsubsection
23023 Two columns
23024 \end_layout
23025
23026 \begin_layout Standard
23027 If you want to have two columns in your text, you have use LaTeX mode to
23028  insert 
23029 \family typewriter
23030
23031 \backslash
23032 begin{multicols}{2}
23033 \family default
23034  at the point where you want the two column layout to start, and then 
23035 \family typewriter
23036
23037 \backslash
23038 end{multicols}
23039 \family default
23040  where you want it to end.
23041  Like this:
23042 \end_layout
23043
23044 \begin_layout Standard
23045 \begin_inset ERT
23046 status open
23047
23048 \begin_layout Plain Layout
23049
23050
23051 \backslash
23052 begin{multicols}{2}
23053 \end_layout
23054
23055 \end_inset
23056
23057
23058 \end_layout
23059
23060 \begin_layout Standard
23061 \noindent
23062
23063 \series bold
23064 \size small
23065 The Adventure of the Empty House
23066 \series default
23067
23068 \begin_inset Newline newline
23069 \end_inset
23070
23071 by 
23072 \noun on
23073 Sir Arthur Conan Doyle
23074 \end_layout
23075
23076 \begin_layout Standard
23077
23078 \size small
23079 It was in the spring of the year 1894 that all London was interested, and
23080  the fashionable world dismayed, by the murder of the Honourable Ronald
23081  Adair under most unusual and inexplicable circumstances.
23082  The public has already learned those particulars of the crime which came
23083  out in the police investigation, but a good deal was suppressed upon that
23084  occasion, since the case for the prosecution was so overwhelmingly strong
23085  that it was not necessary to bring forward all the facts.
23086  Only now, at the end of nearly ten years, am I allowed to supply those
23087  missing links which make up the whole of that remarkable chain.
23088  The crime was of interest in itself, but that interest was as nothing to
23089  me compared to the inconceivable sequel, which afforded me the greatest
23090  shock and surprise of any event in my adventurous life.
23091  Even now, after this long interval, I find myself thrilling as I think
23092  of it, and feeling once more that sudden flood of joy, amazement, and increduli
23093 ty which utterly submerged my mind.
23094  Let me say to that public, which has shown some interest in those glimpses
23095  which I have occasionally given them of the thoughts and actions of a very
23096  remarkable man, that they are not to blame me if I have not shared my knowledge
23097  with them, for I should have considered it my first duty to do so, had
23098  I not been barred by a positive prohibition from his own lips, which was
23099  only withdrawn upon the third of last month.
23100 \end_layout
23101
23102 \begin_layout Standard
23103 \begin_inset ERT
23104 status open
23105
23106 \begin_layout Plain Layout
23107
23108
23109 \backslash
23110 end{multicols}
23111 \end_layout
23112
23113 \end_inset
23114
23115
23116 \end_layout
23117
23118 \begin_layout Subsubsection
23119 Multiple columns
23120 \end_layout
23121
23122 \begin_layout Standard
23123 The same pattern is used when you want more than two columns:
23124 \end_layout
23125
23126 \begin_layout Standard
23127 \begin_inset ERT
23128 status open
23129
23130 \begin_layout Plain Layout
23131
23132
23133 \backslash
23134 begin{multicols}{3}
23135 \end_layout
23136
23137 \end_inset
23138
23139
23140 \end_layout
23141
23142 \begin_layout Standard
23143
23144 \size footnotesize
23145 It can be imagined that my close intimacy with Sherlock Holmes had interested
23146  me deeply in crime, and that after his disappearance I never failed to
23147  read with care the various problems which came before the public.
23148  And I even attempted, more than once, for my own private satisfaction,
23149  to employ his methods in their solution, though with indifferent success.
23150  There was none, however, which appealed to me like this tragedy of Ronald
23151  Adair.
23152  As I read the evidence at the inquest, which led up to a verdict of willful
23153  murder against some person or persons unknown, I realized more clearly
23154  than I had ever done the loss which the community had sustained by the
23155  death of Sherlock Holmes.
23156  There were points about this strange business which would, I was sure,
23157  have specially appealed to him, and the efforts of the police would have
23158  been supplemented, or more probably anticipated, by the trained observation
23159  and the alert mind of the first criminal agent in Europe.
23160  All day, as I drove upon my round, I turned over the case in my mind and
23161  found no explanation which appeared to me to be adequate.
23162  At the risk of telling a twice-told tale, I will recapitulate the facts
23163  as they were known to the public at the conclusion of the inquest.
23164 \end_layout
23165
23166 \begin_layout Standard
23167 \begin_inset ERT
23168 status open
23169
23170 \begin_layout Plain Layout
23171
23172
23173 \backslash
23174 end{multicols}
23175 \end_layout
23176
23177 \end_inset
23178
23179
23180 \end_layout
23181
23182 \begin_layout Standard
23183 You can have more than 3 columns if you want to, but that might not be very
23184  pleasant for the eye.
23185 \end_layout
23186
23187 \begin_layout Subsubsection
23188 Columns inside columns
23189 \end_layout
23190
23191 \begin_layout Standard
23192 You can even have columns inside columns:
23193 \end_layout
23194
23195 \begin_layout Standard
23196 \begin_inset ERT
23197 status open
23198
23199 \begin_layout Plain Layout
23200
23201
23202 \backslash
23203 begin{multicols}{2}
23204 \end_layout
23205
23206 \end_inset
23207
23208
23209 \end_layout
23210
23211 \begin_layout Standard
23212
23213 \size footnotesize
23214 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
23215  at that time governor of one of the Australian colonies.
23216  Adair's mother had returned from Australia to undergo the operation for
23217  cataract, and she, her son Ronald, and her daughter Hilda were living together
23218  at 427 Park Lane.
23219 \end_layout
23220
23221 \begin_layout Standard
23222 \begin_inset ERT
23223 status open
23224
23225 \begin_layout Plain Layout
23226
23227
23228 \backslash
23229 begin{multicols}{2}
23230 \end_layout
23231
23232 \end_inset
23233
23234
23235 \end_layout
23236
23237 \begin_layout Standard
23238
23239 \size footnotesize
23240 The youth moved in the best society–had, so far as was known, no enemies
23241  and no particular vices.
23242  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
23243  had been broken off by mutual consent some months before, and there was
23244  no sign that it had left any very profound feeling behind it.
23245  For the rest {sic} the man's life moved in a narrow and conventional circle,
23246  for his habits were quiet and his nature unemotional.
23247  Yet it was upon this easy-going young aristocrat that death came, in most
23248  strange and unexpected form, between the hours of ten and eleven-twenty
23249  on the night of March 30, 1894.
23250 \end_layout
23251
23252 \begin_layout Standard
23253 \begin_inset ERT
23254 status open
23255
23256 \begin_layout Plain Layout
23257
23258
23259 \backslash
23260 end{multicols}
23261 \end_layout
23262
23263 \end_inset
23264
23265
23266 \end_layout
23267
23268 \begin_layout Standard
23269
23270 \size footnotesize
23271 Ronald Adair was fond of cards–playing continually, but never for such stakes
23272  as would hurt him.
23273  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
23274  It was shown that, after dinner on the day of his death, he had played
23275  a rubber of whist at the latter club.
23276  He had also played there in the afternoon.
23277
23278 \size default
23279  
23280 \size footnotesize
23281 The evidence of those who had played with him– Mr.
23282  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
23283  and that there was a fairly equal fall of the cards.
23284  Adair might have lost five pounds, but not more.
23285  His fortune was a considerable one, and such a loss could not in any way
23286  affect him.
23287  He had played nearly every day at one club or other, but he was a cautious
23288  player, and usually rose a winner.
23289  It came out in evidence that, in partnership with Colonel Moran, he had
23290  actually won as much as four hundred and twenty pounds in a sitting, some
23291  weeks before, from Godfrey Milner and Lord Balmoral.
23292  So much for his recent history as it came out at the inquest.
23293 \end_layout
23294
23295 \begin_layout Standard
23296 \begin_inset ERT
23297 status open
23298
23299 \begin_layout Plain Layout
23300
23301
23302 \backslash
23303 end{multicols}
23304 \end_layout
23305
23306 \end_inset
23307
23308
23309 \end_layout
23310
23311 \begin_layout Standard
23312 Please do read the file 
23313 \family typewriter
23314 examples/multicol.lyx
23315 \family default
23316  for more advanced examples including column and header spacing, vertical
23317  separator lines, and more.
23318 \end_layout
23319
23320 \begin_layout Section
23321 Numbering in the 
23322 \family sans
23323 Enumerate
23324 \family default
23325  Paragraph Environment
23326 \begin_inset Argument
23327 status collapsed
23328
23329 \begin_layout Plain Layout
23330 Numbering in Enumerate
23331 \end_layout
23332
23333 \end_inset
23334
23335
23336 \end_layout
23337
23338 \begin_layout Standard
23339 by 
23340 \noun on
23341 John Weiss
23342 \end_layout
23343
23344 \begin_layout Standard
23345 \begin_inset VSpace bigskip
23346 \end_inset
23347
23348
23349 \end_layout
23350
23351 \begin_layout Standard
23352 \noindent
23353 The default numbering for the 
23354 \family sans
23355 Enumerate
23356 \family default
23357  paragraph environment begins with Arabic numbers and ends with uppercase
23358  letters.
23359  Suppose, however, you wanted a different type of numbering scheme.
23360  Here's a quickie example of how to change the numbering scheme:
23361 \end_layout
23362
23363 \begin_layout LyX-Code
23364
23365 \backslash
23366 renewcommand{
23367 \backslash
23368 labelenumi}{
23369 \backslash
23370 Roman{enumi}.}
23371 \end_layout
23372
23373 \begin_layout LyX-Code
23374
23375 \backslash
23376 renewcommand{
23377 \backslash
23378 labelenumii}{
23379 \backslash
23380 Alph{enumii}.}
23381 \end_layout
23382
23383 \begin_layout LyX-Code
23384
23385 \backslash
23386 renewcommand{
23387 \backslash
23388 labelenumiii}{
23389 \backslash
23390 arabic{enumiii}.}
23391 \end_layout
23392
23393 \begin_layout LyX-Code
23394
23395 \backslash
23396 renewcommand{
23397 \backslash
23398 labelenumiv}{
23399 \backslash
23400 alph{enumiv}.)}
23401 \end_layout
23402
23403 \begin_layout Standard
23404 \SpecialChar \ldots{}
23405  which changes the numbering scheme to uppercase Roman numerals, uppercase
23406  letters, Arabic numbers, and lowercase letter.
23407 \end_layout
23408
23409 \begin_layout Standard
23410 Additionally, the previous example also adds a little bit extra to the numbering
23411  scheme.
23412  For example, the first level label actually looks like: 
23413 \begin_inset Quotes eld
23414 \end_inset
23415
23416 I.
23417 \begin_inset Quotes erd
23418 \end_inset
23419
23420 .
23421  For ease of reading, we'll describe what the numbering schemes look like
23422  using a notation something like this: <
23423 \begin_inset Quotes eld
23424 \end_inset
23425
23426 I.
23427 \begin_inset Quotes erd
23428 \end_inset
23429
23430 ,
23431 \begin_inset space ~
23432 \end_inset
23433
23434
23435 \begin_inset Quotes erd
23436 \end_inset
23437
23438 A.
23439 \begin_inset Quotes erd
23440 \end_inset
23441
23442 ,
23443 \begin_inset space ~
23444 \end_inset
23445
23446
23447 \begin_inset Quotes erd
23448 \end_inset
23449
23450 1.
23451 \begin_inset Quotes erd
23452 \end_inset
23453
23454 ,
23455 \begin_inset space ~
23456 \end_inset
23457
23458
23459 \begin_inset Quotes eld
23460 \end_inset
23461
23462 a.)
23463 \begin_inset Quotes erd
23464 \end_inset
23465
23466 >.
23467  
23468 \end_layout
23469
23470 \begin_layout Standard
23471 As you can see in the example, there is a label command for each nesting
23472  level, 
23473 \family typewriter
23474
23475 \backslash
23476 labelenumi
23477 \family default
23478  \SpecialChar \ldots{}
23479  
23480 \family typewriter
23481
23482 \backslash
23483 labelenumiv
23484 \family default
23485 , as well as a counter, 
23486 \family typewriter
23487 enumi
23488 \family default
23489  \SpecialChar \ldots{}
23490  
23491 \family typewriter
23492 enumiv
23493 \family default
23494 .
23495  There are also five 
23496 \begin_inset Quotes eld
23497 \end_inset
23498
23499 number printing
23500 \begin_inset Quotes erd
23501 \end_inset
23502
23503  commands, 
23504 \family typewriter
23505
23506 \backslash
23507 arabic{}
23508 \family default
23509
23510 \family typewriter
23511
23512 \backslash
23513 roman{}
23514 \family default
23515
23516 \family typewriter
23517
23518 \backslash
23519 Roman{}
23520 \family default
23521
23522 \family typewriter
23523
23524 \backslash
23525 alph{}
23526 \family default
23527 , and 
23528 \family typewriter
23529
23530 \backslash
23531 Alph{}
23532 \family default
23533 , each of which take one counter as an argument.
23534  You can add characters before or after these, but there's no need to add
23535  spaces.
23536 \end_layout
23537
23538 \begin_layout Standard
23539 You can get really fancy with these.
23540  For example:
23541 \end_layout
23542
23543 \begin_layout LyX-Code
23544
23545 \backslash
23546 renewcommand{
23547 \backslash
23548 labelenumi}{
23549 \backslash
23550 #
23551 \backslash
23552 Alph{enumi}
23553 \backslash
23554 #}
23555 \end_layout
23556
23557 \begin_layout LyX-Code
23558
23559 \backslash
23560 renewcommand{
23561 \backslash
23562 labelenumii}{
23563 \backslash
23564 Alph{enumi}.
23565 \backslash
23566 arabic{enumii}}
23567 \end_layout
23568
23569 \begin_layout LyX-Code
23570
23571 \backslash
23572 renewcommand{
23573 \backslash
23574 labelenumiii}{
23575 \backslash
23576 alph{enumiii}+}
23577 \end_layout
23578
23579 \begin_layout LyX-Code
23580
23581 \backslash
23582 renewcommand{
23583 \backslash
23584 labelenumiv}{(
23585 \backslash
23586 roman{enumiv})}
23587 \end_layout
23588
23589 \begin_layout Standard
23590 produces the somewhat out of hand numbering scheme: <
23591 \begin_inset Quotes eld
23592 \end_inset
23593
23594 #A#
23595 \begin_inset Quotes erd
23596 \end_inset
23597
23598 ,
23599 \begin_inset space ~
23600 \end_inset
23601
23602
23603 \begin_inset Quotes erd
23604 \end_inset
23605
23606 A.1
23607 \begin_inset Quotes erd
23608 \end_inset
23609
23610 ,
23611 \begin_inset space ~
23612 \end_inset
23613
23614
23615 \begin_inset Quotes erd
23616 \end_inset
23617
23618 a+
23619 \begin_inset Quotes erd
23620 \end_inset
23621
23622 ,
23623 \begin_inset space ~
23624 \end_inset
23625
23626
23627 \begin_inset Quotes eld
23628 \end_inset
23629
23630 (i)
23631 \begin_inset Quotes erd
23632 \end_inset
23633
23634 >.
23635  
23636 \end_layout
23637
23638 \begin_layout Section
23639 Dropped Capitals
23640 \end_layout
23641
23642 \begin_layout Standard
23643 by 
23644 \noun on
23645 Mike Ressler
23646 \end_layout
23647
23648 \begin_layout Standard
23649 \begin_inset VSpace bigskip
23650 \end_inset
23651
23652
23653 \end_layout
23654
23655 \begin_layout Standard
23656 \noindent
23657 \begin_inset ERT
23658 status collapsed
23659
23660 \begin_layout Plain Layout
23661
23662
23663 \backslash
23664 newfont{
23665 \backslash
23666 tmpfont}{cmr17 scaled 2500}{
23667 \backslash
23668 tmpfont T}
23669 \backslash
23670 vspace*{-8.4ex}
23671 \end_layout
23672
23673 \end_inset
23674
23675
23676 \end_layout
23677
23678 \begin_layout Standard
23679 \noindent
23680 \begin_inset ERT
23681 status open
23682
23683 \begin_layout Plain Layout
23684
23685
23686 \backslash
23687 hangindent=3.3em 
23688 \backslash
23689 hangafter=-3
23690 \end_layout
23691
23692 \end_inset
23693
23694  hose of you who like the style of old books probably also like 
23695 \begin_inset Quotes eld
23696 \end_inset
23697
23698 dropped capitals
23699 \begin_inset Quotes erd
23700 \end_inset
23701
23702 —those large capital letters which begin each new chapter or section.
23703  Implementing them with plain LyX/LaTeX is straightforward (assuming you
23704  know some plain TeX!) but does require a lot of work and many iterations,
23705  as you can see by all the ugly TeX-mode stuff at the beginning of this
23706  paragraph.
23707 \end_layout
23708
23709 \begin_layout Standard
23710 \begin_inset ERT
23711 status open
23712
23713 \begin_layout Plain Layout
23714
23715
23716 \backslash
23717 verb+
23718 \backslash
23719 bigdrop{-1em}{3}{ptmri}{T}+
23720 \end_layout
23721
23722 \end_inset
23723
23724 here is a much easier way of doing this, of course.
23725  The 
23726 \family typewriter
23727 dropcaps
23728 \family default
23729  (or the newer 
23730 \family typewriter
23731 dropping
23732 \family default
23733 ) package from CTAN allows a simple way to add such letters to your documents.
23734  Since this package is not a standard part of TeXLive, I can't demonstrate
23735  it within this document, but if you copy this paragraph to a new document,
23736  delete the 
23737 \begin_inset Quotes eld
23738 \end_inset
23739
23740
23741 \family typewriter
23742
23743 \backslash
23744 verb
23745 \family default
23746
23747 \begin_inset Quotes erd
23748 \end_inset
23749
23750  and the pluses from the TeX code at the beginning of the paragraph, and
23751  add 
23752 \family typewriter
23753
23754 \backslash
23755 usepackage{dropcaps}
23756 \family default
23757  to your LaTeX preamble, you will get a nice Times Roman Italic 
23758 \begin_inset Quotes eld
23759 \end_inset
23760
23761 T
23762 \begin_inset Quotes erd
23763 \end_inset
23764
23765 , whose height is three lines of text and which protrudes 1 em into the
23766  margin.
23767  (Make certain you have copied 
23768 \begin_inset Quotes eld
23769 \end_inset
23770
23771
23772 \family typewriter
23773 dropcaps.sty
23774 \family default
23775
23776 \begin_inset Quotes erd
23777 \end_inset
23778
23779  into a directory where TeX can see it.) The first argument is the amount
23780  of indentation; in this case the negative sign moves it into the margin.
23781  The second argument is the height of the letter in number of lines of text.
23782  The third argument is the font name: virtually anything which has a tfm
23783  file should work (wade through the 
23784 \family typewriter
23785 .../texmf/fonts/tfm
23786 \family default
23787  directory for possibilities).
23788  My personal favorite is 
23789 \begin_inset Quotes eld
23790 \end_inset
23791
23792
23793 \family typewriter
23794 yinit
23795 \family default
23796
23797 \begin_inset Quotes erd
23798 \end_inset
23799
23800 , a fancy German font specifically designed for dropped capitals.
23801  The fourth argument is the letter (or letters) to be dropped.
23802  The 
23803 \family typewriter
23804 dropping
23805 \family default
23806  package also offers the 
23807 \family typewriter
23808
23809 \backslash
23810 bigdrop
23811 \family default
23812  command, as well as a slightly simplified 
23813 \family typewriter
23814
23815 \backslash
23816 dropping
23817 \family default
23818  command.
23819 \end_layout
23820
23821 \begin_layout Section
23822 Non-standard Paragraph Shapes
23823 \end_layout
23824
23825 \begin_layout Standard
23826 by 
23827 \noun on
23828 Mike Ressler
23829 \end_layout
23830
23831 \begin_layout Standard
23832 \begin_inset VSpace bigskip
23833 \end_inset
23834
23835
23836 \end_layout
23837
23838 \begin_layout Standard
23839 \begin_inset ERT
23840 status collapsed
23841
23842 \begin_layout Plain Layout
23843
23844
23845 \backslash
23846 begin{sloppypar}
23847 \end_layout
23848
23849 \end_inset
23850
23851
23852 \end_layout
23853
23854 \begin_layout Standard
23855 \begin_inset ERT
23856 status collapsed
23857
23858 \begin_layout Plain Layout
23859
23860
23861 \backslash
23862 newdimen
23863 \backslash
23864 varunit 
23865 \end_layout
23866
23867 \begin_layout Plain Layout
23868
23869
23870 \backslash
23871 setlength{
23872 \backslash
23873 varunit}{4.5in}
23874 \end_layout
23875
23876 \end_inset
23877
23878
23879 \end_layout
23880
23881 \begin_layout Standard
23882 \noindent
23883 \begin_inset ERT
23884 status collapsed
23885
23886 \begin_layout Plain Layout
23887
23888
23889 \backslash
23890 parshape 19 0.45
23891 \backslash
23892 varunit 0.332
23893 \backslash
23894 varunit
23895 \end_layout
23896
23897 \begin_layout Plain Layout
23898
23899 0.40
23900 \backslash
23901 varunit 0.300
23902 \backslash
23903 varunit
23904 \end_layout
23905
23906 \begin_layout Plain Layout
23907
23908 0.35
23909 \backslash
23910 varunit 0.293
23911 \backslash
23912 varunit
23913 \end_layout
23914
23915 \begin_layout Plain Layout
23916
23917 0.30
23918 \backslash
23919 varunit 0.300
23920 \backslash
23921 varunit
23922 \end_layout
23923
23924 \begin_layout Plain Layout
23925
23926 0.25
23927 \backslash
23928 varunit 0.317
23929 \backslash
23930 varunit
23931 \end_layout
23932
23933 \begin_layout Plain Layout
23934
23935 0.20
23936 \backslash
23937 varunit 0.342
23938 \backslash
23939 varunit
23940 \end_layout
23941
23942 \begin_layout Plain Layout
23943
23944 0.15
23945 \backslash
23946 varunit 0.373
23947 \backslash
23948 varunit
23949 \end_layout
23950
23951 \begin_layout Plain Layout
23952
23953 0.10
23954 \backslash
23955 varunit 0.410
23956 \backslash
23957 varunit
23958 \end_layout
23959
23960 \begin_layout Plain Layout
23961
23962 0.05
23963 \backslash
23964 varunit 0.453
23965 \backslash
23966 varunit
23967 \end_layout
23968
23969 \begin_layout Plain Layout
23970
23971 0.00
23972 \backslash
23973 varunit 0.500
23974 \backslash
23975 varunit
23976 \end_layout
23977
23978 \begin_layout Plain Layout
23979
23980 0.05
23981 \backslash
23982 varunit 0.453
23983 \backslash
23984 varunit
23985 \end_layout
23986
23987 \begin_layout Plain Layout
23988
23989 0.10
23990 \backslash
23991 varunit 0.410
23992 \backslash
23993 varunit
23994 \end_layout
23995
23996 \begin_layout Plain Layout
23997
23998 0.15
23999 \backslash
24000 varunit 0.373
24001 \backslash
24002 varunit
24003 \end_layout
24004
24005 \begin_layout Plain Layout
24006
24007 0.20
24008 \backslash
24009 varunit 0.342
24010 \backslash
24011 varunit
24012 \end_layout
24013
24014 \begin_layout Plain Layout
24015
24016 0.25
24017 \backslash
24018 varunit 0.317
24019 \backslash
24020 varunit
24021 \end_layout
24022
24023 \begin_layout Plain Layout
24024
24025 0.30
24026 \backslash
24027 varunit 0.300
24028 \backslash
24029 varunit
24030 \end_layout
24031
24032 \begin_layout Plain Layout
24033
24034 0.35
24035 \backslash
24036 varunit 0.293
24037 \backslash
24038 varunit
24039 \end_layout
24040
24041 \begin_layout Plain Layout
24042
24043 0.40
24044 \backslash
24045 varunit 0.300
24046 \backslash
24047 varunit
24048 \end_layout
24049
24050 \begin_layout Plain Layout
24051
24052 0.45
24053 \backslash
24054 varunit 0.332
24055 \backslash
24056 varunit
24057 \end_layout
24058
24059 \begin_layout Plain Layout
24060
24061 \end_layout
24062
24063 \end_inset
24064
24065 There are times when the tyranny of rectangular paragraphs must be overthrown.
24066  In such situations, a call to the delightful plain TeX command 
24067 \family typewriter
24068
24069 \backslash
24070 parshape
24071 \family default
24072  is called for.
24073  As you can see, completely arbitrary shapes can be laid out with a suitable
24074  set of linelength definitions.
24075  While this parshape may look a bit silly and useless, one could conceive
24076  of situations such as finely tuned dropped capitals, word wrapping around
24077  non-rectangular graphics, etc.
24078  which will benefit from such handcrafting.
24079 \end_layout
24080
24081 \begin_layout Standard
24082 \begin_inset VSpace bigskip
24083 \end_inset
24084
24085
24086 \end_layout
24087
24088 \begin_layout Standard
24089 The syntax is 
24090 \family typewriter
24091
24092 \backslash
24093 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
24094  #nindent #nlength
24095 \family default
24096 , where 
24097 \family typewriter
24098 numlines
24099 \family default
24100  is the number of lines of text which define the paragraph.
24101  If there turn out to be fewer lines, the shape is truncated; if there are
24102  more, the excess lines have the same dimensions as the last line of the
24103  definition.
24104  The 
24105 \family typewriter
24106 #nindent
24107 \family default
24108  and 
24109 \family typewriter
24110 #nlength
24111 \family default
24112  entries specify the indentation of the line from the left margin, and the
24113  length of the line as measured from that point.
24114  The shape applies only to the current paragraph; everything is reset to
24115  normal for the next paragraph.
24116 \end_layout
24117
24118 \begin_layout Standard
24119 \begin_inset ERT
24120 status collapsed
24121
24122 \begin_layout Plain Layout
24123
24124
24125 \backslash
24126 end{sloppypar}
24127 \end_layout
24128
24129 \end_inset
24130
24131
24132 \end_layout
24133
24134 \begin_layout Section
24135 Summary
24136 \end_layout
24137
24138 \begin_layout Standard
24139 As you can see, the examples in this section range from the useful to the
24140  whimsical.
24141  While I don't expect that anyone will ever need the paragraph shape demonstrate
24142 d in the last section, the important point is that you can do almost anything
24143  you want in LyX if you are willing to figure out how to do it in TeX and
24144  LaTeX.
24145  TeX is a fantastically powerful typesetting system and all that power is
24146  available to you since LyX uses it as its backend.
24147  Happy LyXing!
24148 \end_layout
24149
24150 \end_body
24151 \end_document