]> git.lyx.org Git - features.git/blob - lib/doc/Additional.lyx
- Customization.lyx: some more preamble code can go
[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 
5703 \begin_inset Flex MenuItem
5704 status collapsed
5705
5706 \begin_layout Plain Layout
5707 Document\SpecialChar \menuseparator
5708 Output\SpecialChar \menuseparator
5709 Synchronize with Output
5710 \end_layout
5711
5712 \end_inset
5713
5714 .
5715  In such a case LyX will automatically insert the necessary SyncTeX macro
5716  (for PDF) or load the srcltx package (for DVI) respectively.
5717  This option can be easily reached also on 
5718 \begin_inset Flex Code
5719 status collapsed
5720
5721 \begin_layout Plain Layout
5722 View/Update
5723 \end_layout
5724
5725 \end_inset
5726
5727  Toolbar.
5728 \end_layout
5729
5730 \begin_layout Standard
5731 If you need a different setting, you can select or input a custom macro
5732  from the drop down box just below 
5733 \begin_inset Flex MenuItem
5734 status collapsed
5735
5736 \begin_layout Plain Layout
5737 Document\SpecialChar \menuseparator
5738 Settings\SpecialChar \menuseparator
5739 Output\SpecialChar \menuseparator
5740 Synchronize with Output
5741 \end_layout
5742
5743 \end_inset
5744
5745 .
5746 \end_layout
5747
5748 \begin_layout Standard
5749 Please note that including the 
5750 \begin_inset Flex Code
5751 status collapsed
5752
5753 \begin_layout Plain Layout
5754 srcltx
5755 \end_layout
5756
5757 \end_inset
5758
5759  package or 
5760 \begin_inset Flex Code
5761 status collapsed
5762
5763 \begin_layout Plain Layout
5764 src-specials
5765 \end_layout
5766
5767 \end_inset
5768
5769  sometimes has an undesired impact on the typesetting.
5770  Thus, you should switch output synchronization off for the final typesetting
5771  if you use the 
5772 \begin_inset Flex Code
5773 status collapsed
5774
5775 \begin_layout Plain Layout
5776 srcltx
5777 \end_layout
5778
5779 \end_inset
5780
5781  package or 
5782 \begin_inset Flex Code
5783 status collapsed
5784
5785 \begin_layout Plain Layout
5786 src-specials
5787 \end_layout
5788
5789 \end_inset
5790
5791 .
5792 \end_layout
5793
5794 \begin_layout Standard
5795 In case you need some more special settings that are not covered by the
5796  automatic settings, read the next section about how to set up output synchroniz
5797 ation manually.
5798  If the automatic setup suits your needs, you can readily jump to section
5799 \begin_inset space ~
5800 \end_inset
5801
5802
5803 \begin_inset CommandInset ref
5804 LatexCommand ref
5805 reference "sub:configuring-viewers"
5806
5807 \end_inset
5808
5809 , where the necessary configuration steps in your viewer -- needed both
5810  with the automatic and the manual setup -- are described.
5811 \end_layout
5812
5813 \begin_layout Subsection
5814 Manual setup
5815 \end_layout
5816
5817 \begin_layout Standard
5818 LaTeX provides several different methods for reverse search.
5819  Some are built-in in the 
5820 \begin_inset Flex Code
5821 status collapsed
5822
5823 \begin_layout Plain Layout
5824 latex/pdflatex
5825 \end_layout
5826
5827 \end_inset
5828
5829  program, some are provided by external packages.
5830  Your choice depends on whether your LaTeX distribution already provides
5831  a given method (the built-in methods are rather new) and whether your viewer
5832  can cope with it.
5833  The available methods are described in the following.
5834 \end_layout
5835
5836 \begin_layout Subsubsection*
5837 Built-in DVI-search via src-specials (DVI only) 
5838 \end_layout
5839
5840 \begin_layout Standard
5841 This method provides the DVI file with the necessary information for reverse
5842  search.
5843  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5844  distribution should include it), and it works reliably.
5845  To enable it, change the 
5846 \begin_inset Flex MenuItem
5847 status collapsed
5848
5849 \begin_layout Plain Layout
5850 LaT
5851 \begin_inset ERT
5852 status collapsed
5853
5854 \begin_layout Plain Layout
5855
5856 {}
5857 \end_layout
5858
5859 \end_inset
5860
5861 eX (plain)->DVI
5862 \end_layout
5863
5864 \end_inset
5865
5866  or 
5867 \begin_inset Flex MenuItem
5868 status collapsed
5869
5870 \begin_layout Plain Layout
5871 LaT
5872 \begin_inset ERT
5873 status collapsed
5874
5875 \begin_layout Plain Layout
5876
5877 {}
5878 \end_layout
5879
5880 \end_inset
5881
5882 eX (plain)->DraftDVI
5883 \end_layout
5884
5885 \end_inset
5886
5887  converter in 
5888 \begin_inset Flex MenuItem
5889 status collapsed
5890
5891 \begin_layout Plain Layout
5892 Preferences\SpecialChar \menuseparator
5893 File Handling\SpecialChar \menuseparator
5894 Converters
5895 \end_layout
5896
5897 \end_inset
5898
5899  to 
5900 \begin_inset Flex Code
5901 status collapsed
5902
5903 \begin_layout Plain Layout
5904 latex -src-specials $$i
5905 \end_layout
5906
5907 \end_inset
5908
5909 .
5910  If this doesn't work, check if your TeX engine needs different options
5911  (the syntax might differ in some distributions).
5912 \end_layout
5913
5914 \begin_layout Subsubsection*
5915 External Packages (PDFSync and scrltx) 
5916 \end_layout
5917
5918 \begin_layout Standard
5919 The packages 
5920 \emph on
5921 pdfsync
5922 \emph default
5923  and 
5924 \emph on
5925 scrltx
5926 \emph default
5927  provide reverse search facility for PDF output (via pdflatex) and DVI output,
5928  respectively.
5929  In order to enable it, load the packages in the LyX preamble: 
5930 \end_layout
5931
5932 \begin_layout Itemize
5933 \begin_inset Flex Code
5934 status collapsed
5935
5936 \begin_layout Plain Layout
5937
5938 \backslash
5939 usepackage{pdfsync}
5940 \end_layout
5941
5942 \end_inset
5943
5944  for reverse PDF search,
5945 \end_layout
5946
5947 \begin_layout Itemize
5948 \begin_inset Flex Code
5949 status collapsed
5950
5951 \begin_layout Plain Layout
5952
5953 \backslash
5954 usepackage[active]{srcltx}
5955 \end_layout
5956
5957 \end_inset
5958
5959  for reverse DVI search.
5960 \end_layout
5961
5962 \begin_layout Standard
5963 If you want to be able to perform both DVI and PDF reverse searches, you
5964  can also insert in the preamble the following lines
5965 \end_layout
5966
5967 \begin_layout LyX-Code
5968
5969 \backslash
5970 usepackage{ifpdf}
5971 \begin_inset Newline newline
5972 \end_inset
5973
5974
5975 \backslash
5976 ifpdf
5977 \begin_inset Newline newline
5978 \end_inset
5979
5980   
5981 \backslash
5982 usepackage{pdfsync}
5983 \begin_inset Newline newline
5984 \end_inset
5985
5986
5987 \backslash
5988 else
5989 \begin_inset Newline newline
5990 \end_inset
5991
5992   
5993 \backslash
5994 usepackage[active]{srcltx}
5995 \begin_inset Newline newline
5996 \end_inset
5997
5998
5999 \backslash
6000 fi
6001 \end_layout
6002
6003 \begin_layout Standard
6004 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6005  right package will be used.
6006 \end_layout
6007
6008 \begin_layout Standard
6009 Note that PDFSync might affect the output layout of your document.
6010  It is therefore advised to disable PDFsync for final documents.
6011 \end_layout
6012
6013 \begin_layout Subsubsection*
6014 Built-in reverse search via SyncTeX (DVI and PDF) 
6015 \end_layout
6016
6017 \begin_layout Standard
6018 Recent versions of 
6019 \begin_inset Flex Code
6020 status collapsed
6021
6022 \begin_layout Plain Layout
6023 (pdf)latex
6024 \end_layout
6025
6026 \end_inset
6027
6028  have built-in support for both PDF and DVI reverse search.
6029  This so-called 
6030 \emph on
6031 SyncTeX
6032 \emph default
6033  facility is basically the result of the integration of the PDFSync package
6034  to the pdftex program and its merge with the 
6035 \emph on
6036 scr-specials
6037 \emph default
6038  approach.
6039  You need at least TeXLive 2008 or a recent MikTeX distribution in order
6040  to use it.
6041  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6042  already provide SyncTeX support.
6043 \end_layout
6044
6045 \begin_layout Standard
6046 To enable SyncTeX for DVI output, change the 
6047 \begin_inset Flex MenuItem
6048 status collapsed
6049
6050 \begin_layout Plain Layout
6051 LaT
6052 \begin_inset ERT
6053 status collapsed
6054
6055 \begin_layout Plain Layout
6056
6057 {}
6058 \end_layout
6059
6060 \end_inset
6061
6062 eX (plain) -> DVI
6063 \end_layout
6064
6065 \end_inset
6066
6067  or 
6068 \begin_inset Flex MenuItem
6069 status collapsed
6070
6071 \begin_layout Plain Layout
6072 LaT
6073 \begin_inset ERT
6074 status collapsed
6075
6076 \begin_layout Plain Layout
6077
6078 {}
6079 \end_layout
6080
6081 \end_inset
6082
6083 eX (plain) -> DraftDVI
6084 \end_layout
6085
6086 \end_inset
6087
6088  converter in 
6089 \begin_inset Flex MenuItem
6090 status collapsed
6091
6092 \begin_layout Plain Layout
6093 Preferences\SpecialChar \menuseparator
6094 File Handling\SpecialChar \menuseparator
6095 Converters
6096 \end_layout
6097
6098 \end_inset
6099
6100  to 
6101 \begin_inset Flex Code
6102 status collapsed
6103
6104 \begin_layout Plain Layout
6105 latex -synctex=1 $$i
6106 \end_layout
6107
6108 \end_inset
6109
6110 , and for PDF output, change the 
6111 \begin_inset Flex MenuItem
6112 status collapsed
6113
6114 \begin_layout Plain Layout
6115 LaT
6116 \begin_inset ERT
6117 status collapsed
6118
6119 \begin_layout Plain Layout
6120
6121 {}
6122 \end_layout
6123
6124 \end_inset
6125
6126 eX (pdflatex) -> PDF (pdflatex)
6127 \end_layout
6128
6129 \end_inset
6130
6131  or converter to 
6132 \begin_inset Flex Code
6133 status collapsed
6134
6135 \begin_layout Plain Layout
6136 pdflatex -synctex=1 $$i
6137 \end_layout
6138
6139 \end_inset
6140
6141 .
6142  Check the documentation of your viewer whether the viewer needs to be configure
6143 d for the use with SyncTeX.
6144 \begin_inset Foot
6145 status collapsed
6146
6147 \begin_layout Plain Layout
6148 The 
6149 \begin_inset Flex Code
6150 status collapsed
6151
6152 \begin_layout Plain Layout
6153 -synctex=1
6154 \end_layout
6155
6156 \end_inset
6157
6158  option enables gzip compression.
6159  If your viewer does not support it, you should instead use 
6160 \begin_inset Flex Code
6161 status collapsed
6162
6163 \begin_layout Plain Layout
6164 -synctex=-1
6165 \end_layout
6166
6167 \end_inset
6168
6169 .
6170 \end_layout
6171
6172 \end_inset
6173
6174
6175 \end_layout
6176
6177 \begin_layout Subsection
6178 Configuring and using specific viewers
6179 \begin_inset CommandInset label
6180 LatexCommand label
6181 name "sub:configuring-viewers"
6182
6183 \end_inset
6184
6185
6186 \end_layout
6187
6188 \begin_layout Subsubsection*
6189 Xdvi (all platforms)
6190 \end_layout
6191
6192 \begin_layout Standard
6193 If you use 
6194 \begin_inset Flex Code
6195 status collapsed
6196
6197 \begin_layout Plain Layout
6198 xdvi
6199 \end_layout
6200
6201 \end_inset
6202
6203 , you don't need to do anything else for performing a reverse DVI search,
6204  as LyX already provides the necessary hooks for automatically using the
6205  
6206 \begin_inset Flex Code
6207 status collapsed
6208
6209 \begin_layout Plain Layout
6210 lyxclient
6211 \end_layout
6212
6213 \end_inset
6214
6215  program.
6216  Just setup your document as described above (reverse search is triggered
6217  by Ctrl-click or Alt-click on Mac OSX, respectively).
6218 \end_layout
6219
6220 \begin_layout Standard
6221 However, if for whatever reason you want to use the named pipe instead of
6222  the socket for communicating with LyX, simply change the DVI viewer in
6223  
6224 \begin_inset Flex MenuItem
6225 status collapsed
6226
6227 \begin_layout Plain Layout
6228 Preferences\SpecialChar \menuseparator
6229 File Handling\SpecialChar \menuseparator
6230 File formats
6231 \end_layout
6232
6233 \end_inset
6234
6235  to
6236 \begin_inset Foot
6237 status collapsed
6238
6239 \begin_layout Plain Layout
6240 On Mac OSX you have to use 
6241 \begin_inset Flex Code
6242 status collapsed
6243
6244 \begin_layout Plain Layout
6245 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6246 \end_layout
6247
6248 \end_inset
6249
6250
6251 \end_layout
6252
6253 \end_inset
6254
6255  
6256 \begin_inset Flex Code
6257 status collapsed
6258
6259 \begin_layout Plain Layout
6260 xdvi -editor 'lyxeditor.sh %f %l'
6261 \end_layout
6262
6263 \end_inset
6264
6265 , where 
6266 \begin_inset Flex Code
6267 status collapsed
6268
6269 \begin_layout Plain Layout
6270 lyxeditor.sh
6271 \end_layout
6272
6273 \end_inset
6274
6275  is a suitable script.
6276  For example, a minimal shell script is the following one:
6277 \end_layout
6278
6279 \begin_layout LyX-Code
6280 #!/bin/sh
6281 \begin_inset Newline newline
6282 \end_inset
6283
6284 LYXPIPE="/path/to/lyxpipe"
6285 \begin_inset Newline newline
6286 \end_inset
6287
6288 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6289 \begin_inset Newline newline
6290 \end_inset
6291
6292 echo "$COMMAND" > "${LYXPIPE}".in || exit
6293 \begin_inset Newline newline
6294 \end_inset
6295
6296 read < "${LYXPIPE}".out || exit
6297 \end_layout
6298
6299 \begin_layout Standard
6300 where 
6301 \begin_inset Flex Code
6302 status collapsed
6303
6304 \begin_layout Plain Layout
6305 /path/to/lyxpipe
6306 \end_layout
6307
6308 \end_inset
6309
6310  is the Ly
6311 \begin_inset ERT
6312 status collapsed
6313
6314 \begin_layout Plain Layout
6315
6316 {}
6317 \end_layout
6318
6319 \end_inset
6320
6321 XServer pipe path specified in 
6322 \begin_inset Flex MenuItem
6323 status collapsed
6324
6325 \begin_layout Plain Layout
6326 Preferences\SpecialChar \menuseparator
6327 Paths
6328 \end_layout
6329
6330 \end_inset
6331
6332 .
6333 \begin_inset Foot
6334 status collapsed
6335
6336 \begin_layout Plain Layout
6337 In the 
6338 \begin_inset Flex Code
6339 status collapsed
6340
6341 \begin_layout Plain Layout
6342 development/tools
6343 \end_layout
6344
6345 \end_inset
6346
6347  folder of a source distribution you can find a 
6348 \begin_inset Flex Code
6349 status collapsed
6350
6351 \begin_layout Plain Layout
6352 lyxeditor
6353 \end_layout
6354
6355 \end_inset
6356
6357  script which is able to locate the 
6358 \emph on
6359 lyxpipe
6360 \emph default
6361  based on your preferences.
6362 \end_layout
6363
6364 \end_inset
6365
6366
6367 \end_layout
6368
6369 \begin_layout Subsubsection*
6370 MacDviX (Mac OSX)
6371 \end_layout
6372
6373 \begin_layout Standard
6374 At the end of 
6375 \begin_inset Flex Code
6376 status collapsed
6377
6378 \begin_layout Plain Layout
6379 /Applications/MacDviX_Folder/calleditor.script
6380 \end_layout
6381
6382 \end_inset
6383
6384 , add the following lines:
6385 \end_layout
6386
6387 \begin_layout LyX-Code
6388 /Applications/Ly
6389 \begin_inset ERT
6390 status collapsed
6391
6392 \begin_layout Plain Layout
6393
6394 {}
6395 \end_layout
6396
6397 \end_inset
6398
6399 X.app/Contents/MacOS/lyxeditor "$2" $1
6400 \begin_inset Newline newline
6401 \end_inset
6402
6403 exit 1
6404 \end_layout
6405
6406 \begin_layout Standard
6407 Modify the lines accordingly if you install LyX somewhere else than in the
6408  Applications folder.
6409 \end_layout
6410
6411 \begin_layout Standard
6412 Reverse search is triggered by Alt-click (OPTION-click).
6413 \end_layout
6414
6415 \begin_layout Subsubsection*
6416 Skim (Mac OSX)
6417 \end_layout
6418
6419 \begin_layout Standard
6420 Enter 
6421 \begin_inset Flex Code
6422 status collapsed
6423
6424 \begin_layout Plain Layout
6425 open -a Skim.app $$i
6426 \end_layout
6427
6428 \end_inset
6429
6430  to the viewer setting in 
6431 \begin_inset Flex MenuItem
6432 status collapsed
6433
6434 \begin_layout Plain Layout
6435 Preferences\SpecialChar \menuseparator
6436 File Handling\SpecialChar \menuseparator
6437 File formats\SpecialChar \menuseparator
6438 PDF (pdflatex)
6439 \end_layout
6440
6441 \end_inset
6442
6443 , and then in 
6444 \begin_inset Flex MenuItem
6445 status collapsed
6446
6447 \begin_layout Plain Layout
6448 Skim\SpecialChar \menuseparator
6449 Preferences\SpecialChar \menuseparator
6450 Sync
6451 \end_layout
6452
6453 \end_inset
6454
6455  select Ly
6456 \begin_inset ERT
6457 status collapsed
6458
6459 \begin_layout Plain Layout
6460
6461 {}
6462 \end_layout
6463
6464 \end_inset
6465
6466 X.
6467 \end_layout
6468
6469 \begin_layout Standard
6470 Reverse search is triggered by COMMAND-SHIFT-click
6471 \end_layout
6472
6473 \begin_layout Subsubsection*
6474 Okular (KDE)
6475 \end_layout
6476
6477 \begin_layout Standard
6478 Go to 
6479 \begin_inset Flex MenuItem
6480 status collapsed
6481
6482 \begin_layout Plain Layout
6483 Settings\SpecialChar \menuseparator
6484 Configure Okular\SpecialChar \ldots{}
6485 \SpecialChar \menuseparator
6486 Editor
6487 \end_layout
6488
6489 \end_inset
6490
6491 , select 
6492 \begin_inset Quotes eld
6493 \end_inset
6494
6495 Custom Text Editor
6496 \begin_inset Quotes erd
6497 \end_inset
6498
6499  and add the command 
6500 \begin_inset Flex Code
6501 status collapsed
6502
6503 \begin_layout Plain Layout
6504 lyxclient -g %f %l
6505 \end_layout
6506
6507 \end_inset
6508
6509 .
6510 \end_layout
6511
6512 \begin_layout Standard
6513 Reverse search is triggered by SHIFT-click.
6514 \end_layout
6515
6516 \begin_layout Subsubsection*
6517 YAP (Windows)
6518 \end_layout
6519
6520 \begin_layout Standard
6521 Launch yap, choose its 
6522 \begin_inset Flex MenuItem
6523 status collapsed
6524
6525 \begin_layout Plain Layout
6526 View\SpecialChar \menuseparator
6527 Options
6528 \end_layout
6529
6530 \end_inset
6531
6532  menu and select the 
6533 \begin_inset Quotes eld
6534 \end_inset
6535
6536 Inverse DVI Search
6537 \begin_inset Quotes erd
6538 \end_inset
6539
6540  tab.
6541  Click on the 
6542 \begin_inset Quotes eld
6543 \end_inset
6544
6545 New\SpecialChar \ldots{}
6546
6547 \begin_inset Quotes erd
6548 \end_inset
6549
6550  button and, in the window that opens, enter 
6551 \begin_inset Quotes eld
6552 \end_inset
6553
6554 LyX Editor
6555 \begin_inset Quotes erd
6556 \end_inset
6557
6558  (or any other name you like) in the 
6559 \begin_inset Quotes eld
6560 \end_inset
6561
6562 Name:
6563 \begin_inset Quotes erd
6564 \end_inset
6565
6566  field.
6567  Now click on the button labeled 
6568 \begin_inset Quotes eld
6569 \end_inset
6570
6571 \SpecialChar \ldots{}
6572
6573 \begin_inset Quotes erd
6574 \end_inset
6575
6576  to open a file dialog and navigate to the directory containing the batch
6577  file 
6578 \begin_inset Flex Code
6579 status collapsed
6580
6581 \begin_layout Plain Layout
6582 lyxeditor.bat
6583 \end_layout
6584
6585 \end_inset
6586
6587  (see below).
6588  Select 
6589 \begin_inset Flex Code
6590 status collapsed
6591
6592 \begin_layout Plain Layout
6593 lyxeditor.bat
6594 \end_layout
6595
6596 \end_inset
6597
6598  and then specify the program arguments as 
6599 \begin_inset Flex Code
6600 status collapsed
6601
6602 \begin_layout Plain Layout
6603 %f %l
6604 \end_layout
6605
6606 \end_inset
6607
6608 .
6609  The 
6610 \begin_inset Flex Code
6611 status collapsed
6612
6613 \begin_layout Plain Layout
6614 lyxeditor.bat
6615 \end_layout
6616
6617 \end_inset
6618
6619  wrapper is used for communicating with LyX through the 
6620 \emph on
6621 lyxpipe
6622 \emph default
6623  and is as follows:
6624 \end_layout
6625
6626 \begin_layout LyX-Code
6627 @echo off
6628 \begin_inset Newline newline
6629 \end_inset
6630
6631 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6632 \backslash
6633
6634 \backslash
6635 .
6636 \backslash
6637 pipe
6638 \backslash
6639 lyxpipe.in
6640 \begin_inset Newline newline
6641 \end_inset
6642
6643 type 
6644 \backslash
6645
6646 \backslash
6647 .
6648 \backslash
6649 pipe
6650 \backslash
6651 lyxpipe.out
6652 \end_layout
6653
6654 \begin_layout Standard
6655 Make sure that the LyXServer pipe path you specified in LyX is 
6656 \begin_inset Flex Code
6657 status collapsed
6658
6659 \begin_layout Plain Layout
6660
6661 \backslash
6662
6663 \backslash
6664 .
6665 \backslash
6666 pipe
6667 \backslash
6668 lyxpipe
6669 \end_layout
6670
6671 \end_inset
6672
6673 , otherwise change the 
6674 \begin_inset Flex Code
6675 status collapsed
6676
6677 \begin_layout Plain Layout
6678 lyxeditor.bat
6679 \end_layout
6680
6681 \end_inset
6682
6683  wrapper accordingly.
6684 \end_layout
6685
6686 \begin_layout Standard
6687 In yap, reverse search is triggered by double-click.
6688 \end_layout
6689
6690 \begin_layout Subsubsection*
6691 SumatraPDF (Windows)
6692 \end_layout
6693
6694 \begin_layout Standard
6695 In order to use SumatraPDF for inverse search, enter 
6696 \begin_inset Flex Code
6697 status collapsed
6698
6699 \begin_layout Plain Layout
6700 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6701 \end_layout
6702
6703 \end_inset
6704
6705  in the viewer setting in 
6706 \begin_inset Flex MenuItem
6707 status collapsed
6708
6709 \begin_layout Plain Layout
6710 Preferences\SpecialChar \menuseparator
6711 File Handling\SpecialChar \menuseparator
6712 File formats\SpecialChar \menuseparator
6713 PDF (pdflatex)
6714 \end_layout
6715
6716 \end_inset
6717
6718 , where 
6719 \begin_inset Flex Code
6720 status collapsed
6721
6722 \begin_layout Plain Layout
6723 lyxeditor.bat
6724 \end_layout
6725
6726 \end_inset
6727
6728  is the previous wrapper.
6729  If SumatraPDF.exe is not in your command PATH, use its full file name.
6730 \end_layout
6731
6732 \begin_layout Standard
6733 Reverse search is triggered by double-click.
6734 \end_layout
6735
6736 \begin_layout Subsubsection*
6737 YAP (Cygwin)
6738 \end_layout
6739
6740 \begin_layout Standard
6741 First of all, make sure that yap is your default DVI viewer in the Windows
6742  environment, then launch it, choose its 
6743 \begin_inset Flex MenuItem
6744 status collapsed
6745
6746 \begin_layout Plain Layout
6747 View\SpecialChar \menuseparator
6748 Options
6749 \end_layout
6750
6751 \end_inset
6752
6753  menu and select the 
6754 \begin_inset Quotes eld
6755 \end_inset
6756
6757 Inverse DVI Search
6758 \begin_inset Quotes erd
6759 \end_inset
6760
6761  tab.
6762  Click on the 
6763 \begin_inset Quotes eld
6764 \end_inset
6765
6766 New\SpecialChar \ldots{}
6767
6768 \begin_inset Quotes erd
6769 \end_inset
6770
6771  button and, in the window that opens, enter 
6772 \begin_inset Quotes eld
6773 \end_inset
6774
6775 LyX Editor
6776 \begin_inset Quotes erd
6777 \end_inset
6778
6779  (or any other name you like) in the 
6780 \begin_inset Quotes eld
6781 \end_inset
6782
6783 Name:
6784 \begin_inset Quotes erd
6785 \end_inset
6786
6787  field.
6788  Now click on the button labeled 
6789 \begin_inset Quotes eld
6790 \end_inset
6791
6792 \SpecialChar \ldots{}
6793
6794 \begin_inset Quotes erd
6795 \end_inset
6796
6797  to open a file dialog and navigate to the directory containing the 
6798 \begin_inset Flex Code
6799 status collapsed
6800
6801 \begin_layout Plain Layout
6802 lyxeditor.exe
6803 \end_layout
6804
6805 \end_inset
6806
6807  program (which is installed by default on Cygwin along with the LyX executable).
6808  Select 
6809 \begin_inset Flex Code
6810 status collapsed
6811
6812 \begin_layout Plain Layout
6813 lyxeditor.exe
6814 \end_layout
6815
6816 \end_inset
6817
6818  and then specify the program arguments as 
6819 \begin_inset Flex Code
6820 status collapsed
6821
6822 \begin_layout Plain Layout
6823 -g %f %l
6824 \end_layout
6825
6826 \end_inset
6827
6828 .
6829  In this way, you will be using the 
6830 \emph on
6831 lyxsocket
6832 \emph default
6833  for communicating with LyX.
6834  If, for whatever reason, you want to use the 
6835 \emph on
6836 lyxpipe
6837 \emph default
6838 , omit the 
6839 \begin_inset Flex Code
6840 status collapsed
6841
6842 \begin_layout Plain Layout
6843 -g
6844 \end_layout
6845
6846 \end_inset
6847
6848  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6849 \end_layout
6850
6851 \begin_layout Standard
6852 In yap, reverse search is triggered by double-click.
6853 \end_layout
6854
6855 \begin_layout Subsubsection*
6856 SumatraPDF (Cygwin)
6857 \end_layout
6858
6859 \begin_layout Standard
6860 In order to use SumatraPDF for inverse search, enter 
6861 \begin_inset Flex Code
6862 status collapsed
6863
6864 \begin_layout Plain Layout
6865 SumatraPDF.sh
6866 \end_layout
6867
6868 \end_inset
6869
6870  in the viewer setting in 
6871 \begin_inset Flex MenuItem
6872 status collapsed
6873
6874 \begin_layout Plain Layout
6875 Preferences\SpecialChar \menuseparator
6876 File Handling\SpecialChar \menuseparator
6877 File formats\SpecialChar \menuseparator
6878 PDF (pdflatex)
6879 \end_layout
6880
6881 \end_inset
6882
6883 , where 
6884 \begin_inset Flex Code
6885 status collapsed
6886
6887 \begin_layout Plain Layout
6888 SumatraPDF.sh
6889 \end_layout
6890
6891 \end_inset
6892
6893  is the following script (to be placed in your command PATH, 
6894 \begin_inset Flex Code
6895 status collapsed
6896
6897 \begin_layout Plain Layout
6898 /usr/local/bin
6899 \end_layout
6900
6901 \end_inset
6902
6903  being the best choice):
6904 \end_layout
6905
6906 \begin_layout LyX-Code
6907 #!/bin/bash
6908 \begin_inset Newline newline
6909 \end_inset
6910
6911 cd $(dirname $1)
6912 \begin_inset Newline newline
6913 \end_inset
6914
6915 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6916 \end_layout
6917
6918 \begin_layout Standard
6919 This wrapper script is needed because SumatraPDF is a native Windows application
6920  and does not understand the posix paths used by the Cygwin version of LyX.
6921  If SumatraPDF.exe is not in your command PATH, use its full posix path in
6922  the script above.
6923  The 
6924 \begin_inset Flex Code
6925 status collapsed
6926
6927 \begin_layout Plain Layout
6928 -g
6929 \end_layout
6930
6931 \end_inset
6932
6933  enables communication via the 
6934 \emph on
6935 lyxsocket
6936 \emph default
6937 .
6938  Again, omit the 
6939 \begin_inset Flex Code
6940 status collapsed
6941
6942 \begin_layout Plain Layout
6943 -g
6944 \end_layout
6945
6946 \end_inset
6947
6948  option if you want to use the 
6949 \emph on
6950 lyxpipe
6951 \emph default
6952 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6953 \end_layout
6954
6955 \begin_layout Standard
6956 Reverse search is triggered by double-click.
6957 \end_layout
6958
6959 \begin_layout Section
6960 Forward search
6961 \end_layout
6962
6963 \begin_layout Standard
6964 Forward search is, as the name implies, in a sense the 
6965 \begin_inset Quotes eld
6966 \end_inset
6967
6968 opposite
6969 \begin_inset Quotes erd
6970 \end_inset
6971
6972  to reverse search.
6973  It allows you to let the viewer jump to a given position from within LyX.
6974  If forward search is set up (as described in what follows), you can put
6975  the cursor anywhere in your LyX document, and hit 
6976 \begin_inset Flex MenuItem
6977 status collapsed
6978
6979 \begin_layout Plain Layout
6980 Navigate\SpecialChar \menuseparator
6981 Forward search
6982 \end_layout
6983
6984 \end_inset
6985
6986  (or select 
6987 \begin_inset Flex MenuItem
6988 status collapsed
6989
6990 \begin_layout Plain Layout
6991 Forward search
6992 \end_layout
6993
6994 \end_inset
6995
6996  in the context menu via right mouse click), and then the viewer will jump
6997  to that position as well.
6998  This implies, of course, that your viewer supports this function.
6999 \end_layout
7000
7001 \begin_layout Standard
7002 To make forward search possible, you first need to provide the generated
7003  output PDF/DVI file with additional information about the TeX sources.
7004  This can be done via the methods described in the section 
7005 \begin_inset CommandInset ref
7006 LatexCommand ref
7007 reference "sub:rev-search"
7008
7009 \end_inset
7010
7011 .
7012 \end_layout
7013
7014 \begin_layout Standard
7015 Additionally, you need to configure LyX for using your viewers in 
7016 \begin_inset Flex MenuItem
7017 status collapsed
7018
7019 \begin_layout Plain Layout
7020 Tools\SpecialChar \menuseparator
7021 Preferences\SpecialChar \menuseparator
7022 Output\SpecialChar \menuseparator
7023 General
7024 \end_layout
7025
7026 \end_inset
7027
7028 .
7029  We provide a range of tested configurations for some viewers, which you
7030  can select from the drop down list.
7031  If none of these configurations suits you, you have to find out and enter
7032  a suitable configuration yourself.
7033  The definition syntax uses the following placeholders: 
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 $$n
7043 \end_layout
7044
7045 \end_inset
7046
7047 : row number
7048 \end_layout
7049
7050 \begin_layout Itemize
7051 \noindent
7052 \begin_inset Flex Code
7053 status collapsed
7054
7055 \begin_layout Plain Layout
7056 $$t
7057 \end_layout
7058
7059 \end_inset
7060
7061 : name of the (temporary) exported .tex file
7062 \end_layout
7063
7064 \begin_layout Itemize
7065 \noindent
7066 \begin_inset Flex Code
7067 status collapsed
7068
7069 \begin_layout Plain Layout
7070 $$o
7071 \end_layout
7072
7073 \end_inset
7074
7075 : name of the exported output file (either dvi or pdf, depending on which
7076  one exists in the temporary directory)
7077 \end_layout
7078
7079 \begin_layout Standard
7080 Note that only some of the viewers provide full forward search functionality,
7081  among them yap, xdvi, okular and Sumatra PDF
7082 \begin_inset Foot
7083 status collapsed
7084
7085 \begin_layout Plain Layout
7086 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
7087 ip
7088 \end_layout
7089
7090 \end_inset
7091
7092 .
7093  While many of the widespread PDF viewers (most notably Adobe Reader) do
7094  not support forward search at all, some other viewers -- e.
7095 \begin_inset space \thinspace{}
7096 \end_inset
7097
7098 g.
7099  evince and xpdf -- allow at least to reload the document and jump to a
7100  specific page of the file, so you can at least navigate 
7101 \begin_inset Quotes eld
7102 \end_inset
7103
7104 near
7105 \begin_inset Quotes erd
7106 \end_inset
7107
7108 .
7109  These latter functionality is provided by an external call of synctex (see
7110  the predefined example configurations).
7111  
7112 \end_layout
7113
7114 \begin_layout Standard
7115 Forward search works both with DVI and PDF output.
7116  LyX simply checks which preview format you have used before (i.
7117 \begin_inset space \thinspace{}
7118 \end_inset
7119
7120 e., which format is already there in the temporary directory) and chooses
7121  the appropriate configuration for the respective format.
7122 \end_layout
7123
7124 \begin_layout Chapter
7125 Special Document Classes
7126 \end_layout
7127
7128 \begin_layout Section
7129 A&A Paper
7130 \end_layout
7131
7132 \begin_layout Standard
7133 by 
7134 \noun on
7135 Peter Sütterlin
7136 \end_layout
7137
7138 \begin_layout Subsection
7139 Introduction
7140 \end_layout
7141
7142 \begin_layout Standard
7143 This section describes how LyX can be used to write articles for submission
7144  to the scientific journal 
7145 \emph on
7146 Astronomy and Astrophysics
7147 \emph default
7148  (www.edpsciences.fr/aa/ 
7149 \begin_inset Flex URL
7150 status collapsed
7151
7152 \begin_layout Plain Layout
7153
7154 http://www.edpsciences.fr/aa/
7155 \end_layout
7156
7157 \end_inset
7158
7159 ) using Version 5.01 of the document class 
7160 \family typewriter
7161 aa.cls
7162 \family default
7163 .
7164  This package can be downloaded from the ftp site
7165 \end_layout
7166
7167 \begin_layout Standard
7168 \begin_inset VSpace medskip
7169 \end_inset
7170
7171
7172 \end_layout
7173
7174 \begin_layout Standard
7175 \align center
7176 \begin_inset Flex URL
7177 status collapsed
7178
7179 \begin_layout Plain Layout
7180
7181 ftp://ftp.edpsciences.org/pub/aa/readme.html
7182 \end_layout
7183
7184 \end_inset
7185
7186
7187 \end_layout
7188
7189 \begin_layout Standard
7190 \begin_inset VSpace medskip
7191 \end_inset
7192
7193
7194 \end_layout
7195
7196 \begin_layout Standard
7197 A manual comes together with that package, and this text is not meant to
7198  replace the original manual but is merely a short guide in how to realize
7199  the correct form of your paper.
7200  
7201 \end_layout
7202
7203 \begin_layout Standard
7204 Please note that the publisher of the journal was changed from Springer
7205  to EDP Sciences starting January 1, 2001.
7206  That change involved also some slight changes to the style files, namely
7207  the removal of the thesaurus command.
7208  The LyX class aa supports the newest version of these style files, V 5.01.
7209  If you have an older version installed, please upgrade.
7210  For compatibility, the old (version 4) layout has been kept as 
7211 \family sans
7212 article (A&A V4)
7213 \family default
7214 .
7215  Please refer to the comments in 
7216 \family typewriter
7217 LyXDir/layouts/aapaper.layout
7218 \family default
7219 .
7220 \end_layout
7221
7222 \begin_layout Subsection
7223 Getting started
7224 \end_layout
7225
7226 \begin_layout Standard
7227 It is recommended you start from the example template distributed with LyX.
7228  If you are not using a template, note the following settings:
7229 \end_layout
7230
7231 \begin_layout Itemize
7232 Select 
7233 \family sans
7234 article (A&A)
7235 \family default
7236  in the 
7237 \family sans
7238 Document\SpecialChar \menuseparator
7239 Settings
7240 \family default
7241  dialog (OK, that one was obvious).
7242 \end_layout
7243
7244 \begin_layout Itemize
7245 Don't change the option 
7246 \family sans
7247 Page
7248 \begin_inset space ~
7249 \end_inset
7250
7251 style
7252 \family default
7253 : Leave it set to 
7254 \family sans
7255 default
7256 \family default
7257 .
7258  The whole layout is done by the macros, you shouldn't change anything.
7259 \end_layout
7260
7261 \begin_layout Subsection
7262 The header block
7263 \end_layout
7264
7265 \begin_layout Standard
7266 First thing to enter is the header information.
7267  It consists of seven entries, of which some are optional.
7268  They are
7269 \end_layout
7270
7271 \begin_layout Itemize
7272
7273 \family sans
7274 Title
7275 \family default
7276 : [required] 
7277 \end_layout
7278
7279 \begin_layout Itemize
7280
7281 \family sans
7282 Subtitle
7283 \family default
7284 : [optional] 
7285 \end_layout
7286
7287 \begin_layout Itemize
7288
7289 \family sans
7290 Author
7291 \family default
7292 : [required]
7293 \end_layout
7294
7295 \begin_layout Itemize
7296
7297 \family sans
7298 Address
7299 \family default
7300 : [required]
7301 \end_layout
7302
7303 \begin_layout Itemize
7304
7305 \family sans
7306 Offprints
7307 \family default
7308 : [optional] if more than one author: whom to contact for offprint requests.
7309 \end_layout
7310
7311 \begin_layout Itemize
7312
7313 \family sans
7314 Mail
7315 \family default
7316 : [optional] mail address for contacts.
7317 \end_layout
7318
7319 \begin_layout Itemize
7320
7321 \family sans
7322 Date
7323 \family default
7324 : [required].
7325  Suggested format is 
7326 \family typewriter
7327 Received: <date>; Accepted <date> 
7328 \end_layout
7329
7330 \begin_layout Standard
7331 There is no need to issue the 
7332 \family typewriter
7333
7334 \backslash
7335 maketitle
7336 \family default
7337  command, this is done automatically by LyX when the header is finished.
7338  Although the order of the single header entries doesn't matter it is advised
7339  to keep the above sequence, just to get the best optics and meets the layout
7340  of the real document.
7341 \end_layout
7342
7343 \begin_layout Standard
7344 If you want to place footnotes in the header block, e.
7345 \begin_inset space \thinspace{}
7346 \end_inset
7347
7348 g.
7349 \begin_inset space \space{}
7350 \end_inset
7351
7352 to state your present address, just use the standard footnote via the menu
7353  
7354 \family sans
7355 Insert\SpecialChar \menuseparator
7356 Footnote.
7357
7358 \family default
7359  LyX will automagically use the term 
7360 \family typewriter
7361
7362 \backslash
7363 thanks{}
7364 \family default
7365  in that case.
7366 \end_layout
7367
7368 \begin_layout Standard
7369 In addition to these topics, the macros use three additional LaTeX commands
7370  that have no counterpart in LyX:
7371 \end_layout
7372
7373 \begin_layout Itemize
7374
7375 \family typewriter
7376
7377 \backslash
7378 and
7379 \family default
7380  to separate different names for more than one author and institute, respectivel
7381 y.
7382 \end_layout
7383
7384 \begin_layout Itemize
7385
7386 \family typewriter
7387
7388 \backslash
7389 inst{<nr>}
7390 \family default
7391 to mark corresponding author/institute pairs.
7392  The institutes are numbered sequentially as they appear in the 
7393 \family sans
7394 Address
7395 \family default
7396  field, so you have to put a marker to each author.
7397 \end_layout
7398
7399 \begin_layout Itemize
7400
7401 \family typewriter
7402
7403 \backslash
7404 email{address}
7405 \family default
7406  to supply an email address for fast contact.
7407 \end_layout
7408
7409 \begin_layout Standard
7410 In all cases, the appropriate command has to be entered in LyX and marked
7411  as LaTeX code.
7412  See the examples.
7413  
7414 \end_layout
7415
7416 \begin_layout Subsection
7417 The abstract
7418 \end_layout
7419
7420 \begin_layout Standard
7421 The abstract should immediately follow the header block.
7422  With version 5 the abstract environment was changed to a command, and there
7423  is now a resctriction to only one paragraph.
7424  In addition, it should contain an entry with the keywords.
7425  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7426  command 
7427 \family typewriter
7428
7429 \backslash
7430 keywords{}
7431 \family default
7432  by hand and mark it as LaTeX code.
7433  Refer to the example paper.
7434 \end_layout
7435
7436 \begin_layout Subsection
7437 Supported environments
7438 \end_layout
7439
7440 \begin_layout Standard
7441 The A&A paper layout supports the following environments for structuring
7442  your text:
7443 \end_layout
7444
7445 \begin_layout Itemize
7446
7447 \family sans
7448 Standard
7449 \end_layout
7450
7451 \begin_layout Itemize
7452
7453 \family sans
7454 Section
7455 \end_layout
7456
7457 \begin_layout Itemize
7458
7459 \family sans
7460 Subsection
7461 \end_layout
7462
7463 \begin_layout Itemize
7464
7465 \family sans
7466 Subsubsection
7467 \end_layout
7468
7469 \begin_layout Itemize
7470
7471 \family sans
7472 Itemize
7473 \end_layout
7474
7475 \begin_layout Itemize
7476
7477 \family sans
7478 Enumerate
7479 \end_layout
7480
7481 \begin_layout Itemize
7482
7483 \family sans
7484 Description
7485 \end_layout
7486
7487 \begin_layout Itemize
7488
7489 \family sans
7490 Caption
7491 \end_layout
7492
7493 \begin_layout Itemize
7494
7495 \family sans
7496 Abstract
7497 \end_layout
7498
7499 \begin_layout Itemize
7500
7501 \family sans
7502 Acknowledgment
7503 \end_layout
7504
7505 \begin_layout Itemize
7506
7507 \family sans
7508 Bibliography
7509 \end_layout
7510
7511 \begin_layout Itemize
7512
7513 \family sans
7514 LaTeX
7515 \end_layout
7516
7517 \begin_layout Subsection
7518 Commands not supported by LyX
7519 \end_layout
7520
7521 \begin_layout Standard
7522 Some commands are not yet supported by the 
7523 \family sans
7524 paper (A&A)
7525 \family default
7526  layout for LyX.
7527  Some have already been mentioned.
7528  For the sake of completeness, they are listed all together here:
7529 \end_layout
7530
7531 \begin_layout Itemize
7532
7533 \family typewriter
7534
7535 \backslash
7536 and
7537 \end_layout
7538
7539 \begin_layout Itemize
7540
7541 \family typewriter
7542
7543 \backslash
7544 email
7545 \end_layout
7546
7547 \begin_layout Itemize
7548
7549 \family typewriter
7550
7551 \backslash
7552 appendix
7553 \end_layout
7554
7555 \begin_layout Itemize
7556
7557 \family typewriter
7558
7559 \backslash
7560 authorrunning
7561 \end_layout
7562
7563 \begin_layout Itemize
7564
7565 \family typewriter
7566
7567 \backslash
7568 inst{}
7569 \end_layout
7570
7571 \begin_layout Itemize
7572
7573 \family typewriter
7574
7575 \backslash
7576 keywords{}
7577 \end_layout
7578
7579 \begin_layout Itemize
7580
7581 \family typewriter
7582
7583 \backslash
7584 object{}
7585 \end_layout
7586
7587 \begin_layout Itemize
7588
7589 \family typewriter
7590
7591 \backslash
7592 titlerunning{}
7593 \end_layout
7594
7595 \begin_layout Standard
7596 If you want to use any of these commands, you have to enter them yourself.
7597  
7598 \series bold
7599 Do not forget to mark them as LaTeX code!
7600 \end_layout
7601
7602 \begin_layout Subsection
7603 Figure and Table Floats
7604 \end_layout
7605
7606 \begin_layout Standard
7607 LyX provides support for the necessary float environments 
7608 \family sans
7609 figure, figure*, table
7610 \family default
7611  and 
7612 \family sans
7613 table*
7614 \family default
7615 , therefore we won't tell much about it here.
7616  Refer to the 
7617 \emph on
7618 User's
7619 \begin_inset space ~
7620 \end_inset
7621
7622 Guide
7623 \emph default
7624 .
7625  Just remember that tables should be left-aligned.
7626  For that, select the table and change the alignment in 
7627 \family sans
7628 Edit\SpecialChar \menuseparator
7629 Paragraph
7630 \begin_inset space ~
7631 \end_inset
7632
7633 Settings.
7634 \end_layout
7635
7636 \begin_layout Standard
7637 There is only one special thing: the figures with caption besides the figure.
7638  To create such a figure, you have to do the following:
7639 \end_layout
7640
7641 \begin_layout Enumerate
7642 Create a wide figure float: 
7643 \family sans
7644 Insert\SpecialChar \menuseparator
7645 Float\SpecialChar \menuseparator
7646 Figure
7647 \family default
7648 , then right click in the figure and select 
7649 \family sans
7650 \bar under
7651 S
7652 \bar default
7653 pan
7654 \begin_inset space ~
7655 \end_inset
7656
7657 columns
7658 \family default
7659 .
7660 \end_layout
7661
7662 \begin_layout Enumerate
7663 Enter your caption text.
7664 \end_layout
7665
7666 \begin_layout Enumerate
7667 Press 
7668 \family sans
7669 Return
7670 \family default
7671  to move the cursor above the caption.
7672 \end_layout
7673
7674 \begin_layout Enumerate
7675 Insert your figure
7676 \end_layout
7677
7678 \begin_layout Enumerate
7679 Position the cursor behind the figure and insert a horizontal fill: 
7680 \family sans
7681 Insert\SpecialChar \menuseparator
7682 Special
7683 \begin_inset space ~
7684 \end_inset
7685
7686 Character\SpecialChar \menuseparator
7687 Horizontal
7688 \begin_inset space ~
7689 \end_inset
7690
7691 Fill
7692 \family default
7693 .
7694 \end_layout
7695
7696 \begin_layout Enumerate
7697 Switch to LaTeX mode: 
7698 \family sans
7699 M-c
7700 \begin_inset space ~
7701 \end_inset
7702
7703 t
7704 \family default
7705 .
7706 \end_layout
7707
7708 \begin_layout Enumerate
7709 Enter 
7710 \family typewriter
7711
7712 \backslash
7713 parbox[b]{55mm}{
7714 \family default
7715 .
7716  
7717 \series bold
7718 Do not close the brace!
7719 \end_layout
7720
7721 \begin_layout Enumerate
7722 Position the cursor behind the caption text, switch to LaTeX mode and insert
7723  the closing brace: 
7724 \family sans
7725 M-c
7726 \begin_inset space ~
7727 \end_inset
7728
7729 t
7730 \family default
7731  
7732 \family typewriter
7733 }
7734 \family default
7735 .
7736 \end_layout
7737
7738 \begin_layout Standard
7739 Also, refer to the figures in the example paper.
7740 \end_layout
7741
7742 \begin_layout Subsection
7743 Referee layout
7744 \end_layout
7745
7746 \begin_layout Standard
7747 For submission, the paper has to be formated in a special double-spacing
7748  layout.
7749  For this purpose, you have to give the option 
7750 \family typewriter
7751 referee
7752 \family default
7753  to the documentclass.
7754  This must be done using the extra class options field in the 
7755 \family sans
7756 Document\SpecialChar \menuseparator
7757 Settings
7758 \family default
7759  dialog.
7760  Just enter the string 
7761 \family typewriter
7762 referee
7763 \family default
7764  there.
7765 \end_layout
7766
7767 \begin_layout Subsection
7768 The example paper
7769 \end_layout
7770
7771 \begin_layout Standard
7772 The 
7773 \family sans
7774 Examples
7775 \family default
7776  directory contains an example paper written with LyX.
7777  It is the example paper from the original macro package, translated to
7778  LyX.
7779  Use it for inspiration, and compare the original LaTeX code with LyX way
7780  of writing.
7781 \end_layout
7782
7783 \begin_layout Section
7784 AASTeX
7785 \end_layout
7786
7787 \begin_layout Standard
7788 by 
7789 \noun on
7790 Mike Ressler
7791 \end_layout
7792
7793 \begin_layout Subsection
7794 Introduction
7795 \end_layout
7796
7797 \begin_layout Standard
7798 AASTeX is a set of macros produced by the American Astronomical Society
7799  to facilitate electronic manuscript submission to the three journals they
7800  publish: the Astrophysical Journal (including the Letters and Supplement),
7801  the Astronomical Journal, and the Publications of the Astronomical Society
7802  of the Pacific.
7803  LyX has proven to be an excellent tool for generating these documents,
7804  especially given its equation, citation, and figure handling capabilities.
7805  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7806  is the version described here, or higher.
7807  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7808  incompatible with LyX.
7809  The AASTeX package may be downloaded from the AASTeX Web site
7810 \end_layout
7811
7812 \begin_layout Standard
7813 \begin_inset VSpace medskip
7814 \end_inset
7815
7816
7817 \end_layout
7818
7819 \begin_layout Standard
7820 \align center
7821 \begin_inset Flex URL
7822 status collapsed
7823
7824 \begin_layout Plain Layout
7825
7826 http://www.journals.uchicago.edu/AAS/AASTeX
7827 \end_layout
7828
7829 \end_inset
7830
7831
7832 \end_layout
7833
7834 \begin_layout Standard
7835 \begin_inset VSpace medskip
7836 \end_inset
7837
7838
7839 \end_layout
7840
7841 \begin_layout Standard
7842 A complete user guide is contained in that package and you should familiarize
7843  yourself with it thoroughly before embarking on writing a paper in LyX.
7844  LyX will not reduce the need to figure out all the AASTeX commands, it
7845  will only reduce the drudgery of typing everything in.
7846  It is your responsibility to ensure that the final exported LaTeX document
7847  conforms completely to the requirements of the journal to which you are
7848  submitting your paper.
7849 \end_layout
7850
7851 \begin_layout Subsection
7852 Starting a New Paper
7853 \end_layout
7854
7855 \begin_layout Standard
7856 I strongly suggest that you start with the AASTeX template file.
7857  Click on 
7858 \family sans
7859 File\SpecialChar \menuseparator
7860 New from
7861 \family default
7862  
7863 \family sans
7864 Template
7865 \family default
7866 , enter the new file name, then choose the 
7867 \family typewriter
7868 aastex.lyx
7869 \family default
7870  template.
7871  This will show the most common fields found in a manuscript.
7872  Simply overwrite the existing text (including the brackets, 
7873 \family typewriter
7874 <>
7875 \family default
7876 ) with the correct information.
7877  Many of the AASTeX commands and environments can be implemented directly
7878  in LyX, but some cannot: most noticeably 
7879 \family typewriter
7880
7881 \backslash
7882 altaffilmark
7883 \family default
7884  and 
7885 \family typewriter
7886
7887 \backslash
7888 altaffiltext
7889 \family default
7890 , which should stick out like a sore thumb if you actually just opened the
7891  template file.
7892  For commands such as these, the LaTeX code must be entered directly and
7893  marked as such.
7894  Such commands are referred to as TeX code, or Evil Red Text.
7895  I tried to minimize the amount of TeX code needed in an AASTeX document,
7896  but there is still a bit more required than any of us would like.
7897 \end_layout
7898
7899 \begin_layout Subsection
7900 Finishing Your Paper
7901 \end_layout
7902
7903 \begin_layout Standard
7904 When the paper is finished to your satisfaction and previews/prints correctly,
7905  there are a few 
7906 \begin_inset Quotes eld
7907 \end_inset
7908
7909 postprocessing
7910 \begin_inset Quotes erd
7911 \end_inset
7912
7913  actions which need to be done before you submit it to the journals.
7914  
7915 \end_layout
7916
7917 \begin_layout Enumerate
7918 Export your paper as a LaTeX file (
7919 \family sans
7920 File\SpecialChar \menuseparator
7921 Export\SpecialChar \menuseparator
7922 LaTeX
7923 \family default
7924 ).
7925  
7926 \end_layout
7927
7928 \begin_layout Enumerate
7929 Edit the resulting 
7930 \family typewriter
7931 .tex
7932 \family default
7933  file with your favorite text editor
7934 \end_layout
7935
7936 \begin_deeper
7937 \begin_layout Enumerate
7938 remove the comment lines before the 
7939 \family typewriter
7940
7941 \backslash
7942 documentclass
7943 \family default
7944  command
7945 \end_layout
7946
7947 \begin_layout Enumerate
7948 remove the 
7949 \family typewriter
7950
7951 \backslash
7952 usepackage...{fontenc}
7953 \family default
7954  line if it appears (usually just after 
7955 \family typewriter
7956
7957 \backslash
7958 documentclass
7959 \family default
7960 }; also remove the 
7961 \family typewriter
7962
7963 \backslash
7964 secnumdepth
7965 \family default
7966  line if it appears.
7967 \end_layout
7968
7969 \begin_layout Enumerate
7970 remove everything between (and including) the 
7971 \family typewriter
7972
7973 \backslash
7974 makeatletter
7975 \family default
7976  and 
7977 \family typewriter
7978
7979 \backslash
7980 makeatother
7981 \family default
7982  commands, except for any commands you specifically put into the LaTeX preamble
7983  (which should appear immediately after the 
7984 \begin_inset Quotes eld
7985 \end_inset
7986
7987 User specified LaTeX commands
7988 \begin_inset Quotes erd
7989 \end_inset
7990
7991  comment in the 
7992 \family typewriter
7993 .tex
7994 \family default
7995  file).
7996 \end_layout
7997
7998 \end_deeper
7999 \begin_layout Enumerate
8000 Run the resulting file through LaTeX to make sure it still processes correctly.
8001 \end_layout
8002
8003 \begin_layout Enumerate
8004 Reread the journal requirements to make sure your filenames and formats
8005  are correct.
8006 \end_layout
8007
8008 \begin_layout Enumerate
8009 Submit it.
8010 \end_layout
8011
8012 \begin_layout Subsection
8013 Comments On Specific Commands
8014 \end_layout
8015
8016 \begin_layout Standard
8017 I will not describe the detailed usage of the individual AASTeX commands:
8018  the AASTeX User Guide (
8019 \family typewriter
8020 aasguide.tex
8021 \family default
8022 ) gives a good description of each.
8023  Thus it's probably easiest for me to go down the list as found in the guide
8024  and offer comments where necessary.
8025  So let's begin \SpecialChar \ldots{}
8026
8027 \end_layout
8028
8029 \begin_layout Subsubsection
8030 Things that work as expected
8031 \end_layout
8032
8033 \begin_layout Standard
8034 Because they work as you might expect, I simply list them and the section
8035  they are found in: 
8036 \family typewriter
8037
8038 \backslash
8039 documentclass
8040 \family default
8041  (2.1.1), 
8042 \family typewriter
8043
8044 \backslash
8045 begin{document}
8046 \family default
8047  (2.2), 
8048 \family typewriter
8049
8050 \backslash
8051 title
8052 \family default
8053  (2.3), 
8054 \family typewriter
8055
8056 \backslash
8057 author
8058 \family default
8059  (2.3), 
8060 \family typewriter
8061
8062 \backslash
8063 affil
8064 \family default
8065  (2.3), 
8066 \family typewriter
8067
8068 \backslash
8069 abstract
8070 \family default
8071  (2.4), 
8072 \family typewriter
8073
8074 \backslash
8075 keywords
8076 \family default
8077  (2.5), 
8078 \family typewriter
8079
8080 \backslash
8081 section
8082 \family default
8083  (2.7), 
8084 \family typewriter
8085
8086 \backslash
8087 subsection
8088 \family default
8089  (2.7), 
8090 \family typewriter
8091
8092 \backslash
8093 subsubsection
8094 \family default
8095  (2.7), 
8096 \family typewriter
8097
8098 \backslash
8099 paragraph
8100 \family default
8101  (2.7), 
8102 \family typewriter
8103
8104 \backslash
8105 facility
8106 \family default
8107  (2.10), 
8108 \family typewriter
8109
8110 \backslash
8111 begin{displaymath}
8112 \family default
8113  (2.12), 
8114 \family typewriter
8115
8116 \backslash
8117 begin{equation}
8118 \family default
8119  (2.12), 
8120 \family typewriter
8121
8122 \backslash
8123 begin{eqnarray}
8124 \family default
8125  (2.12), 
8126 \family typewriter
8127
8128 \backslash
8129 begin{mathletters}
8130 \family default
8131  (2.12), 
8132 \family typewriter
8133
8134 \backslash
8135 begin{thebibliography}
8136 \family default
8137  (2.13.1), 
8138 \family typewriter
8139
8140 \backslash
8141 bibitem
8142 \family default
8143  (2.13.2), all the cite commands and their variations (2.13.2), the generic
8144  graphicx figure commands (2.14.1), 
8145 \family typewriter
8146
8147 \backslash
8148 begin{table}
8149 \family default
8150  (2.15.4), 
8151 \family typewriter
8152
8153 \backslash
8154 begin{tabular}
8155 \family default
8156  (2.15.4), 
8157 \family typewriter
8158
8159 \backslash
8160 caption
8161 \family default
8162  (2.15.4), 
8163 \family typewriter
8164
8165 \backslash
8166 label
8167 \family default
8168  (2.15.4, amongst other places), 
8169 \family typewriter
8170
8171 \backslash
8172 tablerefs
8173 \family default
8174  (2.15.5), 
8175 \family typewriter
8176
8177 \backslash
8178 tablecomments
8179 \family default
8180  (2.15.5), 
8181 \family typewriter
8182
8183 \backslash
8184 url
8185 \family default
8186  (2.17.4), 
8187 \family typewriter
8188
8189 \backslash
8190 end{document}
8191 \family default
8192  (2.18).
8193 \end_layout
8194
8195 \begin_layout Standard
8196 The following style options also work correctly: 
8197 \family typewriter
8198 longabstract
8199 \family default
8200  (2.4), 
8201 \family typewriter
8202 preprint
8203 \family default
8204  (3.2.1), 
8205 \family typewriter
8206 preprint2
8207 \family default
8208  (3.2.2), 
8209 \family typewriter
8210 eqsecnum
8211 \family default
8212  (3.3), 
8213 \family typewriter
8214 flushrt
8215 \family default
8216  (3.4).
8217  Simply put them in the 
8218 \family sans
8219 Options
8220 \family default
8221  box in 
8222 \family sans
8223 Layout\SpecialChar \menuseparator
8224 Document
8225 \family default
8226 .
8227 \end_layout
8228
8229 \begin_layout Subsubsection
8230 Things that work, but require more comment
8231 \end_layout
8232
8233 \begin_layout Standard
8234 The following items work, but require a little more discussion:
8235 \end_layout
8236
8237 \begin_layout Itemize
8238 These items are reserved for use by the journal editors, but you can put
8239  them into the LaTeX preamble if you feel compelled to do so: 
8240 \family typewriter
8241
8242 \backslash
8243 received
8244 \family default
8245
8246 \family typewriter
8247
8248 \backslash
8249 revised
8250 \family default
8251
8252 \family typewriter
8253
8254 \backslash
8255 accepted
8256 \family default
8257
8258 \family typewriter
8259
8260 \backslash
8261 ccc
8262 \family default
8263
8264 \family typewriter
8265
8266 \backslash
8267 cpright
8268 \family default
8269  (all from 2.1.3)
8270 \end_layout
8271
8272 \begin_layout Itemize
8273 These items may be placed in the LaTeX preamble, and are included as blanks
8274  in the template file: 
8275 \family typewriter
8276
8277 \backslash
8278 slugcomment
8279 \family default
8280  (2.1.4), 
8281 \family typewriter
8282
8283 \backslash
8284 shorttitle
8285 \family default
8286  (2.1.5), 
8287 \family typewriter
8288
8289 \backslash
8290 shortauthors
8291 \family default
8292  (2.1.5)
8293 \end_layout
8294
8295 \begin_layout Itemize
8296
8297 \family typewriter
8298
8299 \backslash
8300 email
8301 \family default
8302  (2.3) – can only be used 
8303 \begin_inset Quotes eld
8304 \end_inset
8305
8306 standalone
8307 \begin_inset Quotes erd
8308 \end_inset
8309
8310 , not in the middle of a paragraph.
8311  Use TeX code if you need to embed it.
8312 \end_layout
8313
8314 \begin_layout Itemize
8315
8316 \family typewriter
8317
8318 \backslash
8319 and
8320 \family default
8321  (2.3) – will have extra {} after it.
8322  This should not cause an error.
8323 \end_layout
8324
8325 \begin_layout Itemize
8326
8327 \family typewriter
8328
8329 \backslash
8330 notetoeditor
8331 \family default
8332  (2.6) – can only be used 
8333 \begin_inset Quotes eld
8334 \end_inset
8335
8336 standalone
8337 \begin_inset Quotes erd
8338 \end_inset
8339
8340 , not in the middle of a paragraph.
8341  Use TeX code if you need to embed it.
8342 \end_layout
8343
8344 \begin_layout Itemize
8345
8346 \family typewriter
8347
8348 \backslash
8349 placetable
8350 \family default
8351  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8352  hand
8353 \end_layout
8354
8355 \begin_layout Itemize
8356
8357 \family typewriter
8358
8359 \backslash
8360 placefigure
8361 \family default
8362  (2.8) – same as for 
8363 \family typewriter
8364
8365 \backslash
8366 placetable
8367 \end_layout
8368
8369 \begin_layout Itemize
8370
8371 \family typewriter
8372
8373 \backslash
8374 acknowledgements
8375 \family default
8376  (2.9) – will have extra {} after it.
8377  This should not cause an error.
8378 \end_layout
8379
8380 \begin_layout Itemize
8381
8382 \family typewriter
8383
8384 \backslash
8385 appendix
8386 \family default
8387  (2.11) – will have extra {} after it.
8388  This should not cause an error.
8389 \end_layout
8390
8391 \begin_layout Itemize
8392
8393 \family typewriter
8394
8395 \backslash
8396 figcaption
8397 \family default
8398  (2.14.2) – you can insert an optional filename argument by placing the cursor
8399  at the beginning of the text and selecting 
8400 \family sans
8401 Insert\SpecialChar \menuseparator
8402 Short Title
8403 \family default
8404 .
8405  
8406 \begin_inset Quotes eld
8407 \end_inset
8408
8409 Short Title
8410 \begin_inset Quotes erd
8411 \end_inset
8412
8413  inserts an optional argument of the type needed by 
8414 \family typewriter
8415
8416 \backslash
8417 figcaption
8418 \family default
8419 .
8420  Hopefully it will be renamed someday.
8421 \end_layout
8422
8423 \begin_layout Itemize
8424
8425 \family typewriter
8426
8427 \backslash
8428 objectname
8429 \family default
8430  (2.17.1) – same as 
8431 \family typewriter
8432
8433 \backslash
8434 figcaption
8435 \family default
8436  for the catalog ID optional parameter
8437 \end_layout
8438
8439 \begin_layout Itemize
8440
8441 \family typewriter
8442
8443 \backslash
8444 dataset
8445 \family default
8446  (2.17.1) – same as 
8447 \family typewriter
8448
8449 \backslash
8450 figcaption
8451 \family default
8452  for the catalog ID optional parameter
8453 \end_layout
8454
8455 \begin_layout Subsubsection
8456 Things not implemented, use TeX code
8457 \end_layout
8458
8459 \begin_layout Standard
8460
8461 \family typewriter
8462
8463 \backslash
8464 altaffilmark
8465 \family default
8466  (2.3), 
8467 \family typewriter
8468
8469 \backslash
8470 altaffiltext
8471 \family default
8472  (2.3), 
8473 \family typewriter
8474
8475 \backslash
8476 eqnum
8477 \family default
8478  (2.12), 
8479 \family typewriter
8480
8481 \backslash
8482 setcounter{equation}
8483 \family default
8484  (2.12), Journal name abbreviations (2.13.4), 
8485 \family typewriter
8486
8487 \backslash
8488 figurenum
8489 \family default
8490  (2.14.1), 
8491 \family typewriter
8492
8493 \backslash
8494 epsscale
8495 \family default
8496  (2.14.1), 
8497 \family typewriter
8498
8499 \backslash
8500 plotone
8501 \family default
8502  (2.14.1), 
8503 \family typewriter
8504
8505 \backslash
8506 plottwo
8507 \family default
8508  (2.14.1), 
8509 \family typewriter
8510
8511 \backslash
8512 tablenum
8513 \family default
8514  (2.15.4), 
8515 \family typewriter
8516
8517 \backslash
8518 tableline
8519 \family default
8520  (2.15.4, insert it as the first element in the lefthand cell after where
8521  you want it.
8522  Don't use any of LyX's rules in the table), 
8523 \family typewriter
8524
8525 \backslash
8526 tablenotemark
8527 \family default
8528  (2.15.5), 
8529 \family typewriter
8530
8531 \backslash
8532 tablenotetext
8533 \family default
8534  (2.15.5), much of Misc (2.17, except 
8535 \family typewriter
8536
8537 \backslash
8538 objectname
8539 \family default
8540
8541 \family typewriter
8542
8543 \backslash
8544 dataset
8545 \family default
8546
8547 \family typewriter
8548
8549 \backslash
8550 url
8551 \family default
8552 , and 
8553 \family typewriter
8554
8555 \backslash
8556 email
8557 \family default
8558 ; see above), 
8559 \family typewriter
8560
8561 \backslash
8562 singlespace
8563 \family default
8564  (3.1), 
8565 \family typewriter
8566
8567 \backslash
8568 doublespace
8569 \family default
8570  (3.1), 
8571 \family typewriter
8572
8573 \backslash
8574 onecolumn
8575 \family default
8576  (3.2), 
8577 \family typewriter
8578
8579 \backslash
8580 twocolumn
8581 \family default
8582  (3.2)
8583 \end_layout
8584
8585 \begin_layout Subsubsection
8586 Things that cannot be implemented
8587 \end_layout
8588
8589 \begin_layout Standard
8590 \SpecialChar \ldots{}
8591  at least in any meaningful sort of way, so I suggest ignoring them.
8592  They are the references environment (2.13.3), and the deluxetable environment
8593  (2.15).
8594  If you really, really need to use deluxetable, I suggest editing it in
8595  a separate file with a text editor, then using 
8596 \family sans
8597 Insert\SpecialChar \menuseparator
8598 Child
8599 \begin_inset space ~
8600 \end_inset
8601
8602 Document
8603 \family default
8604  to include it in your LyX document.
8605  See the 
8606 \family typewriter
8607 aas_sample.lyx
8608 \family default
8609  file to see an example of this.
8610 \end_layout
8611
8612 \begin_layout Subsection
8613 FAQs, Tips, Tricks, and Other Ruminations
8614 \end_layout
8615
8616 \begin_layout Subsubsection
8617 Getting LyX and AASTeX to cooperate
8618 \end_layout
8619
8620 \begin_layout Standard
8621 It can be a bit tricky to get LyX to recognize a new layout and document
8622  class.
8623  When all else fails, do this:
8624 \end_layout
8625
8626 \begin_layout Enumerate
8627 Make certain that LaTeX can find AASTeX.
8628  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8629  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8630 \family typewriter
8631 sample.tex
8632 \family default
8633 .
8634 \end_layout
8635
8636 \begin_layout Enumerate
8637 Make certain that 
8638 \family typewriter
8639 aastex.layout
8640 \family default
8641  appears in LyX's 
8642 \family typewriter
8643 layouts
8644 \family default
8645  folder
8646 \end_layout
8647
8648 \begin_layout Enumerate
8649 Rerun 
8650 \family sans
8651 Tools\SpecialChar \menuseparator
8652 Reconfigure
8653 \family default
8654  in LyX, then restart LyX.
8655 \end_layout
8656
8657 \begin_layout Enumerate
8658 Open a regular new file, not from a template.
8659  Does AASTeX appear in the class list in 
8660 \family sans
8661 Document\SpecialChar \menuseparator
8662 Settings
8663 \family default
8664 ?
8665 \end_layout
8666
8667 \begin_layout Standard
8668 If you get a warning from an existing AASTeX document about not being able
8669  to find the AASTeX layout or a message about 
8670 \begin_inset Quotes eld
8671 \end_inset
8672
8673 You should not mix title layouts with normal ones
8674 \begin_inset Quotes erd
8675 \end_inset
8676
8677 , things haven't been installed correctly.
8678 \end_layout
8679
8680 \begin_layout Subsubsection
8681 LaTeX error processing a table 
8682 \end_layout
8683
8684 \begin_layout Standard
8685 LyX, by default, attempts to center the table caption/title.
8686  This seems to produce a bad interaction in AASTeX so you should click somewhere
8687  in the caption/title, then select 
8688 \family sans
8689 Edit\SpecialChar \menuseparator
8690 Paragraph
8691 \begin_inset space ~
8692 \end_inset
8693
8694 Settings
8695 \family default
8696 , then set the 
8697 \family sans
8698 Alignment
8699 \family default
8700  to 
8701 \family sans
8702 Block
8703 \family default
8704 .
8705  This took care of it for me.
8706 \end_layout
8707
8708 \begin_layout Subsubsection
8709 References
8710 \end_layout
8711
8712 \begin_layout Standard
8713 A couple of things: 1) I have noticed some funny spacing in the reference
8714  entries in the text.
8715  When you enter the bibliography item data, make sure their is 
8716 \emph on
8717 no
8718 \emph default
8719  space between the last author and the parenthesis setting off the year;
8720  
8721 \emph on
8722 e.
8723 \begin_inset space \thinspace{}
8724 \end_inset
8725
8726 g.
8727 \begin_inset space \space{}
8728 \end_inset
8729
8730
8731 \emph default
8732 type 
8733 \family typewriter
8734 Ressler(1992)
8735 \family default
8736 , not 
8737 \family typewriter
8738 Ressler (1992)
8739 \family default
8740 .
8741  2) Entering the references at all is not obvious.
8742  The easiest thing is to start typing your first reference at the end of
8743  the document, then mark it as type 
8744 \family sans
8745 References
8746 \family default
8747 .
8748  That will put a small gray box in front of what you just typed.
8749  Click on the box to fill in the rest of the information.
8750  For new references, go to the end of an existing reference and press return.
8751  That will create a new line with its own box, etc.
8752 \end_layout
8753
8754 \begin_layout Subsubsection
8755 Including EPS files
8756 \end_layout
8757
8758 \begin_layout Standard
8759 Even though AASTeX provides its own figure commands (
8760 \family typewriter
8761
8762 \backslash
8763 plotone
8764 \family default
8765 , for example), I much prefer LaTeX's standard figure commands (with the
8766  default graphicx).
8767  You can insert the 
8768 \family typewriter
8769
8770 \backslash
8771 plotone
8772 \family default
8773 , etc.
8774 \begin_inset space ~
8775 \end_inset
8776
8777 commands as TeX code into a Figure Float box if you desire, but I never
8778  have much luck getting the layout right.
8779  With the standard graphics, LyX will insert a 
8780 \family typewriter
8781
8782 \backslash
8783 usepackage{graphicx}
8784 \family default
8785  command into the LaTeX preamble and handle the figures in the standard
8786  LaTeX2e way, interspersing the figures in the text.
8787  I believe ApJ accepts figures exactly this way now; AJ might still use
8788  the 
8789 \begin_inset Quotes eld
8790 \end_inset
8791
8792 stack everything at the end
8793 \begin_inset Quotes erd
8794 \end_inset
8795
8796  technique.
8797 \end_layout
8798
8799 \begin_layout Subsubsection
8800 Things I could have done, but didn't
8801 \end_layout
8802
8803 \begin_layout Standard
8804 There are a few 
8805 \begin_inset Quotes eld
8806 \end_inset
8807
8808 pretty
8809 \begin_inset Quotes erd
8810 \end_inset
8811
8812  things I could have implemented, but chose not to.
8813  For instance, I saw no point in double-spacing the text in the LyX window,
8814  even though it is double-spaced in the paper manuscript.
8815  Also, I chose not to make separate layouts for the preprint and preprint2
8816  styles.
8817  Since I assume you will spend most of your time in the plain manuscript
8818  mode anyway, I decided not to chew up more disk space with this.
8819  
8820 \end_layout
8821
8822 \begin_layout Subsection
8823 Final Caveat
8824 \end_layout
8825
8826 \begin_layout Standard
8827 Your mileage may vary.
8828  I've now had papers published by both ApJ and AJ that have had 98% of the
8829  effort done in LyX; the last 2% was the LaTeX post-processing and a few
8830  cleanups.
8831  I have had no trouble with the submission process, and I'm sure the journals
8832  were never aware that there might be a difference.
8833  So, go forth and publish!
8834 \end_layout
8835
8836 \begin_layout Section
8837 AMS LaTeX
8838 \end_layout
8839
8840 \begin_layout Standard
8841 by 
8842 \noun on
8843 David Johnson
8844 \noun default
8845 ; updated by 
8846 \noun on
8847 Richard Heck
8848 \end_layout
8849
8850 \begin_layout Standard
8851 \begin_inset VSpace bigskip
8852 \end_inset
8853
8854
8855 \end_layout
8856
8857 \begin_layout Standard
8858 \noindent
8859 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8860  papers to be submitted to American Mathematical Society publications.
8861  The layouts are not tailored to a specific journal, but easily can be.
8862  You should refer to the AMS documentation for specific instructions for
8863  each journal (usually it will entail only changing a single line in the
8864  TeX output).
8865  That documentation is available on the Web at 
8866 \begin_inset Flex URL
8867 status open
8868
8869 \begin_layout Plain Layout
8870
8871 http://www.ams.org
8872 \end_layout
8873
8874 \end_inset
8875
8876  or by ftp at 
8877 \begin_inset Flex URL
8878 status open
8879
8880 \begin_layout Plain Layout
8881
8882 ftp://ftp.ams.org/pub/tex/amslatex/
8883 \end_layout
8884
8885 \end_inset
8886
8887 .
8888  These layouts are appropriate, and useful, for any mathematical writing.
8889  
8890 \end_layout
8891
8892 \begin_layout Standard
8893 There are two basic AMS LaTeX layouts: 
8894 \end_layout
8895
8896 \begin_layout Itemize
8897 amsart: The standard AMS article format.
8898 \end_layout
8899
8900 \begin_layout Itemize
8901 amsbook: the standard AMS book (really, monograph) format.
8902  
8903 \end_layout
8904
8905 \begin_layout Standard
8906 The layouts themselves contain only the minimum necessary to use the AMS
8907  classes.
8908  They do not, in particular, contain any of the `theorem' environments used
8909  for setting theorems, lemmas, and the like.
8910  These are contained, instead, in the 
8911 \begin_inset Flex Code
8912 status collapsed
8913
8914 \begin_layout Plain Layout
8915 Theorems (AMS)
8916 \end_layout
8917
8918 \end_inset
8919
8920  module, which is loaded by default when when you select one of the AMS
8921  classes.
8922  (It can also be used with other classes and can be removed, if you would
8923  rather use something else.) Less commonly used environments are in the 
8924 \begin_inset Flex Code
8925 status collapsed
8926
8927 \begin_layout Plain Layout
8928 Theorems (AMS-Extended)
8929 \end_layout
8930
8931 \end_inset
8932
8933  module, which must be loaded manually.
8934 \end_layout
8935
8936 \begin_layout Standard
8937 By default, theorems and the like are numbered consecutively throughout
8938  the document, but this may be modified by loading the module 
8939 \begin_inset Flex Code
8940 status collapsed
8941
8942 \begin_layout Plain Layout
8943 Theorems (Order by Section)
8944 \end_layout
8945
8946 \end_inset
8947
8948  or, if you are using 
8949 \begin_inset Flex Code
8950 status collapsed
8951
8952 \begin_layout Plain Layout
8953 book (AMS)
8954 \end_layout
8955
8956 \end_inset
8957
8958 , the module 
8959 \begin_inset Flex Code
8960 status collapsed
8961
8962 \begin_layout Plain Layout
8963 Theorems (Order by Chapter)
8964 \end_layout
8965
8966 \end_inset
8967
8968 .
8969  These will number the results as 
8970 \begin_inset Formula $n.m$
8971 \end_inset
8972
8973 , where the first number refers to the section (or chapter) and the second
8974  refers to the total number of results so far in that section (or chapter).
8975  Many environments are also available unnumbered.
8976  These are indicated by an asterisk at the end.
8977  If you happen to want 
8978 \emph on
8979 only
8980 \emph default
8981  unnumbered results, the module 
8982 \begin_inset Flex Code
8983 status collapsed
8984
8985 \begin_layout Plain Layout
8986 Theorems (Starred)
8987 \end_layout
8988
8989 \end_inset
8990
8991  provides that option.
8992 \end_layout
8993
8994 \begin_layout Standard
8995 Note that these modules do not 
8996 \emph on
8997 have
8998 \emph default
8999  to be used with the AMS classes.
9000  It is perfectly possible to use the 
9001 \begin_inset Flex Code
9002 status collapsed
9003
9004 \begin_layout Plain Layout
9005 Theorems (AMS)
9006 \end_layout
9007
9008 \end_inset
9009
9010  module, and the others mentioned, with other classes, such as 
9011 \begin_inset Flex Code
9012 status collapsed
9013
9014 \begin_layout Plain Layout
9015 article
9016 \end_layout
9017
9018 \end_inset
9019
9020
9021 \begin_inset Flex Code
9022 status collapsed
9023
9024 \begin_layout Plain Layout
9025 report
9026 \end_layout
9027
9028 \end_inset
9029
9030
9031 \begin_inset Flex Code
9032 status collapsed
9033
9034 \begin_layout Plain Layout
9035 book (KOMA-script)
9036 \end_layout
9037
9038 \end_inset
9039
9040 , and so forth.
9041 \end_layout
9042
9043 \begin_layout Subsection
9044 What these layouts provide
9045 \end_layout
9046
9047 \begin_layout Standard
9048 There is a long list of included environments provided by these layouts.
9049  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9050  variety of `theorem' environments.
9051  However, the AMS recommends the environments that are available in LyX.
9052  
9053 \end_layout
9054
9055 \begin_layout Standard
9056 The following environments—as well as the standard environments, such as
9057  
9058 \begin_inset Flex Noun
9059 status collapsed
9060
9061 \begin_layout Plain Layout
9062 section
9063 \end_layout
9064
9065 \end_inset
9066
9067
9068 \begin_inset Flex Noun
9069 status collapsed
9070
9071 \begin_layout Plain Layout
9072 bibliography
9073 \end_layout
9074
9075 \end_inset
9076
9077
9078 \begin_inset Flex Noun
9079 status collapsed
9080
9081 \begin_layout Plain Layout
9082 title
9083 \end_layout
9084
9085 \end_inset
9086
9087
9088 \begin_inset Flex Noun
9089 status collapsed
9090
9091 \begin_layout Plain Layout
9092 author
9093 \end_layout
9094
9095 \end_inset
9096
9097 , and 
9098 \begin_inset Flex Noun
9099 status collapsed
9100
9101 \begin_layout Plain Layout
9102 date
9103 \end_layout
9104
9105 \end_inset
9106
9107 —are provided by 
9108 \begin_inset Flex Code
9109 status collapsed
9110
9111 \begin_layout Plain Layout
9112 article (AMS)
9113 \end_layout
9114
9115 \end_inset
9116
9117  and 
9118 \begin_inset Flex Code
9119 status collapsed
9120
9121 \begin_layout Plain Layout
9122 book (AMS)
9123 \end_layout
9124
9125 \end_inset
9126
9127 :
9128 \end_layout
9129
9130 \begin_layout Description
9131 Address This should be the author's permanent address.
9132 \end_layout
9133
9134 \begin_layout Description
9135 Current
9136 \begin_inset space ~
9137 \end_inset
9138
9139 Address This should be the author's temporary address at the time of submission,
9140  if different from the Address.
9141 \end_layout
9142
9143 \begin_layout Description
9144 Email Author's e-mail address
9145 \end_layout
9146
9147 \begin_layout Description
9148 URL Author's Web address, if desired.
9149 \end_layout
9150
9151 \begin_layout Description
9152 Keywords Key words or phrases used to identify specific topics discussed
9153  in the paper.
9154 \end_layout
9155
9156 \begin_layout Description
9157 Subjectclass These refer to the AMS Subject Classifications, published and
9158  described in 
9159 \emph on
9160 Mathematical Reviews
9161 \emph default
9162 .
9163  These are also available online at the AMS cites listed above.
9164 \end_layout
9165
9166 \begin_layout Description
9167 Thanks
9168 \end_layout
9169
9170 \begin_layout Description
9171 Dedicatory
9172 \end_layout
9173
9174 \begin_layout Description
9175 Translator
9176 \end_layout
9177
9178 \begin_layout Standard
9179 The following environments are provided by both the 
9180 \begin_inset Flex Code
9181 status collapsed
9182
9183 \begin_layout Plain Layout
9184 Theorems
9185 \end_layout
9186
9187 \end_inset
9188
9189  and 
9190 \begin_inset Flex Code
9191 status collapsed
9192
9193 \begin_layout Plain Layout
9194 Theorems (AMS)
9195 \end_layout
9196
9197 \end_inset
9198
9199  modules, in the latter case in both starred (unnumbered) and unstarred
9200  (numbered) versions.
9201  These same environments are provided only in the starred versions by the
9202  
9203 \begin_inset Flex Code
9204 status collapsed
9205
9206 \begin_layout Plain Layout
9207 Theorems (Starred)
9208 \end_layout
9209
9210 \end_inset
9211
9212  module:
9213 \end_layout
9214
9215 \begin_layout Theorem
9216 This is typically used for the statements of major results.
9217  
9218 \end_layout
9219
9220 \begin_layout Corollary*
9221 This is used for statements which follow fairly directly from previous statement
9222 s.
9223  Again, these can be major results.
9224  
9225 \end_layout
9226
9227 \begin_layout Lemma
9228 These are smaller results needed to prove other statements.
9229 \end_layout
9230
9231 \begin_layout Proposition
9232 These are less major results which (hopefully) add to the general theory
9233  being discussed.
9234 \end_layout
9235
9236 \begin_layout Conjecture
9237 These are statements provided without justification, which the author does
9238  not know how to prove, but which seem to be true (to the author, at least).
9239 \end_layout
9240
9241 \begin_layout Definition*
9242 Guess what this is for.
9243  The font is different for this environment than for the previous ones.
9244  
9245 \end_layout
9246
9247 \begin_layout Example*
9248 Used for examples illustrating proven results.
9249 \end_layout
9250
9251 \begin_layout Problem
9252 It's not really known what this is for.
9253  You should figure it out.
9254 \end_layout
9255
9256 \begin_layout Exercise*
9257 Write a description for this one.
9258 \end_layout
9259
9260 \begin_layout Remark
9261 This environment is also a type of theorem, usually a lesser sort of observation.
9262 \end_layout
9263
9264 \begin_layout Claim*
9265 Often used in the course of giving a proof of a larger result.
9266 \end_layout
9267
9268 \begin_layout Case
9269 Generally, these are used to break up long arguments, using specific instances
9270  of some condition.
9271  
9272 \end_layout
9273
9274 \begin_layout Case
9275 The numbering scheme for cases is on its own, not together with other numbered
9276  statements.
9277  
9278 \end_layout
9279
9280 \begin_layout Proof
9281 At the end of this environment, a QED symbol (usually a square, but it can
9282  vary with different styles) is placed.
9283  If you want to have other environments within this one—for example, Case
9284  environments—and have the QED symbol appear only after them, then the other
9285  environments need to be nested within the proof environment.
9286  See the section 
9287 \emph on
9288 Nesting Environments
9289 \emph default
9290  of the 
9291 \emph on
9292 User's Guide
9293 \emph default
9294  for information on nesting.
9295 \end_layout
9296
9297 \begin_layout Standard
9298 And these environments are provided by 
9299 \begin_inset Flex Code
9300 status collapsed
9301
9302 \begin_layout Plain Layout
9303 Theorems (AMS-Extended)
9304 \end_layout
9305
9306 \end_inset
9307
9308 :
9309 \end_layout
9310
9311 \begin_layout Criterion*
9312 A required condition.
9313 \end_layout
9314
9315 \begin_layout Algorithm*
9316 A general procedure to be used.
9317 \end_layout
9318
9319 \begin_layout Axiom*
9320 This is a property or statement taken as true within the system being discussed.
9321 \end_layout
9322
9323 \begin_layout Condition*
9324 Sometimes used to state a condition assumed within the present context of
9325  discussion.
9326 \end_layout
9327
9328 \begin_layout Note*
9329 Similar to a Remark.
9330 \end_layout
9331
9332 \begin_layout Notation*
9333 Used for the explanation of, yes, notation.
9334 \end_layout
9335
9336 \begin_layout Summary
9337 Do we really need to tell you? 
9338 \end_layout
9339
9340 \begin_layout Acknowledgement*
9341 Acknowledgement.
9342 \end_layout
9343
9344 \begin_layout Conclusion*
9345 Sometimes used at the end of a long train of argument.
9346 \end_layout
9347
9348 \begin_layout Fact
9349 Used in a way similar to Proposition, though perhaps lower on the scale.
9350 \end_layout
9351
9352 \begin_layout Standard
9353 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9354  fonts packages.
9355  They need to be available on your system in order to use these environments.
9356 \end_layout
9357
9358 \begin_layout Section
9359 AGU journals (
9360 \family sans
9361 aguplus
9362 \family default
9363 )
9364 \end_layout
9365
9366 \begin_layout Standard
9367 by 
9368 \shape smallcaps
9369 Martin Vermeer
9370 \end_layout
9371
9372 \begin_layout Subsection
9373 Description
9374 \end_layout
9375
9376 \begin_layout Standard
9377 These are the layout files for some of the journals of the American Geophysical
9378  Society.
9379  It is assumed that you have both the AGU's own class files and AGUplus
9380  installed (everything to be found at
9381 \begin_inset Flex URL
9382 status collapsed
9383
9384 \begin_layout Plain Layout
9385
9386 ftp://ftp.agu.org/journals/latex/journals
9387 \end_layout
9388
9389 \end_inset
9390
9391 ).
9392 \end_layout
9393
9394 \begin_layout Subsection
9395 New styles
9396 \end_layout
9397
9398 \begin_layout Standard
9399 Redefined are 
9400 \family sans
9401 Paragraph
9402 \family default
9403
9404 \family sans
9405 Paragraph*
9406 \family default
9407 .
9408  They are still called this in the LyX GUI, though their LaTeX equivalents
9409  in the AGU classes are 
9410 \family sans
9411 Subsubsubsection
9412 \family default
9413  and 
9414 \family sans
9415 Subsubsubsection*
9416 \family default
9417 .
9418 \end_layout
9419
9420 \begin_layout Standard
9421 Newly defined styles are 
9422 \family sans
9423 Left_Header
9424 \family default
9425
9426 \family sans
9427 Right_Header
9428 \family default
9429
9430 \family sans
9431 Received
9432 \family default
9433
9434 \family sans
9435 Revised
9436 \family default
9437
9438 \family sans
9439 Accepted
9440 \family default
9441
9442 \family sans
9443 CCC
9444 \family default
9445
9446 \family sans
9447 PaperId
9448 \family default
9449
9450 \family sans
9451 AuthorAddr
9452 \family default
9453
9454 \family sans
9455 SlugComment
9456 \family default
9457 .
9458  These are mostly manuscript attributes and defined in the AGU class documentati
9459 on.
9460 \end_layout
9461
9462 \begin_layout Standard
9463 I suspect this is still badly incomplete.
9464 \end_layout
9465
9466 \begin_layout Subsection
9467 New floats
9468 \end_layout
9469
9470 \begin_layout Standard
9471
9472 \family sans
9473 Planotable
9474 \family default
9475  and 
9476 \family sans
9477 Plate
9478 \family default
9479 .
9480  We also have a new 
9481 \family sans
9482 Table_Caption
9483 \family default
9484 .
9485 \end_layout
9486
9487 \begin_layout Subsection
9488 Supported journals
9489 \end_layout
9490
9491 \begin_layout Itemize
9492
9493 \emph on
9494 Journal of Geophysical Research
9495 \emph default
9496
9497 \family typewriter
9498 jgrga.layout
9499 \family default
9500  — Martin Vermeer
9501 \end_layout
9502
9503 \begin_layout Standard
9504 Add your own, it isn't so hard! Look at the 
9505 \family typewriter
9506 jgrga.layout
9507 \family default
9508  example and 
9509 \family typewriter
9510 aguplus.inc
9511 \family default
9512 .
9513 \end_layout
9514
9515 \begin_layout Subsection
9516 Bugs and things to remember
9517 \end_layout
9518
9519 \begin_layout Standard
9520 In order to use the new layouts, you must remember to do the following for
9521  a new document:
9522 \end_layout
9523
9524 \begin_layout Enumerate
9525
9526 \emph on
9527 Turn off babel
9528 \emph default
9529 .
9530  This can be done in the 
9531 \family sans
9532 Layout\SpecialChar \menuseparator
9533 Document
9534 \family default
9535  or 
9536 \family sans
9537 Document\SpecialChar \menuseparator
9538 Settings
9539 \family default
9540  menu item.
9541  (AGU articles are always in English, right? So 
9542 \emph on
9543 don't
9544 \emph default
9545  choose a language.)
9546 \end_layout
9547
9548 \begin_layout Enumerate
9549 Enter 
9550 \family typewriter
9551 jgrga
9552 \family default
9553  into the document's 
9554 \family sans
9555 Extra Options
9556 \family default
9557  field.
9558  (Yes, this is a bug.)
9559 \end_layout
9560
9561 \begin_layout Enumerate
9562 Make sure you use the 
9563 \family typewriter
9564 agu.bst
9565 \family default
9566  bibliography style, by entering 
9567 \family sans
9568 agu
9569 \family default
9570  into the second field of the BibTeX inset.
9571  None of the standard styles will do.
9572 \end_layout
9573
9574 \begin_layout Section
9575 Broadway
9576 \end_layout
9577
9578 \begin_layout Standard
9579 by 
9580 \shape smallcaps
9581 Garst Reese
9582 \end_layout
9583
9584 \begin_layout Subsection
9585 Introduction
9586 \end_layout
9587
9588 \begin_layout Standard
9589 Broadway is for writing plays.
9590  The format is more decorative than Hollywood, and much less standardized.
9591  This format should be suitable for workshops.
9592 \end_layout
9593
9594 \begin_layout Subsection
9595 Special problems
9596 \end_layout
9597
9598 \begin_layout Standard
9599 The same as in Hollywood.
9600 \end_layout
9601
9602 \begin_layout Subsection
9603 Special features
9604 \end_layout
9605
9606 \begin_layout Standard
9607 Insert the 
9608 \family sans
9609 Speaker
9610 \family default
9611  names as labels then cross-reference the label to insert the name.
9612  The cross-reference dialog will show the current cast of characters.
9613 \end_layout
9614
9615 \begin_layout Subsection
9616 Paper size and Margins
9617 \end_layout
9618
9619 \begin_layout Standard
9620 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9621 \end_layout
9622
9623 \begin_layout Subsection
9624 Environments
9625 \end_layout
9626
9627 \begin_layout Standard
9628 The following environments are available.
9629  You can use broadway.bind to get the bind keys shown at the right.
9630 \end_layout
9631
9632 \begin_layout Itemize
9633
9634 \family sans
9635 Standard
9636 \begin_inset Newline newline
9637 \end_inset
9638
9639
9640 \family default
9641 You should not have to use this, but it is here for anything that does not
9642  fit otherwise.
9643 \end_layout
9644
9645 \begin_layout Itemize
9646
9647 \family sans
9648 Narrative
9649 \begin_inset space \hfill{}
9650 \end_inset
9651
9652 M-z n
9653 \begin_inset Newline newline
9654 \end_inset
9655
9656
9657 \family default
9658 Used to describe stage setting and the action.
9659  First use of speaker names in all CAPs.
9660 \end_layout
9661
9662 \begin_layout Itemize
9663
9664 \family sans
9665 ACT
9666 \begin_inset space \hfill{}
9667 \end_inset
9668
9669 M-z a
9670 \begin_inset Newline newline
9671 \end_inset
9672
9673
9674 \family default
9675 Automatically numbered.
9676  On screen it will be arabic, but will print as Roman.
9677 \end_layout
9678
9679 \begin_layout Itemize
9680
9681 \family sans
9682 ACT*
9683 \begin_inset space \hfill{}
9684 \end_inset
9685
9686 M-z S at
9687 \begin_inset Newline newline
9688 \end_inset
9689
9690
9691 \family default
9692 Subtitle for 
9693 \family sans
9694 ACT.
9695
9696 \family default
9697  It is just centered text.
9698 \end_layout
9699
9700 \begin_layout Itemize
9701
9702 \family sans
9703 SCENE
9704 \begin_inset space \hfill{}
9705 \end_inset
9706
9707 M-z S-S
9708 \begin_inset Newline newline
9709 \end_inset
9710
9711
9712 \family default
9713 Not automatically numbered.
9714  You supply the number.
9715  This is because I couldn't figure out how.
9716 \end_layout
9717
9718 \begin_layout Itemize
9719
9720 \family sans
9721 AT_RISE:
9722 \begin_inset space \hfill{}
9723 \end_inset
9724
9725 M-z S-R
9726 \begin_inset Newline newline
9727 \end_inset
9728
9729
9730 \family default
9731 A special case of Narrative to describe the setting and action as the curtain
9732  rises.
9733 \end_layout
9734
9735 \begin_layout Itemize
9736
9737 \family sans
9738 Speaker
9739 \begin_inset space \hfill{}
9740 \end_inset
9741
9742 M-z s
9743 \begin_inset Newline newline
9744 \end_inset
9745
9746
9747 \family default
9748 The speaker's (actor's) title, centered in all CAPS.
9749 \end_layout
9750
9751 \begin_layout Itemize
9752
9753 \family sans
9754 Parenthetical
9755 \begin_inset space \hfill{}
9756 \end_inset
9757
9758 M-z p
9759 \begin_inset Newline newline
9760 \end_inset
9761
9762
9763 \family default
9764 Instructions to the speaker.
9765  The parentheses are automatically inserted.
9766  The ( will appear on screen, but both will be in the printed play.
9767  This environment is only used within 
9768 \family sans
9769 Dialogue
9770 \family default
9771 .
9772 \end_layout
9773
9774 \begin_layout Itemize
9775
9776 \family sans
9777 Dialogue
9778 \begin_inset space \hfill{}
9779 \end_inset
9780
9781 M-z d
9782 \begin_inset Newline newline
9783 \end_inset
9784
9785
9786 \family default
9787 What the Speaker says.
9788 \end_layout
9789
9790 \begin_layout Itemize
9791
9792 \family sans
9793 CURTAIN
9794 \begin_inset space \hfill{}
9795 \end_inset
9796
9797 M-z S-C
9798 \begin_inset Newline newline
9799 \end_inset
9800
9801
9802 \family default
9803 The curtain comes down.
9804 \end_layout
9805
9806 \begin_layout Itemize
9807
9808 \family sans
9809 Title
9810 \begin_inset space \hfill{}
9811 \end_inset
9812
9813 M-z S-T
9814 \end_layout
9815
9816 \begin_layout Itemize
9817
9818 \family sans
9819 Author
9820 \begin_inset space \hfill{}
9821 \end_inset
9822
9823 M-z S-A
9824 \end_layout
9825
9826 \begin_layout Itemize
9827
9828 \family sans
9829 Right_Address
9830 \begin_inset space \hfill{}
9831 \end_inset
9832
9833 M-z r
9834 \end_layout
9835
9836 \begin_layout Standard
9837 Hello there.
9838 \end_layout
9839
9840 \begin_layout Section
9841 Dinbrief
9842 \end_layout
9843
9844 \begin_layout Standard
9845 The document class 
9846 \family sans
9847 dinbrief
9848 \family default
9849  can be used to type letters according to German conventions.
9850  A template file is included in 
9851 \family typewriter
9852 .../lyx/share/templates
9853 \family default
9854  for you to use as a starting point.
9855 \end_layout
9856
9857 \begin_layout Section
9858 EGS journals (
9859 \family sans
9860 egs
9861 \family default
9862 )
9863 \end_layout
9864
9865 \begin_layout Standard
9866 by 
9867 \shape smallcaps
9868 Martin Vermeer
9869 \end_layout
9870
9871 \begin_layout Subsection
9872 Description
9873 \end_layout
9874
9875 \begin_layout Standard
9876 This is the layout file for the European Geophysical Society journals.
9877  The needed 
9878 \family typewriter
9879 egs.cls
9880 \family default
9881  can be downloaded from the web site of the EGS under 
9882 \begin_inset Flex URL
9883 status collapsed
9884
9885 \begin_layout Plain Layout
9886
9887 www.copernicus.org
9888 \end_layout
9889
9890 \end_inset
9891
9892 .
9893 \end_layout
9894
9895 \begin_layout Subsection
9896 New styles
9897 \end_layout
9898
9899 \begin_layout Standard
9900
9901 \family sans
9902 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9903  Accepted
9904 \family default
9905
9906 \family sans
9907 Offsets
9908 \family default
9909 .
9910  The current layout file is unfortunately very unmodular and would benefit
9911  from using the various 
9912 \family typewriter
9913 std*.inc
9914 \family default
9915  file inclusions.
9916 \end_layout
9917
9918 \begin_layout Section
9919 Elsevier Journals
9920 \end_layout
9921
9922 \begin_layout Standard
9923 See the LyX template file 
9924 \family typewriter
9925 elsarticle.lyx
9926 \family default
9927 .
9928  It contains all infos you need.
9929 \end_layout
9930
9931 \begin_layout Section
9932 Foils [aka 
9933 \family sans
9934 FoilTeX
9935 \family default
9936 ]
9937 \begin_inset CommandInset label
9938 LatexCommand label
9939 name "sec:foiltex"
9940
9941 \end_inset
9942
9943
9944 \end_layout
9945
9946 \begin_layout Standard
9947 by 
9948 \noun on
9949 Allan Rae
9950 \end_layout
9951
9952 \begin_layout Subsection
9953 Introduction
9954 \end_layout
9955
9956 \begin_layout Standard
9957 This section describes how to use LyX to make slides for overhead projectors.
9958  There are two document classes that can do this: the default slides class
9959  and the 
9960 \family sans
9961 FoilTeX
9962 \family default
9963  slides class.
9964  This section documents the latter.
9965 \end_layout
9966
9967 \begin_layout Standard
9968 I'm going to say this again, nice and clear, so that there's no misunderstanding
9969 :
9970 \end_layout
9971
9972 \begin_layout Standard
9973 \begin_inset VSpace bigskip
9974 \end_inset
9975
9976
9977 \end_layout
9978
9979 \begin_layout Standard
9980 \align center
9981
9982 \size large
9983 This section documents the class 
9984 \begin_inset Quotes eld
9985 \end_inset
9986
9987
9988 \family sans
9989 slides (FoilTeX)
9990 \family default
9991
9992 \begin_inset Quotes erd
9993 \end_inset
9994
9995  
9996 \emph on
9997 only.
9998 \end_layout
9999
10000 \begin_layout Standard
10001 \begin_inset VSpace bigskip
10002 \end_inset
10003
10004
10005 \end_layout
10006
10007 \begin_layout Standard
10008 If you're looking for the documentation for 
10009 \begin_inset Quotes eld
10010 \end_inset
10011
10012
10013 \family sans
10014 slides (default)
10015 \family default
10016
10017 \begin_inset Quotes erd
10018 \end_inset
10019
10020 , check out section
10021 \begin_inset space ~
10022 \end_inset
10023
10024
10025 \begin_inset CommandInset ref
10026 LatexCommand ref
10027 reference "sec:slitex"
10028
10029 \end_inset
10030
10031 .
10032  If your machine doesn't have the 
10033 \family sans
10034 foils
10035 \family default
10036  class [
10037 \begin_inset Quotes eld
10038 \end_inset
10039
10040
10041 \family sans
10042 slides (FoilTeX)
10043 \family default
10044
10045 \begin_inset Quotes erd
10046 \end_inset
10047
10048 ] installed, you'll probably have to use the default 
10049 \family sans
10050 slides
10051 \family default
10052  class, which isn't quite as good as 
10053 \family sans
10054 foils.
10055 \end_layout
10056
10057 \begin_layout Standard
10058 The 
10059 \family sans
10060 foils
10061 \family default
10062  class is designed for use with version 2.1 of the 
10063 \family sans
10064 foils.cls
10065 \family default
10066  LaTeX class file which is now an integral part of LaTeX2e.
10067 \end_layout
10068
10069 \begin_layout Subsection
10070 Getting Started
10071 \end_layout
10072
10073 \begin_layout Standard
10074 Obviously, to use this document class, you need to select 
10075 \begin_inset Quotes eld
10076 \end_inset
10077
10078
10079 \family sans
10080 slides (FoilTeX)
10081 \family default
10082
10083 \begin_inset Quotes erd
10084 \end_inset
10085
10086  from the 
10087 \family sans
10088 Class
10089 \family default
10090  entry in the 
10091 \family sans
10092 Document
10093 \begin_inset space ~
10094 \end_inset
10095
10096 Layout
10097 \family default
10098  dialog.
10099  There are some settings in the 
10100 \family sans
10101 Document
10102 \begin_inset space ~
10103 \end_inset
10104
10105 Layout
10106 \family default
10107  dialog that you should know about that are specific to this class:
10108 \end_layout
10109
10110 \begin_layout Itemize
10111 Don't change the options 
10112 \family sans
10113 Sides
10114 \family default
10115  and 
10116 \family sans
10117 Columns
10118 \family default
10119  on the 
10120 \family sans
10121 Document
10122 \begin_inset space ~
10123 \end_inset
10124
10125 Layout
10126 \family default
10127  dialog.
10128  They're ignored by the 
10129 \family sans
10130 foils
10131 \family default
10132  class.
10133 \end_layout
10134
10135 \begin_layout Itemize
10136 The default font size is 20
10137 \begin_inset space \thinspace{}
10138 \end_inset
10139
10140 pt with the other options being 17
10141 \begin_inset space \thinspace{}
10142 \end_inset
10143
10144 pt, 25
10145 \begin_inset space \thinspace{}
10146 \end_inset
10147
10148 pt and 30
10149 \begin_inset space \thinspace{}
10150 \end_inset
10151
10152 pt.
10153 \end_layout
10154
10155 \begin_layout Itemize
10156 The default font is 
10157 \family sans
10158 sans
10159 \family default
10160  
10161 \family sans
10162 serif
10163 \family default
10164  but all math equations are still typeset in the usual roman font.
10165 \end_layout
10166
10167 \begin_layout Itemize
10168
10169 \family sans
10170 FoilTeX
10171 \family default
10172  supports A4 and Letter paper sizes as well as a special size for working
10173  with 35
10174 \begin_inset space \thinspace{}
10175 \end_inset
10176
10177 mm slides.
10178  It doesn't support A5, B5, legal or executive paper sizes.
10179 \end_layout
10180
10181 \begin_layout Itemize
10182 Don't bother changing the 
10183 \family sans
10184 Float Placement
10185 \family default
10186  settings because they are ignored anyway.
10187  All floats appear where they are defined in the text.
10188 \end_layout
10189
10190 \begin_layout Itemize
10191 The 
10192 \family sans
10193 Pagestyle
10194 \family default
10195  setting behaves a bit differently for this class.
10196  
10197 \family sans
10198 FoilTeX
10199 \family default
10200  provides extensive footer and header capabilities including a user-defined
10201  logo.
10202  See section
10203 \begin_inset space ~
10204 \end_inset
10205
10206
10207 \begin_inset CommandInset ref
10208 LatexCommand ref
10209 reference "sec:foilfoot"
10210
10211 \end_inset
10212
10213  for more details.
10214  The title page is treated differently to all other pages in the document
10215  and is 
10216 \emph on
10217 always
10218 \emph default
10219  unnumbered and 
10220 \emph on
10221 always
10222 \emph default
10223  has the logo centered at the bottom of the page (if one is defined).
10224  The possible page style choices and what they do are as follows:
10225 \end_layout
10226
10227 \begin_deeper
10228 \begin_layout Labeling
10229 \labelwidthstring MMMMMMM
10230
10231 \family sans
10232 \series bold
10233 empty
10234 \family default
10235 \series default
10236  The final output contains no page numbers, or other headers or footers
10237  (except footnotes of course).
10238  
10239 \end_layout
10240
10241 \begin_layout Labeling
10242 \labelwidthstring MMMMMMM
10243
10244 \family sans
10245 \series bold
10246 plain
10247 \family default
10248 \series default
10249  The final output contains page numbers centered at the bottom of the page.
10250  No other headings or footers (other than footnotes).
10251 \end_layout
10252
10253 \begin_layout Labeling
10254 \labelwidthstring MMMMMMM
10255
10256 \series bold
10257 foilheadings
10258 \series default
10259  Page numbers in lower right corner.
10260  Additional headers and footers are also shown.
10261  This is also the default.
10262 \end_layout
10263
10264 \begin_layout Labeling
10265 \labelwidthstring MMMMMMM
10266
10267 \series bold
10268 fancy
10269 \series default
10270  Gives you access to the 
10271 \family sans
10272 fancyheadings
10273 \family default
10274  package although its use with 
10275 \family sans
10276 FoilTeX
10277 \family default
10278  is discouraged by the writer of the 
10279 \family sans
10280 FoilTeX
10281 \family default
10282  package because of some potential page layout clashes.
10283 \end_layout
10284
10285 \end_deeper
10286 \begin_layout Subsubsection
10287 Extra Options
10288 \end_layout
10289
10290 \begin_layout Standard
10291 The following options may be used in the extra class options in the 
10292 \family sans
10293 Document\SpecialChar \menuseparator
10294 Settings
10295 \family default
10296  dialog.
10297 \end_layout
10298
10299 \begin_layout Labeling
10300 \labelwidthstring MMMMMMx
10301
10302 \series bold
10303 35mmSlide
10304 \series default
10305  This sets up the page layout for 7.33
10306 \begin_inset space \thinspace{}
10307 \end_inset
10308
10309 in by 11
10310 \begin_inset space \thinspace{}
10311 \end_inset
10312
10313 in paper, which is about the same aspect ratio as a 35
10314 \begin_inset space \thinspace{}
10315 \end_inset
10316
10317 mm slide, making it a bit easier to work with this medium.
10318 \end_layout
10319
10320 \begin_layout Labeling
10321 \labelwidthstring MMMMMMx
10322
10323 \series bold
10324 headrule
10325 \series default
10326  Places a rule across the page below the header on every page except the
10327  title page.
10328 \end_layout
10329
10330 \begin_layout Labeling
10331 \labelwidthstring MMMMMMx
10332
10333 \series bold
10334 footrule
10335 \series default
10336  Places a rule across the page above the footer on every page except the
10337  title page.
10338 \end_layout
10339
10340 \begin_layout Labeling
10341 \labelwidthstring MMMMMMx
10342
10343 \series bold
10344 dvips
10345 \series default
10346  This is automatically set each time you create a new 
10347 \family sans
10348 foils
10349 \family default
10350  document.
10351  This option tells 
10352 \family sans
10353 FoilTeX
10354 \family default
10355  to use the dvips driver to rotate those pages that are set as landscape
10356  foils.
10357 \end_layout
10358
10359 \begin_layout Labeling
10360 \labelwidthstring MMMMMMx
10361
10362 \series bold
10363 landscape
10364 \series default
10365  Simply changes the page dimensions to those of a landscape page but doesn't
10366  do any rotation.
10367  Thus if you use this option you need to use an external program to rotate
10368  each page or feed your paper through your printer as landscape.
10369  Note that this option effectively reverses the roles of the 
10370 \family sans
10371 Foilhead
10372 \family default
10373  and 
10374 \family sans
10375 Rotatefoilhead
10376 \family default
10377  environments (don't worry these are described in the next section).
10378 \end_layout
10379
10380 \begin_layout Labeling
10381 \labelwidthstring MMMMMMx
10382
10383 \series bold
10384 leqno
10385 \series default
10386  Equation numbers on the left.
10387 \end_layout
10388
10389 \begin_layout Labeling
10390 \labelwidthstring MMMMMMx
10391
10392 \series bold
10393 fleqn
10394 \series default
10395  Flush-left equations.
10396 \end_layout
10397
10398 \begin_layout Subsection
10399 Supported Environments
10400 \end_layout
10401
10402 \begin_layout Standard
10403 Most of the environments commonly supported in other classes are also supported
10404  by the 
10405 \family sans
10406 foils
10407 \family default
10408  class.
10409  There are several additional environments provided by 
10410 \family sans
10411 FoilTeX
10412 \family default
10413  as well as a couple added by LyX.
10414  The following environments are shared with other classes:
10415 \end_layout
10416
10417 \begin_layout Standard
10418 \begin_inset ERT
10419 status open
10420
10421 \begin_layout Plain Layout
10422
10423
10424 \backslash
10425 begin{multicols}{2}
10426 \end_layout
10427
10428 \end_inset
10429
10430
10431 \end_layout
10432
10433 \begin_layout Itemize
10434
10435 \family sans
10436 Standard
10437 \end_layout
10438
10439 \begin_layout Itemize
10440
10441 \family sans
10442 Itemize
10443 \end_layout
10444
10445 \begin_layout Itemize
10446
10447 \family sans
10448 Enumerate
10449 \end_layout
10450
10451 \begin_layout Itemize
10452
10453 \family sans
10454 Description
10455 \end_layout
10456
10457 \begin_layout Itemize
10458
10459 \family sans
10460 List
10461 \end_layout
10462
10463 \begin_layout Itemize
10464
10465 \family sans
10466 LyX-Code
10467 \end_layout
10468
10469 \begin_layout Itemize
10470
10471 \family sans
10472 Verse
10473 \end_layout
10474
10475 \begin_layout Itemize
10476
10477 \family sans
10478 Quote
10479 \end_layout
10480
10481 \begin_layout Itemize
10482
10483 \family sans
10484 Quotation
10485 \end_layout
10486
10487 \begin_layout Itemize
10488
10489 \family sans
10490 Title
10491 \end_layout
10492
10493 \begin_layout Itemize
10494
10495 \family sans
10496 Author
10497 \end_layout
10498
10499 \begin_layout Itemize
10500
10501 \family sans
10502 Date
10503 \end_layout
10504
10505 \begin_layout Itemize
10506
10507 \family sans
10508 Abstract
10509 \end_layout
10510
10511 \begin_layout Itemize
10512
10513 \family sans
10514 Bibliography
10515 \end_layout
10516
10517 \begin_layout Itemize
10518
10519 \family sans
10520 Address
10521 \end_layout
10522
10523 \begin_layout Itemize
10524
10525 \family sans
10526 RightAddress
10527 \end_layout
10528
10529 \begin_layout Itemize
10530
10531 \family sans
10532 Caption
10533 \end_layout
10534
10535 \begin_layout Itemize
10536
10537 \family sans
10538 Comment
10539 \end_layout
10540
10541 \begin_layout Standard
10542 \begin_inset ERT
10543 status open
10544
10545 \begin_layout Plain Layout
10546
10547
10548 \backslash
10549 end{multicols}
10550 \end_layout
10551
10552 \end_inset
10553
10554
10555 \end_layout
10556
10557 \begin_layout Standard
10558 That is, all the major environments apart from the sectioning environments.
10559  Since foils are essentially self-contained sections, with a title and body,
10560  
10561 \family sans
10562 FoilTeX
10563 \family default
10564  provides specific commands for starting new foils and these are:
10565 \end_layout
10566
10567 \begin_layout Itemize
10568
10569 \family sans
10570 Foilhead
10571 \end_layout
10572
10573 \begin_layout Itemize
10574
10575 \family sans
10576 Rotatefoilhead
10577 \end_layout
10578
10579 \begin_layout Standard
10580 LyX also provides slightly modified versions of these two environments called:
10581 \end_layout
10582
10583 \begin_layout Itemize
10584
10585 \family sans
10586 ShortFoilhead
10587 \end_layout
10588
10589 \begin_layout Itemize
10590
10591 \family sans
10592 ShortRotatefoilhead
10593 \end_layout
10594
10595 \begin_layout Standard
10596 and the differences will be explained in the next section.
10597 \end_layout
10598
10599 \begin_layout Standard
10600 Since foils are often used in presenting ideas or new theorems and such
10601  
10602 \family sans
10603 FoilTeX
10604 \family default
10605  also provides a comprehensive box of goodies for presenting them:
10606 \end_layout
10607
10608 \begin_layout Standard
10609 \begin_inset ERT
10610 status open
10611
10612 \begin_layout Plain Layout
10613
10614
10615 \backslash
10616 begin{multicols}{2}
10617 \end_layout
10618
10619 \end_inset
10620
10621
10622 \end_layout
10623
10624 \begin_layout Itemize
10625
10626 \family sans
10627 Theorem
10628 \end_layout
10629
10630 \begin_layout Itemize
10631
10632 \family sans
10633 Lemma
10634 \end_layout
10635
10636 \begin_layout Itemize
10637
10638 \family sans
10639 Corollary
10640 \end_layout
10641
10642 \begin_layout Itemize
10643
10644 \family sans
10645 Proposition
10646 \end_layout
10647
10648 \begin_layout Itemize
10649
10650 \family sans
10651 Definition
10652 \end_layout
10653
10654 \begin_layout Itemize
10655
10656 \family sans
10657 Proof
10658 \end_layout
10659
10660 \begin_layout Itemize
10661
10662 \family sans
10663 Theorem*
10664 \end_layout
10665
10666 \begin_layout Itemize
10667
10668 \family sans
10669 Lemma*
10670 \end_layout
10671
10672 \begin_layout Itemize
10673
10674 \family sans
10675 Corollary*
10676 \end_layout
10677
10678 \begin_layout Itemize
10679
10680 \family sans
10681 Proposition*
10682 \end_layout
10683
10684 \begin_layout Itemize
10685
10686 \family sans
10687 Definition*
10688 \end_layout
10689
10690 \begin_layout Standard
10691 \begin_inset ERT
10692 status open
10693
10694 \begin_layout Plain Layout
10695
10696
10697 \backslash
10698 end{multicols}
10699 \end_layout
10700
10701 \end_inset
10702
10703
10704 \end_layout
10705
10706 \begin_layout Standard
10707 The starred versions are unnumbered while the unstarred versions are numbered.
10708  There are also two list environments added by LyX and these are:
10709 \end_layout
10710
10711 \begin_layout Itemize
10712
10713 \family sans
10714 TickList
10715 \end_layout
10716
10717 \begin_layout Itemize
10718
10719 \family sans
10720 CrossList
10721 \end_layout
10722
10723 \begin_layout Standard
10724
10725 \family sans
10726 FoilTeX
10727 \family default
10728  provides some powerful header and footer capabilities that are best set
10729  in the preamble although they may be set at any point in a document.
10730  If you want to change these settings in your document the best place to
10731  do so is at the very top of a foil, i.
10732 \begin_inset space \thinspace{}
10733 \end_inset
10734
10735 g.
10736 \emph on
10737
10738 \begin_inset space \space{}
10739 \end_inset
10740
10741
10742 \emph default
10743 straight after the foilhead.
10744 \end_layout
10745
10746 \begin_layout Standard
10747 For this purpose, the following command styles are provided [
10748 \shape smallcaps
10749 Martin Vermeer
10750 \shape default
10751 ]:
10752 \end_layout
10753
10754 \begin_layout Standard
10755 \begin_inset ERT
10756 status open
10757
10758 \begin_layout Plain Layout
10759
10760
10761 \backslash
10762 begin{multicols}{2}
10763 \end_layout
10764
10765 \end_inset
10766
10767
10768 \end_layout
10769
10770 \begin_layout Itemize
10771
10772 \family sans
10773 My
10774 \begin_inset space ~
10775 \end_inset
10776
10777 Logo
10778 \end_layout
10779
10780 \begin_layout Itemize
10781
10782 \family sans
10783 Restriction
10784 \end_layout
10785
10786 \begin_layout Itemize
10787
10788 \family sans
10789 Right
10790 \begin_inset space ~
10791 \end_inset
10792
10793 Footer
10794 \end_layout
10795
10796 \begin_layout Itemize
10797
10798 \family sans
10799 Right
10800 \begin_inset space ~
10801 \end_inset
10802
10803 Header
10804 \end_layout
10805
10806 \begin_layout Itemize
10807
10808 \family sans
10809 Left
10810 \begin_inset space ~
10811 \end_inset
10812
10813 Header
10814 \end_layout
10815
10816 \begin_deeper
10817 \begin_layout Standard
10818 \begin_inset space ~
10819 \end_inset
10820
10821
10822 \end_layout
10823
10824 \end_deeper
10825 \begin_layout Standard
10826 \begin_inset ERT
10827 status open
10828
10829 \begin_layout Plain Layout
10830
10831
10832 \backslash
10833 end{multicols}
10834 \end_layout
10835
10836 \end_inset
10837
10838
10839 \end_layout
10840
10841 \begin_layout Standard
10842 There are also a few commands provided by 
10843 \family sans
10844 FoilTeX
10845 \family default
10846  that aren't directly supported by LyX but I'll tell you what they do and
10847  how to use them in section
10848 \begin_inset space ~
10849 \end_inset
10850
10851
10852 \begin_inset CommandInset ref
10853 LatexCommand ref
10854 reference "sec:unsuppfoils"
10855
10856 \end_inset
10857
10858 .
10859 \end_layout
10860
10861 \begin_layout Subsection
10862 Building a Set of Foils
10863 \end_layout
10864
10865 \begin_layout Standard
10866 This section will give a simple introduction to using the different environments
10867  to build a set of foils.
10868  If you want to see an example set of foils, take a look at the 
10869 \family typewriter
10870 Foils.lyx
10871 \family default
10872  file you find in LyX's 
10873 \family typewriter
10874 examples
10875 \family default
10876  folder.
10877 \end_layout
10878
10879 \begin_layout Subsubsection
10880 Give It a Title Page
10881 \end_layout
10882
10883 \begin_layout Standard
10884 Unlike other classes that provide 
10885 \family sans
10886 Title
10887 \family default
10888
10889 \family sans
10890 Author
10891 \family default
10892
10893 \family sans
10894 Date
10895 \family default
10896  and 
10897 \family sans
10898 Abstract
10899 \family default
10900  environments, 
10901 \family sans
10902 foils
10903 \family default
10904  creates the title on a page of its own.
10905  If you leave out the 
10906 \family sans
10907 Date
10908 \family default
10909  environment LaTeX will substitute the current date (every time you regenerate
10910  the output).
10911 \end_layout
10912
10913 \begin_layout Subsubsection
10914 Start a New Foil
10915 \end_layout
10916
10917 \begin_layout Standard
10918 As I mentioned earlier, there are four ways of starting a new foil.
10919  For portrait foils you should use 
10920 \family sans
10921 Foilhead
10922 \family default
10923  or 
10924 \family sans
10925 ShortFoilhead.
10926
10927 \family default
10928  The difference between these two environments is the amount of space between
10929  the title of the foil (the foilhead) and the body of the foil.
10930 \end_layout
10931
10932 \begin_layout Standard
10933 Landscape foils are generated using the 
10934 \family sans
10935 Rotatefoilhead
10936 \family default
10937  and 
10938 \family sans
10939 ShortRotatefoilhead
10940 \family default
10941  environments.
10942  Again the only difference is the spacing between foilhead and body.
10943  Both of the short versions have 0.5 inches less separation between the foilhead
10944  and the body.
10945  
10946 \end_layout
10947
10948 \begin_layout Standard
10949 One problem with the support for landscape foils is the requirement that
10950  you have to use the 
10951 \family typewriter
10952 dvips
10953 \family default
10954  driver to generate the PostScript output otherwise the foils won't be rotated.
10955  It is possible to get landscape foils even if you haven't got the 
10956 \family typewriter
10957 dvips
10958 \family default
10959  driver provided you can feed your foils sideways through your printer ;-)
10960 \end_layout
10961
10962 \begin_layout Subsubsection
10963 Theorems, Lemmas, Proofs and more
10964 \end_layout
10965
10966 \begin_layout Standard
10967 Due to a small bug in LyX you can't have two of the same type of these environme
10968 nts directly following each other.
10969  They must be separated by something.
10970  If you try, you will just be extending the previous environment as if you
10971  had merged the two environments together.
10972  So, how do you get around this problem? The simplest option is to insert
10973  some text between the two environments or add a 
10974 \family sans
10975 LaTeX
10976 \family default
10977  environment between the two with just a 
10978 \begin_inset Quotes eld
10979 \end_inset
10980
10981
10982 \family typewriter
10983 %
10984 \family default
10985
10986 \begin_inset Quotes erd
10987 \end_inset
10988
10989  in it.
10990  This will force LyX to produce two separate environments and hence the
10991  correct LaTeX output.
10992  An example is provided in the example file included with the LyX distribution.
10993  Remember, this problem only occurs if you are trying to place two of the
10994  same type of theorem-like environments one directly after the other.
10995 \end_layout
10996
10997 \begin_layout Subsubsection
10998 Lists
10999 \end_layout
11000
11001 \begin_layout Standard
11002 You get all the commonly supported list styles found in other classes as
11003  well as two new ones.
11004  I'll only describe the new ones here.
11005  If you want to find out more about the other list environments check out
11006  the 
11007 \emph on
11008 User's Guide.
11009
11010 \emph default
11011  If you intend to use itemized lists you might also want to read about the
11012  
11013 \family sans
11014 Itemize
11015 \begin_inset space ~
11016 \end_inset
11017
11018 Bullet
11019 \begin_inset space ~
11020 \end_inset
11021
11022 Selection
11023 \family default
11024  dialog described above in section
11025 \begin_inset space ~
11026 \end_inset
11027
11028
11029 \begin_inset CommandInset ref
11030 LatexCommand ref
11031 reference "sec:bullet"
11032
11033 \end_inset
11034
11035 .
11036 \end_layout
11037
11038 \begin_layout Standard
11039 The two new list styles, 
11040 \family sans
11041 TickList
11042 \family default
11043  and 
11044 \family sans
11045 CrossList
11046 \family default
11047 , are designed to make it easier for you to create lists of do's and don'ts
11048  or right and wrong by providing dedicated environments that use a tick
11049  or a cross as the label of the list.
11050  These lists are in fact dedicated variants of the 
11051 \family sans
11052 Itemize
11053 \family default
11054  environment.
11055  They do however require that you have the 
11056 \family typewriter
11057 psnfss
11058 \family default
11059  packages installed.
11060 \end_layout
11061
11062 \begin_layout Subsubsection
11063 Figures and Tables
11064 \end_layout
11065
11066 \begin_layout Standard
11067
11068 \family sans
11069 FoilTeX
11070 \family default
11071  redefines the floating tables and figures so that they appear exactly where
11072  they are in the text rather than pushing them to the top of the page or
11073  to some user specified location.
11074  In fact if you change the float placement settings they are simply ignored.
11075 \end_layout
11076
11077 \begin_layout Subsubsection
11078 Page Headers and Footers
11079 \begin_inset CommandInset label
11080 LatexCommand label
11081 name "sec:foilfoot"
11082
11083 \end_inset
11084
11085
11086 \end_layout
11087
11088 \begin_layout Standard
11089
11090 \family sans
11091 My
11092 \begin_inset space ~
11093 \end_inset
11094
11095 Logo
11096 \family default
11097  and 
11098 \family sans
11099 Restriction
11100 \family default
11101  are two commands used to control the left-footer text string.
11102  The first is meant to allow you to include a graphic logo on your foils
11103  and defaults to 
11104 \begin_inset Quotes eld
11105 \end_inset
11106
11107 -Typeset by 
11108 \family sans
11109 FoilTeX
11110 \family default
11111 -
11112 \begin_inset Quotes erd
11113 \end_inset
11114
11115 .
11116  While the second is meant to provide a classification for the audience,
11117  
11118 \emph on
11119 e.
11120 \begin_inset space \thinspace{}
11121 \end_inset
11122
11123 g.
11124 \emph default
11125
11126 \begin_inset space \space{}
11127 \end_inset
11128
11129 Confidential.
11130  It is empty by default.
11131 \end_layout
11132
11133 \begin_layout Standard
11134 The remaining page corners can be filled by 
11135 \family sans
11136 Right
11137 \begin_inset space ~
11138 \end_inset
11139
11140 Footer
11141 \family default
11142  (which defaults to page numbers), 
11143 \family sans
11144 Right
11145 \begin_inset space ~
11146 \end_inset
11147
11148 Header
11149 \family default
11150  (top right) and 
11151 \family sans
11152 Left
11153 \begin_inset space ~
11154 \end_inset
11155
11156 Header
11157 \family default
11158  (top left).
11159 \end_layout
11160
11161 \begin_layout Subsection
11162 Unsupported 
11163 \family sans
11164 FoilTeX
11165 \family default
11166  Goodies
11167 \begin_inset CommandInset label
11168 LatexCommand label
11169 name "sec:unsuppfoils"
11170
11171 \end_inset
11172
11173
11174 \end_layout
11175
11176 \begin_layout Standard
11177 All the commands mentioned below need to be set in a 
11178 \family sans
11179 LaTeX
11180 \family default
11181  environment or as 
11182 \family sans
11183 TeX
11184 \family default
11185  within another environment.
11186 \end_layout
11187
11188 \begin_layout Subsubsection
11189 Lengths
11190 \end_layout
11191
11192 \begin_layout Standard
11193 All lengths are adjusted using the 
11194 \family typewriter
11195
11196 \backslash
11197 setlength{
11198 \family default
11199 \emph on
11200 lengthname
11201 \family typewriter
11202 \emph default
11203 }{
11204 \family default
11205 \emph on
11206 newlength
11207 \family typewriter
11208 \emph default
11209 }
11210 \family default
11211  command.
11212  Where 
11213 \emph on
11214 lengthname
11215 \emph default
11216  should be replaced by the name given to the length you want to change and
11217  
11218 \emph on
11219 newlength
11220 \emph default
11221  is the length value.
11222  All lengths should be specified in units of length such as inches (
11223 \family typewriter
11224 in
11225 \family default
11226 ), millimeters (
11227 \family typewriter
11228 mm
11229 \family default
11230 ) or points (
11231 \family typewriter
11232 pt
11233 \family default
11234 ) or relative to some document or font-based length such as 
11235 \family typewriter
11236
11237 \backslash
11238 textwidth
11239 \family default
11240 .
11241  
11242 \end_layout
11243
11244 \begin_layout Standard
11245 It's possible to change the spacing between a foilhead and the body of the
11246  foil by adjusting the length specified by 
11247 \family typewriter
11248
11249 \backslash
11250 foilheadskip
11251 \family default
11252 .
11253  For example, to make 
11254 \emph on
11255 all
11256 \emph default
11257  foilheads 0.5
11258 \begin_inset space \space{}
11259 \end_inset
11260
11261 in closer to their bodies put the following in the preamble: 
11262 \family typewriter
11263
11264 \backslash
11265 setlength{
11266 \backslash
11267 foilheadskip}{-0.5in}
11268 \end_layout
11269
11270 \begin_layout Standard
11271 The spacings around floats can be adjusted by setting these lengths:
11272 \end_layout
11273
11274 \begin_layout Labeling
11275 \labelwidthstring MMMMMMMMMMM
11276
11277 \family typewriter
11278
11279 \backslash
11280 abovefloatskip
11281 \family default
11282  Separation between the text and the top of the float
11283 \end_layout
11284
11285 \begin_layout Labeling
11286 \labelwidthstring MMMMMMMMMMM
11287
11288 \family typewriter
11289
11290 \backslash
11291 abovecaptionskip
11292 \family default
11293  Separation between the float and the caption
11294 \end_layout
11295
11296 \begin_layout Labeling
11297 \labelwidthstring MMMMMMMMMMM
11298
11299 \family typewriter
11300
11301 \backslash
11302 belowcaptionskip
11303 \family default
11304  Separation between the caption and the following text
11305 \end_layout
11306
11307 \begin_layout Labeling
11308 \labelwidthstring MMMMMMMMMMM
11309
11310 \family typewriter
11311
11312 \backslash
11313 captionwidth
11314 \family default
11315  You can make the captions narrower than the surrounding text by adjusting
11316  this length.
11317  Best done relative to 
11318 \family typewriter
11319
11320 \backslash
11321 textwidth
11322 \family default
11323 .
11324 \end_layout
11325
11326 \begin_layout Standard
11327 There are also several title page related lengths that you may find useful
11328  if you have a long title or several authors:
11329 \end_layout
11330
11331 \begin_layout Labeling
11332 \labelwidthstring MMMMMMMMMMM
11333
11334 \family typewriter
11335
11336 \backslash
11337 abovetitleskip
11338 \family default
11339  Separation from headers to 
11340 \family sans
11341 Title
11342 \end_layout
11343
11344 \begin_layout Labeling
11345 \labelwidthstring MMMMMMMMMMM
11346
11347 \family typewriter
11348
11349 \backslash
11350 titleauthorskip
11351 \family default
11352  between 
11353 \family sans
11354 Title
11355 \family default
11356  and 
11357 \family sans
11358 Author
11359 \family default
11360  environments
11361 \end_layout
11362
11363 \begin_layout Labeling
11364 \labelwidthstring MMMMMMMMMMM
11365
11366 \family typewriter
11367
11368 \backslash
11369 authorauthorskip
11370 \family default
11371  between multiple 
11372 \family sans
11373 Author
11374 \family default
11375  lines
11376 \end_layout
11377
11378 \begin_layout Labeling
11379 \labelwidthstring MMMMMMMMMMM
11380
11381 \family typewriter
11382
11383 \backslash
11384 authordateskip
11385 \family default
11386  between the 
11387 \family sans
11388 Author
11389 \family default
11390  and the 
11391 \family sans
11392 Date
11393 \end_layout
11394
11395 \begin_layout Labeling
11396 \labelwidthstring MMMMMMMMMMM
11397
11398 \family typewriter
11399
11400 \backslash
11401 dateabstractskip
11402 \family default
11403  between the 
11404 \family sans
11405 Date
11406 \family default
11407  and the 
11408 \family sans
11409 Abstract
11410 \end_layout
11411
11412 \begin_layout Standard
11413 The last length related command affects all the list environments.
11414  If you place 
11415 \family typewriter
11416
11417 \backslash
11418 zerolistvertdimens
11419 \family default
11420  
11421 \emph on
11422 inside
11423 \emph default
11424  a list environment then all the vertical spacing between the list items
11425  is removed.
11426  Note that this is a command not a length so it doesn't require 
11427 \family typewriter
11428
11429 \backslash
11430 setlength
11431 \family default
11432  like the stuff mentioned above.
11433 \end_layout
11434
11435 \begin_layout Subsubsection
11436 Headers and Footers
11437 \end_layout
11438
11439 \begin_layout Standard
11440 The 
11441 \family typewriter
11442
11443 \backslash
11444 LogoOn
11445 \family default
11446  and 
11447 \family typewriter
11448
11449 \backslash
11450 LogoOff
11451 \family default
11452  commands control whether the logo in the 
11453 \family sans
11454 MyLogo
11455 \family default
11456  definition appear on a given page.
11457  If you put 
11458 \family typewriter
11459
11460 \backslash
11461 LogoOff
11462 \family default
11463  in the preamble then none of the foils will have the logo on them.
11464  If you don't want the logo on a particular page place the 
11465 \family typewriter
11466
11467 \backslash
11468 LogoOff
11469 \family default
11470  directly after the foilhead of that page and the 
11471 \family typewriter
11472
11473 \backslash
11474 LogoOn
11475 \family default
11476  directly after the next foilhead.
11477 \end_layout
11478
11479 \begin_layout Standard
11480 If you decide to use the 
11481 \family sans
11482 fancy
11483 \family default
11484  page style setting in the 
11485 \family sans
11486 Document
11487 \begin_inset space ~
11488 \end_inset
11489
11490 Layout
11491 \family default
11492  dialog you should probably add 
11493 \family typewriter
11494
11495 \backslash
11496 let
11497 \backslash
11498 headwidth
11499 \backslash
11500 textwidth
11501 \family default
11502  to your preamble so headers and footers on landscape pages are correctly
11503  placed when rotated.
11504  This is due to some clashes between the page layouts provided by the 
11505 \family sans
11506 fancyheadings
11507 \family default
11508  package and the 
11509 \family sans
11510 foils
11511 \family default
11512  class.
11513 \end_layout
11514
11515 \begin_layout Section
11516 Hollywood (Hollywood spec scripts)
11517 \end_layout
11518
11519 \begin_layout Standard
11520 by 
11521 \shape smallcaps
11522 Garst Reese
11523 \end_layout
11524
11525 \begin_layout Subsection
11526 Introduction
11527 \end_layout
11528
11529 \begin_layout Standard
11530 Getting the format of a Hollywood script right is a 
11531 \begin_inset Quotes eld
11532 \end_inset
11533
11534 rite of passage.
11535 \begin_inset Quotes erd
11536 \end_inset
11537
11538  It is designed to make the readers focus on content and to be easy and
11539  familiar for the actors to read.
11540  Each page of a script should be one minute of film.
11541  Nothing goes in a script that you cannot see or hear on screen.
11542  The courier 12 pt font should be used throughout.
11543  No italics.
11544 \end_layout
11545
11546 \begin_layout Subsection
11547 Special problems
11548 \end_layout
11549
11550 \begin_layout Standard
11551 Speakers' lines should NEVER break in mid-sentence.
11552  If a speaker's lines continue over a page break, repeat the 
11553 \family sans
11554 Speaker
11555 \family default
11556  title followed by (Cont'd).
11557 \end_layout
11558
11559 \begin_layout Subsection
11560 Special features
11561 \end_layout
11562
11563 \begin_layout Standard
11564 Insert the 
11565 \family sans
11566 Speaker
11567 \family default
11568  names as labels then cross-reference the label to insert the name.
11569  The cross-reference dialog will show the current cast of characters.
11570  You can use this to insert the speaker name in narratives also.
11571 \end_layout
11572
11573 \begin_layout Subsection
11574 Paper size and Margins
11575 \end_layout
11576
11577 \begin_layout Standard
11578 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11579 \end_layout
11580
11581 \begin_layout Subsection
11582 Environments
11583 \end_layout
11584
11585 \begin_layout Standard
11586 The following environments are available.
11587  You can use hollywood.bind to get the bind keys shown at the right.
11588 \end_layout
11589
11590 \begin_layout Itemize
11591
11592 \family sans
11593 Standard
11594 \begin_inset Newline newline
11595 \end_inset
11596
11597
11598 \family default
11599 Used where nothing else works.
11600  Try to avoid it.
11601 \end_layout
11602
11603 \begin_layout Itemize
11604
11605 \family sans
11606 FADE_IN
11607 \family default
11608 :
11609 \begin_inset space \hfill{}
11610 \end_inset
11611
11612
11613 \family sans
11614 M-z S-I
11615 \family default
11616
11617 \begin_inset Newline newline
11618 \end_inset
11619
11620 Usually followed by something like 
11621 \begin_inset Quotes eld
11622 \end_inset
11623
11624 on Sally waking up.
11625 \begin_inset Quotes erd
11626 \end_inset
11627
11628
11629 \end_layout
11630
11631 \begin_layout Itemize
11632
11633 \family sans
11634 INT:
11635 \begin_inset space \hfill{}
11636 \end_inset
11637
11638 M-z i
11639 \begin_inset Newline newline
11640 \end_inset
11641
11642
11643 \family default
11644 Introduces a new INTERIOR camera set-up.
11645  Always followed by DAY or NIGHT, or something similar to define the lighting
11646  required.
11647  Everthing on this line in CAPS.
11648 \end_layout
11649
11650 \begin_layout Itemize
11651
11652 \family sans
11653 EXT:
11654 \begin_inset space \hfill{}
11655 \end_inset
11656
11657 M-z e
11658 \begin_inset Newline newline
11659 \end_inset
11660
11661
11662 \family default
11663 Introduces a new EXTERIOR camera set-up.
11664  Everthing on this line in CAPS.
11665 \end_layout
11666
11667 \begin_layout Itemize
11668
11669 \family sans
11670 Speaker
11671 \begin_inset space \hfill{}
11672 \end_inset
11673
11674 M-z s
11675 \begin_inset Newline newline
11676 \end_inset
11677
11678
11679 \family default
11680 The character speaking.
11681 \end_layout
11682
11683 \begin_layout Itemize
11684
11685 \family sans
11686 Parenthetical
11687 \begin_inset space \hfill{}
11688 \end_inset
11689
11690 M-z p
11691 \begin_inset Newline newline
11692 \end_inset
11693
11694
11695 \family default
11696 Instructions to the speaker.
11697  The () are automatically inserted, but only the ( will show in LyX.
11698  Both will be printed.
11699 \end_layout
11700
11701 \begin_layout Itemize
11702
11703 \family sans
11704 Dialogue
11705 \begin_inset space \hfill{}
11706 \end_inset
11707
11708 M-z d
11709 \begin_inset Newline newline
11710 \end_inset
11711
11712
11713 \family default
11714 What the 
11715 \family sans
11716 Speaker
11717 \family default
11718  says.
11719 \end_layout
11720
11721 \begin_layout Itemize
11722
11723 \family sans
11724 Transition
11725 \begin_inset space \hfill{}
11726 \end_inset
11727
11728 M-z t
11729 \begin_inset Newline newline
11730 \end_inset
11731
11732
11733 \family default
11734 Camera movement instruction.
11735  e.
11736 \begin_inset space \thinspace{}
11737 \end_inset
11738
11739 g.
11740 \begin_inset space \space{}
11741 \end_inset
11742
11743 CUT TO:
11744 \end_layout
11745
11746 \begin_layout Itemize
11747
11748 \family sans
11749 FADE OUT:
11750 \begin_inset space \hfill{}
11751 \end_inset
11752
11753 M-z S-I
11754 \end_layout
11755
11756 \begin_layout Itemize
11757
11758 \family sans
11759 Author
11760 \begin_inset space \hfill{}
11761 \end_inset
11762
11763 M-z S-A
11764 \end_layout
11765
11766 \begin_layout Itemize
11767
11768 \family sans
11769 Title
11770 \begin_inset space \hfill{}
11771 \end_inset
11772
11773 M-z S-T
11774 \end_layout
11775
11776 \begin_layout Itemize
11777
11778 \family sans
11779 Right_Address
11780 \begin_inset space \hfill{}
11781 \end_inset
11782
11783 M-z r
11784 \end_layout
11785
11786 \begin_layout Subsection
11787 Script jargon
11788 \end_layout
11789
11790 \begin_layout Itemize
11791 (O.S) — off screen
11792 \end_layout
11793
11794 \begin_layout Itemize
11795 (V.0) — voice over
11796 \end_layout
11797
11798 \begin_layout Itemize
11799 b.
11800 \begin_inset space \thinspace{}
11801 \end_inset
11802
11803 g.
11804  — background
11805 \end_layout
11806
11807 \begin_layout Itemize
11808 C.U.
11809  — close-up
11810 \end_layout
11811
11812 \begin_layout Itemize
11813 PAN — camera movement
11814 \end_layout
11815
11816 \begin_layout Itemize
11817 INSERT — cut to close-up of
11818 \end_layout
11819
11820 \begin_layout Section
11821 ijmpc and ijmpd
11822 \end_layout
11823
11824 \begin_layout Standard
11825 by 
11826 \noun on
11827 Panayotis Papasotiriou
11828 \end_layout
11829
11830 \begin_layout Subsection
11831 Overview
11832 \end_layout
11833
11834 \begin_layout Standard
11835 The ijmpc package is a set of macros that facilitates electronic manuscript
11836  submission to the 
11837 \emph on
11838 International Journal of Modern Physics C
11839 \emph default
11840 .
11841  Similarly, the ijmpd package is for creating manuscripts to be submitted
11842  to the 
11843 \emph on
11844 International Journal of Modern Physics D
11845 \emph default
11846 .
11847  Both journals are published by World Scientific.
11848  The corresponding document classes are named 
11849 \family typewriter
11850 ws-ijmpc.cls
11851 \family default
11852  and 
11853 \family typewriter
11854 ws-ijmpd.cls
11855 \family default
11856 , respectively.
11857  These files, together with instructions for the authors, can be downloaded
11858  from the sites 
11859 \begin_inset Flex URL
11860 status collapsed
11861
11862 \begin_layout Plain Layout
11863
11864 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11865 \end_layout
11866
11867 \end_inset
11868
11869  and 
11870 \begin_inset Flex URL
11871 status collapsed
11872
11873 \begin_layout Plain Layout
11874
11875 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11876 \end_layout
11877
11878 \end_inset
11879
11880 .
11881  Both packages are modified versions of the standard 
11882 \begin_inset Quotes eld
11883 \end_inset
11884
11885 article
11886 \begin_inset Quotes erd
11887 \end_inset
11888
11889  package, and they are almost (but not exactly) identical.
11890  Most of their features are supported by LyX.
11891  I have used LyX successfully to write articles submitted to both journals
11892  without any problem.
11893 \end_layout
11894
11895 \begin_layout Subsection
11896 Writing a paper
11897 \end_layout
11898
11899 \begin_layout Standard
11900 As usual, the easiest way to write a paper is to start with a template.
11901  Click on 
11902 \family sans
11903 File\SpecialChar \menuseparator
11904 New from
11905 \family default
11906  
11907 \family sans
11908 \bar under
11909 T
11910 \bar default
11911 emplate
11912 \family default
11913 , then choose the 
11914 \family typewriter
11915 ijmpc.lyx
11916 \family default
11917  or 
11918 \family typewriter
11919 ijmpd.lyx
11920 \family default
11921  template.
11922  This will give an (almost) empty document that includes the most common
11923  fields found in a manuscript.
11924  Simply overwrite the existing text (including the brackets, 
11925 \family typewriter
11926 <>
11927 \family default
11928 ) with your text.
11929  You should keep in mind the following remarks.
11930 \end_layout
11931
11932 \begin_layout Enumerate
11933 LyX won't let you change the font size and the page style of the document,
11934  because such modifications are not allowed by both packages.
11935 \end_layout
11936
11937 \begin_layout Enumerate
11938 The language of the document should not be changed.
11939  Before previewing your paper, be sure that the babel package is not used.
11940  To do this, click on 
11941 \family sans
11942 Tools\SpecialChar \menuseparator
11943 Preferences
11944 \family default
11945 , select the 
11946 \family sans
11947 Lang Opts
11948 \family default
11949  tab, deselect the 
11950 \family sans
11951 Use babel
11952 \family default
11953  checkbox in the language settings, and click on 
11954 \family sans
11955 Apply
11956 \family default
11957  (or 
11958 \family sans
11959 Save
11960 \family default
11961 , if you wish to make this change permanent).
11962 \end_layout
11963
11964 \begin_layout Enumerate
11965 The 
11966 \begin_inset Quotes eld
11967 \end_inset
11968
11969 Keywords
11970 \begin_inset Quotes erd
11971 \end_inset
11972
11973  style must be used to define keywords.
11974 \end_layout
11975
11976 \begin_layout Enumerate
11977 The ijmpc package provides a style named 
11978 \begin_inset Quotes eld
11979 \end_inset
11980
11981 Classification Codes
11982 \begin_inset Quotes erd
11983 \end_inset
11984
11985 , which can be used to define classification codes, such as PACS numbers.
11986  Note that this facility is not supported by the ijmpd package.
11987 \end_layout
11988
11989 \begin_layout Enumerate
11990 Several new environments are available: 
11991 \begin_inset Quotes eld
11992 \end_inset
11993
11994 Definition
11995 \begin_inset Quotes erd
11996 \end_inset
11997
11998
11999 \begin_inset Quotes eld
12000 \end_inset
12001
12002 Step
12003 \begin_inset Quotes erd
12004 \end_inset
12005
12006
12007 \begin_inset Quotes eld
12008 \end_inset
12009
12010 Example
12011 \begin_inset Quotes erd
12012 \end_inset
12013
12014
12015 \begin_inset Quotes eld
12016 \end_inset
12017
12018 Remark
12019 \begin_inset Quotes erd
12020 \end_inset
12021
12022
12023 \begin_inset Quotes eld
12024 \end_inset
12025
12026 Notation
12027 \begin_inset Quotes erd
12028 \end_inset
12029
12030
12031 \begin_inset Quotes eld
12032 \end_inset
12033
12034 Theorem
12035 \begin_inset Quotes erd
12036 \end_inset
12037
12038
12039 \begin_inset Quotes eld
12040 \end_inset
12041
12042 Proof
12043 \begin_inset Quotes erd
12044 \end_inset
12045
12046
12047 \begin_inset Quotes eld
12048 \end_inset
12049
12050 Corollary
12051 \begin_inset Quotes erd
12052 \end_inset
12053
12054
12055 \begin_inset Quotes eld
12056 \end_inset
12057
12058 Lemma
12059 \begin_inset Quotes erd
12060 \end_inset
12061
12062
12063 \begin_inset Quotes eld
12064 \end_inset
12065
12066 Proposition
12067 \begin_inset Quotes erd
12068 \end_inset
12069
12070
12071 \begin_inset Quotes eld
12072 \end_inset
12073
12074 Prop
12075 \begin_inset Quotes erd
12076 \end_inset
12077
12078
12079 \begin_inset Quotes eld
12080 \end_inset
12081
12082 Question
12083 \begin_inset Quotes erd
12084 \end_inset
12085
12086
12087 \begin_inset Quotes eld
12088 \end_inset
12089
12090 Claim
12091 \begin_inset Quotes erd
12092 \end_inset
12093
12094 , and 
12095 \begin_inset Quotes eld
12096 \end_inset
12097
12098 Conjecture
12099 \begin_inset Quotes erd
12100 \end_inset
12101
12102 .
12103  Their use is more or less obvious.
12104  LyX supports all these environments; it will use the proper label, text
12105  style, and numbering scheme for each of them.
12106 \end_layout
12107
12108 \begin_layout Enumerate
12109 Both packages use basic citations; the natbib package should not be used.
12110  In LyX, citation references are shown as usual; in the output, citations
12111  are shown as superscripts.
12112  If you want to use a citation as normal text, you should use the 
12113 \family typewriter
12114 refcite
12115 \family default
12116  command, e.
12117 \begin_inset space \thinspace{}
12118 \end_inset
12119
12120 g.
12121 \begin_inset space \space{}
12122 \end_inset
12123
12124
12125 \begin_inset Quotes eld
12126 \end_inset
12127
12128 See Ref.
12129 \begin_inset space \space{}
12130 \end_inset
12131
12132
12133 \family typewriter
12134
12135 \backslash
12136 refcite{key}
12137 \family default
12138
12139 \begin_inset Quotes erd
12140 \end_inset
12141
12142 .
12143 \end_layout
12144
12145 \begin_layout Enumerate
12146 There is no 
12147 \begin_inset Quotes eld
12148 \end_inset
12149
12150 Acknowledgments
12151 \begin_inset Quotes erd
12152 \end_inset
12153
12154  section in both packages.
12155  To put acknowledgments, just use the 
12156 \begin_inset Quotes eld
12157 \end_inset
12158
12159 Section*
12160 \begin_inset Quotes erd
12161 \end_inset
12162
12163  environment.
12164 \end_layout
12165
12166 \begin_layout Enumerate
12167 Appendices may be added to the paper, 
12168 \emph on
12169 after
12170 \emph default
12171  the Acknowledgments and 
12172 \shape italic
12173 before
12174 \shape default
12175  the References.
12176  LyX provides a special environment, called 
12177 \begin_inset Quotes eld
12178 \end_inset
12179
12180 Appendices Section
12181 \begin_inset Quotes erd
12182 \end_inset
12183
12184  which marks the beginning of the appendices.
12185  This environment should be left blank; it just sends a LaTeX command, but
12186  nothing is really printed.
12187  In LyX, the word 
12188 \begin_inset Quotes eld
12189 \end_inset
12190
12191 Appendix
12192 \begin_inset Quotes erd
12193 \end_inset
12194
12195  is printed with blue letters, as a signal that all sections after that
12196  point are appendices.
12197  To write an appendix, use the 
12198 \begin_inset Quotes eld
12199 \end_inset
12200
12201 Appendix
12202 \begin_inset Quotes erd
12203 \end_inset
12204
12205  environment.
12206  LyX will number each appendix with capital letters, as required by both
12207  journals.
12208  Note that 
12209 \begin_inset Quotes eld
12210 \end_inset
12211
12212 Appendices Section
12213 \begin_inset Quotes erd
12214 \end_inset
12215
12216  
12217 \emph on
12218 must
12219 \emph default
12220  be present before the first appendix; if not, all appendices will be numbered
12221  as normal sections in the output.
12222 \end_layout
12223
12224 \begin_layout Enumerate
12225 The ijmpc and the ijmpd packages use the 
12226 \family typewriter
12227 tbl
12228 \family default
12229  command to implement table captions.
12230  As a result, a table created by LyX is printed correctly, but its caption
12231  is ignored.
12232  However, you can use some TeX code to overcome this problem, so that captions
12233  are printed as expected.
12234  To do so, create a float table as usual, remove the caption, and replace
12235  it with the TeX code 
12236 \family typewriter
12237
12238 \backslash
12239 tbl{
12240 \emph on
12241 your table caption
12242 \emph default
12243 }{
12244 \family default
12245  (sic); you must also the TeX code 
12246 \family typewriter
12247 }
12248 \family default
12249  immediately after the tabular material.
12250  Study the example table included in the template files to see how this
12251  trick is implemented.
12252  Alternatively, If you need table captions, you should implement the whole
12253  table float in a 
12254 \family typewriter
12255 .tex
12256 \family default
12257  file, then include this file to the LyX document (
12258 \family sans
12259 Insert\SpecialChar \menuseparator
12260 File\SpecialChar \menuseparator
12261 Child
12262 \begin_inset space ~
12263 \end_inset
12264
12265 Document
12266 \family default
12267 ).
12268  Details on how to create a table float can be found in the files 
12269 \family typewriter
12270 ws-ijmpc.tex
12271 \family default
12272  and 
12273 \family typewriter
12274 ws-ijmpd.tex
12275 \family default
12276 , included in the corresponding packages.
12277 \end_layout
12278
12279 \begin_layout Subsection
12280 Preparing a paper for submission
12281 \end_layout
12282
12283 \begin_layout Standard
12284 Before you submit your paper you must export the LyX document as a LaTeX
12285  file (
12286 \family sans
12287 File\SpecialChar \menuseparator
12288 Export\SpecialChar \menuseparator
12289 LaTeX
12290 \family default
12291 )
12292 \begin_inset Foot
12293 status open
12294
12295 \begin_layout Plain Layout
12296 Actually you have the choice between LaTeX (plain) and pdflatex.
12297  If you intend to use pdflatex to prepare the paper, you should use the
12298  pdflatex option so that included graphics are converted to PDF format,
12299  ready for use by pdflatex.
12300 \end_layout
12301
12302 \end_inset
12303
12304 , then make the following changes to the resulting 
12305 \family typewriter
12306 .tex
12307 \family default
12308  file.
12309 \end_layout
12310
12311 \begin_layout Enumerate
12312 Remove the comment lines before the 
12313 \family typewriter
12314
12315 \backslash
12316 documentclass
12317 \family default
12318  command.
12319 \end_layout
12320
12321 \begin_layout Enumerate
12322 Remove everything between (and including) the 
12323 \family typewriter
12324
12325 \backslash
12326 makeatletter
12327 \family default
12328  and 
12329 \family typewriter
12330
12331 \backslash
12332 makeatother
12333 \family default
12334  commands, except for any commands you specifically put into the LaTeX preamble.
12335 \end_layout
12336
12337 \begin_layout Standard
12338 The modified 
12339 \family typewriter
12340 .tex
12341 \family default
12342  file should be saved and processed through LaTeX as many times as necessary.
12343  You may also want to check the resulting 
12344 \family typewriter
12345 .dvi
12346 \family default
12347  document.
12348 \end_layout
12349
12350 \begin_layout Subsection
12351 Use of TeX code
12352 \end_layout
12353
12354 \begin_layout Standard
12355 The use of TeX code is reduced to two commands, which must be placed at
12356  the top of the document.
12357  If you started writing your paper by using the 
12358 \family typewriter
12359 ijmpc.lyx
12360 \family default
12361  or the 
12362 \family typewriter
12363 ijmpd.lyx
12364 \family default
12365  template, the TeX code needed is already in its place; you usually don't
12366  need to delete it.
12367  You may only modify the first TeX code to specify the information printed
12368  to the top of odd and even pages (authors' names and short paper's title,
12369  respectively).
12370  This TeX code must have the form 
12371 \family typewriter
12372
12373 \backslash
12374 markboth{Authors' Names}{Short Paper's Title}
12375 \family default
12376 .
12377 \end_layout
12378
12379 \begin_layout Section
12380 iopart
12381 \end_layout
12382
12383 \begin_layout Standard
12384 by 
12385 \noun on
12386 Uwe Stöhr
12387 \end_layout
12388
12389 \begin_layout Subsection
12390 Overview
12391 \end_layout
12392
12393 \begin_layout Standard
12394 The iopart package provides a document class to create electronic manuscript
12395  submission to the journals published by the Institute of Physics.
12396  Instructions for the authors how to create a paper using the iopart class
12397  can be downloaded together with the iopart package from the site 
12398 \begin_inset Flex URL
12399 status collapsed
12400
12401 \begin_layout Plain Layout
12402
12403 ftp://ftp.iop.org/pub/journals/latex2e
12404 \end_layout
12405
12406 \end_inset
12407
12408 .
12409 \end_layout
12410
12411 \begin_layout Subsection
12412 Writing a paper
12413 \end_layout
12414
12415 \begin_layout Standard
12416 The easiest way to write a paper is to start with the file 
12417 \emph on
12418 IOP-article.lyx
12419 \emph default
12420  that is available in LyX's examples files folder.
12421  Open this file, save it under a new name, and start writing.
12422  The example file explains how to use the special text environments.
12423  Here are the most important advices:
12424 \end_layout
12425
12426 \begin_layout Itemize
12427 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12428  two options 
12429 \family sans
12430 Use AMS math package
12431 \family default
12432  in the document settings under 
12433 \family sans
12434 Math Options
12435 \family default
12436  are not used!
12437 \end_layout
12438
12439 \begin_layout Itemize
12440
12441 \size normal
12442 The title environment defines the kind of your paper.
12443  So use one of the following environments for the title:
12444 \end_layout
12445
12446 \begin_deeper
12447 \begin_layout Itemize
12448
12449 \family sans
12450 \size normal
12451 Title
12452 \family default
12453  for a Paper
12454 \end_layout
12455
12456 \begin_layout Itemize
12457
12458 \family sans
12459 \size normal
12460 Review
12461 \family default
12462  for a Review
12463 \end_layout
12464
12465 \begin_layout Itemize
12466
12467 \family sans
12468 \size normal
12469 Topical
12470 \family default
12471  for a Topical review
12472 \end_layout
12473
12474 \begin_layout Itemize
12475
12476 \family sans
12477 \size normal
12478 Comment
12479 \family default
12480  for a Comment
12481 \end_layout
12482
12483 \begin_layout Itemize
12484
12485 \family sans
12486 \size normal
12487 Note
12488 \family default
12489  for a Note
12490 \end_layout
12491
12492 \begin_layout Itemize
12493
12494 \family sans
12495 \size normal
12496 Paper
12497 \family default
12498  for a Paper (same as Title)
12499 \end_layout
12500
12501 \begin_layout Itemize
12502
12503 \family sans
12504 \size normal
12505 Prelim
12506 \family default
12507  for a Preliminary communication
12508 \end_layout
12509
12510 \begin_layout Itemize
12511
12512 \family sans
12513 \size normal
12514 Rapid
12515 \family default
12516  for a Rapid communication
12517 \end_layout
12518
12519 \begin_layout Itemize
12520
12521 \family sans
12522 \size normal
12523 Letter
12524 \family default
12525  for a Letter to the editor
12526 \end_layout
12527
12528 \end_deeper
12529 \begin_layout Itemize
12530
12531 \size normal
12532 All title environments except of 
12533 \family sans
12534 Letter
12535 \family default
12536  can have an optional short title.
12537 \end_layout
12538
12539 \begin_layout Itemize
12540 There is a general title environment 
12541 \family sans
12542 Article
12543 \family default
12544  which is not directly supported by the LyX.
12545  This can be used as TeX code when your document doesn't fit into one of
12546  the other title types.
12547 \end_layout
12548
12549 \begin_layout Standard
12550 For more informations like hints for special table and formula formatting,
12551  look at the IOP author guidelines.
12552 \end_layout
12553
12554 \begin_layout Section
12555 Kluwer
12556 \end_layout
12557
12558 \begin_layout Standard
12559 by 
12560 \noun on
12561 Panayotis Papasotiriou
12562 \end_layout
12563
12564 \begin_layout Subsection
12565 Overview
12566 \end_layout
12567
12568 \begin_layout Standard
12569 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12570  that facilitates electronic manuscript submission to the journals they
12571  publish.
12572  Most known of them (at least in my domain of interest) are 
12573 \emph on
12574 Astrophysics and Space Science
12575 \emph default
12576  and 
12577 \emph on
12578 Solar Physics
12579 \emph default
12580 , but there are many others (see a complete list at 
12581 \begin_inset Flex URL
12582 status open
12583
12584 \begin_layout Plain Layout
12585
12586 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12587 \end_layout
12588
12589 \end_inset
12590
12591 ).
12592  The Kluwer package may be downloaded from the site 
12593 \begin_inset Flex URL
12594 status collapsed
12595
12596 \begin_layout Plain Layout
12597
12598 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12599 \end_layout
12600
12601 \end_inset
12602
12603 .
12604  A complete user guide is contained in that package (but it can also be
12605  downloaded separately).
12606 \end_layout
12607
12608 \begin_layout Standard
12609 LyX supports many features of the package but not everything.
12610  However, the TeX code needed is reduced to some 
12611 \begin_inset Quotes eld
12612 \end_inset
12613
12614 peculiar
12615 \begin_inset Quotes erd
12616 \end_inset
12617
12618  commands of the package (see
12619 \begin_inset space ~
12620 \end_inset
12621
12622
12623 \begin_inset CommandInset ref
12624 LatexCommand ref
12625 reference "subsec:kluwer_peculiarities"
12626
12627 \end_inset
12628
12629 ).
12630  I have recently used LyX to write an article submitted to the 
12631 \emph on
12632 Astrophysics and Space Science
12633 \emph default
12634  without any problem.
12635 \end_layout
12636
12637 \begin_layout Subsection
12638 Writing a paper
12639 \end_layout
12640
12641 \begin_layout Standard
12642 The easiest way to write a paper is to start with the Kluwer template file.
12643  Click on 
12644 \family sans
12645 File\SpecialChar \menuseparator
12646 New from
12647 \family default
12648  
12649 \family sans
12650 Template
12651 \family default
12652 , then choose the 
12653 \family typewriter
12654 kluwer.lyx
12655 \family default
12656  template.
12657  This will give an (almost) empty document that includes the most common
12658  fields found in a manuscript and a short description of their use.
12659  As in most templates, simply overwrite the existing text (including the
12660  brackets, 
12661 \family typewriter
12662 <>
12663 \family default
12664 ) with the correct information.
12665 \end_layout
12666
12667 \begin_layout Subsection
12668 Preparing a paper for submission
12669 \end_layout
12670
12671 \begin_layout Standard
12672 As in the AASTeX package, before you submit your paper to a journal you
12673  must 
12674 \begin_inset Quotes eld
12675 \end_inset
12676
12677 postprocess
12678 \begin_inset Quotes erd
12679 \end_inset
12680
12681  it as follows.
12682 \end_layout
12683
12684 \begin_layout Enumerate
12685 Export your paper as a LaTeX file.
12686  To do this, click on 
12687 \family sans
12688 File\SpecialChar \menuseparator
12689 Export\SpecialChar \menuseparator
12690 LaTeX
12691 \family default
12692 .
12693  
12694 \end_layout
12695
12696 \begin_layout Enumerate
12697 Edit the resulting 
12698 \family typewriter
12699 .tex
12700 \family default
12701  file with a text editor and make the following changes
12702 \end_layout
12703
12704 \begin_deeper
12705 \begin_layout Enumerate
12706 remove the comment lines before the 
12707 \family typewriter
12708
12709 \backslash
12710 documentclass
12711 \family default
12712  command,
12713 \end_layout
12714
12715 \begin_layout Enumerate
12716 remove everything between (and including) the 
12717 \family typewriter
12718
12719 \backslash
12720 makeatletter
12721 \family default
12722  and 
12723 \family typewriter
12724
12725 \backslash
12726 makeatother
12727 \family default
12728  commands, except for any commands you specifically put into the LaTeX preamble.
12729 \end_layout
12730
12731 \begin_layout Standard
12732 Save the resulting 
12733 \family typewriter
12734 .tex
12735 \family default
12736  file.
12737 \end_layout
12738
12739 \end_deeper
12740 \begin_layout Enumerate
12741 Run the 
12742 \family typewriter
12743 .tex
12744 \family default
12745  file through LaTeX as many times as necessary (usually up to three).
12746 \end_layout
12747
12748 \begin_layout Enumerate
12749 View the resulting 
12750 \family typewriter
12751 .dvi
12752 \family default
12753  document using, e.
12754 \begin_inset space \thinspace{}
12755 \end_inset
12756
12757 g.
12758 \begin_inset space \space{}
12759 \end_inset
12760
12761
12762 \family sans
12763 xdvi
12764 \family default
12765 , and check if everything is OK (it should, if you didn't make any mistake).
12766 \end_layout
12767
12768 \begin_layout Subsection
12769 \begin_inset Quotes eld
12770 \end_inset
12771
12772 Peculiarities
12773 \begin_inset Quotes erd
12774 \end_inset
12775
12776  of the Kluwer package
12777 \begin_inset CommandInset label
12778 LatexCommand label
12779 name "subsec:kluwer_peculiarities"
12780
12781 \end_inset
12782
12783
12784 \end_layout
12785
12786 \begin_layout Standard
12787 The Kluwer package has the following 
12788 \begin_inset Quotes eld
12789 \end_inset
12790
12791 peculiarities
12792 \begin_inset Quotes erd
12793 \end_inset
12794
12795 .
12796 \end_layout
12797
12798 \begin_layout Enumerate
12799 It is possible to write multiple articles in the same LaTeX file
12800 \begin_inset Foot
12801 status collapsed
12802
12803 \begin_layout Plain Layout
12804 I can't imagine any good reason to do this.
12805 \end_layout
12806
12807 \end_inset
12808
12809 .
12810  Each article must be included in the environment 
12811 \begin_inset Quotes eld
12812 \end_inset
12813
12814 article
12815 \begin_inset Quotes erd
12816 \end_inset
12817
12818 .
12819  Unfortunately, this environment cannot be omitted, even if you write just
12820  one article.
12821  Therefore, each article starts with the command 
12822 \family typewriter
12823
12824 \backslash
12825 begin{article}
12826 \family default
12827  and, obviously, ends with the command 
12828 \family typewriter
12829
12830 \backslash
12831 end{article}
12832 \family default
12833 .
12834  Although this can be implemented in LyX, I didn't included it, since it
12835  looks ugly and can confuse the novice user.
12836  Therefore, you need to enter them directly and mark them as LaTeX code
12837  (the well-known 
12838 \begin_inset Quotes eld
12839 \end_inset
12840
12841 TeX code
12842 \begin_inset Quotes erd
12843 \end_inset
12844
12845 ).
12846 \end_layout
12847
12848 \begin_layout Enumerate
12849 Information given at the beginning of the article (i.
12850 \begin_inset space \thinspace{}
12851 \end_inset
12852
12853 g.
12854 \begin_inset space \space{}
12855 \end_inset
12856
12857 title, subtitle, author, institution, running title, running author, abstract
12858  and keywords) must be included in an environment called 
12859 \begin_inset Quotes eld
12860 \end_inset
12861
12862 opening
12863 \begin_inset Quotes erd
12864 \end_inset
12865
12866 .
12867  This is not implemented in LyX, so you must enter title, subtitle etc.
12868 \begin_inset space ~
12869 \end_inset
12870
12871 between two TeX code lines (
12872 \family typewriter
12873
12874 \backslash
12875 begin{opening}
12876 \family default
12877  and 
12878 \family typewriter
12879
12880 \backslash
12881 end{opening}
12882 \family default
12883 ).
12884 \end_layout
12885
12886 \begin_layout Enumerate
12887 According to the user manual, the label of each bibliography item must be
12888  written as 
12889 \family typewriter
12890
12891 \backslash
12892 protect
12893 \backslash
12894 citeauthoryear{
12895 \family default
12896 \emph on
12897 author(s)
12898 \family typewriter
12899 \emph default
12900 }{
12901 \family default
12902 \emph on
12903 year
12904 \family typewriter
12905 \emph default
12906 }
12907 \family default
12908 .
12909 \end_layout
12910
12911 \begin_layout Standard
12912 The 
12913 \family typewriter
12914 kluwer.lyx
12915 \family default
12916  template takes care of all these 
12917 \begin_inset Quotes eld
12918 \end_inset
12919
12920 peculiarities
12921 \begin_inset Quotes erd
12922 \end_inset
12923
12924 .
12925  If you start a new paper using this template you don't need to do anything
12926  special.
12927  Just 
12928 \end_layout
12929
12930 \begin_layout Enumerate
12931 don't delete the TeX code included in the template, and
12932 \end_layout
12933
12934 \begin_layout Enumerate
12935 copy the example bibliography item included in the template and modify it
12936  as necessary to enter new bibliography items.
12937 \end_layout
12938
12939 \begin_layout Section
12940 Koma-Script
12941 \end_layout
12942
12943 \begin_layout Standard
12944 by 
12945 \noun on
12946 Bernd Rellermeyer
12947 \end_layout
12948
12949 \begin_layout Subsection
12950 Overview
12951 \end_layout
12952
12953 \begin_layout Standard
12954 The LyX document classes 
12955 \emph on
12956 article (koma-script)
12957 \emph default
12958
12959 \emph on
12960 report (koma-script)
12961 \emph default
12962
12963 \emph on
12964 book
12965 \emph default
12966  
12967 \emph on
12968 (koma-script)
12969 \emph default
12970 , and 
12971 \emph on
12972 letter
12973 \emph default
12974  
12975 \emph on
12976 (koma-script)
12977 \emph default
12978  correspond to the LaTeX document classes 
12979 \family typewriter
12980 scrartcl.cls
12981 \family default
12982
12983 \family typewriter
12984 scrreprt.cls
12985 \family default
12986
12987 \family typewriter
12988 scrbook.cls
12989 \family default
12990 , and 
12991 \family typewriter
12992 scrlettr.cls
12993 \family default
12994 , resp.
12995 \begin_inset space ~
12996 \end_inset
12997
12998 of the Koma-Script family.
12999  They are replacements for the standard document classes 
13000 \family typewriter
13001 article.cls
13002 \family default
13003
13004 \family typewriter
13005 report.cls
13006 \family default
13007
13008 \family typewriter
13009 book.cls
13010 \family default
13011  and 
13012 \family typewriter
13013 letter.cls
13014 \family default
13015 , resp., and fit better to European typography conventions in a number of
13016  points.
13017 \end_layout
13018
13019 \begin_layout Itemize
13020 Standard character size is 11pt in 
13021 \emph on
13022 article (koma-script)
13023 \emph default
13024
13025 \emph on
13026 report (koma-script)
13027 \emph default
13028 , and 
13029 \emph on
13030 book (koma-script)
13031 \emph default
13032 , and 12pt in 
13033 \emph on
13034 letter (koma-script)
13035 \emph default
13036 .
13037 \end_layout
13038
13039 \begin_layout Itemize
13040 Headings, labels of the description environment, and a number of elements
13041  of the 
13042 \emph on
13043 letter (koma-script)
13044 \emph default
13045  document class are set in a bold sans serif font.
13046 \begin_inset Foot
13047 status collapsed
13048
13049 \begin_layout Plain Layout
13050 There is a big difference between the bold sans serif old cm fonts and new
13051  ec fonts, especially in the appearance of headings.
13052  In comparison, the ec bold sans serif fonts look a bit thin.
13053  Here the LaTeX package 
13054 \family typewriter
13055 cmsd.sty by
13056 \family default
13057  
13058 \shape smallcaps
13059 Walter Schmidt
13060 \shape default
13061  helps to produce the 
13062 \begin_inset Quotes eld
13063 \end_inset
13064
13065 usual
13066 \begin_inset Quotes erd
13067 \end_inset
13068
13069  appearance when using the ec fonts.
13070 \end_layout
13071
13072 \end_inset
13073
13074  The numbering of chapter headings is made in the same way as the numbering
13075  of section headings, that is without the extra line 
13076 \begin_inset Quotes eld
13077 \end_inset
13078
13079 Chapter\SpecialChar \ldots{}
13080
13081 \begin_inset Quotes erd
13082 \end_inset
13083
13084 .
13085  In addition, the appearance of the headings can be modified by using a
13086  number of options (in LyX to be entered in the field 
13087 \family sans
13088 Extra
13089 \begin_inset space ~
13090 \end_inset
13091
13092 Options
13093 \family default
13094  of the dialog 
13095 \family sans
13096 Layout\SpecialChar \menuseparator
13097 Document
13098 \family default
13099 ).
13100  
13101 \end_layout
13102
13103 \begin_layout Itemize
13104 The main means in the Koma-Script document classes to design the type area
13105  are the options 
13106 \family sans
13107 BCOR
13108 \family default
13109  and 
13110 \family sans
13111 DIV
13112 \family default
13113  (in LyX to be entered in the extra class options field in the dialog 
13114 \family sans
13115 Document\SpecialChar \menuseparator
13116 Settings
13117 \family default
13118 ).
13119  They make a clearer modification of page margins possible as do the options
13120  of the dialog 
13121 \family sans
13122 Document\SpecialChar \menuseparator
13123 Settings
13124 \family default
13125 .
13126  
13127 \end_layout
13128
13129 \begin_layout Itemize
13130 The LaTeX document classes of the Koma-Script family define a number of
13131  additional commands.
13132  Those part of it which makes sense in LyX is implemented in corresponding
13133  paragraph types.
13134 \end_layout
13135
13136 \begin_layout Standard
13137 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13138  can be found in the Koma-Script documentation 
13139 \emph on
13140 scrguide
13141 \emph default
13142  (German) and 
13143 \emph on
13144 scrguien
13145 \emph default
13146  (English).
13147 \end_layout
13148
13149 \begin_layout Subsection
13150 article (koma-script), report (koma-script), and book (koma-script)
13151 \end_layout
13152
13153 \begin_layout Standard
13154 The document classes 
13155 \emph on
13156 article (koma-script)
13157 \emph default
13158
13159 \emph on
13160 report (koma-script)
13161 \emph default
13162 , and 
13163 \emph on
13164 book
13165 \emph default
13166  
13167 \emph on
13168 (koma-script)
13169 \emph default
13170  are implemented in the layout files 
13171 \family typewriter
13172 scrartcl.layout
13173 \family default
13174
13175 \family typewriter
13176 scrreprt.layout
13177 \family default
13178 , and 
13179 \family typewriter
13180 scrbook.layout
13181 \family default
13182 , resp.
13183  They contain all the paragraph types of the corresponding standard document
13184  classes 
13185 \emph on
13186 article
13187 \emph default
13188
13189 \emph on
13190 report
13191 \emph default
13192 , and 
13193 \emph on
13194 book
13195 \emph default
13196 , resp., partly modified, with the exception of the LyX specific 
13197 \family sans
13198 List
13199 \family default
13200 -type, which is replaced by the new 
13201 \family sans
13202 Labeling
13203 \family default
13204 -type having the same functionality.
13205  Beside the 
13206 \family sans
13207 Labeling
13208 \family default
13209 -Type there is a number of new paragraph types added.
13210  They are 
13211 \emph on
13212 not
13213 \emph default
13214  part of 
13215 \emph on
13216 letter (koma-script)
13217 \emph default
13218 .
13219 \end_layout
13220
13221 \begin_layout Itemize
13222
13223 \family sans
13224 Addpart, Addchap
13225 \family default
13226
13227 \family sans
13228 Addsec
13229 \family default
13230 : are equivalents to 
13231 \family sans
13232 Part*, Chapter*
13233 \family default
13234  and 
13235 \family sans
13236 Section*
13237 \family default
13238 , resp., additionally inserting an entry in the table of contents.
13239  
13240 \family sans
13241 Addpart
13242 \family default
13243  and 
13244 \family sans
13245 Addchap
13246 \family default
13247  are not contained in 
13248 \emph on
13249 article (koma-script)
13250 \emph default
13251 .
13252 \end_layout
13253
13254 \begin_layout Itemize
13255
13256 \family sans
13257 Addchap*
13258 \family default
13259
13260 \family sans
13261 Addsec*
13262 \family default
13263 : behave exactly as 
13264 \family sans
13265 Addchap
13266 \family default
13267  and 
13268 \family sans
13269 Addsec
13270 \family default
13271 , resp., additionally clearing running heads.
13272  
13273 \family sans
13274 Addchap*
13275 \family default
13276  is not contained in 
13277 \emph on
13278 article (koma-script)
13279 \emph default
13280 .
13281 \begin_inset Foot
13282 status collapsed
13283
13284 \begin_layout Plain Layout
13285 There is also an 
13286 \family typewriter
13287
13288 \backslash
13289 addpart*
13290 \family default
13291  command in 
13292 \emph on
13293 book (koma-script)
13294 \emph default
13295  and in 
13296 \emph on
13297 report (koma-script)
13298 \emph default
13299 , but since this is identical to 
13300 \family sans
13301 Part*
13302 \family default
13303 , is has not been implemented in LyX.
13304 \end_layout
13305
13306 \end_inset
13307
13308
13309 \end_layout
13310
13311 \begin_layout Itemize
13312
13313 \family sans
13314 Minisec
13315 \family default
13316 : generates a heading directly above the following paragraph in the standard
13317  character size without affecting the structure of the document.
13318 \end_layout
13319
13320 \begin_layout Itemize
13321
13322 \family sans
13323 Captionabove
13324 \family default
13325  and 
13326 \family sans
13327 Captionbelow
13328 \family default
13329  are special captions which respect the different space settings needed
13330  for captions placed above or below an element (if you follow strict typographic
13331  rules, you might want to place table captions always above the table).
13332  You can also use the class option 
13333 \family typewriter
13334 tablecaptionsabove
13335 \family default
13336 , which will switch 
13337 \family sans
13338 caption
13339 \family default
13340  to 
13341 \family sans
13342 captionabove
13343 \family default
13344  for tables and 
13345 \family sans
13346 captionbelow
13347 \family default
13348  for figures.
13349  You need at least Koma-Script version 2.8q to use this.
13350 \end_layout
13351
13352 \begin_layout Itemize
13353
13354 \family sans
13355 Dictum
13356 \family default
13357 : can be used to set a bonmot, e.
13358 \begin_inset space \thinspace{}
13359 \end_inset
13360
13361 g.
13362 \begin_inset space \space{}
13363 \end_inset
13364
13365 at the beginning of a chapter.
13366  If you use the optional argument (
13367 \family sans
13368 Insert\SpecialChar \menuseparator
13369 Short
13370 \begin_inset space ~
13371 \end_inset
13372
13373 Title
13374 \family default
13375 ), you can insert the dictum's author there.
13376  Dictum and author are separated by a line.
13377  You need at least Koma-Script version 2.8q to use this.
13378  
13379 \family sans
13380 Dictum
13381 \family default
13382  is not contained in 
13383 \emph on
13384 article (koma-script)
13385 \emph default
13386 .
13387 \end_layout
13388
13389 \begin_layout Standard
13390 The following types, together with the standard types 
13391 \family sans
13392 Title
13393 \family default
13394
13395 \family sans
13396 Author
13397 \family default
13398 , and 
13399 \family sans
13400 Date
13401 \family default
13402 , form the title area of the document.
13403  They must be entered ahead of the first 
13404 \begin_inset Quotes eld
13405 \end_inset
13406
13407 ordinary
13408 \begin_inset Quotes erd
13409 \end_inset
13410
13411  paragraph.
13412 \begin_inset Foot
13413 status collapsed
13414
13415 \begin_layout Plain Layout
13416 The corresponding LaTeX commands must appear before the 
13417 \family typewriter
13418
13419 \backslash
13420 maketitle
13421 \family default
13422  command.
13423 \end_layout
13424
13425 \end_inset
13426
13427  When such a type is used more than once, the latter usage overwrites the
13428  former one, that means, for every type only the latest usage is valid.
13429  The order of the different types however has, like 
13430 \family sans
13431 Title
13432 \family default
13433
13434 \family sans
13435 Author
13436 \family default
13437 , and 
13438 \family sans
13439 Date
13440 \family default
13441 , no effect on the appearance of the produced document.
13442 \end_layout
13443
13444 \begin_layout Itemize
13445
13446 \family sans
13447 Subject
13448 \family default
13449 : produces a centered paragraph above the ordinary title (
13450 \family sans
13451 Title
13452 \family default
13453
13454 \family sans
13455 Author
13456 \family default
13457
13458 \family sans
13459 Date
13460 \family default
13461 ) for the subject of the document.
13462 \end_layout
13463
13464 \begin_layout Itemize
13465
13466 \family sans
13467 Publishers
13468 \family default
13469 : produces a centered paragraph below the ordinary title (
13470 \family sans
13471 Title
13472 \family default
13473
13474 \family sans
13475 Author
13476 \family default
13477
13478 \family sans
13479 Date
13480 \family default
13481 ) for the publishers' name.
13482 \end_layout
13483
13484 \begin_layout Itemize
13485
13486 \family sans
13487 Dedication
13488 \family default
13489 : in 
13490 \emph on
13491 report (koma-script)
13492 \emph default
13493  and 
13494 \emph on
13495 book (koma-script)
13496 \emph default
13497  produces a centered paragraph on its own page behind the title page, or
13498  in 
13499 \emph on
13500 article (koma-script)
13501 \emph default
13502  produces a centered paragraph below the ordinary title (
13503 \family sans
13504 Title
13505 \family default
13506
13507 \family sans
13508 Author
13509 \family default
13510
13511 \family sans
13512 Date
13513 \family default
13514
13515 \family sans
13516 Publishers
13517 \family default
13518 ) for a dedication.
13519 \end_layout
13520
13521 \begin_layout Itemize
13522
13523 \family sans
13524 Titlehead
13525 \family default
13526 : produces a left aligned paragraph above the ordinary title (
13527 \family sans
13528 Title
13529 \family default
13530
13531 \family sans
13532 Author
13533 \family default
13534
13535 \family sans
13536 Date
13537 \family default
13538
13539 \family sans
13540 Subject
13541 \family default
13542 ) for a document`s head.
13543 \end_layout
13544
13545 \begin_layout Itemize
13546
13547 \family sans
13548 Uppertitleback
13549 \family default
13550 : produces in a double-sided print in 
13551 \emph on
13552 report (koma-script)
13553 \emph default
13554  and 
13555 \emph on
13556 book (koma-script)
13557 \emph default
13558  a left-aligned paragraph at the top of the title page`s back or has no
13559  effect in a single-sided print or in 
13560 \emph on
13561 article (koma-script)
13562 \emph default
13563 .
13564 \end_layout
13565
13566 \begin_layout Itemize
13567
13568 \family sans
13569 Lowertitleback
13570 \family default
13571 : produces in a double-sided print in 
13572 \emph on
13573 report (koma-script)
13574 \emph default
13575  and 
13576 \emph on
13577 book (koma-script)
13578 \emph default
13579  a left-aligned paragraph at the bottom of the title page`s back or has
13580  no effect in a single-sided print or in 
13581 \emph on
13582 article (koma-script)
13583 \emph default
13584 .
13585 \end_layout
13586
13587 \begin_layout Itemize
13588
13589 \family sans
13590 Extratitle
13591 \family default
13592 : produces a special 
13593 \begin_inset Quotes eld
13594 \end_inset
13595
13596 dirty
13597 \begin_inset Quotes erd
13598 \end_inset
13599
13600  page ahead of the actual document containing a paragraph without special
13601  formatting.
13602 \end_layout
13603
13604 \begin_layout Standard
13605 The layout files for the document classes 
13606 \emph on
13607 article (koma-script)
13608 \emph default
13609
13610 \emph on
13611 report (koma-script)
13612 \emph default
13613 , and 
13614 \emph on
13615 book (koma-script)
13616 \emph default
13617  do include the file 
13618 \family typewriter
13619 scrmacros.inc
13620 \family default
13621 .
13622  This is thought of as a place to define your own types.
13623  Copy scrmacros
13624 \family typewriter
13625 .inc
13626 \family default
13627  in your personal layout directory and edit the file!
13628 \end_layout
13629
13630 \begin_layout Subsection
13631 letter (koma-script)
13632 \end_layout
13633
13634 \begin_layout Standard
13635 \noindent
13636 The document class 
13637 \emph on
13638 letter (koma-script)
13639 \emph default
13640  is implemented in the layout file 
13641 \family typewriter
13642 scrlettr.layout
13643 \family default
13644 .
13645  It contains all the paragraph types of the corresponding standard document
13646  class 
13647 \emph on
13648 letter
13649 \emph default
13650 , partly modified, with the exception of the LyX specific types 
13651 \family sans
13652 LyX-Code
13653 \family default
13654  and 
13655 \family sans
13656 Comment
13657 \family default
13658  and the 
13659 \family sans
13660 List
13661 \family default
13662  type, which is replaced by the new 
13663 \family sans
13664 Labeling
13665 \family default
13666  type.
13667  In addition, it contains, in contrast to the standard document class, the
13668  standard types 
13669 \family sans
13670 LaTeX
13671 \family default
13672
13673 \family sans
13674 Quotation
13675 \family default
13676
13677 \family sans
13678 Quote
13679 \family default
13680 , and 
13681 \family sans
13682 Verse
13683 \family default
13684 .
13685  Furthermore, there are a number of new letter specific types.
13686 \end_layout
13687
13688 \begin_layout Standard
13689 The appearance of the letter produced by this document class can be controlled
13690  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13691 \begin_inset Foot
13692 status collapsed
13693
13694 \begin_layout Plain Layout
13695 For example, the standard appearance of the letter`s heading, consisting
13696  of name and address, is quite self-willed.
13697  An 
13698 \begin_inset Quotes eld
13699 \end_inset
13700
13701 ordinary
13702 \begin_inset Quotes erd
13703 \end_inset
13704
13705  heading is produced by the following LaTeX commands in the preamble:
13706 \end_layout
13707
13708 \begin_layout LyX-Code
13709
13710 \backslash
13711 firsthead{
13712 \backslash
13713 parbox[b]{
13714 \backslash
13715 textwidth}
13716 \end_layout
13717
13718 \begin_layout LyX-Code
13719   {
13720 \backslash
13721 ignorespaces 
13722 \backslash
13723 fromname
13724 \backslash
13725
13726 \backslash
13727  
13728 \backslash
13729 ignorespaces 
13730 \backslash
13731 fromaddress}} 
13732 \end_layout
13733
13734 \begin_layout LyX-Code
13735
13736 \backslash
13737 nexthead{
13738 \backslash
13739 parbox[b]{
13740 \backslash
13741 textwidth}
13742 \end_layout
13743
13744 \begin_layout LyX-Code
13745   {
13746 \backslash
13747 ignorespaces 
13748 \backslash
13749 fromname 
13750 \backslash
13751 hfill 
13752 \backslash
13753 ignorespaces 
13754 \backslash
13755 pagename
13756 \backslash
13757  
13758 \backslash
13759 thepage}}
13760 \end_layout
13761
13762 \end_inset
13763
13764  A detailed German description of such LaTeX commands can be found in the
13765  Koma-Script documentation 
13766 \emph on
13767 scrguide
13768 \emph default
13769 .
13770  With it, the letter's author can produce his personal letter layout.
13771 \end_layout
13772
13773 \begin_layout Standard
13774 The types 
13775 \family sans
13776 Letter
13777 \family default
13778  and 
13779 \family sans
13780 Opening
13781 \family default
13782  define the beginning of the letter and must be used in every letter.
13783  To emphasize them in the LyX document class, they are marked with the letter
13784  
13785 \shape italic
13786 L
13787 \shape default
13788  or 
13789 \shape italic
13790 O
13791 \shape default
13792 , resp.
13793 \begin_inset space ~
13794 \end_inset
13795
13796 in the left margin.
13797  It is possible to write any number of letters in one file.
13798  An 
13799 \family sans
13800 Opening
13801 \family default
13802  type produces a new letter using the same addressee and a 
13803 \family sans
13804 Letter
13805 \family default
13806  type produces a new addressee.
13807  The types 
13808 \family sans
13809 Closing
13810 \family default
13811
13812 \family sans
13813 PS
13814 \family default
13815
13816 \family sans
13817 CC
13818 \family default
13819 , and 
13820 \family sans
13821 Encl
13822 \family default
13823  are ordinary paragraph types and can also be used several times in one
13824  and the same letter.
13825 \end_layout
13826
13827 \begin_layout Itemize
13828
13829 \family sans
13830 Letter
13831 \family default
13832 : produces a paragraph for the addressee and implicitly defines the beginning
13833  of the letter.
13834 \end_layout
13835
13836 \begin_layout Itemize
13837
13838 \family sans
13839 Opening
13840 \family default
13841 : produces a paragraph for the form of address and implicitly produces a
13842  new letter.
13843 \end_layout
13844
13845 \begin_layout Itemize
13846
13847 \family sans
13848 Closing
13849 \family default
13850 : produces a paragraph for a close.
13851 \end_layout
13852
13853 \begin_layout Itemize
13854
13855 \family sans
13856 PS
13857 \family default
13858 : produces a paragraph for a postscript.
13859 \end_layout
13860
13861 \begin_layout Itemize
13862
13863 \family sans
13864 CC
13865 \family default
13866 : produces a paragraph for a distribution list.
13867 \end_layout
13868
13869 \begin_layout Itemize
13870
13871 \family sans
13872 Encl
13873 \family default
13874 : produces a paragraph for enclosures.
13875 \end_layout
13876
13877 \begin_layout Standard
13878 The types 
13879 \family sans
13880 Name
13881 \family default
13882
13883 \family sans
13884 Signature
13885 \family default
13886
13887 \family sans
13888 Address
13889 \family default
13890
13891 \family sans
13892 Telephone
13893 \family default
13894
13895 \family sans
13896 Place
13897 \family default
13898
13899 \family sans
13900 Backaddress
13901 \family default
13902
13903 \family sans
13904 Specialmail
13905 \family default
13906
13907 \family sans
13908 Location
13909 \family default
13910
13911 \family sans
13912 Title
13913 \family default
13914 , and 
13915 \family sans
13916 Subject
13917 \family default
13918  are input types provided with a label to enter information, which will
13919  be processed by the document class.
13920 \begin_inset Foot
13921 status open
13922
13923 \begin_layout Plain Layout
13924 It could be seen as a matter of inconsequence, that the types 
13925 \family sans
13926 Letter
13927 \family default
13928  and 
13929 \family sans
13930 Opening
13931 \family default
13932  described above are not such input types as well.
13933  Because of the special meaning of those types, however, I have implemented
13934  them as ordinary paragraph types with a one letter mark in the left margin.
13935  Moreover, it would affect my feeling of symmetry, if the 
13936 \family sans
13937 Opening
13938 \family default
13939  type and the 
13940 \family sans
13941 Closing
13942 \family default
13943  type had such a serious different appearance.
13944 \end_layout
13945
13946 \end_inset
13947
13948  The types must be used ahead of the corresponding 
13949 \family sans
13950 Opening
13951 \family default
13952  type.
13953 \end_layout
13954
13955 \begin_layout Standard
13956 An implementation of these types in a WYSIWYG fashion does not seem to make
13957  sense, because the real appearance of the produced letter does not only
13958  depend on the usage of the particular type, but also on other factors.
13959  For example, a signature entered in the 
13960 \family sans
13961 Signature
13962 \family default
13963  type will in the standard behavior appear in the produced letter only,
13964  when in the same letter also a 
13965 \family sans
13966 Closing
13967 \family default
13968  type is used.
13969  The entered value of the 
13970 \family sans
13971 Telephone
13972 \family default
13973  type will in the standard behavior not appear in the produced letter at
13974  all.
13975  The possibility to design the letter`s heading freely is already indicated
13976  in a footnote above.
13977 \end_layout
13978
13979 \begin_layout Standard
13980 The input types can also be used as empty paragraphs.
13981  This makes sense e.
13982 \begin_inset space \thinspace{}
13983 \end_inset
13984
13985 g.
13986 \begin_inset space \space{}
13987 \end_inset
13988
13989 for the 
13990 \family sans
13991 Signature
13992 \family default
13993  type.
13994  If the 
13995 \family sans
13996 Signature
13997 \family default
13998  type is not used at all, in the standard behavior the value of the 
13999 \family sans
14000 Name
14001 \family default
14002  type is used as signature, whereas if an empty 
14003 \family sans
14004 Signature
14005 \family default
14006  type is used, no signature value is defined.
14007 \end_layout
14008
14009 \begin_layout Standard
14010 By using the input types it is possible to write a letter template, containing
14011  filled input types with your personal dates (name, address, etc.) and empty
14012  input types for other dates you want to enter.
14013 \end_layout
14014
14015 \begin_layout Itemize
14016
14017 \family sans
14018 Name
14019 \family default
14020 : sender's name, in the standard behavior appears as a centered paragraph
14021  in small caps in the letter`s heading.
14022 \end_layout
14023
14024 \begin_layout Itemize
14025
14026 \family sans
14027 Signature
14028 \family default
14029 : sender's signature, in the standard behavior appears below the 
14030 \family sans
14031 Closing
14032 \family default
14033  type.
14034  If no 
14035 \family sans
14036 Signature
14037 \family default
14038  type is used, the value of the 
14039 \family sans
14040 Name
14041 \family default
14042  type appears instead.
14043 \end_layout
14044
14045 \begin_layout Itemize
14046
14047 \family sans
14048 Address
14049 \family default
14050 : sender's address, in the standard behavior appears in a centered paragraph
14051  in the letter`s heading below the sender's name.
14052 \end_layout
14053
14054 \begin_layout Itemize
14055
14056 \family sans
14057 Telephone
14058 \family default
14059 : sender's telephone number, in the standard behavior only sets the LaTeX
14060  variable 
14061 \family typewriter
14062
14063 \backslash
14064 telephonenum
14065 \family default
14066 .
14067 \end_layout
14068
14069 \begin_layout Itemize
14070
14071 \family sans
14072 Place
14073 \family default
14074 : place of the letter`s making.
14075 \end_layout
14076
14077 \begin_layout Itemize
14078
14079 \family sans
14080 Date
14081 \family default
14082 : date of the letter`s making.
14083  
14084 \family sans
14085 Place
14086 \family default
14087  and 
14088 \family sans
14089 Date
14090 \family default
14091 , in the standard behavior, produce the place and the date in a right-aligned
14092  line below the addressee's field.
14093  If an empty 
14094 \family sans
14095 Date
14096 \family default
14097  type is used, neither place nor date appear, independent of the value of
14098  the 
14099 \family sans
14100 Place
14101 \family default
14102  type.
14103  If no 
14104 \family sans
14105 Date
14106 \family default
14107  type is used, the date of the letter `s production is used.
14108 \end_layout
14109
14110 \begin_layout Itemize
14111
14112 \family sans
14113 Backaddress
14114 \family default
14115 : sender`s back address, in the standard behavior appears above the addressee's
14116  field in a small sans serif font.
14117 \end_layout
14118
14119 \begin_layout Itemize
14120
14121 \family sans
14122 Specialmail
14123 \family default
14124 : special mail information, in the standard behavior appears underlined
14125  above the addressee's field below the back address.
14126 \end_layout
14127
14128 \begin_layout Itemize
14129
14130 \family sans
14131 Location
14132 \family default
14133 : additional information, in the standard behavior appears on right side
14134  below the addressee`s field.
14135 \end_layout
14136
14137 \begin_layout Itemize
14138
14139 \family sans
14140 Title
14141 \family default
14142 : the letter's title, in the standard behavior appears in a big, bold, sans
14143  serif font above the subject.
14144 \end_layout
14145
14146 \begin_layout Itemize
14147
14148 \family sans
14149 Subject
14150 \family default
14151 : the letter's subject, in the standard behavior appears in a bold font
14152  above the 
14153 \family sans
14154 Opening
14155 \family default
14156  paragraph.
14157 \end_layout
14158
14159 \begin_layout Standard
14160 The types 
14161 \family sans
14162 Yourref
14163 \family default
14164
14165 \family sans
14166 Yourmail
14167 \family default
14168
14169 \family sans
14170 Myref
14171 \family default
14172
14173 \family sans
14174 Customer
14175 \family default
14176 , and 
14177 \family sans
14178 Invoice
14179 \family default
14180  produce a business letter like line above the 
14181 \family sans
14182 Title
14183 \family default
14184  line containing the fields 
14185 \begin_inset Quotes eld
14186 \end_inset
14187
14188 Your ref.
14189 \begin_inset Quotes erd
14190 \end_inset
14191
14192
14193 \begin_inset Quotes eld
14194 \end_inset
14195
14196 Your letter of
14197 \begin_inset Quotes erd
14198 \end_inset
14199
14200
14201 \begin_inset Quotes eld
14202 \end_inset
14203
14204 Our ref.
14205 \begin_inset Quotes erd
14206 \end_inset
14207
14208
14209 \begin_inset Quotes eld
14210 \end_inset
14211
14212 Customer no.
14213 \begin_inset Quotes erd
14214 \end_inset
14215
14216
14217 \begin_inset Quotes eld
14218 \end_inset
14219
14220 Invoice no.
14221 \begin_inset Quotes erd
14222 \end_inset
14223
14224 , and 
14225 \begin_inset Quotes eld
14226 \end_inset
14227
14228 Date
14229 \begin_inset Quotes erd
14230 \end_inset
14231
14232 .
14233  For the date field, the value of the 
14234 \family sans
14235 Date
14236 \family default
14237  type is used.
14238  If one of these 
14239 \begin_inset Quotes eld
14240 \end_inset
14241
14242 business letter types
14243 \begin_inset Quotes erd
14244 \end_inset
14245
14246  is used, the value of the 
14247 \family sans
14248 Place
14249 \family default
14250  type however does not appear, but only the LaTeX variable 
14251 \family typewriter
14252
14253 \backslash
14254 fromplace
14255 \family default
14256  is set.
14257  The ordinary output of place and date in a right-aligned line below the
14258  addressee`s field is suppressed.
14259  The types are implemented as input types provided with a label and must
14260  be used ahead of the corresponding 
14261 \family sans
14262 Opening
14263 \family default
14264  type.
14265 \end_layout
14266
14267 \begin_layout Itemize
14268
14269 \family sans
14270 Yourref
14271 \family default
14272 : Your ref.
14273 \end_layout
14274
14275 \begin_layout Itemize
14276
14277 \family sans
14278 Yourmail
14279 \family default
14280 : Your letter of.
14281 \end_layout
14282
14283 \begin_layout Itemize
14284
14285 \family sans
14286 Myref
14287 \family default
14288 : Our ref.
14289 \end_layout
14290
14291 \begin_layout Itemize
14292
14293 \family sans
14294 Customer
14295 \family default
14296 : Customer no.
14297 \end_layout
14298
14299 \begin_layout Itemize
14300
14301 \family sans
14302 Invoice
14303 \family default
14304 : Invoice no.
14305 \end_layout
14306
14307 \begin_layout Subsection
14308 The new letter class: letter (koma-script v.2)
14309 \end_layout
14310
14311 \begin_layout Standard
14312 by 
14313 \noun on
14314 Jürgen Spitzmüller
14315 \end_layout
14316
14317 \begin_layout Standard
14318 \begin_inset VSpace medskip
14319 \end_inset
14320
14321
14322 \end_layout
14323
14324 \begin_layout Standard
14325 \noindent
14326 Koma-Script version 2.8 has introduced a new letter class 
14327 \family typewriter
14328 scrlttr2
14329 \family default
14330  which supersedes the now unsupported 
14331 \family typewriter
14332 scrlettr
14333 \family default
14334 .
14335  It has — on the LaTeX side — a completely new interface and is not compatible
14336  with the old class.
14337  Therefore, LyX supports both, though it is recommended you use the new
14338  class.
14339 \end_layout
14340
14341 \begin_layout Standard
14342 This class covers the same functionality as 
14343 \emph on
14344 letter (koma-script),
14345 \emph default
14346  and a few more.
14347  The basic items are 
14348 \family sans
14349 Address
14350 \family default
14351  (receiver's address, same as 
14352 \family sans
14353 Letter
14354 \family default
14355  in the old layout), 
14356 \family sans
14357 Opening
14358 \family default
14359 , and 
14360 \family sans
14361 Closing
14362 \family default
14363 .
14364  
14365 \family sans
14366 NextAddress
14367 \family default
14368  will start a new letter (i.
14369 \begin_inset space \thinspace{}
14370 \end_inset
14371
14372 g.
14373 \begin_inset space \space{}
14374 \end_inset
14375
14376 you can write several letters per document).
14377  New elements are sender's 
14378 \family sans
14379 E-Mail
14380 \family default
14381
14382 \family sans
14383 URL
14384 \family default
14385
14386 \family sans
14387 Fax
14388 \family default
14389
14390 \family sans
14391 Bank
14392 \family default
14393  and the possibility to use a 
14394 \family sans
14395 Logo
14396 \family default
14397  (via 
14398 \family sans
14399 Insert\SpecialChar \menuseparator
14400 Graphics
14401 \family default
14402 ) in the header.
14403 \end_layout
14404
14405 \begin_layout Standard
14406 The biggest improvement is, though, that the letter's layout is configurable
14407  to meet almost any needs.
14408  This can be done via the preamble or with a special style file (Letter
14409  Class Option, extension 
14410 \family typewriter
14411 *.lco
14412 \family default
14413 ), that will be read in as a class option.
14414 \begin_inset Foot
14415 status collapsed
14416
14417 \begin_layout Plain Layout
14418 The KOMA package comes with some default 
14419 \family typewriter
14420 *.lco
14421 \family default
14422  files.
14423  There is, for instance, a 
14424 \family typewriter
14425 DIN.lco
14426 \family default
14427  file that follows german typesetting rules, or a 
14428 \family typewriter
14429 KOMAold.lco
14430 \family default
14431  that provides the default layout of the old 
14432 \family typewriter
14433 scrlettr
14434 \family default
14435  class.
14436  The latter can be loaded with the class option 
14437 \family typewriter
14438 KOMAold
14439 \family default
14440 , inserted via the 
14441 \family sans
14442 \bar under
14443 L
14444 \bar default
14445 ayout\SpecialChar \menuseparator
14446
14447 \bar under
14448 D
14449 \bar default
14450 ocument\SpecialChar \menuseparator
14451 Extra Options
14452 \family default
14453  field.
14454 \end_layout
14455
14456 \end_inset
14457
14458  Have a look at the 
14459 \emph on
14460 koma-letter2
14461 \emph default
14462  template that is included in LyX for examples.
14463  A detailed description is to be found in the Koma-Script documentation
14464  (
14465 \emph on
14466 scrguide
14467 \emph default
14468 ).
14469 \end_layout
14470
14471 \begin_layout Subsection
14472 Problems
14473 \end_layout
14474
14475 \begin_layout Standard
14476 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14477  some problems.
14478 \end_layout
14479
14480 \begin_layout Itemize
14481 The chapter number of a 
14482 \family sans
14483 Chapter
14484 \family default
14485  type appears on a line of its own above the chapter heading instead of
14486  appearing in the same line ahead of it.
14487  The cause for that is the LyX internal behavior for the labeltype 
14488 \family sans
14489 Counter_Chapter
14490 \family default
14491  in the layout file.
14492 \end_layout
14493
14494 \begin_layout Itemize
14495 The headings of the types 
14496 \family sans
14497 Addchap
14498 \family default
14499  and 
14500 \family sans
14501 Addsec
14502 \family default
14503  are only put in the 
14504 \begin_inset Quotes eld
14505 \end_inset
14506
14507 true
14508 \begin_inset Quotes erd
14509 \end_inset
14510
14511  LaTeX table of contents, but not in the LyX table of contents (
14512 \family sans
14513 Document\SpecialChar \menuseparator
14514 Table
14515 \begin_inset space ~
14516 \end_inset
14517
14518 of
14519 \begin_inset space ~
14520 \end_inset
14521
14522 Contents
14523 \family default
14524 ).
14525 \end_layout
14526
14527 \begin_layout Itemize
14528 The paragraphs in a 
14529 \emph on
14530 letter
14531 \emph default
14532  document class appear in a skip separation mode, not indented.
14533  This is the standard behavior, no special LaTeX commands are needed for
14534  that.
14535  But in the 
14536 \family sans
14537 Document\SpecialChar \menuseparator
14538 Settings
14539 \family default
14540  dialog the corresponding radio button indicates 
14541 \family sans
14542 Indent
14543 \family default
14544 .
14545  A 
14546 \family sans
14547 Skip
14548 \family default
14549  value always has the effect that extra LaTeX commands are inserted in the
14550  document to produce the gap, which is not what is wanted in this case.
14551 \end_layout
14552
14553 \begin_layout Section
14554 Memoir
14555 \end_layout
14556
14557 \begin_layout Standard
14558 By 
14559 \noun on
14560 Jürgen Spitzmüller
14561 \end_layout
14562
14563 \begin_layout Subsection
14564 Overview
14565 \end_layout
14566
14567 \begin_layout Standard
14568 Memoir is a very powerful and constantly evolving class.
14569  It has been designed with regard to fictional and non-fictional literature.
14570  Its aim is to let the user have maximum control over the typesetting of
14571  his document.
14572  Memoir is based on the standard book class, but it can also emulate the
14573  article class (see below).
14574 \end_layout
14575
14576 \begin_layout Standard
14577 Peter Wilson, the developer of Memoir, is known as the author of lots of
14578  useful packages in the LaTeX world.
14579  Most of them have been merged with Memoir.
14580  Therefore, it is much easier to layout the table of contents, appendices,
14581  chapter designs and such.
14582  LyX, though, does not support all of these goodies natively.
14583  Some of them might be added to forthcoming releases
14584 \begin_inset Foot
14585 status collapsed
14586
14587 \begin_layout Plain Layout
14588 You are invited to send suggestions to 
14589 \begin_inset Flex URL
14590 status collapsed
14591
14592 \begin_layout Plain Layout
14593
14594 lyx-devel@lists.lyx.org
14595 \end_layout
14596
14597 \end_inset
14598
14599 .
14600 \end_layout
14601
14602 \end_inset
14603
14604 , lots will probably never, due to the limitations of LyX's framework.
14605  Of course you can still use all features with the help of some native LaTeX
14606  commands (TeX code
14607 \begin_inset Foot
14608 status collapsed
14609
14610 \begin_layout Plain Layout
14611 Cf.
14612 \begin_inset ERT
14613 status collapsed
14614
14615 \begin_layout Plain Layout
14616
14617
14618 \backslash
14619  
14620 \end_layout
14621
14622 \end_inset
14623
14624 section
14625 \begin_inset space ~
14626 \end_inset
14627
14628
14629 \begin_inset CommandInset ref
14630 LatexCommand ref
14631 reference "sec:Inserting-TeX-Code"
14632
14633 \end_inset
14634
14635  for details.
14636 \end_layout
14637
14638 \end_inset
14639
14640 ).
14641  In this section, we can only list those features which are natively supported
14642  by LyX.
14643  For detailed descriptions (and for the rest of features) we recommend you
14644  have a look at the detailed manual of the Memoir class
14645 \begin_inset Foot
14646 status collapsed
14647
14648 \begin_layout Plain Layout
14649 Cf.
14650 \begin_inset ERT
14651 status collapsed
14652
14653 \begin_layout Plain Layout
14654
14655
14656 \backslash
14657  
14658 \end_layout
14659
14660 \end_inset
14661
14662
14663 \begin_inset Flex URL
14664 status collapsed
14665
14666 \begin_layout Plain Layout
14667
14668 CTAN:/macros/latex/memoir/memman.pdf
14669 \end_layout
14670
14671 \end_inset
14672
14673 .
14674 \end_layout
14675
14676 \end_inset
14677
14678 , which is not only a user guide for the class, but also both a comprehensive
14679  description on good typesetting and a superb example for good typesetting
14680  itself.
14681 \end_layout
14682
14683 \begin_layout Subsection
14684 Basic features and restrictions
14685 \end_layout
14686
14687 \begin_layout Standard
14688 Memoir supports basically all features of the standard book classes.
14689  There are, however, some differences, as follows:
14690 \end_layout
14691
14692 \begin_layout Description
14693 Font
14694 \begin_inset space ~
14695 \end_inset
14696
14697 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14698 \end_layout
14699
14700 \begin_layout Description
14701 Page
14702 \begin_inset space ~
14703 \end_inset
14704
14705 style: The fancy page style is not supported, due to a command clash between
14706  Memoir and the fancyhdr package (they both define a command with the same
14707  name, which confuses LaTeX).
14708  Instead, Memoir comes with a number of its own page styles (see 
14709 \family sans
14710 Layout\SpecialChar \menuseparator
14711 Document\SpecialChar \menuseparator
14712 Page
14713 \begin_inset space ~
14714 \end_inset
14715
14716 Style
14717 \family default
14718 ).
14719  If you want to use these for the chapter pages, you have to use the command
14720  
14721 \family typewriter
14722
14723 \backslash
14724 chapterstyle
14725 \family default
14726  in the main text or in preamble (e.
14727 \begin_inset space \thinspace{}
14728 \end_inset
14729
14730 g.
14731 \begin_inset space \space{}
14732 \end_inset
14733
14734
14735 \family typewriter
14736
14737 \backslash
14738 chapterstyle{companion}
14739 \family default
14740 ).
14741 \end_layout
14742
14743 \begin_layout Description
14744 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14745  optional argument in the standard classes.
14746  With this, you can specify an alternative version of the title for the
14747  table of contents and the headers (for instance, if the title is too long).
14748  In LyX, you can do this via 
14749 \family sans
14750 Insert\SpecialChar \menuseparator
14751 Short
14752 \begin_inset space ~
14753 \end_inset
14754
14755 Title
14756 \family default
14757  at the beginning of a chapter/section.
14758  Memoir features a second optional argument and thus separates the table
14759  of contents from the header.
14760  You can define three variants of a title with this: one for the main text,
14761  one for the table of contents, and one for the headers.
14762  Simply insert two optional arguments if you need this feature, the first
14763  one containing the short title for the Table of Contents, the second one
14764  containing an alternative short title for the headers.
14765 \end_layout
14766
14767 \begin_layout Description
14768 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14769  of contents, the list of figures and the list of table start a new page
14770  automatically.
14771  Memoir does not follow this route.
14772  You have to insert a page break yourself, if you want to have one.
14773 \end_layout
14774
14775 \begin_layout Description
14776 Titlepage: For some unknown reason, Memoir uses pagination on the title
14777  page (in the standard classes, title pages are 
14778 \begin_inset Quotes eld
14779 \end_inset
14780
14781 empty
14782 \begin_inset Quotes erd
14783 \end_inset
14784
14785 , i.
14786 \begin_inset space \thinspace{}
14787 \end_inset
14788
14789 g.
14790 \begin_inset space \space{}
14791 \end_inset
14792
14793 without pagina).
14794  If you want an empty title page, type 
14795 \family typewriter
14796
14797 \backslash
14798 aliaspagestyle{title}{empty}
14799 \family default
14800  in the preamble.
14801 \end_layout
14802
14803 \begin_layout Description
14804 Article: With the class option 
14805 \emph on
14806 article
14807 \emph default
14808  (to be inserted in 
14809 \family sans
14810 Layout\SpecialChar \menuseparator
14811 Document\SpecialChar \menuseparator
14812 Extra
14813 \begin_inset space ~
14814 \end_inset
14815
14816 Options
14817 \family default
14818 ), you can emulate article style.
14819  That is, counters (footnotes, figures, tables etc.) will not be reset on
14820  new chapters, chapters don't start a new page (but are—in contrary to 
14821 \begin_inset Quotes eld
14822 \end_inset
14823
14824 real
14825 \begin_inset Quotes erd
14826 \end_inset
14827
14828  article classes—still allowed), parts, though, use their own page, as in
14829  book.
14830 \end_layout
14831
14832 \begin_layout Description
14833 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14834  font commands, which have been used in the old LaTeX version 2.09 (e.
14835 \begin_inset space \thinspace{}
14836 \end_inset
14837
14838 g.
14839 \begin_inset space \space{}
14840 \end_inset
14841
14842
14843 \family typewriter
14844
14845 \backslash
14846 rm
14847 \family default
14848
14849 \family typewriter
14850
14851 \backslash
14852 it
14853 \family default
14854 ).
14855  It produces an error and stops LaTeX whenever such a command appears.
14856  The class option 
14857 \emph on
14858 oldfontcommands
14859 \emph default
14860  reallows the commands and spits out warnings instead (which does at least
14861  not stop LaTeX).
14862  Since a lot of packages and particularly BibTeX style files are still using
14863  those commands, we have decided to use this option by default.
14864 \end_layout
14865
14866 \begin_layout Subsection
14867 Extra features
14868 \end_layout
14869
14870 \begin_layout Standard
14871 We will only describe the features supported by LyX (which is not much currently
14872 ).
14873  Please consult the Memoir manual
14874 \begin_inset Foot
14875 status collapsed
14876
14877 \begin_layout Plain Layout
14878 Cf.
14879 \begin_inset ERT
14880 status collapsed
14881
14882 \begin_layout Plain Layout
14883
14884
14885 \backslash
14886  
14887 \end_layout
14888
14889 \end_inset
14890
14891
14892 \begin_inset Flex URL
14893 status collapsed
14894
14895 \begin_layout Plain Layout
14896
14897 CTAN:/macros/latex/memoir/memman.pdf
14898 \end_layout
14899
14900 \end_inset
14901
14902 .
14903 \end_layout
14904
14905 \end_inset
14906
14907  for details.
14908 \end_layout
14909
14910 \begin_layout Description
14911 Abstract: You may wonder why an abstract is an extra feature.
14912  Well, it is in book class.
14913  Usually books don't have abstracts.
14914  Memoir, however, has.
14915  You can use it wherever and how often you like.
14916 \end_layout
14917
14918 \begin_layout Description
14919 Chapterprecis: You may know this older typesetting style: The contents of
14920  a chapter are summarized below the title and also in the table of contents
14921  (e.
14922 \begin_inset space \thinspace{}
14923 \end_inset
14924
14925 g.
14926 \begin_inset space \space{}
14927 \end_inset
14928
14929
14930 \emph on
14931 Our hero arrives in Troia; he loses some friends; he finds others
14932 \emph default
14933 ).
14934  Chapterprecis does exactly this.
14935  It is therefore only sensible below a chapter.
14936 \end_layout
14937
14938 \begin_layout Description
14939 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14940  The epigraph environment provides an elegant way of typesetting such a
14941  motto.
14942  The motto itself (text) and its author (source) are divided by a short
14943  line.
14944  Unfortunately, we have to fool LyX a bit here again, since the environment
14945  needs two arguments (text and source).
14946  In this case, we have to use curly brackets (in TeX mode) between the two
14947  arguments: 
14948 \emph on
14949 <smart slogan>
14950 \emph default
14951  
14952 \family typewriter
14953 }{
14954 \family default
14955  
14956 \emph on
14957 <author of the slogan>.
14958 \end_layout
14959
14960 \begin_layout Description
14961 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14962  complex figurative poems).
14963  LyX can only support a few of them.
14964  One is poemtitle, which is a centered title for poems, which will also
14965  be added to the table of contents (verse is the standard environment for
14966  poems.
14967  Memoir has some enhanced versions of verse, but you need to use TeX code,
14968  because they have to be nested inside regular verse environments, which
14969  is not possible with LyX).
14970 \end_layout
14971
14972 \begin_layout Description
14973 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14974 \end_layout
14975
14976 \begin_layout Section
14977 Article (mwart), book (mwbk) and report (mwrep)
14978 \begin_inset Argument
14979 status collapsed
14980
14981 \begin_layout Plain Layout
14982 The 
14983 \family typewriter
14984 mw
14985 \family default
14986  Classes
14987 \end_layout
14988
14989 \end_inset
14990
14991
14992 \end_layout
14993
14994 \begin_layout Standard
14995 by 
14996 \noun on
14997 Tomasz Luczak
14998 \end_layout
14999
15000 \begin_layout Standard
15001 The LyX document classes 
15002 \emph on
15003 article (mwart)
15004 \emph default
15005
15006 \emph on
15007 report (mwrep)
15008 \emph default
15009  and 
15010 \emph on
15011 book
15012 \emph default
15013  
15014 \emph on
15015 (mwbk)
15016 \emph default
15017  correspond to the LaTeX document classes 
15018 \family typewriter
15019 mwart.cls
15020 \family default
15021
15022 \family typewriter
15023 mwrep.cls
15024 \family default
15025  and 
15026 \family typewriter
15027 mwbk.cls
15028 \family default
15029 , resp.
15030  They are replacements for the standard document classes 
15031 \family typewriter
15032 article.cls
15033 \family default
15034
15035 \family typewriter
15036 report.cls
15037 \family default
15038  and 
15039 \family typewriter
15040 book.cls
15041 \family default
15042 , resp., and fit better to Polish typography conventions in a number of points.
15043  
15044 \end_layout
15045
15046 \begin_layout Standard
15047 Basic differences:
15048 \end_layout
15049
15050 \begin_layout Itemize
15051 Unnumbered titles (with star, e.
15052 \begin_inset space \thinspace{}
15053 \end_inset
15054
15055 g.
15056 \begin_inset space \space{}
15057 \end_inset
15058
15059
15060 \family sans
15061 Section*
15062 \family default
15063 ) are added into table of contents,
15064 \end_layout
15065
15066 \begin_layout Itemize
15067 Additional page styles:
15068 \end_layout
15069
15070 \begin_deeper
15071 \begin_layout Description
15072 uheadings header with separated lines,
15073 \end_layout
15074
15075 \begin_layout Description
15076 myheadings custom header, contents headers via commands: 
15077 \family typewriter
15078
15079 \backslash
15080 markright
15081 \family default
15082  and 
15083 \family typewriter
15084
15085 \backslash
15086 markboth
15087 \family default
15088 ,
15089 \end_layout
15090
15091 \begin_layout Description
15092 myuheadings custom header with separated lines,
15093 \end_layout
15094
15095 \begin_layout Description
15096 outer page number is placed on outer side of page
15097 \end_layout
15098
15099 \end_deeper
15100 \begin_layout Itemize
15101 Options 
15102 \end_layout
15103
15104 \begin_deeper
15105 \begin_layout Description
15106 rmheadings serif titles — default,
15107 \end_layout
15108
15109 \begin_layout Description
15110 sfheadings sansserif titles,
15111 \end_layout
15112
15113 \begin_layout Description
15114 authortitle on title page first placed is author next title — default,
15115 \end_layout
15116
15117 \begin_layout Description
15118 titleauthor on title page first placed is title next author,
15119 \end_layout
15120
15121 \begin_layout Description
15122 withmarginpar reserve place on page for margins.
15123 \end_layout
15124
15125 \end_deeper
15126 \begin_layout Section
15127 Paper
15128 \end_layout
15129
15130 \begin_layout Standard
15131 The document class 
15132 \family sans
15133 paper
15134 \family default
15135  provides an alternative to the standard 
15136 \family sans
15137 article
15138 \family default
15139  class.
15140  It provides similar functionality, but you might prefer this layout with
15141  sans serif sections, headings, and more.
15142 \end_layout
15143
15144 \begin_layout Section
15145 RevTeX4
15146 \end_layout
15147
15148 \begin_layout Standard
15149 by 
15150 \noun on
15151 Amir Karger
15152 \end_layout
15153
15154 \begin_layout Standard
15155 \begin_inset VSpace bigskip
15156 \end_inset
15157
15158
15159 \end_layout
15160
15161 \begin_layout Standard
15162 \noindent
15163 The 
15164 \family sans
15165 Revtex
15166 \begin_inset space ~
15167 \end_inset
15168
15169 4
15170 \family default
15171  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15172 \begin_inset Formula $\beta$
15173 \end_inset
15174
15175  release of May, 1999) class.
15176 \end_layout
15177
15178 \begin_layout Standard
15179 LyX has a 
15180 \family sans
15181 Revtex
15182 \family default
15183  textclass, which works with RevTeX 3.1.
15184  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15185  That means that it doesn't interact very well with LyX, which requires
15186  LaTeX2e, although it has been kludged to work.
15187  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15188  LyX with the 
15189 \family sans
15190 RevTeX
15191 \begin_inset space ~
15192 \end_inset
15193
15194 4
15195 \family default
15196  textclass should also be pretty easy to use.
15197 \end_layout
15198
15199 \begin_layout Standard
15200 These documents are supposed to be used in 
15201 \emph on
15202 addition
15203 \emph default
15204  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15205  macros, and assume you'll know what to put in the preamble if necessary.
15206 \end_layout
15207
15208 \begin_layout Subsection
15209 Installation
15210 \end_layout
15211
15212 \begin_layout Standard
15213 All you need to do is install RevTeX 4, as described in the package's README
15214  file.
15215  The package can be found at The RevTeX 4 Web Site 
15216 \begin_inset Flex URL
15217 status collapsed
15218
15219 \begin_layout Plain Layout
15220
15221 http://publish.aps.org/revtex4/
15222 \end_layout
15223
15224 \end_inset
15225
15226 .
15227  Install it somewhere that LaTeX can see it.
15228  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15229  (i.
15230 \begin_inset space \thinspace{}
15231 \end_inset
15232
15233 g.
15234 \begin_inset space \space{}
15235 \end_inset
15236
15237 not the directory where you installed the class file.) Then, if you reconfigure
15238  LyX, it will find the class file and let you use the RevTeX4 textclass.
15239 \end_layout
15240
15241 \begin_layout Standard
15242 Probably the easiest way to get started is either to import a RevTeX 4 document
15243  using 
15244 \family typewriter
15245 tex2lyx
15246 \family default
15247 , or to use the 
15248 \family sans
15249 Revtex
15250 \begin_inset space ~
15251 \end_inset
15252
15253 4
15254 \family default
15255  template, found in the templates directory.
15256 \end_layout
15257
15258 \begin_layout Subsection
15259 Preamble Matter
15260 \end_layout
15261
15262 \begin_layout Standard
15263 Optional arguments to 
15264 \family typewriter
15265
15266 \backslash
15267 documentclass
15268 \family default
15269 , like 
15270 \begin_inset Quotes eld
15271 \end_inset
15272
15273 preprint
15274 \begin_inset Quotes erd
15275 \end_inset
15276
15277  and 
15278 \begin_inset Quotes eld
15279 \end_inset
15280
15281 aps
15282 \begin_inset Quotes erd
15283 \end_inset
15284
15285 , go in the 
15286 \family sans
15287 E
15288 \bar under
15289 x
15290 \bar default
15291 tra
15292 \begin_inset space ~
15293 \end_inset
15294
15295 Options
15296 \family default
15297  field in the 
15298 \family sans
15299 Document
15300 \begin_inset space ~
15301 \end_inset
15302
15303 Layout
15304 \family default
15305  dialog, as usual.
15306  Remember that in RevTeX, at least one optional argument is required! 
15307 \end_layout
15308
15309 \begin_layout Standard
15310 Other preamble matter, like 
15311 \family typewriter
15312
15313 \backslash
15314 draft
15315 \family default
15316  etc.
15317 \begin_inset space ~
15318 \end_inset
15319
15320 goes in the 
15321 \family sans
15322 LaTeX
15323 \begin_inset space ~
15324 \end_inset
15325
15326 Preamble
15327 \family default
15328  dialog, also as usual.
15329 \end_layout
15330
15331 \begin_layout Subsection
15332 Layouts
15333 \end_layout
15334
15335 \begin_layout Standard
15336 The layouts basically correspond to the commands in RevTeX4.0.
15337  For example, the Email layout corresponds to 
15338 \family typewriter
15339
15340 \backslash
15341 email{}
15342 \family default
15343 .
15344  Note that (at least as of RevTeX 4.0 Beta), the 
15345 \family sans
15346 Address
15347 \family default
15348  and 
15349 \family sans
15350 Affiliation
15351 \family default
15352  layouts are exactly equivalent, so you shouldn't need to use both.
15353 \begin_inset Foot
15354 status collapsed
15355
15356 \begin_layout Plain Layout
15357 In case you're curious, both were included so that 
15358 \family typewriter
15359 tex2lyx
15360 \family default
15361  would be able to translate both 
15362 \family typewriter
15363
15364 \backslash
15365 address
15366 \family default
15367  and 
15368 \family typewriter
15369
15370 \backslash
15371 affiliation
15372 \family default
15373 .
15374 \end_layout
15375
15376 \end_inset
15377
15378
15379 \end_layout
15380
15381 \begin_layout Subsection
15382 Important Notes
15383 \end_layout
15384
15385 \begin_layout Standard
15386 There are a couple of important unique aspects of RevTeX 4 which might cause
15387  bugs that will be even more confusing in LyX.
15388 \end_layout
15389
15390 \begin_layout Standard
15391 In RevTeX, the 
15392 \family typewriter
15393
15394 \backslash
15395 thanks
15396 \family default
15397  command goes 
15398 \emph on
15399 outside
15400 \emph default
15401  the 
15402 \family typewriter
15403
15404 \backslash
15405 author
15406 \family default
15407  command.
15408  The LyX equivalent is that there is a separate Thanks layout.
15409  Do 
15410 \emph on
15411 not
15412 \emph default
15413  write footnotes in the 
15414 \family sans
15415 Author
15416 \family default
15417  layout, or weird things may happen.
15418  See the RevTeX 4 documentation for more details.
15419 \end_layout
15420
15421 \begin_layout Standard
15422 Also, the 
15423 \family sans
15424 Author
15425 \begin_inset space ~
15426 \end_inset
15427
15428 Email
15429 \family default
15430
15431 \family sans
15432 Author
15433 \begin_inset space ~
15434 \end_inset
15435
15436 URL
15437 \family default
15438 , and 
15439 \family sans
15440 Thanks
15441 \family default
15442  layouts must be placed 
15443 \emph on
15444 in between
15445 \emph default
15446  the 
15447 \family sans
15448 Author
15449 \family default
15450  layout and the corresponding 
15451 \family sans
15452 Address
15453 \family default
15454  (or equivalent 
15455 \family sans
15456 Affiliation
15457 \family default
15458 ) layout.
15459  If you put the 
15460 \family sans
15461 Thanks
15462 \family default
15463  after the 
15464 \family sans
15465 Address
15466 \family default
15467 , the LaTeX won't compile.
15468 \end_layout
15469
15470 \begin_layout Subsection
15471 Drawbacks
15472 \end_layout
15473
15474 \begin_layout Standard
15475 The main problem with this layout is that you can't use the optional arguments
15476  to layouts like Email and Title.
15477  (The problem is not unique to this layout; you can't use optional arguments
15478  to the Section layouts either.) This means that after you export that file
15479  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15480  need to edit the LaTeX file with a text editor to add the optional arguments
15481  to set, e.
15482 \begin_inset space \thinspace{}
15483 \end_inset
15484
15485 g.
15486 \begin_inset space \space{}
15487 \end_inset
15488
15489 the running title for the page headers.
15490  Lacking these layouts makes the 
15491 \family typewriter
15492
15493 \backslash
15494 altaffiliation
15495 \family default
15496  (and the equivalent 
15497 \family typewriter
15498
15499 \backslash
15500 altaddress
15501 \family default
15502 ) useless, so the corresponding layouts don't exist, and will have to be
15503  added by hand.
15504 \begin_inset Foot
15505 status collapsed
15506
15507 \begin_layout Plain Layout
15508
15509 \emph on
15510 Note from JMarc:
15511 \emph default
15512  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15513  has not been updated yet to take advantage of it.
15514 \end_layout
15515
15516 \end_inset
15517
15518  
15519 \end_layout
15520
15521 \begin_layout Section
15522 Springer Journals (
15523 \family sans
15524 svjour
15525 \family default
15526 )
15527 \end_layout
15528
15529 \begin_layout Standard
15530 by 
15531 \noun on
15532 Martin Vermeer
15533 \end_layout
15534
15535 \begin_layout Subsection
15536 Description
15537 \end_layout
15538
15539 \begin_layout Standard
15540 These are the layout files for some of the journal formats used by Springer
15541  Verlag and listed on 
15542 \begin_inset Flex URL
15543 status collapsed
15544
15545 \begin_layout Plain Layout
15546
15547 http://www.springer.de/author/tex/help-journals.html
15548 \end_layout
15549
15550 \end_inset
15551
15552 , where you should also go to fetch the class files (yes, these are LaTeX2e
15553  now!).
15554  It is a modular system: the things common to all journals are implemented
15555  in 
15556 \family typewriter
15557 svjour.inc
15558 \family default
15559 , which journal-specific layout files (such as, e.
15560 \begin_inset space \thinspace{}
15561 \end_inset
15562
15563 g.
15564 \begin_inset space \space{}
15565 \end_inset
15566
15567
15568 \family typewriter
15569 svjog.layout
15570 \family default
15571  for Journal of Geodesy) can include.
15572 \end_layout
15573
15574 \begin_layout Standard
15575 This means that implementing support for any other Springer journal on this
15576  list is as simple as writing your own 
15577 \family typewriter
15578 sv
15579 \family default
15580 <myjournal>
15581 \family typewriter
15582 .layout
15583 \family default
15584  file following the outline given in 
15585 \family typewriter
15586 svjog.layout
15587 \family default
15588 .
15589  
15590 \end_layout
15591
15592 \begin_layout Standard
15593 It is reasonably well tested only for the Journal of Geodesy.
15594  
15595 \family typewriter
15596 svjour
15597 \family default
15598  and 
15599 \family typewriter
15600 svjog
15601 \family default
15602  come with the standard LyX distribution.
15603  Install the relevant class file (downloaded from Springer) in a proper
15604  directory, reconfigure LaTeX (in the teTeX case by running 
15605 \family typewriter
15606 texhash
15607 \family default
15608 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15609  and it should work.
15610 \end_layout
15611
15612 \begin_layout Subsection
15613 New styles
15614 \end_layout
15615
15616 \begin_layout Standard
15617 A large number of theorem-like styles — 
15618 \family sans
15619 Claim, Conjecture,
15620 \family default
15621  
15622 \family sans
15623 \SpecialChar \ldots{}
15624 Theorem
15625 \family default
15626 .
15627 \end_layout
15628
15629 \begin_layout Standard
15630
15631 \family sans
15632 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15633  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15634 \family default
15635 .
15636  See the Springer class file documentation for details.
15637 \end_layout
15638
15639 \begin_layout Subsection
15640 Supported journals
15641 \end_layout
15642
15643 \begin_layout Itemize
15644
15645 \emph on
15646 Journal of Geodesy
15647 \emph default
15648
15649 \family typewriter
15650 svjog.layout
15651 \family default
15652  — Martin Vermeer
15653 \end_layout
15654
15655 \begin_layout Itemize
15656
15657 \emph on
15658 Probability Theory and Related Fields
15659 \emph default
15660
15661 \family typewriter
15662 svprobth.layout
15663 \family default
15664  — Jean-Marc Lasgouttes
15665 \end_layout
15666
15667 \begin_layout Standard
15668 Add your own, it isn't so hard!
15669 \end_layout
15670
15671 \begin_layout Subsection
15672 Credits
15673 \end_layout
15674
15675 \begin_layout Standard
15676 These files are partly based on the older 
15677 \family typewriter
15678 ejour2.layout
15679 \family default
15680 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15681  file from Springer.
15682  All this, and the 
15683 \family typewriter
15684 ejour2
15685 \family default
15686  layout, are now defunct.
15687  Jean-Marc Lasgouttes helped out big in making me find my way around the
15688  LyX layout file mechanism.
15689 \end_layout
15690
15691 \begin_layout Subsection
15692 Bugs
15693 \end_layout
15694
15695 \begin_layout Standard
15696 Probably.
15697  But probably less than in the old hacked-LaTeX 
15698 \family typewriter
15699 ejour2
15700 \family default
15701 .
15702 \end_layout
15703
15704 \begin_layout Standard
15705 Limitations e.
15706 \begin_inset space \thinspace{}
15707 \end_inset
15708
15709 g.: does not display the number for theorem-like layouts, just #.
15710 \end_layout
15711
15712 \begin_layout Section
15713 Slides [aka 
15714 \noun on
15715 SliTeX
15716 \noun default
15717 ]
15718 \begin_inset CommandInset label
15719 LatexCommand label
15720 name "sec:slitex"
15721
15722 \end_inset
15723
15724
15725 \end_layout
15726
15727 \begin_layout Standard
15728 by 
15729 \noun on
15730 John Weiss
15731 \noun default
15732  
15733 \end_layout
15734
15735 \begin_layout Subsection
15736 Introduction
15737 \end_layout
15738
15739 \begin_layout Standard
15740 This section describes how to use LyX to make slides for overhead projectors.
15741  There are two document classes that can do this: the default slides class
15742  and the 
15743 \family sans
15744 FoilTeX
15745 \family default
15746  slides class.
15747  This section documents the former.
15748 \end_layout
15749
15750 \begin_layout Standard
15751 I'm going to say this again, nice and clear, so that there's no misunderstanding
15752 :
15753 \end_layout
15754
15755 \begin_layout Standard
15756 \begin_inset VSpace bigskip
15757 \end_inset
15758
15759
15760 \end_layout
15761
15762 \begin_layout Standard
15763 \align center
15764
15765 \size large
15766 This section documents the class 
15767 \begin_inset Quotes eld
15768 \end_inset
15769
15770
15771 \family sans
15772 slides (default)
15773 \family default
15774
15775 \begin_inset Quotes erd
15776 \end_inset
15777
15778  
15779 \emph on
15780 only.
15781 \end_layout
15782
15783 \begin_layout Standard
15784 \begin_inset VSpace bigskip
15785 \end_inset
15786
15787
15788 \end_layout
15789
15790 \begin_layout Standard
15791 If you're looking for the documentation for 
15792 \begin_inset Quotes eld
15793 \end_inset
15794
15795
15796 \family sans
15797 slides (FoilTeX)
15798 \family default
15799
15800 \begin_inset Quotes erd
15801 \end_inset
15802
15803 , check out section
15804 \begin_inset space ~
15805 \end_inset
15806
15807
15808 \begin_inset CommandInset ref
15809 LatexCommand ref
15810 reference "sec:foiltex"
15811
15812 \end_inset
15813
15814 .
15815  The 
15816 \family sans
15817 foils
15818 \family default
15819  class [
15820 \begin_inset Quotes eld
15821 \end_inset
15822
15823
15824 \family sans
15825 slides (FoilTeX)
15826 \family default
15827
15828 \begin_inset Quotes erd
15829 \end_inset
15830
15831 ] is actually somewhat better than the default 
15832 \family sans
15833 slides
15834 \family default
15835  class,
15836 \begin_inset Foot
15837 status collapsed
15838
15839 \begin_layout Plain Layout
15840 \SpecialChar \ldots{}
15841 or so I've been told repeatedly by its advocates.
15842  Having never used it, I have no idea if this claim is true or not.
15843 \end_layout
15844
15845 \end_inset
15846
15847  which this section documents.
15848 \end_layout
15849
15850 \begin_layout Standard
15851 This class is the LaTeX2e improvement of the old 
15852 \noun on
15853 SliTeX
15854 \noun default
15855  package.
15856  Every LaTeX2e distribution includes this class [which I'll just refer to
15857  as 
15858 \begin_inset Quotes eld
15859 \end_inset
15860
15861
15862 \family sans
15863 slides
15864 \family default
15865
15866 \begin_inset Quotes erd
15867 \end_inset
15868
15869  from now on], so you're bound to have it.
15870  As I noted earlier, there are other classes, such as 
15871 \family sans
15872 foils
15873 \family default
15874 , which also produce slides for overhead projectors and do a better job
15875  at it.
15876  However, there are some things which 
15877 \family sans
15878 slides
15879 \family default
15880  can do which the others can't, such as generate overlays.
15881  Read on to learn more!
15882 \end_layout
15883
15884 \begin_layout Subsection
15885 Getting Started
15886 \begin_inset CommandInset label
15887 LatexCommand label
15888 name "sec:slidesetup"
15889
15890 \end_inset
15891
15892
15893 \end_layout
15894
15895 \begin_layout Standard
15896 Obviously, to use this document class, you need to select 
15897 \begin_inset Quotes eld
15898 \end_inset
15899
15900
15901 \family sans
15902 slides (default)
15903 \family default
15904
15905 \begin_inset Quotes erd
15906 \end_inset
15907
15908  from the class list in the 
15909 \family sans
15910 Document\SpecialChar \menuseparator
15911 Settings
15912 \family default
15913  dialog.
15914  There are some other special things you should know about this class:
15915 \end_layout
15916
15917 \begin_layout Itemize
15918 Don't bother changing the options 
15919 \family sans
15920 Sides and Columns
15921 \family default
15922 .
15923  They're not supported by the 
15924 \family sans
15925 slides
15926 \family default
15927  class, anyways.
15928 \end_layout
15929
15930 \begin_layout Itemize
15931 The option 
15932 \family sans
15933 Page
15934 \begin_inset space ~
15935 \end_inset
15936
15937 style
15938 \family default
15939  behaves a bit differently for this class.
15940  The possible choices and what they do are as follows:
15941 \end_layout
15942
15943 \begin_deeper
15944 \begin_layout Description
15945
15946 \family sans
15947 plain
15948 \family default
15949  The final output contains page numbers in the lower right corner.
15950 \end_layout
15951
15952 \begin_layout Description
15953
15954 \family sans
15955 headings
15956 \family default
15957  Like 
15958 \family sans
15959 plain
15960 \family default
15961 , but also prints out any time markers you've put in.
15962  This is the default.
15963 \end_layout
15964
15965 \begin_layout Description
15966
15967 \family sans
15968 empty
15969 \family default
15970  The final output contains no page numbers, time markers, or alignment markers.
15971 \end_layout
15972
15973 \end_deeper
15974 \begin_layout Itemize
15975 The 
15976 \family sans
15977 slides
15978 \family default
15979  class has an extra option: 
15980 \family typewriter
15981 clock
15982 \family default
15983 .
15984  To use it, put 
15985 \begin_inset Quotes eld
15986 \end_inset
15987
15988
15989 \family typewriter
15990 clock
15991 \family default
15992
15993 \begin_inset Quotes erd
15994 \end_inset
15995
15996  in the extra class options.
15997 \end_layout
15998
15999 \begin_deeper
16000 \begin_layout Standard
16001 Using this options allows you to add time markers to 
16002 \family sans
16003 Note
16004 \family default
16005 s.
16006  See section
16007 \begin_inset space ~
16008 \end_inset
16009
16010
16011 \begin_inset CommandInset ref
16012 LatexCommand ref
16013 reference "sec:slideNote"
16014
16015 \end_inset
16016
16017  for more details.
16018 \end_layout
16019
16020 \end_deeper
16021 \begin_layout Standard
16022 You can also use the template file 
16023 \begin_inset Quotes eld
16024 \end_inset
16025
16026
16027 \family typewriter
16028 slides.lyx
16029 \family default
16030
16031 \begin_inset Quotes erd
16032 \end_inset
16033
16034  to automatically set up a document to use the 
16035 \family sans
16036 slides
16037 \family default
16038  class [using 
16039 \family sans
16040 File\SpecialChar \menuseparator
16041 New
16042 \begin_inset space ~
16043 \end_inset
16044
16045 from
16046 \begin_inset space ~
16047 \end_inset
16048
16049 Template
16050 \family default
16051  to open your new document].
16052  The template file also contains some examples of the special paragraph
16053  environments used by this class.
16054  I'll describe those next.
16055 \end_layout
16056
16057 \begin_layout Subsection
16058 Paragraph Environments
16059 \end_layout
16060
16061 \begin_layout Subsubsection
16062 Supported Environments
16063 \end_layout
16064
16065 \begin_layout Standard
16066 The first thing you'll notice when you start up a new 
16067 \family sans
16068 slides
16069 \family default
16070  document is the font size and type: it's the equivalent of the size 
16071 \begin_inset Quotes eld
16072 \end_inset
16073
16074
16075 \family sans
16076 Largest
16077 \family default
16078
16079 \begin_inset Quotes erd
16080 \end_inset
16081
16082  in the 
16083 \family sans
16084 Sans
16085 \begin_inset space ~
16086 \end_inset
16087
16088 Serif
16089 \family default
16090  font.
16091  This is also what's used in the output.
16092  Think of this as a 
16093 \begin_inset Quotes eld
16094 \end_inset
16095
16096 visual cue
16097 \begin_inset Quotes erd
16098 \end_inset
16099
16100  to remind you that this is a slide.
16101  Your final slides will use a larger font; ergo, you'll have less space.
16102  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16103 \end_layout
16104
16105 \begin_layout Standard
16106 The next thing that becomes obvious is the changes to the paragraph environment
16107  pull-down box [at the far-left end of the toolbar].
16108  Most of the paragraph environments you're used to seeing are missing.
16109  There are also five new ones.
16110  That's because the 
16111 \family sans
16112 slides
16113 \family default
16114  class itself only supports certain paragraph environments:
16115 \end_layout
16116
16117 \begin_layout Itemize
16118
16119 \family sans
16120 Standard
16121 \end_layout
16122
16123 \begin_layout Itemize
16124
16125 \family sans
16126 Itemize
16127 \end_layout
16128
16129 \begin_layout Itemize
16130
16131 \family sans
16132 Enumerate
16133 \end_layout
16134
16135 \begin_layout Itemize
16136
16137 \family sans
16138 Description
16139 \end_layout
16140
16141 \begin_layout Itemize
16142
16143 \family sans
16144 List
16145 \end_layout
16146
16147 \begin_layout Itemize
16148
16149 \family sans
16150 Quotation
16151 \end_layout
16152
16153 \begin_layout Itemize
16154
16155 \family sans
16156 Quote
16157 \end_layout
16158
16159 \begin_layout Itemize
16160
16161 \family sans
16162 Verse
16163 \end_layout
16164
16165 \begin_layout Itemize
16166
16167 \family sans
16168 Caption
16169 \end_layout
16170
16171 \begin_layout Itemize
16172
16173 \family sans
16174 LyX-Code
16175 \end_layout
16176
16177 \begin_layout Itemize
16178
16179 \family sans
16180 Comment
16181 \end_layout
16182
16183 \begin_layout Standard
16184 All of the other standard environments, including the section-heading environmen
16185 ts, aren't used in the 
16186 \family sans
16187 slides
16188 \family default
16189  class.
16190 \end_layout
16191
16192 \begin_layout Standard
16193 On the other hand, you'll notice the following new environments:
16194 \end_layout
16195
16196 \begin_layout Itemize
16197
16198 \family sans
16199 Slide
16200 \end_layout
16201
16202 \begin_layout Itemize
16203
16204 \family sans
16205 Overlay
16206 \end_layout
16207
16208 \begin_layout Itemize
16209
16210 \family sans
16211 Note
16212 \end_layout
16213
16214 \begin_layout Itemize
16215
16216 \family sans
16217 InvisibleText
16218 \end_layout
16219
16220 \begin_layout Itemize
16221
16222 \family sans
16223 VisibleText
16224 \end_layout
16225
16226 \begin_layout Standard
16227 These five are kind of quirky, due to a 
16228 \begin_inset Quotes eld
16229 \end_inset
16230
16231 feature
16232 \begin_inset Quotes erd
16233 \end_inset
16234
16235  in LyX.
16236  You see, LyX doesn't permit you to nest any other paragraph environment
16237  into an empty environment.
16238  Now, that's fine and dandy, but it means that you wouldn't be able to start
16239  a slide with anything except plain text.
16240  To deal with this, I've performed a little 
16241 \begin_inset Quotes eld
16242 \end_inset
16243
16244 LaTeX magic.
16245 \begin_inset Quotes erd
16246 \end_inset
16247
16248  
16249 \end_layout
16250
16251 \begin_layout Subsubsection
16252 Quirks of the New Environments
16253 \begin_inset CommandInset label
16254 LatexCommand label
16255 name "sec:slideQuirk"
16256
16257 \end_inset
16258
16259
16260 \end_layout
16261
16262 \begin_layout Standard
16263 All five of the new paragraph environments are somewhat quirky due to inherent
16264  limitiations in the current version of LyX.
16265  As I just mentioned, LyX forbids environments that begin with another environme
16266 nt.
16267  To get around this, the 
16268 \family sans
16269 Slide
16270 \family default
16271  environment isn't a paragraph environment as described in the 
16272 \emph on
16273 User's Guide
16274 \emph default
16275 .
16276  
16277 \end_layout
16278
16279 \begin_layout Standard
16280 You should consider 
16281 \family sans
16282 Slide
16283 \family default
16284
16285 \family sans
16286 Overlay
16287 \family default
16288 , and 
16289 \family sans
16290 Note
16291 \family default
16292  to be 
16293 \begin_inset Quotes eld
16294 \end_inset
16295
16296 pseudo-environments.
16297 \begin_inset Quotes erd
16298 \end_inset
16299
16300  They look like a section heading or a 
16301 \begin_inset Quotes eld
16302 \end_inset
16303
16304
16305 \family sans
16306 Caption
16307 \family default
16308 ,
16309 \begin_inset Quotes erd
16310 \end_inset
16311
16312  but really begin a [and, if necessary, end the previous] paragraph environment.
16313  Likewise, treat 
16314 \family sans
16315 InvisibleText
16316 \family default
16317  and 
16318 \family sans
16319 VisibleText
16320 \family default
16321  as 
16322 \begin_inset Quotes eld
16323 \end_inset
16324
16325 pseudo-commands.
16326 \begin_inset Quotes erd
16327 \end_inset
16328
16329  These two perform some action.
16330 \end_layout
16331
16332 \begin_layout Standard
16333 A common feature of all five environments, 
16334 \family sans
16335 Slide
16336 \family default
16337
16338 \family sans
16339 Overlay
16340 \family default
16341
16342 \family sans
16343 Note
16344 \family default
16345
16346 \family sans
16347 InvisibleText
16348 \family default
16349  and 
16350 \family sans
16351 VisibleText
16352 \family default
16353 , is a rather long-ish label.
16354  The text following this label — ordinarily the contents of the paragraph
16355  environment — is utterly irrelevant for 
16356 \family sans
16357 Slide
16358 \family default
16359
16360 \family sans
16361 Overlay
16362 \family default
16363
16364 \family sans
16365 Note
16366 \family default
16367
16368 \family sans
16369 InvisibleText
16370 \family default
16371  and 
16372 \family sans
16373 VisibleText
16374 \family default
16375 .
16376  LyX completely ignores it.
16377  In fact, you can leave these five environments completely empty.
16378  
16379 \end_layout
16380
16381 \begin_layout Standard
16382 While you don't 
16383 \emph on
16384 have
16385 \emph default
16386  to put any text after the rather long-ish label, you might want to.
16387  This could be a short description of the contents of the 
16388 \family sans
16389 Slide
16390 \family default
16391 , for example.
16392  In that case, enter your descriptive comment and hit 
16393 \family sans
16394 Return
16395 \family default
16396  as you normally would.
16397 \end_layout
16398
16399 \begin_layout Standard
16400 If, on the other hand, you don't want to enter any descriptive text, you'll
16401  hit another LyX quirk.
16402  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16403  environment until you put something in the old one.
16404  So, do this:
16405 \end_layout
16406
16407 \begin_layout Itemize
16408 Start entering the text that will 
16409 \emph on
16410 follow
16411 \emph default
16412  the new 
16413 \family sans
16414 Slide
16415 \family default
16416
16417 \family sans
16418 Overlay
16419 \family default
16420
16421 \family sans
16422 Note
16423 \family default
16424
16425 \family sans
16426 InvisibleText
16427 \family default
16428  or 
16429 \family sans
16430 VisibleText
16431 \family default
16432 .
16433  
16434 \end_layout
16435
16436 \begin_layout Itemize
16437 Now move to the beginning of that paragraph.
16438  
16439 \end_layout
16440
16441 \begin_layout Itemize
16442 Next, hit 
16443 \family sans
16444 Return
16445 \family default
16446 .
16447  
16448 \end_layout
16449
16450 \begin_layout Itemize
16451 Finally, change this new, empty paragraph to a 
16452 \family sans
16453 Slide
16454 \family default
16455
16456 \family sans
16457 Overlay
16458 \family default
16459
16460 \family sans
16461 Note
16462 \family default
16463
16464 \family sans
16465 InvisibleText
16466 \family default
16467  or 
16468 \family sans
16469 VisibleText
16470 \family default
16471 .
16472  
16473 \end_layout
16474
16475 \begin_layout Standard
16476 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16477
16478 \end_layout
16479
16480 \begin_layout Subsection
16481 Making a Presentation with 
16482 \family sans
16483 Slide
16484 \family default
16485
16486 \family sans
16487 Overlay
16488 \family default
16489  and 
16490 \family sans
16491 Note
16492 \end_layout
16493
16494 \begin_layout Subsubsection
16495 Using the 
16496 \family sans
16497 Slide
16498 \family default
16499  Environment
16500 \end_layout
16501
16502 \begin_layout Standard
16503 If you're expecting this section to teach you how to actually make a presentatio
16504 n, you'll be sorely disappointed.
16505  Naturally, I'll describe all of the ways the 
16506 \family sans
16507 slides
16508 \family default
16509  class can assist you in preparing the materials for a presentation.
16510  Filling in the contents, however, is up to you.
16511  [Then again, that 
16512 \emph on
16513 is
16514 \emph default
16515  the LyX philosophy.]
16516 \end_layout
16517
16518 \begin_layout Standard
16519 Choosing the 
16520 \family sans
16521 Slide
16522 \family default
16523  environment [in the manner described in section
16524 \begin_inset space ~
16525 \end_inset
16526
16527
16528 \begin_inset CommandInset ref
16529 LatexCommand ref
16530 reference "sec:slideQuirk"
16531
16532 \end_inset
16533
16534 ] tells LyX to begin a new slide [duh].
16535  The label for this environment/
16536 \begin_inset Quotes erd
16537 \end_inset
16538
16539 pseudo-command
16540 \begin_inset Quotes erd
16541 \end_inset
16542
16543  is an 
16544 \begin_inset Quotes eld
16545 \end_inset
16546
16547 ASCII line,
16548 \begin_inset Quotes erd
16549 \end_inset
16550
16551  in cool blue, followed by the label, 
16552 \begin_inset Quotes eld
16553 \end_inset
16554
16555 NewSlide:
16556 \begin_inset Quotes erd
16557 \end_inset
16558
16559 .
16560  Any text or paragraph environments that follow this one go on the new slide.
16561  It's that simple.
16562 \end_layout
16563
16564 \begin_layout Standard
16565 Slides are probably the only time you'll need to forcibly end pages in LyX
16566  (this can be specified in the 
16567 \family sans
16568 Paragraph Layout
16569 \family default
16570  dialog).
16571  In fact, you'll want to, once you finish entering the contents of one slide.
16572  If you've entered more text than can physically fit on a slide, the extra
16573  overflows onto a new slide.
16574  I don't recommend doing this, however, since the overflow slide won't have
16575  any page number on it.
16576  Furthermore, it may interfere with any 
16577 \family sans
16578 Overlay
16579 \family default
16580  you've made to accompany the oversized 
16581 \family sans
16582 Slide
16583 \family default
16584 .
16585 \end_layout
16586
16587 \begin_layout Standard
16588 The 
16589 \family sans
16590 Overlay
16591 \family default
16592  and 
16593 \family sans
16594 Note
16595 \family default
16596  environments work the same way as the 
16597 \family sans
16598 Slide
16599 \family default
16600  environment.
16601  They both create an 
16602 \begin_inset Quotes eld
16603 \end_inset
16604
16605 ASCII line
16606 \begin_inset Quotes erd
16607 \end_inset
16608
16609  followed by a label [
16610 \begin_inset Quotes eld
16611 \end_inset
16612
16613 NewOverlay:
16614 \begin_inset Quotes erd
16615 \end_inset
16616
16617  and 
16618 \begin_inset Quotes eld
16619 \end_inset
16620
16621 NewNote:
16622 \begin_inset Quotes erd
16623 \end_inset
16624
16625 , respectively].
16626  The color is a stunning magenta instead of blue, and the 
16627 \begin_inset Quotes eld
16628 \end_inset
16629
16630 ASCII line
16631 \begin_inset Quotes erd
16632 \end_inset
16633
16634  will look different, in style and in length.
16635  The label fonts of all three also differ from one another.
16636 \end_layout
16637
16638 \begin_layout Standard
16639 As with a 
16640 \family sans
16641 Slide
16642 \family default
16643 , if the contents of a 
16644 \family sans
16645 Note
16646 \family default
16647  or 
16648 \family sans
16649 Overlay
16650 \family default
16651  exceed the physical size of a slide or sheet of paper, the extra will overflow
16652  onto a new sheet.
16653  Again, you should avoid this.
16654  It defeats the whole purpose of 
16655 \family sans
16656 Note
16657 \family default
16658 s and 
16659 \family sans
16660 Overlay
16661 \family default
16662 s.
16663 \end_layout
16664
16665 \begin_layout Subsubsection
16666 Using 
16667 \family sans
16668 Overlay
16669 \family default
16670  with 
16671 \family sans
16672 Slide
16673 \end_layout
16674
16675 \begin_layout Standard
16676 The idea behind an 
16677 \family sans
16678 Overlay
16679 \family default
16680  is a slide that sits atop another slide.
16681  Perhaps you wish to discuss a figure on the main 
16682 \family sans
16683 Slide
16684 \family default
16685  before displaying the text associated with it.
16686  One way to accomplish this is tape a flap of dark paper over the part of
16687  the 
16688 \family sans
16689 Slide
16690 \family default
16691  you want to display later.
16692  This method fails, however, if you wish to overlap one graph with another,
16693  for example.
16694  You would then have to fumble while speaking to align the two separate,
16695  overlapping 
16696 \family sans
16697 Slide
16698 \family default
16699 s to align the two graphs.
16700  The use of an 
16701 \family sans
16702 Overlay
16703 \family default
16704  environment in both cases makes life much easier.
16705 \end_layout
16706
16707 \begin_layout Standard
16708 Each 
16709 \family sans
16710 Overlay
16711 \family default
16712  receives the page number of its 
16713 \begin_inset Quotes eld
16714 \end_inset
16715
16716 parent
16717 \begin_inset Quotes erd
16718 \end_inset
16719
16720  
16721 \family sans
16722 Slide
16723 \family default
16724 , appended by 
16725 \begin_inset Quotes eld
16726 \end_inset
16727
16728
16729 \family typewriter
16730 -a
16731 \family default
16732
16733 \begin_inset Quotes erd
16734 \end_inset
16735
16736 .
16737 \begin_inset Foot
16738 status collapsed
16739
16740 \begin_layout Plain Layout
16741 Presumably, mutliple 
16742 \family sans
16743 Overlay
16744 \family default
16745 s would have 
16746 \begin_inset Quotes eld
16747 \end_inset
16748
16749
16750 \family typewriter
16751 -a
16752 \family default
16753
16754 \begin_inset Quotes erd
16755 \end_inset
16756
16757
16758 \begin_inset Quotes eld
16759 \end_inset
16760
16761
16762 \family typewriter
16763 -b
16764 \family default
16765
16766 \begin_inset Quotes erd
16767 \end_inset
16768
16769
16770 \begin_inset Quotes eld
16771 \end_inset
16772
16773
16774 \family typewriter
16775 -c
16776 \family default
16777
16778 \begin_inset Quotes erd
16779 \end_inset
16780
16781 , etc.
16782 \begin_inset space ~
16783 \end_inset
16784
16785 appended to the page number of the parent 
16786 \family sans
16787 Slide
16788 \family default
16789 .
16790  
16791 \end_layout
16792
16793 \end_inset
16794
16795  Clearly, you want the contents of both the 
16796 \family sans
16797 Slide
16798 \family default
16799  and the 
16800 \family sans
16801 Overlay
16802 \family default
16803  to each fit on a single physical slide! You should probably consider an
16804  
16805 \family sans
16806 Overlay
16807 \family default
16808  as 
16809 \begin_inset Quotes eld
16810 \end_inset
16811
16812 part of
16813 \begin_inset Quotes erd
16814 \end_inset
16815
16816  a 
16817 \family sans
16818 Slide
16819 \family default
16820 .
16821  Indeed, the LyX 
16822 \family sans
16823 slides
16824 \family default
16825  class provides a visual cue for this: the label at the start of an 
16826 \family sans
16827 Overlay
16828 \family default
16829  is shorter than that at the start of a 
16830 \family sans
16831 Slide
16832 \family default
16833 .
16834  Lastly, when you generate printable output, you'll find alignment markers
16835  in all four corners of both the 
16836 \family sans
16837 Overlay
16838 \family default
16839  page and its parent 
16840 \family sans
16841 Slide
16842 \family default
16843 .
16844  These will assist you in lining up the two physical slides.
16845 \end_layout
16846
16847 \begin_layout Standard
16848 The major problem in overlaying two slides is aligning the contents of the
16849  two transparencies.
16850  How much space should you leave for that graph on the second slide? Worse
16851  still, what if you want a graph and a sentence on second slide, but there
16852  is text on the main transparency that goes in between them? You could try
16853  and insert vertical space of the right size.
16854  The better way is to use 
16855 \family sans
16856 InvisibleText
16857 \family default
16858  and 
16859 \family sans
16860 VisibleText
16861 \family default
16862 .
16863 \end_layout
16864
16865 \begin_layout Standard
16866 As their names imply, 
16867 \family sans
16868 InvisibleText
16869 \family default
16870  and 
16871 \family sans
16872 VisibleText
16873 \family default
16874  are two command-like paragraph environments that make all subsequent text
16875  invisible and visible, respectively.
16876  Note from section
16877 \begin_inset space ~
16878 \end_inset
16879
16880
16881 \begin_inset CommandInset ref
16882 LatexCommand ref
16883 reference "sec:slideQuirk"
16884
16885 \end_inset
16886
16887  that you don't place anything 
16888 \emph on
16889 into
16890 \emph default
16891  these two environments, however.
16892  When you create an 
16893 \family sans
16894 InvisibleText
16895 \family default
16896 , it inserts a centered, sky-blue label into the page reading 
16897 \begin_inset Quotes eld
16898 \end_inset
16899
16900 <Invisible Text Follows>
16901 \begin_inset Quotes erd
16902 \end_inset
16903
16904 .
16905  For paragraphs following this label, the parts of the 
16906 \family sans
16907 Slide
16908 \family default
16909  [or 
16910 \family sans
16911 Overlay
16912 \family default
16913 ; it doesn't matter which] where they would be contain instead blank space.
16914  
16915 \end_layout
16916
16917 \begin_layout Standard
16918 For 
16919 \family sans
16920 VisibleText
16921 \family default
16922 , the corresponding centered label is 
16923 \begin_inset Quotes eld
16924 \end_inset
16925
16926 <Visible Text Follows>
16927 \begin_inset Quotes erd
16928 \end_inset
16929
16930  in blazing green.
16931  Paragraphs following this label behave normally.
16932  Note that the beginning of a new 
16933 \family sans
16934 Slide
16935 \family default
16936
16937 \family sans
16938 Overlay
16939 \family default
16940 , or 
16941 \family sans
16942 Note
16943 \family default
16944  automatically shuts off an 
16945 \family sans
16946 InvisibleText
16947 \family default
16948 .
16949  It's therefore not necessary to use 
16950 \family sans
16951 VisibleText
16952 \family default
16953  at the end of a 
16954 \family sans
16955 Slide
16956 \family default
16957 .
16958 \end_layout
16959
16960 \begin_layout Standard
16961 By now, it should be obvious how to create overlay transparencies using
16962  the proper combination of 
16963 \family sans
16964 InvisibleText
16965 \family default
16966  and 
16967 \family sans
16968 VisibleText
16969 \family default
16970  on a 
16971 \family sans
16972 Slide
16973 \family default
16974  and 
16975 \family sans
16976 Overlay
16977 \family default
16978 :
16979 \end_layout
16980
16981 \begin_layout Enumerate
16982 Create a 
16983 \family sans
16984 Slide
16985 \family default
16986 , including everything that will appear on it, whether on the main slide
16987  or on the 
16988 \family sans
16989 Overlay
16990 \family default
16991 .
16992 \end_layout
16993
16994 \begin_layout Enumerate
16995 Before each figure or paragraph that will appear only on the 
16996 \family sans
16997 Overlay
16998 \family default
16999 , insert an 
17000 \family sans
17001 InvisibleText
17002 \family default
17003  environment.
17004  If necessary, insert a 
17005 \family sans
17006 VisibleText
17007 \family default
17008  environment after the 
17009 \family sans
17010 Overlay
17011 \family default
17012 -only text.
17013 \end_layout
17014
17015 \begin_layout Enumerate
17016 Start an 
17017 \family sans
17018 Overlay
17019 \family default
17020  immediately following the 
17021 \family sans
17022 Slide
17023 \family default
17024 .
17025 \end_layout
17026
17027 \begin_layout Enumerate
17028 Copy the contents of this 
17029 \family sans
17030 Slide
17031 \family default
17032  into the 
17033 \family sans
17034 Overlay
17035 \family default
17036 .
17037 \end_layout
17038
17039 \begin_layout Enumerate
17040 Within the 
17041 \family sans
17042 Overlay
17043 \family default
17044 , change all of the 
17045 \family sans
17046 InvisibleText
17047 \family default
17048  lines to 
17049 \family sans
17050 VisibleText
17051 \family default
17052  and vice-versa.
17053 \end_layout
17054
17055 \begin_layout Standard
17056 That's it.
17057  You've just made an 
17058 \family sans
17059 Overlay
17060 \family default
17061 .
17062 \end_layout
17063
17064 \begin_layout Standard
17065 There's one problem with the way I've designed the LyX 
17066 \family sans
17067 slides
17068 \family default
17069  class: you can't make text in the middle of a paragraph invisible, nor
17070  make text in the middle of an invisible paragraph visible again.
17071  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17072 \begin_inset Foot
17073 status collapsed
17074
17075 \begin_layout Plain Layout
17076 The commands of interest are: 
17077 \end_layout
17078
17079 \begin_layout Itemize
17080
17081 \family typewriter
17082 {
17083 \backslash
17084 invisible \SpecialChar \ldots{}
17085  }
17086 \end_layout
17087
17088 \begin_layout Itemize
17089
17090 \family typewriter
17091 {
17092 \backslash
17093 visible \SpecialChar \ldots{}
17094  }
17095 \end_layout
17096
17097 \begin_layout Plain Layout
17098 \SpecialChar \ldots{}
17099 and need to be marked as TeX.
17100  The text whose 
17101 \begin_inset Quotes eld
17102 \end_inset
17103
17104 visibility
17105 \begin_inset Quotes erd
17106 \end_inset
17107
17108  you wish to change goes in between the brackets [and after the 
17109 \family typewriter
17110
17111 \backslash
17112 invisible
17113 \family default
17114  or 
17115 \family typewriter
17116
17117 \backslash
17118 visible
17119 \family default
17120  command].
17121  If you don't know how to mark text as TeX, see the appropriate section
17122  of the 
17123 \emph on
17124 User's Guide
17125 \emph default
17126 .
17127 \end_layout
17128
17129 \end_inset
17130
17131
17132 \end_layout
17133
17134 \begin_layout Subsubsection
17135 Using 
17136 \family sans
17137 Note
17138 \family default
17139  with 
17140 \family sans
17141 Slide
17142 \family default
17143
17144 \begin_inset CommandInset label
17145 LatexCommand label
17146 name "sec:slideNote"
17147
17148 \end_inset
17149
17150
17151 \end_layout
17152
17153 \begin_layout Standard
17154 Like an 
17155 \family sans
17156 Overlay
17157 \family default
17158 , a 
17159 \family sans
17160 Note
17161 \family default
17162  is associated with a 
17163 \begin_inset Quotes eld
17164 \end_inset
17165
17166 parent
17167 \begin_inset Quotes erd
17168 \end_inset
17169
17170  
17171 \family sans
17172 Slide
17173 \family default
17174 .
17175  Here, too, the LyX 
17176 \family sans
17177 slides
17178 \family default
17179  class provides visual cues.
17180  The label for a 
17181 \family sans
17182 Note
17183 \family default
17184  is shorter than that of a 
17185 \family sans
17186 Slide
17187 \family default
17188  [yet longer than that of an 
17189 \family sans
17190 Overlay
17191 \family default
17192 ] and, like the label of an 
17193 \family sans
17194 Overlay
17195 \family default
17196  is shockingly magenta.
17197  Additionally, the printed 
17198 \family sans
17199 Note
17200 \family default
17201  has the page number of its 
17202 \begin_inset Quotes eld
17203 \end_inset
17204
17205 parent
17206 \begin_inset Quotes erd
17207 \end_inset
17208
17209  
17210 \family sans
17211 Slide
17212 \family default
17213 , appended by 
17214 \begin_inset Quotes eld
17215 \end_inset
17216
17217
17218 \family typewriter
17219 -
17220 \family default
17221 1
17222 \begin_inset Quotes erd
17223 \end_inset
17224
17225
17226 \begin_inset Quotes eld
17227 \end_inset
17228
17229
17230 \family typewriter
17231 -
17232 \family default
17233 2
17234 \begin_inset Quotes erd
17235 \end_inset
17236
17237
17238 \begin_inset Quotes eld
17239 \end_inset
17240
17241
17242 \family typewriter
17243 -
17244 \family default
17245 3
17246 \begin_inset Quotes erd
17247 \end_inset
17248
17249 , etc.
17250  You can have multiple 
17251 \family sans
17252 Note
17253 \family default
17254 s associated with a single 
17255 \family sans
17256 Slide
17257 \family default
17258 , and, as with 
17259 \family sans
17260 Slide
17261 \family default
17262  and 
17263 \family sans
17264 Overlay
17265 \family default
17266 , you'll probably want to break up long 
17267 \family sans
17268 Note
17269 \family default
17270 s so that they fit on a single sheet of paper.
17271 \end_layout
17272
17273 \begin_layout Standard
17274 The purpose of a 
17275 \family sans
17276 Note
17277 \family default
17278  is obvious: it contains anything additional you might want to say about
17279  a 
17280 \family sans
17281 Slide
17282 \family default
17283 .
17284  It could also be used as a sheet of reminders for a particular 
17285 \family sans
17286 Slide
17287 \family default
17288 .
17289  In the case of the latter, you might want to make use of time markers.
17290  Currently, the LyX 
17291 \family sans
17292 slides
17293 \family default
17294  class has no 
17295 \begin_inset Quotes eld
17296 \end_inset
17297
17298 native
17299 \begin_inset Quotes erd
17300 \end_inset
17301
17302  support for time markers, a 
17303 \noun on
17304 SliTeX
17305 \noun default
17306  feature.
17307  So, you'll have to resort to using the LaTeX codes.
17308 \end_layout
17309
17310 \begin_layout Standard
17311 To use time markers, you'll need to specify the extra class option 
17312 \begin_inset Quotes eld
17313 \end_inset
17314
17315
17316 \family typewriter
17317 clock
17318 \family default
17319
17320 \begin_inset Quotes erd
17321 \end_inset
17322
17323  [see section
17324 \begin_inset space ~
17325 \end_inset
17326
17327
17328 \begin_inset CommandInset ref
17329 LatexCommand ref
17330 reference "sec:slidesetup"
17331
17332 \end_inset
17333
17334 ].
17335  This option turns on timing marks, which will appear in the lower-left-hand
17336  corner of every 
17337 \family sans
17338 Note
17339 \family default
17340  you generate.
17341  To set what appears in the time marker, you use the LaTeX commands 
17342 \begin_inset Quotes eld
17343 \end_inset
17344
17345
17346 \family typewriter
17347
17348 \backslash
17349 settime{}
17350 \family default
17351
17352 \begin_inset Quotes erd
17353 \end_inset
17354
17355  and 
17356 \begin_inset Quotes eld
17357 \end_inset
17358
17359
17360 \family typewriter
17361
17362 \backslash
17363 addtime{}
17364 \family default
17365
17366 \begin_inset Quotes erd
17367 \end_inset
17368
17369 .
17370  The arguments of both commands are time measured in seconds.
17371  
17372 \begin_inset Quotes eld
17373 \end_inset
17374
17375
17376 \family typewriter
17377
17378 \backslash
17379 settime{}
17380 \family default
17381
17382 \begin_inset Quotes erd
17383 \end_inset
17384
17385  sets the time marker to a given time.
17386  
17387 \begin_inset Quotes eld
17388 \end_inset
17389
17390
17391 \family typewriter
17392
17393 \backslash
17394 addtime{}
17395 \family default
17396
17397 \begin_inset Quotes erd
17398 \end_inset
17399
17400  increments the time marker by the specified amount.
17401  Using time markers and 
17402 \family sans
17403 Note
17404 \family default
17405 s in this fashion, you can remind yourself how much time to spend on a particula
17406
17407 \family sans
17408 Slide
17409 \family default
17410 .
17411 \end_layout
17412
17413 \begin_layout Standard
17414 There's one last feature to describe.
17415  Clearly, you'd like to print out all of your 
17416 \family sans
17417 Slide
17418 \family default
17419 s and 
17420 \family sans
17421 Overlay
17422 \family default
17423 s on transparencies while printing all of your 
17424 \family sans
17425 Note
17426 \family default
17427 s on plain paper.
17428  However, a 
17429 \family sans
17430 Note
17431 \family default
17432  
17433 \emph on
17434 must
17435 \emph default
17436  follow the 
17437 \family sans
17438 Slide
17439 \family default
17440  with which it is associated.
17441  What's a person to do?
17442 \end_layout
17443
17444 \begin_layout Standard
17445 Luckily, there are two LaTeX commands that allow you to select what to print
17446  out.
17447  Both must be placed into the preamble of your document.
17448  The command 
17449 \begin_inset Quotes eld
17450 \end_inset
17451
17452
17453 \family typewriter
17454
17455 \backslash
17456 onlyslides{
17457 \backslash
17458 slides}
17459 \family default
17460
17461 \begin_inset Quotes erd
17462 \end_inset
17463
17464  will cause the output to contain only the 
17465 \family sans
17466 Slide
17467 \family default
17468 s and 
17469 \family sans
17470 Overlay
17471 \family default
17472 s.
17473  Correspondingly, the command 
17474 \begin_inset Quotes eld
17475 \end_inset
17476
17477
17478 \family typewriter
17479
17480 \backslash
17481 onlynotes{
17482 \backslash
17483 notes}
17484 \family default
17485
17486 \begin_inset Quotes erd
17487 \end_inset
17488
17489  prevents the output of anything but 
17490 \family sans
17491 Note
17492 \family default
17493 s.
17494  I'd advise placing both commands in the preamble and initially comment
17495  both out.
17496  You can then preview your entire presentation as you write.
17497  When you're done writing, you can then uncomment one of the two to select
17498  what you want to print.
17499  I like to uncomment 
17500 \begin_inset Quotes eld
17501 \end_inset
17502
17503
17504 \family typewriter
17505
17506 \backslash
17507 onlyslides{
17508 \backslash
17509 slides}
17510 \family default
17511
17512 \begin_inset Quotes erd
17513 \end_inset
17514
17515  , print to a file with 
17516 \begin_inset Quotes eld
17517 \end_inset
17518
17519
17520 \family typewriter
17521 -slides
17522 \family default
17523
17524 \begin_inset Quotes erd
17525 \end_inset
17526
17527  in its name, comment it back out, then uncomment 
17528 \begin_inset Quotes eld
17529 \end_inset
17530
17531
17532 \family typewriter
17533
17534 \backslash
17535 onlynotes{
17536 \backslash
17537 notes}
17538 \family default
17539
17540 \begin_inset Quotes erd
17541 \end_inset
17542
17543  and print to a 
17544 \begin_inset Quotes eld
17545 \end_inset
17546
17547
17548 \family typewriter
17549 *-notes.ps
17550 \family default
17551
17552 \begin_inset Quotes erd
17553 \end_inset
17554
17555  file.
17556  I can then send either file to a printer, loading transparencies or plain
17557  paper as appropriate.
17558 \end_layout
17559
17560 \begin_layout Standard
17561 You can also provide other arguments to the 
17562 \begin_inset Quotes eld
17563 \end_inset
17564
17565
17566 \family typewriter
17567
17568 \backslash
17569 onlyslides{}
17570 \family default
17571
17572 \begin_inset Quotes erd
17573 \end_inset
17574
17575  and 
17576 \begin_inset Quotes eld
17577 \end_inset
17578
17579
17580 \family typewriter
17581
17582 \backslash
17583 onlynotes{}
17584 \family default
17585
17586 \begin_inset Quotes erd
17587 \end_inset
17588
17589  commands.
17590  See a good LaTeX book for details.
17591 \end_layout
17592
17593 \begin_layout Subsection
17594 The 
17595 \family sans
17596 slides
17597 \family default
17598  Class Template File
17599 \end_layout
17600
17601 \begin_layout Standard
17602 I have also provided a template file, 
17603 \begin_inset Quotes eld
17604 \end_inset
17605
17606
17607 \family typewriter
17608 slides.lyx
17609 \family default
17610
17611 \begin_inset Quotes erd
17612 \end_inset
17613
17614 , with the 
17615 \family sans
17616 slides
17617 \family default
17618  class.
17619  To use it, begin your new presentation with 
17620 \family sans
17621 \bar under
17622 F
17623 \bar default
17624 ile\SpecialChar \menuseparator
17625 New
17626 \begin_inset space ~
17627 \end_inset
17628
17629 from
17630 \begin_inset space ~
17631 \end_inset
17632
17633
17634 \bar under
17635 T
17636 \bar default
17637 emplate
17638 \family default
17639 .
17640  Your new LyX presentation file will contain an example 
17641 \family sans
17642 Slide
17643 \family default
17644  – 
17645 \family sans
17646 Overlay
17647 \family default
17648  – 
17649 \family sans
17650 Note
17651 \family default
17652  triplet.
17653  The 
17654 \family sans
17655 Slide
17656 \family default
17657  and 
17658 \family sans
17659 Overlay
17660 \family default
17661  additionally contain an example of the use of 
17662 \family sans
17663 InvisibleText
17664 \family default
17665  and 
17666 \family sans
17667 VisibleText
17668 \family default
17669 .
17670  Lastly, the preamble will contain:
17671 \end_layout
17672
17673 \begin_layout LyX-Code
17674 % Uncomment to print out only slides and overlays
17675 \end_layout
17676
17677 \begin_layout LyX-Code
17678 %
17679 \end_layout
17680
17681 \begin_layout LyX-Code
17682 %
17683 \backslash
17684 onlyslides{
17685 \backslash
17686 slides}
17687 \begin_inset Newline newline
17688 \end_inset
17689
17690  
17691 \end_layout
17692
17693 \begin_layout LyX-Code
17694 % Uncomment to print out only notes
17695 \end_layout
17696
17697 \begin_layout LyX-Code
17698 %
17699 \end_layout
17700
17701 \begin_layout LyX-Code
17702 %
17703 \backslash
17704 onlynotes{
17705 \backslash
17706 notes}
17707 \end_layout
17708
17709 \begin_layout Standard
17710 One final thing: I created this class to support the LaTeX2e 
17711 \begin_inset Quotes eld
17712 \end_inset
17713
17714
17715 \noun on
17716 SliTeX
17717 \noun default
17718  emulation
17719 \begin_inset Quotes erd
17720 \end_inset
17721
17722  class, one of the built-in LaTeX2e classes.
17723  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17724  built-in slide class.
17725  It's here if you want it or need it.
17726  There exist other LaTeX2e classes for creating presentations, such as the
17727  
17728 \family sans
17729 Foils
17730 \family default
17731  class [see section
17732 \begin_inset space ~
17733 \end_inset
17734
17735
17736 \begin_inset CommandInset ref
17737 LatexCommand ref
17738 reference "sec:foiltex"
17739
17740 \end_inset
17741
17742 ] or the 
17743 \begin_inset Quotes eld
17744 \end_inset
17745
17746
17747 \family typewriter
17748 seminar
17749 \family default
17750
17751 \begin_inset Quotes erd
17752 \end_inset
17753
17754  package [present on some TeX distributions].
17755  The latter is not yet supported under LyX.
17756 \begin_inset Foot
17757 status collapsed
17758
17759 \begin_layout Plain Layout
17760 Perhaps you can take on the task\SpecialChar \ldots{}
17761
17762 \end_layout
17763
17764 \end_inset
17765
17766  I know nothing about these other classes.
17767  Try them out to see what sort of alternative they provide.
17768 \end_layout
17769
17770 \begin_layout Chapter
17771 LyX Features needing Extra Software
17772 \end_layout
17773
17774 \begin_layout Section
17775 Checking TeX
17776 \end_layout
17777
17778 \begin_layout Standard
17779 by 
17780 \noun on
17781 Asger Alstrup
17782 \end_layout
17783
17784 \begin_layout Subsection
17785 Introduction
17786 \end_layout
17787
17788 \begin_layout Standard
17789 If you have the 
17790 \family typewriter
17791 chktex
17792 \family default
17793  program installed
17794 \begin_inset Foot
17795 status collapsed
17796
17797 \begin_layout Plain Layout
17798
17799 \family typewriter
17800 chktex
17801 \family default
17802  is not yet available when you are using the LaTeX distribution MiKTeX.
17803 \end_layout
17804
17805 \end_inset
17806
17807 , you'll find in the 
17808 \family sans
17809 Tools
17810 \family default
17811  menu the entry: 
17812 \family sans
17813 Check
17814 \begin_inset space ~
17815 \end_inset
17816
17817 TeX
17818 \family default
17819 .
17820  You can get 
17821 \family typewriter
17822 chktex
17823 \family default
17824  it from CTAN, 
17825 \begin_inset CommandInset href
17826 LatexCommand href
17827 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17828
17829 \end_inset
17830
17831 .
17832 \end_layout
17833
17834 \begin_layout Standard
17835 The 
17836 \family sans
17837 ChkTeX
17838 \family default
17839  package is a program that was written by 
17840 \begin_inset Flex Noun
17841 status collapsed
17842
17843 \begin_layout Plain Layout
17844 Jens T.
17845 \begin_inset space ~
17846 \end_inset
17847
17848 Berger Thielemann
17849 \end_layout
17850
17851 \end_inset
17852
17853  in frustration because some constructs in LaTeX are sometimes non-intuitive,
17854  and easy to forget.
17855  The program runs over your LaTeX file, checks the integrity of the file,
17856  and flags some common errors.
17857  In other technical words, it is 
17858 \family typewriter
17859 lint
17860 \family default
17861  for LaTeX.
17862 \end_layout
17863
17864 \begin_layout Standard
17865 Well, what is a syntax checker doing in LyX which is supposed to produce
17866  correct LaTeX anyways? The answer is simple: Just as 
17867 \family typewriter
17868 Lint
17869 \family default
17870  not only checks the 
17871 \emph on
17872 syntax
17873 \emph default
17874  of C programs, but also does 
17875 \emph on
17876 semantic
17877 \emph default
17878  checks for type-errors, 
17879 \family sans
17880 ChkTeX
17881 \family default
17882  catches some common 
17883 \emph on
17884 typographic
17885 \emph default
17886  errors, in addition to the syntactical ones.
17887  Specifically, 
17888 \family sans
17889 ChkTeX
17890 \family default
17891  is capable of detecting several common errors, such as
17892 \end_layout
17893
17894 \begin_layout Itemize
17895 Ellipsis detection:
17896 \begin_inset Newline newline
17897 \end_inset
17898
17899 Use \SpecialChar \ldots{}
17900  instead of ...
17901 \end_layout
17902
17903 \begin_layout Itemize
17904 No space in front of/after parenthesis:
17905 \begin_inset Newline newline
17906 \end_inset
17907
17908 ( wrong spacing )
17909 \end_layout
17910
17911 \begin_layout Itemize
17912 Enforcement of normal space after common abbreviations:
17913 \begin_inset Newline newline
17914 \end_inset
17915
17916 e.
17917 \begin_inset space \thinspace{}
17918 \end_inset
17919
17920 g.
17921 \begin_inset space \space{}
17922 \end_inset
17923
17924 is too wide spacing.
17925 \end_layout
17926
17927 \begin_layout Itemize
17928 Enforcement of end-of-sentence space when the last sentence ends with a
17929  capital letter:
17930 \begin_inset Newline newline
17931 \end_inset
17932
17933 This is a TEST.
17934  And this is wrong spacing.
17935 \end_layout
17936
17937 \begin_layout Itemize
17938 Space in front of labels and similar commands:
17939 \begin_inset Newline newline
17940 \end_inset
17941
17942 The label should stick right up to the text to avoid falling to a wrong
17943  page.
17944  
17945 \begin_inset CommandInset label
17946 LatexCommand label
17947 name "sec:chktex"
17948
17949 \end_inset
17950
17951  
17952 \begin_inset Foot
17953 status collapsed
17954
17955 \begin_layout Plain Layout
17956 This footnote is in danger of falling off to a wrong page
17957 \end_layout
17958
17959 \end_inset
17960
17961  The label is separated too much.
17962 \end_layout
17963
17964 \begin_layout Itemize
17965 Space in front of references, instead of hard spaces:
17966 \begin_inset Newline newline
17967 \end_inset
17968
17969 In you are in bad luck, the text will break right between the referenced
17970  text and reference number, and that's a pity.
17971  See section 
17972 \begin_inset CommandInset ref
17973 LatexCommand ref
17974 reference "sec:chktex"
17975
17976 \end_inset
17977
17978 .
17979 \end_layout
17980
17981 \begin_layout Itemize
17982 Use of 
17983 \begin_inset Quotes eld
17984 \end_inset
17985
17986 x
17987 \begin_inset Quotes erd
17988 \end_inset
17989
17990  instead of 
17991 \begin_inset Formula $\times$
17992 \end_inset
17993
17994  between numbers:
17995 \begin_inset Newline newline
17996 \end_inset
17997
17998 2x2 looks cheap compared to 
17999 \begin_inset Formula $2\times2$
18000 \end_inset
18001
18002 .
18003 \end_layout
18004
18005 \begin_layout Standard
18006 and more \SpecialChar \ldots{}
18007  It is an invaluable tool when you are 
18008 \begin_inset Quotes eld
18009 \end_inset
18010
18011 finishing up
18012 \begin_inset Quotes erd
18013 \end_inset
18014
18015  your document before printing, and you should run it right after the obligatory
18016  spelling check, and before you go fine tuning the typesetting.
18017 \end_layout
18018
18019 \begin_layout Subsection
18020 How to use it
18021 \end_layout
18022
18023 \begin_layout Standard
18024 If you have the program installed, usage is as simple as choosing 
18025 \family sans
18026 Tools\SpecialChar \menuseparator
18027 Check
18028 \begin_inset space ~
18029 \end_inset
18030
18031 TeX
18032 \family default
18033 .
18034  This will make LyX generate a LaTeX file of your document, start 
18035 \family sans
18036 ChkTeX
18037 \family default
18038  to check it, and then make LyX insert 
18039 \begin_inset Quotes eld
18040 \end_inset
18041
18042 error boxes
18043 \begin_inset Quotes erd
18044 \end_inset
18045
18046  with the warnings from 
18047 \family sans
18048 ChkTeX
18049 \family default
18050 , if there were any.
18051  The warnings will be placed close to the point of the mistake, and you
18052  can quickly find them by using the 
18053 \family sans
18054 Navigate\SpecialChar \menuseparator
18055 Error
18056 \family default
18057  menu item, or the shortcut key 
18058 \family sans
18059 C-g
18060 \family default
18061  from the default 
18062 \family typewriter
18063 cua
18064 \family default
18065  bind file.
18066  Open the error boxes by clicking on them with the mouse, or use the shortcut
18067  key 
18068 \family sans
18069 C-i
18070 \family default
18071  from 
18072 \family typewriter
18073 cua
18074 \family default
18075  bindings, or the corresponding 
18076 \family sans
18077 C-o
18078 \family default
18079  for the alternate 
18080 \family typewriter
18081 emacs
18082 \family default
18083  bind file.
18084  Read the warning and correct the mistake, if it is a mistake.
18085  If you have trouble understanding what the warning is about, you can safely
18086  ignore it.
18087  Remember that there is a hidden layer between the document on screen and
18088  the technical details in invoking 
18089 \family sans
18090 ChkTeX
18091 \family default
18092 , and this gap can make some warnings seem arcane or just right down plain
18093  silly.
18094 \end_layout
18095
18096 \begin_layout Standard
18097 This document is an excellent testing bed for the feature, and it should
18098  provide quite a few warnings for you to fiddle with.
18099  Since computers are only so smart, expect most of the warnings to be false
18100  alarms, though.
18101 \end_layout
18102
18103 \begin_layout Subsection
18104 How to fine tune it
18105 \end_layout
18106
18107 \begin_layout Standard
18108 Sometimes, you'll find that 
18109 \family sans
18110 ChkTeX
18111 \family default
18112  makes more noise than suits your mood.
18113  Then you can choose not to use it, wait until your mood changes, or try
18114  to customize 
18115 \family sans
18116 ChkTeX
18117 \family default
18118  to get better along with you.
18119 \end_layout
18120
18121 \begin_layout Standard
18122 Although 
18123 \family sans
18124 ChkTeX
18125 \family default
18126  
18127 \emph on
18128 is
18129 \emph default
18130  very configurable and extensible, you shouldn't expect to solve all problems
18131  with 
18132 \family sans
18133 ChkTeX
18134 \family default
18135  in LyX this way.
18136  Since LyX has to generate a somewhat special LaTeX file to be able to match
18137  the line numbers from the 
18138 \family sans
18139 ChkTeX
18140 \family default
18141  output
18142 \begin_inset Foot
18143 status collapsed
18144
18145 \begin_layout Plain Layout
18146 You can inspect the specific output from 
18147 \family sans
18148 chktex
18149 \family default
18150  by using 
18151 \family sans
18152 Edit\SpecialChar \menuseparator
18153 View
18154 \begin_inset space ~
18155 \end_inset
18156
18157 LaTeX
18158 \begin_inset space ~
18159 \end_inset
18160
18161 Log
18162 \family default
18163  right after a 
18164 \family sans
18165 chktex
18166 \family default
18167  run.
18168 \end_layout
18169
18170 \end_inset
18171
18172  to the internal document structure, some of the warnings will not seen
18173  to appear correctly.
18174  There are two things you can do about this:
18175 \end_layout
18176
18177 \begin_layout Itemize
18178 Fine tune the 
18179 \family sans
18180 ChkTeX
18181 \family default
18182  invocation command line in 
18183 \family sans
18184 Preferences
18185 \family default
18186  (tabs 
18187 \family sans
18188 Outputs
18189 \family default
18190
18191 \family sans
18192 Misc
18193 \family default
18194 ), or the global 
18195 \family sans
18196 ChkTeX
18197 \family default
18198  installation configuration file (usually with the file 
18199 \family typewriter
18200 chktexrc
18201 \family default
18202 ).
18203  See below to learn what warnings can be enabled and disabled on the command
18204  line.
18205  
18206 \end_layout
18207
18208 \begin_layout Itemize
18209 Export your document as a raw LaTeX file using 
18210 \family sans
18211 File\SpecialChar \menuseparator
18212 Export\SpecialChar \menuseparator
18213 LaTeX
18214 \family default
18215  and run 
18216 \family typewriter
18217 chktex
18218 \family default
18219  manually on that.
18220  Invoked in this way, it can be a hassle to find the corresponding place
18221  in the document inside LyX, but with a little patience, you should be able
18222  to do it.
18223 \end_layout
18224
18225 \begin_layout Standard
18226 Here follows the warning messages that can be enabled and disabled in 
18227 \family sans
18228 Preferences
18229 \family default
18230 .
18231  Use 
18232 \family typewriter
18233 -n#
18234 \family default
18235  to disable a warning, and 
18236 \family typewriter
18237 -w#
18238 \family default
18239  to enable a warning.
18240  The emphasized entries are disabled by default, because the default is
18241  "
18242 \family typewriter
18243 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18244 \family default
18245 ".
18246 \end_layout
18247
18248 \begin_layout Standard
18249 Notice that you should only use the options that enable and disable warnings,
18250  because LyX relies on some of the other command line parameters to be set
18251  in a specific way to have a chance to communicate with 
18252 \family typewriter
18253 chktex
18254 \family default
18255 .
18256 \end_layout
18257
18258 \begin_layout Enumerate
18259
18260 \size small
18261 \emph on
18262 Command terminated with space.
18263 \end_layout
18264
18265 \begin_layout Enumerate
18266
18267 \size small
18268 Non-breaking space (
18269 \begin_inset Quotes eld
18270 \end_inset
18271
18272
18273 \family typewriter
18274 ~
18275 \family default
18276
18277 \begin_inset Quotes erd
18278 \end_inset
18279
18280 ) should have been used.
18281 \end_layout
18282
18283 \begin_layout Enumerate
18284
18285 \size small
18286 \emph on
18287 You should enclose the previous parenthesis with 
18288 \begin_inset Quotes eld
18289 \end_inset
18290
18291
18292 \family typewriter
18293 {}
18294 \family default
18295
18296 \begin_inset Quotes erd
18297 \end_inset
18298
18299 .
18300 \end_layout
18301
18302 \begin_layout Enumerate
18303
18304 \size small
18305 Italic correction (
18306 \begin_inset Quotes eld
18307 \end_inset
18308
18309
18310 \family typewriter
18311
18312 \backslash
18313 /
18314 \family default
18315
18316 \begin_inset Quotes erd
18317 \end_inset
18318
18319 ) found in non-italic buffer.
18320 \end_layout
18321
18322 \begin_layout Enumerate
18323
18324 \size small
18325 Italic correction (
18326 \begin_inset Quotes eld
18327 \end_inset
18328
18329
18330 \family typewriter
18331
18332 \backslash
18333 /
18334 \family default
18335
18336 \begin_inset Quotes erd
18337 \end_inset
18338
18339 ) found more than once.
18340 \end_layout
18341
18342 \begin_layout Enumerate
18343
18344 \size small
18345 \emph on
18346 No italic correction (
18347 \begin_inset Quotes eld
18348 \end_inset
18349
18350
18351 \family typewriter
18352
18353 \backslash
18354 /
18355 \family default
18356
18357 \begin_inset Quotes erd
18358 \end_inset
18359
18360 ) found.
18361 \end_layout
18362
18363 \begin_layout Enumerate
18364
18365 \size small
18366 Accent command 
18367 \begin_inset Quotes eld
18368 \end_inset
18369
18370
18371 \family typewriter
18372 cmd
18373 \family default
18374
18375 \begin_inset Quotes erd
18376 \end_inset
18377
18378  needs use of 
18379 \begin_inset Quotes eld
18380 \end_inset
18381
18382
18383 \family typewriter
18384 cmd
18385 \family default
18386
18387 \begin_inset Quotes erd
18388 \end_inset
18389
18390 .
18391 \end_layout
18392
18393 \begin_layout Enumerate
18394
18395 \size small
18396 Wrong length of dash may have been used.
18397 \end_layout
18398
18399 \begin_layout Enumerate
18400
18401 \size small
18402 \emph on
18403 \begin_inset Quotes eld
18404 \end_inset
18405
18406
18407 \family typewriter
18408 %s
18409 \family default
18410
18411 \begin_inset Quotes erd
18412 \end_inset
18413
18414  expected, found 
18415 \begin_inset Quotes eld
18416 \end_inset
18417
18418
18419 \family typewriter
18420 %s
18421 \family default
18422
18423 \begin_inset Quotes erd
18424 \end_inset
18425
18426 .
18427 \end_layout
18428
18429 \begin_layout Enumerate
18430
18431 \size small
18432 Solo 
18433 \begin_inset Quotes eld
18434 \end_inset
18435
18436
18437 \family typewriter
18438 %s
18439 \family default
18440
18441 \begin_inset Quotes erd
18442 \end_inset
18443
18444  found.
18445 \end_layout
18446
18447 \begin_layout Enumerate
18448
18449 \size small
18450 You should use 
18451 \begin_inset Quotes eld
18452 \end_inset
18453
18454
18455 \family typewriter
18456 %s
18457 \family default
18458
18459 \begin_inset Quotes erd
18460 \end_inset
18461
18462  to achieve an ellipsis.
18463 \end_layout
18464
18465 \begin_layout Enumerate
18466
18467 \size small
18468 Inter-word spacing (
18469 \begin_inset Quotes eld
18470 \end_inset
18471
18472
18473 \family typewriter
18474
18475 \backslash
18476
18477 \family default
18478  
18479 \begin_inset Quotes eld
18480 \end_inset
18481
18482 ) should perhaps be used.
18483 \end_layout
18484
18485 \begin_layout Enumerate
18486
18487 \size small
18488 Inter-sentence spacing (
18489 \begin_inset Quotes eld
18490 \end_inset
18491
18492
18493 \family typewriter
18494
18495 \backslash
18496 @
18497 \family default
18498
18499 \begin_inset Quotes erd
18500 \end_inset
18501
18502 ) should perhaps be used.
18503 \end_layout
18504
18505 \begin_layout Enumerate
18506
18507 \size small
18508 Could not find argument for command.
18509 \end_layout
18510
18511 \begin_layout Enumerate
18512
18513 \size small
18514 No match found for 
18515 \begin_inset Quotes eld
18516 \end_inset
18517
18518
18519 \family typewriter
18520 %s
18521 \family default
18522
18523 \begin_inset Quotes erd
18524 \end_inset
18525
18526 .
18527 \end_layout
18528
18529 \begin_layout Enumerate
18530
18531 \size small
18532 Math mode still on at end of LaTeX file.
18533 \end_layout
18534
18535 \begin_layout Enumerate
18536
18537 \size small
18538 Number of 
18539 \begin_inset Quotes eld
18540 \end_inset
18541
18542
18543 \family typewriter
18544 char
18545 \family default
18546
18547 \begin_inset Quotes erd
18548 \end_inset
18549
18550  doesn't match the number of 
18551 \begin_inset Quotes eld
18552 \end_inset
18553
18554
18555 \family typewriter
18556 char
18557 \family default
18558
18559 \begin_inset Quotes erd
18560 \end_inset
18561
18562 .
18563 \end_layout
18564
18565 \begin_layout Enumerate
18566
18567 \size small
18568 You should use either 
18569 \family typewriter
18570
18571 \begin_inset Quotes eld
18572 \end_inset
18573
18574
18575 \family default
18576  or 
18577 \family typewriter
18578
18579 \begin_inset Quotes erd
18580 \end_inset
18581
18582
18583 \family default
18584  as an alternative to 
18585 \begin_inset Quotes eld
18586 \end_inset
18587
18588
18589 \family typewriter
18590 "
18591 \family default
18592
18593 \begin_inset Quotes erd
18594 \end_inset
18595
18596 .
18597 \end_layout
18598
18599 \begin_layout Enumerate
18600
18601 \size small
18602 You should use "
18603 \family typewriter
18604 '
18605 \family default
18606 " (ASCII 39) instead of "
18607 \family typewriter
18608 ´
18609 \family default
18610 " (ASCII 180).
18611 \end_layout
18612
18613 \begin_layout Enumerate
18614
18615 \size small
18616 User-specified pattern found.
18617 \end_layout
18618
18619 \begin_layout Enumerate
18620
18621 \size small
18622 This command might not be intended.
18623 \end_layout
18624
18625 \begin_layout Enumerate
18626
18627 \size small
18628 \emph on
18629 Comment displayed.
18630 \end_layout
18631
18632 \begin_layout Enumerate
18633
18634 \size small
18635 Either 
18636 \family typewriter
18637 ''
18638 \backslash
18639 ,'
18640 \family default
18641  or 
18642 \family typewriter
18643 '
18644 \backslash
18645 ,''
18646 \family default
18647  will look better.
18648 \end_layout
18649
18650 \begin_layout Enumerate
18651
18652 \size small
18653 Delete this space to maintain correct page references.
18654 \end_layout
18655
18656 \begin_layout Enumerate
18657
18658 \size small
18659 \emph on
18660 You might wish to put this between a pair of 
18661 \begin_inset Quotes eld
18662 \end_inset
18663
18664
18665 \family typewriter
18666 {}
18667 \family default
18668
18669 \begin_inset Quotes erd
18670 \end_inset
18671
18672 .
18673 \end_layout
18674
18675 \begin_layout Enumerate
18676
18677 \size small
18678 You ought to remove spaces in front of punctuation.
18679 \end_layout
18680
18681 \begin_layout Enumerate
18682
18683 \size small
18684 Could not execute LaTeX command.
18685 \end_layout
18686
18687 \begin_layout Enumerate
18688
18689 \size small
18690 Don't use 
18691 \family typewriter
18692
18693 \backslash
18694 /
18695 \family default
18696  in front of small punctuation.
18697 \end_layout
18698
18699 \begin_layout Enumerate
18700
18701 \family typewriter
18702 \size small
18703 $
18704 \backslash
18705 times$
18706 \family default
18707  may look prettier here.
18708 \end_layout
18709
18710 \begin_layout Enumerate
18711
18712 \size small
18713 \emph on
18714 Multiple spaces detected in output.
18715 \end_layout
18716
18717 \begin_layout Enumerate
18718
18719 \size small
18720 This text may be ignored.
18721 \end_layout
18722
18723 \begin_layout Enumerate
18724
18725 \size small
18726 Use 
18727 \family typewriter
18728
18729 \begin_inset Quotes eld
18730 \end_inset
18731
18732
18733 \family default
18734  to begin quotation, not 
18735 \family typewriter
18736 '
18737 \family default
18738 .
18739 \end_layout
18740
18741 \begin_layout Enumerate
18742
18743 \size small
18744 Use 
18745 \family typewriter
18746 '
18747 \family default
18748  to end quotation, not 
18749 \family typewriter
18750
18751 \begin_inset Quotes eld
18752 \end_inset
18753
18754
18755 \family default
18756 .
18757 \end_layout
18758
18759 \begin_layout Enumerate
18760
18761 \size small
18762 Don't mix quotes.
18763 \end_layout
18764
18765 \begin_layout Enumerate
18766
18767 \size small
18768 You should perhaps use 
18769 \begin_inset Quotes eld
18770 \end_inset
18771
18772
18773 \family typewriter
18774 cmd
18775 \family default
18776
18777 \begin_inset Quotes erd
18778 \end_inset
18779
18780  instead.
18781 \end_layout
18782
18783 \begin_layout Enumerate
18784
18785 \size small
18786 You should put a space in front of/after parenthesis.
18787 \end_layout
18788
18789 \begin_layout Enumerate
18790
18791 \size small
18792 You should avoid spaces in front of/after parenthesis.
18793 \end_layout
18794
18795 \begin_layout Enumerate
18796
18797 \size small
18798 \emph on
18799 You should not use punctuation in front of/after quotes.
18800 \end_layout
18801
18802 \begin_layout Enumerate
18803
18804 \size small
18805 Double space found.
18806 \end_layout
18807
18808 \begin_layout Enumerate
18809
18810 \size small
18811 You should put punctuation outside inner/inside display math mode.
18812 \end_layout
18813
18814 \begin_layout Enumerate
18815
18816 \size small
18817 You ought to not use primitive TeX in LaTeX code.
18818 \end_layout
18819
18820 \begin_layout Enumerate
18821
18822 \size small
18823 You should remove spaces in front of 
18824 \begin_inset Quotes eld
18825 \end_inset
18826
18827
18828 \family typewriter
18829 %s
18830 \family default
18831
18832 \begin_inset Quotes erd
18833 \end_inset
18834
18835
18836 \end_layout
18837
18838 \begin_layout Enumerate
18839
18840 \size small
18841 \begin_inset Quotes eld
18842 \end_inset
18843
18844
18845 \family typewriter
18846 %s
18847 \family default
18848
18849 \begin_inset Quotes erd
18850 \end_inset
18851
18852  is normally not followed by 
18853 \begin_inset Quotes eld
18854 \end_inset
18855
18856
18857 \family typewriter
18858 %c
18859 \family default
18860
18861 \begin_inset Quotes erd
18862 \end_inset
18863
18864 .
18865 \end_layout
18866
18867 \begin_layout Standard
18868 In later versions of LyX, we hope to provide a more complete interface to
18869  this tool (and it's smaller cousin 
18870 \family typewriter
18871 lacheck
18872 \family default
18873 ) to exploit the full power of it.
18874  But it's not exactly useless as it is now: go try it on one of your existing
18875  documents of a certain length and be surprised.
18876 \end_layout
18877
18878 \begin_layout Section
18879 Version Control in LyX
18880 \end_layout
18881
18882 \begin_layout Standard
18883 by
18884 \noun on
18885  Lars Gullik Bjønnes 
18886 \noun default
18887 and 
18888 \noun on
18889 Pavel Sanda
18890 \end_layout
18891
18892 \begin_layout Subsection
18893 Introduction
18894 \end_layout
18895
18896 \begin_layout Standard
18897 A friend of mine wanted to try LyX for a group project.
18898  When he didn't find support for version control or file locking, he dropped
18899  it.
18900  This angered me a bit, so I thought that I should at least make support
18901  for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18902  This has been done.
18903  LyX now supports some of the most basic RCS/CVS/SVN commands.
18904  If you need something a bit more sophisticated you will have to do that
18905  manually in a terminal.
18906 \end_layout
18907
18908 \begin_layout Standard
18909 Also note that CVS support is not as good as subversion support so we advice
18910  using SVN instead.
18911  Good place to start with Subversion is SVN Book
18912 \begin_inset Foot
18913 status open
18914
18915 \begin_layout Plain Layout
18916 \begin_inset CommandInset href
18917 LatexCommand href
18918 target "http://svnbook.red-bean.com/"
18919
18920 \end_inset
18921
18922
18923 \end_layout
18924
18925 \end_inset
18926
18927 .
18928  In case of RCS you should read 
18929 \begin_inset Quotes eld
18930 \end_inset
18931
18932 rcsintro
18933 \begin_inset Quotes erd
18934 \end_inset
18935
18936  (a man file, read it with 
18937 \family typewriter
18938 man rcsintro
18939 \family default
18940 ).
18941  This file describes all the basic features of RCS.
18942  You should especially notice the comment about a RCS directory, and the
18943  notion of a master RCS file (the file ending in 
18944 \family typewriter
18945 ,v
18946 \family default
18947 ).
18948 \end_layout
18949
18950 \begin_layout Standard
18951 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18952  package—no guarantees are made for older versions.
18953  Most of the log messages are not currently displayed after operations —
18954  you can check them in Messages pane if unsure.
18955 \end_layout
18956
18957 \begin_layout Standard
18958 For introducing your own external commands consult vc-command in the manual
18959  of LyX functions.
18960 \end_layout
18961
18962 \begin_layout Subsection
18963 RCS commands in LyX
18964 \end_layout
18965
18966 \begin_layout Standard
18967 The following sections describe the RCS commands supported by LyX.
18968  You can find them in the 
18969 \family sans
18970 File\SpecialChar \menuseparator
18971 Version
18972 \begin_inset space ~
18973 \end_inset
18974
18975 Control
18976 \family default
18977  submenu.
18978  LyX was tested against RCS 5.7.
18979 \end_layout
18980
18981 \begin_layout Subsubsection
18982
18983 \family sans
18984 Register
18985 \end_layout
18986
18987 \begin_layout Standard
18988 If your document is not under revision control, this is the only item shown
18989  in the menu.
18990  And if it is under revision control, the 
18991 \family sans
18992 Register
18993 \family default
18994  item is not visible.
18995  
18996 \end_layout
18997
18998 \begin_layout Standard
18999 This command registers your document with RCS (unless you are under the
19000  directory managed by CVS)\SpecialChar \@.
19001  You are asked interactively to supply an initial
19002  description of the document.
19003  The document is now set in Read-Only mode and you have to 
19004 \family sans
19005 Check
19006 \begin_inset space ~
19007 \end_inset
19008
19009 Out
19010 \begin_inset space ~
19011 \end_inset
19012
19013 For
19014 \begin_inset space ~
19015 \end_inset
19016
19017 Edit
19018 \family default
19019 , before making any changes to it.
19020  A document under revision control has a 
19021 \begin_inset Quotes eld
19022 \end_inset
19023
19024 [RCS:<version> <locker>]
19025 \begin_inset Quotes erd
19026 \end_inset
19027
19028  item tagged to the filename in the minibuffer.
19029 \end_layout
19030
19031 \begin_layout Standard
19032 RCS command that is run: 
19033 \family typewriter
19034 ci -q -u -i -t-"<initial description>" <file-name>
19035 \end_layout
19036
19037 \begin_layout Standard
19038 Read 
19039 \family typewriter
19040 man ci
19041 \family default
19042  to understand the switches.
19043  
19044 \end_layout
19045
19046 \begin_layout Subsubsection
19047
19048 \family sans
19049 Check In Changes
19050 \end_layout
19051
19052 \begin_layout Standard
19053 When you are finished editing a file, you check in your changes.
19054  When you do this, you are asked for a description of the changes.
19055  This is stored in the history log.
19056  The version number is bumped, your changes are applied to the master RCS
19057  file, the document is unlocked and set to Read-Only mode.
19058  
19059 \end_layout
19060
19061 \begin_layout Standard
19062 RCS command: 
19063 \family typewriter
19064 ci -q -u -m"<description>" <file-name>
19065 \end_layout
19066
19067 \begin_layout Subsubsection
19068
19069 \family sans
19070 Check Out For Edit
19071 \end_layout
19072
19073 \begin_layout Standard
19074 By doing this you lock the document so that only you can edit it.
19075  This will also make the document Read-Write only for you.
19076  You will usually continue editing for a while and when you are finished
19077  you check in your changes.
19078  The status line is changed to reflect that you have locked the file.
19079  
19080 \end_layout
19081
19082 \begin_layout Standard
19083 RCS command: 
19084 \family typewriter
19085 co -q -l <file-name>
19086 \end_layout
19087
19088 \begin_layout Subsubsection
19089
19090 \family sans
19091 Revert To Repository Version
19092 \end_layout
19093
19094 \begin_layout Standard
19095 This will discard all changes made to the document since the last check
19096  in.
19097  You get a warning before changes are discarded.
19098 \end_layout
19099
19100 \begin_layout Standard
19101 RCS command: 
19102 \family typewriter
19103 co -f -u<version> <file-name>
19104 \end_layout
19105
19106 \begin_layout Subsubsection
19107
19108 \family sans
19109 Undo Last Checkin
19110 \end_layout
19111
19112 \begin_layout Standard
19113 This makes as if the last check in never happened.
19114  No changes are made to the document loaded into LyX, but the last version
19115  is removed from the master RCS file.
19116  
19117 \end_layout
19118
19119 \begin_layout Standard
19120 RCS command: 
19121 \family typewriter
19122 rcs -o<version> <file-name>
19123 \end_layout
19124
19125 \begin_layout Subsubsection
19126
19127 \family sans
19128 Show History
19129 \end_layout
19130
19131 \begin_layout Standard
19132 This shows the complete history of the RCS document.
19133  The output of 
19134 \family typewriter
19135 rlog <file-name>
19136 \family default
19137  is shown in a browser.
19138  See 
19139 \family typewriter
19140 man rlog
19141 \family default
19142  for more info.
19143 \end_layout
19144
19145 \begin_layout Subsubsection
19146 Revision info
19147 \end_layout
19148
19149 \begin_layout Standard
19150 LyX supports RCS version number, author name, date and time of last commit.
19151  All those are extracted from 
19152 \family typewriter
19153 rlog -r <file-name>
19154 \family default
19155 .
19156  For other details see 
19157 \begin_inset CommandInset ref
19158 LatexCommand ref
19159 reference "sub:VCS-Revision-Information"
19160
19161 \end_inset
19162
19163  for details.
19164 \end_layout
19165
19166 \begin_layout Subsection
19167 CVS commands in LyX
19168 \end_layout
19169
19170 \begin_layout Standard
19171 A subset of CVS operations is supported by LyX.
19172  You can find the commands in the 
19173 \family sans
19174 File\SpecialChar \menuseparator
19175 Version
19176 \begin_inset space ~
19177 \end_inset
19178
19179 Control
19180 \family default
19181  submenu.
19182  The version control system SVN is more powerful, so please use it instead
19183  of CVS if possible.
19184 \end_layout
19185
19186 \begin_layout Subsubsection
19187
19188 \family sans
19189 General CVS usage
19190 \end_layout
19191
19192 \begin_layout Standard
19193 If you start from scratch with CVS you have to create your repository and
19194  checkout the working copy with external tools.
19195  If you're using a client-server setup you may need to login before doing
19196  the first repository checkout.
19197 \end_layout
19198
19199 \begin_layout Standard
19200 If your documents are under revision control and others are using the same
19201  repository problems arise when different changes to the same document at
19202  the same location happen.
19203  Standard CVS repositories doesn't operate with a file locking mechanism.
19204  This may be surprising, but conflicts only occur if people disagree on
19205  the proper content of the same part of a document.
19206  So, if co-workers are used to communicate regularly, these conflicts occur
19207  rarely.
19208  If they don't communicate they have a fundamental problem anyway.
19209  Nevertheless some people like to work with so called 
19210 \begin_inset Quotes eld
19211 \end_inset
19212
19213 reserved checkouts
19214 \begin_inset Quotes erd
19215 \end_inset
19216
19217 .
19218  If they do so the working copy of all files is readonly when checked out
19219  first and the user starts editing after using a special command to make
19220  the working copy writable.
19221  When the changes are checked in the working copy returns to readonly state.
19222  With LyX one has to edit the 
19223 \begin_inset Flex Code
19224 status collapsed
19225
19226 \begin_layout Plain Layout
19227 .cvsrc
19228 \end_layout
19229
19230 \end_inset
19231
19232  file and add the line 
19233 \begin_inset Flex Code
19234 status collapsed
19235
19236 \begin_layout Plain Layout
19237 cvs -r
19238 \end_layout
19239
19240 \end_inset
19241
19242  to work with reserved checkouts.
19243  The benefit is the possibility to see who is using a writable copy of some
19244  document.
19245  It's not guaranteed only one user makes a copy writable.
19246 \end_layout
19247
19248 \begin_layout Standard
19249 LyX tries to guess if you're using reserved or non-reserved checkouts.
19250  If your working copy is readonly or it is writable and an additional copy
19251  of your document exists in the CVS/Base sub-directory a reserved otherwise
19252  a non-reserved checkout is assumed.
19253  When a reserved checkout is detected you have to use 
19254 \begin_inset Flex MenuItem
19255 status collapsed
19256
19257 \begin_layout Plain Layout
19258 Check Out
19259 \end_layout
19260
19261 \end_inset
19262
19263  to make your working copy writable if it's readonly.
19264  After doing so the 
19265 \begin_inset Flex MenuItem
19266 status collapsed
19267
19268 \begin_layout Plain Layout
19269 Check In
19270 \end_layout
19271
19272 \end_inset
19273
19274  operation is possible and that makes your working copy readonly again after
19275  transferring your changes to the repository.
19276 \end_layout
19277
19278 \begin_layout Standard
19279 More information about CVS can be found here 
19280 \begin_inset Flex URL
19281 status collapsed
19282
19283 \begin_layout Plain Layout
19284
19285 http://www.nongnu.org/cvs
19286 \end_layout
19287
19288 \end_inset
19289
19290  and here 
19291 \begin_inset Flex URL
19292 status collapsed
19293
19294 \begin_layout Plain Layout
19295
19296 http://ximbiot.com/cvs
19297 \end_layout
19298
19299 \end_inset
19300
19301 .
19302 \end_layout
19303
19304 \begin_layout Standard
19305 Read 
19306 \family typewriter
19307 man cvs
19308 \family default
19309  to understand the sub-commands and the switches mentioned below.
19310 \end_layout
19311
19312 \begin_layout Subsubsection
19313
19314 \family sans
19315 Register
19316 \end_layout
19317
19318 \begin_layout Standard
19319 If your document is not under revision control, this is the only item shown
19320  in the menu.
19321  And if it is under revision control, the 
19322 \family sans
19323 \bar under
19324 R
19325 \bar default
19326 egister
19327 \family default
19328  item is not visible.
19329  
19330 \end_layout
19331
19332 \begin_layout Standard
19333 This command registers in CVS your document 
19334 \begin_inset Flex Strong
19335 status collapsed
19336
19337 \begin_layout Plain Layout
19338
19339 \emph on
19340 only
19341 \end_layout
19342
19343 \end_inset
19344
19345  in case you have already the documents directory under CVS control (in
19346  particular 
19347 \family typewriter
19348 CVS/Entries
19349 \family default
19350  file exists).
19351  This means you have to create or checkout the archive by yourself using
19352  external tools.
19353  (In case you forget that step LyX registers the document with RCS.)
19354 \end_layout
19355
19356 \begin_layout Standard
19357 Then you are asked interactively to supply an initial description of the
19358  document.
19359  Don't forget that registered file is not yet checked in.
19360 \end_layout
19361
19362 \begin_layout Standard
19363 CVS command that is run: 
19364 \family typewriter
19365 cvs -q add -m"<entered message>" "<file-name>"
19366 \end_layout
19367
19368 \begin_layout Standard
19369 The term 
19370 \family typewriter
19371 "<file-name>"
19372 \family default
19373  above and for all other CVS commands is an abbreviation for 
19374 \begin_inset Quotes eld
19375 \end_inset
19376
19377 change the current working directory to file location and use the file name
19378  without path component as argument
19379 \begin_inset Quotes erd
19380 \end_inset
19381
19382 .
19383 \end_layout
19384
19385 \begin_layout Subsubsection
19386
19387 \family sans
19388 Check In Changes
19389 \end_layout
19390
19391 \begin_layout Standard
19392 When you are finished editing a file, you commit your changes.
19393  When you do this and you had changed the document, you are asked for a
19394  description of the changes.
19395  After that changes are written to the repository.
19396  In case you didn't change the document and a reserved checkout is detected
19397  the reservation made on 
19398 \begin_inset Flex MenuItem
19399 status collapsed
19400
19401 \begin_layout Plain Layout
19402 Check Out
19403 \end_layout
19404
19405 \end_inset
19406
19407  is undone.
19408 \end_layout
19409
19410 \begin_layout Labeling
19411 \labelwidthstring 00.00.0000
19412 CVS
19413 \begin_inset space ~
19414 \end_inset
19415
19416 command: 
19417 \begin_inset space ~
19418 \end_inset
19419
19420
19421 \begin_inset Newline newline
19422 \end_inset
19423
19424
19425 \begin_inset Flex Code
19426 status collapsed
19427
19428 \begin_layout Plain Layout
19429 cvs 
19430 \family typewriter
19431 -q commit -m"<description>" "<file-name>"
19432 \end_layout
19433
19434 \end_inset
19435
19436  or
19437 \begin_inset Newline newline
19438 \end_inset
19439
19440
19441 \begin_inset Flex Code
19442 status collapsed
19443
19444 \begin_layout Plain Layout
19445 cvs -q unedit 
19446 \family typewriter
19447 "<file-name>"
19448 \end_layout
19449
19450 \end_inset
19451
19452
19453 \end_layout
19454
19455 \begin_layout Subsubsection
19456
19457 \family sans
19458 Check Out Changes
19459 \end_layout
19460
19461 \begin_layout Standard
19462 When you are sharing a repository with others, you may have to incorporate
19463  their changes into your working copy.
19464 \end_layout
19465
19466 \begin_layout Standard
19467 CVS command: 
19468 \family typewriter
19469 cvs -q update "<file-name>"
19470 \end_layout
19471
19472 \begin_layout Standard
19473 If a readonly checkout is detected the working copy is made writable and
19474  reserved.
19475 \end_layout
19476
19477 \begin_layout Standard
19478 CVS command: 
19479 \family typewriter
19480 cvs -q edit "<file-name>"
19481 \end_layout
19482
19483 \begin_layout Subsubsection
19484
19485 \family sans
19486 Revert To Repository Version
19487 \end_layout
19488
19489 \begin_layout Standard
19490 This will discard all changes made to the document since the last check
19491  in.
19492  You get a warning before changes are discarded.
19493  Firstly the file is deleted, secondly CVS update command is run.
19494 \end_layout
19495
19496 \begin_layout Standard
19497 CVS command: 
19498 \family typewriter
19499 cvs -q update "<file-name>"
19500 \end_layout
19501
19502 \begin_layout Standard
19503 If a reserved checkout is detected and the working copy has no changes only
19504  the reservation is undone.
19505 \end_layout
19506
19507 \begin_layout Standard
19508 CVS command: 
19509 \family typewriter
19510 cvs -q unedit "<file-name>"
19511 \end_layout
19512
19513 \begin_layout Subsubsection
19514 Update of the local directory checkout from repository
19515 \end_layout
19516
19517 \begin_layout Standard
19518 Once your documents gets more complex, containing sub-documents and pictures,
19519  including external 
19520 \begin_inset Flex Code
19521 status collapsed
19522
19523 \begin_layout Plain Layout
19524 .tex
19525 \end_layout
19526
19527 \end_inset
19528
19529  files and so on using version control becomes more complicated.
19530  LyX supports updating the whole tree in which resides the document.
19531  This become especially useful once you cooperate with people which neither
19532  have detailed knowledge about CVS usage nor they have ambition to commit
19533  additional material to the repository.
19534  You have to organize the files structure so that all external files are
19535  in the same directory or subdirectories of the document.
19536  It's good practice anyway to store multipart documents in an extra directory.
19537 \end_layout
19538
19539 \begin_layout Standard
19540 The 
19541 \begin_inset Flex Code
19542 status collapsed
19543
19544 \begin_layout Plain Layout
19545 Update local directory from repository
19546 \end_layout
19547
19548 \end_inset
19549
19550  command updates the whole directory.
19551  If local changes are detected user is warned before update starts.
19552  In case of merge conflicts both versions of the conflicting document parts
19553  are placed in the final document.
19554  You have to review and correct the result of the merge.
19555  You'll find the conflicts enclosed in pairs of 
19556 \begin_inset Flex Code
19557 status collapsed
19558
19559 \begin_layout Plain Layout
19560 <<<<<<<
19561 \end_layout
19562
19563 \end_inset
19564
19565  and 
19566 \begin_inset Flex Code
19567 status collapsed
19568
19569 \begin_layout Plain Layout
19570 >>>>>>>
19571 \end_layout
19572
19573 \end_inset
19574
19575  separated by 
19576 \begin_inset Flex Code
19577 status collapsed
19578
19579 \begin_layout Plain Layout
19580 =======
19581 \end_layout
19582
19583 \end_inset
19584
19585 .
19586  The first part is your version as before the update operation with the
19587  document name prepended.
19588  The second one is the repository version with the version number after
19589  the sequence of 
19590 \begin_inset Flex Code
19591 status collapsed
19592
19593 \begin_layout Plain Layout
19594 >
19595 \end_layout
19596
19597 \end_inset
19598
19599  signs.
19600 \end_layout
19601
19602 \begin_layout Labeling
19603 \labelwidthstring 00.00.0000
19604 CVS
19605 \begin_inset space ~
19606 \end_inset
19607
19608 commands: 
19609 \begin_inset space ~
19610 \end_inset
19611
19612
19613 \begin_inset Newline newline
19614 \end_inset
19615
19616
19617 \begin_inset Flex Code
19618 status collapsed
19619
19620 \begin_layout Plain Layout
19621 cd $path; cvs diff 
19622 \family typewriter
19623 "."
19624 \end_layout
19625
19626 \end_inset
19627
19628  (Ask if changes are detected.)
19629 \begin_inset Newline newline
19630 \end_inset
19631
19632
19633 \begin_inset Flex Code
19634 status collapsed
19635
19636 \begin_layout Plain Layout
19637 cd $path; cvs -q update 
19638 \family typewriter
19639 "."
19640 \end_layout
19641
19642 \end_inset
19643
19644
19645 \end_layout
19646
19647 \begin_layout Standard
19648 where 
19649 \begin_inset Flex Code
19650 status collapsed
19651
19652 \begin_layout Plain Layout
19653 $path
19654 \end_layout
19655
19656 \end_inset
19657
19658  stands for the path to the document.
19659 \end_layout
19660
19661 \begin_layout Subsubsection
19662
19663 \family sans
19664 Show History
19665 \end_layout
19666
19667 \begin_layout Standard
19668 This shows the complete history of the CVS document.
19669  The output of 
19670 \family typewriter
19671 cvs log "<file-name>"
19672 \family default
19673  is shown in a browser.
19674 \end_layout
19675
19676 \begin_layout Subsection
19677 SVN commands in LyX
19678 \end_layout
19679
19680 \begin_layout Standard
19681 SVN is now partially supported by LyX.
19682  You can find the commands in the 
19683 \family sans
19684 File\SpecialChar \menuseparator
19685 Version
19686 \begin_inset space ~
19687 \end_inset
19688
19689 Control
19690 \family default
19691  submenu.
19692  Please note that if you use password protected access to repository via
19693  ssh, you will be asked in terminal window.
19694  LyX was tested against SVN 1.5 and 1.6
19695 \begin_inset Foot
19696 status open
19697
19698 \begin_layout Plain Layout
19699 Most of the commands will work with 1.4 too, see 
19700 \begin_inset CommandInset ref
19701 LatexCommand ref
19702 reference "sub:SVN-Repo-Update"
19703
19704 \end_inset
19705
19706 .
19707 \end_layout
19708
19709 \end_inset
19710
19711
19712 \end_layout
19713
19714 \begin_layout Subsubsection
19715
19716 \family sans
19717 Register
19718 \end_layout
19719
19720 \begin_layout Standard
19721 If your document is not under revision control, this is the only item shown
19722  in the menu.
19723  And if it is under revision control, the 
19724 \family sans
19725 \bar under
19726 R
19727 \bar default
19728 egister
19729 \family default
19730  item is not visible.
19731  
19732 \end_layout
19733
19734 \begin_layout Standard
19735 This command registers in SVN your document ONLY in case you have already
19736  the documents directory under SVN control (in particular 
19737 \family typewriter
19738 .svn/entries
19739 \family default
19740  file exists).
19741  This means you have to checkout the archive by yourself.
19742  
19743 \end_layout
19744
19745 \begin_layout Standard
19746 Then you are asked interactively to supply an initial description of the
19747  document.
19748  Don't forget that registered file is not yet commited.
19749 \end_layout
19750
19751 \begin_layout Standard
19752 SVN command that is run: 
19753 \family typewriter
19754 svn add -q 
19755 \begin_inset Quotes eld
19756 \end_inset
19757
19758 <file-name>
19759 \begin_inset Quotes erd
19760 \end_inset
19761
19762
19763 \end_layout
19764
19765 \begin_layout Standard
19766 Read 
19767 \family typewriter
19768 man svn
19769 \family default
19770  to understand the switches.
19771  
19772 \end_layout
19773
19774 \begin_layout Subsubsection
19775
19776 \family sans
19777 Check In Changes
19778 \end_layout
19779
19780 \begin_layout Standard
19781 When you are finished editing a file, you commit your changes.
19782  When you do this, you are asked for a description of the changes.
19783  After that changes are commited.
19784 \end_layout
19785
19786 \begin_layout Standard
19787 SVN command:
19788 \begin_inset Foot
19789 status collapsed
19790
19791 \begin_layout Plain Layout
19792 In case locking is not enabled.
19793  See Section 
19794 \begin_inset CommandInset ref
19795 LatexCommand ref
19796 reference "subsec:SVN-File-Locking"
19797
19798 \end_inset
19799
19800 .
19801 \end_layout
19802
19803 \end_inset
19804
19805  
19806 \family typewriter
19807 svn commit -q -m"<description>" <file-name>
19808 \end_layout
19809
19810 \begin_layout Subsubsection
19811
19812 \family sans
19813 Check Out For Edit
19814 \end_layout
19815
19816 \begin_layout Standard
19817 Updates the changes of this file from the repository.
19818  Be sure you understand SVN merging and conflicts resolving before using
19819  this function, because all conflicts has to be resolved manually by you!
19820 \end_layout
19821
19822 \begin_layout Standard
19823 SVN command:
19824 \begin_inset Foot
19825 status collapsed
19826
19827 \begin_layout Plain Layout
19828 Ditto.
19829 \end_layout
19830
19831 \end_inset
19832
19833  
19834 \family typewriter
19835 svn update --non-interactive 
19836 \begin_inset Quotes eld
19837 \end_inset
19838
19839 <file-name>
19840 \begin_inset Quotes erd
19841 \end_inset
19842
19843
19844 \end_layout
19845
19846 \begin_layout Subsubsection
19847
19848 \family sans
19849 Revert To Repository Version
19850 \end_layout
19851
19852 \begin_layout Standard
19853 This will discard all changes made to the document since the last check
19854  in.
19855  You get a warning before changes are discarded.
19856  
19857 \end_layout
19858
19859 \begin_layout Standard
19860 SVN command: 
19861 \family typewriter
19862 svn revert -q 
19863 \begin_inset Quotes eld
19864 \end_inset
19865
19866 <file-name>
19867 \begin_inset Quotes erd
19868 \end_inset
19869
19870
19871 \end_layout
19872
19873 \begin_layout Subsubsection
19874 \begin_inset CommandInset label
19875 LatexCommand label
19876 name "sub:SVN-Repo-Update"
19877
19878 \end_inset
19879
19880 Update of the local directory checkout from repository
19881 \begin_inset Foot
19882 status collapsed
19883
19884 \begin_layout Plain Layout
19885 Note that this command will work only with subversion 
19886 \begin_inset Formula $\geqq1.5$
19887 \end_inset
19888
19889
19890 \end_layout
19891
19892 \end_inset
19893
19894
19895 \end_layout
19896
19897 \begin_layout Standard
19898 All the commands above have one shortcomming - they deal with the current
19899  document only.
19900  Once your document contains pictures, includes external 
19901 \begin_inset Flex Code
19902 status collapsed
19903
19904 \begin_layout Plain Layout
19905 .tex
19906 \end_layout
19907
19908 \end_inset
19909
19910  files and so on administration becomes more complicated.
19911  LyX now supports updating the whole tree in which resides the document
19912 \begin_inset Foot
19913 status collapsed
19914
19915 \begin_layout Plain Layout
19916 One need to organize the files structure so that all external files are
19917  in the same directory or subdirectories of the document.
19918  
19919 \end_layout
19920
19921 \end_inset
19922
19923 .
19924  This become especially useful once you cooperate with people which neither
19925  know about subversion management nor they have ambition to commit additional
19926  material to the repository.
19927  
19928 \end_layout
19929
19930 \begin_layout Standard
19931 \begin_inset Flex Code
19932 status collapsed
19933
19934 \begin_layout Plain Layout
19935 Update local directory from repository
19936 \end_layout
19937
19938 \end_inset
19939
19940  command updates the whole directory and in case of merge conflicts local
19941  version of the files are left, so no unintended data loss occurs.
19942  If local changes are detected user is warned before update starts.
19943 \end_layout
19944
19945 \begin_layout Labeling
19946 \labelwidthstring 00.00.0000
19947 SVN
19948 \begin_inset space ~
19949 \end_inset
19950
19951 commands: 
19952 \begin_inset space ~
19953 \end_inset
19954
19955
19956 \begin_inset Newline newline
19957 \end_inset
19958
19959
19960 \begin_inset Flex Code
19961 status collapsed
19962
19963 \begin_layout Plain Layout
19964 svn diff $path
19965 \end_layout
19966
19967 \end_inset
19968
19969  (Ask if changes are detected.)
19970 \begin_inset Newline newline
19971 \end_inset
19972
19973
19974 \begin_inset Flex Code
19975 status collapsed
19976
19977 \begin_layout Plain Layout
19978 svn update --accept mine-full $path
19979 \end_layout
19980
19981 \end_inset
19982
19983
19984 \end_layout
19985
19986 \begin_layout Standard
19987 where 
19988 \begin_inset Flex Code
19989 status collapsed
19990
19991 \begin_layout Plain Layout
19992 $path
19993 \end_layout
19994
19995 \end_inset
19996
19997  stands for the path to the document.
19998 \end_layout
19999
20000 \begin_layout Subsubsection
20001
20002 \family sans
20003 Show History
20004 \end_layout
20005
20006 \begin_layout Standard
20007 This shows the complete history of the SVN document.
20008  The output of 
20009 \family typewriter
20010 svn log 
20011 \begin_inset Quotes eld
20012 \end_inset
20013
20014 <file-name>
20015 \begin_inset Quotes erd
20016 \end_inset
20017
20018
20019 \family default
20020  is shown in a browser.
20021 \end_layout
20022
20023 \begin_layout Subsubsection
20024 File Locking
20025 \begin_inset CommandInset label
20026 LatexCommand label
20027 name "subsec:SVN-File-Locking"
20028
20029 \end_inset
20030
20031
20032 \end_layout
20033
20034 \begin_layout Standard
20035 The file exchange through various revision control systems brings the problem
20036  of merge conflicts in case two different users try to edit the same (parts
20037  of) document.
20038  When such a conflict happens it needs manual resolving and one reasonable
20039  alternative is to provide some kind of locking mechanism, which guarantees
20040  that only one user is allowed to edit file at the given time.
20041 \end_layout
20042
20043 \begin_layout Standard
20044 SVN has two such mechanisms to provide mutual exclusivity for file access
20045  - locks and automatic setting of write permissions (see sec.
20046  
20047 \begin_inset CommandInset ref
20048 LatexCommand ref
20049 reference "subsec:Automatical-Locking-Property"
20050
20051 \end_inset
20052
20053 ) based on 
20054 \begin_inset Flex Code
20055 status collapsed
20056
20057 \begin_layout Plain Layout
20058 svn:needs-lock
20059 \end_layout
20060
20061 \end_inset
20062
20063  file svn property
20064 \begin_inset Foot
20065 status open
20066
20067 \begin_layout Plain Layout
20068 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20069 \end_layout
20070
20071 \end_inset
20072
20073 .
20074  If this property is detected for a given document LyX starts to use SVN
20075  locks for document editing automatically and the whole check-in/out mechanism
20076  switches to the same regimen as for RCS.
20077  This in particular means there are two different modes of file use in LyX:
20078 \end_layout
20079
20080 \begin_layout Itemize
20081 Unlocked state.
20082  The loaded file is in the read-only mode.
20083  For editing on needs to check-out.
20084  
20085 \emph on
20086 Check-out
20087 \emph default
20088  consists of updating from the repository and gaining write lock.
20089  If the lock is not possible to obtain, we remain in unlocked state.
20090 \end_layout
20091
20092 \begin_layout Itemize
20093 Locked state.
20094  The loaded file is in the 'normal' edit mode.
20095  No other user is allowed to edit the file.
20096  
20097 \emph on
20098 Check-in
20099 \emph default
20100  consists of commiting changes and releasing write-lock.
20101  If no changes have been made to the document, no commit will be produced
20102 \begin_inset Foot
20103 status collapsed
20104
20105 \begin_layout Plain Layout
20106 Don't be puzzled by the fact that you will be asked for commit message anyway.
20107 \end_layout
20108
20109 \end_inset
20110
20111  and only the write-lock will be released.
20112 \end_layout
20113
20114 \begin_layout Standard
20115 SVN commands:
20116 \end_layout
20117
20118 \begin_layout Labeling
20119 \labelwidthstring 00.00.0000
20120 Check-in:
20121 \family typewriter
20122  svn commit -q -m"<description>" "<file-name>"
20123 \begin_inset Newline newline
20124 \end_inset
20125
20126 svn unlock "<file-name>"
20127 \end_layout
20128
20129 \begin_layout Labeling
20130 \labelwidthstring 00.00.0000
20131 Check-out: 
20132 \family typewriter
20133 svn update "<file-name>"
20134 \begin_inset Newline newline
20135 \end_inset
20136
20137 svn lock "<file-name>"
20138 \end_layout
20139
20140 \begin_layout Subsubsection
20141
20142 \family typewriter
20143 \begin_inset CommandInset label
20144 LatexCommand label
20145 name "subsec:Automatical-Locking-Property"
20146
20147 \end_inset
20148
20149
20150 \family default
20151 Automatic Locking Property
20152 \end_layout
20153
20154 \begin_layout Standard
20155 The above mentioned automatic setting of write permissions of the .lyx file
20156  can be set through
20157 \family sans
20158 \bar under
20159  F
20160 \bar default
20161 ile\SpecialChar \menuseparator
20162
20163 \bar under
20164 V
20165 \bar default
20166 ersion
20167 \begin_inset space ~
20168 \end_inset
20169
20170 Control\SpecialChar \menuseparator
20171
20172 \bar under
20173 T
20174 \bar default
20175 oggle locking property
20176 \family default
20177 .
20178  This command is active only when the file is not locked on the svn server
20179  (i.e.
20180  you need to check-out before proceeding).
20181 \end_layout
20182
20183 \begin_layout Labeling
20184 \labelwidthstring 00.00.0000
20185 SVN
20186 \begin_inset space ~
20187 \end_inset
20188
20189 commands:
20190 \end_layout
20191
20192 \begin_layout Labeling
20193 \labelwidthstring 00.00.0000
20194 Set:
20195 \family typewriter
20196  svn propset svn:needs-lock ON "<file-name>"
20197 \end_layout
20198
20199 \begin_layout Labeling
20200 \labelwidthstring 00.00.0000
20201 Unset: 
20202 \family typewriter
20203 svn propdel svn:needs-lock "<file-name>"
20204 \end_layout
20205
20206 \begin_layout Subsubsection
20207 \begin_inset CommandInset label
20208 LatexCommand label
20209 name "sub:VCS-Revision-Information"
20210
20211 \end_inset
20212
20213 Revision Information in Documents
20214 \end_layout
20215
20216 \begin_layout Standard
20217 There are more possibilities how to activate revision information in our
20218  document.
20219 \end_layout
20220
20221 \begin_layout Itemize
20222 LyX supports directly:
20223 \end_layout
20224
20225 \begin_deeper
20226 \begin_layout Itemize
20227 tree revision information (
20228 \begin_inset Flex Code
20229 status collapsed
20230
20231 \begin_layout Plain Layout
20232 vcs-tree-revision
20233 \end_layout
20234
20235 \end_inset
20236
20237 ).
20238  The result is the output of the 
20239 \begin_inset Flex Code
20240 status collapsed
20241
20242 \begin_layout Plain Layout
20243 svnversion
20244 \end_layout
20245
20246 \end_inset
20247
20248  command, the following table gives you an idea, how to read the results.
20249 \end_layout
20250
20251 \begin_layout Standard
20252 \align center
20253 \begin_inset Tabular
20254 <lyxtabular version="3" rows="6" columns="2">
20255 <features tabularvalignment="middle">
20256 <column alignment="center" valignment="top" width="0">
20257 <column alignment="center" valignment="top" width="0">
20258 <row>
20259 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20260 \begin_inset Text
20261
20262 \begin_layout Plain Layout
20263 Output
20264 \end_layout
20265
20266 \end_inset
20267 </cell>
20268 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20269 \begin_inset Text
20270
20271 \begin_layout Plain Layout
20272 Meaning
20273 \end_layout
20274
20275 \end_inset
20276 </cell>
20277 </row>
20278 <row>
20279 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20280 \begin_inset Text
20281
20282 \begin_layout Plain Layout
20283 4123:4168
20284 \end_layout
20285
20286 \end_inset
20287 </cell>
20288 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20289 \begin_inset Text
20290
20291 \begin_layout Plain Layout
20292 mixed revision working copy
20293 \end_layout
20294
20295 \end_inset
20296 </cell>
20297 </row>
20298 <row>
20299 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20300 \begin_inset Text
20301
20302 \begin_layout Plain Layout
20303 4168M
20304 \end_layout
20305
20306 \end_inset
20307 </cell>
20308 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20309 \begin_inset Text
20310
20311 \begin_layout Plain Layout
20312 modified working copy
20313 \end_layout
20314
20315 \end_inset
20316 </cell>
20317 </row>
20318 <row>
20319 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20320 \begin_inset Text
20321
20322 \begin_layout Plain Layout
20323 4123S
20324 \end_layout
20325
20326 \end_inset
20327 </cell>
20328 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20329 \begin_inset Text
20330
20331 \begin_layout Plain Layout
20332 switched working copy
20333 \end_layout
20334
20335 \end_inset
20336 </cell>
20337 </row>
20338 <row>
20339 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20340 \begin_inset Text
20341
20342 \begin_layout Plain Layout
20343 4123P
20344 \end_layout
20345
20346 \end_inset
20347 </cell>
20348 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20349 \begin_inset Text
20350
20351 \begin_layout Plain Layout
20352 partial working copy, from a sparse checkout
20353 \end_layout
20354
20355 \end_inset
20356 </cell>
20357 </row>
20358 <row>
20359 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20360 \begin_inset Text
20361
20362 \begin_layout Plain Layout
20363 4123:4168MS
20364 \end_layout
20365
20366 \end_inset
20367 </cell>
20368 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20369 \begin_inset Text
20370
20371 \begin_layout Plain Layout
20372 mixed revision, modified, switched working copy
20373 \end_layout
20374
20375 \end_inset
20376 </cell>
20377 </row>
20378 </lyxtabular>
20379
20380 \end_inset
20381
20382
20383 \end_layout
20384
20385 \begin_layout Itemize
20386 file revision information.
20387  The result comes from parsing the output of 
20388 \begin_inset Flex Code
20389 status collapsed
20390
20391 \begin_layout Plain Layout
20392 svn
20393 \begin_inset space ~
20394 \end_inset
20395
20396 info
20397 \begin_inset space ~
20398 \end_inset
20399
20400 --xml
20401 \begin_inset space ~
20402 \end_inset
20403
20404 file.lyx
20405 \end_layout
20406
20407 \end_inset
20408
20409 .
20410  Supported flags are:
20411 \end_layout
20412
20413 \begin_deeper
20414 \begin_layout Itemize
20415 version number of the last commit (
20416 \begin_inset Flex Code
20417 status collapsed
20418
20419 \begin_layout Plain Layout
20420 vcs-revision
20421 \end_layout
20422
20423 \end_inset
20424
20425 )
20426 \end_layout
20427
20428 \begin_layout Itemize
20429 author of the last commit (
20430 \begin_inset Flex Code
20431 status collapsed
20432
20433 \begin_layout Plain Layout
20434 vcs-author
20435 \end_layout
20436
20437 \end_inset
20438
20439 )
20440 \end_layout
20441
20442 \begin_layout Itemize
20443 date of the last commit (
20444 \begin_inset Flex Code
20445 status collapsed
20446
20447 \begin_layout Plain Layout
20448 vcs-date
20449 \end_layout
20450
20451 \end_inset
20452
20453 )
20454 \end_layout
20455
20456 \begin_layout Itemize
20457 time of the last commit (
20458 \begin_inset Flex Code
20459 status collapsed
20460
20461 \begin_layout Plain Layout
20462 vcs-time
20463 \end_layout
20464
20465 \end_inset
20466
20467 )
20468 \end_layout
20469
20470 \end_deeper
20471 \begin_layout Standard
20472 You can obtain this info via InsetInfo (e.g.
20473  
20474 \begin_inset Flex Code
20475 status collapsed
20476
20477 \begin_layout Plain Layout
20478 info-insert buffer vcs-date
20479 \end_layout
20480
20481 \end_inset
20482
20483 ).
20484  The information will be available only when you have the file stored under
20485  svn managment (i.e.
20486  the 
20487 \begin_inset Flex Code
20488 status collapsed
20489
20490 \begin_layout Plain Layout
20491 .svn
20492 \end_layout
20493
20494 \end_inset
20495
20496  directory is available with your document).
20497 \end_layout
20498
20499 \end_deeper
20500 \begin_layout Itemize
20501 Another---a hacking one---possibility is to use svn keywords
20502 \begin_inset Foot
20503 status collapsed
20504
20505 \begin_layout Plain Layout
20506 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20507 \end_layout
20508
20509 \end_inset
20510
20511 .
20512  In short -- you set file keywords property (e.g.
20513  
20514 \family sans
20515 svn propset svn:keywords 'Rev' file.lyx
20516 \family default
20517 ) and then paste keyword TeX code
20518 \begin_inset Foot
20519 status collapsed
20520
20521 \begin_layout Plain Layout
20522 This is an easy way how to ensure that LyX won't break the line in the middle
20523  of keyword tag.
20524 \end_layout
20525
20526 \end_inset
20527
20528  tag in your document (e.g.
20529  
20530 \begin_inset ERT
20531 status open
20532
20533 \begin_layout Plain Layout
20534
20535 $Rev$
20536 \end_layout
20537
20538 \end_inset
20539
20540 ).
20541  This way svn client will automatically substitute revision number (e.g.
20542  
20543 \begin_inset ERT
20544 status open
20545
20546 \begin_layout Plain Layout
20547
20548 $Rev: 59 $
20549 \end_layout
20550
20551 \end_inset
20552
20553 ) after each update and commit.
20554  There are more problems with this approach.
20555  Firstly, the '$' character is used in TeX world for math equations, so
20556  any occurence of math formula 
20557 \begin_inset Formula $Rev$
20558 \end_inset
20559
20560  become 
20561 \begin_inset Formula $Rev:59$
20562 \end_inset
20563
20564  in your LyX document.
20565  Similarly for other keywords like Id, Date, Author, etc.
20566  Secondly svn output is dependent on your locales, so its very easy that
20567  svn would produce some problematic strings once Date is used.
20568  Thirdly you get the whole 'Rev: 59' string in your document instead of
20569  the plain number.
20570  Until subversion implements user's custom keywords it will be hard to use
20571  this approach reliably or let LyX to support it directly.
20572 \end_layout
20573
20574 \begin_layout Subsection
20575 SVN and Windows Environment
20576 \end_layout
20577
20578 \begin_layout Quote
20579 My inclination is to say that if the user cannot figure out the command
20580  line operations on their own fairly quickly, they would be well advised
20581  to use TortoiseSVN.
20582  ---P.
20583  A.
20584  Rubin
20585 \end_layout
20586
20587 \begin_layout Subsubsection
20588 Preparation
20589 \end_layout
20590
20591 \begin_layout Standard
20592 In addition to installing LyX, and having access to a Subversion repository,
20593  the user will need to install the Subversion client program.
20594  A Windows installer for the client program is available from 
20595 \begin_inset CommandInset href
20596 LatexCommand href
20597 name "CollabNet"
20598 target "http://www.collab.net/nonav/downloads/subversion/"
20599
20600 \end_inset
20601
20602 .
20603  The user may also want to install 
20604 \begin_inset CommandInset href
20605 LatexCommand href
20606 name "TortoiseSVN"
20607 target "http://tortoisesvn.tigris.org/"
20608
20609 \end_inset
20610
20611 , which integrates Subversion operations into the context (rightclick) menu
20612  of Windows Explorer.
20613  Operations done outside LyX will typically be more convenient using the
20614  Explorer context menu.
20615  Note that TortoiseSVN is not a replacement for the client program, which
20616  is what LyX itself will use.
20617 \end_layout
20618
20619 \begin_layout Subsubsection
20620 Bringing a document under Subversion control
20621 \end_layout
20622
20623 \begin_layout Standard
20624 Before a LyX document can be brought under version control in Subversion,
20625  its parent directory needs to be under version control.
20626  If the document is being added to a project already in the repository,
20627  this is accomplished by checking the project out to the directory where
20628  the new document will be placed.
20629  If the project itself is not yet under version control (for instance, if
20630  this document starts a new project), the directory must be imported into
20631  the repository.
20632  This is done outside LyX.
20633  Both import and checkout are easily accomplished from the Explorer context
20634  menu using TortoiseSVN, or alternatively can be done using the command
20635  line client at a DOS prompt.
20636  The procedure for importing the project using TortoiseSVN is described
20637  below, assuming an existing repository and a new project being started
20638  in 
20639 \family typewriter
20640 C:
20641 \backslash
20642 new project
20643 \family default
20644 .
20645  For information on using the Subversion client program, run 
20646 \family typewriter
20647 svn --help 
20648 \family default
20649 in a DOS shell.
20650 \end_layout
20651
20652 \begin_layout Enumerate
20653 Locate 
20654 \family typewriter
20655 C:
20656 \backslash
20657 new project 
20658 \family default
20659 in Windows Explorer, right click it, and select 
20660 \family typewriter
20661 TortoiseSVN > Repo-browser
20662 \family default
20663 .
20664  If necessary, adjust the URL for the repository, then click OK.
20665 \end_layout
20666
20667 \begin_layout Enumerate
20668 Right click the level of the repository under which you want to place the
20669  new project folder (typically the top level) and click 
20670 \family typewriter
20671 Create folder\SpecialChar \ldots{}
20672
20673 \family default
20674  Supply a name for the project folder and click OK.
20675  Add a message for the log file if desired, then click OK again.
20676  The new project folder should appear in the repository.
20677  Finally, click OK again to exit the repository browser.
20678 \end_layout
20679
20680 \begin_layout Enumerate
20681 Once again right click 
20682 \family typewriter
20683 C:
20684 \backslash
20685 new project
20686 \family default
20687 , this time selecting SVN Checkout\SpecialChar \ldots{}
20688  Select the URL of the project folder
20689  you just created in the repository, and set the checkout directory to 
20690 \family typewriter
20691 C:
20692 \backslash
20693 new project.
20694
20695 \family default
20696  Click OK.
20697  You will be warned about a non-empty folder; click OK to proceed.
20698  You should now have a 
20699 \family typewriter
20700 .svn
20701 \family default
20702  directory under 
20703 \family typewriter
20704 C:
20705 \backslash
20706 new project.
20707 \end_layout
20708
20709 \begin_layout Enumerate
20710 Create or open your document in LyX and click 
20711 \family sans
20712 \bar under
20713 F
20714 \bar default
20715 ile\SpecialChar \menuseparator
20716
20717 \bar under
20718 V
20719 \bar default
20720 ersion
20721 \begin_inset space ~
20722 \end_inset
20723
20724 Control\SpecialChar \menuseparator
20725
20726 \bar under
20727 R
20728 \bar default
20729 egister.
20730  
20731 \family default
20732 Add a log message and click OK to commit the document to version control.
20733 \end_layout
20734
20735 \begin_layout Standard
20736 From this point onward, you should have full functionality in the 
20737 \family sans
20738 \bar under
20739 F
20740 \bar default
20741 ile\SpecialChar \menuseparator
20742
20743 \bar under
20744 V
20745 \bar default
20746 ersion
20747 \begin_inset space ~
20748 \end_inset
20749
20750 Control
20751 \family default
20752  menu.
20753  You also have the option of checking the document in and out, viewing its
20754  history, etc.
20755  using the TortoiseSVN context menu in Windows Explorer or the Subversion
20756  client program from a command prompt.
20757 \end_layout
20758
20759 \begin_layout Subsubsection
20760 SSH tunnel used with SVN under Windows
20761 \end_layout
20762
20763 \begin_layout Standard
20764 Compared with Linux setting up svn client to communicate over ssh under
20765  Windows is a rather troublesome task.
20766  We will at least offer some hints how to setup the client side but prior
20767  knowledge about ssh and the Windows command line is needed, also be prepared
20768  for a great deal of frustration\SpecialChar \ldots{}
20769
20770 \end_layout
20771
20772 \begin_layout Enumerate
20773 Get a svn client for windows, as described in the previous sections.
20774  When it is a fresh install run some svn command (e.g.
20775  
20776 \begin_inset Flex Code
20777 status collapsed
20778
20779 \begin_layout Plain Layout
20780 svn --version
20781 \end_layout
20782
20783 \end_inset
20784
20785 ) to create config files, which you will need to change later on.
20786 \end_layout
20787
20788 \begin_layout Enumerate
20789 Choose a ssh client for Windows.
20790  There are several possibilities, we will use the one from Putty tools
20791 \begin_inset Foot
20792 status open
20793
20794 \begin_layout Plain Layout
20795 \begin_inset Flex URL
20796 status collapsed
20797
20798 \begin_layout Plain Layout
20799
20800 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20801 \end_layout
20802
20803 \end_inset
20804
20805
20806 \end_layout
20807
20808 \end_inset
20809
20810 .
20811  You will need to set the connection up so that the client doesn't ask for
20812  any password from you.
20813  To keep things easy we will use only keys without any additional password
20814  protection etc.
20815 \end_layout
20816
20817 \begin_deeper
20818 \begin_layout Enumerate
20819 Generate keys by 
20820 \begin_inset Flex Code
20821 status collapsed
20822
20823 \begin_layout Plain Layout
20824 puttygen
20825 \end_layout
20826
20827 \end_inset
20828
20829 .
20830  Save your private .ppk key file and put the public one on the server side.
20831  If the SVN server runs on Linux, note that the format of the public key
20832  is not compatible with Linux openssh and you will need to direcly copy-paste
20833  the key from the “
20834 \emph on
20835 Public key for pasting into OpenSSH authorized_keys file
20836 \emph default
20837 :” edit field into the server's 
20838 \begin_inset Flex Code
20839 status collapsed
20840
20841 \begin_layout Plain Layout
20842 ~/.ssh/authorized_keys
20843 \end_layout
20844
20845 \end_inset
20846
20847
20848 \begin_inset Flex Code
20849 status collapsed
20850
20851 \begin_layout Plain Layout
20852 authorized_keys2
20853 \end_layout
20854
20855 \end_inset
20856
20857  file.
20858 \end_layout
20859
20860 \begin_layout Enumerate
20861 Get the Putty's 
20862 \begin_inset Flex Code
20863 status collapsed
20864
20865 \begin_layout Plain Layout
20866 plink
20867 \end_layout
20868
20869 \end_inset
20870
20871 .
20872  In the SVN config file
20873 \begin_inset Foot
20874 status collapsed
20875
20876 \begin_layout Plain Layout
20877 Exact path depends on Windows version, usually somewhere around 
20878 \begin_inset Flex Code
20879 status collapsed
20880
20881 \begin_layout Plain Layout
20882 c:
20883 \backslash
20884 Documents and Settings
20885 \backslash
20886 user
20887 \backslash
20888 Application Data
20889 \backslash
20890 Subversion
20891 \backslash
20892 config
20893 \end_layout
20894
20895 \end_inset
20896
20897  / 
20898 \begin_inset Flex Code
20899 status collapsed
20900
20901 \begin_layout Plain Layout
20902 AppData
20903 \backslash
20904 Roaming
20905 \backslash
20906 Subversion
20907 \end_layout
20908
20909 \end_inset
20910
20911 .
20912 \end_layout
20913
20914 \end_inset
20915
20916 , section [tunnels], setup ssh command, e.g.
20917  
20918 \begin_inset Flex Code
20919 status collapsed
20920
20921 \begin_layout Plain Layout
20922 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20923 \end_layout
20924
20925 \end_inset
20926
20927 .
20928 \begin_inset Foot
20929 status collapsed
20930
20931 \begin_layout Plain Layout
20932 It will usually take a lot of time to get exact command right and it depends
20933  on many things.
20934  For example do not have some remote server saved as a default session in
20935  Putty etc.
20936  If things fail, try to connect via plink without SVN first.
20937 \end_layout
20938
20939 \end_inset
20940
20941
20942 \end_layout
20943
20944 \end_deeper
20945 \begin_layout Enumerate
20946 Checkout the SVN archive, e.g.
20947  
20948 \begin_inset Flex Code
20949 status collapsed
20950
20951 \begin_layout Plain Layout
20952 svn co svn+ssh://user@server/repository_path
20953 \end_layout
20954
20955 \end_inset
20956
20957 .
20958 \end_layout
20959
20960 \begin_layout Subsubsection
20961 End-of-Line Conversions
20962 \end_layout
20963
20964 \begin_layout Standard
20965 When the collsraborators are mixing Linux and Windows environments, LyX
20966  will use different line endings inside the .lyx files.
20967  This is not a problem as far as LyX functionality is concerned, but the
20968  commit diffs will be huge and merge-conflicts prone.
20969  Fortunately SVN itself knows
20970 \begin_inset Foot
20971 status collapsed
20972
20973 \begin_layout Plain Layout
20974 \begin_inset Flex URL
20975 status collapsed
20976
20977 \begin_layout Plain Layout
20978
20979 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20980 \end_layout
20981
20982 \end_inset
20983
20984
20985 \end_layout
20986
20987 \end_inset
20988
20989  how to deal with CR/LF problems when switching .lyx files to the 
20990 \begin_inset Flex Code
20991 status collapsed
20992
20993 \begin_layout Plain Layout
20994 native
20995 \end_layout
20996
20997 \end_inset
20998
20999  mode.
21000 \begin_inset Foot
21001 status collapsed
21002
21003 \begin_layout Plain Layout
21004 For the lazy guys: 
21005 \begin_inset Flex Code
21006 status collapsed
21007
21008 \begin_layout Plain Layout
21009 svn propset svn:eol-style native FILE_NAME
21010 \end_layout
21011
21012 \end_inset
21013
21014
21015 \end_layout
21016
21017 \end_inset
21018
21019
21020 \end_layout
21021
21022 \begin_layout Subsection
21023 Further tuning
21024 \end_layout
21025
21026 \begin_layout Standard
21027 With the recent addition of the vc-command function LyX power users are
21028  allowed to create their own commands for revision control.
21029 \end_layout
21030
21031 \begin_layout Standard
21032 As an example you can see how two TortoiseSVN commands could be integrated
21033  directly:
21034 \end_layout
21035
21036 \begin_layout Description
21037 Commit: 
21038 \begin_inset Flex Code
21039 status collapsed
21040
21041 \begin_layout Plain Layout
21042 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21043 \end_layout
21044
21045 \end_inset
21046
21047
21048 \end_layout
21049
21050 \begin_layout Description
21051 Revert: 
21052 \begin_inset Flex Code
21053 status collapsed
21054
21055 \begin_layout Plain Layout
21056 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21057 \end_layout
21058
21059 \end_inset
21060
21061
21062 \end_layout
21063
21064 \begin_layout Subsection
21065 Version control and Document comparison
21066 \end_layout
21067
21068 \begin_layout Standard
21069 One of the typical uses of version control is to inspect the changes between
21070  revisions, usually by creating 
21071 \begin_inset Flex Code
21072 status collapsed
21073
21074 \begin_layout Plain Layout
21075 diff
21076 \end_layout
21077
21078 \end_inset
21079
21080  dumps.
21081  While this is useful for plain text files, it is much less useful in the
21082  case of LyX files, which have more complicated structure.
21083  Hence we provide binding to the Document comparison feature.
21084  They are two ways of calling this feature - either by direct call of 
21085 \begin_inset Flex Code
21086 status collapsed
21087
21088 \begin_layout Plain Layout
21089 VC_COMPARE
21090 \end_layout
21091
21092 \end_inset
21093
21094  LyX function (for details see LyX functions manual) or by icon/menu item
21095  
21096 \begin_inset Flex MenuItem
21097 status collapsed
21098
21099 \begin_layout Plain Layout
21100 Compare with older revision...
21101 \end_layout
21102
21103 \end_inset
21104
21105 .
21106  One can either compare two chosen revisions of the document or he can simply
21107  compare the current version of edited text with older revisions (where
21108  '
21109 \begin_inset Flex MenuItem
21110 status collapsed
21111
21112 \begin_layout Plain Layout
21113 0
21114 \end_layout
21115
21116 \end_inset
21117
21118 ' revisions back means comparison of the edited file with last commited
21119  revision).
21120  
21121 \end_layout
21122
21123 \begin_layout Standard
21124 This feature is supported for SVN and RCS though due to the more complicated
21125  versioning scheme of RCS there is a constraint -- when addressing the revisions
21126  in dialog, numbers always point to the last number in RCS revision number,
21127  i.e.
21128  '35' in '1.2.35'.
21129 \end_layout
21130
21131 \begin_layout Section
21132 Literate Programming
21133 \end_layout
21134
21135 \begin_layout Standard
21136 Updated by 
21137 \noun on
21138 Kayvan Sylvan 
21139 \noun default
21140 (kayvan@sylvan.com)
21141 \noun on
21142
21143 \noun default
21144 original documentation written by 
21145 \noun on
21146 Edmar Wienskoski Jr.
21147
21148 \noun default
21149  (edmar-w-jr@technologist.com)
21150 \end_layout
21151
21152 \begin_layout Subsection
21153 Introduction
21154 \end_layout
21155
21156 \begin_layout Standard
21157 The main purpose of this documentation is to show you how to use LyX for
21158  literate programming, where it is assumed that you are familiar with this
21159  programming technique, and know what 
21160 \begin_inset Quotes eld
21161 \end_inset
21162
21163 tangling
21164 \begin_inset Quotes erd
21165 \end_inset
21166
21167  and 
21168 \begin_inset Quotes eld
21169 \end_inset
21170
21171 weaving
21172 \begin_inset Quotes erd
21173 \end_inset
21174
21175  means.
21176  If that is not the case, please follow the web links provided in the following
21177  sections.
21178  There is a lot of good documentation out there covering old development
21179  history to the latest tools tips.
21180 \end_layout
21181
21182 \begin_layout Standard
21183 It is also assumed that you are familiar with LyX itself to a point that
21184  you are comfortable changing your LyX preferences, and X resources file.
21185  If that is not the case please refer to other LyX documentation to cover
21186  your specific needs.
21187 \end_layout
21188
21189 \begin_layout Subsection
21190 Literate Programming
21191 \end_layout
21192
21193 \begin_layout Standard
21194 From the Literate Programming FAQ: 
21195 \end_layout
21196
21197 \begin_layout Quotation
21198 Literate programming is the combination of documentation and source together
21199  in a fashion suited for reading by human beings.
21200  In fact, literate programs should be enjoyable reading, even inviting!
21201  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21202  and documentation in a single file.
21203  Literate programming tools then parse the file to produce either readable
21204  documentation or compilable source.
21205  The WEB style of literate programming was created by D.
21206 \begin_inset space \thinspace{}
21207 \end_inset
21208
21209 E.
21210  Knuth during the development of his TeX typesetting software.
21211  
21212 \end_layout
21213
21214 \begin_layout Standard
21215 Another excerpt says:
21216 \end_layout
21217
21218 \begin_layout Quotation
21219
21220 \emph on
21221 How is literate programming different from verbose commenting?
21222 \end_layout
21223
21224 \begin_layout Quotation
21225 There are three distinguishing characteristics.
21226  In order of importance, they are: 
21227 \end_layout
21228
21229 \begin_deeper
21230 \begin_layout Itemize
21231 flexible order of elaboration 
21232 \end_layout
21233
21234 \begin_layout Itemize
21235 automatic support for browsing 
21236 \end_layout
21237
21238 \begin_layout Itemize
21239 typeset documentation, especially diagrams and mathematics 
21240 \end_layout
21241
21242 \end_deeper
21243 \begin_layout Standard
21244 Now that I sparked your curiosity, take a look in the references.
21245 \end_layout
21246
21247 \begin_layout Subsubsection
21248 References
21249 \end_layout
21250
21251 \begin_layout Standard
21252 The complete Literate Programming FAQ can be found at:
21253 \end_layout
21254
21255 \begin_layout Quote
21256 Literate Programming FAQ 
21257 \begin_inset Flex URL
21258 status collapsed
21259
21260 \begin_layout Plain Layout
21261
21262 http://www.literateprogramming.com/lpfaq.pdf
21263 \end_layout
21264
21265 \end_inset
21266
21267
21268 \end_layout
21269
21270 \begin_layout Standard
21271 The FAQ lists 23 (twenty three!) different literate programming tools.
21272  Where some are specialized or 
21273 \begin_inset Quotes eld
21274 \end_inset
21275
21276 tailored
21277 \begin_inset Quotes erd
21278 \end_inset
21279
21280  for particular programming languages, while other have general scope.
21281  I selected 
21282 \noun on
21283 Noweb
21284 \noun default
21285  for my own use for several reasons:
21286 \end_layout
21287
21288 \begin_layout Itemize
21289 It can generate the documentation either in LaTeX or HTML.
21290 \end_layout
21291
21292 \begin_layout Itemize
21293 It has a open architecture, i.
21294 \begin_inset space \thinspace{}
21295 \end_inset
21296
21297 g.
21298 \begin_inset space \space{}
21299 \end_inset
21300
21301 it is easy to plug in new filters and to perform special processing that
21302  you may need.
21303  
21304 \end_layout
21305
21306 \begin_layout Itemize
21307 There is a good selection of filters available already (the HTML is one
21308  of them).
21309 \end_layout
21310
21311 \begin_layout Itemize
21312 It is free.
21313 \end_layout
21314
21315 \begin_layout Standard
21316 The Noweb web page can be found at: 
21317 \end_layout
21318
21319 \begin_layout Quote
21320 Noweb home page 
21321 \begin_inset Flex URL
21322 status collapsed
21323
21324 \begin_layout Plain Layout
21325
21326 http://www.cs.virginia.edu/~nr/noweb/
21327 \end_layout
21328
21329 \end_inset
21330
21331
21332 \end_layout
21333
21334 \begin_layout Standard
21335 Starting from there you can reach many other interesting links and even
21336  some literate program examples.
21337 \end_layout
21338
21339 \begin_layout Subsection
21340 LyX and Literate Programming
21341 \end_layout
21342
21343 \begin_layout Standard
21344 The LyX support for Literate Programming is provided by using the generic
21345  LyX converters mechanism.
21346  This support is provided in a 
21347 \begin_inset Quotes eld
21348 \end_inset
21349
21350 Noweb independent
21351 \begin_inset Quotes erd
21352 \end_inset
21353
21354  way, i.
21355 \begin_inset space \thinspace{}
21356 \end_inset
21357
21358 g.
21359 \begin_inset space \space{}
21360 \end_inset
21361
21362 you will be able to use this new LyX feature with some other literate programmin
21363 g tool of your choice by just changing your LyX preferences.
21364 \end_layout
21365
21366 \begin_layout Subsubsection
21367 Generating documents and code (weaving and tangling)
21368 \end_layout
21369
21370 \begin_layout Paragraph
21371 Selecting the document class
21372 \end_layout
21373
21374 \begin_layout Standard
21375 If you have installed Noweb and LyX successfully, whenever you open a new
21376  document or try to change the document class of an existing one, you will
21377  find that there are three new document classes available:
21378 \end_layout
21379
21380 \begin_layout Itemize
21381 Article (Noweb)
21382 \end_layout
21383
21384 \begin_layout Itemize
21385 Book (Noweb)
21386 \end_layout
21387
21388 \begin_layout Itemize
21389 Report (Noweb)
21390 \end_layout
21391
21392 \begin_layout Standard
21393 You must select one of them to create your literate documents from.
21394  
21395 \end_layout
21396
21397 \begin_layout Standard
21398 Note that literate documents are not limited to these three classes.
21399  New classes can be generated from other styles like letter or in combination
21400  with other class variations like Article (AMS).
21401  If you have special needs that cannot be covered by one of the existing
21402  classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21403  will arrange to insert a new entry, or teach you how to do it.
21404 \begin_inset Foot
21405 status collapsed
21406
21407 \begin_layout Plain Layout
21408 It is very simple, it involves the creation of a file with four lines, and
21409  re-running of the auto configuration.
21410 \end_layout
21411
21412 \end_inset
21413
21414  Moreover, if you use a literate tool other than Noweb you may need to create
21415  a new set of document classes for it.
21416 \end_layout
21417
21418 \begin_layout Paragraph
21419 Typing code in
21420 \end_layout
21421
21422 \begin_layout Standard
21423 LyX enables you to write code with a layout named 
21424 \noun on
21425 Scrap
21426 \noun default
21427 .
21428 \begin_inset Foot
21429 status collapsed
21430
21431 \begin_layout Plain Layout
21432 The equivalent Noweb term is 
21433 \begin_inset Quotes eld
21434 \end_inset
21435
21436 Chunk
21437 \begin_inset Quotes erd
21438 \end_inset
21439
21440 .
21441  For historical reasons, I got used to the term 
21442 \begin_inset Quotes eld
21443 \end_inset
21444
21445 scrap
21446 \begin_inset Quotes erd
21447 \end_inset
21448
21449  introduced by other literate tool named Nuweb, which I used for many years
21450  before rendering myself to Noweb.
21451 \end_layout
21452
21453 \end_inset
21454
21455  Noweb delimits scraps like this:
21456 \end_layout
21457
21458 \begin_layout LyX-Code
21459 <<My scrap>>=
21460 \end_layout
21461
21462 \begin_layout LyX-Code
21463   code
21464 \end_layout
21465
21466 \begin_layout LyX-Code
21467   more code
21468 \end_layout
21469
21470 \begin_layout LyX-Code
21471   even more code
21472 \end_layout
21473
21474 \begin_layout LyX-Code
21475   @
21476 \end_layout
21477
21478 \begin_layout Standard
21479 The problem is that whatever is written in between the << and the 
21480 \family typewriter
21481 @
21482 \family default
21483  must be taken literally, i.
21484 \begin_inset space \thinspace{}
21485 \end_inset
21486
21487 g.
21488 \begin_inset space \space{}
21489 \end_inset
21490
21491 LyX should be prevented from making any special interpretation of what has
21492  been written.
21493  This is handled by a special layout named Scrap, that works like a normal
21494  paragraph but has a free spacing capability.
21495 \end_layout
21496
21497 \begin_layout Standard
21498 The down side of the Scrap paragraph layout is that consecutive paragraphs
21499  of code will be spaced with one empty line in the source code and also
21500  in the printed documentation.
21501  The work around is to enter each line of code within a single Scrap, with
21502  a newline (ctrl-return).
21503  The example above will look like this:
21504 \begin_inset Foot
21505 status collapsed
21506
21507 \begin_layout Plain Layout
21508 If you have a printed version of this document you will not see any difference
21509  between the previous example and this one.
21510 \end_layout
21511
21512 \end_inset
21513
21514
21515 \end_layout
21516
21517 \begin_layout LyX-Code
21518 <<My scrap>>=
21519 \begin_inset Newline newline
21520 \end_inset
21521
21522   code
21523 \begin_inset Newline newline
21524 \end_inset
21525
21526   more code
21527 \begin_inset Newline newline
21528 \end_inset
21529
21530   even more code
21531 \begin_inset Newline newline
21532 \end_inset
21533
21534   @
21535 \end_layout
21536
21537 \begin_layout Standard
21538 This layout works fine.
21539  The only real inconvenience is that you have to type ctrl-return instead
21540  of a plain return.
21541 \begin_inset Foot
21542 status collapsed
21543
21544 \begin_layout Plain Layout
21545 It is in my list of 
21546 \begin_inset Quotes eld
21547 \end_inset
21548
21549 improvements
21550 \begin_inset Quotes erd
21551 \end_inset
21552
21553  to fix that.
21554 \end_layout
21555
21556 \end_inset
21557
21558
21559 \end_layout
21560
21561 \begin_layout Standard
21562 As a special note, you can also use the 
21563 \begin_inset Quotes eld
21564 \end_inset
21565
21566 %def
21567 \begin_inset Quotes erd
21568 \end_inset
21569
21570  construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21571 rence:
21572 \end_layout
21573
21574 \begin_layout LyX-Code
21575 <<My scrap>>=
21576 \begin_inset Newline newline
21577 \end_inset
21578
21579   def some_function(args):
21580 \begin_inset Newline newline
21581 \end_inset
21582
21583     "This is the doc string for this function."
21584 \begin_inset Newline newline
21585 \end_inset
21586
21587     print "My args: ", args
21588 \end_layout
21589
21590 \begin_layout LyX-Code
21591 @ %def some_function
21592 \end_layout
21593
21594 \begin_layout Standard
21595 For an example of this usage and the resulting cross-reference output, look
21596  at the Literate python program in 
21597 \emph on
21598 LIBDIR/examples/listerrors.lyx
21599 \emph default
21600  which should make this all clear.
21601 \end_layout
21602
21603 \begin_layout Paragraph
21604 Generating the documentation
21605 \end_layout
21606
21607 \begin_layout Standard
21608 At this point you already have a new document file with a proper document
21609  class, and with some code and text on it.
21610  How do I print it? The answer is simple, you select 
21611 \family sans
21612 View\SpecialChar \menuseparator
21613 DVI,
21614 \family default
21615  etc.
21616  Just like you would do for a plain document.
21617  No special procedure is required.
21618 \end_layout
21619
21620 \begin_layout Standard
21621 To help orientate you, I will now explain what happens inside LyX:
21622 \end_layout
21623
21624 \begin_layout Enumerate
21625 When the 
21626 \family sans
21627 Update\SpecialChar \menuseparator
21628 DVI
21629 \family default
21630  menu option is chosen, a LaTeX file is generated.
21631  
21632 \end_layout
21633
21634 \begin_deeper
21635 \begin_layout Standard
21636 If the document is of any literate class the generated file will be named
21637  with an extension name defined by the 
21638 \begin_inset Quotes eld
21639 \end_inset
21640
21641 literate
21642 \begin_inset Quotes erd
21643 \end_inset
21644
21645  format (defined in the Preferences panel), otherwise the file will have
21646  the usual 
21647 \family typewriter
21648 .tex
21649 \family default
21650  extension.
21651 \end_layout
21652
21653 \end_deeper
21654 \begin_layout Enumerate
21655 Note that the only difference so far is in the name of the file, no special
21656  processing is required by LyX.
21657  Given that you formatted the code using the Scrap layout that, by itself,
21658  takes care of the business.
21659 \end_layout
21660
21661 \begin_layout Enumerate
21662 If the document is of any literate class LyX will then use the internal
21663  LyX to Noweb converter, followed by the Noweb to LaTeX converter
21664 \begin_inset Foot
21665 status collapsed
21666
21667 \begin_layout Plain Layout
21668 The converters are defined in the 
21669 \family sans
21670 Tools\SpecialChar \menuseparator
21671 Preferences
21672 \family default
21673  panel, under the 
21674 \begin_inset Quotes eld
21675 \end_inset
21676
21677 Conversion
21678 \begin_inset Quotes erd
21679 \end_inset
21680
21681  tab.
21682  See section 
21683 \emph on
21684 Converters
21685 \emph default
21686  of the 
21687 \emph on
21688 Customization
21689 \emph default
21690  manual for general information about converters.
21691 \end_layout
21692
21693 \end_inset
21694
21695  to generate the LaTeX file.
21696 \end_layout
21697
21698 \begin_deeper
21699 \begin_layout Standard
21700 Otherwise it will just skip this step.
21701 \end_layout
21702
21703 \end_deeper
21704 \begin_layout Enumerate
21705 Finally, LaTeX is invoked and the regular post processing continues as in
21706  a plain document.
21707 \end_layout
21708
21709 \begin_layout Standard
21710 Independence from a particular 
21711 \begin_inset Quotes eld
21712 \end_inset
21713
21714 literate tool
21715 \begin_inset Quotes erd
21716 \end_inset
21717
21718  is easily achieved by changing the commands that are run by the various
21719  converters.
21720 \end_layout
21721
21722 \begin_layout Paragraph
21723 Generating the code
21724 \end_layout
21725
21726 \begin_layout Standard
21727 When the build menu option is chosen or the corresponding button in the
21728  toolbar is pressed, a LaTeX file is generated just like step 1 above.
21729  Next, LyX invokes the 
21730 \family typewriter
21731 Noweb->Program
21732 \family default
21733  converter.
21734  This converter needs to be defined by the user and is not installed by
21735  default, though the Program format is.
21736  This converter (like any other converter) will have two parts:
21737 \end_layout
21738
21739 \begin_layout Enumerate
21740 The converter program itself.
21741  This program performs the conversion from the one format to the other (in
21742  this case, from the Noweb format to the Program pseudo-format).
21743 \end_layout
21744
21745 \begin_layout Enumerate
21746 The error log parser.
21747  This is a program whose sole purpose is to rewrite error messages in a
21748  format that LyX understands.
21749  This makes it possible for LyX to place error boxes in the right places
21750  in the file buffer.
21751 \end_layout
21752
21753 \begin_layout Standard
21754 The first part, the 
21755 \begin_inset Quotes eld
21756 \end_inset
21757
21758 Converter
21759 \begin_inset Quotes erd
21760 \end_inset
21761
21762  setting, should be set to 
21763 \begin_inset Quotes eld
21764 \end_inset
21765
21766
21767 \family typewriter
21768 build-script $$i
21769 \family default
21770
21771 \begin_inset Quotes erd
21772 \end_inset
21773
21774 .
21775  This basically means that LyX will call 
21776 \begin_inset Quotes eld
21777 \end_inset
21778
21779 build-script
21780 \begin_inset Quotes erd
21781 \end_inset
21782
21783  (a program or script) with the name of the Noweb file (normally a file
21784  in the LyX temp directory).
21785  
21786 \end_layout
21787
21788 \begin_layout Standard
21789 This is an implementation of 
21790 \begin_inset Quotes eld
21791 \end_inset
21792
21793 build-script
21794 \begin_inset Quotes erd
21795 \end_inset
21796
21797  that you can place in a directory on your path:
21798 \end_layout
21799
21800 \begin_layout LyX-Code
21801 #!/bin/sh
21802 \end_layout
21803
21804 \begin_layout LyX-Code
21805 #
21806 \end_layout
21807
21808 \begin_layout LyX-Code
21809 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21810 \end_layout
21811
21812 \begin_layout Standard
21813 The next part of the converter setting is the 
21814 \begin_inset Quotes eld
21815 \end_inset
21816
21817 Flags
21818 \begin_inset Quotes erd
21819 \end_inset
21820
21821  which is to be set to 
21822 \begin_inset Quotes eld
21823 \end_inset
21824
21825
21826 \family typewriter
21827 parselog=listerrors
21828 \family default
21829
21830 \begin_inset Quotes erd
21831 \end_inset
21832
21833 .
21834  This will run any errors that are generated by the 
21835 \begin_inset Quotes eld
21836 \end_inset
21837
21838 build-script
21839 \begin_inset Quotes erd
21840 \end_inset
21841
21842  process through the 
21843 \begin_inset Quotes eld
21844 \end_inset
21845
21846 listerrors
21847 \begin_inset Quotes erd
21848 \end_inset
21849
21850  program.
21851 \end_layout
21852
21853 \begin_layout Standard
21854 The converter code looks in 
21855 \emph on
21856 MYLYXDIR/scripts
21857 \emph default
21858  first, then in 
21859 \emph on
21860 LIBDIR/scripts
21861 \emph default
21862  then on the path for the 
21863 \begin_inset Quotes eld
21864 \end_inset
21865
21866 listerrors
21867 \begin_inset Quotes erd
21868 \end_inset
21869
21870  program.
21871 \end_layout
21872
21873 \begin_layout Standard
21874 The build will normally take place in LyX's temporary directory, so the
21875  files produced by the conversion will be in that directory.
21876  LyX will copy out what it regards as the `main' file, but the 
21877 \family typewriter
21878 Noweb->Program
21879 \family default
21880  conversion may produce several files, and so most of these would then be
21881  deleted when LyX was closed.
21882  The present solution is to use a `copier',
21883 \begin_inset Foot
21884 status collapsed
21885
21886 \begin_layout Plain Layout
21887 See section 
21888 \emph on
21889 Copiers
21890 \emph default
21891  of the 
21892 \emph on
21893 Customization
21894 \emph default
21895  manual for information on these.
21896 \end_layout
21897
21898 \end_inset
21899
21900  in this case, the 
21901 \family typewriter
21902 ext_copy.py
21903 \family default
21904  script in its default mode, so that the entire contents of the temporary
21905  directory is copied.
21906  More will get copied than is needed, to be sure, but nothing will be lost.
21907  If, however, you know what extensions the generated files will have, this
21908  can be improved by using the 
21909 \family typewriter
21910 -e
21911 \family default
21912  option to 
21913 \family typewriter
21914 ext_copy
21915 \family default
21916 .
21917  This option takes a comma-separated list of extensions to copy.
21918  So, for example, if the conversion will generate only files with the extensions
21919  
21920 \family typewriter
21921 .c
21922 \family default
21923  and 
21924 \family typewriter
21925 .h
21926 \family default
21927 , then the correct definition would be:
21928 \end_layout
21929
21930 \begin_layout LyX-Code
21931 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21932 \end_layout
21933
21934 \begin_layout Standard
21935 The result will be that only files with these two extensions will be copied
21936  out.
21937 \end_layout
21938
21939 \begin_layout Paragraph
21940 Build instructions in the document
21941 \end_layout
21942
21943 \begin_layout Standard
21944 The last piece of the integration between LyX and noweb is the 
21945 \begin_inset Quotes eld
21946 \end_inset
21947
21948 build-script
21949 \begin_inset Quotes erd
21950 \end_inset
21951
21952  scrap.
21953  Generally, the instructions for building your program should be embedded
21954  in a scrap of its own.
21955  The noweb-specific 
21956 \begin_inset Quotes eld
21957 \end_inset
21958
21959 build-script
21960 \begin_inset Quotes erd
21961 \end_inset
21962
21963  above uses the notangle command to look for this scrap (called 
21964 \begin_inset Quotes eld
21965 \end_inset
21966
21967 build-script
21968 \begin_inset Quotes erd
21969 \end_inset
21970
21971 ) and runs its contents through 
21972 \begin_inset Quotes eld
21973 \end_inset
21974
21975 sh
21976 \begin_inset Quotes erd
21977 \end_inset
21978
21979 .
21980 \end_layout
21981
21982 \begin_layout Standard
21983 Typically, such a scrap would look something like this:
21984 \end_layout
21985
21986 \begin_layout LyX-Code
21987 <<build-script>>=
21988 \begin_inset Newline newline
21989 \end_inset
21990
21991 #!/bin/sh
21992 \begin_inset Newline newline
21993 \end_inset
21994
21995
21996 \begin_inset Newline newline
21997 \end_inset
21998
21999 if [ -z "${NOWEB_SOURCE}" ]
22000 \begin_inset Newline newline
22001 \end_inset
22002
22003 then
22004 \begin_inset Newline newline
22005 \end_inset
22006
22007   NOWEB_SOURCE=myfile.nw
22008 \begin_inset Newline newline
22009 \end_inset
22010
22011 fi
22012 \begin_inset Newline newline
22013 \end_inset
22014
22015 [...
22016  code to extract files ...]
22017 \begin_inset Newline newline
22018 \end_inset
22019
22020 [...
22021  code to compile files ...]
22022 \begin_inset Newline newline
22023 \end_inset
22024
22025 @
22026 \end_layout
22027
22028 \begin_layout Standard
22029 Look in 
22030 \emph on
22031 LIBDIR/examples/listerrors.lyx
22032 \emph default
22033  or in 
22034 \emph on
22035 LIBDIR/examples/Literate.lyx
22036 \emph default
22037  which implement two versions of the 
22038 \begin_inset Quotes eld
22039 \end_inset
22040
22041 listerrors
22042 \begin_inset Quotes erd
22043 \end_inset
22044
22045  program for some illustrations of how all of these pieces go together or
22046  in 
22047 \emph on
22048 LIBDIR/examples/noweb2lyx.lyx.
22049
22050 \emph default
22051  Interestingly, these three files show off the language-indepence of the
22052  LyX literate programming support since they are written in Python, C and
22053  Perl respectively.
22054 \end_layout
22055
22056 \begin_layout Subsubsection
22057 Configuring LyX
22058 \end_layout
22059
22060 \begin_layout Standard
22061 All the Literate Programming support is configured by the 
22062 \family sans
22063 Tools\SpecialChar \menuseparator
22064 Preferences
22065 \family default
22066  panel in the 
22067 \begin_inset Quotes eld
22068 \end_inset
22069
22070 Conversion
22071 \begin_inset Quotes erd
22072 \end_inset
22073
22074  tab.
22075  The important parts are:
22076 \end_layout
22077
22078 \begin_layout Description
22079 the
22080 \begin_inset space ~
22081 \end_inset
22082
22083
22084 \begin_inset Quotes eld
22085 \end_inset
22086
22087 literate
22088 \begin_inset Quotes erd
22089 \end_inset
22090
22091
22092 \begin_inset space ~
22093 \end_inset
22094
22095 format Set up via the Formats tab, this is where the Noweb-specific pieces
22096  are set up.
22097  The 
22098 \family sans
22099 GUI Name
22100 \family default
22101  is set to 
22102 \family typewriter
22103 NoWeb
22104 \family default
22105 , the file extension is set to 
22106 \family typewriter
22107 .nw
22108 \family default
22109 .
22110  This tells LyX to create a file with a 
22111 \family typewriter
22112 .nw
22113 \family default
22114  extension in the first step of the conversion process.
22115 \end_layout
22116
22117 \begin_layout Description
22118 the
22119 \begin_inset space ~
22120 \end_inset
22121
22122
22123 \family sans
22124 Program
22125 \family default
22126
22127 \begin_inset space ~
22128 \end_inset
22129
22130 format This is an empty format whose sole purpose is to be the endpoint
22131  of a conversion (which then allows us to set up a converter for it).
22132 \end_layout
22133
22134 \begin_layout Description
22135
22136 \family sans
22137 NoWeb
22138 \family default
22139 ->
22140 \family sans
22141 LaTeX
22142 \family default
22143  This converter performs the 
22144 \begin_inset Quotes eld
22145 \end_inset
22146
22147 weaving
22148 \begin_inset Quotes erd
22149 \end_inset
22150
22151  of the literate document.
22152  For Noweb, it is set to 
22153 \begin_inset Quotes eld
22154 \end_inset
22155
22156
22157 \family typewriter
22158 noweave -delay -index $$i > $$o
22159 \family default
22160
22161 \begin_inset Quotes erd
22162 \end_inset
22163
22164
22165 \end_layout
22166
22167 \begin_layout Description
22168
22169 \family sans
22170 NoWeb
22171 \family default
22172 ->
22173 \family sans
22174 Program
22175 \family default
22176  This performs the 
22177 \begin_inset Quotes eld
22178 \end_inset
22179
22180 tangling step
22181 \begin_inset Quotes erd
22182 \end_inset
22183
22184 .
22185  As stated above, the Converter is set to 
22186 \begin_inset Quotes eld
22187 \end_inset
22188
22189
22190 \family typewriter
22191 build-script $$i
22192 \family default
22193
22194 \begin_inset Quotes erd
22195 \end_inset
22196
22197 , with Flags set to 
22198 \begin_inset Quotes eld
22199 \end_inset
22200
22201
22202 \family typewriter
22203 originaldir,parselog=listerrors
22204 \family default
22205
22206 \begin_inset Quotes erd
22207 \end_inset
22208
22209 .
22210 \end_layout
22211
22212 \begin_layout Subsubsection
22213 Debug extensions
22214 \end_layout
22215
22216 \begin_layout Standard
22217 There is also a new function implemented in the LyX server, the 
22218 \begin_inset Quotes eld
22219 \end_inset
22220
22221 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22222  
22223 \end_layout
22224
22225 \begin_layout Standard
22226 When debugging code with ddd/gdb, it is possible to invoke a text editor
22227  at the current execution position with a single key stroke.
22228  The default ddd configuration for that is shift-ctrl-V.
22229  It happens that you can define the editor command line invocation in ddd
22230  by accessing the 
22231 \family sans
22232 Edit\SpecialChar \menuseparator
22233 Preferences\SpecialChar \menuseparator
22234 Helpers
22235 \family default
22236  dialog and changing the "Edit Sources" entry.
22237 \end_layout
22238
22239 \begin_layout Standard
22240 I take advantage of the new created LyX server function and this ddd feature,
22241  and set 
22242 \begin_inset Quotes eld
22243 \end_inset
22244
22245 Edit Sources
22246 \begin_inset Quotes erd
22247 \end_inset
22248
22249  to:
22250 \end_layout
22251
22252 \begin_layout LyX-Code
22253 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22254 \end_layout
22255
22256 \begin_layout Standard
22257 With this, whenever you are using ddd and find a point in the program that
22258  you want to edit, you just press shift-ctrl-V (in the ddd window), and
22259  ddd you forward this information to LyX through the LyX server and then
22260  the LyX window will show the same file with the cursor at the same position
22261  ddd was pointing to.
22262  No more guessing or long scrolling to locate a point in the program back
22263  from debugging !
22264 \end_layout
22265
22266 \begin_layout Standard
22267 Note however that you must enable the LyX server to get this feature working
22268  (it is disabled by default).
22269  You can enable it in 
22270 \family sans
22271 Preferences
22272 \family default
22273  (tabs 
22274 \family sans
22275 Inputs
22276 \family default
22277
22278 \family sans
22279 Paths
22280 \family default
22281 ) by entering in the 
22282 \family sans
22283 LyXserver pipe
22284 \family default
22285  a path like 
22286 \begin_inset Quotes eld
22287 \end_inset
22288
22289
22290 \family typewriter
22291 /home/<your-home-directory>/.lyx/lyxpipe
22292 \family default
22293
22294 \begin_inset Quotes erd
22295 \end_inset
22296
22297
22298 \end_layout
22299
22300 \begin_layout Standard
22301 Read the LyX server documentation in the 
22302 \emph on
22303 Customization Manual
22304 \emph default
22305  for further information.
22306 \end_layout
22307
22308 \begin_layout Subsubsection
22309 Toolbar extensions
22310 \end_layout
22311
22312 \begin_layout Standard
22313 There are six new buttons that can be added to your LyX toolbar.
22314  Five of these buttons are short cuts to layout styles: 
22315 \family sans
22316 Standard
22317 \family default
22318
22319 \family sans
22320 Section
22321 \family default
22322
22323 \family sans
22324 LaTeX
22325 \family default
22326
22327 \family sans
22328 LyX-Code
22329 \family default
22330 , and 
22331 \family sans
22332 Scrap
22333 \family default
22334 .
22335  The last one is a short cut to the 
22336 \begin_inset Quotes eld
22337 \end_inset
22338
22339 Build Program
22340 \begin_inset Quotes erd
22341 \end_inset
22342
22343  File menu entry.
22344  
22345 \end_layout
22346
22347 \begin_layout Standard
22348 LyX has a range of buttons that are available for tool bar customization.
22349  In my toolbar I like to combine the six short cuts above with two more:
22350  One for 
22351 \family sans
22352 View
22353 \family default
22354 \SpecialChar \menuseparator
22355
22356 \family sans
22357 Update
22358 \family default
22359 \SpecialChar \menuseparator
22360
22361 \family sans
22362 DVI
22363 \family default
22364  and the other for 
22365 \family sans
22366 View\SpecialChar \menuseparator
22367 DVI
22368 \family default
22369  File menu entries.
22370  Here is how it looks like:
22371 \end_layout
22372
22373 \begin_layout LyX-Code
22374 Toolbar
22375 \end_layout
22376
22377 \begin_layout LyX-Code
22378   Layouts
22379 \end_layout
22380
22381 \begin_layout LyX-Code
22382   Icon "layout Standard"
22383 \end_layout
22384
22385 \begin_layout LyX-Code
22386   Icon "layout Section"
22387 \end_layout
22388
22389 \begin_layout LyX-Code
22390   Icon "layout LaTeX"
22391 \end_layout
22392
22393 \begin_layout LyX-Code
22394   Icon "layout LyX-Code"
22395 \end_layout
22396
22397 \begin_layout LyX-Code
22398   Icon "layout Scrap"
22399 \end_layout
22400
22401 \begin_layout LyX-Code
22402   Separator
22403 \end_layout
22404
22405 \begin_layout LyX-Code
22406   Icon "buffer-view"
22407 \end_layout
22408
22409 \begin_layout LyX-Code
22410   Icon "buffer-typeset"
22411 \end_layout
22412
22413 \begin_layout LyX-Code
22414   Icon "build-program"
22415 \end_layout
22416
22417 \begin_layout LyX-Code
22418   Separator
22419 \end_layout
22420
22421 \begin_layout LyX-Code
22422 .
22423 \end_layout
22424
22425 \begin_layout LyX-Code
22426 .
22427 \end_layout
22428
22429 \begin_layout LyX-Code
22430 .
22431 \end_layout
22432
22433 \begin_layout LyX-Code
22434 End
22435 \end_layout
22436
22437 \begin_layout Subsubsection
22438 Colors customization
22439 \end_layout
22440
22441 \begin_layout Standard
22442 There are a number of colors in LyX that can be customized in 
22443 \family sans
22444 Preferences
22445 \family default
22446 .
22447  One of the things that bothers people is the LaTeX font color.
22448  The default color is red, since the scraps uses LaTeX font, and there is
22449  a lot of scraps in literate documents, you may get tired of seeing everything
22450  in red.
22451  You can change it by going to the tabs 
22452 \family sans
22453 Look&Feel
22454 \family default
22455
22456 \family sans
22457 Colors.
22458 \end_layout
22459
22460 \begin_layout Standard
22461 The next thing is the visible presence of the newline character in the screen.
22462  You can choose the color of this particular character and make it blend
22463  in the background.
22464  I recommend you choosing a color that is close to the background but not
22465  equal, that way you still can see it is there, but it is not bothering
22466  you anymore.
22467  
22468 \end_layout
22469
22470 \begin_layout Chapter
22471 Special features
22472 \end_layout
22473
22474 \begin_layout Standard
22475 You can do everything with LyX that you can do with LaTeX.
22476  However, LyX cannot support every LaTeX feature directly.
22477  But you can always use TeX Code.
22478  This chapter shows you some more special things you might want to use.
22479  For other special things you can do with figures, tables, floats, boxes
22480  and notes, have a look at the 
22481 \emph on
22482 EmbeddedObjects
22483 \emph default
22484  manual.
22485 \end_layout
22486
22487 \begin_layout Section
22488 Multiple Columns
22489 \end_layout
22490
22491 \begin_layout Standard
22492 The aim for this section is to show how the LaTeX package 
22493 \series bold
22494 multicol
22495 \series default
22496  can be used in a LyX document.
22497  LyX does not support the 
22498 \series bold
22499 multicol
22500 \series default
22501  package natively yet, so you have to use some TeX code.
22502 \end_layout
22503
22504 \begin_layout Standard
22505 The 
22506 \series bold
22507 multicol
22508 \series default
22509  package allows switching between one and multicolumn format on the same
22510  page.
22511  Footnotes are handled correctly, but will be placed at the bottom of the
22512  page and not under each column.
22513  Within the different columns you can use everyting, with the limitation
22514  that for floats you need to use the option 
22515 \family sans
22516 Span colums
22517 \family default
22518  for each column.
22519 \end_layout
22520
22521 \begin_layout Subsection
22522 Two columns
22523 \end_layout
22524
22525 \begin_layout Standard
22526 If you want to have two columns in your text, insert the comand
22527 \end_layout
22528
22529 \begin_layout Standard
22530
22531 \series bold
22532
22533 \backslash
22534 begin{multicols}{2}
22535 \end_layout
22536
22537 \begin_layout Standard
22538 at the point where you want the two column layout to start, and then
22539 \end_layout
22540
22541 \begin_layout Standard
22542
22543 \series bold
22544
22545 \backslash
22546 end{multicols}
22547 \end_layout
22548
22549 \begin_layout Standard
22550 where you want it to end.
22551  Like this:
22552 \end_layout
22553
22554 \begin_layout Standard
22555 \begin_inset ERT
22556 status open
22557
22558 \begin_layout Plain Layout
22559
22560
22561 \backslash
22562 begin{multicols}{2}
22563 \end_layout
22564
22565 \end_inset
22566
22567
22568 \end_layout
22569
22570 \begin_layout Standard
22571 \noindent
22572
22573 \series bold
22574 \size small
22575 The Adventure of the Empty House
22576 \series default
22577
22578 \begin_inset Newline newline
22579 \end_inset
22580
22581 by 
22582 \noun on
22583 Sir Arthur Conan Doyle
22584 \end_layout
22585
22586 \begin_layout Standard
22587
22588 \size small
22589 It was in the spring of the year 1894 that all London was interested, and
22590  the fashionable world dismayed, by the murder of the Honourable Ronald
22591  Adair under most unusual and inexplicable circumstances.
22592  The public has already learned those particulars of the crime which came
22593  out in the police investigation, but a good deal was suppressed upon that
22594  occasion, since the case for the prosecution was so overwhelmingly strong
22595  that it was not necessary to bring forward all the facts.
22596  Only now, at the end of nearly ten years, am I allowed to supply those
22597  missing links which make up the whole of that remarkable chain.
22598  The crime was of interest in itself, but that interest was as nothing to
22599  me compared to the inconceivable sequel, which afforded me the greatest
22600  shock and surprise of any event in my adventurous life.
22601  Even now, after this long interval, I find myself thrilling as I think
22602  of it, and feeling once more that sudden flood of joy, amazement, and increduli
22603 ty which utterly submerged my mind.
22604  Let me say to that public, which has shown some interest in those glimpses
22605  which I have occasionally given them of the thoughts and actions of a very
22606  remarkable man, that they are not to blame me if I have not shared my knowledge
22607  with them, for I should have considered it my first duty to do so, had
22608  I not been barred by a positive prohibition from his own lips, which was
22609  only withdrawn upon the third of last month.
22610 \end_layout
22611
22612 \begin_layout Standard
22613 \begin_inset ERT
22614 status open
22615
22616 \begin_layout Plain Layout
22617
22618
22619 \backslash
22620 end{multicols}
22621 \end_layout
22622
22623 \end_inset
22624
22625
22626 \end_layout
22627
22628 \begin_layout Subsection
22629 Multiple columns
22630 \end_layout
22631
22632 \begin_layout Standard
22633 The same pattern is used when you want more than two columns:
22634 \end_layout
22635
22636 \begin_layout Standard
22637 \begin_inset ERT
22638 status open
22639
22640 \begin_layout Plain Layout
22641
22642
22643 \backslash
22644 begin{multicols}{3}
22645 \end_layout
22646
22647 \end_inset
22648
22649
22650 \end_layout
22651
22652 \begin_layout Standard
22653
22654 \size footnotesize
22655 It can be imagined that my close intimacy with Sherlock Holmes had interested
22656  me deeply in crime, and that after his disappearance I never failed to
22657  read with care the various problems which came before the public.
22658  And I even attempted, more than once, for my own private satisfaction,
22659  to employ his methods in their solution, though with indifferent success.
22660  There was none, however, which appealed to me like this tragedy of Ronald
22661  Adair.
22662  As I read the evidence at the inquest, which led up to a verdict of willful
22663  murder against some person or persons unknown, I realized more clearly
22664  than I had ever done the loss which the community had sustained by the
22665  death of Sherlock Holmes.
22666  There were points about this strange business which would, I was sure,
22667  have specially appealed to him, and the efforts of the police would have
22668  been supplemented, or more probably anticipated, by the trained observation
22669  and the alert mind of the first criminal agent in Europe.
22670  All day, as I drove upon my round, I turned over the case in my mind and
22671  found no explanation which appeared to me to be adequate.
22672  At the risk of telling a twice-told tale, I will recapitulate the facts
22673  as they were known to the public at the conclusion of the inquest.
22674 \end_layout
22675
22676 \begin_layout Standard
22677 \begin_inset ERT
22678 status open
22679
22680 \begin_layout Plain Layout
22681
22682
22683 \backslash
22684 end{multicols}
22685 \end_layout
22686
22687 \end_inset
22688
22689
22690 \end_layout
22691
22692 \begin_layout Standard
22693 You can have more than 3
22694 \begin_inset space ~
22695 \end_inset
22696
22697 columns if you want to, but that might not be very pleasant for the eye.
22698 \end_layout
22699
22700 \begin_layout Subsection
22701 Columns inside columns
22702 \end_layout
22703
22704 \begin_layout Standard
22705 You can even have columns inside columns:
22706 \end_layout
22707
22708 \begin_layout Standard
22709 \begin_inset ERT
22710 status open
22711
22712 \begin_layout Plain Layout
22713
22714
22715 \backslash
22716 begin{multicols}{2}
22717 \end_layout
22718
22719 \end_inset
22720
22721
22722 \end_layout
22723
22724 \begin_layout Standard
22725
22726 \size footnotesize
22727 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22728  at that time governor of one of the Australian colonies.
22729  Adair's mother had returned from Australia to undergo the operation for
22730  cataract, and she, her son Ronald, and her daughter Hilda were living together
22731  at 427 Park Lane.
22732 \end_layout
22733
22734 \begin_layout Standard
22735 \begin_inset ERT
22736 status open
22737
22738 \begin_layout Plain Layout
22739
22740
22741 \backslash
22742 begin{multicols}{2}
22743 \end_layout
22744
22745 \end_inset
22746
22747
22748 \end_layout
22749
22750 \begin_layout Standard
22751
22752 \size footnotesize
22753 The youth moved in the best society–had, so far as was known, no enemies
22754  and no particular vices.
22755  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22756  had been broken off by mutual consent some months before, and there was
22757  no sign that it had left any very profound feeling behind it.
22758  For the rest {sic} the man's life moved in a narrow and conventional circle,
22759  for his habits were quiet and his nature unemotional.
22760  Yet it was upon this easy-going young aristocrat that death came, in most
22761  strange and unexpected form, between the hours of ten and eleven-twenty
22762  on the night of March 30, 1894.
22763 \end_layout
22764
22765 \begin_layout Standard
22766 \begin_inset ERT
22767 status open
22768
22769 \begin_layout Plain Layout
22770
22771
22772 \backslash
22773 end{multicols}
22774 \end_layout
22775
22776 \end_inset
22777
22778
22779 \end_layout
22780
22781 \begin_layout Standard
22782
22783 \size footnotesize
22784 Ronald Adair was fond of cards–playing continually, but never for such stakes
22785  as would hurt him.
22786  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22787  It was shown that, after dinner on the day of his death, he had played
22788  a rubber of whist at the latter club.
22789  He had also played there in the afternoon.
22790
22791 \size default
22792  
22793 \size footnotesize
22794 The evidence of those who had played with him– Mr.
22795  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22796  and that there was a fairly equal fall of the cards.
22797  Adair might have lost five pounds, but not more.
22798  His fortune was a considerable one, and such a loss could not in any way
22799  affect him.
22800  He had played nearly every day at one club or other, but he was a cautious
22801  player, and usually rose a winner.
22802  It came out in evidence that, in partnership with Colonel Moran, he had
22803  actually won as much as four hundred and twenty pounds in a sitting, some
22804  weeks before, from Godfrey Milner and Lord Balmoral.
22805  So much for his recent history as it came out at the inquest.
22806 \end_layout
22807
22808 \begin_layout Standard
22809 \begin_inset ERT
22810 status open
22811
22812 \begin_layout Plain Layout
22813
22814
22815 \backslash
22816 end{multicols}
22817 \end_layout
22818
22819 \end_inset
22820
22821
22822 \end_layout
22823
22824 \begin_layout Standard
22825 Please read the example file 
22826 \family typewriter
22827 multicol.lyx
22828 \family default
22829  for more advanced examples including column and header spacing, vertical
22830  separator lines, and more.
22831 \end_layout
22832
22833 \begin_layout Standard
22834 \begin_inset Newpage newpage
22835 \end_inset
22836
22837
22838 \end_layout
22839
22840 \begin_layout Section
22841 Non-standard Paragraph Shapes
22842 \end_layout
22843
22844 \begin_layout Standard
22845 \begin_inset ERT
22846 status collapsed
22847
22848 \begin_layout Plain Layout
22849
22850
22851 \backslash
22852 begin{sloppypar}
22853 \end_layout
22854
22855 \end_inset
22856
22857
22858 \end_layout
22859
22860 \begin_layout Standard
22861 \begin_inset ERT
22862 status collapsed
22863
22864 \begin_layout Plain Layout
22865
22866
22867 \backslash
22868 newdimen
22869 \backslash
22870 varunit 
22871 \end_layout
22872
22873 \begin_layout Plain Layout
22874
22875
22876 \backslash
22877 setlength{
22878 \backslash
22879 varunit}{4.5in}
22880 \end_layout
22881
22882 \end_inset
22883
22884
22885 \end_layout
22886
22887 \begin_layout Standard
22888 \noindent
22889 \begin_inset ERT
22890 status collapsed
22891
22892 \begin_layout Plain Layout
22893
22894
22895 \backslash
22896 parshape 19 0.45
22897 \backslash
22898 varunit 0.332
22899 \backslash
22900 varunit
22901 \end_layout
22902
22903 \begin_layout Plain Layout
22904
22905 0.40
22906 \backslash
22907 varunit 0.300
22908 \backslash
22909 varunit
22910 \end_layout
22911
22912 \begin_layout Plain Layout
22913
22914 0.35
22915 \backslash
22916 varunit 0.293
22917 \backslash
22918 varunit
22919 \end_layout
22920
22921 \begin_layout Plain Layout
22922
22923 0.30
22924 \backslash
22925 varunit 0.300
22926 \backslash
22927 varunit
22928 \end_layout
22929
22930 \begin_layout Plain Layout
22931
22932 0.25
22933 \backslash
22934 varunit 0.317
22935 \backslash
22936 varunit
22937 \end_layout
22938
22939 \begin_layout Plain Layout
22940
22941 0.20
22942 \backslash
22943 varunit 0.342
22944 \backslash
22945 varunit
22946 \end_layout
22947
22948 \begin_layout Plain Layout
22949
22950 0.15
22951 \backslash
22952 varunit 0.373
22953 \backslash
22954 varunit
22955 \end_layout
22956
22957 \begin_layout Plain Layout
22958
22959 0.10
22960 \backslash
22961 varunit 0.410
22962 \backslash
22963 varunit
22964 \end_layout
22965
22966 \begin_layout Plain Layout
22967
22968 0.05
22969 \backslash
22970 varunit 0.453
22971 \backslash
22972 varunit
22973 \end_layout
22974
22975 \begin_layout Plain Layout
22976
22977 0.00
22978 \backslash
22979 varunit 0.500
22980 \backslash
22981 varunit
22982 \end_layout
22983
22984 \begin_layout Plain Layout
22985
22986 0.05
22987 \backslash
22988 varunit 0.453
22989 \backslash
22990 varunit
22991 \end_layout
22992
22993 \begin_layout Plain Layout
22994
22995 0.10
22996 \backslash
22997 varunit 0.410
22998 \backslash
22999 varunit
23000 \end_layout
23001
23002 \begin_layout Plain Layout
23003
23004 0.15
23005 \backslash
23006 varunit 0.373
23007 \backslash
23008 varunit
23009 \end_layout
23010
23011 \begin_layout Plain Layout
23012
23013 0.20
23014 \backslash
23015 varunit 0.342
23016 \backslash
23017 varunit
23018 \end_layout
23019
23020 \begin_layout Plain Layout
23021
23022 0.25
23023 \backslash
23024 varunit 0.317
23025 \backslash
23026 varunit
23027 \end_layout
23028
23029 \begin_layout Plain Layout
23030
23031 0.30
23032 \backslash
23033 varunit 0.300
23034 \backslash
23035 varunit
23036 \end_layout
23037
23038 \begin_layout Plain Layout
23039
23040 0.35
23041 \backslash
23042 varunit 0.293
23043 \backslash
23044 varunit
23045 \end_layout
23046
23047 \begin_layout Plain Layout
23048
23049 0.40
23050 \backslash
23051 varunit 0.300
23052 \backslash
23053 varunit
23054 \end_layout
23055
23056 \begin_layout Plain Layout
23057
23058 0.45
23059 \backslash
23060 varunit 0.332
23061 \backslash
23062 varunit
23063 \end_layout
23064
23065 \begin_layout Plain Layout
23066
23067 \end_layout
23068
23069 \end_inset
23070
23071 There are times when the tyranny of rectangular paragraphs must be overthrown.
23072  In such situations, a call to the delightful plain TeX command 
23073 \family typewriter
23074
23075 \backslash
23076 parshape
23077 \family default
23078  is called for.
23079  As you can see, completely arbitrary shapes can be laid out with a suitable
23080  set of linelength definitions.
23081  While this parshape may look a bit silly and useless, one could conceive
23082  of situations such as finely tuned dropped capitals, word wrapping around
23083  non-rectangular graphics, etc.
23084  which will benefit from such handcrafting.
23085 \end_layout
23086
23087 \begin_layout Standard
23088 \begin_inset VSpace bigskip
23089 \end_inset
23090
23091
23092 \end_layout
23093
23094 \begin_layout Standard
23095 The syntax is 
23096 \family typewriter
23097
23098 \backslash
23099 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23100  #nindent #nlength
23101 \family default
23102 , where 
23103 \family typewriter
23104 numlines
23105 \family default
23106  is the number of lines of text which define the paragraph.
23107  If there turn out to be fewer lines, the shape is truncated; if there are
23108  more, the excess lines have the same dimensions as the last line of the
23109  definition.
23110  The 
23111 \family typewriter
23112 #nindent
23113 \family default
23114  and 
23115 \family typewriter
23116 #nlength
23117 \family default
23118  entries specify the indentation of the line from the left margin, and the
23119  length of the line as measured from that point.
23120  The shape applies only to the current paragraph; everything is reset to
23121  normal for the next paragraph.
23122 \end_layout
23123
23124 \begin_layout Standard
23125 \begin_inset ERT
23126 status collapsed
23127
23128 \begin_layout Plain Layout
23129
23130
23131 \backslash
23132 end{sloppypar}
23133 \end_layout
23134
23135 \end_inset
23136
23137
23138 \end_layout
23139
23140 \end_body
23141 \end_document