]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
Fix # 8414: Use the noweb module instead of literate-* article layouts
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 447
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 \usepackage{enumitem}
42 \end_preamble
43 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
44 \use_default_options false
45 \begin_modules
46 logicalmkup
47 theorems-ams
48 theorems-ams-extended
49 multicol
50 \end_modules
51 \maintain_unincluded_children false
52 \begin_local_layout
53 Format 7
54 InsetLayout CharStyle:MenuItem
55 LyxType               charstyle
56 LabelString           menu
57 LatexType             command
58 LatexName             menuitem
59 Font
60 Family              Sans
61 EndFont
62 Preamble
63 \newcommand*{\menuitem}[1]{{\sffamily #1}}
64 EndPreamble
65 End
66 \end_local_layout
67 \language english
68 \language_package default
69 \inputencoding auto
70 \fontencoding global
71 \font_roman default
72 \font_sans default
73 \font_typewriter default
74 \font_math auto
75 \font_default_family default
76 \use_non_tex_fonts false
77 \font_sc false
78 \font_osf false
79 \font_sf_scale 100
80 \font_tt_scale 100
81 \graphics default
82 \default_output_format default
83 \output_sync 0
84 \bibtex_command default
85 \index_command default
86 \paperfontsize 12
87 \spacing single
88 \use_hyperref true
89 \pdf_title "LyX's Additional Features manual"
90 \pdf_author "LyX Team"
91 \pdf_subject "LyX's additional features documentation"
92 \pdf_keywords "LyX, Documentation, Additional"
93 \pdf_bookmarks true
94 \pdf_bookmarksnumbered true
95 \pdf_bookmarksopen false
96 \pdf_bookmarksopenlevel 1
97 \pdf_breaklinks false
98 \pdf_pdfborder false
99 \pdf_colorlinks true
100 \pdf_backref false
101 \pdf_pdfusetitle false
102 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
103 \papersize default
104 \use_geometry false
105 \use_package amsmath 1
106 \use_package amssymb 1
107 \use_package esint 0
108 \use_package mathdots 1
109 \use_package mathtools 0
110 \use_package mhchem 1
111 \use_package undertilde 0
112 \cite_engine basic
113 \cite_engine_type numerical
114 \biblio_style plain
115 \use_bibtopic false
116 \use_indices false
117 \paperorientation portrait
118 \suppress_date false
119 \justification true
120 \use_refstyle 0
121 \notefontcolor #0000ff
122 \index Index
123 \shortcut idx
124 \color #008000
125 \end_index
126 \secnumdepth 3
127 \tocdepth 3
128 \paragraph_separation indent
129 \paragraph_indentation default
130 \quotes_language english
131 \papercolumns 1
132 \papersides 2
133 \paperpagestyle headings
134 \tracking_changes true
135 \output_changes false
136 \html_math_output 0
137 \html_css_as_file 0
138 \html_be_strict true
139 \author 819523532 "Kayvan Sylvan" 
140 \end_header
141
142 \begin_body
143
144 \begin_layout Title
145 Additional LyX Features
146 \end_layout
147
148 \begin_layout Subtitle
149 Version 2.0.x
150 \end_layout
151
152 \begin_layout Author
153 by the LyX Team
154 \begin_inset Foot
155 status collapsed
156
157 \begin_layout Plain Layout
158 \noindent
159 Principal maintainer of this file is
160 \noun on
161  Richard Heck
162 \noun default
163 .
164  If you have comments or error corrections, please send them to the LyX
165  Documentation mailing list, 
166 \begin_inset Flex Code
167 status collapsed
168
169 \begin_layout Plain Layout
170 \noindent
171 <lyx-docs@lists.lyx.org>
172 \end_layout
173
174 \end_inset
175
176 .
177 \end_layout
178
179 \end_inset
180
181
182 \end_layout
183
184 \begin_layout Standard
185 \begin_inset CommandInset toc
186 LatexCommand tableofcontents
187
188 \end_inset
189
190
191 \end_layout
192
193 \begin_layout Chapter
194 Introduction
195 \end_layout
196
197 \begin_layout Standard
198 This manual is essentially Part II of the 
199 \emph on
200 User's Guide\SpecialChar \@.
201
202 \emph default
203  The reason for separating the two documents is simple: the 
204 \emph on
205 User's Guide
206 \emph default
207  is already quite lengthy, and it contains information on all of the basic
208  features one needs to know in order to prepare most documents.
209  However, the LyX Team has worked to make LyX extensible through various
210  configuration files and external packages.
211  That means that if you want to support the Fizzwizzle LaTeX package, you
212  can create a layout file (or module) for it without having to alter LyX
213  itself.
214  We've already had contributions of several new features this way, and some
215  of them are documented here.
216  There are also some more `advanced' features, such as how to control the
217  presentation of bibliographies and how to work with multi-part documents,
218  that are not covered in the 
219 \emph on
220 User's Guide
221 \emph default
222  and are discussed here.
223 \end_layout
224
225 \begin_layout Standard
226 This manual also documents some special features, like fax support, version
227  control, and SGML support, which require additional software to work properly.
228  There is also a chapter on LyX's support for HTML.
229  And lastly, there's a chapter of LaTeX tools and tips, things you can use
230  to spruce up your documents by directly using the powerful features of
231  LaTeX.
232  After all, LyX 
233 \emph on
234 is
235 \emph default
236  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
237 \end_layout
238
239 \begin_layout Standard
240 If you haven't read the 
241 \emph on
242 Introduction
243 \emph default
244  yet, you are definitely in the wrong manual.
245  The 
246 \emph on
247 Introduction
248 \emph default
249  is the first place to go, since it describes the notation and format of
250  all of the manuals.
251  You should also be thoroughly familiar with the 
252 \emph on
253 User's Guide
254 \emph default
255  and all of the basic features of LyX before attempting to read this one.
256 \end_layout
257
258 \begin_layout Standard
259 Since many of the topics in this manual depend heavily on LyX's interaction
260  with LaTeX, this first chapter covers the inner workings of LyX and how
261  to direct LyX to generate exactly the LaTeX code you want.
262  It is obviously for more seasoned LyX users.
263 \end_layout
264
265 \begin_layout Chapter
266 LyX and LaTeX
267 \end_layout
268
269 \begin_layout Section
270 How LyX Uses LaTeX
271 \end_layout
272
273 \begin_layout Standard
274 This chapter is for both TeX-nicians and the LaTeX-curious.
275  In it, we'll explain how LyX and LaTeX work together to produce printable
276  output.
277  This is the only place in any of the manuals where we assume you know something
278  about LaTeX.
279 \end_layout
280
281 \begin_layout Standard
282 At one time, LyX was called a 
283 \begin_inset Quotes eld
284 \end_inset
285
286 WYSIWYM frontend to LaTeX,
287 \begin_inset Quotes erd
288 \end_inset
289
290  but that's no longer true.
291  There are frontends to LaTeX out there.
292 \begin_inset Foot
293 status collapsed
294
295 \begin_layout Plain Layout
296 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
297  There are also the LaTeX modes for vi and emacs, of course.
298 \end_layout
299
300 \end_inset
301
302  These are basically text editors with the ability to run LaTeX and mark
303  any errors in the file you're editing.
304  Although LyX 
305 \emph on
306 is
307 \emph default
308  an editor, and it 
309 \emph on
310 does
311 \emph default
312  run LaTeX, and it also indicates errors in the file, it also does much,
313  much more.
314  For one thing, you don't need to know LaTeX to use LyX effectively.
315  And LyX has added its own extensions to LaTeX.
316  Try the following sometime: select 
317 \begin_inset Flex MenuItem
318 status collapsed
319
320 \begin_layout Plain Layout
321 Export\SpecialChar \menuseparator
322 LaTeX
323 \end_layout
324
325 \end_inset
326
327  from the 
328 \begin_inset Flex MenuItem
329 status collapsed
330
331 \begin_layout Plain Layout
332 File
333 \end_layout
334
335 \end_inset
336
337  menu (or 
338 \begin_inset Flex MenuItem
339 status collapsed
340
341 \begin_layout Plain Layout
342 View\SpecialChar \menuseparator
343 Source
344 \end_layout
345
346 \end_inset
347
348 ), then look at the preamble of the resulting 
349 \begin_inset Flex Code
350 status collapsed
351
352 \begin_layout Plain Layout
353 .tex
354 \end_layout
355
356 \end_inset
357
358  file.
359  You'll notice a variety of new macros defined specifically by LyX.
360  These macros are defined automatically, according to the features you use
361  in the document.
362 \end_layout
363
364 \begin_layout Standard
365 There are several commands that automatically invoke LaTeX.
366  They are:
367 \end_layout
368
369 \begin_layout Itemize
370 \begin_inset Flex MenuItem
371 status collapsed
372
373 \begin_layout Plain Layout
374 View\SpecialChar \menuseparator
375 View
376 \end_layout
377
378 \end_inset
379
380
381 \end_layout
382
383 \begin_layout Itemize
384 \begin_inset Flex MenuItem
385 status collapsed
386
387 \begin_layout Plain Layout
388 View\SpecialChar \menuseparator
389 Update
390 \end_layout
391
392 \end_inset
393
394
395 \end_layout
396
397 \begin_layout Itemize
398 \begin_inset Flex MenuItem
399 status collapsed
400
401 \begin_layout Plain Layout
402 File\SpecialChar \menuseparator
403 Print
404 \end_layout
405
406 \end_inset
407
408
409 \end_layout
410
411 \begin_layout Itemize
412 \begin_inset Flex MenuItem
413 status collapsed
414
415 \begin_layout Plain Layout
416 File\SpecialChar \menuseparator
417 Fax
418 \end_layout
419
420 \end_inset
421
422
423 \end_layout
424
425 \begin_layout Standard
426 They will only invoke LaTeX if the file has changed since the last time
427  LaTeX was run.
428  
429 \end_layout
430
431 \begin_layout Standard
432 When LyX runs LaTeX on the file you're editing, it performs these steps:
433 \end_layout
434
435 \begin_layout Enumerate
436 Convert the document to LaTeX and save to a file with the extension 
437 \begin_inset Flex Code
438 status collapsed
439
440 \begin_layout Plain Layout
441 .tex
442 \end_layout
443
444 \end_inset
445
446  in place of 
447 \begin_inset Flex Code
448 status collapsed
449
450 \begin_layout Plain Layout
451 .lyx
452 \end_layout
453
454 \end_inset
455
456 .
457 \end_layout
458
459 \begin_layout Enumerate
460 Run LaTeX on the 
461 \begin_inset Flex Code
462 status collapsed
463
464 \begin_layout Plain Layout
465 .tex
466 \end_layout
467
468 \end_inset
469
470  file (maybe several times), and run any other commands (such as 
471 \begin_inset Flex Code
472 status collapsed
473
474 \begin_layout Plain Layout
475 bibtex
476 \end_layout
477
478 \end_inset
479
480  or 
481 \begin_inset Flex Code
482 status collapsed
483
484 \begin_layout Plain Layout
485 makeindex
486 \end_layout
487
488 \end_inset
489
490 ) needed to compile the LaTeX file.
491 \end_layout
492
493 \begin_layout Enumerate
494 If there are any errors, show the error log.
495 \end_layout
496
497 \begin_layout Standard
498 If you have run LaTeX using 
499 \begin_inset Flex MenuItem
500 status collapsed
501
502 \begin_layout Plain Layout
503 View
504 \bar under
505 \SpecialChar \menuseparator
506
507 \bar default
508 DVI
509 \end_layout
510
511 \end_inset
512
513 , LyX then runs a DVI viewer to display the DVI-file.
514  If you have used 
515 \begin_inset Flex MenuItem
516 status collapsed
517
518 \begin_layout Plain Layout
519 View
520 \bar under
521 \SpecialChar \menuseparator
522
523 \bar default
524 PostScript
525 \end_layout
526
527 \end_inset
528
529 , LyX performs further steps:
530 \end_layout
531
532 \begin_layout Itemize
533 Run 
534 \begin_inset Flex Code
535 status collapsed
536
537 \begin_layout Plain Layout
538 dvips
539 \end_layout
540
541 \end_inset
542
543  to convert the DVI file to PostScript.
544 \end_layout
545
546 \begin_layout Itemize
547 Run a PostScript viewer, such as 
548 \begin_inset Flex Code
549 status collapsed
550
551 \begin_layout Plain Layout
552 ghostview
553 \end_layout
554
555 \end_inset
556
557 , to display the PostScript file.
558 \end_layout
559
560 \begin_layout Standard
561 LyX does similar things when viewing, or exporting, other formats.
562 \end_layout
563
564 \begin_layout Section
565 Translating LaTeX files into LyX
566 \end_layout
567
568 \begin_layout Standard
569 You can import a LaTeX file into LyX by using the 
570 \begin_inset Flex MenuItem
571 status collapsed
572
573 \begin_layout Plain Layout
574 File\SpecialChar \menuseparator
575 Import\SpecialChar \menuseparator
576 LaTeX
577 \end_layout
578
579 \end_inset
580
581  command in LyX.
582  This will call a program named 
583 \begin_inset Flex Code
584 status collapsed
585
586 \begin_layout Plain Layout
587 tex2lyx
588 \end_layout
589
590 \end_inset
591
592  which will create a file 
593 \begin_inset Flex Code
594 status collapsed
595
596 \begin_layout Plain Layout
597 foo.lyx
598 \end_layout
599
600 \end_inset
601
602  from the file 
603 \begin_inset Flex Code
604 status collapsed
605
606 \begin_layout Plain Layout
607 foo.tex
608 \end_layout
609
610 \end_inset
611
612 .
613  LyX will then open that file.
614 \begin_inset Foot
615 status collapsed
616
617 \begin_layout Plain Layout
618 \begin_inset Flex Code
619 status collapsed
620
621 \begin_layout Plain Layout
622 tex2lyx
623 \end_layout
624
625 \end_inset
626
627  can also be run from the command line, of course.
628 \end_layout
629
630 \end_inset
631
632
633 \end_layout
634
635 \begin_layout Standard
636 \begin_inset Flex Code
637 status collapsed
638
639 \begin_layout Plain Layout
640 tex2lyx
641 \end_layout
642
643 \end_inset
644
645  will translate most legal LaTeX, but not everything.
646  It will put things it doesn't understand into TeX code, so after translating
647  a file with 
648 \begin_inset Flex Code
649 status collapsed
650
651 \begin_layout Plain Layout
652 tex2lyx
653 \end_layout
654
655 \end_inset
656
657 , you can look for TeX code and hand-edit it until it looks right.
658 \end_layout
659
660 \begin_layout Standard
661 If you don't know what TeX code is, read the next section.
662 \end_layout
663
664 \begin_layout Section
665 \begin_inset CommandInset label
666 LatexCommand label
667 name "sec:Inserting-TeX-Code"
668
669 \end_inset
670
671 Inserting TeX Code into LyX Documents 
672 \end_layout
673
674 \begin_layout Standard
675 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
676  You can always insert TeX code into any LyX document.
677  LyX cannot, and will never be able to, display every possible LaTeX construct.
678  If ever you need to insert LaTeX commands into your LyX document, you can
679  use the 
680 \begin_inset Flex Code
681 status collapsed
682
683 \begin_layout Plain Layout
684 TeX Code
685 \end_layout
686
687 \end_inset
688
689  box, which you can insert into your document with 
690 \begin_inset Flex MenuItem
691 status collapsed
692
693 \begin_layout Plain Layout
694 Insert\SpecialChar \menuseparator
695 TeX Code
696 \end_layout
697
698 \end_inset
699
700  or the keyboard shortcut 
701 \begin_inset Info
702 type  "shortcut"
703 arg   "ert-insert"
704 \end_inset
705
706 .
707 \end_layout
708
709 \begin_layout Standard
710 Here's an example of inserting LaTeX commands in a LyX document.
711  The code looks like this:
712 \end_layout
713
714 \begin_layout LyX-Code
715
716 \backslash
717 begin{tabular}{ll}
718 \begin_inset Newline newline
719 \end_inset
720
721
722 \backslash
723 begin{minipage}{5cm}
724 \begin_inset Newline newline
725 \end_inset
726
727 This is an example of a minipage environment.
728  You 
729 \begin_inset Newline newline
730 \end_inset
731
732 can put nearly everything in it, even (non-floating) 
733 \begin_inset Newline newline
734 \end_inset
735
736 figures and tables.
737  
738 \begin_inset Newline newline
739 \end_inset
740
741
742 \backslash
743 end{minipage}
744 \begin_inset Newline newline
745 \end_inset
746
747 &
748 \begin_inset Newline newline
749 \end_inset
750
751
752 \backslash
753 begin{minipage}{5cm}
754 \begin_inset Newline newline
755 \end_inset
756
757
758 \backslash
759 begin{verbatim}
760 \begin_inset Newline newline
761 \end_inset
762
763
764 \backslash
765 begin{minipage}{5cm}
766 \begin_inset Newline newline
767 \end_inset
768
769 This ...
770  
771 \begin_inset Newline newline
772 \end_inset
773
774
775 \backslash
776 end{minipage}
777 \begin_inset Newline newline
778 \end_inset
779
780
781 \backslash
782 end{verbatim}
783 \begin_inset Newline newline
784 \end_inset
785
786
787 \backslash
788 end{minipage}
789 \begin_inset Newline newline
790 \end_inset
791
792
793 \backslash
794 end{tabular}
795 \end_layout
796
797 \begin_layout LyX-Code
798
799 \end_layout
800
801 \begin_layout Standard
802 The 
803 \begin_inset Flex Code
804 status collapsed
805
806 \begin_layout Plain Layout
807 TeX Code
808 \end_layout
809
810 \end_inset
811
812  box containing this text is directly after this paragraph.
813  Those of you reading the manual in LyX will only see the TeX code inset.
814  Those reading a printed version of the manuals will see the actual results:
815 \begin_inset VSpace bigskip
816 \end_inset
817
818
819 \end_layout
820
821 \begin_layout Standard
822 \begin_inset ERT
823 status open
824
825 \begin_layout Plain Layout
826
827
828 \backslash
829 begin{tabular}{ll}
830 \end_layout
831
832 \begin_layout Plain Layout
833
834
835 \backslash
836 begin{minipage}{5cm}
837 \end_layout
838
839 \begin_layout Plain Layout
840
841 This is an example of a minipage environment.
842  You can put nearly everything in it, even (non-floating) figures and tables.
843  
844 \end_layout
845
846 \begin_layout Plain Layout
847
848
849 \backslash
850 end{minipage}
851 \end_layout
852
853 \begin_layout Plain Layout
854
855 &
856 \end_layout
857
858 \begin_layout Plain Layout
859
860
861 \backslash
862 begin{minipage}{5cm}
863 \end_layout
864
865 \begin_layout Plain Layout
866
867
868 \backslash
869 begin{verbatim}
870 \end_layout
871
872 \begin_layout Plain Layout
873
874
875 \backslash
876 begin{minipage}{5cm}
877 \end_layout
878
879 \begin_layout Plain Layout
880
881 This ...
882  
883 \end_layout
884
885 \begin_layout Plain Layout
886
887
888 \backslash
889 end{minipage}
890 \end_layout
891
892 \begin_layout Plain Layout
893
894
895 \backslash
896 end{verbatim}
897 \end_layout
898
899 \begin_layout Plain Layout
900
901
902 \backslash
903 end{minipage}
904 \end_layout
905
906 \begin_layout Plain Layout
907
908
909 \backslash
910 end{tabular}
911 \end_layout
912
913 \end_inset
914
915
916 \begin_inset VSpace bigskip
917 \end_inset
918
919
920 \end_layout
921
922 \begin_layout Standard
923 In addition to using TeX code, you can also create a separate file containing
924  some complex LaTeX structure and then use 
925 \begin_inset Flex MenuItem
926 status collapsed
927
928 \begin_layout Plain Layout
929 Insert\SpecialChar \menuseparator
930 Child
931 \begin_inset space ~
932 \end_inset
933
934 Document
935 \end_layout
936
937 \end_inset
938
939  to include your file (you should select the type 
940 \begin_inset Flex Code
941 status collapsed
942
943 \begin_layout Plain Layout
944 Input
945 \end_layout
946
947 \end_inset
948
949 ).
950  We recommend that you only do this if you have a 
951 \begin_inset Flex Code
952 status collapsed
953
954 \begin_layout Plain Layout
955 .tex
956 \end_layout
957
958 \end_inset
959
960  file which you 
961 \emph on
962 know
963 \emph default
964  works already.
965  Otherwise, you'll have a big job tracking down LaTeX errors.
966 \end_layout
967
968 \begin_layout Standard
969 There are a few last points to emphasize:
970 \end_layout
971
972 \begin_layout Itemize
973 LyX 
974 \emph on
975 does not
976 \emph default
977  check if your LaTeX code is correct.
978 \end_layout
979
980 \begin_layout Itemize
981 Beware of reinventing the wheel.
982 \end_layout
983
984 \begin_layout Standard
985 On that last point, LyX does have quite a few features tucked into it, and
986  more are coming.
987  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
988  feature before you decide you have to do it by hand.
989  Moreover, there are numerous LaTeX packages out there to do all sorts of
990  things, from labels to envelopes to fancy multipage tables.
991  Check out 
992 \begin_inset CommandInset href
993 LatexCommand href
994 name "CTAN"
995 target "http://www.ctan.org/"
996
997 \end_inset
998
999  for details.
1000 \end_layout
1001
1002 \begin_layout Standard
1003 If you do need to do some wild and fancy things within your document, be
1004  sure to check out a good LaTeX book for assistance.
1005  There are a number of them listed in the bibliography of the 
1006 \emph on
1007 User's Guide
1008 \emph default
1009 .
1010 \end_layout
1011
1012 \begin_layout Section
1013 LyX and the LaTeX Preamble
1014 \end_layout
1015
1016 \begin_layout Subsection
1017 About the LaTeX Preamble
1018 \end_layout
1019
1020 \begin_layout Standard
1021 If you already know LaTeX, there is no need to explain here what the preamble
1022  is good for.
1023  If you don't, the following will give you some ideas—we recommend again
1024  that you consult a LaTeX book for further information.
1025  In any case, you should read the points below, because they explain what
1026  you can do and what you don't need to do in the LaTeX preamble of a LyX
1027  document.
1028 \end_layout
1029
1030 \begin_layout Standard
1031 The LaTeX preamble comes at the very beginning of a document, 
1032 \emph on
1033 before
1034 \emph default
1035  the text.
1036  It serves to:
1037 \end_layout
1038
1039 \begin_layout Itemize
1040 Declare the document class.
1041  
1042 \begin_inset Newline newline
1043 \end_inset
1044
1045 LyX already does this for you.
1046  If you're a seasoned LaTeX-nician, and you have a custom document class
1047  you want to use, check out the 
1048 \emph on
1049 Customization Manual
1050 \emph default
1051  for information on how to make LyX interface to it.
1052 \end_layout
1053
1054 \begin_layout Itemize
1055 Declare the usage of packages.
1056  
1057 \begin_inset Newline newline
1058 \end_inset
1059
1060 LaTeX packages provide special commands, which are only available within
1061  a document when the package has been declared in the preamble.
1062  In addition to providing special commands, the inclusion of a package can
1063  change the document.
1064  For example, the package 
1065 \begin_inset Flex Code
1066 status collapsed
1067
1068 \begin_layout Plain Layout
1069 indentfirst
1070 \end_layout
1071
1072 \end_inset
1073
1074  forces all paragraphs to be indented.
1075  There are other packages for labels, envelopes, margins, etc.
1076  
1077 \end_layout
1078
1079 \begin_layout Itemize
1080 Set counters, variables, lengths and widths.
1081  
1082 \begin_inset Newline newline
1083 \end_inset
1084
1085 There are several LaTeX counters and variables that 
1086 \emph on
1087 must
1088 \emph default
1089  be set globally from within the preamble in order to have the desired effect.
1090  (There are variables that you can set and reset inside the document, too.)
1091  Margins are a good example of something that must be set in the preamble.
1092  Another example is the label format for lists.
1093  You can actually set these just about anywhere, but it's best to do it
1094  just once, inside the preamble.
1095 \end_layout
1096
1097 \begin_layout Itemize
1098 Declare user defined commands (with 
1099 \begin_inset Flex Code
1100 status collapsed
1101
1102 \begin_layout Plain Layout
1103
1104 \backslash
1105 newcommand
1106 \end_layout
1107
1108 \end_inset
1109
1110  or 
1111 \begin_inset Flex Code
1112 status collapsed
1113
1114 \begin_layout Plain Layout
1115
1116 \backslash
1117 renewcommand
1118 \end_layout
1119
1120 \end_inset
1121
1122 ).
1123 \begin_inset Newline newline
1124 \end_inset
1125
1126 These are abbreviations for LaTeX commands which appear very often inside
1127  a document.
1128  Although the preamble is a good place to declare such commands, they 
1129 \emph on
1130 can
1131 \emph default
1132  be declared anywhere (before they are used for the first time, of course).
1133  This can be useful if there is a lot of raw LaTeX code in your document,
1134  which normally should not be the case.
1135 \end_layout
1136
1137 \begin_layout Standard
1138 LyX adds its own set of definitions to the preamble of the 
1139 \begin_inset Flex Code
1140 status collapsed
1141
1142 \begin_layout Plain Layout
1143 .tex
1144 \end_layout
1145
1146 \end_inset
1147
1148  file it produces.
1149  This makes LaTeX files generated by LyX portable.
1150 \end_layout
1151
1152 \begin_layout Subsection
1153 Changing the Preamble
1154 \end_layout
1155
1156 \begin_layout Standard
1157 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1158  can't change them without patching LyX itself.
1159  You can, however, add your own stuff to the preamble by selecting 
1160 \begin_inset Flex MenuItem
1161 status collapsed
1162
1163 \begin_layout Plain Layout
1164 LaTeX
1165 \begin_inset space ~
1166 \end_inset
1167
1168 Preamble
1169 \end_layout
1170
1171 \end_inset
1172
1173  in the 
1174 \begin_inset Flex MenuItem
1175 status collapsed
1176
1177 \begin_layout Plain Layout
1178 Document\SpecialChar \menuseparator
1179 Settings
1180 \end_layout
1181
1182 \end_inset
1183
1184  dialog.
1185  LyX adds anything in the 
1186 \begin_inset Flex MenuItem
1187 status collapsed
1188
1189 \begin_layout Plain Layout
1190 Preamble
1191 \end_layout
1192
1193 \end_inset
1194
1195  dialog to its own built-in preamble.
1196  Before adding your own declarations in the preamble, you should make sure
1197  that LyX doesn't already support what you want to do.
1198  (Remember what we said about reinventing the wheel?) Also, 
1199 \emph on
1200 make sure your preamble code is correct
1201 \emph default
1202 .
1203  LyX doesn't check it for you.
1204  If there is an error, you're likely to get an error like 
1205 \begin_inset Quotes eld
1206 \end_inset
1207
1208
1209 \begin_inset Flex Code
1210 status collapsed
1211
1212 \begin_layout Plain Layout
1213 Missing 
1214 \backslash
1215 begin{document}
1216 \end_layout
1217
1218 \end_inset
1219
1220
1221 \begin_inset Quotes erd
1222 \end_inset
1223
1224 .
1225  If you see this error, check your preamble.
1226 \end_layout
1227
1228 \begin_layout Subsection
1229 Examples
1230 \end_layout
1231
1232 \begin_layout Standard
1233 Here are some examples of what you can add to a preamble, and what they
1234  do.
1235 \end_layout
1236
1237 \begin_layout Subsubsection
1238 Example #1: Offsets
1239 \end_layout
1240
1241 \begin_layout Standard
1242 There are two variables under LaTeX that control page position: 
1243 \begin_inset Flex Code
1244 status collapsed
1245
1246 \begin_layout Plain Layout
1247
1248 \backslash
1249 hoffset
1250 \end_layout
1251
1252 \end_inset
1253
1254  and 
1255 \begin_inset Flex Code
1256 status collapsed
1257
1258 \begin_layout Plain Layout
1259
1260 \backslash
1261 voffset
1262 \end_layout
1263
1264 \end_inset
1265
1266 .
1267  Their names should be self-explanatory.
1268  These variables are useful if you think for a moment about computer labels.
1269  Sometimes, the size of a print medium and the area of the medium that you
1270  can actually print on aren't the same.
1271  This is where 
1272 \begin_inset Flex Code
1273 status collapsed
1274
1275 \begin_layout Plain Layout
1276
1277 \backslash
1278 hoffset
1279 \end_layout
1280
1281 \end_inset
1282
1283  and 
1284 \begin_inset Flex Code
1285 status collapsed
1286
1287 \begin_layout Plain Layout
1288
1289 \backslash
1290 voffset
1291 \end_layout
1292
1293 \end_inset
1294
1295  come in.
1296 \end_layout
1297
1298 \begin_layout Standard
1299 The default values for 
1300 \begin_inset Flex Code
1301 status collapsed
1302
1303 \begin_layout Plain Layout
1304
1305 \backslash
1306 hoffset
1307 \end_layout
1308
1309 \end_inset
1310
1311  and 
1312 \begin_inset Flex Code
1313 status collapsed
1314
1315 \begin_layout Plain Layout
1316
1317 \backslash
1318 voffset
1319 \end_layout
1320
1321 \end_inset
1322
1323  are both 0
1324 \begin_inset space \thinspace{}
1325 \end_inset
1326
1327 points, i.
1328 \begin_inset space \thinspace{}
1329 \end_inset
1330
1331 e.
1332 \begin_inset space \space{}
1333 \end_inset
1334
1335 the page isn't shifted.
1336  Unfortunately, some DVI drivers always seem to shift the page.
1337  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1338  If you're using LyX on a system that you don't personally maintain, and
1339  your sysadmin is a doofus, 
1340 \begin_inset Flex Code
1341 status collapsed
1342
1343 \begin_layout Plain Layout
1344
1345 \backslash
1346 hoffset
1347 \end_layout
1348
1349 \end_inset
1350
1351  and 
1352 \begin_inset Flex Code
1353 status collapsed
1354
1355 \begin_layout Plain Layout
1356
1357 \backslash
1358 voffset
1359 \end_layout
1360
1361 \end_inset
1362
1363  can save the day.
1364  Suppose your left and top margins are always 0.5
1365 \begin_inset space \thinspace{}
1366 \end_inset
1367
1368 inches too big.
1369  You can add this to the preamble:
1370 \end_layout
1371
1372 \begin_layout LyX-Code
1373
1374 \backslash
1375 setlength{
1376 \backslash
1377 hoffset}{-0.5 in}
1378 \end_layout
1379
1380 \begin_layout LyX-Code
1381
1382 \backslash
1383 setlength{
1384 \backslash
1385 voffset}{-0.5 in}
1386 \end_layout
1387
1388 \begin_layout Standard
1389 and your margins should now be correct.
1390 \end_layout
1391
1392 \begin_layout Subsubsection
1393 Example #2: Labels
1394 \end_layout
1395
1396 \begin_layout Standard
1397 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1398  There's a rather nice package, available at your nearest CTAN archive,
1399  for printing sheets of labels: 
1400 \begin_inset Flex Code
1401 status collapsed
1402
1403 \begin_layout Plain Layout
1404 labels.sty
1405 \end_layout
1406
1407 \end_inset
1408
1409 .
1410  Now, your system may not have this package installed by default.
1411  We leave that up to you to check.
1412  You'll also want to read the documentation for it; we're not going to do
1413  that for you.
1414  Since this is an example, however, we'll give you an example of how you
1415  use this package.
1416 \end_layout
1417
1418 \begin_layout Standard
1419 First, make sure you're using the 
1420 \begin_inset Flex Code
1421 status collapsed
1422
1423 \begin_layout Plain Layout
1424 article
1425 \end_layout
1426
1427 \end_inset
1428
1429  document class.
1430  Next, you need to put the following in your preamble:
1431 \end_layout
1432
1433 \begin_layout LyX-Code
1434
1435 \backslash
1436 usepackage{labels}
1437 \end_layout
1438
1439 \begin_layout LyX-Code
1440
1441 \backslash
1442 LabelCols=3
1443 \end_layout
1444
1445 \begin_layout LyX-Code
1446
1447 \backslash
1448 LabelRows=7
1449 \end_layout
1450
1451 \begin_layout LyX-Code
1452
1453 \backslash
1454 LeftBorder=8mm
1455 \end_layout
1456
1457 \begin_layout LyX-Code
1458
1459 \backslash
1460 RightBorder=8mm
1461 \end_layout
1462
1463 \begin_layout LyX-Code
1464
1465 \backslash
1466 TopBorder=9mm
1467 \end_layout
1468
1469 \begin_layout LyX-Code
1470
1471 \backslash
1472 BottomBorder=2mm
1473 \end_layout
1474
1475 \begin_layout Standard
1476 This sets things up for Avery label sheets, stock #5360.
1477  You're now ready to print labels, but you'll need to insert LaTeX code,
1478  placing the commands 
1479 \begin_inset Flex Code
1480 status collapsed
1481
1482 \begin_layout Plain Layout
1483
1484 \backslash
1485 begin{labels}
1486 \end_layout
1487
1488 \end_inset
1489
1490  and 
1491 \begin_inset Flex Code
1492 status collapsed
1493
1494 \begin_layout Plain Layout
1495
1496 \backslash
1497 end{labels}
1498 \end_layout
1499
1500 \end_inset
1501
1502  around each label text.
1503  This and other special features of 
1504 \begin_inset Flex Code
1505 status collapsed
1506
1507 \begin_layout Plain Layout
1508 labels.sty
1509 \end_layout
1510
1511 \end_inset
1512
1513  are explained in its documentation.
1514 \end_layout
1515
1516 \begin_layout Standard
1517 Someday, someone may write a LyX layout file to support this package directly.
1518  Maybe that someone is you.
1519 \end_layout
1520
1521 \begin_layout Subsubsection
1522 Example #3: Paragraph Indentation
1523 \end_layout
1524
1525 \begin_layout Standard
1526 Americans are trained to indent the first line of 
1527 \emph on
1528 every
1529 \emph default
1530  paragraph.
1531  As with all of their other weird quirks, most Americans will whine and
1532  moan until they can have their way and indent the first line of all paragraphs.
1533  (Yes, we're joking.
1534  (We are?) 
1535 \emph on
1536 Yeah
1537 \emph default
1538 , we are.)
1539 \end_layout
1540
1541 \begin_layout Standard
1542 Of course, this behavior isn't standard typography.
1543  In books, you typically only indent the first line of a paragraph 
1544 \emph on
1545 if
1546 \emph default
1547  it follows another one.
1548  The idea behind indenting the first line of a paragraph is to distinguish
1549  neighboring paragraphs from one another.
1550  If there is no previous paragraph—for example, if it follows a figure or
1551  is the first paragraph in a section—then there is no need for indentation.
1552  
1553 \end_layout
1554
1555 \begin_layout Standard
1556 If you're a typical American (we're still joking!), though, you don't care
1557  about such esoteric things; you want your indentation! Add this to the
1558  preamble:
1559 \end_layout
1560
1561 \begin_layout LyX-Code
1562
1563 \backslash
1564 usepackage{indentfirst}
1565 \end_layout
1566
1567 \begin_layout Standard
1568 If your TeX distribution isn't braindead, you'll have this package, and
1569  all of your paragraphs will get the indentation the Founding Fathers intended
1570  they should have.
1571 \end_layout
1572
1573 \begin_layout Subsubsection
1574 Example #4: This Document
1575 \end_layout
1576
1577 \begin_layout Standard
1578 You can also check out the preamble of this document to get an idea of some
1579  of the advanced things you can do.
1580 \end_layout
1581
1582 \begin_layout Section
1583 LyX and LaTeX Errors
1584 \end_layout
1585
1586 \begin_layout Standard
1587 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1588  going.
1589  It then uses the logfile from the LaTeX run to do a post-mortem.
1590  After analyzing the logfile, LyX displays a dialog listing the errors.
1591  Clicking on any one of them will take you to the position in your LyX file
1592  where the error occurred.
1593 \begin_inset Foot
1594 status collapsed
1595
1596 \begin_layout Plain Layout
1597 Well, usually.
1598  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1599  right line.
1600  There are also cases where LaTeX reports the error on one line, but the
1601  actual error is earlier.
1602  This is not unlike forgetting a closing brace in a program: You'll get
1603  an error, but only later.
1604 \end_layout
1605
1606 \end_inset
1607
1608
1609 \end_layout
1610
1611 \begin_layout Standard
1612 Some folks also like to look at the log file directly: It is available from
1613  
1614 \begin_inset Flex MenuItem
1615 status collapsed
1616
1617 \begin_layout Plain Layout
1618 Document
1619 \bar under
1620 \SpecialChar \menuseparator
1621
1622 \bar default
1623 Latex
1624 \begin_inset space ~
1625 \end_inset
1626
1627 Log
1628 \end_layout
1629
1630 \end_inset
1631
1632 .
1633  There are some fairly common error messages and warnings.
1634  We'll cover those here.
1635  You should look at a good LaTeX book for a complete listing.
1636 \end_layout
1637
1638 \begin_layout Itemize
1639 \begin_inset Flex Code
1640 status collapsed
1641
1642 \begin_layout Plain Layout
1643 LaTeX Warning
1644 \end_layout
1645
1646 \end_inset
1647
1648
1649 \begin_inset Newline newline
1650 \end_inset
1651
1652 Anything beginning with these words is a warning message for the purpose
1653  of 
1654 \begin_inset Quotes eld
1655 \end_inset
1656
1657 debugging
1658 \begin_inset Quotes erd
1659 \end_inset
1660
1661  the LaTeX code itself.
1662  You'll get messages like this if you added or changed cross-references
1663  or bibliography entries, in which case, LaTeX is trying to tell you that
1664  you need to make another run.
1665  You can by-and-large ignore these.
1666 \end_layout
1667
1668 \begin_layout Itemize
1669 \begin_inset Flex Code
1670 status collapsed
1671
1672 \begin_layout Plain Layout
1673 LaTeX Font Warning
1674 \end_layout
1675
1676 \end_inset
1677
1678
1679 \begin_inset Newline newline
1680 \end_inset
1681
1682 Another warning message, this time about fonts which LaTeX couldn't find.
1683  The rest of the message will often say something about a replacement font
1684  that LaTeX used.
1685  You can safely ignore these, too.
1686 \end_layout
1687
1688 \begin_layout Itemize
1689 \begin_inset Flex Code
1690 status collapsed
1691
1692 \begin_layout Plain Layout
1693 Overfull 
1694 \backslash
1695 hbox
1696 \end_layout
1697
1698 \end_inset
1699
1700
1701 \begin_inset Newline newline
1702 \end_inset
1703
1704 LaTeX absolutely 
1705 \emph on
1706 loves
1707 \emph default
1708  to spew these out.
1709  They are warnings about lines that were too long and run past the right
1710  margin.
1711  Almost always, this is unnoticeable in the final output.
1712  (It can be just a point or two.) Or, only one or two characters extend past
1713  the margin.
1714  LaTeX seems to generate at least one of these messages for just about any
1715  document you write.
1716 \begin_inset Newline newline
1717 \end_inset
1718
1719 You can ignore these messages.
1720  Your eyes will tell you if there's a problem with something that's too
1721  wide; just look at the output.
1722 \begin_inset Foot
1723 status collapsed
1724
1725 \begin_layout Plain Layout
1726 You can also enable the `draft' option in 
1727 \begin_inset Flex MenuItem
1728 status collapsed
1729
1730 \begin_layout Plain Layout
1731 Document
1732 \bar under
1733 \SpecialChar \menuseparator
1734
1735 \bar default
1736 Settings
1737 \end_layout
1738
1739 \end_inset
1740
1741 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1742 \end_layout
1743
1744 \end_inset
1745
1746
1747 \end_layout
1748
1749 \begin_layout Itemize
1750 \begin_inset Flex Code
1751 status collapsed
1752
1753 \begin_layout Plain Layout
1754 Underfull 
1755 \backslash
1756 hbox
1757 \end_layout
1758
1759 \end_inset
1760
1761
1762 \begin_inset Newline newline
1763 \end_inset
1764
1765 Not quite as common as its cousin.
1766  LaTeX seems to like to print lines that are a bit too wide as opposed to
1767  ones that are a bit too narrow.
1768  We have no idea why.
1769 \end_layout
1770
1771 \begin_layout Itemize
1772 \begin_inset Flex Code
1773 status collapsed
1774
1775 \begin_layout Plain Layout
1776 Overfull 
1777 \backslash
1778 vbox
1779 \end_layout
1780
1781 \end_inset
1782
1783  and 
1784 \begin_inset Flex Code
1785 status collapsed
1786
1787 \begin_layout Plain Layout
1788 Underfull 
1789 \backslash
1790 vbox
1791 \end_layout
1792
1793 \end_inset
1794
1795
1796 \begin_inset Newline newline
1797 \end_inset
1798
1799 Warnings about troubles breaking the page.
1800  Once again, just look at the output.
1801  Your eyes will tell you where something has gone wrong.
1802 \end_layout
1803
1804 \begin_layout Itemize
1805 \begin_inset Flex Code
1806 status collapsed
1807
1808 \begin_layout Plain Layout
1809 LaTeX Error: File 
1810 \begin_inset Quotes els
1811 \end_inset
1812
1813 Xxxx
1814 \begin_inset Quotes ers
1815 \end_inset
1816
1817  not found
1818 \end_layout
1819
1820 \end_inset
1821
1822
1823 \begin_inset Newline newline
1824 \end_inset
1825
1826 The file 
1827 \begin_inset Quotes eld
1828 \end_inset
1829
1830 Xxxx
1831 \begin_inset Quotes erd
1832 \end_inset
1833
1834  isn't installed on this system.
1835  This usually appears because some package your document needs isn't installed.
1836  If you didn't touch the preamble or didn't use the 
1837 \begin_inset Flex Code
1838 status collapsed
1839
1840 \begin_layout Plain Layout
1841
1842 \backslash
1843 usepackage{}
1844 \end_layout
1845
1846 \end_inset
1847
1848  command, then one of the packages LyX tried to load is missing.
1849  Use 
1850 \begin_inset Flex MenuItem
1851 status collapsed
1852
1853 \begin_layout Plain Layout
1854 Help\SpecialChar \menuseparator
1855 LaTeX Configuration
1856 \end_layout
1857
1858 \end_inset
1859
1860  to get a list of packages that LyX knows about.
1861  This file is updated whenever you reconfigure LyX (using 
1862 \begin_inset Flex MenuItem
1863 status collapsed
1864
1865 \begin_layout Plain Layout
1866 Tools\SpecialChar \menuseparator
1867 Reconfigure
1868 \end_layout
1869
1870 \end_inset
1871
1872 ) and tells you which packages have been detected and what they do.
1873 \begin_inset Newline newline
1874 \end_inset
1875
1876 If you did use the 
1877 \begin_inset Flex Code
1878 status collapsed
1879
1880 \begin_layout Plain Layout
1881
1882 \backslash
1883 usepackage{}
1884 \end_layout
1885
1886 \end_inset
1887
1888  command and the package in question isn't installed, then you'll need to
1889  install it yourself.
1890 \end_layout
1891
1892 \begin_layout Itemize
1893 \begin_inset Flex Code
1894 status collapsed
1895
1896 \begin_layout Plain Layout
1897 LaTeX Error: Unknown option
1898 \end_layout
1899
1900 \end_inset
1901
1902
1903 \begin_inset Newline newline
1904 \end_inset
1905
1906 Error messages beginning with this are trying to tell you that you specified
1907  a bad or undefined option to a package.
1908  Check the package's documentation.
1909 \end_layout
1910
1911 \begin_layout Itemize
1912 \begin_inset Flex Code
1913 status collapsed
1914
1915 \begin_layout Plain Layout
1916 Undefined control sequence
1917 \end_layout
1918
1919 \end_inset
1920
1921
1922 \begin_inset Newline newline
1923 \end_inset
1924
1925 If you've inserted LaTeX code into your document, but made a typo, you'll
1926  get one of these.
1927  You may have forgotten to load a package.
1928  In any case, this error message usually means that you used an undefined
1929  command.
1930  
1931 \end_layout
1932
1933 \begin_layout Standard
1934 There are other error and warning messages.
1935  Some are self-explanatory.
1936  These are usually LaTeX messages.
1937  Others are downright cryptic.
1938  These are usually TeX error messages, and we really have 
1939 \emph on
1940 no clue
1941 \emph default
1942  what they mean or how to decipher them.
1943  No-one does.
1944 \end_layout
1945
1946 \begin_layout Standard
1947 There's a general sequence you should follow if you get error messages:
1948 \end_layout
1949
1950 \begin_layout Enumerate
1951 Look at the LaTeX code you inserted for typos.
1952 \end_layout
1953
1954 \begin_layout Enumerate
1955 If there are no typos, check that you used the command(s) correctly.
1956 \end_layout
1957
1958 \begin_layout Enumerate
1959 If you get a bunch of error boxes piled up at the very top of the document—and
1960  especially if you see a 
1961 \begin_inset Quotes eld
1962 \end_inset
1963
1964
1965 \begin_inset Flex Code
1966 status collapsed
1967
1968 \begin_layout Plain Layout
1969 Missing 
1970 \backslash
1971 begin{document}
1972 \end_layout
1973
1974 \end_inset
1975
1976
1977 \begin_inset Quotes erd
1978 \end_inset
1979
1980  error—it means that there are errors in the preamble.
1981  Start debugging your preamble.
1982 \end_layout
1983
1984 \begin_layout Enumerate
1985 If you didn't add anything to the preamble and didn't add any LaTeX code
1986  to the document, the first suspect is your LaTeX distribution itself.
1987  Check for missing packages and install them.
1988 \end_layout
1989
1990 \begin_layout Enumerate
1991 Okay, so there are no missing packages.
1992  Did you use any of the fine-tuning options in LyX? Specifically, did you
1993  
1994 \emph on
1995 misuse
1996 \emph default
1997  any of them, like trying to manually insert lots of 
1998 \begin_inset Flex Code
1999 status collapsed
2000
2001 \begin_layout Plain Layout
2002 Protected
2003 \begin_inset space ~
2004 \end_inset
2005
2006 Blanks
2007 \end_layout
2008
2009 \end_inset
2010
2011
2012 \begin_inset Flex Code
2013 status collapsed
2014
2015 \begin_layout Plain Layout
2016 Linebreaks
2017 \end_layout
2018
2019 \end_inset
2020
2021 , or 
2022 \begin_inset Flex Code
2023 status collapsed
2024
2025 \begin_layout Plain Layout
2026 Pagebreaks
2027 \end_layout
2028
2029 \end_inset
2030
2031 ? Did you try to kludge something together with these instead of using the
2032  appropriate paragraph environment?
2033 \end_layout
2034
2035 \begin_layout Enumerate
2036 All right, you didn't use any of the fine-tuning options, you played by
2037  the rules.
2038  Did you try to pull a fancy maneuver? Did you do something funky inside
2039  a table or an equation, like inserting a graphic into a table cell?
2040 \end_layout
2041
2042 \begin_layout Enumerate
2043 Do you have long sections of text where LaTeX cannot find a place to break
2044  a line? By default, LaTeX is rather strict about how much extra inter-word
2045  spacing it will add in order to break a line.
2046  Preferably, you should rework the paragraph to avoid the problem.
2047  If this isn't an option, you can wrap your text in 
2048 \begin_inset Flex Code
2049 status collapsed
2050
2051 \begin_layout Plain Layout
2052
2053 \backslash
2054 sloppypar
2055 \end_layout
2056
2057 \end_inset
2058
2059  to make LaTeX's line breaking more, well, sloppy.
2060 \end_layout
2061
2062 \begin_layout Enumerate
2063 Did you go overboard with the nesting? LyX (currently) doesn't check to
2064  make sure you're in the limits for nesting environments.
2065  If you nested a bunch of environments to the 
2066 \begin_inset Formula $17^{\mathrm{th}}$
2067 \end_inset
2068
2069  level, that's the problem.
2070  (The limit in LaTeX is five.)
2071 \end_layout
2072
2073 \begin_layout Enumerate
2074 Okay, you didn't get any error messages, but your output looks awful.
2075  If you have a table or figure that's too wide or long for the page, you
2076  need to:
2077 \end_layout
2078
2079 \begin_deeper
2080 \begin_layout Enumerate
2081 rescale the figure so it fits.
2082 \end_layout
2083
2084 \begin_layout Enumerate
2085 trim down the table so it fits.
2086 \end_layout
2087
2088 \end_deeper
2089 \begin_layout Enumerate
2090 If something else is wrong with the output, and you didn't try to pull anything
2091  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2092 \end_layout
2093
2094 \begin_layout Standard
2095 If all this doesn't help—well, then 
2096 \emph on
2097 perhaps
2098 \emph default
2099  you might have found a bug in LyX\SpecialChar \ldots{}
2100 .
2101 \end_layout
2102
2103 \begin_layout Chapter
2104 Supplemental Tools
2105 \end_layout
2106
2107 \begin_layout Section
2108 Customizing Bibliographies with BibTeX
2109 \end_layout
2110
2111 \begin_layout Standard
2112 The most basic information about how to use BibTeX with LyX is contained
2113  in the section 
2114 \emph on
2115 Bibliography databases (BibTeX)
2116 \emph default
2117  of the 
2118 \emph on
2119 User's Guide
2120 \emph default
2121 .
2122  The following subsections explain special bibliography features supported
2123  by LyX.
2124 \end_layout
2125
2126 \begin_layout Subsection
2127 Alternative Citation Styles
2128 \end_layout
2129
2130 \begin_layout Standard
2131 Standard BibTeX uses numbers (e.
2132 \begin_inset space \thinspace{}
2133 \end_inset
2134
2135 g.
2136 \begin_inset space \space{}
2137 \end_inset
2138
2139
2140 \begin_inset Quotes eld
2141 \end_inset
2142
2143 [12]
2144 \begin_inset Quotes erd
2145 \end_inset
2146
2147 ) to refer to a cited work.
2148  However, in many scientific disciplines, other citation styles are in use.
2149  The most common one is the author-year style (e.
2150 \begin_inset space \thinspace{}
2151 \end_inset
2152
2153 g.
2154 \begin_inset space \space{}
2155 \end_inset
2156
2157
2158 \begin_inset Quotes eld
2159 \end_inset
2160
2161 Knuth 1984a
2162 \begin_inset Quotes erd
2163 \end_inset
2164
2165 ).
2166  LyX supports two packages that provide this style, 
2167 \begin_inset Flex Code
2168 status collapsed
2169
2170 \begin_layout Plain Layout
2171 natbib
2172 \end_layout
2173
2174 \end_inset
2175
2176  and 
2177 \begin_inset Flex Code
2178 status collapsed
2179
2180 \begin_layout Plain Layout
2181 jurabib
2182 \end_layout
2183
2184 \end_inset
2185
2186 .
2187  Both packages have their pros and cons, which cannot be listed in detail.
2188  If you only want to have simple author-year (or author-numerical) style,
2189  or if you want to use one of the countless style files for 
2190 \begin_inset Flex Code
2191 status collapsed
2192
2193 \begin_layout Plain Layout
2194 natbib
2195 \end_layout
2196
2197 \end_inset
2198
2199 , then the established 
2200 \begin_inset Flex Code
2201 status collapsed
2202
2203 \begin_layout Plain Layout
2204 natbib
2205 \end_layout
2206
2207 \end_inset
2208
2209  package is probably your choice.
2210  If you need special features like short title references, ibidem etc., you
2211  might consider the 
2212 \begin_inset Flex Code
2213 status collapsed
2214
2215 \begin_layout Plain Layout
2216 jurabib
2217 \end_layout
2218
2219 \end_inset
2220
2221  package.
2222 \end_layout
2223
2224 \begin_layout Standard
2225 The handling of both packages in LyX is basically the same.
2226  Go to 
2227 \begin_inset Flex MenuItem
2228 status collapsed
2229
2230 \begin_layout Plain Layout
2231 Document\SpecialChar \menuseparator
2232 Settings
2233 \end_layout
2234
2235 \end_inset
2236
2237  and select under 
2238 \begin_inset Flex MenuItem
2239 status collapsed
2240
2241 \begin_layout Plain Layout
2242 Bibliography
2243 \end_layout
2244
2245 \end_inset
2246
2247  the option 
2248 \begin_inset Flex MenuItem
2249 status collapsed
2250
2251 \begin_layout Plain Layout
2252 Natbib
2253 \end_layout
2254
2255 \end_inset
2256
2257  or 
2258 \begin_inset Flex MenuItem
2259 status collapsed
2260
2261 \begin_layout Plain Layout
2262 Jurabib
2263 \end_layout
2264
2265 \end_inset
2266
2267 .
2268  With both packages, you will get some extra features in the citation dialog
2269  and you can select the style of the reference (
2270 \begin_inset Quotes eld
2271 \end_inset
2272
2273 Knuth 1984
2274 \begin_inset Quotes erd
2275 \end_inset
2276
2277
2278 \begin_inset Quotes eld
2279 \end_inset
2280
2281 Knuth (1984)
2282 \begin_inset Quotes erd
2283 \end_inset
2284
2285
2286 \begin_inset Quotes eld
2287 \end_inset
2288
2289 Knuth, 1984
2290 \begin_inset Quotes erd
2291 \end_inset
2292
2293
2294 \begin_inset Quotes eld
2295 \end_inset
2296
2297 1984
2298 \begin_inset Quotes erd
2299 \end_inset
2300
2301  etc.).
2302  Note that both packages need specifically designed style files.
2303  They both ship their own, but there are lots of additional style files,
2304  and there is even an interactive style file builder
2305 \begin_inset Foot
2306 status collapsed
2307
2308 \begin_layout Plain Layout
2309 See 
2310 \begin_inset Flex URL
2311 status open
2312
2313 \begin_layout Plain Layout
2314
2315 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2316 \end_layout
2317
2318 \end_inset
2319
2320
2321 \end_layout
2322
2323 \end_inset
2324
2325  for 
2326 \begin_inset Flex Code
2327 status collapsed
2328
2329 \begin_layout Plain Layout
2330 natbib
2331 \end_layout
2332
2333 \end_inset
2334
2335 .
2336 \end_layout
2337
2338 \begin_layout Subsection
2339 Sectioned Bibliographies
2340 \end_layout
2341
2342 \begin_layout Standard
2343 Sometimes you might need to divide your bibliography into several sections.
2344  If you are for instance a historian, the possibility to separate sources
2345  and scientific works is most likely a 
2346 \begin_inset Quotes eld
2347 \end_inset
2348
2349 must have
2350 \begin_inset Quotes erd
2351 \end_inset
2352
2353 .
2354  Unfortunately, BibTeX itself does not allow you to do this.
2355  But with the help of some LaTeX packages, BibTeX can be extended to fit
2356  your needs.
2357 \end_layout
2358
2359 \begin_layout Standard
2360 LyX provides native support for one of these packages, 
2361 \family typewriter
2362 bibtopic
2363 \family default
2364 .
2365 \begin_inset Foot
2366 status collapsed
2367
2368 \begin_layout Plain Layout
2369 Available from 
2370 \begin_inset Flex URL
2371 status open
2372
2373 \begin_layout Plain Layout
2374
2375 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2376 \end_layout
2377
2378 \end_inset
2379
2380
2381 \end_layout
2382
2383 \end_inset
2384
2385  The advantage of this package (compared to other packages like 
2386 \family typewriter
2387 multibib
2388 \family default
2389 ) is that you don't need to define new citation commands.
2390  Instead, you need to prepare different bibliographic databases which include
2391  the entries for the different sections of the bibliography.
2392  For example: If you want to divide your bibliography into the sections
2393  
2394 \begin_inset Quotes eld
2395 \end_inset
2396
2397 Sources
2398 \begin_inset Quotes erd
2399 \end_inset
2400
2401  and 
2402 \begin_inset Quotes eld
2403 \end_inset
2404
2405 Scientific works
2406 \begin_inset Quotes erd
2407 \end_inset
2408
2409 , you first need to create two bibliographic databases, e.
2410 \begin_inset space \thinspace{}
2411 \end_inset
2412
2413 g.
2414 \begin_inset space \space{}
2415 \end_inset
2416
2417
2418 \begin_inset Flex Code
2419 status collapsed
2420
2421 \begin_layout Plain Layout
2422 sources.bib
2423 \end_layout
2424
2425 \end_inset
2426
2427  and 
2428 \begin_inset Flex Code
2429 status collapsed
2430
2431 \begin_layout Plain Layout
2432 scientific.bib
2433 \end_layout
2434
2435 \end_inset
2436
2437 .
2438  
2439 \end_layout
2440
2441 \begin_layout Standard
2442 Go to 
2443 \begin_inset Flex MenuItem
2444 status collapsed
2445
2446 \begin_layout Plain Layout
2447 Document\SpecialChar \menuseparator
2448 Settings
2449 \end_layout
2450
2451 \end_inset
2452
2453  and check under 
2454 \begin_inset Flex MenuItem
2455 status collapsed
2456
2457 \begin_layout Plain Layout
2458 Bibliography
2459 \end_layout
2460
2461 \end_inset
2462
2463  the option 
2464 \begin_inset Flex MenuItem
2465 status collapsed
2466
2467 \begin_layout Plain Layout
2468 Sectioned bibliography
2469 \end_layout
2470
2471 \end_inset
2472
2473 .
2474  Now you can insert multiple BibTeX bibliographies, one for each section
2475  of your bibliography.
2476  Returning to our example: Insert the BibTeX bibliography 
2477 \begin_inset Flex Code
2478 status collapsed
2479
2480 \begin_layout Plain Layout
2481 sources.bib
2482 \end_layout
2483
2484 \end_inset
2485
2486  and a second one for the database 
2487 \begin_inset Flex Code
2488 status collapsed
2489
2490 \begin_layout Plain Layout
2491 scientific.bib
2492 \end_layout
2493
2494 \end_inset
2495
2496 .
2497  You are free to use the same or different styles for each section.
2498  Additionally, you can choose if the bibliography section should contain
2499  
2500 \begin_inset Quotes eld
2501 \end_inset
2502
2503 all cited references
2504 \begin_inset Quotes erd
2505 \end_inset
2506
2507  of the specified database(s) (which is the default), 
2508 \begin_inset Quotes eld
2509 \end_inset
2510
2511 all uncited references
2512 \begin_inset Quotes erd
2513 \end_inset
2514
2515  or even 
2516 \begin_inset Quotes eld
2517 \end_inset
2518
2519 all references
2520 \begin_inset Quotes erd
2521 \end_inset
2522
2523 .
2524  This might be useful if you would like to separate your bibliography into
2525  three sections: 
2526 \begin_inset Quotes eld
2527 \end_inset
2528
2529 Cited sources
2530 \begin_inset Quotes erd
2531 \end_inset
2532
2533
2534 \begin_inset Quotes eld
2535 \end_inset
2536
2537 Uncited sources
2538 \begin_inset Quotes erd
2539 \end_inset
2540
2541 , and 
2542 \begin_inset Quotes eld
2543 \end_inset
2544
2545 Scientific works
2546 \begin_inset Quotes erd
2547 \end_inset
2548
2549 .
2550  The titles for the sections can be added as ordinary sections or subsections.
2551  Since 
2552 \begin_inset Flex Code
2553 status collapsed
2554
2555 \begin_layout Plain Layout
2556 bibtopic
2557 \end_layout
2558
2559 \end_inset
2560
2561  removes the bibliography title, you have to manually re-add that, too (as
2562  a chapter* or section*, for instance).
2563 \end_layout
2564
2565 \begin_layout Subsection
2566 Multiple Bibliographies
2567 \end_layout
2568
2569 \begin_layout Standard
2570 Multiple bibliographies, e.
2571 \begin_inset space \thinspace{}
2572 \end_inset
2573
2574 g.
2575 \begin_inset space \space{}
2576 \end_inset
2577
2578 a bibliography for each section or chapter of the document, are not supported
2579  by BibTeX itself.
2580  But the 
2581 \begin_inset Flex Code
2582 status collapsed
2583
2584 \begin_layout Plain Layout
2585 bibtopic
2586 \end_layout
2587
2588 \end_inset
2589
2590  package, which is used for the creation of sectioned bibliographies in
2591  LyX (see the previous section), provides an easy way to solve this task,
2592  if you are willing to use some 
2593 \begin_inset Flex MenuItem
2594 status collapsed
2595
2596 \begin_layout Plain Layout
2597 TeX Code
2598 \end_layout
2599
2600 \end_inset
2601
2602  (see section
2603 \begin_inset space ~
2604 \end_inset
2605
2606
2607 \begin_inset CommandInset ref
2608 LatexCommand ref
2609 reference "sec:Inserting-TeX-Code"
2610
2611 \end_inset
2612
2613 ).
2614 \begin_inset Foot
2615 status collapsed
2616
2617 \begin_layout Plain Layout
2618 An alternative approach is to use the 
2619 \begin_inset Flex Code
2620 status collapsed
2621
2622 \begin_layout Plain Layout
2623 chapterbib
2624 \end_layout
2625
2626 \end_inset
2627
2628  or 
2629 \begin_inset Flex Code
2630 status collapsed
2631
2632 \begin_layout Plain Layout
2633 bibunits
2634 \end_layout
2635
2636 \end_inset
2637
2638  package, respectively.
2639 \end_layout
2640
2641 \end_inset
2642
2643
2644 \end_layout
2645
2646 \begin_layout Standard
2647 First go to 
2648 \begin_inset Flex MenuItem
2649 status collapsed
2650
2651 \begin_layout Plain Layout
2652 Document\SpecialChar \menuseparator
2653 Settings
2654 \end_layout
2655
2656 \end_inset
2657
2658  and under 
2659 \begin_inset Flex MenuItem
2660 status collapsed
2661
2662 \begin_layout Plain Layout
2663 Bibliography
2664 \end_layout
2665
2666 \end_inset
2667
2668  check 
2669 \begin_inset Flex MenuItem
2670 status collapsed
2671
2672 \begin_layout Plain Layout
2673 Sectioned bibliography
2674 \end_layout
2675
2676 \end_inset
2677
2678 .
2679  In the document, you have to enclose the sections, which shall contain
2680  their own bibliography (including the BibTeX bibliography itself), between
2681  
2682 \begin_inset Flex Code
2683 status collapsed
2684
2685 \begin_layout Plain Layout
2686
2687 \backslash
2688 begin{btUnit}
2689 \end_layout
2690
2691 \end_inset
2692
2693  and 
2694 \begin_inset Flex Code
2695 status collapsed
2696
2697 \begin_layout Plain Layout
2698
2699 \backslash
2700 end{btUnit}
2701 \end_layout
2702
2703 \end_inset
2704
2705  (those commands have to be inserted as TeX code).
2706  The bibliography will contain all references that have been cited in the
2707  current 
2708 \begin_inset Flex Code
2709 status collapsed
2710
2711 \begin_layout Plain Layout
2712 btUnit
2713 \end_layout
2714
2715 \end_inset
2716
2717 .
2718  
2719 \series bold
2720 Note:
2721 \series default
2722  If you are using this approach, then every citation reference has to be
2723  inside some 
2724 \begin_inset Flex Code
2725 status collapsed
2726
2727 \begin_layout Plain Layout
2728 btUnit
2729 \end_layout
2730
2731 \end_inset
2732
2733 .
2734  Also, the 
2735 \begin_inset Flex Code
2736 status collapsed
2737
2738 \begin_layout Plain Layout
2739 btUnit
2740 \end_layout
2741
2742 \end_inset
2743
2744 s cannot be nested.
2745 \end_layout
2746
2747 \begin_layout Section
2748 Multipart Documents
2749 \end_layout
2750
2751 \begin_layout Subsection
2752 General Operation
2753 \end_layout
2754
2755 \begin_layout Standard
2756 When you are working on a large file with many sections, it is often convenient
2757  to break up the document into several files, or perhaps you have something
2758  where a table may change from time to time, but the preceding text does
2759  not.
2760  In these cases, you should seriously consider using multipart documents.
2761  For example, scientific papers often have five major sections: the introduction
2762 , observations, results, discussion, and conclusion.
2763  Each of these could be its own separate LyX file, with one 
2764 \begin_inset Quotes eld
2765 \end_inset
2766
2767 master
2768 \begin_inset Quotes erd
2769 \end_inset
2770
2771  file which contains the title, authors, abstract, references, etc., plus
2772  the five included files.
2773  It is important to note that each of these files is a full LyX file which
2774  can be formatted and printed on its own, as well as included in a master
2775  file.
2776  Each of these files must have the same document class, however—don't attempt
2777  to mix book classes with article classes.
2778  You may also include LaTeX files; however, these files must not have their
2779  own preamble (i.
2780 \begin_inset space \thinspace{}
2781 \end_inset
2782
2783 e.
2784 \begin_inset space \space{}
2785 \end_inset
2786
2787 everything up to and including the 
2788 \begin_inset Flex Code
2789 status collapsed
2790
2791 \begin_layout Plain Layout
2792
2793 \backslash
2794 begin{document}
2795 \end_layout
2796
2797 \end_inset
2798
2799  line as well as the 
2800 \begin_inset Flex Code
2801 status collapsed
2802
2803 \begin_layout Plain Layout
2804
2805 \backslash
2806 end{document}
2807 \end_layout
2808
2809 \end_inset
2810
2811  line must be deleted) or else errors will be generated when you try to
2812  make a DVI file.
2813 \end_layout
2814
2815 \begin_layout Standard
2816 LyX allows you to include files quite easily with 
2817 \begin_inset Flex MenuItem
2818 status collapsed
2819
2820 \begin_layout Plain Layout
2821 Insert\SpecialChar \menuseparator
2822 ChiId
2823 \begin_inset space ~
2824 \end_inset
2825
2826 Document
2827 \end_layout
2828
2829 \end_inset
2830
2831 .
2832  When you click on this selection a small box is inserted into the file
2833  at the current cursor location.
2834  Clicking on the box raises a dialog which allows you to select the file
2835  to be included, and the method of its inclusion.
2836  
2837 \end_layout
2838
2839 \begin_layout Standard
2840 The file selection box should by now be obvious.
2841  The three inclusion methods are 
2842 \begin_inset Quotes eld
2843 \end_inset
2844
2845 include
2846 \begin_inset Quotes erd
2847 \end_inset
2848
2849
2850 \begin_inset Quotes eld
2851 \end_inset
2852
2853 input
2854 \begin_inset Quotes erd
2855 \end_inset
2856
2857 , and 
2858 \begin_inset Quotes eld
2859 \end_inset
2860
2861 verbatim
2862 \begin_inset Quotes erd
2863 \end_inset
2864
2865 .
2866  The difference between 
2867 \begin_inset Quotes eld
2868 \end_inset
2869
2870 include
2871 \begin_inset Quotes erd
2872 \end_inset
2873
2874  and 
2875 \begin_inset Quotes eld
2876 \end_inset
2877
2878 input
2879 \begin_inset Quotes erd
2880 \end_inset
2881
2882  is really only meaningful to LaTeXperts, but the practical difference is
2883  that files that are 
2884 \begin_inset Quotes eld
2885 \end_inset
2886
2887 included
2888 \begin_inset Quotes erd
2889 \end_inset
2890
2891  are typeset beginning on a new page, while files that are 
2892 \begin_inset Quotes eld
2893 \end_inset
2894
2895 inputted
2896 \begin_inset Quotes erd
2897 \end_inset
2898
2899  are typeset starting on the current page.
2900 \end_layout
2901
2902 \begin_layout Standard
2903 Generally, the master file is converted into a full LaTeX file before typesettin
2904 g, while the included files are converted to LaTeX files that do not have
2905  all the preamble information.
2906 \end_layout
2907
2908 \begin_layout Standard
2909
2910 \begin_inset Quotes eld
2911 \end_inset
2912
2913 verbatim
2914 \begin_inset Quotes erd
2915 \end_inset
2916
2917  included file allows you to include a file typeset exactly as it appears
2918  in the file, i.
2919 \begin_inset space \thinspace{}
2920 \end_inset
2921
2922 e.
2923 \begin_inset space \space{}
2924 \end_inset
2925
2926 in 
2927 \begin_inset Flex Code
2928 status collapsed
2929
2930 \begin_layout Plain Layout
2931 verbatim
2932 \end_layout
2933
2934 \end_inset
2935
2936  mode, with the characters set in a fixed-width typewriter font.
2937  Normally, spaces in this file are invisible, though two consecutive spaces
2938  are conserved, unlike LyX's normal treatment of spaces.
2939  However, setting the 
2940 \begin_inset Flex MenuItem
2941 status collapsed
2942
2943 \begin_layout Plain Layout
2944 Mark
2945 \begin_inset space ~
2946 \end_inset
2947
2948 spaces
2949 \begin_inset space ~
2950 \end_inset
2951
2952 in
2953 \begin_inset space ~
2954 \end_inset
2955
2956 output
2957 \end_layout
2958
2959 \end_inset
2960
2961  checkbox typesets a mark to unambiguously define the presence of a space.
2962  
2963 \end_layout
2964
2965 \begin_layout Subsection
2966 Cross-References Between Files
2967 \end_layout
2968
2969 \begin_layout Standard
2970 \begin_inset Box Shadowbox
2971 position "t"
2972 hor_pos "c"
2973 has_inner_box 1
2974 inner_pos "t"
2975 use_parbox 0
2976 use_makebox 0
2977 width "100col%"
2978 special "none"
2979 height "1in"
2980 height_special "totalheight"
2981 status open
2982
2983 \begin_layout Plain Layout
2984 This section is somewhat out of date.
2985  Need to describe default master documents and how children are opened when
2986  the master is.
2987  [[FIXME]]
2988 \end_layout
2989
2990 \end_inset
2991
2992
2993 \end_layout
2994
2995 \begin_layout Standard
2996 It is possible to set up cross-references between the different files.
2997  First, open all the files in question: let's call them A and B in a two
2998  file example, where B is included in A.
2999  Let's say you insert a label in A, then want to reference it in B.
3000  Open the cross-reference dialog whilst in document B, and you can select
3001  the 
3002 \begin_inset Quotes eld
3003 \end_inset
3004
3005 buffer
3006 \begin_inset Quotes erd
3007 \end_inset
3008
3009  to use.
3010 \end_layout
3011
3012 \begin_layout Subsection
3013 Bibliography Lists in all Subdocuments
3014 \end_layout
3015
3016 \begin_layout Standard
3017 \begin_inset Box Frameless
3018 position "t"
3019 hor_pos "c"
3020 has_inner_box 1
3021 inner_pos "t"
3022 use_parbox 0
3023 use_makebox 0
3024 width "100col%"
3025 special "none"
3026 height "1in"
3027 height_special "totalheight"
3028 status open
3029
3030 \begin_layout Plain Layout
3031 This section also needs updating.
3032  There is now material about this on the wiki, and it could be copied here.
3033 \end_layout
3034
3035 \end_inset
3036
3037
3038 \end_layout
3039
3040 \begin_layout Standard
3041 Copy the bibliography list with all entries to all subdocuments and transform
3042  them to a comment.
3043  This way LyX will find the 
3044 \begin_inset Flex Code
3045 status collapsed
3046
3047 \begin_layout Plain Layout
3048 .bib
3049 \end_layout
3050
3051 \end_inset
3052
3053 -files and you can easily insert references without making the bibliography
3054  list visible.
3055 \end_layout
3056
3057 \begin_layout Standard
3058 As the bibliography list is in a comment, LaTeX won't use it and the references
3059  will look like this: [?], instead of like this: [1].
3060  One solution is to use the LaTeX-package 
3061 \begin_inset Flex Code
3062 status collapsed
3063
3064 \begin_layout Plain Layout
3065 comment
3066 \end_layout
3067
3068 \end_inset
3069
3070  that will only include comments by processing the files separately.
3071  To do this, add in the LaTeX preamble of every subdocument the following:
3072 \end_layout
3073
3074 \begin_layout LyX-Code
3075
3076 \backslash
3077 usepackage{comment}
3078 \end_layout
3079
3080 \begin_layout LyX-Code
3081
3082 \backslash
3083 includecomment{comment}
3084 \end_layout
3085
3086 \begin_layout Standard
3087 See also 
3088 \begin_inset Flex URL
3089 status collapsed
3090
3091 \begin_layout Plain Layout
3092
3093 http://wiki.lyx.org/FAQ/Unsorted#toc31
3094 \end_layout
3095
3096 \end_inset
3097
3098 .
3099 \end_layout
3100
3101 \begin_layout Section
3102 LyX Archives
3103 \end_layout
3104
3105 \begin_layout Standard
3106 Users sometimes need to be able to 
3107 \begin_inset Quotes eld
3108 \end_inset
3109
3110 bundle
3111 \begin_inset Quotes erd
3112 \end_inset
3113
3114  a LyX file together with all the images (and other files) on which it depends,
3115  either for sending to a publisher or for sharing with a co-author.
3116  LyX 2.0 includes a Python script (
3117 \begin_inset Flex Code
3118 status collapsed
3119
3120 \begin_layout Plain Layout
3121 lyxpak.py
3122 \end_layout
3123
3124 \end_inset
3125
3126 ) that automates this process.
3127  To use it, you must have either the 
3128 \begin_inset Flex Code
3129 status collapsed
3130
3131 \begin_layout Plain Layout
3132 zipfile
3133 \end_layout
3134
3135 \end_inset
3136
3137  or 
3138 \begin_inset Flex Code
3139 status collapsed
3140
3141 \begin_layout Plain Layout
3142 tarfile
3143 \end_layout
3144
3145 \end_inset
3146
3147  python modules installed on your system.
3148  By default, the script prefers the 
3149 \begin_inset Flex Code
3150 status collapsed
3151
3152 \begin_layout Plain Layout
3153 gzip
3154 \end_layout
3155
3156 \end_inset
3157
3158 -compressed 
3159 \begin_inset Flex Code
3160 status collapsed
3161
3162 \begin_layout Plain Layout
3163 tar
3164 \end_layout
3165
3166 \end_inset
3167
3168  format on Unix-like systems and the 
3169 \begin_inset Flex Code
3170 status collapsed
3171
3172 \begin_layout Plain Layout
3173 zip
3174 \end_layout
3175
3176 \end_inset
3177
3178  format on Windows.
3179 \end_layout
3180
3181 \begin_layout Standard
3182 LyX's configuration process will set the script up to export a `LyX Archive',
3183  and this format will then be available under 
3184 \begin_inset Flex Code
3185 status collapsed
3186
3187 \begin_layout Plain Layout
3188 File\SpecialChar \menuseparator
3189 Export
3190 \end_layout
3191
3192 \end_inset
3193
3194 .
3195 \end_layout
3196
3197 \begin_layout Standard
3198 Independently of the platform, the generation of a particular archive format
3199  can be forced by adding either the 
3200 \begin_inset Flex Code
3201 status collapsed
3202
3203 \begin_layout Plain Layout
3204 -t
3205 \end_layout
3206
3207 \end_inset
3208
3209  (for the 
3210 \begin_inset Flex Code
3211 status collapsed
3212
3213 \begin_layout Plain Layout
3214 tar
3215 \end_layout
3216
3217 \end_inset
3218
3219  format) or 
3220 \begin_inset Flex Code
3221 status collapsed
3222
3223 \begin_layout Plain Layout
3224 -z
3225 \end_layout
3226
3227 \end_inset
3228
3229  (for the 
3230 \begin_inset Flex Code
3231 status collapsed
3232
3233 \begin_layout Plain Layout
3234 zip
3235 \end_layout
3236
3237 \end_inset
3238
3239  format) switch to the 
3240 \begin_inset Flex Code
3241 status collapsed
3242
3243 \begin_layout Plain Layout
3244 LyX\SpecialChar \menuseparator
3245 LyX Archive
3246 \end_layout
3247
3248 \end_inset
3249
3250  converter in 
3251 \begin_inset Flex Code
3252 status collapsed
3253
3254 \begin_layout Plain Layout
3255 Tools\SpecialChar \menuseparator
3256 Preferences\SpecialChar \menuseparator
3257 File Handling\SpecialChar \menuseparator
3258 Converters
3259 \end_layout
3260
3261 \end_inset
3262
3263 .
3264  (Make sure you add the switch after the script name, not before it.)
3265 \end_layout
3266
3267 \begin_layout Section
3268 Fancy Headers and Footers
3269 \end_layout
3270
3271 \begin_layout Standard
3272 The default page layout is rather plain; for an 
3273 \begin_inset Flex Code
3274 status collapsed
3275
3276 \begin_layout Plain Layout
3277 article
3278 \end_layout
3279
3280 \end_inset
3281
3282  document class, all you get is a centered page number at the bottom of
3283  the page.
3284  This document uses KOMA-script's book class, so it appears to be a bit
3285  fancier.
3286  But to really put on a show, you need to set the document page style to
3287  
3288 \begin_inset Quotes eld
3289 \end_inset
3290
3291 fancy
3292 \begin_inset Quotes erd
3293 \end_inset
3294
3295 , as mentioned in the 
3296 \emph on
3297 User Guide
3298 \emph default
3299 .
3300  This section describes the LaTeX code you need to insert in your LaTeX
3301  preamble in order to get the desired effects.
3302 \end_layout
3303
3304 \begin_layout Standard
3305 For more information on fancy headers, see the 
3306 \begin_inset Flex Code
3307 status collapsed
3308
3309 \begin_layout Plain Layout
3310 fancyhdr
3311 \end_layout
3312
3313 \end_inset
3314
3315  package documentation.
3316  (
3317 \begin_inset Flex URL
3318 status collapsed
3319
3320 \begin_layout Plain Layout
3321
3322 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3323 \end_layout
3324
3325 \end_inset
3326
3327 )
3328 \end_layout
3329
3330 \begin_layout Standard
3331 The page header is divided into three fields, not surprisingly labeled 
3332 \begin_inset Quotes eld
3333 \end_inset
3334
3335 left
3336 \begin_inset Quotes erd
3337 \end_inset
3338
3339
3340 \begin_inset Quotes eld
3341 \end_inset
3342
3343 center
3344 \begin_inset Quotes erd
3345 \end_inset
3346
3347 , and 
3348 \begin_inset Quotes eld
3349 \end_inset
3350
3351 right
3352 \begin_inset Quotes erd
3353 \end_inset
3354
3355 .
3356  The footer is also divided into these three fields.
3357  The LaTeX commands to set these fields in the simplest manner are 
3358 \begin_inset Flex Code
3359 status collapsed
3360
3361 \begin_layout Plain Layout
3362
3363 \backslash
3364 lhead
3365 \end_layout
3366
3367 \end_inset
3368
3369
3370 \begin_inset Flex Code
3371 status collapsed
3372
3373 \begin_layout Plain Layout
3374
3375 \backslash
3376 chead
3377 \end_layout
3378
3379 \end_inset
3380
3381
3382 \begin_inset Flex Code
3383 status collapsed
3384
3385 \begin_layout Plain Layout
3386
3387 \backslash
3388 rhead
3389 \end_layout
3390
3391 \end_inset
3392
3393
3394 \begin_inset Flex Code
3395 status collapsed
3396
3397 \begin_layout Plain Layout
3398
3399 \backslash
3400 lfoot
3401 \end_layout
3402
3403 \end_inset
3404
3405 , etc.
3406  Suppose you wish to put your name in the upper left hand corner of each
3407  page.
3408  Simply insert the following command in the preamble: 
3409 \end_layout
3410
3411 \begin_layout Standard
3412
3413 \family typewriter
3414
3415 \backslash
3416 lhead{John Q.
3417  DocWriter}
3418 \end_layout
3419
3420 \begin_layout Standard
3421 You will now see your name in the upper left.
3422  If a field has a default entry that you would like to get rid of (often
3423  the page number appears in the central footer) simply include a command
3424  with a blank argument, e.
3425 \begin_inset space \thinspace{}
3426 \end_inset
3427
3428 g.:
3429 \end_layout
3430
3431 \begin_layout Standard
3432
3433 \family typewriter
3434
3435 \backslash
3436 cfoot{}
3437 \end_layout
3438
3439 \begin_layout Standard
3440 Let's get really fancy: lets put the section number with the word 
3441 \begin_inset Quotes eld
3442 \end_inset
3443
3444 Section
3445 \begin_inset Quotes erd
3446 \end_inset
3447
3448  (e.
3449 \begin_inset space \thinspace{}
3450 \end_inset
3451
3452 g.
3453 \begin_inset space \space{}
3454 \end_inset
3455
3456 Section 3) in the upper left, the page number (e.
3457 \begin_inset space \thinspace{}
3458 \end_inset
3459
3460 g.
3461 \begin_inset space \space{}
3462 \end_inset
3463
3464 Page 4) in the upper right, your name in the lower left, and the date in
3465  the lower right.
3466  The following commands should now appear in the preamble:
3467 \end_layout
3468
3469 \begin_layout Standard
3470
3471 \family typewriter
3472
3473 \backslash
3474 lhead{Section 
3475 \backslash
3476 thesection}
3477 \end_layout
3478
3479 \begin_layout Standard
3480
3481 \family typewriter
3482
3483 \backslash
3484 chead{}
3485 \end_layout
3486
3487 \begin_layout Standard
3488
3489 \family typewriter
3490
3491 \backslash
3492 rhead{Page 
3493 \backslash
3494 thepage}
3495 \end_layout
3496
3497 \begin_layout Standard
3498
3499 \family typewriter
3500
3501 \backslash
3502 lfoot{John Q.
3503  DocWriter}
3504 \end_layout
3505
3506 \begin_layout Standard
3507
3508 \family typewriter
3509
3510 \backslash
3511 cfoot{}
3512 \end_layout
3513
3514 \begin_layout Standard
3515
3516 \family typewriter
3517
3518 \backslash
3519 rfoot{
3520 \backslash
3521 today}
3522 \end_layout
3523
3524 \begin_layout Standard
3525 The commands 
3526 \begin_inset Flex Code
3527 status collapsed
3528
3529 \begin_layout Plain Layout
3530
3531 \backslash
3532 thesection
3533 \end_layout
3534
3535 \end_inset
3536
3537  and 
3538 \begin_inset Flex Code
3539 status collapsed
3540
3541 \begin_layout Plain Layout
3542
3543 \backslash
3544 thepage
3545 \end_layout
3546
3547 \end_inset
3548
3549  access LaTeX's section and page counters, and so print out the current
3550  section and page numbers.
3551  
3552 \begin_inset Flex Code
3553 status collapsed
3554
3555 \begin_layout Plain Layout
3556
3557 \backslash
3558 today
3559 \end_layout
3560
3561 \end_inset
3562
3563  simply prints out today's date.
3564 \end_layout
3565
3566 \begin_layout Standard
3567 The thicknesses of the horizontal rules drawn beneath the header and above
3568  the footer can also be modified.
3569  If you don't want one of the rules, set its thickness to 0.
3570  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3571  Use commands
3572 \family typewriter
3573  
3574 \family default
3575 like 
3576 \begin_inset Flex Code
3577 status collapsed
3578
3579 \begin_layout Plain Layout
3580
3581 \backslash
3582 renewcommand{
3583 \backslash
3584 headrulewidth}{0.4pt}
3585 \end_layout
3586
3587 \end_inset
3588
3589  and 
3590 \begin_inset Flex Code
3591 status collapsed
3592
3593 \begin_layout Plain Layout
3594
3595 \backslash
3596 renewcommand{
3597 \backslash
3598 footrulewidth}{0.4pt}
3599 \end_layout
3600
3601 \end_inset
3602
3603  to set the thicknesses.
3604 \end_layout
3605
3606 \begin_layout Standard
3607 You can switch the header/footer settings on and off for individual pages
3608  using commands like 
3609 \begin_inset Flex Code
3610 status collapsed
3611
3612 \begin_layout Plain Layout
3613
3614 \backslash
3615 thispagestyle{empty}
3616 \end_layout
3617
3618 \end_inset
3619
3620
3621 \begin_inset Flex Code
3622 status collapsed
3623
3624 \begin_layout Plain Layout
3625
3626 \backslash
3627 thispagestyle{plain}
3628 \end_layout
3629
3630 \end_inset
3631
3632 , and 
3633 \begin_inset Flex Code
3634 status collapsed
3635
3636 \begin_layout Plain Layout
3637
3638 \backslash
3639 thispagestyle{fancy}
3640 \end_layout
3641
3642 \end_inset
3643
3644 .
3645  Simply insert them in the text on the page you want changed and mark them
3646  as TeX code.
3647  In fact, title pages are marked as plain by default, while following pages
3648  are marked fancy when using the global fancy setting.
3649 \end_layout
3650
3651 \begin_layout Standard
3652 As a final example, it is possible to include an image in the header or
3653  footer.
3654  Suppose you want to put a company logo in the upper lefthand corner.
3655  You might try something like
3656 \end_layout
3657
3658 \begin_layout Standard
3659
3660 \family typewriter
3661
3662 \backslash
3663 lhead{
3664 \backslash
3665 resizebox{1in}{!}{
3666 \backslash
3667 includegraphics{logo.eps}}}
3668 \end_layout
3669
3670 \begin_layout Standard
3671 \noindent
3672 (you may need to preface this with 
3673 \begin_inset Flex Code
3674 status collapsed
3675
3676 \begin_layout Plain Layout
3677 \noindent
3678
3679 \backslash
3680 usepackage{graphics}
3681 \end_layout
3682
3683 \end_inset
3684
3685  if you don't include graphics elsewhere in your document).
3686 \end_layout
3687
3688 \begin_layout Section
3689 Itemize Bullet Selection
3690 \begin_inset CommandInset label
3691 LatexCommand label
3692 name "sec:bullet"
3693
3694 \end_inset
3695
3696
3697 \end_layout
3698
3699 \begin_layout Standard
3700 by
3701 \noun on
3702  Allan Rae
3703 \end_layout
3704
3705 \begin_layout Subsection
3706 Introduction
3707 \end_layout
3708
3709 \begin_layout Standard
3710 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3711  Using this dialog you can easily specify what bullet shape to use at each
3712  level of an itemized list.
3713  These settings are document-wide so you won't be able to specify different
3714  sets of bullets for different paragraphs.
3715 \begin_inset Foot
3716 status collapsed
3717
3718 \begin_layout Plain Layout
3719 Well, actually you can but you'll have to do it by hand.
3720 \end_layout
3721
3722 \end_inset
3723
3724
3725 \end_layout
3726
3727 \begin_layout Subsection
3728 How it looks
3729 \end_layout
3730
3731 \begin_layout Standard
3732 Open the dialog by selecting the 
3733 \begin_inset Flex MenuItem
3734 status collapsed
3735
3736 \begin_layout Plain Layout
3737 Document\SpecialChar \menuseparator
3738 Settings
3739 \end_layout
3740
3741 \end_inset
3742
3743  menu item and then select the 
3744 \begin_inset Flex MenuItem
3745 status collapsed
3746
3747 \begin_layout Plain Layout
3748 Bullets
3749 \end_layout
3750
3751 \end_inset
3752
3753  tab.
3754 \end_layout
3755
3756 \begin_layout Standard
3757 The dialog provides you with a table of bullet shapes.
3758  A column of buttons on the left of the table provides access to the six
3759  different panels of bullet shapes.
3760  The row of buttons across the top is used to select which bullet depth
3761  you are changing.
3762  A text entry under the table shows the currently selected bullet shape's
3763  LaTeX equivalent and this can be edited if desired.
3764  If you do modify the text you will also need to specify any needed packages
3765  in the LaTeX preamble.
3766 \end_layout
3767
3768 \begin_layout Standard
3769 The six panels are divided up by the packages they require.
3770  The following table shows the mappings from button name to LaTeX package.
3771 \end_layout
3772
3773 \begin_layout Standard
3774 \align center
3775 \begin_inset Tabular
3776 <lyxtabular version="3" rows="7" columns="2">
3777 <features rotate="0" tabularvalignment="middle">
3778 <column alignment="center" valignment="top" width="0pt">
3779 <column alignment="center" valignment="top" width="0pt">
3780 <row>
3781 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3782 \begin_inset Text
3783
3784 \begin_layout Plain Layout
3785
3786 \family roman
3787 \series medium
3788 \shape up
3789 \size normal
3790 \emph off
3791 \bar no
3792 \noun off
3793 \color none
3794 Button
3795 \end_layout
3796
3797 \end_inset
3798 </cell>
3799 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3800 \begin_inset Text
3801
3802 \begin_layout Plain Layout
3803
3804 \family roman
3805 \series medium
3806 \shape up
3807 \size normal
3808 \emph off
3809 \bar no
3810 \noun off
3811 \color none
3812 Packages Required
3813 \end_layout
3814
3815 \end_inset
3816 </cell>
3817 </row>
3818 <row>
3819 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3820 \begin_inset Text
3821
3822 \begin_layout Plain Layout
3823
3824 \family sans
3825 \series medium
3826 \shape up
3827 \size normal
3828 \emph off
3829 \bar no
3830 \noun off
3831 \color none
3832 Standard
3833 \end_layout
3834
3835 \end_inset
3836 </cell>
3837 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3838 \begin_inset Text
3839
3840 \begin_layout Plain Layout
3841
3842 \series medium
3843 \shape up
3844 \size normal
3845 \emph off
3846 \bar no
3847 \noun off
3848 \color none
3849 base LaTeX
3850 \end_layout
3851
3852 \end_inset
3853 </cell>
3854 </row>
3855 <row>
3856 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3857 \begin_inset Text
3858
3859 \begin_layout Plain Layout
3860
3861 \family sans
3862 \series medium
3863 \shape up
3864 \size normal
3865 \emph off
3866 \bar no
3867 \noun off
3868 \color none
3869 Maths
3870 \end_layout
3871
3872 \end_inset
3873 </cell>
3874 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3875 \begin_inset Text
3876
3877 \begin_layout Plain Layout
3878
3879 \family typewriter
3880 \series medium
3881 \shape up
3882 \size normal
3883 \emph off
3884 \bar no
3885 \noun off
3886 \color none
3887 amssymb.sty
3888 \end_layout
3889
3890 \end_inset
3891 </cell>
3892 </row>
3893 <row>
3894 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3895 \begin_inset Text
3896
3897 \begin_layout Plain Layout
3898
3899 \family sans
3900 \series medium
3901 \shape up
3902 \size normal
3903 \emph off
3904 \bar no
3905 \noun off
3906 \color none
3907 Ding1
3908 \end_layout
3909
3910 \end_inset
3911 </cell>
3912 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3913 \begin_inset Text
3914
3915 \begin_layout Plain Layout
3916
3917 \family typewriter
3918 \series medium
3919 \shape up
3920 \size normal
3921 \emph off
3922 \bar no
3923 \noun off
3924 \color none
3925 pifont.sty
3926 \end_layout
3927
3928 \end_inset
3929 </cell>
3930 </row>
3931 <row>
3932 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3933 \begin_inset Text
3934
3935 \begin_layout Plain Layout
3936
3937 \family sans
3938 \series medium
3939 \shape up
3940 \size normal
3941 \emph off
3942 \bar no
3943 \noun off
3944 \color none
3945 Ding2
3946 \end_layout
3947
3948 \end_inset
3949 </cell>
3950 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3951 \begin_inset Text
3952
3953 \begin_layout Plain Layout
3954
3955 \family typewriter
3956 \series medium
3957 \shape up
3958 \size normal
3959 \emph off
3960 \bar no
3961 \noun off
3962 \color none
3963 pifont.sty
3964 \end_layout
3965
3966 \end_inset
3967 </cell>
3968 </row>
3969 <row>
3970 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3971 \begin_inset Text
3972
3973 \begin_layout Plain Layout
3974
3975 \family sans
3976 \series medium
3977 \shape up
3978 \size normal
3979 \emph off
3980 \bar no
3981 \noun off
3982 \color none
3983 Ding3
3984 \end_layout
3985
3986 \end_inset
3987 </cell>
3988 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3989 \begin_inset Text
3990
3991 \begin_layout Plain Layout
3992
3993 \family typewriter
3994 \series medium
3995 \shape up
3996 \size normal
3997 \emph off
3998 \bar no
3999 \noun off
4000 \color none
4001 pifont.sty
4002 \end_layout
4003
4004 \end_inset
4005 </cell>
4006 </row>
4007 <row>
4008 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4009 \begin_inset Text
4010
4011 \begin_layout Plain Layout
4012
4013 \family sans
4014 \series medium
4015 \shape up
4016 \size normal
4017 \emph off
4018 \bar no
4019 \noun off
4020 \color none
4021 Ding4
4022 \end_layout
4023
4024 \end_inset
4025 </cell>
4026 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4027 \begin_inset Text
4028
4029 \begin_layout Plain Layout
4030
4031 \family typewriter
4032 \series medium
4033 \shape up
4034 \size normal
4035 \emph off
4036 \bar no
4037 \noun off
4038 \color none
4039 pifont.sty
4040 \end_layout
4041
4042 \end_inset
4043 </cell>
4044 </row>
4045 </lyxtabular>
4046
4047 \end_inset
4048
4049
4050 \end_layout
4051
4052 \begin_layout Standard
4053 LyX doesn't stop you using bullets from packages you don't have.
4054  If you get errors from LaTeX when you try to view or print the file, then
4055  it is likely you are missing a package.
4056 \begin_inset Foot
4057 status collapsed
4058
4059 \begin_layout Plain Layout
4060 LyX doesn't restrict your use since you may be editing locally and exporting
4061  elsewhere.
4062 \end_layout
4063
4064 \end_inset
4065
4066
4067 \end_layout
4068
4069 \begin_layout Subsection
4070 How to use it
4071 \end_layout
4072
4073 \begin_layout Standard
4074 Select which bullet depth you want to change then select the bullet shape
4075  and size.
4076  Any changes will not be visible in LyX, but are visible when viewing the
4077  document.
4078 \end_layout
4079
4080 \begin_layout Standard
4081 You can reset a bullet shape to the default simply by clicking your right
4082  mouse button on the appropriate bullet depth button.
4083 \begin_inset Foot
4084 status collapsed
4085
4086 \begin_layout Plain Layout
4087 If you 
4088 \emph on
4089 really
4090 \emph default
4091  want to have multiple sets of paragraphs with different sets of bullets
4092  in each, then you're going to have to get your hands dirty with TeX code.
4093  The bullet selection dialog can help though because it provides you with
4094  the LaTeX code for a wide range of bullet shapes.
4095  To make your own custom paragraphs you have the following options:
4096 \end_layout
4097
4098 \begin_layout Plain Layout
4099 \begin_inset ERT
4100 status open
4101
4102 \begin_layout Plain Layout
4103
4104
4105 \backslash
4106 let
4107 \backslash
4108 savelabelitemi=
4109 \backslash
4110 labelitemi
4111 \end_layout
4112
4113 \end_inset
4114
4115
4116 \end_layout
4117
4118 \begin_layout Plain Layout
4119 \begin_inset ERT
4120 status open
4121
4122 \begin_layout Plain Layout
4123
4124
4125 \backslash
4126 renewcommand
4127 \backslash
4128 labelitemi[0]{
4129 \backslash
4130 small
4131 \backslash
4132 (
4133 \backslash
4134 sharp
4135 \backslash
4136 )}
4137 \end_layout
4138
4139 \end_inset
4140
4141
4142 \end_layout
4143
4144 \begin_layout Itemize
4145 Use the LaTeX command 
4146 \begin_inset Flex Code
4147 status collapsed
4148
4149 \begin_layout Plain Layout
4150
4151 \backslash
4152 renewcommand{}{}
4153 \end_layout
4154
4155 \end_inset
4156
4157  to specify a new bullet shape for a given depth.
4158  You'll also need to save the current bullet shape so you can restore it
4159  again afterwards.
4160  In this itemized list the following LaTeX code was used to change the bullet
4161  used for the first depth.
4162 \end_layout
4163
4164 \begin_deeper
4165 \begin_layout LyX-Code
4166
4167 \backslash
4168 let
4169 \backslash
4170 savelabelitemi=
4171 \backslash
4172 labelitemi 
4173 \end_layout
4174
4175 \begin_layout LyX-Code
4176
4177 \backslash
4178 renewcommand
4179 \backslash
4180 labelitemi[0]{
4181 \backslash
4182 small
4183 \backslash
4184 (
4185 \backslash
4186 sharp
4187 \backslash
4188 )}
4189 \end_layout
4190
4191 \end_deeper
4192 \begin_layout Itemize
4193 Note that the itemize depth is specified in Roman numerals as part of the
4194  
4195 \family typewriter
4196
4197 \backslash
4198 labelitem
4199 \family default
4200  command.
4201 \end_layout
4202
4203 \begin_layout Itemize
4204 \begin_inset ERT
4205 status open
4206
4207 \begin_layout Plain Layout
4208
4209 [
4210 \backslash
4211 (
4212 \backslash
4213 star
4214 \backslash
4215 )]
4216 \end_layout
4217
4218 \end_inset
4219
4220  Specify each individual entry by starting each item with the bullet shape
4221  enclosed in square brackets and set as 
4222 \begin_inset Flex MenuItem
4223 status collapsed
4224
4225 \begin_layout Plain Layout
4226 TeX Code
4227 \end_layout
4228
4229 \end_inset
4230
4231 .
4232  For example, this item was started with 
4233 \begin_inset Flex Code
4234 status collapsed
4235
4236 \begin_layout Plain Layout
4237 [
4238 \backslash
4239 (
4240 \backslash
4241 star
4242 \backslash
4243 )]
4244 \end_layout
4245
4246 \end_inset
4247
4248 .
4249 \end_layout
4250
4251 \begin_layout Plain Layout
4252 \begin_inset ERT
4253 status open
4254
4255 \begin_layout Plain Layout
4256
4257
4258 \backslash
4259 renewcommand
4260 \backslash
4261 labelitemi[0]{
4262 \backslash
4263 savelabelitemi}
4264 \end_layout
4265
4266 \end_inset
4267
4268
4269 \end_layout
4270
4271 \begin_layout Plain Layout
4272 You'll also need to revert the labelitem back to its previous setting for
4273  the global bullet shape settings to remain in effect.
4274  The way used here was:
4275 \end_layout
4276
4277 \begin_layout LyX-Code
4278
4279 \backslash
4280 renewcommand
4281 \backslash
4282 labelitemi[0]{
4283 \backslash
4284 savelabelitemi}
4285 \end_layout
4286
4287 \end_inset
4288
4289
4290 \end_layout
4291
4292 \begin_layout Chapter
4293 LyX and the World Wide Web
4294 \end_layout
4295
4296 \begin_layout Standard
4297 LyX has long supported the export of documents to various web-friendly formats,
4298  such as HTML.
4299  Before verson 2.0, however, HTML export was always accomplished by the use
4300  of external converters.
4301 \begin_inset Foot
4302 status collapsed
4303
4304 \begin_layout Plain Layout
4305 For details on the use of external converters with LyX, see the 
4306 \emph on
4307 Converters
4308 \emph default
4309  section of the Customization manual.
4310 \end_layout
4311
4312 \end_inset
4313
4314  These fall into two large groups: there are converters that use LaTeX as
4315  an intermediate format, such as 
4316 \begin_inset Flex Code
4317 status collapsed
4318
4319 \begin_layout Plain Layout
4320 htlatex
4321 \end_layout
4322
4323 \end_inset
4324
4325
4326 \begin_inset Flex Code
4327 status collapsed
4328
4329 \begin_layout Plain Layout
4330 html2latex
4331 \end_layout
4332
4333 \end_inset
4334
4335 , and 
4336 \begin_inset Flex Code
4337 status collapsed
4338
4339 \begin_layout Plain Layout
4340 plastex
4341 \end_layout
4342
4343 \end_inset
4344
4345 , relying upon LyX to produce the LaTeX; and there is a converter that works
4346  directly on LyX files, 
4347 \begin_inset Flex Code
4348 status collapsed
4349
4350 \begin_layout Plain Layout
4351 eLyXer
4352 \end_layout
4353
4354 \end_inset
4355
4356 .
4357  All of these have different advantages and disadvantages.
4358  
4359 \end_layout
4360
4361 \begin_layout Standard
4362 The LaTeX-based converters have the advantage that, in principle, they know
4363  everything about the exported document that LaTeX does.
4364  Such converters do not care, for example, if a certain block of code was
4365  produced by LyX or was Evil Red Text.
4366  These converters know about 
4367 \begin_inset Flex Code
4368 status collapsed
4369
4370 \begin_layout Plain Layout
4371 aux
4372 \end_layout
4373
4374 \end_inset
4375
4376  files, counters, and references, and can often make use of the 
4377 \begin_inset Flex Code
4378 status collapsed
4379
4380 \begin_layout Plain Layout
4381 bbl
4382 \end_layout
4383
4384 \end_inset
4385
4386  files generated by BibTeX.
4387  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4388  said that only TeX itself understands TeX---and LaTeX-based converters
4389  will often choke on what seem to be quite simple constructs; complex ones
4390  can throw them completely, and as of this writing, for example, the 
4391 \emph on
4392 Embedded Objects
4393 \emph default
4394  manual will not export with 
4395 \begin_inset Flex Code
4396 status collapsed
4397
4398 \begin_layout Plain Layout
4399 htlatex
4400 \end_layout
4401
4402 \end_inset
4403
4404 , though the others will.
4405  The other issue concerns how math is handled.
4406  These converters typically convert the formulae into little pictures that
4407  are then linked from the HTML document.
4408  Since these are actually generated by LaTeX, they are accurate.
4409  But they do not scale well, and just getting them to look as if they are
4410  actually meant to be in your document---so that the font sizes seem to
4411  be roughly the same---can be a challenge.
4412 \end_layout
4413
4414 \begin_layout Standard
4415 Alex Fernandez's 
4416 \begin_inset Flex Code
4417 status collapsed
4418
4419 \begin_layout Plain Layout
4420 eLyXer
4421 \end_layout
4422
4423 \end_inset
4424
4425  (
4426 \begin_inset CommandInset href
4427 LatexCommand href
4428 name "http://elyxer.nongnu.org/"
4429 target "http://elyxer.nongnu.org/"
4430
4431 \end_inset
4432
4433 ) solves some of these problems.
4434  In particular, the formulae it produces scale perfectly, since it renders
4435  math using a combination of HTML and CSS rather than converting the formulae
4436  to images.
4437  But even moderately complex formula are rendered less well than with 
4438 \begin_inset Flex Code
4439 status collapsed
4440
4441 \begin_layout Plain Layout
4442 htlatex
4443 \end_layout
4444
4445 \end_inset
4446
4447 ; this reflects the limitations of HTML.
4448 \begin_inset Foot
4449 status collapsed
4450
4451 \begin_layout Plain Layout
4452 That said, 
4453 \begin_inset Flex Code
4454 status collapsed
4455
4456 \begin_layout Plain Layout
4457 eLyXer
4458 \end_layout
4459
4460 \end_inset
4461
4462  can also use jsMath and MathJax for equations, but this setting is only
4463  available globally and requires one to have access to a server that runs
4464  the backend.
4465 \end_layout
4466
4467 \end_inset
4468
4469  More importantly (as of version 1.1.1, at least), 
4470 \begin_inset Flex Code
4471 status collapsed
4472
4473 \begin_layout Plain Layout
4474 eLyXer
4475 \end_layout
4476
4477 \end_inset
4478
4479  has limited support for math macros and no support for user-defined paragraph
4480  or character styles.
4481  These limitations make 
4482 \begin_inset Flex Code
4483 status collapsed
4484
4485 \begin_layout Plain Layout
4486 eLyXer
4487 \end_layout
4488
4489 \end_inset
4490
4491  unsuitable for many of the documents LyX users produce.
4492  In principle, of course, these problems could be solved, but the LyX developers
4493  have decided to follow a different path and have made LyX itself capable
4494  of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4495  plaintext.
4496 \end_layout
4497
4498 \begin_layout Standard
4499 As of this writing, XHTML output remains under development and should probably
4500  be regarded as 
4501 \begin_inset Quotes eld
4502 \end_inset
4503
4504 experimental
4505 \begin_inset Quotes erd
4506 \end_inset
4507
4508 .
4509 \begin_inset Foot
4510 status collapsed
4511
4512 \begin_layout Plain Layout
4513 The file 
4514 \begin_inset Flex Code
4515 status collapsed
4516
4517 \begin_layout Plain Layout
4518 development/HTML.notes
4519 \end_layout
4520
4521 \end_inset
4522
4523 , which can be found in the LyX source tree or 
4524 \begin_inset CommandInset href
4525 LatexCommand href
4526 name "accessed online"
4527 target "http://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
4528
4529 \end_inset
4530
4531 , usually contains up-to-date information about the state of XHTML output.
4532  See also the list of XHTML bugs on 
4533 \begin_inset CommandInset href
4534 LatexCommand href
4535 name "the bug tracker"
4536 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"
4537
4538 \end_inset
4539
4540 .
4541 \end_layout
4542
4543 \end_inset
4544
4545  Still, the developers have chosen this approach because it has several
4546  potential advantages over the other two.
4547 \end_layout
4548
4549 \begin_layout Standard
4550 These advantages are primarily due to the fact that the XHTML output routines,
4551  since they are part of LyX, know everything LyX knows about the document
4552  being exported.
4553 \begin_inset Foot
4554 status collapsed
4555
4556 \begin_layout Plain Layout
4557 Another advantage is that, since these routines are internal to LyX, they
4558  are immune to changes in LyX's file format, or to changes in the semantics
4559  of existing insets.
4560 \end_layout
4561
4562 \end_inset
4563
4564  So they know about the table of contents (as displayed in the outline),
4565  about the counters associated with different paragraph styles, and about
4566  user-defined styles.
4567  The XHTML output routines know what LyX knows about internationalization,
4568  too, so they will output 
4569 \begin_inset Quotes eld
4570 \end_inset
4571
4572 Chapter 1
4573 \begin_inset Quotes erd
4574 \end_inset
4575
4576  or 
4577 \begin_inset Quotes eld
4578 \end_inset
4579
4580
4581 \lang ngerman
4582 Kapitel
4583 \lang english
4584  1
4585 \begin_inset Quotes erd
4586 \end_inset
4587
4588 , depending upon the language in effect at the time.
4589  
4590 \end_layout
4591
4592 \begin_layout Standard
4593 Quite generally, the output routines know what LyX knows about document
4594  layout, that is, about how the document is to be rendered on screen.
4595  We use this information when we output the document as XHTML.
4596  In particular, LyX 
4597 \emph on
4598 automatically
4599 \emph default
4600  generates CSS style information corresponding to the layout information
4601  it uses to render the document on screen: if section headings are supposed
4602  to be sans-serif and bold as seen in LyX, then (by default) they will be
4603  sans-serif and bold when viewed in a web browser, too.
4604  And this is true not just for pre-defined styles, like Section, but for
4605  any style, including user-defined styles.
4606  Indeed, the XHTML output routines make no distinction between user-defined
4607  paragraph and character styles and LyX's own pre-defined styles: in each
4608  case, everything LyX knows about the styles is contained in the layout
4609  files.
4610  And much the same is true as regards pre-defined textual insets, such as
4611  footnotes, and various custom insets.
4612  
4613 \end_layout
4614
4615 \begin_layout Standard
4616 The result is that XHTML output can be customized and extended in exactly
4617  the same way LaTeX output can be customized and extended: through layout
4618  files and modules.
4619  See chapter five of the 
4620 \emph on
4621 Customization 
4622 \emph default
4623 manual for the details.
4624 \end_layout
4625
4626 \begin_layout Standard
4627 The remainder of this chapter contains more detailed information on XHTML
4628  output, its limitations, and ways to work around those limitations.
4629 \end_layout
4630
4631 \begin_layout Section
4632 Math Output in XHTML
4633 \end_layout
4634
4635 \begin_layout Standard
4636 LyX offers four choices for how math is rendered.
4637  These have various advantages and disadvantages:
4638 \end_layout
4639
4640 \begin_layout Itemize
4641 MathML
4642 \begin_inset Newline newline
4643 \end_inset
4644
4645 MathML is a dialect of XML designed specifically for mathematics on the
4646  web, and it typically renders very well in browsers that support it.
4647  The disadvantage is that not all browsers support MathML, and support is
4648  not complete even in the Gecko-based browsers, such as Firefox.
4649 \begin_inset Newline newline
4650 \end_inset
4651
4652 If LyX is unable to render a formula as MathML---for example, if the formula
4653  uses the 
4654 \begin_inset Flex Code
4655 status collapsed
4656
4657 \begin_layout Plain Layout
4658 xymatrix
4659 \end_layout
4660
4661 \end_inset
4662
4663  package or ERT---then it will instead output the formula as an image.
4664  
4665 \end_layout
4666
4667 \begin_layout Itemize
4668 HTML
4669 \begin_inset Newline newline
4670 \end_inset
4671
4672 As mentioned above, 
4673 \begin_inset Flex Code
4674 status collapsed
4675
4676 \begin_layout Plain Layout
4677 elyxer
4678 \end_layout
4679
4680 \end_inset
4681
4682  outputs math as HTML, styled by CSS.
4683 \begin_inset Foot
4684 status collapsed
4685
4686 \begin_layout Plain Layout
4687 LyX has borrowed some of the CSS for its HTML output from 
4688 \begin_inset Flex Code
4689 status collapsed
4690
4691 \begin_layout Plain Layout
4692 elyxer
4693 \end_layout
4694
4695 \end_inset
4696
4697 .
4698 \end_layout
4699
4700 \end_inset
4701
4702  For simple formulae, this can work quite well, though with more complicated
4703  formulae it tends to break down.
4704  Still, this method has the advantage that it is very widely supported and
4705  so it may be appropriate for documents that contain only a little, fairly
4706  simple math.
4707 \begin_inset Newline newline
4708 \end_inset
4709
4710 If Lyx is unable to render a formula as HTML---for example, if the formula
4711  uses the 
4712 \begin_inset Flex Code
4713 status collapsed
4714
4715 \begin_layout Plain Layout
4716 xymatrix
4717 \end_layout
4718
4719 \end_inset
4720
4721  package or ERT---then it will instead output the formula as an image.
4722  
4723 \end_layout
4724
4725 \begin_layout Itemize
4726 Images
4727 \begin_inset Newline newline
4728 \end_inset
4729
4730 Like 
4731 \begin_inset Flex Code
4732 status collapsed
4733
4734 \begin_layout Plain Layout
4735 htlatex
4736 \end_layout
4737
4738 \end_inset
4739
4740 , LyX will output formulae as images, the very same images, in fact, that
4741  are used for instant preview.
4742 \begin_inset Foot
4743 status collapsed
4744
4745 \begin_layout Plain Layout
4746 Instant preview does 
4747 \emph on
4748 not 
4749 \emph default
4750 have to be on for images to be output, however.
4751 \end_layout
4752
4753 \end_inset
4754
4755  The advantage to this method is that the images are simply generated by
4756  LaTeX, so they are very accurate.
4757  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4758  so they do not scale terribly well, and one cannot copy them, etc.
4759  (As of this writing, there are also problems about equation numbering.
4760  See 
4761 \begin_inset CommandInset href
4762 LatexCommand href
4763 name "bug 6894"
4764 target "http://www.lyx.org/trac/ticket/6894"
4765
4766 \end_inset
4767
4768 .)
4769 \begin_inset Newline newline
4770 \end_inset
4771
4772 The size of the images can be controlled by setting the 
4773 \begin_inset Quotes eld
4774 \end_inset
4775
4776 Math Images Scaling
4777 \begin_inset Quotes erd
4778 \end_inset
4779
4780  parameter under 
4781 \begin_inset Flex MenuItem
4782 status collapsed
4783
4784 \begin_layout Plain Layout
4785 Document\SpecialChar \menuseparator
4786 Settings\SpecialChar \menuseparator
4787 Output
4788 \end_layout
4789
4790 \end_inset
4791
4792 .
4793 \begin_inset Foot
4794 status collapsed
4795
4796 \begin_layout Plain Layout
4797 For those who want to know, this controls the resolution of the image in
4798  dots per inch and is based upon a default of 75 dpi.
4799 \end_layout
4800
4801 \end_inset
4802
4803
4804 \begin_inset Newline newline
4805 \end_inset
4806
4807 If LyX for some reason fails to create an image for a formula (e.g., if a
4808  required LaTeX package is not installed), then it will fall back to outputing
4809  the raw LaTeX.
4810 \end_layout
4811
4812 \begin_layout Itemize
4813 LaTeX
4814 \begin_inset Newline newline
4815 \end_inset
4816
4817 Finally, LyX will happily output math as LaTeX.
4818  As well as being the output of last resort, this method can be used with
4819  such tools as 
4820 \begin_inset CommandInset href
4821 LatexCommand href
4822 name "jsMath"
4823 target "http://www.math.union.edu/~dpvc/jsMath/"
4824
4825 \end_inset
4826
4827 , which uses JavaScript to render LaTeX embedded in HTML documents.
4828  LyX wraps the LaTeX in either a 
4829 \begin_inset Flex Code
4830 status collapsed
4831
4832 \begin_layout Plain Layout
4833 span
4834 \end_layout
4835
4836 \end_inset
4837
4838  (for inline formulas) or 
4839 \begin_inset Flex Code
4840 status collapsed
4841
4842 \begin_layout Plain Layout
4843 div
4844 \end_layout
4845
4846 \end_inset
4847
4848  (for displayed formulas) with 
4849 \begin_inset Flex Code
4850 status collapsed
4851
4852 \begin_layout Plain Layout
4853 class='math'
4854 \end_layout
4855
4856 \end_inset
4857
4858 , as is required for jsMath.
4859 \end_layout
4860
4861 \begin_layout Standard
4862 One of these output methods must be selected under 
4863 \begin_inset Flex MenuItem
4864 status collapsed
4865
4866 \begin_layout Plain Layout
4867 Document\SpecialChar \menuseparator
4868 Settings\SpecialChar \menuseparator
4869 Output
4870 \end_layout
4871
4872 \end_inset
4873
4874 .
4875  By default, LyX outputs MathML.
4876  This is a document-wide setting, therefore.
4877 \end_layout
4878
4879 \begin_layout Standard
4880 Eventually, LyX will offer the user the option to select an alternate output
4881  method for a particular inset, say, one that isn't being rendered very
4882  well by MathML.
4883 \begin_inset Foot
4884 status collapsed
4885
4886 \begin_layout Plain Layout
4887 That said, since LyX falls back to images if the inset contains ERT, then
4888  one can force output as an image by putting some harmless ERT into the
4889  math, for example: 
4890 \begin_inset Formula $a=b\relax$
4891 \end_inset
4892
4893 .
4894 \end_layout
4895
4896 \end_inset
4897
4898
4899 \end_layout
4900
4901 \begin_layout Section
4902 Bibliography and Citations
4903 \end_layout
4904
4905 \begin_layout Standard
4906 XHTML output fully supports bibliographies and citations.
4907  
4908 \end_layout
4909
4910 \begin_layout Standard
4911 Citation labels are generated by the same machinery that generates LyX's
4912  on-screen labels, so the labels will look in the output much as they do
4913  in LyX, though better.
4914  If you are using numerical citations, then LyX will output numerical labels,
4915  such as [1] or [17], rather than simply showing the citation key in square
4916  brackets, as it does on-screen.
4917  If you are using author-year citations, then LyX will add lowercase letters
4918  to the years, just as BibTeX does, if it finds more than one citation for
4919  a given author-year combination.
4920  The labels will be printed with the bibliography entries.
4921  Note that there is, at present, no way to customize the appearance of the
4922  labels, for example, to choose between square brackets and parentheses.
4923 \end_layout
4924
4925 \begin_layout Standard
4926 Bibliography output is handled by the same machinery that handles the presentati
4927 on of reference information in the citation dialog, so you will see in the
4928  XHTML output pretty much what you would see if you were to look at a given
4929  entry in the citation dialog.
4930  The formatting can be customized in your layout file or, preferably, in
4931  a module.
4932  See the 
4933 \emph on
4934 Customization
4935 \emph default
4936  manual for the details.
4937 \end_layout
4938
4939 \begin_layout Standard
4940 The main defect at present is that cross-referenced information is printed
4941  with every entry with which it is associated.
4942  So you can see things like this:
4943 \end_layout
4944
4945 \begin_layout Quote
4946 Jason Stanley, 
4947 \begin_inset Quotes eld
4948 \end_inset
4949
4950 Context and Logical Form
4951 \begin_inset Quotes erd
4952 \end_inset
4953
4954 , in 
4955 \emph on
4956 Language in Context: Selected Essays
4957 \emph default
4958  (Oxford: Oxford University Press, 2007), pp.
4959  30--68.
4960 \end_layout
4961
4962 \begin_layout Quote
4963 Jason Stanley, 
4964 \begin_inset Quotes eld
4965 \end_inset
4966
4967 Semantics in Context
4968 \begin_inset Quotes erd
4969 \end_inset
4970
4971 , in 
4972 \emph on
4973 Language in Context: Selected Essays
4974 \emph default
4975  (Oxford: Oxford University Press, 2007), pp.
4976  201--30.
4977 \end_layout
4978
4979 \begin_layout Standard
4980 This should be fixed before long.
4981 \end_layout
4982
4983 \begin_layout Standard
4984 There is no support at present for sectioned bibliographies.
4985  If you have multiple bibliographies, then LyX will print the same bibliography
4986  over and over.
4987 \end_layout
4988
4989 \begin_layout Section
4990 Indexes
4991 \end_layout
4992
4993 \begin_layout Standard
4994 LyX will happily export indexes as XHTML, but with certain limitations at
4995  the moment.
4996 \end_layout
4997
4998 \begin_layout Standard
4999 Index export will be most reliable when you do not attempt to use the fancy
5000  constructs that are described in the section on indexes in the 
5001 \emph on
5002 User's Guide
5003 \emph default
5004 .
5005 \begin_inset Foot
5006 status collapsed
5007
5008 \begin_layout Plain Layout
5009 The main issue here is that LyX itself does not really handle these.
5010  It just lets you enter what you would have to enter in raw LaTeX.
5011 \end_layout
5012
5013 \end_inset
5014
5015  We'll describe how they are handled using the subsection headings from
5016  that section.
5017 \end_layout
5018
5019 \begin_layout Itemize
5020 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5021  these, but the entries must be separated by 
5022 \begin_inset Quotes eld
5023 \end_inset
5024
5025  ! 
5026 \begin_inset Quotes erd
5027 \end_inset
5028
5029 , that is, there must be spaces around the exclamation point.
5030  This is because it is otherwise too difficult to check for escaped exclamation
5031  points, ones in math, and so forth.
5032 \end_layout
5033
5034 \begin_layout Itemize
5035 Page Ranges: There is no support at all for page ranges, since these make
5036  no sense with XHMTL.
5037  Instead, you will just get two index entries, one at either end.
5038 \end_layout
5039
5040 \begin_layout Itemize
5041 Cross-referencing: There is no support for cross-referencing.
5042  If LyX finds an entry containing the 
5043 \begin_inset Quotes eld
5044 \end_inset
5045
5046 |see\SpecialChar \ldots{}
5047
5048 \begin_inset Quotes erd
5049 \end_inset
5050
5051  construct, it is just dropped, and the rest is treated as an ordinary index
5052  entry.
5053 \end_layout
5054
5055 \begin_layout Itemize
5056 Index Entry Order: LyX does support attempts to fix the sorting order.
5057  It will take what is before the first `@' it finds and use that for sorting,
5058  taking what follows the first `@' to be the actual entry.
5059  At present, LyX does not check for escaped `@', so do not try to index
5060  email addresses.
5061 \end_layout
5062
5063 \begin_layout Itemize
5064 Index Entry Layout: You can format entries by using the text style dialog,
5065  or by using any other method available within LyX itself.
5066  There is no support for constructs like: 
5067 \begin_inset Quotes eld
5068 \end_inset
5069
5070 entry|textbf
5071 \begin_inset Quotes erd
5072 \end_inset
5073
5074 .
5075  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5076  and everything that follows it.
5077 \end_layout
5078
5079 \begin_layout Itemize
5080 Multiple Indexes: There is no support for multiple indexes.
5081  Rather, all index entries will be printed as one large index.
5082  To avoid our printing several versions of the index, we print only the
5083  main index, so make sure you have one.
5084 \end_layout
5085
5086 \begin_layout Section
5087 Nomenclature and Glossary
5088 \end_layout
5089
5090 \begin_layout Standard
5091 There is at present no support for glossaries.
5092  Adding it would be fairly trivial, and welcome.
5093 \end_layout
5094
5095 \begin_layout Chapter
5096 The LyX Server
5097 \end_layout
5098
5099 \begin_layout Section
5100 Introduction
5101 \end_layout
5102
5103 \begin_layout Standard
5104 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5105  and retrieve information about the LyX internal state.
5106  This is only intended for advanced users, but they should find it useful.
5107  It is by writing to the LyX server, for example, that bibliography managers,
5108  such as JabRef, are able to 
5109 \begin_inset Quotes eld
5110 \end_inset
5111
5112 push
5113 \begin_inset Quotes erd
5114 \end_inset
5115
5116  citations to LyX.
5117 \end_layout
5118
5119 \begin_layout Section
5120 Starting the LyX Server
5121 \end_layout
5122
5123 \begin_layout Standard
5124 The LyX server works through the use of a pair of named pipes.
5125  These are usually located in 
5126 \begin_inset Flex Code
5127 status collapsed
5128
5129 \begin_layout Plain Layout
5130 UserDir
5131 \end_layout
5132
5133 \end_inset
5134
5135 , (except on Windows, where 
5136 \emph on
5137 local
5138 \emph default
5139  named pipes are special objects located in 
5140 \begin_inset Flex Code
5141 status collapsed
5142
5143 \begin_layout Plain Layout
5144
5145 \backslash
5146
5147 \backslash
5148 .
5149 \backslash
5150 pipe
5151 \end_layout
5152
5153 \end_inset
5154
5155 ) and have the names 
5156 \begin_inset Quotes eld
5157 \end_inset
5158
5159
5160 \begin_inset Flex Code
5161 status collapsed
5162
5163 \begin_layout Plain Layout
5164 lyxpipe.in
5165 \end_layout
5166
5167 \end_inset
5168
5169
5170 \begin_inset Quotes erd
5171 \end_inset
5172
5173  and 
5174 \begin_inset Quotes eld
5175 \end_inset
5176
5177
5178 \begin_inset Flex Code
5179 status collapsed
5180
5181 \begin_layout Plain Layout
5182 lyxpipe.out
5183 \end_layout
5184
5185 \end_inset
5186
5187
5188 \begin_inset Quotes erd
5189 \end_inset
5190
5191 .
5192  External programs write into 
5193 \begin_inset Flex Code
5194 status collapsed
5195
5196 \begin_layout Plain Layout
5197 lyxpipe.in
5198 \end_layout
5199
5200 \end_inset
5201
5202  and read back data from 
5203 \begin_inset Flex Code
5204 status collapsed
5205
5206 \begin_layout Plain Layout
5207 lyxpipe.out
5208 \end_layout
5209
5210 \end_inset
5211
5212 .
5213  The stem of the pipe names can be defined in the 
5214 \begin_inset Flex MenuItem
5215 status collapsed
5216
5217 \begin_layout Plain Layout
5218 Tools\SpecialChar \menuseparator
5219 Preferences
5220 \end_layout
5221
5222 \end_inset
5223
5224  dialog, for example 
5225 \begin_inset Flex Code
5226 status collapsed
5227
5228 \begin_layout Plain Layout
5229 "/home/myhome/lyxpipe"
5230 \end_layout
5231
5232 \end_inset
5233
5234 , or 
5235 \begin_inset Flex Code
5236 status collapsed
5237
5238 \begin_layout Plain Layout
5239 "
5240 \backslash
5241
5242 \backslash
5243 .
5244 \backslash
5245 pipe
5246 \backslash
5247 lyxpipe"
5248 \end_layout
5249
5250 \end_inset
5251
5252  on Windows (but any working path can be used).
5253  You 
5254 \emph on
5255 must
5256 \emph default
5257  configure this manually in order for the server to start.
5258 \end_layout
5259
5260 \begin_layout Standard
5261 LyX will add the '
5262 \begin_inset Flex Code
5263 status collapsed
5264
5265 \begin_layout Plain Layout
5266 .in
5267 \end_layout
5268
5269 \end_inset
5270
5271 ' and '
5272 \begin_inset Flex Code
5273 status collapsed
5274
5275 \begin_layout Plain Layout
5276 .out
5277 \end_layout
5278
5279 \end_inset
5280
5281 ' to create the pipes.
5282  If one of the pipes already exists, LyX will assume that another LyX process
5283  is already running and will not start the server.
5284  On POSIX (Unix like) systems, if for some other reason, an unused 
5285 \begin_inset Quotes eld
5286 \end_inset
5287
5288 stale
5289 \begin_inset Quotes erd
5290 \end_inset
5291
5292  pipe is left in existence when LyX closes, then LyX will try to delete
5293  it.
5294  If this fails for some reason, you will need to delete the pipes manually
5295  and then restart LyX.
5296  On Windows, pipes are deleted by the OS on program termination or crash,
5297  so 
5298 \begin_inset Quotes eld
5299 \end_inset
5300
5301 stale
5302 \begin_inset Quotes erd
5303 \end_inset
5304
5305  pipes should not be possible.
5306 \end_layout
5307
5308 \begin_layout Standard
5309 To have several LyX processes with servers at the same time, you have to
5310  use different configurations, perhaps by using separate user directories,
5311  each with its own 
5312 \begin_inset Flex Code
5313 status collapsed
5314
5315 \begin_layout Plain Layout
5316 preferences
5317 \end_layout
5318
5319 \end_inset
5320
5321  file, for each process.
5322 \end_layout
5323
5324 \begin_layout Standard
5325 If you are developing a client program, you might find it useful to enable
5326  debugging information from the LyX server.
5327  Do this by starting LyX as 
5328 \begin_inset Flex Code
5329 status collapsed
5330
5331 \begin_layout Plain Layout
5332 lyx -dbg lyxserver
5333 \end_layout
5334
5335 \end_inset
5336
5337 .
5338 \end_layout
5339
5340 \begin_layout Standard
5341 You can find a complete example client written in C in the source distribution
5342  as 
5343 \begin_inset Flex Code
5344 status collapsed
5345
5346 \begin_layout Plain Layout
5347 development/lyxserver/server_monitor.c
5348 \end_layout
5349
5350 \end_inset
5351
5352 .
5353 \end_layout
5354
5355 \begin_layout Standard
5356 Another useful tool is the command-line based clientfound in 
5357 \begin_inset Flex Code
5358 status collapsed
5359
5360 \begin_layout Plain Layout
5361 src/client/lyxclient
5362 \end_layout
5363
5364 \end_inset
5365
5366 .
5367 \end_layout
5368
5369 \begin_layout Section
5370 Normal communication
5371 \end_layout
5372
5373 \begin_layout Standard
5374 To issue a LyX call, the client writes a line of ASCII text into the input
5375  pipe.
5376  This line has the following format:
5377 \end_layout
5378
5379 \begin_layout Quote
5380 LYXCMD:
5381 \emph on
5382 clientname
5383 \emph default
5384 :
5385 \emph on
5386 function
5387 \emph default
5388 :
5389 \emph on
5390 argument
5391 \end_layout
5392
5393 \begin_layout Description
5394 clientname is a name that the client can choose arbitrarily.
5395  Its only use is that LyX will echo it if it sends an answer—so a client
5396  can dispatch results from different requesters.
5397 \end_layout
5398
5399 \begin_layout Description
5400 function is the function you want LyX to perform.
5401  It is the same as the commands you'd use in the minibuffer.
5402 \end_layout
5403
5404 \begin_layout Description
5405 argument is an optional argument which is meaningful only to some functions
5406  (for instance, the 
5407 \begin_inset Quotes eld
5408 \end_inset
5409
5410 self-insert
5411 \begin_inset Quotes erd
5412 \end_inset
5413
5414  LFUN will insert the argument as text at the cursor position).
5415 \end_layout
5416
5417 \begin_layout Standard
5418 The answer from LyX will arrive in the output pipe and be of the form
5419 \end_layout
5420
5421 \begin_layout Quote
5422 INFO:
5423 \emph on
5424 clientname
5425 \emph default
5426 :
5427 \emph on
5428 function
5429 \emph default
5430 :
5431 \emph on
5432 data
5433 \end_layout
5434
5435 \begin_layout Standard
5436 where 
5437 \emph on
5438 clientname
5439 \emph default
5440  and 
5441 \emph on
5442 function
5443 \emph default
5444  are just echoed from the command request, while 
5445 \emph on
5446 data
5447 \emph default
5448  is more or less useful information filled according to how the command
5449  execution worked out.
5450  Some commands, such as 
5451 \begin_inset Quotes eld
5452 \end_inset
5453
5454 font-state
5455 \begin_inset Quotes erd
5456 \end_inset
5457
5458 , will return information about the internal state of LyX, while other will
5459  return an empty data-response.
5460  This means that the command execution went fine.
5461 \end_layout
5462
5463 \begin_layout Standard
5464 In case of errors, the response from LyX will have this form
5465 \end_layout
5466
5467 \begin_layout Quote
5468 ERROR:
5469 \emph on
5470 clientname
5471 \emph default
5472 :
5473 \emph on
5474 function
5475 \emph default
5476 :
5477 \emph on
5478 error message
5479 \end_layout
5480
5481 \begin_layout Standard
5482 where the 
5483 \emph on
5484 error message
5485 \emph default
5486  should contain an explanation of why the command failed.
5487 \end_layout
5488
5489 \begin_layout Standard
5490 Examples:
5491 \end_layout
5492
5493 \begin_layout LyX-Code
5494 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5495 \begin_inset Newline newline
5496 \end_inset
5497
5498 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5499 \begin_inset Newline newline
5500 \end_inset
5501
5502 read a <~/.lyxpipe.out
5503 \begin_inset Newline newline
5504 \end_inset
5505
5506 echo $a
5507 \end_layout
5508
5509 \begin_layout Section
5510 Notification
5511 \end_layout
5512
5513 \begin_layout Standard
5514 LyX can notify clients of events going on asynchronously.
5515  Currently it will only do this if the user binds a key sequence with the
5516  function 
5517 \begin_inset Quotes eld
5518 \end_inset
5519
5520 notify
5521 \begin_inset Quotes erd
5522 \end_inset
5523
5524 .
5525  The format of the string LyX sends is as follows:
5526 \end_layout
5527
5528 \begin_layout Quote
5529 \begin_inset Flex Code
5530 status collapsed
5531
5532 \begin_layout Plain Layout
5533 NOTIFY:
5534 \end_layout
5535
5536 \end_inset
5537
5538
5539 \emph on
5540 key-sequence
5541 \end_layout
5542
5543 \begin_layout Standard
5544 where 
5545 \emph on
5546 key-sequence
5547 \emph default
5548  is the printed representation of the key sequence that was actually typed
5549  by the user.
5550 \end_layout
5551
5552 \begin_layout Standard
5553 This mechanism can be used to extend LyX's command set and implement macros.
5554  Bind some key sequence to 
5555 \begin_inset Quotes eld
5556 \end_inset
5557
5558 notify
5559 \begin_inset Quotes erd
5560 \end_inset
5561
5562 .
5563  Then start a client that listens on the output pipe, dispatches the command
5564  according to the sequence, and starts a function that may use LyX calls
5565  and LyX requests to issue a command or a series of commands to LyX.
5566 \end_layout
5567
5568 \begin_layout Section
5569 The simple LyX Server Protocol
5570 \end_layout
5571
5572 \begin_layout Standard
5573 LyX implements a simple protocol that can be used for session management.
5574  All messages are of the form
5575 \end_layout
5576
5577 \begin_layout Quote
5578 LYXSRV:
5579 \emph on
5580 clientname
5581 \emph default
5582 :
5583 \emph on
5584 protocol message
5585 \end_layout
5586
5587 \begin_layout Standard
5588 where 
5589 \emph on
5590 protocol message
5591 \emph default
5592  can be 
5593 \begin_inset Quotes eld
5594 \end_inset
5595
5596 hello
5597 \begin_inset Quotes erd
5598 \end_inset
5599
5600  or 
5601 \begin_inset Quotes eld
5602 \end_inset
5603
5604 bye
5605 \begin_inset Quotes erd
5606 \end_inset
5607
5608 .
5609  If 
5610 \begin_inset Quotes eld
5611 \end_inset
5612
5613 hello
5614 \begin_inset Quotes erd
5615 \end_inset
5616
5617  is received from a client, LyX will report back to inform the client that
5618  it's listening to it's messages, while 
5619 \begin_inset Quotes eld
5620 \end_inset
5621
5622 bye
5623 \begin_inset Quotes erd
5624 \end_inset
5625
5626  sent from LyX will inform clients that LyX is closing.
5627 \end_layout
5628
5629 \begin_layout Section
5630 Reverse DVI/PDF search
5631 \end_layout
5632
5633 \begin_layout Standard
5634 Some DVI/PDF viewers
5635 \begin_inset Foot
5636 status collapsed
5637
5638 \begin_layout Plain Layout
5639 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5640  Skim on Mac OSX and SumatraPDF on Windows.
5641 \end_layout
5642
5643 \end_inset
5644
5645  provide 
5646 \emph on
5647 reverse search
5648 \emph default
5649  facility (also called 
5650 \emph on
5651 inverse search
5652 \emph default
5653 ).
5654  This means that you can tell LyX to put the cursor to a specific line in
5655  the document by clicking at the respective position in the DVI/PDF output.
5656  To achieve this, the viewer must be able to communicate with LyX.
5657  This is done via the LyX server either by using the named pipe (
5658 \emph on
5659 lyxpipe
5660 \emph default
5661 ), or the UNIX domain socket (
5662 \emph on
5663 lyxsocket
5664 \emph default
5665 ) that LyX creates in its temporary directory (this is the way the 
5666 \begin_inset Flex Code
5667 status collapsed
5668
5669 \begin_layout Plain Layout
5670 lyxclient
5671 \end_layout
5672
5673 \end_inset
5674
5675  program communicates with LyX).
5676  In some cases, you need a helper script that mediates between the viewer
5677  and LyX, in others, the viewer can communicate with LyX directly.
5678  This depends on the selected viewer and on your operating system.
5679  The same applies to the way viewers need to be configured and the way the
5680  reverse search is actually performed.
5681  In what follows, we will thus describe how to setup reverse search for
5682  specific viewers.
5683  Before we turn to this, though, we will explain what needs to be done generally
5684  to enable reverse search in the DVI/PDF output.
5685 \end_layout
5686
5687 \begin_layout Subsection
5688 Automatic setup
5689 \begin_inset CommandInset label
5690 LatexCommand label
5691 name "sub:rev-search"
5692
5693 \end_inset
5694
5695
5696 \end_layout
5697
5698 \begin_layout Standard
5699 In most cases LyX will do the work for you by enabling the option 
5700 \begin_inset Flex MenuItem
5701 status collapsed
5702
5703 \begin_layout Plain Layout
5704 Synchronize with Output
5705 \end_layout
5706
5707 \end_inset
5708
5709  in the menu 
5710 \begin_inset Flex MenuItem
5711 status collapsed
5712
5713 \begin_layout Plain Layout
5714 Document\SpecialChar \menuseparator
5715 Settings\SpecialChar \menuseparator
5716 Output
5717 \end_layout
5718
5719 \end_inset
5720
5721 .
5722  In such a case LyX will automatically insert the necessary SyncTeX macro
5723  (for PDF) or load the srcltx package (for DVI) respectively.
5724  This option can be easily reached also on 
5725 \begin_inset Flex Code
5726 status collapsed
5727
5728 \begin_layout Plain Layout
5729 View/Update
5730 \end_layout
5731
5732 \end_inset
5733
5734  Toolbar.
5735 \end_layout
5736
5737 \begin_layout Standard
5738 If you need a different setting, you can select or input a custom macro
5739  from the drop down box just below 
5740 \begin_inset Flex MenuItem
5741 status collapsed
5742
5743 \begin_layout Plain Layout
5744 Document\SpecialChar \menuseparator
5745 Settings\SpecialChar \menuseparator
5746 Output\SpecialChar \menuseparator
5747 Synchronize with Output
5748 \end_layout
5749
5750 \end_inset
5751
5752 .
5753 \end_layout
5754
5755 \begin_layout Standard
5756 Note that the method 
5757 \begin_inset Flex Code
5758 status collapsed
5759
5760 \begin_layout Plain Layout
5761
5762 \backslash
5763 synctex=1
5764 \end_layout
5765
5766 \end_inset
5767
5768  enables gzip compression.
5769  If your viewer does not support it, you should instead use 
5770 \begin_inset Flex Code
5771 status collapsed
5772
5773 \begin_layout Plain Layout
5774
5775 \backslash
5776 synctex=-1
5777 \end_layout
5778
5779 \end_inset
5780
5781 .
5782 \end_layout
5783
5784 \begin_layout Standard
5785 Please aöso note that including the 
5786 \begin_inset Flex Code
5787 status collapsed
5788
5789 \begin_layout Plain Layout
5790 srcltx
5791 \end_layout
5792
5793 \end_inset
5794
5795  package or 
5796 \begin_inset Flex Code
5797 status collapsed
5798
5799 \begin_layout Plain Layout
5800 src-specials
5801 \end_layout
5802
5803 \end_inset
5804
5805  sometimes has an undesired impact on the typesetting.
5806  Thus, you should switch output synchronization off for the final typesetting
5807  if you use the 
5808 \begin_inset Flex Code
5809 status collapsed
5810
5811 \begin_layout Plain Layout
5812 srcltx
5813 \end_layout
5814
5815 \end_inset
5816
5817  package or 
5818 \begin_inset Flex Code
5819 status collapsed
5820
5821 \begin_layout Plain Layout
5822 src-specials
5823 \end_layout
5824
5825 \end_inset
5826
5827 .
5828  
5829 \end_layout
5830
5831 \begin_layout Standard
5832 In case you need some more special settings that are not covered by the
5833  automatic settings, read the next section about how to set up output synchroniz
5834 ation manually.
5835  If the automatic setup suits your needs, you can readily jump to section
5836 \begin_inset space ~
5837 \end_inset
5838
5839
5840 \begin_inset CommandInset ref
5841 LatexCommand ref
5842 reference "sub:configuring-viewers"
5843
5844 \end_inset
5845
5846 , where the necessary configuration steps in your viewer -- needed both
5847  with the automatic and the manual setup -- are described.
5848 \end_layout
5849
5850 \begin_layout Subsection
5851 Manual setup
5852 \end_layout
5853
5854 \begin_layout Standard
5855 LaTeX provides several different methods for reverse search.
5856  Some are built-in in the 
5857 \begin_inset Flex Code
5858 status collapsed
5859
5860 \begin_layout Plain Layout
5861 latex/pdflatex
5862 \end_layout
5863
5864 \end_inset
5865
5866  program, some are provided by external packages.
5867  Your choice depends on whether your LaTeX distribution already provides
5868  a given method (the built-in methods are rather new) and whether your viewer
5869  can cope with it.
5870  The available methods are described in the following.
5871 \end_layout
5872
5873 \begin_layout Subsubsection*
5874 Built-in DVI-search via src-specials (DVI only) 
5875 \end_layout
5876
5877 \begin_layout Standard
5878 This method provides the DVI file with the necessary information for reverse
5879  search.
5880  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5881  distribution should include it), and it works reliably.
5882  To enable it, change the 
5883 \begin_inset Flex MenuItem
5884 status collapsed
5885
5886 \begin_layout Plain Layout
5887 LaT
5888 \begin_inset ERT
5889 status collapsed
5890
5891 \begin_layout Plain Layout
5892
5893 {}
5894 \end_layout
5895
5896 \end_inset
5897
5898 eX (plain)->DVI
5899 \end_layout
5900
5901 \end_inset
5902
5903  or 
5904 \begin_inset Flex MenuItem
5905 status collapsed
5906
5907 \begin_layout Plain Layout
5908 LaT
5909 \begin_inset ERT
5910 status collapsed
5911
5912 \begin_layout Plain Layout
5913
5914 {}
5915 \end_layout
5916
5917 \end_inset
5918
5919 eX (plain)->DraftDVI
5920 \end_layout
5921
5922 \end_inset
5923
5924  converter in 
5925 \begin_inset Flex MenuItem
5926 status collapsed
5927
5928 \begin_layout Plain Layout
5929 Preferences\SpecialChar \menuseparator
5930 File Handling\SpecialChar \menuseparator
5931 Converters
5932 \end_layout
5933
5934 \end_inset
5935
5936  to 
5937 \begin_inset Flex Code
5938 status collapsed
5939
5940 \begin_layout Plain Layout
5941 latex -src-specials $$i
5942 \end_layout
5943
5944 \end_inset
5945
5946 .
5947  If this doesn't work, check if your TeX engine needs different options
5948  (the syntax might differ in some distributions).
5949 \end_layout
5950
5951 \begin_layout Subsubsection*
5952 External Packages (PDFSync and scrltx) 
5953 \end_layout
5954
5955 \begin_layout Standard
5956 The packages 
5957 \emph on
5958 pdfsync
5959 \emph default
5960  and 
5961 \emph on
5962 scrltx
5963 \emph default
5964  provide reverse search facility for PDF output (via pdflatex) and DVI output,
5965  respectively.
5966  In order to enable it, load the packages in the LyX preamble: 
5967 \end_layout
5968
5969 \begin_layout Itemize
5970 \begin_inset Flex Code
5971 status collapsed
5972
5973 \begin_layout Plain Layout
5974
5975 \backslash
5976 usepackage{pdfsync}
5977 \end_layout
5978
5979 \end_inset
5980
5981  for reverse PDF search,
5982 \end_layout
5983
5984 \begin_layout Itemize
5985 \begin_inset Flex Code
5986 status collapsed
5987
5988 \begin_layout Plain Layout
5989
5990 \backslash
5991 usepackage[active]{srcltx}
5992 \end_layout
5993
5994 \end_inset
5995
5996  for reverse DVI search.
5997 \end_layout
5998
5999 \begin_layout Standard
6000 If you want to be able to perform both DVI and PDF reverse searches, you
6001  can also insert in the preamble the following lines
6002 \end_layout
6003
6004 \begin_layout LyX-Code
6005
6006 \backslash
6007 usepackage{ifpdf}
6008 \begin_inset Newline newline
6009 \end_inset
6010
6011
6012 \backslash
6013 ifpdf
6014 \begin_inset Newline newline
6015 \end_inset
6016
6017   
6018 \backslash
6019 usepackage{pdfsync}
6020 \begin_inset Newline newline
6021 \end_inset
6022
6023
6024 \backslash
6025 else
6026 \begin_inset Newline newline
6027 \end_inset
6028
6029   
6030 \backslash
6031 usepackage[active]{srcltx}
6032 \begin_inset Newline newline
6033 \end_inset
6034
6035
6036 \backslash
6037 fi
6038 \end_layout
6039
6040 \begin_layout Standard
6041 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6042  right package will be used.
6043 \end_layout
6044
6045 \begin_layout Standard
6046 Note that PDFSync might affect the output layout of your document.
6047  It is therefore advised to disable PDFsync for final documents.
6048 \end_layout
6049
6050 \begin_layout Subsubsection*
6051 Built-in reverse search via SyncTeX (DVI and PDF) 
6052 \end_layout
6053
6054 \begin_layout Standard
6055 Recent versions of 
6056 \begin_inset Flex Code
6057 status collapsed
6058
6059 \begin_layout Plain Layout
6060 (pdf)latex
6061 \end_layout
6062
6063 \end_inset
6064
6065  have built-in support for both PDF and DVI reverse search.
6066  This so-called 
6067 \emph on
6068 SyncTeX
6069 \emph default
6070  facility is basically the result of the integration of the PDFSync package
6071  to the pdftex program and its merge with the 
6072 \emph on
6073 scr-specials
6074 \emph default
6075  approach.
6076  You need at least TeXLive 2008 or a recent MikTeX distribution in order
6077  to use it.
6078  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6079  already provide SyncTeX support.
6080 \end_layout
6081
6082 \begin_layout Standard
6083 To enable SyncTeX for DVI output, change the 
6084 \begin_inset Flex MenuItem
6085 status collapsed
6086
6087 \begin_layout Plain Layout
6088 LaT
6089 \begin_inset ERT
6090 status collapsed
6091
6092 \begin_layout Plain Layout
6093
6094 {}
6095 \end_layout
6096
6097 \end_inset
6098
6099 eX (plain) -> DVI
6100 \end_layout
6101
6102 \end_inset
6103
6104  or 
6105 \begin_inset Flex MenuItem
6106 status collapsed
6107
6108 \begin_layout Plain Layout
6109 LaT
6110 \begin_inset ERT
6111 status collapsed
6112
6113 \begin_layout Plain Layout
6114
6115 {}
6116 \end_layout
6117
6118 \end_inset
6119
6120 eX (plain) -> DraftDVI
6121 \end_layout
6122
6123 \end_inset
6124
6125  converter in 
6126 \begin_inset Flex MenuItem
6127 status collapsed
6128
6129 \begin_layout Plain Layout
6130 Preferences\SpecialChar \menuseparator
6131 File Handling\SpecialChar \menuseparator
6132 Converters
6133 \end_layout
6134
6135 \end_inset
6136
6137  to 
6138 \begin_inset Flex Code
6139 status collapsed
6140
6141 \begin_layout Plain Layout
6142 latex -synctex=1 $$i
6143 \end_layout
6144
6145 \end_inset
6146
6147 , and for PDF output, change the 
6148 \begin_inset Flex MenuItem
6149 status collapsed
6150
6151 \begin_layout Plain Layout
6152 LaT
6153 \begin_inset ERT
6154 status collapsed
6155
6156 \begin_layout Plain Layout
6157
6158 {}
6159 \end_layout
6160
6161 \end_inset
6162
6163 eX (pdflatex) -> PDF (pdflatex)
6164 \end_layout
6165
6166 \end_inset
6167
6168  or converter to 
6169 \begin_inset Flex Code
6170 status collapsed
6171
6172 \begin_layout Plain Layout
6173 pdflatex -synctex=1 $$i
6174 \end_layout
6175
6176 \end_inset
6177
6178 .
6179  Check the documentation of your viewer whether the viewer needs to be configure
6180 d for the use with SyncTeX.
6181 \begin_inset Foot
6182 status collapsed
6183
6184 \begin_layout Plain Layout
6185 Note that the option 
6186 \begin_inset Flex Code
6187 status collapsed
6188
6189 \begin_layout Plain Layout
6190 -synctex=1
6191 \end_layout
6192
6193 \end_inset
6194
6195  option enables gzip compression.
6196  If your viewer does not support it, you should instead use 
6197 \begin_inset Flex Code
6198 status collapsed
6199
6200 \begin_layout Plain Layout
6201 -synctex=-1
6202 \end_layout
6203
6204 \end_inset
6205
6206 .
6207 \end_layout
6208
6209 \end_inset
6210
6211
6212 \end_layout
6213
6214 \begin_layout Subsection
6215 Configuring and using specific viewers
6216 \begin_inset CommandInset label
6217 LatexCommand label
6218 name "sub:configuring-viewers"
6219
6220 \end_inset
6221
6222
6223 \end_layout
6224
6225 \begin_layout Subsubsection*
6226 Xdvi (all platforms)
6227 \end_layout
6228
6229 \begin_layout Standard
6230 If you use 
6231 \begin_inset Flex Code
6232 status collapsed
6233
6234 \begin_layout Plain Layout
6235 xdvi
6236 \end_layout
6237
6238 \end_inset
6239
6240 , you don't need to do anything else for performing a reverse DVI search,
6241  as LyX already provides the necessary hooks for automatically using the
6242  
6243 \begin_inset Flex Code
6244 status collapsed
6245
6246 \begin_layout Plain Layout
6247 lyxclient
6248 \end_layout
6249
6250 \end_inset
6251
6252  program.
6253  Just setup your document as described above (reverse search is triggered
6254  by Ctrl-click or Alt-click on Mac OSX, respectively).
6255 \end_layout
6256
6257 \begin_layout Standard
6258 However, if for whatever reason you want to use the named pipe instead of
6259  the socket for communicating with LyX, simply change the DVI viewer in
6260  
6261 \begin_inset Flex MenuItem
6262 status collapsed
6263
6264 \begin_layout Plain Layout
6265 Preferences\SpecialChar \menuseparator
6266 File Handling\SpecialChar \menuseparator
6267 File formats
6268 \end_layout
6269
6270 \end_inset
6271
6272  to
6273 \begin_inset Foot
6274 status collapsed
6275
6276 \begin_layout Plain Layout
6277 On Mac OSX you have to use 
6278 \begin_inset Flex Code
6279 status collapsed
6280
6281 \begin_layout Plain Layout
6282 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6283 \end_layout
6284
6285 \end_inset
6286
6287
6288 \end_layout
6289
6290 \end_inset
6291
6292  
6293 \begin_inset Flex Code
6294 status collapsed
6295
6296 \begin_layout Plain Layout
6297 xdvi -editor 'lyxeditor.sh %f %l'
6298 \end_layout
6299
6300 \end_inset
6301
6302 , where 
6303 \begin_inset Flex Code
6304 status collapsed
6305
6306 \begin_layout Plain Layout
6307 lyxeditor.sh
6308 \end_layout
6309
6310 \end_inset
6311
6312  is a suitable script.
6313  For example, a minimal shell script is the following one:
6314 \end_layout
6315
6316 \begin_layout LyX-Code
6317 #!/bin/sh
6318 \begin_inset Newline newline
6319 \end_inset
6320
6321 LYXPIPE="/path/to/lyxpipe"
6322 \begin_inset Newline newline
6323 \end_inset
6324
6325 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6326 \begin_inset Newline newline
6327 \end_inset
6328
6329 echo "$COMMAND" > "${LYXPIPE}".in || exit
6330 \begin_inset Newline newline
6331 \end_inset
6332
6333 read < "${LYXPIPE}".out || exit
6334 \end_layout
6335
6336 \begin_layout Standard
6337 where 
6338 \begin_inset Flex Code
6339 status collapsed
6340
6341 \begin_layout Plain Layout
6342 /path/to/lyxpipe
6343 \end_layout
6344
6345 \end_inset
6346
6347  is the Ly
6348 \begin_inset ERT
6349 status collapsed
6350
6351 \begin_layout Plain Layout
6352
6353 {}
6354 \end_layout
6355
6356 \end_inset
6357
6358 XServer pipe path specified in 
6359 \begin_inset Flex MenuItem
6360 status collapsed
6361
6362 \begin_layout Plain Layout
6363 Preferences\SpecialChar \menuseparator
6364 Paths
6365 \end_layout
6366
6367 \end_inset
6368
6369 .
6370 \begin_inset Foot
6371 status collapsed
6372
6373 \begin_layout Plain Layout
6374 In the 
6375 \begin_inset Flex Code
6376 status collapsed
6377
6378 \begin_layout Plain Layout
6379 development/tools
6380 \end_layout
6381
6382 \end_inset
6383
6384  folder of a source distribution you can find a 
6385 \begin_inset Flex Code
6386 status collapsed
6387
6388 \begin_layout Plain Layout
6389 lyxeditor
6390 \end_layout
6391
6392 \end_inset
6393
6394  script which is able to locate the 
6395 \emph on
6396 lyxpipe
6397 \emph default
6398  based on your preferences.
6399 \end_layout
6400
6401 \end_inset
6402
6403
6404 \end_layout
6405
6406 \begin_layout Subsubsection*
6407 MacDviX (Mac OSX)
6408 \end_layout
6409
6410 \begin_layout Standard
6411 At the end of 
6412 \begin_inset Flex Code
6413 status collapsed
6414
6415 \begin_layout Plain Layout
6416 /Applications/MacDviX_Folder/calleditor.script
6417 \end_layout
6418
6419 \end_inset
6420
6421 , add the following lines:
6422 \end_layout
6423
6424 \begin_layout LyX-Code
6425 /Applications/Ly
6426 \begin_inset ERT
6427 status collapsed
6428
6429 \begin_layout Plain Layout
6430
6431 {}
6432 \end_layout
6433
6434 \end_inset
6435
6436 X.app/Contents/MacOS/lyxeditor "$2" $1
6437 \begin_inset Newline newline
6438 \end_inset
6439
6440 exit 1
6441 \end_layout
6442
6443 \begin_layout Standard
6444 Modify the lines accordingly if you install LyX somewhere else than in the
6445  Applications folder.
6446 \end_layout
6447
6448 \begin_layout Standard
6449 Reverse search is triggered by Alt-click (OPTION-click).
6450 \end_layout
6451
6452 \begin_layout Subsubsection*
6453 Skim (Mac OSX)
6454 \end_layout
6455
6456 \begin_layout Standard
6457 Enter 
6458 \begin_inset Flex Code
6459 status collapsed
6460
6461 \begin_layout Plain Layout
6462 open -a Skim.app $$i
6463 \end_layout
6464
6465 \end_inset
6466
6467  to the viewer setting in 
6468 \begin_inset Flex MenuItem
6469 status collapsed
6470
6471 \begin_layout Plain Layout
6472 Preferences\SpecialChar \menuseparator
6473 File Handling\SpecialChar \menuseparator
6474 File formats\SpecialChar \menuseparator
6475 PDF (pdflatex)
6476 \end_layout
6477
6478 \end_inset
6479
6480 , and then in 
6481 \begin_inset Flex MenuItem
6482 status collapsed
6483
6484 \begin_layout Plain Layout
6485 Skim\SpecialChar \menuseparator
6486 Preferences\SpecialChar \menuseparator
6487 Sync
6488 \end_layout
6489
6490 \end_inset
6491
6492  choose 
6493 \begin_inset Flex MenuItem
6494 status collapsed
6495
6496 \begin_layout Plain Layout
6497 custom
6498 \end_layout
6499
6500 \end_inset
6501
6502  preset and enter command 
6503 \begin_inset Flex MenuItem
6504 status collapsed
6505
6506 \begin_layout Plain Layout
6507 /Applications/LyX.app/Contents/MacOS/lyxeditor
6508 \end_layout
6509
6510 \end_inset
6511
6512 .
6513 \end_layout
6514
6515 \begin_layout Standard
6516 Reverse search is triggered by COMMAND-SHIFT-click
6517 \end_layout
6518
6519 \begin_layout Subsubsection*
6520 Okular (KDE)
6521 \end_layout
6522
6523 \begin_layout Standard
6524 Go to 
6525 \begin_inset Flex MenuItem
6526 status collapsed
6527
6528 \begin_layout Plain Layout
6529 Settings\SpecialChar \menuseparator
6530 Configure Okular\SpecialChar \ldots{}
6531 \SpecialChar \menuseparator
6532 Editor
6533 \end_layout
6534
6535 \end_inset
6536
6537 , select 
6538 \begin_inset Quotes eld
6539 \end_inset
6540
6541 Custom Text Editor
6542 \begin_inset Quotes erd
6543 \end_inset
6544
6545  and add the command 
6546 \begin_inset Flex Code
6547 status collapsed
6548
6549 \begin_layout Plain Layout
6550 lyxclient -g %f %l
6551 \end_layout
6552
6553 \end_inset
6554
6555 .
6556 \end_layout
6557
6558 \begin_layout Standard
6559 Reverse search is triggered by SHIFT-click.
6560 \end_layout
6561
6562 \begin_layout Subsubsection*
6563 YAP (Windows)
6564 \end_layout
6565
6566 \begin_layout Standard
6567 Launch yap, choose its 
6568 \begin_inset Flex MenuItem
6569 status collapsed
6570
6571 \begin_layout Plain Layout
6572 View\SpecialChar \menuseparator
6573 Options
6574 \end_layout
6575
6576 \end_inset
6577
6578  menu and select the 
6579 \begin_inset Quotes eld
6580 \end_inset
6581
6582 Inverse DVI Search
6583 \begin_inset Quotes erd
6584 \end_inset
6585
6586  tab.
6587  Click on the 
6588 \begin_inset Quotes eld
6589 \end_inset
6590
6591 New\SpecialChar \ldots{}
6592
6593 \begin_inset Quotes erd
6594 \end_inset
6595
6596  button and, in the window that opens, enter 
6597 \begin_inset Quotes eld
6598 \end_inset
6599
6600 LyX Editor
6601 \begin_inset Quotes erd
6602 \end_inset
6603
6604  (or any other name you like) in the 
6605 \begin_inset Quotes eld
6606 \end_inset
6607
6608 Name:
6609 \begin_inset Quotes erd
6610 \end_inset
6611
6612  field.
6613  Now click on the button labeled 
6614 \begin_inset Quotes eld
6615 \end_inset
6616
6617 \SpecialChar \ldots{}
6618
6619 \begin_inset Quotes erd
6620 \end_inset
6621
6622  to open a file dialog and navigate to the directory containing the batch
6623  file 
6624 \begin_inset Flex Code
6625 status collapsed
6626
6627 \begin_layout Plain Layout
6628 lyxeditor.bat
6629 \end_layout
6630
6631 \end_inset
6632
6633  (see below).
6634  Select 
6635 \begin_inset Flex Code
6636 status collapsed
6637
6638 \begin_layout Plain Layout
6639 lyxeditor.bat
6640 \end_layout
6641
6642 \end_inset
6643
6644  and then specify the program arguments as 
6645 \begin_inset Flex Code
6646 status collapsed
6647
6648 \begin_layout Plain Layout
6649 %f %l
6650 \end_layout
6651
6652 \end_inset
6653
6654 .
6655  The 
6656 \begin_inset Flex Code
6657 status collapsed
6658
6659 \begin_layout Plain Layout
6660 lyxeditor.bat
6661 \end_layout
6662
6663 \end_inset
6664
6665  wrapper is used for communicating with LyX through the 
6666 \emph on
6667 lyxpipe
6668 \emph default
6669  and is as follows:
6670 \end_layout
6671
6672 \begin_layout LyX-Code
6673 @echo off
6674 \begin_inset Newline newline
6675 \end_inset
6676
6677 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6678 \backslash
6679
6680 \backslash
6681 .
6682 \backslash
6683 pipe
6684 \backslash
6685 lyxpipe.in
6686 \begin_inset Newline newline
6687 \end_inset
6688
6689 type 
6690 \backslash
6691
6692 \backslash
6693 .
6694 \backslash
6695 pipe
6696 \backslash
6697 lyxpipe.out
6698 \end_layout
6699
6700 \begin_layout Standard
6701 Make sure that the LyXServer pipe path you specified in LyX is 
6702 \begin_inset Flex Code
6703 status collapsed
6704
6705 \begin_layout Plain Layout
6706
6707 \backslash
6708
6709 \backslash
6710 .
6711 \backslash
6712 pipe
6713 \backslash
6714 lyxpipe
6715 \end_layout
6716
6717 \end_inset
6718
6719 , otherwise change the 
6720 \begin_inset Flex Code
6721 status collapsed
6722
6723 \begin_layout Plain Layout
6724 lyxeditor.bat
6725 \end_layout
6726
6727 \end_inset
6728
6729  wrapper accordingly.
6730 \end_layout
6731
6732 \begin_layout Standard
6733 In yap, reverse search is triggered by double-click.
6734 \end_layout
6735
6736 \begin_layout Subsubsection*
6737 SumatraPDF (Windows)
6738 \end_layout
6739
6740 \begin_layout Standard
6741 In order to use SumatraPDF for inverse search, enter 
6742 \begin_inset Flex Code
6743 status collapsed
6744
6745 \begin_layout Plain Layout
6746 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6747 \end_layout
6748
6749 \end_inset
6750
6751  in the viewer setting in 
6752 \begin_inset Flex MenuItem
6753 status collapsed
6754
6755 \begin_layout Plain Layout
6756 Preferences\SpecialChar \menuseparator
6757 File Handling\SpecialChar \menuseparator
6758 File formats\SpecialChar \menuseparator
6759 PDF (pdflatex)
6760 \end_layout
6761
6762 \end_inset
6763
6764 , where 
6765 \begin_inset Flex Code
6766 status collapsed
6767
6768 \begin_layout Plain Layout
6769 lyxeditor.bat
6770 \end_layout
6771
6772 \end_inset
6773
6774  is the previous wrapper.
6775  If SumatraPDF.exe is not in your command PATH, use its full file name.
6776 \end_layout
6777
6778 \begin_layout Standard
6779 Reverse search is triggered by double-click.
6780 \end_layout
6781
6782 \begin_layout Subsubsection*
6783 YAP (Cygwin)
6784 \end_layout
6785
6786 \begin_layout Standard
6787 First of all, make sure that yap is your default DVI viewer in the Windows
6788  environment, then launch it, choose its 
6789 \begin_inset Flex MenuItem
6790 status collapsed
6791
6792 \begin_layout Plain Layout
6793 View\SpecialChar \menuseparator
6794 Options
6795 \end_layout
6796
6797 \end_inset
6798
6799  menu and select the 
6800 \begin_inset Quotes eld
6801 \end_inset
6802
6803 Inverse DVI Search
6804 \begin_inset Quotes erd
6805 \end_inset
6806
6807  tab.
6808  Click on the 
6809 \begin_inset Quotes eld
6810 \end_inset
6811
6812 New\SpecialChar \ldots{}
6813
6814 \begin_inset Quotes erd
6815 \end_inset
6816
6817  button and, in the window that opens, enter 
6818 \begin_inset Quotes eld
6819 \end_inset
6820
6821 LyX Editor
6822 \begin_inset Quotes erd
6823 \end_inset
6824
6825  (or any other name you like) in the 
6826 \begin_inset Quotes eld
6827 \end_inset
6828
6829 Name:
6830 \begin_inset Quotes erd
6831 \end_inset
6832
6833  field.
6834  Now click on the button labeled 
6835 \begin_inset Quotes eld
6836 \end_inset
6837
6838 \SpecialChar \ldots{}
6839
6840 \begin_inset Quotes erd
6841 \end_inset
6842
6843  to open a file dialog and navigate to the directory containing the 
6844 \begin_inset Flex Code
6845 status collapsed
6846
6847 \begin_layout Plain Layout
6848 lyxeditor.exe
6849 \end_layout
6850
6851 \end_inset
6852
6853  program (which is installed by default on Cygwin along with the LyX executable).
6854  Select 
6855 \begin_inset Flex Code
6856 status collapsed
6857
6858 \begin_layout Plain Layout
6859 lyxeditor.exe
6860 \end_layout
6861
6862 \end_inset
6863
6864  and then specify the program arguments as 
6865 \begin_inset Flex Code
6866 status collapsed
6867
6868 \begin_layout Plain Layout
6869 -g %f %l
6870 \end_layout
6871
6872 \end_inset
6873
6874 .
6875  In this way, you will be using the 
6876 \emph on
6877 lyxsocket
6878 \emph default
6879  for communicating with LyX.
6880  If, for whatever reason, you want to use the 
6881 \emph on
6882 lyxpipe
6883 \emph default
6884 , omit the 
6885 \begin_inset Flex Code
6886 status collapsed
6887
6888 \begin_layout Plain Layout
6889 -g
6890 \end_layout
6891
6892 \end_inset
6893
6894  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6895 \end_layout
6896
6897 \begin_layout Standard
6898 In yap, reverse search is triggered by double-click.
6899 \end_layout
6900
6901 \begin_layout Subsubsection*
6902 SumatraPDF (Cygwin)
6903 \end_layout
6904
6905 \begin_layout Standard
6906 In order to use SumatraPDF for inverse search, enter 
6907 \begin_inset Flex Code
6908 status collapsed
6909
6910 \begin_layout Plain Layout
6911 SumatraPDF -inverse-search "lyxeditor -g %f %l"
6912 \end_layout
6913
6914 \end_inset
6915
6916  in the viewer setting in 
6917 \begin_inset Flex MenuItem
6918 status collapsed
6919
6920 \begin_layout Plain Layout
6921 Preferences\SpecialChar \menuseparator
6922 File Handling\SpecialChar \menuseparator
6923 File formats\SpecialChar \menuseparator
6924 PDF (pdflatex)
6925 \end_layout
6926
6927 \end_inset
6928
6929 .
6930  If SumatraPDF.exe is not in your command PATH, use its full posix path.
6931  The 
6932 \begin_inset Flex Code
6933 status collapsed
6934
6935 \begin_layout Plain Layout
6936 -g
6937 \end_layout
6938
6939 \end_inset
6940
6941  enables communication via the 
6942 \emph on
6943 lyxsocket
6944 \emph default
6945 .
6946  Again, omit the 
6947 \begin_inset Flex Code
6948 status collapsed
6949
6950 \begin_layout Plain Layout
6951 -g
6952 \end_layout
6953
6954 \end_inset
6955
6956  option if you want to use the 
6957 \emph on
6958 lyxpipe
6959 \emph default
6960 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6961 \end_layout
6962
6963 \begin_layout Standard
6964 Reverse search is triggered by double-click.
6965 \end_layout
6966
6967 \begin_layout Section
6968 Forward search
6969 \end_layout
6970
6971 \begin_layout Standard
6972 Forward search is, as the name implies, in a sense the 
6973 \begin_inset Quotes eld
6974 \end_inset
6975
6976 opposite
6977 \begin_inset Quotes erd
6978 \end_inset
6979
6980  of reverse search.
6981  It allows you to let the viewer jump to a given position from within LyX.
6982  If forward search is set up (as described in what follows), you can put
6983  the cursor anywhere in your LyX document, and hit 
6984 \begin_inset Flex MenuItem
6985 status collapsed
6986
6987 \begin_layout Plain Layout
6988 Navigate\SpecialChar \menuseparator
6989 Forward search
6990 \end_layout
6991
6992 \end_inset
6993
6994  (or select 
6995 \begin_inset Flex MenuItem
6996 status collapsed
6997
6998 \begin_layout Plain Layout
6999 Forward search
7000 \end_layout
7001
7002 \end_inset
7003
7004  in the context menu via right mouse click), and then the viewer will jump
7005  to that position as well.
7006  This implies, of course, that your viewer supports this function.
7007 \end_layout
7008
7009 \begin_layout Standard
7010 To make forward search possible, you first need to provide the generated
7011  output PDF/DVI file with additional information about the TeX sources.
7012  This can be done via the methods described in the section 
7013 \begin_inset CommandInset ref
7014 LatexCommand ref
7015 reference "sub:rev-search"
7016
7017 \end_inset
7018
7019 .
7020 \end_layout
7021
7022 \begin_layout Standard
7023 Additionally, you need to configure LyX for using your viewers in 
7024 \begin_inset Flex MenuItem
7025 status collapsed
7026
7027 \begin_layout Plain Layout
7028 Tools\SpecialChar \menuseparator
7029 Preferences\SpecialChar \menuseparator
7030 Output\SpecialChar \menuseparator
7031 General
7032 \end_layout
7033
7034 \end_inset
7035
7036 .
7037  We provide a range of tested configurations for some viewers, which you
7038  can select from the drop down list.
7039  If none of these configurations suits you, you have to find out and enter
7040  a suitable configuration yourself.
7041  The definition syntax uses the following placeholders:
7042 \end_layout
7043
7044 \begin_layout Itemize
7045 \noindent
7046 \begin_inset Flex Code
7047 status collapsed
7048
7049 \begin_layout Plain Layout
7050 $$n
7051 \end_layout
7052
7053 \end_inset
7054
7055 : row number
7056 \end_layout
7057
7058 \begin_layout Itemize
7059 \noindent
7060 \begin_inset Flex Code
7061 status collapsed
7062
7063 \begin_layout Plain Layout
7064 $$t
7065 \end_layout
7066
7067 \end_inset
7068
7069 : name of the (temporary) exported .tex file (without path)
7070 \end_layout
7071
7072 \begin_layout Itemize
7073 \noindent
7074 \begin_inset Flex Code
7075 status collapsed
7076
7077 \begin_layout Plain Layout
7078 $$f
7079 \end_layout
7080
7081 \end_inset
7082
7083 : name of the (temporary) exported .tex file (including path)
7084 \end_layout
7085
7086 \begin_layout Itemize
7087 \noindent
7088 \begin_inset Flex Code
7089 status collapsed
7090
7091 \begin_layout Plain Layout
7092 $$o
7093 \end_layout
7094
7095 \end_inset
7096
7097 : name of the exported output file (either dvi or pdf, depending on which
7098  one exists in the temporary directory)
7099 \end_layout
7100
7101 \begin_layout Standard
7102 Note that only some of the viewers provide full forward search functionality,
7103  among them yap, xdvi, okular and Sumatra PDF.
7104 \begin_inset Foot
7105 status collapsed
7106
7107 \begin_layout Plain Layout
7108 For Sumatra CMCDDE is needed --- downloadable from 
7109 \begin_inset CommandInset href
7110 LatexCommand href
7111 target "http://www.istri.fr/zip/CMCDDE.zip"
7112
7113 \end_inset
7114
7115
7116 \end_layout
7117
7118 \end_inset
7119
7120  While many of the widespread PDF viewers (most notably Adobe Reader) do
7121  not support forward search at all, some other viewers -- e.
7122 \begin_inset space \thinspace{}
7123 \end_inset
7124
7125 g.
7126  evince and xpdf -- allow at least to reload the document and jump to a
7127  specific page of the file, so you can at least navigate 
7128 \begin_inset Quotes eld
7129 \end_inset
7130
7131 near
7132 \begin_inset Quotes erd
7133 \end_inset
7134
7135 .
7136  This latter functionality is provided by an external call of synctex (see
7137  the predefined example configurations).
7138  
7139 \end_layout
7140
7141 \begin_layout Standard
7142 Forward search works both with DVI and PDF output.
7143  LyX simply checks which preview format you have used before (i.
7144 \begin_inset space \thinspace{}
7145 \end_inset
7146
7147 e., which format is already there in the temporary directory) and chooses
7148  the appropriate configuration for the respective format.
7149 \end_layout
7150
7151 \begin_layout Chapter
7152 Special Document Classes
7153 \end_layout
7154
7155 \begin_layout Section
7156 A&A Paper
7157 \end_layout
7158
7159 \begin_layout Standard
7160 by 
7161 \noun on
7162 Peter Sütterlin
7163 \end_layout
7164
7165 \begin_layout Subsection
7166 Introduction
7167 \end_layout
7168
7169 \begin_layout Standard
7170 This section describes how LyX can be used to write articles for submission
7171  to the scientific journal 
7172 \emph on
7173 Astronomy and Astrophysics
7174 \emph default
7175  (www.edpsciences.fr/aa/ 
7176 \begin_inset Flex URL
7177 status collapsed
7178
7179 \begin_layout Plain Layout
7180
7181 http://www.edpsciences.fr/aa/
7182 \end_layout
7183
7184 \end_inset
7185
7186 ) using Version 5.01 of the document class 
7187 \family typewriter
7188 aa.cls
7189 \family default
7190 .
7191  This package can be downloaded from the ftp site
7192 \end_layout
7193
7194 \begin_layout Standard
7195 \begin_inset VSpace medskip
7196 \end_inset
7197
7198
7199 \end_layout
7200
7201 \begin_layout Standard
7202 \align center
7203 \begin_inset Flex URL
7204 status collapsed
7205
7206 \begin_layout Plain Layout
7207
7208 ftp://ftp.edpsciences.org/pub/aa/readme.html
7209 \end_layout
7210
7211 \end_inset
7212
7213
7214 \end_layout
7215
7216 \begin_layout Standard
7217 \begin_inset VSpace medskip
7218 \end_inset
7219
7220
7221 \end_layout
7222
7223 \begin_layout Standard
7224 A manual comes together with that package, and this text is not meant to
7225  replace the original manual but is merely a short guide in how to realize
7226  the correct form of your paper.
7227  
7228 \end_layout
7229
7230 \begin_layout Standard
7231 Please note that the publisher of the journal was changed from Springer
7232  to EDP Sciences starting January 1, 2001.
7233  That change involved also some slight changes to the style files, namely
7234  the removal of the thesaurus command.
7235  The LyX class aa supports the newest version of these style files, V 5.01.
7236  If you have an older version installed, please upgrade.
7237  For compatibility, the old (version 4) layout has been kept as 
7238 \family sans
7239 article (A&A V4)
7240 \family default
7241 .
7242  Please refer to the comments in 
7243 \family typewriter
7244 LyXDir/layouts/aapaper.layout
7245 \family default
7246 .
7247 \end_layout
7248
7249 \begin_layout Subsection
7250 Getting started
7251 \end_layout
7252
7253 \begin_layout Standard
7254 It is recommended you start from the example template distributed with LyX.
7255  If you are not using a template, note the following settings:
7256 \end_layout
7257
7258 \begin_layout Itemize
7259 Select 
7260 \family sans
7261 article (A&A)
7262 \family default
7263  in the 
7264 \family sans
7265 Document\SpecialChar \menuseparator
7266 Settings
7267 \family default
7268  dialog (OK, that one was obvious).
7269 \end_layout
7270
7271 \begin_layout Itemize
7272 Don't change the option 
7273 \family sans
7274 Page
7275 \begin_inset space ~
7276 \end_inset
7277
7278 style
7279 \family default
7280 : Leave it set to 
7281 \family sans
7282 default
7283 \family default
7284 .
7285  The whole layout is done by the macros, you shouldn't change anything.
7286 \end_layout
7287
7288 \begin_layout Subsection
7289 The header block
7290 \end_layout
7291
7292 \begin_layout Standard
7293 First thing to enter is the header information.
7294  It consists of seven entries, of which some are optional.
7295  They are
7296 \end_layout
7297
7298 \begin_layout Itemize
7299
7300 \family sans
7301 Title
7302 \family default
7303 : [required] 
7304 \end_layout
7305
7306 \begin_layout Itemize
7307
7308 \family sans
7309 Subtitle
7310 \family default
7311 : [optional] 
7312 \end_layout
7313
7314 \begin_layout Itemize
7315
7316 \family sans
7317 Author
7318 \family default
7319 : [required]
7320 \end_layout
7321
7322 \begin_layout Itemize
7323
7324 \family sans
7325 Address
7326 \family default
7327 : [required]
7328 \end_layout
7329
7330 \begin_layout Itemize
7331
7332 \family sans
7333 Offprints
7334 \family default
7335 : [optional] if more than one author: whom to contact for offprint requests.
7336 \end_layout
7337
7338 \begin_layout Itemize
7339
7340 \family sans
7341 Mail
7342 \family default
7343 : [optional] mail address for contacts.
7344 \end_layout
7345
7346 \begin_layout Itemize
7347
7348 \family sans
7349 Date
7350 \family default
7351 : [required].
7352  Suggested format is 
7353 \family typewriter
7354 Received: <date>; Accepted <date> 
7355 \end_layout
7356
7357 \begin_layout Standard
7358 There is no need to issue the 
7359 \family typewriter
7360
7361 \backslash
7362 maketitle
7363 \family default
7364  command, this is done automatically by LyX when the header is finished.
7365  Although the order of the single header entries doesn't matter it is advised
7366  to keep the above sequence, just to get the best optics and meets the layout
7367  of the real document.
7368 \end_layout
7369
7370 \begin_layout Standard
7371 If you want to place footnotes in the header block, e.
7372 \begin_inset space \thinspace{}
7373 \end_inset
7374
7375 g.
7376 \begin_inset space \space{}
7377 \end_inset
7378
7379 to state your present address, just use the standard footnote via the menu
7380  
7381 \family sans
7382 Insert\SpecialChar \menuseparator
7383 Footnote.
7384
7385 \family default
7386  LyX will automagically use the term 
7387 \family typewriter
7388
7389 \backslash
7390 thanks{}
7391 \family default
7392  in that case.
7393 \end_layout
7394
7395 \begin_layout Standard
7396 In addition to these topics, the macros use three additional LaTeX commands
7397  that have no counterpart in LyX:
7398 \end_layout
7399
7400 \begin_layout Itemize
7401
7402 \family typewriter
7403
7404 \backslash
7405 and
7406 \family default
7407  to separate different names for more than one author and institute, respectivel
7408 y.
7409 \end_layout
7410
7411 \begin_layout Itemize
7412
7413 \family typewriter
7414
7415 \backslash
7416 inst{<nr>}
7417 \family default
7418 to mark corresponding author/institute pairs.
7419  The institutes are numbered sequentially as they appear in the 
7420 \family sans
7421 Address
7422 \family default
7423  field, so you have to put a marker to each author.
7424 \end_layout
7425
7426 \begin_layout Itemize
7427
7428 \family typewriter
7429
7430 \backslash
7431 email{address}
7432 \family default
7433  to supply an email address for fast contact.
7434 \end_layout
7435
7436 \begin_layout Standard
7437 In all cases, the appropriate command has to be entered in LyX and marked
7438  as LaTeX code.
7439  See the examples.
7440  
7441 \end_layout
7442
7443 \begin_layout Subsection
7444 The abstract
7445 \end_layout
7446
7447 \begin_layout Standard
7448 The abstract should immediately follow the header block.
7449  With version 5 the abstract environment was changed to a command, and there
7450  is now a resctriction to only one paragraph.
7451  In addition, it should contain an entry with the keywords.
7452  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7453  command 
7454 \family typewriter
7455
7456 \backslash
7457 keywords{}
7458 \family default
7459  by hand and mark it as LaTeX code.
7460  Refer to the example paper.
7461 \end_layout
7462
7463 \begin_layout Subsection
7464 Supported environments
7465 \end_layout
7466
7467 \begin_layout Standard
7468 The A&A paper layout supports the following environments for structuring
7469  your text:
7470 \end_layout
7471
7472 \begin_layout Itemize
7473
7474 \family sans
7475 Standard
7476 \end_layout
7477
7478 \begin_layout Itemize
7479
7480 \family sans
7481 Section
7482 \end_layout
7483
7484 \begin_layout Itemize
7485
7486 \family sans
7487 Subsection
7488 \end_layout
7489
7490 \begin_layout Itemize
7491
7492 \family sans
7493 Subsubsection
7494 \end_layout
7495
7496 \begin_layout Itemize
7497
7498 \family sans
7499 Itemize
7500 \end_layout
7501
7502 \begin_layout Itemize
7503
7504 \family sans
7505 Enumerate
7506 \end_layout
7507
7508 \begin_layout Itemize
7509
7510 \family sans
7511 Description
7512 \end_layout
7513
7514 \begin_layout Itemize
7515
7516 \family sans
7517 Caption
7518 \end_layout
7519
7520 \begin_layout Itemize
7521
7522 \family sans
7523 Abstract
7524 \end_layout
7525
7526 \begin_layout Itemize
7527
7528 \family sans
7529 Acknowledgment
7530 \end_layout
7531
7532 \begin_layout Itemize
7533
7534 \family sans
7535 Bibliography
7536 \end_layout
7537
7538 \begin_layout Itemize
7539
7540 \family sans
7541 LaTeX
7542 \end_layout
7543
7544 \begin_layout Subsection
7545 Commands not supported by LyX
7546 \end_layout
7547
7548 \begin_layout Standard
7549 Some commands are not yet supported by the 
7550 \family sans
7551 paper (A&A)
7552 \family default
7553  layout for LyX.
7554  Some have already been mentioned.
7555  For the sake of completeness, they are listed all together here:
7556 \end_layout
7557
7558 \begin_layout Itemize
7559
7560 \family typewriter
7561
7562 \backslash
7563 and
7564 \end_layout
7565
7566 \begin_layout Itemize
7567
7568 \family typewriter
7569
7570 \backslash
7571 email
7572 \end_layout
7573
7574 \begin_layout Itemize
7575
7576 \family typewriter
7577
7578 \backslash
7579 appendix
7580 \end_layout
7581
7582 \begin_layout Itemize
7583
7584 \family typewriter
7585
7586 \backslash
7587 authorrunning
7588 \end_layout
7589
7590 \begin_layout Itemize
7591
7592 \family typewriter
7593
7594 \backslash
7595 inst{}
7596 \end_layout
7597
7598 \begin_layout Itemize
7599
7600 \family typewriter
7601
7602 \backslash
7603 keywords{}
7604 \end_layout
7605
7606 \begin_layout Itemize
7607
7608 \family typewriter
7609
7610 \backslash
7611 object{}
7612 \end_layout
7613
7614 \begin_layout Itemize
7615
7616 \family typewriter
7617
7618 \backslash
7619 titlerunning{}
7620 \end_layout
7621
7622 \begin_layout Standard
7623 If you want to use any of these commands, you have to enter them yourself.
7624  
7625 \series bold
7626 Do not forget to mark them as LaTeX code!
7627 \end_layout
7628
7629 \begin_layout Subsection
7630 Figure and Table Floats
7631 \end_layout
7632
7633 \begin_layout Standard
7634 LyX provides support for the necessary float environments 
7635 \family sans
7636 figure, figure*, table
7637 \family default
7638  and 
7639 \family sans
7640 table*
7641 \family default
7642 , therefore we won't tell much about it here.
7643  Refer to the 
7644 \emph on
7645 User's
7646 \begin_inset space ~
7647 \end_inset
7648
7649 Guide
7650 \emph default
7651 .
7652  Just remember that tables should be left-aligned.
7653  For that, select the table and change the alignment in 
7654 \family sans
7655 Edit\SpecialChar \menuseparator
7656 Paragraph
7657 \begin_inset space ~
7658 \end_inset
7659
7660 Settings.
7661 \end_layout
7662
7663 \begin_layout Standard
7664 There is only one special thing: the figures with caption besides the figure.
7665  To create such a figure, you have to do the following:
7666 \end_layout
7667
7668 \begin_layout Enumerate
7669 Create a wide figure float: 
7670 \family sans
7671 Insert\SpecialChar \menuseparator
7672 Float\SpecialChar \menuseparator
7673 Figure
7674 \family default
7675 , then right click in the figure and select 
7676 \family sans
7677 \bar under
7678 S
7679 \bar default
7680 pan
7681 \begin_inset space ~
7682 \end_inset
7683
7684 columns
7685 \family default
7686 .
7687 \end_layout
7688
7689 \begin_layout Enumerate
7690 Enter your caption text.
7691 \end_layout
7692
7693 \begin_layout Enumerate
7694 Press 
7695 \family sans
7696 Return
7697 \family default
7698  to move the cursor above the caption.
7699 \end_layout
7700
7701 \begin_layout Enumerate
7702 Insert your figure
7703 \end_layout
7704
7705 \begin_layout Enumerate
7706 Position the cursor behind the figure and insert a horizontal fill: 
7707 \family sans
7708 Insert\SpecialChar \menuseparator
7709 Special
7710 \begin_inset space ~
7711 \end_inset
7712
7713 Character\SpecialChar \menuseparator
7714 Horizontal
7715 \begin_inset space ~
7716 \end_inset
7717
7718 Fill
7719 \family default
7720 .
7721 \end_layout
7722
7723 \begin_layout Enumerate
7724 Switch to LaTeX mode: 
7725 \family sans
7726 M-c
7727 \begin_inset space ~
7728 \end_inset
7729
7730 t
7731 \family default
7732 .
7733 \end_layout
7734
7735 \begin_layout Enumerate
7736 Enter 
7737 \family typewriter
7738
7739 \backslash
7740 parbox[b]{55mm}{
7741 \family default
7742 .
7743  
7744 \series bold
7745 Do not close the brace!
7746 \end_layout
7747
7748 \begin_layout Enumerate
7749 Position the cursor behind the caption text, switch to LaTeX mode and insert
7750  the closing brace: 
7751 \family sans
7752 M-c
7753 \begin_inset space ~
7754 \end_inset
7755
7756 t
7757 \family default
7758  
7759 \family typewriter
7760 }
7761 \family default
7762 .
7763 \end_layout
7764
7765 \begin_layout Standard
7766 Also, refer to the figures in the example paper.
7767 \end_layout
7768
7769 \begin_layout Subsection
7770 Referee layout
7771 \end_layout
7772
7773 \begin_layout Standard
7774 For submission, the paper has to be formated in a special double-spacing
7775  layout.
7776  For this purpose, you have to give the option 
7777 \family typewriter
7778 referee
7779 \family default
7780  to the documentclass.
7781  This must be done using the extra class options field in the 
7782 \family sans
7783 Document\SpecialChar \menuseparator
7784 Settings
7785 \family default
7786  dialog.
7787  Just enter the string 
7788 \family typewriter
7789 referee
7790 \family default
7791  there.
7792 \end_layout
7793
7794 \begin_layout Subsection
7795 The example paper
7796 \end_layout
7797
7798 \begin_layout Standard
7799 The 
7800 \family sans
7801 Examples
7802 \family default
7803  directory contains an example paper written with LyX.
7804  It is the example paper from the original macro package, translated to
7805  LyX.
7806  Use it for inspiration, and compare the original LaTeX code with LyX way
7807  of writing.
7808 \end_layout
7809
7810 \begin_layout Section
7811 AASTeX
7812 \end_layout
7813
7814 \begin_layout Standard
7815 by 
7816 \noun on
7817 Mike Ressler
7818 \end_layout
7819
7820 \begin_layout Subsection
7821 Introduction
7822 \end_layout
7823
7824 \begin_layout Standard
7825 AASTeX is a set of macros produced by the American Astronomical Society
7826  to facilitate electronic manuscript submission to the three journals they
7827  publish: the Astrophysical Journal (including the Letters and Supplement),
7828  the Astronomical Journal, and the Publications of the Astronomical Society
7829  of the Pacific.
7830  LyX has proven to be an excellent tool for generating these documents,
7831  especially given its equation, citation, and figure handling capabilities.
7832  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7833  is the version described here, or higher.
7834  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7835  incompatible with LyX.
7836  The AASTeX package may be downloaded from the AASTeX Web site
7837 \end_layout
7838
7839 \begin_layout Standard
7840 \begin_inset VSpace medskip
7841 \end_inset
7842
7843
7844 \end_layout
7845
7846 \begin_layout Standard
7847 \align center
7848 \begin_inset Flex URL
7849 status collapsed
7850
7851 \begin_layout Plain Layout
7852
7853 http://www.journals.uchicago.edu/AAS/AASTeX
7854 \end_layout
7855
7856 \end_inset
7857
7858
7859 \end_layout
7860
7861 \begin_layout Standard
7862 \begin_inset VSpace medskip
7863 \end_inset
7864
7865
7866 \end_layout
7867
7868 \begin_layout Standard
7869 A complete user guide is contained in that package and you should familiarize
7870  yourself with it thoroughly before embarking on writing a paper in LyX.
7871  LyX will not reduce the need to figure out all the AASTeX commands, it
7872  will only reduce the drudgery of typing everything in.
7873  It is your responsibility to ensure that the final exported LaTeX document
7874  conforms completely to the requirements of the journal to which you are
7875  submitting your paper.
7876 \end_layout
7877
7878 \begin_layout Subsection
7879 Starting a New Paper
7880 \end_layout
7881
7882 \begin_layout Standard
7883 I strongly suggest that you start with the AASTeX template file.
7884  Click on 
7885 \family sans
7886 File\SpecialChar \menuseparator
7887 New from
7888 \family default
7889  
7890 \family sans
7891 Template
7892 \family default
7893 , enter the new file name, then choose the 
7894 \family typewriter
7895 aastex.lyx
7896 \family default
7897  template.
7898  This will show the most common fields found in a manuscript.
7899  Simply overwrite the existing text (including the brackets, 
7900 \family typewriter
7901 <>
7902 \family default
7903 ) with the correct information.
7904  Many of the AASTeX commands and environments can be implemented directly
7905  in LyX, but some cannot: most noticeably 
7906 \family typewriter
7907
7908 \backslash
7909 altaffilmark
7910 \family default
7911  and 
7912 \family typewriter
7913
7914 \backslash
7915 altaffiltext
7916 \family default
7917 , which should stick out like a sore thumb if you actually just opened the
7918  template file.
7919  For commands such as these, the LaTeX code must be entered directly and
7920  marked as such.
7921  Such commands are referred to as TeX code, or Evil Red Text.
7922  I tried to minimize the amount of TeX code needed in an AASTeX document,
7923  but there is still a bit more required than any of us would like.
7924 \end_layout
7925
7926 \begin_layout Subsection
7927 Finishing Your Paper
7928 \end_layout
7929
7930 \begin_layout Standard
7931 When the paper is finished to your satisfaction and previews/prints correctly,
7932  there are a few 
7933 \begin_inset Quotes eld
7934 \end_inset
7935
7936 postprocessing
7937 \begin_inset Quotes erd
7938 \end_inset
7939
7940  actions which need to be done before you submit it to the journals.
7941  
7942 \end_layout
7943
7944 \begin_layout Enumerate
7945 Export your paper as a LaTeX file (
7946 \family sans
7947 File\SpecialChar \menuseparator
7948 Export\SpecialChar \menuseparator
7949 LaTeX
7950 \family default
7951 ).
7952  
7953 \end_layout
7954
7955 \begin_layout Enumerate
7956 Edit the resulting 
7957 \family typewriter
7958 .tex
7959 \family default
7960  file with your favorite text editor
7961 \end_layout
7962
7963 \begin_deeper
7964 \begin_layout Enumerate
7965 remove the comment lines before the 
7966 \family typewriter
7967
7968 \backslash
7969 documentclass
7970 \family default
7971  command
7972 \end_layout
7973
7974 \begin_layout Enumerate
7975 remove the 
7976 \family typewriter
7977
7978 \backslash
7979 usepackage...{fontenc}
7980 \family default
7981  line if it appears (usually just after 
7982 \family typewriter
7983
7984 \backslash
7985 documentclass
7986 \family default
7987 }; also remove the 
7988 \family typewriter
7989
7990 \backslash
7991 secnumdepth
7992 \family default
7993  line if it appears.
7994 \end_layout
7995
7996 \begin_layout Enumerate
7997 remove everything between (and including) the 
7998 \family typewriter
7999
8000 \backslash
8001 makeatletter
8002 \family default
8003  and 
8004 \family typewriter
8005
8006 \backslash
8007 makeatother
8008 \family default
8009  commands, except for any commands you specifically put into the LaTeX preamble
8010  (which should appear immediately after the 
8011 \begin_inset Quotes eld
8012 \end_inset
8013
8014 User specified LaTeX commands
8015 \begin_inset Quotes erd
8016 \end_inset
8017
8018  comment in the 
8019 \family typewriter
8020 .tex
8021 \family default
8022  file).
8023 \end_layout
8024
8025 \end_deeper
8026 \begin_layout Enumerate
8027 Run the resulting file through LaTeX to make sure it still processes correctly.
8028 \end_layout
8029
8030 \begin_layout Enumerate
8031 Reread the journal requirements to make sure your filenames and formats
8032  are correct.
8033 \end_layout
8034
8035 \begin_layout Enumerate
8036 Submit it.
8037 \end_layout
8038
8039 \begin_layout Subsection
8040 Comments On Specific Commands
8041 \end_layout
8042
8043 \begin_layout Standard
8044 I will not describe the detailed usage of the individual AASTeX commands:
8045  the AASTeX User Guide (
8046 \family typewriter
8047 aasguide.tex
8048 \family default
8049 ) gives a good description of each.
8050  Thus it's probably easiest for me to go down the list as found in the guide
8051  and offer comments where necessary.
8052  So let's begin \SpecialChar \ldots{}
8053
8054 \end_layout
8055
8056 \begin_layout Subsubsection
8057 Things that work as expected
8058 \end_layout
8059
8060 \begin_layout Standard
8061 Because they work as you might expect, I simply list them and the section
8062  they are found in: 
8063 \family typewriter
8064
8065 \backslash
8066 documentclass
8067 \family default
8068  (2.1.1), 
8069 \family typewriter
8070
8071 \backslash
8072 begin{document}
8073 \family default
8074  (2.2), 
8075 \family typewriter
8076
8077 \backslash
8078 title
8079 \family default
8080  (2.3), 
8081 \family typewriter
8082
8083 \backslash
8084 author
8085 \family default
8086  (2.3), 
8087 \family typewriter
8088
8089 \backslash
8090 affil
8091 \family default
8092  (2.3), 
8093 \family typewriter
8094
8095 \backslash
8096 abstract
8097 \family default
8098  (2.4), 
8099 \family typewriter
8100
8101 \backslash
8102 keywords
8103 \family default
8104  (2.5), 
8105 \family typewriter
8106
8107 \backslash
8108 section
8109 \family default
8110  (2.7), 
8111 \family typewriter
8112
8113 \backslash
8114 subsection
8115 \family default
8116  (2.7), 
8117 \family typewriter
8118
8119 \backslash
8120 subsubsection
8121 \family default
8122  (2.7), 
8123 \family typewriter
8124
8125 \backslash
8126 paragraph
8127 \family default
8128  (2.7), 
8129 \family typewriter
8130
8131 \backslash
8132 facility
8133 \family default
8134  (2.10), 
8135 \family typewriter
8136
8137 \backslash
8138 begin{displaymath}
8139 \family default
8140  (2.12), 
8141 \family typewriter
8142
8143 \backslash
8144 begin{equation}
8145 \family default
8146  (2.12), 
8147 \family typewriter
8148
8149 \backslash
8150 begin{eqnarray}
8151 \family default
8152  (2.12), 
8153 \family typewriter
8154
8155 \backslash
8156 begin{mathletters}
8157 \family default
8158  (2.12), 
8159 \family typewriter
8160
8161 \backslash
8162 begin{thebibliography}
8163 \family default
8164  (2.13.1), 
8165 \family typewriter
8166
8167 \backslash
8168 bibitem
8169 \family default
8170  (2.13.2), all the cite commands and their variations (2.13.2), the generic
8171  graphicx figure commands (2.14.1), 
8172 \family typewriter
8173
8174 \backslash
8175 begin{table}
8176 \family default
8177  (2.15.4), 
8178 \family typewriter
8179
8180 \backslash
8181 begin{tabular}
8182 \family default
8183  (2.15.4), 
8184 \family typewriter
8185
8186 \backslash
8187 caption
8188 \family default
8189  (2.15.4), 
8190 \family typewriter
8191
8192 \backslash
8193 label
8194 \family default
8195  (2.15.4, amongst other places), 
8196 \family typewriter
8197
8198 \backslash
8199 tablerefs
8200 \family default
8201  (2.15.5), 
8202 \family typewriter
8203
8204 \backslash
8205 tablecomments
8206 \family default
8207  (2.15.5), 
8208 \family typewriter
8209
8210 \backslash
8211 url
8212 \family default
8213  (2.17.4), 
8214 \family typewriter
8215
8216 \backslash
8217 end{document}
8218 \family default
8219  (2.18).
8220 \end_layout
8221
8222 \begin_layout Standard
8223 The following style options also work correctly: 
8224 \family typewriter
8225 longabstract
8226 \family default
8227  (2.4), 
8228 \family typewriter
8229 preprint
8230 \family default
8231  (3.2.1), 
8232 \family typewriter
8233 preprint2
8234 \family default
8235  (3.2.2), 
8236 \family typewriter
8237 eqsecnum
8238 \family default
8239  (3.3), 
8240 \family typewriter
8241 flushrt
8242 \family default
8243  (3.4).
8244  Simply put them in the 
8245 \family sans
8246 Options
8247 \family default
8248  box in 
8249 \family sans
8250 Layout\SpecialChar \menuseparator
8251 Document
8252 \family default
8253 .
8254 \end_layout
8255
8256 \begin_layout Subsubsection
8257 Things that work, but require more comment
8258 \end_layout
8259
8260 \begin_layout Standard
8261 The following items work, but require a little more discussion:
8262 \end_layout
8263
8264 \begin_layout Itemize
8265 These items are reserved for use by the journal editors, but you can put
8266  them into the LaTeX preamble if you feel compelled to do so: 
8267 \family typewriter
8268
8269 \backslash
8270 received
8271 \family default
8272
8273 \family typewriter
8274
8275 \backslash
8276 revised
8277 \family default
8278
8279 \family typewriter
8280
8281 \backslash
8282 accepted
8283 \family default
8284
8285 \family typewriter
8286
8287 \backslash
8288 ccc
8289 \family default
8290
8291 \family typewriter
8292
8293 \backslash
8294 cpright
8295 \family default
8296  (all from 2.1.3)
8297 \end_layout
8298
8299 \begin_layout Itemize
8300 These items may be placed in the LaTeX preamble, and are included as blanks
8301  in the template file: 
8302 \family typewriter
8303
8304 \backslash
8305 slugcomment
8306 \family default
8307  (2.1.4), 
8308 \family typewriter
8309
8310 \backslash
8311 shorttitle
8312 \family default
8313  (2.1.5), 
8314 \family typewriter
8315
8316 \backslash
8317 shortauthors
8318 \family default
8319  (2.1.5)
8320 \end_layout
8321
8322 \begin_layout Itemize
8323
8324 \family typewriter
8325
8326 \backslash
8327 email
8328 \family default
8329  (2.3) – can only be used 
8330 \begin_inset Quotes eld
8331 \end_inset
8332
8333 standalone
8334 \begin_inset Quotes erd
8335 \end_inset
8336
8337 , not in the middle of a paragraph.
8338  Use TeX code if you need to embed it.
8339 \end_layout
8340
8341 \begin_layout Itemize
8342
8343 \family typewriter
8344
8345 \backslash
8346 and
8347 \family default
8348  (2.3) – will have extra {} after it.
8349  This should not cause an error.
8350 \end_layout
8351
8352 \begin_layout Itemize
8353
8354 \family typewriter
8355
8356 \backslash
8357 notetoeditor
8358 \family default
8359  (2.6) – can only be used 
8360 \begin_inset Quotes eld
8361 \end_inset
8362
8363 standalone
8364 \begin_inset Quotes erd
8365 \end_inset
8366
8367 , not in the middle of a paragraph.
8368  Use TeX code if you need to embed it.
8369 \end_layout
8370
8371 \begin_layout Itemize
8372
8373 \family typewriter
8374
8375 \backslash
8376 placetable
8377 \family default
8378  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8379  hand
8380 \end_layout
8381
8382 \begin_layout Itemize
8383
8384 \family typewriter
8385
8386 \backslash
8387 placefigure
8388 \family default
8389  (2.8) – same as for 
8390 \family typewriter
8391
8392 \backslash
8393 placetable
8394 \end_layout
8395
8396 \begin_layout Itemize
8397
8398 \family typewriter
8399
8400 \backslash
8401 acknowledgements
8402 \family default
8403  (2.9) – will have extra {} after it.
8404  This should not cause an error.
8405 \end_layout
8406
8407 \begin_layout Itemize
8408
8409 \family typewriter
8410
8411 \backslash
8412 appendix
8413 \family default
8414  (2.11) – will have extra {} after it.
8415  This should not cause an error.
8416 \end_layout
8417
8418 \begin_layout Itemize
8419
8420 \family typewriter
8421
8422 \backslash
8423 figcaption
8424 \family default
8425  (2.14.2) – you can insert an optional filename argument by placing the cursor
8426  at the beginning of the text and selecting 
8427 \family sans
8428 Insert\SpecialChar \menuseparator
8429 Short Title
8430 \family default
8431 .
8432  
8433 \begin_inset Quotes eld
8434 \end_inset
8435
8436 Short Title
8437 \begin_inset Quotes erd
8438 \end_inset
8439
8440  inserts an optional argument of the type needed by 
8441 \family typewriter
8442
8443 \backslash
8444 figcaption
8445 \family default
8446 .
8447  Hopefully it will be renamed someday.
8448 \end_layout
8449
8450 \begin_layout Itemize
8451
8452 \family typewriter
8453
8454 \backslash
8455 objectname
8456 \family default
8457  (2.17.1) – same as 
8458 \family typewriter
8459
8460 \backslash
8461 figcaption
8462 \family default
8463  for the catalog ID optional parameter
8464 \end_layout
8465
8466 \begin_layout Itemize
8467
8468 \family typewriter
8469
8470 \backslash
8471 dataset
8472 \family default
8473  (2.17.1) – same as 
8474 \family typewriter
8475
8476 \backslash
8477 figcaption
8478 \family default
8479  for the catalog ID optional parameter
8480 \end_layout
8481
8482 \begin_layout Subsubsection
8483 Things not implemented, use TeX code
8484 \end_layout
8485
8486 \begin_layout Standard
8487
8488 \family typewriter
8489
8490 \backslash
8491 altaffilmark
8492 \family default
8493  (2.3), 
8494 \family typewriter
8495
8496 \backslash
8497 altaffiltext
8498 \family default
8499  (2.3), 
8500 \family typewriter
8501
8502 \backslash
8503 eqnum
8504 \family default
8505  (2.12), 
8506 \family typewriter
8507
8508 \backslash
8509 setcounter{equation}
8510 \family default
8511  (2.12), Journal name abbreviations (2.13.4), 
8512 \family typewriter
8513
8514 \backslash
8515 figurenum
8516 \family default
8517  (2.14.1), 
8518 \family typewriter
8519
8520 \backslash
8521 epsscale
8522 \family default
8523  (2.14.1), 
8524 \family typewriter
8525
8526 \backslash
8527 plotone
8528 \family default
8529  (2.14.1), 
8530 \family typewriter
8531
8532 \backslash
8533 plottwo
8534 \family default
8535  (2.14.1), 
8536 \family typewriter
8537
8538 \backslash
8539 tablenum
8540 \family default
8541  (2.15.4), 
8542 \family typewriter
8543
8544 \backslash
8545 tableline
8546 \family default
8547  (2.15.4, insert it as the first element in the lefthand cell after where
8548  you want it.
8549  Don't use any of LyX's rules in the table), 
8550 \family typewriter
8551
8552 \backslash
8553 tablenotemark
8554 \family default
8555  (2.15.5), 
8556 \family typewriter
8557
8558 \backslash
8559 tablenotetext
8560 \family default
8561  (2.15.5), much of Misc (2.17, except 
8562 \family typewriter
8563
8564 \backslash
8565 objectname
8566 \family default
8567
8568 \family typewriter
8569
8570 \backslash
8571 dataset
8572 \family default
8573
8574 \family typewriter
8575
8576 \backslash
8577 url
8578 \family default
8579 , and 
8580 \family typewriter
8581
8582 \backslash
8583 email
8584 \family default
8585 ; see above), 
8586 \family typewriter
8587
8588 \backslash
8589 singlespace
8590 \family default
8591  (3.1), 
8592 \family typewriter
8593
8594 \backslash
8595 doublespace
8596 \family default
8597  (3.1), 
8598 \family typewriter
8599
8600 \backslash
8601 onecolumn
8602 \family default
8603  (3.2), 
8604 \family typewriter
8605
8606 \backslash
8607 twocolumn
8608 \family default
8609  (3.2)
8610 \end_layout
8611
8612 \begin_layout Subsubsection
8613 Things that cannot be implemented
8614 \end_layout
8615
8616 \begin_layout Standard
8617 \SpecialChar \ldots{}
8618  at least in any meaningful sort of way, so I suggest ignoring them.
8619  They are the references environment (2.13.3), and the deluxetable environment
8620  (2.15).
8621  If you really, really need to use deluxetable, I suggest editing it in
8622  a separate file with a text editor, then using 
8623 \family sans
8624 Insert\SpecialChar \menuseparator
8625 Child
8626 \begin_inset space ~
8627 \end_inset
8628
8629 Document
8630 \family default
8631  to include it in your LyX document.
8632  See the 
8633 \family typewriter
8634 aas_sample.lyx
8635 \family default
8636  file to see an example of this.
8637 \end_layout
8638
8639 \begin_layout Subsection
8640 FAQs, Tips, Tricks, and Other Ruminations
8641 \end_layout
8642
8643 \begin_layout Subsubsection
8644 Getting LyX and AASTeX to cooperate
8645 \end_layout
8646
8647 \begin_layout Standard
8648 It can be a bit tricky to get LyX to recognize a new layout and document
8649  class.
8650  When all else fails, do this:
8651 \end_layout
8652
8653 \begin_layout Enumerate
8654 Make certain that LaTeX can find AASTeX.
8655  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8656  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8657 \family typewriter
8658 sample.tex
8659 \family default
8660 .
8661 \end_layout
8662
8663 \begin_layout Enumerate
8664 Make certain that 
8665 \family typewriter
8666 aastex.layout
8667 \family default
8668  appears in LyX's 
8669 \family typewriter
8670 layouts
8671 \family default
8672  folder
8673 \end_layout
8674
8675 \begin_layout Enumerate
8676 Rerun 
8677 \family sans
8678 Tools\SpecialChar \menuseparator
8679 Reconfigure
8680 \family default
8681  in LyX, then restart LyX.
8682 \end_layout
8683
8684 \begin_layout Enumerate
8685 Open a regular new file, not from a template.
8686  Does AASTeX appear in the class list in 
8687 \family sans
8688 Document\SpecialChar \menuseparator
8689 Settings
8690 \family default
8691 ?
8692 \end_layout
8693
8694 \begin_layout Standard
8695 If you get a warning from an existing AASTeX document about not being able
8696  to find the AASTeX layout or a message about 
8697 \begin_inset Quotes eld
8698 \end_inset
8699
8700 You should not mix title layouts with normal ones
8701 \begin_inset Quotes erd
8702 \end_inset
8703
8704 , things haven't been installed correctly.
8705 \end_layout
8706
8707 \begin_layout Subsubsection
8708 LaTeX error processing a table 
8709 \end_layout
8710
8711 \begin_layout Standard
8712 LyX, by default, attempts to center the table caption/title.
8713  This seems to produce a bad interaction in AASTeX so you should click somewhere
8714  in the caption/title, then select 
8715 \family sans
8716 Edit\SpecialChar \menuseparator
8717 Paragraph
8718 \begin_inset space ~
8719 \end_inset
8720
8721 Settings
8722 \family default
8723 , then set the 
8724 \family sans
8725 Alignment
8726 \family default
8727  to 
8728 \family sans
8729 Block
8730 \family default
8731 .
8732  This took care of it for me.
8733 \end_layout
8734
8735 \begin_layout Subsubsection
8736 References
8737 \end_layout
8738
8739 \begin_layout Standard
8740 A couple of things: 1) I have noticed some funny spacing in the reference
8741  entries in the text.
8742  When you enter the bibliography item data, make sure their is 
8743 \emph on
8744 no
8745 \emph default
8746  space between the last author and the parenthesis setting off the year;
8747  
8748 \emph on
8749 e.
8750 \begin_inset space \thinspace{}
8751 \end_inset
8752
8753 g.
8754 \begin_inset space \space{}
8755 \end_inset
8756
8757
8758 \emph default
8759 type 
8760 \family typewriter
8761 Ressler(1992)
8762 \family default
8763 , not 
8764 \family typewriter
8765 Ressler (1992)
8766 \family default
8767 .
8768  2) Entering the references at all is not obvious.
8769  The easiest thing is to start typing your first reference at the end of
8770  the document, then mark it as type 
8771 \family sans
8772 References
8773 \family default
8774 .
8775  That will put a small gray box in front of what you just typed.
8776  Click on the box to fill in the rest of the information.
8777  For new references, go to the end of an existing reference and press return.
8778  That will create a new line with its own box, etc.
8779 \end_layout
8780
8781 \begin_layout Subsubsection
8782 Including EPS files
8783 \end_layout
8784
8785 \begin_layout Standard
8786 Even though AASTeX provides its own figure commands (
8787 \family typewriter
8788
8789 \backslash
8790 plotone
8791 \family default
8792 , for example), I much prefer LaTeX's standard figure commands (with the
8793  default graphicx).
8794  You can insert the 
8795 \family typewriter
8796
8797 \backslash
8798 plotone
8799 \family default
8800 , etc.
8801 \begin_inset space ~
8802 \end_inset
8803
8804 commands as TeX code into a Figure Float box if you desire, but I never
8805  have much luck getting the layout right.
8806  With the standard graphics, LyX will insert a 
8807 \family typewriter
8808
8809 \backslash
8810 usepackage{graphicx}
8811 \family default
8812  command into the LaTeX preamble and handle the figures in the standard
8813  LaTeX2e way, interspersing the figures in the text.
8814  I believe ApJ accepts figures exactly this way now; AJ might still use
8815  the 
8816 \begin_inset Quotes eld
8817 \end_inset
8818
8819 stack everything at the end
8820 \begin_inset Quotes erd
8821 \end_inset
8822
8823  technique.
8824 \end_layout
8825
8826 \begin_layout Subsubsection
8827 Things I could have done, but didn't
8828 \end_layout
8829
8830 \begin_layout Standard
8831 There are a few 
8832 \begin_inset Quotes eld
8833 \end_inset
8834
8835 pretty
8836 \begin_inset Quotes erd
8837 \end_inset
8838
8839  things I could have implemented, but chose not to.
8840  For instance, I saw no point in double-spacing the text in the LyX window,
8841  even though it is double-spaced in the paper manuscript.
8842  Also, I chose not to make separate layouts for the preprint and preprint2
8843  styles.
8844  Since I assume you will spend most of your time in the plain manuscript
8845  mode anyway, I decided not to chew up more disk space with this.
8846  
8847 \end_layout
8848
8849 \begin_layout Subsection
8850 Final Caveat
8851 \end_layout
8852
8853 \begin_layout Standard
8854 Your mileage may vary.
8855  I've now had papers published by both ApJ and AJ that have had 98% of the
8856  effort done in LyX; the last 2% was the LaTeX post-processing and a few
8857  cleanups.
8858  I have had no trouble with the submission process, and I'm sure the journals
8859  were never aware that there might be a difference.
8860  So, go forth and publish!
8861 \end_layout
8862
8863 \begin_layout Section
8864 AMS LaTeX
8865 \end_layout
8866
8867 \begin_layout Standard
8868 by 
8869 \noun on
8870 David Johnson
8871 \noun default
8872 ; updated by 
8873 \noun on
8874 Richard Heck
8875 \end_layout
8876
8877 \begin_layout Standard
8878 \begin_inset VSpace bigskip
8879 \end_inset
8880
8881
8882 \end_layout
8883
8884 \begin_layout Standard
8885 \noindent
8886 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8887  papers to be submitted to American Mathematical Society publications.
8888  The layouts are not tailored to a specific journal, but easily can be.
8889  You should refer to the AMS documentation for specific instructions for
8890  each journal (usually it will entail only changing a single line in the
8891  TeX output).
8892  That documentation is available on the Web at 
8893 \begin_inset Flex URL
8894 status open
8895
8896 \begin_layout Plain Layout
8897
8898 http://www.ams.org
8899 \end_layout
8900
8901 \end_inset
8902
8903  or by ftp at 
8904 \begin_inset Flex URL
8905 status open
8906
8907 \begin_layout Plain Layout
8908
8909 ftp://ftp.ams.org/pub/tex/amslatex/
8910 \end_layout
8911
8912 \end_inset
8913
8914 .
8915  These layouts are appropriate, and useful, for any mathematical writing.
8916  
8917 \end_layout
8918
8919 \begin_layout Standard
8920 There are two basic AMS LaTeX layouts: 
8921 \end_layout
8922
8923 \begin_layout Itemize
8924 amsart: The standard AMS article format.
8925 \end_layout
8926
8927 \begin_layout Itemize
8928 amsbook: the standard AMS book (really, monograph) format.
8929  
8930 \end_layout
8931
8932 \begin_layout Standard
8933 The layouts themselves contain only the minimum necessary to use the AMS
8934  classes.
8935  They do not, in particular, contain any of the `theorem' environments used
8936  for setting theorems, lemmas, and the like.
8937  These are contained, instead, in the 
8938 \begin_inset Flex Code
8939 status collapsed
8940
8941 \begin_layout Plain Layout
8942 Theorems (AMS)
8943 \end_layout
8944
8945 \end_inset
8946
8947  module, which is loaded by default when you select one of the AMS classes.
8948  (It can also be used with other classes and can be removed, if you would
8949  rather use something else.) Less commonly used environments are in the 
8950 \begin_inset Flex Code
8951 status collapsed
8952
8953 \begin_layout Plain Layout
8954 Theorems (AMS-Extended)
8955 \end_layout
8956
8957 \end_inset
8958
8959  module, which must be loaded manually.
8960 \end_layout
8961
8962 \begin_layout Standard
8963 By default, theorems and the like are numbered consecutively throughout
8964  the document, but this may be modified by loading the module 
8965 \begin_inset Flex Code
8966 status collapsed
8967
8968 \begin_layout Plain Layout
8969 Theorems (Order by Section)
8970 \end_layout
8971
8972 \end_inset
8973
8974  or, if you are using 
8975 \begin_inset Flex Code
8976 status collapsed
8977
8978 \begin_layout Plain Layout
8979 book (AMS)
8980 \end_layout
8981
8982 \end_inset
8983
8984 , the module 
8985 \begin_inset Flex Code
8986 status collapsed
8987
8988 \begin_layout Plain Layout
8989 Theorems (Order by Chapter)
8990 \end_layout
8991
8992 \end_inset
8993
8994 .
8995  These will number the results as 
8996 \begin_inset Formula $n.m$
8997 \end_inset
8998
8999 , where the first number refers to the section (or chapter) and the second
9000  refers to the total number of results so far in that section (or chapter).
9001  Many environments are also available unnumbered.
9002  These are indicated by an asterisk at the end.
9003  If you happen to want 
9004 \emph on
9005 only
9006 \emph default
9007  unnumbered results, the module 
9008 \begin_inset Flex Code
9009 status collapsed
9010
9011 \begin_layout Plain Layout
9012 Theorems (Starred)
9013 \end_layout
9014
9015 \end_inset
9016
9017  provides that option.
9018 \end_layout
9019
9020 \begin_layout Standard
9021 Note that these modules do not 
9022 \emph on
9023 have
9024 \emph default
9025  to be used with the AMS classes.
9026  It is perfectly possible to use the 
9027 \begin_inset Flex Code
9028 status collapsed
9029
9030 \begin_layout Plain Layout
9031 Theorems (AMS)
9032 \end_layout
9033
9034 \end_inset
9035
9036  module, and the others mentioned, with other classes, such as 
9037 \begin_inset Flex Code
9038 status collapsed
9039
9040 \begin_layout Plain Layout
9041 article
9042 \end_layout
9043
9044 \end_inset
9045
9046
9047 \begin_inset Flex Code
9048 status collapsed
9049
9050 \begin_layout Plain Layout
9051 report
9052 \end_layout
9053
9054 \end_inset
9055
9056
9057 \begin_inset Flex Code
9058 status collapsed
9059
9060 \begin_layout Plain Layout
9061 book (KOMA-script)
9062 \end_layout
9063
9064 \end_inset
9065
9066 , and so forth.
9067 \end_layout
9068
9069 \begin_layout Subsection
9070 What these layouts provide
9071 \end_layout
9072
9073 \begin_layout Standard
9074 There is a long list of included environments provided by these layouts.
9075  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9076  variety of `theorem' environments.
9077  However, the AMS recommends the environments that are available in LyX.
9078  
9079 \end_layout
9080
9081 \begin_layout Standard
9082 The following environments—as well as the standard environments, such as
9083  
9084 \begin_inset Flex Noun
9085 status collapsed
9086
9087 \begin_layout Plain Layout
9088 section
9089 \end_layout
9090
9091 \end_inset
9092
9093
9094 \begin_inset Flex Noun
9095 status collapsed
9096
9097 \begin_layout Plain Layout
9098 bibliography
9099 \end_layout
9100
9101 \end_inset
9102
9103
9104 \begin_inset Flex Noun
9105 status collapsed
9106
9107 \begin_layout Plain Layout
9108 title
9109 \end_layout
9110
9111 \end_inset
9112
9113
9114 \begin_inset Flex Noun
9115 status collapsed
9116
9117 \begin_layout Plain Layout
9118 author
9119 \end_layout
9120
9121 \end_inset
9122
9123 , and 
9124 \begin_inset Flex Noun
9125 status collapsed
9126
9127 \begin_layout Plain Layout
9128 date
9129 \end_layout
9130
9131 \end_inset
9132
9133 —are provided by 
9134 \begin_inset Flex Code
9135 status collapsed
9136
9137 \begin_layout Plain Layout
9138 article (AMS)
9139 \end_layout
9140
9141 \end_inset
9142
9143  and 
9144 \begin_inset Flex Code
9145 status collapsed
9146
9147 \begin_layout Plain Layout
9148 book (AMS)
9149 \end_layout
9150
9151 \end_inset
9152
9153 :
9154 \end_layout
9155
9156 \begin_layout Description
9157 Address This should be the author's permanent address.
9158 \end_layout
9159
9160 \begin_layout Description
9161 Current
9162 \begin_inset space ~
9163 \end_inset
9164
9165 Address This should be the author's temporary address at the time of submission,
9166  if different from the Address.
9167 \end_layout
9168
9169 \begin_layout Description
9170 Email Author's e-mail address
9171 \end_layout
9172
9173 \begin_layout Description
9174 URL Author's Web address, if desired.
9175 \end_layout
9176
9177 \begin_layout Description
9178 Keywords Key words or phrases used to identify specific topics discussed
9179  in the paper.
9180 \end_layout
9181
9182 \begin_layout Description
9183 Subjectclass These refer to the AMS Subject Classifications, published and
9184  described in 
9185 \emph on
9186 Mathematical Reviews
9187 \emph default
9188 .
9189  These are also available online at the AMS cites listed above.
9190 \end_layout
9191
9192 \begin_layout Description
9193 Thanks
9194 \end_layout
9195
9196 \begin_layout Description
9197 Dedicatory
9198 \end_layout
9199
9200 \begin_layout Description
9201 Translator
9202 \end_layout
9203
9204 \begin_layout Standard
9205 The following environments are provided by both the 
9206 \begin_inset Flex Code
9207 status collapsed
9208
9209 \begin_layout Plain Layout
9210 Theorems
9211 \end_layout
9212
9213 \end_inset
9214
9215  and 
9216 \begin_inset Flex Code
9217 status collapsed
9218
9219 \begin_layout Plain Layout
9220 Theorems (AMS)
9221 \end_layout
9222
9223 \end_inset
9224
9225  modules, in the latter case in both starred (unnumbered) and unstarred
9226  (numbered) versions.
9227  These same environments are provided only in the starred versions by the
9228  
9229 \begin_inset Flex Code
9230 status collapsed
9231
9232 \begin_layout Plain Layout
9233 Theorems (Starred)
9234 \end_layout
9235
9236 \end_inset
9237
9238  module:
9239 \end_layout
9240
9241 \begin_layout Theorem
9242 This is typically used for the statements of major results.
9243  
9244 \end_layout
9245
9246 \begin_layout Corollary*
9247 This is used for statements which follow fairly directly from previous statement
9248 s.
9249  Again, these can be major results.
9250  
9251 \end_layout
9252
9253 \begin_layout Lemma
9254 These are smaller results needed to prove other statements.
9255 \end_layout
9256
9257 \begin_layout Proposition
9258 These are less major results which (hopefully) add to the general theory
9259  being discussed.
9260 \end_layout
9261
9262 \begin_layout Conjecture
9263 These are statements provided without justification, which the author does
9264  not know how to prove, but which seem to be true (to the author, at least).
9265 \end_layout
9266
9267 \begin_layout Definition*
9268 Guess what this is for.
9269  The font is different for this environment than for the previous ones.
9270  
9271 \end_layout
9272
9273 \begin_layout Example*
9274 Used for examples illustrating proven results.
9275 \end_layout
9276
9277 \begin_layout Problem
9278 It's not really known what this is for.
9279  You should figure it out.
9280 \end_layout
9281
9282 \begin_layout Exercise*
9283 Write a description for this one.
9284 \end_layout
9285
9286 \begin_layout Remark
9287 This environment is also a type of theorem, usually a lesser sort of observation.
9288 \end_layout
9289
9290 \begin_layout Claim*
9291 Often used in the course of giving a proof of a larger result.
9292 \end_layout
9293
9294 \begin_layout Case
9295 Generally, these are used to break up long arguments, using specific instances
9296  of some condition.
9297  
9298 \end_layout
9299
9300 \begin_layout Case
9301 The numbering scheme for cases is on its own, not together with other numbered
9302  statements.
9303  
9304 \end_layout
9305
9306 \begin_layout Proof
9307 At the end of this environment, a QED symbol (usually a square, but it can
9308  vary with different styles) is placed.
9309  If you want to have other environments within this one—for example, Case
9310  environments—and have the QED symbol appear only after them, then the other
9311  environments need to be nested within the proof environment.
9312  See the section 
9313 \emph on
9314 Nesting Environments
9315 \emph default
9316  of the 
9317 \emph on
9318 User's Guide
9319 \emph default
9320  for information on nesting.
9321 \end_layout
9322
9323 \begin_layout Standard
9324 And these environments are provided by 
9325 \begin_inset Flex Code
9326 status collapsed
9327
9328 \begin_layout Plain Layout
9329 Theorems (AMS-Extended)
9330 \end_layout
9331
9332 \end_inset
9333
9334 :
9335 \end_layout
9336
9337 \begin_layout Criterion*
9338 A required condition.
9339 \end_layout
9340
9341 \begin_layout Algorithm*
9342 A general procedure to be used.
9343 \end_layout
9344
9345 \begin_layout Axiom*
9346 This is a property or statement taken as true within the system being discussed.
9347 \end_layout
9348
9349 \begin_layout Condition*
9350 Sometimes used to state a condition assumed within the present context of
9351  discussion.
9352 \end_layout
9353
9354 \begin_layout Note*
9355 Similar to a Remark.
9356 \end_layout
9357
9358 \begin_layout Notation*
9359 Used for the explanation of, yes, notation.
9360 \end_layout
9361
9362 \begin_layout Summary
9363 Do we really need to tell you? 
9364 \end_layout
9365
9366 \begin_layout Acknowledgement*
9367 Acknowledgement.
9368 \end_layout
9369
9370 \begin_layout Conclusion*
9371 Sometimes used at the end of a long train of argument.
9372 \end_layout
9373
9374 \begin_layout Fact
9375 Used in a way similar to Proposition, though perhaps lower on the scale.
9376 \end_layout
9377
9378 \begin_layout Standard
9379 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9380  fonts packages.
9381  They need to be available on your system in order to use these environments.
9382 \end_layout
9383
9384 \begin_layout Section
9385 AGU journals (
9386 \family sans
9387 aguplus
9388 \family default
9389 )
9390 \end_layout
9391
9392 \begin_layout Standard
9393 by 
9394 \shape smallcaps
9395 Martin Vermeer
9396 \end_layout
9397
9398 \begin_layout Subsection
9399 Description
9400 \end_layout
9401
9402 \begin_layout Standard
9403 These are the layout files for some of the journals of the American Geophysical
9404  Society.
9405  It is assumed that you have both the AGU's own class files and AGUplus
9406  installed (everything to be found at
9407 \begin_inset Flex URL
9408 status collapsed
9409
9410 \begin_layout Plain Layout
9411
9412 ftp://ftp.agu.org/journals/latex/journals
9413 \end_layout
9414
9415 \end_inset
9416
9417 ).
9418 \end_layout
9419
9420 \begin_layout Subsection
9421 New styles
9422 \end_layout
9423
9424 \begin_layout Standard
9425 Redefined are 
9426 \family sans
9427 Paragraph
9428 \family default
9429
9430 \family sans
9431 Paragraph*
9432 \family default
9433 .
9434  They are still called this in the LyX GUI, though their LaTeX equivalents
9435  in the AGU classes are 
9436 \family sans
9437 Subsubsubsection
9438 \family default
9439  and 
9440 \family sans
9441 Subsubsubsection*
9442 \family default
9443 .
9444 \end_layout
9445
9446 \begin_layout Standard
9447 Newly defined styles are 
9448 \family sans
9449 Left_Header
9450 \family default
9451
9452 \family sans
9453 Right_Header
9454 \family default
9455
9456 \family sans
9457 Received
9458 \family default
9459
9460 \family sans
9461 Revised
9462 \family default
9463
9464 \family sans
9465 Accepted
9466 \family default
9467
9468 \family sans
9469 CCC
9470 \family default
9471
9472 \family sans
9473 PaperId
9474 \family default
9475
9476 \family sans
9477 AuthorAddr
9478 \family default
9479
9480 \family sans
9481 SlugComment
9482 \family default
9483 .
9484  These are mostly manuscript attributes and defined in the AGU class documentati
9485 on.
9486 \end_layout
9487
9488 \begin_layout Standard
9489 I suspect this is still badly incomplete.
9490 \end_layout
9491
9492 \begin_layout Subsection
9493 New floats
9494 \end_layout
9495
9496 \begin_layout Standard
9497
9498 \family sans
9499 Planotable
9500 \family default
9501  and 
9502 \family sans
9503 Plate
9504 \family default
9505 .
9506  We also have a new 
9507 \family sans
9508 Table_Caption
9509 \family default
9510 .
9511 \end_layout
9512
9513 \begin_layout Subsection
9514 Supported journals
9515 \end_layout
9516
9517 \begin_layout Itemize
9518
9519 \emph on
9520 Journal of Geophysical Research
9521 \emph default
9522
9523 \family typewriter
9524 jgrga.layout
9525 \family default
9526  — Martin Vermeer
9527 \end_layout
9528
9529 \begin_layout Standard
9530 Add your own, it isn't so hard! Look at the 
9531 \family typewriter
9532 jgrga.layout
9533 \family default
9534  example and 
9535 \family typewriter
9536 aguplus.inc
9537 \family default
9538 .
9539 \end_layout
9540
9541 \begin_layout Subsection
9542 Bugs and things to remember
9543 \end_layout
9544
9545 \begin_layout Standard
9546 In order to use the new layouts, you must remember to do the following for
9547  a new document:
9548 \end_layout
9549
9550 \begin_layout Enumerate
9551
9552 \emph on
9553 Turn off babel
9554 \emph default
9555 .
9556  This can be done in the 
9557 \family sans
9558 Layout\SpecialChar \menuseparator
9559 Document
9560 \family default
9561  or 
9562 \family sans
9563 Document\SpecialChar \menuseparator
9564 Settings
9565 \family default
9566  menu item.
9567  (AGU articles are always in English, right? So 
9568 \emph on
9569 don't
9570 \emph default
9571  choose a language.)
9572 \end_layout
9573
9574 \begin_layout Enumerate
9575 Enter 
9576 \family typewriter
9577 jgrga
9578 \family default
9579  into the document's 
9580 \family sans
9581 Extra Options
9582 \family default
9583  field.
9584  (Yes, this is a bug.)
9585 \end_layout
9586
9587 \begin_layout Enumerate
9588 Make sure you use the 
9589 \family typewriter
9590 agu.bst
9591 \family default
9592  bibliography style, by entering 
9593 \family sans
9594 agu
9595 \family default
9596  into the second field of the BibTeX inset.
9597  None of the standard styles will do.
9598 \end_layout
9599
9600 \begin_layout Section
9601 Broadway
9602 \end_layout
9603
9604 \begin_layout Standard
9605 by 
9606 \shape smallcaps
9607 Garst Reese
9608 \end_layout
9609
9610 \begin_layout Subsection
9611 Introduction
9612 \end_layout
9613
9614 \begin_layout Standard
9615 Broadway is for writing plays.
9616  The format is more decorative than Hollywood, and much less standardized.
9617  This format should be suitable for workshops.
9618 \end_layout
9619
9620 \begin_layout Subsection
9621 Special problems
9622 \end_layout
9623
9624 \begin_layout Standard
9625 The same as in Hollywood.
9626 \end_layout
9627
9628 \begin_layout Subsection
9629 Special features
9630 \end_layout
9631
9632 \begin_layout Standard
9633 Insert the 
9634 \family sans
9635 Speaker
9636 \family default
9637  names as labels then cross-reference the label to insert the name.
9638  The cross-reference dialog will show the current cast of characters.
9639 \end_layout
9640
9641 \begin_layout Subsection
9642 Paper size and Margins
9643 \end_layout
9644
9645 \begin_layout Standard
9646 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9647 \end_layout
9648
9649 \begin_layout Subsection
9650 Environments
9651 \end_layout
9652
9653 \begin_layout Standard
9654 The following environments are available.
9655  You can use broadway.bind to get the bind keys shown at the right.
9656 \end_layout
9657
9658 \begin_layout Itemize
9659
9660 \family sans
9661 Standard
9662 \begin_inset Newline newline
9663 \end_inset
9664
9665
9666 \family default
9667 You should not have to use this, but it is here for anything that does not
9668  fit otherwise.
9669 \end_layout
9670
9671 \begin_layout Itemize
9672
9673 \family sans
9674 Narrative
9675 \begin_inset space \hfill{}
9676 \end_inset
9677
9678 M-z n
9679 \begin_inset Newline newline
9680 \end_inset
9681
9682
9683 \family default
9684 Used to describe stage setting and the action.
9685  First use of speaker names in all CAPs.
9686 \end_layout
9687
9688 \begin_layout Itemize
9689
9690 \family sans
9691 ACT
9692 \begin_inset space \hfill{}
9693 \end_inset
9694
9695 M-z a
9696 \begin_inset Newline newline
9697 \end_inset
9698
9699
9700 \family default
9701 Automatically numbered.
9702  On screen it will be arabic, but will print as Roman.
9703 \end_layout
9704
9705 \begin_layout Itemize
9706
9707 \family sans
9708 ACT*
9709 \begin_inset space \hfill{}
9710 \end_inset
9711
9712 M-z S at
9713 \begin_inset Newline newline
9714 \end_inset
9715
9716
9717 \family default
9718 Subtitle for 
9719 \family sans
9720 ACT.
9721
9722 \family default
9723  It is just centered text.
9724 \end_layout
9725
9726 \begin_layout Itemize
9727
9728 \family sans
9729 SCENE
9730 \begin_inset space \hfill{}
9731 \end_inset
9732
9733 M-z S-S
9734 \begin_inset Newline newline
9735 \end_inset
9736
9737
9738 \family default
9739 Not automatically numbered.
9740  You supply the number.
9741  This is because I couldn't figure out how.
9742 \end_layout
9743
9744 \begin_layout Itemize
9745
9746 \family sans
9747 AT_RISE:
9748 \begin_inset space \hfill{}
9749 \end_inset
9750
9751 M-z S-R
9752 \begin_inset Newline newline
9753 \end_inset
9754
9755
9756 \family default
9757 A special case of Narrative to describe the setting and action as the curtain
9758  rises.
9759 \end_layout
9760
9761 \begin_layout Itemize
9762
9763 \family sans
9764 Speaker
9765 \begin_inset space \hfill{}
9766 \end_inset
9767
9768 M-z s
9769 \begin_inset Newline newline
9770 \end_inset
9771
9772
9773 \family default
9774 The speaker's (actor's) title, centered in all CAPS.
9775 \end_layout
9776
9777 \begin_layout Itemize
9778
9779 \family sans
9780 Parenthetical
9781 \begin_inset space \hfill{}
9782 \end_inset
9783
9784 M-z p
9785 \begin_inset Newline newline
9786 \end_inset
9787
9788
9789 \family default
9790 Instructions to the speaker.
9791  The parentheses are automatically inserted.
9792  The ( will appear on screen, but both will be in the printed play.
9793  This environment is only used within 
9794 \family sans
9795 Dialogue
9796 \family default
9797 .
9798 \end_layout
9799
9800 \begin_layout Itemize
9801
9802 \family sans
9803 Dialogue
9804 \begin_inset space \hfill{}
9805 \end_inset
9806
9807 M-z d
9808 \begin_inset Newline newline
9809 \end_inset
9810
9811
9812 \family default
9813 What the Speaker says.
9814 \end_layout
9815
9816 \begin_layout Itemize
9817
9818 \family sans
9819 CURTAIN
9820 \begin_inset space \hfill{}
9821 \end_inset
9822
9823 M-z S-C
9824 \begin_inset Newline newline
9825 \end_inset
9826
9827
9828 \family default
9829 The curtain comes down.
9830 \end_layout
9831
9832 \begin_layout Itemize
9833
9834 \family sans
9835 Title
9836 \begin_inset space \hfill{}
9837 \end_inset
9838
9839 M-z S-T
9840 \end_layout
9841
9842 \begin_layout Itemize
9843
9844 \family sans
9845 Author
9846 \begin_inset space \hfill{}
9847 \end_inset
9848
9849 M-z S-A
9850 \end_layout
9851
9852 \begin_layout Itemize
9853
9854 \family sans
9855 Right_Address
9856 \begin_inset space \hfill{}
9857 \end_inset
9858
9859 M-z r
9860 \end_layout
9861
9862 \begin_layout Standard
9863 Hello there.
9864 \end_layout
9865
9866 \begin_layout Section
9867 Dinbrief
9868 \end_layout
9869
9870 \begin_layout Standard
9871 The document class 
9872 \family sans
9873 dinbrief
9874 \family default
9875  can be used to type letters according to German conventions.
9876  A template file is included in 
9877 \family typewriter
9878 .../lyx/share/templates
9879 \family default
9880  for you to use as a starting point.
9881 \end_layout
9882
9883 \begin_layout Section
9884 EGS journals (
9885 \family sans
9886 egs
9887 \family default
9888 )
9889 \end_layout
9890
9891 \begin_layout Standard
9892 by 
9893 \shape smallcaps
9894 Martin Vermeer
9895 \end_layout
9896
9897 \begin_layout Subsection
9898 Description
9899 \end_layout
9900
9901 \begin_layout Standard
9902 This is the layout file for the European Geophysical Society journals.
9903  The needed 
9904 \family typewriter
9905 egs.cls
9906 \family default
9907  can be downloaded from the web site of the EGS under 
9908 \begin_inset Flex URL
9909 status collapsed
9910
9911 \begin_layout Plain Layout
9912
9913 www.copernicus.org
9914 \end_layout
9915
9916 \end_inset
9917
9918 .
9919 \end_layout
9920
9921 \begin_layout Subsection
9922 New styles
9923 \end_layout
9924
9925 \begin_layout Standard
9926
9927 \family sans
9928 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9929  Accepted
9930 \family default
9931
9932 \family sans
9933 Offsets
9934 \family default
9935 .
9936  The current layout file is unfortunately very unmodular and would benefit
9937  from using the various 
9938 \family typewriter
9939 std*.inc
9940 \family default
9941  file inclusions.
9942 \end_layout
9943
9944 \begin_layout Section
9945 Elsevier Journals
9946 \end_layout
9947
9948 \begin_layout Standard
9949 See the LyX template file 
9950 \family typewriter
9951 elsarticle.lyx
9952 \family default
9953 .
9954  It contains all infos you need.
9955 \end_layout
9956
9957 \begin_layout Section
9958 Foils [aka 
9959 \family sans
9960 FoilTeX
9961 \family default
9962 ]
9963 \begin_inset CommandInset label
9964 LatexCommand label
9965 name "sec:foiltex"
9966
9967 \end_inset
9968
9969
9970 \end_layout
9971
9972 \begin_layout Standard
9973 by 
9974 \noun on
9975 Allan Rae
9976 \end_layout
9977
9978 \begin_layout Subsection
9979 Introduction
9980 \end_layout
9981
9982 \begin_layout Standard
9983 This section describes how to use LyX to make slides for overhead projectors.
9984  There are two document classes that can do this: the default slides class
9985  and the 
9986 \family sans
9987 FoilTeX
9988 \family default
9989  slides class.
9990  This section documents the latter.
9991 \end_layout
9992
9993 \begin_layout Standard
9994 I'm going to say this again, nice and clear, so that there's no misunderstanding
9995 :
9996 \end_layout
9997
9998 \begin_layout Standard
9999 \begin_inset VSpace bigskip
10000 \end_inset
10001
10002
10003 \end_layout
10004
10005 \begin_layout Standard
10006 \align center
10007
10008 \size large
10009 This section documents the class 
10010 \begin_inset Quotes eld
10011 \end_inset
10012
10013
10014 \family sans
10015 slides (FoilTeX)
10016 \family default
10017
10018 \begin_inset Quotes erd
10019 \end_inset
10020
10021  
10022 \emph on
10023 only.
10024 \end_layout
10025
10026 \begin_layout Standard
10027 \begin_inset VSpace bigskip
10028 \end_inset
10029
10030
10031 \end_layout
10032
10033 \begin_layout Standard
10034 If you're looking for the documentation for 
10035 \begin_inset Quotes eld
10036 \end_inset
10037
10038
10039 \family sans
10040 slides (default)
10041 \family default
10042
10043 \begin_inset Quotes erd
10044 \end_inset
10045
10046 , check out section
10047 \begin_inset space ~
10048 \end_inset
10049
10050
10051 \begin_inset CommandInset ref
10052 LatexCommand ref
10053 reference "sec:slitex"
10054
10055 \end_inset
10056
10057 .
10058  If your machine doesn't have the 
10059 \family sans
10060 foils
10061 \family default
10062  class [
10063 \begin_inset Quotes eld
10064 \end_inset
10065
10066
10067 \family sans
10068 slides (FoilTeX)
10069 \family default
10070
10071 \begin_inset Quotes erd
10072 \end_inset
10073
10074 ] installed, you'll probably have to use the default 
10075 \family sans
10076 slides
10077 \family default
10078  class, which isn't quite as good as 
10079 \family sans
10080 foils.
10081 \end_layout
10082
10083 \begin_layout Standard
10084 The 
10085 \family sans
10086 foils
10087 \family default
10088  class is designed for use with version 2.1 of the 
10089 \family sans
10090 foils.cls
10091 \family default
10092  LaTeX class file which is now an integral part of LaTeX2e.
10093 \end_layout
10094
10095 \begin_layout Subsection
10096 Getting Started
10097 \end_layout
10098
10099 \begin_layout Standard
10100 Obviously, to use this document class, you need to select 
10101 \begin_inset Quotes eld
10102 \end_inset
10103
10104
10105 \family sans
10106 slides (FoilTeX)
10107 \family default
10108
10109 \begin_inset Quotes erd
10110 \end_inset
10111
10112  from the 
10113 \family sans
10114 Class
10115 \family default
10116  entry in the 
10117 \family sans
10118 Document
10119 \begin_inset space ~
10120 \end_inset
10121
10122 Layout
10123 \family default
10124  dialog.
10125  There are some settings in the 
10126 \family sans
10127 Document
10128 \begin_inset space ~
10129 \end_inset
10130
10131 Layout
10132 \family default
10133  dialog that you should know about that are specific to this class:
10134 \end_layout
10135
10136 \begin_layout Itemize
10137 Don't change the options 
10138 \family sans
10139 Sides
10140 \family default
10141  and 
10142 \family sans
10143 Columns
10144 \family default
10145  on the 
10146 \family sans
10147 Document
10148 \begin_inset space ~
10149 \end_inset
10150
10151 Layout
10152 \family default
10153  dialog.
10154  They're ignored by the 
10155 \family sans
10156 foils
10157 \family default
10158  class.
10159 \end_layout
10160
10161 \begin_layout Itemize
10162 The default font size is 20
10163 \begin_inset space \thinspace{}
10164 \end_inset
10165
10166 pt with the other options being 17
10167 \begin_inset space \thinspace{}
10168 \end_inset
10169
10170 pt, 25
10171 \begin_inset space \thinspace{}
10172 \end_inset
10173
10174 pt and 30
10175 \begin_inset space \thinspace{}
10176 \end_inset
10177
10178 pt.
10179 \end_layout
10180
10181 \begin_layout Itemize
10182 The default font is 
10183 \family sans
10184 sans
10185 \family default
10186  
10187 \family sans
10188 serif
10189 \family default
10190  but all math equations are still typeset in the usual roman font.
10191 \end_layout
10192
10193 \begin_layout Itemize
10194
10195 \family sans
10196 FoilTeX
10197 \family default
10198  supports A4 and Letter paper sizes as well as a special size for working
10199  with 35
10200 \begin_inset space \thinspace{}
10201 \end_inset
10202
10203 mm slides.
10204  It doesn't support A5, B5, legal or executive paper sizes.
10205 \end_layout
10206
10207 \begin_layout Itemize
10208 Don't bother changing the 
10209 \family sans
10210 Float Placement
10211 \family default
10212  settings because they are ignored anyway.
10213  All floats appear where they are defined in the text.
10214 \end_layout
10215
10216 \begin_layout Itemize
10217 The 
10218 \family sans
10219 Pagestyle
10220 \family default
10221  setting behaves a bit differently for this class.
10222  
10223 \family sans
10224 FoilTeX
10225 \family default
10226  provides extensive footer and header capabilities including a user-defined
10227  logo.
10228  See section
10229 \begin_inset space ~
10230 \end_inset
10231
10232
10233 \begin_inset CommandInset ref
10234 LatexCommand ref
10235 reference "sec:foilfoot"
10236
10237 \end_inset
10238
10239  for more details.
10240  The title page is treated differently to all other pages in the document
10241  and is 
10242 \emph on
10243 always
10244 \emph default
10245  unnumbered and 
10246 \emph on
10247 always
10248 \emph default
10249  has the logo centered at the bottom of the page (if one is defined).
10250  The possible page style choices and what they do are as follows:
10251 \end_layout
10252
10253 \begin_deeper
10254 \begin_layout Labeling
10255 \labelwidthstring MMMMMMM
10256
10257 \family sans
10258 \series bold
10259 empty
10260 \family default
10261 \series default
10262  The final output contains no page numbers, or other headers or footers
10263  (except footnotes of course).
10264  
10265 \end_layout
10266
10267 \begin_layout Labeling
10268 \labelwidthstring MMMMMMM
10269
10270 \family sans
10271 \series bold
10272 plain
10273 \family default
10274 \series default
10275  The final output contains page numbers centered at the bottom of the page.
10276  No other headings or footers (other than footnotes).
10277 \end_layout
10278
10279 \begin_layout Labeling
10280 \labelwidthstring MMMMMMM
10281
10282 \series bold
10283 foilheadings
10284 \series default
10285  Page numbers in lower right corner.
10286  Additional headers and footers are also shown.
10287  This is also the default.
10288 \end_layout
10289
10290 \begin_layout Labeling
10291 \labelwidthstring MMMMMMM
10292
10293 \series bold
10294 fancy
10295 \series default
10296  Gives you access to the 
10297 \family sans
10298 fancyheadings
10299 \family default
10300  package although its use with 
10301 \family sans
10302 FoilTeX
10303 \family default
10304  is discouraged by the writer of the 
10305 \family sans
10306 FoilTeX
10307 \family default
10308  package because of some potential page layout clashes.
10309 \end_layout
10310
10311 \end_deeper
10312 \begin_layout Subsubsection
10313 Extra Options
10314 \end_layout
10315
10316 \begin_layout Standard
10317 The following options may be used in the extra class options in the 
10318 \family sans
10319 Document\SpecialChar \menuseparator
10320 Settings
10321 \family default
10322  dialog.
10323 \end_layout
10324
10325 \begin_layout Labeling
10326 \labelwidthstring MMMMMMx
10327
10328 \series bold
10329 35mmSlide
10330 \series default
10331  This sets up the page layout for 7.33
10332 \begin_inset space \thinspace{}
10333 \end_inset
10334
10335 in by 11
10336 \begin_inset space \thinspace{}
10337 \end_inset
10338
10339 in paper, which is about the same aspect ratio as a 35
10340 \begin_inset space \thinspace{}
10341 \end_inset
10342
10343 mm slide, making it a bit easier to work with this medium.
10344 \end_layout
10345
10346 \begin_layout Labeling
10347 \labelwidthstring MMMMMMx
10348
10349 \series bold
10350 headrule
10351 \series default
10352  Places a rule across the page below the header on every page except the
10353  title page.
10354 \end_layout
10355
10356 \begin_layout Labeling
10357 \labelwidthstring MMMMMMx
10358
10359 \series bold
10360 footrule
10361 \series default
10362  Places a rule across the page above the footer on every page except the
10363  title page.
10364 \end_layout
10365
10366 \begin_layout Labeling
10367 \labelwidthstring MMMMMMx
10368
10369 \series bold
10370 dvips
10371 \series default
10372  This is automatically set each time you create a new 
10373 \family sans
10374 foils
10375 \family default
10376  document.
10377  This option tells 
10378 \family sans
10379 FoilTeX
10380 \family default
10381  to use the dvips driver to rotate those pages that are set as landscape
10382  foils.
10383 \end_layout
10384
10385 \begin_layout Labeling
10386 \labelwidthstring MMMMMMx
10387
10388 \series bold
10389 landscape
10390 \series default
10391  Simply changes the page dimensions to those of a landscape page but doesn't
10392  do any rotation.
10393  Thus if you use this option you need to use an external program to rotate
10394  each page or feed your paper through your printer as landscape.
10395  Note that this option effectively reverses the roles of the 
10396 \family sans
10397 Foilhead
10398 \family default
10399  and 
10400 \family sans
10401 Rotatefoilhead
10402 \family default
10403  environments (don't worry these are described in the next section).
10404 \end_layout
10405
10406 \begin_layout Labeling
10407 \labelwidthstring MMMMMMx
10408
10409 \series bold
10410 leqno
10411 \series default
10412  Equation numbers on the left.
10413 \end_layout
10414
10415 \begin_layout Labeling
10416 \labelwidthstring MMMMMMx
10417
10418 \series bold
10419 fleqn
10420 \series default
10421  Flush-left equations.
10422 \end_layout
10423
10424 \begin_layout Subsection
10425 Supported Environments
10426 \end_layout
10427
10428 \begin_layout Standard
10429 Most of the environments commonly supported in other classes are also supported
10430  by the 
10431 \family sans
10432 foils
10433 \family default
10434  class.
10435  There are several additional environments provided by 
10436 \family sans
10437 FoilTeX
10438 \family default
10439  as well as a couple added by LyX.
10440  The following environments are shared with other classes:
10441 \end_layout
10442
10443 \begin_layout Standard
10444 \begin_inset ERT
10445 status open
10446
10447 \begin_layout Plain Layout
10448
10449
10450 \backslash
10451 begin{multicols}{2}
10452 \end_layout
10453
10454 \end_inset
10455
10456
10457 \end_layout
10458
10459 \begin_layout Itemize
10460
10461 \family sans
10462 Standard
10463 \end_layout
10464
10465 \begin_layout Itemize
10466
10467 \family sans
10468 Itemize
10469 \end_layout
10470
10471 \begin_layout Itemize
10472
10473 \family sans
10474 Enumerate
10475 \end_layout
10476
10477 \begin_layout Itemize
10478
10479 \family sans
10480 Description
10481 \end_layout
10482
10483 \begin_layout Itemize
10484
10485 \family sans
10486 List
10487 \end_layout
10488
10489 \begin_layout Itemize
10490
10491 \family sans
10492 LyX-Code
10493 \end_layout
10494
10495 \begin_layout Itemize
10496
10497 \family sans
10498 Verse
10499 \end_layout
10500
10501 \begin_layout Itemize
10502
10503 \family sans
10504 Quote
10505 \end_layout
10506
10507 \begin_layout Itemize
10508
10509 \family sans
10510 Quotation
10511 \end_layout
10512
10513 \begin_layout Itemize
10514
10515 \family sans
10516 Title
10517 \end_layout
10518
10519 \begin_layout Itemize
10520
10521 \family sans
10522 Author
10523 \end_layout
10524
10525 \begin_layout Itemize
10526
10527 \family sans
10528 Date
10529 \end_layout
10530
10531 \begin_layout Itemize
10532
10533 \family sans
10534 Abstract
10535 \end_layout
10536
10537 \begin_layout Itemize
10538
10539 \family sans
10540 Bibliography
10541 \end_layout
10542
10543 \begin_layout Itemize
10544
10545 \family sans
10546 Address
10547 \end_layout
10548
10549 \begin_layout Itemize
10550
10551 \family sans
10552 RightAddress
10553 \end_layout
10554
10555 \begin_layout Itemize
10556
10557 \family sans
10558 Caption
10559 \end_layout
10560
10561 \begin_layout Itemize
10562
10563 \family sans
10564 Comment
10565 \end_layout
10566
10567 \begin_layout Standard
10568 \begin_inset ERT
10569 status open
10570
10571 \begin_layout Plain Layout
10572
10573
10574 \backslash
10575 end{multicols}
10576 \end_layout
10577
10578 \end_inset
10579
10580
10581 \end_layout
10582
10583 \begin_layout Standard
10584 That is, all the major environments apart from the sectioning environments.
10585  Since foils are essentially self-contained sections, with a title and body,
10586  
10587 \family sans
10588 FoilTeX
10589 \family default
10590  provides specific commands for starting new foils and these are:
10591 \end_layout
10592
10593 \begin_layout Itemize
10594
10595 \family sans
10596 Foilhead
10597 \end_layout
10598
10599 \begin_layout Itemize
10600
10601 \family sans
10602 Rotatefoilhead
10603 \end_layout
10604
10605 \begin_layout Standard
10606 LyX also provides slightly modified versions of these two environments called:
10607 \end_layout
10608
10609 \begin_layout Itemize
10610
10611 \family sans
10612 ShortFoilhead
10613 \end_layout
10614
10615 \begin_layout Itemize
10616
10617 \family sans
10618 ShortRotatefoilhead
10619 \end_layout
10620
10621 \begin_layout Standard
10622 and the differences will be explained in the next section.
10623 \end_layout
10624
10625 \begin_layout Standard
10626 Since foils are often used in presenting ideas or new theorems and such
10627  
10628 \family sans
10629 FoilTeX
10630 \family default
10631  also provides a comprehensive box of goodies for presenting them:
10632 \end_layout
10633
10634 \begin_layout Standard
10635 \begin_inset ERT
10636 status open
10637
10638 \begin_layout Plain Layout
10639
10640
10641 \backslash
10642 begin{multicols}{2}
10643 \end_layout
10644
10645 \end_inset
10646
10647
10648 \end_layout
10649
10650 \begin_layout Itemize
10651
10652 \family sans
10653 Theorem
10654 \end_layout
10655
10656 \begin_layout Itemize
10657
10658 \family sans
10659 Lemma
10660 \end_layout
10661
10662 \begin_layout Itemize
10663
10664 \family sans
10665 Corollary
10666 \end_layout
10667
10668 \begin_layout Itemize
10669
10670 \family sans
10671 Proposition
10672 \end_layout
10673
10674 \begin_layout Itemize
10675
10676 \family sans
10677 Definition
10678 \end_layout
10679
10680 \begin_layout Itemize
10681
10682 \family sans
10683 Proof
10684 \end_layout
10685
10686 \begin_layout Itemize
10687
10688 \family sans
10689 Theorem*
10690 \end_layout
10691
10692 \begin_layout Itemize
10693
10694 \family sans
10695 Lemma*
10696 \end_layout
10697
10698 \begin_layout Itemize
10699
10700 \family sans
10701 Corollary*
10702 \end_layout
10703
10704 \begin_layout Itemize
10705
10706 \family sans
10707 Proposition*
10708 \end_layout
10709
10710 \begin_layout Itemize
10711
10712 \family sans
10713 Definition*
10714 \end_layout
10715
10716 \begin_layout Standard
10717 \begin_inset ERT
10718 status open
10719
10720 \begin_layout Plain Layout
10721
10722
10723 \backslash
10724 end{multicols}
10725 \end_layout
10726
10727 \end_inset
10728
10729
10730 \end_layout
10731
10732 \begin_layout Standard
10733 The starred versions are unnumbered while the unstarred versions are numbered.
10734  There are also two list environments added by LyX and these are:
10735 \end_layout
10736
10737 \begin_layout Itemize
10738
10739 \family sans
10740 TickList
10741 \end_layout
10742
10743 \begin_layout Itemize
10744
10745 \family sans
10746 CrossList
10747 \end_layout
10748
10749 \begin_layout Standard
10750
10751 \family sans
10752 FoilTeX
10753 \family default
10754  provides some powerful header and footer capabilities that are best set
10755  in the preamble although they may be set at any point in a document.
10756  If you want to change these settings in your document the best place to
10757  do so is at the very top of a foil, i.
10758 \begin_inset space \thinspace{}
10759 \end_inset
10760
10761 e.
10762 \emph on
10763
10764 \begin_inset space \space{}
10765 \end_inset
10766
10767
10768 \emph default
10769 straight after the foilhead.
10770 \end_layout
10771
10772 \begin_layout Standard
10773 For this purpose, the following command styles are provided [
10774 \shape smallcaps
10775 Martin Vermeer
10776 \shape default
10777 ]:
10778 \end_layout
10779
10780 \begin_layout Standard
10781 \begin_inset ERT
10782 status open
10783
10784 \begin_layout Plain Layout
10785
10786
10787 \backslash
10788 begin{multicols}{2}
10789 \end_layout
10790
10791 \end_inset
10792
10793
10794 \end_layout
10795
10796 \begin_layout Itemize
10797
10798 \family sans
10799 My
10800 \begin_inset space ~
10801 \end_inset
10802
10803 Logo
10804 \end_layout
10805
10806 \begin_layout Itemize
10807
10808 \family sans
10809 Restriction
10810 \end_layout
10811
10812 \begin_layout Itemize
10813
10814 \family sans
10815 Right
10816 \begin_inset space ~
10817 \end_inset
10818
10819 Footer
10820 \end_layout
10821
10822 \begin_layout Itemize
10823
10824 \family sans
10825 Right
10826 \begin_inset space ~
10827 \end_inset
10828
10829 Header
10830 \end_layout
10831
10832 \begin_layout Itemize
10833
10834 \family sans
10835 Left
10836 \begin_inset space ~
10837 \end_inset
10838
10839 Header
10840 \end_layout
10841
10842 \begin_deeper
10843 \begin_layout Standard
10844 \begin_inset space ~
10845 \end_inset
10846
10847
10848 \end_layout
10849
10850 \end_deeper
10851 \begin_layout Standard
10852 \begin_inset ERT
10853 status open
10854
10855 \begin_layout Plain Layout
10856
10857
10858 \backslash
10859 end{multicols}
10860 \end_layout
10861
10862 \end_inset
10863
10864
10865 \end_layout
10866
10867 \begin_layout Standard
10868 There are also a few commands provided by 
10869 \family sans
10870 FoilTeX
10871 \family default
10872  that aren't directly supported by LyX but I'll tell you what they do and
10873  how to use them in section
10874 \begin_inset space ~
10875 \end_inset
10876
10877
10878 \begin_inset CommandInset ref
10879 LatexCommand ref
10880 reference "sec:unsuppfoils"
10881
10882 \end_inset
10883
10884 .
10885 \end_layout
10886
10887 \begin_layout Subsection
10888 Building a Set of Foils
10889 \end_layout
10890
10891 \begin_layout Standard
10892 This section will give a simple introduction to using the different environments
10893  to build a set of foils.
10894  If you want to see an example set of foils, take a look at the 
10895 \family typewriter
10896 Foils.lyx
10897 \family default
10898  file you find in LyX's 
10899 \family typewriter
10900 examples
10901 \family default
10902  folder.
10903 \end_layout
10904
10905 \begin_layout Subsubsection
10906 Give It a Title Page
10907 \end_layout
10908
10909 \begin_layout Standard
10910 Unlike other classes that provide 
10911 \family sans
10912 Title
10913 \family default
10914
10915 \family sans
10916 Author
10917 \family default
10918
10919 \family sans
10920 Date
10921 \family default
10922  and 
10923 \family sans
10924 Abstract
10925 \family default
10926  environments, 
10927 \family sans
10928 foils
10929 \family default
10930  creates the title on a page of its own.
10931  If you leave out the 
10932 \family sans
10933 Date
10934 \family default
10935  environment LaTeX will substitute the current date (every time you regenerate
10936  the output).
10937 \end_layout
10938
10939 \begin_layout Subsubsection
10940 Start a New Foil
10941 \end_layout
10942
10943 \begin_layout Standard
10944 As I mentioned earlier, there are four ways of starting a new foil.
10945  For portrait foils you should use 
10946 \family sans
10947 Foilhead
10948 \family default
10949  or 
10950 \family sans
10951 ShortFoilhead.
10952
10953 \family default
10954  The difference between these two environments is the amount of space between
10955  the title of the foil (the foilhead) and the body of the foil.
10956 \end_layout
10957
10958 \begin_layout Standard
10959 Landscape foils are generated using the 
10960 \family sans
10961 Rotatefoilhead
10962 \family default
10963  and 
10964 \family sans
10965 ShortRotatefoilhead
10966 \family default
10967  environments.
10968  Again the only difference is the spacing between foilhead and body.
10969  Both of the short versions have 0.5 inches less separation between the foilhead
10970  and the body.
10971  
10972 \end_layout
10973
10974 \begin_layout Standard
10975 One problem with the support for landscape foils is the requirement that
10976  you have to use the 
10977 \family typewriter
10978 dvips
10979 \family default
10980  driver to generate the PostScript output otherwise the foils won't be rotated.
10981  It is possible to get landscape foils even if you haven't got the 
10982 \family typewriter
10983 dvips
10984 \family default
10985  driver provided you can feed your foils sideways through your printer ;-)
10986 \end_layout
10987
10988 \begin_layout Subsubsection
10989 Theorems, Lemmas, Proofs and more
10990 \end_layout
10991
10992 \begin_layout Standard
10993 Due to a small bug in LyX you can't have two of the same type of these environme
10994 nts directly following each other.
10995  They must be separated by something.
10996  If you try, you will just be extending the previous environment as if you
10997  had merged the two environments together.
10998  So, how do you get around this problem? The simplest option is to insert
10999  some text between the two environments or add a 
11000 \family sans
11001 LaTeX
11002 \family default
11003  environment between the two with just a 
11004 \begin_inset Quotes eld
11005 \end_inset
11006
11007
11008 \family typewriter
11009 %
11010 \family default
11011
11012 \begin_inset Quotes erd
11013 \end_inset
11014
11015  in it.
11016  This will force LyX to produce two separate environments and hence the
11017  correct LaTeX output.
11018  An example is provided in the example file included with the LyX distribution.
11019  Remember, this problem only occurs if you are trying to place two of the
11020  same type of theorem-like environments one directly after the other.
11021 \end_layout
11022
11023 \begin_layout Subsubsection
11024 Lists
11025 \end_layout
11026
11027 \begin_layout Standard
11028 You get all the commonly supported list styles found in other classes as
11029  well as two new ones.
11030  I'll only describe the new ones here.
11031  If you want to find out more about the other list environments check out
11032  the 
11033 \emph on
11034 User's Guide.
11035
11036 \emph default
11037  If you intend to use itemized lists you might also want to read about the
11038  
11039 \family sans
11040 Itemize
11041 \begin_inset space ~
11042 \end_inset
11043
11044 Bullet
11045 \begin_inset space ~
11046 \end_inset
11047
11048 Selection
11049 \family default
11050  dialog described above in section
11051 \begin_inset space ~
11052 \end_inset
11053
11054
11055 \begin_inset CommandInset ref
11056 LatexCommand ref
11057 reference "sec:bullet"
11058
11059 \end_inset
11060
11061 .
11062 \end_layout
11063
11064 \begin_layout Standard
11065 The two new list styles, 
11066 \family sans
11067 TickList
11068 \family default
11069  and 
11070 \family sans
11071 CrossList
11072 \family default
11073 , are designed to make it easier for you to create lists of do's and don'ts
11074  or right and wrong by providing dedicated environments that use a tick
11075  or a cross as the label of the list.
11076  These lists are in fact dedicated variants of the 
11077 \family sans
11078 Itemize
11079 \family default
11080  environment.
11081  They do however require that you have the 
11082 \family typewriter
11083 psnfss
11084 \family default
11085  packages installed.
11086 \end_layout
11087
11088 \begin_layout Subsubsection
11089 Figures and Tables
11090 \end_layout
11091
11092 \begin_layout Standard
11093
11094 \family sans
11095 FoilTeX
11096 \family default
11097  redefines the floating tables and figures so that they appear exactly where
11098  they are in the text rather than pushing them to the top of the page or
11099  to some user specified location.
11100  In fact if you change the float placement settings they are simply ignored.
11101 \end_layout
11102
11103 \begin_layout Subsubsection
11104 Page Headers and Footers
11105 \begin_inset CommandInset label
11106 LatexCommand label
11107 name "sec:foilfoot"
11108
11109 \end_inset
11110
11111
11112 \end_layout
11113
11114 \begin_layout Standard
11115
11116 \family sans
11117 My
11118 \begin_inset space ~
11119 \end_inset
11120
11121 Logo
11122 \family default
11123  and 
11124 \family sans
11125 Restriction
11126 \family default
11127  are two commands used to control the left-footer text string.
11128  The first is meant to allow you to include a graphic logo on your foils
11129  and defaults to 
11130 \begin_inset Quotes eld
11131 \end_inset
11132
11133 -Typeset by 
11134 \family sans
11135 FoilTeX
11136 \family default
11137 -
11138 \begin_inset Quotes erd
11139 \end_inset
11140
11141 .
11142  While the second is meant to provide a classification for the audience,
11143  
11144 \emph on
11145 e.
11146 \begin_inset space \thinspace{}
11147 \end_inset
11148
11149 g.
11150 \emph default
11151
11152 \begin_inset space \space{}
11153 \end_inset
11154
11155 Confidential.
11156  It is empty by default.
11157 \end_layout
11158
11159 \begin_layout Standard
11160 The remaining page corners can be filled by 
11161 \family sans
11162 Right
11163 \begin_inset space ~
11164 \end_inset
11165
11166 Footer
11167 \family default
11168  (which defaults to page numbers), 
11169 \family sans
11170 Right
11171 \begin_inset space ~
11172 \end_inset
11173
11174 Header
11175 \family default
11176  (top right) and 
11177 \family sans
11178 Left
11179 \begin_inset space ~
11180 \end_inset
11181
11182 Header
11183 \family default
11184  (top left).
11185 \end_layout
11186
11187 \begin_layout Subsection
11188 Unsupported 
11189 \family sans
11190 FoilTeX
11191 \family default
11192  Goodies
11193 \begin_inset CommandInset label
11194 LatexCommand label
11195 name "sec:unsuppfoils"
11196
11197 \end_inset
11198
11199
11200 \end_layout
11201
11202 \begin_layout Standard
11203 All the commands mentioned below need to be set in a 
11204 \family sans
11205 LaTeX
11206 \family default
11207  environment or as 
11208 \family sans
11209 TeX
11210 \family default
11211  within another environment.
11212 \end_layout
11213
11214 \begin_layout Subsubsection
11215 Lengths
11216 \end_layout
11217
11218 \begin_layout Standard
11219 All lengths are adjusted using the 
11220 \family typewriter
11221
11222 \backslash
11223 setlength{
11224 \family default
11225 \emph on
11226 lengthname
11227 \family typewriter
11228 \emph default
11229 }{
11230 \family default
11231 \emph on
11232 newlength
11233 \family typewriter
11234 \emph default
11235 }
11236 \family default
11237  command.
11238  Where 
11239 \emph on
11240 lengthname
11241 \emph default
11242  should be replaced by the name given to the length you want to change and
11243  
11244 \emph on
11245 newlength
11246 \emph default
11247  is the length value.
11248  All lengths should be specified in units of length such as inches (
11249 \family typewriter
11250 in
11251 \family default
11252 ), millimeters (
11253 \family typewriter
11254 mm
11255 \family default
11256 ) or points (
11257 \family typewriter
11258 pt
11259 \family default
11260 ) or relative to some document or font-based length such as 
11261 \family typewriter
11262
11263 \backslash
11264 textwidth
11265 \family default
11266 .
11267  
11268 \end_layout
11269
11270 \begin_layout Standard
11271 It's possible to change the spacing between a foilhead and the body of the
11272  foil by adjusting the length specified by 
11273 \family typewriter
11274
11275 \backslash
11276 foilheadskip
11277 \family default
11278 .
11279  For example, to make 
11280 \emph on
11281 all
11282 \emph default
11283  foilheads 0.5
11284 \begin_inset space \space{}
11285 \end_inset
11286
11287 in closer to their bodies put the following in the preamble: 
11288 \family typewriter
11289
11290 \backslash
11291 setlength{
11292 \backslash
11293 foilheadskip}{-0.5in}
11294 \end_layout
11295
11296 \begin_layout Standard
11297 The spacings around floats can be adjusted by setting these lengths:
11298 \end_layout
11299
11300 \begin_layout Labeling
11301 \labelwidthstring MMMMMMMMMMM
11302
11303 \family typewriter
11304
11305 \backslash
11306 abovefloatskip
11307 \family default
11308  Separation between the text and the top of the float
11309 \end_layout
11310
11311 \begin_layout Labeling
11312 \labelwidthstring MMMMMMMMMMM
11313
11314 \family typewriter
11315
11316 \backslash
11317 abovecaptionskip
11318 \family default
11319  Separation between the float and the caption
11320 \end_layout
11321
11322 \begin_layout Labeling
11323 \labelwidthstring MMMMMMMMMMM
11324
11325 \family typewriter
11326
11327 \backslash
11328 belowcaptionskip
11329 \family default
11330  Separation between the caption and the following text
11331 \end_layout
11332
11333 \begin_layout Labeling
11334 \labelwidthstring MMMMMMMMMMM
11335
11336 \family typewriter
11337
11338 \backslash
11339 captionwidth
11340 \family default
11341  You can make the captions narrower than the surrounding text by adjusting
11342  this length.
11343  Best done relative to 
11344 \family typewriter
11345
11346 \backslash
11347 textwidth
11348 \family default
11349 .
11350 \end_layout
11351
11352 \begin_layout Standard
11353 There are also several title page related lengths that you may find useful
11354  if you have a long title or several authors:
11355 \end_layout
11356
11357 \begin_layout Labeling
11358 \labelwidthstring MMMMMMMMMMM
11359
11360 \family typewriter
11361
11362 \backslash
11363 abovetitleskip
11364 \family default
11365  Separation from headers to 
11366 \family sans
11367 Title
11368 \end_layout
11369
11370 \begin_layout Labeling
11371 \labelwidthstring MMMMMMMMMMM
11372
11373 \family typewriter
11374
11375 \backslash
11376 titleauthorskip
11377 \family default
11378  between 
11379 \family sans
11380 Title
11381 \family default
11382  and 
11383 \family sans
11384 Author
11385 \family default
11386  environments
11387 \end_layout
11388
11389 \begin_layout Labeling
11390 \labelwidthstring MMMMMMMMMMM
11391
11392 \family typewriter
11393
11394 \backslash
11395 authorauthorskip
11396 \family default
11397  between multiple 
11398 \family sans
11399 Author
11400 \family default
11401  lines
11402 \end_layout
11403
11404 \begin_layout Labeling
11405 \labelwidthstring MMMMMMMMMMM
11406
11407 \family typewriter
11408
11409 \backslash
11410 authordateskip
11411 \family default
11412  between the 
11413 \family sans
11414 Author
11415 \family default
11416  and the 
11417 \family sans
11418 Date
11419 \end_layout
11420
11421 \begin_layout Labeling
11422 \labelwidthstring MMMMMMMMMMM
11423
11424 \family typewriter
11425
11426 \backslash
11427 dateabstractskip
11428 \family default
11429  between the 
11430 \family sans
11431 Date
11432 \family default
11433  and the 
11434 \family sans
11435 Abstract
11436 \end_layout
11437
11438 \begin_layout Standard
11439 The last length related command affects all the list environments.
11440  If you place 
11441 \family typewriter
11442
11443 \backslash
11444 zerolistvertdimens
11445 \family default
11446  
11447 \emph on
11448 inside
11449 \emph default
11450  a list environment then all the vertical spacing between the list items
11451  is removed.
11452  Note that this is a command not a length so it doesn't require 
11453 \family typewriter
11454
11455 \backslash
11456 setlength
11457 \family default
11458  like the stuff mentioned above.
11459 \end_layout
11460
11461 \begin_layout Subsubsection
11462 Headers and Footers
11463 \end_layout
11464
11465 \begin_layout Standard
11466 The 
11467 \family typewriter
11468
11469 \backslash
11470 LogoOn
11471 \family default
11472  and 
11473 \family typewriter
11474
11475 \backslash
11476 LogoOff
11477 \family default
11478  commands control whether the logo in the 
11479 \family sans
11480 MyLogo
11481 \family default
11482  definition appear on a given page.
11483  If you put 
11484 \family typewriter
11485
11486 \backslash
11487 LogoOff
11488 \family default
11489  in the preamble then none of the foils will have the logo on them.
11490  If you don't want the logo on a particular page place the 
11491 \family typewriter
11492
11493 \backslash
11494 LogoOff
11495 \family default
11496  directly after the foilhead of that page and the 
11497 \family typewriter
11498
11499 \backslash
11500 LogoOn
11501 \family default
11502  directly after the next foilhead.
11503 \end_layout
11504
11505 \begin_layout Standard
11506 If you decide to use the 
11507 \family sans
11508 fancy
11509 \family default
11510  page style setting in the 
11511 \family sans
11512 Document
11513 \begin_inset space ~
11514 \end_inset
11515
11516 Layout
11517 \family default
11518  dialog you should probably add 
11519 \family typewriter
11520
11521 \backslash
11522 let
11523 \backslash
11524 headwidth
11525 \backslash
11526 textwidth
11527 \family default
11528  to your preamble so headers and footers on landscape pages are correctly
11529  placed when rotated.
11530  This is due to some clashes between the page layouts provided by the 
11531 \family sans
11532 fancyheadings
11533 \family default
11534  package and the 
11535 \family sans
11536 foils
11537 \family default
11538  class.
11539 \end_layout
11540
11541 \begin_layout Section
11542 Hollywood (Hollywood spec scripts)
11543 \end_layout
11544
11545 \begin_layout Standard
11546 by 
11547 \shape smallcaps
11548 Garst Reese
11549 \end_layout
11550
11551 \begin_layout Subsection
11552 Introduction
11553 \end_layout
11554
11555 \begin_layout Standard
11556 Getting the format of a Hollywood script right is a 
11557 \begin_inset Quotes eld
11558 \end_inset
11559
11560 rite of passage.
11561 \begin_inset Quotes erd
11562 \end_inset
11563
11564  It is designed to make the readers focus on content and to be easy and
11565  familiar for the actors to read.
11566  Each page of a script should be one minute of film.
11567  Nothing goes in a script that you cannot see or hear on screen.
11568  The courier 12 pt font should be used throughout.
11569  No italics.
11570 \end_layout
11571
11572 \begin_layout Subsection
11573 Special problems
11574 \end_layout
11575
11576 \begin_layout Standard
11577 Speakers' lines should NEVER break in mid-sentence.
11578  If a speaker's lines continue over a page break, repeat the 
11579 \family sans
11580 Speaker
11581 \family default
11582  title followed by (Cont'd).
11583 \end_layout
11584
11585 \begin_layout Subsection
11586 Special features
11587 \end_layout
11588
11589 \begin_layout Standard
11590 Insert the 
11591 \family sans
11592 Speaker
11593 \family default
11594  names as labels then cross-reference the label to insert the name.
11595  The cross-reference dialog will show the current cast of characters.
11596  You can use this to insert the speaker name in narratives also.
11597 \end_layout
11598
11599 \begin_layout Subsection
11600 Paper size and Margins
11601 \end_layout
11602
11603 \begin_layout Standard
11604 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11605 \end_layout
11606
11607 \begin_layout Subsection
11608 Environments
11609 \end_layout
11610
11611 \begin_layout Standard
11612 The following environments are available.
11613  You can use hollywood.bind to get the bind keys shown at the right.
11614 \end_layout
11615
11616 \begin_layout Itemize
11617
11618 \family sans
11619 Standard
11620 \begin_inset Newline newline
11621 \end_inset
11622
11623
11624 \family default
11625 Used where nothing else works.
11626  Try to avoid it.
11627 \end_layout
11628
11629 \begin_layout Itemize
11630
11631 \family sans
11632 FADE_IN
11633 \family default
11634 :
11635 \begin_inset space \hfill{}
11636 \end_inset
11637
11638
11639 \family sans
11640 M-z S-I
11641 \family default
11642
11643 \begin_inset Newline newline
11644 \end_inset
11645
11646 Usually followed by something like 
11647 \begin_inset Quotes eld
11648 \end_inset
11649
11650 on Sally waking up.
11651 \begin_inset Quotes erd
11652 \end_inset
11653
11654
11655 \end_layout
11656
11657 \begin_layout Itemize
11658
11659 \family sans
11660 INT:
11661 \begin_inset space \hfill{}
11662 \end_inset
11663
11664 M-z i
11665 \begin_inset Newline newline
11666 \end_inset
11667
11668
11669 \family default
11670 Introduces a new INTERIOR camera set-up.
11671  Always followed by DAY or NIGHT, or something similar to define the lighting
11672  required.
11673  Everthing on this line in CAPS.
11674 \end_layout
11675
11676 \begin_layout Itemize
11677
11678 \family sans
11679 EXT:
11680 \begin_inset space \hfill{}
11681 \end_inset
11682
11683 M-z e
11684 \begin_inset Newline newline
11685 \end_inset
11686
11687
11688 \family default
11689 Introduces a new EXTERIOR camera set-up.
11690  Everthing on this line in CAPS.
11691 \end_layout
11692
11693 \begin_layout Itemize
11694
11695 \family sans
11696 Speaker
11697 \begin_inset space \hfill{}
11698 \end_inset
11699
11700 M-z s
11701 \begin_inset Newline newline
11702 \end_inset
11703
11704
11705 \family default
11706 The character speaking.
11707 \end_layout
11708
11709 \begin_layout Itemize
11710
11711 \family sans
11712 Parenthetical
11713 \begin_inset space \hfill{}
11714 \end_inset
11715
11716 M-z p
11717 \begin_inset Newline newline
11718 \end_inset
11719
11720
11721 \family default
11722 Instructions to the speaker.
11723  The () are automatically inserted, but only the ( will show in LyX.
11724  Both will be printed.
11725 \end_layout
11726
11727 \begin_layout Itemize
11728
11729 \family sans
11730 Dialogue
11731 \begin_inset space \hfill{}
11732 \end_inset
11733
11734 M-z d
11735 \begin_inset Newline newline
11736 \end_inset
11737
11738
11739 \family default
11740 What the 
11741 \family sans
11742 Speaker
11743 \family default
11744  says.
11745 \end_layout
11746
11747 \begin_layout Itemize
11748
11749 \family sans
11750 Transition
11751 \begin_inset space \hfill{}
11752 \end_inset
11753
11754 M-z t
11755 \begin_inset Newline newline
11756 \end_inset
11757
11758
11759 \family default
11760 Camera movement instruction.
11761  e.
11762 \begin_inset space \thinspace{}
11763 \end_inset
11764
11765 g.
11766 \begin_inset space \space{}
11767 \end_inset
11768
11769 CUT TO:
11770 \end_layout
11771
11772 \begin_layout Itemize
11773
11774 \family sans
11775 FADE OUT:
11776 \begin_inset space \hfill{}
11777 \end_inset
11778
11779 M-z S-I
11780 \end_layout
11781
11782 \begin_layout Itemize
11783
11784 \family sans
11785 Author
11786 \begin_inset space \hfill{}
11787 \end_inset
11788
11789 M-z S-A
11790 \end_layout
11791
11792 \begin_layout Itemize
11793
11794 \family sans
11795 Title
11796 \begin_inset space \hfill{}
11797 \end_inset
11798
11799 M-z S-T
11800 \end_layout
11801
11802 \begin_layout Itemize
11803
11804 \family sans
11805 Right_Address
11806 \begin_inset space \hfill{}
11807 \end_inset
11808
11809 M-z r
11810 \end_layout
11811
11812 \begin_layout Subsection
11813 Script jargon
11814 \end_layout
11815
11816 \begin_layout Itemize
11817 (O.S) — off screen
11818 \end_layout
11819
11820 \begin_layout Itemize
11821 (V.0) — voice over
11822 \end_layout
11823
11824 \begin_layout Itemize
11825 b.
11826 \begin_inset space \thinspace{}
11827 \end_inset
11828
11829 g.
11830  — background
11831 \end_layout
11832
11833 \begin_layout Itemize
11834 C.U.
11835  — close-up
11836 \end_layout
11837
11838 \begin_layout Itemize
11839 PAN — camera movement
11840 \end_layout
11841
11842 \begin_layout Itemize
11843 INSERT — cut to close-up of
11844 \end_layout
11845
11846 \begin_layout Section
11847 ijmpc and ijmpd
11848 \end_layout
11849
11850 \begin_layout Standard
11851 by 
11852 \noun on
11853 Panayotis Papasotiriou
11854 \end_layout
11855
11856 \begin_layout Subsection
11857 Overview
11858 \end_layout
11859
11860 \begin_layout Standard
11861 The ijmpc package is a set of macros that facilitates electronic manuscript
11862  submission to the 
11863 \emph on
11864 International Journal of Modern Physics C
11865 \emph default
11866 .
11867  Similarly, the ijmpd package is for creating manuscripts to be submitted
11868  to the 
11869 \emph on
11870 International Journal of Modern Physics D
11871 \emph default
11872 .
11873  Both journals are published by World Scientific.
11874  The corresponding document classes are named 
11875 \family typewriter
11876 ws-ijmpc.cls
11877 \family default
11878  and 
11879 \family typewriter
11880 ws-ijmpd.cls
11881 \family default
11882 , respectively.
11883  These files, together with instructions for the authors, can be downloaded
11884  from the sites 
11885 \begin_inset Flex URL
11886 status collapsed
11887
11888 \begin_layout Plain Layout
11889
11890 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11891 \end_layout
11892
11893 \end_inset
11894
11895  and 
11896 \begin_inset Flex URL
11897 status collapsed
11898
11899 \begin_layout Plain Layout
11900
11901 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11902 \end_layout
11903
11904 \end_inset
11905
11906 .
11907  Both packages are modified versions of the standard 
11908 \begin_inset Quotes eld
11909 \end_inset
11910
11911 article
11912 \begin_inset Quotes erd
11913 \end_inset
11914
11915  package, and they are almost (but not exactly) identical.
11916  Most of their features are supported by LyX.
11917  I have used LyX successfully to write articles submitted to both journals
11918  without any problem.
11919 \end_layout
11920
11921 \begin_layout Subsection
11922 Writing a paper
11923 \end_layout
11924
11925 \begin_layout Standard
11926 As usual, the easiest way to write a paper is to start with a template.
11927  Click on 
11928 \family sans
11929 File\SpecialChar \menuseparator
11930 New from
11931 \family default
11932  
11933 \family sans
11934 \bar under
11935 T
11936 \bar default
11937 emplate
11938 \family default
11939 , then choose the 
11940 \family typewriter
11941 ijmpc.lyx
11942 \family default
11943  or 
11944 \family typewriter
11945 ijmpd.lyx
11946 \family default
11947  template.
11948  This will give an (almost) empty document that includes the most common
11949  fields found in a manuscript.
11950  Simply overwrite the existing text (including the brackets, 
11951 \family typewriter
11952 <>
11953 \family default
11954 ) with your text.
11955  You should keep in mind the following remarks.
11956 \end_layout
11957
11958 \begin_layout Enumerate
11959 LyX won't let you change the font size and the page style of the document,
11960  because such modifications are not allowed by both packages.
11961 \end_layout
11962
11963 \begin_layout Enumerate
11964 The language of the document should not be changed.
11965  Before previewing your paper, be sure that the babel package is not used.
11966  To do this, click on 
11967 \family sans
11968 Tools\SpecialChar \menuseparator
11969 Preferences
11970 \family default
11971 , select the 
11972 \family sans
11973 Lang Opts
11974 \family default
11975  tab, deselect the 
11976 \family sans
11977 Use babel
11978 \family default
11979  checkbox in the language settings, and click on 
11980 \family sans
11981 Apply
11982 \family default
11983  (or 
11984 \family sans
11985 Save
11986 \family default
11987 , if you wish to make this change permanent).
11988 \end_layout
11989
11990 \begin_layout Enumerate
11991 The 
11992 \begin_inset Quotes eld
11993 \end_inset
11994
11995 Keywords
11996 \begin_inset Quotes erd
11997 \end_inset
11998
11999  style must be used to define keywords.
12000 \end_layout
12001
12002 \begin_layout Enumerate
12003 The ijmpc package provides a style named 
12004 \begin_inset Quotes eld
12005 \end_inset
12006
12007 Classification Codes
12008 \begin_inset Quotes erd
12009 \end_inset
12010
12011 , which can be used to define classification codes, such as PACS numbers.
12012  Note that this facility is not supported by the ijmpd package.
12013 \end_layout
12014
12015 \begin_layout Enumerate
12016 Several new environments are available: 
12017 \begin_inset Quotes eld
12018 \end_inset
12019
12020 Definition
12021 \begin_inset Quotes erd
12022 \end_inset
12023
12024
12025 \begin_inset Quotes eld
12026 \end_inset
12027
12028 Step
12029 \begin_inset Quotes erd
12030 \end_inset
12031
12032
12033 \begin_inset Quotes eld
12034 \end_inset
12035
12036 Example
12037 \begin_inset Quotes erd
12038 \end_inset
12039
12040
12041 \begin_inset Quotes eld
12042 \end_inset
12043
12044 Remark
12045 \begin_inset Quotes erd
12046 \end_inset
12047
12048
12049 \begin_inset Quotes eld
12050 \end_inset
12051
12052 Notation
12053 \begin_inset Quotes erd
12054 \end_inset
12055
12056
12057 \begin_inset Quotes eld
12058 \end_inset
12059
12060 Theorem
12061 \begin_inset Quotes erd
12062 \end_inset
12063
12064
12065 \begin_inset Quotes eld
12066 \end_inset
12067
12068 Proof
12069 \begin_inset Quotes erd
12070 \end_inset
12071
12072
12073 \begin_inset Quotes eld
12074 \end_inset
12075
12076 Corollary
12077 \begin_inset Quotes erd
12078 \end_inset
12079
12080
12081 \begin_inset Quotes eld
12082 \end_inset
12083
12084 Lemma
12085 \begin_inset Quotes erd
12086 \end_inset
12087
12088
12089 \begin_inset Quotes eld
12090 \end_inset
12091
12092 Proposition
12093 \begin_inset Quotes erd
12094 \end_inset
12095
12096
12097 \begin_inset Quotes eld
12098 \end_inset
12099
12100 Prop
12101 \begin_inset Quotes erd
12102 \end_inset
12103
12104
12105 \begin_inset Quotes eld
12106 \end_inset
12107
12108 Question
12109 \begin_inset Quotes erd
12110 \end_inset
12111
12112
12113 \begin_inset Quotes eld
12114 \end_inset
12115
12116 Claim
12117 \begin_inset Quotes erd
12118 \end_inset
12119
12120 , and 
12121 \begin_inset Quotes eld
12122 \end_inset
12123
12124 Conjecture
12125 \begin_inset Quotes erd
12126 \end_inset
12127
12128 .
12129  Their use is more or less obvious.
12130  LyX supports all these environments; it will use the proper label, text
12131  style, and numbering scheme for each of them.
12132 \end_layout
12133
12134 \begin_layout Enumerate
12135 Both packages use basic citations; the natbib package should not be used.
12136  In LyX, citation references are shown as usual; in the output, citations
12137  are shown as superscripts.
12138  If you want to use a citation as normal text, you should use the 
12139 \family typewriter
12140 refcite
12141 \family default
12142  command, e.
12143 \begin_inset space \thinspace{}
12144 \end_inset
12145
12146 g.
12147 \begin_inset space \space{}
12148 \end_inset
12149
12150
12151 \begin_inset Quotes eld
12152 \end_inset
12153
12154 See Ref.
12155 \begin_inset space \space{}
12156 \end_inset
12157
12158
12159 \family typewriter
12160
12161 \backslash
12162 refcite{key}
12163 \family default
12164
12165 \begin_inset Quotes erd
12166 \end_inset
12167
12168 .
12169 \end_layout
12170
12171 \begin_layout Enumerate
12172 There is no 
12173 \begin_inset Quotes eld
12174 \end_inset
12175
12176 Acknowledgments
12177 \begin_inset Quotes erd
12178 \end_inset
12179
12180  section in both packages.
12181  To put acknowledgments, just use the 
12182 \begin_inset Quotes eld
12183 \end_inset
12184
12185 Section*
12186 \begin_inset Quotes erd
12187 \end_inset
12188
12189  environment.
12190 \end_layout
12191
12192 \begin_layout Enumerate
12193 Appendices may be added to the paper, 
12194 \emph on
12195 after
12196 \emph default
12197  the Acknowledgments and 
12198 \shape italic
12199 before
12200 \shape default
12201  the References.
12202  LyX provides a special environment, called 
12203 \begin_inset Quotes eld
12204 \end_inset
12205
12206 Appendices Section
12207 \begin_inset Quotes erd
12208 \end_inset
12209
12210  which marks the beginning of the appendices.
12211  This environment should be left blank; it just sends a LaTeX command, but
12212  nothing is really printed.
12213  In LyX, the word 
12214 \begin_inset Quotes eld
12215 \end_inset
12216
12217 Appendix
12218 \begin_inset Quotes erd
12219 \end_inset
12220
12221  is printed with blue letters, as a signal that all sections after that
12222  point are appendices.
12223  To write an appendix, use the 
12224 \begin_inset Quotes eld
12225 \end_inset
12226
12227 Appendix
12228 \begin_inset Quotes erd
12229 \end_inset
12230
12231  environment.
12232  LyX will number each appendix with capital letters, as required by both
12233  journals.
12234  Note that 
12235 \begin_inset Quotes eld
12236 \end_inset
12237
12238 Appendices Section
12239 \begin_inset Quotes erd
12240 \end_inset
12241
12242  
12243 \emph on
12244 must
12245 \emph default
12246  be present before the first appendix; if not, all appendices will be numbered
12247  as normal sections in the output.
12248 \end_layout
12249
12250 \begin_layout Enumerate
12251 The ijmpc and the ijmpd packages use the 
12252 \family typewriter
12253 tbl
12254 \family default
12255  command to implement table captions.
12256  As a result, a table created by LyX is printed correctly, but its caption
12257  is ignored.
12258  However, you can use some TeX code to overcome this problem, so that captions
12259  are printed as expected.
12260  To do so, create a float table as usual, remove the caption, and replace
12261  it with the TeX code 
12262 \family typewriter
12263
12264 \backslash
12265 tbl{
12266 \emph on
12267 your table caption
12268 \emph default
12269 }{
12270 \family default
12271  (sic); you must also the TeX code 
12272 \family typewriter
12273 }
12274 \family default
12275  immediately after the tabular material.
12276  Study the example table included in the template files to see how this
12277  trick is implemented.
12278  Alternatively, If you need table captions, you should implement the whole
12279  table float in a 
12280 \family typewriter
12281 .tex
12282 \family default
12283  file, then include this file to the LyX document (
12284 \family sans
12285 Insert\SpecialChar \menuseparator
12286 File\SpecialChar \menuseparator
12287 Child
12288 \begin_inset space ~
12289 \end_inset
12290
12291 Document
12292 \family default
12293 ).
12294  Details on how to create a table float can be found in the files 
12295 \family typewriter
12296 ws-ijmpc.tex
12297 \family default
12298  and 
12299 \family typewriter
12300 ws-ijmpd.tex
12301 \family default
12302 , included in the corresponding packages.
12303 \end_layout
12304
12305 \begin_layout Subsection
12306 Preparing a paper for submission
12307 \end_layout
12308
12309 \begin_layout Standard
12310 Before you submit your paper you must export the LyX document as a LaTeX
12311  file (
12312 \family sans
12313 File\SpecialChar \menuseparator
12314 Export\SpecialChar \menuseparator
12315 LaTeX
12316 \family default
12317 )
12318 \begin_inset Foot
12319 status open
12320
12321 \begin_layout Plain Layout
12322 Actually you have the choice between LaTeX (plain) and pdflatex.
12323  If you intend to use pdflatex to prepare the paper, you should use the
12324  pdflatex option so that included graphics are converted to PDF format,
12325  ready for use by pdflatex.
12326 \end_layout
12327
12328 \end_inset
12329
12330 , then make the following changes to the resulting 
12331 \family typewriter
12332 .tex
12333 \family default
12334  file.
12335 \end_layout
12336
12337 \begin_layout Enumerate
12338 Remove the comment lines before the 
12339 \family typewriter
12340
12341 \backslash
12342 documentclass
12343 \family default
12344  command.
12345 \end_layout
12346
12347 \begin_layout Enumerate
12348 Remove everything between (and including) the 
12349 \family typewriter
12350
12351 \backslash
12352 makeatletter
12353 \family default
12354  and 
12355 \family typewriter
12356
12357 \backslash
12358 makeatother
12359 \family default
12360  commands, except for any commands you specifically put into the LaTeX preamble.
12361 \end_layout
12362
12363 \begin_layout Standard
12364 The modified 
12365 \family typewriter
12366 .tex
12367 \family default
12368  file should be saved and processed through LaTeX as many times as necessary.
12369  You may also want to check the resulting 
12370 \family typewriter
12371 .dvi
12372 \family default
12373  document.
12374 \end_layout
12375
12376 \begin_layout Subsection
12377 Use of TeX code
12378 \end_layout
12379
12380 \begin_layout Standard
12381 The use of TeX code is reduced to two commands, which must be placed at
12382  the top of the document.
12383  If you started writing your paper by using the 
12384 \family typewriter
12385 ijmpc.lyx
12386 \family default
12387  or the 
12388 \family typewriter
12389 ijmpd.lyx
12390 \family default
12391  template, the TeX code needed is already in its place; you usually don't
12392  need to delete it.
12393  You may only modify the first TeX code to specify the information printed
12394  to the top of odd and even pages (authors' names and short paper's title,
12395  respectively).
12396  This TeX code must have the form 
12397 \family typewriter
12398
12399 \backslash
12400 markboth{Authors' Names}{Short Paper's Title}
12401 \family default
12402 .
12403 \end_layout
12404
12405 \begin_layout Section
12406 iopart
12407 \end_layout
12408
12409 \begin_layout Standard
12410 by 
12411 \noun on
12412 Uwe Stöhr
12413 \end_layout
12414
12415 \begin_layout Subsection
12416 Overview
12417 \end_layout
12418
12419 \begin_layout Standard
12420 The iopart package provides a document class to create electronic manuscript
12421  submission to the journals published by the Institute of Physics.
12422  Instructions for the authors how to create a paper using the iopart class
12423  can be downloaded together with the iopart package from the site 
12424 \begin_inset Flex URL
12425 status collapsed
12426
12427 \begin_layout Plain Layout
12428
12429 ftp://ftp.iop.org/pub/journals/latex2e
12430 \end_layout
12431
12432 \end_inset
12433
12434 .
12435 \end_layout
12436
12437 \begin_layout Subsection
12438 Writing a paper
12439 \end_layout
12440
12441 \begin_layout Standard
12442 The easiest way to write a paper is to start with the file 
12443 \emph on
12444 IOP-article.lyx
12445 \emph default
12446  that is available in LyX's examples files folder.
12447  Open this file, save it under a new name, and start writing.
12448  The example file explains how to use the special text environments.
12449  Here are the most important advices:
12450 \end_layout
12451
12452 \begin_layout Itemize
12453 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12454  two options 
12455 \family sans
12456 Use AMS math package
12457 \family default
12458  in the document settings under 
12459 \family sans
12460 Math Options
12461 \family default
12462  are not used!
12463 \end_layout
12464
12465 \begin_layout Itemize
12466
12467 \size normal
12468 The title environment defines the kind of your paper.
12469  So use one of the following environments for the title:
12470 \end_layout
12471
12472 \begin_deeper
12473 \begin_layout Itemize
12474
12475 \family sans
12476 \size normal
12477 Title
12478 \family default
12479  for a Paper
12480 \end_layout
12481
12482 \begin_layout Itemize
12483
12484 \family sans
12485 \size normal
12486 Review
12487 \family default
12488  for a Review
12489 \end_layout
12490
12491 \begin_layout Itemize
12492
12493 \family sans
12494 \size normal
12495 Topical
12496 \family default
12497  for a Topical review
12498 \end_layout
12499
12500 \begin_layout Itemize
12501
12502 \family sans
12503 \size normal
12504 Comment
12505 \family default
12506  for a Comment
12507 \end_layout
12508
12509 \begin_layout Itemize
12510
12511 \family sans
12512 \size normal
12513 Note
12514 \family default
12515  for a Note
12516 \end_layout
12517
12518 \begin_layout Itemize
12519
12520 \family sans
12521 \size normal
12522 Paper
12523 \family default
12524  for a Paper (same as Title)
12525 \end_layout
12526
12527 \begin_layout Itemize
12528
12529 \family sans
12530 \size normal
12531 Prelim
12532 \family default
12533  for a Preliminary communication
12534 \end_layout
12535
12536 \begin_layout Itemize
12537
12538 \family sans
12539 \size normal
12540 Rapid
12541 \family default
12542  for a Rapid communication
12543 \end_layout
12544
12545 \begin_layout Itemize
12546
12547 \family sans
12548 \size normal
12549 Letter
12550 \family default
12551  for a Letter to the editor
12552 \end_layout
12553
12554 \end_deeper
12555 \begin_layout Itemize
12556
12557 \size normal
12558 All title environments except of 
12559 \family sans
12560 Letter
12561 \family default
12562  can have an optional short title.
12563 \end_layout
12564
12565 \begin_layout Itemize
12566 There is a general title environment 
12567 \family sans
12568 Article
12569 \family default
12570  which is not directly supported by the LyX.
12571  This can be used as TeX code when your document doesn't fit into one of
12572  the other title types.
12573 \end_layout
12574
12575 \begin_layout Standard
12576 For more informations like hints for special table and formula formatting,
12577  look at the IOP author guidelines.
12578 \end_layout
12579
12580 \begin_layout Section
12581 Kluwer
12582 \end_layout
12583
12584 \begin_layout Standard
12585 by 
12586 \noun on
12587 Panayotis Papasotiriou
12588 \end_layout
12589
12590 \begin_layout Subsection
12591 Overview
12592 \end_layout
12593
12594 \begin_layout Standard
12595 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12596  that facilitates electronic manuscript submission to the journals they
12597  publish.
12598  Most known of them (at least in my domain of interest) are 
12599 \emph on
12600 Astrophysics and Space Science
12601 \emph default
12602  and 
12603 \emph on
12604 Solar Physics
12605 \emph default
12606 , but there are many others (see a complete list at 
12607 \begin_inset Flex URL
12608 status open
12609
12610 \begin_layout Plain Layout
12611
12612 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12613 \end_layout
12614
12615 \end_inset
12616
12617 ).
12618  The Kluwer package may be downloaded from the site 
12619 \begin_inset Flex URL
12620 status collapsed
12621
12622 \begin_layout Plain Layout
12623
12624 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12625 \end_layout
12626
12627 \end_inset
12628
12629 .
12630  A complete user guide is contained in that package (but it can also be
12631  downloaded separately).
12632 \end_layout
12633
12634 \begin_layout Standard
12635 LyX supports many features of the package but not everything.
12636  However, the TeX code needed is reduced to some 
12637 \begin_inset Quotes eld
12638 \end_inset
12639
12640 peculiar
12641 \begin_inset Quotes erd
12642 \end_inset
12643
12644  commands of the package (see
12645 \begin_inset space ~
12646 \end_inset
12647
12648
12649 \begin_inset CommandInset ref
12650 LatexCommand ref
12651 reference "subsec:kluwer_peculiarities"
12652
12653 \end_inset
12654
12655 ).
12656  I have recently used LyX to write an article submitted to the 
12657 \emph on
12658 Astrophysics and Space Science
12659 \emph default
12660  without any problem.
12661 \end_layout
12662
12663 \begin_layout Subsection
12664 Writing a paper
12665 \end_layout
12666
12667 \begin_layout Standard
12668 The easiest way to write a paper is to start with the Kluwer template file.
12669  Click on 
12670 \family sans
12671 File\SpecialChar \menuseparator
12672 New from
12673 \family default
12674  
12675 \family sans
12676 Template
12677 \family default
12678 , then choose the 
12679 \family typewriter
12680 kluwer.lyx
12681 \family default
12682  template.
12683  This will give an (almost) empty document that includes the most common
12684  fields found in a manuscript and a short description of their use.
12685  As in most templates, simply overwrite the existing text (including the
12686  brackets, 
12687 \family typewriter
12688 <>
12689 \family default
12690 ) with the correct information.
12691 \end_layout
12692
12693 \begin_layout Subsection
12694 Preparing a paper for submission
12695 \end_layout
12696
12697 \begin_layout Standard
12698 As in the AASTeX package, before you submit your paper to a journal you
12699  must 
12700 \begin_inset Quotes eld
12701 \end_inset
12702
12703 postprocess
12704 \begin_inset Quotes erd
12705 \end_inset
12706
12707  it as follows.
12708 \end_layout
12709
12710 \begin_layout Enumerate
12711 Export your paper as a LaTeX file.
12712  To do this, click on 
12713 \family sans
12714 File\SpecialChar \menuseparator
12715 Export\SpecialChar \menuseparator
12716 LaTeX
12717 \family default
12718 .
12719  
12720 \end_layout
12721
12722 \begin_layout Enumerate
12723 Edit the resulting 
12724 \family typewriter
12725 .tex
12726 \family default
12727  file with a text editor and make the following changes
12728 \end_layout
12729
12730 \begin_deeper
12731 \begin_layout Enumerate
12732 remove the comment lines before the 
12733 \family typewriter
12734
12735 \backslash
12736 documentclass
12737 \family default
12738  command,
12739 \end_layout
12740
12741 \begin_layout Enumerate
12742 remove everything between (and including) the 
12743 \family typewriter
12744
12745 \backslash
12746 makeatletter
12747 \family default
12748  and 
12749 \family typewriter
12750
12751 \backslash
12752 makeatother
12753 \family default
12754  commands, except for any commands you specifically put into the LaTeX preamble.
12755 \end_layout
12756
12757 \begin_layout Standard
12758 Save the resulting 
12759 \family typewriter
12760 .tex
12761 \family default
12762  file.
12763 \end_layout
12764
12765 \end_deeper
12766 \begin_layout Enumerate
12767 Run the 
12768 \family typewriter
12769 .tex
12770 \family default
12771  file through LaTeX as many times as necessary (usually up to three).
12772 \end_layout
12773
12774 \begin_layout Enumerate
12775 View the resulting 
12776 \family typewriter
12777 .dvi
12778 \family default
12779  document using, e.
12780 \begin_inset space \thinspace{}
12781 \end_inset
12782
12783 g.
12784 \begin_inset space \space{}
12785 \end_inset
12786
12787
12788 \family sans
12789 xdvi
12790 \family default
12791 , and check if everything is OK (it should, if you didn't make any mistake).
12792 \end_layout
12793
12794 \begin_layout Subsection
12795 \begin_inset Quotes eld
12796 \end_inset
12797
12798 Peculiarities
12799 \begin_inset Quotes erd
12800 \end_inset
12801
12802  of the Kluwer package
12803 \begin_inset CommandInset label
12804 LatexCommand label
12805 name "subsec:kluwer_peculiarities"
12806
12807 \end_inset
12808
12809
12810 \end_layout
12811
12812 \begin_layout Standard
12813 The Kluwer package has the following 
12814 \begin_inset Quotes eld
12815 \end_inset
12816
12817 peculiarities
12818 \begin_inset Quotes erd
12819 \end_inset
12820
12821 .
12822 \end_layout
12823
12824 \begin_layout Enumerate
12825 It is possible to write multiple articles in the same LaTeX file
12826 \begin_inset Foot
12827 status collapsed
12828
12829 \begin_layout Plain Layout
12830 I can't imagine any good reason to do this.
12831 \end_layout
12832
12833 \end_inset
12834
12835 .
12836  Each article must be included in the environment 
12837 \begin_inset Quotes eld
12838 \end_inset
12839
12840 article
12841 \begin_inset Quotes erd
12842 \end_inset
12843
12844 .
12845  Unfortunately, this environment cannot be omitted, even if you write just
12846  one article.
12847  Therefore, each article starts with the command 
12848 \family typewriter
12849
12850 \backslash
12851 begin{article}
12852 \family default
12853  and, obviously, ends with the command 
12854 \family typewriter
12855
12856 \backslash
12857 end{article}
12858 \family default
12859 .
12860  Although this can be implemented in LyX, I didn't included it, since it
12861  looks ugly and can confuse the novice user.
12862  Therefore, you need to enter them directly and mark them as LaTeX code
12863  (the well-known 
12864 \begin_inset Quotes eld
12865 \end_inset
12866
12867 TeX code
12868 \begin_inset Quotes erd
12869 \end_inset
12870
12871 ).
12872 \end_layout
12873
12874 \begin_layout Enumerate
12875 Information given at the beginning of the article (i.
12876 \begin_inset space \thinspace{}
12877 \end_inset
12878
12879 e.
12880 \begin_inset space \space{}
12881 \end_inset
12882
12883 title, subtitle, author, institution, running title, running author, abstract
12884  and keywords) must be included in an environment called 
12885 \begin_inset Quotes eld
12886 \end_inset
12887
12888 opening
12889 \begin_inset Quotes erd
12890 \end_inset
12891
12892 .
12893  This is not implemented in LyX, so you must enter title, subtitle etc.
12894 \begin_inset space ~
12895 \end_inset
12896
12897 between two TeX code lines (
12898 \family typewriter
12899
12900 \backslash
12901 begin{opening}
12902 \family default
12903  and 
12904 \family typewriter
12905
12906 \backslash
12907 end{opening}
12908 \family default
12909 ).
12910 \end_layout
12911
12912 \begin_layout Enumerate
12913 According to the user manual, the label of each bibliography item must be
12914  written as 
12915 \family typewriter
12916
12917 \backslash
12918 protect
12919 \backslash
12920 citeauthoryear{
12921 \family default
12922 \emph on
12923 author(s)
12924 \family typewriter
12925 \emph default
12926 }{
12927 \family default
12928 \emph on
12929 year
12930 \family typewriter
12931 \emph default
12932 }
12933 \family default
12934 .
12935 \end_layout
12936
12937 \begin_layout Standard
12938 The 
12939 \family typewriter
12940 kluwer.lyx
12941 \family default
12942  template takes care of all these 
12943 \begin_inset Quotes eld
12944 \end_inset
12945
12946 peculiarities
12947 \begin_inset Quotes erd
12948 \end_inset
12949
12950 .
12951  If you start a new paper using this template you don't need to do anything
12952  special.
12953  Just 
12954 \end_layout
12955
12956 \begin_layout Enumerate
12957 don't delete the TeX code included in the template, and
12958 \end_layout
12959
12960 \begin_layout Enumerate
12961 copy the example bibliography item included in the template and modify it
12962  as necessary to enter new bibliography items.
12963 \end_layout
12964
12965 \begin_layout Section
12966 Koma-Script
12967 \end_layout
12968
12969 \begin_layout Standard
12970 by 
12971 \noun on
12972 Bernd Rellermeyer
12973 \end_layout
12974
12975 \begin_layout Subsection
12976 Overview
12977 \end_layout
12978
12979 \begin_layout Standard
12980 The LyX document classes 
12981 \emph on
12982 article (koma-script)
12983 \emph default
12984
12985 \emph on
12986 report (koma-script)
12987 \emph default
12988
12989 \emph on
12990 book
12991 \emph default
12992  
12993 \emph on
12994 (koma-script)
12995 \emph default
12996 , and 
12997 \emph on
12998 letter
12999 \emph default
13000  
13001 \emph on
13002 (koma-script)
13003 \emph default
13004  correspond to the LaTeX document classes 
13005 \family typewriter
13006 scrartcl.cls
13007 \family default
13008
13009 \family typewriter
13010 scrreprt.cls
13011 \family default
13012
13013 \family typewriter
13014 scrbook.cls
13015 \family default
13016 , and 
13017 \family typewriter
13018 scrlettr.cls
13019 \family default
13020 , resp.
13021 \begin_inset space ~
13022 \end_inset
13023
13024 of the Koma-Script family.
13025  They are replacements for the standard document classes 
13026 \family typewriter
13027 article.cls
13028 \family default
13029
13030 \family typewriter
13031 report.cls
13032 \family default
13033
13034 \family typewriter
13035 book.cls
13036 \family default
13037  and 
13038 \family typewriter
13039 letter.cls
13040 \family default
13041 , resp., and fit better to European typography conventions in a number of
13042  points.
13043 \end_layout
13044
13045 \begin_layout Itemize
13046 Standard character size is 11pt in 
13047 \emph on
13048 article (koma-script)
13049 \emph default
13050
13051 \emph on
13052 report (koma-script)
13053 \emph default
13054 , and 
13055 \emph on
13056 book (koma-script)
13057 \emph default
13058 , and 12pt in 
13059 \emph on
13060 letter (koma-script)
13061 \emph default
13062 .
13063 \end_layout
13064
13065 \begin_layout Itemize
13066 Headings, labels of the description environment, and a number of elements
13067  of the 
13068 \emph on
13069 letter (koma-script)
13070 \emph default
13071  document class are set in a bold sans serif font.
13072 \begin_inset Foot
13073 status collapsed
13074
13075 \begin_layout Plain Layout
13076 There is a big difference between the bold sans serif old cm fonts and new
13077  ec fonts, especially in the appearance of headings.
13078  In comparison, the ec bold sans serif fonts look a bit thin.
13079  Here the LaTeX package 
13080 \family typewriter
13081 cmsd.sty by
13082 \family default
13083  
13084 \shape smallcaps
13085 Walter Schmidt
13086 \shape default
13087  helps to produce the 
13088 \begin_inset Quotes eld
13089 \end_inset
13090
13091 usual
13092 \begin_inset Quotes erd
13093 \end_inset
13094
13095  appearance when using the ec fonts.
13096 \end_layout
13097
13098 \end_inset
13099
13100  The numbering of chapter headings is made in the same way as the numbering
13101  of section headings, that is without the extra line 
13102 \begin_inset Quotes eld
13103 \end_inset
13104
13105 Chapter\SpecialChar \ldots{}
13106
13107 \begin_inset Quotes erd
13108 \end_inset
13109
13110 .
13111  In addition, the appearance of the headings can be modified by using a
13112  number of options (in LyX to be entered in the field 
13113 \family sans
13114 Extra
13115 \begin_inset space ~
13116 \end_inset
13117
13118 Options
13119 \family default
13120  of the dialog 
13121 \family sans
13122 Layout\SpecialChar \menuseparator
13123 Document
13124 \family default
13125 ).
13126  
13127 \end_layout
13128
13129 \begin_layout Itemize
13130 The main means in the Koma-Script document classes to design the type area
13131  are the options 
13132 \family sans
13133 BCOR
13134 \family default
13135  and 
13136 \family sans
13137 DIV
13138 \family default
13139  (in LyX to be entered in the extra class options field in the dialog 
13140 \family sans
13141 Document\SpecialChar \menuseparator
13142 Settings
13143 \family default
13144 ).
13145  They make a clearer modification of page margins possible as do the options
13146  of the dialog 
13147 \family sans
13148 Document\SpecialChar \menuseparator
13149 Settings
13150 \family default
13151 .
13152  
13153 \end_layout
13154
13155 \begin_layout Itemize
13156 The LaTeX document classes of the Koma-Script family define a number of
13157  additional commands.
13158  Those part of it which makes sense in LyX is implemented in corresponding
13159  paragraph types.
13160 \end_layout
13161
13162 \begin_layout Standard
13163 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13164  can be found in the Koma-Script documentation 
13165 \emph on
13166 scrguide
13167 \emph default
13168  (German) and 
13169 \emph on
13170 scrguien
13171 \emph default
13172  (English).
13173 \end_layout
13174
13175 \begin_layout Subsection
13176 article (koma-script), report (koma-script), and book (koma-script)
13177 \end_layout
13178
13179 \begin_layout Standard
13180 The document classes 
13181 \emph on
13182 article (koma-script)
13183 \emph default
13184
13185 \emph on
13186 report (koma-script)
13187 \emph default
13188 , and 
13189 \emph on
13190 book
13191 \emph default
13192  
13193 \emph on
13194 (koma-script)
13195 \emph default
13196  are implemented in the layout files 
13197 \family typewriter
13198 scrartcl.layout
13199 \family default
13200
13201 \family typewriter
13202 scrreprt.layout
13203 \family default
13204 , and 
13205 \family typewriter
13206 scrbook.layout
13207 \family default
13208 , resp.
13209  They contain all the paragraph types of the corresponding standard document
13210  classes 
13211 \emph on
13212 article
13213 \emph default
13214
13215 \emph on
13216 report
13217 \emph default
13218 , and 
13219 \emph on
13220 book
13221 \emph default
13222 , resp., partly modified, with the exception of the LyX specific 
13223 \family sans
13224 List
13225 \family default
13226 -type, which is replaced by the new 
13227 \family sans
13228 Labeling
13229 \family default
13230 -type having the same functionality.
13231  Beside the 
13232 \family sans
13233 Labeling
13234 \family default
13235 -Type there is a number of new paragraph types added.
13236  They are 
13237 \emph on
13238 not
13239 \emph default
13240  part of 
13241 \emph on
13242 letter (koma-script)
13243 \emph default
13244 .
13245 \end_layout
13246
13247 \begin_layout Itemize
13248
13249 \family sans
13250 Addpart, Addchap
13251 \family default
13252
13253 \family sans
13254 Addsec
13255 \family default
13256 : are equivalents to 
13257 \family sans
13258 Part*, Chapter*
13259 \family default
13260  and 
13261 \family sans
13262 Section*
13263 \family default
13264 , resp., additionally inserting an entry in the table of contents.
13265  
13266 \family sans
13267 Addpart
13268 \family default
13269  and 
13270 \family sans
13271 Addchap
13272 \family default
13273  are not contained in 
13274 \emph on
13275 article (koma-script)
13276 \emph default
13277 .
13278 \end_layout
13279
13280 \begin_layout Itemize
13281
13282 \family sans
13283 Addchap*
13284 \family default
13285
13286 \family sans
13287 Addsec*
13288 \family default
13289 : behave exactly as 
13290 \family sans
13291 Addchap
13292 \family default
13293  and 
13294 \family sans
13295 Addsec
13296 \family default
13297 , resp., additionally clearing running heads.
13298  
13299 \family sans
13300 Addchap*
13301 \family default
13302  is not contained in 
13303 \emph on
13304 article (koma-script)
13305 \emph default
13306 .
13307 \begin_inset Foot
13308 status collapsed
13309
13310 \begin_layout Plain Layout
13311 There is also an 
13312 \family typewriter
13313
13314 \backslash
13315 addpart*
13316 \family default
13317  command in 
13318 \emph on
13319 book (koma-script)
13320 \emph default
13321  and in 
13322 \emph on
13323 report (koma-script)
13324 \emph default
13325 , but since this is identical to 
13326 \family sans
13327 Part*
13328 \family default
13329 , is has not been implemented in LyX.
13330 \end_layout
13331
13332 \end_inset
13333
13334
13335 \end_layout
13336
13337 \begin_layout Itemize
13338
13339 \family sans
13340 Minisec
13341 \family default
13342 : generates a heading directly above the following paragraph in the standard
13343  character size without affecting the structure of the document.
13344 \end_layout
13345
13346 \begin_layout Itemize
13347
13348 \family sans
13349 Captionabove
13350 \family default
13351  and 
13352 \family sans
13353 Captionbelow
13354 \family default
13355  are special captions which respect the different space settings needed
13356  for captions placed above or below an element (if you follow strict typographic
13357  rules, you might want to place table captions always above the table).
13358  You can also use the class option 
13359 \family typewriter
13360 tablecaptionsabove
13361 \family default
13362 , which will switch 
13363 \family sans
13364 caption
13365 \family default
13366  to 
13367 \family sans
13368 captionabove
13369 \family default
13370  for tables and 
13371 \family sans
13372 captionbelow
13373 \family default
13374  for figures.
13375  You need at least Koma-Script version 2.8q to use this.
13376 \end_layout
13377
13378 \begin_layout Itemize
13379
13380 \family sans
13381 Dictum
13382 \family default
13383 : can be used to set a bonmot, e.
13384 \begin_inset space \thinspace{}
13385 \end_inset
13386
13387 g.
13388 \begin_inset space \space{}
13389 \end_inset
13390
13391 at the beginning of a chapter.
13392  If you use the optional argument (
13393 \family sans
13394 Insert\SpecialChar \menuseparator
13395 Short
13396 \begin_inset space ~
13397 \end_inset
13398
13399 Title
13400 \family default
13401 ), you can insert the dictum's author there.
13402  Dictum and author are separated by a line.
13403  You need at least Koma-Script version 2.8q to use this.
13404  
13405 \family sans
13406 Dictum
13407 \family default
13408  is not contained in 
13409 \emph on
13410 article (koma-script)
13411 \emph default
13412 .
13413 \end_layout
13414
13415 \begin_layout Standard
13416 The following types, together with the standard types 
13417 \family sans
13418 Title
13419 \family default
13420
13421 \family sans
13422 Author
13423 \family default
13424 , and 
13425 \family sans
13426 Date
13427 \family default
13428 , form the title area of the document.
13429  They must be entered ahead of the first 
13430 \begin_inset Quotes eld
13431 \end_inset
13432
13433 ordinary
13434 \begin_inset Quotes erd
13435 \end_inset
13436
13437  paragraph.
13438 \begin_inset Foot
13439 status collapsed
13440
13441 \begin_layout Plain Layout
13442 The corresponding LaTeX commands must appear before the 
13443 \family typewriter
13444
13445 \backslash
13446 maketitle
13447 \family default
13448  command.
13449 \end_layout
13450
13451 \end_inset
13452
13453  When such a type is used more than once, the latter usage overwrites the
13454  former one, that means, for every type only the latest usage is valid.
13455  The order of the different types however has, like 
13456 \family sans
13457 Title
13458 \family default
13459
13460 \family sans
13461 Author
13462 \family default
13463 , and 
13464 \family sans
13465 Date
13466 \family default
13467 , no effect on the appearance of the produced document.
13468 \end_layout
13469
13470 \begin_layout Itemize
13471
13472 \family sans
13473 Subject
13474 \family default
13475 : produces a centered paragraph above the ordinary title (
13476 \family sans
13477 Title
13478 \family default
13479
13480 \family sans
13481 Author
13482 \family default
13483
13484 \family sans
13485 Date
13486 \family default
13487 ) for the subject of the document.
13488 \end_layout
13489
13490 \begin_layout Itemize
13491
13492 \family sans
13493 Publishers
13494 \family default
13495 : produces a centered paragraph below the ordinary title (
13496 \family sans
13497 Title
13498 \family default
13499
13500 \family sans
13501 Author
13502 \family default
13503
13504 \family sans
13505 Date
13506 \family default
13507 ) for the publishers' name.
13508 \end_layout
13509
13510 \begin_layout Itemize
13511
13512 \family sans
13513 Dedication
13514 \family default
13515 : in 
13516 \emph on
13517 report (koma-script)
13518 \emph default
13519  and 
13520 \emph on
13521 book (koma-script)
13522 \emph default
13523  produces a centered paragraph on its own page behind the title page, or
13524  in 
13525 \emph on
13526 article (koma-script)
13527 \emph default
13528  produces a centered paragraph below the ordinary title (
13529 \family sans
13530 Title
13531 \family default
13532
13533 \family sans
13534 Author
13535 \family default
13536
13537 \family sans
13538 Date
13539 \family default
13540
13541 \family sans
13542 Publishers
13543 \family default
13544 ) for a dedication.
13545 \end_layout
13546
13547 \begin_layout Itemize
13548
13549 \family sans
13550 Titlehead
13551 \family default
13552 : produces a left aligned paragraph above the ordinary title (
13553 \family sans
13554 Title
13555 \family default
13556
13557 \family sans
13558 Author
13559 \family default
13560
13561 \family sans
13562 Date
13563 \family default
13564
13565 \family sans
13566 Subject
13567 \family default
13568 ) for a document`s head.
13569 \end_layout
13570
13571 \begin_layout Itemize
13572
13573 \family sans
13574 Uppertitleback
13575 \family default
13576 : produces in a double-sided print in 
13577 \emph on
13578 report (koma-script)
13579 \emph default
13580  and 
13581 \emph on
13582 book (koma-script)
13583 \emph default
13584  a left-aligned paragraph at the top of the title page`s back or has no
13585  effect in a single-sided print or in 
13586 \emph on
13587 article (koma-script)
13588 \emph default
13589 .
13590 \end_layout
13591
13592 \begin_layout Itemize
13593
13594 \family sans
13595 Lowertitleback
13596 \family default
13597 : produces in a double-sided print in 
13598 \emph on
13599 report (koma-script)
13600 \emph default
13601  and 
13602 \emph on
13603 book (koma-script)
13604 \emph default
13605  a left-aligned paragraph at the bottom of the title page`s back or has
13606  no effect in a single-sided print or in 
13607 \emph on
13608 article (koma-script)
13609 \emph default
13610 .
13611 \end_layout
13612
13613 \begin_layout Itemize
13614
13615 \family sans
13616 Extratitle
13617 \family default
13618 : produces a special 
13619 \begin_inset Quotes eld
13620 \end_inset
13621
13622 dirty
13623 \begin_inset Quotes erd
13624 \end_inset
13625
13626  page ahead of the actual document containing a paragraph without special
13627  formatting.
13628 \end_layout
13629
13630 \begin_layout Standard
13631 The layout files for the document classes 
13632 \emph on
13633 article (koma-script)
13634 \emph default
13635
13636 \emph on
13637 report (koma-script)
13638 \emph default
13639 , and 
13640 \emph on
13641 book (koma-script)
13642 \emph default
13643  do include the file 
13644 \family typewriter
13645 scrmacros.inc
13646 \family default
13647 .
13648  This is thought of as a place to define your own types.
13649  Copy scrmacros
13650 \family typewriter
13651 .inc
13652 \family default
13653  in your personal layout directory and edit the file!
13654 \end_layout
13655
13656 \begin_layout Subsection
13657 letter (koma-script)
13658 \end_layout
13659
13660 \begin_layout Standard
13661 \noindent
13662 The document class 
13663 \emph on
13664 letter (koma-script)
13665 \emph default
13666  is implemented in the layout file 
13667 \family typewriter
13668 scrlettr.layout
13669 \family default
13670 .
13671  It contains all the paragraph types of the corresponding standard document
13672  class 
13673 \emph on
13674 letter
13675 \emph default
13676 , partly modified, with the exception of the LyX specific types 
13677 \family sans
13678 LyX-Code
13679 \family default
13680  and 
13681 \family sans
13682 Comment
13683 \family default
13684  and the 
13685 \family sans
13686 List
13687 \family default
13688  type, which is replaced by the new 
13689 \family sans
13690 Labeling
13691 \family default
13692  type.
13693  In addition, it contains, in contrast to the standard document class, the
13694  standard types 
13695 \family sans
13696 LaTeX
13697 \family default
13698
13699 \family sans
13700 Quotation
13701 \family default
13702
13703 \family sans
13704 Quote
13705 \family default
13706 , and 
13707 \family sans
13708 Verse
13709 \family default
13710 .
13711  Furthermore, there are a number of new letter specific types.
13712 \end_layout
13713
13714 \begin_layout Standard
13715 The appearance of the letter produced by this document class can be controlled
13716  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13717 \begin_inset Foot
13718 status collapsed
13719
13720 \begin_layout Plain Layout
13721 For example, the standard appearance of the letter`s heading, consisting
13722  of name and address, is quite self-willed.
13723  An 
13724 \begin_inset Quotes eld
13725 \end_inset
13726
13727 ordinary
13728 \begin_inset Quotes erd
13729 \end_inset
13730
13731  heading is produced by the following LaTeX commands in the preamble:
13732 \end_layout
13733
13734 \begin_layout LyX-Code
13735
13736 \backslash
13737 firsthead{
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
13752 \backslash
13753  
13754 \backslash
13755 ignorespaces 
13756 \backslash
13757 fromaddress}} 
13758 \end_layout
13759
13760 \begin_layout LyX-Code
13761
13762 \backslash
13763 nexthead{
13764 \backslash
13765 parbox[b]{
13766 \backslash
13767 textwidth}
13768 \end_layout
13769
13770 \begin_layout LyX-Code
13771   {
13772 \backslash
13773 ignorespaces 
13774 \backslash
13775 fromname 
13776 \backslash
13777 hfill 
13778 \backslash
13779 ignorespaces 
13780 \backslash
13781 pagename
13782 \backslash
13783  
13784 \backslash
13785 thepage}}
13786 \end_layout
13787
13788 \end_inset
13789
13790  A detailed German description of such LaTeX commands can be found in the
13791  Koma-Script documentation 
13792 \emph on
13793 scrguide
13794 \emph default
13795 .
13796  With it, the letter's author can produce his personal letter layout.
13797 \end_layout
13798
13799 \begin_layout Standard
13800 The types 
13801 \family sans
13802 Letter
13803 \family default
13804  and 
13805 \family sans
13806 Opening
13807 \family default
13808  define the beginning of the letter and must be used in every letter.
13809  To emphasize them in the LyX document class, they are marked with the letter
13810  
13811 \shape italic
13812 L
13813 \shape default
13814  or 
13815 \shape italic
13816 O
13817 \shape default
13818 , resp.
13819 \begin_inset space ~
13820 \end_inset
13821
13822 in the left margin.
13823  It is possible to write any number of letters in one file.
13824  An 
13825 \family sans
13826 Opening
13827 \family default
13828  type produces a new letter using the same addressee and a 
13829 \family sans
13830 Letter
13831 \family default
13832  type produces a new addressee.
13833  The types 
13834 \family sans
13835 Closing
13836 \family default
13837
13838 \family sans
13839 PS
13840 \family default
13841
13842 \family sans
13843 CC
13844 \family default
13845 , and 
13846 \family sans
13847 Encl
13848 \family default
13849  are ordinary paragraph types and can also be used several times in one
13850  and the same letter.
13851 \end_layout
13852
13853 \begin_layout Itemize
13854
13855 \family sans
13856 Letter
13857 \family default
13858 : produces a paragraph for the addressee and implicitly defines the beginning
13859  of the letter.
13860 \end_layout
13861
13862 \begin_layout Itemize
13863
13864 \family sans
13865 Opening
13866 \family default
13867 : produces a paragraph for the form of address and implicitly produces a
13868  new letter.
13869 \end_layout
13870
13871 \begin_layout Itemize
13872
13873 \family sans
13874 Closing
13875 \family default
13876 : produces a paragraph for a close.
13877 \end_layout
13878
13879 \begin_layout Itemize
13880
13881 \family sans
13882 PS
13883 \family default
13884 : produces a paragraph for a postscript.
13885 \end_layout
13886
13887 \begin_layout Itemize
13888
13889 \family sans
13890 CC
13891 \family default
13892 : produces a paragraph for a distribution list.
13893 \end_layout
13894
13895 \begin_layout Itemize
13896
13897 \family sans
13898 Encl
13899 \family default
13900 : produces a paragraph for enclosures.
13901 \end_layout
13902
13903 \begin_layout Standard
13904 The types 
13905 \family sans
13906 Name
13907 \family default
13908
13909 \family sans
13910 Signature
13911 \family default
13912
13913 \family sans
13914 Address
13915 \family default
13916
13917 \family sans
13918 Telephone
13919 \family default
13920
13921 \family sans
13922 Place
13923 \family default
13924
13925 \family sans
13926 Backaddress
13927 \family default
13928
13929 \family sans
13930 Specialmail
13931 \family default
13932
13933 \family sans
13934 Location
13935 \family default
13936
13937 \family sans
13938 Title
13939 \family default
13940 , and 
13941 \family sans
13942 Subject
13943 \family default
13944  are input types provided with a label to enter information, which will
13945  be processed by the document class.
13946 \begin_inset Foot
13947 status open
13948
13949 \begin_layout Plain Layout
13950 It could be seen as a matter of inconsequence, that the types 
13951 \family sans
13952 Letter
13953 \family default
13954  and 
13955 \family sans
13956 Opening
13957 \family default
13958  described above are not such input types as well.
13959  Because of the special meaning of those types, however, I have implemented
13960  them as ordinary paragraph types with a one letter mark in the left margin.
13961  Moreover, it would affect my feeling of symmetry, if the 
13962 \family sans
13963 Opening
13964 \family default
13965  type and the 
13966 \family sans
13967 Closing
13968 \family default
13969  type had such a serious different appearance.
13970 \end_layout
13971
13972 \end_inset
13973
13974  The types must be used ahead of the corresponding 
13975 \family sans
13976 Opening
13977 \family default
13978  type.
13979 \end_layout
13980
13981 \begin_layout Standard
13982 An implementation of these types in a WYSIWYG fashion does not seem to make
13983  sense, because the real appearance of the produced letter does not only
13984  depend on the usage of the particular type, but also on other factors.
13985  For example, a signature entered in the 
13986 \family sans
13987 Signature
13988 \family default
13989  type will in the standard behavior appear in the produced letter only,
13990  when in the same letter also a 
13991 \family sans
13992 Closing
13993 \family default
13994  type is used.
13995  The entered value of the 
13996 \family sans
13997 Telephone
13998 \family default
13999  type will in the standard behavior not appear in the produced letter at
14000  all.
14001  The possibility to design the letter`s heading freely is already indicated
14002  in a footnote above.
14003 \end_layout
14004
14005 \begin_layout Standard
14006 The input types can also be used as empty paragraphs.
14007  This makes sense e.
14008 \begin_inset space \thinspace{}
14009 \end_inset
14010
14011 g.
14012 \begin_inset space \space{}
14013 \end_inset
14014
14015 for the 
14016 \family sans
14017 Signature
14018 \family default
14019  type.
14020  If the 
14021 \family sans
14022 Signature
14023 \family default
14024  type is not used at all, in the standard behavior the value of the 
14025 \family sans
14026 Name
14027 \family default
14028  type is used as signature, whereas if an empty 
14029 \family sans
14030 Signature
14031 \family default
14032  type is used, no signature value is defined.
14033 \end_layout
14034
14035 \begin_layout Standard
14036 By using the input types it is possible to write a letter template, containing
14037  filled input types with your personal dates (name, address, etc.) and empty
14038  input types for other dates you want to enter.
14039 \end_layout
14040
14041 \begin_layout Itemize
14042
14043 \family sans
14044 Name
14045 \family default
14046 : sender's name, in the standard behavior appears as a centered paragraph
14047  in small caps in the letter`s heading.
14048 \end_layout
14049
14050 \begin_layout Itemize
14051
14052 \family sans
14053 Signature
14054 \family default
14055 : sender's signature, in the standard behavior appears below the 
14056 \family sans
14057 Closing
14058 \family default
14059  type.
14060  If no 
14061 \family sans
14062 Signature
14063 \family default
14064  type is used, the value of the 
14065 \family sans
14066 Name
14067 \family default
14068  type appears instead.
14069 \end_layout
14070
14071 \begin_layout Itemize
14072
14073 \family sans
14074 Address
14075 \family default
14076 : sender's address, in the standard behavior appears in a centered paragraph
14077  in the letter`s heading below the sender's name.
14078 \end_layout
14079
14080 \begin_layout Itemize
14081
14082 \family sans
14083 Telephone
14084 \family default
14085 : sender's telephone number, in the standard behavior only sets the LaTeX
14086  variable 
14087 \family typewriter
14088
14089 \backslash
14090 telephonenum
14091 \family default
14092 .
14093 \end_layout
14094
14095 \begin_layout Itemize
14096
14097 \family sans
14098 Place
14099 \family default
14100 : place of the letter`s making.
14101 \end_layout
14102
14103 \begin_layout Itemize
14104
14105 \family sans
14106 Date
14107 \family default
14108 : date of the letter`s making.
14109  
14110 \family sans
14111 Place
14112 \family default
14113  and 
14114 \family sans
14115 Date
14116 \family default
14117 , in the standard behavior, produce the place and the date in a right-aligned
14118  line below the addressee's field.
14119  If an empty 
14120 \family sans
14121 Date
14122 \family default
14123  type is used, neither place nor date appear, independent of the value of
14124  the 
14125 \family sans
14126 Place
14127 \family default
14128  type.
14129  If no 
14130 \family sans
14131 Date
14132 \family default
14133  type is used, the date of the letter `s production is used.
14134 \end_layout
14135
14136 \begin_layout Itemize
14137
14138 \family sans
14139 Backaddress
14140 \family default
14141 : sender`s back address, in the standard behavior appears above the addressee's
14142  field in a small sans serif font.
14143 \end_layout
14144
14145 \begin_layout Itemize
14146
14147 \family sans
14148 Specialmail
14149 \family default
14150 : special mail information, in the standard behavior appears underlined
14151  above the addressee's field below the back address.
14152 \end_layout
14153
14154 \begin_layout Itemize
14155
14156 \family sans
14157 Location
14158 \family default
14159 : additional information, in the standard behavior appears on right side
14160  below the addressee`s field.
14161 \end_layout
14162
14163 \begin_layout Itemize
14164
14165 \family sans
14166 Title
14167 \family default
14168 : the letter's title, in the standard behavior appears in a big, bold, sans
14169  serif font above the subject.
14170 \end_layout
14171
14172 \begin_layout Itemize
14173
14174 \family sans
14175 Subject
14176 \family default
14177 : the letter's subject, in the standard behavior appears in a bold font
14178  above the 
14179 \family sans
14180 Opening
14181 \family default
14182  paragraph.
14183 \end_layout
14184
14185 \begin_layout Standard
14186 The types 
14187 \family sans
14188 Yourref
14189 \family default
14190
14191 \family sans
14192 Yourmail
14193 \family default
14194
14195 \family sans
14196 Myref
14197 \family default
14198
14199 \family sans
14200 Customer
14201 \family default
14202 , and 
14203 \family sans
14204 Invoice
14205 \family default
14206  produce a business letter like line above the 
14207 \family sans
14208 Title
14209 \family default
14210  line containing the fields 
14211 \begin_inset Quotes eld
14212 \end_inset
14213
14214 Your ref.
14215 \begin_inset Quotes erd
14216 \end_inset
14217
14218
14219 \begin_inset Quotes eld
14220 \end_inset
14221
14222 Your letter of
14223 \begin_inset Quotes erd
14224 \end_inset
14225
14226
14227 \begin_inset Quotes eld
14228 \end_inset
14229
14230 Our ref.
14231 \begin_inset Quotes erd
14232 \end_inset
14233
14234
14235 \begin_inset Quotes eld
14236 \end_inset
14237
14238 Customer no.
14239 \begin_inset Quotes erd
14240 \end_inset
14241
14242
14243 \begin_inset Quotes eld
14244 \end_inset
14245
14246 Invoice no.
14247 \begin_inset Quotes erd
14248 \end_inset
14249
14250 , and 
14251 \begin_inset Quotes eld
14252 \end_inset
14253
14254 Date
14255 \begin_inset Quotes erd
14256 \end_inset
14257
14258 .
14259  For the date field, the value of the 
14260 \family sans
14261 Date
14262 \family default
14263  type is used.
14264  If one of these 
14265 \begin_inset Quotes eld
14266 \end_inset
14267
14268 business letter types
14269 \begin_inset Quotes erd
14270 \end_inset
14271
14272  is used, the value of the 
14273 \family sans
14274 Place
14275 \family default
14276  type however does not appear, but only the LaTeX variable 
14277 \family typewriter
14278
14279 \backslash
14280 fromplace
14281 \family default
14282  is set.
14283  The ordinary output of place and date in a right-aligned line below the
14284  addressee`s field is suppressed.
14285  The types are implemented as input types provided with a label and must
14286  be used ahead of the corresponding 
14287 \family sans
14288 Opening
14289 \family default
14290  type.
14291 \end_layout
14292
14293 \begin_layout Itemize
14294
14295 \family sans
14296 Yourref
14297 \family default
14298 : Your ref.
14299 \end_layout
14300
14301 \begin_layout Itemize
14302
14303 \family sans
14304 Yourmail
14305 \family default
14306 : Your letter of.
14307 \end_layout
14308
14309 \begin_layout Itemize
14310
14311 \family sans
14312 Myref
14313 \family default
14314 : Our ref.
14315 \end_layout
14316
14317 \begin_layout Itemize
14318
14319 \family sans
14320 Customer
14321 \family default
14322 : Customer no.
14323 \end_layout
14324
14325 \begin_layout Itemize
14326
14327 \family sans
14328 Invoice
14329 \family default
14330 : Invoice no.
14331 \end_layout
14332
14333 \begin_layout Subsection
14334 The new letter class: letter (koma-script v.2)
14335 \end_layout
14336
14337 \begin_layout Standard
14338 by 
14339 \noun on
14340 Jürgen Spitzmüller
14341 \end_layout
14342
14343 \begin_layout Standard
14344 \begin_inset VSpace medskip
14345 \end_inset
14346
14347
14348 \end_layout
14349
14350 \begin_layout Standard
14351 \noindent
14352 Koma-Script version 2.8 has introduced a new letter class 
14353 \family typewriter
14354 scrlttr2
14355 \family default
14356  which supersedes the now unsupported 
14357 \family typewriter
14358 scrlettr
14359 \family default
14360 .
14361  It has — on the LaTeX side — a completely new interface and is not compatible
14362  with the old class.
14363  Therefore, LyX supports both, though it is recommended you use the new
14364  class.
14365 \end_layout
14366
14367 \begin_layout Standard
14368 This class covers the same functionality as 
14369 \emph on
14370 letter (koma-script),
14371 \emph default
14372  and a few more.
14373  The basic items are 
14374 \family sans
14375 Address
14376 \family default
14377  (receiver's address, same as 
14378 \family sans
14379 Letter
14380 \family default
14381  in the old layout), 
14382 \family sans
14383 Opening
14384 \family default
14385 , and 
14386 \family sans
14387 Closing
14388 \family default
14389 .
14390  
14391 \family sans
14392 NextAddress
14393 \family default
14394  will start a new letter (i.
14395 \begin_inset space \thinspace{}
14396 \end_inset
14397
14398 e.
14399 \begin_inset space \space{}
14400 \end_inset
14401
14402 you can write several letters per document).
14403  New elements are sender's 
14404 \family sans
14405 E-Mail
14406 \family default
14407
14408 \family sans
14409 URL
14410 \family default
14411
14412 \family sans
14413 Fax
14414 \family default
14415
14416 \family sans
14417 Bank
14418 \family default
14419  and the possibility to use a 
14420 \family sans
14421 Logo
14422 \family default
14423  (via 
14424 \family sans
14425 Insert\SpecialChar \menuseparator
14426 Graphics
14427 \family default
14428 ) in the header.
14429 \end_layout
14430
14431 \begin_layout Standard
14432 The biggest improvement is, though, that the letter's layout is configurable
14433  to meet almost any needs.
14434  This can be done via the preamble or with a special style file (Letter
14435  Class Option, extension 
14436 \family typewriter
14437 *.lco
14438 \family default
14439 ), that will be read in as a class option.
14440 \begin_inset Foot
14441 status collapsed
14442
14443 \begin_layout Plain Layout
14444 The KOMA package comes with some default 
14445 \family typewriter
14446 *.lco
14447 \family default
14448  files.
14449  There is, for instance, a 
14450 \family typewriter
14451 DIN.lco
14452 \family default
14453  file that follows german typesetting rules, or a 
14454 \family typewriter
14455 KOMAold.lco
14456 \family default
14457  that provides the default layout of the old 
14458 \family typewriter
14459 scrlettr
14460 \family default
14461  class.
14462  The latter can be loaded with the class option 
14463 \family typewriter
14464 KOMAold
14465 \family default
14466 , inserted via the 
14467 \family sans
14468 \bar under
14469 L
14470 \bar default
14471 ayout\SpecialChar \menuseparator
14472
14473 \bar under
14474 D
14475 \bar default
14476 ocument\SpecialChar \menuseparator
14477 Extra Options
14478 \family default
14479  field.
14480 \end_layout
14481
14482 \end_inset
14483
14484  Have a look at the 
14485 \emph on
14486 koma-letter2
14487 \emph default
14488  template that is included in LyX for examples.
14489  A detailed description is to be found in the Koma-Script documentation
14490  (
14491 \emph on
14492 scrguide
14493 \emph default
14494 ).
14495 \end_layout
14496
14497 \begin_layout Subsection
14498 Problems
14499 \end_layout
14500
14501 \begin_layout Standard
14502 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14503  some problems.
14504 \end_layout
14505
14506 \begin_layout Itemize
14507 The chapter number of a 
14508 \family sans
14509 Chapter
14510 \family default
14511  type appears on a line of its own above the chapter heading instead of
14512  appearing in the same line ahead of it.
14513  The cause for that is the LyX internal behavior for the labeltype 
14514 \family sans
14515 Counter_Chapter
14516 \family default
14517  in the layout file.
14518 \end_layout
14519
14520 \begin_layout Itemize
14521 The headings of the types 
14522 \family sans
14523 Addchap
14524 \family default
14525  and 
14526 \family sans
14527 Addsec
14528 \family default
14529  are only put in the 
14530 \begin_inset Quotes eld
14531 \end_inset
14532
14533 true
14534 \begin_inset Quotes erd
14535 \end_inset
14536
14537  LaTeX table of contents, but not in the LyX table of contents (
14538 \family sans
14539 Document\SpecialChar \menuseparator
14540 Table
14541 \begin_inset space ~
14542 \end_inset
14543
14544 of
14545 \begin_inset space ~
14546 \end_inset
14547
14548 Contents
14549 \family default
14550 ).
14551 \end_layout
14552
14553 \begin_layout Itemize
14554 The paragraphs in a 
14555 \emph on
14556 letter
14557 \emph default
14558  document class appear in a skip separation mode, not indented.
14559  This is the standard behavior, no special LaTeX commands are needed for
14560  that.
14561  But in the 
14562 \family sans
14563 Document\SpecialChar \menuseparator
14564 Settings
14565 \family default
14566  dialog the corresponding radio button indicates 
14567 \family sans
14568 Indent
14569 \family default
14570 .
14571  A 
14572 \family sans
14573 Skip
14574 \family default
14575  value always has the effect that extra LaTeX commands are inserted in the
14576  document to produce the gap, which is not what is wanted in this case.
14577 \end_layout
14578
14579 \begin_layout Section
14580 Memoir
14581 \end_layout
14582
14583 \begin_layout Standard
14584 By 
14585 \noun on
14586 Jürgen Spitzmüller
14587 \end_layout
14588
14589 \begin_layout Subsection
14590 Overview
14591 \end_layout
14592
14593 \begin_layout Standard
14594 Memoir is a very powerful and constantly evolving class.
14595  It has been designed with regard to fictional and non-fictional literature.
14596  Its aim is to let the user have maximum control over the typesetting of
14597  his document.
14598  Memoir is based on the standard book class, but it can also emulate the
14599  article class (see below).
14600 \end_layout
14601
14602 \begin_layout Standard
14603 Peter Wilson, the developer of Memoir, is known as the author of lots of
14604  useful packages in the LaTeX world.
14605  Most of them have been merged with Memoir.
14606  Therefore, it is much easier to layout the table of contents, appendices,
14607  chapter designs and such.
14608  LyX, though, does not support all of these goodies natively.
14609  Some of them might be added to forthcoming releases
14610 \begin_inset Foot
14611 status collapsed
14612
14613 \begin_layout Plain Layout
14614 You are invited to send suggestions to 
14615 \begin_inset Flex URL
14616 status collapsed
14617
14618 \begin_layout Plain Layout
14619
14620 lyx-devel@lists.lyx.org
14621 \end_layout
14622
14623 \end_inset
14624
14625 .
14626 \end_layout
14627
14628 \end_inset
14629
14630 , lots will probably never be supported, due to the limitations of LyX's
14631  framework.
14632  Of course you can still use all features with the help of some native LaTeX
14633  commands (TeX code
14634 \begin_inset Foot
14635 status collapsed
14636
14637 \begin_layout Plain Layout
14638 Cf.
14639 \begin_inset ERT
14640 status collapsed
14641
14642 \begin_layout Plain Layout
14643
14644
14645 \backslash
14646  
14647 \end_layout
14648
14649 \end_inset
14650
14651 section
14652 \begin_inset space ~
14653 \end_inset
14654
14655
14656 \begin_inset CommandInset ref
14657 LatexCommand ref
14658 reference "sec:Inserting-TeX-Code"
14659
14660 \end_inset
14661
14662  for details.
14663 \end_layout
14664
14665 \end_inset
14666
14667 ).
14668  In this section, we can only list those features that are natively supported
14669  by LyX.
14670  For detailed descriptions (and for the rest of features) we recommend you
14671  have a look at the detailed manual of the Memoir class
14672 \begin_inset Foot
14673 status collapsed
14674
14675 \begin_layout Plain Layout
14676 Cf.
14677 \begin_inset ERT
14678 status collapsed
14679
14680 \begin_layout Plain Layout
14681
14682
14683 \backslash
14684  
14685 \end_layout
14686
14687 \end_inset
14688
14689
14690 \begin_inset Flex URL
14691 status collapsed
14692
14693 \begin_layout Plain Layout
14694
14695 CTAN:/macros/latex/memoir/memman.pdf
14696 \end_layout
14697
14698 \end_inset
14699
14700 .
14701 \end_layout
14702
14703 \end_inset
14704
14705 , which is not only a user guide for the class, but also both a comprehensive
14706  description on good typesetting and a superb example for good typesetting
14707  itself.
14708 \end_layout
14709
14710 \begin_layout Subsection
14711 Basic features and restrictions
14712 \end_layout
14713
14714 \begin_layout Standard
14715 Memoir supports basically all features of the standard book classes.
14716  There are, however, some differences, as follows:
14717 \end_layout
14718
14719 \begin_layout Description
14720 Font
14721 \begin_inset space ~
14722 \end_inset
14723
14724 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14725 \end_layout
14726
14727 \begin_layout Description
14728 Page
14729 \begin_inset space ~
14730 \end_inset
14731
14732 style: The fancy page style is not supported, due to a command clash between
14733  Memoir and the fancyhdr package (they both define a command with the same
14734  name, which confuses LaTeX).
14735  Instead, Memoir comes with a number of its own page styles (see 
14736 \family sans
14737 Layout\SpecialChar \menuseparator
14738 Document\SpecialChar \menuseparator
14739 Page
14740 \begin_inset space ~
14741 \end_inset
14742
14743 Style
14744 \family default
14745 ).
14746  If you want to use these for the chapter pages, you have to use the command
14747  
14748 \family typewriter
14749
14750 \backslash
14751 chapterstyle
14752 \family default
14753  in the main text or in preamble (e.
14754 \begin_inset space \thinspace{}
14755 \end_inset
14756
14757 g.
14758 \begin_inset space \space{}
14759 \end_inset
14760
14761
14762 \family typewriter
14763
14764 \backslash
14765 chapterstyle{companion}
14766 \family default
14767 ).
14768 \end_layout
14769
14770 \begin_layout Description
14771 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14772  optional argument in the standard classes.
14773  With this, you can specify an alternative version of the title for the
14774  table of contents and the headers (for instance, if the title is too long).
14775  In LyX, you can do this via 
14776 \family sans
14777 Insert\SpecialChar \menuseparator
14778 Short
14779 \begin_inset space ~
14780 \end_inset
14781
14782 Title
14783 \family default
14784  at the beginning of a chapter/section.
14785  Memoir features a second optional argument and thus separates the table
14786  of contents from the header.
14787  You can define three variants of a title with this: one for the main text,
14788  one for the table of contents, and one for the headers.
14789  Simply insert two optional arguments if you need this feature, the first
14790  one containing the short title for the Table of Contents, the second one
14791  containing an alternative short title for the headers.
14792 \end_layout
14793
14794 \begin_layout Description
14795 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14796  of contents, the list of figures and the list of table start a new page
14797  automatically.
14798  Memoir does not follow this route.
14799  You have to insert a page break yourself, if you want to have one.
14800 \end_layout
14801
14802 \begin_layout Description
14803 Titlepage: For some unknown reason, Memoir uses pagination on the title
14804  page (in the standard classes, title pages are 
14805 \begin_inset Quotes eld
14806 \end_inset
14807
14808 empty
14809 \begin_inset Quotes erd
14810 \end_inset
14811
14812 ).
14813  If you want an empty title page, type 
14814 \family typewriter
14815
14816 \backslash
14817 aliaspagestyle{title}{empty}
14818 \family default
14819  in the preamble.
14820 \end_layout
14821
14822 \begin_layout Description
14823 Article: With the class option 
14824 \emph on
14825 article
14826 \emph default
14827  (to be inserted in 
14828 \family sans
14829 Layout\SpecialChar \menuseparator
14830 Document\SpecialChar \menuseparator
14831 Extra
14832 \begin_inset space ~
14833 \end_inset
14834
14835 Options
14836 \family default
14837 ), you can emulate article style.
14838  That is, counters (footnotes, figures, tables etc.) will not be reset on
14839  new chapters, chapters don't start a new page (but are—in contrary to 
14840 \begin_inset Quotes eld
14841 \end_inset
14842
14843 real
14844 \begin_inset Quotes erd
14845 \end_inset
14846
14847  article classes—still allowed), parts, though, use their own page, as in
14848  book.
14849 \end_layout
14850
14851 \begin_layout Description
14852 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14853  font commands, which have been used in the old LaTeX version 2.09 (e.
14854 \begin_inset space \thinspace{}
14855 \end_inset
14856
14857 g.
14858 \begin_inset space \space{}
14859 \end_inset
14860
14861
14862 \family typewriter
14863
14864 \backslash
14865 rm
14866 \family default
14867
14868 \family typewriter
14869
14870 \backslash
14871 it
14872 \family default
14873 ).
14874  It produces an error and stops LaTeX whenever such a command appears.
14875  The class option 
14876 \emph on
14877 oldfontcommands
14878 \emph default
14879  reallows the commands and spits out warnings instead (which does at least
14880  not stop LaTeX).
14881  Since a lot of packages and particularly BibTeX style files are still using
14882  those commands, we have decided to use this option by default.
14883 \end_layout
14884
14885 \begin_layout Subsection
14886 Extra features
14887 \end_layout
14888
14889 \begin_layout Standard
14890 We will only describe the features supported by LyX (which is not much currently
14891 ).
14892  Please consult the Memoir manual
14893 \begin_inset Foot
14894 status collapsed
14895
14896 \begin_layout Plain Layout
14897 Cf.
14898 \begin_inset ERT
14899 status collapsed
14900
14901 \begin_layout Plain Layout
14902
14903
14904 \backslash
14905  
14906 \end_layout
14907
14908 \end_inset
14909
14910
14911 \begin_inset Flex URL
14912 status collapsed
14913
14914 \begin_layout Plain Layout
14915
14916 CTAN:/macros/latex/memoir/memman.pdf
14917 \end_layout
14918
14919 \end_inset
14920
14921 .
14922 \end_layout
14923
14924 \end_inset
14925
14926  for details.
14927 \end_layout
14928
14929 \begin_layout Description
14930 Abstract: You may wonder why an abstract is an extra feature.
14931  Well, it is in book class.
14932  Usually books don't have abstracts.
14933  Memoir, however, has.
14934  You can use it wherever and how often you like.
14935 \end_layout
14936
14937 \begin_layout Description
14938 Chapterprecis: You may know this older typesetting style: The contents of
14939  a chapter are summarized below the title and also in the table of contents
14940  (e.
14941 \begin_inset space \thinspace{}
14942 \end_inset
14943
14944 g.
14945 \begin_inset space \space{}
14946 \end_inset
14947
14948
14949 \emph on
14950 Our hero arrives in Troia; he loses some friends; he finds others
14951 \emph default
14952 ).
14953  Chapterprecis does exactly this.
14954  It is therefore only sensible below a chapter.
14955 \end_layout
14956
14957 \begin_layout Description
14958 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14959  The epigraph environment provides an elegant way of typesetting such a
14960  motto.
14961  The motto itself (text) and its author (source) are divided by a short
14962  line.
14963  Unfortunately, we have to fool LyX a bit here again, since the environment
14964  needs two arguments (text and source).
14965  In this case, we have to use curly brackets (in TeX mode) between the two
14966  arguments: 
14967 \emph on
14968 <smart slogan>
14969 \emph default
14970  
14971 \family typewriter
14972 }{
14973 \family default
14974  
14975 \emph on
14976 <author of the slogan>.
14977 \end_layout
14978
14979 \begin_layout Description
14980 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14981  complex figurative poems).
14982  LyX can only support a few of them.
14983  One is poemtitle, which is a centered title for poems, which will also
14984  be added to the table of contents (verse is the standard environment for
14985  poems.
14986  Memoir has some enhanced versions of verse, but you need to use TeX code,
14987  because they have to be nested inside regular verse environments, which
14988  is not possible with LyX).
14989 \end_layout
14990
14991 \begin_layout Description
14992 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14993 \end_layout
14994
14995 \begin_layout Section
14996 Article (mwart), book (mwbk) and report (mwrep)
14997 \begin_inset Argument status
14998 status collapsed
14999
15000 \begin_layout Plain Layout
15001 The 
15002 \family typewriter
15003 mw
15004 \family default
15005  Classes
15006 \end_layout
15007
15008 \end_inset
15009
15010
15011 \end_layout
15012
15013 \begin_layout Standard
15014 by 
15015 \noun on
15016 Tomasz Luczak
15017 \end_layout
15018
15019 \begin_layout Standard
15020 The LyX document classes 
15021 \emph on
15022 article (mwart)
15023 \emph default
15024
15025 \emph on
15026 report (mwrep)
15027 \emph default
15028  and 
15029 \emph on
15030 book
15031 \emph default
15032  
15033 \emph on
15034 (mwbk)
15035 \emph default
15036  correspond to the LaTeX document classes 
15037 \family typewriter
15038 mwart.cls
15039 \family default
15040
15041 \family typewriter
15042 mwrep.cls
15043 \family default
15044  and 
15045 \family typewriter
15046 mwbk.cls
15047 \family default
15048 , resp.
15049  They are replacements for the standard document classes 
15050 \family typewriter
15051 article.cls
15052 \family default
15053
15054 \family typewriter
15055 report.cls
15056 \family default
15057  and 
15058 \family typewriter
15059 book.cls
15060 \family default
15061 , resp., and fit better to Polish typography conventions in a number of points.
15062  
15063 \end_layout
15064
15065 \begin_layout Standard
15066 Basic differences:
15067 \end_layout
15068
15069 \begin_layout Itemize
15070 Unnumbered titles (with star, e.
15071 \begin_inset space \thinspace{}
15072 \end_inset
15073
15074 g.
15075 \begin_inset space \space{}
15076 \end_inset
15077
15078
15079 \family sans
15080 Section*
15081 \family default
15082 ) are added into table of contents,
15083 \end_layout
15084
15085 \begin_layout Itemize
15086 Additional page styles:
15087 \end_layout
15088
15089 \begin_deeper
15090 \begin_layout Description
15091 uheadings header with separated lines,
15092 \end_layout
15093
15094 \begin_layout Description
15095 myheadings custom header, contents headers via commands: 
15096 \family typewriter
15097
15098 \backslash
15099 markright
15100 \family default
15101  and 
15102 \family typewriter
15103
15104 \backslash
15105 markboth
15106 \family default
15107 ,
15108 \end_layout
15109
15110 \begin_layout Description
15111 myuheadings custom header with separated lines,
15112 \end_layout
15113
15114 \begin_layout Description
15115 outer page number is placed on outer side of page
15116 \end_layout
15117
15118 \end_deeper
15119 \begin_layout Itemize
15120 Options 
15121 \end_layout
15122
15123 \begin_deeper
15124 \begin_layout Description
15125 rmheadings serif titles — default,
15126 \end_layout
15127
15128 \begin_layout Description
15129 sfheadings sansserif titles,
15130 \end_layout
15131
15132 \begin_layout Description
15133 authortitle on title page first placed is author next title — default,
15134 \end_layout
15135
15136 \begin_layout Description
15137 titleauthor on title page first placed is title next author,
15138 \end_layout
15139
15140 \begin_layout Description
15141 withmarginpar reserve place on page for margins.
15142 \end_layout
15143
15144 \end_deeper
15145 \begin_layout Section
15146 Paper
15147 \end_layout
15148
15149 \begin_layout Standard
15150 The document class 
15151 \family sans
15152 paper
15153 \family default
15154  provides an alternative to the standard 
15155 \family sans
15156 article
15157 \family default
15158  class.
15159  It provides similar functionality, but you might prefer this layout with
15160  sans serif sections, headings, and more.
15161 \end_layout
15162
15163 \begin_layout Section
15164 RevTeX4
15165 \end_layout
15166
15167 \begin_layout Standard
15168 by 
15169 \noun on
15170 Amir Karger
15171 \end_layout
15172
15173 \begin_layout Standard
15174 \begin_inset VSpace bigskip
15175 \end_inset
15176
15177
15178 \end_layout
15179
15180 \begin_layout Standard
15181 \noindent
15182 The 
15183 \family sans
15184 Revtex
15185 \begin_inset space ~
15186 \end_inset
15187
15188 4
15189 \family default
15190  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15191 \begin_inset Formula $\beta$
15192 \end_inset
15193
15194  release of May, 1999) class.
15195 \end_layout
15196
15197 \begin_layout Standard
15198 LyX has a 
15199 \family sans
15200 Revtex
15201 \family default
15202  textclass, which works with RevTeX 3.1.
15203  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15204  That means that it doesn't interact very well with LyX, which requires
15205  LaTeX2e, although it has been kludged to work.
15206  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15207  LyX with the 
15208 \family sans
15209 RevTeX
15210 \begin_inset space ~
15211 \end_inset
15212
15213 4
15214 \family default
15215  textclass should also be pretty easy to use.
15216 \end_layout
15217
15218 \begin_layout Standard
15219 These documents are supposed to be used in 
15220 \emph on
15221 addition
15222 \emph default
15223  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15224  macros, and assume you'll know what to put in the preamble if necessary.
15225 \end_layout
15226
15227 \begin_layout Subsection
15228 Installation
15229 \end_layout
15230
15231 \begin_layout Standard
15232 All you need to do is install RevTeX 4, as described in the package's README
15233  file.
15234  The package can be found at The RevTeX 4 Web Site 
15235 \begin_inset Flex URL
15236 status collapsed
15237
15238 \begin_layout Plain Layout
15239
15240 http://publish.aps.org/revtex4/
15241 \end_layout
15242
15243 \end_inset
15244
15245 .
15246  Install it somewhere that LaTeX can see it.
15247  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15248  (i.
15249 \begin_inset space \thinspace{}
15250 \end_inset
15251
15252 e.
15253 \begin_inset space \space{}
15254 \end_inset
15255
15256 not the directory where you installed the class file.) Then, if you reconfigure
15257  LyX, it will find the class file and let you use the RevTeX4 textclass.
15258 \end_layout
15259
15260 \begin_layout Standard
15261 Probably the easiest way to get started is either to import a RevTeX 4 document
15262  using 
15263 \family typewriter
15264 tex2lyx
15265 \family default
15266 , or to use the 
15267 \family sans
15268 Revtex
15269 \begin_inset space ~
15270 \end_inset
15271
15272 4
15273 \family default
15274  template, found in the templates directory.
15275 \end_layout
15276
15277 \begin_layout Subsection
15278 Preamble Matter
15279 \end_layout
15280
15281 \begin_layout Standard
15282 Optional arguments to 
15283 \family typewriter
15284
15285 \backslash
15286 documentclass
15287 \family default
15288 , like 
15289 \begin_inset Quotes eld
15290 \end_inset
15291
15292 preprint
15293 \begin_inset Quotes erd
15294 \end_inset
15295
15296  and 
15297 \begin_inset Quotes eld
15298 \end_inset
15299
15300 aps
15301 \begin_inset Quotes erd
15302 \end_inset
15303
15304 , go in the 
15305 \family sans
15306 E
15307 \bar under
15308 x
15309 \bar default
15310 tra
15311 \begin_inset space ~
15312 \end_inset
15313
15314 Options
15315 \family default
15316  field in the 
15317 \family sans
15318 Document
15319 \begin_inset space ~
15320 \end_inset
15321
15322 Layout
15323 \family default
15324  dialog, as usual.
15325  Remember that in RevTeX, at least one optional argument is required! 
15326 \end_layout
15327
15328 \begin_layout Standard
15329 Other preamble matter, like 
15330 \family typewriter
15331
15332 \backslash
15333 draft
15334 \family default
15335  etc.
15336 \begin_inset space ~
15337 \end_inset
15338
15339 goes in the 
15340 \family sans
15341 LaTeX
15342 \begin_inset space ~
15343 \end_inset
15344
15345 Preamble
15346 \family default
15347  dialog, also as usual.
15348 \end_layout
15349
15350 \begin_layout Subsection
15351 Layouts
15352 \end_layout
15353
15354 \begin_layout Standard
15355 The layouts basically correspond to the commands in RevTeX4.0.
15356  For example, the Email layout corresponds to 
15357 \family typewriter
15358
15359 \backslash
15360 email{}
15361 \family default
15362 .
15363  Note that (at least as of RevTeX 4.0 Beta), the 
15364 \family sans
15365 Address
15366 \family default
15367  and 
15368 \family sans
15369 Affiliation
15370 \family default
15371  layouts are exactly equivalent, so you shouldn't need to use both.
15372 \begin_inset Foot
15373 status collapsed
15374
15375 \begin_layout Plain Layout
15376 In case you're curious, both were included so that 
15377 \family typewriter
15378 tex2lyx
15379 \family default
15380  would be able to translate both 
15381 \family typewriter
15382
15383 \backslash
15384 address
15385 \family default
15386  and 
15387 \family typewriter
15388
15389 \backslash
15390 affiliation
15391 \family default
15392 .
15393 \end_layout
15394
15395 \end_inset
15396
15397
15398 \end_layout
15399
15400 \begin_layout Subsection
15401 Important Notes
15402 \end_layout
15403
15404 \begin_layout Standard
15405 There are a couple of important unique aspects of RevTeX 4 which might cause
15406  bugs that will be even more confusing in LyX.
15407 \end_layout
15408
15409 \begin_layout Standard
15410 In RevTeX, the 
15411 \family typewriter
15412
15413 \backslash
15414 thanks
15415 \family default
15416  command goes 
15417 \emph on
15418 outside
15419 \emph default
15420  the 
15421 \family typewriter
15422
15423 \backslash
15424 author
15425 \family default
15426  command.
15427  The LyX equivalent is that there is a separate Thanks layout.
15428  Do 
15429 \emph on
15430 not
15431 \emph default
15432  write footnotes in the 
15433 \family sans
15434 Author
15435 \family default
15436  layout, or weird things may happen.
15437  See the RevTeX 4 documentation for more details.
15438 \end_layout
15439
15440 \begin_layout Standard
15441 Also, the 
15442 \family sans
15443 Author
15444 \begin_inset space ~
15445 \end_inset
15446
15447 Email
15448 \family default
15449
15450 \family sans
15451 Author
15452 \begin_inset space ~
15453 \end_inset
15454
15455 URL
15456 \family default
15457 , and 
15458 \family sans
15459 Thanks
15460 \family default
15461  layouts must be placed 
15462 \emph on
15463 in between
15464 \emph default
15465  the 
15466 \family sans
15467 Author
15468 \family default
15469  layout and the corresponding 
15470 \family sans
15471 Address
15472 \family default
15473  (or equivalent 
15474 \family sans
15475 Affiliation
15476 \family default
15477 ) layout.
15478  If you put the 
15479 \family sans
15480 Thanks
15481 \family default
15482  after the 
15483 \family sans
15484 Address
15485 \family default
15486 , the LaTeX won't compile.
15487 \end_layout
15488
15489 \begin_layout Subsection
15490 Drawbacks
15491 \end_layout
15492
15493 \begin_layout Standard
15494 The main problem with this layout is that you can't use the optional arguments
15495  to layouts like Email and Title.
15496  (The problem is not unique to this layout; you can't use optional arguments
15497  to the Section layouts either.) This means that after you export that file
15498  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15499  need to edit the LaTeX file with a text editor to add the optional arguments
15500  to set, e.
15501 \begin_inset space \thinspace{}
15502 \end_inset
15503
15504 g.
15505 \begin_inset space \space{}
15506 \end_inset
15507
15508 the running title for the page headers.
15509  Lacking these layouts makes the 
15510 \family typewriter
15511
15512 \backslash
15513 altaffiliation
15514 \family default
15515  (and the equivalent 
15516 \family typewriter
15517
15518 \backslash
15519 altaddress
15520 \family default
15521 ) useless, so the corresponding layouts don't exist, and will have to be
15522  added by hand.
15523 \begin_inset Foot
15524 status collapsed
15525
15526 \begin_layout Plain Layout
15527
15528 \emph on
15529 Note from JMarc:
15530 \emph default
15531  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15532  has not been updated yet to take advantage of it.
15533 \end_layout
15534
15535 \end_inset
15536
15537  
15538 \end_layout
15539
15540 \begin_layout Section
15541 Springer Journals (
15542 \family sans
15543 svjour
15544 \family default
15545 )
15546 \end_layout
15547
15548 \begin_layout Standard
15549 by 
15550 \noun on
15551 Martin Vermeer
15552 \end_layout
15553
15554 \begin_layout Subsection
15555 Description
15556 \end_layout
15557
15558 \begin_layout Standard
15559 These are the layout files for some of the journal formats used by Springer
15560  Verlag and listed on 
15561 \begin_inset Flex URL
15562 status collapsed
15563
15564 \begin_layout Plain Layout
15565
15566 http://www.springer.de/author/tex/help-journals.html
15567 \end_layout
15568
15569 \end_inset
15570
15571 , where you should also go to fetch the class files (yes, these are LaTeX2e
15572  now!).
15573  It is a modular system: the things common to all journals are implemented
15574  in 
15575 \family typewriter
15576 svjour.inc
15577 \family default
15578 , which journal-specific layout files (such as, e.
15579 \begin_inset space \thinspace{}
15580 \end_inset
15581
15582 g.
15583 \begin_inset space \space{}
15584 \end_inset
15585
15586
15587 \family typewriter
15588 svjog.layout
15589 \family default
15590  for Journal of Geodesy) can include.
15591 \end_layout
15592
15593 \begin_layout Standard
15594 This means that implementing support for any other Springer journal on this
15595  list is as simple as writing your own 
15596 \family typewriter
15597 sv
15598 \family default
15599 <myjournal>
15600 \family typewriter
15601 .layout
15602 \family default
15603  file following the outline given in 
15604 \family typewriter
15605 svjog.layout
15606 \family default
15607 .
15608  
15609 \end_layout
15610
15611 \begin_layout Standard
15612 It is reasonably well tested only for the Journal of Geodesy.
15613  
15614 \family typewriter
15615 svjour
15616 \family default
15617  and 
15618 \family typewriter
15619 svjog
15620 \family default
15621  come with the standard LyX distribution.
15622  Install the relevant class file (downloaded from Springer) in a proper
15623  directory, reconfigure LaTeX (in the teTeX case by running 
15624 \family typewriter
15625 texhash
15626 \family default
15627 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15628  and it should work.
15629 \end_layout
15630
15631 \begin_layout Subsection
15632 New styles
15633 \end_layout
15634
15635 \begin_layout Standard
15636 A large number of theorem-like styles — 
15637 \family sans
15638 Claim, Conjecture,
15639 \family default
15640  
15641 \family sans
15642 \SpecialChar \ldots{}
15643 Theorem
15644 \family default
15645 .
15646 \end_layout
15647
15648 \begin_layout Standard
15649
15650 \family sans
15651 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15652  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15653 \family default
15654 .
15655  See the Springer class file documentation for details.
15656 \end_layout
15657
15658 \begin_layout Subsection
15659 Supported journals
15660 \end_layout
15661
15662 \begin_layout Itemize
15663
15664 \emph on
15665 Journal of Geodesy
15666 \emph default
15667
15668 \family typewriter
15669 svjog.layout
15670 \family default
15671  — Martin Vermeer
15672 \end_layout
15673
15674 \begin_layout Itemize
15675
15676 \emph on
15677 Probability Theory and Related Fields
15678 \emph default
15679
15680 \family typewriter
15681 svprobth.layout
15682 \family default
15683  — Jean-Marc Lasgouttes
15684 \end_layout
15685
15686 \begin_layout Standard
15687 Add your own, it isn't so hard!
15688 \end_layout
15689
15690 \begin_layout Subsection
15691 Credits
15692 \end_layout
15693
15694 \begin_layout Standard
15695 These files are partly based on the older 
15696 \family typewriter
15697 ejour2.layout
15698 \family default
15699 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15700  file from Springer.
15701  All this, and the 
15702 \family typewriter
15703 ejour2
15704 \family default
15705  layout, are now defunct.
15706  Jean-Marc Lasgouttes helped out big in making me find my way around the
15707  LyX layout file mechanism.
15708 \end_layout
15709
15710 \begin_layout Subsection
15711 Bugs
15712 \end_layout
15713
15714 \begin_layout Standard
15715 Probably.
15716  But probably less than in the old hacked-LaTeX 
15717 \family typewriter
15718 ejour2
15719 \family default
15720 .
15721 \end_layout
15722
15723 \begin_layout Standard
15724 Limitations e.
15725 \begin_inset space \thinspace{}
15726 \end_inset
15727
15728 g.: does not display the number for theorem-like layouts, just #.
15729 \end_layout
15730
15731 \begin_layout Section
15732 Slides [aka 
15733 \noun on
15734 SliTeX
15735 \noun default
15736 ]
15737 \begin_inset CommandInset label
15738 LatexCommand label
15739 name "sec:slitex"
15740
15741 \end_inset
15742
15743
15744 \end_layout
15745
15746 \begin_layout Standard
15747 by 
15748 \noun on
15749 John Weiss
15750 \noun default
15751  
15752 \end_layout
15753
15754 \begin_layout Subsection
15755 Introduction
15756 \end_layout
15757
15758 \begin_layout Standard
15759 This section describes how to use LyX to make slides for overhead projectors.
15760  There are two document classes that can do this: the default slides class
15761  and the 
15762 \family sans
15763 FoilTeX
15764 \family default
15765  slides class.
15766  This section documents the former.
15767 \end_layout
15768
15769 \begin_layout Standard
15770 I'm going to say this again, nice and clear, so that there's no misunderstanding
15771 :
15772 \end_layout
15773
15774 \begin_layout Standard
15775 \begin_inset VSpace bigskip
15776 \end_inset
15777
15778
15779 \end_layout
15780
15781 \begin_layout Standard
15782 \align center
15783
15784 \size large
15785 This section documents the class 
15786 \begin_inset Quotes eld
15787 \end_inset
15788
15789
15790 \family sans
15791 slides (default)
15792 \family default
15793
15794 \begin_inset Quotes erd
15795 \end_inset
15796
15797  
15798 \emph on
15799 only.
15800 \end_layout
15801
15802 \begin_layout Standard
15803 \begin_inset VSpace bigskip
15804 \end_inset
15805
15806
15807 \end_layout
15808
15809 \begin_layout Standard
15810 If you're looking for the documentation for 
15811 \begin_inset Quotes eld
15812 \end_inset
15813
15814
15815 \family sans
15816 slides (FoilTeX)
15817 \family default
15818
15819 \begin_inset Quotes erd
15820 \end_inset
15821
15822 , check out section
15823 \begin_inset space ~
15824 \end_inset
15825
15826
15827 \begin_inset CommandInset ref
15828 LatexCommand ref
15829 reference "sec:foiltex"
15830
15831 \end_inset
15832
15833 .
15834  The 
15835 \family sans
15836 foils
15837 \family default
15838  class [
15839 \begin_inset Quotes eld
15840 \end_inset
15841
15842
15843 \family sans
15844 slides (FoilTeX)
15845 \family default
15846
15847 \begin_inset Quotes erd
15848 \end_inset
15849
15850 ] is actually somewhat better than the default 
15851 \family sans
15852 slides
15853 \family default
15854  class,
15855 \begin_inset Foot
15856 status collapsed
15857
15858 \begin_layout Plain Layout
15859 \SpecialChar \ldots{}
15860 or so I've been told repeatedly by its advocates.
15861  Having never used it, I have no idea if this claim is true or not.
15862 \end_layout
15863
15864 \end_inset
15865
15866  which this section documents.
15867 \end_layout
15868
15869 \begin_layout Standard
15870 This class is the LaTeX2e improvement of the old 
15871 \noun on
15872 SliTeX
15873 \noun default
15874  package.
15875  Every LaTeX2e distribution includes this class [which I'll just refer to
15876  as 
15877 \begin_inset Quotes eld
15878 \end_inset
15879
15880
15881 \family sans
15882 slides
15883 \family default
15884
15885 \begin_inset Quotes erd
15886 \end_inset
15887
15888  from now on], so you're bound to have it.
15889  As I noted earlier, there are other classes, such as 
15890 \family sans
15891 foils
15892 \family default
15893 , which also produce slides for overhead projectors and do a better job
15894  at it.
15895  However, there are some things which 
15896 \family sans
15897 slides
15898 \family default
15899  can do which the others can't, such as generate overlays.
15900  Read on to learn more!
15901 \end_layout
15902
15903 \begin_layout Subsection
15904 Getting Started
15905 \begin_inset CommandInset label
15906 LatexCommand label
15907 name "sec:slidesetup"
15908
15909 \end_inset
15910
15911
15912 \end_layout
15913
15914 \begin_layout Standard
15915 Obviously, to use this document class, you need to select 
15916 \begin_inset Quotes eld
15917 \end_inset
15918
15919
15920 \family sans
15921 slides (default)
15922 \family default
15923
15924 \begin_inset Quotes erd
15925 \end_inset
15926
15927  from the class list in the 
15928 \family sans
15929 Document\SpecialChar \menuseparator
15930 Settings
15931 \family default
15932  dialog.
15933  There are some other special things you should know about this class:
15934 \end_layout
15935
15936 \begin_layout Itemize
15937 Don't bother changing the options 
15938 \family sans
15939 Sides and Columns
15940 \family default
15941 .
15942  They're not supported by the 
15943 \family sans
15944 slides
15945 \family default
15946  class, anyways.
15947 \end_layout
15948
15949 \begin_layout Itemize
15950 The option 
15951 \family sans
15952 Page
15953 \begin_inset space ~
15954 \end_inset
15955
15956 style
15957 \family default
15958  behaves a bit differently for this class.
15959  The possible choices and what they do are as follows:
15960 \end_layout
15961
15962 \begin_deeper
15963 \begin_layout Description
15964
15965 \family sans
15966 plain
15967 \family default
15968  The final output contains page numbers in the lower right corner.
15969 \end_layout
15970
15971 \begin_layout Description
15972
15973 \family sans
15974 headings
15975 \family default
15976  Like 
15977 \family sans
15978 plain
15979 \family default
15980 , but also prints out any time markers you've put in.
15981  This is the default.
15982 \end_layout
15983
15984 \begin_layout Description
15985
15986 \family sans
15987 empty
15988 \family default
15989  The final output contains no page numbers, time markers, or alignment markers.
15990 \end_layout
15991
15992 \end_deeper
15993 \begin_layout Itemize
15994 The 
15995 \family sans
15996 slides
15997 \family default
15998  class has an extra option: 
15999 \family typewriter
16000 clock
16001 \family default
16002 .
16003  To use it, put 
16004 \begin_inset Quotes eld
16005 \end_inset
16006
16007
16008 \family typewriter
16009 clock
16010 \family default
16011
16012 \begin_inset Quotes erd
16013 \end_inset
16014
16015  in the extra class options.
16016 \end_layout
16017
16018 \begin_deeper
16019 \begin_layout Standard
16020 Using this options allows you to add time markers to 
16021 \family sans
16022 Note
16023 \family default
16024 s.
16025  See section
16026 \begin_inset space ~
16027 \end_inset
16028
16029
16030 \begin_inset CommandInset ref
16031 LatexCommand ref
16032 reference "sec:slideNote"
16033
16034 \end_inset
16035
16036  for more details.
16037 \end_layout
16038
16039 \end_deeper
16040 \begin_layout Standard
16041 You can also use the template file 
16042 \begin_inset Quotes eld
16043 \end_inset
16044
16045
16046 \family typewriter
16047 slides.lyx
16048 \family default
16049
16050 \begin_inset Quotes erd
16051 \end_inset
16052
16053  to automatically set up a document to use the 
16054 \family sans
16055 slides
16056 \family default
16057  class [using 
16058 \family sans
16059 File\SpecialChar \menuseparator
16060 New
16061 \begin_inset space ~
16062 \end_inset
16063
16064 from
16065 \begin_inset space ~
16066 \end_inset
16067
16068 Template
16069 \family default
16070  to open your new document].
16071  The template file also contains some examples of the special paragraph
16072  environments used by this class.
16073  I'll describe those next.
16074 \end_layout
16075
16076 \begin_layout Subsection
16077 Paragraph Environments
16078 \end_layout
16079
16080 \begin_layout Subsubsection
16081 Supported Environments
16082 \end_layout
16083
16084 \begin_layout Standard
16085 The first thing you'll notice when you start up a new 
16086 \family sans
16087 slides
16088 \family default
16089  document is the font size and type: it's the equivalent of the size 
16090 \begin_inset Quotes eld
16091 \end_inset
16092
16093
16094 \family sans
16095 Largest
16096 \family default
16097
16098 \begin_inset Quotes erd
16099 \end_inset
16100
16101  in the 
16102 \family sans
16103 Sans
16104 \begin_inset space ~
16105 \end_inset
16106
16107 Serif
16108 \family default
16109  font.
16110  This is also what's used in the output.
16111  Think of this as a 
16112 \begin_inset Quotes eld
16113 \end_inset
16114
16115 visual cue
16116 \begin_inset Quotes erd
16117 \end_inset
16118
16119  to remind you that this is a slide.
16120  Your final slides will use a larger font; ergo, you'll have less space.
16121  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16122 \end_layout
16123
16124 \begin_layout Standard
16125 The next thing that becomes obvious is the changes to the paragraph environment
16126  pull-down box [at the far-left end of the toolbar].
16127  Most of the paragraph environments you're used to seeing are missing.
16128  There are also five new ones.
16129  That's because the 
16130 \family sans
16131 slides
16132 \family default
16133  class itself only supports certain paragraph environments:
16134 \end_layout
16135
16136 \begin_layout Itemize
16137
16138 \family sans
16139 Standard
16140 \end_layout
16141
16142 \begin_layout Itemize
16143
16144 \family sans
16145 Itemize
16146 \end_layout
16147
16148 \begin_layout Itemize
16149
16150 \family sans
16151 Enumerate
16152 \end_layout
16153
16154 \begin_layout Itemize
16155
16156 \family sans
16157 Description
16158 \end_layout
16159
16160 \begin_layout Itemize
16161
16162 \family sans
16163 List
16164 \end_layout
16165
16166 \begin_layout Itemize
16167
16168 \family sans
16169 Quotation
16170 \end_layout
16171
16172 \begin_layout Itemize
16173
16174 \family sans
16175 Quote
16176 \end_layout
16177
16178 \begin_layout Itemize
16179
16180 \family sans
16181 Verse
16182 \end_layout
16183
16184 \begin_layout Itemize
16185
16186 \family sans
16187 Caption
16188 \end_layout
16189
16190 \begin_layout Itemize
16191
16192 \family sans
16193 LyX-Code
16194 \end_layout
16195
16196 \begin_layout Itemize
16197
16198 \family sans
16199 Comment
16200 \end_layout
16201
16202 \begin_layout Standard
16203 All of the other standard environments, including the section-heading environmen
16204 ts, aren't used in the 
16205 \family sans
16206 slides
16207 \family default
16208  class.
16209 \end_layout
16210
16211 \begin_layout Standard
16212 On the other hand, you'll notice the following new environments:
16213 \end_layout
16214
16215 \begin_layout Itemize
16216
16217 \family sans
16218 Slide
16219 \end_layout
16220
16221 \begin_layout Itemize
16222
16223 \family sans
16224 Overlay
16225 \end_layout
16226
16227 \begin_layout Itemize
16228
16229 \family sans
16230 Note
16231 \end_layout
16232
16233 \begin_layout Itemize
16234
16235 \family sans
16236 InvisibleText
16237 \end_layout
16238
16239 \begin_layout Itemize
16240
16241 \family sans
16242 VisibleText
16243 \end_layout
16244
16245 \begin_layout Standard
16246 These five are kind of quirky, due to a 
16247 \begin_inset Quotes eld
16248 \end_inset
16249
16250 feature
16251 \begin_inset Quotes erd
16252 \end_inset
16253
16254  in LyX.
16255  You see, LyX doesn't permit you to nest any other paragraph environment
16256  into an empty environment.
16257  Now, that's fine and dandy, but it means that you wouldn't be able to start
16258  a slide with anything except plain text.
16259  To deal with this, I've performed a little 
16260 \begin_inset Quotes eld
16261 \end_inset
16262
16263 LaTeX magic.
16264 \begin_inset Quotes erd
16265 \end_inset
16266
16267  
16268 \end_layout
16269
16270 \begin_layout Subsubsection
16271 Quirks of the New Environments
16272 \begin_inset CommandInset label
16273 LatexCommand label
16274 name "sec:slideQuirk"
16275
16276 \end_inset
16277
16278
16279 \end_layout
16280
16281 \begin_layout Standard
16282 All five of the new paragraph environments are somewhat quirky due to inherent
16283  limitiations in the current version of LyX.
16284  As I just mentioned, LyX forbids environments that begin with another environme
16285 nt.
16286  To get around this, the 
16287 \family sans
16288 Slide
16289 \family default
16290  environment isn't a paragraph environment as described in the 
16291 \emph on
16292 User's Guide
16293 \emph default
16294 .
16295  
16296 \end_layout
16297
16298 \begin_layout Standard
16299 You should consider 
16300 \family sans
16301 Slide
16302 \family default
16303
16304 \family sans
16305 Overlay
16306 \family default
16307 , and 
16308 \family sans
16309 Note
16310 \family default
16311  to be 
16312 \begin_inset Quotes eld
16313 \end_inset
16314
16315 pseudo-environments.
16316 \begin_inset Quotes erd
16317 \end_inset
16318
16319  They look like a section heading or a 
16320 \begin_inset Quotes eld
16321 \end_inset
16322
16323
16324 \family sans
16325 Caption
16326 \family default
16327 ,
16328 \begin_inset Quotes erd
16329 \end_inset
16330
16331  but really begin a [and, if necessary, end the previous] paragraph environment.
16332  Likewise, treat 
16333 \family sans
16334 InvisibleText
16335 \family default
16336  and 
16337 \family sans
16338 VisibleText
16339 \family default
16340  as 
16341 \begin_inset Quotes eld
16342 \end_inset
16343
16344 pseudo-commands.
16345 \begin_inset Quotes erd
16346 \end_inset
16347
16348  These two perform some action.
16349 \end_layout
16350
16351 \begin_layout Standard
16352 A common feature of all five environments, 
16353 \family sans
16354 Slide
16355 \family default
16356
16357 \family sans
16358 Overlay
16359 \family default
16360
16361 \family sans
16362 Note
16363 \family default
16364
16365 \family sans
16366 InvisibleText
16367 \family default
16368  and 
16369 \family sans
16370 VisibleText
16371 \family default
16372 , is a rather long-ish label.
16373  The text following this label — ordinarily the contents of the paragraph
16374  environment — is utterly irrelevant for 
16375 \family sans
16376 Slide
16377 \family default
16378
16379 \family sans
16380 Overlay
16381 \family default
16382
16383 \family sans
16384 Note
16385 \family default
16386
16387 \family sans
16388 InvisibleText
16389 \family default
16390  and 
16391 \family sans
16392 VisibleText
16393 \family default
16394 .
16395  LyX completely ignores it.
16396  In fact, you can leave these five environments completely empty.
16397  
16398 \end_layout
16399
16400 \begin_layout Standard
16401 While you don't 
16402 \emph on
16403 have
16404 \emph default
16405  to put any text after the rather long-ish label, you might want to.
16406  This could be a short description of the contents of the 
16407 \family sans
16408 Slide
16409 \family default
16410 , for example.
16411  In that case, enter your descriptive comment and hit 
16412 \family sans
16413 Return
16414 \family default
16415  as you normally would.
16416 \end_layout
16417
16418 \begin_layout Standard
16419 If, on the other hand, you don't want to enter any descriptive text, you'll
16420  hit another LyX quirk.
16421  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16422  environment until you put something in the old one.
16423  So, do this:
16424 \end_layout
16425
16426 \begin_layout Itemize
16427 Start entering the text that will 
16428 \emph on
16429 follow
16430 \emph default
16431  the new 
16432 \family sans
16433 Slide
16434 \family default
16435
16436 \family sans
16437 Overlay
16438 \family default
16439
16440 \family sans
16441 Note
16442 \family default
16443
16444 \family sans
16445 InvisibleText
16446 \family default
16447  or 
16448 \family sans
16449 VisibleText
16450 \family default
16451 .
16452  
16453 \end_layout
16454
16455 \begin_layout Itemize
16456 Now move to the beginning of that paragraph.
16457  
16458 \end_layout
16459
16460 \begin_layout Itemize
16461 Next, hit 
16462 \family sans
16463 Return
16464 \family default
16465 .
16466  
16467 \end_layout
16468
16469 \begin_layout Itemize
16470 Finally, change this new, empty paragraph to a 
16471 \family sans
16472 Slide
16473 \family default
16474
16475 \family sans
16476 Overlay
16477 \family default
16478
16479 \family sans
16480 Note
16481 \family default
16482
16483 \family sans
16484 InvisibleText
16485 \family default
16486  or 
16487 \family sans
16488 VisibleText
16489 \family default
16490 .
16491  
16492 \end_layout
16493
16494 \begin_layout Standard
16495 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16496
16497 \end_layout
16498
16499 \begin_layout Subsection
16500 Making a Presentation with 
16501 \family sans
16502 Slide
16503 \family default
16504
16505 \family sans
16506 Overlay
16507 \family default
16508  and 
16509 \family sans
16510 Note
16511 \end_layout
16512
16513 \begin_layout Subsubsection
16514 Using the 
16515 \family sans
16516 Slide
16517 \family default
16518  Environment
16519 \end_layout
16520
16521 \begin_layout Standard
16522 If you're expecting this section to teach you how to actually make a presentatio
16523 n, you'll be sorely disappointed.
16524  Naturally, I'll describe all of the ways the 
16525 \family sans
16526 slides
16527 \family default
16528  class can assist you in preparing the materials for a presentation.
16529  Filling in the contents, however, is up to you.
16530  [Then again, that 
16531 \emph on
16532 is
16533 \emph default
16534  the LyX philosophy.]
16535 \end_layout
16536
16537 \begin_layout Standard
16538 Choosing the 
16539 \family sans
16540 Slide
16541 \family default
16542  environment [in the manner described in section
16543 \begin_inset space ~
16544 \end_inset
16545
16546
16547 \begin_inset CommandInset ref
16548 LatexCommand ref
16549 reference "sec:slideQuirk"
16550
16551 \end_inset
16552
16553 ] tells LyX to begin a new slide [duh].
16554  The label for this environment/
16555 \begin_inset Quotes erd
16556 \end_inset
16557
16558 pseudo-command
16559 \begin_inset Quotes erd
16560 \end_inset
16561
16562  is an 
16563 \begin_inset Quotes eld
16564 \end_inset
16565
16566 ASCII line,
16567 \begin_inset Quotes erd
16568 \end_inset
16569
16570  in cool blue, followed by the label, 
16571 \begin_inset Quotes eld
16572 \end_inset
16573
16574 NewSlide:
16575 \begin_inset Quotes erd
16576 \end_inset
16577
16578 .
16579  Any text or paragraph environments that follow this one go on the new slide.
16580  It's that simple.
16581 \end_layout
16582
16583 \begin_layout Standard
16584 Slides are probably the only time you'll need to forcibly end pages in LyX
16585  (this can be specified in the 
16586 \family sans
16587 Paragraph Layout
16588 \family default
16589  dialog).
16590  In fact, you'll want to, once you finish entering the contents of one slide.
16591  If you've entered more text than can physically fit on a slide, the extra
16592  overflows onto a new slide.
16593  I don't recommend doing this, however, since the overflow slide won't have
16594  any page number on it.
16595  Furthermore, it may interfere with any 
16596 \family sans
16597 Overlay
16598 \family default
16599  you've made to accompany the oversized 
16600 \family sans
16601 Slide
16602 \family default
16603 .
16604 \end_layout
16605
16606 \begin_layout Standard
16607 The 
16608 \family sans
16609 Overlay
16610 \family default
16611  and 
16612 \family sans
16613 Note
16614 \family default
16615  environments work the same way as the 
16616 \family sans
16617 Slide
16618 \family default
16619  environment.
16620  They both create an 
16621 \begin_inset Quotes eld
16622 \end_inset
16623
16624 ASCII line
16625 \begin_inset Quotes erd
16626 \end_inset
16627
16628  followed by a label [
16629 \begin_inset Quotes eld
16630 \end_inset
16631
16632 NewOverlay:
16633 \begin_inset Quotes erd
16634 \end_inset
16635
16636  and 
16637 \begin_inset Quotes eld
16638 \end_inset
16639
16640 NewNote:
16641 \begin_inset Quotes erd
16642 \end_inset
16643
16644 , respectively].
16645  The color is a stunning magenta instead of blue, and the 
16646 \begin_inset Quotes eld
16647 \end_inset
16648
16649 ASCII line
16650 \begin_inset Quotes erd
16651 \end_inset
16652
16653  will look different, in style and in length.
16654  The label fonts of all three also differ from one another.
16655 \end_layout
16656
16657 \begin_layout Standard
16658 As with a 
16659 \family sans
16660 Slide
16661 \family default
16662 , if the contents of a 
16663 \family sans
16664 Note
16665 \family default
16666  or 
16667 \family sans
16668 Overlay
16669 \family default
16670  exceed the physical size of a slide or sheet of paper, the extra will overflow
16671  onto a new sheet.
16672  Again, you should avoid this.
16673  It defeats the whole purpose of 
16674 \family sans
16675 Note
16676 \family default
16677 s and 
16678 \family sans
16679 Overlay
16680 \family default
16681 s.
16682 \end_layout
16683
16684 \begin_layout Subsubsection
16685 Using 
16686 \family sans
16687 Overlay
16688 \family default
16689  with 
16690 \family sans
16691 Slide
16692 \end_layout
16693
16694 \begin_layout Standard
16695 The idea behind an 
16696 \family sans
16697 Overlay
16698 \family default
16699  is a slide that sits atop another slide.
16700  Perhaps you wish to discuss a figure on the main 
16701 \family sans
16702 Slide
16703 \family default
16704  before displaying the text associated with it.
16705  One way to accomplish this is tape a flap of dark paper over the part of
16706  the 
16707 \family sans
16708 Slide
16709 \family default
16710  you want to display later.
16711  This method fails, however, if you wish to overlap one graph with another,
16712  for example.
16713  You would then have to fumble while speaking to align the two separate,
16714  overlapping 
16715 \family sans
16716 Slide
16717 \family default
16718 s to align the two graphs.
16719  The use of an 
16720 \family sans
16721 Overlay
16722 \family default
16723  environment in both cases makes life much easier.
16724 \end_layout
16725
16726 \begin_layout Standard
16727 Each 
16728 \family sans
16729 Overlay
16730 \family default
16731  receives the page number of its 
16732 \begin_inset Quotes eld
16733 \end_inset
16734
16735 parent
16736 \begin_inset Quotes erd
16737 \end_inset
16738
16739  
16740 \family sans
16741 Slide
16742 \family default
16743 , appended by 
16744 \begin_inset Quotes eld
16745 \end_inset
16746
16747
16748 \family typewriter
16749 -a
16750 \family default
16751
16752 \begin_inset Quotes erd
16753 \end_inset
16754
16755 .
16756 \begin_inset Foot
16757 status collapsed
16758
16759 \begin_layout Plain Layout
16760 Presumably, mutliple 
16761 \family sans
16762 Overlay
16763 \family default
16764 s would have 
16765 \begin_inset Quotes eld
16766 \end_inset
16767
16768
16769 \family typewriter
16770 -a
16771 \family default
16772
16773 \begin_inset Quotes erd
16774 \end_inset
16775
16776
16777 \begin_inset Quotes eld
16778 \end_inset
16779
16780
16781 \family typewriter
16782 -b
16783 \family default
16784
16785 \begin_inset Quotes erd
16786 \end_inset
16787
16788
16789 \begin_inset Quotes eld
16790 \end_inset
16791
16792
16793 \family typewriter
16794 -c
16795 \family default
16796
16797 \begin_inset Quotes erd
16798 \end_inset
16799
16800 , etc.
16801 \begin_inset space ~
16802 \end_inset
16803
16804 appended to the page number of the parent 
16805 \family sans
16806 Slide
16807 \family default
16808 .
16809  
16810 \end_layout
16811
16812 \end_inset
16813
16814  Clearly, you want the contents of both the 
16815 \family sans
16816 Slide
16817 \family default
16818  and the 
16819 \family sans
16820 Overlay
16821 \family default
16822  to each fit on a single physical slide! You should probably consider an
16823  
16824 \family sans
16825 Overlay
16826 \family default
16827  as 
16828 \begin_inset Quotes eld
16829 \end_inset
16830
16831 part of
16832 \begin_inset Quotes erd
16833 \end_inset
16834
16835  a 
16836 \family sans
16837 Slide
16838 \family default
16839 .
16840  Indeed, the LyX 
16841 \family sans
16842 slides
16843 \family default
16844  class provides a visual cue for this: the label at the start of an 
16845 \family sans
16846 Overlay
16847 \family default
16848  is shorter than that at the start of a 
16849 \family sans
16850 Slide
16851 \family default
16852 .
16853  Lastly, when you generate printable output, you'll find alignment markers
16854  in all four corners of both the 
16855 \family sans
16856 Overlay
16857 \family default
16858  page and its parent 
16859 \family sans
16860 Slide
16861 \family default
16862 .
16863  These will assist you in lining up the two physical slides.
16864 \end_layout
16865
16866 \begin_layout Standard
16867 The major problem in overlaying two slides is aligning the contents of the
16868  two transparencies.
16869  How much space should you leave for that graph on the second slide? Worse
16870  still, what if you want a graph and a sentence on second slide, but there
16871  is text on the main transparency that goes in between them? You could try
16872  and insert vertical space of the right size.
16873  The better way is to use 
16874 \family sans
16875 InvisibleText
16876 \family default
16877  and 
16878 \family sans
16879 VisibleText
16880 \family default
16881 .
16882 \end_layout
16883
16884 \begin_layout Standard
16885 As their names imply, 
16886 \family sans
16887 InvisibleText
16888 \family default
16889  and 
16890 \family sans
16891 VisibleText
16892 \family default
16893  are two command-like paragraph environments that make all subsequent text
16894  invisible and visible, respectively.
16895  Note from section
16896 \begin_inset space ~
16897 \end_inset
16898
16899
16900 \begin_inset CommandInset ref
16901 LatexCommand ref
16902 reference "sec:slideQuirk"
16903
16904 \end_inset
16905
16906  that you don't place anything 
16907 \emph on
16908 into
16909 \emph default
16910  these two environments, however.
16911  When you create an 
16912 \family sans
16913 InvisibleText
16914 \family default
16915 , it inserts a centered, sky-blue label into the page reading 
16916 \begin_inset Quotes eld
16917 \end_inset
16918
16919 <Invisible Text Follows>
16920 \begin_inset Quotes erd
16921 \end_inset
16922
16923 .
16924  For paragraphs following this label, the parts of the 
16925 \family sans
16926 Slide
16927 \family default
16928  [or 
16929 \family sans
16930 Overlay
16931 \family default
16932 ; it doesn't matter which] where they would be contain instead blank space.
16933  
16934 \end_layout
16935
16936 \begin_layout Standard
16937 For 
16938 \family sans
16939 VisibleText
16940 \family default
16941 , the corresponding centered label is 
16942 \begin_inset Quotes eld
16943 \end_inset
16944
16945 <Visible Text Follows>
16946 \begin_inset Quotes erd
16947 \end_inset
16948
16949  in blazing green.
16950  Paragraphs following this label behave normally.
16951  Note that the beginning of a new 
16952 \family sans
16953 Slide
16954 \family default
16955
16956 \family sans
16957 Overlay
16958 \family default
16959 , or 
16960 \family sans
16961 Note
16962 \family default
16963  automatically shuts off an 
16964 \family sans
16965 InvisibleText
16966 \family default
16967 .
16968  It's therefore not necessary to use 
16969 \family sans
16970 VisibleText
16971 \family default
16972  at the end of a 
16973 \family sans
16974 Slide
16975 \family default
16976 .
16977 \end_layout
16978
16979 \begin_layout Standard
16980 By now, it should be obvious how to create overlay transparencies using
16981  the proper combination of 
16982 \family sans
16983 InvisibleText
16984 \family default
16985  and 
16986 \family sans
16987 VisibleText
16988 \family default
16989  on a 
16990 \family sans
16991 Slide
16992 \family default
16993  and 
16994 \family sans
16995 Overlay
16996 \family default
16997 :
16998 \end_layout
16999
17000 \begin_layout Enumerate
17001 Create a 
17002 \family sans
17003 Slide
17004 \family default
17005 , including everything that will appear on it, whether on the main slide
17006  or on the 
17007 \family sans
17008 Overlay
17009 \family default
17010 .
17011 \end_layout
17012
17013 \begin_layout Enumerate
17014 Before each figure or paragraph that will appear only on the 
17015 \family sans
17016 Overlay
17017 \family default
17018 , insert an 
17019 \family sans
17020 InvisibleText
17021 \family default
17022  environment.
17023  If necessary, insert a 
17024 \family sans
17025 VisibleText
17026 \family default
17027  environment after the 
17028 \family sans
17029 Overlay
17030 \family default
17031 -only text.
17032 \end_layout
17033
17034 \begin_layout Enumerate
17035 Start an 
17036 \family sans
17037 Overlay
17038 \family default
17039  immediately following the 
17040 \family sans
17041 Slide
17042 \family default
17043 .
17044 \end_layout
17045
17046 \begin_layout Enumerate
17047 Copy the contents of this 
17048 \family sans
17049 Slide
17050 \family default
17051  into the 
17052 \family sans
17053 Overlay
17054 \family default
17055 .
17056 \end_layout
17057
17058 \begin_layout Enumerate
17059 Within the 
17060 \family sans
17061 Overlay
17062 \family default
17063 , change all of the 
17064 \family sans
17065 InvisibleText
17066 \family default
17067  lines to 
17068 \family sans
17069 VisibleText
17070 \family default
17071  and vice-versa.
17072 \end_layout
17073
17074 \begin_layout Standard
17075 That's it.
17076  You've just made an 
17077 \family sans
17078 Overlay
17079 \family default
17080 .
17081 \end_layout
17082
17083 \begin_layout Standard
17084 There's one problem with the way I've designed the LyX 
17085 \family sans
17086 slides
17087 \family default
17088  class: you can't make text in the middle of a paragraph invisible, nor
17089  make text in the middle of an invisible paragraph visible again.
17090  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17091 \begin_inset Foot
17092 status collapsed
17093
17094 \begin_layout Plain Layout
17095 The commands of interest are: 
17096 \end_layout
17097
17098 \begin_layout Itemize
17099
17100 \family typewriter
17101 {
17102 \backslash
17103 invisible \SpecialChar \ldots{}
17104  }
17105 \end_layout
17106
17107 \begin_layout Itemize
17108
17109 \family typewriter
17110 {
17111 \backslash
17112 visible \SpecialChar \ldots{}
17113  }
17114 \end_layout
17115
17116 \begin_layout Plain Layout
17117 \SpecialChar \ldots{}
17118 and need to be marked as TeX.
17119  The text whose 
17120 \begin_inset Quotes eld
17121 \end_inset
17122
17123 visibility
17124 \begin_inset Quotes erd
17125 \end_inset
17126
17127  you wish to change goes in between the brackets [and after the 
17128 \family typewriter
17129
17130 \backslash
17131 invisible
17132 \family default
17133  or 
17134 \family typewriter
17135
17136 \backslash
17137 visible
17138 \family default
17139  command].
17140  If you don't know how to mark text as TeX, see the appropriate section
17141  of the 
17142 \emph on
17143 User's Guide
17144 \emph default
17145 .
17146 \end_layout
17147
17148 \end_inset
17149
17150
17151 \end_layout
17152
17153 \begin_layout Subsubsection
17154 Using 
17155 \family sans
17156 Note
17157 \family default
17158  with 
17159 \family sans
17160 Slide
17161 \family default
17162
17163 \begin_inset CommandInset label
17164 LatexCommand label
17165 name "sec:slideNote"
17166
17167 \end_inset
17168
17169
17170 \end_layout
17171
17172 \begin_layout Standard
17173 Like an 
17174 \family sans
17175 Overlay
17176 \family default
17177 , a 
17178 \family sans
17179 Note
17180 \family default
17181  is associated with a 
17182 \begin_inset Quotes eld
17183 \end_inset
17184
17185 parent
17186 \begin_inset Quotes erd
17187 \end_inset
17188
17189  
17190 \family sans
17191 Slide
17192 \family default
17193 .
17194  Here, too, the LyX 
17195 \family sans
17196 slides
17197 \family default
17198  class provides visual cues.
17199  The label for a 
17200 \family sans
17201 Note
17202 \family default
17203  is shorter than that of a 
17204 \family sans
17205 Slide
17206 \family default
17207  [yet longer than that of an 
17208 \family sans
17209 Overlay
17210 \family default
17211 ] and, like the label of an 
17212 \family sans
17213 Overlay
17214 \family default
17215  is shockingly magenta.
17216  Additionally, the printed 
17217 \family sans
17218 Note
17219 \family default
17220  has the page number of its 
17221 \begin_inset Quotes eld
17222 \end_inset
17223
17224 parent
17225 \begin_inset Quotes erd
17226 \end_inset
17227
17228  
17229 \family sans
17230 Slide
17231 \family default
17232 , appended by 
17233 \begin_inset Quotes eld
17234 \end_inset
17235
17236
17237 \family typewriter
17238 -
17239 \family default
17240 1
17241 \begin_inset Quotes erd
17242 \end_inset
17243
17244
17245 \begin_inset Quotes eld
17246 \end_inset
17247
17248
17249 \family typewriter
17250 -
17251 \family default
17252 2
17253 \begin_inset Quotes erd
17254 \end_inset
17255
17256
17257 \begin_inset Quotes eld
17258 \end_inset
17259
17260
17261 \family typewriter
17262 -
17263 \family default
17264 3
17265 \begin_inset Quotes erd
17266 \end_inset
17267
17268 , etc.
17269  You can have multiple 
17270 \family sans
17271 Note
17272 \family default
17273 s associated with a single 
17274 \family sans
17275 Slide
17276 \family default
17277 , and, as with 
17278 \family sans
17279 Slide
17280 \family default
17281  and 
17282 \family sans
17283 Overlay
17284 \family default
17285 , you'll probably want to break up long 
17286 \family sans
17287 Note
17288 \family default
17289 s so that they fit on a single sheet of paper.
17290 \end_layout
17291
17292 \begin_layout Standard
17293 The purpose of a 
17294 \family sans
17295 Note
17296 \family default
17297  is obvious: it contains anything additional you might want to say about
17298  a 
17299 \family sans
17300 Slide
17301 \family default
17302 .
17303  It could also be used as a sheet of reminders for a particular 
17304 \family sans
17305 Slide
17306 \family default
17307 .
17308  In the case of the latter, you might want to make use of time markers.
17309  Currently, the LyX 
17310 \family sans
17311 slides
17312 \family default
17313  class has no 
17314 \begin_inset Quotes eld
17315 \end_inset
17316
17317 native
17318 \begin_inset Quotes erd
17319 \end_inset
17320
17321  support for time markers, a 
17322 \noun on
17323 SliTeX
17324 \noun default
17325  feature.
17326  So, you'll have to resort to using the LaTeX codes.
17327 \end_layout
17328
17329 \begin_layout Standard
17330 To use time markers, you'll need to specify the extra class option 
17331 \begin_inset Quotes eld
17332 \end_inset
17333
17334
17335 \family typewriter
17336 clock
17337 \family default
17338
17339 \begin_inset Quotes erd
17340 \end_inset
17341
17342  [see section
17343 \begin_inset space ~
17344 \end_inset
17345
17346
17347 \begin_inset CommandInset ref
17348 LatexCommand ref
17349 reference "sec:slidesetup"
17350
17351 \end_inset
17352
17353 ].
17354  This option turns on timing marks, which will appear in the lower-left-hand
17355  corner of every 
17356 \family sans
17357 Note
17358 \family default
17359  you generate.
17360  To set what appears in the time marker, you use the LaTeX commands 
17361 \begin_inset Quotes eld
17362 \end_inset
17363
17364
17365 \family typewriter
17366
17367 \backslash
17368 settime{}
17369 \family default
17370
17371 \begin_inset Quotes erd
17372 \end_inset
17373
17374  and 
17375 \begin_inset Quotes eld
17376 \end_inset
17377
17378
17379 \family typewriter
17380
17381 \backslash
17382 addtime{}
17383 \family default
17384
17385 \begin_inset Quotes erd
17386 \end_inset
17387
17388 .
17389  The arguments of both commands are time measured in seconds.
17390  
17391 \begin_inset Quotes eld
17392 \end_inset
17393
17394
17395 \family typewriter
17396
17397 \backslash
17398 settime{}
17399 \family default
17400
17401 \begin_inset Quotes erd
17402 \end_inset
17403
17404  sets the time marker to a given time.
17405  
17406 \begin_inset Quotes eld
17407 \end_inset
17408
17409
17410 \family typewriter
17411
17412 \backslash
17413 addtime{}
17414 \family default
17415
17416 \begin_inset Quotes erd
17417 \end_inset
17418
17419  increments the time marker by the specified amount.
17420  Using time markers and 
17421 \family sans
17422 Note
17423 \family default
17424 s in this fashion, you can remind yourself how much time to spend on a particula
17425
17426 \family sans
17427 Slide
17428 \family default
17429 .
17430 \end_layout
17431
17432 \begin_layout Standard
17433 There's one last feature to describe.
17434  Clearly, you'd like to print out all of your 
17435 \family sans
17436 Slide
17437 \family default
17438 s and 
17439 \family sans
17440 Overlay
17441 \family default
17442 s on transparencies while printing all of your 
17443 \family sans
17444 Note
17445 \family default
17446 s on plain paper.
17447  However, a 
17448 \family sans
17449 Note
17450 \family default
17451  
17452 \emph on
17453 must
17454 \emph default
17455  follow the 
17456 \family sans
17457 Slide
17458 \family default
17459  with which it is associated.
17460  What's a person to do?
17461 \end_layout
17462
17463 \begin_layout Standard
17464 Luckily, there are two LaTeX commands that allow you to select what to print
17465  out.
17466  Both must be placed into the preamble of your document.
17467  The command 
17468 \begin_inset Quotes eld
17469 \end_inset
17470
17471
17472 \family typewriter
17473
17474 \backslash
17475 onlyslides{
17476 \backslash
17477 slides}
17478 \family default
17479
17480 \begin_inset Quotes erd
17481 \end_inset
17482
17483  will cause the output to contain only the 
17484 \family sans
17485 Slide
17486 \family default
17487 s and 
17488 \family sans
17489 Overlay
17490 \family default
17491 s.
17492  Correspondingly, the command 
17493 \begin_inset Quotes eld
17494 \end_inset
17495
17496
17497 \family typewriter
17498
17499 \backslash
17500 onlynotes{
17501 \backslash
17502 notes}
17503 \family default
17504
17505 \begin_inset Quotes erd
17506 \end_inset
17507
17508  prevents the output of anything but 
17509 \family sans
17510 Note
17511 \family default
17512 s.
17513  I'd advise placing both commands in the preamble and initially comment
17514  both out.
17515  You can then preview your entire presentation as you write.
17516  When you're done writing, you can then uncomment one of the two to select
17517  what you want to print.
17518  I like to uncomment 
17519 \begin_inset Quotes eld
17520 \end_inset
17521
17522
17523 \family typewriter
17524
17525 \backslash
17526 onlyslides{
17527 \backslash
17528 slides}
17529 \family default
17530
17531 \begin_inset Quotes erd
17532 \end_inset
17533
17534  , print to a file with 
17535 \begin_inset Quotes eld
17536 \end_inset
17537
17538
17539 \family typewriter
17540 -slides
17541 \family default
17542
17543 \begin_inset Quotes erd
17544 \end_inset
17545
17546  in its name, comment it back out, then uncomment 
17547 \begin_inset Quotes eld
17548 \end_inset
17549
17550
17551 \family typewriter
17552
17553 \backslash
17554 onlynotes{
17555 \backslash
17556 notes}
17557 \family default
17558
17559 \begin_inset Quotes erd
17560 \end_inset
17561
17562  and print to a 
17563 \begin_inset Quotes eld
17564 \end_inset
17565
17566
17567 \family typewriter
17568 *-notes.ps
17569 \family default
17570
17571 \begin_inset Quotes erd
17572 \end_inset
17573
17574  file.
17575  I can then send either file to a printer, loading transparencies or plain
17576  paper as appropriate.
17577 \end_layout
17578
17579 \begin_layout Standard
17580 You can also provide other arguments to the 
17581 \begin_inset Quotes eld
17582 \end_inset
17583
17584
17585 \family typewriter
17586
17587 \backslash
17588 onlyslides{}
17589 \family default
17590
17591 \begin_inset Quotes erd
17592 \end_inset
17593
17594  and 
17595 \begin_inset Quotes eld
17596 \end_inset
17597
17598
17599 \family typewriter
17600
17601 \backslash
17602 onlynotes{}
17603 \family default
17604
17605 \begin_inset Quotes erd
17606 \end_inset
17607
17608  commands.
17609  See a good LaTeX book for details.
17610 \end_layout
17611
17612 \begin_layout Subsection
17613 The 
17614 \family sans
17615 slides
17616 \family default
17617  Class Template File
17618 \end_layout
17619
17620 \begin_layout Standard
17621 I have also provided a template file, 
17622 \begin_inset Quotes eld
17623 \end_inset
17624
17625
17626 \family typewriter
17627 slides.lyx
17628 \family default
17629
17630 \begin_inset Quotes erd
17631 \end_inset
17632
17633 , with the 
17634 \family sans
17635 slides
17636 \family default
17637  class.
17638  To use it, begin your new presentation with 
17639 \family sans
17640 \bar under
17641 F
17642 \bar default
17643 ile\SpecialChar \menuseparator
17644 New
17645 \begin_inset space ~
17646 \end_inset
17647
17648 from
17649 \begin_inset space ~
17650 \end_inset
17651
17652
17653 \bar under
17654 T
17655 \bar default
17656 emplate
17657 \family default
17658 .
17659  Your new LyX presentation file will contain an example 
17660 \family sans
17661 Slide
17662 \family default
17663  – 
17664 \family sans
17665 Overlay
17666 \family default
17667  – 
17668 \family sans
17669 Note
17670 \family default
17671  triplet.
17672  The 
17673 \family sans
17674 Slide
17675 \family default
17676  and 
17677 \family sans
17678 Overlay
17679 \family default
17680  additionally contain an example of the use of 
17681 \family sans
17682 InvisibleText
17683 \family default
17684  and 
17685 \family sans
17686 VisibleText
17687 \family default
17688 .
17689  Lastly, the preamble will contain:
17690 \end_layout
17691
17692 \begin_layout LyX-Code
17693 % Uncomment to print out only slides and overlays
17694 \end_layout
17695
17696 \begin_layout LyX-Code
17697 %
17698 \end_layout
17699
17700 \begin_layout LyX-Code
17701 %
17702 \backslash
17703 onlyslides{
17704 \backslash
17705 slides}
17706 \begin_inset Newline newline
17707 \end_inset
17708
17709  
17710 \end_layout
17711
17712 \begin_layout LyX-Code
17713 % Uncomment to print out only notes
17714 \end_layout
17715
17716 \begin_layout LyX-Code
17717 %
17718 \end_layout
17719
17720 \begin_layout LyX-Code
17721 %
17722 \backslash
17723 onlynotes{
17724 \backslash
17725 notes}
17726 \end_layout
17727
17728 \begin_layout Standard
17729 One final thing: I created this class to support the LaTeX2e 
17730 \begin_inset Quotes eld
17731 \end_inset
17732
17733
17734 \noun on
17735 SliTeX
17736 \noun default
17737  emulation
17738 \begin_inset Quotes erd
17739 \end_inset
17740
17741  class, one of the built-in LaTeX2e classes.
17742  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17743  built-in slide class.
17744  It's here if you want it or need it.
17745  There exist other LaTeX2e classes for creating presentations, such as the
17746  
17747 \family sans
17748 Foils
17749 \family default
17750  class [see section
17751 \begin_inset space ~
17752 \end_inset
17753
17754
17755 \begin_inset CommandInset ref
17756 LatexCommand ref
17757 reference "sec:foiltex"
17758
17759 \end_inset
17760
17761 ] or the 
17762 \begin_inset Quotes eld
17763 \end_inset
17764
17765
17766 \family typewriter
17767 seminar
17768 \family default
17769
17770 \begin_inset Quotes erd
17771 \end_inset
17772
17773  package [present on some TeX distributions].
17774  The latter is not yet supported under LyX.
17775 \begin_inset Foot
17776 status collapsed
17777
17778 \begin_layout Plain Layout
17779 Perhaps you can take on the task\SpecialChar \ldots{}
17780
17781 \end_layout
17782
17783 \end_inset
17784
17785  I know nothing about these other classes.
17786  Try them out to see what sort of alternative they provide.
17787 \end_layout
17788
17789 \begin_layout Chapter
17790 LyX Features needing Extra Software
17791 \end_layout
17792
17793 \begin_layout Section
17794 Checking TeX
17795 \end_layout
17796
17797 \begin_layout Standard
17798 by 
17799 \noun on
17800 Asger Alstrup
17801 \end_layout
17802
17803 \begin_layout Subsection
17804 Introduction
17805 \end_layout
17806
17807 \begin_layout Standard
17808 If you have the 
17809 \family typewriter
17810 chktex
17811 \family default
17812  program installed
17813 \begin_inset Foot
17814 status collapsed
17815
17816 \begin_layout Plain Layout
17817
17818 \family typewriter
17819 chktex
17820 \family default
17821  is not yet available when you are using the LaTeX distribution MiKTeX.
17822 \end_layout
17823
17824 \end_inset
17825
17826 , you'll find in the 
17827 \family sans
17828 Tools
17829 \family default
17830  menu the entry: 
17831 \family sans
17832 Check
17833 \begin_inset space ~
17834 \end_inset
17835
17836 TeX
17837 \family default
17838 .
17839  You can get 
17840 \family typewriter
17841 chktex
17842 \family default
17843  from CTAN, 
17844 \begin_inset CommandInset href
17845 LatexCommand href
17846 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17847
17848 \end_inset
17849
17850 .
17851 \end_layout
17852
17853 \begin_layout Standard
17854 The 
17855 \family sans
17856 ChkTeX
17857 \family default
17858  package is a program that was written by 
17859 \begin_inset Flex Noun
17860 status collapsed
17861
17862 \begin_layout Plain Layout
17863 Jens T.
17864 \begin_inset space ~
17865 \end_inset
17866
17867 Berger Thielemann
17868 \end_layout
17869
17870 \end_inset
17871
17872  in frustration because some constructs in LaTeX are sometimes non-intuitive,
17873  and easy to forget.
17874  The program runs over your LaTeX file, checks the integrity of the file,
17875  and flags some common errors.
17876  In other technical words, it is 
17877 \family typewriter
17878 lint
17879 \family default
17880  for LaTeX.
17881 \end_layout
17882
17883 \begin_layout Standard
17884 Well, what is a syntax checker doing in LyX which is supposed to produce
17885  correct LaTeX anyways? The answer is simple: Just as 
17886 \family typewriter
17887 Lint
17888 \family default
17889  not only checks the 
17890 \emph on
17891 syntax
17892 \emph default
17893  of C programs, but also does 
17894 \emph on
17895 semantic
17896 \emph default
17897  checks for type-errors, 
17898 \family sans
17899 ChkTeX
17900 \family default
17901  catches some common 
17902 \emph on
17903 typographic
17904 \emph default
17905  errors, in addition to the syntactical ones.
17906  Specifically, 
17907 \family sans
17908 ChkTeX
17909 \family default
17910  is capable of detecting several common errors, such as
17911 \end_layout
17912
17913 \begin_layout Itemize
17914 Ellipsis detection:
17915 \begin_inset Newline newline
17916 \end_inset
17917
17918 Use \SpecialChar \ldots{}
17919  instead of ...
17920 \end_layout
17921
17922 \begin_layout Itemize
17923 No space in front of/after parenthesis:
17924 \begin_inset Newline newline
17925 \end_inset
17926
17927 ( wrong spacing )
17928 \end_layout
17929
17930 \begin_layout Itemize
17931 Enforcement of normal space after common abbreviations:
17932 \begin_inset Newline newline
17933 \end_inset
17934
17935 e.
17936 \begin_inset space \thinspace{}
17937 \end_inset
17938
17939 g.
17940 \begin_inset space \space{}
17941 \end_inset
17942
17943 is too wide spacing.
17944 \end_layout
17945
17946 \begin_layout Itemize
17947 Enforcement of end-of-sentence space when the last sentence ends with a
17948  capital letter:
17949 \begin_inset Newline newline
17950 \end_inset
17951
17952 This is a TEST.
17953  And this is wrong spacing.
17954 \end_layout
17955
17956 \begin_layout Itemize
17957 Space in front of labels and similar commands:
17958 \begin_inset Newline newline
17959 \end_inset
17960
17961 The label should stick right up to the text to avoid falling to a wrong
17962  page.
17963  
17964 \begin_inset CommandInset label
17965 LatexCommand label
17966 name "sec:chktex"
17967
17968 \end_inset
17969
17970  
17971 \begin_inset Foot
17972 status collapsed
17973
17974 \begin_layout Plain Layout
17975 This footnote is in danger of falling off to a wrong page
17976 \end_layout
17977
17978 \end_inset
17979
17980  The label is separated too much.
17981 \end_layout
17982
17983 \begin_layout Itemize
17984 Space in front of references, instead of hard spaces:
17985 \begin_inset Newline newline
17986 \end_inset
17987
17988 If you have bad luck, the text will break right between the referenced text
17989  and reference number, and that's a pity.
17990  See section 
17991 \begin_inset CommandInset ref
17992 LatexCommand ref
17993 reference "sec:chktex"
17994
17995 \end_inset
17996
17997 .
17998 \end_layout
17999
18000 \begin_layout Itemize
18001 Use of 
18002 \begin_inset Quotes eld
18003 \end_inset
18004
18005 x
18006 \begin_inset Quotes erd
18007 \end_inset
18008
18009  instead of 
18010 \begin_inset Formula $\times$
18011 \end_inset
18012
18013  between numbers:
18014 \begin_inset Newline newline
18015 \end_inset
18016
18017 2x2 looks cheap compared to 
18018 \begin_inset Formula $2\times2$
18019 \end_inset
18020
18021 .
18022 \end_layout
18023
18024 \begin_layout Standard
18025 and more \SpecialChar \ldots{}
18026  It is an invaluable tool when you are 
18027 \begin_inset Quotes eld
18028 \end_inset
18029
18030 finishing up
18031 \begin_inset Quotes erd
18032 \end_inset
18033
18034  your document before printing, and you should run it right after the obligatory
18035  spelling check, and before you go fine tuning the typesetting.
18036 \end_layout
18037
18038 \begin_layout Subsection
18039 How to use it
18040 \end_layout
18041
18042 \begin_layout Standard
18043 If you have the program installed, usage is as simple as choosing 
18044 \family sans
18045 Tools\SpecialChar \menuseparator
18046 Check
18047 \begin_inset space ~
18048 \end_inset
18049
18050 TeX
18051 \family default
18052 .
18053  This will make LyX generate a LaTeX file of your document, start 
18054 \family sans
18055 ChkTeX
18056 \family default
18057  to check it, and then make LyX insert 
18058 \begin_inset Quotes eld
18059 \end_inset
18060
18061 error boxes
18062 \begin_inset Quotes erd
18063 \end_inset
18064
18065  with the warnings from 
18066 \family sans
18067 ChkTeX
18068 \family default
18069 , if there were any.
18070  The warnings will be placed close to the point of the mistake, and you
18071  can quickly find them by using the 
18072 \family sans
18073 Navigate\SpecialChar \menuseparator
18074 Error
18075 \family default
18076  menu item, or the shortcut key 
18077 \family sans
18078 C-g
18079 \family default
18080  from the default 
18081 \family typewriter
18082 cua
18083 \family default
18084  bind file.
18085  Open the error boxes by clicking on them with the mouse, or use the shortcut
18086  key 
18087 \family sans
18088 C-i
18089 \family default
18090  from 
18091 \family typewriter
18092 cua
18093 \family default
18094  bindings, or the corresponding 
18095 \family sans
18096 C-o
18097 \family default
18098  for the alternate 
18099 \family typewriter
18100 emacs
18101 \family default
18102  bind file.
18103  Read the warning and correct the mistake, if it is a mistake.
18104  If you have trouble understanding what the warning is about, you can safely
18105  ignore it.
18106  Remember that there is a hidden layer between the document on screen and
18107  the technical details in invoking 
18108 \family sans
18109 ChkTeX
18110 \family default
18111 , and this gap can make some warnings seem arcane or just plain silly.
18112 \end_layout
18113
18114 \begin_layout Standard
18115 This document is an excellent testing bed for the feature, and it should
18116  provide quite a few warnings for you to fiddle with.
18117  Since computers are only so smart, expect most of the warnings to be false
18118  alarms, though.
18119 \end_layout
18120
18121 \begin_layout Subsection
18122 How to fine tune it
18123 \end_layout
18124
18125 \begin_layout Standard
18126 Sometimes, you'll find that 
18127 \family sans
18128 ChkTeX
18129 \family default
18130  makes more noise than suits your mood.
18131  Then you can choose not to use it, wait until your mood changes, or try
18132  to customize 
18133 \family sans
18134 ChkTeX
18135 \family default
18136  to get better along with you.
18137 \end_layout
18138
18139 \begin_layout Standard
18140 Although 
18141 \family sans
18142 ChkTeX
18143 \family default
18144  
18145 \emph on
18146 is
18147 \emph default
18148  very configurable and extensible, you shouldn't expect to solve all problems
18149  with 
18150 \family sans
18151 ChkTeX
18152 \family default
18153  in LyX this way.
18154  Since LyX has to generate a somewhat special LaTeX file to be able to match
18155  the line numbers from the 
18156 \family sans
18157 ChkTeX
18158 \family default
18159  output
18160 \begin_inset Foot
18161 status collapsed
18162
18163 \begin_layout Plain Layout
18164 You can inspect the specific output from 
18165 \family sans
18166 chktex
18167 \family default
18168  by using 
18169 \family sans
18170 Edit\SpecialChar \menuseparator
18171 View
18172 \begin_inset space ~
18173 \end_inset
18174
18175 LaTeX
18176 \begin_inset space ~
18177 \end_inset
18178
18179 Log
18180 \family default
18181  right after a 
18182 \family sans
18183 chktex
18184 \family default
18185  run.
18186 \end_layout
18187
18188 \end_inset
18189
18190  to the internal document structure, some of the warnings will not appear
18191  correctly.
18192  There are two things you can do about this:
18193 \end_layout
18194
18195 \begin_layout Itemize
18196 Fine tune the 
18197 \family sans
18198 ChkTeX
18199 \family default
18200  invocation command line in 
18201 \begin_inset Flex MenuItem
18202 status collapsed
18203
18204 \begin_layout Plain Layout
18205 Tools\SpecialChar \menuseparator
18206 Preferences\SpecialChar \menuseparator
18207 Output\SpecialChar \menuseparator
18208 LaTeX\SpecialChar \menuseparator
18209 CheckTeX command
18210 \end_layout
18211
18212 \end_inset
18213
18214 , or the global 
18215 \family sans
18216 ChkTeX
18217 \family default
18218  installation configuration file (usually with the file 
18219 \family typewriter
18220 chktexrc
18221 \family default
18222 ).
18223  See below to learn what warnings can be enabled and disabled on the command
18224  line.
18225 \end_layout
18226
18227 \begin_layout Itemize
18228 Export your document as a raw LaTeX file using 
18229 \family sans
18230 File\SpecialChar \menuseparator
18231 Export\SpecialChar \menuseparator
18232 LaTeX
18233 \family default
18234  and run 
18235 \family typewriter
18236 chktex
18237 \family default
18238  manually on that.
18239  Invoked in this way, it can be a hassle to find the corresponding place
18240  in the document inside LyX, but with a little patience, you should be able
18241  to do it.
18242 \end_layout
18243
18244 \begin_layout Standard
18245 Here follows the warning messages that can be enabled and disabled in 
18246 \family sans
18247 Preferences
18248 \family default
18249 .
18250  Use 
18251 \family typewriter
18252 -n#
18253 \family default
18254  to disable a warning, and 
18255 \family typewriter
18256 -w#
18257 \family default
18258  to enable a warning.
18259  The emphasized entries are disabled by default, because the default is
18260  "
18261 \family typewriter
18262 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18263 \family default
18264 ".
18265 \end_layout
18266
18267 \begin_layout Standard
18268 Notice that you should only use the options that enable and disable warnings,
18269  because LyX relies on some of the other command line parameters to be set
18270  in a specific way to have a chance to communicate with 
18271 \family typewriter
18272 chktex
18273 \family default
18274 .
18275 \end_layout
18276
18277 \begin_layout Enumerate
18278
18279 \size small
18280 \emph on
18281 Command terminated with space.
18282 \end_layout
18283
18284 \begin_layout Enumerate
18285
18286 \size small
18287 Non-breaking space (
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 ) should have been used.
18300 \end_layout
18301
18302 \begin_layout Enumerate
18303
18304 \size small
18305 \emph on
18306 You should enclose the previous parenthesis with 
18307 \begin_inset Quotes eld
18308 \end_inset
18309
18310
18311 \family typewriter
18312 {}
18313 \family default
18314
18315 \begin_inset Quotes erd
18316 \end_inset
18317
18318 .
18319 \end_layout
18320
18321 \begin_layout Enumerate
18322
18323 \size small
18324 Italic correction (
18325 \begin_inset Quotes eld
18326 \end_inset
18327
18328
18329 \family typewriter
18330
18331 \backslash
18332 /
18333 \family default
18334
18335 \begin_inset Quotes erd
18336 \end_inset
18337
18338 ) found in non-italic buffer.
18339 \end_layout
18340
18341 \begin_layout Enumerate
18342
18343 \size small
18344 Italic correction (
18345 \begin_inset Quotes eld
18346 \end_inset
18347
18348
18349 \family typewriter
18350
18351 \backslash
18352 /
18353 \family default
18354
18355 \begin_inset Quotes erd
18356 \end_inset
18357
18358 ) found more than once.
18359 \end_layout
18360
18361 \begin_layout Enumerate
18362
18363 \size small
18364 \emph on
18365 No italic correction (
18366 \begin_inset Quotes eld
18367 \end_inset
18368
18369
18370 \family typewriter
18371
18372 \backslash
18373 /
18374 \family default
18375
18376 \begin_inset Quotes erd
18377 \end_inset
18378
18379 ) found.
18380 \end_layout
18381
18382 \begin_layout Enumerate
18383
18384 \size small
18385 Accent command 
18386 \begin_inset Quotes eld
18387 \end_inset
18388
18389
18390 \family typewriter
18391 cmd
18392 \family default
18393
18394 \begin_inset Quotes erd
18395 \end_inset
18396
18397  needs use of 
18398 \begin_inset Quotes eld
18399 \end_inset
18400
18401
18402 \family typewriter
18403 cmd
18404 \family default
18405
18406 \begin_inset Quotes erd
18407 \end_inset
18408
18409 .
18410 \end_layout
18411
18412 \begin_layout Enumerate
18413
18414 \size small
18415 Wrong length of dash may have been used.
18416 \end_layout
18417
18418 \begin_layout Enumerate
18419
18420 \size small
18421 \emph on
18422 \begin_inset Quotes eld
18423 \end_inset
18424
18425
18426 \family typewriter
18427 %s
18428 \family default
18429
18430 \begin_inset Quotes erd
18431 \end_inset
18432
18433  expected, found 
18434 \begin_inset Quotes eld
18435 \end_inset
18436
18437
18438 \family typewriter
18439 %s
18440 \family default
18441
18442 \begin_inset Quotes erd
18443 \end_inset
18444
18445 .
18446 \end_layout
18447
18448 \begin_layout Enumerate
18449
18450 \size small
18451 Solo 
18452 \begin_inset Quotes eld
18453 \end_inset
18454
18455
18456 \family typewriter
18457 %s
18458 \family default
18459
18460 \begin_inset Quotes erd
18461 \end_inset
18462
18463  found.
18464 \end_layout
18465
18466 \begin_layout Enumerate
18467
18468 \size small
18469 You should use 
18470 \begin_inset Quotes eld
18471 \end_inset
18472
18473
18474 \family typewriter
18475 %s
18476 \family default
18477
18478 \begin_inset Quotes erd
18479 \end_inset
18480
18481  to achieve an ellipsis.
18482 \end_layout
18483
18484 \begin_layout Enumerate
18485
18486 \size small
18487 Inter-word spacing (
18488 \begin_inset Quotes eld
18489 \end_inset
18490
18491
18492 \family typewriter
18493
18494 \backslash
18495
18496 \family default
18497  
18498 \begin_inset Quotes eld
18499 \end_inset
18500
18501 ) should perhaps be used.
18502 \end_layout
18503
18504 \begin_layout Enumerate
18505
18506 \size small
18507 Inter-sentence spacing (
18508 \begin_inset Quotes eld
18509 \end_inset
18510
18511
18512 \family typewriter
18513
18514 \backslash
18515 @
18516 \family default
18517
18518 \begin_inset Quotes erd
18519 \end_inset
18520
18521 ) should perhaps be used.
18522 \end_layout
18523
18524 \begin_layout Enumerate
18525
18526 \size small
18527 Could not find argument for command.
18528 \end_layout
18529
18530 \begin_layout Enumerate
18531
18532 \size small
18533 No match found for 
18534 \begin_inset Quotes eld
18535 \end_inset
18536
18537
18538 \family typewriter
18539 %s
18540 \family default
18541
18542 \begin_inset Quotes erd
18543 \end_inset
18544
18545 .
18546 \end_layout
18547
18548 \begin_layout Enumerate
18549
18550 \size small
18551 Math mode still on at end of LaTeX file.
18552 \end_layout
18553
18554 \begin_layout Enumerate
18555
18556 \size small
18557 Number of 
18558 \begin_inset Quotes eld
18559 \end_inset
18560
18561
18562 \family typewriter
18563 char
18564 \family default
18565
18566 \begin_inset Quotes erd
18567 \end_inset
18568
18569  doesn't match the number of 
18570 \begin_inset Quotes eld
18571 \end_inset
18572
18573
18574 \family typewriter
18575 char
18576 \family default
18577
18578 \begin_inset Quotes erd
18579 \end_inset
18580
18581 .
18582 \end_layout
18583
18584 \begin_layout Enumerate
18585
18586 \size small
18587 You should use either 
18588 \family typewriter
18589
18590 \begin_inset Quotes eld
18591 \end_inset
18592
18593
18594 \family default
18595  or 
18596 \family typewriter
18597
18598 \begin_inset Quotes erd
18599 \end_inset
18600
18601
18602 \family default
18603  as an alternative to 
18604 \begin_inset Quotes eld
18605 \end_inset
18606
18607
18608 \family typewriter
18609 "
18610 \family default
18611
18612 \begin_inset Quotes erd
18613 \end_inset
18614
18615 .
18616 \end_layout
18617
18618 \begin_layout Enumerate
18619
18620 \size small
18621 You should use "
18622 \family typewriter
18623 '
18624 \family default
18625 " (ASCII 39) instead of "
18626 \family typewriter
18627 ´
18628 \family default
18629 " (ASCII 180).
18630 \end_layout
18631
18632 \begin_layout Enumerate
18633
18634 \size small
18635 User-specified pattern found.
18636 \end_layout
18637
18638 \begin_layout Enumerate
18639
18640 \size small
18641 This command might not be intended.
18642 \end_layout
18643
18644 \begin_layout Enumerate
18645
18646 \size small
18647 \emph on
18648 Comment displayed.
18649 \end_layout
18650
18651 \begin_layout Enumerate
18652
18653 \size small
18654 Either 
18655 \family typewriter
18656 ''
18657 \backslash
18658 ,'
18659 \family default
18660  or 
18661 \family typewriter
18662 '
18663 \backslash
18664 ,''
18665 \family default
18666  will look better.
18667 \end_layout
18668
18669 \begin_layout Enumerate
18670
18671 \size small
18672 Delete this space to maintain correct page references.
18673 \end_layout
18674
18675 \begin_layout Enumerate
18676
18677 \size small
18678 \emph on
18679 You might wish to put this between a pair of 
18680 \begin_inset Quotes eld
18681 \end_inset
18682
18683
18684 \family typewriter
18685 {}
18686 \family default
18687
18688 \begin_inset Quotes erd
18689 \end_inset
18690
18691 .
18692 \end_layout
18693
18694 \begin_layout Enumerate
18695
18696 \size small
18697 You ought to remove spaces in front of punctuation.
18698 \end_layout
18699
18700 \begin_layout Enumerate
18701
18702 \size small
18703 Could not execute LaTeX command.
18704 \end_layout
18705
18706 \begin_layout Enumerate
18707
18708 \size small
18709 Don't use 
18710 \family typewriter
18711
18712 \backslash
18713 /
18714 \family default
18715  in front of small punctuation.
18716 \end_layout
18717
18718 \begin_layout Enumerate
18719
18720 \family typewriter
18721 \size small
18722 $
18723 \backslash
18724 times$
18725 \family default
18726  may look prettier here.
18727 \end_layout
18728
18729 \begin_layout Enumerate
18730
18731 \size small
18732 \emph on
18733 Multiple spaces detected in output.
18734 \end_layout
18735
18736 \begin_layout Enumerate
18737
18738 \size small
18739 This text may be ignored.
18740 \end_layout
18741
18742 \begin_layout Enumerate
18743
18744 \size small
18745 Use 
18746 \family typewriter
18747
18748 \begin_inset Quotes eld
18749 \end_inset
18750
18751
18752 \family default
18753  to begin quotation, not 
18754 \family typewriter
18755 '
18756 \family default
18757 .
18758 \end_layout
18759
18760 \begin_layout Enumerate
18761
18762 \size small
18763 Use 
18764 \family typewriter
18765 '
18766 \family default
18767  to end quotation, not 
18768 \family typewriter
18769
18770 \begin_inset Quotes eld
18771 \end_inset
18772
18773
18774 \family default
18775 .
18776 \end_layout
18777
18778 \begin_layout Enumerate
18779
18780 \size small
18781 Don't mix quotes.
18782 \end_layout
18783
18784 \begin_layout Enumerate
18785
18786 \size small
18787 You should perhaps use 
18788 \begin_inset Quotes eld
18789 \end_inset
18790
18791
18792 \family typewriter
18793 cmd
18794 \family default
18795
18796 \begin_inset Quotes erd
18797 \end_inset
18798
18799  instead.
18800 \end_layout
18801
18802 \begin_layout Enumerate
18803
18804 \size small
18805 You should put a space in front of/after parenthesis.
18806 \end_layout
18807
18808 \begin_layout Enumerate
18809
18810 \size small
18811 You should avoid spaces in front of/after parenthesis.
18812 \end_layout
18813
18814 \begin_layout Enumerate
18815
18816 \size small
18817 \emph on
18818 You should not use punctuation in front of/after quotes.
18819 \end_layout
18820
18821 \begin_layout Enumerate
18822
18823 \size small
18824 Double space found.
18825 \end_layout
18826
18827 \begin_layout Enumerate
18828
18829 \size small
18830 You should put punctuation outside inner/inside display math mode.
18831 \end_layout
18832
18833 \begin_layout Enumerate
18834
18835 \size small
18836 You ought to not use primitive TeX in LaTeX code.
18837 \end_layout
18838
18839 \begin_layout Enumerate
18840
18841 \size small
18842 You should remove spaces in front of 
18843 \begin_inset Quotes eld
18844 \end_inset
18845
18846
18847 \family typewriter
18848 %s
18849 \family default
18850
18851 \begin_inset Quotes erd
18852 \end_inset
18853
18854
18855 \end_layout
18856
18857 \begin_layout Enumerate
18858
18859 \size small
18860 \begin_inset Quotes eld
18861 \end_inset
18862
18863
18864 \family typewriter
18865 %s
18866 \family default
18867
18868 \begin_inset Quotes erd
18869 \end_inset
18870
18871  is normally not followed by 
18872 \begin_inset Quotes eld
18873 \end_inset
18874
18875
18876 \family typewriter
18877 %c
18878 \family default
18879
18880 \begin_inset Quotes erd
18881 \end_inset
18882
18883 .
18884 \end_layout
18885
18886 \begin_layout Standard
18887 In later versions of LyX, we hope to provide a more complete interface to
18888  this tool (and it's smaller cousin 
18889 \family typewriter
18890 lacheck
18891 \family default
18892 ) to exploit the full power of it.
18893  But it's not exactly useless as it is now: go try it on one of your existing
18894  documents of a certain length and be surprised.
18895 \end_layout
18896
18897 \begin_layout Section
18898 Version Control in LyX
18899 \end_layout
18900
18901 \begin_layout Standard
18902 by
18903 \noun on
18904  Lars Gullik Bjønnes 
18905 \noun default
18906 and 
18907 \noun on
18908 Pavel Sanda
18909 \end_layout
18910
18911 \begin_layout Subsection
18912 Introduction
18913 \end_layout
18914
18915 \begin_layout Standard
18916 LyX supports some of the most basic RCS/CVS/SVN commands.
18917  If you need something a bit more sophisticated you will have to do that
18918  manually in a terminal.
18919 \end_layout
18920
18921 \begin_layout Standard
18922 Also note that CVS support is not as good as subversion support so we advise
18923  using SVN instead.
18924  A good place to start learning Subversion is SVN Book
18925 \begin_inset Foot
18926 status open
18927
18928 \begin_layout Plain Layout
18929 \begin_inset CommandInset href
18930 LatexCommand href
18931 target "http://svnbook.red-bean.com/"
18932
18933 \end_inset
18934
18935
18936 \end_layout
18937
18938 \end_inset
18939
18940 .
18941  In the case of RCS you should read 
18942 \begin_inset Quotes eld
18943 \end_inset
18944
18945 rcsintro
18946 \begin_inset Quotes erd
18947 \end_inset
18948
18949  (a man file, read it with 
18950 \family typewriter
18951 man rcsintro
18952 \family default
18953 ).
18954  This file describes all the basic features of RCS.
18955  You should especially notice the comment about a RCS directory, and the
18956  notion of a master RCS file (the file ending in 
18957 \family typewriter
18958 ,v
18959 \family default
18960 ).
18961 \end_layout
18962
18963 \begin_layout Standard
18964 Before you begin to use the version control features in LyX, you should
18965  be familiar with RCS/CVS/SVN usage.
18966  The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18967  package—no guarantees are made for older versions.
18968  Most of the log messages are not currently displayed after operations —
18969  you can check them in the Messages pane if unsure.
18970  Regular users of version control will appreciate VC toolbar, which can
18971  be enabled via 
18972 \family sans
18973 View\SpecialChar \menuseparator
18974 Toolbars\SpecialChar \menuseparator
18975 Version
18976 \begin_inset space ~
18977 \end_inset
18978
18979 Control
18980 \family default
18981 .
18982 \end_layout
18983
18984 \begin_layout Standard
18985 For introducing your own external commands consult vc-command in the manual
18986  of LyX functions.
18987 \end_layout
18988
18989 \begin_layout Subsection
18990 RCS commands in LyX
18991 \end_layout
18992
18993 \begin_layout Standard
18994 The following sections describe the RCS commands supported by LyX.
18995  You can find them in the 
18996 \family sans
18997 File\SpecialChar \menuseparator
18998 Version
18999 \begin_inset space ~
19000 \end_inset
19001
19002 Control
19003 \family default
19004  submenu.
19005  LyX was tested against RCS 5.7/5.8
19006 \begin_inset Foot
19007 status open
19008
19009 \begin_layout Plain Layout
19010 Note that old DOS / MS Windows builds (5.7) need to setup environment variables
19011  in order to work properly with LyX.
19012  In particular time zone (TZ) should be set and more importantly RCSINIT
19013  in order to change default archive location ("SET RCSINIT=-x,v/") --- LyX
19014  expects archive to be found in file.lyx,v within the original document directory.
19015  See also README shipped with Windows RCS binaries.
19016 \end_layout
19017
19018 \end_inset
19019
19020 .
19021 \end_layout
19022
19023 \begin_layout Subsubsection
19024
19025 \family sans
19026 Register
19027 \end_layout
19028
19029 \begin_layout Standard
19030 If your document is not under revision control, this is the only item shown
19031  in the menu.
19032  And if it is under revision control, the 
19033 \family sans
19034 Register
19035 \family default
19036  item is not visible.
19037  
19038 \end_layout
19039
19040 \begin_layout Standard
19041 This command registers your document with RCS (unless you are under the
19042  directory managed by CVS)\SpecialChar \@.
19043  You are asked interactively to supply an initial
19044  description of the document.
19045  The document is now set in Read-Only mode and you have to 
19046 \family sans
19047 Check
19048 \begin_inset space ~
19049 \end_inset
19050
19051 Out
19052 \begin_inset space ~
19053 \end_inset
19054
19055 For
19056 \begin_inset space ~
19057 \end_inset
19058
19059 Edit
19060 \family default
19061 , before making any changes to it.
19062  A document under revision control has a 
19063 \begin_inset Quotes eld
19064 \end_inset
19065
19066 [RCS:<version> <locker>]
19067 \begin_inset Quotes erd
19068 \end_inset
19069
19070  item tagged to the filename in the minibuffer.
19071 \end_layout
19072
19073 \begin_layout Standard
19074 RCS command that is run: 
19075 \family typewriter
19076 ci -q -u -i -t-"<initial description>" <file-name>
19077 \end_layout
19078
19079 \begin_layout Standard
19080 Read 
19081 \family typewriter
19082 man ci
19083 \family default
19084  to understand the switches.
19085  
19086 \end_layout
19087
19088 \begin_layout Subsubsection
19089
19090 \family sans
19091 Check In Changes
19092 \end_layout
19093
19094 \begin_layout Standard
19095 When you are finished editing a file, you check in your changes.
19096  When you do this, you are asked for a description of the changes.
19097  This is stored in the history log.
19098  The version number is bumped, your changes are applied to the master RCS
19099  file, the document is unlocked and set to Read-Only mode.
19100  
19101 \end_layout
19102
19103 \begin_layout Standard
19104 RCS command: 
19105 \family typewriter
19106 ci -q -u -m"<description>" <file-name>
19107 \end_layout
19108
19109 \begin_layout Subsubsection
19110
19111 \family sans
19112 Check Out For Edit
19113 \end_layout
19114
19115 \begin_layout Standard
19116 By doing this you lock the document so that only you can edit it.
19117  This will also make the document Read-Write only for you.
19118  You will usually continue editing for a while and when you are finished
19119  you check in your changes.
19120  The status line is changed to reflect that you have locked the file.
19121  
19122 \end_layout
19123
19124 \begin_layout Standard
19125 RCS command: 
19126 \family typewriter
19127 co -q -l <file-name>
19128 \end_layout
19129
19130 \begin_layout Subsubsection
19131
19132 \family sans
19133 Revert To Repository Version
19134 \end_layout
19135
19136 \begin_layout Standard
19137 This will discard all changes made to the document since the last check
19138  in.
19139  You get a warning before changes are discarded.
19140 \end_layout
19141
19142 \begin_layout Standard
19143 RCS command: 
19144 \family typewriter
19145 co -f -u<version> <file-name>
19146 \end_layout
19147
19148 \begin_layout Subsubsection
19149
19150 \family sans
19151 Undo Last Checkin
19152 \end_layout
19153
19154 \begin_layout Standard
19155 This makes as if the last check in never happened.
19156  No changes are made to the document loaded into LyX, but the last version
19157  is removed from the master RCS file.
19158  
19159 \end_layout
19160
19161 \begin_layout Standard
19162 RCS command: 
19163 \family typewriter
19164 rcs -o<version> <file-name>
19165 \end_layout
19166
19167 \begin_layout Subsubsection
19168
19169 \family sans
19170 Show History
19171 \end_layout
19172
19173 \begin_layout Standard
19174 This shows the complete history of the RCS document.
19175  The output of 
19176 \family typewriter
19177 rlog <file-name>
19178 \family default
19179  is shown in a browser.
19180  See 
19181 \family typewriter
19182 man rlog
19183 \family default
19184  for more info.
19185 \end_layout
19186
19187 \begin_layout Subsubsection
19188 Revision info
19189 \end_layout
19190
19191 \begin_layout Standard
19192 LyX supports RCS version number, author name, date and time of last commit.
19193  All those are extracted from 
19194 \family typewriter
19195 rlog -r <file-name>
19196 \family default
19197 .
19198  For other details see 
19199 \begin_inset CommandInset ref
19200 LatexCommand ref
19201 reference "sub:VCS-Revision-Information"
19202
19203 \end_inset
19204
19205  for details.
19206 \end_layout
19207
19208 \begin_layout Subsection
19209 CVS commands in LyX
19210 \end_layout
19211
19212 \begin_layout Standard
19213 A subset of CVS operations is supported by LyX.
19214  You can find the commands in the 
19215 \family sans
19216 File\SpecialChar \menuseparator
19217 Version
19218 \begin_inset space ~
19219 \end_inset
19220
19221 Control
19222 \family default
19223  submenu.
19224  The version control system SVN is more powerful, so please use it instead
19225  of CVS if possible.
19226 \end_layout
19227
19228 \begin_layout Subsubsection
19229
19230 \family sans
19231 General CVS usage
19232 \end_layout
19233
19234 \begin_layout Standard
19235 If you start from scratch with CVS you have to create your repository and
19236  checkout the working copy with external tools.
19237  If you're using a client-server setup you may need to login before doing
19238  the first repository checkout.
19239 \end_layout
19240
19241 \begin_layout Standard
19242 If your documents are under revision control and others are using the same
19243  repository problems arise when different changes to the same document at
19244  the same location happen.
19245  Standard CVS repositories doesn't operate with a file locking mechanism.
19246  This may be surprising, but conflicts only occur if people disagree on
19247  the proper content of the same part of a document.
19248  So, if co-workers are used to communicate regularly, these conflicts occur
19249  rarely.
19250  If they don't communicate they have a fundamental problem anyway.
19251  Nevertheless some people like to work with so called 
19252 \begin_inset Quotes eld
19253 \end_inset
19254
19255 reserved checkouts
19256 \begin_inset Quotes erd
19257 \end_inset
19258
19259 .
19260  If they do so the working copy of all files is readonly when checked out
19261  first and the user starts editing after using a special command to make
19262  the working copy writable.
19263  When the changes are checked in the working copy returns to readonly state.
19264  With LyX one has to edit the 
19265 \begin_inset Flex Code
19266 status collapsed
19267
19268 \begin_layout Plain Layout
19269 .cvsrc
19270 \end_layout
19271
19272 \end_inset
19273
19274  file and add the line 
19275 \begin_inset Flex Code
19276 status collapsed
19277
19278 \begin_layout Plain Layout
19279 cvs -r
19280 \end_layout
19281
19282 \end_inset
19283
19284  to work with reserved checkouts.
19285  The benefit is the possibility to see who is using a writable copy of some
19286  document.
19287  It's not guaranteed only one user makes a copy writable.
19288 \end_layout
19289
19290 \begin_layout Standard
19291 LyX tries to guess if you're using reserved or non-reserved checkouts.
19292  If your working copy is readonly or it is writable and an additional copy
19293  of your document exists in the CVS/Base sub-directory a reserved otherwise
19294  a non-reserved checkout is assumed.
19295  When a reserved checkout is detected you have to use 
19296 \begin_inset Flex MenuItem
19297 status collapsed
19298
19299 \begin_layout Plain Layout
19300 Check Out
19301 \end_layout
19302
19303 \end_inset
19304
19305  to make your working copy writable if it's readonly.
19306  After doing so the 
19307 \begin_inset Flex MenuItem
19308 status collapsed
19309
19310 \begin_layout Plain Layout
19311 Check In
19312 \end_layout
19313
19314 \end_inset
19315
19316  operation is possible and that makes your working copy readonly again after
19317  transferring your changes to the repository.
19318 \end_layout
19319
19320 \begin_layout Standard
19321 More information about CVS can be found here 
19322 \begin_inset Flex URL
19323 status collapsed
19324
19325 \begin_layout Plain Layout
19326
19327 http://www.nongnu.org/cvs
19328 \end_layout
19329
19330 \end_inset
19331
19332  and here 
19333 \begin_inset Flex URL
19334 status collapsed
19335
19336 \begin_layout Plain Layout
19337
19338 http://ximbiot.com/cvs
19339 \end_layout
19340
19341 \end_inset
19342
19343 .
19344 \end_layout
19345
19346 \begin_layout Standard
19347 Read 
19348 \family typewriter
19349 man cvs
19350 \family default
19351  to understand the sub-commands and the switches mentioned below.
19352 \end_layout
19353
19354 \begin_layout Subsubsection
19355
19356 \family sans
19357 Register
19358 \end_layout
19359
19360 \begin_layout Standard
19361 If your document is not under revision control, this is the only item shown
19362  in the menu.
19363  And if it is under revision control, the 
19364 \family sans
19365 \bar under
19366 R
19367 \bar default
19368 egister
19369 \family default
19370  item is not visible.
19371  
19372 \end_layout
19373
19374 \begin_layout Standard
19375 This command registers in CVS your document 
19376 \begin_inset Flex Strong
19377 status collapsed
19378
19379 \begin_layout Plain Layout
19380
19381 \emph on
19382 only
19383 \end_layout
19384
19385 \end_inset
19386
19387  in the case you have already the documents directory under CVS control
19388  (in particular 
19389 \family typewriter
19390 CVS/Entries
19391 \family default
19392  file exists).
19393  This means you have to create or checkout the archive by yourself using
19394  external tools.
19395  (In case you forget that step LyX registers the document with RCS.)
19396 \end_layout
19397
19398 \begin_layout Standard
19399 Then you are asked interactively to supply an initial description of the
19400  document.
19401  Don't forget that registered file is not yet checked in.
19402 \end_layout
19403
19404 \begin_layout Standard
19405 CVS command that is run: 
19406 \family typewriter
19407 cvs -q add -m"<entered message>" "<file-name>"
19408 \end_layout
19409
19410 \begin_layout Standard
19411 The term 
19412 \family typewriter
19413 "<file-name>"
19414 \family default
19415  above and for all other CVS commands is an abbreviation for 
19416 \begin_inset Quotes eld
19417 \end_inset
19418
19419 change the current working directory to file location and use the file name
19420  without path component as argument
19421 \begin_inset Quotes erd
19422 \end_inset
19423
19424 .
19425 \end_layout
19426
19427 \begin_layout Subsubsection
19428
19429 \family sans
19430 Check In Changes
19431 \end_layout
19432
19433 \begin_layout Standard
19434 When you are finished editing a file, you commit your changes.
19435  When you do this and you had changed the document, you are asked for a
19436  description of the changes.
19437  After that changes are written to the repository.
19438  In case you didn't change the document and a reserved checkout is detected
19439  the reservation made on 
19440 \begin_inset Flex MenuItem
19441 status collapsed
19442
19443 \begin_layout Plain Layout
19444 Check Out
19445 \end_layout
19446
19447 \end_inset
19448
19449  is undone.
19450 \end_layout
19451
19452 \begin_layout Labeling
19453 \labelwidthstring 00.00.0000
19454 CVS
19455 \begin_inset space ~
19456 \end_inset
19457
19458 command: 
19459 \begin_inset space ~
19460 \end_inset
19461
19462
19463 \begin_inset Newline newline
19464 \end_inset
19465
19466
19467 \begin_inset Flex Code
19468 status collapsed
19469
19470 \begin_layout Plain Layout
19471 cvs 
19472 \family typewriter
19473 -q commit -m"<description>" "<file-name>"
19474 \end_layout
19475
19476 \end_inset
19477
19478  or
19479 \begin_inset Newline newline
19480 \end_inset
19481
19482
19483 \begin_inset Flex Code
19484 status collapsed
19485
19486 \begin_layout Plain Layout
19487 cvs -q unedit 
19488 \family typewriter
19489 "<file-name>"
19490 \end_layout
19491
19492 \end_inset
19493
19494
19495 \end_layout
19496
19497 \begin_layout Subsubsection
19498
19499 \family sans
19500 Check Out Changes
19501 \end_layout
19502
19503 \begin_layout Standard
19504 When you are sharing a repository with others, you may have to incorporate
19505  their changes into your working copy.
19506 \end_layout
19507
19508 \begin_layout Standard
19509 CVS command: 
19510 \family typewriter
19511 cvs -q update "<file-name>"
19512 \end_layout
19513
19514 \begin_layout Standard
19515 If a readonly checkout is detected the working copy is made writable and
19516  reserved.
19517 \end_layout
19518
19519 \begin_layout Standard
19520 CVS command: 
19521 \family typewriter
19522 cvs -q edit "<file-name>"
19523 \end_layout
19524
19525 \begin_layout Subsubsection
19526
19527 \family sans
19528 Revert To Repository Version
19529 \end_layout
19530
19531 \begin_layout Standard
19532 This will discard all changes made to the document since the last check
19533  in.
19534  You get a warning before changes are discarded.
19535  Firstly the file is deleted, secondly CVS update command is run.
19536 \end_layout
19537
19538 \begin_layout Standard
19539 CVS command: 
19540 \family typewriter
19541 cvs -q update "<file-name>"
19542 \end_layout
19543
19544 \begin_layout Standard
19545 If a reserved checkout is detected and the working copy has no changes only
19546  the reservation is undone.
19547 \end_layout
19548
19549 \begin_layout Standard
19550 CVS command: 
19551 \family typewriter
19552 cvs -q unedit "<file-name>"
19553 \end_layout
19554
19555 \begin_layout Subsubsection
19556 Update of the local directory checkout from repository
19557 \end_layout
19558
19559 \begin_layout Standard
19560 Once your documents gets more complex, containing sub-documents and pictures,
19561  including external 
19562 \begin_inset Flex Code
19563 status collapsed
19564
19565 \begin_layout Plain Layout
19566 .tex
19567 \end_layout
19568
19569 \end_inset
19570
19571  files and so on using version control becomes more complicated.
19572  LyX supports updating the whole tree in which resides the document.
19573  This become especially useful once you cooperate with people which neither
19574  have detailed knowledge about CVS usage nor they have ambition to commit
19575  additional material to the repository.
19576  You have to organize the files structure so that all external files are
19577  in the same directory or subdirectories of the document.
19578  It's good practice anyway to store multipart documents in an extra directory.
19579 \end_layout
19580
19581 \begin_layout Standard
19582 The 
19583 \begin_inset Flex Code
19584 status collapsed
19585
19586 \begin_layout Plain Layout
19587 Update local directory from repository
19588 \end_layout
19589
19590 \end_inset
19591
19592  command updates the whole directory.
19593  If local changes are detected user is warned before update starts.
19594  In case of merge conflicts both versions of the conflicting document parts
19595  are placed in the final document.
19596  You have to review and correct the result of the merge.
19597  You'll find the conflicts enclosed in pairs of 
19598 \begin_inset Flex Code
19599 status collapsed
19600
19601 \begin_layout Plain Layout
19602 <<<<<<<
19603 \end_layout
19604
19605 \end_inset
19606
19607  and 
19608 \begin_inset Flex Code
19609 status collapsed
19610
19611 \begin_layout Plain Layout
19612 >>>>>>>
19613 \end_layout
19614
19615 \end_inset
19616
19617  separated by 
19618 \begin_inset Flex Code
19619 status collapsed
19620
19621 \begin_layout Plain Layout
19622 =======
19623 \end_layout
19624
19625 \end_inset
19626
19627 .
19628  The first part is your version as before the update operation with the
19629  document name prepended.
19630  The second one is the repository version with the version number after
19631  the sequence of 
19632 \begin_inset Flex Code
19633 status collapsed
19634
19635 \begin_layout Plain Layout
19636 >
19637 \end_layout
19638
19639 \end_inset
19640
19641  signs.
19642 \end_layout
19643
19644 \begin_layout Labeling
19645 \labelwidthstring 00.00.0000
19646 CVS
19647 \begin_inset space ~
19648 \end_inset
19649
19650 commands: 
19651 \begin_inset space ~
19652 \end_inset
19653
19654
19655 \begin_inset Newline newline
19656 \end_inset
19657
19658
19659 \begin_inset Flex Code
19660 status collapsed
19661
19662 \begin_layout Plain Layout
19663 cd $path; cvs diff 
19664 \family typewriter
19665 "."
19666 \end_layout
19667
19668 \end_inset
19669
19670  (Ask if changes are detected.)
19671 \begin_inset Newline newline
19672 \end_inset
19673
19674
19675 \begin_inset Flex Code
19676 status collapsed
19677
19678 \begin_layout Plain Layout
19679 cd $path; cvs -q update 
19680 \family typewriter
19681 "."
19682 \end_layout
19683
19684 \end_inset
19685
19686
19687 \end_layout
19688
19689 \begin_layout Standard
19690 where 
19691 \begin_inset Flex Code
19692 status collapsed
19693
19694 \begin_layout Plain Layout
19695 $path
19696 \end_layout
19697
19698 \end_inset
19699
19700  stands for the path to the document.
19701 \end_layout
19702
19703 \begin_layout Subsubsection
19704
19705 \family sans
19706 Show History
19707 \end_layout
19708
19709 \begin_layout Standard
19710 This shows the complete history of the CVS document.
19711  The output of 
19712 \family typewriter
19713 cvs log "<file-name>"
19714 \family default
19715  is shown in a browser.
19716 \end_layout
19717
19718 \begin_layout Subsection
19719 SVN commands in LyX
19720 \end_layout
19721
19722 \begin_layout Standard
19723 SVN is now partially supported by LyX.
19724  You can find the commands in the 
19725 \family sans
19726 File\SpecialChar \menuseparator
19727 Version
19728 \begin_inset space ~
19729 \end_inset
19730
19731 Control
19732 \family default
19733  submenu.
19734  Please note that if you use password protected access to repository via
19735  ssh, you will be asked in terminal window.
19736  LyX was tested against SVN 1.5 and 1.6
19737 \begin_inset Foot
19738 status open
19739
19740 \begin_layout Plain Layout
19741 Most of the commands will work with 1.4 too, see 
19742 \begin_inset CommandInset ref
19743 LatexCommand ref
19744 reference "sub:SVN-Repo-Update"
19745
19746 \end_inset
19747
19748 .
19749 \end_layout
19750
19751 \end_inset
19752
19753
19754 \end_layout
19755
19756 \begin_layout Subsubsection
19757
19758 \family sans
19759 Register
19760 \end_layout
19761
19762 \begin_layout Standard
19763 If your document is not under revision control, this is the only item shown
19764  in the menu.
19765  And if it is under revision control, the 
19766 \family sans
19767 \bar under
19768 R
19769 \bar default
19770 egister
19771 \family default
19772  item is not visible.
19773  
19774 \end_layout
19775
19776 \begin_layout Standard
19777 This command registers in SVN your document ONLY in case you have already
19778  the documents directory under SVN control (in particular 
19779 \family typewriter
19780 .svn/entries
19781 \family default
19782  file exists).
19783  This means you have to checkout the archive by yourself.
19784  
19785 \end_layout
19786
19787 \begin_layout Standard
19788 Then you are asked interactively to supply an initial description of the
19789  document.
19790  Don't forget that registered file is not yet commited.
19791 \end_layout
19792
19793 \begin_layout Standard
19794 SVN command that is run: 
19795 \family typewriter
19796 svn add -q 
19797 \begin_inset Quotes eld
19798 \end_inset
19799
19800 <file-name>
19801 \begin_inset Quotes erd
19802 \end_inset
19803
19804
19805 \end_layout
19806
19807 \begin_layout Standard
19808 Read 
19809 \family typewriter
19810 man svn
19811 \family default
19812  to understand the switches.
19813  
19814 \end_layout
19815
19816 \begin_layout Subsubsection
19817
19818 \family sans
19819 Check In Changes
19820 \end_layout
19821
19822 \begin_layout Standard
19823 When you are finished editing a file, you commit your changes.
19824  When you do this, you are asked for a description of the changes.
19825  After that changes are commited.
19826 \end_layout
19827
19828 \begin_layout Standard
19829 SVN command:
19830 \begin_inset Foot
19831 status collapsed
19832
19833 \begin_layout Plain Layout
19834 In case locking is not enabled.
19835  See Section 
19836 \begin_inset CommandInset ref
19837 LatexCommand ref
19838 reference "subsec:SVN-File-Locking"
19839
19840 \end_inset
19841
19842 .
19843 \end_layout
19844
19845 \end_inset
19846
19847  
19848 \family typewriter
19849 svn commit -q -m"<description>" <file-name>
19850 \end_layout
19851
19852 \begin_layout Subsubsection
19853
19854 \family sans
19855 Check Out For Edit
19856 \end_layout
19857
19858 \begin_layout Standard
19859 Updates the changes of this file from the repository.
19860  Be sure you understand SVN merging and conflicts resolving before using
19861  this function, because all conflicts has to be resolved manually by you!
19862 \end_layout
19863
19864 \begin_layout Standard
19865 SVN command:
19866 \begin_inset Foot
19867 status collapsed
19868
19869 \begin_layout Plain Layout
19870 Ditto.
19871 \end_layout
19872
19873 \end_inset
19874
19875  
19876 \family typewriter
19877 svn update --non-interactive 
19878 \begin_inset Quotes eld
19879 \end_inset
19880
19881 <file-name>
19882 \begin_inset Quotes erd
19883 \end_inset
19884
19885
19886 \end_layout
19887
19888 \begin_layout Subsubsection
19889
19890 \family sans
19891 Revert To Repository Version
19892 \end_layout
19893
19894 \begin_layout Standard
19895 This will discard all changes made to the document since the last check
19896  in.
19897  You get a warning before changes are discarded.
19898  
19899 \end_layout
19900
19901 \begin_layout Standard
19902 SVN command: 
19903 \family typewriter
19904 svn revert -q 
19905 \begin_inset Quotes eld
19906 \end_inset
19907
19908 <file-name>
19909 \begin_inset Quotes erd
19910 \end_inset
19911
19912
19913 \end_layout
19914
19915 \begin_layout Subsubsection
19916 \begin_inset CommandInset label
19917 LatexCommand label
19918 name "sub:SVN-Repo-Update"
19919
19920 \end_inset
19921
19922 Update of the local directory checkout from repository
19923 \begin_inset Foot
19924 status collapsed
19925
19926 \begin_layout Plain Layout
19927 Note that this command will work only with subversion 
19928 \begin_inset Formula $\geqq1.5$
19929 \end_inset
19930
19931
19932 \end_layout
19933
19934 \end_inset
19935
19936
19937 \end_layout
19938
19939 \begin_layout Standard
19940 All the commands above have one shortcomming - they deal with the current
19941  document only.
19942  Once your document contains pictures, includes external 
19943 \begin_inset Flex Code
19944 status collapsed
19945
19946 \begin_layout Plain Layout
19947 .tex
19948 \end_layout
19949
19950 \end_inset
19951
19952  files and so on administration becomes more complicated.
19953  LyX now supports updating the whole tree in which resides the document
19954 \begin_inset Foot
19955 status collapsed
19956
19957 \begin_layout Plain Layout
19958 One need to organize the files structure so that all external files are
19959  in the same directory or subdirectories of the document.
19960  
19961 \end_layout
19962
19963 \end_inset
19964
19965 .
19966  This become especially useful once you cooperate with people which neither
19967  know about subversion management nor they have ambition to commit additional
19968  material to the repository.
19969  
19970 \end_layout
19971
19972 \begin_layout Standard
19973 \begin_inset Flex Code
19974 status collapsed
19975
19976 \begin_layout Plain Layout
19977 Update local directory from repository
19978 \end_layout
19979
19980 \end_inset
19981
19982  command updates the whole directory and in case of merge conflicts local
19983  version of the files are left, so no unintended data loss occurs.
19984  If local changes are detected user is warned before update starts.
19985 \end_layout
19986
19987 \begin_layout Labeling
19988 \labelwidthstring 00.00.0000
19989 SVN
19990 \begin_inset space ~
19991 \end_inset
19992
19993 commands: 
19994 \begin_inset space ~
19995 \end_inset
19996
19997
19998 \begin_inset Newline newline
19999 \end_inset
20000
20001
20002 \begin_inset Flex Code
20003 status collapsed
20004
20005 \begin_layout Plain Layout
20006 svn diff $path
20007 \end_layout
20008
20009 \end_inset
20010
20011  (Ask if changes are detected.)
20012 \begin_inset Newline newline
20013 \end_inset
20014
20015
20016 \begin_inset Flex Code
20017 status collapsed
20018
20019 \begin_layout Plain Layout
20020 svn update --accept mine-full $path
20021 \end_layout
20022
20023 \end_inset
20024
20025
20026 \end_layout
20027
20028 \begin_layout Standard
20029 where 
20030 \begin_inset Flex Code
20031 status collapsed
20032
20033 \begin_layout Plain Layout
20034 $path
20035 \end_layout
20036
20037 \end_inset
20038
20039  stands for the path to the document.
20040 \end_layout
20041
20042 \begin_layout Subsubsection
20043
20044 \family sans
20045 Show History
20046 \end_layout
20047
20048 \begin_layout Standard
20049 This shows the complete history of the SVN document.
20050  The output of 
20051 \family typewriter
20052 svn log 
20053 \begin_inset Quotes eld
20054 \end_inset
20055
20056 <file-name>
20057 \begin_inset Quotes erd
20058 \end_inset
20059
20060
20061 \family default
20062  is shown in a browser.
20063 \end_layout
20064
20065 \begin_layout Subsubsection
20066 File Locking
20067 \begin_inset CommandInset label
20068 LatexCommand label
20069 name "subsec:SVN-File-Locking"
20070
20071 \end_inset
20072
20073
20074 \end_layout
20075
20076 \begin_layout Standard
20077 The file exchange through various revision control systems brings the problem
20078  of merge conflicts in case two different users try to edit the same (parts
20079  of) document.
20080  When such a conflict happens it needs manual resolving and one reasonable
20081  alternative is to provide some kind of locking mechanism, which guarantees
20082  that only one user is allowed to edit file at the given time.
20083 \end_layout
20084
20085 \begin_layout Standard
20086 SVN has two such mechanisms to provide mutual exclusivity for file access
20087  - locks and automatic setting of write permissions (see sec.
20088  
20089 \begin_inset CommandInset ref
20090 LatexCommand ref
20091 reference "subsec:Automatical-Locking-Property"
20092
20093 \end_inset
20094
20095 ) based on 
20096 \begin_inset Flex Code
20097 status collapsed
20098
20099 \begin_layout Plain Layout
20100 svn:needs-lock
20101 \end_layout
20102
20103 \end_inset
20104
20105  file svn property
20106 \begin_inset Foot
20107 status open
20108
20109 \begin_layout Plain Layout
20110 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20111 \end_layout
20112
20113 \end_inset
20114
20115 .
20116  If this property is detected for a given document LyX starts to use SVN
20117  locks for document editing automatically and the whole check-in/out mechanism
20118  switches to the same regimen as for RCS.
20119  This in particular means there are two different modes of file use in LyX:
20120 \end_layout
20121
20122 \begin_layout Itemize
20123 Unlocked state.
20124  The loaded file is in the read-only mode.
20125  For editing on needs to check-out.
20126  
20127 \emph on
20128 Check-out
20129 \emph default
20130  consists of updating from the repository and gaining write lock.
20131  If the lock is not possible to obtain, we remain in unlocked state.
20132 \end_layout
20133
20134 \begin_layout Itemize
20135 Locked state.
20136  The loaded file is in the 'normal' edit mode.
20137  No other user is allowed to edit the file.
20138  
20139 \emph on
20140 Check-in
20141 \emph default
20142  consists of commiting changes and releasing write-lock.
20143  If no changes have been made to the document, no commit will be produced
20144 \begin_inset Foot
20145 status collapsed
20146
20147 \begin_layout Plain Layout
20148 Don't be puzzled by the fact that you will be asked for commit message anyway.
20149 \end_layout
20150
20151 \end_inset
20152
20153  and only the write-lock will be released.
20154 \end_layout
20155
20156 \begin_layout Standard
20157 SVN commands:
20158 \end_layout
20159
20160 \begin_layout Labeling
20161 \labelwidthstring 00.00.0000
20162 Check-in:
20163 \family typewriter
20164  svn commit -q -m"<description>" "<file-name>"
20165 \begin_inset Newline newline
20166 \end_inset
20167
20168 svn unlock "<file-name>"
20169 \end_layout
20170
20171 \begin_layout Labeling
20172 \labelwidthstring 00.00.0000
20173 Check-out: 
20174 \family typewriter
20175 svn update "<file-name>"
20176 \begin_inset Newline newline
20177 \end_inset
20178
20179 svn lock "<file-name>"
20180 \end_layout
20181
20182 \begin_layout Subsubsection
20183
20184 \family typewriter
20185 \begin_inset CommandInset label
20186 LatexCommand label
20187 name "subsec:Automatical-Locking-Property"
20188
20189 \end_inset
20190
20191
20192 \family default
20193 Automatic Locking Property
20194 \end_layout
20195
20196 \begin_layout Standard
20197 The above mentioned automatic setting of write permissions of the .lyx file
20198  can be set through
20199 \family sans
20200 \bar under
20201  F
20202 \bar default
20203 ile\SpecialChar \menuseparator
20204
20205 \bar under
20206 V
20207 \bar default
20208 ersion
20209 \begin_inset space ~
20210 \end_inset
20211
20212 Control\SpecialChar \menuseparator
20213
20214 \bar under
20215 T
20216 \bar default
20217 oggle locking property
20218 \family default
20219 .
20220  This command is active only when the file is not locked on the svn server
20221  (i.e.
20222  you need to check-out before proceeding).
20223 \end_layout
20224
20225 \begin_layout Labeling
20226 \labelwidthstring 00.00.0000
20227 SVN
20228 \begin_inset space ~
20229 \end_inset
20230
20231 commands:
20232 \end_layout
20233
20234 \begin_layout Labeling
20235 \labelwidthstring 00.00.0000
20236 Set:
20237 \family typewriter
20238  svn propset svn:needs-lock ON "<file-name>"
20239 \end_layout
20240
20241 \begin_layout Labeling
20242 \labelwidthstring 00.00.0000
20243 Unset: 
20244 \family typewriter
20245 svn propdel svn:needs-lock "<file-name>"
20246 \end_layout
20247
20248 \begin_layout Subsubsection
20249 \begin_inset CommandInset label
20250 LatexCommand label
20251 name "sub:VCS-Revision-Information"
20252
20253 \end_inset
20254
20255 Revision Information in Documents
20256 \end_layout
20257
20258 \begin_layout Standard
20259 There are more possibilities how to activate revision information in our
20260  document.
20261 \end_layout
20262
20263 \begin_layout Itemize
20264 LyX supports directly:
20265 \end_layout
20266
20267 \begin_deeper
20268 \begin_layout Itemize
20269 tree revision information (
20270 \begin_inset Flex Code
20271 status collapsed
20272
20273 \begin_layout Plain Layout
20274 vcs-tree-revision
20275 \end_layout
20276
20277 \end_inset
20278
20279 ).
20280  The result is the output of the 
20281 \begin_inset Flex Code
20282 status collapsed
20283
20284 \begin_layout Plain Layout
20285 svnversion
20286 \end_layout
20287
20288 \end_inset
20289
20290  command, the following table gives you an idea, how to read the results.
20291 \end_layout
20292
20293 \begin_layout Standard
20294 \align center
20295 \begin_inset Tabular
20296 <lyxtabular version="3" rows="6" columns="2">
20297 <features rotate="0" tabularvalignment="middle">
20298 <column alignment="center" valignment="top" width="0">
20299 <column alignment="center" valignment="top" width="0">
20300 <row>
20301 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20302 \begin_inset Text
20303
20304 \begin_layout Plain Layout
20305 Output
20306 \end_layout
20307
20308 \end_inset
20309 </cell>
20310 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20311 \begin_inset Text
20312
20313 \begin_layout Plain Layout
20314 Meaning
20315 \end_layout
20316
20317 \end_inset
20318 </cell>
20319 </row>
20320 <row>
20321 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20322 \begin_inset Text
20323
20324 \begin_layout Plain Layout
20325 4123:4168
20326 \end_layout
20327
20328 \end_inset
20329 </cell>
20330 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20331 \begin_inset Text
20332
20333 \begin_layout Plain Layout
20334 mixed revision working copy
20335 \end_layout
20336
20337 \end_inset
20338 </cell>
20339 </row>
20340 <row>
20341 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20342 \begin_inset Text
20343
20344 \begin_layout Plain Layout
20345 4168M
20346 \end_layout
20347
20348 \end_inset
20349 </cell>
20350 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20351 \begin_inset Text
20352
20353 \begin_layout Plain Layout
20354 modified working copy
20355 \end_layout
20356
20357 \end_inset
20358 </cell>
20359 </row>
20360 <row>
20361 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20362 \begin_inset Text
20363
20364 \begin_layout Plain Layout
20365 4123S
20366 \end_layout
20367
20368 \end_inset
20369 </cell>
20370 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20371 \begin_inset Text
20372
20373 \begin_layout Plain Layout
20374 switched working copy
20375 \end_layout
20376
20377 \end_inset
20378 </cell>
20379 </row>
20380 <row>
20381 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20382 \begin_inset Text
20383
20384 \begin_layout Plain Layout
20385 4123P
20386 \end_layout
20387
20388 \end_inset
20389 </cell>
20390 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20391 \begin_inset Text
20392
20393 \begin_layout Plain Layout
20394 partial working copy, from a sparse checkout
20395 \end_layout
20396
20397 \end_inset
20398 </cell>
20399 </row>
20400 <row>
20401 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20402 \begin_inset Text
20403
20404 \begin_layout Plain Layout
20405 4123:4168MS
20406 \end_layout
20407
20408 \end_inset
20409 </cell>
20410 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20411 \begin_inset Text
20412
20413 \begin_layout Plain Layout
20414 mixed revision, modified, switched working copy
20415 \end_layout
20416
20417 \end_inset
20418 </cell>
20419 </row>
20420 </lyxtabular>
20421
20422 \end_inset
20423
20424
20425 \end_layout
20426
20427 \begin_layout Itemize
20428 file revision information.
20429  The result comes from parsing the output of 
20430 \begin_inset Flex Code
20431 status collapsed
20432
20433 \begin_layout Plain Layout
20434 svn
20435 \begin_inset space ~
20436 \end_inset
20437
20438 info
20439 \begin_inset space ~
20440 \end_inset
20441
20442 --xml
20443 \begin_inset space ~
20444 \end_inset
20445
20446 file.lyx
20447 \end_layout
20448
20449 \end_inset
20450
20451 .
20452  Supported flags are:
20453 \end_layout
20454
20455 \begin_deeper
20456 \begin_layout Itemize
20457 version number of the last commit (
20458 \begin_inset Flex Code
20459 status collapsed
20460
20461 \begin_layout Plain Layout
20462 vcs-revision
20463 \end_layout
20464
20465 \end_inset
20466
20467 )
20468 \end_layout
20469
20470 \begin_layout Itemize
20471 author of the last commit (
20472 \begin_inset Flex Code
20473 status collapsed
20474
20475 \begin_layout Plain Layout
20476 vcs-author
20477 \end_layout
20478
20479 \end_inset
20480
20481 )
20482 \end_layout
20483
20484 \begin_layout Itemize
20485 date of the last commit (
20486 \begin_inset Flex Code
20487 status collapsed
20488
20489 \begin_layout Plain Layout
20490 vcs-date
20491 \end_layout
20492
20493 \end_inset
20494
20495 )
20496 \end_layout
20497
20498 \begin_layout Itemize
20499 time of the last commit (
20500 \begin_inset Flex Code
20501 status collapsed
20502
20503 \begin_layout Plain Layout
20504 vcs-time
20505 \end_layout
20506
20507 \end_inset
20508
20509 )
20510 \end_layout
20511
20512 \end_deeper
20513 \begin_layout Standard
20514 You can obtain this info via InsetInfo (e.g.
20515  
20516 \begin_inset Flex Code
20517 status collapsed
20518
20519 \begin_layout Plain Layout
20520 info-insert buffer vcs-date
20521 \end_layout
20522
20523 \end_inset
20524
20525 ).
20526  The information will be available only when you have the file stored under
20527  svn managment (i.e.
20528  the 
20529 \begin_inset Flex Code
20530 status collapsed
20531
20532 \begin_layout Plain Layout
20533 .svn
20534 \end_layout
20535
20536 \end_inset
20537
20538  directory is available with your document).
20539 \end_layout
20540
20541 \end_deeper
20542 \begin_layout Itemize
20543 Another---a hacking one---possibility is to use svn keywords
20544 \begin_inset Foot
20545 status collapsed
20546
20547 \begin_layout Plain Layout
20548 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20549 \end_layout
20550
20551 \end_inset
20552
20553 .
20554  In short -- you set file keywords property (e.g.
20555  
20556 \family sans
20557 svn propset svn:keywords 'Rev' file.lyx
20558 \family default
20559 ) and then paste keyword TeX code
20560 \begin_inset Foot
20561 status collapsed
20562
20563 \begin_layout Plain Layout
20564 This is an easy way how to ensure that LyX won't break the line in the middle
20565  of keyword tag.
20566 \end_layout
20567
20568 \end_inset
20569
20570  tag in your document (e.g.
20571  
20572 \begin_inset ERT
20573 status open
20574
20575 \begin_layout Plain Layout
20576
20577 $Rev$
20578 \end_layout
20579
20580 \end_inset
20581
20582 ).
20583  This way svn client will automatically substitute revision number (e.g.
20584  
20585 \begin_inset ERT
20586 status open
20587
20588 \begin_layout Plain Layout
20589
20590 $Rev: 59 $
20591 \end_layout
20592
20593 \end_inset
20594
20595 ) after each update and commit.
20596  There are more problems with this approach.
20597  Firstly, the '$' character is used in TeX world for math equations, so
20598  any occurence of math formula 
20599 \begin_inset Formula $Rev$
20600 \end_inset
20601
20602  become 
20603 \begin_inset Formula $Rev:59$
20604 \end_inset
20605
20606  in your LyX document.
20607  Similarly for other keywords like Id, Date, Author, etc.
20608  Secondly svn output is dependent on your locales, so its very easy that
20609  svn would produce some problematic strings once Date is used.
20610  Thirdly you get the whole 'Rev: 59' string in your document instead of
20611  the plain number.
20612  Until subversion implements user's custom keywords it will be hard to use
20613  this approach reliably or let LyX to support it directly.
20614 \end_layout
20615
20616 \begin_layout Subsection
20617 SVN and Windows Environment
20618 \end_layout
20619
20620 \begin_layout Quote
20621 My inclination is to say that if the user cannot figure out the command
20622  line operations on their own fairly quickly, they would be well advised
20623  to use TortoiseSVN.
20624  ---P.
20625  A.
20626  Rubin
20627 \end_layout
20628
20629 \begin_layout Subsubsection
20630 Preparation
20631 \end_layout
20632
20633 \begin_layout Standard
20634 In addition to installing LyX, and having access to a Subversion repository,
20635  the user will need to install the Subversion client program.
20636  A Windows installer for the client program is available from 
20637 \begin_inset CommandInset href
20638 LatexCommand href
20639 name "CollabNet"
20640 target "http://www.collab.net/nonav/downloads/subversion/"
20641
20642 \end_inset
20643
20644 .
20645  The user may also want to install 
20646 \begin_inset CommandInset href
20647 LatexCommand href
20648 name "TortoiseSVN"
20649 target "http://tortoisesvn.tigris.org/"
20650
20651 \end_inset
20652
20653 , which integrates Subversion operations into the context (rightclick) menu
20654  of Windows Explorer.
20655  Operations done outside LyX will typically be more convenient using the
20656  Explorer context menu.
20657  Note that TortoiseSVN is not a replacement for the client program, which
20658  is what LyX itself will use.
20659 \end_layout
20660
20661 \begin_layout Subsubsection
20662 Bringing a document under Subversion control
20663 \end_layout
20664
20665 \begin_layout Standard
20666 Before a LyX document can be brought under version control in Subversion,
20667  its parent directory needs to be under version control.
20668  If the document is being added to a project already in the repository,
20669  this is accomplished by checking the project out to the directory where
20670  the new document will be placed.
20671  If the project itself is not yet under version control (for instance, if
20672  this document starts a new project), the directory must be imported into
20673  the repository.
20674  This is done outside LyX.
20675  Both import and checkout are easily accomplished from the Explorer context
20676  menu using TortoiseSVN, or alternatively can be done using the command
20677  line client at a DOS prompt.
20678  The procedure for importing the project using TortoiseSVN is described
20679  below, assuming an existing repository and a new project being started
20680  in 
20681 \family typewriter
20682 C:
20683 \backslash
20684 new project
20685 \family default
20686 .
20687  For information on using the Subversion client program, run 
20688 \family typewriter
20689 svn --help 
20690 \family default
20691 in a DOS shell.
20692 \end_layout
20693
20694 \begin_layout Enumerate
20695 Locate 
20696 \family typewriter
20697 C:
20698 \backslash
20699 new project 
20700 \family default
20701 in Windows Explorer, right click it, and select 
20702 \family typewriter
20703 TortoiseSVN > Repo-browser
20704 \family default
20705 .
20706  If necessary, adjust the URL for the repository, then click OK.
20707 \end_layout
20708
20709 \begin_layout Enumerate
20710 Right click the level of the repository under which you want to place the
20711  new project folder (typically the top level) and click 
20712 \family typewriter
20713 Create folder\SpecialChar \ldots{}
20714
20715 \family default
20716  Supply a name for the project folder and click OK.
20717  Add a message for the log file if desired, then click OK again.
20718  The new project folder should appear in the repository.
20719  Finally, click OK again to exit the repository browser.
20720 \end_layout
20721
20722 \begin_layout Enumerate
20723 Once again right click 
20724 \family typewriter
20725 C:
20726 \backslash
20727 new project
20728 \family default
20729 , this time selecting SVN Checkout\SpecialChar \ldots{}
20730  Select the URL of the project folder
20731  you just created in the repository, and set the checkout directory to 
20732 \family typewriter
20733 C:
20734 \backslash
20735 new project.
20736
20737 \family default
20738  Click OK.
20739  You will be warned about a non-empty folder; click OK to proceed.
20740  You should now have a 
20741 \family typewriter
20742 .svn
20743 \family default
20744  directory under 
20745 \family typewriter
20746 C:
20747 \backslash
20748 new project.
20749 \end_layout
20750
20751 \begin_layout Enumerate
20752 Create or open your document in LyX and click 
20753 \family sans
20754 \bar under
20755 F
20756 \bar default
20757 ile\SpecialChar \menuseparator
20758
20759 \bar under
20760 V
20761 \bar default
20762 ersion
20763 \begin_inset space ~
20764 \end_inset
20765
20766 Control\SpecialChar \menuseparator
20767
20768 \bar under
20769 R
20770 \bar default
20771 egister.
20772  
20773 \family default
20774 Add a log message and click OK to commit the document to version control.
20775 \end_layout
20776
20777 \begin_layout Standard
20778 From this point onward, you should have full functionality in the 
20779 \family sans
20780 \bar under
20781 F
20782 \bar default
20783 ile\SpecialChar \menuseparator
20784
20785 \bar under
20786 V
20787 \bar default
20788 ersion
20789 \begin_inset space ~
20790 \end_inset
20791
20792 Control
20793 \family default
20794  menu.
20795  You also have the option of checking the document in and out, viewing its
20796  history, etc.
20797  using the TortoiseSVN context menu in Windows Explorer or the Subversion
20798  client program from a command prompt.
20799 \end_layout
20800
20801 \begin_layout Subsubsection
20802 SSH tunnel used with SVN under Windows
20803 \end_layout
20804
20805 \begin_layout Standard
20806 Compared with Linux setting up an svn client to communicate over ssh under
20807  Windows is a rather troublesome task.
20808  We will at least offer some hints how to setup the client side but prior
20809  knowledge about ssh and the Windows command line is needed, also be prepared
20810  for a great deal of frustration\SpecialChar \ldots{}
20811
20812 \end_layout
20813
20814 \begin_layout Enumerate
20815 Get an svn client for windows, as described in the previous sections.
20816  When it is a fresh install run some svn command (e.g.
20817  
20818 \begin_inset Flex Code
20819 status collapsed
20820
20821 \begin_layout Plain Layout
20822 svn --version
20823 \end_layout
20824
20825 \end_inset
20826
20827 ) to create config files, which you will need to change later on.
20828 \end_layout
20829
20830 \begin_layout Enumerate
20831 Choose an ssh client for Windows.
20832  There are several possibilities, we will use the one from Putty tools
20833 \begin_inset Foot
20834 status open
20835
20836 \begin_layout Plain Layout
20837 \begin_inset Flex URL
20838 status collapsed
20839
20840 \begin_layout Plain Layout
20841
20842 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20843 \end_layout
20844
20845 \end_inset
20846
20847
20848 \end_layout
20849
20850 \end_inset
20851
20852 .
20853  You will need to set the connection up so that the client doesn't ask for
20854  any password from you.
20855  To keep things easy we will use only keys without any additional password
20856  protection etc.
20857 \end_layout
20858
20859 \begin_deeper
20860 \begin_layout Enumerate
20861 Generate keys by 
20862 \begin_inset Flex Code
20863 status collapsed
20864
20865 \begin_layout Plain Layout
20866 puttygen
20867 \end_layout
20868
20869 \end_inset
20870
20871 .
20872  Save your private .ppk key file and put the public one on the server side.
20873  If the SVN server runs on Linux, note that the format of the public key
20874  is not compatible with Linux openssh and you will need to direcly copy-paste
20875  the key from the “
20876 \emph on
20877 Public key for pasting into OpenSSH authorized_keys file
20878 \emph default
20879 :” edit field into the server's 
20880 \begin_inset Flex Code
20881 status collapsed
20882
20883 \begin_layout Plain Layout
20884 ~/.ssh/authorized_keys
20885 \end_layout
20886
20887 \end_inset
20888
20889  / 
20890 \begin_inset Flex Code
20891 status collapsed
20892
20893 \begin_layout Plain Layout
20894 authorized_keys2
20895 \end_layout
20896
20897 \end_inset
20898
20899  file.
20900 \end_layout
20901
20902 \begin_layout Enumerate
20903 Get the Putty's 
20904 \begin_inset Flex Code
20905 status collapsed
20906
20907 \begin_layout Plain Layout
20908 plink
20909 \end_layout
20910
20911 \end_inset
20912
20913 .
20914  In the SVN config file
20915 \begin_inset Foot
20916 status collapsed
20917
20918 \begin_layout Plain Layout
20919 Exact path depends on Windows version, usually somewhere around 
20920 \begin_inset Flex Code
20921 status collapsed
20922
20923 \begin_layout Plain Layout
20924 c:
20925 \backslash
20926 Documents and Settings
20927 \backslash
20928 user
20929 \backslash
20930 Application Data
20931 \backslash
20932 Subversion
20933 \backslash
20934 config
20935 \end_layout
20936
20937 \end_inset
20938
20939  / 
20940 \begin_inset Flex Code
20941 status collapsed
20942
20943 \begin_layout Plain Layout
20944 AppData
20945 \backslash
20946 Roaming
20947 \backslash
20948 Subversion
20949 \end_layout
20950
20951 \end_inset
20952
20953 .
20954 \end_layout
20955
20956 \end_inset
20957
20958 , section [tunnels], setup ssh command, e.g.
20959  
20960 \begin_inset Flex Code
20961 status collapsed
20962
20963 \begin_layout Plain Layout
20964 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20965 \end_layout
20966
20967 \end_inset
20968
20969 .
20970 \begin_inset Foot
20971 status collapsed
20972
20973 \begin_layout Plain Layout
20974 It will usually take a lot of time to get exact command right and it depends
20975  on many things.
20976  For example do not have some remote server saved as a default session in
20977  Putty etc.
20978  If things fail, try to connect via plink without SVN first.
20979 \end_layout
20980
20981 \end_inset
20982
20983
20984 \end_layout
20985
20986 \end_deeper
20987 \begin_layout Enumerate
20988 Checkout the SVN archive, e.g.
20989  
20990 \begin_inset Flex Code
20991 status collapsed
20992
20993 \begin_layout Plain Layout
20994 svn co svn+ssh://user@server/repository_path
20995 \end_layout
20996
20997 \end_inset
20998
20999 .
21000 \end_layout
21001
21002 \begin_layout Subsubsection
21003 End-of-Line Conversions
21004 \end_layout
21005
21006 \begin_layout Standard
21007 When the collaborators are mixing Linux and Windows environments, LyX will
21008  use different line endings inside the .lyx files.
21009  This is not a problem as far as LyX functionality is concerned, but the
21010  commit diffs will be huge and merge-conflicts prone.
21011  Fortunately SVN itself knows
21012 \begin_inset Foot
21013 status collapsed
21014
21015 \begin_layout Plain Layout
21016 \begin_inset Flex URL
21017 status collapsed
21018
21019 \begin_layout Plain Layout
21020
21021 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21022 \end_layout
21023
21024 \end_inset
21025
21026
21027 \end_layout
21028
21029 \end_inset
21030
21031  how to deal with CR/LF problems when switching .lyx files to the 
21032 \begin_inset Flex Code
21033 status collapsed
21034
21035 \begin_layout Plain Layout
21036 native
21037 \end_layout
21038
21039 \end_inset
21040
21041  mode.
21042 \begin_inset Foot
21043 status collapsed
21044
21045 \begin_layout Plain Layout
21046 For the lazy guys: 
21047 \begin_inset Flex Code
21048 status collapsed
21049
21050 \begin_layout Plain Layout
21051 svn propset svn:eol-style native FILE_NAME
21052 \end_layout
21053
21054 \end_inset
21055
21056
21057 \end_layout
21058
21059 \end_inset
21060
21061
21062 \end_layout
21063
21064 \begin_layout Subsection
21065 Further tuning
21066 \end_layout
21067
21068 \begin_layout Standard
21069 With the recent addition of the vc-command function LyX power users are
21070  allowed to create their own commands for revision control.
21071 \end_layout
21072
21073 \begin_layout Standard
21074 As an example you can see how two TortoiseSVN commands could be integrated
21075  directly:
21076 \end_layout
21077
21078 \begin_layout Description
21079 Commit: 
21080 \begin_inset Flex Code
21081 status collapsed
21082
21083 \begin_layout Plain Layout
21084 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21085 \end_layout
21086
21087 \end_inset
21088
21089
21090 \end_layout
21091
21092 \begin_layout Description
21093 Revert: 
21094 \begin_inset Flex Code
21095 status collapsed
21096
21097 \begin_layout Plain Layout
21098 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21099 \end_layout
21100
21101 \end_inset
21102
21103
21104 \end_layout
21105
21106 \begin_layout Subsection
21107 Version control and Document comparison
21108 \end_layout
21109
21110 \begin_layout Standard
21111 One of the typical uses of version control is to inspect the changes between
21112  revisions, usually by creating 
21113 \begin_inset Flex Code
21114 status collapsed
21115
21116 \begin_layout Plain Layout
21117 diff
21118 \end_layout
21119
21120 \end_inset
21121
21122  dumps.
21123  While this is useful for plain text files, it is much less useful in the
21124  case of LyX files, which have more a complicated structure.
21125  Hence we provide binding to the Document comparison feature.
21126  There are two ways of calling this feature - either by direct call of 
21127 \begin_inset Flex Code
21128 status collapsed
21129
21130 \begin_layout Plain Layout
21131 VC_COMPARE
21132 \end_layout
21133
21134 \end_inset
21135
21136  LyX function (for details see LyX functions manual) or by icon/menu item
21137  
21138 \begin_inset Flex MenuItem
21139 status collapsed
21140
21141 \begin_layout Plain Layout
21142 Compare with older revision...
21143 \end_layout
21144
21145 \end_inset
21146
21147 .
21148  One can either compare two chosen revisions of the document or he can simply
21149  compare the current version of edited text with older revisions (where
21150  '
21151 \begin_inset Flex MenuItem
21152 status collapsed
21153
21154 \begin_layout Plain Layout
21155 0
21156 \end_layout
21157
21158 \end_inset
21159
21160 ' revisions back means comparison of the edited file with last commited
21161  revision).
21162  
21163 \end_layout
21164
21165 \begin_layout Standard
21166 This feature is supported for SVN and RCS though due to the more complicated
21167  versioning scheme of RCS there is a constraint -- when addressing the revisions
21168  in dialog, numbers always point to the last number in RCS revision number,
21169  i.e.
21170  '35' in '1.2.35'.
21171 \end_layout
21172
21173 \begin_layout Section
21174 Literate Programming
21175 \end_layout
21176
21177 \begin_layout Standard
21178 Updated by 
21179 \noun on
21180 Kayvan Sylvan 
21181 \noun default
21182 (kayvan@sylvan.com)
21183 \noun on
21184
21185 \noun default
21186 original documentation written by 
21187 \noun on
21188 Edmar Wienskoski Jr.
21189
21190 \noun default
21191  (edmar-w-jr@technologist.com)
21192 \end_layout
21193
21194 \begin_layout Subsection
21195 Introduction
21196 \end_layout
21197
21198 \begin_layout Standard
21199 The main purpose of this documentation is to show you how to use LyX for
21200  literate programming, where it is assumed that you are familiar with this
21201  programming technique, and know what 
21202 \begin_inset Quotes eld
21203 \end_inset
21204
21205 tangling
21206 \begin_inset Quotes erd
21207 \end_inset
21208
21209  and 
21210 \begin_inset Quotes eld
21211 \end_inset
21212
21213 weaving
21214 \begin_inset Quotes erd
21215 \end_inset
21216
21217  means.
21218  If that is not the case, please follow the web links provided in the following
21219  sections.
21220  There is a lot of good documentation out there covering old development
21221  history to the latest tools tips.
21222 \end_layout
21223
21224 \begin_layout Standard
21225 It is also assumed that you are familiar with LyX itself to a point that
21226  you are comfortable changing your LyX preferences, and X resources file.
21227  If that is not the case please refer to other LyX documentation to cover
21228  your specific needs.
21229 \end_layout
21230
21231 \begin_layout Subsection
21232 Literate Programming
21233 \end_layout
21234
21235 \begin_layout Standard
21236 From the Literate Programming FAQ: 
21237 \end_layout
21238
21239 \begin_layout Quotation
21240 Literate programming is the combination of documentation and source together
21241  in a fashion suited for reading by human beings.
21242  In fact, literate programs should be enjoyable reading, even inviting!
21243  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21244  and documentation in a single file.
21245  Literate programming tools then parse the file to produce either readable
21246  documentation or compilable source.
21247  The WEB style of literate programming was created by D.
21248 \begin_inset space \thinspace{}
21249 \end_inset
21250
21251 E.
21252  Knuth during the development of his TeX typesetting software.
21253  
21254 \end_layout
21255
21256 \begin_layout Standard
21257 Another excerpt says:
21258 \end_layout
21259
21260 \begin_layout Quotation
21261
21262 \emph on
21263 How is literate programming different from verbose commenting?
21264 \end_layout
21265
21266 \begin_layout Quotation
21267 There are three distinguishing characteristics.
21268  In order of importance, they are: 
21269 \end_layout
21270
21271 \begin_deeper
21272 \begin_layout Itemize
21273 flexible order of elaboration 
21274 \end_layout
21275
21276 \begin_layout Itemize
21277 automatic support for browsing 
21278 \end_layout
21279
21280 \begin_layout Itemize
21281 typeset documentation, especially diagrams and mathematics 
21282 \end_layout
21283
21284 \end_deeper
21285 \begin_layout Standard
21286 Now that I sparked your curiosity, take a look in the references.
21287 \end_layout
21288
21289 \begin_layout Subsubsection
21290 References
21291 \end_layout
21292
21293 \begin_layout Standard
21294 The complete Literate Programming FAQ can be found at:
21295 \end_layout
21296
21297 \begin_layout Quote
21298 Literate Programming FAQ 
21299 \begin_inset Flex URL
21300 status collapsed
21301
21302 \begin_layout Plain Layout
21303
21304 http://www.literateprogramming.com/lpfaq.pdf
21305 \end_layout
21306
21307 \end_inset
21308
21309
21310 \end_layout
21311
21312 \begin_layout Standard
21313 The FAQ lists 23 (twenty three!) different literate programming tools.
21314  Where some are specialized or 
21315 \begin_inset Quotes eld
21316 \end_inset
21317
21318 tailored
21319 \begin_inset Quotes erd
21320 \end_inset
21321
21322  for particular programming languages, while other have general scope.
21323  I selected 
21324 \noun on
21325 Noweb
21326 \noun default
21327  for my own use for several reasons:
21328 \end_layout
21329
21330 \begin_layout Itemize
21331 It can generate the documentation either in LaTeX or HTML.
21332 \end_layout
21333
21334 \begin_layout Itemize
21335 It has a open architecture, i.
21336 \begin_inset space \thinspace{}
21337 \end_inset
21338
21339 e.
21340 \begin_inset space \space{}
21341 \end_inset
21342
21343 it is easy to plug in new filters and to perform special processing that
21344  you may need.
21345  
21346 \end_layout
21347
21348 \begin_layout Itemize
21349 There is a good selection of filters available already (the HTML is one
21350  of them).
21351 \end_layout
21352
21353 \begin_layout Itemize
21354 It is free.
21355 \end_layout
21356
21357 \begin_layout Standard
21358 The Noweb web page can be found at: 
21359 \end_layout
21360
21361 \begin_layout Quote
21362 Noweb home page 
21363 \begin_inset Flex URL
21364 status collapsed
21365
21366 \begin_layout Plain Layout
21367
21368 http://www.cs.virginia.edu/~nr/noweb/
21369 \end_layout
21370
21371 \end_inset
21372
21373
21374 \end_layout
21375
21376 \begin_layout Standard
21377 Starting from there you can reach many other interesting links and even
21378  some literate program examples.
21379 \end_layout
21380
21381 \begin_layout Subsection
21382 LyX and Literate Programming with Noweb
21383 \end_layout
21384
21385 \begin_layout Standard
21386 The LyX support for Literate Programming is provided by using the generic
21387  LyX converters mechanism.
21388  This support is provided in a 
21389 \begin_inset Quotes eld
21390 \end_inset
21391
21392 Noweb independent
21393 \begin_inset Quotes erd
21394 \end_inset
21395
21396  way, i.
21397 \begin_inset space \thinspace{}
21398 \end_inset
21399
21400 e.
21401 \begin_inset space \space{}
21402 \end_inset
21403
21404 you will be able to use this new LyX feature with some other literate programmin
21405 g tool of your choice by just changing your LyX preferences.
21406 \end_layout
21407
21408 \begin_layout Subsubsection
21409 Generating documents and code (weaving and tangling)
21410 \end_layout
21411
21412 \begin_layout Paragraph
21413 Using the noweb module
21414 \end_layout
21415
21416 \begin_layout Standard
21417 If you have installed Noweb and LyX successfully, whenever you open a new
21418  document, after you have chosen its document class, use the Document->Settings
21419  menu to add the 
21420 \begin_inset Quotes eld
21421 \end_inset
21422
21423 noweb
21424 \begin_inset Quotes erd
21425 \end_inset
21426
21427  module.
21428  If Noweb is correctly installed, when you click on the 
21429 \begin_inset Quotes eld
21430 \end_inset
21431
21432 Modules
21433 \begin_inset Quotes erd
21434 \end_inset
21435
21436  link, you will see the 
21437 \begin_inset Quotes eld
21438 \end_inset
21439
21440 noweb
21441 \begin_inset Quotes erd
21442 \end_inset
21443
21444  module in the available list and you can add it to your document.
21445 \end_layout
21446
21447 \begin_layout Paragraph
21448 Typing code in
21449 \end_layout
21450
21451 \begin_layout Standard
21452 LyX enables you to write code with a layout named 
21453 \change_inserted 819523532 1353904450
21454
21455 \begin_inset Flex Noun
21456 status collapsed
21457
21458 \begin_layout Plain Layout
21459
21460 \change_inserted 819523532 1353904450
21461 Chunk
21462 \change_unchanged
21463
21464 \end_layout
21465
21466 \end_inset
21467
21468
21469 \change_deleted 819523532 1353904406
21470
21471 \noun on
21472 Scrap
21473 \change_unchanged
21474
21475 \noun default
21476 .
21477 \change_deleted 819523532 1353904396
21478
21479 \begin_inset Foot
21480 status collapsed
21481
21482 \begin_layout Plain Layout
21483 The equivalent Noweb term is 
21484 \begin_inset Quotes eld
21485 \end_inset
21486
21487 Chunk
21488 \begin_inset Quotes erd
21489 \end_inset
21490
21491 .
21492  For historical reasons, I got used to the term 
21493 \begin_inset Quotes eld
21494 \end_inset
21495
21496 scrap
21497 \begin_inset Quotes erd
21498 \end_inset
21499
21500  introduced by other literate tool named Nuweb, which I used for many years
21501  before rendering myself to Noweb.
21502 \end_layout
21503
21504 \end_inset
21505
21506
21507 \change_unchanged
21508  Noweb delimits 
21509 \change_deleted 819523532 1353904459
21510 scraps
21511 \change_inserted 819523532 1353904461
21512 chunks
21513 \change_unchanged
21514  like this:
21515 \end_layout
21516
21517 \begin_layout LyX-Code
21518 <<My 
21519 \change_deleted 819523532 1353904469
21520 scrap
21521 \change_inserted 819523532 1353904470
21522 code
21523 \change_unchanged
21524 >>=
21525 \end_layout
21526
21527 \begin_layout LyX-Code
21528   code
21529 \end_layout
21530
21531 \begin_layout LyX-Code
21532   more code
21533 \end_layout
21534
21535 \begin_layout LyX-Code
21536   even more code
21537 \end_layout
21538
21539 \begin_layout LyX-Code
21540   @
21541 \end_layout
21542
21543 \begin_layout Standard
21544 The problem is that whatever is written in between the << and the 
21545 \family typewriter
21546 @
21547 \family default
21548  must be taken literally, i.
21549 \begin_inset space \thinspace{}
21550 \end_inset
21551
21552 e.
21553 \begin_inset space \space{}
21554 \end_inset
21555
21556 LyX should be prevented from making any special interpretation of what has
21557  been written.
21558  This is handled by a special layout named 
21559 \change_deleted 819523532 1353904493
21560 Scrap
21561 \change_inserted 819523532 1353904494
21562 Chunk
21563 \change_unchanged
21564 , that works like a normal paragraph but has a free spacing capability.
21565 \end_layout
21566
21567 \begin_layout Standard
21568 As a special note, you can also use the 
21569 \begin_inset Quotes eld
21570 \end_inset
21571
21572 %def
21573 \begin_inset Quotes erd
21574 \end_inset
21575
21576  construct of Noweb in your 
21577 \change_deleted 819523532 1353904503
21578 scraps
21579 \change_inserted 819523532 1353904504
21580 chunks
21581 \change_unchanged
21582  to add items to Noweb's identifier cross-reference:
21583 \end_layout
21584
21585 \begin_layout LyX-Code
21586 <<My 
21587 \change_deleted 819523532 1353904516
21588 scrap
21589 \change_inserted 819523532 1353904517
21590 chunk
21591 \change_unchanged
21592 >>=
21593 \change_inserted 819523532 1353904523
21594
21595 \end_layout
21596
21597 \begin_layout LyX-Code
21598
21599 \change_deleted 819523532 1353904528
21600   
21601 \change_unchanged
21602 def some_function(args):
21603 \change_inserted 819523532 1353904543
21604
21605 \end_layout
21606
21607 \begin_layout LyX-Code
21608
21609 \change_deleted 819523532 1353904543
21610  
21611 \change_unchanged
21612    "This is the doc string for this function."
21613 \change_inserted 819523532 1353904550
21614
21615 \end_layout
21616
21617 \begin_layout LyX-Code
21618
21619 \change_deleted 819523532 1353904550
21620  
21621 \change_unchanged
21622    print "My args: ", args
21623 \end_layout
21624
21625 \begin_layout LyX-Code
21626 @ %def some_function
21627 \end_layout
21628
21629 \begin_layout Standard
21630 For an example of this usage and the resulting cross-reference output, look
21631  at the Literate python program in 
21632 \emph on
21633 LIBDIR/examples/listerrors.lyx
21634 \emph default
21635  which should make this all clear.
21636 \end_layout
21637
21638 \begin_layout Paragraph
21639 Generating the documentation
21640 \end_layout
21641
21642 \begin_layout Standard
21643 At this point you already have a new document file with a proper document
21644  class, and with some code and text on it.
21645  How do I print it? The answer is simple, you select 
21646 \family sans
21647 View\SpecialChar \menuseparator
21648 DVI,
21649 \family default
21650  etc.
21651  Just like you would do for a plain document.
21652  No special procedure is required.
21653 \end_layout
21654
21655 \begin_layout Standard
21656 To help orientate you, I will now explain what happens inside LyX:
21657 \end_layout
21658
21659 \begin_layout Enumerate
21660 When the 
21661 \family sans
21662 Update\SpecialChar \menuseparator
21663 DVI
21664 \family default
21665  menu option is chosen, a LaTeX file is generated.
21666  
21667 \end_layout
21668
21669 \begin_deeper
21670 \begin_layout Standard
21671 If the document is of any literate class the generated file will be named
21672  with an extension name defined by the 
21673 \begin_inset Quotes eld
21674 \end_inset
21675
21676 literate
21677 \begin_inset Quotes erd
21678 \end_inset
21679
21680  format (defined in the Preferences panel), otherwise the file will have
21681  the usual 
21682 \family typewriter
21683 .tex
21684 \family default
21685  extension.
21686 \end_layout
21687
21688 \end_deeper
21689 \begin_layout Enumerate
21690 Note that the only difference so far is in the name of the file, no special
21691  processing is required by LyX.
21692  Given that you formatted the code using the 
21693 \change_deleted 819523532 1353904586
21694 Scrap
21695 \change_inserted 819523532 1353904587
21696 Chunk
21697 \change_unchanged
21698  layout that, by itself, takes care of the business.
21699 \end_layout
21700
21701 \begin_layout Enumerate
21702 If the document is of any literate class LyX will then use the internal
21703  LyX to Noweb converter, followed by the Noweb to LaTeX converter
21704 \begin_inset Foot
21705 status collapsed
21706
21707 \begin_layout Plain Layout
21708 The converters are defined in the 
21709 \family sans
21710 Tools\SpecialChar \menuseparator
21711 Preferences
21712 \family default
21713  panel, under the 
21714 \begin_inset Quotes eld
21715 \end_inset
21716
21717 Conversion
21718 \begin_inset Quotes erd
21719 \end_inset
21720
21721  tab.
21722  See section 
21723 \emph on
21724 Converters
21725 \emph default
21726  of the 
21727 \emph on
21728 Customization
21729 \emph default
21730  manual for general information about converters.
21731 \end_layout
21732
21733 \end_inset
21734
21735  to generate the LaTeX file.
21736 \end_layout
21737
21738 \begin_deeper
21739 \begin_layout Standard
21740 Otherwise it will just skip this step.
21741 \end_layout
21742
21743 \end_deeper
21744 \begin_layout Enumerate
21745 Finally, LaTeX is invoked and the regular post processing continues as in
21746  a plain document.
21747 \end_layout
21748
21749 \begin_layout Standard
21750 Independence from a particular 
21751 \begin_inset Quotes eld
21752 \end_inset
21753
21754 literate tool
21755 \begin_inset Quotes erd
21756 \end_inset
21757
21758  is easily achieved by changing the commands that are run by the various
21759  converters.
21760 \end_layout
21761
21762 \begin_layout Paragraph
21763 Generating the code
21764 \end_layout
21765
21766 \begin_layout Standard
21767 When the build menu option is chosen or the corresponding button in the
21768  toolbar is pressed, a LaTeX file is generated just like step 1 above.
21769  Next, LyX invokes the 
21770 \family typewriter
21771 Noweb->Program
21772 \family default
21773  converter.
21774  This converter needs to be defined by the user and is not installed by
21775  default, though the Program format is.
21776  This converter (like any other converter) will have two parts:
21777 \end_layout
21778
21779 \begin_layout Enumerate
21780 The converter program itself.
21781  This program performs the conversion from the one format to the other (in
21782  this case, from the Noweb format to the Program pseudo-format).
21783 \end_layout
21784
21785 \begin_layout Enumerate
21786 The error log parser.
21787  This is a program whose sole purpose is to rewrite error messages in a
21788  format that LyX understands.
21789  This makes it possible for LyX to place error boxes in the right places
21790  in the file buffer.
21791 \end_layout
21792
21793 \begin_layout Standard
21794 The first part, the 
21795 \begin_inset Quotes eld
21796 \end_inset
21797
21798 Converter
21799 \begin_inset Quotes erd
21800 \end_inset
21801
21802  setting, should be set to 
21803 \begin_inset Quotes eld
21804 \end_inset
21805
21806
21807 \family typewriter
21808 build-script $$i
21809 \family default
21810  $$r
21811 \begin_inset Quotes erd
21812 \end_inset
21813
21814 .
21815  This basically means that LyX will call 
21816 \begin_inset Quotes eld
21817 \end_inset
21818
21819 build-script
21820 \begin_inset Quotes erd
21821 \end_inset
21822
21823  (a program or script) with the name of the Noweb file (normally a file
21824  in the LyX temp directory) and the directory path of the original LyX file.
21825  
21826 \end_layout
21827
21828 \begin_layout Standard
21829 This is an implementation of 
21830 \begin_inset Quotes eld
21831 \end_inset
21832
21833 build-script
21834 \begin_inset Quotes erd
21835 \end_inset
21836
21837  that you can place in a directory on your path:
21838 \end_layout
21839
21840 \begin_layout LyX-Code
21841 #!/bin/sh
21842 \end_layout
21843
21844 \begin_layout LyX-Code
21845 #
21846 \end_layout
21847
21848 \begin_layout LyX-Code
21849 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
21850 \end_layout
21851
21852 \begin_layout Standard
21853 The next part of the converter setting is the 
21854 \begin_inset Quotes eld
21855 \end_inset
21856
21857 Flags
21858 \begin_inset Quotes erd
21859 \end_inset
21860
21861  which is to be set to 
21862 \begin_inset Quotes eld
21863 \end_inset
21864
21865
21866 \family typewriter
21867 parselog=$$s/scripts/listerrors
21868 \family default
21869
21870 \begin_inset Quotes erd
21871 \end_inset
21872
21873 .
21874  This will run any errors that are generated by the 
21875 \begin_inset Quotes eld
21876 \end_inset
21877
21878 build-script
21879 \begin_inset Quotes erd
21880 \end_inset
21881
21882  process through the 
21883 \begin_inset Quotes eld
21884 \end_inset
21885
21886 listerrors
21887 \begin_inset Quotes erd
21888 \end_inset
21889
21890  program.
21891 \end_layout
21892
21893 \begin_layout Standard
21894 The build will normally take place in LyX's temporary directory, so the
21895  files produced by the conversion will be in that directory.
21896  LyX will copy out what it regards as the `main' file, but the 
21897 \family typewriter
21898 Noweb->Program
21899 \family default
21900  conversion may produce several files, and so most of these would then be
21901  deleted when LyX was closed.
21902  This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
21903  the build-script 
21904 \change_deleted 819523532 1353904613
21905 scrap
21906 \change_inserted 819523532 1353904614
21907 chunk
21908 \change_unchanged
21909  can place the generated files in that location.
21910 \end_layout
21911
21912 \begin_layout Paragraph
21913 Build instructions in the document
21914 \end_layout
21915
21916 \begin_layout Standard
21917 The last piece of the integration between LyX and noweb is the 
21918 \begin_inset Quotes eld
21919 \end_inset
21920
21921 build-script
21922 \begin_inset Quotes erd
21923 \end_inset
21924
21925  
21926 \change_deleted 819523532 1353904625
21927 scrap
21928 \change_inserted 819523532 1353904625
21929 chunk
21930 \change_unchanged
21931 .
21932  Generally, the instructions for building your program should be embedded
21933  in a 
21934 \change_deleted 819523532 1353904630
21935 scrap
21936 \change_inserted 819523532 1353904630
21937 chunk
21938 \change_unchanged
21939  of its own.
21940  The noweb-specific 
21941 \begin_inset Quotes eld
21942 \end_inset
21943
21944 build-script
21945 \begin_inset Quotes erd
21946 \end_inset
21947
21948  above uses the notangle command to look for this 
21949 \change_deleted 819523532 1353904632
21950 scrap
21951 \change_inserted 819523532 1353904632
21952 chunk
21953 \change_unchanged
21954  (called 
21955 \begin_inset Quotes eld
21956 \end_inset
21957
21958 build-script
21959 \begin_inset Quotes erd
21960 \end_inset
21961
21962 ) and runs its contents through 
21963 \begin_inset Quotes eld
21964 \end_inset
21965
21966 sh
21967 \begin_inset Quotes erd
21968 \end_inset
21969
21970 .
21971 \end_layout
21972
21973 \begin_layout Standard
21974 Typically, such a 
21975 \change_deleted 819523532 1353904634
21976 scrap
21977 \change_inserted 819523532 1353904634
21978 chunk
21979 \change_unchanged
21980  would look something like this:
21981 \end_layout
21982
21983 \begin_layout LyX-Code
21984 <<build-script>>=#!/bin/shif [ -z "${NOWEB_SOURCE}" ]then  NOWEB_SOURCE=myfile.nw
21985 fi[...
21986  code to extract files ...
21987  use NOWEB_OUTPUT_DIR here ...][...
21988  code to compile files ...]@
21989 \end_layout
21990
21991 \begin_layout Standard
21992 Look in 
21993 \emph on
21994 LIBDIR/examples/listerrors.lyx
21995 \emph default
21996  or in 
21997 \emph on
21998 LIBDIR/examples/Literate.lyx
21999 \emph default
22000  which implement two versions of the 
22001 \begin_inset Quotes eld
22002 \end_inset
22003
22004 listerrors
22005 \begin_inset Quotes erd
22006 \end_inset
22007
22008  program for some illustrations of how all of these pieces go together or
22009  in 
22010 \emph on
22011 LIBDIR/examples/noweb2lyx.lyx.
22012
22013 \emph default
22014  Interestingly, these three files show off the language-indepence of the
22015  LyX literate programming support since they are written in Python, C and
22016  Perl respectively.
22017 \end_layout
22018
22019 \begin_layout Subsubsection
22020 Configuring LyX
22021 \end_layout
22022
22023 \begin_layout Standard
22024 All the Literate Programming support is configured by the 
22025 \family sans
22026 Tools\SpecialChar \menuseparator
22027 Preferences
22028 \family default
22029  panel in the 
22030 \begin_inset Quotes eld
22031 \end_inset
22032
22033 File Handling
22034 \begin_inset Quotes erd
22035 \end_inset
22036
22037  tab.
22038  The important parts are:
22039 \end_layout
22040
22041 \begin_layout Description
22042 the
22043 \begin_inset space ~
22044 \end_inset
22045
22046
22047 \begin_inset Quotes eld
22048 \end_inset
22049
22050 NoWeb
22051 \begin_inset Quotes erd
22052 \end_inset
22053
22054
22055 \begin_inset space ~
22056 \end_inset
22057
22058 format Set up via the File Formats tab, this is where the Noweb-specific
22059  pieces are set up.
22060  The 
22061 \family sans
22062 GUI Name
22063 \family default
22064  is set to 
22065 \family typewriter
22066 NoWeb
22067 \family default
22068 , the file extension is set to 
22069 \family typewriter
22070 .nw
22071 \family default
22072 .
22073  This tells LyX to create a file with a 
22074 \family typewriter
22075 .nw
22076 \family default
22077  extension in the first step of the conversion process.
22078 \end_layout
22079
22080 \begin_layout Description
22081 the
22082 \begin_inset space ~
22083 \end_inset
22084
22085
22086 \family sans
22087 Program
22088 \family default
22089
22090 \begin_inset space ~
22091 \end_inset
22092
22093 format This is an empty format whose sole purpose is to be the endpoint
22094  of a conversion (which then allows us to set up a converter for it).
22095 \end_layout
22096
22097 \begin_layout Description
22098
22099 \family sans
22100 NoWeb
22101 \family default
22102 ->
22103 \family sans
22104 LaTeX
22105 \family default
22106  This converter performs the 
22107 \begin_inset Quotes eld
22108 \end_inset
22109
22110 weaving
22111 \begin_inset Quotes erd
22112 \end_inset
22113
22114  of the literate document.
22115  For Noweb, it is set to 
22116 \begin_inset Quotes eld
22117 \end_inset
22118
22119
22120 \family typewriter
22121 noweave -delay -index $$i > $$o
22122 \family default
22123
22124 \begin_inset Quotes erd
22125 \end_inset
22126
22127
22128 \end_layout
22129
22130 \begin_layout Description
22131
22132 \family sans
22133 NoWeb
22134 \family default
22135 ->
22136 \family sans
22137 Program
22138 \family default
22139  This performs the 
22140 \begin_inset Quotes eld
22141 \end_inset
22142
22143 tangling step
22144 \begin_inset Quotes erd
22145 \end_inset
22146
22147 .
22148  As stated above, the Converter is set to 
22149 \begin_inset Quotes eld
22150 \end_inset
22151
22152
22153 \family typewriter
22154 build-script $$i
22155 \family default
22156  $$r
22157 \begin_inset Quotes erd
22158 \end_inset
22159
22160 , with Flags set to 
22161 \begin_inset Quotes eld
22162 \end_inset
22163
22164
22165 \family typewriter
22166 parselog=$$s/scripts/listerrors
22167 \family default
22168
22169 \begin_inset Quotes erd
22170 \end_inset
22171
22172 .
22173 \end_layout
22174
22175 \begin_layout Subsubsection
22176 Debug extensions
22177 \end_layout
22178
22179 \begin_layout Standard
22180 There is also a new function implemented in the LyX server, the 
22181 \begin_inset Quotes eld
22182 \end_inset
22183
22184 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22185  
22186 \end_layout
22187
22188 \begin_layout Standard
22189 When debugging code with ddd/gdb, it is possible to invoke a text editor
22190  at the current execution position with a single key stroke.
22191  The default ddd configuration for that is shift-ctrl-V.
22192  It happens that you can define the editor command line invocation in ddd
22193  by accessing the 
22194 \family sans
22195 Edit\SpecialChar \menuseparator
22196 Preferences\SpecialChar \menuseparator
22197 Helpers
22198 \family default
22199  dialog and changing the "Edit Sources" entry.
22200 \end_layout
22201
22202 \begin_layout Standard
22203 I take advantage of the newly created LyX server function and this ddd feature,
22204  and set 
22205 \begin_inset Quotes eld
22206 \end_inset
22207
22208 Edit Sources
22209 \begin_inset Quotes erd
22210 \end_inset
22211
22212  to:
22213 \end_layout
22214
22215 \begin_layout LyX-Code
22216 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22217 \end_layout
22218
22219 \begin_layout Standard
22220 With this, whenever you are using ddd and find a point in the program that
22221  you want to edit, you just press shift-ctrl-V (in the ddd window), and
22222  ddd will forward this information to LyX through the LyX server and then
22223  the LyX window will show the same file with the cursor at the same position
22224  ddd was pointing to.
22225  No more guessing or long scrolling to locate a point in the program back
22226  from debugging !
22227 \end_layout
22228
22229 \begin_layout Standard
22230 Note however that you must enable the LyX server to get this feature working
22231  (it is disabled by default).
22232  You can enable it in 
22233 \family sans
22234 Preferences
22235 \family default
22236  (tabs 
22237 \family sans
22238 Inputs
22239 \family default
22240
22241 \family sans
22242 Paths
22243 \family default
22244 ) by entering in the 
22245 \family sans
22246 LyXserver pipe
22247 \family default
22248  a path like 
22249 \begin_inset Quotes eld
22250 \end_inset
22251
22252
22253 \family typewriter
22254 /home/<your-home-directory>/.lyx/lyxpipe
22255 \family default
22256
22257 \begin_inset Quotes erd
22258 \end_inset
22259
22260
22261 \end_layout
22262
22263 \begin_layout Standard
22264 Read the LyX server documentation in the 
22265 \emph on
22266 Customization Manual
22267 \emph default
22268  for further information.
22269 \end_layout
22270
22271 \begin_layout Subsubsection
22272 Toolbar extensions
22273 \end_layout
22274
22275 \begin_layout Standard
22276 There are six new buttons that can be added to your LyX toolbar.
22277  Five of these buttons are short cuts to layout styles: 
22278 \family sans
22279 Standard
22280 \family default
22281
22282 \family sans
22283 Section
22284 \family default
22285
22286 \family sans
22287 LaTeX
22288 \family default
22289
22290 \family sans
22291 LyX-Code
22292 \family default
22293 , and 
22294 \change_deleted 819523532 1353904643
22295
22296 \family sans
22297 Scrap
22298 \change_inserted 819523532 1353904651
22299 Chunk
22300 \change_unchanged
22301
22302 \family default
22303 .
22304  The last one is a short cut to the 
22305 \begin_inset Quotes eld
22306 \end_inset
22307
22308 Build Program
22309 \begin_inset Quotes erd
22310 \end_inset
22311
22312  File menu entry.
22313  
22314 \end_layout
22315
22316 \begin_layout Standard
22317 LyX has a range of buttons that are available for tool bar customization.
22318  In my toolbar I like to combine the six short cuts above with two more:
22319  One for 
22320 \family sans
22321 View
22322 \family default
22323 \SpecialChar \menuseparator
22324
22325 \family sans
22326 Update
22327 \family default
22328 \SpecialChar \menuseparator
22329
22330 \family sans
22331 DVI
22332 \family default
22333  and the other for 
22334 \family sans
22335 View\SpecialChar \menuseparator
22336 DVI
22337 \family default
22338  File menu entries.
22339  Here is how it looks like:
22340 \end_layout
22341
22342 \begin_layout LyX-Code
22343 Toolbar
22344 \end_layout
22345
22346 \begin_layout LyX-Code
22347   Layouts
22348 \end_layout
22349
22350 \begin_layout LyX-Code
22351   Icon "layout Standard"
22352 \end_layout
22353
22354 \begin_layout LyX-Code
22355   Icon "layout Section"
22356 \end_layout
22357
22358 \begin_layout LyX-Code
22359   Icon "layout LaTeX"
22360 \end_layout
22361
22362 \begin_layout LyX-Code
22363   Icon "layout LyX-Code"
22364 \end_layout
22365
22366 \begin_layout LyX-Code
22367   Icon "layout 
22368 \change_deleted 819523532 1353904661
22369 Scrap
22370 \change_inserted 819523532 1353904668
22371 Chunk
22372 \change_unchanged
22373 "
22374 \end_layout
22375
22376 \begin_layout LyX-Code
22377   Separator
22378 \end_layout
22379
22380 \begin_layout LyX-Code
22381   Icon "buffer-view"
22382 \end_layout
22383
22384 \begin_layout LyX-Code
22385   Icon "buffer-typeset"
22386 \end_layout
22387
22388 \begin_layout LyX-Code
22389   Icon "build-program"
22390 \end_layout
22391
22392 \begin_layout LyX-Code
22393   Separator
22394 \end_layout
22395
22396 \begin_layout LyX-Code
22397 .
22398 \end_layout
22399
22400 \begin_layout LyX-Code
22401 .
22402 \end_layout
22403
22404 \begin_layout LyX-Code
22405 .
22406 \end_layout
22407
22408 \begin_layout LyX-Code
22409 End
22410 \end_layout
22411
22412 \begin_layout Subsubsection
22413 Colors customization
22414 \end_layout
22415
22416 \begin_layout Standard
22417 There are a number of colors in LyX that can be customized in 
22418 \family sans
22419 Preferences
22420 \family default
22421 .
22422  One of the things that bothers people is the LaTeX font color.
22423  The default color is red, since the 
22424 \change_deleted 819523532 1353904675
22425 scrap
22426 \change_inserted 819523532 1353904675
22427 chunk
22428 \change_unchanged
22429 s uses LaTeX font, and there is a lot of 
22430 \change_deleted 819523532 1353904682
22431 scrap
22432 \change_inserted 819523532 1353904682
22433 chunk
22434 \change_unchanged
22435 s in literate documents, you may get tired of seeing everything in red.
22436  You can change it by going to the tabs 
22437 \family sans
22438 Look&Feel
22439 \family default
22440
22441 \family sans
22442 Colors.
22443 \end_layout
22444
22445 \begin_layout Standard
22446 The next thing is the visible presence of the newline character in the screen.
22447  You can choose the color of this particular character and make it blend
22448  in the background.
22449  I recommend you choosing a color that is close to the background but not
22450  equal, that way you still can see it is there, but it is not bothering
22451  you anymore.
22452 \end_layout
22453
22454 \begin_layout Subsection
22455 LyX and knitr/Sweave
22456 \end_layout
22457
22458 \begin_layout Standard
22459 Support for knitr and Sweave is documented in the knitr.lyx example file
22460  and in the Sweave manual (in the Help > Specific Manuals submenu).
22461 \end_layout
22462
22463 \begin_layout Chapter
22464 Special features
22465 \end_layout
22466
22467 \begin_layout Standard
22468 You can do everything with LyX that you can do with LaTeX.
22469  However, LyX cannot support every LaTeX feature directly.
22470  But you can always use TeX Code.
22471  This chapter shows you some more special things you might want to use.
22472  For other special things you can do with figures, tables, floats, boxes
22473  and notes, have a look at the 
22474 \emph on
22475 Embedded
22476 \begin_inset space ~
22477 \end_inset
22478
22479 Objects
22480 \emph default
22481  manual.
22482 \end_layout
22483
22484 \begin_layout Section
22485 Multiple Text Columns
22486 \end_layout
22487
22488 \begin_layout Standard
22489 This feature is independent of the option 
22490 \family sans
22491 Two-column document
22492 \family default
22493  in the document settings under 
22494 \family sans
22495 Text Layout
22496 \family default
22497 .
22498  If you want to have 2
22499 \begin_inset space ~
22500 \end_inset
22501
22502 columns for the whole document, it is recommended to use the 
22503 \family sans
22504 Two-column document
22505 \family default
22506  option.
22507  For all other cases use this feature.
22508 \end_layout
22509
22510 \begin_layout Standard
22511 To use multiple text columns in your document, you have to load the module
22512  
22513 \family sans
22514 Multiple Columns
22515 \family default
22516  (menu 
22517 \family sans
22518 Document\SpecialChar \menuseparator
22519 Settings\SpecialChar \menuseparator
22520 Modules
22521 \family default
22522 ) and must have the LaTeX-package 
22523 \series bold
22524 multicol
22525 \series default
22526
22527 \begin_inset Index idx
22528 status collapsed
22529
22530 \begin_layout Plain Layout
22531 LaTeX-packages ! multicol
22532 \end_layout
22533
22534 \end_inset
22535
22536  installed.
22537 \end_layout
22538
22539 \begin_layout Standard
22540 Footnotes within multiple columns will be placed at the bottom of the page
22541  and not under each column.
22542  Within the different columns you can use everything, with the limitation
22543  that for floats you need to use the float option 
22544 \family sans
22545 Span columns
22546 \family default
22547 .
22548 \end_layout
22549
22550 \begin_layout Subsection
22551 Basics
22552 \end_layout
22553
22554 \begin_layout Standard
22555 If you want to have 2
22556 \begin_inset space ~
22557 \end_inset
22558
22559 columns in your text, use the style 
22560 \family sans
22561 Begin Multiple Columns
22562 \family default
22563  where the columns should start.
22564  The content of the style is the number of the columns, so in this case
22565  use a 
22566 \begin_inset Quotes eld
22567 \end_inset
22568
22569 2
22570 \begin_inset Quotes erd
22571 \end_inset
22572
22573 .
22574  At the point where the columns should end use the style 
22575 \family sans
22576 End Multiple Columns
22577 \family default
22578  and keep it empty.
22579 \end_layout
22580
22581 \begin_layout Standard
22582 Here is an example:
22583 \end_layout
22584
22585 \begin_layout Begin Multiple Columns
22586 2
22587 \end_layout
22588
22589 \begin_layout Standard
22590 \noindent
22591
22592 \series bold
22593 \size small
22594 The Adventure of the Empty House
22595 \series default
22596
22597 \begin_inset Newline newline
22598 \end_inset
22599
22600 by 
22601 \noun on
22602 Sir Arthur Conan Doyle
22603 \end_layout
22604
22605 \begin_layout Standard
22606
22607 \size small
22608 It was in the spring of the year 1894 that all London was interested, and
22609  the fashionable world dismayed, by the murder of the Honourable Ronald
22610  Adair under most unusual and inexplicable circumstances.
22611  The public has already learned those particulars of the crime which came
22612  out in the police investigation, but a good deal was suppressed upon that
22613  occasion, since the case for the prosecution was so overwhelmingly strong
22614  that it was not necessary to bring forward all the facts.
22615  Only now, at the end of nearly ten years, am I allowed to supply those
22616  missing links which make up the whole of that remarkable chain.
22617  The crime was of interest in itself, but that interest was as nothing to
22618  me compared to the inconceivable sequel, which afforded me the greatest
22619  shock and surprise of any event in my adventurous life.
22620  Even now, after this long interval, I find myself thrilling as I think
22621  of it, and feeling once more that sudden flood of joy, amazement, and increduli
22622 ty which utterly submerged my mind.
22623  Let me say to that public, which has shown some interest in those glimpses
22624  which I have occasionally given them of the thoughts and actions of a very
22625  remarkable man, that they are not to blame me if I have not shared my knowledge
22626  with them, for I should have considered it my first duty to do so, had
22627  I not been barred by a positive prohibition from his own lips, which was
22628  only withdrawn upon the third of last month.
22629 \end_layout
22630
22631 \begin_layout End Multiple Columns
22632
22633 \end_layout
22634
22635 \begin_layout Standard
22636 Here is an example with 3
22637 \begin_inset space ~
22638 \end_inset
22639
22640 columns:
22641 \end_layout
22642
22643 \begin_layout Begin Multiple Columns
22644 3
22645 \end_layout
22646
22647 \begin_layout Standard
22648
22649 \size footnotesize
22650 It can be imagined that my close intimacy with Sherlock Holmes had interested
22651  me deeply in crime, and that after his disappearance I never failed to
22652  read with care the various problems which came before the public.
22653  And I even attempted, more than once, for my own private satisfaction,
22654  to employ his methods in their solution, though with indifferent success.
22655  There was none, however, which appealed to me like this tragedy of Ronald
22656  Adair.
22657  As I read the evidence at the inquest, which led up to a verdict of willful
22658  murder against some person or persons unknown, I realized more clearly
22659  than I had ever done the loss which the community had sustained by the
22660  death of Sherlock Holmes.
22661  There were points about this strange business which would, I was sure,
22662  have specially appealed to him, and the efforts of the police would have
22663  been supplemented, or more probably anticipated, by the trained observation
22664  and the alert mind of the first criminal agent in Europe.
22665  All day, as I drove upon my round, I turned over the case in my mind and
22666  found no explanation which appeared to me to be adequate.
22667  At the risk of telling a twice-told tale, I will recapitulate the facts
22668  as they were known to the public at the conclusion of the inquest.
22669 \end_layout
22670
22671 \begin_layout End Multiple Columns
22672
22673 \end_layout
22674
22675 \begin_layout Standard
22676 You can have up to 10
22677 \begin_inset space ~
22678 \end_inset
22679
22680 columns if you want to, but that might not be very pleasant for the readers
22681  of your document.
22682 \end_layout
22683
22684 \begin_layout Standard
22685 \begin_inset Newpage newpage
22686 \end_inset
22687
22688
22689 \end_layout
22690
22691 \begin_layout Subsection
22692 Columns inside Columns
22693 \end_layout
22694
22695 \begin_layout Standard
22696 You can also have columns inside columns:
22697 \end_layout
22698
22699 \begin_layout Begin Multiple Columns
22700 2
22701 \end_layout
22702
22703 \begin_layout Standard
22704
22705 \size footnotesize
22706 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22707  at that time governor of one of the Australian colonies.
22708  Adair's mother had returned from Australia to undergo the operation for
22709  cataract, and she, her son Ronald, and her daughter Hilda were living together
22710  at 427 Park Lane.
22711 \end_layout
22712
22713 \begin_layout Begin Multiple Columns
22714 2
22715 \end_layout
22716
22717 \begin_layout Standard
22718
22719 \size footnotesize
22720 The youth moved in the best society–had, so far as was known, no enemies
22721  and no particular vices.
22722  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22723  had been broken off by mutual consent some months before, and there was
22724  no sign that it had left any very profound feeling behind it.
22725  For the rest {sic} the man's life moved in a narrow and conventional circle,
22726  for his habits were quiet and his nature unemotional.
22727  Yet it was upon this easy-going young aristocrat that death came, in most
22728  strange and unexpected form, between the hours of ten and eleven-twenty
22729  on the night of March 30, 1894.
22730 \end_layout
22731
22732 \begin_layout End Multiple Columns
22733
22734 \end_layout
22735
22736 \begin_layout Standard
22737
22738 \size footnotesize
22739 Ronald Adair was fond of cards–playing continually, but never for such stakes
22740  as would hurt him.
22741  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22742  It was shown that, after dinner on the day of his death, he had played
22743  a rubber of whist at the latter club.
22744  He had also played there in the afternoon.
22745
22746 \size default
22747  
22748 \size footnotesize
22749 The evidence of those who had played with him– Mr.
22750  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22751  and that there was a fairly equal fall of the cards.
22752  Adair might have lost five pounds, but not more.
22753  His fortune was a considerable one, and such a loss could not in any way
22754  affect him.
22755  He had played nearly every day at one club or other, but he was a cautious
22756  player, and usually rose a winner.
22757  It came out in evidence that, in partnership with Colonel Moran, he had
22758  actually won as much as four hundred and twenty pounds in a sitting, some
22759  weeks before, from Godfrey Milner and Lord Balmoral.
22760  So much for his recent history as it came out at the inquest.
22761 \end_layout
22762
22763 \begin_layout End Multiple Columns
22764
22765 \end_layout
22766
22767 \begin_layout Subsection
22768 Advanced Examples
22769 \end_layout
22770
22771 \begin_layout Standard
22772 The examples in this section show some more special features of multiple
22773  columns.
22774 \end_layout
22775
22776 \begin_layout Standard
22777 For more features of multiple columns, have a look at the documentation
22778  of the LaTeX-package 
22779 \series bold
22780 multicol
22781 \series default
22782
22783 \begin_inset Index idx
22784 status collapsed
22785
22786 \begin_layout Plain Layout
22787 LaTeX-packages ! multicol
22788 \end_layout
22789
22790 \end_inset
22791
22792
22793 \begin_inset CommandInset citation
22794 LatexCommand cite
22795 key "multicol"
22796
22797 \end_inset
22798
22799 .
22800 \end_layout
22801
22802 \begin_layout Subsubsection
22803 Preface
22804 \end_layout
22805
22806 \begin_layout Standard
22807 To add a preface text for multiple columns, add the command
22808 \end_layout
22809
22810 \begin_layout Standard
22811
22812 \series bold
22813 }[
22814 \end_layout
22815
22816 \begin_layout Standard
22817 as TeX Code behind the number of columns in the
22818 \family sans
22819  Begin Multiple Columns
22820 \family default
22821  style.
22822  Behind the command follows the preface text.
22823  At the end of the style use the command
22824 \end_layout
22825
22826 \begin_layout Standard
22827
22828 \series bold
22829 ]{
22830 \end_layout
22831
22832 \begin_layout Standard
22833 as TeX Code.
22834  An example with some preface text:
22835 \end_layout
22836
22837 \begin_layout Standard
22838 \begin_inset VSpace bigskip
22839 \end_inset
22840
22841
22842 \end_layout
22843
22844 \begin_layout Begin Multiple Columns
22845 2
22846 \begin_inset ERT
22847 status collapsed
22848
22849 \begin_layout Plain Layout
22850
22851 }[
22852 \end_layout
22853
22854 \end_inset
22855
22856 And the story continues and continues and continues and continues\SpecialChar \ldots{}
22857
22858 \begin_inset ERT
22859 status collapsed
22860
22861 \begin_layout Plain Layout
22862
22863 ]{
22864 \end_layout
22865
22866 \end_inset
22867
22868
22869 \end_layout
22870
22871 \begin_layout Standard
22872
22873 \size small
22874 On the evening of the crime, he returned from the club exactly at ten.
22875  His mother and sister were out spending the evening with a relation.
22876  The servant deposed that she heard him enter the front room on the second
22877  floor, generally used as his sitting-room.
22878  She had lit a fire there, and as it smoked she had opened the window.
22879  No sound was heard from the room until eleven-twenty, the hour of the return
22880  of Lady Maynooth and her daughter.
22881  Desiring to say good-night, she attempted to enter her son's room.
22882  The door was locked on the inside, and no answer could be got to their
22883  cries and knocking.
22884  Help was obtained, and the door forced.
22885  The unfortunate young man was found lying near the table.
22886  His head had been horribly mutilated by an expanding revolver bullet, but
22887  no weapon of any sort was to be found in the room.
22888 \end_layout
22889
22890 \begin_layout End Multiple Columns
22891
22892 \end_layout
22893
22894 \begin_layout Standard
22895 You can also use a section heading as the preface if you use a section command
22896  as TeX Code behind the first TeX Code.
22897  For example the command
22898 \end_layout
22899
22900 \begin_layout Standard
22901
22902 \series bold
22903
22904 \backslash
22905 subsection{subsection title}
22906 \end_layout
22907
22908 \begin_layout Standard
22909 creates a subsection.
22910  In this example the preface is a subsubsection:
22911 \end_layout
22912
22913 \begin_layout Begin Multiple Columns
22914 2
22915 \begin_inset ERT
22916 status collapsed
22917
22918 \begin_layout Plain Layout
22919
22920 }[
22921 \end_layout
22922
22923 \end_inset
22924
22925
22926 \begin_inset ERT
22927 status collapsed
22928
22929 \begin_layout Plain Layout
22930
22931
22932 \backslash
22933 subsubsection{
22934 \end_layout
22935
22936 \end_inset
22937
22938 This is a subsubsection heading as a preface
22939 \begin_inset ERT
22940 status collapsed
22941
22942 \begin_layout Plain Layout
22943
22944 }
22945 \end_layout
22946
22947 \end_inset
22948
22949
22950 \begin_inset ERT
22951 status collapsed
22952
22953 \begin_layout Plain Layout
22954
22955 ]{
22956 \end_layout
22957
22958 \end_inset
22959
22960
22961 \end_layout
22962
22963 \begin_layout Standard
22964
22965 \size small
22966 A minute examination of the circumstances served only to make the case more
22967  complex.
22968  In the first place, no reason could be given why the young man should have
22969  fastened the door upon the inside.
22970  There was the possibility that the murderer had done this, and had afterwards
22971  escaped by the window.
22972  The drop was at least twenty feet, however, and a bed of crocuses in full
22973  bloom lay beneath.
22974  Neither the flowers nor the earth showed any sign of having been disturbed,
22975  nor were there any marks upon the narrow strip of grass which separated
22976  the house from the road.
22977  Apparently, therefore, it was the young man himself who had fastened the
22978  door.
22979  But how did he come by his death? No one could have climbed up to the window
22980  without leaving traces.
22981  Suppose a man had fired through the window, he would indeed be a remarkable
22982  shot who could with a revolver inflict so deadly a wound.
22983  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
22984  a hundred yards of the house.
22985  No one had heard a shot.
22986 \end_layout
22987
22988 \begin_layout End Multiple Columns
22989
22990 \end_layout
22991
22992 \begin_layout Standard
22993 If there is less vertical space left on the page at the beginning of the
22994  multiple columns than needed for 6
22995 \begin_inset space ~
22996 \end_inset
22997
22998 text lines, a page break will be inserted before the multiple columns.
22999  Depending on the number of lines of the preface text, you might want to
23000  change this value.
23001  It is determined by inserting the command
23002 \end_layout
23003
23004 \begin_layout Standard
23005
23006 \series bold
23007 ][number
23008 \backslash
23009 baselineskip
23010 \end_layout
23011
23012 \begin_layout Standard
23013 as TeX Code behind the preface definition but before the final 
23014 \series bold
23015 ]{
23016 \series default
23017  command.
23018  
23019 \emph on
23020 number
23021 \emph default
23022  is hereby the number of text lines.
23023  In this example the space is set to 7
23024 \begin_inset space ~
23025 \end_inset
23026
23027 text lines:
23028 \end_layout
23029
23030 \begin_layout Begin Multiple Columns
23031 2
23032 \begin_inset ERT
23033 status collapsed
23034
23035 \begin_layout Plain Layout
23036
23037 }[
23038 \end_layout
23039
23040 \end_inset
23041
23042
23043 \begin_inset ERT
23044 status collapsed
23045
23046 \begin_layout Plain Layout
23047
23048
23049 \backslash
23050 subsubsection{
23051 \end_layout
23052
23053 \end_inset
23054
23055 This is the sectioning command
23056 \begin_inset Newline newline
23057 \end_inset
23058
23059 as a preface and
23060 \begin_inset Newline newline
23061 \end_inset
23062
23063 with multiple text lines
23064 \begin_inset ERT
23065 status collapsed
23066
23067 \begin_layout Plain Layout
23068
23069 }
23070 \end_layout
23071
23072 \end_inset
23073
23074
23075 \begin_inset ERT
23076 status collapsed
23077
23078 \begin_layout Plain Layout
23079
23080 ][7
23081 \backslash
23082 baselineskip
23083 \end_layout
23084
23085 \end_inset
23086
23087
23088 \begin_inset ERT
23089 status collapsed
23090
23091 \begin_layout Plain Layout
23092
23093 ]{
23094 \end_layout
23095
23096 \end_inset
23097
23098
23099 \end_layout
23100
23101 \begin_layout Standard
23102
23103 \size small
23104 On the evening of the crime, he returned from the club exactly at ten.
23105  His mother and sister were out spending the evening with a relation.
23106  The servant deposed that she heard him enter the front room on the second
23107  floor, generally used as his sitting-room.
23108  She had lit a fire there, and as it smoked she had opened the window.
23109  No sound was heard from the room until eleven-twenty, the hour of the return
23110  of Lady Maynooth and her daughter.
23111  Desiring to say good-night, she attempted to enter her son's room.
23112  The door was locked on the inside, and no answer could be got to their
23113  cries and knocking.
23114  Help was obtained, and the door forced.
23115  The unfortunate young man was found lying near the table.
23116  His head had been horribly mutilated by an expanding revolver bullet, but
23117  no weapon of any sort was to be found in the room.
23118 \end_layout
23119
23120 \begin_layout End Multiple Columns
23121
23122 \end_layout
23123
23124 \begin_layout Subsubsection
23125 Surrounding Space
23126 \end_layout
23127
23128 \begin_layout Standard
23129 The amount of space before and after multiple columns can be changed by
23130  changing the length 
23131 \series bold
23132
23133 \backslash
23134 multicolsep
23135 \series default
23136 .
23137  For example the command
23138 \end_layout
23139
23140 \begin_layout Standard
23141
23142 \series bold
23143
23144 \backslash
23145 setlength{
23146 \backslash
23147 multicolsep}{3cm}
23148 \end_layout
23149
23150 \begin_layout Standard
23151 in TeX Code changes its value to 3
23152 \begin_inset space \thinspace{}
23153 \end_inset
23154
23155 cm.
23156  The change must be made before the multiple columns' start.
23157  The predefined value is 13
23158 \begin_inset space \thinspace{}
23159 \end_inset
23160
23161 pt.
23162 \end_layout
23163
23164 \begin_layout Standard
23165 For this example 
23166 \series bold
23167
23168 \backslash
23169 multicolsep
23170 \series default
23171  was set to 2.5
23172 \begin_inset space \thinspace{}
23173 \end_inset
23174
23175 cm:
23176 \end_layout
23177
23178 \begin_layout Standard
23179 \begin_inset ERT
23180 status open
23181
23182 \begin_layout Plain Layout
23183
23184
23185 \backslash
23186 setlength{
23187 \backslash
23188 multicolsep}{2.5cm}
23189 \end_layout
23190
23191 \end_inset
23192
23193
23194 \end_layout
23195
23196 \begin_layout Begin Multiple Columns
23197 2
23198 \end_layout
23199
23200 \begin_layout Standard
23201
23202 \size small
23203 All day I turned these facts over in my mind, endeavouring to hit upon some
23204  theory which could reconcile them all, and to find that line of least resistanc
23205 e which my poor friend had declared to be the starting-point of every investigat
23206 ion.
23207  I confess that I made little progress.
23208  In the evening I strolled across the Park, and found myself about six o'clock
23209  at the Oxford Street end of Park Lane.
23210  A group of loafers upon the pavements, all staring up at a particular window,
23211  directed me to the house which I had come to see.
23212  A tall, thin man with coloured glasses, whom I strongly suspected of being
23213  a plain-clothes detective, was pointing out some theory of his own, while
23214  the others crowded round to listen to what he said.
23215  I got as near him as I could, but his observations seemed to me to be absurd,
23216  so I withdrew again in some disgust.
23217  As I did so I struck against an elderly, deformed man, who had been behind
23218  me, and I knocked down several books which he was carrying.
23219 \end_layout
23220
23221 \begin_layout End Multiple Columns
23222
23223 \end_layout
23224
23225 \begin_layout Standard
23226 \begin_inset Note Greyedout
23227 status open
23228
23229 \begin_layout Plain Layout
23230
23231 \series bold
23232 Note:
23233 \series default
23234  The values you set with 
23235 \series bold
23236
23237 \backslash
23238 setlength
23239 \series default
23240  will be used for all following multiple columns until you change them again.
23241 \end_layout
23242
23243 \end_inset
23244
23245
23246 \end_layout
23247
23248 \begin_layout Standard
23249 \begin_inset ERT
23250 status collapsed
23251
23252 \begin_layout Plain Layout
23253
23254
23255 \backslash
23256 setlength{
23257 \backslash
23258 multicolsep}{13pt}
23259 \end_layout
23260
23261 \end_inset
23262
23263
23264 \begin_inset Note Note
23265 status collapsed
23266
23267 \begin_layout Plain Layout
23268 go back to the default
23269 \end_layout
23270
23271 \end_inset
23272
23273
23274 \end_layout
23275
23276 \begin_layout Standard
23277 \begin_inset Newpage newpage
23278 \end_inset
23279
23280
23281 \end_layout
23282
23283 \begin_layout Subsubsection
23284 Column Separation
23285 \end_layout
23286
23287 \begin_layout Standard
23288 The width of the columns is automatically calculated, but you can modify
23289  the space between the columns.
23290  This is done by changing the length 
23291 \series bold
23292
23293 \backslash
23294 columnsep
23295 \series default
23296 .
23297  Its predefined value is 10
23298 \begin_inset space \thinspace{}
23299 \end_inset
23300
23301 pt.
23302  Here is an example where 
23303 \series bold
23304
23305 \backslash
23306 columnsep
23307 \series default
23308  is set to 3
23309 \begin_inset space \thinspace{}
23310 \end_inset
23311
23312 cm:
23313 \end_layout
23314
23315 \begin_layout Standard
23316 \begin_inset ERT
23317 status open
23318
23319 \begin_layout Plain Layout
23320
23321
23322 \backslash
23323 setlength{
23324 \backslash
23325 columnsep}{3cm}
23326 \end_layout
23327
23328 \end_inset
23329
23330
23331 \end_layout
23332
23333 \begin_layout Begin Multiple Columns
23334 2
23335 \end_layout
23336
23337 \begin_layout Standard
23338
23339 \size small
23340 My observations of No.
23341 \begin_inset space \space{}
23342 \end_inset
23343
23344 427 Park Lane did little to clear up the problem in which I was interested.
23345  The house was separated from the street by a low wall and railing, the
23346  whole not more than five feet high.
23347  It was perfectly easy, therefore, for anyone to get into the garden, but
23348  the window was entirely inaccessible, since there was no water pipe or
23349  anything which could help the most active man to climb it.
23350  More puzzled than ever, I retraced my steps to Kensington.
23351  I had not been in my study five minutes when the maid entered to say that
23352  a person desired to see me.
23353  To my astonishment it was none other than my strange old book collector,
23354  his sharp, wizened face peering out from a frame of white hair, and his
23355  precious volumes, a dozen of them at least, wedged under his right arm.
23356 \end_layout
23357
23358 \begin_layout End Multiple Columns
23359
23360 \end_layout
23361
23362 \begin_layout Standard
23363 \begin_inset ERT
23364 status collapsed
23365
23366 \begin_layout Plain Layout
23367
23368
23369 \backslash
23370 setlength{
23371 \backslash
23372 columnsep}{10pt}
23373 \end_layout
23374
23375 \end_inset
23376
23377
23378 \begin_inset Note Note
23379 status collapsed
23380
23381 \begin_layout Plain Layout
23382 go back to the default
23383 \end_layout
23384
23385 \end_inset
23386
23387
23388 \end_layout
23389
23390 \begin_layout Subsubsection
23391 Vertical Lines
23392 \end_layout
23393
23394 \begin_layout Standard
23395 Between the columns a rule with a width of the length 
23396 \series bold
23397
23398 \backslash
23399 columnseprule
23400 \series default
23401  is placed.
23402  If this rule width is set to 0
23403 \begin_inset space \thinspace{}
23404 \end_inset
23405
23406 pt (this is the default), the rule is suppressed.
23407  In the following example the line is 2
23408 \begin_inset space \thinspace{}
23409 \end_inset
23410
23411 pt wide:
23412 \end_layout
23413
23414 \begin_layout Standard
23415 \begin_inset ERT
23416 status open
23417
23418 \begin_layout Plain Layout
23419
23420
23421 \backslash
23422 setlength{
23423 \backslash
23424 columnseprule}{2pt}
23425 \end_layout
23426
23427 \end_inset
23428
23429
23430 \end_layout
23431
23432 \begin_layout Begin Multiple Columns
23433 2
23434 \end_layout
23435
23436 \begin_layout Standard
23437
23438 \size small
23439 \begin_inset Quotes eld
23440 \end_inset
23441
23442 You're surprised to see me, sir,
23443 \begin_inset Quotes erd
23444 \end_inset
23445
23446  said he, in a strange, croaking voice.
23447 \end_layout
23448
23449 \begin_layout Standard
23450
23451 \size small
23452 I acknowledged that I was.
23453 \end_layout
23454
23455 \begin_layout Standard
23456
23457 \size small
23458 \begin_inset Quotes eld
23459 \end_inset
23460
23461 Well, I've a conscience, sir, and when I chanced to see you go into this
23462  house, as I came hobbling after you, I thought to myself, I'll just step
23463  in and see that kind gentleman, and tell him that if I was a bit gruff
23464  in my manner there was not any harm meant, and that I am much obliged to
23465  him for picking up my books.
23466 \begin_inset Quotes erd
23467 \end_inset
23468
23469
23470 \end_layout
23471
23472 \begin_layout Standard
23473
23474 \size small
23475 \begin_inset Quotes eld
23476 \end_inset
23477
23478 You make too much of a trifle,
23479 \begin_inset Quotes erd
23480 \end_inset
23481
23482  said I.
23483  
23484 \begin_inset Quotes eld
23485 \end_inset
23486
23487 May I ask how you knew who I was?
23488 \begin_inset Quotes erd
23489 \end_inset
23490
23491
23492 \end_layout
23493
23494 \begin_layout Standard
23495
23496 \size small
23497 \begin_inset Quotes eld
23498 \end_inset
23499
23500 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
23501  you'll find my little bookshop at the corner of Church Street, and very
23502  happy to see you, I am sure.
23503  Maybe you collect yourself, sir.
23504  Here's 
23505 \noun on
23506 British
23507 \begin_inset space ~
23508 \end_inset
23509
23510 Birds
23511 \noun default
23512 , and 
23513 \noun on
23514 Catullus
23515 \noun default
23516 , and 
23517 \noun on
23518 The Holy War
23519 \noun default
23520 --a bargain, every one of them.
23521  With five volumes you could just fill that gap on that second shelf.
23522  It looks untidy, does it not, sir?
23523 \begin_inset Quotes erd
23524 \end_inset
23525
23526
23527 \end_layout
23528
23529 \begin_layout End Multiple Columns
23530
23531 \end_layout
23532
23533 \begin_layout Standard
23534 \begin_inset ERT
23535 status collapsed
23536
23537 \begin_layout Plain Layout
23538
23539
23540 \backslash
23541 setlength{
23542 \backslash
23543 columnseprule}{0pt}
23544 \end_layout
23545
23546 \end_inset
23547
23548
23549 \begin_inset Note Note
23550 status collapsed
23551
23552 \begin_layout Plain Layout
23553 go back to the default
23554 \end_layout
23555
23556 \end_inset
23557
23558
23559 \end_layout
23560
23561 \begin_layout Standard
23562 \begin_inset Newpage newpage
23563 \end_inset
23564
23565
23566 \end_layout
23567
23568 \begin_layout Section
23569 Non-standard Paragraph Shapes
23570 \end_layout
23571
23572 \begin_layout Standard
23573 \begin_inset ERT
23574 status collapsed
23575
23576 \begin_layout Plain Layout
23577
23578
23579 \backslash
23580 begin{sloppypar}
23581 \end_layout
23582
23583 \end_inset
23584
23585
23586 \end_layout
23587
23588 \begin_layout Standard
23589 \begin_inset ERT
23590 status collapsed
23591
23592 \begin_layout Plain Layout
23593
23594
23595 \backslash
23596 newdimen
23597 \backslash
23598 varunit 
23599 \end_layout
23600
23601 \begin_layout Plain Layout
23602
23603
23604 \backslash
23605 setlength{
23606 \backslash
23607 varunit}{4.5in}
23608 \end_layout
23609
23610 \end_inset
23611
23612
23613 \end_layout
23614
23615 \begin_layout Standard
23616 \noindent
23617 \begin_inset ERT
23618 status collapsed
23619
23620 \begin_layout Plain Layout
23621
23622
23623 \backslash
23624 parshape 19 0.45
23625 \backslash
23626 varunit 0.332
23627 \backslash
23628 varunit
23629 \end_layout
23630
23631 \begin_layout Plain Layout
23632
23633 0.40
23634 \backslash
23635 varunit 0.300
23636 \backslash
23637 varunit
23638 \end_layout
23639
23640 \begin_layout Plain Layout
23641
23642 0.35
23643 \backslash
23644 varunit 0.293
23645 \backslash
23646 varunit
23647 \end_layout
23648
23649 \begin_layout Plain Layout
23650
23651 0.30
23652 \backslash
23653 varunit 0.300
23654 \backslash
23655 varunit
23656 \end_layout
23657
23658 \begin_layout Plain Layout
23659
23660 0.25
23661 \backslash
23662 varunit 0.317
23663 \backslash
23664 varunit
23665 \end_layout
23666
23667 \begin_layout Plain Layout
23668
23669 0.20
23670 \backslash
23671 varunit 0.342
23672 \backslash
23673 varunit
23674 \end_layout
23675
23676 \begin_layout Plain Layout
23677
23678 0.15
23679 \backslash
23680 varunit 0.373
23681 \backslash
23682 varunit
23683 \end_layout
23684
23685 \begin_layout Plain Layout
23686
23687 0.10
23688 \backslash
23689 varunit 0.410
23690 \backslash
23691 varunit
23692 \end_layout
23693
23694 \begin_layout Plain Layout
23695
23696 0.05
23697 \backslash
23698 varunit 0.453
23699 \backslash
23700 varunit
23701 \end_layout
23702
23703 \begin_layout Plain Layout
23704
23705 0.00
23706 \backslash
23707 varunit 0.500
23708 \backslash
23709 varunit
23710 \end_layout
23711
23712 \begin_layout Plain Layout
23713
23714 0.05
23715 \backslash
23716 varunit 0.453
23717 \backslash
23718 varunit
23719 \end_layout
23720
23721 \begin_layout Plain Layout
23722
23723 0.10
23724 \backslash
23725 varunit 0.410
23726 \backslash
23727 varunit
23728 \end_layout
23729
23730 \begin_layout Plain Layout
23731
23732 0.15
23733 \backslash
23734 varunit 0.373
23735 \backslash
23736 varunit
23737 \end_layout
23738
23739 \begin_layout Plain Layout
23740
23741 0.20
23742 \backslash
23743 varunit 0.342
23744 \backslash
23745 varunit
23746 \end_layout
23747
23748 \begin_layout Plain Layout
23749
23750 0.25
23751 \backslash
23752 varunit 0.317
23753 \backslash
23754 varunit
23755 \end_layout
23756
23757 \begin_layout Plain Layout
23758
23759 0.30
23760 \backslash
23761 varunit 0.300
23762 \backslash
23763 varunit
23764 \end_layout
23765
23766 \begin_layout Plain Layout
23767
23768 0.35
23769 \backslash
23770 varunit 0.293
23771 \backslash
23772 varunit
23773 \end_layout
23774
23775 \begin_layout Plain Layout
23776
23777 0.40
23778 \backslash
23779 varunit 0.300
23780 \backslash
23781 varunit
23782 \end_layout
23783
23784 \begin_layout Plain Layout
23785
23786 0.45
23787 \backslash
23788 varunit 0.332
23789 \backslash
23790 varunit
23791 \end_layout
23792
23793 \begin_layout Plain Layout
23794
23795 \end_layout
23796
23797 \end_inset
23798
23799 There are times when the tyranny of rectangular paragraphs must be overthrown.
23800  In such situations, a call to the delightful plain TeX command 
23801 \family typewriter
23802
23803 \backslash
23804 parshape
23805 \family default
23806  is called for.
23807  As you can see, completely arbitrary shapes can be laid out with a suitable
23808  set of line length definitions.
23809  While this parshape may look a bit silly and useless, one could conceive
23810  of situations such as finely tuned dropped capitals, word wrapping around
23811  non-rectangular graphics, etc.
23812  which will benefit from such handcrafting.
23813 \end_layout
23814
23815 \begin_layout Standard
23816 \begin_inset VSpace bigskip
23817 \end_inset
23818
23819
23820 \end_layout
23821
23822 \begin_layout Standard
23823 The syntax is 
23824 \family typewriter
23825
23826 \backslash
23827 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23828  #nindent #nlength
23829 \family default
23830 , where 
23831 \family typewriter
23832 numlines
23833 \family default
23834  is the number of lines of text which define the paragraph.
23835  If there turn out to be fewer lines, the shape is truncated; if there are
23836  more, the excess lines have the same dimensions as the last line of the
23837  definition.
23838  The 
23839 \family typewriter
23840 #nindent
23841 \family default
23842  and 
23843 \family typewriter
23844 #nlength
23845 \family default
23846  entries specify the indentation of the line from the left margin, and the
23847  length of the line as measured from that point.
23848  The shape applies only to the current paragraph; everything is reset to
23849  normal for the next paragraph.
23850 \end_layout
23851
23852 \begin_layout Standard
23853 \begin_inset ERT
23854 status collapsed
23855
23856 \begin_layout Plain Layout
23857
23858
23859 \backslash
23860 end{sloppypar}
23861 \end_layout
23862
23863 \end_inset
23864
23865
23866 \end_layout
23867
23868 \begin_layout Bibliography
23869 \begin_inset CommandInset bibitem
23870 LatexCommand bibitem
23871 key "multicol"
23872
23873 \end_inset
23874
23875 Documentation of the LaTeX-package 
23876 \begin_inset CommandInset href
23877 LatexCommand href
23878 name "multicol"
23879 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
23880
23881 \end_inset
23882
23883
23884 \begin_inset Index idx
23885 status collapsed
23886
23887 \begin_layout Plain Layout
23888 LaTeX-packages ! multicol
23889 \end_layout
23890
23891 \end_inset
23892
23893
23894 \end_layout
23895
23896 \end_body
23897 \end_document