]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
Group all the changes here together, so the translators can understand it.
[lyx.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 1414654397 "Richard Heck" 
136 \end_header
137
138 \begin_body
139
140 \begin_layout Title
141 Additional LyX Features
142 \end_layout
143
144 \begin_layout Author
145 by the LyX Team
146 \begin_inset Foot
147 status collapsed
148
149 \begin_layout Plain Layout
150 \noindent
151 Principal maintainer of this file is
152 \noun on
153  Richard Heck
154 \noun default
155 .
156  If you have comments or error corrections, please send them to the LyX
157  Documentation mailing list, 
158 \begin_inset Flex Code
159 status collapsed
160
161 \begin_layout Plain Layout
162 \noindent
163 <lyx-docs@lists.lyx.org>
164 \end_layout
165
166 \end_inset
167
168 .
169 \end_layout
170
171 \end_inset
172
173  
174 \end_layout
175
176 \begin_layout Standard
177 \begin_inset CommandInset toc
178 LatexCommand tableofcontents
179
180 \end_inset
181
182
183 \end_layout
184
185 \begin_layout Chapter
186 Introduction
187 \end_layout
188
189 \begin_layout Standard
190 This manual is essentially Part II of the 
191 \emph on
192 User's Guide\SpecialChar \@.
193
194 \emph default
195  The reason for separating this document out is simple: the 
196 \emph on
197 User's Guide
198 \emph default
199  is already quite lengthy, and it contains information on all of the basic
200  features one needs to know in order to prepare most documents.
201  However, the LyX Team has worked to make LyX extensible through various
202  configuration files and external packages.
203  That means that if you want to support the Fizzwizzle LaTeX package, you
204  can create a layout file (or module) for it without having to alter LyX
205  itself.
206  We've already had contributions of several new features this way, and some
207  of them are documented here.
208  There are also some more `advanced' features, such as how to control the
209  presentation of bibliographies and how to work with multi-part documents,
210  that are not covered in the 
211 \emph on
212 User's Guide
213 \emph default
214  and are discussed here.
215 \end_layout
216
217 \begin_layout Standard
218 This manual also documents some special features, like fax support, version
219  control, and SGML support, which require additional software to work properly.
220  There is also a chapter on LyX's support for HTML.
221  And lastly, there's a chapter of LaTeX tools and tips, things you can use
222  to spruce up your documents by directly using the powerful features of
223  LaTeX.
224  After all, LyX 
225 \emph on
226 is
227 \emph default
228  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
229 \end_layout
230
231 \begin_layout Standard
232 If you haven't read the 
233 \emph on
234 Introduction
235 \emph default
236  yet, you are definitely in the wrong manual.
237  The 
238 \emph on
239 Introduction
240 \emph default
241  is the first place to go, since it describes the notation and format of
242  all of the manuals.
243  You should also be thoroughly familiar with the 
244 \emph on
245 User's Guide
246 \emph default
247  and all of the basic features of LyX before attempting to read this one.
248 \end_layout
249
250 \begin_layout Standard
251 Since many of the topics in this manual depend heavily on LyX's interaction
252  with LaTeX, this first chapter covers the inner workings of LyX and how
253  to direct LyX to generate exactly the LaTeX code you want.
254  It is obviously for more seasoned LyX users.
255 \end_layout
256
257 \begin_layout Chapter
258 LyX and LaTeX
259 \end_layout
260
261 \begin_layout Section
262 How LyX Uses LaTeX
263 \end_layout
264
265 \begin_layout Standard
266 This chapter is for both TeX-nicians and the LaTeX-curious.
267  In it, we'll explain how LyX and LaTeX work together to produce printable
268  output.
269  This is the only place in any of the manuals where we assume you know something
270  about LaTeX.
271 \end_layout
272
273 \begin_layout Standard
274 At one time, LyX was called a 
275 \begin_inset Quotes eld
276 \end_inset
277
278 WYSIWYM frontend to LaTeX,
279 \begin_inset Quotes erd
280 \end_inset
281
282  but that's no longer true.
283  There are frontends to LaTeX out there.
284 \begin_inset Foot
285 status collapsed
286
287 \begin_layout Plain Layout
288 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
289  There are also the LaTeX modes for vi and emacs, of course.
290 \end_layout
291
292 \end_inset
293
294  These are basically text editors with the ability to run LaTeX and mark
295  any errors in the file you're editing.
296  Although LyX 
297 \emph on
298 is
299 \emph default
300  an editor, and it 
301 \emph on
302 does
303 \emph default
304  run LaTeX, and it also indicates errors in the file, it also does much,
305  much more.
306  For one thing, you don't need to know LaTeX to use LyX effectively.
307  And LyX has added its own extensions to LaTeX.
308  Try the following sometime: select 
309 \begin_inset Flex MenuItem
310 status collapsed
311
312 \begin_layout Plain Layout
313 Export\SpecialChar \menuseparator
314 LaTeX
315 \end_layout
316
317 \end_inset
318
319  from the 
320 \begin_inset Flex MenuItem
321 status collapsed
322
323 \begin_layout Plain Layout
324 File
325 \end_layout
326
327 \end_inset
328
329  menu (or 
330 \begin_inset Flex MenuItem
331 status collapsed
332
333 \begin_layout Plain Layout
334 View\SpecialChar \menuseparator
335 Source
336 \end_layout
337
338 \end_inset
339
340 ), then look at the preamble of the resulting 
341 \begin_inset Flex Code
342 status collapsed
343
344 \begin_layout Plain Layout
345 .tex
346 \end_layout
347
348 \end_inset
349
350  file.
351  You'll notice a variety of new macros defined specifically by LyX.
352  These macros are defined automatically, according to the features you use
353  in the document.
354 \end_layout
355
356 \begin_layout Standard
357 There are several commands that automatically invoke LaTeX.
358  They are:
359 \end_layout
360
361 \begin_layout Itemize
362 \begin_inset Flex MenuItem
363 status collapsed
364
365 \begin_layout Plain Layout
366 View\SpecialChar \menuseparator
367 Format
368 \end_layout
369
370 \end_inset
371
372
373 \end_layout
374
375 \begin_layout Itemize
376 \begin_inset Flex MenuItem
377 status collapsed
378
379 \begin_layout Plain Layout
380 View\SpecialChar \menuseparator
381 Update\SpecialChar \menuseparator
382 Format
383 \end_layout
384
385 \end_inset
386
387
388 \end_layout
389
390 \begin_layout Itemize
391 \begin_inset Flex MenuItem
392 status collapsed
393
394 \begin_layout Plain Layout
395 File\SpecialChar \menuseparator
396 Print
397 \end_layout
398
399 \end_inset
400
401
402 \end_layout
403
404 \begin_layout Itemize
405 \begin_inset Flex MenuItem
406 status collapsed
407
408 \begin_layout Plain Layout
409 File\SpecialChar \menuseparator
410 Fax
411 \end_layout
412
413 \end_inset
414
415
416 \end_layout
417
418 \begin_layout Standard
419 They will only invoke LaTeX if the file has changed since the last time
420  LaTeX was run.
421  
422 \end_layout
423
424 \begin_layout Standard
425 When LyX runs LaTeX on the file you're editing, it performs these steps:
426 \end_layout
427
428 \begin_layout Enumerate
429 Convert the document to LaTeX and save to a file with the extension 
430 \begin_inset Flex Code
431 status collapsed
432
433 \begin_layout Plain Layout
434 .tex
435 \end_layout
436
437 \end_inset
438
439  in place of 
440 \begin_inset Flex Code
441 status collapsed
442
443 \begin_layout Plain Layout
444 .lyx
445 \end_layout
446
447 \end_inset
448
449 .
450 \end_layout
451
452 \begin_layout Enumerate
453 Run LaTeX on the 
454 \begin_inset Flex Code
455 status collapsed
456
457 \begin_layout Plain Layout
458 .tex
459 \end_layout
460
461 \end_inset
462
463  file (maybe several times), and run any other commands (such as 
464 \begin_inset Flex Code
465 status collapsed
466
467 \begin_layout Plain Layout
468 bibtex
469 \end_layout
470
471 \end_inset
472
473  or 
474 \begin_inset Flex Code
475 status collapsed
476
477 \begin_layout Plain Layout
478 makeindex
479 \end_layout
480
481 \end_inset
482
483 ) needed to compile the LaTeX file.
484 \end_layout
485
486 \begin_layout Enumerate
487 If there are any errors, show the error log.
488 \end_layout
489
490 \begin_layout Standard
491 If you've run LaTeX using 
492 \begin_inset Flex MenuItem
493 status collapsed
494
495 \begin_layout Plain Layout
496 View
497 \bar under
498 \SpecialChar \menuseparator
499
500 \bar default
501 DVI
502 \end_layout
503
504 \end_inset
505
506 , LyX then runs a DVI viewer to display the DVI-file.
507  If you've used 
508 \begin_inset Flex MenuItem
509 status collapsed
510
511 \begin_layout Plain Layout
512 View
513 \bar under
514 \SpecialChar \menuseparator
515
516 \bar default
517 PostScript
518 \end_layout
519
520 \end_inset
521
522 , LyX performs further steps:
523 \end_layout
524
525 \begin_layout Itemize
526 Run 
527 \begin_inset Flex Code
528 status collapsed
529
530 \begin_layout Plain Layout
531 dvips
532 \end_layout
533
534 \end_inset
535
536  to convert the DVI file to PostScript.
537 \end_layout
538
539 \begin_layout Itemize
540 Run a PostScript viewer, such as 
541 \begin_inset Flex Code
542 status collapsed
543
544 \begin_layout Plain Layout
545 ghostview
546 \end_layout
547
548 \end_inset
549
550 , to display the PostScript file.
551 \end_layout
552
553 \begin_layout Standard
554 LyX does similar things when viewing, or exporting, other formats.
555 \end_layout
556
557 \begin_layout Section
558 Translating LaTeX files into LyX
559 \end_layout
560
561 \begin_layout Standard
562 You can import a LaTeX file into LyX by using the 
563 \begin_inset Flex MenuItem
564 status collapsed
565
566 \begin_layout Plain Layout
567 File\SpecialChar \menuseparator
568 Import\SpecialChar \menuseparator
569 LaTeX
570 \end_layout
571
572 \end_inset
573
574  command in LyX.
575  This will call a program named 
576 \begin_inset Flex Code
577 status collapsed
578
579 \begin_layout Plain Layout
580 tex2lyx
581 \end_layout
582
583 \end_inset
584
585  which will create a file 
586 \begin_inset Flex Code
587 status collapsed
588
589 \begin_layout Plain Layout
590 foo.lyx
591 \end_layout
592
593 \end_inset
594
595  from the file 
596 \begin_inset Flex Code
597 status collapsed
598
599 \begin_layout Plain Layout
600 foo.tex
601 \end_layout
602
603 \end_inset
604
605 .
606  LyX will then open that file.
607 \begin_inset Foot
608 status collapsed
609
610 \begin_layout Plain Layout
611 \begin_inset Flex Code
612 status collapsed
613
614 \begin_layout Plain Layout
615 tex2lyx
616 \end_layout
617
618 \end_inset
619
620  can also be run from the command line, of course.
621 \end_layout
622
623 \end_inset
624
625
626 \end_layout
627
628 \begin_layout Standard
629 \begin_inset Flex Code
630 status collapsed
631
632 \begin_layout Plain Layout
633 tex2lyx
634 \end_layout
635
636 \end_inset
637
638  will translate most legal LaTeX, but not everything.
639  It will put things it doesn't understand into TeX code, so after translating
640  a file with 
641 \begin_inset Flex Code
642 status collapsed
643
644 \begin_layout Plain Layout
645 tex2lyx
646 \end_layout
647
648 \end_inset
649
650 , you can look for TeX code and hand-edit it until it looks right.
651 \end_layout
652
653 \begin_layout Standard
654 If you don't know what TeX code is, read the next section.
655 \end_layout
656
657 \begin_layout Section
658 \begin_inset CommandInset label
659 LatexCommand label
660 name "sec:Inserting-TeX-Code"
661
662 \end_inset
663
664 Inserting TeX Code into LyX Documents 
665 \end_layout
666
667 \begin_layout Standard
668 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
669  You can always insert TeX code into any LyX document.
670  LyX cannot, and will never be able to, display every possible LaTeX construct.
671  If ever you need to insert LaTeX commands into your LyX document, you can
672  use the 
673 \begin_inset Flex Code
674 status collapsed
675
676 \begin_layout Plain Layout
677 TeX Code
678 \end_layout
679
680 \end_inset
681
682  box, which you can insert into your document with 
683 \begin_inset Flex MenuItem
684 status collapsed
685
686 \begin_layout Plain Layout
687 Insert\SpecialChar \menuseparator
688 TeX Code
689 \end_layout
690
691 \end_inset
692
693 .
694 \end_layout
695
696 \begin_layout Standard
697 Here's an example of inserting LaTeX commands in a LyX document.
698  The code looks like this:
699 \end_layout
700
701 \begin_layout LyX-Code
702
703 \backslash
704 begin{tabular}{ll}
705 \begin_inset Newline newline
706 \end_inset
707
708
709 \backslash
710 begin{minipage}{5cm}
711 \begin_inset Newline newline
712 \end_inset
713
714 This is an example for a minipage environment.
715  You 
716 \begin_inset Newline newline
717 \end_inset
718
719 can put nearly everything in it, even (non-floating) 
720 \begin_inset Newline newline
721 \end_inset
722
723 figures and tables.
724  
725 \begin_inset Newline newline
726 \end_inset
727
728
729 \backslash
730 end{minipage}
731 \begin_inset Newline newline
732 \end_inset
733
734 &
735 \begin_inset Newline newline
736 \end_inset
737
738
739 \backslash
740 begin{minipage}{5cm}
741 \begin_inset Newline newline
742 \end_inset
743
744
745 \backslash
746 begin{verbatim}
747 \begin_inset Newline newline
748 \end_inset
749
750
751 \backslash
752 begin{minipage}{5cm}
753 \begin_inset Newline newline
754 \end_inset
755
756 This ...
757  
758 \begin_inset Newline newline
759 \end_inset
760
761
762 \backslash
763 end{minipage}
764 \begin_inset Newline newline
765 \end_inset
766
767
768 \backslash
769 end{verbatim}
770 \begin_inset Newline newline
771 \end_inset
772
773
774 \backslash
775 end{minipage}
776 \begin_inset Newline newline
777 \end_inset
778
779
780 \backslash
781 end{tabular}
782 \end_layout
783
784 \begin_layout LyX-Code
785
786 \end_layout
787
788 \begin_layout Standard
789 The 
790 \begin_inset Flex Code
791 status collapsed
792
793 \begin_layout Plain Layout
794 TeX Code
795 \end_layout
796
797 \end_inset
798
799  box containing this text is directly after this paragraph.
800  Those of you reading the manual in LyX will only see the TeX code inset.
801  Those reading a printed version of the manuals will see the actual results:
802 \end_layout
803
804 \begin_layout Standard
805 \begin_inset ERT
806 status collapsed
807
808 \begin_layout Plain Layout
809
810
811 \backslash
812 begin{tabular}{ll}
813 \end_layout
814
815 \begin_layout Plain Layout
816
817
818 \backslash
819 begin{minipage}{5cm}
820 \end_layout
821
822 \begin_layout Plain Layout
823
824 This is an example for a minipage environment.
825  You can put nearly everything in it, even (non-floating) figures and tables.
826  
827 \end_layout
828
829 \begin_layout Plain Layout
830
831
832 \backslash
833 end{minipage}
834 \end_layout
835
836 \begin_layout Plain Layout
837
838 &
839 \end_layout
840
841 \begin_layout Plain Layout
842
843
844 \backslash
845 begin{minipage}{5cm}
846 \end_layout
847
848 \begin_layout Plain Layout
849
850
851 \backslash
852 begin{verbatim}
853 \end_layout
854
855 \begin_layout Plain Layout
856
857
858 \backslash
859 begin{minipage}{5cm}
860 \end_layout
861
862 \begin_layout Plain Layout
863
864 This ...
865  
866 \end_layout
867
868 \begin_layout Plain Layout
869
870
871 \backslash
872 end{minipage}
873 \end_layout
874
875 \begin_layout Plain Layout
876
877
878 \backslash
879 end{verbatim}
880 \end_layout
881
882 \begin_layout Plain Layout
883
884
885 \backslash
886 end{minipage}
887 \end_layout
888
889 \begin_layout Plain Layout
890
891
892 \backslash
893 end{tabular}
894 \end_layout
895
896 \end_inset
897
898
899 \end_layout
900
901 \begin_layout Standard
902 In addition to using TeX code, you can also create a separate file containing
903  some complex LaTeX structure and then use 
904 \begin_inset Flex MenuItem
905 status collapsed
906
907 \begin_layout Plain Layout
908 Insert\SpecialChar \menuseparator
909 Child
910 \begin_inset space ~
911 \end_inset
912
913 Document
914 \end_layout
915
916 \end_inset
917
918  to include your file (you should select the type 
919 \begin_inset Flex Code
920 status collapsed
921
922 \begin_layout Plain Layout
923 Input
924 \end_layout
925
926 \end_inset
927
928 ).
929  We recommend that you only do this if you have a 
930 \begin_inset Flex Code
931 status collapsed
932
933 \begin_layout Plain Layout
934 .tex
935 \end_layout
936
937 \end_inset
938
939  file which you 
940 \emph on
941 know
942 \emph default
943  works already.
944  Otherwise, you'll have a big job tracking down LaTeX errors.
945 \end_layout
946
947 \begin_layout Standard
948 There are a few last points to emphasize:
949 \end_layout
950
951 \begin_layout Itemize
952 LyX 
953 \emph on
954 does not
955 \emph default
956  check if your LaTeX code is correct.
957 \end_layout
958
959 \begin_layout Itemize
960 Beware reinventing the wheel.
961 \end_layout
962
963 \begin_layout Standard
964 On that last point, LyX does have quite a few features tucked into it, and
965  more are coming.
966  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
967  feature before you decide you have to do it by hand.
968  Moreover, there are numerous LaTeX packages out there to do all sorts of
969  things, from labels to envelopes to fancy multipage tables.
970  Check out 
971 \begin_inset CommandInset href
972 LatexCommand href
973 name "CTAN"
974 target "http://www.ctan.org/"
975
976 \end_inset
977
978  for details, and see chapter 
979 \begin_inset CommandInset ref
980 LatexCommand ref
981 reference "cha:secrets"
982
983 \end_inset
984
985 .
986 \end_layout
987
988 \begin_layout Standard
989 If you do need to do some wild and fancy things within your document, be
990  sure to check out a good LaTeX book for assistance.
991  There are a number of them listed in the bibliography of the 
992 \emph on
993 User's Guide
994 \emph default
995 .
996 \end_layout
997
998 \begin_layout Section
999 LyX and the LaTeX Preamble
1000 \end_layout
1001
1002 \begin_layout Subsection
1003 About the LaTeX Preamble
1004 \end_layout
1005
1006 \begin_layout Standard
1007 If you already know LaTeX, there is no need to explain here what the preamble
1008  is good for.
1009  If you don't, the following will give you some ideas—we recommend again
1010  that you consult a LaTeX book for further information.
1011  In any case, you should read the points below, because they explain what
1012  you can do and what you don't need to do in the LaTeX preamble of a LyX
1013  document.
1014 \end_layout
1015
1016 \begin_layout Standard
1017 The LaTeX preamble comes at the very beginning of a document, 
1018 \emph on
1019 before
1020 \emph default
1021  the text.
1022  It serves to:
1023 \end_layout
1024
1025 \begin_layout Itemize
1026 Declare the document class.
1027  
1028 \begin_inset Newline newline
1029 \end_inset
1030
1031 LyX already does this for you.
1032  If you're a seasoned LaTeX-nician, and you have a custom document class
1033  you want to use, check out the 
1034 \emph on
1035 Customization Manual
1036 \emph default
1037  for information on how to make LyX interface to it.
1038 \end_layout
1039
1040 \begin_layout Itemize
1041 Declare the usage of packages.
1042  
1043 \begin_inset Newline newline
1044 \end_inset
1045
1046 LaTeX packages provide special commands, which are only available within
1047  a document when the package has been declared in the preamble.
1048  For example, the package 
1049 \begin_inset Flex Code
1050 status collapsed
1051
1052 \begin_layout Plain Layout
1053 indentfirst
1054 \end_layout
1055
1056 \end_inset
1057
1058  forces all paragraphs to be indented.
1059  There are other packages for labels, envelopes, margins, etc.
1060  
1061 \end_layout
1062
1063 \begin_layout Itemize
1064 Set counters, variables, lengths and widths.
1065  
1066 \begin_inset Newline newline
1067 \end_inset
1068
1069 There are several LaTeX counters and variables which 
1070 \emph on
1071 must
1072 \emph default
1073  be set globally from within the preamble in order to have the desired effect.
1074  (There are variables which you can set and reset inside the document, too.)
1075  Margins are a good example of something which must be set in the preamble.
1076  Another example is the label format for lists.
1077  You can actually set these just about anywhere, but it's best to do it
1078  just once, inside the preamble.
1079 \end_layout
1080
1081 \begin_layout Itemize
1082 Declare user defined commands (with 
1083 \begin_inset Flex Code
1084 status collapsed
1085
1086 \begin_layout Plain Layout
1087
1088 \backslash
1089 newcommand
1090 \end_layout
1091
1092 \end_inset
1093
1094  or 
1095 \begin_inset Flex Code
1096 status collapsed
1097
1098 \begin_layout Plain Layout
1099
1100 \backslash
1101 renewcommand
1102 \end_layout
1103
1104 \end_inset
1105
1106 ).
1107 \begin_inset Newline newline
1108 \end_inset
1109
1110 These are abbreviations for LaTeX commands which appear very often inside
1111  a document.
1112  Although the preamble is a good place to declare such commands, they 
1113 \emph on
1114 can
1115 \emph default
1116  be declared anywhere (before they are used for the first time, of course).
1117  This can be useful if there is a lot of raw LaTeX code in your document,
1118  which normally should not be the case.
1119 \end_layout
1120
1121 \begin_layout Standard
1122 LyX adds its own set of definitions to the preamble of the 
1123 \begin_inset Flex Code
1124 status collapsed
1125
1126 \begin_layout Plain Layout
1127 .tex
1128 \end_layout
1129
1130 \end_inset
1131
1132  file it produces.
1133  This makes LaTeX files generated by LyX portable.
1134 \end_layout
1135
1136 \begin_layout Subsection
1137 Changing the Preamble
1138 \end_layout
1139
1140 \begin_layout Standard
1141 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1142  can't change them without patching LyX itself.
1143  You can, however, add your own stuff to the preamble by selecting 
1144 \begin_inset Flex MenuItem
1145 status collapsed
1146
1147 \begin_layout Plain Layout
1148 LaTeX
1149 \begin_inset space ~
1150 \end_inset
1151
1152 Preamble
1153 \end_layout
1154
1155 \end_inset
1156
1157  in the 
1158 \begin_inset Flex MenuItem
1159 status collapsed
1160
1161 \begin_layout Plain Layout
1162 Document\SpecialChar \menuseparator
1163 Settings
1164 \end_layout
1165
1166 \end_inset
1167
1168  dialog.
1169  LyX adds anything in the 
1170 \begin_inset Flex MenuItem
1171 status collapsed
1172
1173 \begin_layout Plain Layout
1174 Preamble
1175 \end_layout
1176
1177 \end_inset
1178
1179  dialog to its own built-in preamble.
1180  Before adding your own declarations in the preamble, you should make sure
1181  that LyX doesn't already support what you want to do.
1182  (Remember what we said about reinventing the wheel?) Also, 
1183 \emph on
1184 make sure your preamble code is correct
1185 \emph default
1186 .
1187  LyX doesn't check it for you.
1188  If there is an error, you're likely to get an error like 
1189 \begin_inset Quotes eld
1190 \end_inset
1191
1192
1193 \begin_inset Flex Code
1194 status collapsed
1195
1196 \begin_layout Plain Layout
1197 Missing 
1198 \backslash
1199 begin{document}
1200 \end_layout
1201
1202 \end_inset
1203
1204
1205 \begin_inset Quotes erd
1206 \end_inset
1207
1208 .
1209  If you see this error, check your preamble.
1210 \end_layout
1211
1212 \begin_layout Subsection
1213 Examples
1214 \end_layout
1215
1216 \begin_layout Standard
1217 Here are some examples of what you can add to a preamble, and what they
1218  do.
1219 \end_layout
1220
1221 \begin_layout Subsubsection
1222 Example #1: Offsets
1223 \end_layout
1224
1225 \begin_layout Standard
1226 There are two variables under LaTeX that control page position: 
1227 \begin_inset Flex Code
1228 status collapsed
1229
1230 \begin_layout Plain Layout
1231
1232 \backslash
1233 hoffset
1234 \end_layout
1235
1236 \end_inset
1237
1238  and 
1239 \begin_inset Flex Code
1240 status collapsed
1241
1242 \begin_layout Plain Layout
1243
1244 \backslash
1245 voffset
1246 \end_layout
1247
1248 \end_inset
1249
1250 .
1251  Their names should be self-explanatory.
1252  These variables are useful if you think for a moment about computer labels.
1253  Sometimes, the size of a print medium and the area of the medium that you
1254  can actually print on aren't the same.
1255  This is where 
1256 \begin_inset Flex Code
1257 status collapsed
1258
1259 \begin_layout Plain Layout
1260
1261 \backslash
1262 hoffset
1263 \end_layout
1264
1265 \end_inset
1266
1267  and 
1268 \begin_inset Flex Code
1269 status collapsed
1270
1271 \begin_layout Plain Layout
1272
1273 \backslash
1274 voffset
1275 \end_layout
1276
1277 \end_inset
1278
1279  come in.
1280 \end_layout
1281
1282 \begin_layout Standard
1283 The default values for 
1284 \begin_inset Flex Code
1285 status collapsed
1286
1287 \begin_layout Plain Layout
1288
1289 \backslash
1290 hoffset
1291 \end_layout
1292
1293 \end_inset
1294
1295  and 
1296 \begin_inset Flex Code
1297 status collapsed
1298
1299 \begin_layout Plain Layout
1300
1301 \backslash
1302 voffset
1303 \end_layout
1304
1305 \end_inset
1306
1307  are both 0
1308 \begin_inset space \thinspace{}
1309 \end_inset
1310
1311 points, i.
1312 \begin_inset space \thinspace{}
1313 \end_inset
1314
1315 e.
1316 \begin_inset space \space{}
1317 \end_inset
1318
1319 the page isn't shifted.
1320  Unfortunately, some DVI drivers always seem to shift the page.
1321  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1322  If you're using LyX on a system that you don't personally maintain, and
1323  your sysadmin is a doofus, 
1324 \begin_inset Flex Code
1325 status collapsed
1326
1327 \begin_layout Plain Layout
1328
1329 \backslash
1330 hoffset
1331 \end_layout
1332
1333 \end_inset
1334
1335  and 
1336 \begin_inset Flex Code
1337 status collapsed
1338
1339 \begin_layout Plain Layout
1340
1341 \backslash
1342 voffset
1343 \end_layout
1344
1345 \end_inset
1346
1347  can save the day.
1348  Suppose your left and top margins are always 0.5
1349 \begin_inset space \thinspace{}
1350 \end_inset
1351
1352 inches too big.
1353  You can add this to the preamble:
1354 \end_layout
1355
1356 \begin_layout LyX-Code
1357
1358 \backslash
1359 setlength{
1360 \backslash
1361 hoffset}{-0.5 in}
1362 \end_layout
1363
1364 \begin_layout LyX-Code
1365
1366 \backslash
1367 setlength{
1368 \backslash
1369 voffset}{-0.5 in}
1370 \end_layout
1371
1372 \begin_layout Standard
1373 and your margins should now be correct.
1374 \end_layout
1375
1376 \begin_layout Subsubsection
1377 Example #2: Labels
1378 \end_layout
1379
1380 \begin_layout Standard
1381 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1382  There's a rather nice package, available at your nearest CTAN archive,
1383  for printing sheets of labels: 
1384 \begin_inset Flex Code
1385 status collapsed
1386
1387 \begin_layout Plain Layout
1388 labels.sty
1389 \end_layout
1390
1391 \end_inset
1392
1393 .
1394  Now, your system may not have this package installed by default.
1395  We leave that up to you to check.
1396  You'll also want to read the documentation for it; we're not going to do
1397  that for you.
1398  Since this is an example, however, we'll give you an example of how you
1399  use this package.
1400 \end_layout
1401
1402 \begin_layout Standard
1403 First, make sure you're using the 
1404 \begin_inset Flex Code
1405 status collapsed
1406
1407 \begin_layout Plain Layout
1408 article
1409 \end_layout
1410
1411 \end_inset
1412
1413  document class.
1414  Next, you need to put the following in your preamble:
1415 \end_layout
1416
1417 \begin_layout LyX-Code
1418
1419 \backslash
1420 usepackage{labels}
1421 \end_layout
1422
1423 \begin_layout LyX-Code
1424
1425 \backslash
1426 LabelCols=3
1427 \end_layout
1428
1429 \begin_layout LyX-Code
1430
1431 \backslash
1432 LabelRows=7
1433 \end_layout
1434
1435 \begin_layout LyX-Code
1436
1437 \backslash
1438 LeftBorder=8mm
1439 \end_layout
1440
1441 \begin_layout LyX-Code
1442
1443 \backslash
1444 RightBorder=8mm
1445 \end_layout
1446
1447 \begin_layout LyX-Code
1448
1449 \backslash
1450 TopBorder=9mm
1451 \end_layout
1452
1453 \begin_layout LyX-Code
1454
1455 \backslash
1456 BottomBorder=2mm
1457 \end_layout
1458
1459 \begin_layout Standard
1460 This sets things up for Avery label sheets, stock #5360.
1461  You're now ready to print labels, but you'll need to insert LaTeX code,
1462  placing the commands 
1463 \begin_inset Flex Code
1464 status collapsed
1465
1466 \begin_layout Plain Layout
1467
1468 \backslash
1469 begin{labels}
1470 \end_layout
1471
1472 \end_inset
1473
1474  and 
1475 \begin_inset Flex Code
1476 status collapsed
1477
1478 \begin_layout Plain Layout
1479
1480 \backslash
1481 end{labels}
1482 \end_layout
1483
1484 \end_inset
1485
1486  around each label text.
1487  This and other special features of 
1488 \begin_inset Flex Code
1489 status collapsed
1490
1491 \begin_layout Plain Layout
1492 labels.sty
1493 \end_layout
1494
1495 \end_inset
1496
1497  are explained in its documentation.
1498 \end_layout
1499
1500 \begin_layout Standard
1501 Someday, someone may write a LyX layout file to support this package directly.
1502  Maybe that someone is you.
1503 \end_layout
1504
1505 \begin_layout Subsubsection
1506 Example #3: Paragraph Indentation
1507 \end_layout
1508
1509 \begin_layout Standard
1510 Americans are trained to indent the first line of 
1511 \emph on
1512 every
1513 \emph default
1514  paragraph.
1515  As with all of their other weird quirks, most Americans will whine and
1516  moan until they can have their way and indent the first line of all paragraphs.
1517  (Yes, we're joking.
1518  (We are?) 
1519 \emph on
1520 Yeah
1521 \emph default
1522 , we are.)
1523 \end_layout
1524
1525 \begin_layout Standard
1526 Of course, this behavior isn't standard typography.
1527  In books, you typically only indent the first line of a paragraph 
1528 \emph on
1529 if
1530 \emph default
1531  it follows another one.
1532  The idea behind indenting the first line of a paragraph is to distinguish
1533  neighboring paragraphs from one another.
1534  If there is no previous paragraph—for example, if it follows a figure or
1535  is the first paragraph in a section—then there is no need for indentation.
1536  
1537 \end_layout
1538
1539 \begin_layout Standard
1540 If you're a typical American (we're still joking!), though, you don't care
1541  about such esoteric things; you want your indentation! Add this to the
1542  preamble:
1543 \end_layout
1544
1545 \begin_layout LyX-Code
1546
1547 \backslash
1548 usepackage{indentfirst}
1549 \end_layout
1550
1551 \begin_layout Standard
1552 If your TeX distribution isn't braindead, you'll have this package, and
1553  all of your paragraphs will get the indentation the Founding Fathers intended
1554  they should have.
1555 \end_layout
1556
1557 \begin_layout Subsubsection
1558 Example #4: This Document
1559 \end_layout
1560
1561 \begin_layout Standard
1562 You can also check out the preamble of this document to get an idea of some
1563  of the advanced things you can do.
1564  Also, there are more examples and an assortment of LaTeX 
1565 \begin_inset Quotes eld
1566 \end_inset
1567
1568 dirty tricks
1569 \begin_inset Quotes erd
1570 \end_inset
1571
1572  given in Chapter
1573 \begin_inset space ~
1574 \end_inset
1575
1576
1577 \begin_inset CommandInset ref
1578 LatexCommand ref
1579 reference "cha:secrets"
1580
1581 \end_inset
1582
1583 .
1584  
1585 \end_layout
1586
1587 \begin_layout Section
1588 LyX and LaTeX Errors
1589 \end_layout
1590
1591 \begin_layout Standard
1592 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1593  going.
1594  It then uses the logfile from the LaTeX run to do a post-mortem.
1595  After analyzing the logfile,LyX displays a dialog listing the errors.
1596  Clicking on any one of them will take you to the position in your LyX file
1597  where the error occurred.
1598 \begin_inset Foot
1599 status collapsed
1600
1601 \begin_layout Plain Layout
1602 Well, usually.
1603  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1604  right line.
1605  There are also cases where LaTeX reports the error on one line, but the
1606  actual error is earlier.
1607  This is not unlike forgetting a closing brace in a program: You'll get
1608  an error, but only later.
1609 \end_layout
1610
1611 \end_inset
1612
1613
1614 \end_layout
1615
1616 \begin_layout Standard
1617 Some folks also like to look at the log file directly: It is available from
1618  
1619 \begin_inset Flex MenuItem
1620 status collapsed
1621
1622 \begin_layout Plain Layout
1623 Document
1624 \bar under
1625 \SpecialChar \menuseparator
1626
1627 \bar default
1628 Latex
1629 \begin_inset space ~
1630 \end_inset
1631
1632 Log
1633 \end_layout
1634
1635 \end_inset
1636
1637 .
1638  There are some fairly common error messages and warnings.
1639  We'll cover those here.
1640  You should look at a good LaTeX book for a complete listing.
1641 \end_layout
1642
1643 \begin_layout Itemize
1644 \begin_inset Flex Code
1645 status collapsed
1646
1647 \begin_layout Plain Layout
1648 LaTeX Warning
1649 \end_layout
1650
1651 \end_inset
1652
1653
1654 \begin_inset Newline newline
1655 \end_inset
1656
1657 Anything beginning with these words is a warning message for the purpose
1658  of 
1659 \begin_inset Quotes eld
1660 \end_inset
1661
1662 debugging
1663 \begin_inset Quotes erd
1664 \end_inset
1665
1666  the LaTeX code itself.
1667  You'll get messages like this if you added or changed cross-references
1668  or bibliography entries, in which case, LaTeX is trying to tell you that
1669  you need to make another run.
1670  You can by-and-large ignore these.
1671 \end_layout
1672
1673 \begin_layout Itemize
1674 \begin_inset Flex Code
1675 status collapsed
1676
1677 \begin_layout Plain Layout
1678 LaTeX Font Warning
1679 \end_layout
1680
1681 \end_inset
1682
1683
1684 \begin_inset Newline newline
1685 \end_inset
1686
1687 Another warning message, this time about fonts which LaTeX couldn't find.
1688  The rest of the message will often say something about a replacement font
1689  that LaTeX used.
1690  You can safely ignore these, too.
1691 \end_layout
1692
1693 \begin_layout Itemize
1694 \begin_inset Flex Code
1695 status collapsed
1696
1697 \begin_layout Plain Layout
1698 Overfull 
1699 \backslash
1700 hbox
1701 \end_layout
1702
1703 \end_inset
1704
1705
1706 \begin_inset Newline newline
1707 \end_inset
1708
1709 LaTeX absolutely 
1710 \emph on
1711 loves
1712 \emph default
1713  to spew these out.
1714  They are warnings about lines that were too long and run past the right
1715  margin.
1716  Almost always, this is unnoticeable in the final output.
1717  (It can be just a point or two.) Or, only one or two characters extend past
1718  the margin.
1719  LaTeX seems to generate at least one of these messages for just about any
1720  document you write.
1721 \begin_inset Newline newline
1722 \end_inset
1723
1724 You can ignore these messages.
1725  Your eyes will tell you if there's a problem with something that's too
1726  wide; just look at the output.
1727 \begin_inset Foot
1728 status collapsed
1729
1730 \begin_layout Plain Layout
1731 You can also enable the `draft' option in 
1732 \begin_inset Flex MenuItem
1733 status collapsed
1734
1735 \begin_layout Plain Layout
1736 Document
1737 \bar under
1738 \SpecialChar \menuseparator
1739
1740 \bar default
1741 Settings
1742 \end_layout
1743
1744 \end_inset
1745
1746 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1747 \end_layout
1748
1749 \end_inset
1750
1751
1752 \end_layout
1753
1754 \begin_layout Itemize
1755 \begin_inset Flex Code
1756 status collapsed
1757
1758 \begin_layout Plain Layout
1759 Underfull 
1760 \backslash
1761 hbox
1762 \end_layout
1763
1764 \end_inset
1765
1766
1767 \begin_inset Newline newline
1768 \end_inset
1769
1770 Not quite as common as its cousin.
1771  LaTeX seems to like to print lines that are a bit too wide as opposed to
1772  ones that are a bit too narrow.
1773  We have no idea why.
1774 \end_layout
1775
1776 \begin_layout Itemize
1777 \begin_inset Flex Code
1778 status collapsed
1779
1780 \begin_layout Plain Layout
1781 Overfull 
1782 \backslash
1783 vbox
1784 \end_layout
1785
1786 \end_inset
1787
1788  and 
1789 \begin_inset Flex Code
1790 status collapsed
1791
1792 \begin_layout Plain Layout
1793 Underfull 
1794 \backslash
1795 vbox
1796 \end_layout
1797
1798 \end_inset
1799
1800
1801 \begin_inset Newline newline
1802 \end_inset
1803
1804 Warnings about troubles breaking the page.
1805  Once again, just look at the output.
1806  Your eyes will tell you where something has gone wrong.
1807 \end_layout
1808
1809 \begin_layout Itemize
1810 \begin_inset Flex Code
1811 status collapsed
1812
1813 \begin_layout Plain Layout
1814  LaTeX Error: File 
1815 \begin_inset Quotes els
1816 \end_inset
1817
1818 Xxxx
1819 \begin_inset Quotes ers
1820 \end_inset
1821
1822  not found
1823 \end_layout
1824
1825 \end_inset
1826
1827
1828 \begin_inset Newline newline
1829 \end_inset
1830
1831 The file 
1832 \begin_inset Quotes eld
1833 \end_inset
1834
1835 Xxxx
1836 \begin_inset Quotes erd
1837 \end_inset
1838
1839  isn't installed on this system.
1840  This usually appears because some package your document needs isn't installed.
1841  If you didn't touch the preamble or didn't use the 
1842 \begin_inset Flex Code
1843 status collapsed
1844
1845 \begin_layout Plain Layout
1846
1847 \backslash
1848 usepackage{}
1849 \end_layout
1850
1851 \end_inset
1852
1853  command, then one of the packages LyX tried to load is missing.
1854  Use 
1855 \begin_inset Flex MenuItem
1856 status collapsed
1857
1858 \begin_layout Plain Layout
1859 Help\SpecialChar \menuseparator
1860 LaTeX Configuration
1861 \end_layout
1862
1863 \end_inset
1864
1865  to get a list of packages that LyX knows about.
1866  This file is updated whenever you reconfigure LyX (using 
1867 \begin_inset Flex MenuItem
1868 status collapsed
1869
1870 \begin_layout Plain Layout
1871 Tools\SpecialChar \menuseparator
1872 Reconfigure
1873 \end_layout
1874
1875 \end_inset
1876
1877 ) and tells you which packages have been detected and what they do.
1878 \begin_inset Newline newline
1879 \end_inset
1880
1881 If you did use the 
1882 \begin_inset Flex Code
1883 status collapsed
1884
1885 \begin_layout Plain Layout
1886
1887 \backslash
1888 usepackage{}
1889 \end_layout
1890
1891 \end_inset
1892
1893  command and the package in question isn't installed, then you'll need to
1894  install it yourself.
1895 \end_layout
1896
1897 \begin_layout Itemize
1898 \begin_inset Flex Code
1899 status collapsed
1900
1901 \begin_layout Plain Layout
1902 LaTeX Error: Unknown option
1903 \end_layout
1904
1905 \end_inset
1906
1907
1908 \begin_inset Newline newline
1909 \end_inset
1910
1911 Error messages beginning with this are trying to tell you that you specified
1912  a bad or undefined option to a package.
1913  Check the package's documentation.
1914 \end_layout
1915
1916 \begin_layout Itemize
1917 \begin_inset Flex Code
1918 status collapsed
1919
1920 \begin_layout Plain Layout
1921 Undefined control sequence
1922 \end_layout
1923
1924 \end_inset
1925
1926
1927 \begin_inset Newline newline
1928 \end_inset
1929
1930 If you've inserted LaTeX code into your document, but made a typo, you'll
1931  get one of these.
1932  You may have forgotten to load a package.
1933  In any case, this error message usually means that you used an undefined
1934  command.
1935  
1936 \end_layout
1937
1938 \begin_layout Standard
1939 There are other error and warning messages.
1940  Some are self-explanatory.
1941  These are usually LaTeX messages.
1942  Others are downright cryptic.
1943  These are usually TeX error messages, and we really have 
1944 \emph on
1945 no clue
1946 \emph default
1947  what they mean or how to decipher them.
1948  No-one does.
1949 \end_layout
1950
1951 \begin_layout Standard
1952 There's a general sequence you should follow if you get error messages:
1953 \end_layout
1954
1955 \begin_layout Enumerate
1956 Look at the LaTeX code you inserted for typos.
1957 \end_layout
1958
1959 \begin_layout Enumerate
1960 If there are no typos, check that you used the command(s) correctly.
1961 \end_layout
1962
1963 \begin_layout Enumerate
1964 If you get a bunch of error boxes piled up at the very top of the document—and
1965  especially if you see a 
1966 \begin_inset Quotes eld
1967 \end_inset
1968
1969
1970 \begin_inset Flex Code
1971 status collapsed
1972
1973 \begin_layout Plain Layout
1974 Missing 
1975 \backslash
1976 begin{document}
1977 \end_layout
1978
1979 \end_inset
1980
1981
1982 \begin_inset Quotes erd
1983 \end_inset
1984
1985  error—it means that there are errors in the preamble.
1986  Start debugging your preamble.
1987 \end_layout
1988
1989 \begin_layout Enumerate
1990 If you didn't add anything to the preamble and didn't add any LaTeX code
1991  to the document, the first suspect is your LaTeX distribution itself.
1992  Check for missing packages and install them.
1993 \end_layout
1994
1995 \begin_layout Enumerate
1996 Okay, so there are no missing packages.
1997  Did you use any of the fine-tuning options in LyX? Specifically, did you
1998  
1999 \emph on
2000 misuse
2001 \emph default
2002  any of them, like trying to manually insert lots of 
2003 \begin_inset Flex Code
2004 status collapsed
2005
2006 \begin_layout Plain Layout
2007 Protected
2008 \begin_inset space ~
2009 \end_inset
2010
2011 Blanks
2012 \end_layout
2013
2014 \end_inset
2015
2016
2017 \begin_inset Flex Code
2018 status collapsed
2019
2020 \begin_layout Plain Layout
2021 Linebreaks
2022 \end_layout
2023
2024 \end_inset
2025
2026 , or 
2027 \begin_inset Flex Code
2028 status collapsed
2029
2030 \begin_layout Plain Layout
2031 Pagebreaks
2032 \end_layout
2033
2034 \end_inset
2035
2036 ? Did you try to kludge something together with these instead of using the
2037  appropriate paragraph environment?
2038 \end_layout
2039
2040 \begin_layout Enumerate
2041 All right, you didn't use any of the fine-tuning options, you played by
2042  the rules.
2043  Did you try to pull a fancy maneuver? Did you do something funky inside
2044  a table or an equation, like inserting a graphic into a table cell?
2045 \end_layout
2046
2047 \begin_layout Enumerate
2048 Do you have long sections of text where LaTeX cannot find a place to break
2049  a line? By default, LaTeX is rather strict about how much extra inter-word
2050  spacing it will add in order to break a line.
2051  Preferably, you should rework the paragraph to avoid the problem.
2052  If this isn't an option, you can wrap your text in 
2053 \begin_inset Flex Code
2054 status collapsed
2055
2056 \begin_layout Plain Layout
2057
2058 \backslash
2059 sloppypar
2060 \end_layout
2061
2062 \end_inset
2063
2064  to make LaTeX's line breaking more, well, sloppy.
2065 \end_layout
2066
2067 \begin_layout Enumerate
2068 Did you go overboard with the nesting? LyX (currently) doesn't check to
2069  make sure you're in the limits for nesting environments.
2070  If you nested a bunch of environments to the 
2071 \begin_inset Formula $17^{\mathrm{th}}$
2072 \end_inset
2073
2074  level, that's the problem.
2075  (The limit in LaTeX is five.)
2076 \end_layout
2077
2078 \begin_layout Enumerate
2079 Okay, you didn't get any error messages, but your output looks awful.
2080  If you have a table or figure that's too wide or long for the page, you
2081  need to:
2082 \end_layout
2083
2084 \begin_deeper
2085 \begin_layout Enumerate
2086 rescale the figure so it fits.
2087 \end_layout
2088
2089 \begin_layout Enumerate
2090 trim down the table so it fits.
2091 \end_layout
2092
2093 \end_deeper
2094 \begin_layout Enumerate
2095 If something else is wrong with the output, and you didn't try to pull anything
2096  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2097 \end_layout
2098
2099 \begin_layout Standard
2100 If all this doesn't help—well, then 
2101 \emph on
2102 perhaps
2103 \emph default
2104  you might have found a bug in LyX\SpecialChar \ldots{}
2105 .
2106 \end_layout
2107
2108 \begin_layout Chapter
2109 Supplemental Tools
2110 \end_layout
2111
2112 \begin_layout Section
2113 Customizing Bibliographies with BibTeX
2114 \end_layout
2115
2116 \begin_layout Standard
2117 The most basic information about how to use BibTeX with LyX is contained
2118  in the section 
2119 \emph on
2120 Bibliography databases (BibTeX)
2121 \emph default
2122  of the 
2123 \emph on
2124 User's Guide
2125 \emph default
2126 .
2127  The following subsections explain special bibliography features supported
2128  by LyX.
2129 \end_layout
2130
2131 \begin_layout Subsection
2132 Alternative Citation Styles
2133 \end_layout
2134
2135 \begin_layout Standard
2136 Standard BibTeX uses numbers (e.
2137 \begin_inset space \thinspace{}
2138 \end_inset
2139
2140 g.
2141 \begin_inset space \space{}
2142 \end_inset
2143
2144
2145 \begin_inset Quotes eld
2146 \end_inset
2147
2148 [12]
2149 \begin_inset Quotes erd
2150 \end_inset
2151
2152 ) to refer to a cited work.
2153  However, in many scientific disciplines, other citation styles are in use.
2154  The most common one is the author-year style (e.
2155 \begin_inset space \thinspace{}
2156 \end_inset
2157
2158 g.
2159 \begin_inset space \space{}
2160 \end_inset
2161
2162
2163 \begin_inset Quotes eld
2164 \end_inset
2165
2166 Knuth 1984a
2167 \begin_inset Quotes erd
2168 \end_inset
2169
2170 ).
2171  LyX supports two packages that provide this style, 
2172 \begin_inset Flex Code
2173 status collapsed
2174
2175 \begin_layout Plain Layout
2176 natbib
2177 \end_layout
2178
2179 \end_inset
2180
2181  and 
2182 \begin_inset Flex Code
2183 status collapsed
2184
2185 \begin_layout Plain Layout
2186 jurabib
2187 \end_layout
2188
2189 \end_inset
2190
2191 .
2192  Both packages have their pros and cons, which cannot be listed in detail.
2193  If you only want to have simple author-year (or author-numerical) style,
2194  or if you want to use one of the countless style files for 
2195 \begin_inset Flex Code
2196 status collapsed
2197
2198 \begin_layout Plain Layout
2199 natbib
2200 \end_layout
2201
2202 \end_inset
2203
2204 , than the established 
2205 \begin_inset Flex Code
2206 status collapsed
2207
2208 \begin_layout Plain Layout
2209 natbib
2210 \end_layout
2211
2212 \end_inset
2213
2214  package is probably your choice.
2215  If you need special features like short title references, ibidem etc., you
2216  might consider the 
2217 \begin_inset Flex Code
2218 status collapsed
2219
2220 \begin_layout Plain Layout
2221 jurabib
2222 \end_layout
2223
2224 \end_inset
2225
2226  package.
2227 \end_layout
2228
2229 \begin_layout Standard
2230 The handling of both packages in LyX is basically the same.
2231  Go to 
2232 \begin_inset Flex MenuItem
2233 status collapsed
2234
2235 \begin_layout Plain Layout
2236 Document\SpecialChar \menuseparator
2237 Settings
2238 \end_layout
2239
2240 \end_inset
2241
2242  and select under 
2243 \begin_inset Flex MenuItem
2244 status collapsed
2245
2246 \begin_layout Plain Layout
2247 Bibliography
2248 \end_layout
2249
2250 \end_inset
2251
2252  the option 
2253 \begin_inset Flex MenuItem
2254 status collapsed
2255
2256 \begin_layout Plain Layout
2257 Natbib
2258 \end_layout
2259
2260 \end_inset
2261
2262  or 
2263 \begin_inset Flex MenuItem
2264 status collapsed
2265
2266 \begin_layout Plain Layout
2267 Jurabib
2268 \end_layout
2269
2270 \end_inset
2271
2272 .
2273  With both packages, you will get some extra features in the citation dialog
2274  and you can select the style of the reference (
2275 \begin_inset Quotes eld
2276 \end_inset
2277
2278 Knuth 1984
2279 \begin_inset Quotes erd
2280 \end_inset
2281
2282
2283 \begin_inset Quotes eld
2284 \end_inset
2285
2286 Knuth (1984)
2287 \begin_inset Quotes erd
2288 \end_inset
2289
2290
2291 \begin_inset Quotes eld
2292 \end_inset
2293
2294 Knuth, 1984
2295 \begin_inset Quotes erd
2296 \end_inset
2297
2298
2299 \begin_inset Quotes eld
2300 \end_inset
2301
2302 1984
2303 \begin_inset Quotes erd
2304 \end_inset
2305
2306  etc.).
2307  Note that both packages need specifically designed style files.
2308  They both ship their own, but there are lots of additional style files,
2309  and there is even an interactive style file builder
2310 \begin_inset Foot
2311 status collapsed
2312
2313 \begin_layout Plain Layout
2314 See 
2315 \begin_inset Flex URL
2316 status open
2317
2318 \begin_layout Plain Layout
2319
2320 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2321 \end_layout
2322
2323 \end_inset
2324
2325
2326 \end_layout
2327
2328 \end_inset
2329
2330  for 
2331 \begin_inset Flex Code
2332 status collapsed
2333
2334 \begin_layout Plain Layout
2335 natbib
2336 \end_layout
2337
2338 \end_inset
2339
2340 .
2341 \end_layout
2342
2343 \begin_layout Subsection
2344 Sectioned Bibliographies
2345 \end_layout
2346
2347 \begin_layout Standard
2348 Sometimes you might need to divide your bibliography into several sections.
2349  If you are for instance a historian, the possibility to separate sources
2350  and scientific works is most likely a 
2351 \begin_inset Quotes eld
2352 \end_inset
2353
2354 must have
2355 \begin_inset Quotes erd
2356 \end_inset
2357
2358 .
2359  Unfortunately, BibTeX itself does not allow you to do this.
2360  But with the help of some LaTeX packages, BibTeX can be extended to fit
2361  your needs.
2362 \end_layout
2363
2364 \begin_layout Standard
2365 LyX provides native support for one of these packages, 
2366 \family typewriter
2367 bibtopic
2368 \family default
2369 .
2370 \begin_inset Foot
2371 status collapsed
2372
2373 \begin_layout Plain Layout
2374 Available from 
2375 \begin_inset Flex URL
2376 status open
2377
2378 \begin_layout Plain Layout
2379
2380 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2381 \end_layout
2382
2383 \end_inset
2384
2385
2386 \end_layout
2387
2388 \end_inset
2389
2390  The advantage of this package (compared to other packages like 
2391 \family typewriter
2392 multibib
2393 \family default
2394 ) is that you don't need to define new citation commands.
2395  Instead, you need to prepare different bibliographic databases which include
2396  the entries for the different sections of the bibliography.
2397  For example: If you want to divide your bibliography into the sections
2398  
2399 \begin_inset Quotes eld
2400 \end_inset
2401
2402 Sources
2403 \begin_inset Quotes erd
2404 \end_inset
2405
2406  and 
2407 \begin_inset Quotes eld
2408 \end_inset
2409
2410 Scientific works
2411 \begin_inset Quotes erd
2412 \end_inset
2413
2414 , you first need to create two bibliographic databases, e.
2415 \begin_inset space \thinspace{}
2416 \end_inset
2417
2418 g.
2419 \begin_inset space \space{}
2420 \end_inset
2421
2422
2423 \begin_inset Flex Code
2424 status collapsed
2425
2426 \begin_layout Plain Layout
2427 sources.bib
2428 \end_layout
2429
2430 \end_inset
2431
2432  and 
2433 \begin_inset Flex Code
2434 status collapsed
2435
2436 \begin_layout Plain Layout
2437 scientific.bib
2438 \end_layout
2439
2440 \end_inset
2441
2442 .
2443  
2444 \end_layout
2445
2446 \begin_layout Standard
2447 Go to 
2448 \begin_inset Flex MenuItem
2449 status collapsed
2450
2451 \begin_layout Plain Layout
2452 Document\SpecialChar \menuseparator
2453 Settings
2454 \end_layout
2455
2456 \end_inset
2457
2458  and check under 
2459 \begin_inset Flex MenuItem
2460 status collapsed
2461
2462 \begin_layout Plain Layout
2463 Bibliography
2464 \end_layout
2465
2466 \end_inset
2467
2468  the option 
2469 \begin_inset Flex MenuItem
2470 status collapsed
2471
2472 \begin_layout Plain Layout
2473 Sectioned bibliography
2474 \end_layout
2475
2476 \end_inset
2477
2478 .
2479  Now you can insert multiple BibTeX bibliographies, one for each section
2480  of your bibliography.
2481  Returning to our example: Insert the BibTeX bibliography 
2482 \begin_inset Flex Code
2483 status collapsed
2484
2485 \begin_layout Plain Layout
2486 sources.bib
2487 \end_layout
2488
2489 \end_inset
2490
2491  and a second one for the database 
2492 \begin_inset Flex Code
2493 status collapsed
2494
2495 \begin_layout Plain Layout
2496 scientific.bib
2497 \end_layout
2498
2499 \end_inset
2500
2501 .
2502  You are free to use the same or different styles for each section.
2503  Additionally, you can chose if the bibliography section should contain
2504  
2505 \begin_inset Quotes eld
2506 \end_inset
2507
2508 all cited references
2509 \begin_inset Quotes erd
2510 \end_inset
2511
2512  of the specified database(s) (which is the default), 
2513 \begin_inset Quotes eld
2514 \end_inset
2515
2516 all uncited references
2517 \begin_inset Quotes erd
2518 \end_inset
2519
2520  or even 
2521 \begin_inset Quotes eld
2522 \end_inset
2523
2524 all references
2525 \begin_inset Quotes erd
2526 \end_inset
2527
2528 .
2529  This might be useful if you would like to separate your bibliography into
2530  three sections: 
2531 \begin_inset Quotes eld
2532 \end_inset
2533
2534 Cited sources
2535 \begin_inset Quotes erd
2536 \end_inset
2537
2538
2539 \begin_inset Quotes eld
2540 \end_inset
2541
2542 Uncited sources
2543 \begin_inset Quotes erd
2544 \end_inset
2545
2546 , and 
2547 \begin_inset Quotes eld
2548 \end_inset
2549
2550 Scientific works
2551 \begin_inset Quotes erd
2552 \end_inset
2553
2554 .
2555  The titles for the sections can be added as ordinary sections or subsections.
2556  Since 
2557 \begin_inset Flex Code
2558 status collapsed
2559
2560 \begin_layout Plain Layout
2561 bibtopic
2562 \end_layout
2563
2564 \end_inset
2565
2566  removes the bibliography title, you have manually re-add that, too (as
2567  a chapter* or section*, for instance).
2568 \end_layout
2569
2570 \begin_layout Subsection
2571 Multiple Bibliographies
2572 \end_layout
2573
2574 \begin_layout Standard
2575 Multiple bibliographies, e.
2576 \begin_inset space \thinspace{}
2577 \end_inset
2578
2579 g.
2580 \begin_inset space \space{}
2581 \end_inset
2582
2583 a bibliography for each section or chapter of the document, are not supported
2584  by BibTeX itself.
2585  But the 
2586 \begin_inset Flex Code
2587 status collapsed
2588
2589 \begin_layout Plain Layout
2590 bibtopic
2591 \end_layout
2592
2593 \end_inset
2594
2595  package, which is used for the creation of sectioned bibliographies in
2596  LyX (see the previous section), provides an easy way to solve this task,
2597  if you are willing to use some 
2598 \begin_inset Flex MenuItem
2599 status collapsed
2600
2601 \begin_layout Plain Layout
2602 TeX Code
2603 \end_layout
2604
2605 \end_inset
2606
2607  (see section
2608 \begin_inset space ~
2609 \end_inset
2610
2611
2612 \begin_inset CommandInset ref
2613 LatexCommand ref
2614 reference "sec:Inserting-TeX-Code"
2615
2616 \end_inset
2617
2618 ).
2619 \begin_inset Foot
2620 status collapsed
2621
2622 \begin_layout Plain Layout
2623 An alternative approach is to use the 
2624 \begin_inset Flex Code
2625 status collapsed
2626
2627 \begin_layout Plain Layout
2628 chapterbib
2629 \end_layout
2630
2631 \end_inset
2632
2633  or 
2634 \begin_inset Flex Code
2635 status collapsed
2636
2637 \begin_layout Plain Layout
2638 bibunits
2639 \end_layout
2640
2641 \end_inset
2642
2643  package, respectively.
2644 \end_layout
2645
2646 \end_inset
2647
2648
2649 \end_layout
2650
2651 \begin_layout Standard
2652 First go to 
2653 \begin_inset Flex MenuItem
2654 status collapsed
2655
2656 \begin_layout Plain Layout
2657 Document\SpecialChar \menuseparator
2658 Settings
2659 \end_layout
2660
2661 \end_inset
2662
2663  and under 
2664 \begin_inset Flex MenuItem
2665 status collapsed
2666
2667 \begin_layout Plain Layout
2668 Bibliography
2669 \end_layout
2670
2671 \end_inset
2672
2673  check 
2674 \begin_inset Flex MenuItem
2675 status collapsed
2676
2677 \begin_layout Plain Layout
2678 Sectioned bibliography
2679 \end_layout
2680
2681 \end_inset
2682
2683 .
2684  In the document, you have to enclose the sections, which shall contain
2685  their own bibliography (including the BibTeX bibliography itself), between
2686  
2687 \begin_inset Flex Code
2688 status collapsed
2689
2690 \begin_layout Plain Layout
2691
2692 \backslash
2693 begin{btUnit}
2694 \end_layout
2695
2696 \end_inset
2697
2698  and 
2699 \begin_inset Flex Code
2700 status collapsed
2701
2702 \begin_layout Plain Layout
2703
2704 \backslash
2705 end{btUnit}
2706 \end_layout
2707
2708 \end_inset
2709
2710  (those commands have to be inserted as TeX code).
2711  The bibliography will contain all references which have been cited in the
2712  current 
2713 \begin_inset Flex Code
2714 status collapsed
2715
2716 \begin_layout Plain Layout
2717 btUnit
2718 \end_layout
2719
2720 \end_inset
2721
2722 .
2723  
2724 \series bold
2725 Note:
2726 \series default
2727  If you are using this approach, then every citation reference has to be
2728  inside some 
2729 \begin_inset Flex Code
2730 status collapsed
2731
2732 \begin_layout Plain Layout
2733 btUnit
2734 \end_layout
2735
2736 \end_inset
2737
2738 .
2739  Also, the 
2740 \begin_inset Flex Code
2741 status collapsed
2742
2743 \begin_layout Plain Layout
2744 btUnit
2745 \end_layout
2746
2747 \end_inset
2748
2749 s cannot be nested.
2750 \end_layout
2751
2752 \begin_layout Section
2753 Multipart Documents
2754 \end_layout
2755
2756 \begin_layout Subsection
2757 General Operation
2758 \end_layout
2759
2760 \begin_layout Standard
2761 When you are working on a large file with many sections, it is often convenient
2762  to break up the document into several files, or perhaps you have something
2763  where a table may change from time to time, but the preceding text does
2764  not.
2765  In these cases, you should seriously consider using multipart documents.
2766  For example, scientific papers often have five major sections: the introduction
2767 , observations, results, discussion, and conclusion.
2768  Each of these could be its own separate LyX file, with one 
2769 \begin_inset Quotes eld
2770 \end_inset
2771
2772 master
2773 \begin_inset Quotes erd
2774 \end_inset
2775
2776  file which contains the title, authors, abstract, references, etc., plus
2777  the five included files.
2778  It is important to note that each of these files is a full LyX file which
2779  can be formatted and printed on its own, as well as included in a master
2780  file.
2781  Each of these files must have the same document class, however—don't attempt
2782  to mix book classes with article classes.
2783  You may also include LaTeX files; however, these files must not have their
2784  own preamble (i.
2785 \begin_inset space \thinspace{}
2786 \end_inset
2787
2788 g.
2789 \begin_inset space \space{}
2790 \end_inset
2791
2792 everything up to and including the 
2793 \begin_inset Flex Code
2794 status collapsed
2795
2796 \begin_layout Plain Layout
2797
2798 \backslash
2799 begin{document}
2800 \end_layout
2801
2802 \end_inset
2803
2804  line as well as the 
2805 \begin_inset Flex Code
2806 status collapsed
2807
2808 \begin_layout Plain Layout
2809
2810 \backslash
2811 end{document}
2812 \end_layout
2813
2814 \end_inset
2815
2816  line must be deleted) or else errors will be generated when you try to
2817  make a DVI file.
2818 \end_layout
2819
2820 \begin_layout Standard
2821 LyX allows you to include files quite easily with 
2822 \begin_inset Flex MenuItem
2823 status collapsed
2824
2825 \begin_layout Plain Layout
2826 Insert\SpecialChar \menuseparator
2827 ChiId
2828 \begin_inset space ~
2829 \end_inset
2830
2831 Document
2832 \end_layout
2833
2834 \end_inset
2835
2836 .
2837  When you click on this selection a small box is inserted into the file
2838  at the current cursor location.
2839  Clicking on the box raises a dialog which allows you to select the file
2840  to be included, and the method of its inclusion.
2841  
2842 \end_layout
2843
2844 \begin_layout Standard
2845 The file selection box should by now be obvious.
2846  The three inclusion methods are 
2847 \begin_inset Quotes eld
2848 \end_inset
2849
2850 include
2851 \begin_inset Quotes erd
2852 \end_inset
2853
2854
2855 \begin_inset Quotes eld
2856 \end_inset
2857
2858 input
2859 \begin_inset Quotes erd
2860 \end_inset
2861
2862 , and 
2863 \begin_inset Quotes eld
2864 \end_inset
2865
2866 verbatim
2867 \begin_inset Quotes erd
2868 \end_inset
2869
2870 .
2871  The difference between 
2872 \begin_inset Quotes eld
2873 \end_inset
2874
2875 include
2876 \begin_inset Quotes erd
2877 \end_inset
2878
2879  and 
2880 \begin_inset Quotes eld
2881 \end_inset
2882
2883 input
2884 \begin_inset Quotes erd
2885 \end_inset
2886
2887  is really only meaningful to LaTeXperts, but the practical difference is
2888  that files which are 
2889 \begin_inset Quotes eld
2890 \end_inset
2891
2892 included
2893 \begin_inset Quotes erd
2894 \end_inset
2895
2896  are typeset beginning on a new page, while files which are 
2897 \begin_inset Quotes eld
2898 \end_inset
2899
2900 inputted
2901 \begin_inset Quotes erd
2902 \end_inset
2903
2904  are typeset starting on the current page.
2905 \end_layout
2906
2907 \begin_layout Standard
2908 Generally, the master file is converted into a full LaTeX file before typesettin
2909 g, while the included files are converted to LaTeX files which do not have
2910  all the preamble information.
2911 \end_layout
2912
2913 \begin_layout Standard
2914
2915 \begin_inset Quotes eld
2916 \end_inset
2917
2918 verbatim
2919 \begin_inset Quotes erd
2920 \end_inset
2921
2922  included file allows you to include a file typeset exactly as it appears
2923  in the file, i.
2924 \begin_inset space \thinspace{}
2925 \end_inset
2926
2927 g.
2928 \begin_inset space \space{}
2929 \end_inset
2930
2931 in 
2932 \begin_inset Flex Code
2933 status collapsed
2934
2935 \begin_layout Plain Layout
2936 verbatim
2937 \end_layout
2938
2939 \end_inset
2940
2941  mode, with the characters set in a fixed-width typewriter font.
2942  Normally, spaces in this file are invisible, though two consecutive spaces
2943  are conserved, unlike LyX's normal treatment of spaces.
2944  However, setting the 
2945 \begin_inset Flex MenuItem
2946 status collapsed
2947
2948 \begin_layout Plain Layout
2949 Mark
2950 \begin_inset space ~
2951 \end_inset
2952
2953 spaces
2954 \begin_inset space ~
2955 \end_inset
2956
2957 in
2958 \begin_inset space ~
2959 \end_inset
2960
2961 output
2962 \end_layout
2963
2964 \end_inset
2965
2966  checkbox typesets a mark to unambiguously define the presence of a space.
2967  
2968 \end_layout
2969
2970 \begin_layout Subsection
2971 Cross-References Between Files
2972 \end_layout
2973
2974 \begin_layout Standard
2975 \begin_inset Box Shadowbox
2976 position "t"
2977 hor_pos "c"
2978 has_inner_box 1
2979 inner_pos "t"
2980 use_parbox 0
2981 use_makebox 0
2982 width "100col%"
2983 special "none"
2984 height "1in"
2985 height_special "totalheight"
2986 status open
2987
2988 \begin_layout Plain Layout
2989 This section is somewhat out of date.
2990  Need to describe default master documents and how children are opened when
2991  the master is.
2992  [[FIXME]]
2993 \end_layout
2994
2995 \end_inset
2996
2997
2998 \end_layout
2999
3000 \begin_layout Standard
3001 It is possible to set up cross-references between the different files.
3002  First, open all the files in question: let's call them A and B in a two
3003  file example, where B is included in A.
3004  Let's say you insert a label in A, then want to reference it in B.
3005  Open the cross-reference dialog in whilst in document B, and you can select
3006  the 
3007 \begin_inset Quotes eld
3008 \end_inset
3009
3010 buffer
3011 \begin_inset Quotes erd
3012 \end_inset
3013
3014  to use.
3015 \end_layout
3016
3017 \begin_layout Subsection
3018 Bibliography Lists in all Subdocuments
3019 \end_layout
3020
3021 \begin_layout Standard
3022 \begin_inset Box Frameless
3023 position "t"
3024 hor_pos "c"
3025 has_inner_box 1
3026 inner_pos "t"
3027 use_parbox 0
3028 use_makebox 0
3029 width "100col%"
3030 special "none"
3031 height "1in"
3032 height_special "totalheight"
3033 status open
3034
3035 \begin_layout Plain Layout
3036 This section also needs updating.
3037  There is now material about this on the wiki, and it could be copied here.
3038 \end_layout
3039
3040 \end_inset
3041
3042
3043 \end_layout
3044
3045 \begin_layout Standard
3046 Copy the bibliography list with all entries to all subdocuments and transform
3047  them to a comment.
3048  This way LyX will find the 
3049 \begin_inset Flex Code
3050 status collapsed
3051
3052 \begin_layout Plain Layout
3053 .bib
3054 \end_layout
3055
3056 \end_inset
3057
3058 -files and you can easily insert references without making the bibliography
3059  list visible.
3060 \end_layout
3061
3062 \begin_layout Standard
3063 As the bibliography list is in a comment, LaTeX won't use use it and the
3064  references will look like this: [?], instead of like this: [1].
3065  One solution is to use the LaTeX-package 
3066 \begin_inset Flex Code
3067 status collapsed
3068
3069 \begin_layout Plain Layout
3070 comment
3071 \end_layout
3072
3073 \end_inset
3074
3075  that will only include comments by processing the files separately.
3076  To do this, add in the LaTeX preamble of every subdocument the following:
3077 \end_layout
3078
3079 \begin_layout LyX-Code
3080
3081 \backslash
3082 usepackage{comment}
3083 \end_layout
3084
3085 \begin_layout LyX-Code
3086
3087 \backslash
3088 includecomment{comment}
3089 \end_layout
3090
3091 \begin_layout Standard
3092 See also 
3093 \begin_inset Flex URL
3094 status collapsed
3095
3096 \begin_layout Plain Layout
3097
3098 http://wiki.lyx.org/FAQ/Unsorted#toc31
3099 \end_layout
3100
3101 \end_inset
3102
3103 .
3104 \change_inserted 1414654397 1302984017
3105
3106 \end_layout
3107
3108 \begin_layout Section
3109
3110 \change_inserted 1414654397 1302984017
3111 LyX Archives
3112 \end_layout
3113
3114 \begin_layout Standard
3115
3116 \change_inserted 1414654397 1302984082
3117 Users sometimes need to be able to 
3118 \begin_inset Quotes eld
3119 \end_inset
3120
3121 bundle
3122 \begin_inset Quotes erd
3123 \end_inset
3124
3125  a LyX file together with all the images (and other files) on which it depends,
3126  either for sending to a publisher or for sharing with a co-author.
3127  LyX 2.0 includes a Python script (
3128 \begin_inset Flex Code
3129 status collapsed
3130
3131 \begin_layout Plain Layout
3132
3133 \change_inserted 1414654397 1302984017
3134 lyxpak.py
3135 \end_layout
3136
3137 \end_inset
3138
3139 ) that automates this process.
3140  To use it, you must have either the 
3141 \begin_inset Flex Code
3142 status collapsed
3143
3144 \begin_layout Plain Layout
3145
3146 \change_inserted 1414654397 1302984053
3147 zipfile
3148 \change_unchanged
3149
3150 \end_layout
3151
3152 \end_inset
3153
3154  or 
3155 \begin_inset Flex Code
3156 status collapsed
3157
3158 \begin_layout Plain Layout
3159
3160 \change_inserted 1414654397 1302984046
3161 tarfile
3162 \change_unchanged
3163
3164 \end_layout
3165
3166 \end_inset
3167
3168  python modules installed on your system.
3169  By default, the script prefers the 
3170 \begin_inset Flex Code
3171 status collapsed
3172
3173 \begin_layout Plain Layout
3174
3175 \change_inserted 1414654397 1302984059
3176 gzip
3177 \change_unchanged
3178
3179 \end_layout
3180
3181 \end_inset
3182
3183 -compressed 
3184 \begin_inset Flex Code
3185 status collapsed
3186
3187 \begin_layout Plain Layout
3188
3189 \change_inserted 1414654397 1302984063
3190 tar
3191 \change_unchanged
3192
3193 \end_layout
3194
3195 \end_inset
3196
3197  format on Unix-like systems and the 
3198 \begin_inset Flex Code
3199 status collapsed
3200
3201 \begin_layout Plain Layout
3202
3203 \change_inserted 1414654397 1302984068
3204 zip
3205 \change_unchanged
3206
3207 \end_layout
3208
3209 \end_inset
3210
3211  format on Windows.
3212 \end_layout
3213
3214 \begin_layout Standard
3215
3216 \change_inserted 1414654397 1302984108
3217 LyX's configuration process will set the script up to export a `LyX Archive',
3218  and this format will then be available under 
3219 \begin_inset Flex Code
3220 status collapsed
3221
3222 \begin_layout Plain Layout
3223
3224 \change_inserted 1414654397 1302984108
3225 File\SpecialChar \menuseparator
3226 Export
3227 \change_unchanged
3228
3229 \end_layout
3230
3231 \end_inset
3232
3233 .
3234 \end_layout
3235
3236 \begin_layout Standard
3237
3238 \change_inserted 1414654397 1302984150
3239 Independently of the platform, the generation of a particular archive format
3240  can be forced by adding either the 
3241 \begin_inset Flex Code
3242 status collapsed
3243
3244 \begin_layout Plain Layout
3245
3246 \change_inserted 1414654397 1302984113
3247 -t
3248 \change_unchanged
3249
3250 \end_layout
3251
3252 \end_inset
3253
3254  (for the 
3255 \begin_inset Flex Code
3256 status collapsed
3257
3258 \begin_layout Plain Layout
3259
3260 \change_inserted 1414654397 1302984117
3261 tar
3262 \change_unchanged
3263
3264 \end_layout
3265
3266 \end_inset
3267
3268  format) or 
3269 \begin_inset Flex Code
3270 status collapsed
3271
3272 \begin_layout Plain Layout
3273
3274 \change_inserted 1414654397 1302984121
3275 -z
3276 \change_unchanged
3277
3278 \end_layout
3279
3280 \end_inset
3281
3282  (for the 
3283 \begin_inset Flex Code
3284 status collapsed
3285
3286 \begin_layout Plain Layout
3287
3288 \change_inserted 1414654397 1302984125
3289 zip
3290 \change_unchanged
3291
3292 \end_layout
3293
3294 \end_inset
3295
3296  format) switch to the 
3297 \begin_inset Flex Code
3298 status collapsed
3299
3300 \begin_layout Plain Layout
3301
3302 \change_inserted 1414654397 1302984131
3303 LyX\SpecialChar \menuseparator
3304 LyX Archive
3305 \change_unchanged
3306
3307 \end_layout
3308
3309 \end_inset
3310
3311  converter in 
3312 \begin_inset Flex Code
3313 status collapsed
3314
3315 \begin_layout Plain Layout
3316
3317 \change_inserted 1414654397 1302984137
3318 Tools\SpecialChar \menuseparator
3319 Preferences\SpecialChar \menuseparator
3320 File Handling\SpecialChar \menuseparator
3321 Converters
3322 \change_unchanged
3323
3324 \end_layout
3325
3326 \end_inset
3327
3328 .
3329  (Make sure you add the switch after the script name, not before it.)
3330 \change_unchanged
3331
3332 \end_layout
3333
3334 \begin_layout Section
3335 Fancy Headers and Footers
3336 \end_layout
3337
3338 \begin_layout Standard
3339 The default page layout is rather plain; for an 
3340 \begin_inset Flex Code
3341 status collapsed
3342
3343 \begin_layout Plain Layout
3344 article
3345 \end_layout
3346
3347 \end_inset
3348
3349  document class, all you get is a centered page number at the bottom of
3350  the page.
3351  This document uses KOMA-script's book class, so it appears to be a bit
3352  fancier.
3353  But to really put on a show, you need to set the document page style to
3354  
3355 \begin_inset Quotes eld
3356 \end_inset
3357
3358 fancy
3359 \begin_inset Quotes erd
3360 \end_inset
3361
3362 , as mentioned in the 
3363 \emph on
3364 User Guide
3365 \emph default
3366 .
3367  This section describes the LaTeX code you need to insert in your LaTeX
3368  preamble in order to get the desired effects.
3369 \end_layout
3370
3371 \begin_layout Standard
3372 For more information on fancy headers, see the 
3373 \begin_inset Flex Code
3374 status collapsed
3375
3376 \begin_layout Plain Layout
3377 fancyhdr
3378 \end_layout
3379
3380 \end_inset
3381
3382  package documentation.
3383  (
3384 \begin_inset Flex URL
3385 status collapsed
3386
3387 \begin_layout Plain Layout
3388
3389 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3390 \end_layout
3391
3392 \end_inset
3393
3394 )
3395 \end_layout
3396
3397 \begin_layout Standard
3398 The page header is divided into three fields, not surprisingly labeled 
3399 \begin_inset Quotes eld
3400 \end_inset
3401
3402 left
3403 \begin_inset Quotes erd
3404 \end_inset
3405
3406
3407 \begin_inset Quotes eld
3408 \end_inset
3409
3410 center
3411 \begin_inset Quotes erd
3412 \end_inset
3413
3414 , and 
3415 \begin_inset Quotes eld
3416 \end_inset
3417
3418 right
3419 \begin_inset Quotes erd
3420 \end_inset
3421
3422 .
3423  The footer is also divided into these three fields.
3424  The LaTeX commands to set these fields in the simplest manner are 
3425 \begin_inset Flex Code
3426 status collapsed
3427
3428 \begin_layout Plain Layout
3429
3430 \backslash
3431 lhead
3432 \end_layout
3433
3434 \end_inset
3435
3436
3437 \begin_inset Flex Code
3438 status collapsed
3439
3440 \begin_layout Plain Layout
3441
3442 \backslash
3443 chead
3444 \end_layout
3445
3446 \end_inset
3447
3448
3449 \begin_inset Flex Code
3450 status collapsed
3451
3452 \begin_layout Plain Layout
3453
3454 \backslash
3455 rhead
3456 \end_layout
3457
3458 \end_inset
3459
3460
3461 \begin_inset Flex Code
3462 status collapsed
3463
3464 \begin_layout Plain Layout
3465
3466 \backslash
3467 lfoot
3468 \end_layout
3469
3470 \end_inset
3471
3472 , etc.
3473  Suppose you wish to put your name in the upper left hand corner of each
3474  page.
3475  Simply insert the following command in the preamble: 
3476 \end_layout
3477
3478 \begin_layout Standard
3479
3480 \family typewriter
3481
3482 \backslash
3483 lhead{John Q.
3484  DocWriter}
3485 \end_layout
3486
3487 \begin_layout Standard
3488 You will now see your name in the upper left.
3489  If a field has a default entry that you would like to get rid of (often
3490  the page number appears in the central footer, simply include a command
3491  with a blank argument, e.
3492 \begin_inset space \thinspace{}
3493 \end_inset
3494
3495 g.:
3496 \end_layout
3497
3498 \begin_layout Standard
3499
3500 \family typewriter
3501
3502 \backslash
3503 cfoot{}
3504 \end_layout
3505
3506 \begin_layout Standard
3507 Let's get really fancy: lets put the section number with the word 
3508 \begin_inset Quotes eld
3509 \end_inset
3510
3511 Section
3512 \begin_inset Quotes erd
3513 \end_inset
3514
3515  (e.
3516 \begin_inset space \thinspace{}
3517 \end_inset
3518
3519 g.
3520 \begin_inset space \space{}
3521 \end_inset
3522
3523 Section 3) in the upper left, the page number (e.
3524 \begin_inset space \thinspace{}
3525 \end_inset
3526
3527 g.
3528 \begin_inset space \space{}
3529 \end_inset
3530
3531 Page 4) in the upper right, your name in the lower left, and the date in
3532  the lower right.
3533  The following commands should now appear in the preamble:
3534 \end_layout
3535
3536 \begin_layout Standard
3537
3538 \family typewriter
3539
3540 \backslash
3541 lhead{Section 
3542 \backslash
3543 thesection}
3544 \end_layout
3545
3546 \begin_layout Standard
3547
3548 \family typewriter
3549
3550 \backslash
3551 chead{}
3552 \end_layout
3553
3554 \begin_layout Standard
3555
3556 \family typewriter
3557
3558 \backslash
3559 rhead{Page 
3560 \backslash
3561 thepage}
3562 \end_layout
3563
3564 \begin_layout Standard
3565
3566 \family typewriter
3567
3568 \backslash
3569 lfoot{John Q.
3570  DocWriter}
3571 \end_layout
3572
3573 \begin_layout Standard
3574
3575 \family typewriter
3576
3577 \backslash
3578 cfoot{}
3579 \end_layout
3580
3581 \begin_layout Standard
3582
3583 \family typewriter
3584
3585 \backslash
3586 rfoot{
3587 \backslash
3588 today}
3589 \end_layout
3590
3591 \begin_layout Standard
3592 The commands 
3593 \begin_inset Flex Code
3594 status collapsed
3595
3596 \begin_layout Plain Layout
3597
3598 \backslash
3599 thesection
3600 \end_layout
3601
3602 \end_inset
3603
3604  and 
3605 \begin_inset Flex Code
3606 status collapsed
3607
3608 \begin_layout Plain Layout
3609
3610 \backslash
3611 thepage
3612 \end_layout
3613
3614 \end_inset
3615
3616  access LaTeX's section and page counters, and so print out the current
3617  section and page numbers.
3618  
3619 \begin_inset Flex Code
3620 status collapsed
3621
3622 \begin_layout Plain Layout
3623
3624 \backslash
3625 today
3626 \end_layout
3627
3628 \end_inset
3629
3630  simply prints out today's date.
3631 \end_layout
3632
3633 \begin_layout Standard
3634 The thicknesses of the horizontal rules drawn beneath the header and above
3635  the footer can also be modified.
3636  If you don't want one of the rules, set its thickness to 0.
3637  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3638  Use commands
3639 \family typewriter
3640  
3641 \family default
3642 like 
3643 \begin_inset Flex Code
3644 status collapsed
3645
3646 \begin_layout Plain Layout
3647
3648 \backslash
3649 renewcommand{
3650 \backslash
3651 headrulewidth}{0.4pt}
3652 \end_layout
3653
3654 \end_inset
3655
3656  and 
3657 \begin_inset Flex Code
3658 status collapsed
3659
3660 \begin_layout Plain Layout
3661
3662 \backslash
3663 renewcommand{
3664 \backslash
3665 footrulewidth}{0.4pt}
3666 \end_layout
3667
3668 \end_inset
3669
3670  to set the thicknesses.
3671 \end_layout
3672
3673 \begin_layout Standard
3674 You can switch the header/footer settings on and off for individual pages
3675  using commands like 
3676 \begin_inset Flex Code
3677 status collapsed
3678
3679 \begin_layout Plain Layout
3680
3681 \backslash
3682 thispagestyle{empty}
3683 \end_layout
3684
3685 \end_inset
3686
3687
3688 \begin_inset Flex Code
3689 status collapsed
3690
3691 \begin_layout Plain Layout
3692
3693 \backslash
3694 thispagestyle{plain}
3695 \end_layout
3696
3697 \end_inset
3698
3699 , and 
3700 \begin_inset Flex Code
3701 status collapsed
3702
3703 \begin_layout Plain Layout
3704
3705 \backslash
3706 thispagestyle{fancy}
3707 \end_layout
3708
3709 \end_inset
3710
3711 .
3712  Simply insert them in the text on the page you want changed and mark them
3713  as TeX code.
3714  In fact, title pages are marked as plain by default, while following pages
3715  are marked fancy when using the global fancy setting.
3716 \end_layout
3717
3718 \begin_layout Standard
3719 As a final example, it is possible to include an image in the header or
3720  footer.
3721  Suppose you want to put a company logo in the upper lefthand corner.
3722  You might try something like
3723 \end_layout
3724
3725 \begin_layout Standard
3726
3727 \family typewriter
3728
3729 \backslash
3730 lhead{
3731 \backslash
3732 resizebox{1in}{!}{
3733 \backslash
3734 includegraphics{logo.eps}}}
3735 \end_layout
3736
3737 \begin_layout Standard
3738 \noindent
3739 (you may need to preface this with 
3740 \begin_inset Flex Code
3741 status collapsed
3742
3743 \begin_layout Plain Layout
3744 \noindent
3745
3746 \backslash
3747 usepackage{graphics}
3748 \end_layout
3749
3750 \end_inset
3751
3752  if you don't include graphics elsewhere in your document).
3753 \end_layout
3754
3755 \begin_layout Section
3756 Itemize Bullet Selection
3757 \begin_inset CommandInset label
3758 LatexCommand label
3759 name "sec:bullet"
3760
3761 \end_inset
3762
3763
3764 \end_layout
3765
3766 \begin_layout Standard
3767 by
3768 \noun on
3769  Allan Rae
3770 \end_layout
3771
3772 \begin_layout Subsection
3773 Introduction
3774 \end_layout
3775
3776 \begin_layout Standard
3777 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3778  Using this dialog you can easily specify what bullet shape to use at each
3779  level of an itemized list.
3780  These settings are document-wide so you won't be able to specify different
3781  sets of bullets for different paragraphs.
3782 \begin_inset Foot
3783 status collapsed
3784
3785 \begin_layout Plain Layout
3786 Well, actually you can but you'll have to do it by hand.
3787 \end_layout
3788
3789 \end_inset
3790
3791
3792 \end_layout
3793
3794 \begin_layout Subsection
3795 How it looks
3796 \end_layout
3797
3798 \begin_layout Standard
3799 Open the dialog by selecting the 
3800 \begin_inset Flex MenuItem
3801 status collapsed
3802
3803 \begin_layout Plain Layout
3804 Document\SpecialChar \menuseparator
3805 Settings
3806 \end_layout
3807
3808 \end_inset
3809
3810  menu item and then select the 
3811 \begin_inset Flex MenuItem
3812 status collapsed
3813
3814 \begin_layout Plain Layout
3815 Bullets
3816 \end_layout
3817
3818 \end_inset
3819
3820  tab.
3821 \end_layout
3822
3823 \begin_layout Standard
3824 The dialog provides you with a table of bullet shapes.
3825  A column of buttons on the left of the table provides access to the six
3826  different panels of bullet shapes.
3827  The row of buttons across the top is used to select which bullet depth
3828  you are changing.
3829  A text entry under the table shows the currently selected bullet shape's
3830  LaTeX equivalent and this can be edited if desired.
3831  If you do modify the text you will also need to specify any needed packages
3832  in the LaTeX preamble.
3833 \end_layout
3834
3835 \begin_layout Standard
3836 The six panels are divided up by the packages they require.
3837  The following table shows the mappings from button name to LaTeX packages.
3838 \end_layout
3839
3840 \begin_layout Standard
3841 \align center
3842 \begin_inset Tabular
3843 <lyxtabular version="3" rows="7" columns="2">
3844 <features tabularvalignment="middle">
3845 <column alignment="center" valignment="top" width="0pt">
3846 <column alignment="center" valignment="top" width="0pt">
3847 <row>
3848 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3849 \begin_inset Text
3850
3851 \begin_layout Plain Layout
3852
3853 \family roman
3854 \series medium
3855 \shape up
3856 \size normal
3857 \emph off
3858 \bar no
3859 \noun off
3860 \color none
3861 Button
3862 \end_layout
3863
3864 \end_inset
3865 </cell>
3866 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3867 \begin_inset Text
3868
3869 \begin_layout Plain Layout
3870
3871 \family roman
3872 \series medium
3873 \shape up
3874 \size normal
3875 \emph off
3876 \bar no
3877 \noun off
3878 \color none
3879 Packages Required
3880 \end_layout
3881
3882 \end_inset
3883 </cell>
3884 </row>
3885 <row>
3886 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3887 \begin_inset Text
3888
3889 \begin_layout Plain Layout
3890
3891 \family sans
3892 \series medium
3893 \shape up
3894 \size normal
3895 \emph off
3896 \bar no
3897 \noun off
3898 \color none
3899 Standard
3900 \end_layout
3901
3902 \end_inset
3903 </cell>
3904 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3905 \begin_inset Text
3906
3907 \begin_layout Plain Layout
3908
3909 \series medium
3910 \shape up
3911 \size normal
3912 \emph off
3913 \bar no
3914 \noun off
3915 \color none
3916 base LaTeX
3917 \end_layout
3918
3919 \end_inset
3920 </cell>
3921 </row>
3922 <row>
3923 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3924 \begin_inset Text
3925
3926 \begin_layout Plain Layout
3927
3928 \family sans
3929 \series medium
3930 \shape up
3931 \size normal
3932 \emph off
3933 \bar no
3934 \noun off
3935 \color none
3936 Maths
3937 \end_layout
3938
3939 \end_inset
3940 </cell>
3941 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3942 \begin_inset Text
3943
3944 \begin_layout Plain Layout
3945
3946 \family typewriter
3947 \series medium
3948 \shape up
3949 \size normal
3950 \emph off
3951 \bar no
3952 \noun off
3953 \color none
3954 amssymb.sty
3955 \end_layout
3956
3957 \end_inset
3958 </cell>
3959 </row>
3960 <row>
3961 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3962 \begin_inset Text
3963
3964 \begin_layout Plain Layout
3965
3966 \family sans
3967 \series medium
3968 \shape up
3969 \size normal
3970 \emph off
3971 \bar no
3972 \noun off
3973 \color none
3974 Ding1
3975 \end_layout
3976
3977 \end_inset
3978 </cell>
3979 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3980 \begin_inset Text
3981
3982 \begin_layout Plain Layout
3983
3984 \family typewriter
3985 \series medium
3986 \shape up
3987 \size normal
3988 \emph off
3989 \bar no
3990 \noun off
3991 \color none
3992 pifont.sty
3993 \end_layout
3994
3995 \end_inset
3996 </cell>
3997 </row>
3998 <row>
3999 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4000 \begin_inset Text
4001
4002 \begin_layout Plain Layout
4003
4004 \family sans
4005 \series medium
4006 \shape up
4007 \size normal
4008 \emph off
4009 \bar no
4010 \noun off
4011 \color none
4012 Ding2
4013 \end_layout
4014
4015 \end_inset
4016 </cell>
4017 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4018 \begin_inset Text
4019
4020 \begin_layout Plain Layout
4021
4022 \family typewriter
4023 \series medium
4024 \shape up
4025 \size normal
4026 \emph off
4027 \bar no
4028 \noun off
4029 \color none
4030 pifont.sty
4031 \end_layout
4032
4033 \end_inset
4034 </cell>
4035 </row>
4036 <row>
4037 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4038 \begin_inset Text
4039
4040 \begin_layout Plain Layout
4041
4042 \family sans
4043 \series medium
4044 \shape up
4045 \size normal
4046 \emph off
4047 \bar no
4048 \noun off
4049 \color none
4050 Ding3
4051 \end_layout
4052
4053 \end_inset
4054 </cell>
4055 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4056 \begin_inset Text
4057
4058 \begin_layout Plain Layout
4059
4060 \family typewriter
4061 \series medium
4062 \shape up
4063 \size normal
4064 \emph off
4065 \bar no
4066 \noun off
4067 \color none
4068 pifont.sty
4069 \end_layout
4070
4071 \end_inset
4072 </cell>
4073 </row>
4074 <row>
4075 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4076 \begin_inset Text
4077
4078 \begin_layout Plain Layout
4079
4080 \family sans
4081 \series medium
4082 \shape up
4083 \size normal
4084 \emph off
4085 \bar no
4086 \noun off
4087 \color none
4088 Ding4
4089 \end_layout
4090
4091 \end_inset
4092 </cell>
4093 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4094 \begin_inset Text
4095
4096 \begin_layout Plain Layout
4097
4098 \family typewriter
4099 \series medium
4100 \shape up
4101 \size normal
4102 \emph off
4103 \bar no
4104 \noun off
4105 \color none
4106 pifont.sty
4107 \end_layout
4108
4109 \end_inset
4110 </cell>
4111 </row>
4112 </lyxtabular>
4113
4114 \end_inset
4115
4116
4117 \end_layout
4118
4119 \begin_layout Standard
4120 LyX doesn't stop you using bullets from packages you don't have.
4121  If you get errors from LaTeX when you try to view or print the file, then
4122  it is likely you are missing a package.
4123 \begin_inset Foot
4124 status collapsed
4125
4126 \begin_layout Plain Layout
4127 LyX doesn't restrict your use since you may be editing locally and exporting
4128  elsewhere.
4129 \end_layout
4130
4131 \end_inset
4132
4133
4134 \end_layout
4135
4136 \begin_layout Subsection
4137 How to use it
4138 \end_layout
4139
4140 \begin_layout Standard
4141 Select which bullet depth you want to change then select the bullet shape
4142  and size.
4143  Any changes will not be visible in LyX, but are visible when viewing the
4144  document.
4145 \end_layout
4146
4147 \begin_layout Standard
4148 You can reset a bullet shape to the default simply by clicking your right
4149  mouse button on the appropriate bullet depth button.
4150 \begin_inset Foot
4151 status collapsed
4152
4153 \begin_layout Plain Layout
4154 If you 
4155 \emph on
4156 really
4157 \emph default
4158  want to have multiple sets of paragraphs with different sets of bullets
4159  in each, then you're going to have to get your hands dirty with TeX code.
4160  The bullet selection dialog can help though because it provides you with
4161  the LaTeX code for a wide range of bullet shapes.
4162  To make your own custom paragraphs you have the following options:
4163 \end_layout
4164
4165 \begin_layout Plain Layout
4166 \begin_inset ERT
4167 status open
4168
4169 \begin_layout Plain Layout
4170
4171
4172 \backslash
4173 let
4174 \backslash
4175 savelabelitemi=
4176 \backslash
4177 labelitemi
4178 \end_layout
4179
4180 \end_inset
4181
4182
4183 \end_layout
4184
4185 \begin_layout Plain Layout
4186 \begin_inset ERT
4187 status open
4188
4189 \begin_layout Plain Layout
4190
4191
4192 \backslash
4193 renewcommand
4194 \backslash
4195 labelitemi[0]{
4196 \backslash
4197 small
4198 \backslash
4199 (
4200 \backslash
4201 sharp
4202 \backslash
4203 )}
4204 \end_layout
4205
4206 \end_inset
4207
4208
4209 \end_layout
4210
4211 \begin_layout Itemize
4212 Use the LaTeX command 
4213 \begin_inset Flex Code
4214 status collapsed
4215
4216 \begin_layout Plain Layout
4217
4218 \backslash
4219 renewcommand{}{}
4220 \end_layout
4221
4222 \end_inset
4223
4224  to specify a new bullet shape for a given depth.
4225  You'll also need to save the current bullet shape so you can restore it
4226  again afterwards.
4227  In this itemized list the following LaTeX code was used to change the bullet
4228  used for the first depth.
4229 \end_layout
4230
4231 \begin_deeper
4232 \begin_layout LyX-Code
4233
4234 \backslash
4235 let
4236 \backslash
4237 savelabelitemi=
4238 \backslash
4239 labelitemi 
4240 \end_layout
4241
4242 \begin_layout LyX-Code
4243
4244 \backslash
4245 renewcommand
4246 \backslash
4247 labelitemi[0]{
4248 \backslash
4249 small
4250 \backslash
4251 (
4252 \backslash
4253 sharp
4254 \backslash
4255 )}
4256 \end_layout
4257
4258 \end_deeper
4259 \begin_layout Itemize
4260 Note that the itemize depth is specified in Roman numerals as part of the
4261  
4262 \family typewriter
4263
4264 \backslash
4265 labelitem
4266 \family default
4267  command.
4268 \end_layout
4269
4270 \begin_layout Itemize
4271 \begin_inset ERT
4272 status open
4273
4274 \begin_layout Plain Layout
4275
4276 [
4277 \backslash
4278 (
4279 \backslash
4280 star
4281 \backslash
4282 )]
4283 \end_layout
4284
4285 \end_inset
4286
4287  Specify each individual entry by starting each item with the bullet shape
4288  enclosed in square brackets and set as 
4289 \begin_inset Flex MenuItem
4290 status collapsed
4291
4292 \begin_layout Plain Layout
4293 TeX Code
4294 \end_layout
4295
4296 \end_inset
4297
4298 .
4299  For example, this item was started with 
4300 \begin_inset Flex Code
4301 status collapsed
4302
4303 \begin_layout Plain Layout
4304 [
4305 \backslash
4306 (
4307 \backslash
4308 star
4309 \backslash
4310 )]
4311 \end_layout
4312
4313 \end_inset
4314
4315 .
4316 \end_layout
4317
4318 \begin_layout Plain Layout
4319 \begin_inset ERT
4320 status open
4321
4322 \begin_layout Plain Layout
4323
4324
4325 \backslash
4326 renewcommand
4327 \backslash
4328 labelitemi[0]{
4329 \backslash
4330 savelabelitemi}
4331 \end_layout
4332
4333 \end_inset
4334
4335
4336 \end_layout
4337
4338 \begin_layout Plain Layout
4339 You'll also need to revert the labelitem back to its previous setting for
4340  the global bullet shape settings to remain in effect.
4341  The way used here was:
4342 \end_layout
4343
4344 \begin_layout LyX-Code
4345
4346 \backslash
4347 renewcommand
4348 \backslash
4349 labelitemi[0]{
4350 \backslash
4351 savelabelitemi}
4352 \end_layout
4353
4354 \end_inset
4355
4356
4357 \end_layout
4358
4359 \begin_layout Chapter
4360 LyX and the World Wide Web
4361 \end_layout
4362
4363 \begin_layout Standard
4364 LyX has long supported the export of documents to various web-friendly formats,
4365  such as HTML.
4366  Before verson 2.0, however, HTML export was always accomplished by the use
4367  of external converters.
4368 \begin_inset Foot
4369 status collapsed
4370
4371 \begin_layout Plain Layout
4372 For details on the use of external converters with LyX, see the 
4373 \emph on
4374 Converters
4375 \emph default
4376  section of the Customization manual.
4377 \end_layout
4378
4379 \end_inset
4380
4381  These fall into two large groups: there are converters that use LaTeX as
4382  an intermediate format, such as 
4383 \begin_inset Flex Code
4384 status collapsed
4385
4386 \begin_layout Plain Layout
4387 htlatex
4388 \end_layout
4389
4390 \end_inset
4391
4392
4393 \begin_inset Flex Code
4394 status collapsed
4395
4396 \begin_layout Plain Layout
4397 html2latex
4398 \end_layout
4399
4400 \end_inset
4401
4402 , and 
4403 \begin_inset Flex Code
4404 status collapsed
4405
4406 \begin_layout Plain Layout
4407 plastex
4408 \end_layout
4409
4410 \end_inset
4411
4412 , relying upon LyX to produce the LaTeX; and there is a converter that works
4413  directly on LyX files, 
4414 \begin_inset Flex Code
4415 status collapsed
4416
4417 \begin_layout Plain Layout
4418 eLyXer
4419 \end_layout
4420
4421 \end_inset
4422
4423 .
4424  All of these have different advantages and disadvantages.
4425  
4426 \end_layout
4427
4428 \begin_layout Standard
4429 The LaTeX-based converters have the advantage that, in principle, they know
4430  everything about the exported document that LaTeX does.
4431  Such converters do not care, for example, if a certain block of code was
4432  produced by LyX or was Evil Red Text.
4433  These converters know about 
4434 \begin_inset Flex Code
4435 status collapsed
4436
4437 \begin_layout Plain Layout
4438 aux
4439 \end_layout
4440
4441 \end_inset
4442
4443  files, counters, and references, and can often make use of the 
4444 \begin_inset Flex Code
4445 status collapsed
4446
4447 \begin_layout Plain Layout
4448 bbl
4449 \end_layout
4450
4451 \end_inset
4452
4453  files generated by BibTeX.
4454  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4455  said that only TeX itself understands TeX---and LaTeX-based converters
4456  will often choke on what seem to be quite simple constructs; complex ones
4457  can throw them completely, and as of this writing, for example, the 
4458 \emph on
4459 Embedded Objects
4460 \emph default
4461  manual will not export with 
4462 \begin_inset Flex Code
4463 status collapsed
4464
4465 \begin_layout Plain Layout
4466 htlatex
4467 \end_layout
4468
4469 \end_inset
4470
4471 , though the others will.
4472  The other issue concerns how math is handled.
4473  These converters typically convert the formulae into little pictures that
4474  are then linked from the HTML document.
4475  Since these are actually generated by LaTeX, they are accurate.
4476  But they do not scale well, and just getting them to look as if they are
4477  actually meant to be in your document---so that the font sizes seem to
4478  be roughly the same---can be a challenge.
4479 \end_layout
4480
4481 \begin_layout Standard
4482 Alex Fernandez's 
4483 \begin_inset Flex Code
4484 status collapsed
4485
4486 \begin_layout Plain Layout
4487 eLyXer
4488 \end_layout
4489
4490 \end_inset
4491
4492  (
4493 \begin_inset CommandInset href
4494 LatexCommand href
4495 name "http://elyxer.nongnu.org/"
4496 target "http://elyxer.nongnu.org/"
4497
4498 \end_inset
4499
4500 ) solves some of these problems.
4501  In particular, the formulae it produces scale perfectly, since it renders
4502  math using a combination of HTML and CSS rather than converting the formulae
4503  to images.
4504  But even moderately complex formula are rendered less well than with 
4505 \begin_inset Flex Code
4506 status collapsed
4507
4508 \begin_layout Plain Layout
4509 htlatex
4510 \end_layout
4511
4512 \end_inset
4513
4514 ; this reflects the limitations of HTML.
4515 \begin_inset Foot
4516 status collapsed
4517
4518 \begin_layout Plain Layout
4519 That said, 
4520 \begin_inset Flex Code
4521 status collapsed
4522
4523 \begin_layout Plain Layout
4524 eLyXer
4525 \end_layout
4526
4527 \end_inset
4528
4529  can also use jsMath and MathJax for equations, but this setting is only
4530  available globally and requires one to have access to a server that runs
4531  the backend.
4532 \end_layout
4533
4534 \end_inset
4535
4536  More importantly (as of version 1.1.1, at least), 
4537 \begin_inset Flex Code
4538 status collapsed
4539
4540 \begin_layout Plain Layout
4541 eLyXer
4542 \end_layout
4543
4544 \end_inset
4545
4546  has limited support for math macros and no support for user-defined paragraph
4547  or character styles.
4548  These limitations make 
4549 \begin_inset Flex Code
4550 status collapsed
4551
4552 \begin_layout Plain Layout
4553 eLyXer
4554 \end_layout
4555
4556 \end_inset
4557
4558  unsuitable for many of the documents LyX users produce.
4559  In principle, of course, these problems could be solved, but the LyX developers
4560  have decided to follow a different path and have made LyX itself capable
4561  of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4562  plaintext.
4563 \end_layout
4564
4565 \begin_layout Standard
4566 As of this writing, XHTML output remains under development and should probably
4567  be regarded as 
4568 \begin_inset Quotes eld
4569 \end_inset
4570
4571 experimental
4572 \begin_inset Quotes erd
4573 \end_inset
4574
4575 .
4576 \begin_inset Foot
4577 status collapsed
4578
4579 \begin_layout Plain Layout
4580 The file 
4581 \begin_inset Flex Code
4582 status collapsed
4583
4584 \begin_layout Plain Layout
4585 development/HTML.notes
4586 \end_layout
4587
4588 \end_inset
4589
4590 , which can be found in the LyX source tree or 
4591 \begin_inset CommandInset href
4592 LatexCommand href
4593 name "accessed online"
4594 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4595
4596 \end_inset
4597
4598 , usually contains up-to-date information about the state of XHTML output.
4599  See also the list of XHTML bugs on 
4600 \begin_inset CommandInset href
4601 LatexCommand href
4602 name "the bug tracker"
4603 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"
4604
4605 \end_inset
4606
4607 .
4608 \end_layout
4609
4610 \end_inset
4611
4612  Still, the developers have chosen this approach because it has several
4613  potential advantages over the other two.
4614 \end_layout
4615
4616 \begin_layout Standard
4617 These advantages are primarily due to the fact that the XHTML output routines,
4618  since they are part of LyX, know everything LyX knows about the document
4619  being exported.
4620 \begin_inset Foot
4621 status collapsed
4622
4623 \begin_layout Plain Layout
4624 Another advantage is that, since these routines are internal to LyX, they
4625  are immune to changes in LyX's file format, or to changes in the semantics
4626  of existing insets.
4627 \end_layout
4628
4629 \end_inset
4630
4631  So they know about the table of contents (as displayed in the outline),
4632  about the counters associated with different paragraph styles, and about
4633  user-defined styles.
4634  The XHTML output routines know what LyX knows about internationalization,
4635  too, so they will output 
4636 \begin_inset Quotes eld
4637 \end_inset
4638
4639 Chapter 1
4640 \begin_inset Quotes erd
4641 \end_inset
4642
4643  or 
4644 \begin_inset Quotes eld
4645 \end_inset
4646
4647
4648 \lang ngerman
4649 Kapitel
4650 \lang english
4651  1
4652 \begin_inset Quotes erd
4653 \end_inset
4654
4655 , depending upon the language in effect at the time.
4656  
4657 \end_layout
4658
4659 \begin_layout Standard
4660 Quite generally, the output routines know what LyX knows about document
4661  layout, that is, about how the document is to be rendered on screen.
4662  We use this information when we output the document as XHTML.
4663  In particular, LyX 
4664 \emph on
4665 automatically
4666 \emph default
4667  generates CSS style information corresponding to the layout information
4668  it uses to render the document on screen: if section headings are supposed
4669  to be sans-serif and bold as seen in LyX, then (by default) they will be
4670  sans-serif and bold when viewed in a web browser, too.
4671  And this is true not just for pre-defined styles, like Section, but for
4672  any style, including user-defined styles.
4673  Indeed, the XHTML output routines make no distinction between user-defined
4674  paragraph and character styles and LyX's own pre-defined styles: in each
4675  case, everything LyX knows about the styles is contained in the layout
4676  files.
4677  And much the same is true as regards pre-defined textual insets, such as
4678  footnotes, and various custom insets.
4679  
4680 \end_layout
4681
4682 \begin_layout Standard
4683 The result is that XHTML output can be customized and extended in exactly
4684  the same way LaTeX output can be customized and extended: through layout
4685  files and modules.
4686  See chapter five of the 
4687 \emph on
4688 Customization 
4689 \emph default
4690 manual for the details.
4691 \end_layout
4692
4693 \begin_layout Standard
4694 The remainder of this chapter contains more detailed information on XHTML
4695  output, its limitations, and ways to work around those limitations.
4696 \end_layout
4697
4698 \begin_layout Section
4699 Math Output in XHTML
4700 \end_layout
4701
4702 \begin_layout Standard
4703 LyX offers four choices for how math is rendered.
4704  These have various advantages and disadvantages:
4705 \end_layout
4706
4707 \begin_layout Itemize
4708 MathML
4709 \begin_inset Newline newline
4710 \end_inset
4711
4712 MathML is a dialect of XML designed specifically for mathematics on the
4713  web, and it typically renders very well in browsers that support it.
4714  The disadvantage is that not all browsers support MathML, and support is
4715  not complete even in the Gecko-based browsers, such as Firefox.
4716 \begin_inset Newline newline
4717 \end_inset
4718
4719 If LyX is unable to render a formula as MathML---for example, if the formula
4720  uses the 
4721 \begin_inset Flex Code
4722 status collapsed
4723
4724 \begin_layout Plain Layout
4725 xymatrix
4726 \end_layout
4727
4728 \end_inset
4729
4730  package or ERT---then it will instead output the formula as an image.
4731  
4732 \end_layout
4733
4734 \begin_layout Itemize
4735 HTML
4736 \begin_inset Newline newline
4737 \end_inset
4738
4739 As mentioned above, 
4740 \begin_inset Flex Code
4741 status collapsed
4742
4743 \begin_layout Plain Layout
4744 elyxer
4745 \end_layout
4746
4747 \end_inset
4748
4749  outputs math as HTML, styled by CSS.
4750 \begin_inset Foot
4751 status collapsed
4752
4753 \begin_layout Plain Layout
4754 LyX has borrowed some of the CSS for its HTML output from 
4755 \begin_inset Flex Code
4756 status collapsed
4757
4758 \begin_layout Plain Layout
4759 elyxer
4760 \end_layout
4761
4762 \end_inset
4763
4764 .
4765 \end_layout
4766
4767 \end_inset
4768
4769  For simple formulae, this can work quite well, though with more complicated
4770  formulae it tends to break down.
4771  Still, this method has the advantage that it is very widely supported and
4772  so it may be appropriate for documents that contain only a little, fairly
4773  simple math.
4774 \begin_inset Newline newline
4775 \end_inset
4776
4777 If Lyx is unable to render a formula as HTML---for example, if the formula
4778  uses the 
4779 \begin_inset Flex Code
4780 status collapsed
4781
4782 \begin_layout Plain Layout
4783 xymatrix
4784 \end_layout
4785
4786 \end_inset
4787
4788  package or ERT---then it will instead output the formula as an image.
4789  
4790 \end_layout
4791
4792 \begin_layout Itemize
4793 Images
4794 \begin_inset Newline newline
4795 \end_inset
4796
4797 Like 
4798 \begin_inset Flex Code
4799 status collapsed
4800
4801 \begin_layout Plain Layout
4802 htlatex
4803 \end_layout
4804
4805 \end_inset
4806
4807 , LyX will output formulae as images, the very same images, in fact, that
4808  are used for instant preview.
4809 \begin_inset Foot
4810 status collapsed
4811
4812 \begin_layout Plain Layout
4813 Instant preview does 
4814 \emph on
4815 not 
4816 \emph default
4817 have to be on for images to be output, however.
4818 \end_layout
4819
4820 \end_inset
4821
4822  The advantage to this method is that the images are simply generated by
4823  LaTeX, so they are very accurate.
4824  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4825  so they do not scale terribly well, and one cannot copy them, etc.
4826  (As of this writing, there are also problems about equation numbering.
4827  See 
4828 \begin_inset CommandInset href
4829 LatexCommand href
4830 name "bug 6894"
4831 target "http://www.lyx.org/trac/ticket/6894"
4832
4833 \end_inset
4834
4835 .)
4836 \begin_inset Newline newline
4837 \end_inset
4838
4839 The size of the images can be controlled by setting the 
4840 \begin_inset Quotes eld
4841 \end_inset
4842
4843 Math Images Scaling
4844 \begin_inset Quotes erd
4845 \end_inset
4846
4847  parameter under 
4848 \begin_inset Flex MenuItem
4849 status collapsed
4850
4851 \begin_layout Plain Layout
4852 Document\SpecialChar \menuseparator
4853 Settings\SpecialChar \menuseparator
4854 Output
4855 \end_layout
4856
4857 \end_inset
4858
4859 .
4860 \begin_inset Foot
4861 status collapsed
4862
4863 \begin_layout Plain Layout
4864 For those who want to know, this controls the resolution of the image in
4865  dots per inch and is based upon a default of 75 dpi.
4866 \end_layout
4867
4868 \end_inset
4869
4870
4871 \begin_inset Newline newline
4872 \end_inset
4873
4874 If LyX for some reason fails to create an image for a formula (e.g., if a
4875  required LaTeX package is not installed), then it will fall back to outputing
4876  the raw LaTeX.
4877 \end_layout
4878
4879 \begin_layout Itemize
4880 LaTeX
4881 \begin_inset Newline newline
4882 \end_inset
4883
4884 Finally, LyX will happily output math as LaTeX.
4885  As well as being the output of last resort, this method can be used with
4886  such tools as 
4887 \begin_inset CommandInset href
4888 LatexCommand href
4889 name "jsMath"
4890 target "http://www.math.union.edu/~dpvc/jsMath/"
4891
4892 \end_inset
4893
4894 , which uses JavaScript to render LaTeX embedded in HTML documents.
4895  LyX wraps the LaTeX in either a 
4896 \begin_inset Flex Code
4897 status collapsed
4898
4899 \begin_layout Plain Layout
4900 span
4901 \end_layout
4902
4903 \end_inset
4904
4905  (for inline formulas) or 
4906 \begin_inset Flex Code
4907 status collapsed
4908
4909 \begin_layout Plain Layout
4910 div
4911 \end_layout
4912
4913 \end_inset
4914
4915  (for displayed formulas) with 
4916 \begin_inset Flex Code
4917 status collapsed
4918
4919 \begin_layout Plain Layout
4920 class='math'
4921 \end_layout
4922
4923 \end_inset
4924
4925 , as is required for jsMath.
4926 \end_layout
4927
4928 \begin_layout Standard
4929 One of these output methods must be selected under 
4930 \begin_inset Flex MenuItem
4931 status collapsed
4932
4933 \begin_layout Plain Layout
4934 Document\SpecialChar \menuseparator
4935 Settings\SpecialChar \menuseparator
4936 Output
4937 \end_layout
4938
4939 \end_inset
4940
4941 .
4942  By default, LyX outputs MathML.
4943  This is a document-wide setting, therefore.
4944 \end_layout
4945
4946 \begin_layout Standard
4947 Eventually, LyX will offer the user the option to select an alternate output
4948  method for a particular inset, say, one that isn't being rendered very
4949  well by MathML.
4950 \begin_inset Foot
4951 status collapsed
4952
4953 \begin_layout Plain Layout
4954 That said, since LyX falls back to images if the inset contains ERT, then
4955  one can force output as an image by putting some harmless ERT into the
4956  math, for example: 
4957 \begin_inset Formula $a=b\relax$
4958 \end_inset
4959
4960 .
4961 \end_layout
4962
4963 \end_inset
4964
4965
4966 \end_layout
4967
4968 \begin_layout Section
4969 Bibliography and Citations
4970 \end_layout
4971
4972 \begin_layout Standard
4973 XHTML output fully supports bibliographies and citations.
4974  
4975 \end_layout
4976
4977 \begin_layout Standard
4978 Citation labels are generated by the same machinery that generates LyX's
4979  on-screen labels, so the labels will look in the output much as they do
4980  in LyX, though better.
4981  If you are using numerical citations, then LyX will output numerical labels,
4982  such as [1] or [17], rather than simply showing the citation key in square
4983  brackets, as it does on-screen.
4984  If you are using author-year citations, then LyX will add lowercase letters
4985  to the years, just as BibTeX does, if it finds more than one citation for
4986  a given author-year combination.
4987  The labels will be printed with the bibliography entries.
4988  Note that there is, at present, no way to customize the appearance of the
4989  labels, for example, to choose between square brackets and parentheses.
4990 \end_layout
4991
4992 \begin_layout Standard
4993 Bibliography output is handled by the same machinery that handles the presentati
4994 on of reference information in the citation dialog, so you will see in the
4995  XHTML output pretty much what you would see if you were to look at a given
4996  entry in the citation dialog.
4997  The formatting can be customized in your layout file or, preferably, in
4998  a module.
4999  See the 
5000 \emph on
5001 Customization
5002 \emph default
5003  manual for the details.
5004 \end_layout
5005
5006 \begin_layout Standard
5007 The main defect at present is that cross-referenced information is printed
5008  with every entry with which it is associated.
5009  So you can see things like this:
5010 \end_layout
5011
5012 \begin_layout Quote
5013 Jason Stanley, 
5014 \begin_inset Quotes eld
5015 \end_inset
5016
5017 Context and Logical Form
5018 \begin_inset Quotes erd
5019 \end_inset
5020
5021 , in 
5022 \emph on
5023 Language in Context: Selected Essays
5024 \emph default
5025  (Oxford: Oxford University Press, 2007), pp.
5026  30--68.
5027 \end_layout
5028
5029 \begin_layout Quote
5030 Jason Stanley, 
5031 \begin_inset Quotes eld
5032 \end_inset
5033
5034 Semantics in Context
5035 \begin_inset Quotes erd
5036 \end_inset
5037
5038 , in 
5039 \emph on
5040 Language in Context: Selected Essays
5041 \emph default
5042  (Oxford: Oxford University Press, 2007), pp.
5043  201--30.
5044 \end_layout
5045
5046 \begin_layout Standard
5047 This should be fixed before long.
5048 \end_layout
5049
5050 \begin_layout Standard
5051 There is no support at present for sectioned bibliographies.
5052  If you have multiple bibliographies, then LyX will print the same bibliography
5053  over and over.
5054 \end_layout
5055
5056 \begin_layout Section
5057 Indexes
5058 \end_layout
5059
5060 \begin_layout Standard
5061 LyX will happily export indexes as XHTML, but with certain limitations at
5062  the moment.
5063 \end_layout
5064
5065 \begin_layout Standard
5066 Index export will be most reliable when you do not attempt to use the fancy
5067  constructs that are described in the section on indexes in the 
5068 \emph on
5069 User's Guide
5070 \emph default
5071 .
5072 \begin_inset Foot
5073 status collapsed
5074
5075 \begin_layout Plain Layout
5076 The main issue here is that LyX itself does not really handle these.
5077  It just lets you enter what you would have to enter in raw LaTeX.
5078 \end_layout
5079
5080 \end_inset
5081
5082  We'll describe how they are handled using the subsection headings from
5083  that section.
5084 \end_layout
5085
5086 \begin_layout Itemize
5087 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5088  these, but the entries must be separated by 
5089 \begin_inset Quotes eld
5090 \end_inset
5091
5092  ! 
5093 \begin_inset Quotes erd
5094 \end_inset
5095
5096 , that is, there must be spaces around the exclamation point.
5097  This is because it is otherwise too difficult to check for escaped exclamation
5098  points, ones in math, and so forth.
5099 \end_layout
5100
5101 \begin_layout Itemize
5102 Page Ranges: There is no support at all for page ranges, since these make
5103  no sense with XHMTL.
5104  Instead, you will just get two index entries, one at either end.
5105 \end_layout
5106
5107 \begin_layout Itemize
5108 Cross-referencing: There is no support for cross-referencing.
5109  If LyX finds an entry containing the 
5110 \begin_inset Quotes eld
5111 \end_inset
5112
5113 |see\SpecialChar \ldots{}
5114
5115 \begin_inset Quotes erd
5116 \end_inset
5117
5118  construct, it is just dropped, and the rest is treated as an ordinary index
5119  entry.
5120 \end_layout
5121
5122 \begin_layout Itemize
5123 Index Entry Order: LyX does support attempts to fix the sorting order.
5124  It will take what is before the first `@' it finds and use that for sorting,
5125  taking what follows the first `@' to be the actual entry.
5126  At present, LyX does not check for escaped `@', so do not try to index
5127  email addresses.
5128 \end_layout
5129
5130 \begin_layout Itemize
5131 Index Entry Layout: You can format entries by using the text style dialog,
5132  or by using any other method available within LyX itself.
5133  There is no support for constructs like: 
5134 \begin_inset Quotes eld
5135 \end_inset
5136
5137 entry|textbf
5138 \begin_inset Quotes erd
5139 \end_inset
5140
5141 .
5142  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5143  and everything that follows it.
5144 \end_layout
5145
5146 \begin_layout Itemize
5147 Multiple Indexes: There is no support for multiple indexes.
5148  Rather, all index entries will be printed as one large index.
5149  To avoid our printing several versions of the index, we print only the
5150  main index, so make sure you have one.
5151 \end_layout
5152
5153 \begin_layout Section
5154 Nomenclature and Glossary
5155 \end_layout
5156
5157 \begin_layout Standard
5158 There is at present no support for glossaries.
5159  Adding it would be fairly trivial, and welcome.
5160 \end_layout
5161
5162 \begin_layout Chapter
5163 The LyX Server
5164 \end_layout
5165
5166 \begin_layout Section
5167 Introduction
5168 \end_layout
5169
5170 \begin_layout Standard
5171 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5172  and retrieve information about the LyX internal state.
5173  This is only intended for advanced users, but they should find it useful.
5174  It is by writing to the LyX server, for example, that bibliography managers,
5175  such as JabRef, are able to 
5176 \begin_inset Quotes eld
5177 \end_inset
5178
5179 push
5180 \begin_inset Quotes erd
5181 \end_inset
5182
5183  citations to LyX.
5184 \end_layout
5185
5186 \begin_layout Section
5187 Starting the LyX Server
5188 \end_layout
5189
5190 \begin_layout Standard
5191 The LyX server works through the use of a pair of named pipes.
5192  These are usually located in 
5193 \begin_inset Flex Code
5194 status collapsed
5195
5196 \begin_layout Plain Layout
5197 UserDir
5198 \end_layout
5199
5200 \end_inset
5201
5202 , (except on Windows, where 
5203 \emph on
5204 local
5205 \emph default
5206  named pipes are special objects located in 
5207 \begin_inset Flex Code
5208 status collapsed
5209
5210 \begin_layout Plain Layout
5211
5212 \backslash
5213
5214 \backslash
5215 .
5216 \backslash
5217 pipe
5218 \end_layout
5219
5220 \end_inset
5221
5222 ) and have the names 
5223 \begin_inset Quotes eld
5224 \end_inset
5225
5226
5227 \begin_inset Flex Code
5228 status collapsed
5229
5230 \begin_layout Plain Layout
5231 lyxpipe.in
5232 \end_layout
5233
5234 \end_inset
5235
5236
5237 \begin_inset Quotes erd
5238 \end_inset
5239
5240  and 
5241 \begin_inset Quotes eld
5242 \end_inset
5243
5244
5245 \begin_inset Flex Code
5246 status collapsed
5247
5248 \begin_layout Plain Layout
5249 lyxpipe.out
5250 \end_layout
5251
5252 \end_inset
5253
5254
5255 \begin_inset Quotes erd
5256 \end_inset
5257
5258 .
5259  External programs write into 
5260 \begin_inset Flex Code
5261 status collapsed
5262
5263 \begin_layout Plain Layout
5264 lyxpipe.in
5265 \end_layout
5266
5267 \end_inset
5268
5269  and read back data from 
5270 \begin_inset Flex Code
5271 status collapsed
5272
5273 \begin_layout Plain Layout
5274 lyxpipe.out
5275 \end_layout
5276
5277 \end_inset
5278
5279 .
5280  The stem of the pipe names can be defined in the 
5281 \begin_inset Flex MenuItem
5282 status collapsed
5283
5284 \begin_layout Plain Layout
5285 Tools\SpecialChar \menuseparator
5286 Preferences
5287 \end_layout
5288
5289 \end_inset
5290
5291  dialog, for example 
5292 \begin_inset Flex Code
5293 status collapsed
5294
5295 \begin_layout Plain Layout
5296 "/home/myhome/lyxpipe"
5297 \end_layout
5298
5299 \end_inset
5300
5301 , or 
5302 \begin_inset Flex Code
5303 status collapsed
5304
5305 \begin_layout Plain Layout
5306 "
5307 \backslash
5308
5309 \backslash
5310 .
5311 \backslash
5312 pipe
5313 \backslash
5314 lyxpipe"
5315 \end_layout
5316
5317 \end_inset
5318
5319  on Windows (but any working path can be used).
5320  You 
5321 \emph on
5322 must
5323 \emph default
5324  configure this manually in order for the server to start.
5325 \end_layout
5326
5327 \begin_layout Standard
5328 LyX will add the '
5329 \begin_inset Flex Code
5330 status collapsed
5331
5332 \begin_layout Plain Layout
5333 .in
5334 \end_layout
5335
5336 \end_inset
5337
5338 ' and '
5339 \begin_inset Flex Code
5340 status collapsed
5341
5342 \begin_layout Plain Layout
5343 .out
5344 \end_layout
5345
5346 \end_inset
5347
5348 ' to create the pipes.
5349  If one of the pipes already exists, LyX will assume that another LyX process
5350  is already running and will not start the server.
5351  On POSIX (Unix like) systems, if for some other reason, an unused 
5352 \begin_inset Quotes eld
5353 \end_inset
5354
5355 stale
5356 \begin_inset Quotes erd
5357 \end_inset
5358
5359  pipe is left in existence when LyX closes, then LyX will try to delete
5360  it.
5361  If this fails for some reason, you will need to delete the pipes manually
5362  and then restart LyX.
5363  On Windows, pipes are deleted by the OS on program termination or crash,
5364  so 
5365 \begin_inset Quotes eld
5366 \end_inset
5367
5368 stale
5369 \begin_inset Quotes erd
5370 \end_inset
5371
5372  pipes should not be possible.
5373 \end_layout
5374
5375 \begin_layout Standard
5376 To have several LyX processes with servers at the same time, you have to
5377  use different configurations, perhaps by using separate user directories,
5378  each with its own 
5379 \begin_inset Flex Code
5380 status collapsed
5381
5382 \begin_layout Plain Layout
5383 preferences
5384 \end_layout
5385
5386 \end_inset
5387
5388  file, for each process.
5389 \end_layout
5390
5391 \begin_layout Standard
5392 If you are developing a client program, you might find it useful to enable
5393  debugging information from the LyX server.
5394  Do this by starting LyX as 
5395 \begin_inset Flex Code
5396 status collapsed
5397
5398 \begin_layout Plain Layout
5399 lyx -dbg lyxserver
5400 \end_layout
5401
5402 \end_inset
5403
5404 .
5405 \end_layout
5406
5407 \begin_layout Standard
5408 You can find a complete example client written in C in the source distribution
5409  as 
5410 \begin_inset Flex Code
5411 status collapsed
5412
5413 \begin_layout Plain Layout
5414 development/lyxserver/server_monitor.c
5415 \end_layout
5416
5417 \end_inset
5418
5419 .
5420 \end_layout
5421
5422 \begin_layout Standard
5423 Another useful tool is command-line based client you will find in 
5424 \begin_inset Flex Code
5425 status collapsed
5426
5427 \begin_layout Plain Layout
5428 src/client/lyxclient
5429 \end_layout
5430
5431 \end_inset
5432
5433 .
5434 \end_layout
5435
5436 \begin_layout Section
5437 Normal communication
5438 \end_layout
5439
5440 \begin_layout Standard
5441 To issue a LyX call, the client writes a line of ASCII text into the input
5442  pipe.
5443  This line has the following format:
5444 \end_layout
5445
5446 \begin_layout Quote
5447 LYXCMD:
5448 \emph on
5449 clientname
5450 \emph default
5451 :
5452 \emph on
5453 function
5454 \emph default
5455 :
5456 \emph on
5457 argument
5458 \end_layout
5459
5460 \begin_layout Description
5461 clientname is a name that the client can choose arbitrarily.
5462  Its only use is that LyX will echo it if it sends an answer—so a client
5463  can dispatch results from different requesters.
5464 \end_layout
5465
5466 \begin_layout Description
5467 function is the function you want LyX to perform.
5468  It is the same as the commands you'd use in the minibuffer.
5469 \end_layout
5470
5471 \begin_layout Description
5472 argument is an optional argument which is meaningful only to some functions
5473  (for instance, the 
5474 \begin_inset Quotes eld
5475 \end_inset
5476
5477 self-insert
5478 \begin_inset Quotes erd
5479 \end_inset
5480
5481  LFUN will insert the argument as text at the cursor position).
5482 \end_layout
5483
5484 \begin_layout Standard
5485 The answer from LyX will arrive in the output pipe and be of the form
5486 \end_layout
5487
5488 \begin_layout Quote
5489 INFO:
5490 \emph on
5491 clientname
5492 \emph default
5493 :
5494 \emph on
5495 function
5496 \emph default
5497 :
5498 \emph on
5499 data
5500 \end_layout
5501
5502 \begin_layout Standard
5503 where 
5504 \emph on
5505 clientname
5506 \emph default
5507  and 
5508 \emph on
5509 function
5510 \emph default
5511  are just echoed from the command request, while 
5512 \emph on
5513 data
5514 \emph default
5515  is more or less useful information filled according to how the command
5516  execution worked out.
5517  Some commands, such as 
5518 \begin_inset Quotes eld
5519 \end_inset
5520
5521 font-state
5522 \begin_inset Quotes erd
5523 \end_inset
5524
5525 , will return information about the internal state of LyX, while other will
5526  return an empty data-response.
5527  This means that the command execution went fine.
5528 \end_layout
5529
5530 \begin_layout Standard
5531 In case of errors, the response from LyX will have this form
5532 \end_layout
5533
5534 \begin_layout Quote
5535 ERROR:
5536 \emph on
5537 clientname
5538 \emph default
5539 :
5540 \emph on
5541 function
5542 \emph default
5543 :
5544 \emph on
5545 error message
5546 \end_layout
5547
5548 \begin_layout Standard
5549 where the 
5550 \emph on
5551 error message
5552 \emph default
5553  should contain an explanation of why the command failed.
5554 \end_layout
5555
5556 \begin_layout Standard
5557 Examples:
5558 \end_layout
5559
5560 \begin_layout LyX-Code
5561 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5562 \begin_inset Newline newline
5563 \end_inset
5564
5565 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5566 \begin_inset Newline newline
5567 \end_inset
5568
5569 read a <~/.lyxpipe.out
5570 \begin_inset Newline newline
5571 \end_inset
5572
5573 echo $a
5574 \end_layout
5575
5576 \begin_layout Section
5577 Notification
5578 \end_layout
5579
5580 \begin_layout Standard
5581 LyX can notify clients of events going on asynchronously.
5582  Currently it will only do this if the user binds a key sequence with the
5583  function 
5584 \begin_inset Quotes eld
5585 \end_inset
5586
5587 notify
5588 \begin_inset Quotes erd
5589 \end_inset
5590
5591 .
5592  The format of the string LyX sends is as follows:
5593 \end_layout
5594
5595 \begin_layout Quote
5596 \begin_inset Flex Code
5597 status collapsed
5598
5599 \begin_layout Plain Layout
5600 NOTIFY:
5601 \end_layout
5602
5603 \end_inset
5604
5605
5606 \emph on
5607 key-sequence
5608 \end_layout
5609
5610 \begin_layout Standard
5611 where 
5612 \emph on
5613 key-sequence
5614 \emph default
5615  is the printed representation of the key sequence that was actually typed
5616  by the user.
5617 \end_layout
5618
5619 \begin_layout Standard
5620 This mechanism can be used to extend LyX's command set and implement macros.
5621  Bind some key sequence to 
5622 \begin_inset Quotes eld
5623 \end_inset
5624
5625 notify
5626 \begin_inset Quotes erd
5627 \end_inset
5628
5629 .
5630  Then start a client that listens on the output pipe, dispatches the command
5631  according to the sequence, and starts a function that may use LyX calls
5632  and LyX requests to issue a command or a series of commands to LyX.
5633 \end_layout
5634
5635 \begin_layout Section
5636 The simple LyX Server Protocol
5637 \end_layout
5638
5639 \begin_layout Standard
5640 LyX implements a simple protocol that can be used for session management.
5641  All messages are of the form
5642 \end_layout
5643
5644 \begin_layout Quote
5645 LYXSRV:
5646 \emph on
5647 clientname
5648 \emph default
5649 :
5650 \emph on
5651 protocol message
5652 \end_layout
5653
5654 \begin_layout Standard
5655 where 
5656 \emph on
5657 protocol message
5658 \emph default
5659  can be 
5660 \begin_inset Quotes eld
5661 \end_inset
5662
5663 hello
5664 \begin_inset Quotes erd
5665 \end_inset
5666
5667  or 
5668 \begin_inset Quotes eld
5669 \end_inset
5670
5671 bye
5672 \begin_inset Quotes erd
5673 \end_inset
5674
5675 .
5676  If 
5677 \begin_inset Quotes eld
5678 \end_inset
5679
5680 hello
5681 \begin_inset Quotes erd
5682 \end_inset
5683
5684  is received from a client, LyX will report back to inform the client that
5685  it's listening to it's messages, while 
5686 \begin_inset Quotes eld
5687 \end_inset
5688
5689 bye
5690 \begin_inset Quotes erd
5691 \end_inset
5692
5693  sent from LyX will inform clients that LyX is closing.
5694 \end_layout
5695
5696 \begin_layout Section
5697 Reverse DVI/PDF search
5698 \end_layout
5699
5700 \begin_layout Standard
5701 Some DVI/PDF viewers
5702 \begin_inset Foot
5703 status collapsed
5704
5705 \begin_layout Plain Layout
5706 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5707  Skim on Mac OSX and SumatraPDF on Windows.
5708 \end_layout
5709
5710 \end_inset
5711
5712  provide 
5713 \emph on
5714 reverse search
5715 \emph default
5716  facility (also called 
5717 \emph on
5718 inverse search
5719 \emph default
5720 ).
5721  This means that you can tell LyX to put the cursor to a specific line in
5722  the document by clicking at the respective position in the DVI/PDF output.
5723  To achieve this, the viewer must be able to communicate with LyX.
5724  This is done via the LyX server either by using the named pipe (
5725 \emph on
5726 lyxpipe
5727 \emph default
5728 ), or the UNIX domain socket (
5729 \emph on
5730 lyxsocket
5731 \emph default
5732 ) that LyX creates in its temporary directory (this is the way the 
5733 \begin_inset Flex Code
5734 status collapsed
5735
5736 \begin_layout Plain Layout
5737 lyxclient
5738 \end_layout
5739
5740 \end_inset
5741
5742  program communicates with LyX).
5743  In some cases, you need a helper script that mediates between the viewer
5744  and LyX, in others, the viewer can communicate with LyX directly.
5745  This depends on the selected viewer and on your operating system.
5746  The same applies to the way viewers need to be configured and the way the
5747  reverse search is actually performed.
5748  In what follows, we will thus describe how to setup reverse search for
5749  specific viewers.
5750  Before we turn to this, though, we will explain what needs to be done generally
5751  to enable reverse search in the DVI/PDF output.
5752 \end_layout
5753
5754 \begin_layout Subsection
5755 \begin_inset CommandInset label
5756 LatexCommand label
5757 name "sub:rev-search"
5758
5759 \end_inset
5760
5761 Automatic setup
5762 \end_layout
5763
5764 \begin_layout Standard
5765 In most cases LyX will do the work for you by enabling 
5766 \begin_inset Flex MenuItem
5767 status collapsed
5768
5769 \begin_layout Plain Layout
5770 Document\SpecialChar \menuseparator
5771 Output\SpecialChar \menuseparator
5772 Synchronize with Output
5773 \end_layout
5774
5775 \end_inset
5776
5777 .
5778  In such a case LyX will automatically insert the necessary SyncTeX macro
5779  (for PDF) or load the srcltx package (for DVI) respectively.
5780  This option can be easily reached also on 
5781 \begin_inset Flex Code
5782 status collapsed
5783
5784 \begin_layout Plain Layout
5785 View/Update
5786 \end_layout
5787
5788 \end_inset
5789
5790  Toolbar.
5791 \end_layout
5792
5793 \begin_layout Standard
5794 If you need a different setting, you can select or input a custom macro
5795  from the drop down box just below 
5796 \begin_inset Flex MenuItem
5797 status collapsed
5798
5799 \begin_layout Plain Layout
5800 Document\SpecialChar \menuseparator
5801 Output\SpecialChar \menuseparator
5802 Synchronize with Output
5803 \end_layout
5804
5805 \end_inset
5806
5807 .
5808 \end_layout
5809
5810 \begin_layout Standard
5811 Please note that including the 
5812 \begin_inset Flex Code
5813 status collapsed
5814
5815 \begin_layout Plain Layout
5816 srcltx
5817 \end_layout
5818
5819 \end_inset
5820
5821  package or 
5822 \begin_inset Flex Code
5823 status collapsed
5824
5825 \begin_layout Plain Layout
5826 src-specials
5827 \end_layout
5828
5829 \end_inset
5830
5831  sometimes has an undesired impact on the typesetting.
5832  Thus, you should switch output synchronization off for the final typesetting
5833  if you use the 
5834 \begin_inset Flex Code
5835 status collapsed
5836
5837 \begin_layout Plain Layout
5838 srcltx
5839 \end_layout
5840
5841 \end_inset
5842
5843  package or 
5844 \begin_inset Flex Code
5845 status collapsed
5846
5847 \begin_layout Plain Layout
5848 src-specials
5849 \end_layout
5850
5851 \end_inset
5852
5853 .
5854 \end_layout
5855
5856 \begin_layout Standard
5857 In case you need some more special settings that are not covered by the
5858  automatic settings, read the next section about how to set up output synchroniz
5859 ation manually.
5860  If the automatic setup suits your needs, you can readily jump to section
5861 \begin_inset space ~
5862 \end_inset
5863
5864
5865 \begin_inset CommandInset ref
5866 LatexCommand ref
5867 reference "sub:configuring-viewers"
5868
5869 \end_inset
5870
5871 , where the necessary configuration steps in your viewer -- needed both
5872  with the automatic and the manual setup -- are described.
5873 \end_layout
5874
5875 \begin_layout Subsection
5876 Manual setup
5877 \end_layout
5878
5879 \begin_layout Standard
5880 LaTeX provides several different methods for reverse search.
5881  Some are built-in in the 
5882 \begin_inset Flex Code
5883 status collapsed
5884
5885 \begin_layout Plain Layout
5886 latex/pdflatex
5887 \end_layout
5888
5889 \end_inset
5890
5891  program, some are provided by external packages.
5892  Your choice depends on whether your LaTeX distribution already provides
5893  a given method (the built-in methods are rather new) and whether your viewer
5894  can cope with it.
5895  The available methods are described in the following.
5896 \end_layout
5897
5898 \begin_layout Subsubsection*
5899 Built-in DVI-search via src-specials (DVI only) 
5900 \end_layout
5901
5902 \begin_layout Standard
5903 This method provides the DVI file with the necessary information for reverse
5904  search.
5905  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5906  distribution should include it), and it works reliably.
5907  To enable it, change the 
5908 \begin_inset Flex MenuItem
5909 status collapsed
5910
5911 \begin_layout Plain Layout
5912 LaT
5913 \begin_inset ERT
5914 status collapsed
5915
5916 \begin_layout Plain Layout
5917
5918 {}
5919 \end_layout
5920
5921 \end_inset
5922
5923 eX (plain)->DVI
5924 \end_layout
5925
5926 \end_inset
5927
5928  or 
5929 \begin_inset Flex MenuItem
5930 status collapsed
5931
5932 \begin_layout Plain Layout
5933 LaT
5934 \begin_inset ERT
5935 status collapsed
5936
5937 \begin_layout Plain Layout
5938
5939 {}
5940 \end_layout
5941
5942 \end_inset
5943
5944 eX (plain)->DraftDVI
5945 \end_layout
5946
5947 \end_inset
5948
5949  converter in 
5950 \begin_inset Flex MenuItem
5951 status collapsed
5952
5953 \begin_layout Plain Layout
5954 Preferences\SpecialChar \menuseparator
5955 File Handling\SpecialChar \menuseparator
5956 Converters
5957 \end_layout
5958
5959 \end_inset
5960
5961  to 
5962 \begin_inset Flex Code
5963 status collapsed
5964
5965 \begin_layout Plain Layout
5966 latex -src-specials $$i
5967 \end_layout
5968
5969 \end_inset
5970
5971 .
5972  If this doesn't work, check if your TeX engine needs different options
5973  (the syntax might differ in some distributions).
5974 \end_layout
5975
5976 \begin_layout Subsubsection*
5977 External Packages (PDFSync and scrltx) 
5978 \end_layout
5979
5980 \begin_layout Standard
5981 The packages 
5982 \emph on
5983 pdfsync
5984 \emph default
5985  and 
5986 \emph on
5987 scrltx
5988 \emph default
5989  provide reverse search facility for PDF output (via pdflatex) and DVI output,
5990  respectively.
5991  In order to enable it, load the packages in the LyX preamble: 
5992 \end_layout
5993
5994 \begin_layout Itemize
5995 \begin_inset Flex Code
5996 status collapsed
5997
5998 \begin_layout Plain Layout
5999
6000 \backslash
6001 usepackage{pdfsync}
6002 \end_layout
6003
6004 \end_inset
6005
6006  for reverse PDF search,
6007 \end_layout
6008
6009 \begin_layout Itemize
6010  
6011 \begin_inset Flex Code
6012 status collapsed
6013
6014 \begin_layout Plain Layout
6015
6016 \backslash
6017 usepackage[active]{srcltx}
6018 \end_layout
6019
6020 \end_inset
6021
6022  for reverse DVI search.
6023 \end_layout
6024
6025 \begin_layout Standard
6026 If you want to be able to perform both DVI and PDF reverse searches, you
6027  can also insert in the preamble the following lines
6028 \end_layout
6029
6030 \begin_layout LyX-Code
6031
6032 \backslash
6033 usepackage{ifpdf}
6034 \begin_inset Newline newline
6035 \end_inset
6036
6037
6038 \backslash
6039 ifpdf
6040 \begin_inset Newline newline
6041 \end_inset
6042
6043   
6044 \backslash
6045 usepackage{pdfsync}
6046 \begin_inset Newline newline
6047 \end_inset
6048
6049
6050 \backslash
6051 else
6052 \begin_inset Newline newline
6053 \end_inset
6054
6055   
6056 \backslash
6057 usepackage[active]{srcltx}
6058 \begin_inset Newline newline
6059 \end_inset
6060
6061
6062 \backslash
6063 fi
6064 \end_layout
6065
6066 \begin_layout Standard
6067 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6068  right package will be used.
6069 \end_layout
6070
6071 \begin_layout Standard
6072 Note that PDFSync might affect the output layout of your document.
6073  It is therefore advised to disable PDFsync for final documents.
6074 \end_layout
6075
6076 \begin_layout Subsubsection*
6077 Built-in reverse search via SyncTeX (DVI and PDF) 
6078 \end_layout
6079
6080 \begin_layout Standard
6081 Recent versions of 
6082 \begin_inset Flex Code
6083 status collapsed
6084
6085 \begin_layout Plain Layout
6086 (pdf)latex
6087 \end_layout
6088
6089 \end_inset
6090
6091  have built-in support for both PDF and DVI reverse search.
6092  This so-called 
6093 \emph on
6094 SyncTeX
6095 \emph default
6096  facility is basically the result of the integration of the PDFSync package
6097  to the pdftex program and its merge with the 
6098 \emph on
6099 scr-specials
6100 \emph default
6101  approach.
6102  You need at least TeXLive 2008 or a recent MikTeX distribution in order
6103  to use it.
6104  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6105  already provide SyncTeX support.
6106 \end_layout
6107
6108 \begin_layout Standard
6109 To enable SyncTeX for DVI output, change the 
6110 \begin_inset Flex MenuItem
6111 status collapsed
6112
6113 \begin_layout Plain Layout
6114 LaT
6115 \begin_inset ERT
6116 status collapsed
6117
6118 \begin_layout Plain Layout
6119
6120 {}
6121 \end_layout
6122
6123 \end_inset
6124
6125 eX (plain) -> DVI
6126 \end_layout
6127
6128 \end_inset
6129
6130  or 
6131 \begin_inset Flex MenuItem
6132 status collapsed
6133
6134 \begin_layout Plain Layout
6135 LaT
6136 \begin_inset ERT
6137 status collapsed
6138
6139 \begin_layout Plain Layout
6140
6141 {}
6142 \end_layout
6143
6144 \end_inset
6145
6146 eX (plain) -> DraftDVI
6147 \end_layout
6148
6149 \end_inset
6150
6151  converter in 
6152 \begin_inset Flex MenuItem
6153 status collapsed
6154
6155 \begin_layout Plain Layout
6156 Preferences\SpecialChar \menuseparator
6157 File Handling\SpecialChar \menuseparator
6158 Converters
6159 \end_layout
6160
6161 \end_inset
6162
6163  to 
6164 \begin_inset Flex Code
6165 status collapsed
6166
6167 \begin_layout Plain Layout
6168 latex -synctex=1 $$i
6169 \end_layout
6170
6171 \end_inset
6172
6173 , and for PDF output, change the 
6174 \begin_inset Flex MenuItem
6175 status collapsed
6176
6177 \begin_layout Plain Layout
6178 LaT
6179 \begin_inset ERT
6180 status collapsed
6181
6182 \begin_layout Plain Layout
6183
6184 {}
6185 \end_layout
6186
6187 \end_inset
6188
6189 eX (pdflatex) -> PDF (pdflatex)
6190 \end_layout
6191
6192 \end_inset
6193
6194  or converter to 
6195 \begin_inset Flex Code
6196 status collapsed
6197
6198 \begin_layout Plain Layout
6199 pdflatex -synctex=1 $$i
6200 \end_layout
6201
6202 \end_inset
6203
6204 .
6205  Check the documentation of your viewer whether the viewer needs to be configure
6206 d for the use with SyncTeX.
6207 \begin_inset Foot
6208 status collapsed
6209
6210 \begin_layout Plain Layout
6211 The 
6212 \begin_inset Flex Code
6213 status collapsed
6214
6215 \begin_layout Plain Layout
6216 -synctex=1
6217 \end_layout
6218
6219 \end_inset
6220
6221  option enables gzip compression.
6222  If your viewer does not support it, you should instead use 
6223 \begin_inset Flex Code
6224 status collapsed
6225
6226 \begin_layout Plain Layout
6227 -synctex=-1
6228 \end_layout
6229
6230 \end_inset
6231
6232 .
6233 \end_layout
6234
6235 \end_inset
6236
6237
6238 \end_layout
6239
6240 \begin_layout Subsection
6241 Configuring and using specific viewers
6242 \begin_inset CommandInset label
6243 LatexCommand label
6244 name "sub:configuring-viewers"
6245
6246 \end_inset
6247
6248
6249 \end_layout
6250
6251 \begin_layout Subsubsection*
6252 Xdvi (all platforms)
6253 \end_layout
6254
6255 \begin_layout Standard
6256 If you use 
6257 \begin_inset Flex Code
6258 status collapsed
6259
6260 \begin_layout Plain Layout
6261 xdvi
6262 \end_layout
6263
6264 \end_inset
6265
6266 , you don't need to do anything else for performing a reverse DVI search,
6267  as LyX already provides the necessary hooks for automatically using the
6268  
6269 \begin_inset Flex Code
6270 status collapsed
6271
6272 \begin_layout Plain Layout
6273 lyxclient
6274 \end_layout
6275
6276 \end_inset
6277
6278  program.
6279  Just setup your document as described above (reverse search is triggered
6280  by Ctrl-click or Alt-click on Mac OSX, respectively).
6281 \end_layout
6282
6283 \begin_layout Standard
6284 However, if for whatever reason you want to use the named pipe instead of
6285  the socket for communicating with LyX, simply change the DVI viewer in
6286  
6287 \begin_inset Flex MenuItem
6288 status collapsed
6289
6290 \begin_layout Plain Layout
6291 Preferences\SpecialChar \menuseparator
6292 File Handling\SpecialChar \menuseparator
6293 File formats
6294 \end_layout
6295
6296 \end_inset
6297
6298  to
6299 \begin_inset Foot
6300 status collapsed
6301
6302 \begin_layout Plain Layout
6303 On Mac OSX you have to use 
6304 \begin_inset Flex Code
6305 status collapsed
6306
6307 \begin_layout Plain Layout
6308 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6309 \end_layout
6310
6311 \end_inset
6312
6313
6314 \end_layout
6315
6316 \end_inset
6317
6318  
6319 \begin_inset Flex Code
6320 status collapsed
6321
6322 \begin_layout Plain Layout
6323 xdvi -editor 'lyxeditor.sh %f %l'
6324 \end_layout
6325
6326 \end_inset
6327
6328 , where 
6329 \begin_inset Flex Code
6330 status collapsed
6331
6332 \begin_layout Plain Layout
6333 lyxeditor.sh
6334 \end_layout
6335
6336 \end_inset
6337
6338  is a suitable script.
6339  For example, a minimal shell script is the following one:
6340 \end_layout
6341
6342 \begin_layout LyX-Code
6343 #!/bin/sh
6344 \begin_inset Newline newline
6345 \end_inset
6346
6347 LYXPIPE="/path/to/lyxpipe"
6348 \begin_inset Newline newline
6349 \end_inset
6350
6351 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6352 \begin_inset Newline newline
6353 \end_inset
6354
6355 echo "$COMMAND" > "${LYXPIPE}".in || exit
6356 \begin_inset Newline newline
6357 \end_inset
6358
6359 read < "${LYXPIPE}".out || exit
6360 \end_layout
6361
6362 \begin_layout Standard
6363 where 
6364 \begin_inset Flex Code
6365 status collapsed
6366
6367 \begin_layout Plain Layout
6368 /path/to/lyxpipe
6369 \end_layout
6370
6371 \end_inset
6372
6373  is the Ly
6374 \begin_inset ERT
6375 status collapsed
6376
6377 \begin_layout Plain Layout
6378
6379 {}
6380 \end_layout
6381
6382 \end_inset
6383
6384 XServer pipe path specified in 
6385 \begin_inset Flex MenuItem
6386 status collapsed
6387
6388 \begin_layout Plain Layout
6389 Preferences\SpecialChar \menuseparator
6390 Paths
6391 \end_layout
6392
6393 \end_inset
6394
6395 .
6396 \begin_inset Foot
6397 status collapsed
6398
6399 \begin_layout Plain Layout
6400 In the 
6401 \begin_inset Flex Code
6402 status collapsed
6403
6404 \begin_layout Plain Layout
6405 development/tools
6406 \end_layout
6407
6408 \end_inset
6409
6410  folder of a source distribution you can find a 
6411 \begin_inset Flex Code
6412 status collapsed
6413
6414 \begin_layout Plain Layout
6415 lyxeditor
6416 \end_layout
6417
6418 \end_inset
6419
6420  script which is able to locate the 
6421 \emph on
6422 lyxpipe
6423 \emph default
6424  based on your preferences.
6425 \end_layout
6426
6427 \end_inset
6428
6429
6430 \end_layout
6431
6432 \begin_layout Subsubsection*
6433 MacDviX (Mac OSX)
6434 \end_layout
6435
6436 \begin_layout Standard
6437 At the end of 
6438 \begin_inset Flex Code
6439 status collapsed
6440
6441 \begin_layout Plain Layout
6442 /Applications/MacDviX_Folder/calleditor.script
6443 \end_layout
6444
6445 \end_inset
6446
6447 , add the following lines:
6448 \end_layout
6449
6450 \begin_layout LyX-Code
6451 /Applications/Ly
6452 \begin_inset ERT
6453 status collapsed
6454
6455 \begin_layout Plain Layout
6456
6457 {}
6458 \end_layout
6459
6460 \end_inset
6461
6462 X.app/Contents/MacOS/lyxeditor "$2" $1
6463 \begin_inset Newline newline
6464 \end_inset
6465
6466 exit 1
6467 \end_layout
6468
6469 \begin_layout Standard
6470 Modify the lines accordingly if you install LyX somewhere else than in the
6471  Applications folder.
6472 \end_layout
6473
6474 \begin_layout Standard
6475 Reverse search is triggered by Alt-click (OPTION-click).
6476 \end_layout
6477
6478 \begin_layout Subsubsection*
6479 Skim (Mac OSX)
6480 \end_layout
6481
6482 \begin_layout Standard
6483 Enter 
6484 \begin_inset Flex Code
6485 status collapsed
6486
6487 \begin_layout Plain Layout
6488 open -a Skim.app $$i
6489 \end_layout
6490
6491 \end_inset
6492
6493  to the viewer setting in 
6494 \begin_inset Flex MenuItem
6495 status collapsed
6496
6497 \begin_layout Plain Layout
6498 Preferences\SpecialChar \menuseparator
6499 File Handling\SpecialChar \menuseparator
6500 File formats\SpecialChar \menuseparator
6501 PDF (pdflatex)
6502 \end_layout
6503
6504 \end_inset
6505
6506 , and then in 
6507 \begin_inset Flex MenuItem
6508 status collapsed
6509
6510 \begin_layout Plain Layout
6511 Skim\SpecialChar \menuseparator
6512 Preferences\SpecialChar \menuseparator
6513 Sync
6514 \end_layout
6515
6516 \end_inset
6517
6518  select Ly
6519 \begin_inset ERT
6520 status collapsed
6521
6522 \begin_layout Plain Layout
6523
6524 {}
6525 \end_layout
6526
6527 \end_inset
6528
6529 X.
6530 \end_layout
6531
6532 \begin_layout Standard
6533 Reverse search is triggered by COMMAND-SHIFT-click
6534 \end_layout
6535
6536 \begin_layout Subsubsection*
6537 Okular (KDE)
6538 \end_layout
6539
6540 \begin_layout Standard
6541 Go to 
6542 \begin_inset Flex MenuItem
6543 status collapsed
6544
6545 \begin_layout Plain Layout
6546 Settings\SpecialChar \menuseparator
6547 Configure Okular\SpecialChar \ldots{}
6548 \SpecialChar \menuseparator
6549 Editor
6550 \end_layout
6551
6552 \end_inset
6553
6554 , select 
6555 \begin_inset Quotes eld
6556 \end_inset
6557
6558 Custom Text Editor
6559 \begin_inset Quotes erd
6560 \end_inset
6561
6562  and add the command 
6563 \begin_inset Flex Code
6564 status collapsed
6565
6566 \begin_layout Plain Layout
6567 lyxclient -g %f %l
6568 \end_layout
6569
6570 \end_inset
6571
6572 .
6573 \end_layout
6574
6575 \begin_layout Standard
6576 Reverse search is triggered by SHIFT-click.
6577 \end_layout
6578
6579 \begin_layout Subsubsection*
6580 YAP (Windows)
6581 \end_layout
6582
6583 \begin_layout Standard
6584 Launch yap, choose its 
6585 \begin_inset Flex MenuItem
6586 status collapsed
6587
6588 \begin_layout Plain Layout
6589 View\SpecialChar \menuseparator
6590 Options
6591 \end_layout
6592
6593 \end_inset
6594
6595  menu and select the 
6596 \begin_inset Quotes eld
6597 \end_inset
6598
6599 Inverse DVI Search
6600 \begin_inset Quotes erd
6601 \end_inset
6602
6603  tab.
6604  Click on the 
6605 \begin_inset Quotes eld
6606 \end_inset
6607
6608 New\SpecialChar \ldots{}
6609
6610 \begin_inset Quotes erd
6611 \end_inset
6612
6613  button and, in the window that opens, enter 
6614 \begin_inset Quotes eld
6615 \end_inset
6616
6617 LyX Editor
6618 \begin_inset Quotes erd
6619 \end_inset
6620
6621  (or any other name you like) in the 
6622 \begin_inset Quotes eld
6623 \end_inset
6624
6625 Name:
6626 \begin_inset Quotes erd
6627 \end_inset
6628
6629  field.
6630  Now click on the button labeled 
6631 \begin_inset Quotes eld
6632 \end_inset
6633
6634 \SpecialChar \ldots{}
6635
6636 \begin_inset Quotes erd
6637 \end_inset
6638
6639  to open a file dialog and navigate to the directory containing the batch
6640  file 
6641 \begin_inset Flex Code
6642 status collapsed
6643
6644 \begin_layout Plain Layout
6645 lyxeditor.bat
6646 \end_layout
6647
6648 \end_inset
6649
6650  (see below).
6651  Select 
6652 \begin_inset Flex Code
6653 status collapsed
6654
6655 \begin_layout Plain Layout
6656 lyxeditor.bat
6657 \end_layout
6658
6659 \end_inset
6660
6661  and then specify the program arguments as 
6662 \begin_inset Flex Code
6663 status collapsed
6664
6665 \begin_layout Plain Layout
6666 %f %l
6667 \end_layout
6668
6669 \end_inset
6670
6671 .
6672  The 
6673 \begin_inset Flex Code
6674 status collapsed
6675
6676 \begin_layout Plain Layout
6677 lyxeditor.bat
6678 \end_layout
6679
6680 \end_inset
6681
6682  wrapper is used for communicating with LyX through the 
6683 \emph on
6684 lyxpipe
6685 \emph default
6686  and is as follows:
6687 \end_layout
6688
6689 \begin_layout LyX-Code
6690 @echo off
6691 \begin_inset Newline newline
6692 \end_inset
6693
6694 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6695 \backslash
6696
6697 \backslash
6698 .
6699 \backslash
6700 pipe
6701 \backslash
6702 lyxpipe.in
6703 \begin_inset Newline newline
6704 \end_inset
6705
6706 type 
6707 \backslash
6708
6709 \backslash
6710 .
6711 \backslash
6712 pipe
6713 \backslash
6714 lyxpipe.out
6715 \end_layout
6716
6717 \begin_layout Standard
6718 Make sure that the LyXServer pipe path you specified in LyX is 
6719 \begin_inset Flex Code
6720 status collapsed
6721
6722 \begin_layout Plain Layout
6723
6724 \backslash
6725
6726 \backslash
6727 .
6728 \backslash
6729 pipe
6730 \backslash
6731 lyxpipe
6732 \end_layout
6733
6734 \end_inset
6735
6736 , otherwise change the 
6737 \begin_inset Flex Code
6738 status collapsed
6739
6740 \begin_layout Plain Layout
6741 lyxeditor.bat
6742 \end_layout
6743
6744 \end_inset
6745
6746  wrapper accordingly.
6747 \end_layout
6748
6749 \begin_layout Standard
6750 In yap, reverse search is triggered by double-click.
6751 \end_layout
6752
6753 \begin_layout Subsubsection*
6754 SumatraPDF (Windows)
6755 \end_layout
6756
6757 \begin_layout Standard
6758 In order to use SumatraPDF for inverse search, enter 
6759 \begin_inset Flex Code
6760 status collapsed
6761
6762 \begin_layout Plain Layout
6763 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6764 \end_layout
6765
6766 \end_inset
6767
6768  in the viewer setting in 
6769 \begin_inset Flex MenuItem
6770 status collapsed
6771
6772 \begin_layout Plain Layout
6773 Preferences\SpecialChar \menuseparator
6774 File Handling\SpecialChar \menuseparator
6775 File formats\SpecialChar \menuseparator
6776 PDF (pdflatex)
6777 \end_layout
6778
6779 \end_inset
6780
6781 , where 
6782 \begin_inset Flex Code
6783 status collapsed
6784
6785 \begin_layout Plain Layout
6786 lyxeditor.bat
6787 \end_layout
6788
6789 \end_inset
6790
6791  is the previous wrapper.
6792  If SumatraPDF.exe is not in your command PATH, use its full file name.
6793 \end_layout
6794
6795 \begin_layout Standard
6796 Reverse search is triggered by double-click.
6797 \end_layout
6798
6799 \begin_layout Subsubsection*
6800 YAP (Cygwin)
6801 \end_layout
6802
6803 \begin_layout Standard
6804 First of all, make sure that yap is your default DVI viewer in the Windows
6805  environment, then launch it, choose its 
6806 \begin_inset Flex MenuItem
6807 status collapsed
6808
6809 \begin_layout Plain Layout
6810 View\SpecialChar \menuseparator
6811 Options
6812 \end_layout
6813
6814 \end_inset
6815
6816  menu and select the 
6817 \begin_inset Quotes eld
6818 \end_inset
6819
6820 Inverse DVI Search
6821 \begin_inset Quotes erd
6822 \end_inset
6823
6824  tab.
6825  Click on the 
6826 \begin_inset Quotes eld
6827 \end_inset
6828
6829 New\SpecialChar \ldots{}
6830
6831 \begin_inset Quotes erd
6832 \end_inset
6833
6834  button and, in the window that opens, enter 
6835 \begin_inset Quotes eld
6836 \end_inset
6837
6838 LyX Editor
6839 \begin_inset Quotes erd
6840 \end_inset
6841
6842  (or any other name you like) in the 
6843 \begin_inset Quotes eld
6844 \end_inset
6845
6846 Name:
6847 \begin_inset Quotes erd
6848 \end_inset
6849
6850  field.
6851  Now click on the button labeled 
6852 \begin_inset Quotes eld
6853 \end_inset
6854
6855 \SpecialChar \ldots{}
6856
6857 \begin_inset Quotes erd
6858 \end_inset
6859
6860  to open a file dialog and navigate to the directory containing the 
6861 \begin_inset Flex Code
6862 status collapsed
6863
6864 \begin_layout Plain Layout
6865 lyxeditor.exe
6866 \end_layout
6867
6868 \end_inset
6869
6870  program (which is installed by default on Cygwin along with the LyX executable).
6871  Select 
6872 \begin_inset Flex Code
6873 status collapsed
6874
6875 \begin_layout Plain Layout
6876 lyxeditor.exe
6877 \end_layout
6878
6879 \end_inset
6880
6881  and then specify the program arguments as 
6882 \begin_inset Flex Code
6883 status collapsed
6884
6885 \begin_layout Plain Layout
6886 -g %f %l
6887 \end_layout
6888
6889 \end_inset
6890
6891 .
6892  In this way, you will be using the 
6893 \emph on
6894 lyxsocket
6895 \emph default
6896  for communicating with LyX.
6897  If, for whatever reason, you want to use the 
6898 \emph on
6899 lyxpipe
6900 \emph default
6901 , omit the 
6902 \begin_inset Flex Code
6903 status collapsed
6904
6905 \begin_layout Plain Layout
6906 -g
6907 \end_layout
6908
6909 \end_inset
6910
6911  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6912 \end_layout
6913
6914 \begin_layout Standard
6915 In yap, reverse search is triggered by double-click.
6916 \end_layout
6917
6918 \begin_layout Subsubsection*
6919 SumatraPDF (Cygwin)
6920 \end_layout
6921
6922 \begin_layout Standard
6923 In order to use SumatraPDF for inverse search, enter 
6924 \begin_inset Flex Code
6925 status collapsed
6926
6927 \begin_layout Plain Layout
6928 SumatraPDF.sh
6929 \end_layout
6930
6931 \end_inset
6932
6933  in the viewer setting in 
6934 \begin_inset Flex MenuItem
6935 status collapsed
6936
6937 \begin_layout Plain Layout
6938 Preferences\SpecialChar \menuseparator
6939 File Handling\SpecialChar \menuseparator
6940 File formats\SpecialChar \menuseparator
6941 PDF (pdflatex)
6942 \end_layout
6943
6944 \end_inset
6945
6946 , where 
6947 \begin_inset Flex Code
6948 status collapsed
6949
6950 \begin_layout Plain Layout
6951 SumatraPDF.sh
6952 \end_layout
6953
6954 \end_inset
6955
6956  is the following script (to be placed in your command PATH, 
6957 \begin_inset Flex Code
6958 status collapsed
6959
6960 \begin_layout Plain Layout
6961 /usr/local/bin
6962 \end_layout
6963
6964 \end_inset
6965
6966  being the best choice):
6967 \end_layout
6968
6969 \begin_layout LyX-Code
6970 #!/bin/bash
6971 \begin_inset Newline newline
6972 \end_inset
6973
6974 cd $(dirname $1)
6975 \begin_inset Newline newline
6976 \end_inset
6977
6978 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6979 \end_layout
6980
6981 \begin_layout Standard
6982 This wrapper script is needed because SumatraPDF is a native Windows application
6983  and does not understand the posix paths used by the Cygwin version of LyX.
6984  If SumatraPDF.exe is not in your command PATH, use its full posix path in
6985  the script above.
6986  The 
6987 \begin_inset Flex Code
6988 status collapsed
6989
6990 \begin_layout Plain Layout
6991 -g
6992 \end_layout
6993
6994 \end_inset
6995
6996  enables communication via the 
6997 \emph on
6998 lyxsocket
6999 \emph default
7000 .
7001  Again, omit the 
7002 \begin_inset Flex Code
7003 status collapsed
7004
7005 \begin_layout Plain Layout
7006 -g
7007 \end_layout
7008
7009 \end_inset
7010
7011  option if you want to use the 
7012 \emph on
7013 lyxpipe
7014 \emph default
7015 , and be sure to specify the LyXServer pipe path in the LyX preferences.
7016 \end_layout
7017
7018 \begin_layout Standard
7019 Reverse search is triggered by double-click.
7020 \end_layout
7021
7022 \begin_layout Section
7023 Forward search
7024 \end_layout
7025
7026 \begin_layout Standard
7027 Forward search is, as the name implies, in a sense the 
7028 \begin_inset Quotes eld
7029 \end_inset
7030
7031 opposite
7032 \begin_inset Quotes erd
7033 \end_inset
7034
7035  to reverse search.
7036  It allows you to let the viewer jump to a given position from within LyX.
7037  If forward search is set up (as described in what follows), you can put
7038  the cursor anywhere in your LyX document, and hit 
7039 \begin_inset Flex MenuItem
7040 status collapsed
7041
7042 \begin_layout Plain Layout
7043 Navigate\SpecialChar \menuseparator
7044 Forward search
7045 \end_layout
7046
7047 \end_inset
7048
7049  (or select 
7050 \begin_inset Flex MenuItem
7051 status collapsed
7052
7053 \begin_layout Plain Layout
7054 Forward search
7055 \end_layout
7056
7057 \end_inset
7058
7059  in the context menu via right mouse click), and then the viewer will jump
7060  to that position as well.
7061  This implies, of course, that your viewer supports this function.
7062 \end_layout
7063
7064 \begin_layout Standard
7065 To make forward search possible, you first need to provide the generated
7066  output PDF/DVI file with additional information about the TeX sources.
7067  This can be done via the methods described in the section 
7068 \begin_inset CommandInset ref
7069 LatexCommand ref
7070 reference "sub:rev-search"
7071
7072 \end_inset
7073
7074 .
7075 \end_layout
7076
7077 \begin_layout Standard
7078 Additionally, you need to configure LyX for using your viewers in 
7079 \begin_inset Flex MenuItem
7080 status collapsed
7081
7082 \begin_layout Plain Layout
7083 Tools\SpecialChar \menuseparator
7084 Preferences\SpecialChar \menuseparator
7085 Output\SpecialChar \menuseparator
7086 General
7087 \end_layout
7088
7089 \end_inset
7090
7091 .
7092  We provide a range of tested configurations for some viewers, which you
7093  can select from the drop down list.
7094  If none of these configurations suits you, you have to find out and enter
7095  a suitable configuration yourself.
7096  The definition syntax uses the following placeholders: 
7097 \end_layout
7098
7099 \begin_layout Itemize
7100 \noindent
7101 \begin_inset Flex Code
7102 status collapsed
7103
7104 \begin_layout Plain Layout
7105 $$n
7106 \end_layout
7107
7108 \end_inset
7109
7110 : row number
7111 \end_layout
7112
7113 \begin_layout Itemize
7114 \noindent
7115 \begin_inset Flex Code
7116 status collapsed
7117
7118 \begin_layout Plain Layout
7119 $$t
7120 \end_layout
7121
7122 \end_inset
7123
7124 : name of the (temporary) exported .tex file
7125 \end_layout
7126
7127 \begin_layout Itemize
7128 \noindent
7129 \begin_inset Flex Code
7130 status collapsed
7131
7132 \begin_layout Plain Layout
7133 $$o
7134 \end_layout
7135
7136 \end_inset
7137
7138 : name of the exported output file (either dvi or pdf, depending on which
7139  one exists in the temporary directory)
7140 \end_layout
7141
7142 \begin_layout Standard
7143 Note that only some of the viewers provide full forward search functionality,
7144  among them yap, xdvi, okular and Sumatra PDF
7145 \begin_inset Foot
7146 status collapsed
7147
7148 \begin_layout Plain Layout
7149 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
7150 ip
7151 \end_layout
7152
7153 \end_inset
7154
7155 .
7156  While many of the widespread PDF viewers (most notably Adobe Reader) do
7157  not support forward search at all, some other viewers -- e.
7158 \begin_inset space \thinspace{}
7159 \end_inset
7160
7161 g.
7162  evince and xpdf -- allow at least to reload the document and jump to a
7163  specific page of the file, so you can at least navigate 
7164 \begin_inset Quotes eld
7165 \end_inset
7166
7167 near
7168 \begin_inset Quotes erd
7169 \end_inset
7170
7171 .
7172  These latter functionality is provided by an external call of synctex (see
7173  the predefined example configurations).
7174  
7175 \end_layout
7176
7177 \begin_layout Standard
7178 Forward search works both with DVI and PDF output.
7179  LyX simply checks which preview format you have used before (i.
7180 \begin_inset space \thinspace{}
7181 \end_inset
7182
7183 e., which format is already there in the temporary directory) and chooses
7184  the appropriate configuration for the respective format.
7185  
7186 \end_layout
7187
7188 \begin_layout Chapter
7189 Special Document Classes
7190 \end_layout
7191
7192 \begin_layout Section
7193 A&A Paper
7194 \end_layout
7195
7196 \begin_layout Standard
7197 by 
7198 \noun on
7199 Peter Sütterlin
7200 \end_layout
7201
7202 \begin_layout Subsection
7203 Introduction
7204 \end_layout
7205
7206 \begin_layout Standard
7207 This section describes how LyX can be used to write articles for submission
7208  to the scientific journal 
7209 \emph on
7210 Astronomy and Astrophysics
7211 \emph default
7212  (www.edpsciences.fr/aa/ 
7213 \begin_inset Flex URL
7214 status collapsed
7215
7216 \begin_layout Plain Layout
7217
7218 http://www.edpsciences.fr/aa/
7219 \end_layout
7220
7221 \end_inset
7222
7223 ) using Version 5.01 of the document class 
7224 \family typewriter
7225 aa.cls
7226 \family default
7227 .
7228  This package can be downloaded from the ftp site
7229 \end_layout
7230
7231 \begin_layout Standard
7232 \begin_inset VSpace medskip
7233 \end_inset
7234
7235
7236 \end_layout
7237
7238 \begin_layout Standard
7239 \align center
7240 \begin_inset Flex URL
7241 status collapsed
7242
7243 \begin_layout Plain Layout
7244
7245 ftp://ftp.edpsciences.org/pub/aa/readme.html
7246 \end_layout
7247
7248 \end_inset
7249
7250
7251 \end_layout
7252
7253 \begin_layout Standard
7254 \begin_inset VSpace medskip
7255 \end_inset
7256
7257
7258 \end_layout
7259
7260 \begin_layout Standard
7261 A manual comes together with that package, and this text is not meant to
7262  replace the original manual but is merely a short guide in how to realize
7263  the correct form of your paper.
7264  
7265 \end_layout
7266
7267 \begin_layout Standard
7268 Please note that the publisher of the journal was changed from Springer
7269  to EDP Sciences starting January 1, 2001.
7270  That change involved also some slight changes to the style files, namely
7271  the removal of the thesaurus command.
7272  The LyX class aa supports the newest version of these style files, V 5.01.
7273  If you have an older version installed, please upgrade.
7274  For compatibility, the old (version 4) layout has been kept as 
7275 \family sans
7276 article (A&A V4)
7277 \family default
7278 .
7279  Please refer to the comments in 
7280 \family typewriter
7281 LyXDir/layouts/aapaper.layout
7282 \family default
7283 .
7284 \end_layout
7285
7286 \begin_layout Subsection
7287 Getting started
7288 \end_layout
7289
7290 \begin_layout Standard
7291 It is recommended you start from the example template distributed with LyX.
7292  If you are not using a template, note the following settings:
7293 \end_layout
7294
7295 \begin_layout Itemize
7296 Select 
7297 \family sans
7298 article (A&A)
7299 \family default
7300  in the 
7301 \family sans
7302 Document\SpecialChar \menuseparator
7303 Settings
7304 \family default
7305  dialog (OK, that one was obvious).
7306 \end_layout
7307
7308 \begin_layout Itemize
7309 Don't change the option 
7310 \family sans
7311 Page
7312 \begin_inset space ~
7313 \end_inset
7314
7315 style
7316 \family default
7317 : Leave it set to 
7318 \family sans
7319 default
7320 \family default
7321 .
7322  The whole layout is done by the macros, you shouldn't change anything.
7323 \end_layout
7324
7325 \begin_layout Subsection
7326 The header block
7327 \end_layout
7328
7329 \begin_layout Standard
7330 First thing to enter is the header information.
7331  It consists of seven entries, of which some are optional.
7332  They are
7333 \end_layout
7334
7335 \begin_layout Itemize
7336
7337 \family sans
7338 Title
7339 \family default
7340 : [required] 
7341 \end_layout
7342
7343 \begin_layout Itemize
7344
7345 \family sans
7346 Subtitle
7347 \family default
7348 : [optional] 
7349 \end_layout
7350
7351 \begin_layout Itemize
7352
7353 \family sans
7354 Author
7355 \family default
7356 : [required]
7357 \end_layout
7358
7359 \begin_layout Itemize
7360
7361 \family sans
7362 Address
7363 \family default
7364 : [required]
7365 \end_layout
7366
7367 \begin_layout Itemize
7368
7369 \family sans
7370 Offprints
7371 \family default
7372 : [optional] if more than one author: whom to contact for offprint requests.
7373 \end_layout
7374
7375 \begin_layout Itemize
7376
7377 \family sans
7378 Mail
7379 \family default
7380 : [optional] mail address for contacts.
7381 \end_layout
7382
7383 \begin_layout Itemize
7384
7385 \family sans
7386 Date
7387 \family default
7388 : [required].
7389  Suggested format is 
7390 \family typewriter
7391 Received: <date>; Accepted <date> 
7392 \end_layout
7393
7394 \begin_layout Standard
7395 There is no need to issue the 
7396 \family typewriter
7397
7398 \backslash
7399 maketitle
7400 \family default
7401  command, this is done automatically by LyX when the header is finished.
7402  Although the order of the single header entries doesn't matter it is advised
7403  to keep the above sequence, just to get the best optics and meets the layout
7404  of the real document.
7405 \end_layout
7406
7407 \begin_layout Standard
7408 If you want to place footnotes in the header block, e.
7409 \begin_inset space \thinspace{}
7410 \end_inset
7411
7412 g.
7413 \begin_inset space \space{}
7414 \end_inset
7415
7416 to state your present address, just use the standard footnote via the menu
7417  
7418 \family sans
7419 Insert\SpecialChar \menuseparator
7420 Footnote.
7421
7422 \family default
7423  LyX will automagically use the term 
7424 \family typewriter
7425
7426 \backslash
7427 thanks{}
7428 \family default
7429  in that case.
7430 \end_layout
7431
7432 \begin_layout Standard
7433 In addition to these topics, the macros use three additional LaTeX commands
7434  that have no counterpart in LyX:
7435 \end_layout
7436
7437 \begin_layout Itemize
7438
7439 \family typewriter
7440
7441 \backslash
7442 and
7443 \family default
7444  to separate different names for more than one author and institute, respectivel
7445 y.
7446 \end_layout
7447
7448 \begin_layout Itemize
7449
7450 \family typewriter
7451
7452 \backslash
7453 inst{<nr>}
7454 \family default
7455 to mark corresponding author/institute pairs.
7456  The institutes are numbered sequentially as they appear in the 
7457 \family sans
7458 Address
7459 \family default
7460  field, so you have to put a marker to each author.
7461 \end_layout
7462
7463 \begin_layout Itemize
7464
7465 \family typewriter
7466
7467 \backslash
7468 email{address}
7469 \family default
7470  to supply an email address for fast contact.
7471 \end_layout
7472
7473 \begin_layout Standard
7474 In all cases, the appropriate command has to be entered in LyX and marked
7475  as LaTeX code.
7476  See the examples.
7477  
7478 \end_layout
7479
7480 \begin_layout Subsection
7481 The abstract
7482 \end_layout
7483
7484 \begin_layout Standard
7485 The abstract should immediately follow the header block.
7486  With version 5 the abstract environment was changed to a command, and there
7487  is now a resctriction to only one paragraph.
7488  In addition, it should contain an entry with the keywords.
7489  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7490  command 
7491 \family typewriter
7492
7493 \backslash
7494 keywords{}
7495 \family default
7496  by hand and mark it as LaTeX code.
7497  Refer to the example paper.
7498 \end_layout
7499
7500 \begin_layout Subsection
7501 Supported environments
7502 \end_layout
7503
7504 \begin_layout Standard
7505 The A&A paper layout supports the following environments for structuring
7506  your text:
7507 \end_layout
7508
7509 \begin_layout Itemize
7510
7511 \family sans
7512 Standard
7513 \end_layout
7514
7515 \begin_layout Itemize
7516
7517 \family sans
7518 Section
7519 \end_layout
7520
7521 \begin_layout Itemize
7522
7523 \family sans
7524 Subsection
7525 \end_layout
7526
7527 \begin_layout Itemize
7528
7529 \family sans
7530 Subsubsection
7531 \end_layout
7532
7533 \begin_layout Itemize
7534
7535 \family sans
7536 Itemize
7537 \end_layout
7538
7539 \begin_layout Itemize
7540
7541 \family sans
7542 Enumerate
7543 \end_layout
7544
7545 \begin_layout Itemize
7546
7547 \family sans
7548 Description
7549 \end_layout
7550
7551 \begin_layout Itemize
7552
7553 \family sans
7554 Caption
7555 \end_layout
7556
7557 \begin_layout Itemize
7558
7559 \family sans
7560 Abstract
7561 \end_layout
7562
7563 \begin_layout Itemize
7564
7565 \family sans
7566 Acknowledgment
7567 \end_layout
7568
7569 \begin_layout Itemize
7570
7571 \family sans
7572 Bibliography
7573 \end_layout
7574
7575 \begin_layout Itemize
7576
7577 \family sans
7578 LaTeX
7579 \end_layout
7580
7581 \begin_layout Subsection
7582 Commands not supported by LyX
7583 \end_layout
7584
7585 \begin_layout Standard
7586 Some commands are not yet supported by the 
7587 \family sans
7588 paper (A&A)
7589 \family default
7590  layout for LyX.
7591  Some have already been mentioned.
7592  For the sake of completeness, they are listed all together here:
7593 \end_layout
7594
7595 \begin_layout Itemize
7596
7597 \family typewriter
7598
7599 \backslash
7600 and
7601 \end_layout
7602
7603 \begin_layout Itemize
7604
7605 \family typewriter
7606
7607 \backslash
7608 email
7609 \end_layout
7610
7611 \begin_layout Itemize
7612
7613 \family typewriter
7614
7615 \backslash
7616 appendix
7617 \end_layout
7618
7619 \begin_layout Itemize
7620
7621 \family typewriter
7622
7623 \backslash
7624 authorrunning
7625 \end_layout
7626
7627 \begin_layout Itemize
7628
7629 \family typewriter
7630
7631 \backslash
7632 inst{}
7633 \end_layout
7634
7635 \begin_layout Itemize
7636
7637 \family typewriter
7638
7639 \backslash
7640 keywords{}
7641 \end_layout
7642
7643 \begin_layout Itemize
7644
7645 \family typewriter
7646
7647 \backslash
7648 object{}
7649 \end_layout
7650
7651 \begin_layout Itemize
7652
7653 \family typewriter
7654
7655 \backslash
7656 titlerunning{}
7657 \end_layout
7658
7659 \begin_layout Standard
7660 If you want to use any of these commands, you have to enter them yourself.
7661  
7662 \series bold
7663 Do not forget to mark them as LaTeX code!
7664 \end_layout
7665
7666 \begin_layout Subsection
7667 Figure and Table Floats
7668 \end_layout
7669
7670 \begin_layout Standard
7671 LyX provides support for the necessary float environments 
7672 \family sans
7673 figure, figure*, table
7674 \family default
7675  and 
7676 \family sans
7677 table*
7678 \family default
7679 , therefore we won't tell much about it here.
7680  Refer to the 
7681 \emph on
7682 User's
7683 \begin_inset space ~
7684 \end_inset
7685
7686 Guide
7687 \emph default
7688 .
7689  Just remember that tables should be left-aligned.
7690  For that, select the table and change the alignment in 
7691 \family sans
7692 Edit\SpecialChar \menuseparator
7693 Paragraph
7694 \begin_inset space ~
7695 \end_inset
7696
7697 Settings.
7698 \end_layout
7699
7700 \begin_layout Standard
7701 There is only one special thing: the figures with caption besides the figure.
7702  To create such a figure, you have to do the following:
7703 \end_layout
7704
7705 \begin_layout Enumerate
7706 Create a wide figure float: 
7707 \family sans
7708 Insert\SpecialChar \menuseparator
7709 Float\SpecialChar \menuseparator
7710 Figure
7711 \family default
7712 , then right click in the figure and select 
7713 \family sans
7714 \bar under
7715 S
7716 \bar default
7717 pan
7718 \begin_inset space ~
7719 \end_inset
7720
7721 columns
7722 \family default
7723 .
7724 \end_layout
7725
7726 \begin_layout Enumerate
7727 Enter your caption text.
7728 \end_layout
7729
7730 \begin_layout Enumerate
7731 Press 
7732 \family sans
7733 Return
7734 \family default
7735  to move the cursor above the caption.
7736 \end_layout
7737
7738 \begin_layout Enumerate
7739 Insert your figure
7740 \end_layout
7741
7742 \begin_layout Enumerate
7743 Position the cursor behind the figure and insert a horizontal fill: 
7744 \family sans
7745 Insert\SpecialChar \menuseparator
7746 Special
7747 \begin_inset space ~
7748 \end_inset
7749
7750 Character\SpecialChar \menuseparator
7751 Horizontal
7752 \begin_inset space ~
7753 \end_inset
7754
7755 Fill
7756 \family default
7757 .
7758 \end_layout
7759
7760 \begin_layout Enumerate
7761 Switch to LaTeX mode: 
7762 \family sans
7763 M-c
7764 \begin_inset space ~
7765 \end_inset
7766
7767 t
7768 \family default
7769 .
7770 \end_layout
7771
7772 \begin_layout Enumerate
7773 Enter 
7774 \family typewriter
7775
7776 \backslash
7777 parbox[b]{55mm}{
7778 \family default
7779 .
7780  
7781 \series bold
7782 Do not close the brace!
7783 \end_layout
7784
7785 \begin_layout Enumerate
7786 Position the cursor behind the caption text, switch to LaTeX mode and insert
7787  the closing brace: 
7788 \family sans
7789 M-c
7790 \begin_inset space ~
7791 \end_inset
7792
7793 t
7794 \family default
7795  
7796 \family typewriter
7797 }
7798 \family default
7799 .
7800 \end_layout
7801
7802 \begin_layout Standard
7803 Also, refer to the figures in the example paper.
7804 \end_layout
7805
7806 \begin_layout Subsection
7807 Referee layout
7808 \end_layout
7809
7810 \begin_layout Standard
7811 For submission, the paper has to be formated in a special double-spacing
7812  layout.
7813  For this purpose, you have to give the option 
7814 \family typewriter
7815 referee
7816 \family default
7817  to the documentclass.
7818  This must be done using the extra class options field in the 
7819 \family sans
7820 Document\SpecialChar \menuseparator
7821 Settings
7822 \family default
7823  dialog.
7824  Just enter the string 
7825 \family typewriter
7826 referee
7827 \family default
7828  there.
7829 \end_layout
7830
7831 \begin_layout Subsection
7832 The example paper
7833 \end_layout
7834
7835 \begin_layout Standard
7836 The 
7837 \family sans
7838 Examples
7839 \family default
7840  directory contains an example paper written with LyX.
7841  It is the example paper from the original macro package, translated to
7842  LyX.
7843  Use it for inspiration, and compare the original LaTeX code with LyX way
7844  of writing.
7845 \end_layout
7846
7847 \begin_layout Section
7848 AASTeX
7849 \end_layout
7850
7851 \begin_layout Standard
7852 by 
7853 \noun on
7854 Mike Ressler
7855 \end_layout
7856
7857 \begin_layout Subsection
7858 Introduction
7859 \end_layout
7860
7861 \begin_layout Standard
7862 AASTeX is a set of macros produced by the American Astronomical Society
7863  to facilitate electronic manuscript submission to the three journals they
7864  publish: the Astrophysical Journal (including the Letters and Supplement),
7865  the Astronomical Journal, and the Publications of the Astronomical Society
7866  of the Pacific.
7867  LyX has proven to be an excellent tool for generating these documents,
7868  especially given its equation, citation, and figure handling capabilities.
7869  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7870  is the version described here, or higher.
7871  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7872  incompatible with LyX.
7873  The AASTeX package may be downloaded from the AASTeX Web site
7874 \end_layout
7875
7876 \begin_layout Standard
7877 \begin_inset VSpace medskip
7878 \end_inset
7879
7880
7881 \end_layout
7882
7883 \begin_layout Standard
7884 \align center
7885 \begin_inset Flex URL
7886 status collapsed
7887
7888 \begin_layout Plain Layout
7889
7890 http://www.journals.uchicago.edu/AAS/AASTeX
7891 \end_layout
7892
7893 \end_inset
7894
7895
7896 \end_layout
7897
7898 \begin_layout Standard
7899 \begin_inset VSpace medskip
7900 \end_inset
7901
7902
7903 \end_layout
7904
7905 \begin_layout Standard
7906 A complete user guide is contained in that package and you should familiarize
7907  yourself with it thoroughly before embarking on writing a paper in LyX.
7908  LyX will not reduce the need to figure out all the AASTeX commands, it
7909  will only reduce the drudgery of typing everything in.
7910  It is your responsibility to ensure that the final exported LaTeX document
7911  conforms completely to the requirements of the journal to which you are
7912  submitting your paper.
7913 \end_layout
7914
7915 \begin_layout Subsection
7916 Starting a New Paper
7917 \end_layout
7918
7919 \begin_layout Standard
7920 I strongly suggest that you start with the AASTeX template file.
7921  Click on 
7922 \family sans
7923 File\SpecialChar \menuseparator
7924 New from
7925 \family default
7926  
7927 \family sans
7928 Template
7929 \family default
7930 , enter the new file name, then choose the 
7931 \family typewriter
7932 aastex.lyx
7933 \family default
7934  template.
7935  This will show the most common fields found in a manuscript.
7936  Simply overwrite the existing text (including the brackets, 
7937 \family typewriter
7938 <>
7939 \family default
7940 ) with the correct information.
7941  Many of the AASTeX commands and environments can be implemented directly
7942  in LyX, but some cannot: most noticeably 
7943 \family typewriter
7944
7945 \backslash
7946 altaffilmark
7947 \family default
7948  and 
7949 \family typewriter
7950
7951 \backslash
7952 altaffiltext
7953 \family default
7954 , which should stick out like a sore thumb if you actually just opened the
7955  template file.
7956  For commands such as these, the LaTeX code must be entered directly and
7957  marked as such.
7958  Such commands are referred to as TeX code, or Evil Red Text.
7959  I tried to minimize the amount of TeX code needed in an AASTeX document,
7960  but there is still a bit more required than any of us would like.
7961 \end_layout
7962
7963 \begin_layout Subsection
7964 Finishing Your Paper
7965 \end_layout
7966
7967 \begin_layout Standard
7968 When the paper is finished to your satisfaction and previews/prints correctly,
7969  there are a few 
7970 \begin_inset Quotes eld
7971 \end_inset
7972
7973 postprocessing
7974 \begin_inset Quotes erd
7975 \end_inset
7976
7977  actions which need to be done before you submit it to the journals.
7978  
7979 \end_layout
7980
7981 \begin_layout Enumerate
7982 Export your paper as a LaTeX file (
7983 \family sans
7984 File\SpecialChar \menuseparator
7985 Export\SpecialChar \menuseparator
7986 LaTeX
7987 \family default
7988 ).
7989  
7990 \end_layout
7991
7992 \begin_layout Enumerate
7993 Edit the resulting 
7994 \family typewriter
7995 .tex
7996 \family default
7997  file with your favorite text editor
7998 \end_layout
7999
8000 \begin_deeper
8001 \begin_layout Enumerate
8002 remove the comment lines before the 
8003 \family typewriter
8004
8005 \backslash
8006 documentclass
8007 \family default
8008  command
8009 \end_layout
8010
8011 \begin_layout Enumerate
8012 remove the 
8013 \family typewriter
8014
8015 \backslash
8016 usepackage...{fontenc}
8017 \family default
8018  line if it appears (usually just after 
8019 \family typewriter
8020
8021 \backslash
8022 documentclass
8023 \family default
8024 }; also remove the 
8025 \family typewriter
8026
8027 \backslash
8028 secnumdepth
8029 \family default
8030  line if it appears.
8031 \end_layout
8032
8033 \begin_layout Enumerate
8034 remove everything between (and including) the 
8035 \family typewriter
8036
8037 \backslash
8038 makeatletter
8039 \family default
8040  and 
8041 \family typewriter
8042
8043 \backslash
8044 makeatother
8045 \family default
8046  commands, except for any commands you specifically put into the LaTeX preamble
8047  (which should appear immediately after the 
8048 \begin_inset Quotes eld
8049 \end_inset
8050
8051 User specified LaTeX commands
8052 \begin_inset Quotes erd
8053 \end_inset
8054
8055  comment in the 
8056 \family typewriter
8057 .tex
8058 \family default
8059  file).
8060 \end_layout
8061
8062 \end_deeper
8063 \begin_layout Enumerate
8064 Run the resulting file through LaTeX to make sure it still processes correctly.
8065 \end_layout
8066
8067 \begin_layout Enumerate
8068 Reread the journal requirements to make sure your filenames and formats
8069  are correct.
8070 \end_layout
8071
8072 \begin_layout Enumerate
8073 Submit it.
8074 \end_layout
8075
8076 \begin_layout Subsection
8077 Comments On Specific Commands
8078 \end_layout
8079
8080 \begin_layout Standard
8081 I will not describe the detailed usage of the individual AASTeX commands:
8082  the AASTeX User Guide (
8083 \family typewriter
8084 aasguide.tex
8085 \family default
8086 ) gives a good description of each.
8087  Thus it's probably easiest for me to go down the list as found in the guide
8088  and offer comments where necessary.
8089  So let's begin \SpecialChar \ldots{}
8090
8091 \end_layout
8092
8093 \begin_layout Subsubsection
8094 Things that work as expected
8095 \end_layout
8096
8097 \begin_layout Standard
8098 \begin_inset ERT
8099 status open
8100
8101 \begin_layout Plain Layout
8102
8103
8104 \backslash
8105 begin{sloppypar}
8106 \end_layout
8107
8108 \end_inset
8109
8110
8111 \end_layout
8112
8113 \begin_layout Standard
8114 Because they work as you might expect, I simply list them and the section
8115  they are found in: 
8116 \family typewriter
8117
8118 \backslash
8119 documentclass
8120 \family default
8121  (2.1.1), 
8122 \family typewriter
8123
8124 \backslash
8125 begin{document}
8126 \family default
8127  (2.2), 
8128 \family typewriter
8129
8130 \backslash
8131 title
8132 \family default
8133  (2.3), 
8134 \family typewriter
8135
8136 \backslash
8137 author
8138 \family default
8139  (2.3), 
8140 \family typewriter
8141
8142 \backslash
8143 affil
8144 \family default
8145  (2.3), 
8146 \family typewriter
8147
8148 \backslash
8149 abstract
8150 \family default
8151  (2.4), 
8152 \family typewriter
8153
8154 \backslash
8155 keywords
8156 \family default
8157  (2.5), 
8158 \family typewriter
8159
8160 \backslash
8161 section
8162 \family default
8163  (2.7), 
8164 \family typewriter
8165
8166 \backslash
8167 subsection
8168 \family default
8169  (2.7), 
8170 \family typewriter
8171
8172 \backslash
8173 subsubsection
8174 \family default
8175  (2.7), 
8176 \family typewriter
8177
8178 \backslash
8179 paragraph
8180 \family default
8181  (2.7), 
8182 \family typewriter
8183
8184 \backslash
8185 facility
8186 \family default
8187  (2.10), 
8188 \family typewriter
8189
8190 \backslash
8191 begin{displaymath}
8192 \family default
8193  (2.12), 
8194 \family typewriter
8195
8196 \backslash
8197 begin{equation}
8198 \family default
8199  (2.12), 
8200 \family typewriter
8201
8202 \backslash
8203 begin{eqnarray}
8204 \family default
8205  (2.12), 
8206 \family typewriter
8207
8208 \backslash
8209 begin{mathletters}
8210 \family default
8211  (2.12), 
8212 \family typewriter
8213
8214 \backslash
8215 begin{thebibliography}
8216 \family default
8217  (2.13.1), 
8218 \family typewriter
8219
8220 \backslash
8221 bibitem
8222 \family default
8223  (2.13.2), all the cite commands and their variations (2.13.2), the generic
8224  graphicx figure commands (2.14.1), 
8225 \family typewriter
8226
8227 \backslash
8228 begin{table}
8229 \family default
8230  (2.15.4), 
8231 \family typewriter
8232
8233 \backslash
8234 begin{tabular}
8235 \family default
8236  (2.15.4), 
8237 \family typewriter
8238
8239 \backslash
8240 caption
8241 \family default
8242  (2.15.4), 
8243 \family typewriter
8244
8245 \backslash
8246 label
8247 \family default
8248  (2.15.4, amongst other places), 
8249 \family typewriter
8250
8251 \backslash
8252 tablerefs
8253 \family default
8254  (2.15.5), 
8255 \family typewriter
8256
8257 \backslash
8258 tablecomments
8259 \family default
8260  (2.15.5), 
8261 \family typewriter
8262
8263 \backslash
8264 url
8265 \family default
8266  (2.17.4), 
8267 \family typewriter
8268
8269 \backslash
8270 end{document}
8271 \family default
8272  (2.18).
8273 \end_layout
8274
8275 \begin_layout Standard
8276 The following style options also work correctly: 
8277 \family typewriter
8278 longabstract
8279 \family default
8280  (2.4), 
8281 \family typewriter
8282 preprint
8283 \family default
8284  (3.2.1), 
8285 \family typewriter
8286 preprint2
8287 \family default
8288  (3.2.2), 
8289 \family typewriter
8290 eqsecnum
8291 \family default
8292  (3.3), 
8293 \family typewriter
8294 flushrt
8295 \family default
8296  (3.4).
8297  Simply put them in the 
8298 \family sans
8299 Options
8300 \family default
8301  box in 
8302 \family sans
8303 Layout\SpecialChar \menuseparator
8304 Document
8305 \family default
8306 .
8307 \end_layout
8308
8309 \begin_layout Standard
8310 \begin_inset ERT
8311 status open
8312
8313 \begin_layout Plain Layout
8314
8315
8316 \backslash
8317 end{sloppypar}
8318 \end_layout
8319
8320 \end_inset
8321
8322
8323 \end_layout
8324
8325 \begin_layout Subsubsection
8326 Things that work, but require more comment
8327 \end_layout
8328
8329 \begin_layout Standard
8330 The following items work, but require a little more discussion:
8331 \end_layout
8332
8333 \begin_layout Itemize
8334 These items are reserved for use by the journal editors, but you can put
8335  them into the LaTeX preamble if you feel compelled to do so: 
8336 \family typewriter
8337
8338 \backslash
8339 received
8340 \family default
8341
8342 \family typewriter
8343
8344 \backslash
8345 revised
8346 \family default
8347
8348 \family typewriter
8349
8350 \backslash
8351 accepted
8352 \family default
8353
8354 \family typewriter
8355
8356 \backslash
8357 ccc
8358 \family default
8359
8360 \family typewriter
8361
8362 \backslash
8363 cpright
8364 \family default
8365  (all from 2.1.3)
8366 \end_layout
8367
8368 \begin_layout Itemize
8369 These items may be placed in the LaTeX preamble, and are included as blanks
8370  in the template file: 
8371 \family typewriter
8372
8373 \backslash
8374 slugcomment
8375 \family default
8376  (2.1.4), 
8377 \family typewriter
8378
8379 \backslash
8380 shorttitle
8381 \family default
8382  (2.1.5), 
8383 \family typewriter
8384
8385 \backslash
8386 shortauthors
8387 \family default
8388  (2.1.5)
8389 \end_layout
8390
8391 \begin_layout Itemize
8392
8393 \family typewriter
8394
8395 \backslash
8396 email
8397 \family default
8398  (2.3) – can only be used 
8399 \begin_inset Quotes eld
8400 \end_inset
8401
8402 standalone
8403 \begin_inset Quotes erd
8404 \end_inset
8405
8406 , not in the middle of a paragraph.
8407  Use TeX code if you need to embed it.
8408 \end_layout
8409
8410 \begin_layout Itemize
8411
8412 \family typewriter
8413
8414 \backslash
8415 and
8416 \family default
8417  (2.3) – will have extra {} after it.
8418  This should not cause an error.
8419 \end_layout
8420
8421 \begin_layout Itemize
8422
8423 \family typewriter
8424
8425 \backslash
8426 notetoeditor
8427 \family default
8428  (2.6) – can only be used 
8429 \begin_inset Quotes eld
8430 \end_inset
8431
8432 standalone
8433 \begin_inset Quotes erd
8434 \end_inset
8435
8436 , not in the middle of a paragraph.
8437  Use TeX code if you need to embed it.
8438 \end_layout
8439
8440 \begin_layout Itemize
8441
8442 \family typewriter
8443
8444 \backslash
8445 placetable
8446 \family default
8447  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8448  hand
8449 \end_layout
8450
8451 \begin_layout Itemize
8452
8453 \family typewriter
8454
8455 \backslash
8456 placefigure
8457 \family default
8458  (2.8) – same as for 
8459 \family typewriter
8460
8461 \backslash
8462 placetable
8463 \end_layout
8464
8465 \begin_layout Itemize
8466
8467 \family typewriter
8468
8469 \backslash
8470 acknowledgements
8471 \family default
8472  (2.9) – will have extra {} after it.
8473  This should not cause an error.
8474 \end_layout
8475
8476 \begin_layout Itemize
8477
8478 \family typewriter
8479
8480 \backslash
8481 appendix
8482 \family default
8483  (2.11) – will have extra {} after it.
8484  This should not cause an error.
8485 \end_layout
8486
8487 \begin_layout Itemize
8488
8489 \family typewriter
8490
8491 \backslash
8492 figcaption
8493 \family default
8494  (2.14.2) – you can insert an optional filename argument by placing the cursor
8495  at the beginning of the text and selecting 
8496 \family sans
8497 Insert\SpecialChar \menuseparator
8498 Short Title
8499 \family default
8500 .
8501  
8502 \begin_inset Quotes eld
8503 \end_inset
8504
8505 Short Title
8506 \begin_inset Quotes erd
8507 \end_inset
8508
8509  inserts an optional argument of the type needed by 
8510 \family typewriter
8511
8512 \backslash
8513 figcaption
8514 \family default
8515 .
8516  Hopefully it will be renamed someday.
8517 \end_layout
8518
8519 \begin_layout Itemize
8520
8521 \family typewriter
8522
8523 \backslash
8524 objectname
8525 \family default
8526  (2.17.1) – same as 
8527 \family typewriter
8528
8529 \backslash
8530 figcaption
8531 \family default
8532  for the catalog ID optional parameter
8533 \end_layout
8534
8535 \begin_layout Itemize
8536
8537 \family typewriter
8538
8539 \backslash
8540 dataset
8541 \family default
8542  (2.17.1) – same as 
8543 \family typewriter
8544
8545 \backslash
8546 figcaption
8547 \family default
8548  for the catalog ID optional parameter
8549 \end_layout
8550
8551 \begin_layout Subsubsection
8552 Things not implemented, use TeX code
8553 \end_layout
8554
8555 \begin_layout Standard
8556 \begin_inset ERT
8557 status open
8558
8559 \begin_layout Plain Layout
8560
8561
8562 \backslash
8563 begin{sloppypar}
8564 \end_layout
8565
8566 \end_inset
8567
8568
8569 \end_layout
8570
8571 \begin_layout Standard
8572
8573 \family typewriter
8574
8575 \backslash
8576 altaffilmark
8577 \family default
8578  (2.3), 
8579 \family typewriter
8580
8581 \backslash
8582 altaffiltext
8583 \family default
8584  (2.3), 
8585 \family typewriter
8586
8587 \backslash
8588 eqnum
8589 \family default
8590  (2.12), 
8591 \family typewriter
8592
8593 \backslash
8594 setcounter{equation}
8595 \family default
8596  (2.12), Journal name abbreviations (2.13.4), 
8597 \family typewriter
8598
8599 \backslash
8600 figurenum
8601 \family default
8602  (2.14.1), 
8603 \family typewriter
8604
8605 \backslash
8606 epsscale
8607 \family default
8608  (2.14.1), 
8609 \family typewriter
8610
8611 \backslash
8612 plotone
8613 \family default
8614  (2.14.1), 
8615 \family typewriter
8616
8617 \backslash
8618 plottwo
8619 \family default
8620  (2.14.1), 
8621 \family typewriter
8622
8623 \backslash
8624 tablenum
8625 \family default
8626  (2.15.4), 
8627 \family typewriter
8628
8629 \backslash
8630 tableline
8631 \family default
8632  (2.15.4, insert it as the first element in the lefthand cell after where
8633  you want it.
8634  Don't use any of LyX's rules in the table), 
8635 \family typewriter
8636
8637 \backslash
8638 tablenotemark
8639 \family default
8640  (2.15.5), 
8641 \family typewriter
8642
8643 \backslash
8644 tablenotetext
8645 \family default
8646  (2.15.5), much of Misc (2.17, except 
8647 \family typewriter
8648
8649 \backslash
8650 objectname
8651 \family default
8652
8653 \family typewriter
8654
8655 \backslash
8656 dataset
8657 \family default
8658
8659 \family typewriter
8660
8661 \backslash
8662 url
8663 \family default
8664 , and 
8665 \family typewriter
8666
8667 \backslash
8668 email
8669 \family default
8670 ; see above), 
8671 \family typewriter
8672
8673 \backslash
8674 singlespace
8675 \family default
8676  (3.1), 
8677 \family typewriter
8678
8679 \backslash
8680 doublespace
8681 \family default
8682  (3.1), 
8683 \family typewriter
8684
8685 \backslash
8686 onecolumn
8687 \family default
8688  (3.2), 
8689 \family typewriter
8690
8691 \backslash
8692 twocolumn
8693 \family default
8694  (3.2)
8695 \end_layout
8696
8697 \begin_layout Standard
8698 \begin_inset ERT
8699 status open
8700
8701 \begin_layout Plain Layout
8702
8703
8704 \backslash
8705 end{sloppypar}
8706 \end_layout
8707
8708 \end_inset
8709
8710
8711 \end_layout
8712
8713 \begin_layout Subsubsection
8714 Things that cannot be implemented
8715 \end_layout
8716
8717 \begin_layout Standard
8718 \SpecialChar \ldots{}
8719  at least in any meaningful sort of way, so I suggest ignoring them.
8720  They are the references environment (2.13.3), and the deluxetable environment
8721  (2.15).
8722  If you really, really need to use deluxetable, I suggest editing it in
8723  a separate file with a text editor, then using 
8724 \family sans
8725 Insert\SpecialChar \menuseparator
8726 Child
8727 \begin_inset space ~
8728 \end_inset
8729
8730 Document
8731 \family default
8732  to include it in your LyX document.
8733  See the 
8734 \family typewriter
8735 aas_sample.lyx
8736 \family default
8737  file to see an example of this.
8738 \end_layout
8739
8740 \begin_layout Subsection
8741 FAQs, Tips, Tricks, and Other Ruminations
8742 \end_layout
8743
8744 \begin_layout Subsubsection
8745 Getting LyX and AASTeX to cooperate
8746 \end_layout
8747
8748 \begin_layout Standard
8749 It can be a bit tricky to get LyX to recognize a new layout and document
8750  class.
8751  When all else fails, do this:
8752 \end_layout
8753
8754 \begin_layout Enumerate
8755 Make certain that LaTeX can find AASTeX.
8756  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8757  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8758 \family typewriter
8759 sample.tex
8760 \family default
8761 .
8762 \end_layout
8763
8764 \begin_layout Enumerate
8765 Make certain that 
8766 \family typewriter
8767 aastex.layout
8768 \family default
8769  appears in LyX's 
8770 \family typewriter
8771 layouts
8772 \family default
8773  folder
8774 \end_layout
8775
8776 \begin_layout Enumerate
8777 Rerun 
8778 \family sans
8779 Tools\SpecialChar \menuseparator
8780 Reconfigure
8781 \family default
8782  in LyX, then restart LyX.
8783 \end_layout
8784
8785 \begin_layout Enumerate
8786 Open a regular new file, not from a template.
8787  Does AASTeX appear in the class list in 
8788 \family sans
8789 Document\SpecialChar \menuseparator
8790 Settings
8791 \family default
8792 ?
8793 \end_layout
8794
8795 \begin_layout Standard
8796 If you get a warning from an existing AASTeX document about not being able
8797  to find the AASTeX layout or a message about 
8798 \begin_inset Quotes eld
8799 \end_inset
8800
8801 You should not mix title layouts with normal ones
8802 \begin_inset Quotes erd
8803 \end_inset
8804
8805 , things haven't been installed correctly.
8806 \end_layout
8807
8808 \begin_layout Subsubsection
8809 LaTeX error processing a table 
8810 \end_layout
8811
8812 \begin_layout Standard
8813 LyX, by default, attempts to center the table caption/title.
8814  This seems to produce a bad interaction in AASTeX so you should click somewhere
8815  in the caption/title, then select 
8816 \family sans
8817 Edit\SpecialChar \menuseparator
8818 Paragraph
8819 \begin_inset space ~
8820 \end_inset
8821
8822 Settings
8823 \family default
8824 , then set the 
8825 \family sans
8826 Alignment
8827 \family default
8828  to 
8829 \family sans
8830 Block
8831 \family default
8832 .
8833  This took care of it for me.
8834 \end_layout
8835
8836 \begin_layout Subsubsection
8837 References
8838 \end_layout
8839
8840 \begin_layout Standard
8841 A couple of things: 1) I have noticed some funny spacing in the reference
8842  entries in the text.
8843  When you enter the bibliography item data, make sure their is 
8844 \emph on
8845 no
8846 \emph default
8847  space between the last author and the parenthesis setting off the year;
8848  
8849 \emph on
8850 e.
8851 \begin_inset space \thinspace{}
8852 \end_inset
8853
8854 g.
8855 \begin_inset space \space{}
8856 \end_inset
8857
8858
8859 \emph default
8860 type 
8861 \family typewriter
8862 Ressler(1992)
8863 \family default
8864 , not 
8865 \family typewriter
8866 Ressler (1992)
8867 \family default
8868 .
8869  2) Entering the references at all is not obvious.
8870  The easiest thing is to start typing your first reference at the end of
8871  the document, then mark it as type 
8872 \family sans
8873 References
8874 \family default
8875 .
8876  That will put a small gray box in front of what you just typed.
8877  Click on the box to fill in the rest of the information.
8878  For new references, go to the end of an existing reference and press return.
8879  That will create a new line with its own box, etc.
8880 \end_layout
8881
8882 \begin_layout Subsubsection
8883 Including EPS files
8884 \end_layout
8885
8886 \begin_layout Standard
8887 Even though AASTeX provides its own figure commands (
8888 \family typewriter
8889
8890 \backslash
8891 plotone
8892 \family default
8893 , for example), I much prefer LaTeX's standard figure commands (with the
8894  default graphicx).
8895  You can insert the 
8896 \family typewriter
8897
8898 \backslash
8899 plotone
8900 \family default
8901 , etc.
8902 \begin_inset space ~
8903 \end_inset
8904
8905 commands as TeX code into a Figure Float box if you desire, but I never
8906  have much luck getting the layout right.
8907  With the standard graphics, LyX will insert a 
8908 \family typewriter
8909
8910 \backslash
8911 usepackage{graphicx}
8912 \family default
8913  command into the LaTeX preamble and handle the figures in the standard
8914  LaTeX2e way, interspersing the figures in the text.
8915  I believe ApJ accepts figures exactly this way now; AJ might still use
8916  the 
8917 \begin_inset Quotes eld
8918 \end_inset
8919
8920 stack everything at the end
8921 \begin_inset Quotes erd
8922 \end_inset
8923
8924  technique.
8925 \end_layout
8926
8927 \begin_layout Subsubsection
8928 Things I could have done, but didn't
8929 \end_layout
8930
8931 \begin_layout Standard
8932 There are a few 
8933 \begin_inset Quotes eld
8934 \end_inset
8935
8936 pretty
8937 \begin_inset Quotes erd
8938 \end_inset
8939
8940  things I could have implemented, but chose not to.
8941  For instance, I saw no point in double-spacing the text in the LyX window,
8942  even though it is double-spaced in the paper manuscript.
8943  Also, I chose not to make separate layouts for the preprint and preprint2
8944  styles.
8945  Since I assume you will spend most of your time in the plain manuscript
8946  mode anyway, I decided not to chew up more disk space with this.
8947  
8948 \end_layout
8949
8950 \begin_layout Subsection
8951 Final Caveat
8952 \end_layout
8953
8954 \begin_layout Standard
8955 Your mileage may vary.
8956  I've now had papers published by both ApJ and AJ that have had 98% of the
8957  effort done in LyX; the last 2% was the LaTeX post-processing and a few
8958  cleanups.
8959  I have had no trouble with the submission process, and I'm sure the journals
8960  were never aware that there might be a difference.
8961  So, go forth and publish!
8962 \end_layout
8963
8964 \begin_layout Section
8965 AMS LaTeX
8966 \end_layout
8967
8968 \begin_layout Standard
8969 by 
8970 \noun on
8971 David Johnson; updated by Richard Heck
8972 \end_layout
8973
8974 \begin_layout Standard
8975 \begin_inset VSpace bigskip
8976 \end_inset
8977
8978
8979 \end_layout
8980
8981 \begin_layout Standard
8982 \noindent
8983 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8984  papers to be submitted to American Mathematical Society publications.
8985  The layouts are not tailored to a specific journal, but easily can be.
8986  You should refer to the AMS documentation for specific instructions for
8987  each journal (usually it will entail only changing a single line in the
8988  TeX output).
8989  That documentation is available on the Web at 
8990 \begin_inset Flex URL
8991 status open
8992
8993 \begin_layout Plain Layout
8994
8995 http://www.ams.org
8996 \end_layout
8997
8998 \end_inset
8999
9000  or by ftp at 
9001 \begin_inset Flex URL
9002 status open
9003
9004 \begin_layout Plain Layout
9005
9006 ftp://ftp.ams.org/pub/tex/amslatex/
9007 \end_layout
9008
9009 \end_inset
9010
9011 .
9012  These layouts are appropriate, and useful, for any mathematical writing.
9013  
9014 \end_layout
9015
9016 \begin_layout Standard
9017 There are two basic AMS LaTeX layouts: 
9018 \end_layout
9019
9020 \begin_layout Itemize
9021 amsart: The standard AMS article format.
9022 \end_layout
9023
9024 \begin_layout Itemize
9025 amsbook: the standard AMS book (really, monograph) format.
9026  
9027 \end_layout
9028
9029 \begin_layout Standard
9030 The layouts themselves contain only the minimum necessary to use the AMS
9031  classes.
9032  They do not, in particular, contain any of the `theorem' environments used
9033  for setting theorems, lemmas, and the like.
9034  These are contained, instead, in the 
9035 \begin_inset Flex Code
9036 status collapsed
9037
9038 \begin_layout Plain Layout
9039 Theorems (AMS)
9040 \end_layout
9041
9042 \end_inset
9043
9044  module, which is loaded by default when when you select one of the AMS
9045  classes.
9046  (It can also be used with other classes and can be removed, if you would
9047  rather use something else.) Less commonly used environments are in the 
9048 \begin_inset Flex Code
9049 status collapsed
9050
9051 \begin_layout Plain Layout
9052 Theorems (AMS-Extended)
9053 \end_layout
9054
9055 \end_inset
9056
9057  module, which must be loaded manually.
9058 \end_layout
9059
9060 \begin_layout Standard
9061 By default, theorems and the like are numbered consecutively throughout
9062  the document, but this may be modified by loading the module 
9063 \begin_inset Flex Code
9064 status collapsed
9065
9066 \begin_layout Plain Layout
9067 Theorems (Order by Section)
9068 \end_layout
9069
9070 \end_inset
9071
9072  or, if you are using 
9073 \begin_inset Flex Code
9074 status collapsed
9075
9076 \begin_layout Plain Layout
9077 book (AMS)
9078 \end_layout
9079
9080 \end_inset
9081
9082 , the module 
9083 \begin_inset Flex Code
9084 status collapsed
9085
9086 \begin_layout Plain Layout
9087 Theorems (Order by Chapter)
9088 \end_layout
9089
9090 \end_inset
9091
9092 .
9093  These will number the results as 
9094 \begin_inset Formula $n.m$
9095 \end_inset
9096
9097 , where the first number refers to the section (or chapter) and the second
9098  refers to the total number of results so far in that section (or chapter).
9099  Many environments are also available unnumbered.
9100  These are indicated by an asterisk at the end.
9101  If you happen to want 
9102 \emph on
9103 only
9104 \emph default
9105  unnumbered results, the module 
9106 \begin_inset Flex Code
9107 status collapsed
9108
9109 \begin_layout Plain Layout
9110 Theorems (Starred)
9111 \end_layout
9112
9113 \end_inset
9114
9115  provides that option.
9116 \end_layout
9117
9118 \begin_layout Standard
9119 Note that these modules do not 
9120 \emph on
9121 have
9122 \emph default
9123  to be used with the AMS classes.
9124  It is perfectly possible to use the 
9125 \begin_inset Flex Code
9126 status collapsed
9127
9128 \begin_layout Plain Layout
9129 Theorems (AMS)
9130 \end_layout
9131
9132 \end_inset
9133
9134  module, and the others mentioned, with other classes, such as 
9135 \begin_inset Flex Code
9136 status collapsed
9137
9138 \begin_layout Plain Layout
9139 article
9140 \end_layout
9141
9142 \end_inset
9143
9144
9145 \begin_inset Flex Code
9146 status collapsed
9147
9148 \begin_layout Plain Layout
9149 report
9150 \end_layout
9151
9152 \end_inset
9153
9154
9155 \begin_inset Flex Code
9156 status collapsed
9157
9158 \begin_layout Plain Layout
9159 book (KOMA-script)
9160 \end_layout
9161
9162 \end_inset
9163
9164 , and so forth.
9165 \end_layout
9166
9167 \begin_layout Subsection
9168 What these layouts provide
9169 \end_layout
9170
9171 \begin_layout Standard
9172 There is a long list of included environments provided by these layouts.
9173  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9174  variety of `theorem' environments.
9175  However, the AMS recommends the environments that are available in LyX.
9176  
9177 \end_layout
9178
9179 \begin_layout Standard
9180 The following environments—as well as the standard environments, such as
9181  
9182 \begin_inset Flex Noun
9183 status collapsed
9184
9185 \begin_layout Plain Layout
9186 section
9187 \end_layout
9188
9189 \end_inset
9190
9191
9192 \begin_inset Flex Noun
9193 status collapsed
9194
9195 \begin_layout Plain Layout
9196 bibliography
9197 \end_layout
9198
9199 \end_inset
9200
9201
9202 \begin_inset Flex Noun
9203 status collapsed
9204
9205 \begin_layout Plain Layout
9206 title
9207 \end_layout
9208
9209 \end_inset
9210
9211
9212 \begin_inset Flex Noun
9213 status collapsed
9214
9215 \begin_layout Plain Layout
9216 author
9217 \end_layout
9218
9219 \end_inset
9220
9221 , and 
9222 \begin_inset Flex Noun
9223 status collapsed
9224
9225 \begin_layout Plain Layout
9226 date
9227 \end_layout
9228
9229 \end_inset
9230
9231 —are provided by 
9232 \begin_inset Flex Code
9233 status collapsed
9234
9235 \begin_layout Plain Layout
9236 article (AMS)
9237 \end_layout
9238
9239 \end_inset
9240
9241  and 
9242 \begin_inset Flex Code
9243 status collapsed
9244
9245 \begin_layout Plain Layout
9246 book (AMS)
9247 \end_layout
9248
9249 \end_inset
9250
9251 :
9252 \end_layout
9253
9254 \begin_layout Description
9255 Address This should be the author's permanent address.
9256 \end_layout
9257
9258 \begin_layout Description
9259 Current
9260 \begin_inset space ~
9261 \end_inset
9262
9263 Address This should be the author's temporary address at the time of submission,
9264  if different from the Address.
9265 \end_layout
9266
9267 \begin_layout Description
9268 Email Author's e-mail address
9269 \end_layout
9270
9271 \begin_layout Description
9272 URL Author's Web address, if desired.
9273 \end_layout
9274
9275 \begin_layout Description
9276 Keywords Key words or phrases used to identify specific topics discussed
9277  in the paper.
9278 \end_layout
9279
9280 \begin_layout Description
9281 Subjectclass These refer to the AMS Subject Classifications, published and
9282  described in 
9283 \emph on
9284 Mathematical Reviews
9285 \emph default
9286 .
9287  These are also available online at the AMS cites listed above.
9288 \end_layout
9289
9290 \begin_layout Description
9291 Thanks
9292 \end_layout
9293
9294 \begin_layout Description
9295 Dedicatory
9296 \end_layout
9297
9298 \begin_layout Description
9299 Translator
9300 \end_layout
9301
9302 \begin_layout Standard
9303 The following environments are provided by both the 
9304 \begin_inset Flex Code
9305 status collapsed
9306
9307 \begin_layout Plain Layout
9308 Theorems
9309 \end_layout
9310
9311 \end_inset
9312
9313  and 
9314 \begin_inset Flex Code
9315 status collapsed
9316
9317 \begin_layout Plain Layout
9318 Theorems (AMS)
9319 \end_layout
9320
9321 \end_inset
9322
9323  modules, in the latter case in both starred (unnumbered) and unstarred
9324  (numbered) versions.
9325  These same environments are provided only in the starred versions by the
9326  
9327 \begin_inset Flex Code
9328 status collapsed
9329
9330 \begin_layout Plain Layout
9331 Theorems (Starred)
9332 \end_layout
9333
9334 \end_inset
9335
9336  module:
9337 \end_layout
9338
9339 \begin_layout Theorem
9340 This is typically used for the statements of major results.
9341  
9342 \end_layout
9343
9344 \begin_layout Corollary*
9345 This is used for statements which follow fairly directly from previous statement
9346 s.
9347  Again, these can be major results.
9348  
9349 \end_layout
9350
9351 \begin_layout Lemma
9352 These are smaller results needed to prove other statements.
9353 \end_layout
9354
9355 \begin_layout Proposition
9356 These are less major results which (hopefully) add to the general theory
9357  being discussed.
9358 \end_layout
9359
9360 \begin_layout Conjecture
9361 These are statements provided without justification, which the author does
9362  not know how to prove, but which seem to be true (to the author, at least).
9363 \end_layout
9364
9365 \begin_layout Definition*
9366 Guess what this is for.
9367  The font is different for this environment than for the previous ones.
9368  
9369 \end_layout
9370
9371 \begin_layout Example*
9372 Used for examples illustrating proven results.
9373 \end_layout
9374
9375 \begin_layout Problem
9376 It's not really known what this is for.
9377  You should figure it out.
9378 \end_layout
9379
9380 \begin_layout Exercise*
9381 Write a description for this one.
9382 \end_layout
9383
9384 \begin_layout Remark
9385 This environment is also a type of theorem, usually a lesser sort of observation.
9386 \end_layout
9387
9388 \begin_layout Claim*
9389 Often used in the course of giving a proof of a larger result.
9390 \end_layout
9391
9392 \begin_layout Case
9393 Generally, these are used to break up long arguments, using specific instances
9394  of some condition.
9395  
9396 \end_layout
9397
9398 \begin_layout Case
9399 The numbering scheme for cases is on its own, not together with other numbered
9400  statements.
9401  
9402 \end_layout
9403
9404 \begin_layout Proof
9405 At the end of this environment, a QED symbol (usually a square, but it can
9406  vary with different styles) is placed.
9407  If you want to have other environments within this one—for example, Case
9408  environments—and have the QED symbol appear only after them, then the other
9409  environments need to be nested within the proof environment.
9410  See the section 
9411 \emph on
9412 Nesting Environments
9413 \emph default
9414  of the 
9415 \emph on
9416 User's Guide
9417 \emph default
9418  for information on nesting.
9419 \end_layout
9420
9421 \begin_layout Standard
9422 And these environments are provided by 
9423 \begin_inset Flex Code
9424 status collapsed
9425
9426 \begin_layout Plain Layout
9427 Theorems (AMS-Extended)
9428 \end_layout
9429
9430 \end_inset
9431
9432 :
9433 \end_layout
9434
9435 \begin_layout Criterion*
9436 A required condition.
9437 \end_layout
9438
9439 \begin_layout Algorithm*
9440 A general procedure to be used.
9441 \end_layout
9442
9443 \begin_layout Axiom*
9444 This is a property or statement taken as true within the system being discussed.
9445 \end_layout
9446
9447 \begin_layout Condition*
9448 Sometimes used to state a condition assumed within the present context of
9449  discussion.
9450 \end_layout
9451
9452 \begin_layout Note*
9453 Similar to a Remark.
9454 \end_layout
9455
9456 \begin_layout Notation*
9457 Used for the explanation of, yes, notation.
9458 \end_layout
9459
9460 \begin_layout Summary
9461 Do we really need to tell you? 
9462 \end_layout
9463
9464 \begin_layout Acknowledgement*
9465 Acknowledgement.
9466 \end_layout
9467
9468 \begin_layout Conclusion*
9469 Sometimes used at the end of a long train of argument.
9470 \end_layout
9471
9472 \begin_layout Fact
9473 Used in a way similar to Proposition, though perhaps lower on the scale.
9474 \end_layout
9475
9476 \begin_layout Standard
9477 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9478  fonts packages.
9479  They need to be available on your system in order to use these environments.
9480 \end_layout
9481
9482 \begin_layout Section
9483 AGU journals (
9484 \family sans
9485 aguplus
9486 \family default
9487 )
9488 \end_layout
9489
9490 \begin_layout Standard
9491 by 
9492 \shape smallcaps
9493 Martin Vermeer
9494 \end_layout
9495
9496 \begin_layout Subsection
9497 Description
9498 \end_layout
9499
9500 \begin_layout Standard
9501 These are the layout files for some of the journals of the American Geophysical
9502  Society.
9503  It is assumed that you have both the AGU's own class files and AGUplus
9504  installed (everything to be found at
9505 \begin_inset Flex URL
9506 status collapsed
9507
9508 \begin_layout Plain Layout
9509
9510 ftp://ftp.agu.org/journals/latex/journals
9511 \end_layout
9512
9513 \end_inset
9514
9515 ).
9516 \end_layout
9517
9518 \begin_layout Subsection
9519 New styles
9520 \end_layout
9521
9522 \begin_layout Standard
9523 Redefined are 
9524 \family sans
9525 Paragraph
9526 \family default
9527
9528 \family sans
9529 Paragraph*
9530 \family default
9531 .
9532  They are still called this in the LyX GUI, though their LaTeX equivalents
9533  in the AGU classes are 
9534 \family sans
9535 Subsubsubsection
9536 \family default
9537  and 
9538 \family sans
9539 Subsubsubsection*
9540 \family default
9541 .
9542 \end_layout
9543
9544 \begin_layout Standard
9545 Newly defined styles are 
9546 \family sans
9547 Left_Header
9548 \family default
9549
9550 \family sans
9551 Right_Header
9552 \family default
9553
9554 \family sans
9555 Received
9556 \family default
9557
9558 \family sans
9559 Revised
9560 \family default
9561
9562 \family sans
9563 Accepted
9564 \family default
9565
9566 \family sans
9567 CCC
9568 \family default
9569
9570 \family sans
9571 PaperId
9572 \family default
9573
9574 \family sans
9575 AuthorAddr
9576 \family default
9577
9578 \family sans
9579 SlugComment
9580 \family default
9581 .
9582  These are mostly manuscript attributes and defined in the AGU class documentati
9583 on.
9584 \end_layout
9585
9586 \begin_layout Standard
9587 I suspect this is still badly incomplete.
9588 \end_layout
9589
9590 \begin_layout Subsection
9591 New floats
9592 \end_layout
9593
9594 \begin_layout Standard
9595
9596 \family sans
9597 Planotable
9598 \family default
9599  and 
9600 \family sans
9601 Plate
9602 \family default
9603 .
9604  We also have a new 
9605 \family sans
9606 Table_Caption
9607 \family default
9608 .
9609 \end_layout
9610
9611 \begin_layout Subsection
9612 Supported journals
9613 \end_layout
9614
9615 \begin_layout Itemize
9616
9617 \emph on
9618 Journal of Geophysical Research
9619 \emph default
9620
9621 \family typewriter
9622 jgrga.layout
9623 \family default
9624  — Martin Vermeer
9625 \end_layout
9626
9627 \begin_layout Standard
9628 Add your own, it isn't so hard! Look at the 
9629 \family typewriter
9630 jgrga.layout
9631 \family default
9632  example and 
9633 \family typewriter
9634 aguplus.inc
9635 \family default
9636 .
9637 \end_layout
9638
9639 \begin_layout Subsection
9640 Bugs and things to remember
9641 \end_layout
9642
9643 \begin_layout Standard
9644 In order to use the new layouts, you must remember to do the following for
9645  a new document:
9646 \end_layout
9647
9648 \begin_layout Enumerate
9649
9650 \emph on
9651 Turn off babel
9652 \emph default
9653 .
9654  This can be done in the 
9655 \family sans
9656 Layout\SpecialChar \menuseparator
9657 Document
9658 \family default
9659  or 
9660 \family sans
9661 Document\SpecialChar \menuseparator
9662 Settings
9663 \family default
9664  menu item.
9665  (AGU articles are always in English, right? So 
9666 \emph on
9667 don't
9668 \emph default
9669  choose a language.)
9670 \end_layout
9671
9672 \begin_layout Enumerate
9673 Enter 
9674 \family typewriter
9675 jgrga
9676 \family default
9677  into the document's 
9678 \family sans
9679 Extra Options
9680 \family default
9681  field.
9682  (Yes, this is a bug.)
9683 \end_layout
9684
9685 \begin_layout Enumerate
9686 Make sure you use the 
9687 \family typewriter
9688 agu.bst
9689 \family default
9690  bibliography style, by entering 
9691 \family sans
9692 agu
9693 \family default
9694  into the second field of the BibTeX inset.
9695  None of the standard styles will do.
9696 \end_layout
9697
9698 \begin_layout Section
9699 Broadway
9700 \end_layout
9701
9702 \begin_layout Standard
9703 by 
9704 \shape smallcaps
9705 Garst Reese
9706 \end_layout
9707
9708 \begin_layout Subsection
9709 Introduction
9710 \end_layout
9711
9712 \begin_layout Standard
9713 Broadway is for writing plays.
9714  The format is more decorative than Hollywood, and much less standardized.
9715  This format should be suitable for workshops.
9716 \end_layout
9717
9718 \begin_layout Subsection
9719 Special problems
9720 \end_layout
9721
9722 \begin_layout Standard
9723 The same as in Hollywood.
9724 \end_layout
9725
9726 \begin_layout Subsection
9727 Special features
9728 \end_layout
9729
9730 \begin_layout Standard
9731 Insert the 
9732 \family sans
9733 Speaker
9734 \family default
9735  names as labels then cross-reference the label to insert the name.
9736  The cross-reference dialog will show the current cast of characters.
9737 \end_layout
9738
9739 \begin_layout Subsection
9740 Paper size and Margins
9741 \end_layout
9742
9743 \begin_layout Standard
9744 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9745 \end_layout
9746
9747 \begin_layout Subsection
9748 Environments
9749 \end_layout
9750
9751 \begin_layout Standard
9752 The following environments are available.
9753  You can use broadway.bind to get the bind keys shown at the right.
9754 \end_layout
9755
9756 \begin_layout Itemize
9757
9758 \family sans
9759 Standard
9760 \begin_inset Newline newline
9761 \end_inset
9762
9763
9764 \family default
9765 You should not have to use this, but it is here for anything that does not
9766  fit otherwise.
9767 \end_layout
9768
9769 \begin_layout Itemize
9770
9771 \family sans
9772 Narrative
9773 \begin_inset space \hfill{}
9774 \end_inset
9775
9776 M-z n
9777 \begin_inset Newline newline
9778 \end_inset
9779
9780
9781 \family default
9782 Used to describe stage setting and the action.
9783  First use of speaker names in all CAPs.
9784 \end_layout
9785
9786 \begin_layout Itemize
9787
9788 \family sans
9789 ACT
9790 \begin_inset space \hfill{}
9791 \end_inset
9792
9793 M-z a
9794 \begin_inset Newline newline
9795 \end_inset
9796
9797
9798 \family default
9799 Automatically numbered.
9800  On screen it will be arabic, but will print as Roman.
9801 \end_layout
9802
9803 \begin_layout Itemize
9804
9805 \family sans
9806 ACT*
9807 \begin_inset space \hfill{}
9808 \end_inset
9809
9810 M-z S at
9811 \begin_inset Newline newline
9812 \end_inset
9813
9814
9815 \family default
9816 Subtitle for 
9817 \family sans
9818 ACT.
9819
9820 \family default
9821  It is just centered text.
9822 \end_layout
9823
9824 \begin_layout Itemize
9825
9826 \family sans
9827 SCENE
9828 \begin_inset space \hfill{}
9829 \end_inset
9830
9831 M-z S-S
9832 \begin_inset Newline newline
9833 \end_inset
9834
9835
9836 \family default
9837 Not automatically numbered.
9838  You supply the number.
9839  This is because I couldn't figure out how.
9840 \end_layout
9841
9842 \begin_layout Itemize
9843
9844 \family sans
9845 AT_RISE:
9846 \begin_inset space \hfill{}
9847 \end_inset
9848
9849 M-z S-R
9850 \begin_inset Newline newline
9851 \end_inset
9852
9853
9854 \family default
9855 A special case of Narrative to describe the setting and action as the curtain
9856  rises.
9857 \end_layout
9858
9859 \begin_layout Itemize
9860
9861 \family sans
9862 Speaker
9863 \begin_inset space \hfill{}
9864 \end_inset
9865
9866 M-z s
9867 \begin_inset Newline newline
9868 \end_inset
9869
9870
9871 \family default
9872 The speaker's (actor's) title, centered in all CAPS.
9873 \end_layout
9874
9875 \begin_layout Itemize
9876
9877 \family sans
9878 Parenthetical
9879 \begin_inset space \hfill{}
9880 \end_inset
9881
9882 M-z p
9883 \begin_inset Newline newline
9884 \end_inset
9885
9886
9887 \family default
9888 Instructions to the speaker.
9889  The parentheses are automatically inserted.
9890  The ( will appear on screen, but both will be in the printed play.
9891  This environment is only used within 
9892 \family sans
9893 Dialogue
9894 \family default
9895 .
9896 \end_layout
9897
9898 \begin_layout Itemize
9899
9900 \family sans
9901 Dialogue
9902 \begin_inset space \hfill{}
9903 \end_inset
9904
9905 M-z d
9906 \begin_inset Newline newline
9907 \end_inset
9908
9909
9910 \family default
9911 What the Speaker says.
9912 \end_layout
9913
9914 \begin_layout Itemize
9915
9916 \family sans
9917 CURTAIN
9918 \begin_inset space \hfill{}
9919 \end_inset
9920
9921 M-z S-C
9922 \begin_inset Newline newline
9923 \end_inset
9924
9925
9926 \family default
9927 The curtain comes down.
9928 \end_layout
9929
9930 \begin_layout Itemize
9931
9932 \family sans
9933 Title
9934 \begin_inset space \hfill{}
9935 \end_inset
9936
9937 M-z S-T
9938 \end_layout
9939
9940 \begin_layout Itemize
9941
9942 \family sans
9943 Author
9944 \begin_inset space \hfill{}
9945 \end_inset
9946
9947 M-z S-A
9948 \end_layout
9949
9950 \begin_layout Itemize
9951
9952 \family sans
9953 Right_Address
9954 \begin_inset space \hfill{}
9955 \end_inset
9956
9957 M-z r
9958 \end_layout
9959
9960 \begin_layout Standard
9961 Hello there.
9962 \end_layout
9963
9964 \begin_layout Section
9965 Dinbrief
9966 \end_layout
9967
9968 \begin_layout Standard
9969 The document class 
9970 \family sans
9971 dinbrief
9972 \family default
9973  can be used to type letters according to German conventions.
9974  A template file is included in 
9975 \family typewriter
9976 .../lyx/share/templates
9977 \family default
9978  for you to use as a starting point.
9979 \end_layout
9980
9981 \begin_layout Section
9982 EGS journals (
9983 \family sans
9984 egs
9985 \family default
9986 )
9987 \end_layout
9988
9989 \begin_layout Standard
9990 by 
9991 \shape smallcaps
9992 Martin Vermeer
9993 \end_layout
9994
9995 \begin_layout Subsection
9996 Description
9997 \end_layout
9998
9999 \begin_layout Standard
10000 This is the layout file for the European Geophysical Society journals.
10001  The needed 
10002 \family typewriter
10003 egs.cls
10004 \family default
10005  can be downloaded from the web site of the EGS under 
10006 \begin_inset Flex URL
10007 status collapsed
10008
10009 \begin_layout Plain Layout
10010
10011 www.copernicus.org
10012 \end_layout
10013
10014 \end_inset
10015
10016 .
10017 \end_layout
10018
10019 \begin_layout Subsection
10020 New styles
10021 \end_layout
10022
10023 \begin_layout Standard
10024
10025 \family sans
10026 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
10027  Accepted
10028 \family default
10029
10030 \family sans
10031 Offsets
10032 \family default
10033 .
10034  The current layout file is unfortunately very unmodular and would benefit
10035  from using the various 
10036 \family typewriter
10037 std*.inc
10038 \family default
10039  file inclusions.
10040 \end_layout
10041
10042 \begin_layout Section
10043 Elsevier Journals
10044 \end_layout
10045
10046 \begin_layout Standard
10047 By 
10048 \noun on
10049 Rod Pinna
10050 \end_layout
10051
10052 \begin_layout Standard
10053 Elsevier Science Publishers B.V.
10054  provides a standard LaTeX document class (
10055 \family typewriter
10056 elsart.cls
10057 \family default
10058 ) for submitting articles to their various journals.
10059  The style file can be downloaded directly from their web site: 
10060 \begin_inset Flex URL
10061 status collapsed
10062
10063 \begin_layout Plain Layout
10064
10065 http://www.elsevier.com/wps/find/authorsview.authors/latex
10066 \end_layout
10067
10068 \end_inset
10069
10070 .
10071  Instructions are supplied along with the class file, which details the
10072  requirements of the publishers.
10073  LyX includes a package that allows for the use of this class, by a layout
10074  and a template file.
10075  Installation of the class file is the same as for any other LaTeX package;
10076  instructions are provided in the Elsevier documentation.
10077 \end_layout
10078
10079 \begin_layout Standard
10080 To make use of 
10081 \family typewriter
10082 elsart.cls
10083 \family default
10084 , a file 
10085 \family typewriter
10086 elsart.layout
10087 \family default
10088  is supplied.
10089  As the Elsevier class file is based mainly on the standard article class,
10090  most of the normal functionality is provided.
10091  The Elsevier class defines a number of mathematical environments, which
10092  are similar to the AMS environments.
10093  These commands are all described in the Elsevier documentation, and are
10094  available in LyX.
10095 \end_layout
10096
10097 \begin_layout Standard
10098 The easiest way to use the Elsevier style is to base documents on the included
10099  template file.
10100  It is best not to use options such as fancy headings or the geometry package,
10101  as elements such as these are defined by Elsevier in their style file.
10102  Ideally, no extra packages except those mentioned in the Elsevier documentation
10103  should be used.
10104  Essentially, Elsevier require as 
10105 \begin_inset Quotes eld
10106 \end_inset
10107
10108 clean
10109 \begin_inset Quotes erd
10110 \end_inset
10111
10112  a LaTeX file as possible, as their intention is to take the supplied file
10113  and replace the class file with one for the particular journal to which
10114  the paper has been submitted.
10115  This also means that not too much time should be spent on the formating
10116  of the document.
10117  When it comes to be published, this will change anyway.
10118  The rest of the usage for this layout is substantially the same as for
10119  the normal article class.
10120  For details of what Elsevier do and don't allow, refer to their documentation.
10121 \end_layout
10122
10123 \begin_layout Section
10124 Foils [aka 
10125 \family sans
10126 FoilTeX
10127 \family default
10128 ]
10129 \begin_inset CommandInset label
10130 LatexCommand label
10131 name "sec:foiltex"
10132
10133 \end_inset
10134
10135
10136 \end_layout
10137
10138 \begin_layout Standard
10139 by 
10140 \noun on
10141 Allan Rae
10142 \end_layout
10143
10144 \begin_layout Subsection
10145 Introduction
10146 \end_layout
10147
10148 \begin_layout Standard
10149 This section describes how to use LyX to make slides for overhead projectors.
10150  There are two document classes that can do this: the default slides class
10151  and the 
10152 \family sans
10153 FoilTeX
10154 \family default
10155  slides class.
10156  This section documents the latter.
10157 \end_layout
10158
10159 \begin_layout Standard
10160 I'm going to say this again, nice and clear, so that there's no misunderstanding
10161 :
10162 \end_layout
10163
10164 \begin_layout Standard
10165 \begin_inset VSpace bigskip
10166 \end_inset
10167
10168
10169 \end_layout
10170
10171 \begin_layout Standard
10172 \align center
10173
10174 \size large
10175 This section documents the class 
10176 \begin_inset Quotes eld
10177 \end_inset
10178
10179
10180 \family sans
10181 slides (FoilTeX)
10182 \family default
10183
10184 \begin_inset Quotes erd
10185 \end_inset
10186
10187  
10188 \emph on
10189 only.
10190 \end_layout
10191
10192 \begin_layout Standard
10193 \begin_inset VSpace bigskip
10194 \end_inset
10195
10196
10197 \end_layout
10198
10199 \begin_layout Standard
10200 If you're looking for the documentation for 
10201 \begin_inset Quotes eld
10202 \end_inset
10203
10204
10205 \family sans
10206 slides (default)
10207 \family default
10208
10209 \begin_inset Quotes erd
10210 \end_inset
10211
10212 , check out section
10213 \begin_inset space ~
10214 \end_inset
10215
10216
10217 \begin_inset CommandInset ref
10218 LatexCommand ref
10219 reference "sec:slitex"
10220
10221 \end_inset
10222
10223 .
10224  If your machine doesn't have the 
10225 \family sans
10226 foils
10227 \family default
10228  class [
10229 \begin_inset Quotes eld
10230 \end_inset
10231
10232
10233 \family sans
10234 slides (FoilTeX)
10235 \family default
10236
10237 \begin_inset Quotes erd
10238 \end_inset
10239
10240 ] installed, you'll probably have to use the default 
10241 \family sans
10242 slides
10243 \family default
10244  class, which isn't quite as good as 
10245 \family sans
10246 foils.
10247 \end_layout
10248
10249 \begin_layout Standard
10250 The 
10251 \family sans
10252 foils
10253 \family default
10254  class is designed for use with version 2.1 of the 
10255 \family sans
10256 foils.cls
10257 \family default
10258  LaTeX class file which is now an integral part of LaTeX2e.
10259 \end_layout
10260
10261 \begin_layout Subsection
10262 Getting Started
10263 \end_layout
10264
10265 \begin_layout Standard
10266 Obviously, to use this document class, you need to select 
10267 \begin_inset Quotes eld
10268 \end_inset
10269
10270
10271 \family sans
10272 slides (FoilTeX)
10273 \family default
10274
10275 \begin_inset Quotes erd
10276 \end_inset
10277
10278  from the 
10279 \family sans
10280 Class
10281 \family default
10282  entry in the 
10283 \family sans
10284 Document
10285 \begin_inset space ~
10286 \end_inset
10287
10288 Layout
10289 \family default
10290  dialog.
10291  There are some settings in the 
10292 \family sans
10293 Document
10294 \begin_inset space ~
10295 \end_inset
10296
10297 Layout
10298 \family default
10299  dialog that you should know about that are specific to this class:
10300 \end_layout
10301
10302 \begin_layout Itemize
10303 Don't change the options 
10304 \family sans
10305 Sides
10306 \family default
10307  and 
10308 \family sans
10309 Columns
10310 \family default
10311  on the 
10312 \family sans
10313 Document
10314 \begin_inset space ~
10315 \end_inset
10316
10317 Layout
10318 \family default
10319  dialog.
10320  They're ignored by the 
10321 \family sans
10322 foils
10323 \family default
10324  class.
10325 \end_layout
10326
10327 \begin_layout Itemize
10328 The default font size is 20
10329 \begin_inset space \thinspace{}
10330 \end_inset
10331
10332 pt with the other options being 17
10333 \begin_inset space \thinspace{}
10334 \end_inset
10335
10336 pt, 25
10337 \begin_inset space \thinspace{}
10338 \end_inset
10339
10340 pt and 30
10341 \begin_inset space \thinspace{}
10342 \end_inset
10343
10344 pt.
10345 \end_layout
10346
10347 \begin_layout Itemize
10348 The default font is 
10349 \family sans
10350 sans
10351 \family default
10352  
10353 \family sans
10354 serif
10355 \family default
10356  but all math equations are still typeset in the usual roman font.
10357 \end_layout
10358
10359 \begin_layout Itemize
10360
10361 \family sans
10362 FoilTeX
10363 \family default
10364  supports A4 and Letter paper sizes as well as a special size for working
10365  with 35
10366 \begin_inset space \thinspace{}
10367 \end_inset
10368
10369 mm slides.
10370  It doesn't support A5, B5, legal or executive paper sizes.
10371 \end_layout
10372
10373 \begin_layout Itemize
10374 Don't bother changing the 
10375 \family sans
10376 Float Placement
10377 \family default
10378  settings because they are ignored anyway.
10379  All floats appear where they are defined in the text.
10380 \end_layout
10381
10382 \begin_layout Itemize
10383 The 
10384 \family sans
10385 Pagestyle
10386 \family default
10387  setting behaves a bit differently for this class.
10388  
10389 \family sans
10390 FoilTeX
10391 \family default
10392  provides extensive footer and header capabilities including a user-defined
10393  logo.
10394  See section
10395 \begin_inset space ~
10396 \end_inset
10397
10398
10399 \begin_inset CommandInset ref
10400 LatexCommand ref
10401 reference "sec:foilfoot"
10402
10403 \end_inset
10404
10405  for more details.
10406  The title page is treated differently to all other pages in the document
10407  and is 
10408 \emph on
10409 always
10410 \emph default
10411  unnumbered and 
10412 \emph on
10413 always
10414 \emph default
10415  has the logo centered at the bottom of the page (if one is defined).
10416  The possible page style choices and what they do are as follows:
10417 \end_layout
10418
10419 \begin_deeper
10420 \begin_layout Labeling
10421 \labelwidthstring MMMMMMM
10422
10423 \family sans
10424 \series bold
10425 empty
10426 \family default
10427 \series default
10428  The final output contains no page numbers, or other headers or footers
10429  (except footnotes of course).
10430  
10431 \end_layout
10432
10433 \begin_layout Labeling
10434 \labelwidthstring MMMMMMM
10435
10436 \family sans
10437 \series bold
10438 plain
10439 \family default
10440 \series default
10441  The final output contains page numbers centered at the bottom of the page.
10442  No other headings or footers (other than footnotes).
10443 \end_layout
10444
10445 \begin_layout Labeling
10446 \labelwidthstring MMMMMMM
10447
10448 \series bold
10449 foilheadings
10450 \series default
10451  Page numbers in lower right corner.
10452  Additional headers and footers are also shown.
10453  This is also the default.
10454 \end_layout
10455
10456 \begin_layout Labeling
10457 \labelwidthstring MMMMMMM
10458
10459 \series bold
10460 fancy
10461 \series default
10462  Gives you access to the 
10463 \family sans
10464 fancyheadings
10465 \family default
10466  package although its use with 
10467 \family sans
10468 FoilTeX
10469 \family default
10470  is discouraged by the writer of the 
10471 \family sans
10472 FoilTeX
10473 \family default
10474  package because of some potential page layout clashes.
10475 \end_layout
10476
10477 \end_deeper
10478 \begin_layout Subsubsection
10479 Extra Options
10480 \end_layout
10481
10482 \begin_layout Standard
10483 The following options may be used in the extra class options in the 
10484 \family sans
10485 Document\SpecialChar \menuseparator
10486 Settings
10487 \family default
10488  dialog.
10489 \end_layout
10490
10491 \begin_layout Labeling
10492 \labelwidthstring MMMMMMx
10493
10494 \series bold
10495 35mmSlide
10496 \series default
10497  This sets up the page layout for 7.33
10498 \begin_inset space \thinspace{}
10499 \end_inset
10500
10501 in by 11
10502 \begin_inset space \thinspace{}
10503 \end_inset
10504
10505 in paper, which is about the same aspect ratio as a 35
10506 \begin_inset space \thinspace{}
10507 \end_inset
10508
10509 mm slide, making it a bit easier to work with this medium.
10510 \end_layout
10511
10512 \begin_layout Labeling
10513 \labelwidthstring MMMMMMx
10514
10515 \series bold
10516 headrule
10517 \series default
10518  Places a rule across the page below the header on every page except the
10519  title page.
10520 \end_layout
10521
10522 \begin_layout Labeling
10523 \labelwidthstring MMMMMMx
10524
10525 \series bold
10526 footrule
10527 \series default
10528  Places a rule across the page above the footer on every page except the
10529  title page.
10530 \end_layout
10531
10532 \begin_layout Labeling
10533 \labelwidthstring MMMMMMx
10534
10535 \series bold
10536 dvips
10537 \series default
10538  This is automatically set each time you create a new 
10539 \family sans
10540 foils
10541 \family default
10542  document.
10543  This option tells 
10544 \family sans
10545 FoilTeX
10546 \family default
10547  to use the dvips driver to rotate those pages that are set as landscape
10548  foils.
10549 \end_layout
10550
10551 \begin_layout Labeling
10552 \labelwidthstring MMMMMMx
10553
10554 \series bold
10555 landscape
10556 \series default
10557  Simply changes the page dimensions to those of a landscape page but doesn't
10558  do any rotation.
10559  Thus if you use this option you need to use an external program to rotate
10560  each page or feed your paper through your printer as landscape.
10561  Note that this option effectively reverses the roles of the 
10562 \family sans
10563 Foilhead
10564 \family default
10565  and 
10566 \family sans
10567 Rotatefoilhead
10568 \family default
10569  environments (don't worry these are described in the next section).
10570 \end_layout
10571
10572 \begin_layout Labeling
10573 \labelwidthstring MMMMMMx
10574
10575 \series bold
10576 leqno
10577 \series default
10578  Equation numbers on the left.
10579 \end_layout
10580
10581 \begin_layout Labeling
10582 \labelwidthstring MMMMMMx
10583
10584 \series bold
10585 fleqn
10586 \series default
10587  Flush-left equations.
10588 \end_layout
10589
10590 \begin_layout Subsection
10591 Supported Environments
10592 \end_layout
10593
10594 \begin_layout Standard
10595 Most of the environments commonly supported in other classes are also supported
10596  by the 
10597 \family sans
10598 foils
10599 \family default
10600  class.
10601  There are several additional environments provided by 
10602 \family sans
10603 FoilTeX
10604 \family default
10605  as well as a couple added by LyX.
10606  The following environments are shared with other classes:
10607 \end_layout
10608
10609 \begin_layout Standard
10610 \begin_inset ERT
10611 status open
10612
10613 \begin_layout Plain Layout
10614
10615
10616 \backslash
10617 begin{multicols}{2}
10618 \end_layout
10619
10620 \end_inset
10621
10622
10623 \end_layout
10624
10625 \begin_layout Itemize
10626
10627 \family sans
10628 Standard
10629 \end_layout
10630
10631 \begin_layout Itemize
10632
10633 \family sans
10634 Itemize
10635 \end_layout
10636
10637 \begin_layout Itemize
10638
10639 \family sans
10640 Enumerate
10641 \end_layout
10642
10643 \begin_layout Itemize
10644
10645 \family sans
10646 Description
10647 \end_layout
10648
10649 \begin_layout Itemize
10650
10651 \family sans
10652 List
10653 \end_layout
10654
10655 \begin_layout Itemize
10656
10657 \family sans
10658 LyX-Code
10659 \end_layout
10660
10661 \begin_layout Itemize
10662
10663 \family sans
10664 Verse
10665 \end_layout
10666
10667 \begin_layout Itemize
10668
10669 \family sans
10670 Quote
10671 \end_layout
10672
10673 \begin_layout Itemize
10674
10675 \family sans
10676 Quotation
10677 \end_layout
10678
10679 \begin_layout Itemize
10680
10681 \family sans
10682 Title
10683 \end_layout
10684
10685 \begin_layout Itemize
10686
10687 \family sans
10688 Author
10689 \end_layout
10690
10691 \begin_layout Itemize
10692
10693 \family sans
10694 Date
10695 \end_layout
10696
10697 \begin_layout Itemize
10698
10699 \family sans
10700 Abstract
10701 \end_layout
10702
10703 \begin_layout Itemize
10704
10705 \family sans
10706 Bibliography
10707 \end_layout
10708
10709 \begin_layout Itemize
10710
10711 \family sans
10712 Address
10713 \end_layout
10714
10715 \begin_layout Itemize
10716
10717 \family sans
10718 RightAddress
10719 \end_layout
10720
10721 \begin_layout Itemize
10722
10723 \family sans
10724 Caption
10725 \end_layout
10726
10727 \begin_layout Itemize
10728
10729 \family sans
10730 Comment
10731 \end_layout
10732
10733 \begin_layout Standard
10734 \begin_inset ERT
10735 status open
10736
10737 \begin_layout Plain Layout
10738
10739
10740 \backslash
10741 end{multicols}
10742 \end_layout
10743
10744 \end_inset
10745
10746
10747 \end_layout
10748
10749 \begin_layout Standard
10750 That is, all the major environments apart from the sectioning environments.
10751  Since foils are essentially self-contained sections, with a title and body,
10752  
10753 \family sans
10754 FoilTeX
10755 \family default
10756  provides specific commands for starting new foils and these are:
10757 \end_layout
10758
10759 \begin_layout Itemize
10760
10761 \family sans
10762 Foilhead
10763 \end_layout
10764
10765 \begin_layout Itemize
10766
10767 \family sans
10768 Rotatefoilhead
10769 \end_layout
10770
10771 \begin_layout Standard
10772 LyX also provides slightly modified versions of these two environments called:
10773 \end_layout
10774
10775 \begin_layout Itemize
10776
10777 \family sans
10778 ShortFoilhead
10779 \end_layout
10780
10781 \begin_layout Itemize
10782
10783 \family sans
10784 ShortRotatefoilhead
10785 \end_layout
10786
10787 \begin_layout Standard
10788 and the differences will be explained in the next section.
10789 \end_layout
10790
10791 \begin_layout Standard
10792 Since foils are often used in presenting ideas or new theorems and such
10793  
10794 \family sans
10795 FoilTeX
10796 \family default
10797  also provides a comprehensive box of goodies for presenting them:
10798 \end_layout
10799
10800 \begin_layout Standard
10801 \begin_inset ERT
10802 status open
10803
10804 \begin_layout Plain Layout
10805
10806
10807 \backslash
10808 begin{multicols}{2}
10809 \end_layout
10810
10811 \end_inset
10812
10813
10814 \end_layout
10815
10816 \begin_layout Itemize
10817
10818 \family sans
10819 Theorem
10820 \end_layout
10821
10822 \begin_layout Itemize
10823
10824 \family sans
10825 Lemma
10826 \end_layout
10827
10828 \begin_layout Itemize
10829
10830 \family sans
10831 Corollary
10832 \end_layout
10833
10834 \begin_layout Itemize
10835
10836 \family sans
10837 Proposition
10838 \end_layout
10839
10840 \begin_layout Itemize
10841
10842 \family sans
10843 Definition
10844 \end_layout
10845
10846 \begin_layout Itemize
10847
10848 \family sans
10849 Proof
10850 \end_layout
10851
10852 \begin_layout Itemize
10853
10854 \family sans
10855 Theorem*
10856 \end_layout
10857
10858 \begin_layout Itemize
10859
10860 \family sans
10861 Lemma*
10862 \end_layout
10863
10864 \begin_layout Itemize
10865
10866 \family sans
10867 Corollary*
10868 \end_layout
10869
10870 \begin_layout Itemize
10871
10872 \family sans
10873 Proposition*
10874 \end_layout
10875
10876 \begin_layout Itemize
10877
10878 \family sans
10879 Definition*
10880 \end_layout
10881
10882 \begin_layout Standard
10883 \begin_inset ERT
10884 status open
10885
10886 \begin_layout Plain Layout
10887
10888
10889 \backslash
10890 end{multicols}
10891 \end_layout
10892
10893 \end_inset
10894
10895
10896 \end_layout
10897
10898 \begin_layout Standard
10899 The starred versions are unnumbered while the unstarred versions are numbered.
10900  There are also two list environments added by LyX and these are:
10901 \end_layout
10902
10903 \begin_layout Itemize
10904
10905 \family sans
10906 TickList
10907 \end_layout
10908
10909 \begin_layout Itemize
10910
10911 \family sans
10912 CrossList
10913 \end_layout
10914
10915 \begin_layout Standard
10916
10917 \family sans
10918 FoilTeX
10919 \family default
10920  provides some powerful header and footer capabilities that are best set
10921  in the preamble although they may be set at any point in a document.
10922  If you want to change these settings in your document the best place to
10923  do so is at the very top of a foil, i.
10924 \begin_inset space \thinspace{}
10925 \end_inset
10926
10927 g.
10928 \emph on
10929
10930 \begin_inset space \space{}
10931 \end_inset
10932
10933
10934 \emph default
10935 straight after the foilhead.
10936 \end_layout
10937
10938 \begin_layout Standard
10939 For this purpose, the following command styles are provided [
10940 \shape smallcaps
10941 Martin Vermeer
10942 \shape default
10943 ]:
10944 \end_layout
10945
10946 \begin_layout Standard
10947 \begin_inset ERT
10948 status open
10949
10950 \begin_layout Plain Layout
10951
10952
10953 \backslash
10954 begin{multicols}{2}
10955 \end_layout
10956
10957 \end_inset
10958
10959
10960 \end_layout
10961
10962 \begin_layout Itemize
10963
10964 \family sans
10965 My
10966 \begin_inset space ~
10967 \end_inset
10968
10969 Logo
10970 \end_layout
10971
10972 \begin_layout Itemize
10973
10974 \family sans
10975 Restriction
10976 \end_layout
10977
10978 \begin_layout Itemize
10979
10980 \family sans
10981 Right
10982 \begin_inset space ~
10983 \end_inset
10984
10985 Footer
10986 \end_layout
10987
10988 \begin_layout Itemize
10989
10990 \family sans
10991 Right
10992 \begin_inset space ~
10993 \end_inset
10994
10995 Header
10996 \end_layout
10997
10998 \begin_layout Itemize
10999
11000 \family sans
11001 Left
11002 \begin_inset space ~
11003 \end_inset
11004
11005 Header
11006 \end_layout
11007
11008 \begin_deeper
11009 \begin_layout Standard
11010 \begin_inset space ~
11011 \end_inset
11012
11013
11014 \end_layout
11015
11016 \end_deeper
11017 \begin_layout Standard
11018 \begin_inset ERT
11019 status open
11020
11021 \begin_layout Plain Layout
11022
11023
11024 \backslash
11025 end{multicols}
11026 \end_layout
11027
11028 \end_inset
11029
11030
11031 \end_layout
11032
11033 \begin_layout Standard
11034 There are also a few commands provided by 
11035 \family sans
11036 FoilTeX
11037 \family default
11038  that aren't directly supported by LyX but I'll tell you what they do and
11039  how to use them in section
11040 \begin_inset space ~
11041 \end_inset
11042
11043
11044 \begin_inset CommandInset ref
11045 LatexCommand ref
11046 reference "sec:unsuppfoils"
11047
11048 \end_inset
11049
11050 .
11051 \end_layout
11052
11053 \begin_layout Subsection
11054 Building a Set of Foils
11055 \end_layout
11056
11057 \begin_layout Standard
11058 This section will give a simple introduction to using the different environments
11059  to build a set of foils.
11060  If you want to see an example set of foils, take a look at the 
11061 \family typewriter
11062 Foils.lyx
11063 \family default
11064  file you find in LyX's 
11065 \family typewriter
11066 examples
11067 \family default
11068  folder.
11069 \end_layout
11070
11071 \begin_layout Subsubsection
11072 Give It a Title Page
11073 \end_layout
11074
11075 \begin_layout Standard
11076 Unlike other classes that provide 
11077 \family sans
11078 Title
11079 \family default
11080
11081 \family sans
11082 Author
11083 \family default
11084
11085 \family sans
11086 Date
11087 \family default
11088  and 
11089 \family sans
11090 Abstract
11091 \family default
11092  environments, 
11093 \family sans
11094 foils
11095 \family default
11096  creates the title on a page of its own.
11097  If you leave out the 
11098 \family sans
11099 Date
11100 \family default
11101  environment LaTeX will substitute the current date (every time you regenerate
11102  the output).
11103 \end_layout
11104
11105 \begin_layout Subsubsection
11106 Start a New Foil
11107 \end_layout
11108
11109 \begin_layout Standard
11110 As I mentioned earlier, there are four ways of starting a new foil.
11111  For portrait foils you should use 
11112 \family sans
11113 Foilhead
11114 \family default
11115  or 
11116 \family sans
11117 ShortFoilhead.
11118
11119 \family default
11120  The difference between these two environments is the amount of space between
11121  the title of the foil (the foilhead) and the body of the foil.
11122 \end_layout
11123
11124 \begin_layout Standard
11125 Landscape foils are generated using the 
11126 \family sans
11127 Rotatefoilhead
11128 \family default
11129  and 
11130 \family sans
11131 ShortRotatefoilhead
11132 \family default
11133  environments.
11134  Again the only difference is the spacing between foilhead and body.
11135  Both of the short versions have 0.5 inches less separation between the foilhead
11136  and the body.
11137  
11138 \end_layout
11139
11140 \begin_layout Standard
11141 One problem with the support for landscape foils is the requirement that
11142  you have to use the 
11143 \family typewriter
11144 dvips
11145 \family default
11146  driver to generate the PostScript output otherwise the foils won't be rotated.
11147  It is possible to get landscape foils even if you haven't got the 
11148 \family typewriter
11149 dvips
11150 \family default
11151  driver provided you can feed your foils sideways through your printer ;-)
11152 \end_layout
11153
11154 \begin_layout Subsubsection
11155 Theorems, Lemmas, Proofs and more
11156 \end_layout
11157
11158 \begin_layout Standard
11159 Due to a small bug in LyX you can't have two of the same type of these environme
11160 nts directly following each other.
11161  They must be separated by something.
11162  If you try, you will just be extending the previous environment as if you
11163  had merged the two environments together.
11164  So, how do you get around this problem? The simplest option is to insert
11165  some text between the two environments or add a 
11166 \family sans
11167 LaTeX
11168 \family default
11169  environment between the two with just a 
11170 \begin_inset Quotes eld
11171 \end_inset
11172
11173
11174 \family typewriter
11175 %
11176 \family default
11177
11178 \begin_inset Quotes erd
11179 \end_inset
11180
11181  in it.
11182  This will force LyX to produce two separate environments and hence the
11183  correct LaTeX output.
11184  An example is provided in the example file included with the LyX distribution.
11185  Remember, this problem only occurs if you are trying to place two of the
11186  same type of theorem-like environments one directly after the other.
11187 \end_layout
11188
11189 \begin_layout Subsubsection
11190 Lists
11191 \end_layout
11192
11193 \begin_layout Standard
11194 You get all the commonly supported list styles found in other classes as
11195  well as two new ones.
11196  I'll only describe the new ones here.
11197  If you want to find out more about the other list environments check out
11198  the 
11199 \emph on
11200 User's Guide.
11201
11202 \emph default
11203  If you intend to use itemized lists you might also want to read about the
11204  
11205 \family sans
11206 Itemize
11207 \begin_inset space ~
11208 \end_inset
11209
11210 Bullet
11211 \begin_inset space ~
11212 \end_inset
11213
11214 Selection
11215 \family default
11216  dialog described above in section
11217 \begin_inset space ~
11218 \end_inset
11219
11220
11221 \begin_inset CommandInset ref
11222 LatexCommand ref
11223 reference "sec:bullet"
11224
11225 \end_inset
11226
11227 .
11228 \end_layout
11229
11230 \begin_layout Standard
11231 The two new list styles, 
11232 \family sans
11233 TickList
11234 \family default
11235  and 
11236 \family sans
11237 CrossList
11238 \family default
11239 , are designed to make it easier for you to create lists of do's and don'ts
11240  or right and wrong by providing dedicated environments that use a tick
11241  or a cross as the label of the list.
11242  These lists are in fact dedicated variants of the 
11243 \family sans
11244 Itemize
11245 \family default
11246  environment.
11247  They do however require that you have the 
11248 \family typewriter
11249 psnfss
11250 \family default
11251  packages installed.
11252 \end_layout
11253
11254 \begin_layout Subsubsection
11255 Figures and Tables
11256 \end_layout
11257
11258 \begin_layout Standard
11259
11260 \family sans
11261 FoilTeX
11262 \family default
11263  redefines the floating tables and figures so that they appear exactly where
11264  they are in the text rather than pushing them to the top of the page or
11265  to some user specified location.
11266  In fact if you change the float placement settings they are simply ignored.
11267 \end_layout
11268
11269 \begin_layout Subsubsection
11270 Page Headers and Footers
11271 \begin_inset CommandInset label
11272 LatexCommand label
11273 name "sec:foilfoot"
11274
11275 \end_inset
11276
11277
11278 \end_layout
11279
11280 \begin_layout Standard
11281
11282 \family sans
11283 My
11284 \begin_inset space ~
11285 \end_inset
11286
11287 Logo
11288 \family default
11289  and 
11290 \family sans
11291 Restriction
11292 \family default
11293  are two commands used to control the left-footer text string.
11294  The first is meant to allow you to include a graphic logo on your foils
11295  and defaults to 
11296 \begin_inset Quotes eld
11297 \end_inset
11298
11299 -Typeset by 
11300 \family sans
11301 FoilTeX
11302 \family default
11303 -
11304 \begin_inset Quotes erd
11305 \end_inset
11306
11307 .
11308  While the second is meant to provide a classification for the audience,
11309  
11310 \emph on
11311 e.
11312 \begin_inset space \thinspace{}
11313 \end_inset
11314
11315 g.
11316 \emph default
11317
11318 \begin_inset space \space{}
11319 \end_inset
11320
11321 Confidential.
11322  It is empty by default.
11323 \end_layout
11324
11325 \begin_layout Standard
11326 The remaining page corners can be filled by 
11327 \family sans
11328 Right
11329 \begin_inset space ~
11330 \end_inset
11331
11332 Footer
11333 \family default
11334  (which defaults to page numbers), 
11335 \family sans
11336 Right
11337 \begin_inset space ~
11338 \end_inset
11339
11340 Header
11341 \family default
11342  (top right) and 
11343 \family sans
11344 Left
11345 \begin_inset space ~
11346 \end_inset
11347
11348 Header
11349 \family default
11350  (top left).
11351 \end_layout
11352
11353 \begin_layout Subsection
11354 Unsupported 
11355 \family sans
11356 FoilTeX
11357 \family default
11358  Goodies
11359 \begin_inset CommandInset label
11360 LatexCommand label
11361 name "sec:unsuppfoils"
11362
11363 \end_inset
11364
11365
11366 \end_layout
11367
11368 \begin_layout Standard
11369 All the commands mentioned below need to be set in a 
11370 \family sans
11371 LaTeX
11372 \family default
11373  environment or as 
11374 \family sans
11375 TeX
11376 \family default
11377  within another environment.
11378 \end_layout
11379
11380 \begin_layout Subsubsection
11381 Lengths
11382 \end_layout
11383
11384 \begin_layout Standard
11385 All lengths are adjusted using the 
11386 \family typewriter
11387
11388 \backslash
11389 setlength{
11390 \family default
11391 \emph on
11392 lengthname
11393 \family typewriter
11394 \emph default
11395 }{
11396 \family default
11397 \emph on
11398 newlength
11399 \family typewriter
11400 \emph default
11401 }
11402 \family default
11403  command.
11404  Where 
11405 \emph on
11406 lengthname
11407 \emph default
11408  should be replaced by the name given to the length you want to change and
11409  
11410 \emph on
11411 newlength
11412 \emph default
11413  is the length value.
11414  All lengths should be specified in units of length such as inches (
11415 \family typewriter
11416 in
11417 \family default
11418 ), millimeters (
11419 \family typewriter
11420 mm
11421 \family default
11422 ) or points (
11423 \family typewriter
11424 pt
11425 \family default
11426 ) or relative to some document or font-based length such as 
11427 \family typewriter
11428
11429 \backslash
11430 textwidth
11431 \family default
11432 .
11433  
11434 \end_layout
11435
11436 \begin_layout Standard
11437 It's possible to change the spacing between a foilhead and the body of the
11438  foil by adjusting the length specified by 
11439 \family typewriter
11440
11441 \backslash
11442 foilheadskip
11443 \family default
11444 .
11445  For example, to make 
11446 \emph on
11447 all
11448 \emph default
11449  foilheads 0.5
11450 \begin_inset space \space{}
11451 \end_inset
11452
11453 in closer to their bodies put the following in the preamble: 
11454 \family typewriter
11455
11456 \backslash
11457 setlength{
11458 \backslash
11459 foilheadskip}{-0.5in}
11460 \end_layout
11461
11462 \begin_layout Standard
11463 The spacings around floats can be adjusted by setting these lengths:
11464 \end_layout
11465
11466 \begin_layout Labeling
11467 \labelwidthstring MMMMMMMMMMM
11468
11469 \family typewriter
11470
11471 \backslash
11472 abovefloatskip
11473 \family default
11474  Separation between the text and the top of the float
11475 \end_layout
11476
11477 \begin_layout Labeling
11478 \labelwidthstring MMMMMMMMMMM
11479
11480 \family typewriter
11481
11482 \backslash
11483 abovecaptionskip
11484 \family default
11485  Separation between the float and the caption
11486 \end_layout
11487
11488 \begin_layout Labeling
11489 \labelwidthstring MMMMMMMMMMM
11490
11491 \family typewriter
11492
11493 \backslash
11494 belowcaptionskip
11495 \family default
11496  Separation between the caption and the following text
11497 \end_layout
11498
11499 \begin_layout Labeling
11500 \labelwidthstring MMMMMMMMMMM
11501
11502 \family typewriter
11503
11504 \backslash
11505 captionwidth
11506 \family default
11507  You can make the captions narrower than the surrounding text by adjusting
11508  this length.
11509  Best done relative to 
11510 \family typewriter
11511
11512 \backslash
11513 textwidth
11514 \family default
11515 .
11516 \end_layout
11517
11518 \begin_layout Standard
11519 There are also several title page related lengths that you may find useful
11520  if you have a long title or several authors:
11521 \end_layout
11522
11523 \begin_layout Labeling
11524 \labelwidthstring MMMMMMMMMMM
11525
11526 \family typewriter
11527
11528 \backslash
11529 abovetitleskip
11530 \family default
11531  Separation from headers to 
11532 \family sans
11533 Title
11534 \end_layout
11535
11536 \begin_layout Labeling
11537 \labelwidthstring MMMMMMMMMMM
11538
11539 \family typewriter
11540
11541 \backslash
11542 titleauthorskip
11543 \family default
11544  between 
11545 \family sans
11546 Title
11547 \family default
11548  and 
11549 \family sans
11550 Author
11551 \family default
11552  environments
11553 \end_layout
11554
11555 \begin_layout Labeling
11556 \labelwidthstring MMMMMMMMMMM
11557
11558 \family typewriter
11559
11560 \backslash
11561 authorauthorskip
11562 \family default
11563  between multiple 
11564 \family sans
11565 Author
11566 \family default
11567  lines
11568 \end_layout
11569
11570 \begin_layout Labeling
11571 \labelwidthstring MMMMMMMMMMM
11572
11573 \family typewriter
11574
11575 \backslash
11576 authordateskip
11577 \family default
11578  between the 
11579 \family sans
11580 Author
11581 \family default
11582  and the 
11583 \family sans
11584 Date
11585 \end_layout
11586
11587 \begin_layout Labeling
11588 \labelwidthstring MMMMMMMMMMM
11589
11590 \family typewriter
11591
11592 \backslash
11593 dateabstractskip
11594 \family default
11595  between the 
11596 \family sans
11597 Date
11598 \family default
11599  and the 
11600 \family sans
11601 Abstract
11602 \end_layout
11603
11604 \begin_layout Standard
11605 The last length related command affects all the list environments.
11606  If you place 
11607 \family typewriter
11608
11609 \backslash
11610 zerolistvertdimens
11611 \family default
11612  
11613 \emph on
11614 inside
11615 \emph default
11616  a list environment then all the vertical spacing between the list items
11617  is removed.
11618  Note that this is a command not a length so it doesn't require 
11619 \family typewriter
11620
11621 \backslash
11622 setlength
11623 \family default
11624  like the stuff mentioned above.
11625 \end_layout
11626
11627 \begin_layout Subsubsection
11628 Headers and Footers
11629 \end_layout
11630
11631 \begin_layout Standard
11632 The 
11633 \family typewriter
11634
11635 \backslash
11636 LogoOn
11637 \family default
11638  and 
11639 \family typewriter
11640
11641 \backslash
11642 LogoOff
11643 \family default
11644  commands control whether the logo in the 
11645 \family sans
11646 MyLogo
11647 \family default
11648  definition appear on a given page.
11649  If you put 
11650 \family typewriter
11651
11652 \backslash
11653 LogoOff
11654 \family default
11655  in the preamble then none of the foils will have the logo on them.
11656  If you don't want the logo on a particular page place the 
11657 \family typewriter
11658
11659 \backslash
11660 LogoOff
11661 \family default
11662  directly after the foilhead of that page and the 
11663 \family typewriter
11664
11665 \backslash
11666 LogoOn
11667 \family default
11668  directly after the next foilhead.
11669 \end_layout
11670
11671 \begin_layout Standard
11672 If you decide to use the 
11673 \family sans
11674 fancy
11675 \family default
11676  page style setting in the 
11677 \family sans
11678 Document
11679 \begin_inset space ~
11680 \end_inset
11681
11682 Layout
11683 \family default
11684  dialog you should probably add 
11685 \family typewriter
11686
11687 \backslash
11688 let
11689 \backslash
11690 headwidth
11691 \backslash
11692 textwidth
11693 \family default
11694  to your preamble so headers and footers on landscape pages are correctly
11695  placed when rotated.
11696  This is due to some clashes between the page layouts provided by the 
11697 \family sans
11698 fancyheadings
11699 \family default
11700  package and the 
11701 \family sans
11702 foils
11703 \family default
11704  class.
11705 \end_layout
11706
11707 \begin_layout Section
11708 Hollywood (Hollywood spec scripts)
11709 \end_layout
11710
11711 \begin_layout Standard
11712 by 
11713 \shape smallcaps
11714 Garst Reese
11715 \end_layout
11716
11717 \begin_layout Subsection
11718 Introduction
11719 \end_layout
11720
11721 \begin_layout Standard
11722 Getting the format of a Hollywood script right is a 
11723 \begin_inset Quotes eld
11724 \end_inset
11725
11726 rite of passage.
11727 \begin_inset Quotes erd
11728 \end_inset
11729
11730  It is designed to make the readers focus on content and to be easy and
11731  familiar for the actors to read.
11732  Each page of a script should be one minute of film.
11733  Nothing goes in a script that you cannot see or hear on screen.
11734  The courier 12 pt font should be used throughout.
11735  No italics.
11736 \end_layout
11737
11738 \begin_layout Subsection
11739 Special problems
11740 \end_layout
11741
11742 \begin_layout Standard
11743 Speakers' lines should NEVER break in mid-sentence.
11744  If a speaker's lines continue over a page break, repeat the 
11745 \family sans
11746 Speaker
11747 \family default
11748  title followed by (Cont'd).
11749 \end_layout
11750
11751 \begin_layout Subsection
11752 Special features
11753 \end_layout
11754
11755 \begin_layout Standard
11756 Insert the 
11757 \family sans
11758 Speaker
11759 \family default
11760  names as labels then cross-reference the label to insert the name.
11761  The cross-reference dialog will show the current cast of characters.
11762  You can use this to insert the speaker name in narratives also.
11763 \end_layout
11764
11765 \begin_layout Subsection
11766 Paper size and Margins
11767 \end_layout
11768
11769 \begin_layout Standard
11770 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11771 \end_layout
11772
11773 \begin_layout Subsection
11774 Environments
11775 \end_layout
11776
11777 \begin_layout Standard
11778 The following environments are available.
11779  You can use hollywood.bind to get the bind keys shown at the right.
11780 \end_layout
11781
11782 \begin_layout Itemize
11783
11784 \family sans
11785 Standard
11786 \begin_inset Newline newline
11787 \end_inset
11788
11789
11790 \family default
11791 Used where nothing else works.
11792  Try to avoid it.
11793 \end_layout
11794
11795 \begin_layout Itemize
11796
11797 \family sans
11798 FADE_IN
11799 \family default
11800 :
11801 \begin_inset space \hfill{}
11802 \end_inset
11803
11804
11805 \family sans
11806 M-z S-I
11807 \family default
11808
11809 \begin_inset Newline newline
11810 \end_inset
11811
11812 Usually followed by something like 
11813 \begin_inset Quotes eld
11814 \end_inset
11815
11816 on Sally waking up.
11817 \begin_inset Quotes erd
11818 \end_inset
11819
11820
11821 \end_layout
11822
11823 \begin_layout Itemize
11824
11825 \family sans
11826 INT:
11827 \begin_inset space \hfill{}
11828 \end_inset
11829
11830 M-z i
11831 \begin_inset Newline newline
11832 \end_inset
11833
11834
11835 \family default
11836 Introduces a new INTERIOR camera set-up.
11837  Always followed by DAY or NIGHT, or something similar to define the lighting
11838  required.
11839  Everthing on this line in CAPS.
11840 \end_layout
11841
11842 \begin_layout Itemize
11843
11844 \family sans
11845 EXT:
11846 \begin_inset space \hfill{}
11847 \end_inset
11848
11849 M-z e
11850 \begin_inset Newline newline
11851 \end_inset
11852
11853
11854 \family default
11855 Introduces a new EXTERIOR camera set-up.
11856  Everthing on this line in CAPS.
11857 \end_layout
11858
11859 \begin_layout Itemize
11860
11861 \family sans
11862 Speaker
11863 \begin_inset space \hfill{}
11864 \end_inset
11865
11866 M-z s
11867 \begin_inset Newline newline
11868 \end_inset
11869
11870
11871 \family default
11872 The character speaking.
11873 \end_layout
11874
11875 \begin_layout Itemize
11876
11877 \family sans
11878 Parenthetical
11879 \begin_inset space \hfill{}
11880 \end_inset
11881
11882 M-z p
11883 \begin_inset Newline newline
11884 \end_inset
11885
11886
11887 \family default
11888 Instructions to the speaker.
11889  The () are automatically inserted, but only the ( will show in LyX.
11890  Both will be printed.
11891 \end_layout
11892
11893 \begin_layout Itemize
11894
11895 \family sans
11896 Dialogue
11897 \begin_inset space \hfill{}
11898 \end_inset
11899
11900 M-z d
11901 \begin_inset Newline newline
11902 \end_inset
11903
11904
11905 \family default
11906 What the 
11907 \family sans
11908 Speaker
11909 \family default
11910  says.
11911 \end_layout
11912
11913 \begin_layout Itemize
11914
11915 \family sans
11916 Transition
11917 \begin_inset space \hfill{}
11918 \end_inset
11919
11920 M-z t
11921 \begin_inset Newline newline
11922 \end_inset
11923
11924
11925 \family default
11926 Camera movement instruction.
11927  e.
11928 \begin_inset space \thinspace{}
11929 \end_inset
11930
11931 g.
11932 \begin_inset space \space{}
11933 \end_inset
11934
11935 CUT TO:
11936 \end_layout
11937
11938 \begin_layout Itemize
11939
11940 \family sans
11941 FADE OUT:
11942 \begin_inset space \hfill{}
11943 \end_inset
11944
11945 M-z S-I
11946 \end_layout
11947
11948 \begin_layout Itemize
11949
11950 \family sans
11951 Author
11952 \begin_inset space \hfill{}
11953 \end_inset
11954
11955 M-z S-A
11956 \end_layout
11957
11958 \begin_layout Itemize
11959
11960 \family sans
11961 Title
11962 \begin_inset space \hfill{}
11963 \end_inset
11964
11965 M-z S-T
11966 \end_layout
11967
11968 \begin_layout Itemize
11969
11970 \family sans
11971 Right_Address
11972 \begin_inset space \hfill{}
11973 \end_inset
11974
11975 M-z r
11976 \end_layout
11977
11978 \begin_layout Subsection
11979 Script jargon
11980 \end_layout
11981
11982 \begin_layout Itemize
11983 (O.S) — off screen
11984 \end_layout
11985
11986 \begin_layout Itemize
11987 (V.0) — voice over
11988 \end_layout
11989
11990 \begin_layout Itemize
11991 b.
11992 \begin_inset space \thinspace{}
11993 \end_inset
11994
11995 g.
11996  — background
11997 \end_layout
11998
11999 \begin_layout Itemize
12000 C.U.
12001  — close-up
12002 \end_layout
12003
12004 \begin_layout Itemize
12005 PAN — camera movement
12006 \end_layout
12007
12008 \begin_layout Itemize
12009 INSERT — cut to close-up of
12010 \end_layout
12011
12012 \begin_layout Section
12013 ijmpc and ijmpd
12014 \end_layout
12015
12016 \begin_layout Standard
12017 by 
12018 \noun on
12019 Panayotis Papasotiriou
12020 \end_layout
12021
12022 \begin_layout Subsection
12023 Overview
12024 \end_layout
12025
12026 \begin_layout Standard
12027 The ijmpc package is a set of macros that facilitates electronic manuscript
12028  submission to the 
12029 \emph on
12030 International Journal of Modern Physics C
12031 \emph default
12032 .
12033  Similarly, the ijmpd package is for creating manuscripts to be submitted
12034  to the 
12035 \emph on
12036 International Journal of Modern Physics D
12037 \emph default
12038 .
12039  Both journals are published by World Scientific.
12040  The corresponding document classes are named 
12041 \family typewriter
12042 ws-ijmpc.cls
12043 \family default
12044  and 
12045 \family typewriter
12046 ws-ijmpd.cls
12047 \family default
12048 , respectively.
12049  These files, together with instructions for the authors, can be downloaded
12050  from the sites 
12051 \begin_inset Flex URL
12052 status collapsed
12053
12054 \begin_layout Plain Layout
12055
12056 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
12057 \end_layout
12058
12059 \end_inset
12060
12061  and 
12062 \begin_inset Flex URL
12063 status collapsed
12064
12065 \begin_layout Plain Layout
12066
12067 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
12068 \end_layout
12069
12070 \end_inset
12071
12072 .
12073  Both packages are modified versions of the standard 
12074 \begin_inset Quotes eld
12075 \end_inset
12076
12077 article
12078 \begin_inset Quotes erd
12079 \end_inset
12080
12081  package, and they are almost (but not exactly) identical.
12082  Most of their features are supported by LyX.
12083  I have used LyX successfully to write articles submitted to both journals
12084  without any problem.
12085 \end_layout
12086
12087 \begin_layout Subsection
12088 Writing a paper
12089 \end_layout
12090
12091 \begin_layout Standard
12092 As usual, the easiest way to write a paper is to start with a template.
12093  Click on 
12094 \family sans
12095 File\SpecialChar \menuseparator
12096 New from
12097 \family default
12098  
12099 \family sans
12100 \bar under
12101 T
12102 \bar default
12103 emplate
12104 \family default
12105 , then choose the 
12106 \family typewriter
12107 ijmpc.lyx
12108 \family default
12109  or 
12110 \family typewriter
12111 ijmpd.lyx
12112 \family default
12113  template.
12114  This will give an (almost) empty document that includes the most common
12115  fields found in a manuscript.
12116  Simply overwrite the existing text (including the brackets, 
12117 \family typewriter
12118 <>
12119 \family default
12120 ) with your text.
12121  You should keep in mind the following remarks.
12122 \end_layout
12123
12124 \begin_layout Enumerate
12125 LyX won't let you change the font size and the page style of the document,
12126  because such modifications are not allowed by both packages.
12127 \end_layout
12128
12129 \begin_layout Enumerate
12130 The language of the document should not be changed.
12131  Before previewing your paper, be sure that the babel package is not used.
12132  To do this, click on 
12133 \family sans
12134 Tools\SpecialChar \menuseparator
12135 Preferences
12136 \family default
12137 , select the 
12138 \family sans
12139 Lang Opts
12140 \family default
12141  tab, deselect the 
12142 \family sans
12143 Use babel
12144 \family default
12145  checkbox in the language settings, and click on 
12146 \family sans
12147 Apply
12148 \family default
12149  (or 
12150 \family sans
12151 Save
12152 \family default
12153 , if you wish to make this change permanent).
12154 \end_layout
12155
12156 \begin_layout Enumerate
12157 The 
12158 \begin_inset Quotes eld
12159 \end_inset
12160
12161 Keywords
12162 \begin_inset Quotes erd
12163 \end_inset
12164
12165  style must be used to define keywords.
12166 \end_layout
12167
12168 \begin_layout Enumerate
12169 The ijmpc package provides a style named 
12170 \begin_inset Quotes eld
12171 \end_inset
12172
12173 Classification Codes
12174 \begin_inset Quotes erd
12175 \end_inset
12176
12177 , which can be used to define classification codes, such as PACS numbers.
12178  Note that this facility is not supported by the ijmpd package.
12179 \end_layout
12180
12181 \begin_layout Enumerate
12182 Several new environments are available: 
12183 \begin_inset Quotes eld
12184 \end_inset
12185
12186 Definition
12187 \begin_inset Quotes erd
12188 \end_inset
12189
12190
12191 \begin_inset Quotes eld
12192 \end_inset
12193
12194 Step
12195 \begin_inset Quotes erd
12196 \end_inset
12197
12198
12199 \begin_inset Quotes eld
12200 \end_inset
12201
12202 Example
12203 \begin_inset Quotes erd
12204 \end_inset
12205
12206
12207 \begin_inset Quotes eld
12208 \end_inset
12209
12210 Remark
12211 \begin_inset Quotes erd
12212 \end_inset
12213
12214
12215 \begin_inset Quotes eld
12216 \end_inset
12217
12218 Notation
12219 \begin_inset Quotes erd
12220 \end_inset
12221
12222
12223 \begin_inset Quotes eld
12224 \end_inset
12225
12226 Theorem
12227 \begin_inset Quotes erd
12228 \end_inset
12229
12230
12231 \begin_inset Quotes eld
12232 \end_inset
12233
12234 Proof
12235 \begin_inset Quotes erd
12236 \end_inset
12237
12238
12239 \begin_inset Quotes eld
12240 \end_inset
12241
12242 Corollary
12243 \begin_inset Quotes erd
12244 \end_inset
12245
12246
12247 \begin_inset Quotes eld
12248 \end_inset
12249
12250 Lemma
12251 \begin_inset Quotes erd
12252 \end_inset
12253
12254
12255 \begin_inset Quotes eld
12256 \end_inset
12257
12258 Proposition
12259 \begin_inset Quotes erd
12260 \end_inset
12261
12262
12263 \begin_inset Quotes eld
12264 \end_inset
12265
12266 Prop
12267 \begin_inset Quotes erd
12268 \end_inset
12269
12270
12271 \begin_inset Quotes eld
12272 \end_inset
12273
12274 Question
12275 \begin_inset Quotes erd
12276 \end_inset
12277
12278
12279 \begin_inset Quotes eld
12280 \end_inset
12281
12282 Claim
12283 \begin_inset Quotes erd
12284 \end_inset
12285
12286 , and 
12287 \begin_inset Quotes eld
12288 \end_inset
12289
12290 Conjecture
12291 \begin_inset Quotes erd
12292 \end_inset
12293
12294 .
12295  Their use is more or less obvious.
12296  LyX supports all these environments; it will use the proper label, text
12297  style, and numbering scheme for each of them.
12298 \end_layout
12299
12300 \begin_layout Enumerate
12301 Both packages use basic citations; the natbib package should not be used.
12302  In LyX, citation references are shown as usual; in the output, citations
12303  are shown as superscripts.
12304  If you want to use a citation as normal text, you should use the 
12305 \family typewriter
12306 refcite
12307 \family default
12308  command, e.
12309 \begin_inset space \thinspace{}
12310 \end_inset
12311
12312 g.
12313 \begin_inset space \space{}
12314 \end_inset
12315
12316
12317 \begin_inset Quotes eld
12318 \end_inset
12319
12320 See Ref.
12321 \begin_inset space \space{}
12322 \end_inset
12323
12324
12325 \family typewriter
12326
12327 \backslash
12328 refcite{key}
12329 \family default
12330
12331 \begin_inset Quotes erd
12332 \end_inset
12333
12334 .
12335 \end_layout
12336
12337 \begin_layout Enumerate
12338 There is no 
12339 \begin_inset Quotes eld
12340 \end_inset
12341
12342 Acknowledgments
12343 \begin_inset Quotes erd
12344 \end_inset
12345
12346  section in both packages.
12347  To put acknowledgments, just use the 
12348 \begin_inset Quotes eld
12349 \end_inset
12350
12351 Section*
12352 \begin_inset Quotes erd
12353 \end_inset
12354
12355  environment.
12356 \end_layout
12357
12358 \begin_layout Enumerate
12359 Appendices may be added to the paper, 
12360 \emph on
12361 after
12362 \emph default
12363  the Acknowledgments and 
12364 \shape italic
12365 before
12366 \shape default
12367  the References.
12368  LyX provides a special environment, called 
12369 \begin_inset Quotes eld
12370 \end_inset
12371
12372 Appendices Section
12373 \begin_inset Quotes erd
12374 \end_inset
12375
12376  which marks the beginning of the appendices.
12377  This environment should be left blank; it just sends a LaTeX command, but
12378  nothing is really printed.
12379  In LyX, the word 
12380 \begin_inset Quotes eld
12381 \end_inset
12382
12383 Appendix
12384 \begin_inset Quotes erd
12385 \end_inset
12386
12387  is printed with blue letters, as a signal that all sections after that
12388  point are appendices.
12389  To write an appendix, use the 
12390 \begin_inset Quotes eld
12391 \end_inset
12392
12393 Appendix
12394 \begin_inset Quotes erd
12395 \end_inset
12396
12397  environment.
12398  LyX will number each appendix with capital letters, as required by both
12399  journals.
12400  Note that 
12401 \begin_inset Quotes eld
12402 \end_inset
12403
12404 Appendices Section
12405 \begin_inset Quotes erd
12406 \end_inset
12407
12408  
12409 \emph on
12410 must
12411 \emph default
12412  be present before the first appendix; if not, all appendices will be numbered
12413  as normal sections in the output.
12414 \end_layout
12415
12416 \begin_layout Enumerate
12417 The ijmpc and the ijmpd packages use the 
12418 \family typewriter
12419 tbl
12420 \family default
12421  command to implement table captions.
12422  As a result, a table created by LyX is printed correctly, but its caption
12423  is ignored.
12424  However, you can use some TeX code to overcome this problem, so that captions
12425  are printed as expected.
12426  To do so, create a float table as usual, remove the caption, and replace
12427  it with the TeX code 
12428 \family typewriter
12429
12430 \backslash
12431 tbl{
12432 \emph on
12433 your table caption
12434 \emph default
12435 }{
12436 \family default
12437  (sic); you must also the TeX code 
12438 \family typewriter
12439 }
12440 \family default
12441  immediately after the tabular material.
12442  Study the example table included in the template files to see how this
12443  trick is implemented.
12444  Alternatively, If you need table captions, you should implement the whole
12445  table float in a 
12446 \family typewriter
12447 .tex
12448 \family default
12449  file, then include this file to the LyX document (
12450 \family sans
12451 Insert\SpecialChar \menuseparator
12452 File\SpecialChar \menuseparator
12453 Child
12454 \begin_inset space ~
12455 \end_inset
12456
12457 Document
12458 \family default
12459 ).
12460  Details on how to create a table float can be found in the files 
12461 \family typewriter
12462 ws-ijmpc.tex
12463 \family default
12464  and 
12465 \family typewriter
12466 ws-ijmpd.tex
12467 \family default
12468 , included in the corresponding packages.
12469 \end_layout
12470
12471 \begin_layout Subsection
12472 Preparing a paper for submission
12473 \end_layout
12474
12475 \begin_layout Standard
12476 Before you submit your paper you must export the LyX document as a LaTeX
12477  file (
12478 \family sans
12479 File\SpecialChar \menuseparator
12480 Export\SpecialChar \menuseparator
12481 LaTeX
12482 \family default
12483 )
12484 \begin_inset Foot
12485 status open
12486
12487 \begin_layout Plain Layout
12488 Actually you have the choice between LaTeX (plain) and pdflatex.
12489  If you intend to use pdflatex to prepare the paper, you should use the
12490  pdflatex option so that included graphics are converted to PDF format,
12491  ready for use by pdflatex.
12492 \end_layout
12493
12494 \end_inset
12495
12496 , then make the following changes to the resulting 
12497 \family typewriter
12498 .tex
12499 \family default
12500  file.
12501 \end_layout
12502
12503 \begin_layout Enumerate
12504 Remove the comment lines before the 
12505 \family typewriter
12506
12507 \backslash
12508 documentclass
12509 \family default
12510  command.
12511 \end_layout
12512
12513 \begin_layout Enumerate
12514 Remove everything between (and including) the 
12515 \family typewriter
12516
12517 \backslash
12518 makeatletter
12519 \family default
12520  and 
12521 \family typewriter
12522
12523 \backslash
12524 makeatother
12525 \family default
12526  commands, except for any commands you specifically put into the LaTeX preamble.
12527 \end_layout
12528
12529 \begin_layout Standard
12530 The modified 
12531 \family typewriter
12532 .tex
12533 \family default
12534  file should be saved and processed through LaTeX as many times as necessary.
12535  You may also want to check the resulting 
12536 \family typewriter
12537 .dvi
12538 \family default
12539  document.
12540 \end_layout
12541
12542 \begin_layout Subsection
12543 Use of TeX code
12544 \end_layout
12545
12546 \begin_layout Standard
12547 The use of TeX code is reduced to two commands, which must be placed at
12548  the top of the document.
12549  If you started writing your paper by using the 
12550 \family typewriter
12551 ijmpc.lyx
12552 \family default
12553  or the 
12554 \family typewriter
12555 ijmpd.lyx
12556 \family default
12557  template, the TeX code needed is already in its place; you usually don't
12558  need to delete it.
12559  You may only modify the first TeX code to specify the information printed
12560  to the top of odd and even pages (authors' names and short paper's title,
12561  respectively).
12562  This TeX code must have the form 
12563 \family typewriter
12564
12565 \backslash
12566 markboth{Authors' Names}{Short Paper's Title}
12567 \family default
12568 .
12569 \end_layout
12570
12571 \begin_layout Section
12572 iopart
12573 \end_layout
12574
12575 \begin_layout Standard
12576 by 
12577 \noun on
12578 Uwe Stöhr
12579 \end_layout
12580
12581 \begin_layout Subsection
12582 Overview
12583 \end_layout
12584
12585 \begin_layout Standard
12586 The iopart package provides a document class to create electronic manuscript
12587  submission to the journals published by the Institute of Physics.
12588  Instructions for the authors how to create a paper using the iopart class
12589  can be downloaded together with the iopart package from the site 
12590 \begin_inset Flex URL
12591 status collapsed
12592
12593 \begin_layout Plain Layout
12594
12595 ftp://ftp.iop.org/pub/journals/latex2e
12596 \end_layout
12597
12598 \end_inset
12599
12600 .
12601 \end_layout
12602
12603 \begin_layout Subsection
12604 Writing a paper
12605 \end_layout
12606
12607 \begin_layout Standard
12608 The easiest way to write a paper is to start with the file 
12609 \emph on
12610 IOP-article.lyx
12611 \emph default
12612  that is available in LyX's examples files folder.
12613  Open this file, save it under a new name, and start writing.
12614  The example file explains how to use the special text environments.
12615  Here are the most important advices:
12616 \end_layout
12617
12618 \begin_layout Itemize
12619 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12620  two options 
12621 \family sans
12622 Use AMS math package
12623 \family default
12624  in the document settings under 
12625 \family sans
12626 Math Options
12627 \family default
12628  are not used!
12629 \end_layout
12630
12631 \begin_layout Itemize
12632
12633 \size normal
12634 The title environment defines the kind of your paper.
12635  So use one of the following environments for the title:
12636 \end_layout
12637
12638 \begin_deeper
12639 \begin_layout Itemize
12640
12641 \family sans
12642 \size normal
12643 Title
12644 \family default
12645  for a Paper
12646 \end_layout
12647
12648 \begin_layout Itemize
12649
12650 \family sans
12651 \size normal
12652 Review
12653 \family default
12654  for a Review
12655 \end_layout
12656
12657 \begin_layout Itemize
12658
12659 \family sans
12660 \size normal
12661 Topical
12662 \family default
12663  for a Topical review
12664 \end_layout
12665
12666 \begin_layout Itemize
12667
12668 \family sans
12669 \size normal
12670 Comment
12671 \family default
12672  for a Comment
12673 \end_layout
12674
12675 \begin_layout Itemize
12676
12677 \family sans
12678 \size normal
12679 Note
12680 \family default
12681  for a Note
12682 \end_layout
12683
12684 \begin_layout Itemize
12685
12686 \family sans
12687 \size normal
12688 Paper
12689 \family default
12690  for a Paper (same as Title)
12691 \end_layout
12692
12693 \begin_layout Itemize
12694
12695 \family sans
12696 \size normal
12697 Prelim
12698 \family default
12699  for a Preliminary communication
12700 \end_layout
12701
12702 \begin_layout Itemize
12703
12704 \family sans
12705 \size normal
12706 Rapid
12707 \family default
12708  for a Rapid communication
12709 \end_layout
12710
12711 \begin_layout Itemize
12712
12713 \family sans
12714 \size normal
12715 Letter
12716 \family default
12717  for a Letter to the editor
12718 \end_layout
12719
12720 \end_deeper
12721 \begin_layout Itemize
12722
12723 \size normal
12724 All title environments except of 
12725 \family sans
12726 Letter
12727 \family default
12728  can have an optional short title.
12729 \end_layout
12730
12731 \begin_layout Itemize
12732 There is a general title environment 
12733 \family sans
12734 Article
12735 \family default
12736  which is not directly supported by the LyX.
12737  This can be used as TeX code when your document doesn't fit into one of
12738  the other title types.
12739 \end_layout
12740
12741 \begin_layout Standard
12742 For more informations like hints for special table and formula formatting,
12743  look at the IOP author guidelines.
12744 \end_layout
12745
12746 \begin_layout Section
12747 Kluwer
12748 \end_layout
12749
12750 \begin_layout Standard
12751 by 
12752 \noun on
12753 Panayotis Papasotiriou
12754 \end_layout
12755
12756 \begin_layout Subsection
12757 Overview
12758 \end_layout
12759
12760 \begin_layout Standard
12761 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12762  that facilitates electronic manuscript submission to the journals they
12763  publish.
12764  Most known of them (at least in my domain of interest) are 
12765 \emph on
12766 Astrophysics and Space Science
12767 \emph default
12768  and 
12769 \emph on
12770 Solar Physics
12771 \emph default
12772 , but there are many others (see a complete list at 
12773 \begin_inset Flex URL
12774 status open
12775
12776 \begin_layout Plain Layout
12777
12778 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12779 \end_layout
12780
12781 \end_inset
12782
12783 ).
12784  The Kluwer package may be downloaded from the site 
12785 \begin_inset Flex URL
12786 status collapsed
12787
12788 \begin_layout Plain Layout
12789
12790 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12791 \end_layout
12792
12793 \end_inset
12794
12795 .
12796  A complete user guide is contained in that package (but it can also be
12797  downloaded separately).
12798 \end_layout
12799
12800 \begin_layout Standard
12801 LyX supports many features of the package but not everything.
12802  However, the TeX code needed is reduced to some 
12803 \begin_inset Quotes eld
12804 \end_inset
12805
12806 peculiar
12807 \begin_inset Quotes erd
12808 \end_inset
12809
12810  commands of the package (see
12811 \begin_inset space ~
12812 \end_inset
12813
12814
12815 \begin_inset CommandInset ref
12816 LatexCommand ref
12817 reference "subsec:kluwer_peculiarities"
12818
12819 \end_inset
12820
12821 ).
12822  I have recently used LyX to write an article submitted to the 
12823 \emph on
12824 Astrophysics and Space Science
12825 \emph default
12826  without any problem.
12827 \end_layout
12828
12829 \begin_layout Subsection
12830 Writing a paper
12831 \end_layout
12832
12833 \begin_layout Standard
12834 The easiest way to write a paper is to start with the Kluwer template file.
12835  Click on 
12836 \family sans
12837 File\SpecialChar \menuseparator
12838 New from
12839 \family default
12840  
12841 \family sans
12842 Template
12843 \family default
12844 , then choose the 
12845 \family typewriter
12846 kluwer.lyx
12847 \family default
12848  template.
12849  This will give an (almost) empty document that includes the most common
12850  fields found in a manuscript and a short description of their use.
12851  As in most templates, simply overwrite the existing text (including the
12852  brackets, 
12853 \family typewriter
12854 <>
12855 \family default
12856 ) with the correct information.
12857 \end_layout
12858
12859 \begin_layout Subsection
12860 Preparing a paper for submission
12861 \end_layout
12862
12863 \begin_layout Standard
12864 As in the AASTeX package, before you submit your paper to a journal you
12865  must 
12866 \begin_inset Quotes eld
12867 \end_inset
12868
12869 postprocess
12870 \begin_inset Quotes erd
12871 \end_inset
12872
12873  it as follows.
12874 \end_layout
12875
12876 \begin_layout Enumerate
12877 Export your paper as a LaTeX file.
12878  To do this, click on 
12879 \family sans
12880 File\SpecialChar \menuseparator
12881 Export\SpecialChar \menuseparator
12882 LaTeX
12883 \family default
12884 .
12885  
12886 \end_layout
12887
12888 \begin_layout Enumerate
12889 Edit the resulting 
12890 \family typewriter
12891 .tex
12892 \family default
12893  file with a text editor and make the following changes
12894 \end_layout
12895
12896 \begin_deeper
12897 \begin_layout Enumerate
12898 remove the comment lines before the 
12899 \family typewriter
12900
12901 \backslash
12902 documentclass
12903 \family default
12904  command,
12905 \end_layout
12906
12907 \begin_layout Enumerate
12908 remove everything between (and including) the 
12909 \family typewriter
12910
12911 \backslash
12912 makeatletter
12913 \family default
12914  and 
12915 \family typewriter
12916
12917 \backslash
12918 makeatother
12919 \family default
12920  commands, except for any commands you specifically put into the LaTeX preamble.
12921 \end_layout
12922
12923 \begin_layout Standard
12924 Save the resulting 
12925 \family typewriter
12926 .tex
12927 \family default
12928  file.
12929 \end_layout
12930
12931 \end_deeper
12932 \begin_layout Enumerate
12933 Run the 
12934 \family typewriter
12935 .tex
12936 \family default
12937  file through LaTeX as many times as necessary (usually up to three).
12938 \end_layout
12939
12940 \begin_layout Enumerate
12941 View the resulting 
12942 \family typewriter
12943 .dvi
12944 \family default
12945  document using, e.
12946 \begin_inset space \thinspace{}
12947 \end_inset
12948
12949 g.
12950 \begin_inset space \space{}
12951 \end_inset
12952
12953
12954 \family sans
12955 xdvi
12956 \family default
12957 , and check if everything is OK (it should, if you didn't make any mistake).
12958 \end_layout
12959
12960 \begin_layout Subsection
12961 \begin_inset Quotes eld
12962 \end_inset
12963
12964 Peculiarities
12965 \begin_inset Quotes erd
12966 \end_inset
12967
12968  of the Kluwer package
12969 \begin_inset CommandInset label
12970 LatexCommand label
12971 name "subsec:kluwer_peculiarities"
12972
12973 \end_inset
12974
12975
12976 \end_layout
12977
12978 \begin_layout Standard
12979 The Kluwer package has the following 
12980 \begin_inset Quotes eld
12981 \end_inset
12982
12983 peculiarities
12984 \begin_inset Quotes erd
12985 \end_inset
12986
12987 .
12988 \end_layout
12989
12990 \begin_layout Enumerate
12991 It is possible to write multiple articles in the same LaTeX file
12992 \begin_inset Foot
12993 status collapsed
12994
12995 \begin_layout Plain Layout
12996 I can't imagine any good reason to do this.
12997 \end_layout
12998
12999 \end_inset
13000
13001 .
13002  Each article must be included in the environment 
13003 \begin_inset Quotes eld
13004 \end_inset
13005
13006 article
13007 \begin_inset Quotes erd
13008 \end_inset
13009
13010 .
13011  Unfortunately, this environment cannot be omitted, even if you write just
13012  one article.
13013  Therefore, each article starts with the command 
13014 \family typewriter
13015
13016 \backslash
13017 begin{article}
13018 \family default
13019  and, obviously, ends with the command 
13020 \family typewriter
13021
13022 \backslash
13023 end{article}
13024 \family default
13025 .
13026  Although this can be implemented in LyX, I didn't included it, since it
13027  looks ugly and can confuse the novice user.
13028  Therefore, you need to enter them directly and mark them as LaTeX code
13029  (the well-known 
13030 \begin_inset Quotes eld
13031 \end_inset
13032
13033 TeX code
13034 \begin_inset Quotes erd
13035 \end_inset
13036
13037 ).
13038 \end_layout
13039
13040 \begin_layout Enumerate
13041 Information given at the beginning of the article (i.
13042 \begin_inset space \thinspace{}
13043 \end_inset
13044
13045 g.
13046 \begin_inset space \space{}
13047 \end_inset
13048
13049 title, subtitle, author, institution, running title, running author, abstract
13050  and keywords) must be included in an environment called 
13051 \begin_inset Quotes eld
13052 \end_inset
13053
13054 opening
13055 \begin_inset Quotes erd
13056 \end_inset
13057
13058 .
13059  This is not implemented in LyX, so you must enter title, subtitle etc.
13060 \begin_inset space ~
13061 \end_inset
13062
13063 between two TeX code lines (
13064 \family typewriter
13065
13066 \backslash
13067 begin{opening}
13068 \family default
13069  and 
13070 \family typewriter
13071
13072 \backslash
13073 end{opening}
13074 \family default
13075 ).
13076 \end_layout
13077
13078 \begin_layout Enumerate
13079 According to the user manual, the label of each bibliography item must be
13080  written as 
13081 \family typewriter
13082
13083 \backslash
13084 protect
13085 \backslash
13086 citeauthoryear{
13087 \family default
13088 \emph on
13089 author(s)
13090 \family typewriter
13091 \emph default
13092 }{
13093 \family default
13094 \emph on
13095 year
13096 \family typewriter
13097 \emph default
13098 }
13099 \family default
13100 .
13101 \end_layout
13102
13103 \begin_layout Standard
13104 The 
13105 \family typewriter
13106 kluwer.lyx
13107 \family default
13108  template takes care of all these 
13109 \begin_inset Quotes eld
13110 \end_inset
13111
13112 peculiarities
13113 \begin_inset Quotes erd
13114 \end_inset
13115
13116 .
13117  If you start a new paper using this template you don't need to do anything
13118  special.
13119  Just 
13120 \end_layout
13121
13122 \begin_layout Enumerate
13123 don't delete the TeX code included in the template, and
13124 \end_layout
13125
13126 \begin_layout Enumerate
13127 copy the example bibliography item included in the template and modify it
13128  as necessary to enter new bibliography items.
13129 \end_layout
13130
13131 \begin_layout Section
13132 Koma-Script
13133 \end_layout
13134
13135 \begin_layout Standard
13136 by 
13137 \noun on
13138 Bernd Rellermeyer
13139 \end_layout
13140
13141 \begin_layout Subsection
13142 Overview
13143 \end_layout
13144
13145 \begin_layout Standard
13146 The LyX document classes 
13147 \emph on
13148 article (koma-script)
13149 \emph default
13150
13151 \emph on
13152 report (koma-script)
13153 \emph default
13154
13155 \emph on
13156 book
13157 \emph default
13158  
13159 \emph on
13160 (koma-script)
13161 \emph default
13162 , and 
13163 \emph on
13164 letter
13165 \emph default
13166  
13167 \emph on
13168 (koma-script)
13169 \emph default
13170  correspond to the LaTeX document classes 
13171 \family typewriter
13172 scrartcl.cls
13173 \family default
13174
13175 \family typewriter
13176 scrreprt.cls
13177 \family default
13178
13179 \family typewriter
13180 scrbook.cls
13181 \family default
13182 , and 
13183 \family typewriter
13184 scrlettr.cls
13185 \family default
13186 , resp.
13187 \begin_inset space ~
13188 \end_inset
13189
13190 of the Koma-Script family.
13191  They are replacements for the standard document classes 
13192 \family typewriter
13193 article.cls
13194 \family default
13195
13196 \family typewriter
13197 report.cls
13198 \family default
13199
13200 \family typewriter
13201 book.cls
13202 \family default
13203  and 
13204 \family typewriter
13205 letter.cls
13206 \family default
13207 , resp., and fit better to European typography conventions in a number of
13208  points.
13209 \end_layout
13210
13211 \begin_layout Itemize
13212 Standard character size is 11pt in 
13213 \emph on
13214 article (koma-script)
13215 \emph default
13216
13217 \emph on
13218 report (koma-script)
13219 \emph default
13220 , and 
13221 \emph on
13222 book (koma-script)
13223 \emph default
13224 , and 12pt in 
13225 \emph on
13226 letter (koma-script)
13227 \emph default
13228 .
13229 \end_layout
13230
13231 \begin_layout Itemize
13232 Headings, labels of the description environment, and a number of elements
13233  of the 
13234 \emph on
13235 letter (koma-script)
13236 \emph default
13237  document class are set in a bold sans serif font.
13238 \begin_inset Foot
13239 status collapsed
13240
13241 \begin_layout Plain Layout
13242 There is a big difference between the bold sans serif old cm fonts and new
13243  ec fonts, especially in the appearance of headings.
13244  In comparison, the ec bold sans serif fonts look a bit thin.
13245  Here the LaTeX package 
13246 \family typewriter
13247 cmsd.sty by
13248 \family default
13249  
13250 \shape smallcaps
13251 Walter Schmidt
13252 \shape default
13253  helps to produce the 
13254 \begin_inset Quotes eld
13255 \end_inset
13256
13257 usual
13258 \begin_inset Quotes erd
13259 \end_inset
13260
13261  appearance when using the ec fonts.
13262 \end_layout
13263
13264 \end_inset
13265
13266  The numbering of chapter headings is made in the same way as the numbering
13267  of section headings, that is without the extra line 
13268 \begin_inset Quotes eld
13269 \end_inset
13270
13271 Chapter\SpecialChar \ldots{}
13272
13273 \begin_inset Quotes erd
13274 \end_inset
13275
13276 .
13277  In addition, the appearance of the headings can be modified by using a
13278  number of options (in LyX to be entered in the field 
13279 \family sans
13280 Extra
13281 \begin_inset space ~
13282 \end_inset
13283
13284 Options
13285 \family default
13286  of the dialog 
13287 \family sans
13288 Layout\SpecialChar \menuseparator
13289 Document
13290 \family default
13291 ).
13292  
13293 \end_layout
13294
13295 \begin_layout Itemize
13296 The main means in the Koma-Script document classes to design the type area
13297  are the options 
13298 \family sans
13299 BCOR
13300 \family default
13301  and 
13302 \family sans
13303 DIV
13304 \family default
13305  (in LyX to be entered in the extra class options field in the dialog 
13306 \family sans
13307 Document\SpecialChar \menuseparator
13308 Settings
13309 \family default
13310 ).
13311  They make a clearer modification of page margins possible as do the options
13312  of the dialog 
13313 \family sans
13314 Document\SpecialChar \menuseparator
13315 Settings
13316 \family default
13317 .
13318  
13319 \end_layout
13320
13321 \begin_layout Itemize
13322 The LaTeX document classes of the Koma-Script family define a number of
13323  additional commands.
13324  Those part of it which makes sense in LyX is implemented in corresponding
13325  paragraph types.
13326 \end_layout
13327
13328 \begin_layout Standard
13329 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13330  can be found in the Koma-Script documentation 
13331 \emph on
13332 scrguide
13333 \emph default
13334  (German) and 
13335 \emph on
13336 scrguien
13337 \emph default
13338  (English).
13339 \end_layout
13340
13341 \begin_layout Subsection
13342 article (koma-script), report (koma-script), and book (koma-script)
13343 \end_layout
13344
13345 \begin_layout Standard
13346 The document classes 
13347 \emph on
13348 article (koma-script)
13349 \emph default
13350
13351 \emph on
13352 report (koma-script)
13353 \emph default
13354 , and 
13355 \emph on
13356 book
13357 \emph default
13358  
13359 \emph on
13360 (koma-script)
13361 \emph default
13362  are implemented in the layout files 
13363 \family typewriter
13364 scrartcl.layout
13365 \family default
13366
13367 \family typewriter
13368 scrreprt.layout
13369 \family default
13370 , and 
13371 \family typewriter
13372 scrbook.layout
13373 \family default
13374 , resp.
13375  They contain all the paragraph types of the corresponding standard document
13376  classes 
13377 \emph on
13378 article
13379 \emph default
13380
13381 \emph on
13382 report
13383 \emph default
13384 , and 
13385 \emph on
13386 book
13387 \emph default
13388 , resp., partly modified, with the exception of the LyX specific 
13389 \family sans
13390 List
13391 \family default
13392 -type, which is replaced by the new 
13393 \family sans
13394 Labeling
13395 \family default
13396 -type having the same functionality.
13397  Beside the 
13398 \family sans
13399 Labeling
13400 \family default
13401 -Type there is a number of new paragraph types added.
13402  They are 
13403 \emph on
13404 not
13405 \emph default
13406  part of 
13407 \emph on
13408 letter (koma-script)
13409 \emph default
13410 .
13411 \end_layout
13412
13413 \begin_layout Itemize
13414
13415 \family sans
13416 Addpart, Addchap
13417 \family default
13418
13419 \family sans
13420 Addsec
13421 \family default
13422 : are equivalents to 
13423 \family sans
13424 Part*, Chapter*
13425 \family default
13426  and 
13427 \family sans
13428 Section*
13429 \family default
13430 , resp., additionally inserting an entry in the table of contents.
13431  
13432 \family sans
13433 Addpart
13434 \family default
13435  and 
13436 \family sans
13437 Addchap
13438 \family default
13439  are not contained in 
13440 \emph on
13441 article (koma-script)
13442 \emph default
13443 .
13444 \end_layout
13445
13446 \begin_layout Itemize
13447
13448 \family sans
13449 Addchap*
13450 \family default
13451
13452 \family sans
13453 Addsec*
13454 \family default
13455 : behave exactly as 
13456 \family sans
13457 Addchap
13458 \family default
13459  and 
13460 \family sans
13461 Addsec
13462 \family default
13463 , resp., additionally clearing running heads.
13464  
13465 \family sans
13466 Addchap*
13467 \family default
13468  is not contained in 
13469 \emph on
13470 article (koma-script)
13471 \emph default
13472 .
13473 \begin_inset Foot
13474 status collapsed
13475
13476 \begin_layout Plain Layout
13477 There is also an 
13478 \family typewriter
13479
13480 \backslash
13481 addpart*
13482 \family default
13483  command in 
13484 \emph on
13485 book (koma-script)
13486 \emph default
13487  and in 
13488 \emph on
13489 report (koma-script)
13490 \emph default
13491 , but since this is identical to 
13492 \family sans
13493 Part*
13494 \family default
13495 , is has not been implemented in LyX.
13496 \end_layout
13497
13498 \end_inset
13499
13500
13501 \end_layout
13502
13503 \begin_layout Itemize
13504
13505 \family sans
13506 Minisec
13507 \family default
13508 : generates a heading directly above the following paragraph in the standard
13509  character size without affecting the structure of the document.
13510 \end_layout
13511
13512 \begin_layout Itemize
13513
13514 \family sans
13515 Captionabove
13516 \family default
13517  and 
13518 \family sans
13519 Captionbelow
13520 \family default
13521  are special captions which respect the different space settings needed
13522  for captions placed above or below an element (if you follow strict typographic
13523  rules, you might want to place table captions always above the table).
13524  You can also use the class option 
13525 \family typewriter
13526 tablecaptionsabove
13527 \family default
13528 , which will switch 
13529 \family sans
13530 caption
13531 \family default
13532  to 
13533 \family sans
13534 captionabove
13535 \family default
13536  for tables and 
13537 \family sans
13538 captionbelow
13539 \family default
13540  for figures.
13541  You need at least Koma-Script version 2.8q to use this.
13542 \end_layout
13543
13544 \begin_layout Itemize
13545
13546 \family sans
13547 Dictum
13548 \family default
13549 : can be used to set a bonmot, e.
13550 \begin_inset space \thinspace{}
13551 \end_inset
13552
13553 g.
13554 \begin_inset space \space{}
13555 \end_inset
13556
13557 at the beginning of a chapter.
13558  If you use the optional argument (
13559 \family sans
13560 Insert\SpecialChar \menuseparator
13561 Short
13562 \begin_inset space ~
13563 \end_inset
13564
13565 Title
13566 \family default
13567 ), you can insert the dictum's author there.
13568  Dictum and author are separated by a line.
13569  You need at least Koma-Script version 2.8q to use this.
13570  
13571 \family sans
13572 Dictum
13573 \family default
13574  is not contained in 
13575 \emph on
13576 article (koma-script)
13577 \emph default
13578 .
13579 \end_layout
13580
13581 \begin_layout Standard
13582 The following types, together with the standard types 
13583 \family sans
13584 Title
13585 \family default
13586
13587 \family sans
13588 Author
13589 \family default
13590 , and 
13591 \family sans
13592 Date
13593 \family default
13594 , form the title area of the document.
13595  They must be entered ahead of the first 
13596 \begin_inset Quotes eld
13597 \end_inset
13598
13599 ordinary
13600 \begin_inset Quotes erd
13601 \end_inset
13602
13603  paragraph.
13604 \begin_inset Foot
13605 status collapsed
13606
13607 \begin_layout Plain Layout
13608 The corresponding LaTeX commands must appear before the 
13609 \family typewriter
13610
13611 \backslash
13612 maketitle
13613 \family default
13614  command.
13615 \end_layout
13616
13617 \end_inset
13618
13619  When such a type is used more than once, the latter usage overwrites the
13620  former one, that means, for every type only the latest usage is valid.
13621  The order of the different types however has, like 
13622 \family sans
13623 Title
13624 \family default
13625
13626 \family sans
13627 Author
13628 \family default
13629 , and 
13630 \family sans
13631 Date
13632 \family default
13633 , no effect on the appearance of the produced document.
13634 \end_layout
13635
13636 \begin_layout Itemize
13637
13638 \family sans
13639 Subject
13640 \family default
13641 : produces a centered paragraph above the ordinary title (
13642 \family sans
13643 Title
13644 \family default
13645
13646 \family sans
13647 Author
13648 \family default
13649
13650 \family sans
13651 Date
13652 \family default
13653 ) for the subject of the document.
13654 \end_layout
13655
13656 \begin_layout Itemize
13657
13658 \family sans
13659 Publishers
13660 \family default
13661 : produces a centered paragraph below the ordinary title (
13662 \family sans
13663 Title
13664 \family default
13665
13666 \family sans
13667 Author
13668 \family default
13669
13670 \family sans
13671 Date
13672 \family default
13673 ) for the publishers' name.
13674 \end_layout
13675
13676 \begin_layout Itemize
13677
13678 \family sans
13679 Dedication
13680 \family default
13681 : in 
13682 \emph on
13683 report (koma-script)
13684 \emph default
13685  and 
13686 \emph on
13687 book (koma-script)
13688 \emph default
13689  produces a centered paragraph on its own page behind the title page, or
13690  in 
13691 \emph on
13692 article (koma-script)
13693 \emph default
13694  produces a centered paragraph below the ordinary title (
13695 \family sans
13696 Title
13697 \family default
13698
13699 \family sans
13700 Author
13701 \family default
13702
13703 \family sans
13704 Date
13705 \family default
13706
13707 \family sans
13708 Publishers
13709 \family default
13710 ) for a dedication.
13711 \end_layout
13712
13713 \begin_layout Itemize
13714
13715 \family sans
13716 Titlehead
13717 \family default
13718 : produces a left aligned paragraph above the ordinary title (
13719 \family sans
13720 Title
13721 \family default
13722
13723 \family sans
13724 Author
13725 \family default
13726
13727 \family sans
13728 Date
13729 \family default
13730
13731 \family sans
13732 Subject
13733 \family default
13734 ) for a document`s head.
13735 \end_layout
13736
13737 \begin_layout Itemize
13738
13739 \family sans
13740 Uppertitleback
13741 \family default
13742 : produces in a double-sided print in 
13743 \emph on
13744 report (koma-script)
13745 \emph default
13746  and 
13747 \emph on
13748 book (koma-script)
13749 \emph default
13750  a left-aligned paragraph at the top of the title page`s back or has no
13751  effect in a single-sided print or in 
13752 \emph on
13753 article (koma-script)
13754 \emph default
13755 .
13756 \end_layout
13757
13758 \begin_layout Itemize
13759
13760 \family sans
13761 Lowertitleback
13762 \family default
13763 : produces in a double-sided print in 
13764 \emph on
13765 report (koma-script)
13766 \emph default
13767  and 
13768 \emph on
13769 book (koma-script)
13770 \emph default
13771  a left-aligned paragraph at the bottom of the title page`s back or has
13772  no effect in a single-sided print or in 
13773 \emph on
13774 article (koma-script)
13775 \emph default
13776 .
13777 \end_layout
13778
13779 \begin_layout Itemize
13780
13781 \family sans
13782 Extratitle
13783 \family default
13784 : produces a special 
13785 \begin_inset Quotes eld
13786 \end_inset
13787
13788 dirty
13789 \begin_inset Quotes erd
13790 \end_inset
13791
13792  page ahead of the actual document containing a paragraph without special
13793  formatting.
13794 \end_layout
13795
13796 \begin_layout Standard
13797 The layout files for the document classes 
13798 \emph on
13799 article (koma-script)
13800 \emph default
13801
13802 \emph on
13803 report (koma-script)
13804 \emph default
13805 , and 
13806 \emph on
13807 book (koma-script)
13808 \emph default
13809  do include the file 
13810 \family typewriter
13811 scrmacros.inc
13812 \family default
13813 .
13814  This is thought of as a place to define your own types.
13815  Copy scrmacros
13816 \family typewriter
13817 .inc
13818 \family default
13819  in your personal layout directory and edit the file!
13820 \end_layout
13821
13822 \begin_layout Subsection
13823 letter (koma-script)
13824 \end_layout
13825
13826 \begin_layout Standard
13827 \begin_inset ERT
13828 status open
13829
13830 \begin_layout Plain Layout
13831
13832
13833 \backslash
13834 begin{sloppypar}
13835 \end_layout
13836
13837 \end_inset
13838
13839
13840 \end_layout
13841
13842 \begin_layout Standard
13843 \noindent
13844 The document class 
13845 \emph on
13846 letter (koma-script)
13847 \emph default
13848  is implemented in the layout file 
13849 \family typewriter
13850 scrlettr.layout
13851 \family default
13852 .
13853  It contains all the paragraph types of the corresponding standard document
13854  class 
13855 \emph on
13856 letter
13857 \emph default
13858 , partly modified, with the exception of the LyX specific types 
13859 \family sans
13860 LyX-Code
13861 \family default
13862  and 
13863 \family sans
13864 Comment
13865 \family default
13866  and the 
13867 \family sans
13868 List
13869 \family default
13870  type, which is replaced by the new 
13871 \family sans
13872 Labeling
13873 \family default
13874  type.
13875  In addition, it contains, in contrast to the standard document class, the
13876  standard types 
13877 \family sans
13878 LaTeX
13879 \family default
13880
13881 \family sans
13882 Quotation
13883 \family default
13884
13885 \family sans
13886 Quote
13887 \family default
13888 , and 
13889 \family sans
13890 Verse
13891 \family default
13892 .
13893  Furthermore, there are a number of new letter specific types.
13894 \end_layout
13895
13896 \begin_layout Standard
13897 \begin_inset ERT
13898 status open
13899
13900 \begin_layout Plain Layout
13901
13902
13903 \backslash
13904 end{sloppypar}
13905 \end_layout
13906
13907 \end_inset
13908
13909
13910 \end_layout
13911
13912 \begin_layout Standard
13913 The appearance of the letter produced by this document class can be controlled
13914  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13915 \begin_inset Foot
13916 status collapsed
13917
13918 \begin_layout Plain Layout
13919 For example, the standard appearance of the letter`s heading, consisting
13920  of name and address, is quite self-willed.
13921  An 
13922 \begin_inset Quotes eld
13923 \end_inset
13924
13925 ordinary
13926 \begin_inset Quotes erd
13927 \end_inset
13928
13929  heading is produced by the following LaTeX commands in the preamble:
13930 \end_layout
13931
13932 \begin_layout LyX-Code
13933
13934 \backslash
13935 firsthead{
13936 \backslash
13937 parbox[b]{
13938 \backslash
13939 textwidth}
13940 \end_layout
13941
13942 \begin_layout LyX-Code
13943   {
13944 \backslash
13945 ignorespaces 
13946 \backslash
13947 fromname
13948 \backslash
13949
13950 \backslash
13951  
13952 \backslash
13953 ignorespaces 
13954 \backslash
13955 fromaddress}} 
13956 \end_layout
13957
13958 \begin_layout LyX-Code
13959
13960 \backslash
13961 nexthead{
13962 \backslash
13963 parbox[b]{
13964 \backslash
13965 textwidth}
13966 \end_layout
13967
13968 \begin_layout LyX-Code
13969   {
13970 \backslash
13971 ignorespaces 
13972 \backslash
13973 fromname 
13974 \backslash
13975 hfill 
13976 \backslash
13977 ignorespaces 
13978 \backslash
13979 pagename
13980 \backslash
13981  
13982 \backslash
13983 thepage}}
13984 \end_layout
13985
13986 \end_inset
13987
13988  A detailed German description of such LaTeX commands can be found in the
13989  Koma-Script documentation 
13990 \emph on
13991 scrguide
13992 \emph default
13993 .
13994  With it, the letter's author can produce his personal letter layout.
13995 \end_layout
13996
13997 \begin_layout Standard
13998 The types 
13999 \family sans
14000 Letter
14001 \family default
14002  and 
14003 \family sans
14004 Opening
14005 \family default
14006  define the beginning of the letter and must be used in every letter.
14007  To emphasize them in the LyX document class, they are marked with the letter
14008  
14009 \shape italic
14010 L
14011 \shape default
14012  or 
14013 \shape italic
14014 O
14015 \shape default
14016 , resp.
14017 \begin_inset space ~
14018 \end_inset
14019
14020 in the left margin.
14021  It is possible to write any number of letters in one file.
14022  An 
14023 \family sans
14024 Opening
14025 \family default
14026  type produces a new letter using the same addressee and a 
14027 \family sans
14028 Letter
14029 \family default
14030  type produces a new addressee.
14031  The types 
14032 \family sans
14033 Closing
14034 \family default
14035
14036 \family sans
14037 PS
14038 \family default
14039
14040 \family sans
14041 CC
14042 \family default
14043 , and 
14044 \family sans
14045 Encl
14046 \family default
14047  are ordinary paragraph types and can also be used several times in one
14048  and the same letter.
14049 \end_layout
14050
14051 \begin_layout Itemize
14052
14053 \family sans
14054 Letter
14055 \family default
14056 : produces a paragraph for the addressee and implicitly defines the beginning
14057  of the letter.
14058 \end_layout
14059
14060 \begin_layout Itemize
14061
14062 \family sans
14063 Opening
14064 \family default
14065 : produces a paragraph for the form of address and implicitly produces a
14066  new letter.
14067 \end_layout
14068
14069 \begin_layout Itemize
14070
14071 \family sans
14072 Closing
14073 \family default
14074 : produces a paragraph for a close.
14075 \end_layout
14076
14077 \begin_layout Itemize
14078
14079 \family sans
14080 PS
14081 \family default
14082 : produces a paragraph for a postscript.
14083 \end_layout
14084
14085 \begin_layout Itemize
14086
14087 \family sans
14088 CC
14089 \family default
14090 : produces a paragraph for a distribution list.
14091 \end_layout
14092
14093 \begin_layout Itemize
14094
14095 \family sans
14096 Encl
14097 \family default
14098 : produces a paragraph for enclosures.
14099 \end_layout
14100
14101 \begin_layout Standard
14102 The types 
14103 \family sans
14104 Name
14105 \family default
14106
14107 \family sans
14108 Signature
14109 \family default
14110
14111 \family sans
14112 Address
14113 \family default
14114
14115 \family sans
14116 Telephone
14117 \family default
14118
14119 \family sans
14120 Place
14121 \family default
14122
14123 \family sans
14124 Backaddress
14125 \family default
14126
14127 \family sans
14128 Specialmail
14129 \family default
14130
14131 \family sans
14132 Location
14133 \family default
14134
14135 \family sans
14136 Title
14137 \family default
14138 , and 
14139 \family sans
14140 Subject
14141 \family default
14142  are input types provided with a label to enter information, which will
14143  be processed by the document class.
14144 \begin_inset Foot
14145 status open
14146
14147 \begin_layout Plain Layout
14148 It could be seen as a matter of inconsequence, that the types 
14149 \family sans
14150 Letter
14151 \family default
14152  and 
14153 \family sans
14154 Opening
14155 \family default
14156  described above are not such input types as well.
14157  Because of the special meaning of those types, however, I have implemented
14158  them as ordinary paragraph types with a one letter mark in the left margin.
14159  Moreover, it would affect my feeling of symmetry, if the 
14160 \family sans
14161 Opening
14162 \family default
14163  type and the 
14164 \family sans
14165 Closing
14166 \family default
14167  type had such a serious different appearance.
14168 \end_layout
14169
14170 \end_inset
14171
14172  The types must be used ahead of the corresponding 
14173 \family sans
14174 Opening
14175 \family default
14176  type.
14177 \end_layout
14178
14179 \begin_layout Standard
14180 An implementation of these types in a WYSIWYG fashion does not seem to make
14181  sense, because the real appearance of the produced letter does not only
14182  depend on the usage of the particular type, but also on other factors.
14183  For example, a signature entered in the 
14184 \family sans
14185 Signature
14186 \family default
14187  type will in the standard behavior appear in the produced letter only,
14188  when in the same letter also a 
14189 \family sans
14190 Closing
14191 \family default
14192  type is used.
14193  The entered value of the 
14194 \family sans
14195 Telephone
14196 \family default
14197  type will in the standard behavior not appear in the produced letter at
14198  all.
14199  The possibility to design the letter`s heading freely is already indicated
14200  in a footnote above.
14201 \end_layout
14202
14203 \begin_layout Standard
14204 The input types can also be used as empty paragraphs.
14205  This makes sense e.
14206 \begin_inset space \thinspace{}
14207 \end_inset
14208
14209 g.
14210 \begin_inset space \space{}
14211 \end_inset
14212
14213 for the 
14214 \family sans
14215 Signature
14216 \family default
14217  type.
14218  If the 
14219 \family sans
14220 Signature
14221 \family default
14222  type is not used at all, in the standard behavior the value of the 
14223 \family sans
14224 Name
14225 \family default
14226  type is used as signature, whereas if an empty 
14227 \family sans
14228 Signature
14229 \family default
14230  type is used, no signature value is defined.
14231 \end_layout
14232
14233 \begin_layout Standard
14234 By using the input types it is possible to write a letter template, containing
14235  filled input types with your personal dates (name, address, etc.) and empty
14236  input types for other dates you want to enter.
14237 \end_layout
14238
14239 \begin_layout Itemize
14240
14241 \family sans
14242 Name
14243 \family default
14244 : sender's name, in the standard behavior appears as a centered paragraph
14245  in small caps in the letter`s heading.
14246 \end_layout
14247
14248 \begin_layout Itemize
14249
14250 \family sans
14251 Signature
14252 \family default
14253 : sender's signature, in the standard behavior appears below the 
14254 \family sans
14255 Closing
14256 \family default
14257  type.
14258  If no 
14259 \family sans
14260 Signature
14261 \family default
14262  type is used, the value of the 
14263 \family sans
14264 Name
14265 \family default
14266  type appears instead.
14267 \end_layout
14268
14269 \begin_layout Itemize
14270
14271 \family sans
14272 Address
14273 \family default
14274 : sender's address, in the standard behavior appears in a centered paragraph
14275  in the letter`s heading below the sender's name.
14276 \end_layout
14277
14278 \begin_layout Itemize
14279
14280 \family sans
14281 Telephone
14282 \family default
14283 : sender's telephone number, in the standard behavior only sets the LaTeX
14284  variable 
14285 \family typewriter
14286
14287 \backslash
14288 telephonenum
14289 \family default
14290 .
14291 \end_layout
14292
14293 \begin_layout Itemize
14294
14295 \family sans
14296 Place
14297 \family default
14298 : place of the letter`s making.
14299 \end_layout
14300
14301 \begin_layout Itemize
14302
14303 \family sans
14304 Date
14305 \family default
14306 : date of the letter`s making.
14307  
14308 \family sans
14309 Place
14310 \family default
14311  and 
14312 \family sans
14313 Date
14314 \family default
14315 , in the standard behavior, produce the place and the date in a right-aligned
14316  line below the addressee's field.
14317  If an empty 
14318 \family sans
14319 Date
14320 \family default
14321  type is used, neither place nor date appear, independent of the value of
14322  the 
14323 \family sans
14324 Place
14325 \family default
14326  type.
14327  If no 
14328 \family sans
14329 Date
14330 \family default
14331  type is used, the date of the letter `s production is used.
14332 \end_layout
14333
14334 \begin_layout Itemize
14335
14336 \family sans
14337 Backaddress
14338 \family default
14339 : sender`s back address, in the standard behavior appears above the addressee's
14340  field in a small sans serif font.
14341 \end_layout
14342
14343 \begin_layout Itemize
14344
14345 \family sans
14346 Specialmail
14347 \family default
14348 : special mail information, in the standard behavior appears underlined
14349  above the addressee's field below the back address.
14350 \end_layout
14351
14352 \begin_layout Itemize
14353
14354 \family sans
14355 Location
14356 \family default
14357 : additional information, in the standard behavior appears on right side
14358  below the addressee`s field.
14359 \end_layout
14360
14361 \begin_layout Itemize
14362
14363 \family sans
14364 Title
14365 \family default
14366 : the letter's title, in the standard behavior appears in a big, bold, sans
14367  serif font above the subject.
14368 \end_layout
14369
14370 \begin_layout Itemize
14371
14372 \family sans
14373 Subject
14374 \family default
14375 : the letter's subject, in the standard behavior appears in a bold font
14376  above the 
14377 \family sans
14378 Opening
14379 \family default
14380  paragraph.
14381 \end_layout
14382
14383 \begin_layout Standard
14384 The types 
14385 \family sans
14386 Yourref
14387 \family default
14388
14389 \family sans
14390 Yourmail
14391 \family default
14392
14393 \family sans
14394 Myref
14395 \family default
14396
14397 \family sans
14398 Customer
14399 \family default
14400 , and 
14401 \family sans
14402 Invoice
14403 \family default
14404  produce a business letter like line above the 
14405 \family sans
14406 Title
14407 \family default
14408  line containing the fields 
14409 \begin_inset Quotes eld
14410 \end_inset
14411
14412 Your ref.
14413 \begin_inset Quotes erd
14414 \end_inset
14415
14416
14417 \begin_inset Quotes eld
14418 \end_inset
14419
14420 Your letter of
14421 \begin_inset Quotes erd
14422 \end_inset
14423
14424
14425 \begin_inset Quotes eld
14426 \end_inset
14427
14428 Our ref.
14429 \begin_inset Quotes erd
14430 \end_inset
14431
14432
14433 \begin_inset Quotes eld
14434 \end_inset
14435
14436 Customer no.
14437 \begin_inset Quotes erd
14438 \end_inset
14439
14440
14441 \begin_inset Quotes eld
14442 \end_inset
14443
14444 Invoice no.
14445 \begin_inset Quotes erd
14446 \end_inset
14447
14448 , and 
14449 \begin_inset Quotes eld
14450 \end_inset
14451
14452 Date
14453 \begin_inset Quotes erd
14454 \end_inset
14455
14456 .
14457  For the date field, the value of the 
14458 \family sans
14459 Date
14460 \family default
14461  type is used.
14462  If one of these 
14463 \begin_inset Quotes eld
14464 \end_inset
14465
14466 business letter types
14467 \begin_inset Quotes erd
14468 \end_inset
14469
14470  is used, the value of the 
14471 \family sans
14472 Place
14473 \family default
14474  type however does not appear, but only the LaTeX variable 
14475 \family typewriter
14476
14477 \backslash
14478 fromplace
14479 \family default
14480  is set.
14481  The ordinary output of place and date in a right-aligned line below the
14482  addressee`s field is suppressed.
14483  The types are implemented as input types provided with a label and must
14484  be used ahead of the corresponding 
14485 \family sans
14486 Opening
14487 \family default
14488  type.
14489 \end_layout
14490
14491 \begin_layout Itemize
14492
14493 \family sans
14494 Yourref
14495 \family default
14496 : Your ref.
14497 \end_layout
14498
14499 \begin_layout Itemize
14500
14501 \family sans
14502 Yourmail
14503 \family default
14504 : Your letter of.
14505 \end_layout
14506
14507 \begin_layout Itemize
14508
14509 \family sans
14510 Myref
14511 \family default
14512 : Our ref.
14513 \end_layout
14514
14515 \begin_layout Itemize
14516
14517 \family sans
14518 Customer
14519 \family default
14520 : Customer no.
14521 \end_layout
14522
14523 \begin_layout Itemize
14524
14525 \family sans
14526 Invoice
14527 \family default
14528 : Invoice no.
14529 \end_layout
14530
14531 \begin_layout Subsection
14532 The new letter class: letter (koma-script v.2)
14533 \end_layout
14534
14535 \begin_layout Standard
14536 by 
14537 \noun on
14538 Jürgen Spitzmüller
14539 \end_layout
14540
14541 \begin_layout Standard
14542 \begin_inset VSpace medskip
14543 \end_inset
14544
14545
14546 \end_layout
14547
14548 \begin_layout Standard
14549 \noindent
14550 Koma-Script version 2.8 has introduced a new letter class 
14551 \family typewriter
14552 scrlttr2
14553 \family default
14554  which supersedes the now unsupported 
14555 \family typewriter
14556 scrlettr
14557 \family default
14558 .
14559  It has — on the LaTeX side — a completely new interface and is not compatible
14560  with the old class.
14561  Therefore, LyX supports both, though it is recommended you use the new
14562  class.
14563 \end_layout
14564
14565 \begin_layout Standard
14566 This class covers the same functionality as 
14567 \emph on
14568 letter (koma-script),
14569 \emph default
14570  and a few more.
14571  The basic items are 
14572 \family sans
14573 Address
14574 \family default
14575  (receiver's address, same as 
14576 \family sans
14577 Letter
14578 \family default
14579  in the old layout), 
14580 \family sans
14581 Opening
14582 \family default
14583 , and 
14584 \family sans
14585 Closing
14586 \family default
14587 .
14588  
14589 \family sans
14590 NextAddress
14591 \family default
14592  will start a new letter (i.
14593 \begin_inset space \thinspace{}
14594 \end_inset
14595
14596 g.
14597 \begin_inset space \space{}
14598 \end_inset
14599
14600 you can write several letters per document).
14601  New elements are sender's 
14602 \family sans
14603 E-Mail
14604 \family default
14605
14606 \family sans
14607 URL
14608 \family default
14609
14610 \family sans
14611 Fax
14612 \family default
14613
14614 \family sans
14615 Bank
14616 \family default
14617  and the possibility to use a 
14618 \family sans
14619 Logo
14620 \family default
14621  (via 
14622 \family sans
14623 Insert\SpecialChar \menuseparator
14624 Graphics
14625 \family default
14626 ) in the header.
14627 \end_layout
14628
14629 \begin_layout Standard
14630 The biggest improvement is, though, that the letter's layout is configurable
14631  to meet almost any needs.
14632  This can be done via the preamble or with a special style file (Letter
14633  Class Option, extension 
14634 \family typewriter
14635 *.lco
14636 \family default
14637 ), that will be read in as a class option.
14638 \begin_inset Foot
14639 status collapsed
14640
14641 \begin_layout Plain Layout
14642 The KOMA package comes with some default 
14643 \family typewriter
14644 *.lco
14645 \family default
14646  files.
14647  There is, for instance, a 
14648 \family typewriter
14649 DIN.lco
14650 \family default
14651  file that follows german typesetting rules, or a 
14652 \family typewriter
14653 KOMAold.lco
14654 \family default
14655  that provides the default layout of the old 
14656 \family typewriter
14657 scrlettr
14658 \family default
14659  class.
14660  The latter can be loaded with the class option 
14661 \family typewriter
14662 KOMAold
14663 \family default
14664 , inserted via the 
14665 \family sans
14666 \bar under
14667 L
14668 \bar default
14669 ayout\SpecialChar \menuseparator
14670
14671 \bar under
14672 D
14673 \bar default
14674 ocument\SpecialChar \menuseparator
14675 Extra Options
14676 \family default
14677  field.
14678 \end_layout
14679
14680 \end_inset
14681
14682  Have a look at the 
14683 \emph on
14684 koma-letter2
14685 \emph default
14686  template that is included in LyX for examples.
14687  A detailed description is to be found in the Koma-Script documentation
14688  (
14689 \emph on
14690 scrguide
14691 \emph default
14692 ).
14693 \end_layout
14694
14695 \begin_layout Subsection
14696 Problems
14697 \end_layout
14698
14699 \begin_layout Standard
14700 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14701  some problems.
14702 \end_layout
14703
14704 \begin_layout Itemize
14705 The chapter number of a 
14706 \family sans
14707 Chapter
14708 \family default
14709  type appears on a line of its own above the chapter heading instead of
14710  appearing in the same line ahead of it.
14711  The cause for that is the LyX internal behavior for the labeltype 
14712 \family sans
14713 Counter_Chapter
14714 \family default
14715  in the layout file.
14716 \end_layout
14717
14718 \begin_layout Itemize
14719 The headings of the types 
14720 \family sans
14721 Addchap
14722 \family default
14723  and 
14724 \family sans
14725 Addsec
14726 \family default
14727  are only put in the 
14728 \begin_inset Quotes eld
14729 \end_inset
14730
14731 true
14732 \begin_inset Quotes erd
14733 \end_inset
14734
14735  LaTeX table of contents, but not in the LyX table of contents (
14736 \family sans
14737 Document\SpecialChar \menuseparator
14738 Table
14739 \begin_inset space ~
14740 \end_inset
14741
14742 of
14743 \begin_inset space ~
14744 \end_inset
14745
14746 Contents
14747 \family default
14748 ).
14749 \end_layout
14750
14751 \begin_layout Itemize
14752 The paragraphs in a 
14753 \emph on
14754 letter
14755 \emph default
14756  document class appear in a skip separation mode, not indented.
14757  This is the standard behavior, no special LaTeX commands are needed for
14758  that.
14759  But in the 
14760 \family sans
14761 Document\SpecialChar \menuseparator
14762 Settings
14763 \family default
14764  dialog the corresponding radio button indicates 
14765 \family sans
14766 Indent
14767 \family default
14768 .
14769  A 
14770 \family sans
14771 Skip
14772 \family default
14773  value always has the effect that extra LaTeX commands are inserted in the
14774  document to produce the gap, which is not what is wanted in this case.
14775 \end_layout
14776
14777 \begin_layout Section
14778 Latex8 (IEEE Conference Papers)
14779 \end_layout
14780
14781 \begin_layout Standard
14782 by 
14783 \noun on
14784 Allan Rae
14785 \end_layout
14786
14787 \begin_layout Subsection
14788 Introduction
14789 \end_layout
14790
14791 \begin_layout Standard
14792 Since this class is specifically for writing submissions to IEEE sponsored
14793  conferences I strongly recommend that you get a copy of their Authors Kit.
14794  The 
14795 \family sans
14796 latex.sty
14797 \family default
14798  package and associated bibliography style file is included in the kit.
14799  The Authors Kit is usually sent out by email once your initial submission
14800  has been accepted.
14801  There is a lot of useful information in the Authors Kit explaining formatting
14802  restrictions and so on and I will assume you have read this since that
14803  means I don't have to repeat it all here.
14804 \end_layout
14805
14806 \begin_layout Subsection
14807 Getting Started
14808 \end_layout
14809
14810 \begin_layout Standard
14811 [AR\SpecialChar \@.
14812  more to come]
14813 \end_layout
14814
14815 \begin_layout Subsection
14816 Supported Environments
14817 \end_layout
14818
14819 \begin_layout Itemize
14820
14821 \family sans
14822 Standard
14823 \end_layout
14824
14825 \begin_layout Itemize
14826
14827 \family sans
14828 Title
14829 \end_layout
14830
14831 \begin_layout Itemize
14832
14833 \family sans
14834 Author
14835 \end_layout
14836
14837 \begin_layout Itemize
14838
14839 \family sans
14840 E-mail
14841 \end_layout
14842
14843 \begin_layout Itemize
14844
14845 \family sans
14846 Affiliation
14847 \end_layout
14848
14849 \begin_layout Itemize
14850
14851 \family sans
14852 Abstract
14853 \end_layout
14854
14855 \begin_layout Itemize
14856
14857 \family sans
14858 Section
14859 \end_layout
14860
14861 \begin_layout Itemize
14862
14863 \family sans
14864 SubSection
14865 \end_layout
14866
14867 \begin_layout Itemize
14868
14869 \family sans
14870 Caption
14871 \end_layout
14872
14873 \begin_layout Subsection
14874 Differences Between Screen and Paper
14875 \end_layout
14876
14877 \begin_layout Standard
14878 There are slight differences in appearance mainly with the presentation
14879  of section counters.
14880  On screen the trailing period of the section counter is missing but it
14881  will appear in the output so don't let this worry you.
14882 \end_layout
14883
14884 \begin_layout Section
14885 Memoir
14886 \end_layout
14887
14888 \begin_layout Standard
14889 By 
14890 \noun on
14891 Jürgen Spitzmüller
14892 \end_layout
14893
14894 \begin_layout Subsection
14895 Overview
14896 \end_layout
14897
14898 \begin_layout Standard
14899 Memoir is a very powerful and constantly evolving class.
14900  It has been designed with regard to fictional and non-fictional literature.
14901  Its aim is to let the user have maximum control over the typesetting of
14902  his document.
14903  Memoir is based on the standard book class, but it can also emulate the
14904  article class (see below).
14905 \end_layout
14906
14907 \begin_layout Standard
14908 Peter Wilson, the developer of Memoir, is known as the author of lots of
14909  useful packages in the LaTeX world.
14910  Most of them have been merged with Memoir.
14911  Therefore, it is much easier to layout the table of contents, appendices,
14912  chapter designs and such.
14913  LyX, though, does not support all of these goodies natively.
14914  Some of them might be added to forthcoming releases
14915 \begin_inset Foot
14916 status collapsed
14917
14918 \begin_layout Plain Layout
14919 You are invited to send suggestions to 
14920 \begin_inset Flex URL
14921 status collapsed
14922
14923 \begin_layout Plain Layout
14924
14925 lyx-devel@lists.lyx.org
14926 \end_layout
14927
14928 \end_inset
14929
14930 .
14931 \end_layout
14932
14933 \end_inset
14934
14935 , lots will probably never, due to the limitations of LyX's framework.
14936  Of course you can still use all features with the help of some native LaTeX
14937  commands (TeX code
14938 \begin_inset Foot
14939 status collapsed
14940
14941 \begin_layout Plain Layout
14942 Cf.
14943 \begin_inset ERT
14944 status collapsed
14945
14946 \begin_layout Plain Layout
14947
14948
14949 \backslash
14950  
14951 \end_layout
14952
14953 \end_inset
14954
14955 section
14956 \begin_inset space ~
14957 \end_inset
14958
14959
14960 \begin_inset CommandInset ref
14961 LatexCommand ref
14962 reference "sec:Inserting-TeX-Code"
14963
14964 \end_inset
14965
14966  for details.
14967 \end_layout
14968
14969 \end_inset
14970
14971 ).
14972  In this section, we can only list those features which are natively supported
14973  by LyX.
14974  For detailed descriptions (and for the rest of features) we recommend you
14975  have a look at the detailed manual of the Memoir class
14976 \begin_inset Foot
14977 status collapsed
14978
14979 \begin_layout Plain Layout
14980 Cf.
14981 \begin_inset ERT
14982 status collapsed
14983
14984 \begin_layout Plain Layout
14985
14986
14987 \backslash
14988  
14989 \end_layout
14990
14991 \end_inset
14992
14993
14994 \begin_inset Flex URL
14995 status collapsed
14996
14997 \begin_layout Plain Layout
14998
14999 CTAN:/macros/latex/memoir/memman.pdf
15000 \end_layout
15001
15002 \end_inset
15003
15004 .
15005 \end_layout
15006
15007 \end_inset
15008
15009 , which is not only a user guide for the class, but also both a comprehensive
15010  description on good typesetting and a superb example for good typesetting
15011  itself.
15012 \end_layout
15013
15014 \begin_layout Subsection
15015 Basic features and restrictions
15016 \end_layout
15017
15018 \begin_layout Standard
15019 Memoir supports basically all features of the standard book classes.
15020  There are, however, some differences, as follows:
15021 \end_layout
15022
15023 \begin_layout Description
15024 Font
15025 \begin_inset space ~
15026 \end_inset
15027
15028 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
15029 \end_layout
15030
15031 \begin_layout Description
15032 Page
15033 \begin_inset space ~
15034 \end_inset
15035
15036 style: The fancy page style is not supported, due to a command clash between
15037  Memoir and the fancyhdr package (they both define a command with the same
15038  name, which confuses LaTeX).
15039  Instead, Memoir comes with a number of its own page styles (see 
15040 \family sans
15041 Layout\SpecialChar \menuseparator
15042 Document\SpecialChar \menuseparator
15043 Page
15044 \begin_inset space ~
15045 \end_inset
15046
15047 Style
15048 \family default
15049 ).
15050  If you want to use these for the chapter pages, you have to use the command
15051  
15052 \family typewriter
15053
15054 \backslash
15055 chapterstyle
15056 \family default
15057  in the main text or in preamble (e.
15058 \begin_inset space \thinspace{}
15059 \end_inset
15060
15061 g.
15062 \begin_inset space \space{}
15063 \end_inset
15064
15065
15066 \family typewriter
15067
15068 \backslash
15069 chapterstyle{companion}
15070 \family default
15071 ).
15072 \end_layout
15073
15074 \begin_layout Description
15075 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
15076  optional argument in the standard classes.
15077  With this, you can specify an alternative version of the title for the
15078  table of contents and the headers (for instance, if the title is too long).
15079  In LyX, you can do this via 
15080 \family sans
15081 Insert\SpecialChar \menuseparator
15082 Short
15083 \begin_inset space ~
15084 \end_inset
15085
15086 Title
15087 \family default
15088  at the beginning of a chapter/section.
15089  Memoir features a second optional argument and thus separates the table
15090  of contents from the header.
15091  You can define three variants of a title with this: one for the main text,
15092  one for the table of contents, and one for the headers.
15093  Simply insert two optional arguments if you need this feature, the first
15094  one containing the short title for the Table of Contents, the second one
15095  containing an alternative short title for the headers.
15096 \end_layout
15097
15098 \begin_layout Description
15099 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
15100  of contents, the list of figures and the list of table start a new page
15101  automatically.
15102  Memoir does not follow this route.
15103  You have to insert a page break yourself, if you want to have one.
15104 \end_layout
15105
15106 \begin_layout Description
15107 Titlepage: For some unknown reason, Memoir uses pagination on the title
15108  page (in the standard classes, title pages are 
15109 \begin_inset Quotes eld
15110 \end_inset
15111
15112 empty
15113 \begin_inset Quotes erd
15114 \end_inset
15115
15116 , i.
15117 \begin_inset space \thinspace{}
15118 \end_inset
15119
15120 g.
15121 \begin_inset space \space{}
15122 \end_inset
15123
15124 without pagina).
15125  If you want an empty title page, type 
15126 \family typewriter
15127
15128 \backslash
15129 aliaspagestyle{title}{empty}
15130 \family default
15131  in the preamble.
15132 \end_layout
15133
15134 \begin_layout Description
15135 Article: With the class option 
15136 \emph on
15137 article
15138 \emph default
15139  (to be inserted in 
15140 \family sans
15141 Layout\SpecialChar \menuseparator
15142 Document\SpecialChar \menuseparator
15143 Extra
15144 \begin_inset space ~
15145 \end_inset
15146
15147 Options
15148 \family default
15149 ), you can emulate article style.
15150  That is, counters (footnotes, figures, tables etc.) will not be reset on
15151  new chapters, chapters don't start a new page (but are—in contrary to 
15152 \begin_inset Quotes eld
15153 \end_inset
15154
15155 real
15156 \begin_inset Quotes erd
15157 \end_inset
15158
15159  article classes—still allowed), parts, though, use their own page, as in
15160  book.
15161 \end_layout
15162
15163 \begin_layout Description
15164 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
15165  font commands, which have been used in the old LaTeX version 2.09 (e.
15166 \begin_inset space \thinspace{}
15167 \end_inset
15168
15169 g.
15170 \begin_inset space \space{}
15171 \end_inset
15172
15173
15174 \family typewriter
15175
15176 \backslash
15177 rm
15178 \family default
15179
15180 \family typewriter
15181
15182 \backslash
15183 it
15184 \family default
15185 ).
15186  It produces an error and stops LaTeX whenever such a command appears.
15187  The class option 
15188 \emph on
15189 oldfontcommands
15190 \emph default
15191  reallows the commands and spits out warnings instead (which does at least
15192  not stop LaTeX).
15193  Since a lot of packages and particularly BibTeX style files are still using
15194  those commands, we have decided to use this option by default.
15195 \end_layout
15196
15197 \begin_layout Subsection
15198 Extra features
15199 \end_layout
15200
15201 \begin_layout Standard
15202 We will only describe the features supported by LyX (which is not much currently
15203 ).
15204  Please consult the Memoir manual
15205 \begin_inset Foot
15206 status collapsed
15207
15208 \begin_layout Plain Layout
15209 Cf.
15210 \begin_inset ERT
15211 status collapsed
15212
15213 \begin_layout Plain Layout
15214
15215
15216 \backslash
15217  
15218 \end_layout
15219
15220 \end_inset
15221
15222
15223 \begin_inset Flex URL
15224 status collapsed
15225
15226 \begin_layout Plain Layout
15227
15228 CTAN:/macros/latex/memoir/memman.pdf
15229 \end_layout
15230
15231 \end_inset
15232
15233 .
15234 \end_layout
15235
15236 \end_inset
15237
15238  for details.
15239 \end_layout
15240
15241 \begin_layout Description
15242 Abstract: You may wonder why an abstract is an extra feature.
15243  Well, it is in book class.
15244  Usually books don't have abstracts.
15245  Memoir, however, has.
15246  You can use it wherever and how often you like.
15247 \end_layout
15248
15249 \begin_layout Description
15250 Chapterprecis: You may know this older typesetting style: The contents of
15251  a chapter are summarized below the title and also in the table of contents
15252  (e.
15253 \begin_inset space \thinspace{}
15254 \end_inset
15255
15256 g.
15257 \begin_inset space \space{}
15258 \end_inset
15259
15260
15261 \emph on
15262 Our hero arrives in Troia; he loses some friends; he finds others
15263 \emph default
15264 ).
15265  Chapterprecis does exactly this.
15266  It is therefore only sensible below a chapter.
15267 \end_layout
15268
15269 \begin_layout Description
15270 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
15271  The epigraph environment provides an elegant way of typesetting such a
15272  motto.
15273  The motto itself (text) and its author (source) are divided by a short
15274  line.
15275  Unfortunately, we have to fool LyX a bit here again, since the environment
15276  needs two arguments (text and source).
15277  In this case, we have to use curly brackets (in TeX mode) between the two
15278  arguments: 
15279 \emph on
15280 <smart slogan>
15281 \emph default
15282  
15283 \family typewriter
15284 }{
15285 \family default
15286  
15287 \emph on
15288 <author of the slogan>.
15289 \end_layout
15290
15291 \begin_layout Description
15292 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
15293  complex figurative poems).
15294  LyX can only support a few of them.
15295  One is poemtitle, which is a centered title for poems, which will also
15296  be added to the table of contents (verse is the standard environment for
15297  poems.
15298  Memoir has some enhanced versions of verse, but you need to use TeX code,
15299  because they have to be nested inside regular verse environments, which
15300  is not possible with LyX).
15301 \end_layout
15302
15303 \begin_layout Description
15304 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
15305 \end_layout
15306
15307 \begin_layout Section
15308 Article (mwart), book (mwbk) and report (mwrep)
15309 \begin_inset Argument
15310 status collapsed
15311
15312 \begin_layout Plain Layout
15313 The 
15314 \family typewriter
15315 mw
15316 \family default
15317  Classes
15318 \end_layout
15319
15320 \end_inset
15321
15322
15323 \end_layout
15324
15325 \begin_layout Standard
15326 by 
15327 \noun on
15328 Tomasz Luczak
15329 \end_layout
15330
15331 \begin_layout Standard
15332 The LyX document classes 
15333 \emph on
15334 article (mwart)
15335 \emph default
15336
15337 \emph on
15338 report (mwrep)
15339 \emph default
15340  and 
15341 \emph on
15342 book
15343 \emph default
15344  
15345 \emph on
15346 (mwbk)
15347 \emph default
15348  correspond to the LaTeX document classes 
15349 \family typewriter
15350 mwart.cls
15351 \family default
15352
15353 \family typewriter
15354 mwrep.cls
15355 \family default
15356  and 
15357 \family typewriter
15358 mwbk.cls
15359 \family default
15360 , resp.
15361  They are replacements for the standard document classes 
15362 \family typewriter
15363 article.cls
15364 \family default
15365
15366 \family typewriter
15367 report.cls
15368 \family default
15369  and 
15370 \family typewriter
15371 book.cls
15372 \family default
15373 , resp., and fit better to Polish typography conventions in a number of points.
15374  
15375 \end_layout
15376
15377 \begin_layout Standard
15378 Basic differences:
15379 \end_layout
15380
15381 \begin_layout Itemize
15382 Unnumbered titles (with star, e.
15383 \begin_inset space \thinspace{}
15384 \end_inset
15385
15386 g.
15387 \begin_inset space \space{}
15388 \end_inset
15389
15390
15391 \family sans
15392 Section*
15393 \family default
15394 ) are added into table of contents,
15395 \end_layout
15396
15397 \begin_layout Itemize
15398 Additional page styles:
15399 \end_layout
15400
15401 \begin_deeper
15402 \begin_layout Description
15403 uheadings header with separated lines,
15404 \end_layout
15405
15406 \begin_layout Description
15407 myheadings custom header, contents headers via commands: 
15408 \family typewriter
15409
15410 \backslash
15411 markright
15412 \family default
15413  and 
15414 \family typewriter
15415
15416 \backslash
15417 markboth
15418 \family default
15419 ,
15420 \end_layout
15421
15422 \begin_layout Description
15423 myuheadings custom header with separated lines,
15424 \end_layout
15425
15426 \begin_layout Description
15427 outer page number is placed on outer side of page
15428 \end_layout
15429
15430 \end_deeper
15431 \begin_layout Itemize
15432 Options 
15433 \end_layout
15434
15435 \begin_deeper
15436 \begin_layout Description
15437 rmheadings serif titles — default,
15438 \end_layout
15439
15440 \begin_layout Description
15441 sfheadings sansserif titles,
15442 \end_layout
15443
15444 \begin_layout Description
15445 authortitle on title page first placed is author next title — default,
15446 \end_layout
15447
15448 \begin_layout Description
15449 titleauthor on title page first placed is title next author,
15450 \end_layout
15451
15452 \begin_layout Description
15453 withmarginpar reserve place on page for margins.
15454 \end_layout
15455
15456 \end_deeper
15457 \begin_layout Section
15458 Paper
15459 \end_layout
15460
15461 \begin_layout Standard
15462 The document class 
15463 \family sans
15464 paper
15465 \family default
15466  provides an alternative to the standard 
15467 \family sans
15468 article
15469 \family default
15470  class.
15471  It provides similar functionality, but you might prefer this layout with
15472  sans serif sections, headings, and more.
15473 \end_layout
15474
15475 \begin_layout Section
15476 RevTeX4
15477 \end_layout
15478
15479 \begin_layout Standard
15480 by 
15481 \noun on
15482 Amir Karger
15483 \end_layout
15484
15485 \begin_layout Standard
15486 \begin_inset VSpace bigskip
15487 \end_inset
15488
15489
15490 \end_layout
15491
15492 \begin_layout Standard
15493 \noindent
15494 The 
15495 \family sans
15496 Revtex
15497 \begin_inset space ~
15498 \end_inset
15499
15500 4
15501 \family default
15502  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15503 \begin_inset Formula $\beta$
15504 \end_inset
15505
15506  release of May, 1999) class.
15507 \end_layout
15508
15509 \begin_layout Standard
15510 LyX has a 
15511 \family sans
15512 Revtex
15513 \family default
15514  textclass, which works with RevTeX 3.1.
15515  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15516  That means that it doesn't interact very well with LyX, which requires
15517  LaTeX2e, although it has been kludged to work.
15518  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15519  LyX with the 
15520 \family sans
15521 RevTeX
15522 \begin_inset space ~
15523 \end_inset
15524
15525 4
15526 \family default
15527  textclass should also be pretty easy to use.
15528 \end_layout
15529
15530 \begin_layout Standard
15531 These documents are supposed to be used in 
15532 \emph on
15533 addition
15534 \emph default
15535  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15536  macros, and assume you'll know what to put in the preamble if necessary.
15537 \end_layout
15538
15539 \begin_layout Subsection
15540 Installation
15541 \end_layout
15542
15543 \begin_layout Standard
15544 All you need to do is install RevTeX 4, as described in the package's README
15545  file.
15546  The package can be found at The RevTeX 4 Web Site 
15547 \begin_inset Flex URL
15548 status collapsed
15549
15550 \begin_layout Plain Layout
15551
15552 http://publish.aps.org/revtex4/
15553 \end_layout
15554
15555 \end_inset
15556
15557 .
15558  Install it somewhere that LaTeX can see it.
15559  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15560  (i.
15561 \begin_inset space \thinspace{}
15562 \end_inset
15563
15564 g.
15565 \begin_inset space \space{}
15566 \end_inset
15567
15568 not the directory where you installed the class file.) Then, if you reconfigure
15569  LyX, it will find the class file and let you use the RevTeX4 textclass.
15570 \end_layout
15571
15572 \begin_layout Standard
15573 Probably the easiest way to get started is either to import a RevTeX 4 document
15574  using 
15575 \family typewriter
15576 tex2lyx
15577 \family default
15578 , or to use the 
15579 \family sans
15580 Revtex
15581 \begin_inset space ~
15582 \end_inset
15583
15584 4
15585 \family default
15586  template, found in the templates directory.
15587 \end_layout
15588
15589 \begin_layout Subsection
15590 Preamble Matter
15591 \end_layout
15592
15593 \begin_layout Standard
15594 Optional arguments to 
15595 \family typewriter
15596
15597 \backslash
15598 documentclass
15599 \family default
15600 , like 
15601 \begin_inset Quotes eld
15602 \end_inset
15603
15604 preprint
15605 \begin_inset Quotes erd
15606 \end_inset
15607
15608  and 
15609 \begin_inset Quotes eld
15610 \end_inset
15611
15612 aps
15613 \begin_inset Quotes erd
15614 \end_inset
15615
15616 , go in the 
15617 \family sans
15618 E
15619 \bar under
15620 x
15621 \bar default
15622 tra
15623 \begin_inset space ~
15624 \end_inset
15625
15626 Options
15627 \family default
15628  field in the 
15629 \family sans
15630 Document
15631 \begin_inset space ~
15632 \end_inset
15633
15634 Layout
15635 \family default
15636  dialog, as usual.
15637  Remember that in RevTeX, at least one optional argument is required! 
15638 \end_layout
15639
15640 \begin_layout Standard
15641 Other preamble matter, like 
15642 \family typewriter
15643
15644 \backslash
15645 draft
15646 \family default
15647  etc.
15648 \begin_inset space ~
15649 \end_inset
15650
15651 goes in the 
15652 \family sans
15653 LaTeX
15654 \begin_inset space ~
15655 \end_inset
15656
15657 Preamble
15658 \family default
15659  dialog, also as usual.
15660 \end_layout
15661
15662 \begin_layout Subsection
15663 Layouts
15664 \end_layout
15665
15666 \begin_layout Standard
15667 The layouts basically correspond to the commands in RevTeX4.0.
15668  For example, the Email layout corresponds to 
15669 \family typewriter
15670
15671 \backslash
15672 email{}
15673 \family default
15674 .
15675  Note that (at least as of RevTeX 4.0 Beta), the 
15676 \family sans
15677 Address
15678 \family default
15679  and 
15680 \family sans
15681 Affiliation
15682 \family default
15683  layouts are exactly equivalent, so you shouldn't need to use both.
15684 \begin_inset Foot
15685 status collapsed
15686
15687 \begin_layout Plain Layout
15688 In case you're curious, both were included so that 
15689 \family typewriter
15690 tex2lyx
15691 \family default
15692  would be able to translate both 
15693 \family typewriter
15694
15695 \backslash
15696 address
15697 \family default
15698  and 
15699 \family typewriter
15700
15701 \backslash
15702 affiliation
15703 \family default
15704 .
15705 \end_layout
15706
15707 \end_inset
15708
15709
15710 \end_layout
15711
15712 \begin_layout Subsection
15713 Important Notes
15714 \end_layout
15715
15716 \begin_layout Standard
15717 There are a couple of important unique aspects of RevTeX 4 which might cause
15718  bugs that will be even more confusing in LyX.
15719 \end_layout
15720
15721 \begin_layout Standard
15722 In RevTeX, the 
15723 \family typewriter
15724
15725 \backslash
15726 thanks
15727 \family default
15728  command goes 
15729 \emph on
15730 outside
15731 \emph default
15732  the 
15733 \family typewriter
15734
15735 \backslash
15736 author
15737 \family default
15738  command.
15739  The LyX equivalent is that there is a separate Thanks layout.
15740  Do 
15741 \emph on
15742 not
15743 \emph default
15744  write footnotes in the 
15745 \family sans
15746 Author
15747 \family default
15748  layout, or weird things may happen.
15749  See the RevTeX 4 documentation for more details.
15750 \end_layout
15751
15752 \begin_layout Standard
15753 Also, the 
15754 \family sans
15755 Author
15756 \begin_inset space ~
15757 \end_inset
15758
15759 Email
15760 \family default
15761
15762 \family sans
15763 Author
15764 \begin_inset space ~
15765 \end_inset
15766
15767 URL
15768 \family default
15769 , and 
15770 \family sans
15771 Thanks
15772 \family default
15773  layouts must be placed 
15774 \emph on
15775 in between
15776 \emph default
15777  the 
15778 \family sans
15779 Author
15780 \family default
15781  layout and the corresponding 
15782 \family sans
15783 Address
15784 \family default
15785  (or equivalent 
15786 \family sans
15787 Affiliation
15788 \family default
15789 ) layout.
15790  If you put the 
15791 \family sans
15792 Thanks
15793 \family default
15794  after the 
15795 \family sans
15796 Address
15797 \family default
15798 , the LaTeX won't compile.
15799 \end_layout
15800
15801 \begin_layout Subsection
15802 Drawbacks
15803 \end_layout
15804
15805 \begin_layout Standard
15806 The main problem with this layout is that you can't use the optional arguments
15807  to layouts like Email and Title.
15808  (The problem is not unique to this layout; you can't use optional arguments
15809  to the Section layouts either.) This means that after you export that file
15810  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15811  need to edit the LaTeX file with a text editor to add the optional arguments
15812  to set, e.
15813 \begin_inset space \thinspace{}
15814 \end_inset
15815
15816 g.
15817 \begin_inset space \space{}
15818 \end_inset
15819
15820 the running title for the page headers.
15821  Lacking these layouts makes the 
15822 \family typewriter
15823
15824 \backslash
15825 altaffiliation
15826 \family default
15827  (and the equivalent 
15828 \family typewriter
15829
15830 \backslash
15831 altaddress
15832 \family default
15833 ) useless, so the corresponding layouts don't exist, and will have to be
15834  added by hand.
15835 \begin_inset Foot
15836 status collapsed
15837
15838 \begin_layout Plain Layout
15839
15840 \emph on
15841 Note from JMarc:
15842 \emph default
15843  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15844  has not been updated yet to take advantage of it.
15845 \end_layout
15846
15847 \end_inset
15848
15849  
15850 \end_layout
15851
15852 \begin_layout Section
15853 Springer Journals (
15854 \family sans
15855 svjour
15856 \family default
15857 )
15858 \end_layout
15859
15860 \begin_layout Standard
15861 by 
15862 \noun on
15863 Martin Vermeer
15864 \end_layout
15865
15866 \begin_layout Subsection
15867 Description
15868 \end_layout
15869
15870 \begin_layout Standard
15871 These are the layout files for some of the journal formats used by Springer
15872  Verlag and listed on 
15873 \begin_inset Flex URL
15874 status collapsed
15875
15876 \begin_layout Plain Layout
15877
15878 http://www.springer.de/author/tex/help-journals.html
15879 \end_layout
15880
15881 \end_inset
15882
15883 , where you should also go to fetch the class files (yes, these are LaTeX2e
15884  now!).
15885  It is a modular system: the things common to all journals are implemented
15886  in 
15887 \family typewriter
15888 svjour.inc
15889 \family default
15890 , which journal-specific layout files (such as, e.
15891 \begin_inset space \thinspace{}
15892 \end_inset
15893
15894 g.
15895 \begin_inset space \space{}
15896 \end_inset
15897
15898
15899 \family typewriter
15900 svjog.layout
15901 \family default
15902  for Journal of Geodesy) can include.
15903 \end_layout
15904
15905 \begin_layout Standard
15906 This means that implementing support for any other Springer journal on this
15907  list is as simple as writing your own 
15908 \family typewriter
15909 sv
15910 \family default
15911 <myjournal>
15912 \family typewriter
15913 .layout
15914 \family default
15915  file following the outline given in 
15916 \family typewriter
15917 svjog.layout
15918 \family default
15919 .
15920  
15921 \end_layout
15922
15923 \begin_layout Standard
15924 It is reasonably well tested only for the Journal of Geodesy.
15925  
15926 \family typewriter
15927 svjour
15928 \family default
15929  and 
15930 \family typewriter
15931 svjog
15932 \family default
15933  come with the standard LyX distribution.
15934  Install the relevant class file (downloaded from Springer) in a proper
15935  directory, reconfigure LaTeX (in the teTeX case by running 
15936 \family typewriter
15937 texhash
15938 \family default
15939 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15940  and it should work.
15941 \end_layout
15942
15943 \begin_layout Subsection
15944 New styles
15945 \end_layout
15946
15947 \begin_layout Standard
15948 A large number of theorem-like styles — 
15949 \family sans
15950 Claim, Conjecture,
15951 \family default
15952  
15953 \family sans
15954 \SpecialChar \ldots{}
15955 Theorem
15956 \family default
15957 .
15958 \end_layout
15959
15960 \begin_layout Standard
15961
15962 \family sans
15963 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15964  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15965 \family default
15966 .
15967  See the Springer class file documentation for details.
15968 \end_layout
15969
15970 \begin_layout Subsection
15971 Supported journals
15972 \end_layout
15973
15974 \begin_layout Itemize
15975
15976 \emph on
15977 Journal of Geodesy
15978 \emph default
15979
15980 \family typewriter
15981 svjog.layout
15982 \family default
15983  — Martin Vermeer
15984 \end_layout
15985
15986 \begin_layout Itemize
15987
15988 \emph on
15989 Probability Theory and Related Fields
15990 \emph default
15991
15992 \family typewriter
15993 svprobth.layout
15994 \family default
15995  — Jean-Marc Lasgouttes
15996 \end_layout
15997
15998 \begin_layout Standard
15999 Add your own, it isn't so hard!
16000 \end_layout
16001
16002 \begin_layout Subsection
16003 Credits
16004 \end_layout
16005
16006 \begin_layout Standard
16007 These files are partly based on the older 
16008 \family typewriter
16009 ejour2.layout
16010 \family default
16011 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
16012  file from Springer.
16013  All this, and the 
16014 \family typewriter
16015 ejour2
16016 \family default
16017  layout, are now defunct.
16018  Jean-Marc Lasgouttes helped out big in making me find my way around the
16019  LyX layout file mechanism.
16020 \end_layout
16021
16022 \begin_layout Subsection
16023 Bugs
16024 \end_layout
16025
16026 \begin_layout Standard
16027 Probably.
16028  But probably less than in the old hacked-LaTeX 
16029 \family typewriter
16030 ejour2
16031 \family default
16032 .
16033 \end_layout
16034
16035 \begin_layout Standard
16036 Limitations e.
16037 \begin_inset space \thinspace{}
16038 \end_inset
16039
16040 g.: does not display the number for theorem-like layouts, just #.
16041 \end_layout
16042
16043 \begin_layout Section
16044 Slides [aka 
16045 \noun on
16046 SliTeX
16047 \noun default
16048 ]
16049 \begin_inset CommandInset label
16050 LatexCommand label
16051 name "sec:slitex"
16052
16053 \end_inset
16054
16055
16056 \end_layout
16057
16058 \begin_layout Standard
16059 by 
16060 \noun on
16061 John Weiss
16062 \noun default
16063  
16064 \end_layout
16065
16066 \begin_layout Subsection
16067 Introduction
16068 \end_layout
16069
16070 \begin_layout Standard
16071 This section describes how to use LyX to make slides for overhead projectors.
16072  There are two document classes that can do this: the default slides class
16073  and the 
16074 \family sans
16075 FoilTeX
16076 \family default
16077  slides class.
16078  This section documents the former.
16079 \end_layout
16080
16081 \begin_layout Standard
16082 I'm going to say this again, nice and clear, so that there's no misunderstanding
16083 :
16084 \end_layout
16085
16086 \begin_layout Standard
16087 \begin_inset VSpace bigskip
16088 \end_inset
16089
16090
16091 \end_layout
16092
16093 \begin_layout Standard
16094 \align center
16095
16096 \size large
16097 This section documents the class 
16098 \begin_inset Quotes eld
16099 \end_inset
16100
16101
16102 \family sans
16103 slides (default)
16104 \family default
16105
16106 \begin_inset Quotes erd
16107 \end_inset
16108
16109  
16110 \emph on
16111 only.
16112 \end_layout
16113
16114 \begin_layout Standard
16115 \begin_inset VSpace bigskip
16116 \end_inset
16117
16118
16119 \end_layout
16120
16121 \begin_layout Standard
16122 If you're looking for the documentation for 
16123 \begin_inset Quotes eld
16124 \end_inset
16125
16126
16127 \family sans
16128 slides (FoilTeX)
16129 \family default
16130
16131 \begin_inset Quotes erd
16132 \end_inset
16133
16134 , check out section
16135 \begin_inset space ~
16136 \end_inset
16137
16138
16139 \begin_inset CommandInset ref
16140 LatexCommand ref
16141 reference "sec:foiltex"
16142
16143 \end_inset
16144
16145 .
16146  The 
16147 \family sans
16148 foils
16149 \family default
16150  class [
16151 \begin_inset Quotes eld
16152 \end_inset
16153
16154
16155 \family sans
16156 slides (FoilTeX)
16157 \family default
16158
16159 \begin_inset Quotes erd
16160 \end_inset
16161
16162 ] is actually somewhat better than the default 
16163 \family sans
16164 slides
16165 \family default
16166  class,
16167 \begin_inset Foot
16168 status collapsed
16169
16170 \begin_layout Plain Layout
16171 \SpecialChar \ldots{}
16172 or so I've been told repeatedly by its advocates.
16173  Having never used it, I have no idea if this claim is true or not.
16174 \end_layout
16175
16176 \end_inset
16177
16178  which this section documents.
16179 \end_layout
16180
16181 \begin_layout Standard
16182 This class is the LaTeX2e improvement of the old 
16183 \noun on
16184 SliTeX
16185 \noun default
16186  package.
16187  Every LaTeX2e distribution includes this class [which I'll just refer to
16188  as 
16189 \begin_inset Quotes eld
16190 \end_inset
16191
16192
16193 \family sans
16194 slides
16195 \family default
16196
16197 \begin_inset Quotes erd
16198 \end_inset
16199
16200  from now on], so you're bound to have it.
16201  As I noted earlier, there are other classes, such as 
16202 \family sans
16203 foils
16204 \family default
16205 , which also produce slides for overhead projectors and do a better job
16206  at it.
16207  However, there are some things which 
16208 \family sans
16209 slides
16210 \family default
16211  can do which the others can't, such as generate overlays.
16212  Read on to learn more!
16213 \end_layout
16214
16215 \begin_layout Subsection
16216 Getting Started
16217 \begin_inset CommandInset label
16218 LatexCommand label
16219 name "sec:slidesetup"
16220
16221 \end_inset
16222
16223
16224 \end_layout
16225
16226 \begin_layout Standard
16227 Obviously, to use this document class, you need to select 
16228 \begin_inset Quotes eld
16229 \end_inset
16230
16231
16232 \family sans
16233 slides (default)
16234 \family default
16235
16236 \begin_inset Quotes erd
16237 \end_inset
16238
16239  from the class list in the 
16240 \family sans
16241 Document\SpecialChar \menuseparator
16242 Settings
16243 \family default
16244  dialog.
16245  There are some other special things you should know about this class:
16246 \end_layout
16247
16248 \begin_layout Itemize
16249 Don't bother changing the options 
16250 \family sans
16251 Sides and Columns
16252 \family default
16253 .
16254  They're not supported by the 
16255 \family sans
16256 slides
16257 \family default
16258  class, anyways.
16259 \end_layout
16260
16261 \begin_layout Itemize
16262 The option 
16263 \family sans
16264 Page
16265 \begin_inset space ~
16266 \end_inset
16267
16268 style
16269 \family default
16270  behaves a bit differently for this class.
16271  The possible choices and what they do are as follows:
16272 \end_layout
16273
16274 \begin_deeper
16275 \begin_layout Description
16276
16277 \family sans
16278 plain
16279 \family default
16280  The final output contains page numbers in the lower right corner.
16281 \end_layout
16282
16283 \begin_layout Description
16284
16285 \family sans
16286 headings
16287 \family default
16288  Like 
16289 \family sans
16290 plain
16291 \family default
16292 , but also prints out any time markers you've put in.
16293  This is the default.
16294 \end_layout
16295
16296 \begin_layout Description
16297
16298 \family sans
16299 empty
16300 \family default
16301  The final output contains no page numbers, time markers, or alignment markers.
16302 \end_layout
16303
16304 \end_deeper
16305 \begin_layout Itemize
16306 The 
16307 \family sans
16308 slides
16309 \family default
16310  class has an extra option: 
16311 \family typewriter
16312 clock
16313 \family default
16314 .
16315  To use it, put 
16316 \begin_inset Quotes eld
16317 \end_inset
16318
16319
16320 \family typewriter
16321 clock
16322 \family default
16323
16324 \begin_inset Quotes erd
16325 \end_inset
16326
16327  in the extra class options.
16328 \end_layout
16329
16330 \begin_deeper
16331 \begin_layout Standard
16332 Using this options allows you to add time markers to 
16333 \family sans
16334 Note
16335 \family default
16336 s.
16337  See section
16338 \begin_inset space ~
16339 \end_inset
16340
16341
16342 \begin_inset CommandInset ref
16343 LatexCommand ref
16344 reference "sec:slideNote"
16345
16346 \end_inset
16347
16348  for more details.
16349 \end_layout
16350
16351 \end_deeper
16352 \begin_layout Standard
16353 You can also use the template file 
16354 \begin_inset Quotes eld
16355 \end_inset
16356
16357
16358 \family typewriter
16359 slides.lyx
16360 \family default
16361
16362 \begin_inset Quotes erd
16363 \end_inset
16364
16365  to automatically set up a document to use the 
16366 \family sans
16367 slides
16368 \family default
16369  class [using 
16370 \family sans
16371 File\SpecialChar \menuseparator
16372 New
16373 \begin_inset space ~
16374 \end_inset
16375
16376 from
16377 \begin_inset space ~
16378 \end_inset
16379
16380 Template
16381 \family default
16382  to open your new document].
16383  The template file also contains some examples of the special paragraph
16384  environments used by this class.
16385  I'll describe those next.
16386 \end_layout
16387
16388 \begin_layout Subsection
16389 Paragraph Environments
16390 \end_layout
16391
16392 \begin_layout Subsubsection
16393 Supported Environments
16394 \end_layout
16395
16396 \begin_layout Standard
16397 The first thing you'll notice when you start up a new 
16398 \family sans
16399 slides
16400 \family default
16401  document is the font size and type: it's the equivalent of the size 
16402 \begin_inset Quotes eld
16403 \end_inset
16404
16405
16406 \family sans
16407 Largest
16408 \family default
16409
16410 \begin_inset Quotes erd
16411 \end_inset
16412
16413  in the 
16414 \family sans
16415 Sans
16416 \begin_inset space ~
16417 \end_inset
16418
16419 Serif
16420 \family default
16421  font.
16422  This is also what's used in the output.
16423  Think of this as a 
16424 \begin_inset Quotes eld
16425 \end_inset
16426
16427 visual cue
16428 \begin_inset Quotes erd
16429 \end_inset
16430
16431  to remind you that this is a slide.
16432  Your final slides will use a larger font; ergo, you'll have less space.
16433  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16434 \end_layout
16435
16436 \begin_layout Standard
16437 The next thing that becomes obvious is the changes to the paragraph environment
16438  pull-down box [at the far-left end of the toolbar].
16439  Most of the paragraph environments you're used to seeing are missing.
16440  There are also five new ones.
16441  That's because the 
16442 \family sans
16443 slides
16444 \family default
16445  class itself only supports certain paragraph environments:
16446 \end_layout
16447
16448 \begin_layout Itemize
16449
16450 \family sans
16451 Standard
16452 \end_layout
16453
16454 \begin_layout Itemize
16455
16456 \family sans
16457 Itemize
16458 \end_layout
16459
16460 \begin_layout Itemize
16461
16462 \family sans
16463 Enumerate
16464 \end_layout
16465
16466 \begin_layout Itemize
16467
16468 \family sans
16469 Description
16470 \end_layout
16471
16472 \begin_layout Itemize
16473
16474 \family sans
16475 List
16476 \end_layout
16477
16478 \begin_layout Itemize
16479
16480 \family sans
16481 Quotation
16482 \end_layout
16483
16484 \begin_layout Itemize
16485
16486 \family sans
16487 Quote
16488 \end_layout
16489
16490 \begin_layout Itemize
16491
16492 \family sans
16493 Verse
16494 \end_layout
16495
16496 \begin_layout Itemize
16497
16498 \family sans
16499 Caption
16500 \end_layout
16501
16502 \begin_layout Itemize
16503
16504 \family sans
16505 LyX-Code
16506 \end_layout
16507
16508 \begin_layout Itemize
16509
16510 \family sans
16511 Comment
16512 \end_layout
16513
16514 \begin_layout Standard
16515 All of the other standard environments, including the section-heading environmen
16516 ts, aren't used in the 
16517 \family sans
16518 slides
16519 \family default
16520  class.
16521 \end_layout
16522
16523 \begin_layout Standard
16524 On the other hand, you'll notice the following new environments:
16525 \end_layout
16526
16527 \begin_layout Itemize
16528
16529 \family sans
16530 Slide
16531 \end_layout
16532
16533 \begin_layout Itemize
16534
16535 \family sans
16536 Overlay
16537 \end_layout
16538
16539 \begin_layout Itemize
16540
16541 \family sans
16542 Note
16543 \end_layout
16544
16545 \begin_layout Itemize
16546
16547 \family sans
16548 InvisibleText
16549 \end_layout
16550
16551 \begin_layout Itemize
16552
16553 \family sans
16554 VisibleText
16555 \end_layout
16556
16557 \begin_layout Standard
16558 These five are kind of quirky, due to a 
16559 \begin_inset Quotes eld
16560 \end_inset
16561
16562 feature
16563 \begin_inset Quotes erd
16564 \end_inset
16565
16566  in LyX.
16567  You see, LyX doesn't permit you to nest any other paragraph environment
16568  into an empty environment.
16569  Now, that's fine and dandy, but it means that you wouldn't be able to start
16570  a slide with anything except plain text.
16571  To deal with this, I've performed a little 
16572 \begin_inset Quotes eld
16573 \end_inset
16574
16575 LaTeX magic.
16576 \begin_inset Quotes erd
16577 \end_inset
16578
16579  
16580 \end_layout
16581
16582 \begin_layout Subsubsection
16583 Quirks of the New Environments
16584 \begin_inset CommandInset label
16585 LatexCommand label
16586 name "sec:slideQuirk"
16587
16588 \end_inset
16589
16590
16591 \end_layout
16592
16593 \begin_layout Standard
16594 All five of the new paragraph environments are somewhat quirky due to inherent
16595  limitiations in the current version of LyX.
16596  As I just mentioned, LyX forbids environments that begin with another environme
16597 nt.
16598  To get around this, the 
16599 \family sans
16600 Slide
16601 \family default
16602  environment isn't a paragraph environment as described in the 
16603 \emph on
16604 User's Guide
16605 \emph default
16606 .
16607  
16608 \end_layout
16609
16610 \begin_layout Standard
16611 You should consider 
16612 \family sans
16613 Slide
16614 \family default
16615
16616 \family sans
16617 Overlay
16618 \family default
16619 , and 
16620 \family sans
16621 Note
16622 \family default
16623  to be 
16624 \begin_inset Quotes eld
16625 \end_inset
16626
16627 pseudo-environments.
16628 \begin_inset Quotes erd
16629 \end_inset
16630
16631  They look like a section heading or a 
16632 \begin_inset Quotes eld
16633 \end_inset
16634
16635
16636 \family sans
16637 Caption
16638 \family default
16639 ,
16640 \begin_inset Quotes erd
16641 \end_inset
16642
16643  but really begin a [and, if necessary, end the previous] paragraph environment.
16644  Likewise, treat 
16645 \family sans
16646 InvisibleText
16647 \family default
16648  and 
16649 \family sans
16650 VisibleText
16651 \family default
16652  as 
16653 \begin_inset Quotes eld
16654 \end_inset
16655
16656 pseudo-commands.
16657 \begin_inset Quotes erd
16658 \end_inset
16659
16660  These two perform some action.
16661 \end_layout
16662
16663 \begin_layout Standard
16664 A common feature of all five environments, 
16665 \family sans
16666 Slide
16667 \family default
16668
16669 \family sans
16670 Overlay
16671 \family default
16672
16673 \family sans
16674 Note
16675 \family default
16676
16677 \family sans
16678 InvisibleText
16679 \family default
16680  and 
16681 \family sans
16682 VisibleText
16683 \family default
16684 , is a rather long-ish label.
16685  The text following this label — ordinarily the contents of the paragraph
16686  environment — is utterly irrelevant for 
16687 \family sans
16688 Slide
16689 \family default
16690
16691 \family sans
16692 Overlay
16693 \family default
16694
16695 \family sans
16696 Note
16697 \family default
16698
16699 \family sans
16700 InvisibleText
16701 \family default
16702  and 
16703 \family sans
16704 VisibleText
16705 \family default
16706 .
16707  LyX completely ignores it.
16708  In fact, you can leave these five environments completely empty.
16709  
16710 \end_layout
16711
16712 \begin_layout Standard
16713 While you don't 
16714 \emph on
16715 have
16716 \emph default
16717  to put any text after the rather long-ish label, you might want to.
16718  This could be a short description of the contents of the 
16719 \family sans
16720 Slide
16721 \family default
16722 , for example.
16723  In that case, enter your descriptive comment and hit 
16724 \family sans
16725 Return
16726 \family default
16727  as you normally would.
16728 \end_layout
16729
16730 \begin_layout Standard
16731 If, on the other hand, you don't want to enter any descriptive text, you'll
16732  hit another LyX quirk.
16733  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16734  environment until you put something in the old one.
16735  So, do this:
16736 \end_layout
16737
16738 \begin_layout Itemize
16739 Start entering the text that will 
16740 \emph on
16741 follow
16742 \emph default
16743  the new 
16744 \family sans
16745 Slide
16746 \family default
16747
16748 \family sans
16749 Overlay
16750 \family default
16751
16752 \family sans
16753 Note
16754 \family default
16755
16756 \family sans
16757 InvisibleText
16758 \family default
16759  or 
16760 \family sans
16761 VisibleText
16762 \family default
16763 .
16764  
16765 \end_layout
16766
16767 \begin_layout Itemize
16768 Now move to the beginning of that paragraph.
16769  
16770 \end_layout
16771
16772 \begin_layout Itemize
16773 Next, hit 
16774 \family sans
16775 Return
16776 \family default
16777 .
16778  
16779 \end_layout
16780
16781 \begin_layout Itemize
16782 Finally, change this new, empty paragraph to a 
16783 \family sans
16784 Slide
16785 \family default
16786
16787 \family sans
16788 Overlay
16789 \family default
16790
16791 \family sans
16792 Note
16793 \family default
16794
16795 \family sans
16796 InvisibleText
16797 \family default
16798  or 
16799 \family sans
16800 VisibleText
16801 \family default
16802 .
16803  
16804 \end_layout
16805
16806 \begin_layout Standard
16807 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16808
16809 \end_layout
16810
16811 \begin_layout Subsection
16812 Making a Presentation with 
16813 \family sans
16814 Slide
16815 \family default
16816
16817 \family sans
16818 Overlay
16819 \family default
16820  and 
16821 \family sans
16822 Note
16823 \end_layout
16824
16825 \begin_layout Subsubsection
16826 Using the 
16827 \family sans
16828 Slide
16829 \family default
16830  Environment
16831 \end_layout
16832
16833 \begin_layout Standard
16834 If you're expecting this section to teach you how to actually make a presentatio
16835 n, you'll be sorely disappointed.
16836  Naturally, I'll describe all of the ways the 
16837 \family sans
16838 slides
16839 \family default
16840  class can assist you in preparing the materials for a presentation.
16841  Filling in the contents, however, is up to you.
16842  [Then again, that 
16843 \emph on
16844 is
16845 \emph default
16846  the LyX philosophy.]
16847 \end_layout
16848
16849 \begin_layout Standard
16850 Choosing the 
16851 \family sans
16852 Slide
16853 \family default
16854  environment [in the manner described in section
16855 \begin_inset space ~
16856 \end_inset
16857
16858
16859 \begin_inset CommandInset ref
16860 LatexCommand ref
16861 reference "sec:slideQuirk"
16862
16863 \end_inset
16864
16865 ] tells LyX to begin a new slide [duh].
16866  The label for this environment/
16867 \begin_inset Quotes erd
16868 \end_inset
16869
16870 pseudo-command
16871 \begin_inset Quotes erd
16872 \end_inset
16873
16874  is an 
16875 \begin_inset Quotes eld
16876 \end_inset
16877
16878 ASCII line,
16879 \begin_inset Quotes erd
16880 \end_inset
16881
16882  in cool blue, followed by the label, 
16883 \begin_inset Quotes eld
16884 \end_inset
16885
16886 NewSlide:
16887 \begin_inset Quotes erd
16888 \end_inset
16889
16890 .
16891  Any text or paragraph environments that follow this one go on the new slide.
16892  It's that simple.
16893 \end_layout
16894
16895 \begin_layout Standard
16896 Slides are probably the only time you'll need to forcibly end pages in LyX
16897  (this can be specified in the 
16898 \family sans
16899 Paragraph Layout
16900 \family default
16901  dialog).
16902  In fact, you'll want to, once you finish entering the contents of one slide.
16903  If you've entered more text than can physically fit on a slide, the extra
16904  overflows onto a new slide.
16905  I don't recommend doing this, however, since the overflow slide won't have
16906  any page number on it.
16907  Furthermore, it may interfere with any 
16908 \family sans
16909 Overlay
16910 \family default
16911  you've made to accompany the oversized 
16912 \family sans
16913 Slide
16914 \family default
16915 .
16916 \end_layout
16917
16918 \begin_layout Standard
16919 The 
16920 \family sans
16921 Overlay
16922 \family default
16923  and 
16924 \family sans
16925 Note
16926 \family default
16927  environments work the same way as the 
16928 \family sans
16929 Slide
16930 \family default
16931  environment.
16932  They both create an 
16933 \begin_inset Quotes eld
16934 \end_inset
16935
16936 ASCII line
16937 \begin_inset Quotes erd
16938 \end_inset
16939
16940  followed by a label [
16941 \begin_inset Quotes eld
16942 \end_inset
16943
16944 NewOverlay:
16945 \begin_inset Quotes erd
16946 \end_inset
16947
16948  and 
16949 \begin_inset Quotes eld
16950 \end_inset
16951
16952 NewNote:
16953 \begin_inset Quotes erd
16954 \end_inset
16955
16956 , respectively].
16957  The color is a stunning magenta instead of blue, and the 
16958 \begin_inset Quotes eld
16959 \end_inset
16960
16961 ASCII line
16962 \begin_inset Quotes erd
16963 \end_inset
16964
16965  will look different, in style and in length.
16966  The label fonts of all three also differ from one another.
16967 \end_layout
16968
16969 \begin_layout Standard
16970 As with a 
16971 \family sans
16972 Slide
16973 \family default
16974 , if the contents of a 
16975 \family sans
16976 Note
16977 \family default
16978  or 
16979 \family sans
16980 Overlay
16981 \family default
16982  exceed the physical size of a slide or sheet of paper, the extra will overflow
16983  onto a new sheet.
16984  Again, you should avoid this.
16985  It defeats the whole purpose of 
16986 \family sans
16987 Note
16988 \family default
16989 s and 
16990 \family sans
16991 Overlay
16992 \family default
16993 s.
16994 \end_layout
16995
16996 \begin_layout Subsubsection
16997 Using 
16998 \family sans
16999 Overlay
17000 \family default
17001  with 
17002 \family sans
17003 Slide
17004 \end_layout
17005
17006 \begin_layout Standard
17007 The idea behind an 
17008 \family sans
17009 Overlay
17010 \family default
17011  is a slide that sits atop another slide.
17012  Perhaps you wish to discuss a figure on the main 
17013 \family sans
17014 Slide
17015 \family default
17016  before displaying the text associated with it.
17017  One way to accomplish this is tape a flap of dark paper over the part of
17018  the 
17019 \family sans
17020 Slide
17021 \family default
17022  you want to display later.
17023  This method fails, however, if you wish to overlap one graph with another,
17024  for example.
17025  You would then have to fumble while speaking to align the two separate,
17026  overlapping 
17027 \family sans
17028 Slide
17029 \family default
17030 s to align the two graphs.
17031  The use of an 
17032 \family sans
17033 Overlay
17034 \family default
17035  environment in both cases makes life much easier.
17036 \end_layout
17037
17038 \begin_layout Standard
17039 Each 
17040 \family sans
17041 Overlay
17042 \family default
17043  receives the page number of its 
17044 \begin_inset Quotes eld
17045 \end_inset
17046
17047 parent
17048 \begin_inset Quotes erd
17049 \end_inset
17050
17051  
17052 \family sans
17053 Slide
17054 \family default
17055 , appended by 
17056 \begin_inset Quotes eld
17057 \end_inset
17058
17059
17060 \family typewriter
17061 -a
17062 \family default
17063
17064 \begin_inset Quotes erd
17065 \end_inset
17066
17067 .
17068 \begin_inset Foot
17069 status collapsed
17070
17071 \begin_layout Plain Layout
17072 Presumably, mutliple 
17073 \family sans
17074 Overlay
17075 \family default
17076 s would have 
17077 \begin_inset Quotes eld
17078 \end_inset
17079
17080
17081 \family typewriter
17082 -a
17083 \family default
17084
17085 \begin_inset Quotes erd
17086 \end_inset
17087
17088
17089 \begin_inset Quotes eld
17090 \end_inset
17091
17092
17093 \family typewriter
17094 -b
17095 \family default
17096
17097 \begin_inset Quotes erd
17098 \end_inset
17099
17100
17101 \begin_inset Quotes eld
17102 \end_inset
17103
17104
17105 \family typewriter
17106 -c
17107 \family default
17108
17109 \begin_inset Quotes erd
17110 \end_inset
17111
17112 , etc.
17113 \begin_inset space ~
17114 \end_inset
17115
17116 appended to the page number of the parent 
17117 \family sans
17118 Slide
17119 \family default
17120 .
17121  
17122 \end_layout
17123
17124 \end_inset
17125
17126  Clearly, you want the contents of both the 
17127 \family sans
17128 Slide
17129 \family default
17130  and the 
17131 \family sans
17132 Overlay
17133 \family default
17134  to each fit on a single physical slide! You should probably consider an
17135  
17136 \family sans
17137 Overlay
17138 \family default
17139  as 
17140 \begin_inset Quotes eld
17141 \end_inset
17142
17143 part of
17144 \begin_inset Quotes erd
17145 \end_inset
17146
17147  a 
17148 \family sans
17149 Slide
17150 \family default
17151 .
17152  Indeed, the LyX 
17153 \family sans
17154 slides
17155 \family default
17156  class provides a visual cue for this: the label at the start of an 
17157 \family sans
17158 Overlay
17159 \family default
17160  is shorter than that at the start of a 
17161 \family sans
17162 Slide
17163 \family default
17164 .
17165  Lastly, when you generate printable output, you'll find alignment markers
17166  in all four corners of both the 
17167 \family sans
17168 Overlay
17169 \family default
17170  page and its parent 
17171 \family sans
17172 Slide
17173 \family default
17174 .
17175  These will assist you in lining up the two physical slides.
17176 \end_layout
17177
17178 \begin_layout Standard
17179 The major problem in overlaying two slides is aligning the contents of the
17180  two transparencies.
17181  How much space should you leave for that graph on the second slide? Worse
17182  still, what if you want a graph and a sentence on second slide, but there
17183  is text on the main transparency that goes in between them? You could try
17184  and insert vertical space of the right size.
17185  The better way is to use 
17186 \family sans
17187 InvisibleText
17188 \family default
17189  and 
17190 \family sans
17191 VisibleText
17192 \family default
17193 .
17194 \end_layout
17195
17196 \begin_layout Standard
17197 As their names imply, 
17198 \family sans
17199 InvisibleText
17200 \family default
17201  and 
17202 \family sans
17203 VisibleText
17204 \family default
17205  are two command-like paragraph environments that make all subsequent text
17206  invisible and visible, respectively.
17207  Note from section
17208 \begin_inset space ~
17209 \end_inset
17210
17211
17212 \begin_inset CommandInset ref
17213 LatexCommand ref
17214 reference "sec:slideQuirk"
17215
17216 \end_inset
17217
17218  that you don't place anything 
17219 \emph on
17220 into
17221 \emph default
17222  these two environments, however.
17223  When you create an 
17224 \family sans
17225 InvisibleText
17226 \family default
17227 , it inserts a centered, sky-blue label into the page reading 
17228 \begin_inset Quotes eld
17229 \end_inset
17230
17231 <Invisible Text Follows>
17232 \begin_inset Quotes erd
17233 \end_inset
17234
17235 .
17236  For paragraphs following this label, the parts of the 
17237 \family sans
17238 Slide
17239 \family default
17240  [or 
17241 \family sans
17242 Overlay
17243 \family default
17244 ; it doesn't matter which] where they would be contain instead blank space.
17245  
17246 \end_layout
17247
17248 \begin_layout Standard
17249 For 
17250 \family sans
17251 VisibleText
17252 \family default
17253 , the corresponding centered label is 
17254 \begin_inset Quotes eld
17255 \end_inset
17256
17257 <Visible Text Follows>
17258 \begin_inset Quotes erd
17259 \end_inset
17260
17261  in blazing green.
17262  Paragraphs following this label behave normally.
17263  Note that the beginning of a new 
17264 \family sans
17265 Slide
17266 \family default
17267
17268 \family sans
17269 Overlay
17270 \family default
17271 , or 
17272 \family sans
17273 Note
17274 \family default
17275  automatically shuts off an 
17276 \family sans
17277 InvisibleText
17278 \family default
17279 .
17280  It's therefore not necessary to use 
17281 \family sans
17282 VisibleText
17283 \family default
17284  at the end of a 
17285 \family sans
17286 Slide
17287 \family default
17288 .
17289 \end_layout
17290
17291 \begin_layout Standard
17292 By now, it should be obvious how to create overlay transparencies using
17293  the proper combination of 
17294 \family sans
17295 InvisibleText
17296 \family default
17297  and 
17298 \family sans
17299 VisibleText
17300 \family default
17301  on a 
17302 \family sans
17303 Slide
17304 \family default
17305  and 
17306 \family sans
17307 Overlay
17308 \family default
17309 :
17310 \end_layout
17311
17312 \begin_layout Enumerate
17313 Create a 
17314 \family sans
17315 Slide
17316 \family default
17317 , including everything that will appear on it, whether on the main slide
17318  or on the 
17319 \family sans
17320 Overlay
17321 \family default
17322 .
17323 \end_layout
17324
17325 \begin_layout Enumerate
17326 Before each figure or paragraph that will appear only on the 
17327 \family sans
17328 Overlay
17329 \family default
17330 , insert an 
17331 \family sans
17332 InvisibleText
17333 \family default
17334  environment.
17335  If necessary, insert a 
17336 \family sans
17337 VisibleText
17338 \family default
17339  environment after the 
17340 \family sans
17341 Overlay
17342 \family default
17343 -only text.
17344 \end_layout
17345
17346 \begin_layout Enumerate
17347 Start an 
17348 \family sans
17349 Overlay
17350 \family default
17351  immediately following the 
17352 \family sans
17353 Slide
17354 \family default
17355 .
17356 \end_layout
17357
17358 \begin_layout Enumerate
17359 Copy the contents of this 
17360 \family sans
17361 Slide
17362 \family default
17363  into the 
17364 \family sans
17365 Overlay
17366 \family default
17367 .
17368 \end_layout
17369
17370 \begin_layout Enumerate
17371 Within the 
17372 \family sans
17373 Overlay
17374 \family default
17375 , change all of the 
17376 \family sans
17377 InvisibleText
17378 \family default
17379  lines to 
17380 \family sans
17381 VisibleText
17382 \family default
17383  and vice-versa.
17384 \end_layout
17385
17386 \begin_layout Standard
17387 That's it.
17388  You've just made an 
17389 \family sans
17390 Overlay
17391 \family default
17392 .
17393 \end_layout
17394
17395 \begin_layout Standard
17396 There's one problem with the way I've designed the LyX 
17397 \family sans
17398 slides
17399 \family default
17400  class: you can't make text in the middle of a paragraph invisible, nor
17401  make text in the middle of an invisible paragraph visible again.
17402  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17403 \begin_inset Foot
17404 status collapsed
17405
17406 \begin_layout Plain Layout
17407 The commands of interest are: 
17408 \end_layout
17409
17410 \begin_layout Itemize
17411
17412 \family typewriter
17413 {
17414 \backslash
17415 invisible \SpecialChar \ldots{}
17416  }
17417 \end_layout
17418
17419 \begin_layout Itemize
17420
17421 \family typewriter
17422 {
17423 \backslash
17424 visible \SpecialChar \ldots{}
17425  }
17426 \end_layout
17427
17428 \begin_layout Plain Layout
17429 \SpecialChar \ldots{}
17430 and need to be marked as TeX.
17431  The text whose 
17432 \begin_inset Quotes eld
17433 \end_inset
17434
17435 visibility
17436 \begin_inset Quotes erd
17437 \end_inset
17438
17439  you wish to change goes in between the brackets [and after the 
17440 \family typewriter
17441
17442 \backslash
17443 invisible
17444 \family default
17445  or 
17446 \family typewriter
17447
17448 \backslash
17449 visible
17450 \family default
17451  command].
17452  If you don't know how to mark text as TeX, see the appropriate section
17453  of the 
17454 \emph on
17455 User's Guide
17456 \emph default
17457 .
17458 \end_layout
17459
17460 \end_inset
17461
17462
17463 \end_layout
17464
17465 \begin_layout Subsubsection
17466 Using 
17467 \family sans
17468 Note
17469 \family default
17470  with 
17471 \family sans
17472 Slide
17473 \family default
17474
17475 \begin_inset CommandInset label
17476 LatexCommand label
17477 name "sec:slideNote"
17478
17479 \end_inset
17480
17481
17482 \end_layout
17483
17484 \begin_layout Standard
17485 Like an 
17486 \family sans
17487 Overlay
17488 \family default
17489 , a 
17490 \family sans
17491 Note
17492 \family default
17493  is associated with a 
17494 \begin_inset Quotes eld
17495 \end_inset
17496
17497 parent
17498 \begin_inset Quotes erd
17499 \end_inset
17500
17501  
17502 \family sans
17503 Slide
17504 \family default
17505 .
17506  Here, too, the LyX 
17507 \family sans
17508 slides
17509 \family default
17510  class provides visual cues.
17511  The label for a 
17512 \family sans
17513 Note
17514 \family default
17515  is shorter than that of a 
17516 \family sans
17517 Slide
17518 \family default
17519  [yet longer than that of an 
17520 \family sans
17521 Overlay
17522 \family default
17523 ] and, like the label of an 
17524 \family sans
17525 Overlay
17526 \family default
17527  is shockingly magenta.
17528  Additionally, the printed 
17529 \family sans
17530 Note
17531 \family default
17532  has the page number of its 
17533 \begin_inset Quotes eld
17534 \end_inset
17535
17536 parent
17537 \begin_inset Quotes erd
17538 \end_inset
17539
17540  
17541 \family sans
17542 Slide
17543 \family default
17544 , appended by 
17545 \begin_inset Quotes eld
17546 \end_inset
17547
17548
17549 \family typewriter
17550 -
17551 \family default
17552 1
17553 \begin_inset Quotes erd
17554 \end_inset
17555
17556
17557 \begin_inset Quotes eld
17558 \end_inset
17559
17560
17561 \family typewriter
17562 -
17563 \family default
17564 2
17565 \begin_inset Quotes erd
17566 \end_inset
17567
17568
17569 \begin_inset Quotes eld
17570 \end_inset
17571
17572
17573 \family typewriter
17574 -
17575 \family default
17576 3
17577 \begin_inset Quotes erd
17578 \end_inset
17579
17580 , etc.
17581  You can have multiple 
17582 \family sans
17583 Note
17584 \family default
17585 s associated with a single 
17586 \family sans
17587 Slide
17588 \family default
17589 , and, as with 
17590 \family sans
17591 Slide
17592 \family default
17593  and 
17594 \family sans
17595 Overlay
17596 \family default
17597 , you'll probably want to break up long 
17598 \family sans
17599 Note
17600 \family default
17601 s so that they fit on a single sheet of paper.
17602 \end_layout
17603
17604 \begin_layout Standard
17605 The purpose of a 
17606 \family sans
17607 Note
17608 \family default
17609  is obvious: it contains anything additional you might want to say about
17610  a 
17611 \family sans
17612 Slide
17613 \family default
17614 .
17615  It could also be used as a sheet of reminders for a particular 
17616 \family sans
17617 Slide
17618 \family default
17619 .
17620  In the case of the latter, you might want to make use of time markers.
17621  Currently, the LyX 
17622 \family sans
17623 slides
17624 \family default
17625  class has no 
17626 \begin_inset Quotes eld
17627 \end_inset
17628
17629 native
17630 \begin_inset Quotes erd
17631 \end_inset
17632
17633  support for time markers, a 
17634 \noun on
17635 SliTeX
17636 \noun default
17637  feature.
17638  So, you'll have to resort to using the LaTeX codes.
17639 \end_layout
17640
17641 \begin_layout Standard
17642 To use time markers, you'll need to specify the extra class option 
17643 \begin_inset Quotes eld
17644 \end_inset
17645
17646
17647 \family typewriter
17648 clock
17649 \family default
17650
17651 \begin_inset Quotes erd
17652 \end_inset
17653
17654  [see section
17655 \begin_inset space ~
17656 \end_inset
17657
17658
17659 \begin_inset CommandInset ref
17660 LatexCommand ref
17661 reference "sec:slidesetup"
17662
17663 \end_inset
17664
17665 ].
17666  This option turns on timing marks, which will appear in the lower-left-hand
17667  corner of every 
17668 \family sans
17669 Note
17670 \family default
17671  you generate.
17672  To set what appears in the time marker, you use the LaTeX commands 
17673 \begin_inset Quotes eld
17674 \end_inset
17675
17676
17677 \family typewriter
17678
17679 \backslash
17680 settime{}
17681 \family default
17682
17683 \begin_inset Quotes erd
17684 \end_inset
17685
17686  and 
17687 \begin_inset Quotes eld
17688 \end_inset
17689
17690
17691 \family typewriter
17692
17693 \backslash
17694 addtime{}
17695 \family default
17696
17697 \begin_inset Quotes erd
17698 \end_inset
17699
17700 .
17701  The arguments of both commands are time measured in seconds.
17702  
17703 \begin_inset Quotes eld
17704 \end_inset
17705
17706
17707 \family typewriter
17708
17709 \backslash
17710 settime{}
17711 \family default
17712
17713 \begin_inset Quotes erd
17714 \end_inset
17715
17716  sets the time marker to a given time.
17717  
17718 \begin_inset Quotes eld
17719 \end_inset
17720
17721
17722 \family typewriter
17723
17724 \backslash
17725 addtime{}
17726 \family default
17727
17728 \begin_inset Quotes erd
17729 \end_inset
17730
17731  increments the time marker by the specified amount.
17732  Using time markers and 
17733 \family sans
17734 Note
17735 \family default
17736 s in this fashion, you can remind yourself how much time to spend on a particula
17737
17738 \family sans
17739 Slide
17740 \family default
17741 .
17742 \end_layout
17743
17744 \begin_layout Standard
17745 There's one last feature to describe.
17746  Clearly, you'd like to print out all of your 
17747 \family sans
17748 Slide
17749 \family default
17750 s and 
17751 \family sans
17752 Overlay
17753 \family default
17754 s on transparencies while printing all of your 
17755 \family sans
17756 Note
17757 \family default
17758 s on plain paper.
17759  However, a 
17760 \family sans
17761 Note
17762 \family default
17763  
17764 \emph on
17765 must
17766 \emph default
17767  follow the 
17768 \family sans
17769 Slide
17770 \family default
17771  with which it is associated.
17772  What's a person to do?
17773 \end_layout
17774
17775 \begin_layout Standard
17776 Luckily, there are two LaTeX commands that allow you to select what to print
17777  out.
17778  Both must be placed into the preamble of your document.
17779  The command 
17780 \begin_inset Quotes eld
17781 \end_inset
17782
17783
17784 \family typewriter
17785
17786 \backslash
17787 onlyslides{
17788 \backslash
17789 slides}
17790 \family default
17791
17792 \begin_inset Quotes erd
17793 \end_inset
17794
17795  will cause the output to contain only the 
17796 \family sans
17797 Slide
17798 \family default
17799 s and 
17800 \family sans
17801 Overlay
17802 \family default
17803 s.
17804  Correspondingly, the command 
17805 \begin_inset Quotes eld
17806 \end_inset
17807
17808
17809 \family typewriter
17810
17811 \backslash
17812 onlynotes{
17813 \backslash
17814 notes}
17815 \family default
17816
17817 \begin_inset Quotes erd
17818 \end_inset
17819
17820  prevents the output of anything but 
17821 \family sans
17822 Note
17823 \family default
17824 s.
17825  I'd advise placing both commands in the preamble and initially comment
17826  both out.
17827  You can then preview your entire presentation as you write.
17828  When you're done writing, you can then uncomment one of the two to select
17829  what you want to print.
17830  I like to uncomment 
17831 \begin_inset Quotes eld
17832 \end_inset
17833
17834
17835 \family typewriter
17836
17837 \backslash
17838 onlyslides{
17839 \backslash
17840 slides}
17841 \family default
17842
17843 \begin_inset Quotes erd
17844 \end_inset
17845
17846  , print to a file with 
17847 \begin_inset Quotes eld
17848 \end_inset
17849
17850
17851 \family typewriter
17852 -slides
17853 \family default
17854
17855 \begin_inset Quotes erd
17856 \end_inset
17857
17858  in its name, comment it back out, then uncomment 
17859 \begin_inset Quotes eld
17860 \end_inset
17861
17862
17863 \family typewriter
17864
17865 \backslash
17866 onlynotes{
17867 \backslash
17868 notes}
17869 \family default
17870
17871 \begin_inset Quotes erd
17872 \end_inset
17873
17874  and print to a 
17875 \begin_inset Quotes eld
17876 \end_inset
17877
17878
17879 \family typewriter
17880 *-notes.ps
17881 \family default
17882
17883 \begin_inset Quotes erd
17884 \end_inset
17885
17886  file.
17887  I can then send either file to a printer, loading transparencies or plain
17888  paper as appropriate.
17889 \end_layout
17890
17891 \begin_layout Standard
17892 You can also provide other arguments to the 
17893 \begin_inset Quotes eld
17894 \end_inset
17895
17896
17897 \family typewriter
17898
17899 \backslash
17900 onlyslides{}
17901 \family default
17902
17903 \begin_inset Quotes erd
17904 \end_inset
17905
17906  and 
17907 \begin_inset Quotes eld
17908 \end_inset
17909
17910
17911 \family typewriter
17912
17913 \backslash
17914 onlynotes{}
17915 \family default
17916
17917 \begin_inset Quotes erd
17918 \end_inset
17919
17920  commands.
17921  See a good LaTeX book for details.
17922 \end_layout
17923
17924 \begin_layout Subsection
17925 The 
17926 \family sans
17927 slides
17928 \family default
17929  Class Template File
17930 \end_layout
17931
17932 \begin_layout Standard
17933 I have also provided a template file, 
17934 \begin_inset Quotes eld
17935 \end_inset
17936
17937
17938 \family typewriter
17939 slides.lyx
17940 \family default
17941
17942 \begin_inset Quotes erd
17943 \end_inset
17944
17945 , with the 
17946 \family sans
17947 slides
17948 \family default
17949  class.
17950  To use it, begin your new presentation with 
17951 \family sans
17952 \bar under
17953 F
17954 \bar default
17955 ile\SpecialChar \menuseparator
17956 New
17957 \begin_inset space ~
17958 \end_inset
17959
17960 from
17961 \begin_inset space ~
17962 \end_inset
17963
17964
17965 \bar under
17966 T
17967 \bar default
17968 emplate
17969 \family default
17970 .
17971  Your new LyX presentation file will contain an example 
17972 \family sans
17973 Slide
17974 \family default
17975  – 
17976 \family sans
17977 Overlay
17978 \family default
17979  – 
17980 \family sans
17981 Note
17982 \family default
17983  triplet.
17984  The 
17985 \family sans
17986 Slide
17987 \family default
17988  and 
17989 \family sans
17990 Overlay
17991 \family default
17992  additionally contain an example of the use of 
17993 \family sans
17994 InvisibleText
17995 \family default
17996  and 
17997 \family sans
17998 VisibleText
17999 \family default
18000 .
18001  Lastly, the preamble will contain:
18002 \end_layout
18003
18004 \begin_layout LyX-Code
18005 % Uncomment to print out only slides and overlays
18006 \end_layout
18007
18008 \begin_layout LyX-Code
18009 %
18010 \end_layout
18011
18012 \begin_layout LyX-Code
18013 %
18014 \backslash
18015 onlyslides{
18016 \backslash
18017 slides}
18018 \begin_inset Newline newline
18019 \end_inset
18020
18021  
18022 \end_layout
18023
18024 \begin_layout LyX-Code
18025 % Uncomment to print out only notes
18026 \end_layout
18027
18028 \begin_layout LyX-Code
18029 %
18030 \end_layout
18031
18032 \begin_layout LyX-Code
18033 %
18034 \backslash
18035 onlynotes{
18036 \backslash
18037 notes}
18038 \end_layout
18039
18040 \begin_layout Standard
18041 One final thing: I created this class to support the LaTeX2e 
18042 \begin_inset Quotes eld
18043 \end_inset
18044
18045
18046 \noun on
18047 SliTeX
18048 \noun default
18049  emulation
18050 \begin_inset Quotes erd
18051 \end_inset
18052
18053  class, one of the built-in LaTeX2e classes.
18054  Neither I nor the rest of the LyX Team endorse or oppose the use of this
18055  built-in slide class.
18056  It's here if you want it or need it.
18057  There exist other LaTeX2e classes for creating presentations, such as the
18058  
18059 \family sans
18060 Foils
18061 \family default
18062  class [see section
18063 \begin_inset space ~
18064 \end_inset
18065
18066
18067 \begin_inset CommandInset ref
18068 LatexCommand ref
18069 reference "sec:foiltex"
18070
18071 \end_inset
18072
18073 ] or the 
18074 \begin_inset Quotes eld
18075 \end_inset
18076
18077
18078 \family typewriter
18079 seminar
18080 \family default
18081
18082 \begin_inset Quotes erd
18083 \end_inset
18084
18085  package [present on some TeX distributions].
18086  The latter is not yet supported under LyX.
18087 \begin_inset Foot
18088 status collapsed
18089
18090 \begin_layout Plain Layout
18091 Perhaps you can take on the task\SpecialChar \ldots{}
18092
18093 \end_layout
18094
18095 \end_inset
18096
18097  I know nothing about these other classes.
18098  Try them out to see what sort of alternative they provide.
18099 \end_layout
18100
18101 \begin_layout Chapter
18102 LyX Features needing Extra Software
18103 \end_layout
18104
18105 \begin_layout Section
18106 Checking TeX
18107 \end_layout
18108
18109 \begin_layout Standard
18110 by 
18111 \noun on
18112 Asger Alstrup
18113 \end_layout
18114
18115 \begin_layout Subsection
18116 Introduction
18117 \end_layout
18118
18119 \begin_layout Standard
18120 If you have the 
18121 \family typewriter
18122 chktex
18123 \family default
18124  program installed
18125 \begin_inset Foot
18126 status collapsed
18127
18128 \begin_layout Plain Layout
18129
18130 \family typewriter
18131 chktex
18132 \family default
18133  is not yet available when you are using the LaTeX distribution MiKTeX.
18134 \end_layout
18135
18136 \end_inset
18137
18138 , you'll find in the 
18139 \family sans
18140 Tools
18141 \family default
18142  menu the entry: 
18143 \family sans
18144 Check
18145 \begin_inset space ~
18146 \end_inset
18147
18148 TeX
18149 \family default
18150 .
18151  You can get 
18152 \family typewriter
18153 chktex
18154 \family default
18155  it from CTAN, 
18156 \begin_inset CommandInset href
18157 LatexCommand href
18158 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
18159
18160 \end_inset
18161
18162 .
18163 \end_layout
18164
18165 \begin_layout Standard
18166 The 
18167 \family sans
18168 ChkTeX
18169 \family default
18170  package is a program that was written by 
18171 \begin_inset Flex Noun
18172 status collapsed
18173
18174 \begin_layout Plain Layout
18175 Jens T.
18176 \begin_inset space ~
18177 \end_inset
18178
18179 Berger Thielemann
18180 \end_layout
18181
18182 \end_inset
18183
18184  in frustration because some constructs in LaTeX are sometimes non-intuitive,
18185  and easy to forget.
18186  The program runs over your LaTeX file, checks the integrity of the file,
18187  and flags some common errors.
18188  In other technical words, it is 
18189 \family typewriter
18190 lint
18191 \family default
18192  for LaTeX.
18193 \end_layout
18194
18195 \begin_layout Standard
18196 Well, what is a syntax checker doing in LyX which is supposed to produce
18197  correct LaTeX anyways? The answer is simple: Just as 
18198 \family typewriter
18199 Lint
18200 \family default
18201  not only checks the 
18202 \emph on
18203 syntax
18204 \emph default
18205  of C programs, but also does 
18206 \emph on
18207 semantic
18208 \emph default
18209  checks for type-errors, 
18210 \family sans
18211 ChkTeX
18212 \family default
18213  catches some common 
18214 \emph on
18215 typographic
18216 \emph default
18217  errors, in addition to the syntactical ones.
18218  Specifically, 
18219 \family sans
18220 ChkTeX
18221 \family default
18222  is capable of detecting several common errors, such as
18223 \end_layout
18224
18225 \begin_layout Itemize
18226 Ellipsis detection:
18227 \begin_inset Newline newline
18228 \end_inset
18229
18230 Use \SpecialChar \ldots{}
18231  instead of ...
18232 \end_layout
18233
18234 \begin_layout Itemize
18235 No space in front of/after parenthesis:
18236 \begin_inset Newline newline
18237 \end_inset
18238
18239 ( wrong spacing )
18240 \end_layout
18241
18242 \begin_layout Itemize
18243 Enforcement of normal space after common abbreviations:
18244 \begin_inset Newline newline
18245 \end_inset
18246
18247 e.
18248 \begin_inset space \thinspace{}
18249 \end_inset
18250
18251 g.
18252 \begin_inset space \space{}
18253 \end_inset
18254
18255 is too wide spacing.
18256 \end_layout
18257
18258 \begin_layout Itemize
18259 Enforcement of end-of-sentence space when the last sentence ends with a
18260  capital letter:
18261 \begin_inset Newline newline
18262 \end_inset
18263
18264 This is a TEST.
18265  And this is wrong spacing.
18266 \end_layout
18267
18268 \begin_layout Itemize
18269 Space in front of labels and similar commands:
18270 \begin_inset Newline newline
18271 \end_inset
18272
18273 The label should stick right up to the text to avoid falling to a wrong
18274  page.
18275  
18276 \begin_inset CommandInset label
18277 LatexCommand label
18278 name "sec:chktex"
18279
18280 \end_inset
18281
18282  
18283 \begin_inset Foot
18284 status collapsed
18285
18286 \begin_layout Plain Layout
18287 This footnote is in danger of falling off to a wrong page
18288 \end_layout
18289
18290 \end_inset
18291
18292  The label is separated too much.
18293 \end_layout
18294
18295 \begin_layout Itemize
18296 Space in front of references, instead of hard spaces:
18297 \begin_inset Newline newline
18298 \end_inset
18299
18300 In you are in bad luck, the text will break right between the referenced
18301  text and reference number, and that's a pity.
18302  See section 
18303 \begin_inset CommandInset ref
18304 LatexCommand ref
18305 reference "sec:chktex"
18306
18307 \end_inset
18308
18309 .
18310 \end_layout
18311
18312 \begin_layout Itemize
18313 Use of 
18314 \begin_inset Quotes eld
18315 \end_inset
18316
18317 x
18318 \begin_inset Quotes erd
18319 \end_inset
18320
18321  instead of 
18322 \begin_inset Formula $\times$
18323 \end_inset
18324
18325  between numbers:
18326 \begin_inset Newline newline
18327 \end_inset
18328
18329 2x2 looks cheap compared to 
18330 \begin_inset Formula $2\times2$
18331 \end_inset
18332
18333 .
18334 \end_layout
18335
18336 \begin_layout Standard
18337 and more \SpecialChar \ldots{}
18338  It is an invaluable tool when you are 
18339 \begin_inset Quotes eld
18340 \end_inset
18341
18342 finishing up
18343 \begin_inset Quotes erd
18344 \end_inset
18345
18346  your document before printing, and you should run it right after the obligatory
18347  spelling check, and before you go fine tuning the typesetting.
18348 \end_layout
18349
18350 \begin_layout Subsection
18351 How to use it
18352 \end_layout
18353
18354 \begin_layout Standard
18355 If you have the program installed, usage is as simple as choosing 
18356 \family sans
18357 Tools\SpecialChar \menuseparator
18358 Check
18359 \begin_inset space ~
18360 \end_inset
18361
18362 TeX
18363 \family default
18364 .
18365  This will make LyX generate a LaTeX file of your document, start 
18366 \family sans
18367 ChkTeX
18368 \family default
18369  to check it, and then make LyX insert 
18370 \begin_inset Quotes eld
18371 \end_inset
18372
18373 error boxes
18374 \begin_inset Quotes erd
18375 \end_inset
18376
18377  with the warnings from 
18378 \family sans
18379 ChkTeX
18380 \family default
18381 , if there were any.
18382  The warnings will be placed close to the point of the mistake, and you
18383  can quickly find them by using the 
18384 \family sans
18385 Navigate\SpecialChar \menuseparator
18386 Error
18387 \family default
18388  menu item, or the shortcut key 
18389 \family sans
18390 C-g
18391 \family default
18392  from the default 
18393 \family typewriter
18394 cua
18395 \family default
18396  bind file.
18397  Open the error boxes by clicking on them with the mouse, or use the shortcut
18398  key 
18399 \family sans
18400 C-i
18401 \family default
18402  from 
18403 \family typewriter
18404 cua
18405 \family default
18406  bindings, or the corresponding 
18407 \family sans
18408 C-o
18409 \family default
18410  for the alternate 
18411 \family typewriter
18412 emacs
18413 \family default
18414  bind file.
18415  Read the warning and correct the mistake, if it is a mistake.
18416  If you have trouble understanding what the warning is about, you can safely
18417  ignore it.
18418  Remember that there is a hidden layer between the document on screen and
18419  the technical details in invoking 
18420 \family sans
18421 ChkTeX
18422 \family default
18423 , and this gap can make some warnings seem arcane or just right down plain
18424  silly.
18425 \end_layout
18426
18427 \begin_layout Standard
18428 This document is an excellent testing bed for the feature, and it should
18429  provide quite a few warnings for you to fiddle with.
18430  Since computers are only so smart, expect most of the warnings to be false
18431  alarms, though.
18432 \end_layout
18433
18434 \begin_layout Subsection
18435 How to fine tune it
18436 \end_layout
18437
18438 \begin_layout Standard
18439 Sometimes, you'll find that 
18440 \family sans
18441 ChkTeX
18442 \family default
18443  makes more noise than suits your mood.
18444  Then you can choose not to use it, wait until your mood changes, or try
18445  to customize 
18446 \family sans
18447 ChkTeX
18448 \family default
18449  to get better along with you.
18450  Another choice in the most desperate situations is to use 
18451 \family sans
18452 View\SpecialChar \menuseparator
18453 Remove
18454 \begin_inset space ~
18455 \end_inset
18456
18457 All
18458 \begin_inset space ~
18459 \end_inset
18460
18461 Error
18462 \begin_inset space ~
18463 \end_inset
18464
18465 Boxes
18466 \family default
18467 , which will get rid of all warnings instantly.
18468 \end_layout
18469
18470 \begin_layout Standard
18471 Although 
18472 \family sans
18473 ChkTeX
18474 \family default
18475  
18476 \emph on
18477 is
18478 \emph default
18479  very configurable and extensible, you shouldn't expect to solve all problems
18480  with 
18481 \family sans
18482 ChkTeX
18483 \family default
18484  in LyX this way.
18485  Since LyX has to generate a somewhat special LaTeX file to be able to match
18486  the line numbers from the 
18487 \family sans
18488 ChkTeX
18489 \family default
18490  output
18491 \begin_inset Foot
18492 status collapsed
18493
18494 \begin_layout Plain Layout
18495 You can inspect the specific output from 
18496 \family sans
18497 chktex
18498 \family default
18499  by using 
18500 \family sans
18501 Edit\SpecialChar \menuseparator
18502 View
18503 \begin_inset space ~
18504 \end_inset
18505
18506 LaTeX
18507 \begin_inset space ~
18508 \end_inset
18509
18510 Log
18511 \family default
18512  right after a 
18513 \family sans
18514 chktex
18515 \family default
18516  run.
18517 \end_layout
18518
18519 \end_inset
18520
18521  to the internal document structure, some of the warnings will not seen
18522  to appear correctly.
18523  There are two things you can do about this:
18524 \end_layout
18525
18526 \begin_layout Itemize
18527 Fine tune the 
18528 \family sans
18529 ChkTeX
18530 \family default
18531  invocation command line in 
18532 \family sans
18533 Preferences
18534 \family default
18535  (tabs 
18536 \family sans
18537 Outputs
18538 \family default
18539
18540 \family sans
18541 Misc
18542 \family default
18543 ), or the global 
18544 \family sans
18545 ChkTeX
18546 \family default
18547  installation configuration file (usually with the file 
18548 \family typewriter
18549 chktexrc
18550 \family default
18551 ).
18552  See below to learn what warnings can be enabled and disabled on the command
18553  line.
18554  
18555 \end_layout
18556
18557 \begin_layout Itemize
18558 Export your document as a raw LaTeX file using 
18559 \family sans
18560 File\SpecialChar \menuseparator
18561 Export\SpecialChar \menuseparator
18562 LaTeX
18563 \family default
18564  and run 
18565 \family typewriter
18566 chktex
18567 \family default
18568  manually on that.
18569  Invoked in this way, it can be a hassle to find the corresponding place
18570  in the document inside LyX, but with a little patience, you should be able
18571  to do it.
18572 \end_layout
18573
18574 \begin_layout Standard
18575 Here follows the warning messages that can be enabled and disabled in 
18576 \family sans
18577 Preferences
18578 \family default
18579 .
18580  Use 
18581 \family typewriter
18582 -n#
18583 \family default
18584  to disable a warning, and 
18585 \family typewriter
18586 -w#
18587 \family default
18588  to enable a warning.
18589  The emphasized entries are disabled by default, because the default is
18590  "
18591 \family typewriter
18592 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18593 \family default
18594 ".
18595 \end_layout
18596
18597 \begin_layout Standard
18598 Notice that you should only use the options that enable and disable warnings,
18599  because LyX relies on some of the other command line parameters to be set
18600  in a specific way to have a chance to communicate with 
18601 \family typewriter
18602 chktex
18603 \family default
18604 .
18605 \end_layout
18606
18607 \begin_layout Enumerate
18608
18609 \size small
18610 \emph on
18611 Command terminated with space.
18612 \end_layout
18613
18614 \begin_layout Enumerate
18615
18616 \size small
18617 Non-breaking space (
18618 \begin_inset Quotes eld
18619 \end_inset
18620
18621
18622 \family typewriter
18623 ~
18624 \family default
18625
18626 \begin_inset Quotes erd
18627 \end_inset
18628
18629 ) should have been used.
18630 \end_layout
18631
18632 \begin_layout Enumerate
18633
18634 \size small
18635 \emph on
18636 You should enclose the previous parenthesis with 
18637 \begin_inset Quotes eld
18638 \end_inset
18639
18640
18641 \family typewriter
18642 {}
18643 \family default
18644
18645 \begin_inset Quotes erd
18646 \end_inset
18647
18648 .
18649 \end_layout
18650
18651 \begin_layout Enumerate
18652
18653 \size small
18654 Italic correction (
18655 \begin_inset Quotes eld
18656 \end_inset
18657
18658
18659 \family typewriter
18660
18661 \backslash
18662 /
18663 \family default
18664
18665 \begin_inset Quotes erd
18666 \end_inset
18667
18668 ) found in non-italic buffer.
18669 \end_layout
18670
18671 \begin_layout Enumerate
18672
18673 \size small
18674 Italic correction (
18675 \begin_inset Quotes eld
18676 \end_inset
18677
18678
18679 \family typewriter
18680
18681 \backslash
18682 /
18683 \family default
18684
18685 \begin_inset Quotes erd
18686 \end_inset
18687
18688 ) found more than once.
18689 \end_layout
18690
18691 \begin_layout Enumerate
18692
18693 \size small
18694 \emph on
18695 No italic correction (
18696 \begin_inset Quotes eld
18697 \end_inset
18698
18699
18700 \family typewriter
18701
18702 \backslash
18703 /
18704 \family default
18705
18706 \begin_inset Quotes erd
18707 \end_inset
18708
18709 ) found.
18710 \end_layout
18711
18712 \begin_layout Enumerate
18713
18714 \size small
18715 Accent command 
18716 \begin_inset Quotes eld
18717 \end_inset
18718
18719
18720 \family typewriter
18721 cmd
18722 \family default
18723
18724 \begin_inset Quotes erd
18725 \end_inset
18726
18727  needs use of 
18728 \begin_inset Quotes eld
18729 \end_inset
18730
18731
18732 \family typewriter
18733 cmd
18734 \family default
18735
18736 \begin_inset Quotes erd
18737 \end_inset
18738
18739 .
18740 \end_layout
18741
18742 \begin_layout Enumerate
18743
18744 \size small
18745 Wrong length of dash may have been used.
18746 \end_layout
18747
18748 \begin_layout Enumerate
18749
18750 \size small
18751 \emph on
18752 \begin_inset Quotes eld
18753 \end_inset
18754
18755
18756 \family typewriter
18757 %s
18758 \family default
18759
18760 \begin_inset Quotes erd
18761 \end_inset
18762
18763  expected, found 
18764 \begin_inset Quotes eld
18765 \end_inset
18766
18767
18768 \family typewriter
18769 %s
18770 \family default
18771
18772 \begin_inset Quotes erd
18773 \end_inset
18774
18775 .
18776 \end_layout
18777
18778 \begin_layout Enumerate
18779
18780 \size small
18781 Solo 
18782 \begin_inset Quotes eld
18783 \end_inset
18784
18785
18786 \family typewriter
18787 %s
18788 \family default
18789
18790 \begin_inset Quotes erd
18791 \end_inset
18792
18793  found.
18794 \end_layout
18795
18796 \begin_layout Enumerate
18797
18798 \size small
18799 You should use 
18800 \begin_inset Quotes eld
18801 \end_inset
18802
18803
18804 \family typewriter
18805 %s
18806 \family default
18807
18808 \begin_inset Quotes erd
18809 \end_inset
18810
18811  to achieve an ellipsis.
18812 \end_layout
18813
18814 \begin_layout Enumerate
18815
18816 \size small
18817 Inter-word spacing (
18818 \begin_inset Quotes eld
18819 \end_inset
18820
18821
18822 \family typewriter
18823
18824 \backslash
18825
18826 \family default
18827  
18828 \begin_inset Quotes eld
18829 \end_inset
18830
18831 ) should perhaps be used.
18832 \end_layout
18833
18834 \begin_layout Enumerate
18835
18836 \size small
18837 Inter-sentence spacing (
18838 \begin_inset Quotes eld
18839 \end_inset
18840
18841
18842 \family typewriter
18843
18844 \backslash
18845 @
18846 \family default
18847
18848 \begin_inset Quotes erd
18849 \end_inset
18850
18851 ) should perhaps be used.
18852 \end_layout
18853
18854 \begin_layout Enumerate
18855
18856 \size small
18857 Could not find argument for command.
18858 \end_layout
18859
18860 \begin_layout Enumerate
18861
18862 \size small
18863 No match found for 
18864 \begin_inset Quotes eld
18865 \end_inset
18866
18867
18868 \family typewriter
18869 %s
18870 \family default
18871
18872 \begin_inset Quotes erd
18873 \end_inset
18874
18875 .
18876 \end_layout
18877
18878 \begin_layout Enumerate
18879
18880 \size small
18881 Math mode still on at end of LaTeX file.
18882 \end_layout
18883
18884 \begin_layout Enumerate
18885
18886 \size small
18887 Number of 
18888 \begin_inset Quotes eld
18889 \end_inset
18890
18891
18892 \family typewriter
18893 char
18894 \family default
18895
18896 \begin_inset Quotes erd
18897 \end_inset
18898
18899  doesn't match the number of 
18900 \begin_inset Quotes eld
18901 \end_inset
18902
18903
18904 \family typewriter
18905 char
18906 \family default
18907
18908 \begin_inset Quotes erd
18909 \end_inset
18910
18911 .
18912 \end_layout
18913
18914 \begin_layout Enumerate
18915
18916 \size small
18917 You should use either 
18918 \family typewriter
18919
18920 \begin_inset Quotes eld
18921 \end_inset
18922
18923
18924 \family default
18925  or 
18926 \family typewriter
18927
18928 \begin_inset Quotes erd
18929 \end_inset
18930
18931
18932 \family default
18933  as an alternative to 
18934 \begin_inset Quotes eld
18935 \end_inset
18936
18937
18938 \family typewriter
18939 "
18940 \family default
18941
18942 \begin_inset Quotes erd
18943 \end_inset
18944
18945 .
18946 \end_layout
18947
18948 \begin_layout Enumerate
18949
18950 \size small
18951 You should use "
18952 \family typewriter
18953 '
18954 \family default
18955 " (ASCII 39) instead of "
18956 \family typewriter
18957 ´
18958 \family default
18959 " (ASCII 180).
18960 \end_layout
18961
18962 \begin_layout Enumerate
18963
18964 \size small
18965 User-specified pattern found.
18966 \end_layout
18967
18968 \begin_layout Enumerate
18969
18970 \size small
18971 This command might not be intended.
18972 \end_layout
18973
18974 \begin_layout Enumerate
18975
18976 \size small
18977 \emph on
18978 Comment displayed.
18979 \end_layout
18980
18981 \begin_layout Enumerate
18982
18983 \size small
18984 Either 
18985 \family typewriter
18986 ''
18987 \backslash
18988 ,'
18989 \family default
18990  or 
18991 \family typewriter
18992 '
18993 \backslash
18994 ,''
18995 \family default
18996  will look better.
18997 \end_layout
18998
18999 \begin_layout Enumerate
19000
19001 \size small
19002 Delete this space to maintain correct page references.
19003 \end_layout
19004
19005 \begin_layout Enumerate
19006
19007 \size small
19008 \emph on
19009 You might wish to put this between a pair of 
19010 \begin_inset Quotes eld
19011 \end_inset
19012
19013
19014 \family typewriter
19015 {}
19016 \family default
19017
19018 \begin_inset Quotes erd
19019 \end_inset
19020
19021 .
19022 \end_layout
19023
19024 \begin_layout Enumerate
19025
19026 \size small
19027 You ought to remove spaces in front of punctuation.
19028 \end_layout
19029
19030 \begin_layout Enumerate
19031
19032 \size small
19033 Could not execute LaTeX command.
19034 \end_layout
19035
19036 \begin_layout Enumerate
19037
19038 \size small
19039 Don't use 
19040 \family typewriter
19041
19042 \backslash
19043 /
19044 \family default
19045  in front of small punctuation.
19046 \end_layout
19047
19048 \begin_layout Enumerate
19049
19050 \family typewriter
19051 \size small
19052 $
19053 \backslash
19054 times$
19055 \family default
19056  may look prettier here.
19057 \end_layout
19058
19059 \begin_layout Enumerate
19060
19061 \size small
19062 \emph on
19063 Multiple spaces detected in output.
19064 \end_layout
19065
19066 \begin_layout Enumerate
19067
19068 \size small
19069 This text may be ignored.
19070 \end_layout
19071
19072 \begin_layout Enumerate
19073
19074 \size small
19075 Use 
19076 \family typewriter
19077
19078 \begin_inset Quotes eld
19079 \end_inset
19080
19081
19082 \family default
19083  to begin quotation, not 
19084 \family typewriter
19085 '
19086 \family default
19087 .
19088 \end_layout
19089
19090 \begin_layout Enumerate
19091
19092 \size small
19093 Use 
19094 \family typewriter
19095 '
19096 \family default
19097  to end quotation, not 
19098 \family typewriter
19099
19100 \begin_inset Quotes eld
19101 \end_inset
19102
19103
19104 \family default
19105 .
19106 \end_layout
19107
19108 \begin_layout Enumerate
19109
19110 \size small
19111 Don't mix quotes.
19112 \end_layout
19113
19114 \begin_layout Enumerate
19115
19116 \size small
19117 You should perhaps use 
19118 \begin_inset Quotes eld
19119 \end_inset
19120
19121
19122 \family typewriter
19123 cmd
19124 \family default
19125
19126 \begin_inset Quotes erd
19127 \end_inset
19128
19129  instead.
19130 \end_layout
19131
19132 \begin_layout Enumerate
19133
19134 \size small
19135 You should put a space in front of/after parenthesis.
19136 \end_layout
19137
19138 \begin_layout Enumerate
19139
19140 \size small
19141 You should avoid spaces in front of/after parenthesis.
19142 \end_layout
19143
19144 \begin_layout Enumerate
19145
19146 \size small
19147 \emph on
19148 You should not use punctuation in front of/after quotes.
19149 \end_layout
19150
19151 \begin_layout Enumerate
19152
19153 \size small
19154 Double space found.
19155 \end_layout
19156
19157 \begin_layout Enumerate
19158
19159 \size small
19160 You should put punctuation outside inner/inside display math mode.
19161 \end_layout
19162
19163 \begin_layout Enumerate
19164
19165 \size small
19166 You ought to not use primitive TeX in LaTeX code.
19167 \end_layout
19168
19169 \begin_layout Enumerate
19170
19171 \size small
19172 You should remove spaces in front of 
19173 \begin_inset Quotes eld
19174 \end_inset
19175
19176
19177 \family typewriter
19178 %s
19179 \family default
19180
19181 \begin_inset Quotes erd
19182 \end_inset
19183
19184
19185 \end_layout
19186
19187 \begin_layout Enumerate
19188
19189 \size small
19190 \begin_inset Quotes eld
19191 \end_inset
19192
19193
19194 \family typewriter
19195 %s
19196 \family default
19197
19198 \begin_inset Quotes erd
19199 \end_inset
19200
19201  is normally not followed by 
19202 \begin_inset Quotes eld
19203 \end_inset
19204
19205
19206 \family typewriter
19207 %c
19208 \family default
19209
19210 \begin_inset Quotes erd
19211 \end_inset
19212
19213 .
19214 \end_layout
19215
19216 \begin_layout Standard
19217 In later versions of LyX, we hope to provide a more complete interface to
19218  this tool (and it's smaller cousin 
19219 \family typewriter
19220 lacheck
19221 \family default
19222 ) to exploit the full power of it.
19223  But it's not exactly useless as it is now: go try it on one of your existing
19224  documents of a certain length and be surprised.
19225 \end_layout
19226
19227 \begin_layout Section
19228 Version Control in LyX
19229 \end_layout
19230
19231 \begin_layout Standard
19232 by
19233 \noun on
19234  Lars Gullik Bjønnes 
19235 \noun default
19236 and 
19237 \noun on
19238 Pavel Sanda
19239 \end_layout
19240
19241 \begin_layout Subsection
19242 Introduction
19243 \end_layout
19244
19245 \begin_layout Standard
19246 A friend of mine wanted to try LyX for a group project.
19247  When he didn't find support for version control or file locking, he dropped
19248  it.
19249  This angered me a bit, so I thought that I should at least make support
19250  for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
19251  This has been done.
19252  LyX now supports some of the most basic RCS/CVS/SVN commands.
19253  If you need something a bit more sophisticated you will have to do that
19254  manually in a terminal.
19255 \end_layout
19256
19257 \begin_layout Standard
19258 Before you begin to use the version control features in LyX, you should
19259  be familiar with RCS/CVS/SVN usage before start using it under LyX.
19260  Also note that CVS support is not as good as subversion support so we advice
19261  using SVN instead.
19262  Good place to start with Subversion is SVN Book
19263 \begin_inset Foot
19264 status open
19265
19266 \begin_layout Plain Layout
19267 \begin_inset CommandInset href
19268 LatexCommand href
19269 target "http://svnbook.red-bean.com/"
19270
19271 \end_inset
19272
19273
19274 \end_layout
19275
19276 \end_inset
19277
19278 .
19279  In case of RCS you should read 
19280 \begin_inset Quotes eld
19281 \end_inset
19282
19283 rcsintro
19284 \begin_inset Quotes erd
19285 \end_inset
19286
19287  (a man file, read it with 
19288 \family typewriter
19289 man rcsintro
19290 \family default
19291 ).
19292  This file describes all the basic features of RCS.
19293  You should especially notice the comment about a RCS directory, and the
19294  notion of a master RCS file (the file ending in 
19295 \family typewriter
19296 ,v
19297 \family default
19298 ).
19299 \end_layout
19300
19301 \begin_layout Standard
19302 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
19303  package—no guarantees are made for older versions.
19304  Most of the log messages are not currently displayed after operations —
19305  you can check them in Messages pane if unsure.
19306 \end_layout
19307
19308 \begin_layout Standard
19309 For introducing your own external commands consult vc-command in the manual
19310  of LyX functions.
19311 \end_layout
19312
19313 \begin_layout Subsection
19314 RCS commands in LyX
19315 \end_layout
19316
19317 \begin_layout Standard
19318 The following sections describe the RCS commands supported by LyX.
19319  You can find them in the 
19320 \family sans
19321 File\SpecialChar \menuseparator
19322 Version
19323 \begin_inset space ~
19324 \end_inset
19325
19326 Control
19327 \family default
19328  submenu.
19329  LyX was tested against RCS 5.7.
19330 \end_layout
19331
19332 \begin_layout Subsubsection
19333
19334 \family sans
19335 Register
19336 \end_layout
19337
19338 \begin_layout Standard
19339 If your document is not under revision control, this is the only item shown
19340  in the menu.
19341  And if it is under revision control, the 
19342 \family sans
19343 Register
19344 \family default
19345  item is not visible.
19346  
19347 \end_layout
19348
19349 \begin_layout Standard
19350 This command registers your document with RCS (unless you are under the
19351  directory managed by CVS)\SpecialChar \@.
19352  You are asked interactively to supply an initial
19353  description of the document.
19354  The document is now set in Read-Only mode and you have to 
19355 \family sans
19356 Check
19357 \begin_inset space ~
19358 \end_inset
19359
19360 Out
19361 \begin_inset space ~
19362 \end_inset
19363
19364 For
19365 \begin_inset space ~
19366 \end_inset
19367
19368 Edit
19369 \family default
19370 , before making any changes to it.
19371  A document under revision control has a 
19372 \begin_inset Quotes eld
19373 \end_inset
19374
19375 [RCS:<version> <locker>]
19376 \begin_inset Quotes erd
19377 \end_inset
19378
19379  item tagged to the filename in the minibuffer.
19380 \end_layout
19381
19382 \begin_layout Standard
19383 RCS command that is run: 
19384 \family typewriter
19385 ci -q -u -i -t-"<initial description>" <file-name>
19386 \end_layout
19387
19388 \begin_layout Standard
19389 Read 
19390 \family typewriter
19391 man ci
19392 \family default
19393  to understand the switches.
19394  
19395 \end_layout
19396
19397 \begin_layout Subsubsection
19398
19399 \family sans
19400 Check In Changes
19401 \end_layout
19402
19403 \begin_layout Standard
19404 When you are finished editing a file, you check in your changes.
19405  When you do this, you are asked for a description of the changes.
19406  This is stored in the history log.
19407  The version number is bumped, your changes are applied to the master RCS
19408  file, the document is unlocked and set to Read-Only mode.
19409  
19410 \end_layout
19411
19412 \begin_layout Standard
19413 RCS command: 
19414 \family typewriter
19415 ci -q -u -m"<description>" <file-name>
19416 \end_layout
19417
19418 \begin_layout Subsubsection
19419
19420 \family sans
19421 Check Out For Edit
19422 \end_layout
19423
19424 \begin_layout Standard
19425 By doing this you lock the document so that only you can edit it.
19426  This will also make the document Read-Write only for you.
19427  You will usually continue editing for a while and when you are finished
19428  you check in your changes.
19429  The status line is changed to reflect that you have locked the file.
19430  
19431 \end_layout
19432
19433 \begin_layout Standard
19434 RCS command: 
19435 \family typewriter
19436 co -q -l <file-name>
19437 \end_layout
19438
19439 \begin_layout Subsubsection
19440
19441 \family sans
19442 Revert To Repository Version
19443 \end_layout
19444
19445 \begin_layout Standard
19446 This will discard all changes made to the document since the last check
19447  in.
19448  You get a warning before changes are discarded.
19449 \end_layout
19450
19451 \begin_layout Standard
19452 RCS command: 
19453 \family typewriter
19454 co -f -u<version> <file-name>
19455 \end_layout
19456
19457 \begin_layout Subsubsection
19458
19459 \family sans
19460 Undo Last Checkin
19461 \end_layout
19462
19463 \begin_layout Standard
19464 This makes as if the last check in never happened.
19465  No changes are made to the document loaded into LyX, but the last version
19466  is removed from the master RCS file.
19467  
19468 \end_layout
19469
19470 \begin_layout Standard
19471 RCS command: 
19472 \family typewriter
19473 rcs -o<version> <file-name>
19474 \end_layout
19475
19476 \begin_layout Subsubsection
19477
19478 \family sans
19479 Show History
19480 \end_layout
19481
19482 \begin_layout Standard
19483 This shows the complete history of the RCS document.
19484  The output of 
19485 \family typewriter
19486 rlog <file-name>
19487 \family default
19488  is shown in a browser.
19489  See 
19490 \family typewriter
19491 man rlog
19492 \family default
19493  for more info.
19494 \end_layout
19495
19496 \begin_layout Subsubsection
19497 Revision info
19498 \end_layout
19499
19500 \begin_layout Standard
19501 LyX supports RCS version number information (only), see 
19502 \begin_inset CommandInset ref
19503 LatexCommand ref
19504 reference "sub:VCS-Revision-Information"
19505
19506 \end_inset
19507
19508  for details.
19509 \end_layout
19510
19511 \begin_layout Subsection
19512 CVS commands in LyX
19513 \end_layout
19514
19515 \begin_layout Standard
19516 A subset of CVS operations is supported by LyX.
19517  You can find the commands in the 
19518 \family sans
19519 File\SpecialChar \menuseparator
19520 Version
19521 \begin_inset space ~
19522 \end_inset
19523
19524 Control
19525 \family default
19526  submenu.
19527  The version control system SVN is more powerful, so please use it instead
19528  of CVS if possible.
19529 \end_layout
19530
19531 \begin_layout Subsubsection
19532
19533 \family sans
19534 General CVS usage
19535 \end_layout
19536
19537 \begin_layout Standard
19538 If you start from scratch with CVS you have to create your repository and
19539  checkout the working copy with external tools.
19540  If you're using a client-server setup you may need to login before doing
19541  the first repository checkout.
19542 \end_layout
19543
19544 \begin_layout Standard
19545 If your documents are under revision control and others are using the same
19546  repository problems arise when different changes to the same document at
19547  the same location happen.
19548  Standard CVS repositories doesn't operate with a file locking mechanism.
19549  This may be surprising, but conflicts only occur if people disagree on
19550  the proper content of the same part of a document.
19551  So, if co-workers are used to communicate regularly, these conflicts occur
19552  rarely.
19553  If they don't communicate they have a fundamental problem anyway.
19554  Nevertheless some people like to work with so called 
19555 \begin_inset Quotes eld
19556 \end_inset
19557
19558 reserved checkouts
19559 \begin_inset Quotes erd
19560 \end_inset
19561
19562 .
19563  If they do so the working copy of all files is readonly when checked out
19564  first and the user starts editing after using a special command to make
19565  the working copy writable.
19566  When the changes are checked in the working copy returns to readonly state.
19567  With LyX one has to edit the 
19568 \begin_inset Flex Code
19569 status collapsed
19570
19571 \begin_layout Plain Layout
19572 .cvsrc
19573 \end_layout
19574
19575 \end_inset
19576
19577  file and add the line 
19578 \begin_inset Flex Code
19579 status collapsed
19580
19581 \begin_layout Plain Layout
19582 cvs -r
19583 \end_layout
19584
19585 \end_inset
19586
19587  to work with reserved checkouts.
19588  The benefit is the possibility to see who is using a writable copy of some
19589  document.
19590  It's not guaranteed only one user makes a copy writable.
19591 \end_layout
19592
19593 \begin_layout Standard
19594 LyX tries to guess if you're using reserved or non-reserved checkouts.
19595  If your working copy is readonly or it is writable and an additional copy
19596  of your document exists in the CVS/Base sub-directory a reserved otherwise
19597  a non-reserved checkout is assumed.
19598  When a reserved checkout is detected you have to use 
19599 \begin_inset Flex MenuItem
19600 status collapsed
19601
19602 \begin_layout Plain Layout
19603 Check Out
19604 \end_layout
19605
19606 \end_inset
19607
19608  to make your working copy writable if it's readonly.
19609  After doing so the 
19610 \begin_inset Flex MenuItem
19611 status collapsed
19612
19613 \begin_layout Plain Layout
19614 Check In
19615 \end_layout
19616
19617 \end_inset
19618
19619  operation is possible and that makes your working copy readonly again after
19620  transferring your changes to the repository.
19621 \end_layout
19622
19623 \begin_layout Standard
19624 More information about CVS can be found here 
19625 \begin_inset Flex URL
19626 status collapsed
19627
19628 \begin_layout Plain Layout
19629
19630 http://www.nongnu.org/cvs
19631 \end_layout
19632
19633 \end_inset
19634
19635  and here 
19636 \begin_inset Flex URL
19637 status collapsed
19638
19639 \begin_layout Plain Layout
19640
19641 http://ximbiot.com/cvs
19642 \end_layout
19643
19644 \end_inset
19645
19646 .
19647 \end_layout
19648
19649 \begin_layout Standard
19650 Read 
19651 \family typewriter
19652 man cvs
19653 \family default
19654  to understand the sub-commands and the switches mentioned below.
19655 \end_layout
19656
19657 \begin_layout Subsubsection
19658
19659 \family sans
19660 Register
19661 \end_layout
19662
19663 \begin_layout Standard
19664 If your document is not under revision control, this is the only item shown
19665  in the menu.
19666  And if it is under revision control, the 
19667 \family sans
19668 \bar under
19669 R
19670 \bar default
19671 egister
19672 \family default
19673  item is not visible.
19674  
19675 \end_layout
19676
19677 \begin_layout Standard
19678 This command registers in CVS your document 
19679 \begin_inset Flex Strong
19680 status collapsed
19681
19682 \begin_layout Plain Layout
19683
19684 \emph on
19685 only
19686 \end_layout
19687
19688 \end_inset
19689
19690  in case you have already the documents directory under CVS control (in
19691  particular 
19692 \family typewriter
19693 CVS/Entries
19694 \family default
19695  file exists).
19696  This means you have to create or checkout the archive by yourself using
19697  external tools.
19698  (In case you forget that step LyX registers the document with RCS.)
19699 \end_layout
19700
19701 \begin_layout Standard
19702 Then you are asked interactively to supply an initial description of the
19703  document.
19704  Don't forget that registered file is not yet checked in.
19705 \end_layout
19706
19707 \begin_layout Standard
19708 CVS command that is run: 
19709 \family typewriter
19710 cvs -q add -m"<entered message>" "<file-name>"
19711 \end_layout
19712
19713 \begin_layout Standard
19714 The term 
19715 \family typewriter
19716 "<file-name>"
19717 \family default
19718  above and for all other CVS commands is an abbreviation for 
19719 \begin_inset Quotes eld
19720 \end_inset
19721
19722 change the current working directory to file location and use the file name
19723  without path component as argument
19724 \begin_inset Quotes erd
19725 \end_inset
19726
19727 .
19728 \end_layout
19729
19730 \begin_layout Subsubsection
19731
19732 \family sans
19733 Check In Changes
19734 \end_layout
19735
19736 \begin_layout Standard
19737 When you are finished editing a file, you commit your changes.
19738  When you do this and you had changed the document, you are asked for a
19739  description of the changes.
19740  After that changes are written to the repository.
19741  In case you didn't change the document and a reserved checkout is detected
19742  the reservation made on 
19743 \begin_inset Flex MenuItem
19744 status collapsed
19745
19746 \begin_layout Plain Layout
19747 Check Out
19748 \end_layout
19749
19750 \end_inset
19751
19752  is undone.
19753 \end_layout
19754
19755 \begin_layout Labeling
19756 \labelwidthstring 00.00.0000
19757 CVS
19758 \begin_inset space ~
19759 \end_inset
19760
19761 command: 
19762 \begin_inset space ~
19763 \end_inset
19764
19765
19766 \begin_inset Newline newline
19767 \end_inset
19768
19769
19770 \begin_inset Flex Code
19771 status collapsed
19772
19773 \begin_layout Plain Layout
19774 cvs 
19775 \family typewriter
19776 -q commit -m"<description>" "<file-name>"
19777 \end_layout
19778
19779 \end_inset
19780
19781  or
19782 \begin_inset Newline newline
19783 \end_inset
19784
19785
19786 \begin_inset Flex Code
19787 status collapsed
19788
19789 \begin_layout Plain Layout
19790 cvs -q unedit 
19791 \family typewriter
19792 "<file-name>"
19793 \end_layout
19794
19795 \end_inset
19796
19797
19798 \end_layout
19799
19800 \begin_layout Subsubsection
19801
19802 \family sans
19803 Check Out Changes
19804 \end_layout
19805
19806 \begin_layout Standard
19807 When you are sharing a repository with others, you may have to incorporate
19808  their changes into your working copy.
19809 \end_layout
19810
19811 \begin_layout Standard
19812 CVS command: 
19813 \family typewriter
19814 cvs -q update "<file-name>"
19815 \end_layout
19816
19817 \begin_layout Standard
19818 If a readonly checkout is detected the working copy is made writable and
19819  reserved.
19820 \end_layout
19821
19822 \begin_layout Standard
19823 CVS command: 
19824 \family typewriter
19825 cvs -q edit "<file-name>"
19826 \end_layout
19827
19828 \begin_layout Subsubsection
19829
19830 \family sans
19831 Revert To Repository Version
19832 \end_layout
19833
19834 \begin_layout Standard
19835 This will discard all changes made to the document since the last check
19836  in.
19837  You get a warning before changes are discarded.
19838  Firstly the file is deleted, secondly CVS update command is run.
19839 \end_layout
19840
19841 \begin_layout Standard
19842 CVS command: 
19843 \family typewriter
19844 cvs -q update "<file-name>"
19845 \end_layout
19846
19847 \begin_layout Standard
19848 If a reserved checkout is detected and the working copy has no changes only
19849  the reservation is undone.
19850 \end_layout
19851
19852 \begin_layout Standard
19853 CVS command: 
19854 \family typewriter
19855 cvs -q unedit "<file-name>"
19856 \end_layout
19857
19858 \begin_layout Subsubsection
19859 Update of the local directory checkout from repository
19860 \end_layout
19861
19862 \begin_layout Standard
19863 Once your documents gets more complex, containing sub-documents and pictures,
19864  including external 
19865 \begin_inset Flex Code
19866 status collapsed
19867
19868 \begin_layout Plain Layout
19869 .tex
19870 \end_layout
19871
19872 \end_inset
19873
19874  files and so on using version control becomes more complicated.
19875  LyX supports updating the whole tree in which resides the document.
19876  This become especially useful once you cooperate with people which neither
19877  have detailed knowledge about CVS usage nor they have ambition to commit
19878  additional material to the repository.
19879  You have to organize the files structure so that all external files are
19880  in the same directory or subdirectories of the document.
19881  It's good practice anyway to store multipart documents in an extra directory.
19882 \end_layout
19883
19884 \begin_layout Standard
19885 The 
19886 \begin_inset Flex Code
19887 status collapsed
19888
19889 \begin_layout Plain Layout
19890 Update local directory from repository
19891 \end_layout
19892
19893 \end_inset
19894
19895  command updates the whole directory.
19896  If local changes are detected user is warned before update starts.
19897  In case of merge conflicts both versions of the conflicting document parts
19898  are placed in the final document.
19899  You have to review and correct the result of the merge.
19900  You'll find the conflicts enclosed in pairs of 
19901 \begin_inset Flex Code
19902 status collapsed
19903
19904 \begin_layout Plain Layout
19905 <<<<<<<
19906 \end_layout
19907
19908 \end_inset
19909
19910  and 
19911 \begin_inset Flex Code
19912 status collapsed
19913
19914 \begin_layout Plain Layout
19915 >>>>>>>
19916 \end_layout
19917
19918 \end_inset
19919
19920  separated by 
19921 \begin_inset Flex Code
19922 status collapsed
19923
19924 \begin_layout Plain Layout
19925 =======
19926 \end_layout
19927
19928 \end_inset
19929
19930 .
19931  The first part is your version as before the update operation with the
19932  document name prepended.
19933  The second one is the repository version with the version number after
19934  the sequence of 
19935 \begin_inset Flex Code
19936 status collapsed
19937
19938 \begin_layout Plain Layout
19939 >
19940 \end_layout
19941
19942 \end_inset
19943
19944  signs.
19945 \end_layout
19946
19947 \begin_layout Labeling
19948 \labelwidthstring 00.00.0000
19949 CVS
19950 \begin_inset space ~
19951 \end_inset
19952
19953 commands: 
19954 \begin_inset space ~
19955 \end_inset
19956
19957
19958 \begin_inset Newline newline
19959 \end_inset
19960
19961
19962 \begin_inset Flex Code
19963 status collapsed
19964
19965 \begin_layout Plain Layout
19966 cd $path; cvs diff 
19967 \family typewriter
19968 "."
19969 \end_layout
19970
19971 \end_inset
19972
19973  (Ask if changes are detected.)
19974 \begin_inset Newline newline
19975 \end_inset
19976
19977
19978 \begin_inset Flex Code
19979 status collapsed
19980
19981 \begin_layout Plain Layout
19982 cd $path; cvs -q update 
19983 \family typewriter
19984 "."
19985 \end_layout
19986
19987 \end_inset
19988
19989
19990 \end_layout
19991
19992 \begin_layout Standard
19993 where 
19994 \begin_inset Flex Code
19995 status collapsed
19996
19997 \begin_layout Plain Layout
19998 $path
19999 \end_layout
20000
20001 \end_inset
20002
20003  stands for the path to the document.
20004 \end_layout
20005
20006 \begin_layout Subsubsection
20007
20008 \family sans
20009 Show History
20010 \end_layout
20011
20012 \begin_layout Standard
20013 This shows the complete history of the CVS document.
20014  The output of 
20015 \family typewriter
20016 cvs log "<file-name>"
20017 \family default
20018  is shown in a browser.
20019 \end_layout
20020
20021 \begin_layout Subsection
20022 SVN commands in LyX
20023 \end_layout
20024
20025 \begin_layout Standard
20026 SVN is now partially supported by LyX.
20027  You can find the commands in the 
20028 \family sans
20029 File\SpecialChar \menuseparator
20030 Version
20031 \begin_inset space ~
20032 \end_inset
20033
20034 Control
20035 \family default
20036  submenu.
20037  Please note that if you use password protected access to repository via
20038  ssh, you will be asked in terminal window.
20039  LyX was tested against SVN 1.5 and 1.6
20040 \begin_inset Foot
20041 status open
20042
20043 \begin_layout Plain Layout
20044 Most of the commands will work with 1.4 too, see 
20045 \begin_inset CommandInset ref
20046 LatexCommand ref
20047 reference "sub:SVN-Repo-Update"
20048
20049 \end_inset
20050
20051 .
20052 \end_layout
20053
20054 \end_inset
20055
20056
20057 \end_layout
20058
20059 \begin_layout Subsubsection
20060
20061 \family sans
20062 Register
20063 \end_layout
20064
20065 \begin_layout Standard
20066 If your document is not under revision control, this is the only item shown
20067  in the menu.
20068  And if it is under revision control, the 
20069 \family sans
20070 \bar under
20071 R
20072 \bar default
20073 egister
20074 \family default
20075  item is not visible.
20076  
20077 \end_layout
20078
20079 \begin_layout Standard
20080 This command registers in SVN your document ONLY in case you have already
20081  the documents directory under SVN control (in particular 
20082 \family typewriter
20083 .svn/entries
20084 \family default
20085  file exists).
20086  This means you have to checkout the archive by yourself.
20087  
20088 \end_layout
20089
20090 \begin_layout Standard
20091 Then you are asked interactively to supply an initial description of the
20092  document.
20093  Don't forget that registered file is not yet commited.
20094 \end_layout
20095
20096 \begin_layout Standard
20097 SVN command that is run: 
20098 \family typewriter
20099 svn add -q 
20100 \begin_inset Quotes eld
20101 \end_inset
20102
20103 <file-name>
20104 \begin_inset Quotes erd
20105 \end_inset
20106
20107
20108 \end_layout
20109
20110 \begin_layout Standard
20111 Read 
20112 \family typewriter
20113 man svn
20114 \family default
20115  to understand the switches.
20116  
20117 \end_layout
20118
20119 \begin_layout Subsubsection
20120
20121 \family sans
20122 Check In Changes
20123 \end_layout
20124
20125 \begin_layout Standard
20126 When you are finished editing a file, you commit your changes.
20127  When you do this, you are asked for a description of the changes.
20128  After that changes are commited.
20129 \end_layout
20130
20131 \begin_layout Standard
20132 SVN command:
20133 \begin_inset Foot
20134 status collapsed
20135
20136 \begin_layout Plain Layout
20137 In case locking is not enabled.
20138  See Section 
20139 \begin_inset CommandInset ref
20140 LatexCommand ref
20141 reference "subsec:SVN-File-Locking"
20142
20143 \end_inset
20144
20145 .
20146 \end_layout
20147
20148 \end_inset
20149
20150  
20151 \family typewriter
20152 svn commit -q -m"<description>" <file-name>
20153 \end_layout
20154
20155 \begin_layout Subsubsection
20156
20157 \family sans
20158 Check Out For Edit
20159 \end_layout
20160
20161 \begin_layout Standard
20162 Updates the changes of this file from the repository.
20163  Be sure you understand SVN merging and conflicts resolving before using
20164  this function, because all conflicts has to be resolved manually by you!
20165 \end_layout
20166
20167 \begin_layout Standard
20168 SVN command:
20169 \begin_inset Foot
20170 status collapsed
20171
20172 \begin_layout Plain Layout
20173 Ditto.
20174 \end_layout
20175
20176 \end_inset
20177
20178  
20179 \family typewriter
20180 svn update --non-interactive 
20181 \begin_inset Quotes eld
20182 \end_inset
20183
20184 <file-name>
20185 \begin_inset Quotes erd
20186 \end_inset
20187
20188
20189 \end_layout
20190
20191 \begin_layout Subsubsection
20192
20193 \family sans
20194 Revert To Repository Version
20195 \end_layout
20196
20197 \begin_layout Standard
20198 This will discard all changes made to the document since the last check
20199  in.
20200  You get a warning before changes are discarded.
20201  
20202 \end_layout
20203
20204 \begin_layout Standard
20205 SVN command: 
20206 \family typewriter
20207 svn revert -q 
20208 \begin_inset Quotes eld
20209 \end_inset
20210
20211 <file-name>
20212 \begin_inset Quotes erd
20213 \end_inset
20214
20215
20216 \end_layout
20217
20218 \begin_layout Subsubsection
20219 \begin_inset CommandInset label
20220 LatexCommand label
20221 name "sub:SVN-Repo-Update"
20222
20223 \end_inset
20224
20225 Update of the local directory checkout from repository
20226 \begin_inset Foot
20227 status collapsed
20228
20229 \begin_layout Plain Layout
20230 Note that this command will work only with subversion 
20231 \begin_inset Formula $\geqq1.5$
20232 \end_inset
20233
20234
20235 \end_layout
20236
20237 \end_inset
20238
20239
20240 \end_layout
20241
20242 \begin_layout Standard
20243 All the commands above have one shortcomming - they deal with the current
20244  document only.
20245  Once your document contains pictures, includes external 
20246 \begin_inset Flex Code
20247 status collapsed
20248
20249 \begin_layout Plain Layout
20250 .tex
20251 \end_layout
20252
20253 \end_inset
20254
20255  files and so on administration becomes more complicated.
20256  LyX now supports updating the whole tree in which resides the document
20257 \begin_inset Foot
20258 status collapsed
20259
20260 \begin_layout Plain Layout
20261 One need to organize the files structure so that all external files are
20262  in the same directory or subdirectories of the document.
20263  
20264 \end_layout
20265
20266 \end_inset
20267
20268 .
20269  This become especially useful once you cooperate with people which neither
20270  know about subversion management nor they have ambition to commit additional
20271  material to the repository.
20272  
20273 \end_layout
20274
20275 \begin_layout Standard
20276 \begin_inset Flex Code
20277 status collapsed
20278
20279 \begin_layout Plain Layout
20280 Update local directory from repository
20281 \end_layout
20282
20283 \end_inset
20284
20285  command updates the whole directory and in case of merge conflicts local
20286  version of the files are left, so no unintended data loss occurs.
20287  If local changes are detected user is warned before update starts.
20288 \end_layout
20289
20290 \begin_layout Labeling
20291 \labelwidthstring 00.00.0000
20292 SVN
20293 \begin_inset space ~
20294 \end_inset
20295
20296 commands: 
20297 \begin_inset space ~
20298 \end_inset
20299
20300
20301 \begin_inset Newline newline
20302 \end_inset
20303
20304
20305 \begin_inset Flex Code
20306 status collapsed
20307
20308 \begin_layout Plain Layout
20309 svn diff $path
20310 \end_layout
20311
20312 \end_inset
20313
20314  (Ask if changes are detected.)
20315 \begin_inset Newline newline
20316 \end_inset
20317
20318
20319 \begin_inset Flex Code
20320 status collapsed
20321
20322 \begin_layout Plain Layout
20323 svn update --accept mine-full $path
20324 \end_layout
20325
20326 \end_inset
20327
20328
20329 \end_layout
20330
20331 \begin_layout Standard
20332 where 
20333 \begin_inset Flex Code
20334 status collapsed
20335
20336 \begin_layout Plain Layout
20337 $path
20338 \end_layout
20339
20340 \end_inset
20341
20342  stands for the path to the document.
20343 \end_layout
20344
20345 \begin_layout Subsubsection
20346
20347 \family sans
20348 Show History
20349 \end_layout
20350
20351 \begin_layout Standard
20352 This shows the complete history of the SVN document.
20353  The output of 
20354 \family typewriter
20355 svn log 
20356 \begin_inset Quotes eld
20357 \end_inset
20358
20359 <file-name>
20360 \begin_inset Quotes erd
20361 \end_inset
20362
20363
20364 \family default
20365  is shown in a browser.
20366 \end_layout
20367
20368 \begin_layout Subsubsection
20369 File Locking
20370 \begin_inset CommandInset label
20371 LatexCommand label
20372 name "subsec:SVN-File-Locking"
20373
20374 \end_inset
20375
20376
20377 \end_layout
20378
20379 \begin_layout Standard
20380 The file exchange through various revision control systems brings the problem
20381  of merge conflicts in case two different users try to edit the same (parts
20382  of) document.
20383  When such a conflict happens it needs manual resolving and one reasonable
20384  alternative is to provide some kind of locking mechanism, which guarantees
20385  that only one user is allowed to edit file at the given time.
20386 \end_layout
20387
20388 \begin_layout Standard
20389 SVN has two such mechanisms to provide mutual exclusivity for file access
20390  - locks and automatic setting of write permissions (see sec.
20391  
20392 \begin_inset CommandInset ref
20393 LatexCommand ref
20394 reference "subsec:Automatical-Locking-Property"
20395
20396 \end_inset
20397
20398 ) based on 
20399 \begin_inset Flex Code
20400 status collapsed
20401
20402 \begin_layout Plain Layout
20403 svn:needs-lock
20404 \end_layout
20405
20406 \end_inset
20407
20408  file svn property
20409 \begin_inset Foot
20410 status open
20411
20412 \begin_layout Plain Layout
20413 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20414 \end_layout
20415
20416 \end_inset
20417
20418 .
20419  If this property is detected for a given document LyX starts to use SVN
20420  locks for document editing automatically and the whole check-in/out mechanism
20421  switches to the same regimen as for RCS.
20422  This in particular means there are two different modes of file use in LyX:
20423 \end_layout
20424
20425 \begin_layout Itemize
20426 Unlocked state.
20427  The loaded file is in the read-only mode.
20428  For editing on needs to check-out.
20429  
20430 \emph on
20431 Check-out
20432 \emph default
20433  consists of updating from the repository and gaining write lock.
20434  If the lock is not possible to obtain, we remain in unlocked state.
20435 \end_layout
20436
20437 \begin_layout Itemize
20438 Locked state.
20439  The loaded file is in the 'normal' edit mode.
20440  No other user is allowed to edit the file.
20441  
20442 \emph on
20443 Check-in
20444 \emph default
20445  consists of commiting changes and releasing write-lock.
20446  If no changes have been made to the document, no commit will be produced
20447 \begin_inset Foot
20448 status collapsed
20449
20450 \begin_layout Plain Layout
20451 Don't be puzzled by the fact that you will be asked for commit message anyway.
20452 \end_layout
20453
20454 \end_inset
20455
20456  and only the write-lock will be released.
20457 \end_layout
20458
20459 \begin_layout Standard
20460 SVN commands:
20461 \end_layout
20462
20463 \begin_layout Labeling
20464 \labelwidthstring 00.00.0000
20465 Check-in:
20466 \family typewriter
20467  svn commit -q -m"<description>" "<file-name>"
20468 \begin_inset Newline newline
20469 \end_inset
20470
20471 svn unlock "<file-name>"
20472 \end_layout
20473
20474 \begin_layout Labeling
20475 \labelwidthstring 00.00.0000
20476 Check-out: 
20477 \family typewriter
20478 svn update "<file-name>"
20479 \begin_inset Newline newline
20480 \end_inset
20481
20482 svn lock "<file-name>"
20483 \end_layout
20484
20485 \begin_layout Subsubsection
20486
20487 \family typewriter
20488 \begin_inset CommandInset label
20489 LatexCommand label
20490 name "subsec:Automatical-Locking-Property"
20491
20492 \end_inset
20493
20494
20495 \family default
20496 Automatic Locking Property
20497 \end_layout
20498
20499 \begin_layout Standard
20500 The above mentioned automatic setting of write permissions of the .lyx file
20501  can be set through
20502 \family sans
20503 \bar under
20504  F
20505 \bar default
20506 ile\SpecialChar \menuseparator
20507
20508 \bar under
20509 V
20510 \bar default
20511 ersion
20512 \begin_inset space ~
20513 \end_inset
20514
20515 Control\SpecialChar \menuseparator
20516
20517 \bar under
20518 T
20519 \bar default
20520 oggle locking property
20521 \family default
20522 .
20523  This command is active only when the file is not locked on the svn server
20524  (i.e.
20525  you need to check-out before proceeding).
20526 \end_layout
20527
20528 \begin_layout Labeling
20529 \labelwidthstring 00.00.0000
20530 SVN
20531 \begin_inset space ~
20532 \end_inset
20533
20534 commands:
20535 \end_layout
20536
20537 \begin_layout Labeling
20538 \labelwidthstring 00.00.0000
20539 Set:
20540 \family typewriter
20541  svn propset svn:needs-lock ON "<file-name>"
20542 \end_layout
20543
20544 \begin_layout Labeling
20545 \labelwidthstring 00.00.0000
20546 Unset: 
20547 \family typewriter
20548 svn propdel svn:needs-lock "<file-name>"
20549 \end_layout
20550
20551 \begin_layout Subsubsection
20552 \begin_inset CommandInset label
20553 LatexCommand label
20554 name "sub:VCS-Revision-Information"
20555
20556 \end_inset
20557
20558 Revision Information in Documents
20559 \end_layout
20560
20561 \begin_layout Standard
20562 There are more possibilities how to activate revision information in our
20563  document.
20564 \end_layout
20565
20566 \begin_layout Itemize
20567 LyX supports directly:
20568 \end_layout
20569
20570 \begin_deeper
20571 \begin_layout Itemize
20572 tree revision information (
20573 \begin_inset Flex Code
20574 status collapsed
20575
20576 \begin_layout Plain Layout
20577 vcs-tree-revision
20578 \end_layout
20579
20580 \end_inset
20581
20582 ).
20583  The result is the output of the 
20584 \begin_inset Flex Code
20585 status collapsed
20586
20587 \begin_layout Plain Layout
20588 svnversion
20589 \end_layout
20590
20591 \end_inset
20592
20593  command, the following table gives you an idea, how to read the results.
20594 \end_layout
20595
20596 \begin_layout Standard
20597 \align center
20598 \begin_inset Tabular
20599 <lyxtabular version="3" rows="6" columns="2">
20600 <features tabularvalignment="middle">
20601 <column alignment="center" valignment="top" width="0">
20602 <column alignment="center" valignment="top" width="0">
20603 <row>
20604 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20605 \begin_inset Text
20606
20607 \begin_layout Plain Layout
20608 Output
20609 \end_layout
20610
20611 \end_inset
20612 </cell>
20613 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20614 \begin_inset Text
20615
20616 \begin_layout Plain Layout
20617 Meaning
20618 \end_layout
20619
20620 \end_inset
20621 </cell>
20622 </row>
20623 <row>
20624 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20625 \begin_inset Text
20626
20627 \begin_layout Plain Layout
20628 4123:4168
20629 \end_layout
20630
20631 \end_inset
20632 </cell>
20633 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20634 \begin_inset Text
20635
20636 \begin_layout Plain Layout
20637 mixed revision working copy
20638 \end_layout
20639
20640 \end_inset
20641 </cell>
20642 </row>
20643 <row>
20644 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20645 \begin_inset Text
20646
20647 \begin_layout Plain Layout
20648 4168M
20649 \end_layout
20650
20651 \end_inset
20652 </cell>
20653 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20654 \begin_inset Text
20655
20656 \begin_layout Plain Layout
20657 modified working copy
20658 \end_layout
20659
20660 \end_inset
20661 </cell>
20662 </row>
20663 <row>
20664 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20665 \begin_inset Text
20666
20667 \begin_layout Plain Layout
20668 4123S
20669 \end_layout
20670
20671 \end_inset
20672 </cell>
20673 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20674 \begin_inset Text
20675
20676 \begin_layout Plain Layout
20677 switched working copy
20678 \end_layout
20679
20680 \end_inset
20681 </cell>
20682 </row>
20683 <row>
20684 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20685 \begin_inset Text
20686
20687 \begin_layout Plain Layout
20688 4123P
20689 \end_layout
20690
20691 \end_inset
20692 </cell>
20693 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20694 \begin_inset Text
20695
20696 \begin_layout Plain Layout
20697 partial working copy, from a sparse checkout
20698 \end_layout
20699
20700 \end_inset
20701 </cell>
20702 </row>
20703 <row>
20704 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20705 \begin_inset Text
20706
20707 \begin_layout Plain Layout
20708 4123:4168MS
20709 \end_layout
20710
20711 \end_inset
20712 </cell>
20713 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20714 \begin_inset Text
20715
20716 \begin_layout Plain Layout
20717 mixed revision, modified, switched working copy
20718 \end_layout
20719
20720 \end_inset
20721 </cell>
20722 </row>
20723 </lyxtabular>
20724
20725 \end_inset
20726
20727
20728 \end_layout
20729
20730 \begin_layout Itemize
20731 file revision information.
20732  The result comes from parsing the output of 
20733 \begin_inset Flex Code
20734 status collapsed
20735
20736 \begin_layout Plain Layout
20737 svn
20738 \begin_inset space ~
20739 \end_inset
20740
20741 info
20742 \begin_inset space ~
20743 \end_inset
20744
20745 --xml
20746 \begin_inset space ~
20747 \end_inset
20748
20749 file.lyx
20750 \end_layout
20751
20752 \end_inset
20753
20754 .
20755  Supported flags are:
20756 \end_layout
20757
20758 \begin_deeper
20759 \begin_layout Itemize
20760 version number of the last commit (
20761 \begin_inset Flex Code
20762 status collapsed
20763
20764 \begin_layout Plain Layout
20765 vcs-revision
20766 \end_layout
20767
20768 \end_inset
20769
20770 )
20771 \end_layout
20772
20773 \begin_layout Itemize
20774 author of the last commit (
20775 \begin_inset Flex Code
20776 status collapsed
20777
20778 \begin_layout Plain Layout
20779 vcs-author
20780 \end_layout
20781
20782 \end_inset
20783
20784 )
20785 \end_layout
20786
20787 \begin_layout Itemize
20788 date of the last commit (
20789 \begin_inset Flex Code
20790 status collapsed
20791
20792 \begin_layout Plain Layout
20793 vcs-date
20794 \end_layout
20795
20796 \end_inset
20797
20798 )
20799 \end_layout
20800
20801 \begin_layout Itemize
20802 time of the last commit (
20803 \begin_inset Flex Code
20804 status collapsed
20805
20806 \begin_layout Plain Layout
20807 vcs-time
20808 \end_layout
20809
20810 \end_inset
20811
20812 )
20813 \end_layout
20814
20815 \end_deeper
20816 \begin_layout Standard
20817 You can obtain this info via InsetInfo (e.g.
20818  
20819 \begin_inset Flex Code
20820 status collapsed
20821
20822 \begin_layout Plain Layout
20823 info-insert buffer vcs-date
20824 \end_layout
20825
20826 \end_inset
20827
20828 ).
20829  The information will be available only when you have the file stored under
20830  svn managment (i.e.
20831  the 
20832 \begin_inset Flex Code
20833 status collapsed
20834
20835 \begin_layout Plain Layout
20836 .svn
20837 \end_layout
20838
20839 \end_inset
20840
20841  directory is available with your document).
20842 \end_layout
20843
20844 \end_deeper
20845 \begin_layout Itemize
20846 Another---a hacking one---possibility is to use svn keywords
20847 \begin_inset Foot
20848 status collapsed
20849
20850 \begin_layout Plain Layout
20851 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20852 \end_layout
20853
20854 \end_inset
20855
20856 .
20857  In short -- you set file keywords property (e.g.
20858  
20859 \family sans
20860 svn propset svn:keywords 'Rev' file.lyx
20861 \family default
20862 ) and then paste keyword TeX code
20863 \begin_inset Foot
20864 status collapsed
20865
20866 \begin_layout Plain Layout
20867 This is an easy way how to ensure that LyX won't break the line in the middle
20868  of keyword tag.
20869 \end_layout
20870
20871 \end_inset
20872
20873  tag in your document (e.g.
20874  
20875 \begin_inset ERT
20876 status open
20877
20878 \begin_layout Plain Layout
20879
20880 $Rev$
20881 \end_layout
20882
20883 \end_inset
20884
20885 ).
20886  This way svn client will automatically substitute revision number (e.g.
20887  
20888 \begin_inset ERT
20889 status open
20890
20891 \begin_layout Plain Layout
20892
20893 $Rev: 59 $
20894 \end_layout
20895
20896 \end_inset
20897
20898 ) after each update and commit.
20899  There are more problems with this approach.
20900  Firstly, the '$' character is used in TeX world for math equations, so
20901  any occurence of math formula 
20902 \begin_inset Formula $Rev$
20903 \end_inset
20904
20905  become 
20906 \begin_inset Formula $Rev:59$
20907 \end_inset
20908
20909  in your LyX document.
20910  Similarly for other keywords like Id, Date, Author, etc.
20911  Secondly svn output is dependent on your locales, so its very easy that
20912  svn would produce some problematic strings once Date is used.
20913  Thirdly you get the whole 'Rev: 59' string in your document instead of
20914  the plain number.
20915  Until subversion implements user's custom keywords it will be hard to use
20916  this approach reliably or let LyX to support it directly.
20917 \end_layout
20918
20919 \begin_layout Subsection
20920 SVN and Windows Environment
20921 \end_layout
20922
20923 \begin_layout Quote
20924 My inclination is to say that if the user cannot figure out the command
20925  line operations on their own fairly quickly, they would be well advised
20926  to use TortoiseSVN.
20927  ---P.
20928  A.
20929  Rubin
20930 \end_layout
20931
20932 \begin_layout Subsubsection
20933 Preparation
20934 \end_layout
20935
20936 \begin_layout Standard
20937 In addition to installing LyX, and having access to a Subversion repository,
20938  the user will need to install the Subversion client program.
20939  A Windows installer for the client program is available from 
20940 \begin_inset CommandInset href
20941 LatexCommand href
20942 name "CollabNet"
20943 target "http://www.collab.net/nonav/downloads/subversion/"
20944
20945 \end_inset
20946
20947 .
20948  The user may also want to install 
20949 \begin_inset CommandInset href
20950 LatexCommand href
20951 name "TortoiseSVN"
20952 target "http://tortoisesvn.tigris.org/"
20953
20954 \end_inset
20955
20956 , which integrates Subversion operations into the context (rightclick) menu
20957  of Windows Explorer.
20958  Operations done outside LyX will typically be more convenient using the
20959  Explorer context menu.
20960  Note that TortoiseSVN is not a replacement for the client program, which
20961  is what LyX itself will use.
20962 \end_layout
20963
20964 \begin_layout Subsubsection
20965 Bringing a document under Subversion control
20966 \end_layout
20967
20968 \begin_layout Standard
20969 Before a LyX document can be brought under version control in Subversion,
20970  its parent directory needs to be under version control.
20971  If the document is being added to a project already in the repository,
20972  this is accomplished by checking the project out to the directory where
20973  the new document will be placed.
20974  If the project itself is not yet under version control (for instance, if
20975  this document starts a new project), the directory must be imported into
20976  the repository.
20977  This is done outside LyX.
20978  Both import and checkout are easily accomplished from the Explorer context
20979  menu using TortoiseSVN, or alternatively can be done using the command
20980  line client at a DOS prompt.
20981  The procedure for importing the project using TortoiseSVN is described
20982  below, assuming an existing repository and a new project being started
20983  in 
20984 \family typewriter
20985 C:
20986 \backslash
20987 new project
20988 \family default
20989 .
20990  For information on using the Subversion client program, run 
20991 \family typewriter
20992 svn --help 
20993 \family default
20994 in a DOS shell.
20995 \end_layout
20996
20997 \begin_layout Enumerate
20998 Locate 
20999 \family typewriter
21000 C:
21001 \backslash
21002 new project 
21003 \family default
21004 in Windows Explorer, right click it, and select 
21005 \family typewriter
21006 TortoiseSVN > Repo-browser
21007 \family default
21008 .
21009  If necessary, adjust the URL for the repository, then click OK.
21010 \end_layout
21011
21012 \begin_layout Enumerate
21013 Right click the level of the repository under which you want to place the
21014  new project folder (typically the top level) and click 
21015 \family typewriter
21016 Create folder\SpecialChar \ldots{}
21017
21018 \family default
21019  Supply a name for the project folder and click OK.
21020  Add a message for the log file if desired, then click OK again.
21021  The new project folder should appear in the repository.
21022  Finally, click OK again to exit the repository browser.
21023 \end_layout
21024
21025 \begin_layout Enumerate
21026 Once again right click 
21027 \family typewriter
21028 C:
21029 \backslash
21030 new project
21031 \family default
21032 , this time selecting SVN Checkout\SpecialChar \ldots{}
21033  Select the URL of the project folder
21034  you just created in the repository, and set the checkout directory to 
21035 \family typewriter
21036 C:
21037 \backslash
21038 new project.
21039
21040 \family default
21041  Click OK.
21042  You will be warned about a non-empty folder; click OK to proceed.
21043  You should now have a 
21044 \family typewriter
21045 .svn
21046 \family default
21047  directory under 
21048 \family typewriter
21049 C:
21050 \backslash
21051 new project.
21052 \end_layout
21053
21054 \begin_layout Enumerate
21055 Create or open your document in LyX and click 
21056 \family sans
21057 \bar under
21058 F
21059 \bar default
21060 ile\SpecialChar \menuseparator
21061
21062 \bar under
21063 V
21064 \bar default
21065 ersion
21066 \begin_inset space ~
21067 \end_inset
21068
21069 Control\SpecialChar \menuseparator
21070
21071 \bar under
21072 R
21073 \bar default
21074 egister.
21075  
21076 \family default
21077 Add a log message and click OK to commit the document to version control.
21078 \end_layout
21079
21080 \begin_layout Standard
21081 From this point onward, you should have full functionality in the 
21082 \family sans
21083 \bar under
21084 F
21085 \bar default
21086 ile\SpecialChar \menuseparator
21087
21088 \bar under
21089 V
21090 \bar default
21091 ersion
21092 \begin_inset space ~
21093 \end_inset
21094
21095 Control
21096 \family default
21097  menu.
21098  You also have the option of checking the document in and out, viewing its
21099  history, etc.
21100  using the TortoiseSVN context menu in Windows Explorer or the Subversion
21101  client program from a command prompt.
21102 \end_layout
21103
21104 \begin_layout Subsubsection
21105 SSH tunnel used with SVN under Windows
21106 \end_layout
21107
21108 \begin_layout Standard
21109 Compared with Linux setting up svn client to communicate over ssh under
21110  Windows is a rather troublesome task.
21111  We will at least offer some hints how to setup the client side but prior
21112  knowledge about ssh and the Windows command line is needed, also be prepared
21113  for a great deal of frustration\SpecialChar \ldots{}
21114
21115 \end_layout
21116
21117 \begin_layout Enumerate
21118 Get a svn client for windows, as described in the previous sections.
21119  When it is a fresh install run some svn command (e.g.
21120  
21121 \begin_inset Flex Code
21122 status collapsed
21123
21124 \begin_layout Plain Layout
21125 svn --version
21126 \end_layout
21127
21128 \end_inset
21129
21130 ) to create config files, which you will need to change later on.
21131 \end_layout
21132
21133 \begin_layout Enumerate
21134 Choose a ssh client for Windows.
21135  There are several possibilities, we will use the one from Putty tools
21136 \begin_inset Foot
21137 status open
21138
21139 \begin_layout Plain Layout
21140 \begin_inset Flex URL
21141 status collapsed
21142
21143 \begin_layout Plain Layout
21144
21145 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21146 \end_layout
21147
21148 \end_inset
21149
21150
21151 \end_layout
21152
21153 \end_inset
21154
21155 .
21156  You will need to set the connection up so that the client doesn't ask for
21157  any password from you.
21158  To keep things easy we will use only keys without any additional password
21159  protection etc.
21160 \end_layout
21161
21162 \begin_deeper
21163 \begin_layout Enumerate
21164 Generate keys by 
21165 \begin_inset Flex Code
21166 status collapsed
21167
21168 \begin_layout Plain Layout
21169 puttygen
21170 \end_layout
21171
21172 \end_inset
21173
21174 .
21175  Save your private .ppk key file and put the public one on the server side.
21176  If the SVN server runs on Linux, note that the format of the public key
21177  is not compatible with Linux openssh and you will need to direcly copy-paste
21178  the key from the “
21179 \emph on
21180 Public key for pasting into OpenSSH authorized_keys file
21181 \emph default
21182 :” edit field into the server's 
21183 \begin_inset Flex Code
21184 status collapsed
21185
21186 \begin_layout Plain Layout
21187 ~/.ssh/authorized_keys
21188 \end_layout
21189
21190 \end_inset
21191
21192
21193 \begin_inset Flex Code
21194 status collapsed
21195
21196 \begin_layout Plain Layout
21197 authorized_keys2
21198 \end_layout
21199
21200 \end_inset
21201
21202  file.
21203 \end_layout
21204
21205 \begin_layout Enumerate
21206 Get the Putty's 
21207 \begin_inset Flex Code
21208 status collapsed
21209
21210 \begin_layout Plain Layout
21211 plink
21212 \end_layout
21213
21214 \end_inset
21215
21216 .
21217  In the SVN config file
21218 \begin_inset Foot
21219 status collapsed
21220
21221 \begin_layout Plain Layout
21222 Exact path depends on Windows version, usually somewhere around 
21223 \begin_inset Flex Code
21224 status collapsed
21225
21226 \begin_layout Plain Layout
21227 c:
21228 \backslash
21229 Documents and Settings
21230 \backslash
21231 user
21232 \backslash
21233 Application Data
21234 \backslash
21235 Subversion
21236 \backslash
21237 config
21238 \end_layout
21239
21240 \end_inset
21241
21242  / 
21243 \begin_inset Flex Code
21244 status collapsed
21245
21246 \begin_layout Plain Layout
21247 AppData
21248 \backslash
21249 Roaming
21250 \backslash
21251 Subversion
21252 \end_layout
21253
21254 \end_inset
21255
21256 .
21257 \end_layout
21258
21259 \end_inset
21260
21261 , section [tunnels], setup ssh command, e.g.
21262  
21263 \begin_inset Flex Code
21264 status collapsed
21265
21266 \begin_layout Plain Layout
21267 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21268 \end_layout
21269
21270 \end_inset
21271
21272 .
21273 \begin_inset Foot
21274 status collapsed
21275
21276 \begin_layout Plain Layout
21277 It will usually take a lot of time to get exact command right and it depends
21278  on many things.
21279  For example do not have some remote server saved as a default session in
21280  Putty etc.
21281  If things fail, try to connect via plink without SVN first.
21282 \end_layout
21283
21284 \end_inset
21285
21286
21287 \end_layout
21288
21289 \end_deeper
21290 \begin_layout Enumerate
21291 Checkout the SVN archive, e.g.
21292  
21293 \begin_inset Flex Code
21294 status collapsed
21295
21296 \begin_layout Plain Layout
21297 svn co svn+ssh://user@server/repository_path
21298 \end_layout
21299
21300 \end_inset
21301
21302 .
21303 \end_layout
21304
21305 \begin_layout Subsubsection
21306 End-of-Line Conversions
21307 \end_layout
21308
21309 \begin_layout Standard
21310 When the collsraborators are mixing Linux and Windows environments, LyX
21311  will use different line endings inside the .lyx files.
21312  This is not a problem as far as LyX functionality is concerned, but the
21313  commit diffs will be huge and merge-conflicts prone.
21314  Fortunately SVN itself knows
21315 \begin_inset Foot
21316 status collapsed
21317
21318 \begin_layout Plain Layout
21319 \begin_inset Flex URL
21320 status collapsed
21321
21322 \begin_layout Plain Layout
21323
21324 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21325 \end_layout
21326
21327 \end_inset
21328
21329
21330 \end_layout
21331
21332 \end_inset
21333
21334  how to deal with CR/LF problems when switching .lyx files to the 
21335 \begin_inset Flex Code
21336 status collapsed
21337
21338 \begin_layout Plain Layout
21339 native
21340 \end_layout
21341
21342 \end_inset
21343
21344  mode.
21345 \begin_inset Foot
21346 status collapsed
21347
21348 \begin_layout Plain Layout
21349 For the lazy guys: 
21350 \begin_inset Flex Code
21351 status collapsed
21352
21353 \begin_layout Plain Layout
21354 svn propset svn:eol-style native FILE_NAME
21355 \end_layout
21356
21357 \end_inset
21358
21359
21360 \end_layout
21361
21362 \end_inset
21363
21364
21365 \end_layout
21366
21367 \begin_layout Subsection
21368 Further tuning
21369 \end_layout
21370
21371 \begin_layout Standard
21372 With the recent addition of the vc-command function LyX power users are
21373  allowed to create their own commands for revision control.
21374 \end_layout
21375
21376 \begin_layout Standard
21377 As an example you can see how two TortoiseSVN commands could be integrated
21378  directly:
21379 \end_layout
21380
21381 \begin_layout Description
21382 Commit: 
21383 \begin_inset Flex Code
21384 status collapsed
21385
21386 \begin_layout Plain Layout
21387 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21388 \end_layout
21389
21390 \end_inset
21391
21392
21393 \end_layout
21394
21395 \begin_layout Description
21396 Revert: 
21397 \begin_inset Flex Code
21398 status collapsed
21399
21400 \begin_layout Plain Layout
21401 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21402 \end_layout
21403
21404 \end_inset
21405
21406
21407 \end_layout
21408
21409 \begin_layout Subsection
21410 Version control and Document comparison
21411 \end_layout
21412
21413 \begin_layout Standard
21414 One of the typical uses of version control is to inspect the changes between
21415  revisions, usually by creating 
21416 \begin_inset Flex Code
21417 status collapsed
21418
21419 \begin_layout Plain Layout
21420 diff
21421 \end_layout
21422
21423 \end_inset
21424
21425  dumps.
21426  While this is useful for plain text files, it is much less useful in the
21427  case of LyX files, which have more complicated structure.
21428  Hence we provide binding to the Document comparison feature.
21429  They are two ways of calling this feature - either by direct call of 
21430 \begin_inset Flex Code
21431 status collapsed
21432
21433 \begin_layout Plain Layout
21434 VC_COMPARE
21435 \end_layout
21436
21437 \end_inset
21438
21439  LyX function (for details see LyX functions manual) or by icon/menu item
21440  
21441 \begin_inset Flex MenuItem
21442 status collapsed
21443
21444 \begin_layout Plain Layout
21445 Compare with older revision...
21446 \end_layout
21447
21448 \end_inset
21449
21450 .
21451  One can either compare two chosen revisions of the document or he can simply
21452  compare the current version of edited text with older revisions (where
21453  '
21454 \begin_inset Flex MenuItem
21455 status collapsed
21456
21457 \begin_layout Plain Layout
21458 0
21459 \end_layout
21460
21461 \end_inset
21462
21463 ' revisions back means comparison of the edited file with last commited
21464  revision).
21465  
21466 \end_layout
21467
21468 \begin_layout Standard
21469 This feature is supported for SVN and RCS though due to the more complicated
21470  versioning scheme of RCS there is a constraint -- when addressing the revisions
21471  in dialog, numbers always point to the last number in RCS revision number,
21472  i.e.
21473  '35' in '1.2.35'.
21474 \end_layout
21475
21476 \begin_layout Section
21477 Literate Programming
21478 \end_layout
21479
21480 \begin_layout Standard
21481 Updated by 
21482 \noun on
21483 Kayvan Sylvan 
21484 \noun default
21485 (kayvan@sylvan.com)
21486 \noun on
21487
21488 \noun default
21489 original documentation written by 
21490 \noun on
21491 Edmar Wienskoski Jr.
21492
21493 \noun default
21494  (edmar-w-jr@technologist.com)
21495 \end_layout
21496
21497 \begin_layout Subsection
21498 Introduction
21499 \end_layout
21500
21501 \begin_layout Standard
21502 The main purpose of this documentation is to show you how to use LyX for
21503  literate programming, where it is assumed that you are familiar with this
21504  programming technique, and know what 
21505 \begin_inset Quotes eld
21506 \end_inset
21507
21508 tangling
21509 \begin_inset Quotes erd
21510 \end_inset
21511
21512  and 
21513 \begin_inset Quotes eld
21514 \end_inset
21515
21516 weaving
21517 \begin_inset Quotes erd
21518 \end_inset
21519
21520  means.
21521  If that is not the case, please follow the web links provided in the following
21522  sections.
21523  There is a lot of good documentation out there covering old development
21524  history to the latest tools tips.
21525 \end_layout
21526
21527 \begin_layout Standard
21528 It is also assumed that you are familiar with LyX itself to a point that
21529  you are comfortable changing your LyX preferences, and X resources file.
21530  If that is not the case please refer to other LyX documentation to cover
21531  your specific needs.
21532 \end_layout
21533
21534 \begin_layout Subsection
21535 Literate Programming
21536 \end_layout
21537
21538 \begin_layout Standard
21539 From the Literate Programming FAQ: 
21540 \end_layout
21541
21542 \begin_layout Quotation
21543 Literate programming is the combination of documentation and source together
21544  in a fashion suited for reading by human beings.
21545  In fact, literate programs should be enjoyable reading, even inviting!
21546  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21547  and documentation in a single file.
21548  Literate programming tools then parse the file to produce either readable
21549  documentation or compilable source.
21550  The WEB style of literate programming was created by D.
21551 \begin_inset space \thinspace{}
21552 \end_inset
21553
21554 E.
21555  Knuth during the development of his TeX typesetting software.
21556  
21557 \end_layout
21558
21559 \begin_layout Standard
21560 Another excerpt says:
21561 \end_layout
21562
21563 \begin_layout Quotation
21564
21565 \emph on
21566 How is literate programming different from verbose commenting?
21567 \end_layout
21568
21569 \begin_layout Quotation
21570 There are three distinguishing characteristics.
21571  In order of importance, they are: 
21572 \end_layout
21573
21574 \begin_deeper
21575 \begin_layout Itemize
21576 flexible order of elaboration 
21577 \end_layout
21578
21579 \begin_layout Itemize
21580 automatic support for browsing 
21581 \end_layout
21582
21583 \begin_layout Itemize
21584 typeset documentation, especially diagrams and mathematics 
21585 \end_layout
21586
21587 \end_deeper
21588 \begin_layout Standard
21589 Now that I sparked your curiosity, take a look in the references.
21590 \end_layout
21591
21592 \begin_layout Subsubsection
21593 References
21594 \end_layout
21595
21596 \begin_layout Standard
21597 The complete Literate Programming FAQ can be found at:
21598 \end_layout
21599
21600 \begin_layout Quote
21601 Literate Programming FAQ 
21602 \begin_inset Flex URL
21603 status collapsed
21604
21605 \begin_layout Plain Layout
21606
21607 http://www.literateprogramming.com/lpfaq.pdf
21608 \end_layout
21609
21610 \end_inset
21611
21612
21613 \end_layout
21614
21615 \begin_layout Standard
21616 The FAQ lists 23 (twenty three!) different literate programming tools.
21617  Where some are specialized or 
21618 \begin_inset Quotes eld
21619 \end_inset
21620
21621 tailored
21622 \begin_inset Quotes erd
21623 \end_inset
21624
21625  for particular programming languages, while other have general scope.
21626  I selected 
21627 \noun on
21628 Noweb
21629 \noun default
21630  for my own use for several reasons:
21631 \end_layout
21632
21633 \begin_layout Itemize
21634 It can generate the documentation either in LaTeX or HTML.
21635 \end_layout
21636
21637 \begin_layout Itemize
21638 It has a open architecture, i.
21639 \begin_inset space \thinspace{}
21640 \end_inset
21641
21642 g.
21643 \begin_inset space \space{}
21644 \end_inset
21645
21646 it is easy to plug in new filters and to perform special processing that
21647  you may need.
21648  
21649 \end_layout
21650
21651 \begin_layout Itemize
21652 There is a good selection of filters available already (the HTML is one
21653  of them).
21654 \end_layout
21655
21656 \begin_layout Itemize
21657 It is free.
21658 \end_layout
21659
21660 \begin_layout Standard
21661 The Noweb web page can be found at: 
21662 \end_layout
21663
21664 \begin_layout Quote
21665 Noweb home page 
21666 \begin_inset Flex URL
21667 status collapsed
21668
21669 \begin_layout Plain Layout
21670
21671 http://www.cs.virginia.edu/~nr/noweb/
21672 \end_layout
21673
21674 \end_inset
21675
21676
21677 \end_layout
21678
21679 \begin_layout Standard
21680 Starting from there you can reach many other interesting links and even
21681  some literate program examples.
21682 \end_layout
21683
21684 \begin_layout Subsection
21685 LyX and Literate Programming
21686 \end_layout
21687
21688 \begin_layout Standard
21689 The LyX support for Literate Programming is provided by using the generic
21690  LyX converters mechanism.
21691  This support is provided in a 
21692 \begin_inset Quotes eld
21693 \end_inset
21694
21695 Noweb independent
21696 \begin_inset Quotes erd
21697 \end_inset
21698
21699  way, i.
21700 \begin_inset space \thinspace{}
21701 \end_inset
21702
21703 g.
21704 \begin_inset space \space{}
21705 \end_inset
21706
21707 you will be able to use this new LyX feature with some other literate programmin
21708 g tool of your choice by just changing your LyX preferences.
21709 \end_layout
21710
21711 \begin_layout Subsubsection
21712 Generating documents and code (weaving and tangling)
21713 \end_layout
21714
21715 \begin_layout Paragraph
21716 Selecting the document class
21717 \end_layout
21718
21719 \begin_layout Standard
21720 If you have installed Noweb and LyX successfully, whenever you open a new
21721  document or try to change the document class of an existing one, you will
21722  find that there are three new document classes available:
21723 \end_layout
21724
21725 \begin_layout Itemize
21726 Article (Noweb)
21727 \end_layout
21728
21729 \begin_layout Itemize
21730 Book (Noweb)
21731 \end_layout
21732
21733 \begin_layout Itemize
21734 Report (Noweb)
21735 \end_layout
21736
21737 \begin_layout Standard
21738 You must select one of them to create your literate documents from.
21739  
21740 \end_layout
21741
21742 \begin_layout Standard
21743 Note that literate documents are not limited to these three classes.
21744  New classes can be generated from other styles like letter or in combination
21745  with other class variations like Article (AMS).
21746  If you have special needs that cannot be covered by one of the existing
21747  classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21748  will arrange to insert a new entry, or teach you how to do it.
21749 \begin_inset Foot
21750 status collapsed
21751
21752 \begin_layout Plain Layout
21753 It is very simple, it involves the creation of a file with four lines, and
21754  re-running of the auto configuration.
21755 \end_layout
21756
21757 \end_inset
21758
21759  Moreover, if you use a literate tool other than Noweb you may need to create
21760  a new set of document classes for it.
21761 \end_layout
21762
21763 \begin_layout Paragraph
21764 Typing code in
21765 \end_layout
21766
21767 \begin_layout Standard
21768 LyX enables you to write code with a layout named 
21769 \noun on
21770 Scrap
21771 \noun default
21772 .
21773 \begin_inset Foot
21774 status collapsed
21775
21776 \begin_layout Plain Layout
21777 The equivalent Noweb term is 
21778 \begin_inset Quotes eld
21779 \end_inset
21780
21781 Chunk
21782 \begin_inset Quotes erd
21783 \end_inset
21784
21785 .
21786  For historical reasons, I got used to the term 
21787 \begin_inset Quotes eld
21788 \end_inset
21789
21790 scrap
21791 \begin_inset Quotes erd
21792 \end_inset
21793
21794  introduced by other literate tool named Nuweb, which I used for many years
21795  before rendering myself to Noweb.
21796 \end_layout
21797
21798 \end_inset
21799
21800  Noweb delimits scraps like this:
21801 \end_layout
21802
21803 \begin_layout LyX-Code
21804 <<My scrap>>=
21805 \end_layout
21806
21807 \begin_layout LyX-Code
21808   code
21809 \end_layout
21810
21811 \begin_layout LyX-Code
21812   more code
21813 \end_layout
21814
21815 \begin_layout LyX-Code
21816   even more code
21817 \end_layout
21818
21819 \begin_layout LyX-Code
21820   @
21821 \end_layout
21822
21823 \begin_layout Standard
21824 The problem is that whatever is written in between the << and the 
21825 \family typewriter
21826 @
21827 \family default
21828  must be taken literally, i.
21829 \begin_inset space \thinspace{}
21830 \end_inset
21831
21832 g.
21833 \begin_inset space \space{}
21834 \end_inset
21835
21836 LyX should be prevented from making any special interpretation of what has
21837  been written.
21838  This is handled by a special layout named Scrap, that works like a normal
21839  paragraph but has a free spacing capability.
21840 \end_layout
21841
21842 \begin_layout Standard
21843 The down side of the Scrap paragraph layout is that consecutive paragraphs
21844  of code will be spaced with one empty line in the source code and also
21845  in the printed documentation.
21846  The work around is to enter each line of code within a single Scrap, with
21847  a newline (ctrl-return).
21848  The example above will look like this:
21849 \begin_inset Foot
21850 status collapsed
21851
21852 \begin_layout Plain Layout
21853 If you have a printed version of this document you will not see any difference
21854  between the previous example and this one.
21855 \end_layout
21856
21857 \end_inset
21858
21859
21860 \end_layout
21861
21862 \begin_layout LyX-Code
21863 <<My scrap>>=
21864 \begin_inset Newline newline
21865 \end_inset
21866
21867   code
21868 \begin_inset Newline newline
21869 \end_inset
21870
21871   more code
21872 \begin_inset Newline newline
21873 \end_inset
21874
21875   even more code
21876 \begin_inset Newline newline
21877 \end_inset
21878
21879   @
21880 \end_layout
21881
21882 \begin_layout Standard
21883 This layout works fine.
21884  The only real inconvenience is that you have to type ctrl-return instead
21885  of a plain return.
21886 \begin_inset Foot
21887 status collapsed
21888
21889 \begin_layout Plain Layout
21890 It is in my list of 
21891 \begin_inset Quotes eld
21892 \end_inset
21893
21894 improvements
21895 \begin_inset Quotes erd
21896 \end_inset
21897
21898  to fix that.
21899 \end_layout
21900
21901 \end_inset
21902
21903
21904 \end_layout
21905
21906 \begin_layout Standard
21907 As a special note, you can also use the 
21908 \begin_inset Quotes eld
21909 \end_inset
21910
21911 %def
21912 \begin_inset Quotes erd
21913 \end_inset
21914
21915  construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21916 rence:
21917 \end_layout
21918
21919 \begin_layout LyX-Code
21920 <<My scrap>>=
21921 \begin_inset Newline newline
21922 \end_inset
21923
21924   def some_function(args):
21925 \begin_inset Newline newline
21926 \end_inset
21927
21928     "This is the doc string for this function."
21929 \begin_inset Newline newline
21930 \end_inset
21931
21932     print "My args: ", args
21933 \end_layout
21934
21935 \begin_layout LyX-Code
21936 @ %def some_function
21937 \end_layout
21938
21939 \begin_layout Standard
21940 For an example of this usage and the resulting cross-reference output, look
21941  at the Literate python program in 
21942 \emph on
21943 LIBDIR/examples/listerrors.lyx
21944 \emph default
21945  which should make this all clear.
21946 \end_layout
21947
21948 \begin_layout Paragraph
21949 Generating the documentation
21950 \end_layout
21951
21952 \begin_layout Standard
21953 At this point you already have a new document file with a proper document
21954  class, and with some code and text on it.
21955  How do I print it? The answer is simple, you select 
21956 \family sans
21957 View\SpecialChar \menuseparator
21958 DVI,
21959 \family default
21960  etc.
21961  Just like you would do for a plain document.
21962  No special procedure is required.
21963 \end_layout
21964
21965 \begin_layout Standard
21966 To help orientate you, I will now explain what happens inside LyX:
21967 \end_layout
21968
21969 \begin_layout Enumerate
21970 When the 
21971 \family sans
21972 Update\SpecialChar \menuseparator
21973 DVI
21974 \family default
21975  menu option is chosen, a LaTeX file is generated.
21976  
21977 \end_layout
21978
21979 \begin_deeper
21980 \begin_layout Standard
21981 If the document is of any literate class the generated file will be named
21982  with an extension name defined by the 
21983 \begin_inset Quotes eld
21984 \end_inset
21985
21986 literate
21987 \begin_inset Quotes erd
21988 \end_inset
21989
21990  format (defined in the Preferences panel), otherwise the file will have
21991  the usual 
21992 \family typewriter
21993 .tex
21994 \family default
21995  extension.
21996 \end_layout
21997
21998 \end_deeper
21999 \begin_layout Enumerate
22000 Note that the only difference so far is in the name of the file, no special
22001  processing is required by LyX.
22002  Given that you formatted the code using the Scrap layout that, by itself,
22003  takes care of the business.
22004 \end_layout
22005
22006 \begin_layout Enumerate
22007 If the document is of any literate class LyX will then use the internal
22008  LyX to Noweb converter, followed by the Noweb to LaTeX converter
22009 \begin_inset Foot
22010 status collapsed
22011
22012 \begin_layout Plain Layout
22013 The converters are defined in the 
22014 \family sans
22015 Tools\SpecialChar \menuseparator
22016 Preferences
22017 \family default
22018  panel, under the 
22019 \begin_inset Quotes eld
22020 \end_inset
22021
22022 Conversion
22023 \begin_inset Quotes erd
22024 \end_inset
22025
22026  tab.
22027  See section 
22028 \emph on
22029 Converters
22030 \emph default
22031  of the 
22032 \emph on
22033 Customization
22034 \emph default
22035  manual for general information about converters.
22036 \end_layout
22037
22038 \end_inset
22039
22040  to generate the LaTeX file.
22041 \end_layout
22042
22043 \begin_deeper
22044 \begin_layout Standard
22045 Otherwise it will just skip this step.
22046 \end_layout
22047
22048 \end_deeper
22049 \begin_layout Enumerate
22050 Finally, LaTeX is invoked and the regular post processing continues as in
22051  a plain document.
22052 \end_layout
22053
22054 \begin_layout Standard
22055 Independence from a particular 
22056 \begin_inset Quotes eld
22057 \end_inset
22058
22059 literate tool
22060 \begin_inset Quotes erd
22061 \end_inset
22062
22063  is easily achieved by changing the commands that are run by the various
22064  converters.
22065 \end_layout
22066
22067 \begin_layout Paragraph
22068 Generating the code
22069 \end_layout
22070
22071 \begin_layout Standard
22072 When the build menu option is chosen or the corresponding button in the
22073  toolbar is pressed, a LaTeX file is generated just like step 1 above.
22074  Next, LyX invokes the 
22075 \family typewriter
22076 Noweb->Program
22077 \family default
22078  converter.
22079  This converter needs to be defined by the user and is not installed by
22080  default, though the Program format is.
22081  This converter (like any other converter) will have two parts:
22082 \end_layout
22083
22084 \begin_layout Enumerate
22085 The converter program itself.
22086  This program performs the conversion from the one format to the other (in
22087  this case, from the Noweb format to the Program pseudo-format).
22088 \end_layout
22089
22090 \begin_layout Enumerate
22091 The error log parser.
22092  This is a program whose sole purpose is to rewrite error messages in a
22093  format that LyX understands.
22094  This makes it possible for LyX to place error boxes in the right places
22095  in the file buffer.
22096 \end_layout
22097
22098 \begin_layout Standard
22099 The first part, the 
22100 \begin_inset Quotes eld
22101 \end_inset
22102
22103 Converter
22104 \begin_inset Quotes erd
22105 \end_inset
22106
22107  setting, should be set to 
22108 \begin_inset Quotes eld
22109 \end_inset
22110
22111
22112 \family typewriter
22113 build-script $$i
22114 \family default
22115
22116 \begin_inset Quotes erd
22117 \end_inset
22118
22119 .
22120  This basically means that LyX will call 
22121 \begin_inset Quotes eld
22122 \end_inset
22123
22124 build-script
22125 \begin_inset Quotes erd
22126 \end_inset
22127
22128  (a program or script) with the name of the Noweb file (normally a file
22129  in the LyX temp directory).
22130  
22131 \end_layout
22132
22133 \begin_layout Standard
22134 This is an implementation of 
22135 \begin_inset Quotes eld
22136 \end_inset
22137
22138 build-script
22139 \begin_inset Quotes erd
22140 \end_inset
22141
22142  that you can place in a directory on your path:
22143 \end_layout
22144
22145 \begin_layout LyX-Code
22146 #!/bin/sh
22147 \end_layout
22148
22149 \begin_layout LyX-Code
22150 #
22151 \end_layout
22152
22153 \begin_layout LyX-Code
22154 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
22155 \end_layout
22156
22157 \begin_layout Standard
22158 The next part of the converter setting is the 
22159 \begin_inset Quotes eld
22160 \end_inset
22161
22162 Flags
22163 \begin_inset Quotes erd
22164 \end_inset
22165
22166  which is to be set to 
22167 \begin_inset Quotes eld
22168 \end_inset
22169
22170
22171 \family typewriter
22172 parselog=listerrors
22173 \family default
22174
22175 \begin_inset Quotes erd
22176 \end_inset
22177
22178 .
22179  This will run any errors that are generated by the 
22180 \begin_inset Quotes eld
22181 \end_inset
22182
22183 build-script
22184 \begin_inset Quotes erd
22185 \end_inset
22186
22187  process through the 
22188 \begin_inset Quotes eld
22189 \end_inset
22190
22191 listerrors
22192 \begin_inset Quotes erd
22193 \end_inset
22194
22195  program.
22196 \end_layout
22197
22198 \begin_layout Standard
22199 The converter code looks in 
22200 \emph on
22201 MYLYXDIR/scripts
22202 \emph default
22203  first, then in 
22204 \emph on
22205 LIBDIR/scripts
22206 \emph default
22207  then on the path for the 
22208 \begin_inset Quotes eld
22209 \end_inset
22210
22211 listerrors
22212 \begin_inset Quotes erd
22213 \end_inset
22214
22215  program.
22216 \end_layout
22217
22218 \begin_layout Standard
22219 The build will normally take place in LyX's temporary directory, so the
22220  files produced by the conversion will be in that directory.
22221  LyX will copy out what it regards as the `main' file, but the 
22222 \family typewriter
22223 Noweb->Program
22224 \family default
22225  conversion may produce several files, and so most of these would then be
22226  deleted when LyX was closed.
22227  The present solution is to use a `copier',
22228 \begin_inset Foot
22229 status collapsed
22230
22231 \begin_layout Plain Layout
22232 See section 
22233 \emph on
22234 Copiers
22235 \emph default
22236  of the 
22237 \emph on
22238 Customization
22239 \emph default
22240  manual for information on these.
22241 \end_layout
22242
22243 \end_inset
22244
22245  in this case, the 
22246 \family typewriter
22247 ext_copy.py
22248 \family default
22249  script in its default mode, so that the entire contents of the temporary
22250  directory is copied.
22251  More will get copied than is needed, to be sure, but nothing will be lost.
22252  If, however, you know what extensions the generated files will have, this
22253  can be improved by using the 
22254 \family typewriter
22255 -e
22256 \family default
22257  option to 
22258 \family typewriter
22259 ext_copy
22260 \family default
22261 .
22262  This option takes a comma-separated list of extensions to copy.
22263  So, for example, if the conversion will generate only files with the extensions
22264  
22265 \family typewriter
22266 .c
22267 \family default
22268  and 
22269 \family typewriter
22270 .h
22271 \family default
22272 , then the correct definition would be:
22273 \end_layout
22274
22275 \begin_layout LyX-Code
22276 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
22277 \end_layout
22278
22279 \begin_layout Standard
22280 The result will be that only files with these two extensions will be copied
22281  out.
22282 \end_layout
22283
22284 \begin_layout Paragraph
22285 Build instructions in the document
22286 \end_layout
22287
22288 \begin_layout Standard
22289 The last piece of the integration between LyX and noweb is the 
22290 \begin_inset Quotes eld
22291 \end_inset
22292
22293 build-script
22294 \begin_inset Quotes erd
22295 \end_inset
22296
22297  scrap.
22298  Generally, the instructions for building your program should be embedded
22299  in a scrap of its own.
22300  The noweb-specific 
22301 \begin_inset Quotes eld
22302 \end_inset
22303
22304 build-script
22305 \begin_inset Quotes erd
22306 \end_inset
22307
22308  above uses the notangle command to look for this scrap (called 
22309 \begin_inset Quotes eld
22310 \end_inset
22311
22312 build-script
22313 \begin_inset Quotes erd
22314 \end_inset
22315
22316 ) and runs its contents through 
22317 \begin_inset Quotes eld
22318 \end_inset
22319
22320 sh
22321 \begin_inset Quotes erd
22322 \end_inset
22323
22324 .
22325 \end_layout
22326
22327 \begin_layout Standard
22328 Typically, such a scrap would look something like this:
22329 \end_layout
22330
22331 \begin_layout LyX-Code
22332 <<build-script>>=
22333 \begin_inset Newline newline
22334 \end_inset
22335
22336 #!/bin/sh
22337 \begin_inset Newline newline
22338 \end_inset
22339
22340
22341 \begin_inset Newline newline
22342 \end_inset
22343
22344 if [ -z "${NOWEB_SOURCE}" ]
22345 \begin_inset Newline newline
22346 \end_inset
22347
22348 then
22349 \begin_inset Newline newline
22350 \end_inset
22351
22352   NOWEB_SOURCE=myfile.nw
22353 \begin_inset Newline newline
22354 \end_inset
22355
22356 fi
22357 \begin_inset Newline newline
22358 \end_inset
22359
22360 [...
22361  code to extract files ...]
22362 \begin_inset Newline newline
22363 \end_inset
22364
22365 [...
22366  code to compile files ...]
22367 \begin_inset Newline newline
22368 \end_inset
22369
22370 @
22371 \end_layout
22372
22373 \begin_layout Standard
22374 Look in 
22375 \emph on
22376 LIBDIR/examples/listerrors.lyx
22377 \emph default
22378  or in 
22379 \emph on
22380 LIBDIR/examples/Literate.lyx
22381 \emph default
22382  which implement two versions of the 
22383 \begin_inset Quotes eld
22384 \end_inset
22385
22386 listerrors
22387 \begin_inset Quotes erd
22388 \end_inset
22389
22390  program for some illustrations of how all of these pieces go together or
22391  in 
22392 \emph on
22393 LIBDIR/examples/noweb2lyx.lyx.
22394
22395 \emph default
22396  Interestingly, these three files show off the language-indepence of the
22397  LyX literate programming support since they are written in Python, C and
22398  Perl respectively.
22399 \end_layout
22400
22401 \begin_layout Subsubsection
22402 Configuring LyX
22403 \end_layout
22404
22405 \begin_layout Standard
22406 All the Literate Programming support is configured by the 
22407 \family sans
22408 Tools\SpecialChar \menuseparator
22409 Preferences
22410 \family default
22411  panel in the 
22412 \begin_inset Quotes eld
22413 \end_inset
22414
22415 Conversion
22416 \begin_inset Quotes erd
22417 \end_inset
22418
22419  tab.
22420  The important parts are:
22421 \end_layout
22422
22423 \begin_layout Description
22424 the
22425 \begin_inset space ~
22426 \end_inset
22427
22428
22429 \begin_inset Quotes eld
22430 \end_inset
22431
22432 literate
22433 \begin_inset Quotes erd
22434 \end_inset
22435
22436
22437 \begin_inset space ~
22438 \end_inset
22439
22440 format Set up via the Formats tab, this is where the Noweb-specific pieces
22441  are set up.
22442  The 
22443 \family sans
22444 GUI Name
22445 \family default
22446  is set to 
22447 \family typewriter
22448 NoWeb
22449 \family default
22450 , the file extension is set to 
22451 \family typewriter
22452 .nw
22453 \family default
22454 .
22455  This tells LyX to create a file with a 
22456 \family typewriter
22457 .nw
22458 \family default
22459  extension in the first step of the conversion process.
22460 \end_layout
22461
22462 \begin_layout Description
22463 the
22464 \begin_inset space ~
22465 \end_inset
22466
22467
22468 \family sans
22469 Program
22470 \family default
22471
22472 \begin_inset space ~
22473 \end_inset
22474
22475 format This is an empty format whose sole purpose is to be the endpoint
22476  of a conversion (which then allows us to set up a converter for it).
22477 \end_layout
22478
22479 \begin_layout Description
22480
22481 \family sans
22482 NoWeb
22483 \family default
22484 ->
22485 \family sans
22486 LaTeX
22487 \family default
22488  This converter performs the 
22489 \begin_inset Quotes eld
22490 \end_inset
22491
22492 weaving
22493 \begin_inset Quotes erd
22494 \end_inset
22495
22496  of the literate document.
22497  For Noweb, it is set to 
22498 \begin_inset Quotes eld
22499 \end_inset
22500
22501
22502 \family typewriter
22503 noweave -delay -index $$i > $$o
22504 \family default
22505
22506 \begin_inset Quotes erd
22507 \end_inset
22508
22509
22510 \end_layout
22511
22512 \begin_layout Description
22513
22514 \family sans
22515 NoWeb
22516 \family default
22517 ->
22518 \family sans
22519 Program
22520 \family default
22521  This performs the 
22522 \begin_inset Quotes eld
22523 \end_inset
22524
22525 tangling step
22526 \begin_inset Quotes erd
22527 \end_inset
22528
22529 .
22530  As stated above, the Converter is set to 
22531 \begin_inset Quotes eld
22532 \end_inset
22533
22534
22535 \family typewriter
22536 build-script $$i
22537 \family default
22538
22539 \begin_inset Quotes erd
22540 \end_inset
22541
22542 , with Flags set to 
22543 \begin_inset Quotes eld
22544 \end_inset
22545
22546
22547 \family typewriter
22548 originaldir,parselog=listerrors
22549 \family default
22550
22551 \begin_inset Quotes erd
22552 \end_inset
22553
22554 .
22555 \end_layout
22556
22557 \begin_layout Subsubsection
22558 Debug extensions
22559 \end_layout
22560
22561 \begin_layout Standard
22562 There is also a new function implemented in the LyX server, the 
22563 \begin_inset Quotes eld
22564 \end_inset
22565
22566 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22567  
22568 \end_layout
22569
22570 \begin_layout Standard
22571 When debugging code with ddd/gdb, it is possible to invoke a text editor
22572  at the current execution position with a single key stroke.
22573  The default ddd configuration for that is shift-ctrl-V.
22574  It happens that you can define the editor command line invocation in ddd
22575  by accessing the 
22576 \family sans
22577 Edit\SpecialChar \menuseparator
22578 Preferences\SpecialChar \menuseparator
22579 Helpers
22580 \family default
22581  dialog and changing the "Edit Sources" entry.
22582 \end_layout
22583
22584 \begin_layout Standard
22585 I take advantage of the new created LyX server function and this ddd feature,
22586  and set 
22587 \begin_inset Quotes eld
22588 \end_inset
22589
22590 Edit Sources
22591 \begin_inset Quotes erd
22592 \end_inset
22593
22594  to:
22595 \end_layout
22596
22597 \begin_layout LyX-Code
22598 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22599 \end_layout
22600
22601 \begin_layout Standard
22602 With this, whenever you are using ddd and find a point in the program that
22603  you want to edit, you just press shift-ctrl-V (in the ddd window), and
22604  ddd you forward this information to LyX through the LyX server and then
22605  the LyX window will show the same file with the cursor at the same position
22606  ddd was pointing to.
22607  No more guessing or long scrolling to locate a point in the program back
22608  from debugging !
22609 \end_layout
22610
22611 \begin_layout Standard
22612 Note however that you must enable the LyX server to get this feature working
22613  (it is disabled by default).
22614  You can enable it in 
22615 \family sans
22616 Preferences
22617 \family default
22618  (tabs 
22619 \family sans
22620 Inputs
22621 \family default
22622
22623 \family sans
22624 Paths
22625 \family default
22626 ) by entering in the 
22627 \family sans
22628 LyXserver pipe
22629 \family default
22630  a path like 
22631 \begin_inset Quotes eld
22632 \end_inset
22633
22634
22635 \family typewriter
22636 /home/<your-home-directory>/.lyx/lyxpipe
22637 \family default
22638
22639 \begin_inset Quotes erd
22640 \end_inset
22641
22642
22643 \end_layout
22644
22645 \begin_layout Standard
22646 Read the LyX server documentation in the 
22647 \emph on
22648 Customization Manual
22649 \emph default
22650  for further information.
22651 \end_layout
22652
22653 \begin_layout Subsubsection
22654 Toolbar extensions
22655 \end_layout
22656
22657 \begin_layout Standard
22658 There are six new buttons that can be added to your LyX toolbar.
22659  Five of these buttons are short cuts to layout styles: 
22660 \family sans
22661 Standard
22662 \family default
22663
22664 \family sans
22665 Section
22666 \family default
22667
22668 \family sans
22669 LaTeX
22670 \family default
22671
22672 \family sans
22673 LyX-Code
22674 \family default
22675 , and 
22676 \family sans
22677 Scrap
22678 \family default
22679 .
22680  The last one is a short cut to the 
22681 \begin_inset Quotes eld
22682 \end_inset
22683
22684 Build Program
22685 \begin_inset Quotes erd
22686 \end_inset
22687
22688  File menu entry.
22689  
22690 \end_layout
22691
22692 \begin_layout Standard
22693 LyX has a range of buttons that are available for tool bar customization.
22694  In my toolbar I like to combine the six short cuts above with two more:
22695  One for 
22696 \family sans
22697 View
22698 \family default
22699 \SpecialChar \menuseparator
22700
22701 \family sans
22702 Update
22703 \family default
22704 \SpecialChar \menuseparator
22705
22706 \family sans
22707 DVI
22708 \family default
22709  and the other for 
22710 \family sans
22711 View\SpecialChar \menuseparator
22712 DVI
22713 \family default
22714  File menu entries.
22715  Here is how it looks like:
22716 \end_layout
22717
22718 \begin_layout LyX-Code
22719 Toolbar
22720 \end_layout
22721
22722 \begin_layout LyX-Code
22723   Layouts
22724 \end_layout
22725
22726 \begin_layout LyX-Code
22727   Icon "layout Standard"
22728 \end_layout
22729
22730 \begin_layout LyX-Code
22731   Icon "layout Section"
22732 \end_layout
22733
22734 \begin_layout LyX-Code
22735   Icon "layout LaTeX"
22736 \end_layout
22737
22738 \begin_layout LyX-Code
22739   Icon "layout LyX-Code"
22740 \end_layout
22741
22742 \begin_layout LyX-Code
22743   Icon "layout Scrap"
22744 \end_layout
22745
22746 \begin_layout LyX-Code
22747   Separator
22748 \end_layout
22749
22750 \begin_layout LyX-Code
22751   Icon "buffer-view"
22752 \end_layout
22753
22754 \begin_layout LyX-Code
22755   Icon "buffer-typeset"
22756 \end_layout
22757
22758 \begin_layout LyX-Code
22759   Icon "build-program"
22760 \end_layout
22761
22762 \begin_layout LyX-Code
22763   Separator
22764 \end_layout
22765
22766 \begin_layout LyX-Code
22767 .
22768 \end_layout
22769
22770 \begin_layout LyX-Code
22771 .
22772 \end_layout
22773
22774 \begin_layout LyX-Code
22775 .
22776 \end_layout
22777
22778 \begin_layout LyX-Code
22779 End
22780 \end_layout
22781
22782 \begin_layout Subsubsection
22783 Colors customization
22784 \end_layout
22785
22786 \begin_layout Standard
22787 There are a number of colors in LyX that can be customized in 
22788 \family sans
22789 Preferences
22790 \family default
22791 .
22792  One of the things that bothers people is the LaTeX font color.
22793  The default color is red, since the scraps uses LaTeX font, and there is
22794  a lot of scraps in literate documents, you may get tired of seeing everything
22795  in red.
22796  You can change it by going to the tabs 
22797 \family sans
22798 Look&Feel
22799 \family default
22800
22801 \family sans
22802 Colors.
22803 \end_layout
22804
22805 \begin_layout Standard
22806 The next thing is the visible presence of the newline character in the screen.
22807  You can choose the color of this particular character and make it blend
22808  in the background.
22809  I recommend you choosing a color that is close to the background but not
22810  equal, that way you still can see it is there, but it is not bothering
22811  you anymore.
22812  
22813 \end_layout
22814
22815 \begin_layout Chapter
22816 Secrets of the LaTeX Masters
22817 \begin_inset CommandInset label
22818 LatexCommand label
22819 name "cha:secrets"
22820
22821 \end_inset
22822
22823
22824 \end_layout
22825
22826 \begin_layout Standard
22827 Though LyX is a powerful tool, it cannot hope to support everything that
22828  can be done with pure TeX/LaTeX.
22829  However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22830  as long as you are not afraid to use that 
22831 \begin_inset Quotes eld
22832 \end_inset
22833
22834 TeX
22835 \begin_inset Quotes erd
22836 \end_inset
22837
22838  button on the toolbar or add things to the LaTeX preamble.
22839  This section lists some tips, tricks, and otherwise cool ideas to give
22840  your document that extra little flair.
22841  
22842 \emph on
22843 Do try this at home
22844 \emph default
22845 , just start with something a little smaller and less important than your
22846  dissertation!
22847 \end_layout
22848
22849 \begin_layout Standard
22850 Most ideas in this section require less common files in your LaTeX installation.
22851  If you have a system like TeXLive, most will already be available.
22852  A few, however, will need to be downloaded from one of the CTAN archives.
22853  Often, there are several ways to do something, or several LaTeX style files
22854  which do the same thing.
22855  We do not endorse one choice over another, we simply claim that we have
22856  done a particular task with a particular file.
22857  Put on your wizard hat, keep an eye out for dragons, and let us begin.
22858 \end_layout
22859
22860 \begin_layout Section
22861 Multiple Columns
22862 \end_layout
22863
22864 \begin_layout Standard
22865 by 
22866 \noun on
22867 Lars Gullik Bjønnes
22868 \end_layout
22869
22870 \begin_layout Subsection
22871 Purpose
22872 \end_layout
22873
22874 \begin_layout Standard
22875 The aim for this chapter
22876 \begin_inset Foot
22877 status collapsed
22878
22879 \begin_layout Plain Layout
22880 Editor's note: Lars' original chapter was a masterful description of how
22881  to use the 
22882 \family typewriter
22883 multicol
22884 \family default
22885  package.
22886  However, it was too long to flow smoothly in this document.
22887  I have therefore chosen to excerpt the most important sections here (sorry,
22888  Lars); you can read the original chapter (and more of the story!) in the
22889  example file 
22890 \family typewriter
22891 examples/multicol.lyx
22892 \family default
22893 .
22894  — mer
22895 \end_layout
22896
22897 \end_inset
22898
22899  is to show how the LaTeX package 
22900 \family typewriter
22901 multicol
22902 \family default
22903  can be used in a LyX document.
22904  As LyX doesn't support the 
22905 \family typewriter
22906 multicol
22907 \family default
22908  package natively yet, we have to use some small hacks.
22909  By reading this section it should be obvious how to do this.
22910 \end_layout
22911
22912 \begin_layout Subsection
22913 Limitations 
22914 \end_layout
22915
22916 \begin_layout Standard
22917 The 
22918 \family typewriter
22919 multicol
22920 \family default
22921  package allows switching between one and multicolumn format on the same
22922  page.
22923  Footnotes are handled correctly (for the most part), but will be placed
22924  at the bottom of the page and not under each column.
22925  LaTeX's float mechanism, however, is partly disabled in the current implementat
22926 ion.
22927  At the moment only page-wide floats can be used within the scope of the
22928  environment.
22929 \end_layout
22930
22931 \begin_layout Subsection
22932 Examples
22933 \end_layout
22934
22935 \begin_layout Subsubsection
22936 Two columns
22937 \end_layout
22938
22939 \begin_layout Standard
22940 If you want to have two columns in your text, you have use LaTeX mode to
22941  insert 
22942 \family typewriter
22943
22944 \backslash
22945 begin{multicols}{2}
22946 \family default
22947  at the point where you want the two column layout to start, and then 
22948 \family typewriter
22949
22950 \backslash
22951 end{multicols}
22952 \family default
22953  where you want it to end.
22954  Like this:
22955 \end_layout
22956
22957 \begin_layout Standard
22958 \begin_inset ERT
22959 status open
22960
22961 \begin_layout Plain Layout
22962
22963
22964 \backslash
22965 begin{multicols}{2}
22966 \end_layout
22967
22968 \end_inset
22969
22970
22971 \end_layout
22972
22973 \begin_layout Standard
22974 \noindent
22975
22976 \series bold
22977 \size small
22978 The Adventure of the Empty House
22979 \series default
22980
22981 \begin_inset Newline newline
22982 \end_inset
22983
22984 by 
22985 \noun on
22986 Sir Arthur Conan Doyle
22987 \end_layout
22988
22989 \begin_layout Standard
22990
22991 \size small
22992 It was in the spring of the year 1894 that all London was interested, and
22993  the fashionable world dismayed, by the murder of the Honourable Ronald
22994  Adair under most unusual and inexplicable circumstances.
22995  The public has already learned those particulars of the crime which came
22996  out in the police investigation, but a good deal was suppressed upon that
22997  occasion, since the case for the prosecution was so overwhelmingly strong
22998  that it was not necessary to bring forward all the facts.
22999  Only now, at the end of nearly ten years, am I allowed to supply those
23000  missing links which make up the whole of that remarkable chain.
23001  The crime was of interest in itself, but that interest was as nothing to
23002  me compared to the inconceivable sequel, which afforded me the greatest
23003  shock and surprise of any event in my adventurous life.
23004  Even now, after this long interval, I find myself thrilling as I think
23005  of it, and feeling once more that sudden flood of joy, amazement, and increduli
23006 ty which utterly submerged my mind.
23007  Let me say to that public, which has shown some interest in those glimpses
23008  which I have occasionally given them of the thoughts and actions of a very
23009  remarkable man, that they are not to blame me if I have not shared my knowledge
23010  with them, for I should have considered it my first duty to do so, had
23011  I not been barred by a positive prohibition from his own lips, which was
23012  only withdrawn upon the third of last month.
23013 \end_layout
23014
23015 \begin_layout Standard
23016 \begin_inset ERT
23017 status open
23018
23019 \begin_layout Plain Layout
23020
23021
23022 \backslash
23023 end{multicols}
23024 \end_layout
23025
23026 \end_inset
23027
23028
23029 \end_layout
23030
23031 \begin_layout Subsubsection
23032 Multiple columns
23033 \end_layout
23034
23035 \begin_layout Standard
23036 The same pattern is used when you want more than two columns:
23037 \end_layout
23038
23039 \begin_layout Standard
23040 \begin_inset ERT
23041 status open
23042
23043 \begin_layout Plain Layout
23044
23045
23046 \backslash
23047 begin{multicols}{3}
23048 \end_layout
23049
23050 \end_inset
23051
23052
23053 \end_layout
23054
23055 \begin_layout Standard
23056
23057 \size footnotesize
23058 It can be imagined that my close intimacy with Sherlock Holmes had interested
23059  me deeply in crime, and that after his disappearance I never failed to
23060  read with care the various problems which came before the public.
23061  And I even attempted, more than once, for my own private satisfaction,
23062  to employ his methods in their solution, though with indifferent success.
23063  There was none, however, which appealed to me like this tragedy of Ronald
23064  Adair.
23065  As I read the evidence at the inquest, which led up to a verdict of willful
23066  murder against some person or persons unknown, I realized more clearly
23067  than I had ever done the loss which the community had sustained by the
23068  death of Sherlock Holmes.
23069  There were points about this strange business which would, I was sure,
23070  have specially appealed to him, and the efforts of the police would have
23071  been supplemented, or more probably anticipated, by the trained observation
23072  and the alert mind of the first criminal agent in Europe.
23073  All day, as I drove upon my round, I turned over the case in my mind and
23074  found no explanation which appeared to me to be adequate.
23075  At the risk of telling a twice-told tale, I will recapitulate the facts
23076  as they were known to the public at the conclusion of the inquest.
23077 \end_layout
23078
23079 \begin_layout Standard
23080 \begin_inset ERT
23081 status open
23082
23083 \begin_layout Plain Layout
23084
23085
23086 \backslash
23087 end{multicols}
23088 \end_layout
23089
23090 \end_inset
23091
23092
23093 \end_layout
23094
23095 \begin_layout Standard
23096 You can have more than 3 columns if you want to, but that might not be very
23097  pleasant for the eye.
23098 \end_layout
23099
23100 \begin_layout Subsubsection
23101 Columns inside columns
23102 \end_layout
23103
23104 \begin_layout Standard
23105 You can even have columns inside columns:
23106 \end_layout
23107
23108 \begin_layout Standard
23109 \begin_inset ERT
23110 status open
23111
23112 \begin_layout Plain Layout
23113
23114
23115 \backslash
23116 begin{multicols}{2}
23117 \end_layout
23118
23119 \end_inset
23120
23121
23122 \end_layout
23123
23124 \begin_layout Standard
23125
23126 \size footnotesize
23127 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
23128  at that time governor of one of the Australian colonies.
23129  Adair's mother had returned from Australia to undergo the operation for
23130  cataract, and she, her son Ronald, and her daughter Hilda were living together
23131  at 427 Park Lane.
23132 \end_layout
23133
23134 \begin_layout Standard
23135 \begin_inset ERT
23136 status open
23137
23138 \begin_layout Plain Layout
23139
23140
23141 \backslash
23142 begin{multicols}{2}
23143 \end_layout
23144
23145 \end_inset
23146
23147
23148 \end_layout
23149
23150 \begin_layout Standard
23151
23152 \size footnotesize
23153 The youth moved in the best society–had, so far as was known, no enemies
23154  and no particular vices.
23155  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
23156  had been broken off by mutual consent some months before, and there was
23157  no sign that it had left any very profound feeling behind it.
23158  For the rest {sic} the man's life moved in a narrow and conventional circle,
23159  for his habits were quiet and his nature unemotional.
23160  Yet it was upon this easy-going young aristocrat that death came, in most
23161  strange and unexpected form, between the hours of ten and eleven-twenty
23162  on the night of March 30, 1894.
23163 \end_layout
23164
23165 \begin_layout Standard
23166 \begin_inset ERT
23167 status open
23168
23169 \begin_layout Plain Layout
23170
23171
23172 \backslash
23173 end{multicols}
23174 \end_layout
23175
23176 \end_inset
23177
23178
23179 \end_layout
23180
23181 \begin_layout Standard
23182
23183 \size footnotesize
23184 Ronald Adair was fond of cards–playing continually, but never for such stakes
23185  as would hurt him.
23186  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
23187  It was shown that, after dinner on the day of his death, he had played
23188  a rubber of whist at the latter club.
23189  He had also played there in the afternoon.
23190
23191 \size default
23192  
23193 \size footnotesize
23194 The evidence of those who had played with him– Mr.
23195  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
23196  and that there was a fairly equal fall of the cards.
23197  Adair might have lost five pounds, but not more.
23198  His fortune was a considerable one, and such a loss could not in any way
23199  affect him.
23200  He had played nearly every day at one club or other, but he was a cautious
23201  player, and usually rose a winner.
23202  It came out in evidence that, in partnership with Colonel Moran, he had
23203  actually won as much as four hundred and twenty pounds in a sitting, some
23204  weeks before, from Godfrey Milner and Lord Balmoral.
23205  So much for his recent history as it came out at the inquest.
23206 \end_layout
23207
23208 \begin_layout Standard
23209 \begin_inset ERT
23210 status open
23211
23212 \begin_layout Plain Layout
23213
23214
23215 \backslash
23216 end{multicols}
23217 \end_layout
23218
23219 \end_inset
23220
23221
23222 \end_layout
23223
23224 \begin_layout Standard
23225 Please do read the file 
23226 \family typewriter
23227 examples/multicol.lyx
23228 \family default
23229  for more advanced examples including column and header spacing, vertical
23230  separator lines, and more.
23231 \end_layout
23232
23233 \begin_layout Section
23234 Numbering in the 
23235 \family sans
23236 Enumerate
23237 \family default
23238  Paragraph Environment
23239 \begin_inset Argument
23240 status collapsed
23241
23242 \begin_layout Plain Layout
23243 Numbering in Enumerate
23244 \end_layout
23245
23246 \end_inset
23247
23248
23249 \end_layout
23250
23251 \begin_layout Standard
23252 by 
23253 \noun on
23254 John Weiss
23255 \end_layout
23256
23257 \begin_layout Standard
23258 \begin_inset VSpace bigskip
23259 \end_inset
23260
23261
23262 \end_layout
23263
23264 \begin_layout Standard
23265 \noindent
23266 The default numbering for the 
23267 \family sans
23268 Enumerate
23269 \family default
23270  paragraph environment begins with Arabic numbers and ends with uppercase
23271  letters.
23272  Suppose, however, you wanted a different type of numbering scheme.
23273  Here's a quickie example of how to change the numbering scheme:
23274 \end_layout
23275
23276 \begin_layout LyX-Code
23277
23278 \backslash
23279 renewcommand{
23280 \backslash
23281 labelenumi}{
23282 \backslash
23283 Roman{enumi}.}
23284 \end_layout
23285
23286 \begin_layout LyX-Code
23287
23288 \backslash
23289 renewcommand{
23290 \backslash
23291 labelenumii}{
23292 \backslash
23293 Alph{enumii}.}
23294 \end_layout
23295
23296 \begin_layout LyX-Code
23297
23298 \backslash
23299 renewcommand{
23300 \backslash
23301 labelenumiii}{
23302 \backslash
23303 arabic{enumiii}.}
23304 \end_layout
23305
23306 \begin_layout LyX-Code
23307
23308 \backslash
23309 renewcommand{
23310 \backslash
23311 labelenumiv}{
23312 \backslash
23313 alph{enumiv}.)}
23314 \end_layout
23315
23316 \begin_layout Standard
23317 \SpecialChar \ldots{}
23318  which changes the numbering scheme to uppercase Roman numerals, uppercase
23319  letters, Arabic numbers, and lowercase letter.
23320 \end_layout
23321
23322 \begin_layout Standard
23323 Additionally, the previous example also adds a little bit extra to the numbering
23324  scheme.
23325  For example, the first level label actually looks like: 
23326 \begin_inset Quotes eld
23327 \end_inset
23328
23329 I.
23330 \begin_inset Quotes erd
23331 \end_inset
23332
23333 .
23334  For ease of reading, we'll describe what the numbering schemes look like
23335  using a notation something like this: <
23336 \begin_inset Quotes eld
23337 \end_inset
23338
23339 I.
23340 \begin_inset Quotes erd
23341 \end_inset
23342
23343 ,
23344 \begin_inset space ~
23345 \end_inset
23346
23347
23348 \begin_inset Quotes erd
23349 \end_inset
23350
23351 A.
23352 \begin_inset Quotes erd
23353 \end_inset
23354
23355 ,
23356 \begin_inset space ~
23357 \end_inset
23358
23359
23360 \begin_inset Quotes erd
23361 \end_inset
23362
23363 1.
23364 \begin_inset Quotes erd
23365 \end_inset
23366
23367 ,
23368 \begin_inset space ~
23369 \end_inset
23370
23371
23372 \begin_inset Quotes eld
23373 \end_inset
23374
23375 a.)
23376 \begin_inset Quotes erd
23377 \end_inset
23378
23379 >.
23380  
23381 \end_layout
23382
23383 \begin_layout Standard
23384 As you can see in the example, there is a label command for each nesting
23385  level, 
23386 \family typewriter
23387
23388 \backslash
23389 labelenumi
23390 \family default
23391  \SpecialChar \ldots{}
23392  
23393 \family typewriter
23394
23395 \backslash
23396 labelenumiv
23397 \family default
23398 , as well as a counter, 
23399 \family typewriter
23400 enumi
23401 \family default
23402  \SpecialChar \ldots{}
23403  
23404 \family typewriter
23405 enumiv
23406 \family default
23407 .
23408  There are also five 
23409 \begin_inset Quotes eld
23410 \end_inset
23411
23412 number printing
23413 \begin_inset Quotes erd
23414 \end_inset
23415
23416  commands, 
23417 \family typewriter
23418
23419 \backslash
23420 arabic{}
23421 \family default
23422
23423 \family typewriter
23424
23425 \backslash
23426 roman{}
23427 \family default
23428
23429 \family typewriter
23430
23431 \backslash
23432 Roman{}
23433 \family default
23434
23435 \family typewriter
23436
23437 \backslash
23438 alph{}
23439 \family default
23440 , and 
23441 \family typewriter
23442
23443 \backslash
23444 Alph{}
23445 \family default
23446 , each of which take one counter as an argument.
23447  You can add characters before or after these, but there's no need to add
23448  spaces.
23449 \end_layout
23450
23451 \begin_layout Standard
23452 You can get really fancy with these.
23453  For example:
23454 \end_layout
23455
23456 \begin_layout LyX-Code
23457
23458 \backslash
23459 renewcommand{
23460 \backslash
23461 labelenumi}{
23462 \backslash
23463 #
23464 \backslash
23465 Alph{enumi}
23466 \backslash
23467 #}
23468 \end_layout
23469
23470 \begin_layout LyX-Code
23471
23472 \backslash
23473 renewcommand{
23474 \backslash
23475 labelenumii}{
23476 \backslash
23477 Alph{enumi}.
23478 \backslash
23479 arabic{enumii}}
23480 \end_layout
23481
23482 \begin_layout LyX-Code
23483
23484 \backslash
23485 renewcommand{
23486 \backslash
23487 labelenumiii}{
23488 \backslash
23489 alph{enumiii}+}
23490 \end_layout
23491
23492 \begin_layout LyX-Code
23493
23494 \backslash
23495 renewcommand{
23496 \backslash
23497 labelenumiv}{(
23498 \backslash
23499 roman{enumiv})}
23500 \end_layout
23501
23502 \begin_layout Standard
23503 produces the somewhat out of hand numbering scheme: <
23504 \begin_inset Quotes eld
23505 \end_inset
23506
23507 #A#
23508 \begin_inset Quotes erd
23509 \end_inset
23510
23511 ,
23512 \begin_inset space ~
23513 \end_inset
23514
23515
23516 \begin_inset Quotes erd
23517 \end_inset
23518
23519 A.1
23520 \begin_inset Quotes erd
23521 \end_inset
23522
23523 ,
23524 \begin_inset space ~
23525 \end_inset
23526
23527
23528 \begin_inset Quotes erd
23529 \end_inset
23530
23531 a+
23532 \begin_inset Quotes erd
23533 \end_inset
23534
23535 ,
23536 \begin_inset space ~
23537 \end_inset
23538
23539
23540 \begin_inset Quotes eld
23541 \end_inset
23542
23543 (i)
23544 \begin_inset Quotes erd
23545 \end_inset
23546
23547 >.
23548  
23549 \end_layout
23550
23551 \begin_layout Section
23552 Dropped Capitals
23553 \end_layout
23554
23555 \begin_layout Standard
23556 by 
23557 \noun on
23558 Mike Ressler
23559 \end_layout
23560
23561 \begin_layout Standard
23562 \begin_inset VSpace bigskip
23563 \end_inset
23564
23565
23566 \end_layout
23567
23568 \begin_layout Standard
23569 \noindent
23570 \begin_inset ERT
23571 status collapsed
23572
23573 \begin_layout Plain Layout
23574
23575
23576 \backslash
23577 newfont{
23578 \backslash
23579 tmpfont}{cmr17 scaled 2500}{
23580 \backslash
23581 tmpfont T}
23582 \backslash
23583 vspace*{-8.4ex}
23584 \end_layout
23585
23586 \end_inset
23587
23588
23589 \end_layout
23590
23591 \begin_layout Standard
23592 \noindent
23593 \begin_inset ERT
23594 status open
23595
23596 \begin_layout Plain Layout
23597
23598
23599 \backslash
23600 hangindent=3.3em 
23601 \backslash
23602 hangafter=-3
23603 \end_layout
23604
23605 \end_inset
23606
23607  hose of you who like the style of old books probably also like 
23608 \begin_inset Quotes eld
23609 \end_inset
23610
23611 dropped capitals
23612 \begin_inset Quotes erd
23613 \end_inset
23614
23615 —those large capital letters which begin each new chapter or section.
23616  Implementing them with plain LyX/LaTeX is straightforward (assuming you
23617  know some plain TeX!) but does require a lot of work and many iterations,
23618  as you can see by all the ugly TeX-mode stuff at the beginning of this
23619  paragraph.
23620 \end_layout
23621
23622 \begin_layout Standard
23623 \begin_inset ERT
23624 status open
23625
23626 \begin_layout Plain Layout
23627
23628
23629 \backslash
23630 verb+
23631 \backslash
23632 bigdrop{-1em}{3}{ptmri}{T}+
23633 \end_layout
23634
23635 \end_inset
23636
23637 here is a much easier way of doing this, of course.
23638  The 
23639 \family typewriter
23640 dropcaps
23641 \family default
23642  (or the newer 
23643 \family typewriter
23644 dropping
23645 \family default
23646 ) package from CTAN allows a simple way to add such letters to your documents.
23647  Since this package is not a standard part of TeXLive, I can't demonstrate
23648  it within this document, but if you copy this paragraph to a new document,
23649  delete the 
23650 \begin_inset Quotes eld
23651 \end_inset
23652
23653
23654 \family typewriter
23655
23656 \backslash
23657 verb
23658 \family default
23659
23660 \begin_inset Quotes erd
23661 \end_inset
23662
23663  and the pluses from the TeX code at the beginning of the paragraph, and
23664  add 
23665 \family typewriter
23666
23667 \backslash
23668 usepackage{dropcaps}
23669 \family default
23670  to your LaTeX preamble, you will get a nice Times Roman Italic 
23671 \begin_inset Quotes eld
23672 \end_inset
23673
23674 T
23675 \begin_inset Quotes erd
23676 \end_inset
23677
23678 , whose height is three lines of text and which protrudes 1 em into the
23679  margin.
23680  (Make certain you have copied 
23681 \begin_inset Quotes eld
23682 \end_inset
23683
23684
23685 \family typewriter
23686 dropcaps.sty
23687 \family default
23688
23689 \begin_inset Quotes erd
23690 \end_inset
23691
23692  into a directory where TeX can see it.) The first argument is the amount
23693  of indentation; in this case the negative sign moves it into the margin.
23694  The second argument is the height of the letter in number of lines of text.
23695  The third argument is the font name: virtually anything which has a tfm
23696  file should work (wade through the 
23697 \family typewriter
23698 .../texmf/fonts/tfm
23699 \family default
23700  directory for possibilities).
23701  My personal favorite is 
23702 \begin_inset Quotes eld
23703 \end_inset
23704
23705
23706 \family typewriter
23707 yinit
23708 \family default
23709
23710 \begin_inset Quotes erd
23711 \end_inset
23712
23713 , a fancy German font specifically designed for dropped capitals.
23714  The fourth argument is the letter (or letters) to be dropped.
23715  The 
23716 \family typewriter
23717 dropping
23718 \family default
23719  package also offers the 
23720 \family typewriter
23721
23722 \backslash
23723 bigdrop
23724 \family default
23725  command, as well as a slightly simplified 
23726 \family typewriter
23727
23728 \backslash
23729 dropping
23730 \family default
23731  command.
23732 \end_layout
23733
23734 \begin_layout Section
23735 Non-standard Paragraph Shapes
23736 \end_layout
23737
23738 \begin_layout Standard
23739 by 
23740 \noun on
23741 Mike Ressler
23742 \end_layout
23743
23744 \begin_layout Standard
23745 \begin_inset VSpace bigskip
23746 \end_inset
23747
23748
23749 \end_layout
23750
23751 \begin_layout Standard
23752 \begin_inset ERT
23753 status collapsed
23754
23755 \begin_layout Plain Layout
23756
23757
23758 \backslash
23759 begin{sloppypar}
23760 \end_layout
23761
23762 \end_inset
23763
23764
23765 \end_layout
23766
23767 \begin_layout Standard
23768 \begin_inset ERT
23769 status collapsed
23770
23771 \begin_layout Plain Layout
23772
23773
23774 \backslash
23775 newdimen
23776 \backslash
23777 varunit 
23778 \end_layout
23779
23780 \begin_layout Plain Layout
23781
23782
23783 \backslash
23784 setlength{
23785 \backslash
23786 varunit}{4.5in}
23787 \end_layout
23788
23789 \end_inset
23790
23791
23792 \end_layout
23793
23794 \begin_layout Standard
23795 \noindent
23796 \begin_inset ERT
23797 status collapsed
23798
23799 \begin_layout Plain Layout
23800
23801
23802 \backslash
23803 parshape 19 0.45
23804 \backslash
23805 varunit 0.332
23806 \backslash
23807 varunit
23808 \end_layout
23809
23810 \begin_layout Plain Layout
23811
23812 0.40
23813 \backslash
23814 varunit 0.300
23815 \backslash
23816 varunit
23817 \end_layout
23818
23819 \begin_layout Plain Layout
23820
23821 0.35
23822 \backslash
23823 varunit 0.293
23824 \backslash
23825 varunit
23826 \end_layout
23827
23828 \begin_layout Plain Layout
23829
23830 0.30
23831 \backslash
23832 varunit 0.300
23833 \backslash
23834 varunit
23835 \end_layout
23836
23837 \begin_layout Plain Layout
23838
23839 0.25
23840 \backslash
23841 varunit 0.317
23842 \backslash
23843 varunit
23844 \end_layout
23845
23846 \begin_layout Plain Layout
23847
23848 0.20
23849 \backslash
23850 varunit 0.342
23851 \backslash
23852 varunit
23853 \end_layout
23854
23855 \begin_layout Plain Layout
23856
23857 0.15
23858 \backslash
23859 varunit 0.373
23860 \backslash
23861 varunit
23862 \end_layout
23863
23864 \begin_layout Plain Layout
23865
23866 0.10
23867 \backslash
23868 varunit 0.410
23869 \backslash
23870 varunit
23871 \end_layout
23872
23873 \begin_layout Plain Layout
23874
23875 0.05
23876 \backslash
23877 varunit 0.453
23878 \backslash
23879 varunit
23880 \end_layout
23881
23882 \begin_layout Plain Layout
23883
23884 0.00
23885 \backslash
23886 varunit 0.500
23887 \backslash
23888 varunit
23889 \end_layout
23890
23891 \begin_layout Plain Layout
23892
23893 0.05
23894 \backslash
23895 varunit 0.453
23896 \backslash
23897 varunit
23898 \end_layout
23899
23900 \begin_layout Plain Layout
23901
23902 0.10
23903 \backslash
23904 varunit 0.410
23905 \backslash
23906 varunit
23907 \end_layout
23908
23909 \begin_layout Plain Layout
23910
23911 0.15
23912 \backslash
23913 varunit 0.373
23914 \backslash
23915 varunit
23916 \end_layout
23917
23918 \begin_layout Plain Layout
23919
23920 0.20
23921 \backslash
23922 varunit 0.342
23923 \backslash
23924 varunit
23925 \end_layout
23926
23927 \begin_layout Plain Layout
23928
23929 0.25
23930 \backslash
23931 varunit 0.317
23932 \backslash
23933 varunit
23934 \end_layout
23935
23936 \begin_layout Plain Layout
23937
23938 0.30
23939 \backslash
23940 varunit 0.300
23941 \backslash
23942 varunit
23943 \end_layout
23944
23945 \begin_layout Plain Layout
23946
23947 0.35
23948 \backslash
23949 varunit 0.293
23950 \backslash
23951 varunit
23952 \end_layout
23953
23954 \begin_layout Plain Layout
23955
23956 0.40
23957 \backslash
23958 varunit 0.300
23959 \backslash
23960 varunit
23961 \end_layout
23962
23963 \begin_layout Plain Layout
23964
23965 0.45
23966 \backslash
23967 varunit 0.332
23968 \backslash
23969 varunit
23970 \end_layout
23971
23972 \begin_layout Plain Layout
23973
23974 \end_layout
23975
23976 \end_inset
23977
23978 There are times when the tyranny of rectangular paragraphs must be overthrown.
23979  In such situations, a call to the delightful plain TeX command 
23980 \family typewriter
23981
23982 \backslash
23983 parshape
23984 \family default
23985  is called for.
23986  As you can see, completely arbitrary shapes can be laid out with a suitable
23987  set of linelength definitions.
23988  While this parshape may look a bit silly and useless, one could conceive
23989  of situations such as finely tuned dropped capitals, word wrapping around
23990  non-rectangular graphics, etc.
23991  which will benefit from such handcrafting.
23992 \end_layout
23993
23994 \begin_layout Standard
23995 \begin_inset VSpace bigskip
23996 \end_inset
23997
23998
23999 \end_layout
24000
24001 \begin_layout Standard
24002 The syntax is 
24003 \family typewriter
24004
24005 \backslash
24006 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
24007  #nindent #nlength
24008 \family default
24009 , where 
24010 \family typewriter
24011 numlines
24012 \family default
24013  is the number of lines of text which define the paragraph.
24014  If there turn out to be fewer lines, the shape is truncated; if there are
24015  more, the excess lines have the same dimensions as the last line of the
24016  definition.
24017  The 
24018 \family typewriter
24019 #nindent
24020 \family default
24021  and 
24022 \family typewriter
24023 #nlength
24024 \family default
24025  entries specify the indentation of the line from the left margin, and the
24026  length of the line as measured from that point.
24027  The shape applies only to the current paragraph; everything is reset to
24028  normal for the next paragraph.
24029 \end_layout
24030
24031 \begin_layout Standard
24032 \begin_inset ERT
24033 status collapsed
24034
24035 \begin_layout Plain Layout
24036
24037
24038 \backslash
24039 end{sloppypar}
24040 \end_layout
24041
24042 \end_inset
24043
24044
24045 \end_layout
24046
24047 \begin_layout Section
24048 Summary
24049 \end_layout
24050
24051 \begin_layout Standard
24052 As you can see, the examples in this section range from the useful to the
24053  whimsical.
24054  While I don't expect that anyone will ever need the paragraph shape demonstrate
24055 d in the last section, the important point is that you can do almost anything
24056  you want in LyX if you are willing to figure out how to do it in TeX and
24057  LaTeX.
24058  TeX is a fantastically powerful typesetting system and all that power is
24059  available to you since LyX uses it as its backend.
24060  Happy LyXing!
24061 \end_layout
24062
24063 \end_body
24064 \end_document