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