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