]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
Whitespace.
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 474
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 % extra space for tables
37 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
38 \end_preamble
39 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
40 \use_default_options false
41 \begin_modules
42 logicalmkup
43 theorems-ams
44 theorems-ams-extended
45 multicol
46 shapepar
47 \end_modules
48 \maintain_unincluded_children false
49 \begin_local_layout
50 Format 7
51 InsetLayout CharStyle:MenuItem
52 LyxType               charstyle
53 LabelString           menu
54 LatexType             command
55 LatexName             menuitem
56 Font
57 Family              Sans
58 EndFont
59 Preamble
60 \newcommand*{\menuitem}[1]{{\sffamily #1}}
61 EndPreamble
62 End
63 \end_local_layout
64 \language english
65 \language_package default
66 \inputencoding auto
67 \fontencoding global
68 \font_roman default
69 \font_sans default
70 \font_typewriter default
71 \font_math auto
72 \font_default_family default
73 \use_non_tex_fonts false
74 \font_sc false
75 \font_osf false
76 \font_sf_scale 100
77 \font_tt_scale 100
78 \graphics default
79 \default_output_format default
80 \output_sync 0
81 \bibtex_command default
82 \index_command default
83 \paperfontsize 12
84 \spacing single
85 \use_hyperref true
86 \pdf_title "LyX's Additional Features manual"
87 \pdf_author "LyX Team"
88 \pdf_subject "LyX's additional features documentation"
89 \pdf_keywords "LyX, Documentation, Additional"
90 \pdf_bookmarks true
91 \pdf_bookmarksnumbered true
92 \pdf_bookmarksopen false
93 \pdf_bookmarksopenlevel 1
94 \pdf_breaklinks false
95 \pdf_pdfborder false
96 \pdf_colorlinks true
97 \pdf_backref false
98 \pdf_pdfusetitle false
99 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
100 \papersize a4paper
101 \use_geometry false
102 \use_package amsmath 1
103 \use_package amssymb 1
104 \use_package cancel 0
105 \use_package esint 0
106 \use_package mathdots 1
107 \use_package mathtools 0
108 \use_package mhchem 1
109 \use_package stackrel 0
110 \use_package stmaryrd 0
111 \use_package undertilde 0
112 \cite_engine basic
113 \cite_engine_type default
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 false
135 \output_changes false
136 \html_math_output 0
137 \html_css_as_file 0
138 \html_be_strict true
139 \end_header
140
141 \begin_body
142
143 \begin_layout Title
144 Additional LyX Features
145 \end_layout
146
147 \begin_layout Subtitle
148 Version 2.1.x
149 \end_layout
150
151 \begin_layout Author
152 by the LyX Team
153 \begin_inset Foot
154 status collapsed
155
156 \begin_layout Plain Layout
157 \noindent
158 Principal maintainer of this file is
159 \noun on
160  Richard Heck
161 \noun default
162 .
163  If you have comments or error corrections, please send them to the LyX
164  Documentation mailing list, 
165 \begin_inset Flex Code
166 status collapsed
167
168 \begin_layout Plain Layout
169 \noindent
170 <lyx-docs@lists.lyx.org>
171 \end_layout
172
173 \end_inset
174
175 .
176 \end_layout
177
178 \end_inset
179
180
181 \end_layout
182
183 \begin_layout Standard
184 \begin_inset CommandInset toc
185 LatexCommand tableofcontents
186
187 \end_inset
188
189
190 \end_layout
191
192 \begin_layout Chapter
193 Introduction
194 \end_layout
195
196 \begin_layout Standard
197 This manual is essentially Part II of the 
198 \emph on
199 User's Guide\SpecialChar \@.
200
201 \emph default
202  The reason for separating the two documents is simple: the 
203 \emph on
204 User's Guide
205 \emph default
206  is already quite lengthy, and it contains information on all of the basic
207  features one needs to know in order to prepare most documents.
208  However, the LyX Team has worked to make LyX extensible through various
209  configuration files and external packages.
210  That means that if you want to support the Fizzwizzle LaTeX package, you
211  can create a layout file (or module) for it without having to alter LyX
212  itself.
213  We've already had contributions of several new features this way, and some
214  of them are documented here.
215  There are also some more `advanced' features, such as how to control the
216  presentation of bibliographies and how to work with multi-part documents,
217  that are not covered in the 
218 \emph on
219 User's Guide
220 \emph default
221  and are discussed here.
222 \end_layout
223
224 \begin_layout Standard
225 This manual also documents some special features, like fax support, version
226  control, and SGML support, which require additional software to work properly.
227  There is also a chapter on LyX's support for HTML.
228  And lastly, there's a chapter of LaTeX tools and tips, things you can use
229  to spruce up your documents by directly using the powerful features of
230  LaTeX.
231  After all, LyX 
232 \emph on
233 is
234 \emph default
235  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
236 \end_layout
237
238 \begin_layout Standard
239 If you haven't read the 
240 \emph on
241 Introduction
242 \emph default
243  yet, you are definitely in the wrong manual.
244  The 
245 \emph on
246 Introduction
247 \emph default
248  is the first place to go, since it describes the notation and format of
249  all of the manuals.
250  You should also be thoroughly familiar with the 
251 \emph on
252 User's Guide
253 \emph default
254  and all of the basic features of LyX before attempting to read this one.
255 \end_layout
256
257 \begin_layout Standard
258 Since many of the topics in this manual depend heavily on LyX's interaction
259  with LaTeX, this first chapter covers the inner workings of LyX and how
260  to direct LyX to generate exactly the LaTeX code you want.
261  It is obviously for more seasoned LyX users.
262 \end_layout
263
264 \begin_layout Chapter
265 LyX and LaTeX
266 \end_layout
267
268 \begin_layout Section
269 How LyX Uses LaTeX
270 \end_layout
271
272 \begin_layout Standard
273 This chapter is for both TeX-nicians and the LaTeX-curious.
274  In it, we'll explain how LyX and LaTeX work together to produce printable
275  output.
276  This is the only place in any of the manuals where we assume you know something
277  about LaTeX.
278 \end_layout
279
280 \begin_layout Standard
281 At one time, LyX was called a 
282 \begin_inset Quotes eld
283 \end_inset
284
285 WYSIWYM frontend to LaTeX,
286 \begin_inset Quotes erd
287 \end_inset
288
289  but that's no longer true.
290  There are frontends to LaTeX out there.
291 \begin_inset Foot
292 status collapsed
293
294 \begin_layout Plain Layout
295 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
296  There are also the LaTeX modes for vi and emacs, of course.
297 \end_layout
298
299 \end_inset
300
301  These are basically text editors with the ability to run LaTeX and mark
302  any errors in the file you're editing.
303  Although LyX 
304 \emph on
305 is
306 \emph default
307  an editor, and it 
308 \emph on
309 does
310 \emph default
311  run LaTeX, and it also indicates errors in the file, it also does much,
312  much more.
313  For one thing, you don't need to know LaTeX to use LyX effectively.
314  And LyX has added its own extensions to LaTeX.
315  Try the following sometime: select 
316 \begin_inset Flex MenuItem
317 status collapsed
318
319 \begin_layout Plain Layout
320 Export\SpecialChar \menuseparator
321 LaTeX
322 \end_layout
323
324 \end_inset
325
326  from the 
327 \begin_inset Flex MenuItem
328 status collapsed
329
330 \begin_layout Plain Layout
331 File
332 \end_layout
333
334 \end_inset
335
336  menu (or 
337 \begin_inset Flex MenuItem
338 status collapsed
339
340 \begin_layout Plain Layout
341 View\SpecialChar \menuseparator
342 Source
343 \begin_inset space ~
344 \end_inset
345
346 Pane
347 \end_layout
348
349 \end_inset
350
351 ), then look at the preamble of the resulting 
352 \begin_inset Flex Code
353 status collapsed
354
355 \begin_layout Plain Layout
356 .tex
357 \end_layout
358
359 \end_inset
360
361  file.
362  You'll notice a variety of new macros defined specifically by LyX.
363  These macros are defined automatically, according to the features you use
364  in the document.
365 \end_layout
366
367 \begin_layout Standard
368 There are several commands that automatically invoke LaTeX.
369  They are:
370 \end_layout
371
372 \begin_layout Itemize
373 \begin_inset Flex MenuItem
374 status collapsed
375
376 \begin_layout Plain Layout
377 Document\SpecialChar \menuseparator
378 View
379 \end_layout
380
381 \end_inset
382
383
384 \end_layout
385
386 \begin_layout Itemize
387 \begin_inset Flex MenuItem
388 status collapsed
389
390 \begin_layout Plain Layout
391 Document\SpecialChar \menuseparator
392 Update
393 \end_layout
394
395 \end_inset
396
397
398 \end_layout
399
400 \begin_layout Itemize
401 \begin_inset Flex MenuItem
402 status collapsed
403
404 \begin_layout Plain Layout
405 File\SpecialChar \menuseparator
406 Print
407 \end_layout
408
409 \end_inset
410
411
412 \end_layout
413
414 \begin_layout Itemize
415 \begin_inset Flex MenuItem
416 status collapsed
417
418 \begin_layout Plain Layout
419 File\SpecialChar \menuseparator
420 Fax
421 \end_layout
422
423 \end_inset
424
425
426 \end_layout
427
428 \begin_layout Standard
429 They will only invoke LaTeX if the file has changed since the last time
430  LaTeX was run.
431  
432 \end_layout
433
434 \begin_layout Standard
435 When LyX runs LaTeX on the file you're editing, it performs these steps:
436 \end_layout
437
438 \begin_layout Enumerate
439 Convert the document to LaTeX and save to a file with the extension 
440 \begin_inset Flex Code
441 status collapsed
442
443 \begin_layout Plain Layout
444 .tex
445 \end_layout
446
447 \end_inset
448
449  in place of 
450 \begin_inset Flex Code
451 status collapsed
452
453 \begin_layout Plain Layout
454 .lyx
455 \end_layout
456
457 \end_inset
458
459 .
460 \end_layout
461
462 \begin_layout Enumerate
463 Run LaTeX on the 
464 \begin_inset Flex Code
465 status collapsed
466
467 \begin_layout Plain Layout
468 .tex
469 \end_layout
470
471 \end_inset
472
473  file (maybe several times), and run any other commands (such as 
474 \begin_inset Flex Code
475 status collapsed
476
477 \begin_layout Plain Layout
478 bibtex
479 \end_layout
480
481 \end_inset
482
483  or 
484 \begin_inset Flex Code
485 status collapsed
486
487 \begin_layout Plain Layout
488 makeindex
489 \end_layout
490
491 \end_inset
492
493 ) needed to compile the LaTeX file.
494 \end_layout
495
496 \begin_layout Enumerate
497 If there are any errors, show the error log.
498 \end_layout
499
500 \begin_layout Standard
501 If you have run LaTeX using 
502 \begin_inset Flex MenuItem
503 status collapsed
504
505 \begin_layout Plain Layout
506 View
507 \bar under
508 \SpecialChar \menuseparator
509
510 \bar default
511 DVI
512 \end_layout
513
514 \end_inset
515
516 , LyX then runs a DVI viewer to display the DVI-file.
517  If you have used 
518 \begin_inset Flex MenuItem
519 status collapsed
520
521 \begin_layout Plain Layout
522 View
523 \bar under
524 \SpecialChar \menuseparator
525
526 \bar default
527 PostScript
528 \end_layout
529
530 \end_inset
531
532 , LyX performs further steps:
533 \end_layout
534
535 \begin_layout Itemize
536 Run 
537 \begin_inset Flex Code
538 status collapsed
539
540 \begin_layout Plain Layout
541 dvips
542 \end_layout
543
544 \end_inset
545
546  to convert the DVI file to PostScript.
547 \end_layout
548
549 \begin_layout Itemize
550 Run a PostScript viewer, such as 
551 \begin_inset Flex Code
552 status collapsed
553
554 \begin_layout Plain Layout
555 ghostview
556 \end_layout
557
558 \end_inset
559
560 , to display the PostScript file.
561 \end_layout
562
563 \begin_layout Standard
564 LyX does similar things when viewing, or exporting, other formats.
565 \end_layout
566
567 \begin_layout Section
568 Translating LaTeX files into LyX
569 \end_layout
570
571 \begin_layout Standard
572 You can import a LaTeX file into LyX by using the 
573 \begin_inset Flex MenuItem
574 status collapsed
575
576 \begin_layout Plain Layout
577 File\SpecialChar \menuseparator
578 Import\SpecialChar \menuseparator
579 LaTeX
580 \end_layout
581
582 \end_inset
583
584  command in LyX.
585  This will call a program named 
586 \begin_inset Flex Code
587 status collapsed
588
589 \begin_layout Plain Layout
590 tex2lyx
591 \end_layout
592
593 \end_inset
594
595  which will create a file 
596 \begin_inset Flex Code
597 status collapsed
598
599 \begin_layout Plain Layout
600 foo.lyx
601 \end_layout
602
603 \end_inset
604
605  from the file 
606 \begin_inset Flex Code
607 status collapsed
608
609 \begin_layout Plain Layout
610 foo.tex
611 \end_layout
612
613 \end_inset
614
615 .
616  LyX will then open that file.
617 \begin_inset Foot
618 status collapsed
619
620 \begin_layout Plain Layout
621 \begin_inset Flex Code
622 status collapsed
623
624 \begin_layout Plain Layout
625 tex2lyx
626 \end_layout
627
628 \end_inset
629
630  can also be run from the command line, of course.
631 \end_layout
632
633 \end_inset
634
635
636 \end_layout
637
638 \begin_layout Standard
639 \begin_inset Flex Code
640 status collapsed
641
642 \begin_layout Plain Layout
643 tex2lyx
644 \end_layout
645
646 \end_inset
647
648  will translate most legal LaTeX, but not everything.
649  It will put things it doesn't understand into TeX code, so after translating
650  a file with 
651 \begin_inset Flex Code
652 status collapsed
653
654 \begin_layout Plain Layout
655 tex2lyx
656 \end_layout
657
658 \end_inset
659
660 , you can look for TeX code and hand-edit it until it looks right.
661 \end_layout
662
663 \begin_layout Standard
664 If you don't know what TeX code is, read the next section.
665 \end_layout
666
667 \begin_layout Section
668 \begin_inset CommandInset label
669 LatexCommand label
670 name "sec:Inserting-TeX-Code"
671
672 \end_inset
673
674 Inserting TeX Code into LyX Documents 
675 \end_layout
676
677 \begin_layout Standard
678 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
679  You can always insert TeX code into any LyX document.
680  LyX cannot, and will never be able to, display every possible LaTeX construct.
681  If ever you need to insert LaTeX commands into your LyX document, you can
682  use the 
683 \begin_inset Flex Code
684 status collapsed
685
686 \begin_layout Plain Layout
687 TeX Code
688 \end_layout
689
690 \end_inset
691
692  box, which you can insert into your document with 
693 \begin_inset Flex MenuItem
694 status collapsed
695
696 \begin_layout Plain Layout
697 Insert\SpecialChar \menuseparator
698 TeX Code
699 \end_layout
700
701 \end_inset
702
703  or the keyboard shortcut 
704 \begin_inset Info
705 type  "shortcut"
706 arg   "ert-insert"
707 \end_inset
708
709 .
710 \end_layout
711
712 \begin_layout Standard
713 Here's an example of inserting LaTeX commands in a LyX document.
714  The code looks like this:
715 \end_layout
716
717 \begin_layout LyX-Code
718
719 \backslash
720 begin{tabular}{ll}
721 \begin_inset Newline newline
722 \end_inset
723
724
725 \backslash
726 begin{minipage}{5cm}
727 \begin_inset Newline newline
728 \end_inset
729
730 This is an example of a minipage environment.
731  You 
732 \begin_inset Newline newline
733 \end_inset
734
735 can put nearly everything in it, even (non-floating) 
736 \begin_inset Newline newline
737 \end_inset
738
739 figures and tables.
740  
741 \begin_inset Newline newline
742 \end_inset
743
744
745 \backslash
746 end{minipage}
747 \begin_inset Newline newline
748 \end_inset
749
750 &
751 \begin_inset Newline newline
752 \end_inset
753
754
755 \backslash
756 begin{minipage}{5cm}
757 \begin_inset Newline newline
758 \end_inset
759
760
761 \backslash
762 begin{verbatim}
763 \begin_inset Newline newline
764 \end_inset
765
766
767 \backslash
768 begin{minipage}{5cm}
769 \begin_inset Newline newline
770 \end_inset
771
772 This ...
773  
774 \begin_inset Newline newline
775 \end_inset
776
777
778 \backslash
779 end{minipage}
780 \begin_inset Newline newline
781 \end_inset
782
783
784 \backslash
785 end{verbatim}
786 \begin_inset Newline newline
787 \end_inset
788
789
790 \backslash
791 end{minipage}
792 \begin_inset Newline newline
793 \end_inset
794
795
796 \backslash
797 end{tabular}
798 \end_layout
799
800 \begin_layout LyX-Code
801
802 \end_layout
803
804 \begin_layout Standard
805 The 
806 \begin_inset Flex Code
807 status collapsed
808
809 \begin_layout Plain Layout
810 TeX Code
811 \end_layout
812
813 \end_inset
814
815  box containing this text is directly after this paragraph.
816  Those of you reading the manual in LyX will only see the TeX code inset.
817  Those reading a printed version of the manuals will see the actual results:
818 \begin_inset VSpace bigskip
819 \end_inset
820
821
822 \end_layout
823
824 \begin_layout Standard
825 \begin_inset ERT
826 status open
827
828 \begin_layout Plain Layout
829
830
831 \backslash
832 begin{tabular}{ll}
833 \end_layout
834
835 \begin_layout Plain Layout
836
837
838 \backslash
839 begin{minipage}{5cm}
840 \end_layout
841
842 \begin_layout Plain Layout
843
844 This is an example of a minipage environment.
845  You can put nearly everything in it, even (non-floating) figures and tables.
846  
847 \end_layout
848
849 \begin_layout Plain Layout
850
851
852 \backslash
853 end{minipage}
854 \end_layout
855
856 \begin_layout Plain Layout
857
858 &
859 \end_layout
860
861 \begin_layout Plain Layout
862
863
864 \backslash
865 begin{minipage}{5cm}
866 \end_layout
867
868 \begin_layout Plain Layout
869
870
871 \backslash
872 begin{verbatim}
873 \end_layout
874
875 \begin_layout Plain Layout
876
877
878 \backslash
879 begin{minipage}{5cm}
880 \end_layout
881
882 \begin_layout Plain Layout
883
884 This ...
885  
886 \end_layout
887
888 \begin_layout Plain Layout
889
890
891 \backslash
892 end{minipage}
893 \end_layout
894
895 \begin_layout Plain Layout
896
897
898 \backslash
899 end{verbatim}
900 \end_layout
901
902 \begin_layout Plain Layout
903
904
905 \backslash
906 end{minipage}
907 \end_layout
908
909 \begin_layout Plain Layout
910
911
912 \backslash
913 end{tabular}
914 \end_layout
915
916 \end_inset
917
918
919 \begin_inset VSpace bigskip
920 \end_inset
921
922
923 \end_layout
924
925 \begin_layout Standard
926 In addition to using TeX code, you can also create a separate file containing
927  some complex LaTeX structure and then use 
928 \begin_inset Flex MenuItem
929 status collapsed
930
931 \begin_layout Plain Layout
932 Insert\SpecialChar \menuseparator
933 Child
934 \begin_inset space ~
935 \end_inset
936
937 Document
938 \end_layout
939
940 \end_inset
941
942  to include your file (you should select the type 
943 \begin_inset Flex Code
944 status collapsed
945
946 \begin_layout Plain Layout
947 Input
948 \end_layout
949
950 \end_inset
951
952 ).
953  We recommend that you only do this if you have a 
954 \begin_inset Flex Code
955 status collapsed
956
957 \begin_layout Plain Layout
958 .tex
959 \end_layout
960
961 \end_inset
962
963  file which you 
964 \emph on
965 know
966 \emph default
967  works already.
968  Otherwise, you'll have a big job tracking down LaTeX errors.
969 \end_layout
970
971 \begin_layout Standard
972 There are a few last points to emphasize:
973 \end_layout
974
975 \begin_layout Itemize
976 LyX 
977 \emph on
978 does not
979 \emph default
980  check if your LaTeX code is correct.
981 \end_layout
982
983 \begin_layout Itemize
984 Beware of reinventing the wheel.
985 \end_layout
986
987 \begin_layout Standard
988 On that last point, LyX does have quite a few features tucked into it, and
989  more are coming.
990  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
991  feature before you decide you have to do it by hand.
992  Moreover, there are numerous LaTeX packages out there to do all sorts of
993  things, from labels to envelopes to fancy multipage tables.
994  Check out 
995 \begin_inset CommandInset href
996 LatexCommand href
997 name "CTAN"
998 target "http://www.ctan.org/"
999
1000 \end_inset
1001
1002  for details.
1003 \end_layout
1004
1005 \begin_layout Standard
1006 If you do need to do some wild and fancy things within your document, be
1007  sure to check out a good LaTeX book for assistance.
1008  There are a number of them listed in the bibliography of the 
1009 \emph on
1010 User's Guide
1011 \emph default
1012 .
1013 \end_layout
1014
1015 \begin_layout Section
1016 LyX and the LaTeX Preamble
1017 \end_layout
1018
1019 \begin_layout Subsection
1020 About the LaTeX Preamble
1021 \end_layout
1022
1023 \begin_layout Standard
1024 If you already know LaTeX, there is no need to explain here what the preamble
1025  is good for.
1026  If you don't, the following will give you some ideas—we recommend again
1027  that you consult a LaTeX book for further information.
1028  In any case, you should read the points below, because they explain what
1029  you can do and what you don't need to do in the LaTeX preamble of a LyX
1030  document.
1031 \end_layout
1032
1033 \begin_layout Standard
1034 The LaTeX preamble comes at the very beginning of a document, 
1035 \emph on
1036 before
1037 \emph default
1038  the text.
1039  It serves to:
1040 \end_layout
1041
1042 \begin_layout Itemize
1043 Declare the document class.
1044  
1045 \begin_inset Newline newline
1046 \end_inset
1047
1048 LyX already does this for you.
1049  If you're a seasoned LaTeX-nician, and you have a custom document class
1050  you want to use, check out the 
1051 \emph on
1052 Customization Manual
1053 \emph default
1054  for information on how to make LyX interface to it.
1055 \end_layout
1056
1057 \begin_layout Itemize
1058 Declare the usage of packages.
1059  
1060 \begin_inset Newline newline
1061 \end_inset
1062
1063 LaTeX packages provide special commands, which are only available within
1064  a document when the package has been declared in the preamble.
1065  In addition to providing special commands, the inclusion of a package can
1066  change the document.
1067  For example, the package 
1068 \begin_inset Flex Code
1069 status collapsed
1070
1071 \begin_layout Plain Layout
1072 indentfirst
1073 \end_layout
1074
1075 \end_inset
1076
1077  forces all paragraphs to be indented.
1078  There are other packages for labels, envelopes, margins, etc.
1079  
1080 \end_layout
1081
1082 \begin_layout Itemize
1083 Set counters, variables, lengths and widths.
1084  
1085 \begin_inset Newline newline
1086 \end_inset
1087
1088 There are several LaTeX counters and variables that 
1089 \emph on
1090 must
1091 \emph default
1092  be set globally from within the preamble in order to have the desired effect.
1093  (There are variables that you can set and reset inside the document, too.)
1094  Margins are a good example of something that must be set in the preamble.
1095  Another example is the label format for lists.
1096  You can actually set these just about anywhere, but it's best to do it
1097  just once, inside the preamble.
1098 \end_layout
1099
1100 \begin_layout Itemize
1101 Declare user defined commands (with 
1102 \begin_inset Flex Code
1103 status collapsed
1104
1105 \begin_layout Plain Layout
1106
1107 \backslash
1108 newcommand
1109 \end_layout
1110
1111 \end_inset
1112
1113  or 
1114 \begin_inset Flex Code
1115 status collapsed
1116
1117 \begin_layout Plain Layout
1118
1119 \backslash
1120 renewcommand
1121 \end_layout
1122
1123 \end_inset
1124
1125 ).
1126 \begin_inset Newline newline
1127 \end_inset
1128
1129 These are abbreviations for LaTeX commands which appear very often inside
1130  a document.
1131  Although the preamble is a good place to declare such commands, they 
1132 \emph on
1133 can
1134 \emph default
1135  be declared anywhere (before they are used for the first time, of course).
1136  This can be useful if there is a lot of raw LaTeX code in your document,
1137  which normally should not be the case.
1138 \end_layout
1139
1140 \begin_layout Standard
1141 LyX adds its own set of definitions to the preamble of the 
1142 \begin_inset Flex Code
1143 status collapsed
1144
1145 \begin_layout Plain Layout
1146 .tex
1147 \end_layout
1148
1149 \end_inset
1150
1151  file it produces.
1152  This makes LaTeX files generated by LyX portable.
1153 \end_layout
1154
1155 \begin_layout Subsection
1156 Changing the Preamble
1157 \end_layout
1158
1159 \begin_layout Standard
1160 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1161  can't change them without patching LyX itself.
1162  You can, however, add your own stuff to the preamble by selecting 
1163 \begin_inset Flex MenuItem
1164 status collapsed
1165
1166 \begin_layout Plain Layout
1167 LaTeX
1168 \begin_inset space ~
1169 \end_inset
1170
1171 Preamble
1172 \end_layout
1173
1174 \end_inset
1175
1176  in the 
1177 \begin_inset Flex MenuItem
1178 status collapsed
1179
1180 \begin_layout Plain Layout
1181 Document\SpecialChar \menuseparator
1182 Settings
1183 \end_layout
1184
1185 \end_inset
1186
1187  dialog.
1188  LyX adds anything in the 
1189 \begin_inset Flex MenuItem
1190 status collapsed
1191
1192 \begin_layout Plain Layout
1193 Preamble
1194 \end_layout
1195
1196 \end_inset
1197
1198  dialog to its own built-in preamble.
1199  Before adding your own declarations in the preamble, you should make sure
1200  that LyX doesn't already support what you want to do.
1201  (Remember what we said about reinventing the wheel?) Also, 
1202 \emph on
1203 make sure your preamble code is correct
1204 \emph default
1205 .
1206  LyX doesn't check it for you.
1207  If there is an error, you're likely to get an error like 
1208 \begin_inset Quotes eld
1209 \end_inset
1210
1211
1212 \begin_inset Flex Code
1213 status collapsed
1214
1215 \begin_layout Plain Layout
1216 Missing 
1217 \backslash
1218 begin{document}
1219 \end_layout
1220
1221 \end_inset
1222
1223
1224 \begin_inset Quotes erd
1225 \end_inset
1226
1227 .
1228  If you see this error, check your preamble.
1229 \end_layout
1230
1231 \begin_layout Subsection
1232 Examples
1233 \end_layout
1234
1235 \begin_layout Standard
1236 Here are some examples of what you can add to a preamble, and what they
1237  do.
1238 \end_layout
1239
1240 \begin_layout Subsubsection
1241 Example #1: Offsets
1242 \end_layout
1243
1244 \begin_layout Standard
1245 There are two variables under LaTeX that control page position: 
1246 \begin_inset Flex Code
1247 status collapsed
1248
1249 \begin_layout Plain Layout
1250
1251 \backslash
1252 hoffset
1253 \end_layout
1254
1255 \end_inset
1256
1257  and 
1258 \begin_inset Flex Code
1259 status collapsed
1260
1261 \begin_layout Plain Layout
1262
1263 \backslash
1264 voffset
1265 \end_layout
1266
1267 \end_inset
1268
1269 .
1270  Their names should be self-explanatory.
1271  These variables are useful if you think for a moment about computer labels.
1272  Sometimes, the size of a print medium and the area of the medium that you
1273  can actually print on aren't the same.
1274  This is where 
1275 \begin_inset Flex Code
1276 status collapsed
1277
1278 \begin_layout Plain Layout
1279
1280 \backslash
1281 hoffset
1282 \end_layout
1283
1284 \end_inset
1285
1286  and 
1287 \begin_inset Flex Code
1288 status collapsed
1289
1290 \begin_layout Plain Layout
1291
1292 \backslash
1293 voffset
1294 \end_layout
1295
1296 \end_inset
1297
1298  come in.
1299 \end_layout
1300
1301 \begin_layout Standard
1302 The default values for 
1303 \begin_inset Flex Code
1304 status collapsed
1305
1306 \begin_layout Plain Layout
1307
1308 \backslash
1309 hoffset
1310 \end_layout
1311
1312 \end_inset
1313
1314  and 
1315 \begin_inset Flex Code
1316 status collapsed
1317
1318 \begin_layout Plain Layout
1319
1320 \backslash
1321 voffset
1322 \end_layout
1323
1324 \end_inset
1325
1326  are both 0
1327 \begin_inset space \thinspace{}
1328 \end_inset
1329
1330 points, i.
1331 \begin_inset space \thinspace{}
1332 \end_inset
1333
1334 e.
1335 \begin_inset space \space{}
1336 \end_inset
1337
1338 the page isn't shifted.
1339  Unfortunately, some DVI drivers always seem to shift the page.
1340  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1341  If you're using LyX on a system that you don't personally maintain, and
1342  your sysadmin is a doofus, 
1343 \begin_inset Flex Code
1344 status collapsed
1345
1346 \begin_layout Plain Layout
1347
1348 \backslash
1349 hoffset
1350 \end_layout
1351
1352 \end_inset
1353
1354  and 
1355 \begin_inset Flex Code
1356 status collapsed
1357
1358 \begin_layout Plain Layout
1359
1360 \backslash
1361 voffset
1362 \end_layout
1363
1364 \end_inset
1365
1366  can save the day.
1367  Suppose your left and top margins are always 0.5
1368 \begin_inset space \thinspace{}
1369 \end_inset
1370
1371 inches too big.
1372  You can add this to the preamble:
1373 \end_layout
1374
1375 \begin_layout LyX-Code
1376
1377 \backslash
1378 setlength{
1379 \backslash
1380 hoffset}{-0.5 in}
1381 \end_layout
1382
1383 \begin_layout LyX-Code
1384
1385 \backslash
1386 setlength{
1387 \backslash
1388 voffset}{-0.5 in}
1389 \end_layout
1390
1391 \begin_layout Standard
1392 and your margins should now be correct.
1393 \end_layout
1394
1395 \begin_layout Subsubsection
1396 Example #2: Labels
1397 \end_layout
1398
1399 \begin_layout Standard
1400 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1401  There's a rather nice package, available at your nearest CTAN archive,
1402  for printing sheets of labels: 
1403 \begin_inset Flex Code
1404 status collapsed
1405
1406 \begin_layout Plain Layout
1407 labels.sty
1408 \end_layout
1409
1410 \end_inset
1411
1412 .
1413  Now, your system may not have this package installed by default.
1414  We leave that up to you to check.
1415  You'll also want to read the documentation for it; we're not going to do
1416  that for you.
1417  Since this is an example, however, we'll give you an example of how you
1418  use this package.
1419 \end_layout
1420
1421 \begin_layout Standard
1422 First, make sure you're using the 
1423 \begin_inset Flex Code
1424 status collapsed
1425
1426 \begin_layout Plain Layout
1427 article
1428 \end_layout
1429
1430 \end_inset
1431
1432  document class.
1433  Next, you need to put the following in your preamble:
1434 \end_layout
1435
1436 \begin_layout LyX-Code
1437
1438 \backslash
1439 usepackage{labels}
1440 \end_layout
1441
1442 \begin_layout LyX-Code
1443
1444 \backslash
1445 LabelCols=3
1446 \end_layout
1447
1448 \begin_layout LyX-Code
1449
1450 \backslash
1451 LabelRows=7
1452 \end_layout
1453
1454 \begin_layout LyX-Code
1455
1456 \backslash
1457 LeftBorder=8mm
1458 \end_layout
1459
1460 \begin_layout LyX-Code
1461
1462 \backslash
1463 RightBorder=8mm
1464 \end_layout
1465
1466 \begin_layout LyX-Code
1467
1468 \backslash
1469 TopBorder=9mm
1470 \end_layout
1471
1472 \begin_layout LyX-Code
1473
1474 \backslash
1475 BottomBorder=2mm
1476 \end_layout
1477
1478 \begin_layout Standard
1479 This sets things up for Avery label sheets, stock #5360.
1480  You're now ready to print labels, but you'll need to insert LaTeX code,
1481  placing the commands 
1482 \begin_inset Flex Code
1483 status collapsed
1484
1485 \begin_layout Plain Layout
1486
1487 \backslash
1488 begin{labels}
1489 \end_layout
1490
1491 \end_inset
1492
1493  and 
1494 \begin_inset Flex Code
1495 status collapsed
1496
1497 \begin_layout Plain Layout
1498
1499 \backslash
1500 end{labels}
1501 \end_layout
1502
1503 \end_inset
1504
1505  around each label text.
1506  This and other special features of 
1507 \begin_inset Flex Code
1508 status collapsed
1509
1510 \begin_layout Plain Layout
1511 labels.sty
1512 \end_layout
1513
1514 \end_inset
1515
1516  are explained in its documentation.
1517 \end_layout
1518
1519 \begin_layout Standard
1520 Someday, someone may write a LyX layout file to support this package directly.
1521  Maybe that someone is you.
1522 \end_layout
1523
1524 \begin_layout Subsubsection
1525 Example #3: Paragraph Indentation
1526 \end_layout
1527
1528 \begin_layout Standard
1529 Americans are trained to indent the first line of 
1530 \emph on
1531 every
1532 \emph default
1533  paragraph.
1534  As with all of their other weird quirks, most Americans will whine and
1535  moan until they can have their way and indent the first line of all paragraphs.
1536  (Yes, we're joking.
1537  (We are?) 
1538 \emph on
1539 Yeah
1540 \emph default
1541 , we are.)
1542 \end_layout
1543
1544 \begin_layout Standard
1545 Of course, this behavior isn't standard typography.
1546  In books, you typically only indent the first line of a paragraph 
1547 \emph on
1548 if
1549 \emph default
1550  it follows another one.
1551  The idea behind indenting the first line of a paragraph is to distinguish
1552  neighboring paragraphs from one another.
1553  If there is no previous paragraph—for example, if it follows a figure or
1554  is the first paragraph in a section—then there is no need for indentation.
1555  
1556 \end_layout
1557
1558 \begin_layout Standard
1559 If you're a typical American (we're still joking!), though, you don't care
1560  about such esoteric things; you want your indentation! Add this to the
1561  preamble:
1562 \end_layout
1563
1564 \begin_layout LyX-Code
1565
1566 \backslash
1567 usepackage{indentfirst}
1568 \end_layout
1569
1570 \begin_layout Standard
1571 If your TeX distribution isn't braindead, you'll have this package, and
1572  all of your paragraphs will get the indentation the Founding Fathers intended
1573  they should have.
1574 \end_layout
1575
1576 \begin_layout Subsubsection
1577 Example #4: This Document
1578 \end_layout
1579
1580 \begin_layout Standard
1581 You can also check out the preamble of this document to get an idea of some
1582  of the advanced things you can do.
1583 \end_layout
1584
1585 \begin_layout Section
1586 LyX and LaTeX Errors
1587 \end_layout
1588
1589 \begin_layout Standard
1590 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1591  going.
1592  It then uses the logfile from the LaTeX run to do a post-mortem.
1593  After analyzing the logfile, LyX displays a dialog listing the errors.
1594  Clicking on any one of them will take you to the position in your LyX file
1595  where the error occurred.
1596 \begin_inset Foot
1597 status collapsed
1598
1599 \begin_layout Plain Layout
1600 Well, usually.
1601  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1602  right line.
1603  There are also cases where LaTeX reports the error on one line, but the
1604  actual error is earlier.
1605  This is not unlike forgetting a closing brace in a program: You'll get
1606  an error, but only later.
1607 \end_layout
1608
1609 \end_inset
1610
1611
1612 \end_layout
1613
1614 \begin_layout Standard
1615 Some folks also like to look at the log file directly: It is available from
1616  
1617 \begin_inset Flex MenuItem
1618 status collapsed
1619
1620 \begin_layout Plain Layout
1621 Document
1622 \bar under
1623 \SpecialChar \menuseparator
1624
1625 \bar default
1626 Latex
1627 \begin_inset space ~
1628 \end_inset
1629
1630 Log
1631 \end_layout
1632
1633 \end_inset
1634
1635 .
1636  There are some fairly common error messages and warnings.
1637  We'll cover those here.
1638  You should look at a good LaTeX book for a complete listing.
1639 \end_layout
1640
1641 \begin_layout Itemize
1642 \begin_inset Flex Code
1643 status collapsed
1644
1645 \begin_layout Plain Layout
1646 LaTeX Warning
1647 \end_layout
1648
1649 \end_inset
1650
1651
1652 \begin_inset Newline newline
1653 \end_inset
1654
1655 Anything beginning with these words is a warning message for the purpose
1656  of 
1657 \begin_inset Quotes eld
1658 \end_inset
1659
1660 debugging
1661 \begin_inset Quotes erd
1662 \end_inset
1663
1664  the LaTeX code itself.
1665  You'll get messages like this if you added or changed cross-references
1666  or bibliography entries, in which case, LaTeX is trying to tell you that
1667  you need to make another run.
1668  You can by-and-large ignore these.
1669 \end_layout
1670
1671 \begin_layout Itemize
1672 \begin_inset Flex Code
1673 status collapsed
1674
1675 \begin_layout Plain Layout
1676 LaTeX Font Warning
1677 \end_layout
1678
1679 \end_inset
1680
1681
1682 \begin_inset Newline newline
1683 \end_inset
1684
1685 Another warning message, this time about fonts which LaTeX couldn't find.
1686  The rest of the message will often say something about a replacement font
1687  that LaTeX used.
1688  You can safely ignore these, too.
1689 \end_layout
1690
1691 \begin_layout Itemize
1692 \begin_inset Flex Code
1693 status collapsed
1694
1695 \begin_layout Plain Layout
1696 Overfull 
1697 \backslash
1698 hbox
1699 \end_layout
1700
1701 \end_inset
1702
1703
1704 \begin_inset Newline newline
1705 \end_inset
1706
1707 LaTeX absolutely 
1708 \emph on
1709 loves
1710 \emph default
1711  to spew these out.
1712  They are warnings about lines that were too long and run past the right
1713  margin.
1714  Almost always, this is unnoticeable in the final output.
1715  (It can be just a point or two.) Or, only one or two characters extend past
1716  the margin.
1717  LaTeX seems to generate at least one of these messages for just about any
1718  document you write.
1719 \begin_inset Newline newline
1720 \end_inset
1721
1722 You can ignore these messages.
1723  Your eyes will tell you if there's a problem with something that's too
1724  wide; just look at the output.
1725 \begin_inset Foot
1726 status collapsed
1727
1728 \begin_layout Plain Layout
1729 You can also enable the `draft' option in 
1730 \begin_inset Flex MenuItem
1731 status collapsed
1732
1733 \begin_layout Plain Layout
1734 Document
1735 \bar under
1736 \SpecialChar \menuseparator
1737
1738 \bar default
1739 Settings
1740 \end_layout
1741
1742 \end_inset
1743
1744 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1745 \end_layout
1746
1747 \end_inset
1748
1749
1750 \end_layout
1751
1752 \begin_layout Itemize
1753 \begin_inset Flex Code
1754 status collapsed
1755
1756 \begin_layout Plain Layout
1757 Underfull 
1758 \backslash
1759 hbox
1760 \end_layout
1761
1762 \end_inset
1763
1764
1765 \begin_inset Newline newline
1766 \end_inset
1767
1768 Not quite as common as its cousin.
1769  LaTeX seems to like to print lines that are a bit too wide as opposed to
1770  ones that are a bit too narrow.
1771  We have no idea why.
1772 \end_layout
1773
1774 \begin_layout Itemize
1775 \begin_inset Flex Code
1776 status collapsed
1777
1778 \begin_layout Plain Layout
1779 Overfull 
1780 \backslash
1781 vbox
1782 \end_layout
1783
1784 \end_inset
1785
1786  and 
1787 \begin_inset Flex Code
1788 status collapsed
1789
1790 \begin_layout Plain Layout
1791 Underfull 
1792 \backslash
1793 vbox
1794 \end_layout
1795
1796 \end_inset
1797
1798
1799 \begin_inset Newline newline
1800 \end_inset
1801
1802 Warnings about troubles breaking the page.
1803  Once again, just look at the output.
1804  Your eyes will tell you where something has gone wrong.
1805 \end_layout
1806
1807 \begin_layout Itemize
1808 \begin_inset Flex Code
1809 status collapsed
1810
1811 \begin_layout Plain Layout
1812 LaTeX Error: File 
1813 \begin_inset Quotes els
1814 \end_inset
1815
1816 Xxxx
1817 \begin_inset Quotes ers
1818 \end_inset
1819
1820  not found
1821 \end_layout
1822
1823 \end_inset
1824
1825
1826 \begin_inset Newline newline
1827 \end_inset
1828
1829 The file 
1830 \begin_inset Quotes eld
1831 \end_inset
1832
1833 Xxxx
1834 \begin_inset Quotes erd
1835 \end_inset
1836
1837  isn't installed on this system.
1838  This usually appears because some package your document needs isn't installed.
1839  If you didn't touch the preamble or didn't use the 
1840 \begin_inset Flex Code
1841 status collapsed
1842
1843 \begin_layout Plain Layout
1844
1845 \backslash
1846 usepackage{}
1847 \end_layout
1848
1849 \end_inset
1850
1851  command, then one of the packages LyX tried to load is missing.
1852  Use 
1853 \begin_inset Flex MenuItem
1854 status collapsed
1855
1856 \begin_layout Plain Layout
1857 Help\SpecialChar \menuseparator
1858 LaTeX Configuration
1859 \end_layout
1860
1861 \end_inset
1862
1863  to get a list of packages that LyX knows about.
1864  This file is updated whenever you reconfigure LyX (using 
1865 \begin_inset Flex MenuItem
1866 status collapsed
1867
1868 \begin_layout Plain Layout
1869 Tools\SpecialChar \menuseparator
1870 Reconfigure
1871 \end_layout
1872
1873 \end_inset
1874
1875 ) and tells you which packages have been detected and what they do.
1876 \begin_inset Newline newline
1877 \end_inset
1878
1879 If you did use the 
1880 \begin_inset Flex Code
1881 status collapsed
1882
1883 \begin_layout Plain Layout
1884
1885 \backslash
1886 usepackage{}
1887 \end_layout
1888
1889 \end_inset
1890
1891  command and the package in question isn't installed, then you'll need to
1892  install it yourself.
1893 \end_layout
1894
1895 \begin_layout Itemize
1896 \begin_inset Flex Code
1897 status collapsed
1898
1899 \begin_layout Plain Layout
1900 LaTeX Error: Unknown option
1901 \end_layout
1902
1903 \end_inset
1904
1905
1906 \begin_inset Newline newline
1907 \end_inset
1908
1909 Error messages beginning with this are trying to tell you that you specified
1910  a bad or undefined option to a package.
1911  Check the package's documentation.
1912 \end_layout
1913
1914 \begin_layout Itemize
1915 \begin_inset Flex Code
1916 status collapsed
1917
1918 \begin_layout Plain Layout
1919 Undefined control sequence
1920 \end_layout
1921
1922 \end_inset
1923
1924
1925 \begin_inset Newline newline
1926 \end_inset
1927
1928 If you've inserted LaTeX code into your document, but made a typo, you'll
1929  get one of these.
1930  You may have forgotten to load a package.
1931  In any case, this error message usually means that you used an undefined
1932  command.
1933  
1934 \end_layout
1935
1936 \begin_layout Standard
1937 There are other error and warning messages.
1938  Some are self-explanatory.
1939  These are usually LaTeX messages.
1940  Others are downright cryptic.
1941  These are usually TeX error messages, and we really have 
1942 \emph on
1943 no clue
1944 \emph default
1945  what they mean or how to decipher them.
1946  No-one does.
1947 \end_layout
1948
1949 \begin_layout Standard
1950 There's a general sequence you should follow if you get error messages:
1951 \end_layout
1952
1953 \begin_layout Enumerate
1954 Look at the LaTeX code you inserted for typos.
1955 \end_layout
1956
1957 \begin_layout Enumerate
1958 If there are no typos, check that you used the command(s) correctly.
1959 \end_layout
1960
1961 \begin_layout Enumerate
1962 If you get a bunch of error boxes piled up at the very top of the document—and
1963  especially if you see a 
1964 \begin_inset Quotes eld
1965 \end_inset
1966
1967
1968 \begin_inset Flex Code
1969 status collapsed
1970
1971 \begin_layout Plain Layout
1972 Missing 
1973 \backslash
1974 begin{document}
1975 \end_layout
1976
1977 \end_inset
1978
1979
1980 \begin_inset Quotes erd
1981 \end_inset
1982
1983  error—it means that there are errors in the preamble.
1984  Start debugging your preamble.
1985 \end_layout
1986
1987 \begin_layout Enumerate
1988 If you didn't add anything to the preamble and didn't add any LaTeX code
1989  to the document, the first suspect is your LaTeX distribution itself.
1990  Check for missing packages and install them.
1991 \end_layout
1992
1993 \begin_layout Enumerate
1994 Okay, so there are no missing packages.
1995  Did you use any of the fine-tuning options in LyX? Specifically, did you
1996  
1997 \emph on
1998 misuse
1999 \emph default
2000  any of them, like trying to manually insert lots of 
2001 \begin_inset Flex Code
2002 status collapsed
2003
2004 \begin_layout Plain Layout
2005 Protected
2006 \begin_inset space ~
2007 \end_inset
2008
2009 Blanks
2010 \end_layout
2011
2012 \end_inset
2013
2014
2015 \begin_inset Flex Code
2016 status collapsed
2017
2018 \begin_layout Plain Layout
2019 Linebreaks
2020 \end_layout
2021
2022 \end_inset
2023
2024 , or 
2025 \begin_inset Flex Code
2026 status collapsed
2027
2028 \begin_layout Plain Layout
2029 Pagebreaks
2030 \end_layout
2031
2032 \end_inset
2033
2034 ? Did you try to kludge something together with these instead of using the
2035  appropriate paragraph environment?
2036 \end_layout
2037
2038 \begin_layout Enumerate
2039 All right, you didn't use any of the fine-tuning options, you played by
2040  the rules.
2041  Did you try to pull a fancy maneuver? Did you do something funky inside
2042  a table or an equation, like inserting a graphic into a table cell?
2043 \end_layout
2044
2045 \begin_layout Enumerate
2046 Do you have long sections of text where LaTeX cannot find a place to break
2047  a line? By default, LaTeX is rather strict about how much extra inter-word
2048  spacing it will add in order to break a line.
2049  Preferably, you should rework the paragraph to avoid the problem.
2050  If this isn't an option, you can wrap your text in 
2051 \begin_inset Flex Code
2052 status collapsed
2053
2054 \begin_layout Plain Layout
2055
2056 \backslash
2057 sloppypar
2058 \end_layout
2059
2060 \end_inset
2061
2062  to make LaTeX's line breaking more, well, sloppy.
2063 \end_layout
2064
2065 \begin_layout Enumerate
2066 Did you go overboard with the nesting? LyX (currently) doesn't check to
2067  make sure you're in the limits for nesting environments.
2068  If you nested a bunch of environments to the 
2069 \begin_inset Formula $17^{\mathrm{th}}$
2070 \end_inset
2071
2072  level, that's the problem.
2073  (The limit in LaTeX is five.)
2074 \end_layout
2075
2076 \begin_layout Enumerate
2077 Okay, you didn't get any error messages, but your output looks awful.
2078  If you have a table or figure that's too wide or long for the page, you
2079  need to:
2080 \end_layout
2081
2082 \begin_deeper
2083 \begin_layout Enumerate
2084 rescale the figure so it fits.
2085 \end_layout
2086
2087 \begin_layout Enumerate
2088 trim down the table so it fits.
2089 \end_layout
2090
2091 \end_deeper
2092 \begin_layout Enumerate
2093 If something else is wrong with the output, and you didn't try to pull anything
2094  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2095 \end_layout
2096
2097 \begin_layout Standard
2098 If all this doesn't help—well, then 
2099 \emph on
2100 perhaps
2101 \emph default
2102  you might have found a bug in LyX\SpecialChar \ldots{}
2103 .
2104 \end_layout
2105
2106 \begin_layout Chapter
2107 Supplemental Tools
2108 \end_layout
2109
2110 \begin_layout Section
2111 Customizing Bibliographies with BibTeX
2112 \end_layout
2113
2114 \begin_layout Standard
2115 The most basic information about how to use BibTeX with LyX is contained
2116  in the section 
2117 \emph on
2118 Bibliography databases (BibTeX)
2119 \emph default
2120  of the 
2121 \emph on
2122 User's Guide
2123 \emph default
2124 .
2125  The following subsections explain special bibliography features supported
2126  by LyX.
2127 \end_layout
2128
2129 \begin_layout Subsection
2130 Alternative Citation Styles
2131 \end_layout
2132
2133 \begin_layout Standard
2134 Standard BibTeX uses numbers (e.
2135 \begin_inset space \thinspace{}
2136 \end_inset
2137
2138 g.
2139 \begin_inset space \space{}
2140 \end_inset
2141
2142
2143 \begin_inset Quotes eld
2144 \end_inset
2145
2146 [12]
2147 \begin_inset Quotes erd
2148 \end_inset
2149
2150 ) to refer to a cited work.
2151  However, in many scientific disciplines, other citation styles are in use.
2152  The most common one is the author-year style (e.
2153 \begin_inset space \thinspace{}
2154 \end_inset
2155
2156 g.
2157 \begin_inset space \space{}
2158 \end_inset
2159
2160
2161 \begin_inset Quotes eld
2162 \end_inset
2163
2164 Knuth 1984a
2165 \begin_inset Quotes erd
2166 \end_inset
2167
2168 ).
2169  LyX supports two packages that provide this style, 
2170 \begin_inset Flex Code
2171 status collapsed
2172
2173 \begin_layout Plain Layout
2174 natbib
2175 \end_layout
2176
2177 \end_inset
2178
2179  and 
2180 \begin_inset Flex Code
2181 status collapsed
2182
2183 \begin_layout Plain Layout
2184 jurabib
2185 \end_layout
2186
2187 \end_inset
2188
2189 .
2190  Both packages have their pros and cons, which cannot be listed in detail.
2191  If you only want to have simple author-year (or author-numerical) style,
2192  or if you want to use one of the countless style files for 
2193 \begin_inset Flex Code
2194 status collapsed
2195
2196 \begin_layout Plain Layout
2197 natbib
2198 \end_layout
2199
2200 \end_inset
2201
2202 , then the established 
2203 \begin_inset Flex Code
2204 status collapsed
2205
2206 \begin_layout Plain Layout
2207 natbib
2208 \end_layout
2209
2210 \end_inset
2211
2212  package is probably your choice.
2213  If you need special features like short title references, ibidem etc., you
2214  might consider the 
2215 \begin_inset Flex Code
2216 status collapsed
2217
2218 \begin_layout Plain Layout
2219 jurabib
2220 \end_layout
2221
2222 \end_inset
2223
2224  package.
2225 \end_layout
2226
2227 \begin_layout Standard
2228 The handling of both packages in LyX is basically the same.
2229  Go to 
2230 \begin_inset Flex MenuItem
2231 status collapsed
2232
2233 \begin_layout Plain Layout
2234 Document\SpecialChar \menuseparator
2235 Settings
2236 \end_layout
2237
2238 \end_inset
2239
2240  and select under 
2241 \begin_inset Flex MenuItem
2242 status collapsed
2243
2244 \begin_layout Plain Layout
2245 Bibliography
2246 \end_layout
2247
2248 \end_inset
2249
2250  the option 
2251 \begin_inset Flex MenuItem
2252 status collapsed
2253
2254 \begin_layout Plain Layout
2255 Natbib
2256 \end_layout
2257
2258 \end_inset
2259
2260  or 
2261 \begin_inset Flex MenuItem
2262 status collapsed
2263
2264 \begin_layout Plain Layout
2265 Jurabib
2266 \end_layout
2267
2268 \end_inset
2269
2270 .
2271  With both packages, you will get some extra features in the citation dialog
2272  and you can select the style of the reference (
2273 \begin_inset Quotes eld
2274 \end_inset
2275
2276 Knuth 1984
2277 \begin_inset Quotes erd
2278 \end_inset
2279
2280
2281 \begin_inset Quotes eld
2282 \end_inset
2283
2284 Knuth (1984)
2285 \begin_inset Quotes erd
2286 \end_inset
2287
2288
2289 \begin_inset Quotes eld
2290 \end_inset
2291
2292 Knuth, 1984
2293 \begin_inset Quotes erd
2294 \end_inset
2295
2296
2297 \begin_inset Quotes eld
2298 \end_inset
2299
2300 1984
2301 \begin_inset Quotes erd
2302 \end_inset
2303
2304  etc.).
2305  Note that both packages need specifically designed style files.
2306  They both ship their own, but there are lots of additional style files,
2307  and there is even an interactive style file builder
2308 \begin_inset Foot
2309 status collapsed
2310
2311 \begin_layout Plain Layout
2312 See 
2313 \begin_inset Flex URL
2314 status open
2315
2316 \begin_layout Plain Layout
2317
2318 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2319 \end_layout
2320
2321 \end_inset
2322
2323
2324 \end_layout
2325
2326 \end_inset
2327
2328  for 
2329 \begin_inset Flex Code
2330 status collapsed
2331
2332 \begin_layout Plain Layout
2333 natbib
2334 \end_layout
2335
2336 \end_inset
2337
2338 .
2339 \end_layout
2340
2341 \begin_layout Subsection
2342 Sectioned Bibliographies
2343 \end_layout
2344
2345 \begin_layout Standard
2346 Sometimes you might need to divide your bibliography into several sections.
2347  If you are for instance a historian, the possibility to separate sources
2348  and scientific works is most likely a 
2349 \begin_inset Quotes eld
2350 \end_inset
2351
2352 must have
2353 \begin_inset Quotes erd
2354 \end_inset
2355
2356 .
2357  Unfortunately, BibTeX itself does not allow you to do this.
2358  But with the help of some LaTeX packages, BibTeX can be extended to fit
2359  your needs.
2360 \end_layout
2361
2362 \begin_layout Standard
2363 LyX provides native support for one of these packages, 
2364 \family typewriter
2365 bibtopic
2366 \family default
2367 .
2368 \begin_inset Foot
2369 status collapsed
2370
2371 \begin_layout Plain Layout
2372 Available from 
2373 \begin_inset Flex URL
2374 status open
2375
2376 \begin_layout Plain Layout
2377
2378 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2379 \end_layout
2380
2381 \end_inset
2382
2383
2384 \end_layout
2385
2386 \end_inset
2387
2388  The advantage of this package (compared to other packages like 
2389 \family typewriter
2390 multibib
2391 \family default
2392 ) is that you don't need to define new citation commands.
2393  Instead, you need to prepare different bibliographic databases which include
2394  the entries for the different sections of the bibliography.
2395  For example: If you want to divide your bibliography into the sections
2396  
2397 \begin_inset Quotes eld
2398 \end_inset
2399
2400 Sources
2401 \begin_inset Quotes erd
2402 \end_inset
2403
2404  and 
2405 \begin_inset Quotes eld
2406 \end_inset
2407
2408 Scientific works
2409 \begin_inset Quotes erd
2410 \end_inset
2411
2412 , you first need to create two bibliographic databases, e.
2413 \begin_inset space \thinspace{}
2414 \end_inset
2415
2416 g.
2417 \begin_inset space \space{}
2418 \end_inset
2419
2420
2421 \begin_inset Flex Code
2422 status collapsed
2423
2424 \begin_layout Plain Layout
2425 sources.bib
2426 \end_layout
2427
2428 \end_inset
2429
2430  and 
2431 \begin_inset Flex Code
2432 status collapsed
2433
2434 \begin_layout Plain Layout
2435 scientific.bib
2436 \end_layout
2437
2438 \end_inset
2439
2440 .
2441  
2442 \end_layout
2443
2444 \begin_layout Standard
2445 Go to 
2446 \begin_inset Flex MenuItem
2447 status collapsed
2448
2449 \begin_layout Plain Layout
2450 Document\SpecialChar \menuseparator
2451 Settings
2452 \end_layout
2453
2454 \end_inset
2455
2456  and check under 
2457 \begin_inset Flex MenuItem
2458 status collapsed
2459
2460 \begin_layout Plain Layout
2461 Bibliography
2462 \end_layout
2463
2464 \end_inset
2465
2466  the option 
2467 \begin_inset Flex MenuItem
2468 status collapsed
2469
2470 \begin_layout Plain Layout
2471 Sectioned bibliography
2472 \end_layout
2473
2474 \end_inset
2475
2476 .
2477  Now you can insert multiple BibTeX bibliographies, one for each section
2478  of your bibliography.
2479  Returning to our example: Insert the BibTeX bibliography 
2480 \begin_inset Flex Code
2481 status collapsed
2482
2483 \begin_layout Plain Layout
2484 sources.bib
2485 \end_layout
2486
2487 \end_inset
2488
2489  and a second one for the database 
2490 \begin_inset Flex Code
2491 status collapsed
2492
2493 \begin_layout Plain Layout
2494 scientific.bib
2495 \end_layout
2496
2497 \end_inset
2498
2499 .
2500  You are free to use the same or different styles for each section.
2501  Additionally, you can choose if the bibliography section should contain
2502  
2503 \begin_inset Quotes eld
2504 \end_inset
2505
2506 all cited references
2507 \begin_inset Quotes erd
2508 \end_inset
2509
2510  of the specified database(s) (which is the default), 
2511 \begin_inset Quotes eld
2512 \end_inset
2513
2514 all uncited references
2515 \begin_inset Quotes erd
2516 \end_inset
2517
2518  or even 
2519 \begin_inset Quotes eld
2520 \end_inset
2521
2522 all references
2523 \begin_inset Quotes erd
2524 \end_inset
2525
2526 .
2527  This might be useful if you would like to separate your bibliography into
2528  three sections: 
2529 \begin_inset Quotes eld
2530 \end_inset
2531
2532 Cited sources
2533 \begin_inset Quotes erd
2534 \end_inset
2535
2536
2537 \begin_inset Quotes eld
2538 \end_inset
2539
2540 Uncited sources
2541 \begin_inset Quotes erd
2542 \end_inset
2543
2544 , and 
2545 \begin_inset Quotes eld
2546 \end_inset
2547
2548 Scientific works
2549 \begin_inset Quotes erd
2550 \end_inset
2551
2552 .
2553  The titles for the sections can be added as ordinary sections or subsections.
2554  Since 
2555 \begin_inset Flex Code
2556 status collapsed
2557
2558 \begin_layout Plain Layout
2559 bibtopic
2560 \end_layout
2561
2562 \end_inset
2563
2564  removes the bibliography title, you have to manually re-add that, too (as
2565  a chapter* or section*, for instance).
2566 \end_layout
2567
2568 \begin_layout Subsection
2569 Multiple Bibliographies
2570 \end_layout
2571
2572 \begin_layout Standard
2573 Multiple bibliographies, e.
2574 \begin_inset space \thinspace{}
2575 \end_inset
2576
2577 g.
2578 \begin_inset space \space{}
2579 \end_inset
2580
2581 a bibliography for each section or chapter of the document, are not supported
2582  by BibTeX itself.
2583  But the 
2584 \begin_inset Flex Code
2585 status collapsed
2586
2587 \begin_layout Plain Layout
2588 bibtopic
2589 \end_layout
2590
2591 \end_inset
2592
2593  package, which is used for the creation of sectioned bibliographies in
2594  LyX (see the previous section), provides an easy way to solve this task,
2595  if you are willing to use some 
2596 \begin_inset Flex MenuItem
2597 status collapsed
2598
2599 \begin_layout Plain Layout
2600 TeX Code
2601 \end_layout
2602
2603 \end_inset
2604
2605  (see section
2606 \begin_inset space ~
2607 \end_inset
2608
2609
2610 \begin_inset CommandInset ref
2611 LatexCommand ref
2612 reference "sec:Inserting-TeX-Code"
2613
2614 \end_inset
2615
2616 ).
2617 \begin_inset Foot
2618 status collapsed
2619
2620 \begin_layout Plain Layout
2621 An alternative approach is to use the 
2622 \begin_inset Flex Code
2623 status collapsed
2624
2625 \begin_layout Plain Layout
2626 chapterbib
2627 \end_layout
2628
2629 \end_inset
2630
2631  or 
2632 \begin_inset Flex Code
2633 status collapsed
2634
2635 \begin_layout Plain Layout
2636 bibunits
2637 \end_layout
2638
2639 \end_inset
2640
2641  package, respectively.
2642 \end_layout
2643
2644 \end_inset
2645
2646
2647 \end_layout
2648
2649 \begin_layout Standard
2650 First go to 
2651 \begin_inset Flex MenuItem
2652 status collapsed
2653
2654 \begin_layout Plain Layout
2655 Document\SpecialChar \menuseparator
2656 Settings
2657 \end_layout
2658
2659 \end_inset
2660
2661  and under 
2662 \begin_inset Flex MenuItem
2663 status collapsed
2664
2665 \begin_layout Plain Layout
2666 Bibliography
2667 \end_layout
2668
2669 \end_inset
2670
2671  check 
2672 \begin_inset Flex MenuItem
2673 status collapsed
2674
2675 \begin_layout Plain Layout
2676 Sectioned bibliography
2677 \end_layout
2678
2679 \end_inset
2680
2681 .
2682  In the document, you have to enclose the sections, which shall contain
2683  their own bibliography (including the BibTeX bibliography itself), between
2684  
2685 \begin_inset Flex Code
2686 status collapsed
2687
2688 \begin_layout Plain Layout
2689
2690 \backslash
2691 begin{btUnit}
2692 \end_layout
2693
2694 \end_inset
2695
2696  and 
2697 \begin_inset Flex Code
2698 status collapsed
2699
2700 \begin_layout Plain Layout
2701
2702 \backslash
2703 end{btUnit}
2704 \end_layout
2705
2706 \end_inset
2707
2708  (those commands have to be inserted as TeX code).
2709  The bibliography will contain all references that have been cited in the
2710  current 
2711 \begin_inset Flex Code
2712 status collapsed
2713
2714 \begin_layout Plain Layout
2715 btUnit
2716 \end_layout
2717
2718 \end_inset
2719
2720 .
2721  
2722 \series bold
2723 Note:
2724 \series default
2725  If you are using this approach, then every citation reference has to be
2726  inside some 
2727 \begin_inset Flex Code
2728 status collapsed
2729
2730 \begin_layout Plain Layout
2731 btUnit
2732 \end_layout
2733
2734 \end_inset
2735
2736 .
2737  Also, the 
2738 \begin_inset Flex Code
2739 status collapsed
2740
2741 \begin_layout Plain Layout
2742 btUnit
2743 \end_layout
2744
2745 \end_inset
2746
2747 s cannot be nested.
2748 \end_layout
2749
2750 \begin_layout Section
2751 Multipart Documents
2752 \end_layout
2753
2754 \begin_layout Subsection
2755 General Operation
2756 \end_layout
2757
2758 \begin_layout Standard
2759 When you are working on a large file with many sections, it is often convenient
2760  to break up the document into several files, or perhaps you have something
2761  where a table may change from time to time, but the preceding text does
2762  not.
2763  In these cases, you should seriously consider using multipart documents.
2764  For example, scientific papers often have five major sections: the introduction
2765 , observations, results, discussion, and conclusion.
2766  Each of these could be its own separate LyX file, with one 
2767 \begin_inset Quotes eld
2768 \end_inset
2769
2770 master
2771 \begin_inset Quotes erd
2772 \end_inset
2773
2774  file which contains the title, authors, abstract, references, etc., plus
2775  the five included files.
2776  It is important to note that each of these files is a full LyX file which
2777  can be formatted and printed on its own, as well as included in a master
2778  file.
2779  Each of these files must have the same document class, however—don't attempt
2780  to mix book classes with article classes.
2781  You may also include LaTeX files; however, these files must not have their
2782  own preamble (i.
2783 \begin_inset space \thinspace{}
2784 \end_inset
2785
2786 e.
2787 \begin_inset space \space{}
2788 \end_inset
2789
2790 everything up to and including the 
2791 \begin_inset Flex Code
2792 status collapsed
2793
2794 \begin_layout Plain Layout
2795
2796 \backslash
2797 begin{document}
2798 \end_layout
2799
2800 \end_inset
2801
2802  line as well as the 
2803 \begin_inset Flex Code
2804 status collapsed
2805
2806 \begin_layout Plain Layout
2807
2808 \backslash
2809 end{document}
2810 \end_layout
2811
2812 \end_inset
2813
2814  line must be deleted) or else errors will be generated when you try to
2815  make a DVI file.
2816 \end_layout
2817
2818 \begin_layout Standard
2819 LyX allows you to include files quite easily with 
2820 \begin_inset Flex MenuItem
2821 status collapsed
2822
2823 \begin_layout Plain Layout
2824 Insert\SpecialChar \menuseparator
2825 ChiId
2826 \begin_inset space ~
2827 \end_inset
2828
2829 Document
2830 \end_layout
2831
2832 \end_inset
2833
2834 .
2835  When you click on this selection a small box is inserted into the file
2836  at the current cursor location.
2837  Clicking on the box raises a dialog which allows you to select the file
2838  to be included, and the method of its inclusion.
2839  
2840 \end_layout
2841
2842 \begin_layout Standard
2843 The file selection box should by now be obvious.
2844  The three inclusion methods are 
2845 \begin_inset Quotes eld
2846 \end_inset
2847
2848 include
2849 \begin_inset Quotes erd
2850 \end_inset
2851
2852
2853 \begin_inset Quotes eld
2854 \end_inset
2855
2856 input
2857 \begin_inset Quotes erd
2858 \end_inset
2859
2860 , and 
2861 \begin_inset Quotes eld
2862 \end_inset
2863
2864 verbatim
2865 \begin_inset Quotes erd
2866 \end_inset
2867
2868 .
2869  The difference between 
2870 \begin_inset Quotes eld
2871 \end_inset
2872
2873 include
2874 \begin_inset Quotes erd
2875 \end_inset
2876
2877  and 
2878 \begin_inset Quotes eld
2879 \end_inset
2880
2881 input
2882 \begin_inset Quotes erd
2883 \end_inset
2884
2885  is really only meaningful to LaTeXperts, but the practical difference is
2886  that files that are 
2887 \begin_inset Quotes eld
2888 \end_inset
2889
2890 included
2891 \begin_inset Quotes erd
2892 \end_inset
2893
2894  are typeset beginning on a new page, while files that are 
2895 \begin_inset Quotes eld
2896 \end_inset
2897
2898 inputted
2899 \begin_inset Quotes erd
2900 \end_inset
2901
2902  are typeset starting on the current page.
2903 \end_layout
2904
2905 \begin_layout Standard
2906 Generally, the master file is converted into a full LaTeX file before typesettin
2907 g, while the included files are converted to LaTeX files that do not have
2908  all the preamble information.
2909 \end_layout
2910
2911 \begin_layout Standard
2912
2913 \begin_inset Quotes eld
2914 \end_inset
2915
2916 verbatim
2917 \begin_inset Quotes erd
2918 \end_inset
2919
2920  included file allows you to include a file typeset exactly as it appears
2921  in the file, i.
2922 \begin_inset space \thinspace{}
2923 \end_inset
2924
2925 e.
2926 \begin_inset space \space{}
2927 \end_inset
2928
2929 in 
2930 \begin_inset Flex Code
2931 status collapsed
2932
2933 \begin_layout Plain Layout
2934 verbatim
2935 \end_layout
2936
2937 \end_inset
2938
2939  mode, with the characters set in a fixed-width typewriter font.
2940  Normally, spaces in this file are invisible, though two consecutive spaces
2941  are conserved, unlike LyX's normal treatment of spaces.
2942  However, setting the 
2943 \begin_inset Flex MenuItem
2944 status collapsed
2945
2946 \begin_layout Plain Layout
2947 Mark
2948 \begin_inset space ~
2949 \end_inset
2950
2951 spaces
2952 \begin_inset space ~
2953 \end_inset
2954
2955 in
2956 \begin_inset space ~
2957 \end_inset
2958
2959 output
2960 \end_layout
2961
2962 \end_inset
2963
2964  checkbox typesets a mark to unambiguously define the presence of a space.
2965  
2966 \end_layout
2967
2968 \begin_layout Subsection
2969 Cross-References Between Files
2970 \end_layout
2971
2972 \begin_layout Standard
2973 \begin_inset Box Shadowbox
2974 position "t"
2975 hor_pos "c"
2976 has_inner_box 1
2977 inner_pos "t"
2978 use_parbox 0
2979 use_makebox 0
2980 width "100col%"
2981 special "none"
2982 height "1in"
2983 height_special "totalheight"
2984 status open
2985
2986 \begin_layout Plain Layout
2987 This section is somewhat out of date.
2988  Need to describe default master documents and how children are opened when
2989  the master is.
2990  [[FIXME]]
2991 \end_layout
2992
2993 \end_inset
2994
2995
2996 \end_layout
2997
2998 \begin_layout Standard
2999 It is possible to set up cross-references between the different files.
3000  First, open all the files in question: let's call them A and B in a two
3001  file example, where B is included in A.
3002  Let's say you insert a label in A, then want to reference it in B.
3003  Open the cross-reference dialog whilst in document B, and you can select
3004  the 
3005 \begin_inset Quotes eld
3006 \end_inset
3007
3008 buffer
3009 \begin_inset Quotes erd
3010 \end_inset
3011
3012  to use.
3013 \end_layout
3014
3015 \begin_layout Subsection
3016 Bibliography Lists in all Subdocuments
3017 \end_layout
3018
3019 \begin_layout Standard
3020 \begin_inset Box Frameless
3021 position "t"
3022 hor_pos "c"
3023 has_inner_box 1
3024 inner_pos "t"
3025 use_parbox 0
3026 use_makebox 0
3027 width "100col%"
3028 special "none"
3029 height "1in"
3030 height_special "totalheight"
3031 status open
3032
3033 \begin_layout Plain Layout
3034 This section also needs updating.
3035  There is now material about this on the wiki, and it could be copied here.
3036 \end_layout
3037
3038 \end_inset
3039
3040
3041 \end_layout
3042
3043 \begin_layout Standard
3044 Copy the bibliography list with all entries to all subdocuments and transform
3045  them to a comment.
3046  This way LyX will find the 
3047 \begin_inset Flex Code
3048 status collapsed
3049
3050 \begin_layout Plain Layout
3051 .bib
3052 \end_layout
3053
3054 \end_inset
3055
3056 -files and you can easily insert references without making the bibliography
3057  list visible.
3058 \end_layout
3059
3060 \begin_layout Standard
3061 As the bibliography list is in a comment, LaTeX won't use it and the references
3062  will look like this: [?], instead of like this: [1].
3063  One solution is to use the LaTeX-package 
3064 \begin_inset Flex Code
3065 status collapsed
3066
3067 \begin_layout Plain Layout
3068 comment
3069 \end_layout
3070
3071 \end_inset
3072
3073  that will only include comments by processing the files separately.
3074  To do this, add in the LaTeX preamble of every subdocument the following:
3075 \end_layout
3076
3077 \begin_layout LyX-Code
3078
3079 \backslash
3080 usepackage{comment}
3081 \end_layout
3082
3083 \begin_layout LyX-Code
3084
3085 \backslash
3086 includecomment{comment}
3087 \end_layout
3088
3089 \begin_layout Standard
3090 See also 
3091 \begin_inset Flex URL
3092 status collapsed
3093
3094 \begin_layout Plain Layout
3095
3096 http://wiki.lyx.org/FAQ/Unsorted#toc31
3097 \end_layout
3098
3099 \end_inset
3100
3101 .
3102 \end_layout
3103
3104 \begin_layout Section
3105 LyX Archives
3106 \end_layout
3107
3108 \begin_layout Standard
3109 Users sometimes need to be able to 
3110 \begin_inset Quotes eld
3111 \end_inset
3112
3113 bundle
3114 \begin_inset Quotes erd
3115 \end_inset
3116
3117  a LyX file together with all the images (and other files) on which it depends,
3118  either for sending to a publisher or for sharing with a co-author.
3119  LyX 2.0 includes a Python script (
3120 \begin_inset Flex Code
3121 status collapsed
3122
3123 \begin_layout Plain Layout
3124 lyxpak.py
3125 \end_layout
3126
3127 \end_inset
3128
3129 ) that automates this process.
3130  To use it, you must have either the 
3131 \begin_inset Flex Code
3132 status collapsed
3133
3134 \begin_layout Plain Layout
3135 zipfile
3136 \end_layout
3137
3138 \end_inset
3139
3140  or 
3141 \begin_inset Flex Code
3142 status collapsed
3143
3144 \begin_layout Plain Layout
3145 tarfile
3146 \end_layout
3147
3148 \end_inset
3149
3150  python modules installed on your system.
3151  By default, the script prefers the 
3152 \begin_inset Flex Code
3153 status collapsed
3154
3155 \begin_layout Plain Layout
3156 gzip
3157 \end_layout
3158
3159 \end_inset
3160
3161 -compressed 
3162 \begin_inset Flex Code
3163 status collapsed
3164
3165 \begin_layout Plain Layout
3166 tar
3167 \end_layout
3168
3169 \end_inset
3170
3171  format on Unix-like systems and the 
3172 \begin_inset Flex Code
3173 status collapsed
3174
3175 \begin_layout Plain Layout
3176 zip
3177 \end_layout
3178
3179 \end_inset
3180
3181  format on Windows.
3182 \end_layout
3183
3184 \begin_layout Standard
3185 LyX's configuration process will set the script up to export a `LyX Archive',
3186  and this format will then be available under 
3187 \begin_inset Flex Code
3188 status collapsed
3189
3190 \begin_layout Plain Layout
3191 File\SpecialChar \menuseparator
3192 Export
3193 \end_layout
3194
3195 \end_inset
3196
3197 .
3198 \end_layout
3199
3200 \begin_layout Standard
3201 Independently of the platform, the generation of a particular archive format
3202  can be forced by adding either the 
3203 \begin_inset Flex Code
3204 status collapsed
3205
3206 \begin_layout Plain Layout
3207 -t
3208 \end_layout
3209
3210 \end_inset
3211
3212  (for the 
3213 \begin_inset Flex Code
3214 status collapsed
3215
3216 \begin_layout Plain Layout
3217 tar
3218 \end_layout
3219
3220 \end_inset
3221
3222  format) or 
3223 \begin_inset Flex Code
3224 status collapsed
3225
3226 \begin_layout Plain Layout
3227 -z
3228 \end_layout
3229
3230 \end_inset
3231
3232  (for the 
3233 \begin_inset Flex Code
3234 status collapsed
3235
3236 \begin_layout Plain Layout
3237 zip
3238 \end_layout
3239
3240 \end_inset
3241
3242  format) switch to the 
3243 \begin_inset Flex Code
3244 status collapsed
3245
3246 \begin_layout Plain Layout
3247 LyX\SpecialChar \menuseparator
3248 LyX Archive
3249 \end_layout
3250
3251 \end_inset
3252
3253  converter in 
3254 \begin_inset Flex Code
3255 status collapsed
3256
3257 \begin_layout Plain Layout
3258 Tools\SpecialChar \menuseparator
3259 Preferences\SpecialChar \menuseparator
3260 File Handling\SpecialChar \menuseparator
3261 Converters
3262 \end_layout
3263
3264 \end_inset
3265
3266 .
3267  (Make sure you add the switch after the script name, not before it.)
3268 \end_layout
3269
3270 \begin_layout Section
3271 Fancy Headers and Footers
3272 \end_layout
3273
3274 \begin_layout Standard
3275 The default page layout is rather plain; for an 
3276 \begin_inset Flex Code
3277 status collapsed
3278
3279 \begin_layout Plain Layout
3280 article
3281 \end_layout
3282
3283 \end_inset
3284
3285  document class, all you get is a centered page number at the bottom of
3286  the page.
3287  This document uses KOMA-script's book class, so it appears to be a bit
3288  fancier.
3289  But to really put on a show, you need to set the document page style to
3290  
3291 \begin_inset Quotes eld
3292 \end_inset
3293
3294 fancy
3295 \begin_inset Quotes erd
3296 \end_inset
3297
3298 , as mentioned in the 
3299 \emph on
3300 User Guide
3301 \emph default
3302 .
3303  This section describes the LaTeX code you need to insert in your LaTeX
3304  preamble in order to get the desired effects.
3305 \end_layout
3306
3307 \begin_layout Standard
3308 For more information on fancy headers, see the 
3309 \begin_inset Flex Code
3310 status collapsed
3311
3312 \begin_layout Plain Layout
3313 fancyhdr
3314 \end_layout
3315
3316 \end_inset
3317
3318  package documentation.
3319  (
3320 \begin_inset Flex URL
3321 status collapsed
3322
3323 \begin_layout Plain Layout
3324
3325 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3326 \end_layout
3327
3328 \end_inset
3329
3330 )
3331 \end_layout
3332
3333 \begin_layout Standard
3334 The page header is divided into three fields, not surprisingly labeled 
3335 \begin_inset Quotes eld
3336 \end_inset
3337
3338 left
3339 \begin_inset Quotes erd
3340 \end_inset
3341
3342
3343 \begin_inset Quotes eld
3344 \end_inset
3345
3346 center
3347 \begin_inset Quotes erd
3348 \end_inset
3349
3350 , and 
3351 \begin_inset Quotes eld
3352 \end_inset
3353
3354 right
3355 \begin_inset Quotes erd
3356 \end_inset
3357
3358 .
3359  The footer is also divided into these three fields.
3360  The LaTeX commands to set these fields in the simplest manner are 
3361 \begin_inset Flex Code
3362 status collapsed
3363
3364 \begin_layout Plain Layout
3365
3366 \backslash
3367 lhead
3368 \end_layout
3369
3370 \end_inset
3371
3372
3373 \begin_inset Flex Code
3374 status collapsed
3375
3376 \begin_layout Plain Layout
3377
3378 \backslash
3379 chead
3380 \end_layout
3381
3382 \end_inset
3383
3384
3385 \begin_inset Flex Code
3386 status collapsed
3387
3388 \begin_layout Plain Layout
3389
3390 \backslash
3391 rhead
3392 \end_layout
3393
3394 \end_inset
3395
3396
3397 \begin_inset Flex Code
3398 status collapsed
3399
3400 \begin_layout Plain Layout
3401
3402 \backslash
3403 lfoot
3404 \end_layout
3405
3406 \end_inset
3407
3408 , etc.
3409  Suppose you wish to put your name in the upper left hand corner of each
3410  page.
3411  Simply insert the following command in the preamble: 
3412 \end_layout
3413
3414 \begin_layout Standard
3415
3416 \family typewriter
3417
3418 \backslash
3419 lhead{John Q.
3420  DocWriter}
3421 \end_layout
3422
3423 \begin_layout Standard
3424 You will now see your name in the upper left.
3425  If a field has a default entry that you would like to get rid of (often
3426  the page number appears in the central footer) simply include a command
3427  with a blank argument, e.
3428 \begin_inset space \thinspace{}
3429 \end_inset
3430
3431 g.:
3432 \end_layout
3433
3434 \begin_layout Standard
3435
3436 \family typewriter
3437
3438 \backslash
3439 cfoot{}
3440 \end_layout
3441
3442 \begin_layout Standard
3443 Let's get really fancy: lets put the section number with the word 
3444 \begin_inset Quotes eld
3445 \end_inset
3446
3447 Section
3448 \begin_inset Quotes erd
3449 \end_inset
3450
3451  (e.
3452 \begin_inset space \thinspace{}
3453 \end_inset
3454
3455 g.
3456 \begin_inset space \space{}
3457 \end_inset
3458
3459 Section 3) in the upper left, the page number (e.
3460 \begin_inset space \thinspace{}
3461 \end_inset
3462
3463 g.
3464 \begin_inset space \space{}
3465 \end_inset
3466
3467 Page 4) in the upper right, your name in the lower left, and the date in
3468  the lower right.
3469  The following commands should now appear in the preamble:
3470 \end_layout
3471
3472 \begin_layout Standard
3473
3474 \family typewriter
3475
3476 \backslash
3477 lhead{Section 
3478 \backslash
3479 thesection}
3480 \end_layout
3481
3482 \begin_layout Standard
3483
3484 \family typewriter
3485
3486 \backslash
3487 chead{}
3488 \end_layout
3489
3490 \begin_layout Standard
3491
3492 \family typewriter
3493
3494 \backslash
3495 rhead{Page 
3496 \backslash
3497 thepage}
3498 \end_layout
3499
3500 \begin_layout Standard
3501
3502 \family typewriter
3503
3504 \backslash
3505 lfoot{John Q.
3506  DocWriter}
3507 \end_layout
3508
3509 \begin_layout Standard
3510
3511 \family typewriter
3512
3513 \backslash
3514 cfoot{}
3515 \end_layout
3516
3517 \begin_layout Standard
3518
3519 \family typewriter
3520
3521 \backslash
3522 rfoot{
3523 \backslash
3524 today}
3525 \end_layout
3526
3527 \begin_layout Standard
3528 The commands 
3529 \begin_inset Flex Code
3530 status collapsed
3531
3532 \begin_layout Plain Layout
3533
3534 \backslash
3535 thesection
3536 \end_layout
3537
3538 \end_inset
3539
3540  and 
3541 \begin_inset Flex Code
3542 status collapsed
3543
3544 \begin_layout Plain Layout
3545
3546 \backslash
3547 thepage
3548 \end_layout
3549
3550 \end_inset
3551
3552  access LaTeX's section and page counters, and so print out the current
3553  section and page numbers.
3554  
3555 \begin_inset Flex Code
3556 status collapsed
3557
3558 \begin_layout Plain Layout
3559
3560 \backslash
3561 today
3562 \end_layout
3563
3564 \end_inset
3565
3566  simply prints out today's date.
3567 \end_layout
3568
3569 \begin_layout Standard
3570 The thicknesses of the horizontal rules drawn beneath the header and above
3571  the footer can also be modified.
3572  If you don't want one of the rules, set its thickness to 0.
3573  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3574  Use commands
3575 \family typewriter
3576  
3577 \family default
3578 like 
3579 \begin_inset Flex Code
3580 status collapsed
3581
3582 \begin_layout Plain Layout
3583
3584 \backslash
3585 renewcommand{
3586 \backslash
3587 headrulewidth}{0.4pt}
3588 \end_layout
3589
3590 \end_inset
3591
3592  and 
3593 \begin_inset Flex Code
3594 status collapsed
3595
3596 \begin_layout Plain Layout
3597
3598 \backslash
3599 renewcommand{
3600 \backslash
3601 footrulewidth}{0.4pt}
3602 \end_layout
3603
3604 \end_inset
3605
3606  to set the thicknesses.
3607 \end_layout
3608
3609 \begin_layout Standard
3610 You can switch the header/footer settings on and off for individual pages
3611  using commands like 
3612 \begin_inset Flex Code
3613 status collapsed
3614
3615 \begin_layout Plain Layout
3616
3617 \backslash
3618 thispagestyle{empty}
3619 \end_layout
3620
3621 \end_inset
3622
3623
3624 \begin_inset Flex Code
3625 status collapsed
3626
3627 \begin_layout Plain Layout
3628
3629 \backslash
3630 thispagestyle{plain}
3631 \end_layout
3632
3633 \end_inset
3634
3635 , and 
3636 \begin_inset Flex Code
3637 status collapsed
3638
3639 \begin_layout Plain Layout
3640
3641 \backslash
3642 thispagestyle{fancy}
3643 \end_layout
3644
3645 \end_inset
3646
3647 .
3648  Simply insert them in the text on the page you want changed and mark them
3649  as TeX code.
3650  In fact, title pages are marked as plain by default, while following pages
3651  are marked fancy when using the global fancy setting.
3652 \end_layout
3653
3654 \begin_layout Standard
3655 As a final example, it is possible to include an image in the header or
3656  footer.
3657  Suppose you want to put a company logo in the upper lefthand corner.
3658  You might try something like
3659 \end_layout
3660
3661 \begin_layout Standard
3662
3663 \family typewriter
3664
3665 \backslash
3666 lhead{
3667 \backslash
3668 resizebox{1in}{!}{
3669 \backslash
3670 includegraphics{logo.eps}}}
3671 \end_layout
3672
3673 \begin_layout Standard
3674 \noindent
3675 (you may need to preface this with 
3676 \begin_inset Flex Code
3677 status collapsed
3678
3679 \begin_layout Plain Layout
3680 \noindent
3681
3682 \backslash
3683 usepackage{graphics}
3684 \end_layout
3685
3686 \end_inset
3687
3688  if you don't include graphics elsewhere in your document).
3689 \end_layout
3690
3691 \begin_layout Section
3692 Itemize Bullet Selection
3693 \begin_inset CommandInset label
3694 LatexCommand label
3695 name "sec:bullet"
3696
3697 \end_inset
3698
3699
3700 \end_layout
3701
3702 \begin_layout Standard
3703 by
3704 \noun on
3705  Allan Rae
3706 \end_layout
3707
3708 \begin_layout Subsection
3709 Introduction
3710 \end_layout
3711
3712 \begin_layout Standard
3713 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3714  Using this dialog you can easily specify what bullet shape to use at each
3715  level of an itemized list.
3716  These settings are document-wide so you won't be able to specify different
3717  sets of bullets for different paragraphs.
3718 \begin_inset Foot
3719 status collapsed
3720
3721 \begin_layout Plain Layout
3722 Well, actually you can but you'll have to do it by hand.
3723 \end_layout
3724
3725 \end_inset
3726
3727
3728 \end_layout
3729
3730 \begin_layout Subsection
3731 How it looks
3732 \end_layout
3733
3734 \begin_layout Standard
3735 Open the dialog by selecting the 
3736 \begin_inset Flex MenuItem
3737 status collapsed
3738
3739 \begin_layout Plain Layout
3740 Document\SpecialChar \menuseparator
3741 Settings
3742 \end_layout
3743
3744 \end_inset
3745
3746  menu item and then select the 
3747 \begin_inset Flex MenuItem
3748 status collapsed
3749
3750 \begin_layout Plain Layout
3751 Bullets
3752 \end_layout
3753
3754 \end_inset
3755
3756  tab.
3757 \end_layout
3758
3759 \begin_layout Standard
3760 The dialog provides you with a table of bullet shapes.
3761  A column of buttons on the left of the table provides access to the six
3762  different panels of bullet shapes.
3763  The row of buttons across the top is used to select which bullet depth
3764  you are changing.
3765  A text entry under the table shows the currently selected bullet shape's
3766  LaTeX equivalent and this can be edited if desired.
3767  If you do modify the text you will also need to specify any needed packages
3768  in the LaTeX preamble.
3769 \end_layout
3770
3771 \begin_layout Standard
3772 The six panels are divided up by the packages they require.
3773  The following table shows the mappings from button name to LaTeX package.
3774 \end_layout
3775
3776 \begin_layout Standard
3777 \align center
3778 \begin_inset Tabular
3779 <lyxtabular version="3" rows="7" columns="2">
3780 <features rotate="0" tabularvalignment="middle">
3781 <column alignment="center" valignment="top" width="0pt">
3782 <column alignment="center" valignment="top" width="0pt">
3783 <row>
3784 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3785 \begin_inset Text
3786
3787 \begin_layout Plain Layout
3788
3789 \family roman
3790 \series medium
3791 \shape up
3792 \size normal
3793 \emph off
3794 \bar no
3795 \noun off
3796 \color none
3797 Button
3798 \end_layout
3799
3800 \end_inset
3801 </cell>
3802 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3803 \begin_inset Text
3804
3805 \begin_layout Plain Layout
3806
3807 \family roman
3808 \series medium
3809 \shape up
3810 \size normal
3811 \emph off
3812 \bar no
3813 \noun off
3814 \color none
3815 Packages Required
3816 \end_layout
3817
3818 \end_inset
3819 </cell>
3820 </row>
3821 <row>
3822 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3823 \begin_inset Text
3824
3825 \begin_layout Plain Layout
3826
3827 \family sans
3828 \series medium
3829 \shape up
3830 \size normal
3831 \emph off
3832 \bar no
3833 \noun off
3834 \color none
3835 Standard
3836 \end_layout
3837
3838 \end_inset
3839 </cell>
3840 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3841 \begin_inset Text
3842
3843 \begin_layout Plain Layout
3844
3845 \series medium
3846 \shape up
3847 \size normal
3848 \emph off
3849 \bar no
3850 \noun off
3851 \color none
3852 base LaTeX
3853 \end_layout
3854
3855 \end_inset
3856 </cell>
3857 </row>
3858 <row>
3859 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3860 \begin_inset Text
3861
3862 \begin_layout Plain Layout
3863
3864 \family sans
3865 \series medium
3866 \shape up
3867 \size normal
3868 \emph off
3869 \bar no
3870 \noun off
3871 \color none
3872 Maths
3873 \end_layout
3874
3875 \end_inset
3876 </cell>
3877 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3878 \begin_inset Text
3879
3880 \begin_layout Plain Layout
3881
3882 \family typewriter
3883 \series medium
3884 \shape up
3885 \size normal
3886 \emph off
3887 \bar no
3888 \noun off
3889 \color none
3890 amssymb.sty
3891 \end_layout
3892
3893 \end_inset
3894 </cell>
3895 </row>
3896 <row>
3897 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3898 \begin_inset Text
3899
3900 \begin_layout Plain Layout
3901
3902 \family sans
3903 \series medium
3904 \shape up
3905 \size normal
3906 \emph off
3907 \bar no
3908 \noun off
3909 \color none
3910 Ding1
3911 \end_layout
3912
3913 \end_inset
3914 </cell>
3915 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3916 \begin_inset Text
3917
3918 \begin_layout Plain Layout
3919
3920 \family typewriter
3921 \series medium
3922 \shape up
3923 \size normal
3924 \emph off
3925 \bar no
3926 \noun off
3927 \color none
3928 pifont.sty
3929 \end_layout
3930
3931 \end_inset
3932 </cell>
3933 </row>
3934 <row>
3935 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3936 \begin_inset Text
3937
3938 \begin_layout Plain Layout
3939
3940 \family sans
3941 \series medium
3942 \shape up
3943 \size normal
3944 \emph off
3945 \bar no
3946 \noun off
3947 \color none
3948 Ding2
3949 \end_layout
3950
3951 \end_inset
3952 </cell>
3953 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3954 \begin_inset Text
3955
3956 \begin_layout Plain Layout
3957
3958 \family typewriter
3959 \series medium
3960 \shape up
3961 \size normal
3962 \emph off
3963 \bar no
3964 \noun off
3965 \color none
3966 pifont.sty
3967 \end_layout
3968
3969 \end_inset
3970 </cell>
3971 </row>
3972 <row>
3973 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3974 \begin_inset Text
3975
3976 \begin_layout Plain Layout
3977
3978 \family sans
3979 \series medium
3980 \shape up
3981 \size normal
3982 \emph off
3983 \bar no
3984 \noun off
3985 \color none
3986 Ding3
3987 \end_layout
3988
3989 \end_inset
3990 </cell>
3991 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3992 \begin_inset Text
3993
3994 \begin_layout Plain Layout
3995
3996 \family typewriter
3997 \series medium
3998 \shape up
3999 \size normal
4000 \emph off
4001 \bar no
4002 \noun off
4003 \color none
4004 pifont.sty
4005 \end_layout
4006
4007 \end_inset
4008 </cell>
4009 </row>
4010 <row>
4011 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4012 \begin_inset Text
4013
4014 \begin_layout Plain Layout
4015
4016 \family sans
4017 \series medium
4018 \shape up
4019 \size normal
4020 \emph off
4021 \bar no
4022 \noun off
4023 \color none
4024 Ding4
4025 \end_layout
4026
4027 \end_inset
4028 </cell>
4029 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4030 \begin_inset Text
4031
4032 \begin_layout Plain Layout
4033
4034 \family typewriter
4035 \series medium
4036 \shape up
4037 \size normal
4038 \emph off
4039 \bar no
4040 \noun off
4041 \color none
4042 pifont.sty
4043 \end_layout
4044
4045 \end_inset
4046 </cell>
4047 </row>
4048 </lyxtabular>
4049
4050 \end_inset
4051
4052
4053 \end_layout
4054
4055 \begin_layout Standard
4056 LyX doesn't stop you using bullets from packages you don't have.
4057  If you get errors from LaTeX when you try to view or print the file, then
4058  it is likely you are missing a package.
4059 \begin_inset Foot
4060 status collapsed
4061
4062 \begin_layout Plain Layout
4063 LyX doesn't restrict your use since you may be editing locally and exporting
4064  elsewhere.
4065 \end_layout
4066
4067 \end_inset
4068
4069
4070 \end_layout
4071
4072 \begin_layout Subsection
4073 How to use it
4074 \end_layout
4075
4076 \begin_layout Standard
4077 Select which bullet depth you want to change then select the bullet shape
4078  and size.
4079  Any changes will not be visible in LyX, but are visible when viewing the
4080  document.
4081 \end_layout
4082
4083 \begin_layout Standard
4084 You can reset a bullet shape to the default simply by clicking your right
4085  mouse button on the appropriate bullet depth button.
4086 \begin_inset Foot
4087 status collapsed
4088
4089 \begin_layout Plain Layout
4090 If you 
4091 \emph on
4092 really
4093 \emph default
4094  want to have multiple sets of paragraphs with different sets of bullets
4095  in each, then you're going to have to get your hands dirty with TeX code.
4096  The bullet selection dialog can help though because it provides you with
4097  the LaTeX code for a wide range of bullet shapes.
4098  To make your own custom paragraphs you have the following options:
4099 \end_layout
4100
4101 \begin_layout Plain Layout
4102 \begin_inset ERT
4103 status open
4104
4105 \begin_layout Plain Layout
4106
4107
4108 \backslash
4109 let
4110 \backslash
4111 savelabelitemi=
4112 \backslash
4113 labelitemi
4114 \end_layout
4115
4116 \end_inset
4117
4118
4119 \end_layout
4120
4121 \begin_layout Plain Layout
4122 \begin_inset ERT
4123 status open
4124
4125 \begin_layout Plain Layout
4126
4127
4128 \backslash
4129 renewcommand
4130 \backslash
4131 labelitemi[0]{
4132 \backslash
4133 small
4134 \backslash
4135 (
4136 \backslash
4137 sharp
4138 \backslash
4139 )}
4140 \end_layout
4141
4142 \end_inset
4143
4144
4145 \end_layout
4146
4147 \begin_layout Itemize
4148 Use the LaTeX command 
4149 \begin_inset Flex Code
4150 status collapsed
4151
4152 \begin_layout Plain Layout
4153
4154 \backslash
4155 renewcommand{}{}
4156 \end_layout
4157
4158 \end_inset
4159
4160  to specify a new bullet shape for a given depth.
4161  You'll also need to save the current bullet shape so you can restore it
4162  again afterwards.
4163  In this itemized list the following LaTeX code was used to change the bullet
4164  used for the first depth.
4165 \end_layout
4166
4167 \begin_deeper
4168 \begin_layout LyX-Code
4169
4170 \backslash
4171 let
4172 \backslash
4173 savelabelitemi=
4174 \backslash
4175 labelitemi 
4176 \end_layout
4177
4178 \begin_layout LyX-Code
4179
4180 \backslash
4181 renewcommand
4182 \backslash
4183 labelitemi[0]{
4184 \backslash
4185 small
4186 \backslash
4187 (
4188 \backslash
4189 sharp
4190 \backslash
4191 )}
4192 \end_layout
4193
4194 \end_deeper
4195 \begin_layout Itemize
4196 Note that the itemize depth is specified in Roman numerals as part of the
4197  
4198 \family typewriter
4199
4200 \backslash
4201 labelitem
4202 \family default
4203  command.
4204 \end_layout
4205
4206 \begin_layout Itemize
4207 \begin_inset ERT
4208 status open
4209
4210 \begin_layout Plain Layout
4211
4212 [
4213 \backslash
4214 (
4215 \backslash
4216 star
4217 \backslash
4218 )]
4219 \end_layout
4220
4221 \end_inset
4222
4223  Specify each individual entry by starting each item with the bullet shape
4224  enclosed in square brackets and set as 
4225 \begin_inset Flex MenuItem
4226 status collapsed
4227
4228 \begin_layout Plain Layout
4229 TeX Code
4230 \end_layout
4231
4232 \end_inset
4233
4234 .
4235  For example, this item was started with 
4236 \begin_inset Flex Code
4237 status collapsed
4238
4239 \begin_layout Plain Layout
4240 [
4241 \backslash
4242 (
4243 \backslash
4244 star
4245 \backslash
4246 )]
4247 \end_layout
4248
4249 \end_inset
4250
4251 .
4252 \end_layout
4253
4254 \begin_layout Plain Layout
4255 \begin_inset ERT
4256 status open
4257
4258 \begin_layout Plain Layout
4259
4260
4261 \backslash
4262 renewcommand
4263 \backslash
4264 labelitemi[0]{
4265 \backslash
4266 savelabelitemi}
4267 \end_layout
4268
4269 \end_inset
4270
4271
4272 \end_layout
4273
4274 \begin_layout Plain Layout
4275 You'll also need to revert the labelitem back to its previous setting for
4276  the global bullet shape settings to remain in effect.
4277  The way used here was:
4278 \end_layout
4279
4280 \begin_layout LyX-Code
4281
4282 \backslash
4283 renewcommand
4284 \backslash
4285 labelitemi[0]{
4286 \backslash
4287 savelabelitemi}
4288 \end_layout
4289
4290 \end_inset
4291
4292
4293 \end_layout
4294
4295 \begin_layout Chapter
4296 LyX and the World Wide Web
4297 \end_layout
4298
4299 \begin_layout Standard
4300 LyX has long supported the export of documents to various web-friendly formats,
4301  such as HTML.
4302  Before verson 2.0, however, HTML export was always accomplished by the use
4303  of external converters.
4304 \begin_inset Foot
4305 status collapsed
4306
4307 \begin_layout Plain Layout
4308 For details on the use of external converters with LyX, see the 
4309 \emph on
4310 Converters
4311 \emph default
4312  section of the Customization manual.
4313 \end_layout
4314
4315 \end_inset
4316
4317  These fall into two large groups: there are converters that use LaTeX as
4318  an intermediate format, such as 
4319 \begin_inset Flex Code
4320 status collapsed
4321
4322 \begin_layout Plain Layout
4323 htlatex
4324 \end_layout
4325
4326 \end_inset
4327
4328
4329 \begin_inset Flex Code
4330 status collapsed
4331
4332 \begin_layout Plain Layout
4333 html2latex
4334 \end_layout
4335
4336 \end_inset
4337
4338 , and 
4339 \begin_inset Flex Code
4340 status collapsed
4341
4342 \begin_layout Plain Layout
4343 plastex
4344 \end_layout
4345
4346 \end_inset
4347
4348 , relying upon LyX to produce the LaTeX; and there is a converter that works
4349  directly on LyX files, 
4350 \begin_inset Flex Code
4351 status collapsed
4352
4353 \begin_layout Plain Layout
4354 eLyXer
4355 \end_layout
4356
4357 \end_inset
4358
4359 .
4360  All of these have different advantages and disadvantages.
4361  
4362 \end_layout
4363
4364 \begin_layout Standard
4365 The LaTeX-based converters have the advantage that, in principle, they know
4366  everything about the exported document that LaTeX does.
4367  Such converters do not care, for example, if a certain block of code was
4368  produced by LyX or was Evil Red Text.
4369  These converters know about 
4370 \begin_inset Flex Code
4371 status collapsed
4372
4373 \begin_layout Plain Layout
4374 aux
4375 \end_layout
4376
4377 \end_inset
4378
4379  files, counters, and references, and can often make use of the 
4380 \begin_inset Flex Code
4381 status collapsed
4382
4383 \begin_layout Plain Layout
4384 bbl
4385 \end_layout
4386
4387 \end_inset
4388
4389  files generated by BibTeX.
4390  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4391  said that only TeX itself understands TeX---and LaTeX-based converters
4392  will often choke on what seem to be quite simple constructs; complex ones
4393  can throw them completely, and as of this writing, for example, the 
4394 \emph on
4395 Embedded Objects
4396 \emph default
4397  manual will not export with 
4398 \begin_inset Flex Code
4399 status collapsed
4400
4401 \begin_layout Plain Layout
4402 htlatex
4403 \end_layout
4404
4405 \end_inset
4406
4407 , though the others will.
4408  The other issue concerns how math is handled.
4409  These converters typically convert the formulae into little pictures that
4410  are then linked from the HTML document.
4411  Since these are actually generated by LaTeX, they are accurate.
4412  But they do not scale well, and just getting them to look as if they are
4413  actually meant to be in your document---so that the font sizes seem to
4414  be roughly the same---can be a challenge.
4415 \end_layout
4416
4417 \begin_layout Standard
4418 Alex Fernandez's 
4419 \begin_inset Flex Code
4420 status collapsed
4421
4422 \begin_layout Plain Layout
4423 eLyXer
4424 \end_layout
4425
4426 \end_inset
4427
4428  (
4429 \begin_inset CommandInset href
4430 LatexCommand href
4431 name "http://elyxer.nongnu.org/"
4432 target "http://elyxer.nongnu.org/"
4433
4434 \end_inset
4435
4436 ) solves some of these problems.
4437  In particular, the formulae it produces scale perfectly, since it renders
4438  math using a combination of HTML and CSS rather than converting the formulae
4439  to images.
4440  But even moderately complex formula are rendered less well than with 
4441 \begin_inset Flex Code
4442 status collapsed
4443
4444 \begin_layout Plain Layout
4445 htlatex
4446 \end_layout
4447
4448 \end_inset
4449
4450 ; this reflects the limitations of HTML.
4451 \begin_inset Foot
4452 status collapsed
4453
4454 \begin_layout Plain Layout
4455 That said, 
4456 \begin_inset Flex Code
4457 status collapsed
4458
4459 \begin_layout Plain Layout
4460 eLyXer
4461 \end_layout
4462
4463 \end_inset
4464
4465  can also use jsMath and MathJax for equations, but this setting is only
4466  available globally and requires one to have access to a server that runs
4467  the backend.
4468 \end_layout
4469
4470 \end_inset
4471
4472  More importantly (as of version 1.1.1, at least), 
4473 \begin_inset Flex Code
4474 status collapsed
4475
4476 \begin_layout Plain Layout
4477 eLyXer
4478 \end_layout
4479
4480 \end_inset
4481
4482  has limited support for math macros and no support for user-defined paragraph
4483  or character styles.
4484  These limitations make 
4485 \begin_inset Flex Code
4486 status collapsed
4487
4488 \begin_layout Plain Layout
4489 eLyXer
4490 \end_layout
4491
4492 \end_inset
4493
4494  unsuitable for many of the documents LyX users produce.
4495  In principle, of course, these problems could be solved, but the LyX developers
4496  have decided to follow a different path and have made LyX itself capable
4497  of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4498  plaintext.
4499 \end_layout
4500
4501 \begin_layout Standard
4502 As of this writing, XHTML output remains under development and should probably
4503  be regarded as 
4504 \begin_inset Quotes eld
4505 \end_inset
4506
4507 experimental
4508 \begin_inset Quotes erd
4509 \end_inset
4510
4511 .
4512 \begin_inset Foot
4513 status collapsed
4514
4515 \begin_layout Plain Layout
4516 The file 
4517 \begin_inset Flex Code
4518 status collapsed
4519
4520 \begin_layout Plain Layout
4521 development/HTML.notes
4522 \end_layout
4523
4524 \end_inset
4525
4526 , which can be found in the LyX source tree or 
4527 \begin_inset CommandInset href
4528 LatexCommand href
4529 name "accessed online"
4530 target "http://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
4531
4532 \end_inset
4533
4534 , usually contains up-to-date information about the state of XHTML output.
4535  See also the list of XHTML bugs on 
4536 \begin_inset CommandInset href
4537 LatexCommand href
4538 name "the bug tracker"
4539 target "http://www.lyx.org/trac/query?status=reopened&status=assigned&status=new&max=0&component=xhtml+export&order=id&col=id&col=summary&col=reporter&col=keywords&keywords=%21%7Efixedintrunk&desc=1"
4540
4541 \end_inset
4542
4543 .
4544 \end_layout
4545
4546 \end_inset
4547
4548  Still, the developers have chosen this approach because it has several
4549  potential advantages over the other two.
4550 \end_layout
4551
4552 \begin_layout Standard
4553 These advantages are primarily due to the fact that the XHTML output routines,
4554  since they are part of LyX, know everything LyX knows about the document
4555  being exported.
4556 \begin_inset Foot
4557 status collapsed
4558
4559 \begin_layout Plain Layout
4560 Another advantage is that, since these routines are internal to LyX, they
4561  are immune to changes in LyX's file format, or to changes in the semantics
4562  of existing insets.
4563 \end_layout
4564
4565 \end_inset
4566
4567  So they know about the table of contents (as displayed in the outline),
4568  about the counters associated with different paragraph styles, and about
4569  user-defined styles.
4570  The XHTML output routines know what LyX knows about internationalization,
4571  too, so they will output 
4572 \begin_inset Quotes eld
4573 \end_inset
4574
4575 Chapter 1
4576 \begin_inset Quotes erd
4577 \end_inset
4578
4579  or 
4580 \begin_inset Quotes eld
4581 \end_inset
4582
4583
4584 \lang ngerman
4585 Kapitel
4586 \lang english
4587  1
4588 \begin_inset Quotes erd
4589 \end_inset
4590
4591 , depending upon the language in effect at the time.
4592  
4593 \end_layout
4594
4595 \begin_layout Standard
4596 Quite generally, the output routines know what LyX knows about document
4597  layout, that is, about how the document is to be rendered on screen.
4598  We use this information when we output the document as XHTML.
4599  In particular, LyX 
4600 \emph on
4601 automatically
4602 \emph default
4603  generates CSS style information corresponding to the layout information
4604  it uses to render the document on screen: if section headings are supposed
4605  to be sans-serif and bold as seen in LyX, then (by default) they will be
4606  sans-serif and bold when viewed in a web browser, too.
4607  And this is true not just for pre-defined styles, like Section, but for
4608  any style, including user-defined styles.
4609  Indeed, the XHTML output routines make no distinction between user-defined
4610  paragraph and character styles and LyX's own pre-defined styles: in each
4611  case, everything LyX knows about the styles is contained in the layout
4612  files.
4613  And much the same is true as regards pre-defined textual insets, such as
4614  footnotes, and various custom insets.
4615  
4616 \end_layout
4617
4618 \begin_layout Standard
4619 The result is that XHTML output can be customized and extended in exactly
4620  the same way LaTeX output can be customized and extended: through layout
4621  files and modules.
4622  See chapter five of the 
4623 \emph on
4624 Customization 
4625 \emph default
4626 manual for the details.
4627 \end_layout
4628
4629 \begin_layout Standard
4630 The remainder of this chapter contains more detailed information on XHTML
4631  output, its limitations, and ways to work around those limitations.
4632 \end_layout
4633
4634 \begin_layout Section
4635 Math Output in XHTML
4636 \end_layout
4637
4638 \begin_layout Standard
4639 LyX offers four choices for how math is rendered.
4640  These have various advantages and disadvantages:
4641 \end_layout
4642
4643 \begin_layout Itemize
4644 MathML
4645 \begin_inset Newline newline
4646 \end_inset
4647
4648 MathML is a dialect of XML designed specifically for mathematics on the
4649  web, and it typically renders very well in browsers that support it.
4650  The disadvantage is that not all browsers support MathML, and support is
4651  not complete even in the Gecko-based browsers, such as Firefox.
4652 \begin_inset Newline newline
4653 \end_inset
4654
4655 If LyX is unable to render a formula as MathML---for example, if the formula
4656  uses the 
4657 \begin_inset Flex Code
4658 status collapsed
4659
4660 \begin_layout Plain Layout
4661 xymatrix
4662 \end_layout
4663
4664 \end_inset
4665
4666  package or ERT---then it will instead output the formula as an image.
4667  
4668 \end_layout
4669
4670 \begin_layout Itemize
4671 HTML
4672 \begin_inset Newline newline
4673 \end_inset
4674
4675 As mentioned above, 
4676 \begin_inset Flex Code
4677 status collapsed
4678
4679 \begin_layout Plain Layout
4680 elyxer
4681 \end_layout
4682
4683 \end_inset
4684
4685  outputs math as HTML, styled by CSS.
4686 \begin_inset Foot
4687 status collapsed
4688
4689 \begin_layout Plain Layout
4690 LyX has borrowed some of the CSS for its HTML output from 
4691 \begin_inset Flex Code
4692 status collapsed
4693
4694 \begin_layout Plain Layout
4695 elyxer
4696 \end_layout
4697
4698 \end_inset
4699
4700 .
4701 \end_layout
4702
4703 \end_inset
4704
4705  For simple formulae, this can work quite well, though with more complicated
4706  formulae it tends to break down.
4707  Still, this method has the advantage that it is very widely supported and
4708  so it may be appropriate for documents that contain only a little, fairly
4709  simple math.
4710 \begin_inset Newline newline
4711 \end_inset
4712
4713 If Lyx is unable to render a formula as HTML---for example, if the formula
4714  uses the 
4715 \begin_inset Flex Code
4716 status collapsed
4717
4718 \begin_layout Plain Layout
4719 xymatrix
4720 \end_layout
4721
4722 \end_inset
4723
4724  package or ERT---then it will instead output the formula as an image.
4725  
4726 \end_layout
4727
4728 \begin_layout Itemize
4729 Images
4730 \begin_inset Newline newline
4731 \end_inset
4732
4733 Like 
4734 \begin_inset Flex Code
4735 status collapsed
4736
4737 \begin_layout Plain Layout
4738 htlatex
4739 \end_layout
4740
4741 \end_inset
4742
4743 , LyX will output formulae as images, the very same images, in fact, that
4744  are used for instant preview.
4745 \begin_inset Foot
4746 status collapsed
4747
4748 \begin_layout Plain Layout
4749 Instant preview does 
4750 \emph on
4751 not 
4752 \emph default
4753 have to be on for images to be output, however.
4754 \end_layout
4755
4756 \end_inset
4757
4758  The advantage to this method is that the images are simply generated by
4759  LaTeX, so they are very accurate.
4760  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4761  so they do not scale terribly well, and one cannot copy them, etc.
4762  (As of this writing, there are also problems about equation numbering.
4763  See 
4764 \begin_inset CommandInset href
4765 LatexCommand href
4766 name "bug 6894"
4767 target "http://www.lyx.org/trac/ticket/6894"
4768
4769 \end_inset
4770
4771 .)
4772 \begin_inset Newline newline
4773 \end_inset
4774
4775 The size of the images can be controlled by setting the 
4776 \begin_inset Quotes eld
4777 \end_inset
4778
4779 Math Images Scaling
4780 \begin_inset Quotes erd
4781 \end_inset
4782
4783  parameter under 
4784 \begin_inset Flex MenuItem
4785 status collapsed
4786
4787 \begin_layout Plain Layout
4788 Document\SpecialChar \menuseparator
4789 Settings\SpecialChar \menuseparator
4790 Output
4791 \end_layout
4792
4793 \end_inset
4794
4795 .
4796 \begin_inset Foot
4797 status collapsed
4798
4799 \begin_layout Plain Layout
4800 For those who want to know, this controls the resolution of the image in
4801  dots per inch and is based upon a default of 75 dpi.
4802 \end_layout
4803
4804 \end_inset
4805
4806
4807 \begin_inset Newline newline
4808 \end_inset
4809
4810 If LyX for some reason fails to create an image for a formula (e.g., if a
4811  required LaTeX package is not installed), then it will fall back to outputing
4812  the raw LaTeX.
4813 \end_layout
4814
4815 \begin_layout Itemize
4816 LaTeX
4817 \begin_inset Newline newline
4818 \end_inset
4819
4820 Finally, LyX will happily output math as LaTeX.
4821  As well as being the output of last resort, this method can be used with
4822  such tools as 
4823 \begin_inset CommandInset href
4824 LatexCommand href
4825 name "jsMath"
4826 target "http://www.math.union.edu/~dpvc/jsMath/"
4827
4828 \end_inset
4829
4830 , which uses JavaScript to render LaTeX embedded in HTML documents.
4831  LyX wraps the LaTeX in either a 
4832 \begin_inset Flex Code
4833 status collapsed
4834
4835 \begin_layout Plain Layout
4836 span
4837 \end_layout
4838
4839 \end_inset
4840
4841  (for inline formulas) or 
4842 \begin_inset Flex Code
4843 status collapsed
4844
4845 \begin_layout Plain Layout
4846 div
4847 \end_layout
4848
4849 \end_inset
4850
4851  (for displayed formulas) with 
4852 \begin_inset Flex Code
4853 status collapsed
4854
4855 \begin_layout Plain Layout
4856 class='math'
4857 \end_layout
4858
4859 \end_inset
4860
4861 , as is required for jsMath.
4862 \end_layout
4863
4864 \begin_layout Standard
4865 One of these output methods must be selected under 
4866 \begin_inset Flex MenuItem
4867 status collapsed
4868
4869 \begin_layout Plain Layout
4870 Document\SpecialChar \menuseparator
4871 Settings\SpecialChar \menuseparator
4872 Output
4873 \end_layout
4874
4875 \end_inset
4876
4877 .
4878  By default, LyX outputs MathML.
4879  This is a document-wide setting, therefore.
4880 \end_layout
4881
4882 \begin_layout Standard
4883 Eventually, LyX will offer the user the option to select an alternate output
4884  method for a particular inset, say, one that isn't being rendered very
4885  well by MathML.
4886 \begin_inset Foot
4887 status collapsed
4888
4889 \begin_layout Plain Layout
4890 That said, since LyX falls back to images if the inset contains ERT, then
4891  one can force output as an image by putting some harmless ERT into the
4892  math, for example: 
4893 \begin_inset Formula $a=b\relax$
4894 \end_inset
4895
4896 .
4897 \end_layout
4898
4899 \end_inset
4900
4901
4902 \end_layout
4903
4904 \begin_layout Section
4905 Bibliography and Citations
4906 \end_layout
4907
4908 \begin_layout Standard
4909 XHTML output fully supports bibliographies and citations.
4910  
4911 \end_layout
4912
4913 \begin_layout Standard
4914 Citation labels are generated by the same machinery that generates LyX's
4915  on-screen labels, so the labels will look in the output much as they do
4916  in LyX, though better.
4917  If you are using numerical citations, then LyX will output numerical labels,
4918  such as [1] or [17], rather than simply showing the citation key in square
4919  brackets, as it does on-screen.
4920  If you are using author-year citations, then LyX will add lowercase letters
4921  to the years, just as BibTeX does, if it finds more than one citation for
4922  a given author-year combination.
4923  The labels will be printed with the bibliography entries.
4924  Note that there is, at present, no way to customize the appearance of the
4925  labels, for example, to choose between square brackets and parentheses.
4926 \end_layout
4927
4928 \begin_layout Standard
4929 Bibliography output is handled by the same machinery that handles the presentati
4930 on of reference information in the citation dialog, so you will see in the
4931  XHTML output pretty much what you would see if you were to look at a given
4932  entry in the citation dialog.
4933  The formatting can be customized in your layout file or, preferably, in
4934  a module.
4935  See the 
4936 \emph on
4937 Customization
4938 \emph default
4939  manual for the details.
4940 \end_layout
4941
4942 \begin_layout Standard
4943 The main defect at present is that cross-referenced information is printed
4944  with every entry with which it is associated.
4945  So you can see things like this:
4946 \end_layout
4947
4948 \begin_layout Quote
4949 Jason Stanley, 
4950 \begin_inset Quotes eld
4951 \end_inset
4952
4953 Context and Logical Form
4954 \begin_inset Quotes erd
4955 \end_inset
4956
4957 , in 
4958 \emph on
4959 Language in Context: Selected Essays
4960 \emph default
4961  (Oxford: Oxford University Press, 2007), pp.
4962  30--68.
4963 \end_layout
4964
4965 \begin_layout Quote
4966 Jason Stanley, 
4967 \begin_inset Quotes eld
4968 \end_inset
4969
4970 Semantics in Context
4971 \begin_inset Quotes erd
4972 \end_inset
4973
4974 , in 
4975 \emph on
4976 Language in Context: Selected Essays
4977 \emph default
4978  (Oxford: Oxford University Press, 2007), pp.
4979  201--30.
4980 \end_layout
4981
4982 \begin_layout Standard
4983 This should be fixed before long.
4984 \end_layout
4985
4986 \begin_layout Standard
4987 There is no support at present for sectioned bibliographies.
4988  If you have multiple bibliographies, then LyX will print the same bibliography
4989  over and over.
4990 \end_layout
4991
4992 \begin_layout Section
4993 Indexes
4994 \end_layout
4995
4996 \begin_layout Standard
4997 LyX will happily export indexes as XHTML, but with certain limitations at
4998  the moment.
4999 \end_layout
5000
5001 \begin_layout Standard
5002 Index export will be most reliable when you do not attempt to use the fancy
5003  constructs that are described in the section on indexes in the 
5004 \emph on
5005 User's Guide
5006 \emph default
5007 .
5008 \begin_inset Foot
5009 status collapsed
5010
5011 \begin_layout Plain Layout
5012 The main issue here is that LyX itself does not really handle these.
5013  It just lets you enter what you would have to enter in raw LaTeX.
5014 \end_layout
5015
5016 \end_inset
5017
5018  We'll describe how they are handled using the subsection headings from
5019  that section.
5020 \end_layout
5021
5022 \begin_layout Itemize
5023 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5024  these, but the entries must be separated by 
5025 \begin_inset Quotes eld
5026 \end_inset
5027
5028  ! 
5029 \begin_inset Quotes erd
5030 \end_inset
5031
5032 , that is, there must be spaces around the exclamation point.
5033  This is because it is otherwise too difficult to check for escaped exclamation
5034  points, ones in math, and so forth.
5035 \end_layout
5036
5037 \begin_layout Itemize
5038 Page Ranges: There is no support at all for page ranges, since these make
5039  no sense with XHMTL.
5040  Instead, you will just get two index entries, one at either end.
5041 \end_layout
5042
5043 \begin_layout Itemize
5044 Cross-referencing: There is no support for cross-referencing.
5045  If LyX finds an entry containing the 
5046 \begin_inset Quotes eld
5047 \end_inset
5048
5049 |see\SpecialChar \ldots{}
5050
5051 \begin_inset Quotes erd
5052 \end_inset
5053
5054  construct, it is just dropped, and the rest is treated as an ordinary index
5055  entry.
5056 \end_layout
5057
5058 \begin_layout Itemize
5059 Index Entry Order: LyX does support attempts to fix the sorting order.
5060  It will take what is before the first `@' it finds and use that for sorting,
5061  taking what follows the first `@' to be the actual entry.
5062  At present, LyX does not check for escaped `@', so do not try to index
5063  email addresses.
5064 \end_layout
5065
5066 \begin_layout Itemize
5067 Index Entry Layout: You can format entries by using the text style dialog,
5068  or by using any other method available within LyX itself.
5069  There is no support for constructs like: 
5070 \begin_inset Quotes eld
5071 \end_inset
5072
5073 entry|textbf
5074 \begin_inset Quotes erd
5075 \end_inset
5076
5077 .
5078  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5079  and everything that follows it.
5080 \end_layout
5081
5082 \begin_layout Itemize
5083 Multiple Indexes: There is no support for multiple indexes.
5084  Rather, all index entries will be printed as one large index.
5085  To avoid our printing several versions of the index, we print only the
5086  main index, so make sure you have one.
5087 \end_layout
5088
5089 \begin_layout Section
5090 Nomenclature and Glossary
5091 \end_layout
5092
5093 \begin_layout Standard
5094 There is at present no support for glossaries.
5095  Adding it would be fairly trivial, and welcome.
5096 \end_layout
5097
5098 \begin_layout Chapter
5099 The LyX Server
5100 \end_layout
5101
5102 \begin_layout Section
5103 Introduction
5104 \end_layout
5105
5106 \begin_layout Standard
5107 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5108  and retrieve information about the LyX internal state.
5109  This is only intended for advanced users, but they should find it useful.
5110  It is by writing to the LyX server, for example, that bibliography managers,
5111  such as JabRef, are able to 
5112 \begin_inset Quotes eld
5113 \end_inset
5114
5115 push
5116 \begin_inset Quotes erd
5117 \end_inset
5118
5119  citations to LyX.
5120 \end_layout
5121
5122 \begin_layout Section
5123 Starting the LyX Server
5124 \end_layout
5125
5126 \begin_layout Standard
5127 The LyX server works through the use of a pair of named pipes.
5128  These are usually located in 
5129 \begin_inset Flex Code
5130 status collapsed
5131
5132 \begin_layout Plain Layout
5133 UserDir
5134 \end_layout
5135
5136 \end_inset
5137
5138 , (except on Windows, where 
5139 \emph on
5140 local
5141 \emph default
5142  named pipes are special objects located in 
5143 \begin_inset Flex Code
5144 status collapsed
5145
5146 \begin_layout Plain Layout
5147
5148 \backslash
5149
5150 \backslash
5151 .
5152 \backslash
5153 pipe
5154 \end_layout
5155
5156 \end_inset
5157
5158 ) and have the names 
5159 \begin_inset Quotes eld
5160 \end_inset
5161
5162
5163 \begin_inset Flex Code
5164 status collapsed
5165
5166 \begin_layout Plain Layout
5167 lyxpipe.in
5168 \end_layout
5169
5170 \end_inset
5171
5172
5173 \begin_inset Quotes erd
5174 \end_inset
5175
5176  and 
5177 \begin_inset Quotes eld
5178 \end_inset
5179
5180
5181 \begin_inset Flex Code
5182 status collapsed
5183
5184 \begin_layout Plain Layout
5185 lyxpipe.out
5186 \end_layout
5187
5188 \end_inset
5189
5190
5191 \begin_inset Quotes erd
5192 \end_inset
5193
5194 .
5195  External programs write into 
5196 \begin_inset Flex Code
5197 status collapsed
5198
5199 \begin_layout Plain Layout
5200 lyxpipe.in
5201 \end_layout
5202
5203 \end_inset
5204
5205  and read back data from 
5206 \begin_inset Flex Code
5207 status collapsed
5208
5209 \begin_layout Plain Layout
5210 lyxpipe.out
5211 \end_layout
5212
5213 \end_inset
5214
5215 .
5216  The stem of the pipe names can be defined in the 
5217 \begin_inset Flex MenuItem
5218 status collapsed
5219
5220 \begin_layout Plain Layout
5221 Tools\SpecialChar \menuseparator
5222 Preferences
5223 \end_layout
5224
5225 \end_inset
5226
5227  dialog, for example 
5228 \begin_inset Flex Code
5229 status collapsed
5230
5231 \begin_layout Plain Layout
5232 "/home/myhome/lyxpipe"
5233 \end_layout
5234
5235 \end_inset
5236
5237 , or 
5238 \begin_inset Flex Code
5239 status collapsed
5240
5241 \begin_layout Plain Layout
5242 "
5243 \backslash
5244
5245 \backslash
5246 .
5247 \backslash
5248 pipe
5249 \backslash
5250 lyxpipe"
5251 \end_layout
5252
5253 \end_inset
5254
5255  on Windows (but any working path can be used).
5256  You 
5257 \emph on
5258 must
5259 \emph default
5260  configure this manually in order for the server to start.
5261 \end_layout
5262
5263 \begin_layout Standard
5264 LyX will add the '
5265 \begin_inset Flex Code
5266 status collapsed
5267
5268 \begin_layout Plain Layout
5269 .in
5270 \end_layout
5271
5272 \end_inset
5273
5274 ' and '
5275 \begin_inset Flex Code
5276 status collapsed
5277
5278 \begin_layout Plain Layout
5279 .out
5280 \end_layout
5281
5282 \end_inset
5283
5284 ' to create the pipes.
5285  If one of the pipes already exists, LyX will assume that another LyX process
5286  is already running and will not start the server.
5287  On POSIX (Unix like) systems, if for some other reason, an unused 
5288 \begin_inset Quotes eld
5289 \end_inset
5290
5291 stale
5292 \begin_inset Quotes erd
5293 \end_inset
5294
5295  pipe is left in existence when LyX closes, then LyX will try to delete
5296  it.
5297  If this fails for some reason, you will need to delete the pipes manually
5298  and then restart LyX.
5299  On Windows, pipes are deleted by the OS on program termination or crash,
5300  so 
5301 \begin_inset Quotes eld
5302 \end_inset
5303
5304 stale
5305 \begin_inset Quotes erd
5306 \end_inset
5307
5308  pipes should not be possible.
5309 \end_layout
5310
5311 \begin_layout Standard
5312 To have several LyX processes with servers at the same time, you have to
5313  use different configurations, perhaps by using separate user directories,
5314  each with its own 
5315 \begin_inset Flex Code
5316 status collapsed
5317
5318 \begin_layout Plain Layout
5319 preferences
5320 \end_layout
5321
5322 \end_inset
5323
5324  file, for each process.
5325 \end_layout
5326
5327 \begin_layout Standard
5328 If you are developing a client program, you might find it useful to enable
5329  debugging information from the LyX server.
5330  Do this by starting LyX as 
5331 \begin_inset Flex Code
5332 status collapsed
5333
5334 \begin_layout Plain Layout
5335 lyx -dbg lyxserver
5336 \end_layout
5337
5338 \end_inset
5339
5340 .
5341 \end_layout
5342
5343 \begin_layout Standard
5344 You can find a complete example client written in C in the source distribution
5345  as 
5346 \begin_inset Flex Code
5347 status collapsed
5348
5349 \begin_layout Plain Layout
5350 development/lyxserver/server_monitor.c
5351 \end_layout
5352
5353 \end_inset
5354
5355 .
5356 \end_layout
5357
5358 \begin_layout Standard
5359 Another useful tool is the command-line based clientfound in 
5360 \begin_inset Flex Code
5361 status collapsed
5362
5363 \begin_layout Plain Layout
5364 src/client/lyxclient
5365 \end_layout
5366
5367 \end_inset
5368
5369 .
5370 \end_layout
5371
5372 \begin_layout Section
5373 Normal communication
5374 \end_layout
5375
5376 \begin_layout Standard
5377 To issue a LyX call, the client writes a line of ASCII text into the input
5378  pipe.
5379  This line has the following format:
5380 \end_layout
5381
5382 \begin_layout Quote
5383 LYXCMD:
5384 \emph on
5385 clientname
5386 \emph default
5387 :
5388 \emph on
5389 function
5390 \emph default
5391 :
5392 \emph on
5393 argument
5394 \end_layout
5395
5396 \begin_layout Description
5397 clientname is a name that the client can choose arbitrarily.
5398  Its only use is that LyX will echo it if it sends an answer—so a client
5399  can dispatch results from different requesters.
5400 \end_layout
5401
5402 \begin_layout Description
5403 function is the function you want LyX to perform.
5404  It is the same as the commands you'd use in the minibuffer.
5405 \end_layout
5406
5407 \begin_layout Description
5408 argument is an optional argument which is meaningful only to some functions
5409  (for instance, the 
5410 \begin_inset Quotes eld
5411 \end_inset
5412
5413 self-insert
5414 \begin_inset Quotes erd
5415 \end_inset
5416
5417  LFUN will insert the argument as text at the cursor position).
5418 \end_layout
5419
5420 \begin_layout Standard
5421 The answer from LyX will arrive in the output pipe and be of the form
5422 \end_layout
5423
5424 \begin_layout Quote
5425 INFO:
5426 \emph on
5427 clientname
5428 \emph default
5429 :
5430 \emph on
5431 function
5432 \emph default
5433 :
5434 \emph on
5435 data
5436 \end_layout
5437
5438 \begin_layout Standard
5439 where 
5440 \emph on
5441 clientname
5442 \emph default
5443  and 
5444 \emph on
5445 function
5446 \emph default
5447  are just echoed from the command request, while 
5448 \emph on
5449 data
5450 \emph default
5451  is more or less useful information filled according to how the command
5452  execution worked out.
5453  Some commands, such as 
5454 \begin_inset Quotes eld
5455 \end_inset
5456
5457 font-state
5458 \begin_inset Quotes erd
5459 \end_inset
5460
5461 , will return information about the internal state of LyX, while other will
5462  return an empty data-response.
5463  This means that the command execution went fine.
5464 \end_layout
5465
5466 \begin_layout Standard
5467 In case of errors, the response from LyX will have this form
5468 \end_layout
5469
5470 \begin_layout Quote
5471 ERROR:
5472 \emph on
5473 clientname
5474 \emph default
5475 :
5476 \emph on
5477 function
5478 \emph default
5479 :
5480 \emph on
5481 error message
5482 \end_layout
5483
5484 \begin_layout Standard
5485 where the 
5486 \emph on
5487 error message
5488 \emph default
5489  should contain an explanation of why the command failed.
5490 \end_layout
5491
5492 \begin_layout Standard
5493 Examples:
5494 \end_layout
5495
5496 \begin_layout LyX-Code
5497 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5498 \begin_inset Newline newline
5499 \end_inset
5500
5501 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5502 \begin_inset Newline newline
5503 \end_inset
5504
5505 read a <~/.lyxpipe.out
5506 \begin_inset Newline newline
5507 \end_inset
5508
5509 echo $a
5510 \end_layout
5511
5512 \begin_layout Subsection
5513 AppleScript (Mac OS X)
5514 \end_layout
5515
5516 \begin_layout Standard
5517 Since LyX 2.1, LyX supports basic interactions with AppleScript for normal
5518  communication through the command run.
5519  This command takes a direct argument (the 
5520 \series bold
5521 function
5522 \series default
5523  to perform) and an optional argument.
5524  It either returns the output of the function or triggers an error with
5525  the error message and code.
5526 \end_layout
5527
5528 \begin_layout Standard
5529 Example:
5530 \end_layout
5531
5532 \begin_layout LyX-Code
5533 tell application "LyX"
5534 \end_layout
5535
5536 \begin_layout LyX-Code
5537   try
5538 \end_layout
5539
5540 \begin_layout LyX-Code
5541     -- Stores the current file name into f
5542 \end_layout
5543
5544 \begin_layout LyX-Code
5545     set f to (run "server-get-filename" with argument "")
5546 \end_layout
5547
5548 \begin_layout LyX-Code
5549     on error the error_message number the error_number
5550 \end_layout
5551
5552 \begin_layout LyX-Code
5553       display dialog "Error: " & the error_number & ".
5554  " ¬
5555 \end_layout
5556
5557 \begin_layout LyX-Code
5558               & the error_message buttons {"OK"} default button 1
5559 \end_layout
5560
5561 \begin_layout LyX-Code
5562   end try
5563 \end_layout
5564
5565 \begin_layout LyX-Code
5566 end tell
5567 \end_layout
5568
5569 \begin_layout Section
5570 Notification
5571 \end_layout
5572
5573 \begin_layout Standard
5574 LyX can notify clients of events going on asynchronously.
5575  Currently it will only do this if the user binds a key sequence with the
5576  function 
5577 \begin_inset Quotes eld
5578 \end_inset
5579
5580 notify
5581 \begin_inset Quotes erd
5582 \end_inset
5583
5584 .
5585  The format of the string LyX sends is as follows:
5586 \end_layout
5587
5588 \begin_layout Quote
5589 \begin_inset Flex Code
5590 status collapsed
5591
5592 \begin_layout Plain Layout
5593 NOTIFY:
5594 \end_layout
5595
5596 \end_inset
5597
5598
5599 \emph on
5600 key-sequence
5601 \end_layout
5602
5603 \begin_layout Standard
5604 where 
5605 \emph on
5606 key-sequence
5607 \emph default
5608  is the printed representation of the key sequence that was actually typed
5609  by the user.
5610 \end_layout
5611
5612 \begin_layout Standard
5613 This mechanism can be used to extend LyX's command set and implement macros.
5614  Bind some key sequence to 
5615 \begin_inset Quotes eld
5616 \end_inset
5617
5618 notify
5619 \begin_inset Quotes erd
5620 \end_inset
5621
5622 .
5623  Then start a client that listens on the output pipe, dispatches the command
5624  according to the sequence, and starts a function that may use LyX calls
5625  and LyX requests to issue a command or a series of commands to LyX.
5626 \end_layout
5627
5628 \begin_layout Section
5629 The simple LyX Server Protocol
5630 \end_layout
5631
5632 \begin_layout Standard
5633 LyX implements a simple protocol that can be used for session management.
5634  All messages are of the form
5635 \end_layout
5636
5637 \begin_layout Quote
5638 LYXSRV:
5639 \emph on
5640 clientname
5641 \emph default
5642 :
5643 \emph on
5644 protocol message
5645 \end_layout
5646
5647 \begin_layout Standard
5648 where 
5649 \emph on
5650 protocol message
5651 \emph default
5652  can be 
5653 \begin_inset Quotes eld
5654 \end_inset
5655
5656 hello
5657 \begin_inset Quotes erd
5658 \end_inset
5659
5660  or 
5661 \begin_inset Quotes eld
5662 \end_inset
5663
5664 bye
5665 \begin_inset Quotes erd
5666 \end_inset
5667
5668 .
5669  If 
5670 \begin_inset Quotes eld
5671 \end_inset
5672
5673 hello
5674 \begin_inset Quotes erd
5675 \end_inset
5676
5677  is received from a client, LyX will report back to inform the client that
5678  it's listening to it's messages, while 
5679 \begin_inset Quotes eld
5680 \end_inset
5681
5682 bye
5683 \begin_inset Quotes erd
5684 \end_inset
5685
5686  sent from LyX will inform clients that LyX is closing.
5687 \end_layout
5688
5689 \begin_layout Section
5690 Reverse DVI/PDF search
5691 \end_layout
5692
5693 \begin_layout Standard
5694 Some DVI/PDF viewers
5695 \begin_inset Foot
5696 status collapsed
5697
5698 \begin_layout Plain Layout
5699 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5700  Skim on Mac OSX and SumatraPDF on Windows.
5701 \end_layout
5702
5703 \end_inset
5704
5705  provide 
5706 \emph on
5707 reverse search
5708 \emph default
5709  facility (also called 
5710 \emph on
5711 inverse search
5712 \emph default
5713 ).
5714  This means that you can tell LyX to put the cursor to a specific line in
5715  the document by clicking at the respective position in the DVI/PDF output.
5716  To achieve this, the viewer must be able to communicate with LyX.
5717  This is done via the LyX server either by using the named pipe (
5718 \emph on
5719 lyxpipe
5720 \emph default
5721 ), or the UNIX domain socket (
5722 \emph on
5723 lyxsocket
5724 \emph default
5725 ) that LyX creates in its temporary directory (this is the way the 
5726 \begin_inset Flex Code
5727 status collapsed
5728
5729 \begin_layout Plain Layout
5730 lyxclient
5731 \end_layout
5732
5733 \end_inset
5734
5735  program communicates with LyX).
5736  In some cases, you need a helper script that mediates between the viewer
5737  and LyX, in others, the viewer can communicate with LyX directly.
5738  This depends on the selected viewer and on your operating system.
5739  The same applies to the way viewers need to be configured and the way the
5740  reverse search is actually performed.
5741  In what follows, we will thus describe how to setup reverse search for
5742  specific viewers.
5743  Before we turn to this, though, we will explain what needs to be done generally
5744  to enable reverse search in the DVI/PDF output.
5745 \end_layout
5746
5747 \begin_layout Subsection
5748 Automatic setup
5749 \begin_inset CommandInset label
5750 LatexCommand label
5751 name "sub:rev-search"
5752
5753 \end_inset
5754
5755
5756 \end_layout
5757
5758 \begin_layout Standard
5759 In most cases LyX will do the work for you by enabling the option 
5760 \begin_inset Flex MenuItem
5761 status collapsed
5762
5763 \begin_layout Plain Layout
5764 Synchronize with Output
5765 \end_layout
5766
5767 \end_inset
5768
5769  in the menu 
5770 \begin_inset Flex MenuItem
5771 status collapsed
5772
5773 \begin_layout Plain Layout
5774 Document\SpecialChar \menuseparator
5775 Settings\SpecialChar \menuseparator
5776 Output
5777 \end_layout
5778
5779 \end_inset
5780
5781 .
5782  In such a case LyX will automatically insert the necessary SyncTeX macro
5783  (for PDF) or load the srcltx package (for DVI) respectively.
5784  This option can be easily reached also on 
5785 \begin_inset Flex Code
5786 status collapsed
5787
5788 \begin_layout Plain Layout
5789 View/Update
5790 \end_layout
5791
5792 \end_inset
5793
5794  Toolbar.
5795 \end_layout
5796
5797 \begin_layout Standard
5798 If you need a different setting, you can select or input a custom macro
5799  from the drop down box just below 
5800 \begin_inset Flex MenuItem
5801 status collapsed
5802
5803 \begin_layout Plain Layout
5804 Document\SpecialChar \menuseparator
5805 Settings\SpecialChar \menuseparator
5806 Output\SpecialChar \menuseparator
5807 Synchronize with Output
5808 \end_layout
5809
5810 \end_inset
5811
5812 .
5813 \end_layout
5814
5815 \begin_layout Standard
5816 Note that the method 
5817 \begin_inset Flex Code
5818 status collapsed
5819
5820 \begin_layout Plain Layout
5821
5822 \backslash
5823 synctex=1
5824 \end_layout
5825
5826 \end_inset
5827
5828  enables gzip compression.
5829  If your viewer does not support it, you should instead use 
5830 \begin_inset Flex Code
5831 status collapsed
5832
5833 \begin_layout Plain Layout
5834
5835 \backslash
5836 synctex=-1
5837 \end_layout
5838
5839 \end_inset
5840
5841 .
5842 \end_layout
5843
5844 \begin_layout Standard
5845 Please aöso note that including the 
5846 \begin_inset Flex Code
5847 status collapsed
5848
5849 \begin_layout Plain Layout
5850 srcltx
5851 \end_layout
5852
5853 \end_inset
5854
5855  package or 
5856 \begin_inset Flex Code
5857 status collapsed
5858
5859 \begin_layout Plain Layout
5860 src-specials
5861 \end_layout
5862
5863 \end_inset
5864
5865  sometimes has an undesired impact on the typesetting.
5866  Thus, you should switch output synchronization off for the final typesetting
5867  if you use the 
5868 \begin_inset Flex Code
5869 status collapsed
5870
5871 \begin_layout Plain Layout
5872 srcltx
5873 \end_layout
5874
5875 \end_inset
5876
5877  package or 
5878 \begin_inset Flex Code
5879 status collapsed
5880
5881 \begin_layout Plain Layout
5882 src-specials
5883 \end_layout
5884
5885 \end_inset
5886
5887 .
5888  
5889 \end_layout
5890
5891 \begin_layout Standard
5892 In case you need some more special settings that are not covered by the
5893  automatic settings, read the next section about how to set up output synchroniz
5894 ation manually.
5895  If the automatic setup suits your needs, you can readily jump to section
5896 \begin_inset space ~
5897 \end_inset
5898
5899
5900 \begin_inset CommandInset ref
5901 LatexCommand ref
5902 reference "sub:configuring-viewers"
5903
5904 \end_inset
5905
5906 , where the necessary configuration steps in your viewer -- needed both
5907  with the automatic and the manual setup -- are described.
5908 \end_layout
5909
5910 \begin_layout Subsection
5911 Manual setup
5912 \end_layout
5913
5914 \begin_layout Standard
5915 LaTeX provides several different methods for reverse search.
5916  Some are built-in in the 
5917 \begin_inset Flex Code
5918 status collapsed
5919
5920 \begin_layout Plain Layout
5921 latex/pdflatex
5922 \end_layout
5923
5924 \end_inset
5925
5926  program, some are provided by external packages.
5927  Your choice depends on whether your LaTeX distribution already provides
5928  a given method (the built-in methods are rather new) and whether your viewer
5929  can cope with it.
5930  The available methods are described in the following.
5931 \end_layout
5932
5933 \begin_layout Subsubsection*
5934 Built-in DVI-search via src-specials (DVI only) 
5935 \end_layout
5936
5937 \begin_layout Standard
5938 This method provides the DVI file with the necessary information for reverse
5939  search.
5940  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5941  distribution should include it), and it works reliably.
5942  To enable it, change the 
5943 \begin_inset Flex MenuItem
5944 status collapsed
5945
5946 \begin_layout Plain Layout
5947 LaT
5948 \begin_inset ERT
5949 status collapsed
5950
5951 \begin_layout Plain Layout
5952
5953 {}
5954 \end_layout
5955
5956 \end_inset
5957
5958 eX (plain)->DVI
5959 \end_layout
5960
5961 \end_inset
5962
5963  or 
5964 \begin_inset Flex MenuItem
5965 status collapsed
5966
5967 \begin_layout Plain Layout
5968 LaT
5969 \begin_inset ERT
5970 status collapsed
5971
5972 \begin_layout Plain Layout
5973
5974 {}
5975 \end_layout
5976
5977 \end_inset
5978
5979 eX (plain)->DraftDVI
5980 \end_layout
5981
5982 \end_inset
5983
5984  converter in 
5985 \begin_inset Flex MenuItem
5986 status collapsed
5987
5988 \begin_layout Plain Layout
5989 Preferences\SpecialChar \menuseparator
5990 File Handling\SpecialChar \menuseparator
5991 Converters
5992 \end_layout
5993
5994 \end_inset
5995
5996  to 
5997 \begin_inset Flex Code
5998 status collapsed
5999
6000 \begin_layout Plain Layout
6001 latex -src-specials $$i
6002 \end_layout
6003
6004 \end_inset
6005
6006 .
6007  If this doesn't work, check if your TeX engine needs different options
6008  (the syntax might differ in some distributions).
6009 \end_layout
6010
6011 \begin_layout Subsubsection*
6012 External Packages (PDFSync and scrltx) 
6013 \end_layout
6014
6015 \begin_layout Standard
6016 The packages 
6017 \emph on
6018 pdfsync
6019 \emph default
6020  and 
6021 \emph on
6022 scrltx
6023 \emph default
6024  provide reverse search facility for PDF output (via pdflatex) and DVI output,
6025  respectively.
6026  In order to enable it, load the packages in the LyX preamble: 
6027 \end_layout
6028
6029 \begin_layout Itemize
6030 \begin_inset Flex Code
6031 status collapsed
6032
6033 \begin_layout Plain Layout
6034
6035 \backslash
6036 usepackage{pdfsync}
6037 \end_layout
6038
6039 \end_inset
6040
6041  for reverse PDF search,
6042 \end_layout
6043
6044 \begin_layout Itemize
6045 \begin_inset Flex Code
6046 status collapsed
6047
6048 \begin_layout Plain Layout
6049
6050 \backslash
6051 usepackage[active]{srcltx}
6052 \end_layout
6053
6054 \end_inset
6055
6056  for reverse DVI search.
6057 \end_layout
6058
6059 \begin_layout Standard
6060 If you want to be able to perform both DVI and PDF reverse searches, you
6061  can also insert in the preamble the following lines
6062 \end_layout
6063
6064 \begin_layout LyX-Code
6065
6066 \backslash
6067 usepackage{ifpdf}
6068 \begin_inset Newline newline
6069 \end_inset
6070
6071
6072 \backslash
6073 ifpdf
6074 \begin_inset Newline newline
6075 \end_inset
6076
6077   
6078 \backslash
6079 usepackage{pdfsync}
6080 \begin_inset Newline newline
6081 \end_inset
6082
6083
6084 \backslash
6085 else
6086 \begin_inset Newline newline
6087 \end_inset
6088
6089   
6090 \backslash
6091 usepackage[active]{srcltx}
6092 \begin_inset Newline newline
6093 \end_inset
6094
6095
6096 \backslash
6097 fi
6098 \end_layout
6099
6100 \begin_layout Standard
6101 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6102  right package will be used.
6103 \end_layout
6104
6105 \begin_layout Standard
6106 Note that PDFSync might affect the output layout of your document.
6107  It is therefore advised to disable PDFsync for final documents.
6108 \end_layout
6109
6110 \begin_layout Subsubsection*
6111 Built-in reverse search via SyncTeX (DVI and PDF) 
6112 \end_layout
6113
6114 \begin_layout Standard
6115 Recent versions of 
6116 \begin_inset Flex Code
6117 status collapsed
6118
6119 \begin_layout Plain Layout
6120 (pdf)latex
6121 \end_layout
6122
6123 \end_inset
6124
6125  have built-in support for both PDF and DVI reverse search.
6126  This so-called 
6127 \emph on
6128 SyncTeX
6129 \emph default
6130  facility is basically the result of the integration of the PDFSync package
6131  to the pdftex program and its merge with the 
6132 \emph on
6133 scr-specials
6134 \emph default
6135  approach.
6136  You need at least TeXLive 2008 or a recent MikTeX distribution in order
6137  to use it
6138 \begin_inset Foot
6139 status collapsed
6140
6141 \begin_layout Plain Layout
6142 For some reason, MikTeX does not understand/obey the command LyX inserts
6143  into the preamble when you check the "Enable Forward/Reverse Search" button
6144  in the toolbar and does not generate the necessary info.
6145 \end_layout
6146
6147 \begin_layout Plain Layout
6148 The generation of the required info can be forced by changing the converter
6149  "LaTeX (pdflatex) -> PDF (pdflatex)" in Preferences->File handling->Converters
6150  from the default "pdflatex $$i" to "pdflatex -synctex=1 $$i" (i.e., by adding
6151  the -synctex=1 switch).
6152 \end_layout
6153
6154 \end_inset
6155
6156 .
6157  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6158  already provide SyncTeX support.
6159 \end_layout
6160
6161 \begin_layout Standard
6162 To enable SyncTeX for DVI output, change the 
6163 \begin_inset Flex MenuItem
6164 status collapsed
6165
6166 \begin_layout Plain Layout
6167 LaT
6168 \begin_inset ERT
6169 status collapsed
6170
6171 \begin_layout Plain Layout
6172
6173 {}
6174 \end_layout
6175
6176 \end_inset
6177
6178 eX (plain) -> DVI
6179 \end_layout
6180
6181 \end_inset
6182
6183  or 
6184 \begin_inset Flex MenuItem
6185 status collapsed
6186
6187 \begin_layout Plain Layout
6188 LaT
6189 \begin_inset ERT
6190 status collapsed
6191
6192 \begin_layout Plain Layout
6193
6194 {}
6195 \end_layout
6196
6197 \end_inset
6198
6199 eX (plain) -> DraftDVI
6200 \end_layout
6201
6202 \end_inset
6203
6204  converter in 
6205 \begin_inset Flex MenuItem
6206 status collapsed
6207
6208 \begin_layout Plain Layout
6209 Preferences\SpecialChar \menuseparator
6210 File Handling\SpecialChar \menuseparator
6211 Converters
6212 \end_layout
6213
6214 \end_inset
6215
6216  to 
6217 \begin_inset Flex Code
6218 status collapsed
6219
6220 \begin_layout Plain Layout
6221 latex -synctex=1 $$i
6222 \end_layout
6223
6224 \end_inset
6225
6226 , and for PDF output, change the 
6227 \begin_inset Flex MenuItem
6228 status collapsed
6229
6230 \begin_layout Plain Layout
6231 LaT
6232 \begin_inset ERT
6233 status collapsed
6234
6235 \begin_layout Plain Layout
6236
6237 {}
6238 \end_layout
6239
6240 \end_inset
6241
6242 eX (pdflatex) -> PDF (pdflatex)
6243 \end_layout
6244
6245 \end_inset
6246
6247  or converter to 
6248 \begin_inset Flex Code
6249 status collapsed
6250
6251 \begin_layout Plain Layout
6252 pdflatex -synctex=1 $$i
6253 \end_layout
6254
6255 \end_inset
6256
6257 .
6258  Check the documentation of your viewer whether the viewer needs to be configure
6259 d for the use with SyncTeX.
6260 \begin_inset Foot
6261 status collapsed
6262
6263 \begin_layout Plain Layout
6264 Note that the option 
6265 \begin_inset Flex Code
6266 status collapsed
6267
6268 \begin_layout Plain Layout
6269 -synctex=1
6270 \end_layout
6271
6272 \end_inset
6273
6274  option enables gzip compression.
6275  If your viewer does not support it, you should instead use 
6276 \begin_inset Flex Code
6277 status collapsed
6278
6279 \begin_layout Plain Layout
6280 -synctex=-1
6281 \end_layout
6282
6283 \end_inset
6284
6285 .
6286 \end_layout
6287
6288 \end_inset
6289
6290
6291 \end_layout
6292
6293 \begin_layout Subsection
6294 Configuring and using specific viewers
6295 \begin_inset CommandInset label
6296 LatexCommand label
6297 name "sub:configuring-viewers"
6298
6299 \end_inset
6300
6301
6302 \end_layout
6303
6304 \begin_layout Subsubsection*
6305 Xdvi (all platforms)
6306 \end_layout
6307
6308 \begin_layout Standard
6309 If you use 
6310 \begin_inset Flex Code
6311 status collapsed
6312
6313 \begin_layout Plain Layout
6314 xdvi
6315 \end_layout
6316
6317 \end_inset
6318
6319 , you don't need to do anything else for performing a reverse DVI search,
6320  as LyX already provides the necessary hooks for automatically using the
6321  
6322 \begin_inset Flex Code
6323 status collapsed
6324
6325 \begin_layout Plain Layout
6326 lyxclient
6327 \end_layout
6328
6329 \end_inset
6330
6331  program.
6332  Just setup your document as described above (reverse search is triggered
6333  by Ctrl-click or Alt-click on Mac OSX, respectively).
6334 \end_layout
6335
6336 \begin_layout Standard
6337 However, if for whatever reason you want to use the named pipe instead of
6338  the socket for communicating with LyX, simply change the DVI viewer in
6339  
6340 \begin_inset Flex MenuItem
6341 status collapsed
6342
6343 \begin_layout Plain Layout
6344 Preferences\SpecialChar \menuseparator
6345 File Handling\SpecialChar \menuseparator
6346 File formats
6347 \end_layout
6348
6349 \end_inset
6350
6351  to
6352 \begin_inset Foot
6353 status collapsed
6354
6355 \begin_layout Plain Layout
6356 On Mac OSX you have to use 
6357 \begin_inset Flex Code
6358 status collapsed
6359
6360 \begin_layout Plain Layout
6361 DISPLAY=:0.0 xdvi -editor "lyxeditor.sh %f %l"
6362 \end_layout
6363
6364 \end_inset
6365
6366
6367 \end_layout
6368
6369 \end_inset
6370
6371  
6372 \begin_inset Flex Code
6373 status collapsed
6374
6375 \begin_layout Plain Layout
6376 xdvi -editor "lyxeditor.sh %f %l"
6377 \end_layout
6378
6379 \end_inset
6380
6381 , where 
6382 \begin_inset Flex Code
6383 status collapsed
6384
6385 \begin_layout Plain Layout
6386 lyxeditor.sh
6387 \end_layout
6388
6389 \end_inset
6390
6391  is a suitable script.
6392  For example, a minimal shell script is the following one:
6393 \end_layout
6394
6395 \begin_layout LyX-Code
6396 #!/bin/sh
6397 \begin_inset Newline newline
6398 \end_inset
6399
6400 LYXPIPE="/path/to/lyxpipe"
6401 \begin_inset Newline newline
6402 \end_inset
6403
6404 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6405 \begin_inset Newline newline
6406 \end_inset
6407
6408 echo "$COMMAND" > "${LYXPIPE}".in || exit
6409 \begin_inset Newline newline
6410 \end_inset
6411
6412 read TMP < "${LYXPIPE}".out || exit
6413 \end_layout
6414
6415 \begin_layout Standard
6416 where 
6417 \begin_inset Flex Code
6418 status collapsed
6419
6420 \begin_layout Plain Layout
6421 /path/to/lyxpipe
6422 \end_layout
6423
6424 \end_inset
6425
6426  is the Ly
6427 \begin_inset ERT
6428 status collapsed
6429
6430 \begin_layout Plain Layout
6431
6432 {}
6433 \end_layout
6434
6435 \end_inset
6436
6437 XServer pipe path specified in 
6438 \begin_inset Flex MenuItem
6439 status collapsed
6440
6441 \begin_layout Plain Layout
6442 Preferences\SpecialChar \menuseparator
6443 Paths
6444 \end_layout
6445
6446 \end_inset
6447
6448 .
6449 \begin_inset Foot
6450 status collapsed
6451
6452 \begin_layout Plain Layout
6453 In the 
6454 \begin_inset Flex Code
6455 status collapsed
6456
6457 \begin_layout Plain Layout
6458 development/tools
6459 \end_layout
6460
6461 \end_inset
6462
6463  folder of a source distribution you can find a 
6464 \begin_inset Flex Code
6465 status collapsed
6466
6467 \begin_layout Plain Layout
6468 lyxeditor
6469 \end_layout
6470
6471 \end_inset
6472
6473  script which is able to locate the 
6474 \emph on
6475 lyxpipe
6476 \emph default
6477  based on your preferences.
6478 \end_layout
6479
6480 \end_inset
6481
6482
6483 \end_layout
6484
6485 \begin_layout Subsubsection*
6486 MacDviX (Mac OSX)
6487 \end_layout
6488
6489 \begin_layout Standard
6490 At the end of 
6491 \begin_inset Flex Code
6492 status collapsed
6493
6494 \begin_layout Plain Layout
6495 /Applications/MacDviX_Folder/calleditor.script
6496 \end_layout
6497
6498 \end_inset
6499
6500 , add the following lines:
6501 \end_layout
6502
6503 \begin_layout LyX-Code
6504 /Applications/Ly
6505 \begin_inset ERT
6506 status collapsed
6507
6508 \begin_layout Plain Layout
6509
6510 {}
6511 \end_layout
6512
6513 \end_inset
6514
6515 X.app/Contents/MacOS/lyxeditor "$2" $1
6516 \begin_inset Newline newline
6517 \end_inset
6518
6519 exit 1
6520 \end_layout
6521
6522 \begin_layout Standard
6523 Modify the lines accordingly if you install LyX somewhere else than in the
6524  Applications folder.
6525 \end_layout
6526
6527 \begin_layout Standard
6528 Reverse search is triggered by Alt-click (OPTION-click).
6529 \end_layout
6530
6531 \begin_layout Subsubsection*
6532 Skim (Mac OSX)
6533 \end_layout
6534
6535 \begin_layout Standard
6536 Enter 
6537 \begin_inset Flex Code
6538 status collapsed
6539
6540 \begin_layout Plain Layout
6541 open -a Skim.app $$i
6542 \end_layout
6543
6544 \end_inset
6545
6546  to the viewer setting in 
6547 \begin_inset Flex MenuItem
6548 status collapsed
6549
6550 \begin_layout Plain Layout
6551 Preferences\SpecialChar \menuseparator
6552 File Handling\SpecialChar \menuseparator
6553 File formats\SpecialChar \menuseparator
6554 PDF (pdflatex)
6555 \end_layout
6556
6557 \end_inset
6558
6559 , and then in 
6560 \begin_inset Flex MenuItem
6561 status collapsed
6562
6563 \begin_layout Plain Layout
6564 Skim\SpecialChar \menuseparator
6565 Preferences\SpecialChar \menuseparator
6566 Sync
6567 \end_layout
6568
6569 \end_inset
6570
6571  choose 
6572 \begin_inset Flex MenuItem
6573 status collapsed
6574
6575 \begin_layout Plain Layout
6576 custom
6577 \end_layout
6578
6579 \end_inset
6580
6581  preset and enter command 
6582 \begin_inset Flex MenuItem
6583 status collapsed
6584
6585 \begin_layout Plain Layout
6586 /Applications/LyX.app/Contents/MacOS/lyxeditor
6587 \end_layout
6588
6589 \end_inset
6590
6591 .
6592 \end_layout
6593
6594 \begin_layout Standard
6595 Reverse search is triggered by COMMAND-SHIFT-click
6596 \end_layout
6597
6598 \begin_layout Subsubsection*
6599 Okular (KDE)
6600 \end_layout
6601
6602 \begin_layout Standard
6603 Go to 
6604 \begin_inset Flex MenuItem
6605 status collapsed
6606
6607 \begin_layout Plain Layout
6608 Settings\SpecialChar \menuseparator
6609 Configure Okular\SpecialChar \ldots{}
6610 \SpecialChar \menuseparator
6611 Editor
6612 \end_layout
6613
6614 \end_inset
6615
6616 , select 
6617 \begin_inset Quotes eld
6618 \end_inset
6619
6620 Custom Text Editor
6621 \begin_inset Quotes erd
6622 \end_inset
6623
6624  and add the command 
6625 \begin_inset Flex Code
6626 status collapsed
6627
6628 \begin_layout Plain Layout
6629 lyxclient -g %f %l
6630 \end_layout
6631
6632 \end_inset
6633
6634 .
6635 \end_layout
6636
6637 \begin_layout Standard
6638 Reverse search is triggered by SHIFT-click.
6639 \end_layout
6640
6641 \begin_layout Subsubsection*
6642 YAP (Windows)
6643 \end_layout
6644
6645 \begin_layout Standard
6646 Launch yap, choose its 
6647 \begin_inset Flex MenuItem
6648 status collapsed
6649
6650 \begin_layout Plain Layout
6651 View\SpecialChar \menuseparator
6652 Options
6653 \end_layout
6654
6655 \end_inset
6656
6657  menu and select the 
6658 \begin_inset Quotes eld
6659 \end_inset
6660
6661 Inverse DVI Search
6662 \begin_inset Quotes erd
6663 \end_inset
6664
6665  tab.
6666  Click on the 
6667 \begin_inset Quotes eld
6668 \end_inset
6669
6670 New\SpecialChar \ldots{}
6671
6672 \begin_inset Quotes erd
6673 \end_inset
6674
6675  button and, in the window that opens, enter 
6676 \begin_inset Quotes eld
6677 \end_inset
6678
6679 LyX Editor
6680 \begin_inset Quotes erd
6681 \end_inset
6682
6683  (or any other name you like) in the 
6684 \begin_inset Quotes eld
6685 \end_inset
6686
6687 Name:
6688 \begin_inset Quotes erd
6689 \end_inset
6690
6691  field.
6692  Now click on the button labeled 
6693 \begin_inset Quotes eld
6694 \end_inset
6695
6696 \SpecialChar \ldots{}
6697
6698 \begin_inset Quotes erd
6699 \end_inset
6700
6701  to open a file dialog and navigate to the directory containing the batch
6702  file 
6703 \begin_inset Flex Code
6704 status collapsed
6705
6706 \begin_layout Plain Layout
6707 lyxeditor.bat
6708 \end_layout
6709
6710 \end_inset
6711
6712  (see below).
6713  Select 
6714 \begin_inset Flex Code
6715 status collapsed
6716
6717 \begin_layout Plain Layout
6718 lyxeditor.bat
6719 \end_layout
6720
6721 \end_inset
6722
6723  and then specify the program arguments as 
6724 \begin_inset Flex Code
6725 status collapsed
6726
6727 \begin_layout Plain Layout
6728 %f %l
6729 \end_layout
6730
6731 \end_inset
6732
6733 .
6734  The 
6735 \begin_inset Flex Code
6736 status collapsed
6737
6738 \begin_layout Plain Layout
6739 lyxeditor.bat
6740 \end_layout
6741
6742 \end_inset
6743
6744  wrapper is used for communicating with LyX through the 
6745 \emph on
6746 lyxpipe
6747 \emph default
6748  and is as follows:
6749 \end_layout
6750
6751 \begin_layout LyX-Code
6752 @echo off
6753 \begin_inset Newline newline
6754 \end_inset
6755
6756 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6757 \backslash
6758
6759 \backslash
6760 .
6761 \backslash
6762 pipe
6763 \backslash
6764 lyxpipe.in
6765 \begin_inset Newline newline
6766 \end_inset
6767
6768 type 
6769 \backslash
6770
6771 \backslash
6772 .
6773 \backslash
6774 pipe
6775 \backslash
6776 lyxpipe.out
6777 \end_layout
6778
6779 \begin_layout Standard
6780 Make sure that the LyXServer pipe path you specified in LyX is 
6781 \begin_inset Flex Code
6782 status collapsed
6783
6784 \begin_layout Plain Layout
6785
6786 \backslash
6787
6788 \backslash
6789 .
6790 \backslash
6791 pipe
6792 \backslash
6793 lyxpipe
6794 \end_layout
6795
6796 \end_inset
6797
6798 , otherwise change the 
6799 \begin_inset Flex Code
6800 status collapsed
6801
6802 \begin_layout Plain Layout
6803 lyxeditor.bat
6804 \end_layout
6805
6806 \end_inset
6807
6808  wrapper accordingly.
6809 \end_layout
6810
6811 \begin_layout Standard
6812 In yap, reverse search is triggered by double-click.
6813 \end_layout
6814
6815 \begin_layout Subsubsection*
6816 SumatraPDF (Windows)
6817 \end_layout
6818
6819 \begin_layout Standard
6820 In order to use SumatraPDF for inverse search, enter 
6821 \begin_inset Flex Code
6822 status collapsed
6823
6824 \begin_layout Plain Layout
6825 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6826 \end_layout
6827
6828 \end_inset
6829
6830  in the viewer setting in 
6831 \begin_inset Flex MenuItem
6832 status collapsed
6833
6834 \begin_layout Plain Layout
6835 Preferences\SpecialChar \menuseparator
6836 File Handling\SpecialChar \menuseparator
6837 File formats\SpecialChar \menuseparator
6838 PDF (pdflatex)
6839 \end_layout
6840
6841 \end_inset
6842
6843 , where 
6844 \begin_inset Flex Code
6845 status collapsed
6846
6847 \begin_layout Plain Layout
6848 lyxeditor.bat
6849 \end_layout
6850
6851 \end_inset
6852
6853  is the previous wrapper.
6854  If SumatraPDF.exe is not in your command PATH, use its full file name.
6855 \end_layout
6856
6857 \begin_layout Standard
6858 Reverse search is triggered by double-click.
6859 \end_layout
6860
6861 \begin_layout Subsubsection*
6862 YAP (Cygwin)
6863 \end_layout
6864
6865 \begin_layout Standard
6866 First of all, make sure that yap is your default DVI viewer in the Windows
6867  environment, then launch it, choose its 
6868 \begin_inset Flex MenuItem
6869 status collapsed
6870
6871 \begin_layout Plain Layout
6872 View\SpecialChar \menuseparator
6873 Options
6874 \end_layout
6875
6876 \end_inset
6877
6878  menu and select the 
6879 \begin_inset Quotes eld
6880 \end_inset
6881
6882 Inverse DVI Search
6883 \begin_inset Quotes erd
6884 \end_inset
6885
6886  tab.
6887  Click on the 
6888 \begin_inset Quotes eld
6889 \end_inset
6890
6891 New\SpecialChar \ldots{}
6892
6893 \begin_inset Quotes erd
6894 \end_inset
6895
6896  button and, in the window that opens, enter 
6897 \begin_inset Quotes eld
6898 \end_inset
6899
6900 LyX Editor
6901 \begin_inset Quotes erd
6902 \end_inset
6903
6904  (or any other name you like) in the 
6905 \begin_inset Quotes eld
6906 \end_inset
6907
6908 Name:
6909 \begin_inset Quotes erd
6910 \end_inset
6911
6912  field.
6913  Now click on the button labeled 
6914 \begin_inset Quotes eld
6915 \end_inset
6916
6917 \SpecialChar \ldots{}
6918
6919 \begin_inset Quotes erd
6920 \end_inset
6921
6922  to open a file dialog and navigate to the directory containing the 
6923 \begin_inset Flex Code
6924 status collapsed
6925
6926 \begin_layout Plain Layout
6927 lyxeditor.exe
6928 \end_layout
6929
6930 \end_inset
6931
6932  program (which is installed by default on Cygwin along with the LyX executable).
6933  Select 
6934 \begin_inset Flex Code
6935 status collapsed
6936
6937 \begin_layout Plain Layout
6938 lyxeditor.exe
6939 \end_layout
6940
6941 \end_inset
6942
6943  and then specify the program arguments as 
6944 \begin_inset Flex Code
6945 status collapsed
6946
6947 \begin_layout Plain Layout
6948 -g %f %l
6949 \end_layout
6950
6951 \end_inset
6952
6953 .
6954  In this way, you will be using the 
6955 \emph on
6956 lyxsocket
6957 \emph default
6958  for communicating with LyX.
6959  If, for whatever reason, you want to use the 
6960 \emph on
6961 lyxpipe
6962 \emph default
6963 , omit the 
6964 \begin_inset Flex Code
6965 status collapsed
6966
6967 \begin_layout Plain Layout
6968 -g
6969 \end_layout
6970
6971 \end_inset
6972
6973  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6974 \end_layout
6975
6976 \begin_layout Standard
6977 In yap, reverse search is triggered by double-click.
6978 \end_layout
6979
6980 \begin_layout Subsubsection*
6981 SumatraPDF (Cygwin)
6982 \end_layout
6983
6984 \begin_layout Standard
6985 In order to use SumatraPDF for inverse search, enter 
6986 \begin_inset Flex Code
6987 status collapsed
6988
6989 \begin_layout Plain Layout
6990 SumatraPDF -inverse-search "lyxeditor -g %f %l"
6991 \end_layout
6992
6993 \end_inset
6994
6995  in the viewer setting in 
6996 \begin_inset Flex MenuItem
6997 status collapsed
6998
6999 \begin_layout Plain Layout
7000 Preferences\SpecialChar \menuseparator
7001 File Handling\SpecialChar \menuseparator
7002 File formats\SpecialChar \menuseparator
7003 PDF (pdflatex)
7004 \end_layout
7005
7006 \end_inset
7007
7008 .
7009  If SumatraPDF.exe is not in your command PATH, use its full posix path.
7010  The 
7011 \begin_inset Flex Code
7012 status collapsed
7013
7014 \begin_layout Plain Layout
7015 -g
7016 \end_layout
7017
7018 \end_inset
7019
7020  enables communication via the 
7021 \emph on
7022 lyxsocket
7023 \emph default
7024 .
7025  Again, omit the 
7026 \begin_inset Flex Code
7027 status collapsed
7028
7029 \begin_layout Plain Layout
7030 -g
7031 \end_layout
7032
7033 \end_inset
7034
7035  option if you want to use the 
7036 \emph on
7037 lyxpipe
7038 \emph default
7039 , and be sure to specify the LyXServer pipe path in the LyX preferences.
7040 \end_layout
7041
7042 \begin_layout Standard
7043 Reverse search is triggered by double-click.
7044 \end_layout
7045
7046 \begin_layout Section
7047 Forward search
7048 \end_layout
7049
7050 \begin_layout Standard
7051 Forward search is, as the name implies, in a sense the 
7052 \begin_inset Quotes eld
7053 \end_inset
7054
7055 opposite
7056 \begin_inset Quotes erd
7057 \end_inset
7058
7059  of reverse search.
7060  It allows you to let the viewer jump to a given position from within LyX.
7061  If forward search is set up (as described in what follows), you can put
7062  the cursor anywhere in your LyX document, and hit 
7063 \begin_inset Flex MenuItem
7064 status collapsed
7065
7066 \begin_layout Plain Layout
7067 Navigate\SpecialChar \menuseparator
7068 Forward search
7069 \end_layout
7070
7071 \end_inset
7072
7073  (or select 
7074 \begin_inset Flex MenuItem
7075 status collapsed
7076
7077 \begin_layout Plain Layout
7078 Forward search
7079 \end_layout
7080
7081 \end_inset
7082
7083  in the context menu via right mouse click), and then the viewer will jump
7084  to that position as well.
7085  This implies, of course, that your viewer supports this function.
7086 \end_layout
7087
7088 \begin_layout Standard
7089 To make forward search possible, you first need to provide the generated
7090  output PDF/DVI file with additional information about the TeX sources.
7091  This can be done via the methods described in the section 
7092 \begin_inset CommandInset ref
7093 LatexCommand ref
7094 reference "sub:rev-search"
7095
7096 \end_inset
7097
7098 .
7099 \end_layout
7100
7101 \begin_layout Standard
7102 Additionally, you need to configure LyX for using your viewers in 
7103 \begin_inset Flex MenuItem
7104 status collapsed
7105
7106 \begin_layout Plain Layout
7107 Tools\SpecialChar \menuseparator
7108 Preferences\SpecialChar \menuseparator
7109 Output\SpecialChar \menuseparator
7110 General
7111 \end_layout
7112
7113 \end_inset
7114
7115 .
7116  We provide a range of tested configurations for some viewers, which you
7117  can select from the drop down list.
7118  If none of these configurations suits you, you have to find out and enter
7119  a suitable configuration yourself.
7120  The definition syntax uses the following placeholders:
7121 \end_layout
7122
7123 \begin_layout Itemize
7124 \noindent
7125 \begin_inset Flex Code
7126 status collapsed
7127
7128 \begin_layout Plain Layout
7129 $$n
7130 \end_layout
7131
7132 \end_inset
7133
7134 : row number
7135 \end_layout
7136
7137 \begin_layout Itemize
7138 \noindent
7139 \begin_inset Flex Code
7140 status collapsed
7141
7142 \begin_layout Plain Layout
7143 $$t
7144 \end_layout
7145
7146 \end_inset
7147
7148 : name of the (temporary) exported .tex file (without path)
7149 \end_layout
7150
7151 \begin_layout Itemize
7152 \noindent
7153 \begin_inset Flex Code
7154 status collapsed
7155
7156 \begin_layout Plain Layout
7157 $$f
7158 \end_layout
7159
7160 \end_inset
7161
7162 : name of the (temporary) exported .tex file (including path)
7163 \end_layout
7164
7165 \begin_layout Itemize
7166 \noindent
7167 \begin_inset Flex Code
7168 status collapsed
7169
7170 \begin_layout Plain Layout
7171 $$o
7172 \end_layout
7173
7174 \end_inset
7175
7176 : name of the exported output file (either dvi or pdf, depending on which
7177  one exists in the temporary directory)
7178 \end_layout
7179
7180 \begin_layout Standard
7181 Note that only some of the viewers provide full forward search functionality,
7182  among them yap, xdvi, okular
7183 \begin_inset Foot
7184 status open
7185
7186 \begin_layout Plain Layout
7187 You might want to set 
7188 \begin_inset Flex Code
7189 status collapsed
7190
7191 \begin_layout Plain Layout
7192 okular --unique
7193 \end_layout
7194
7195 \end_inset
7196
7197  in 
7198 \begin_inset Flex MenuItem
7199 status collapsed
7200
7201 \begin_layout Plain Layout
7202 Tools\SpecialChar \menuseparator
7203 Preferences\SpecialChar \menuseparator
7204 File Handling\SpecialChar \menuseparator
7205 File
7206 \begin_inset space ~
7207 \end_inset
7208
7209 Formats
7210 \end_layout
7211
7212 \end_inset
7213
7214
7215 \end_layout
7216
7217 \end_inset
7218
7219  and Sumatra PDF
7220 \begin_inset Foot
7221 status collapsed
7222
7223 \begin_layout Plain Layout
7224 For Sumatra CMCDDE is needed --- downloadable from 
7225 \begin_inset CommandInset href
7226 LatexCommand href
7227 target "http://www.istri.fr/zip/CMCDDE.zip"
7228
7229 \end_inset
7230
7231
7232 \end_layout
7233
7234 \end_inset
7235
7236 .
7237  While many of the widespread PDF viewers (most notably Adobe Reader) do
7238  not support forward search at all, some other viewers -- e.
7239 \begin_inset space \thinspace{}
7240 \end_inset
7241
7242 g.
7243  evince and xpdf -- allow at least to reload the document and jump to a
7244  specific page of the file, so you can at least navigate 
7245 \begin_inset Quotes eld
7246 \end_inset
7247
7248 near
7249 \begin_inset Quotes erd
7250 \end_inset
7251
7252 .
7253  This latter functionality is provided by an external call of synctex (see
7254  the predefined example configurations).
7255  
7256 \end_layout
7257
7258 \begin_layout Standard
7259 Forward search works both with DVI and PDF output.
7260  LyX simply checks which preview format you have used before (i.
7261 \begin_inset space \thinspace{}
7262 \end_inset
7263
7264 e., which format is already there in the temporary directory) and chooses
7265  the appropriate configuration for the respective format.
7266 \end_layout
7267
7268 \begin_layout Chapter
7269 Special Document Classes
7270 \end_layout
7271
7272 \begin_layout Section
7273 A&A Paper
7274 \end_layout
7275
7276 \begin_layout Standard
7277 by 
7278 \noun on
7279 Peter Sütterlin
7280 \end_layout
7281
7282 \begin_layout Subsection
7283 Introduction
7284 \end_layout
7285
7286 \begin_layout Standard
7287 This section describes how LyX can be used to write articles for submission
7288  to the scientific journal 
7289 \emph on
7290 Astronomy and Astrophysics
7291 \emph default
7292  (www.edpsciences.fr/aa/ 
7293 \begin_inset Flex URL
7294 status collapsed
7295
7296 \begin_layout Plain Layout
7297
7298 http://www.edpsciences.fr/aa/
7299 \end_layout
7300
7301 \end_inset
7302
7303 ) using Version 5.01 of the document class 
7304 \family typewriter
7305 aa.cls
7306 \family default
7307 .
7308  This package can be downloaded from the ftp site
7309 \end_layout
7310
7311 \begin_layout Standard
7312 \begin_inset VSpace medskip
7313 \end_inset
7314
7315
7316 \end_layout
7317
7318 \begin_layout Standard
7319 \align center
7320 \begin_inset Flex URL
7321 status collapsed
7322
7323 \begin_layout Plain Layout
7324
7325 ftp://ftp.edpsciences.org/pub/aa/readme.html
7326 \end_layout
7327
7328 \end_inset
7329
7330
7331 \end_layout
7332
7333 \begin_layout Standard
7334 \begin_inset VSpace medskip
7335 \end_inset
7336
7337
7338 \end_layout
7339
7340 \begin_layout Standard
7341 A manual comes together with that package, and this text is not meant to
7342  replace the original manual but is merely a short guide in how to realize
7343  the correct form of your paper.
7344  
7345 \end_layout
7346
7347 \begin_layout Standard
7348 Please note that the publisher of the journal was changed from Springer
7349  to EDP Sciences starting January 1, 2001.
7350  That change involved also some slight changes to the style files, namely
7351  the removal of the thesaurus command.
7352  The LyX class aa supports the newest version of these style files, V 5.01.
7353  If you have an older version installed, please upgrade.
7354  For compatibility, the old (version 4) layout has been kept as 
7355 \family sans
7356 article (A&A V4)
7357 \family default
7358 .
7359  Please refer to the comments in 
7360 \family typewriter
7361 LyXDir/layouts/aapaper.layout
7362 \family default
7363 .
7364 \end_layout
7365
7366 \begin_layout Subsection
7367 Getting started
7368 \end_layout
7369
7370 \begin_layout Standard
7371 It is recommended you start from the example template distributed with LyX.
7372  If you are not using a template, note the following settings:
7373 \end_layout
7374
7375 \begin_layout Itemize
7376 Select 
7377 \family sans
7378 article (A&A)
7379 \family default
7380  in the 
7381 \family sans
7382 Document\SpecialChar \menuseparator
7383 Settings
7384 \family default
7385  dialog (OK, that one was obvious).
7386 \end_layout
7387
7388 \begin_layout Itemize
7389 Don't change the option 
7390 \family sans
7391 Page
7392 \begin_inset space ~
7393 \end_inset
7394
7395 style
7396 \family default
7397 : Leave it set to 
7398 \family sans
7399 default
7400 \family default
7401 .
7402  The whole layout is done by the macros, you shouldn't change anything.
7403 \end_layout
7404
7405 \begin_layout Subsection
7406 The header block
7407 \end_layout
7408
7409 \begin_layout Standard
7410 First thing to enter is the header information.
7411  It consists of seven entries, of which some are optional.
7412  They are
7413 \end_layout
7414
7415 \begin_layout Itemize
7416
7417 \family sans
7418 Title
7419 \family default
7420 : [required] 
7421 \end_layout
7422
7423 \begin_layout Itemize
7424
7425 \family sans
7426 Subtitle
7427 \family default
7428 : [optional] 
7429 \end_layout
7430
7431 \begin_layout Itemize
7432
7433 \family sans
7434 Author
7435 \family default
7436 : [required]
7437 \end_layout
7438
7439 \begin_layout Itemize
7440
7441 \family sans
7442 Address
7443 \family default
7444 : [required]
7445 \end_layout
7446
7447 \begin_layout Itemize
7448
7449 \family sans
7450 Offprints
7451 \family default
7452 : [optional] if more than one author: whom to contact for offprint requests.
7453 \end_layout
7454
7455 \begin_layout Itemize
7456
7457 \family sans
7458 Mail
7459 \family default
7460 : [optional] mail address for contacts.
7461 \end_layout
7462
7463 \begin_layout Itemize
7464
7465 \family sans
7466 Date
7467 \family default
7468 : [required].
7469  Suggested format is 
7470 \family typewriter
7471 Received: <date>; Accepted <date> 
7472 \end_layout
7473
7474 \begin_layout Standard
7475 There is no need to issue the 
7476 \family typewriter
7477
7478 \backslash
7479 maketitle
7480 \family default
7481  command, this is done automatically by LyX when the header is finished.
7482  Although the order of the single header entries doesn't matter it is advised
7483  to keep the above sequence, just to get the best optics and meets the layout
7484  of the real document.
7485 \end_layout
7486
7487 \begin_layout Standard
7488 If you want to place footnotes in the header block, e.
7489 \begin_inset space \thinspace{}
7490 \end_inset
7491
7492 g.
7493 \begin_inset space \space{}
7494 \end_inset
7495
7496 to state your present address, just use the standard footnote via the menu
7497  
7498 \family sans
7499 Insert\SpecialChar \menuseparator
7500 Footnote.
7501
7502 \family default
7503  LyX will automagically use the term 
7504 \family typewriter
7505
7506 \backslash
7507 thanks{}
7508 \family default
7509  in that case.
7510 \end_layout
7511
7512 \begin_layout Standard
7513 In addition to these topics, the macros use three additional LaTeX commands
7514  that have no counterpart in LyX:
7515 \end_layout
7516
7517 \begin_layout Itemize
7518
7519 \family typewriter
7520
7521 \backslash
7522 and
7523 \family default
7524  to separate different names for more than one author and institute, respectivel
7525 y.
7526 \end_layout
7527
7528 \begin_layout Itemize
7529
7530 \family typewriter
7531
7532 \backslash
7533 inst{<nr>}
7534 \family default
7535 to mark corresponding author/institute pairs.
7536  The institutes are numbered sequentially as they appear in the 
7537 \family sans
7538 Address
7539 \family default
7540  field, so you have to put a marker to each author.
7541 \end_layout
7542
7543 \begin_layout Itemize
7544
7545 \family typewriter
7546
7547 \backslash
7548 email{address}
7549 \family default
7550  to supply an email address for fast contact.
7551 \end_layout
7552
7553 \begin_layout Standard
7554 In all cases, the appropriate command has to be entered in LyX and marked
7555  as LaTeX code.
7556  See the examples.
7557  
7558 \end_layout
7559
7560 \begin_layout Subsection
7561 The abstract
7562 \end_layout
7563
7564 \begin_layout Standard
7565 The abstract should immediately follow the header block.
7566  With version 5 the abstract environment was changed to a command, and there
7567  is now a resctriction to only one paragraph.
7568  In addition, it should contain an entry with the keywords.
7569  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7570  command 
7571 \family typewriter
7572
7573 \backslash
7574 keywords{}
7575 \family default
7576  by hand and mark it as LaTeX code.
7577  Refer to the example paper.
7578 \end_layout
7579
7580 \begin_layout Subsection
7581 Supported environments
7582 \end_layout
7583
7584 \begin_layout Standard
7585 The A&A paper layout supports the following environments for structuring
7586  your text:
7587 \end_layout
7588
7589 \begin_layout Itemize
7590
7591 \family sans
7592 Standard
7593 \end_layout
7594
7595 \begin_layout Itemize
7596
7597 \family sans
7598 Section
7599 \end_layout
7600
7601 \begin_layout Itemize
7602
7603 \family sans
7604 Subsection
7605 \end_layout
7606
7607 \begin_layout Itemize
7608
7609 \family sans
7610 Subsubsection
7611 \end_layout
7612
7613 \begin_layout Itemize
7614
7615 \family sans
7616 Itemize
7617 \end_layout
7618
7619 \begin_layout Itemize
7620
7621 \family sans
7622 Enumerate
7623 \end_layout
7624
7625 \begin_layout Itemize
7626
7627 \family sans
7628 Description
7629 \end_layout
7630
7631 \begin_layout Itemize
7632
7633 \family sans
7634 Caption
7635 \end_layout
7636
7637 \begin_layout Itemize
7638
7639 \family sans
7640 Abstract
7641 \end_layout
7642
7643 \begin_layout Itemize
7644
7645 \family sans
7646 Acknowledgment
7647 \end_layout
7648
7649 \begin_layout Itemize
7650
7651 \family sans
7652 Bibliography
7653 \end_layout
7654
7655 \begin_layout Itemize
7656
7657 \family sans
7658 LaTeX
7659 \end_layout
7660
7661 \begin_layout Subsection
7662 Commands not supported by LyX
7663 \end_layout
7664
7665 \begin_layout Standard
7666 Some commands are not yet supported by the 
7667 \family sans
7668 paper (A&A)
7669 \family default
7670  layout for LyX.
7671  Some have already been mentioned.
7672  For the sake of completeness, they are listed all together here:
7673 \end_layout
7674
7675 \begin_layout Itemize
7676
7677 \family typewriter
7678
7679 \backslash
7680 and
7681 \end_layout
7682
7683 \begin_layout Itemize
7684
7685 \family typewriter
7686
7687 \backslash
7688 email
7689 \end_layout
7690
7691 \begin_layout Itemize
7692
7693 \family typewriter
7694
7695 \backslash
7696 appendix
7697 \end_layout
7698
7699 \begin_layout Itemize
7700
7701 \family typewriter
7702
7703 \backslash
7704 authorrunning
7705 \end_layout
7706
7707 \begin_layout Itemize
7708
7709 \family typewriter
7710
7711 \backslash
7712 inst{}
7713 \end_layout
7714
7715 \begin_layout Itemize
7716
7717 \family typewriter
7718
7719 \backslash
7720 keywords{}
7721 \end_layout
7722
7723 \begin_layout Itemize
7724
7725 \family typewriter
7726
7727 \backslash
7728 object{}
7729 \end_layout
7730
7731 \begin_layout Itemize
7732
7733 \family typewriter
7734
7735 \backslash
7736 titlerunning{}
7737 \end_layout
7738
7739 \begin_layout Standard
7740 If you want to use any of these commands, you have to enter them yourself.
7741  
7742 \series bold
7743 Do not forget to mark them as LaTeX code!
7744 \end_layout
7745
7746 \begin_layout Subsection
7747 Figure and Table Floats
7748 \end_layout
7749
7750 \begin_layout Standard
7751 LyX provides support for the necessary float environments 
7752 \family sans
7753 figure, figure*, table
7754 \family default
7755  and 
7756 \family sans
7757 table*
7758 \family default
7759 , therefore we won't tell much about it here.
7760  Refer to the 
7761 \emph on
7762 User's
7763 \begin_inset space ~
7764 \end_inset
7765
7766 Guide
7767 \emph default
7768 .
7769  Just remember that tables should be left-aligned.
7770  For that, select the table and change the alignment in 
7771 \family sans
7772 Edit\SpecialChar \menuseparator
7773 Paragraph
7774 \begin_inset space ~
7775 \end_inset
7776
7777 Settings.
7778 \end_layout
7779
7780 \begin_layout Standard
7781 There is only one special thing: the figures with caption besides the figure.
7782  To create such a figure, you have to do the following:
7783 \end_layout
7784
7785 \begin_layout Enumerate
7786 Create a wide figure float: 
7787 \family sans
7788 Insert\SpecialChar \menuseparator
7789 Float\SpecialChar \menuseparator
7790 Figure
7791 \family default
7792 , then right click in the figure and select 
7793 \family sans
7794 \bar under
7795 S
7796 \bar default
7797 pan
7798 \begin_inset space ~
7799 \end_inset
7800
7801 columns
7802 \family default
7803 .
7804 \end_layout
7805
7806 \begin_layout Enumerate
7807 Enter your caption text.
7808 \end_layout
7809
7810 \begin_layout Enumerate
7811 Press 
7812 \family sans
7813 Return
7814 \family default
7815  to move the cursor above the caption.
7816 \end_layout
7817
7818 \begin_layout Enumerate
7819 Insert your figure
7820 \end_layout
7821
7822 \begin_layout Enumerate
7823 Position the cursor behind the figure and insert a horizontal fill: 
7824 \family sans
7825 Insert\SpecialChar \menuseparator
7826 Special
7827 \begin_inset space ~
7828 \end_inset
7829
7830 Character\SpecialChar \menuseparator
7831 Horizontal
7832 \begin_inset space ~
7833 \end_inset
7834
7835 Fill
7836 \family default
7837 .
7838 \end_layout
7839
7840 \begin_layout Enumerate
7841 Switch to LaTeX mode: 
7842 \family sans
7843 M-c
7844 \begin_inset space ~
7845 \end_inset
7846
7847 t
7848 \family default
7849 .
7850 \end_layout
7851
7852 \begin_layout Enumerate
7853 Enter 
7854 \family typewriter
7855
7856 \backslash
7857 parbox[b]{55mm}{
7858 \family default
7859 .
7860  
7861 \series bold
7862 Do not close the brace!
7863 \end_layout
7864
7865 \begin_layout Enumerate
7866 Position the cursor behind the caption text, switch to LaTeX mode and insert
7867  the closing brace: 
7868 \family sans
7869 M-c
7870 \begin_inset space ~
7871 \end_inset
7872
7873 t
7874 \family default
7875  
7876 \family typewriter
7877 }
7878 \family default
7879 .
7880 \end_layout
7881
7882 \begin_layout Standard
7883 Also, refer to the figures in the example paper.
7884 \end_layout
7885
7886 \begin_layout Subsection
7887 Referee layout
7888 \end_layout
7889
7890 \begin_layout Standard
7891 For submission, the paper has to be formated in a special double-spacing
7892  layout.
7893  For this purpose, you have to give the option 
7894 \family typewriter
7895 referee
7896 \family default
7897  to the documentclass.
7898  This must be done using the extra class options field in the 
7899 \family sans
7900 Document\SpecialChar \menuseparator
7901 Settings
7902 \family default
7903  dialog.
7904  Just enter the string 
7905 \family typewriter
7906 referee
7907 \family default
7908  there.
7909 \end_layout
7910
7911 \begin_layout Subsection
7912 The example paper
7913 \end_layout
7914
7915 \begin_layout Standard
7916 The 
7917 \family sans
7918 Examples
7919 \family default
7920  directory contains an example paper written with LyX.
7921  It is the example paper from the original macro package, translated to
7922  LyX.
7923  Use it for inspiration, and compare the original LaTeX code with LyX way
7924  of writing.
7925 \end_layout
7926
7927 \begin_layout Section
7928 AASTeX
7929 \end_layout
7930
7931 \begin_layout Standard
7932 by 
7933 \noun on
7934 Mike Ressler
7935 \end_layout
7936
7937 \begin_layout Subsection
7938 Introduction
7939 \end_layout
7940
7941 \begin_layout Standard
7942 AASTeX is a set of macros produced by the American Astronomical Society
7943  to facilitate electronic manuscript submission to the three journals they
7944  publish: the Astrophysical Journal (including the Letters and Supplement),
7945  the Astronomical Journal, and the Publications of the Astronomical Society
7946  of the Pacific.
7947  LyX has proven to be an excellent tool for generating these documents,
7948  especially given its equation, citation, and figure handling capabilities.
7949  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7950  is the version described here, or higher.
7951  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7952  incompatible with LyX.
7953  The AASTeX package may be downloaded from the AASTeX Web site
7954 \end_layout
7955
7956 \begin_layout Standard
7957 \begin_inset VSpace medskip
7958 \end_inset
7959
7960
7961 \end_layout
7962
7963 \begin_layout Standard
7964 \align center
7965 \begin_inset Flex URL
7966 status collapsed
7967
7968 \begin_layout Plain Layout
7969
7970 http://www.journals.uchicago.edu/AAS/AASTeX
7971 \end_layout
7972
7973 \end_inset
7974
7975
7976 \end_layout
7977
7978 \begin_layout Standard
7979 \begin_inset VSpace medskip
7980 \end_inset
7981
7982
7983 \end_layout
7984
7985 \begin_layout Standard
7986 A complete user guide is contained in that package and you should familiarize
7987  yourself with it thoroughly before embarking on writing a paper in LyX.
7988  LyX will not reduce the need to figure out all the AASTeX commands, it
7989  will only reduce the drudgery of typing everything in.
7990  It is your responsibility to ensure that the final exported LaTeX document
7991  conforms completely to the requirements of the journal to which you are
7992  submitting your paper.
7993 \end_layout
7994
7995 \begin_layout Subsection
7996 Starting a New Paper
7997 \end_layout
7998
7999 \begin_layout Standard
8000 I strongly suggest that you start with the AASTeX template file.
8001  Click on 
8002 \family sans
8003 File\SpecialChar \menuseparator
8004 New from
8005 \family default
8006  
8007 \family sans
8008 Template
8009 \family default
8010 , enter the new file name, then choose the 
8011 \family typewriter
8012 aastex.lyx
8013 \family default
8014  template.
8015  This will show the most common fields found in a manuscript.
8016  Simply overwrite the existing text (including the brackets, 
8017 \family typewriter
8018 <>
8019 \family default
8020 ) with the correct information.
8021  Many of the AASTeX commands and environments can be implemented directly
8022  in LyX, but some cannot: most noticeably 
8023 \family typewriter
8024
8025 \backslash
8026 altaffilmark
8027 \family default
8028  and 
8029 \family typewriter
8030
8031 \backslash
8032 altaffiltext
8033 \family default
8034 , which should stick out like a sore thumb if you actually just opened the
8035  template file.
8036  For commands such as these, the LaTeX code must be entered directly and
8037  marked as such.
8038  Such commands are referred to as TeX code, or Evil Red Text.
8039  I tried to minimize the amount of TeX code needed in an AASTeX document,
8040  but there is still a bit more required than any of us would like.
8041 \end_layout
8042
8043 \begin_layout Subsection
8044 Finishing Your Paper
8045 \end_layout
8046
8047 \begin_layout Standard
8048 When the paper is finished to your satisfaction and previews/prints correctly,
8049  there are a few 
8050 \begin_inset Quotes eld
8051 \end_inset
8052
8053 postprocessing
8054 \begin_inset Quotes erd
8055 \end_inset
8056
8057  actions which need to be done before you submit it to the journals.
8058  
8059 \end_layout
8060
8061 \begin_layout Enumerate
8062 Export your paper as a LaTeX file (
8063 \family sans
8064 File\SpecialChar \menuseparator
8065 Export\SpecialChar \menuseparator
8066 LaTeX
8067 \family default
8068 ).
8069  
8070 \end_layout
8071
8072 \begin_layout Enumerate
8073 Edit the resulting 
8074 \family typewriter
8075 .tex
8076 \family default
8077  file with your favorite text editor
8078 \end_layout
8079
8080 \begin_deeper
8081 \begin_layout Enumerate
8082 remove the comment lines before the 
8083 \family typewriter
8084
8085 \backslash
8086 documentclass
8087 \family default
8088  command
8089 \end_layout
8090
8091 \begin_layout Enumerate
8092 remove the 
8093 \family typewriter
8094
8095 \backslash
8096 usepackage...{fontenc}
8097 \family default
8098  line if it appears (usually just after 
8099 \family typewriter
8100
8101 \backslash
8102 documentclass
8103 \family default
8104 }; also remove the 
8105 \family typewriter
8106
8107 \backslash
8108 secnumdepth
8109 \family default
8110  line if it appears.
8111 \end_layout
8112
8113 \begin_layout Enumerate
8114 remove everything between (and including) the 
8115 \family typewriter
8116
8117 \backslash
8118 makeatletter
8119 \family default
8120  and 
8121 \family typewriter
8122
8123 \backslash
8124 makeatother
8125 \family default
8126  commands, except for any commands you specifically put into the LaTeX preamble
8127  (which should appear immediately after the 
8128 \begin_inset Quotes eld
8129 \end_inset
8130
8131 User specified LaTeX commands
8132 \begin_inset Quotes erd
8133 \end_inset
8134
8135  comment in the 
8136 \family typewriter
8137 .tex
8138 \family default
8139  file).
8140 \end_layout
8141
8142 \end_deeper
8143 \begin_layout Enumerate
8144 Run the resulting file through LaTeX to make sure it still processes correctly.
8145 \end_layout
8146
8147 \begin_layout Enumerate
8148 Reread the journal requirements to make sure your filenames and formats
8149  are correct.
8150 \end_layout
8151
8152 \begin_layout Enumerate
8153 Submit it.
8154 \end_layout
8155
8156 \begin_layout Subsection
8157 Comments On Specific Commands
8158 \end_layout
8159
8160 \begin_layout Standard
8161 I will not describe the detailed usage of the individual AASTeX commands:
8162  the AASTeX User Guide (
8163 \family typewriter
8164 aasguide.tex
8165 \family default
8166 ) gives a good description of each.
8167  Thus it's probably easiest for me to go down the list as found in the guide
8168  and offer comments where necessary.
8169  So let's begin \SpecialChar \ldots{}
8170
8171 \end_layout
8172
8173 \begin_layout Subsubsection
8174 Things that work as expected
8175 \end_layout
8176
8177 \begin_layout Standard
8178 Because they work as you might expect, I simply list them and the section
8179  they are found in: 
8180 \family typewriter
8181
8182 \backslash
8183 documentclass
8184 \family default
8185  (2.1.1), 
8186 \family typewriter
8187
8188 \backslash
8189 begin{document}
8190 \family default
8191  (2.2), 
8192 \family typewriter
8193
8194 \backslash
8195 title
8196 \family default
8197  (2.3), 
8198 \family typewriter
8199
8200 \backslash
8201 author
8202 \family default
8203  (2.3), 
8204 \family typewriter
8205
8206 \backslash
8207 affil
8208 \family default
8209  (2.3), 
8210 \family typewriter
8211
8212 \backslash
8213 abstract
8214 \family default
8215  (2.4), 
8216 \family typewriter
8217
8218 \backslash
8219 keywords
8220 \family default
8221  (2.5), 
8222 \family typewriter
8223
8224 \backslash
8225 section
8226 \family default
8227  (2.7), 
8228 \family typewriter
8229
8230 \backslash
8231 subsection
8232 \family default
8233  (2.7), 
8234 \family typewriter
8235
8236 \backslash
8237 subsubsection
8238 \family default
8239  (2.7), 
8240 \family typewriter
8241
8242 \backslash
8243 paragraph
8244 \family default
8245  (2.7), 
8246 \family typewriter
8247
8248 \backslash
8249 facility
8250 \family default
8251  (2.10), 
8252 \family typewriter
8253
8254 \backslash
8255 begin{displaymath}
8256 \family default
8257  (2.12), 
8258 \family typewriter
8259
8260 \backslash
8261 begin{equation}
8262 \family default
8263  (2.12), 
8264 \family typewriter
8265
8266 \backslash
8267 begin{eqnarray}
8268 \family default
8269  (2.12), 
8270 \family typewriter
8271
8272 \backslash
8273 begin{mathletters}
8274 \family default
8275  (2.12), 
8276 \family typewriter
8277
8278 \backslash
8279 begin{thebibliography}
8280 \family default
8281  (2.13.1), 
8282 \family typewriter
8283
8284 \backslash
8285 bibitem
8286 \family default
8287  (2.13.2), all the cite commands and their variations (2.13.2), the generic
8288  graphicx figure commands (2.14.1), 
8289 \family typewriter
8290
8291 \backslash
8292 begin{table}
8293 \family default
8294  (2.15.4), 
8295 \family typewriter
8296
8297 \backslash
8298 begin{tabular}
8299 \family default
8300  (2.15.4), 
8301 \family typewriter
8302
8303 \backslash
8304 caption
8305 \family default
8306  (2.15.4), 
8307 \family typewriter
8308
8309 \backslash
8310 label
8311 \family default
8312  (2.15.4, amongst other places), 
8313 \family typewriter
8314
8315 \backslash
8316 tablerefs
8317 \family default
8318  (2.15.5), 
8319 \family typewriter
8320
8321 \backslash
8322 tablecomments
8323 \family default
8324  (2.15.5), 
8325 \family typewriter
8326
8327 \backslash
8328 url
8329 \family default
8330  (2.17.4), 
8331 \family typewriter
8332
8333 \backslash
8334 end{document}
8335 \family default
8336  (2.18).
8337 \end_layout
8338
8339 \begin_layout Standard
8340 The following style options also work correctly: 
8341 \family typewriter
8342 longabstract
8343 \family default
8344  (2.4), 
8345 \family typewriter
8346 preprint
8347 \family default
8348  (3.2.1), 
8349 \family typewriter
8350 preprint2
8351 \family default
8352  (3.2.2), 
8353 \family typewriter
8354 eqsecnum
8355 \family default
8356  (3.3), 
8357 \family typewriter
8358 flushrt
8359 \family default
8360  (3.4).
8361  Simply put them in the 
8362 \family sans
8363 Options
8364 \family default
8365  box in 
8366 \family sans
8367 Layout\SpecialChar \menuseparator
8368 Document
8369 \family default
8370 .
8371 \end_layout
8372
8373 \begin_layout Subsubsection
8374 Things that work, but require more comment
8375 \end_layout
8376
8377 \begin_layout Standard
8378 The following items work, but require a little more discussion:
8379 \end_layout
8380
8381 \begin_layout Itemize
8382 These items are reserved for use by the journal editors, but you can put
8383  them into the LaTeX preamble if you feel compelled to do so: 
8384 \family typewriter
8385
8386 \backslash
8387 received
8388 \family default
8389
8390 \family typewriter
8391
8392 \backslash
8393 revised
8394 \family default
8395
8396 \family typewriter
8397
8398 \backslash
8399 accepted
8400 \family default
8401
8402 \family typewriter
8403
8404 \backslash
8405 ccc
8406 \family default
8407
8408 \family typewriter
8409
8410 \backslash
8411 cpright
8412 \family default
8413  (all from 2.1.3)
8414 \end_layout
8415
8416 \begin_layout Itemize
8417 These items may be placed in the LaTeX preamble, and are included as blanks
8418  in the template file: 
8419 \family typewriter
8420
8421 \backslash
8422 slugcomment
8423 \family default
8424  (2.1.4), 
8425 \family typewriter
8426
8427 \backslash
8428 shorttitle
8429 \family default
8430  (2.1.5), 
8431 \family typewriter
8432
8433 \backslash
8434 shortauthors
8435 \family default
8436  (2.1.5)
8437 \end_layout
8438
8439 \begin_layout Itemize
8440
8441 \family typewriter
8442
8443 \backslash
8444 email
8445 \family default
8446  (2.3) – can only be used 
8447 \begin_inset Quotes eld
8448 \end_inset
8449
8450 standalone
8451 \begin_inset Quotes erd
8452 \end_inset
8453
8454 , not in the middle of a paragraph.
8455  Use TeX code if you need to embed it.
8456 \end_layout
8457
8458 \begin_layout Itemize
8459
8460 \family typewriter
8461
8462 \backslash
8463 and
8464 \family default
8465  (2.3) – will have extra {} after it.
8466  This should not cause an error.
8467 \end_layout
8468
8469 \begin_layout Itemize
8470
8471 \family typewriter
8472
8473 \backslash
8474 notetoeditor
8475 \family default
8476  (2.6) – can only be used 
8477 \begin_inset Quotes eld
8478 \end_inset
8479
8480 standalone
8481 \begin_inset Quotes erd
8482 \end_inset
8483
8484 , not in the middle of a paragraph.
8485  Use TeX code if you need to embed it.
8486 \end_layout
8487
8488 \begin_layout Itemize
8489
8490 \family typewriter
8491
8492 \backslash
8493 placetable
8494 \family default
8495  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8496  hand
8497 \end_layout
8498
8499 \begin_layout Itemize
8500
8501 \family typewriter
8502
8503 \backslash
8504 placefigure
8505 \family default
8506  (2.8) – same as for 
8507 \family typewriter
8508
8509 \backslash
8510 placetable
8511 \end_layout
8512
8513 \begin_layout Itemize
8514
8515 \family typewriter
8516
8517 \backslash
8518 acknowledgements
8519 \family default
8520  (2.9) – will have extra {} after it.
8521  This should not cause an error.
8522 \end_layout
8523
8524 \begin_layout Itemize
8525
8526 \family typewriter
8527
8528 \backslash
8529 appendix
8530 \family default
8531  (2.11) – will have extra {} after it.
8532  This should not cause an error.
8533 \end_layout
8534
8535 \begin_layout Itemize
8536
8537 \family typewriter
8538
8539 \backslash
8540 figcaption
8541 \family default
8542  (2.14.2) – you can insert an optional filename argument by placing the cursor
8543  at the beginning of the text and selecting 
8544 \family sans
8545 Insert\SpecialChar \menuseparator
8546 Short Title
8547 \family default
8548 .
8549  
8550 \begin_inset Quotes eld
8551 \end_inset
8552
8553 Short Title
8554 \begin_inset Quotes erd
8555 \end_inset
8556
8557  inserts an optional argument of the type needed by 
8558 \family typewriter
8559
8560 \backslash
8561 figcaption
8562 \family default
8563 .
8564  Hopefully it will be renamed someday.
8565 \end_layout
8566
8567 \begin_layout Itemize
8568
8569 \family typewriter
8570
8571 \backslash
8572 objectname
8573 \family default
8574  (2.17.1) – same as 
8575 \family typewriter
8576
8577 \backslash
8578 figcaption
8579 \family default
8580  for the catalog ID optional parameter
8581 \end_layout
8582
8583 \begin_layout Itemize
8584
8585 \family typewriter
8586
8587 \backslash
8588 dataset
8589 \family default
8590  (2.17.1) – same as 
8591 \family typewriter
8592
8593 \backslash
8594 figcaption
8595 \family default
8596  for the catalog ID optional parameter
8597 \end_layout
8598
8599 \begin_layout Subsubsection
8600 Things not implemented, use TeX code
8601 \end_layout
8602
8603 \begin_layout Standard
8604
8605 \family typewriter
8606
8607 \backslash
8608 altaffilmark
8609 \family default
8610  (2.3), 
8611 \family typewriter
8612
8613 \backslash
8614 altaffiltext
8615 \family default
8616  (2.3), 
8617 \family typewriter
8618
8619 \backslash
8620 eqnum
8621 \family default
8622  (2.12), 
8623 \family typewriter
8624
8625 \backslash
8626 setcounter{equation}
8627 \family default
8628  (2.12), Journal name abbreviations (2.13.4), 
8629 \family typewriter
8630
8631 \backslash
8632 figurenum
8633 \family default
8634  (2.14.1), 
8635 \family typewriter
8636
8637 \backslash
8638 epsscale
8639 \family default
8640  (2.14.1), 
8641 \family typewriter
8642
8643 \backslash
8644 plotone
8645 \family default
8646  (2.14.1), 
8647 \family typewriter
8648
8649 \backslash
8650 plottwo
8651 \family default
8652  (2.14.1), 
8653 \family typewriter
8654
8655 \backslash
8656 tablenum
8657 \family default
8658  (2.15.4), 
8659 \family typewriter
8660
8661 \backslash
8662 tableline
8663 \family default
8664  (2.15.4, insert it as the first element in the lefthand cell after where
8665  you want it.
8666  Don't use any of LyX's rules in the table), 
8667 \family typewriter
8668
8669 \backslash
8670 tablenotemark
8671 \family default
8672  (2.15.5), 
8673 \family typewriter
8674
8675 \backslash
8676 tablenotetext
8677 \family default
8678  (2.15.5), much of Misc (2.17, except 
8679 \family typewriter
8680
8681 \backslash
8682 objectname
8683 \family default
8684
8685 \family typewriter
8686
8687 \backslash
8688 dataset
8689 \family default
8690
8691 \family typewriter
8692
8693 \backslash
8694 url
8695 \family default
8696 , and 
8697 \family typewriter
8698
8699 \backslash
8700 email
8701 \family default
8702 ; see above), 
8703 \family typewriter
8704
8705 \backslash
8706 singlespace
8707 \family default
8708  (3.1), 
8709 \family typewriter
8710
8711 \backslash
8712 doublespace
8713 \family default
8714  (3.1), 
8715 \family typewriter
8716
8717 \backslash
8718 onecolumn
8719 \family default
8720  (3.2), 
8721 \family typewriter
8722
8723 \backslash
8724 twocolumn
8725 \family default
8726  (3.2)
8727 \end_layout
8728
8729 \begin_layout Subsubsection
8730 Things that cannot be implemented
8731 \end_layout
8732
8733 \begin_layout Standard
8734 \SpecialChar \ldots{}
8735  at least in any meaningful sort of way, so I suggest ignoring them.
8736  They are the references environment (2.13.3), and the deluxetable environment
8737  (2.15).
8738  If you really, really need to use deluxetable, I suggest editing it in
8739  a separate file with a text editor, then using 
8740 \family sans
8741 Insert\SpecialChar \menuseparator
8742 Child
8743 \begin_inset space ~
8744 \end_inset
8745
8746 Document
8747 \family default
8748  to include it in your LyX document.
8749  See the 
8750 \family typewriter
8751 aas_sample.lyx
8752 \family default
8753  file to see an example of this.
8754 \end_layout
8755
8756 \begin_layout Subsection
8757 FAQs, Tips, Tricks, and Other Ruminations
8758 \end_layout
8759
8760 \begin_layout Subsubsection
8761 Getting LyX and AASTeX to cooperate
8762 \end_layout
8763
8764 \begin_layout Standard
8765 It can be a bit tricky to get LyX to recognize a new layout and document
8766  class.
8767  When all else fails, do this:
8768 \end_layout
8769
8770 \begin_layout Enumerate
8771 Make certain that LaTeX can find AASTeX.
8772  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8773  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8774 \family typewriter
8775 sample.tex
8776 \family default
8777 .
8778 \end_layout
8779
8780 \begin_layout Enumerate
8781 Make certain that 
8782 \family typewriter
8783 aastex.layout
8784 \family default
8785  appears in LyX's 
8786 \family typewriter
8787 layouts
8788 \family default
8789  folder
8790 \end_layout
8791
8792 \begin_layout Enumerate
8793 Rerun 
8794 \family sans
8795 Tools\SpecialChar \menuseparator
8796 Reconfigure
8797 \family default
8798  in LyX, then restart LyX.
8799 \end_layout
8800
8801 \begin_layout Enumerate
8802 Open a regular new file, not from a template.
8803  Does AASTeX appear in the class list in 
8804 \family sans
8805 Document\SpecialChar \menuseparator
8806 Settings
8807 \family default
8808 ?
8809 \end_layout
8810
8811 \begin_layout Standard
8812 If you get a warning from an existing AASTeX document about not being able
8813  to find the AASTeX layout or a message about 
8814 \begin_inset Quotes eld
8815 \end_inset
8816
8817 You should not mix title layouts with normal ones
8818 \begin_inset Quotes erd
8819 \end_inset
8820
8821 , things haven't been installed correctly.
8822 \end_layout
8823
8824 \begin_layout Subsubsection
8825 LaTeX error processing a table 
8826 \end_layout
8827
8828 \begin_layout Standard
8829 LyX, by default, attempts to center the table caption/title.
8830  This seems to produce a bad interaction in AASTeX so you should click somewhere
8831  in the caption/title, then select 
8832 \family sans
8833 Edit\SpecialChar \menuseparator
8834 Paragraph
8835 \begin_inset space ~
8836 \end_inset
8837
8838 Settings
8839 \family default
8840 , then set the 
8841 \family sans
8842 Alignment
8843 \family default
8844  to 
8845 \family sans
8846 Block
8847 \family default
8848 .
8849  This took care of it for me.
8850 \end_layout
8851
8852 \begin_layout Subsubsection
8853 References
8854 \end_layout
8855
8856 \begin_layout Standard
8857 A couple of things: 1) I have noticed some funny spacing in the reference
8858  entries in the text.
8859  When you enter the bibliography item data, make sure their is 
8860 \emph on
8861 no
8862 \emph default
8863  space between the last author and the parenthesis setting off the year;
8864  
8865 \emph on
8866 e.
8867 \begin_inset space \thinspace{}
8868 \end_inset
8869
8870 g.
8871 \begin_inset space \space{}
8872 \end_inset
8873
8874
8875 \emph default
8876 type 
8877 \family typewriter
8878 Ressler(1992)
8879 \family default
8880 , not 
8881 \family typewriter
8882 Ressler (1992)
8883 \family default
8884 .
8885  2) Entering the references at all is not obvious.
8886  The easiest thing is to start typing your first reference at the end of
8887  the document, then mark it as type 
8888 \family sans
8889 References
8890 \family default
8891 .
8892  That will put a small gray box in front of what you just typed.
8893  Click on the box to fill in the rest of the information.
8894  For new references, go to the end of an existing reference and press return.
8895  That will create a new line with its own box, etc.
8896 \end_layout
8897
8898 \begin_layout Subsubsection
8899 Including EPS files
8900 \end_layout
8901
8902 \begin_layout Standard
8903 Even though AASTeX provides its own figure commands (
8904 \family typewriter
8905
8906 \backslash
8907 plotone
8908 \family default
8909 , for example), I much prefer LaTeX's standard figure commands (with the
8910  default graphicx).
8911  You can insert the 
8912 \family typewriter
8913
8914 \backslash
8915 plotone
8916 \family default
8917 , etc.
8918 \begin_inset space ~
8919 \end_inset
8920
8921 commands as TeX code into a Figure Float box if you desire, but I never
8922  have much luck getting the layout right.
8923  With the standard graphics, LyX will insert a 
8924 \family typewriter
8925
8926 \backslash
8927 usepackage{graphicx}
8928 \family default
8929  command into the LaTeX preamble and handle the figures in the standard
8930  LaTeX2e way, interspersing the figures in the text.
8931  I believe ApJ accepts figures exactly this way now; AJ might still use
8932  the 
8933 \begin_inset Quotes eld
8934 \end_inset
8935
8936 stack everything at the end
8937 \begin_inset Quotes erd
8938 \end_inset
8939
8940  technique.
8941 \end_layout
8942
8943 \begin_layout Subsubsection
8944 Things I could have done, but didn't
8945 \end_layout
8946
8947 \begin_layout Standard
8948 There are a few 
8949 \begin_inset Quotes eld
8950 \end_inset
8951
8952 pretty
8953 \begin_inset Quotes erd
8954 \end_inset
8955
8956  things I could have implemented, but chose not to.
8957  For instance, I saw no point in double-spacing the text in the LyX window,
8958  even though it is double-spaced in the paper manuscript.
8959  Also, I chose not to make separate layouts for the preprint and preprint2
8960  styles.
8961  Since I assume you will spend most of your time in the plain manuscript
8962  mode anyway, I decided not to chew up more disk space with this.
8963  
8964 \end_layout
8965
8966 \begin_layout Subsection
8967 Final Caveat
8968 \end_layout
8969
8970 \begin_layout Standard
8971 Your mileage may vary.
8972  I've now had papers published by both ApJ and AJ that have had 98% of the
8973  effort done in LyX; the last 2% was the LaTeX post-processing and a few
8974  cleanups.
8975  I have had no trouble with the submission process, and I'm sure the journals
8976  were never aware that there might be a difference.
8977  So, go forth and publish!
8978 \end_layout
8979
8980 \begin_layout Section
8981 AMS LaTeX
8982 \end_layout
8983
8984 \begin_layout Standard
8985 by 
8986 \noun on
8987 David Johnson
8988 \noun default
8989 ; updated by 
8990 \noun on
8991 Richard Heck
8992 \end_layout
8993
8994 \begin_layout Standard
8995 \begin_inset VSpace bigskip
8996 \end_inset
8997
8998
8999 \end_layout
9000
9001 \begin_layout Standard
9002 \noindent
9003 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
9004  papers to be submitted to American Mathematical Society publications.
9005  The layouts are not tailored to a specific journal, but easily can be.
9006  You should refer to the AMS documentation for specific instructions for
9007  each journal (usually it will entail only changing a single line in the
9008  TeX output).
9009  That documentation is available on the Web at 
9010 \begin_inset Flex URL
9011 status open
9012
9013 \begin_layout Plain Layout
9014
9015 http://www.ams.org
9016 \end_layout
9017
9018 \end_inset
9019
9020  or by ftp at 
9021 \begin_inset Flex URL
9022 status open
9023
9024 \begin_layout Plain Layout
9025
9026 ftp://ftp.ams.org/pub/tex/amslatex/
9027 \end_layout
9028
9029 \end_inset
9030
9031 .
9032  These layouts are appropriate, and useful, for any mathematical writing.
9033  
9034 \end_layout
9035
9036 \begin_layout Standard
9037 There are two basic AMS LaTeX layouts: 
9038 \end_layout
9039
9040 \begin_layout Itemize
9041 amsart: The standard AMS article format.
9042 \end_layout
9043
9044 \begin_layout Itemize
9045 amsbook: the standard AMS book (really, monograph) format.
9046  
9047 \end_layout
9048
9049 \begin_layout Standard
9050 The layouts themselves contain only the minimum necessary to use the AMS
9051  classes.
9052  They do not, in particular, contain any of the `theorem' environments used
9053  for setting theorems, lemmas, and the like.
9054  These are contained, instead, in the 
9055 \begin_inset Flex Code
9056 status collapsed
9057
9058 \begin_layout Plain Layout
9059 Theorems (AMS)
9060 \end_layout
9061
9062 \end_inset
9063
9064  module, which is loaded by default when you select one of the AMS classes.
9065  (It can also be used with other classes and can be removed, if you would
9066  rather use something else.) Less commonly used environments are in the 
9067 \begin_inset Flex Code
9068 status collapsed
9069
9070 \begin_layout Plain Layout
9071 Theorems (AMS-Extended)
9072 \end_layout
9073
9074 \end_inset
9075
9076  module, which must be loaded manually.
9077 \end_layout
9078
9079 \begin_layout Standard
9080 By default, theorems and the like are numbered consecutively throughout
9081  the document, but this may be modified by loading the module 
9082 \begin_inset Flex Code
9083 status collapsed
9084
9085 \begin_layout Plain Layout
9086 Theorems (Order by Section)
9087 \end_layout
9088
9089 \end_inset
9090
9091  or, if you are using 
9092 \begin_inset Flex Code
9093 status collapsed
9094
9095 \begin_layout Plain Layout
9096 book (AMS)
9097 \end_layout
9098
9099 \end_inset
9100
9101 , the module 
9102 \begin_inset Flex Code
9103 status collapsed
9104
9105 \begin_layout Plain Layout
9106 Theorems (Order by Chapter)
9107 \end_layout
9108
9109 \end_inset
9110
9111 .
9112  These will number the results as 
9113 \begin_inset Formula $n.m$
9114 \end_inset
9115
9116 , where the first number refers to the section (or chapter) and the second
9117  refers to the total number of results so far in that section (or chapter).
9118  Many environments are also available unnumbered.
9119  These are indicated by an asterisk at the end.
9120  If you happen to want 
9121 \emph on
9122 only
9123 \emph default
9124  unnumbered results, the module 
9125 \begin_inset Flex Code
9126 status collapsed
9127
9128 \begin_layout Plain Layout
9129 Theorems (Starred)
9130 \end_layout
9131
9132 \end_inset
9133
9134  provides that option.
9135 \end_layout
9136
9137 \begin_layout Standard
9138 Note that these modules do not 
9139 \emph on
9140 have
9141 \emph default
9142  to be used with the AMS classes.
9143  It is perfectly possible to use the 
9144 \begin_inset Flex Code
9145 status collapsed
9146
9147 \begin_layout Plain Layout
9148 Theorems (AMS)
9149 \end_layout
9150
9151 \end_inset
9152
9153  module, and the others mentioned, with other classes, such as 
9154 \begin_inset Flex Code
9155 status collapsed
9156
9157 \begin_layout Plain Layout
9158 article
9159 \end_layout
9160
9161 \end_inset
9162
9163
9164 \begin_inset Flex Code
9165 status collapsed
9166
9167 \begin_layout Plain Layout
9168 report
9169 \end_layout
9170
9171 \end_inset
9172
9173
9174 \begin_inset Flex Code
9175 status collapsed
9176
9177 \begin_layout Plain Layout
9178 book (KOMA-script)
9179 \end_layout
9180
9181 \end_inset
9182
9183 , and so forth.
9184 \end_layout
9185
9186 \begin_layout Subsection
9187 What these layouts provide
9188 \end_layout
9189
9190 \begin_layout Standard
9191 There is a long list of included environments provided by these layouts.
9192  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9193  variety of `theorem' environments.
9194  However, the AMS recommends the environments that are available in LyX.
9195  
9196 \end_layout
9197
9198 \begin_layout Standard
9199 The following environments—as well as the standard environments, such as
9200  
9201 \begin_inset Flex Noun
9202 status collapsed
9203
9204 \begin_layout Plain Layout
9205 section
9206 \end_layout
9207
9208 \end_inset
9209
9210
9211 \begin_inset Flex Noun
9212 status collapsed
9213
9214 \begin_layout Plain Layout
9215 bibliography
9216 \end_layout
9217
9218 \end_inset
9219
9220
9221 \begin_inset Flex Noun
9222 status collapsed
9223
9224 \begin_layout Plain Layout
9225 title
9226 \end_layout
9227
9228 \end_inset
9229
9230
9231 \begin_inset Flex Noun
9232 status collapsed
9233
9234 \begin_layout Plain Layout
9235 author
9236 \end_layout
9237
9238 \end_inset
9239
9240 , and 
9241 \begin_inset Flex Noun
9242 status collapsed
9243
9244 \begin_layout Plain Layout
9245 date
9246 \end_layout
9247
9248 \end_inset
9249
9250 —are provided by 
9251 \begin_inset Flex Code
9252 status collapsed
9253
9254 \begin_layout Plain Layout
9255 article (AMS)
9256 \end_layout
9257
9258 \end_inset
9259
9260  and 
9261 \begin_inset Flex Code
9262 status collapsed
9263
9264 \begin_layout Plain Layout
9265 book (AMS)
9266 \end_layout
9267
9268 \end_inset
9269
9270 :
9271 \end_layout
9272
9273 \begin_layout Description
9274 Address This should be the author's permanent address.
9275 \end_layout
9276
9277 \begin_layout Description
9278 Current
9279 \begin_inset space ~
9280 \end_inset
9281
9282 Address This should be the author's temporary address at the time of submission,
9283  if different from the Address.
9284 \end_layout
9285
9286 \begin_layout Description
9287 Email Author's e-mail address
9288 \end_layout
9289
9290 \begin_layout Description
9291 URL Author's Web address, if desired.
9292 \end_layout
9293
9294 \begin_layout Description
9295 Keywords Key words or phrases used to identify specific topics discussed
9296  in the paper.
9297 \end_layout
9298
9299 \begin_layout Description
9300 Subjectclass These refer to the AMS Subject Classifications, published and
9301  described in 
9302 \emph on
9303 Mathematical Reviews
9304 \emph default
9305 .
9306  These are also available online at the AMS cites listed above.
9307 \end_layout
9308
9309 \begin_layout Description
9310 Thanks
9311 \end_layout
9312
9313 \begin_layout Description
9314 Dedicatory
9315 \end_layout
9316
9317 \begin_layout Description
9318 Translator
9319 \end_layout
9320
9321 \begin_layout Standard
9322 The following environments are provided by both the 
9323 \begin_inset Flex Code
9324 status collapsed
9325
9326 \begin_layout Plain Layout
9327 Theorems
9328 \end_layout
9329
9330 \end_inset
9331
9332  and 
9333 \begin_inset Flex Code
9334 status collapsed
9335
9336 \begin_layout Plain Layout
9337 Theorems (AMS)
9338 \end_layout
9339
9340 \end_inset
9341
9342  modules, in the latter case in both starred (unnumbered) and unstarred
9343  (numbered) versions.
9344  These same environments are provided only in the starred versions by the
9345  
9346 \begin_inset Flex Code
9347 status collapsed
9348
9349 \begin_layout Plain Layout
9350 Theorems (Starred)
9351 \end_layout
9352
9353 \end_inset
9354
9355  module:
9356 \end_layout
9357
9358 \begin_layout Theorem
9359 This is typically used for the statements of major results.
9360  
9361 \end_layout
9362
9363 \begin_layout Corollary*
9364 This is used for statements which follow fairly directly from previous statement
9365 s.
9366  Again, these can be major results.
9367  
9368 \end_layout
9369
9370 \begin_layout Lemma
9371 These are smaller results needed to prove other statements.
9372 \end_layout
9373
9374 \begin_layout Proposition
9375 These are less major results which (hopefully) add to the general theory
9376  being discussed.
9377 \end_layout
9378
9379 \begin_layout Conjecture
9380 These are statements provided without justification, which the author does
9381  not know how to prove, but which seem to be true (to the author, at least).
9382 \end_layout
9383
9384 \begin_layout Definition*
9385 Guess what this is for.
9386  The font is different for this environment than for the previous ones.
9387  
9388 \end_layout
9389
9390 \begin_layout Example*
9391 Used for examples illustrating proven results.
9392 \end_layout
9393
9394 \begin_layout Problem
9395 It's not really known what this is for.
9396  You should figure it out.
9397 \end_layout
9398
9399 \begin_layout Exercise*
9400 Write a description for this one.
9401 \end_layout
9402
9403 \begin_layout Remark
9404 This environment is also a type of theorem, usually a lesser sort of observation.
9405 \end_layout
9406
9407 \begin_layout Claim*
9408 Often used in the course of giving a proof of a larger result.
9409 \end_layout
9410
9411 \begin_layout Case
9412 Generally, these are used to break up long arguments, using specific instances
9413  of some condition.
9414  
9415 \end_layout
9416
9417 \begin_layout Case
9418 The numbering scheme for cases is on its own, not together with other numbered
9419  statements.
9420  
9421 \end_layout
9422
9423 \begin_layout Proof
9424 At the end of this environment, a QED symbol (usually a square, but it can
9425  vary with different styles) is placed.
9426  If you want to have other environments within this one—for example, Case
9427  environments—and have the QED symbol appear only after them, then the other
9428  environments need to be nested within the proof environment.
9429  See the section 
9430 \emph on
9431 Nesting Environments
9432 \emph default
9433  of the 
9434 \emph on
9435 User's Guide
9436 \emph default
9437  for information on nesting.
9438 \end_layout
9439
9440 \begin_layout Standard
9441 And these environments are provided by 
9442 \begin_inset Flex Code
9443 status collapsed
9444
9445 \begin_layout Plain Layout
9446 Theorems (AMS-Extended)
9447 \end_layout
9448
9449 \end_inset
9450
9451 :
9452 \end_layout
9453
9454 \begin_layout Criterion*
9455 A required condition.
9456 \end_layout
9457
9458 \begin_layout Algorithm*
9459 A general procedure to be used.
9460 \end_layout
9461
9462 \begin_layout Axiom*
9463 This is a property or statement taken as true within the system being discussed.
9464 \end_layout
9465
9466 \begin_layout Condition*
9467 Sometimes used to state a condition assumed within the present context of
9468  discussion.
9469 \end_layout
9470
9471 \begin_layout Note*
9472 Similar to a Remark.
9473 \end_layout
9474
9475 \begin_layout Notation*
9476 Used for the explanation of, yes, notation.
9477 \end_layout
9478
9479 \begin_layout Summary
9480 Do we really need to tell you? 
9481 \end_layout
9482
9483 \begin_layout Acknowledgement*
9484 Acknowledgement.
9485 \end_layout
9486
9487 \begin_layout Conclusion*
9488 Sometimes used at the end of a long train of argument.
9489 \end_layout
9490
9491 \begin_layout Fact
9492 Used in a way similar to Proposition, though perhaps lower on the scale.
9493 \end_layout
9494
9495 \begin_layout Standard
9496 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9497  fonts packages.
9498  They need to be available on your system in order to use these environments.
9499 \end_layout
9500
9501 \begin_layout Section
9502 AGU journals (
9503 \family sans
9504 aguplus
9505 \family default
9506 )
9507 \end_layout
9508
9509 \begin_layout Standard
9510 by 
9511 \shape smallcaps
9512 Martin Vermeer
9513 \end_layout
9514
9515 \begin_layout Subsection
9516 Description
9517 \end_layout
9518
9519 \begin_layout Standard
9520 These are the layout files for some of the journals of the American Geophysical
9521  Society.
9522  It is assumed that you have both the AGU's own class files and AGUplus
9523  installed (everything to be found at
9524 \begin_inset Flex URL
9525 status collapsed
9526
9527 \begin_layout Plain Layout
9528
9529 ftp://ftp.agu.org/journals/latex/journals
9530 \end_layout
9531
9532 \end_inset
9533
9534 ).
9535 \end_layout
9536
9537 \begin_layout Subsection
9538 New styles
9539 \end_layout
9540
9541 \begin_layout Standard
9542 Redefined are 
9543 \family sans
9544 Paragraph
9545 \family default
9546
9547 \family sans
9548 Paragraph*
9549 \family default
9550 .
9551  They are still called this in the LyX GUI, though their LaTeX equivalents
9552  in the AGU classes are 
9553 \family sans
9554 Subsubsubsection
9555 \family default
9556  and 
9557 \family sans
9558 Subsubsubsection*
9559 \family default
9560 .
9561 \end_layout
9562
9563 \begin_layout Standard
9564 Newly defined styles are 
9565 \family sans
9566 Left_Header
9567 \family default
9568
9569 \family sans
9570 Right_Header
9571 \family default
9572
9573 \family sans
9574 Received
9575 \family default
9576
9577 \family sans
9578 Revised
9579 \family default
9580
9581 \family sans
9582 Accepted
9583 \family default
9584
9585 \family sans
9586 CCC
9587 \family default
9588
9589 \family sans
9590 PaperId
9591 \family default
9592
9593 \family sans
9594 AuthorAddr
9595 \family default
9596
9597 \family sans
9598 SlugComment
9599 \family default
9600 .
9601  These are mostly manuscript attributes and defined in the AGU class documentati
9602 on.
9603 \end_layout
9604
9605 \begin_layout Standard
9606 I suspect this is still badly incomplete.
9607 \end_layout
9608
9609 \begin_layout Subsection
9610 New floats
9611 \end_layout
9612
9613 \begin_layout Standard
9614
9615 \family sans
9616 Planotable
9617 \family default
9618  and 
9619 \family sans
9620 Plate
9621 \family default
9622 .
9623  We also have a new 
9624 \family sans
9625 Table_Caption
9626 \family default
9627 .
9628 \end_layout
9629
9630 \begin_layout Subsection
9631 Supported journals
9632 \end_layout
9633
9634 \begin_layout Itemize
9635
9636 \emph on
9637 Journal of Geophysical Research
9638 \emph default
9639
9640 \family typewriter
9641 jgrga.layout
9642 \family default
9643  — Martin Vermeer
9644 \end_layout
9645
9646 \begin_layout Standard
9647 Add your own, it isn't so hard! Look at the 
9648 \family typewriter
9649 jgrga.layout
9650 \family default
9651  example and 
9652 \family typewriter
9653 aguplus.inc
9654 \family default
9655 .
9656 \end_layout
9657
9658 \begin_layout Subsection
9659 Bugs and things to remember
9660 \end_layout
9661
9662 \begin_layout Standard
9663 In order to use the new layouts, you must remember to do the following for
9664  a new document:
9665 \end_layout
9666
9667 \begin_layout Enumerate
9668
9669 \emph on
9670 Turn off babel
9671 \emph default
9672 .
9673  This can be done in the 
9674 \family sans
9675 Layout\SpecialChar \menuseparator
9676 Document
9677 \family default
9678  or 
9679 \family sans
9680 Document\SpecialChar \menuseparator
9681 Settings
9682 \family default
9683  menu item.
9684  (AGU articles are always in English, right? So 
9685 \emph on
9686 don't
9687 \emph default
9688  choose a language.)
9689 \end_layout
9690
9691 \begin_layout Enumerate
9692 Enter 
9693 \family typewriter
9694 jgrga
9695 \family default
9696  into the document's 
9697 \family sans
9698 Extra Options
9699 \family default
9700  field.
9701  (Yes, this is a bug.)
9702 \end_layout
9703
9704 \begin_layout Enumerate
9705 Make sure you use the 
9706 \family typewriter
9707 agu.bst
9708 \family default
9709  bibliography style, by entering 
9710 \family sans
9711 agu
9712 \family default
9713  into the second field of the BibTeX inset.
9714  None of the standard styles will do.
9715 \end_layout
9716
9717 \begin_layout Section
9718 Broadway
9719 \end_layout
9720
9721 \begin_layout Standard
9722 by 
9723 \shape smallcaps
9724 Garst Reese
9725 \end_layout
9726
9727 \begin_layout Subsection
9728 Introduction
9729 \end_layout
9730
9731 \begin_layout Standard
9732 Broadway is for writing plays.
9733  The format is more decorative than Hollywood, and much less standardized.
9734  This format should be suitable for workshops.
9735 \end_layout
9736
9737 \begin_layout Subsection
9738 Special problems
9739 \end_layout
9740
9741 \begin_layout Standard
9742 The same as in Hollywood.
9743 \end_layout
9744
9745 \begin_layout Subsection
9746 Special features
9747 \end_layout
9748
9749 \begin_layout Standard
9750 Insert the 
9751 \family sans
9752 Speaker
9753 \family default
9754  names as labels then cross-reference the label to insert the name.
9755  The cross-reference dialog will show the current cast of characters.
9756 \end_layout
9757
9758 \begin_layout Subsection
9759 Paper size and Margins
9760 \end_layout
9761
9762 \begin_layout Standard
9763 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9764 \end_layout
9765
9766 \begin_layout Subsection
9767 Environments
9768 \end_layout
9769
9770 \begin_layout Standard
9771 The following environments are available.
9772  You can use broadway.bind to get the bind keys shown at the right.
9773 \end_layout
9774
9775 \begin_layout Itemize
9776
9777 \family sans
9778 Standard
9779 \begin_inset Newline newline
9780 \end_inset
9781
9782
9783 \family default
9784 You should not have to use this, but it is here for anything that does not
9785  fit otherwise.
9786 \end_layout
9787
9788 \begin_layout Itemize
9789
9790 \family sans
9791 Narrative
9792 \begin_inset space \hfill{}
9793 \end_inset
9794
9795 M-z n
9796 \begin_inset Newline newline
9797 \end_inset
9798
9799
9800 \family default
9801 Used to describe stage setting and the action.
9802  First use of speaker names in all CAPs.
9803 \end_layout
9804
9805 \begin_layout Itemize
9806
9807 \family sans
9808 ACT
9809 \begin_inset space \hfill{}
9810 \end_inset
9811
9812 M-z a
9813 \begin_inset Newline newline
9814 \end_inset
9815
9816
9817 \family default
9818 Automatically numbered.
9819  On screen it will be arabic, but will print as Roman.
9820 \end_layout
9821
9822 \begin_layout Itemize
9823
9824 \family sans
9825 ACT*
9826 \begin_inset space \hfill{}
9827 \end_inset
9828
9829 M-z S at
9830 \begin_inset Newline newline
9831 \end_inset
9832
9833
9834 \family default
9835 Subtitle for 
9836 \family sans
9837 ACT.
9838
9839 \family default
9840  It is just centered text.
9841 \end_layout
9842
9843 \begin_layout Itemize
9844
9845 \family sans
9846 SCENE
9847 \begin_inset space \hfill{}
9848 \end_inset
9849
9850 M-z S-S
9851 \begin_inset Newline newline
9852 \end_inset
9853
9854
9855 \family default
9856 Not automatically numbered.
9857  You supply the number.
9858  This is because I couldn't figure out how.
9859 \end_layout
9860
9861 \begin_layout Itemize
9862
9863 \family sans
9864 AT_RISE:
9865 \begin_inset space \hfill{}
9866 \end_inset
9867
9868 M-z S-R
9869 \begin_inset Newline newline
9870 \end_inset
9871
9872
9873 \family default
9874 A special case of Narrative to describe the setting and action as the curtain
9875  rises.
9876 \end_layout
9877
9878 \begin_layout Itemize
9879
9880 \family sans
9881 Speaker
9882 \begin_inset space \hfill{}
9883 \end_inset
9884
9885 M-z s
9886 \begin_inset Newline newline
9887 \end_inset
9888
9889
9890 \family default
9891 The speaker's (actor's) title, centered in all CAPS.
9892 \end_layout
9893
9894 \begin_layout Itemize
9895
9896 \family sans
9897 Parenthetical
9898 \begin_inset space \hfill{}
9899 \end_inset
9900
9901 M-z p
9902 \begin_inset Newline newline
9903 \end_inset
9904
9905
9906 \family default
9907 Instructions to the speaker.
9908  The parentheses are automatically inserted.
9909  The ( will appear on screen, but both will be in the printed play.
9910  This environment is only used within 
9911 \family sans
9912 Dialogue
9913 \family default
9914 .
9915 \end_layout
9916
9917 \begin_layout Itemize
9918
9919 \family sans
9920 Dialogue
9921 \begin_inset space \hfill{}
9922 \end_inset
9923
9924 M-z d
9925 \begin_inset Newline newline
9926 \end_inset
9927
9928
9929 \family default
9930 What the Speaker says.
9931 \end_layout
9932
9933 \begin_layout Itemize
9934
9935 \family sans
9936 CURTAIN
9937 \begin_inset space \hfill{}
9938 \end_inset
9939
9940 M-z S-C
9941 \begin_inset Newline newline
9942 \end_inset
9943
9944
9945 \family default
9946 The curtain comes down.
9947 \end_layout
9948
9949 \begin_layout Itemize
9950
9951 \family sans
9952 Title
9953 \begin_inset space \hfill{}
9954 \end_inset
9955
9956 M-z S-T
9957 \end_layout
9958
9959 \begin_layout Itemize
9960
9961 \family sans
9962 Author
9963 \begin_inset space \hfill{}
9964 \end_inset
9965
9966 M-z S-A
9967 \end_layout
9968
9969 \begin_layout Itemize
9970
9971 \family sans
9972 Right_Address
9973 \begin_inset space \hfill{}
9974 \end_inset
9975
9976 M-z r
9977 \end_layout
9978
9979 \begin_layout Standard
9980 Hello there.
9981 \end_layout
9982
9983 \begin_layout Section
9984 Dinbrief
9985 \end_layout
9986
9987 \begin_layout Standard
9988 The document class 
9989 \family sans
9990 dinbrief
9991 \family default
9992  can be used to type letters according to German conventions.
9993  A template file is included in 
9994 \family typewriter
9995 .../lyx/share/templates
9996 \family default
9997  for you to use as a starting point.
9998 \end_layout
9999
10000 \begin_layout Section
10001 EGS journals (
10002 \family sans
10003 egs
10004 \family default
10005 )
10006 \end_layout
10007
10008 \begin_layout Standard
10009 by 
10010 \shape smallcaps
10011 Martin Vermeer
10012 \end_layout
10013
10014 \begin_layout Subsection
10015 Description
10016 \end_layout
10017
10018 \begin_layout Standard
10019 This is the layout file for the European Geophysical Society journals.
10020  The needed 
10021 \family typewriter
10022 egs.cls
10023 \family default
10024  can be downloaded from the web site of the EGS under 
10025 \begin_inset Flex URL
10026 status collapsed
10027
10028 \begin_layout Plain Layout
10029
10030 www.copernicus.org
10031 \end_layout
10032
10033 \end_inset
10034
10035 .
10036 \end_layout
10037
10038 \begin_layout Subsection
10039 New styles
10040 \end_layout
10041
10042 \begin_layout Standard
10043
10044 \family sans
10045 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
10046  Accepted
10047 \family default
10048
10049 \family sans
10050 Offsets
10051 \family default
10052 .
10053  The current layout file is unfortunately very unmodular and would benefit
10054  from using the various 
10055 \family typewriter
10056 std*.inc
10057 \family default
10058  file inclusions.
10059 \end_layout
10060
10061 \begin_layout Section
10062 Elsevier Journals
10063 \end_layout
10064
10065 \begin_layout Standard
10066 See the LyX template file 
10067 \family typewriter
10068 elsarticle.lyx
10069 \family default
10070 .
10071  It contains all infos you need.
10072 \end_layout
10073
10074 \begin_layout Section
10075 Foils [aka 
10076 \family sans
10077 FoilTeX
10078 \family default
10079 ]
10080 \begin_inset CommandInset label
10081 LatexCommand label
10082 name "sec:foiltex"
10083
10084 \end_inset
10085
10086
10087 \end_layout
10088
10089 \begin_layout Standard
10090 by 
10091 \noun on
10092 Allan Rae
10093 \end_layout
10094
10095 \begin_layout Subsection
10096 Introduction
10097 \end_layout
10098
10099 \begin_layout Standard
10100 This section describes how to use LyX to make slides for overhead projectors.
10101  There are two document classes that can do this: the default slides class
10102  and the 
10103 \family sans
10104 FoilTeX
10105 \family default
10106  slides class.
10107  This section documents the latter.
10108 \end_layout
10109
10110 \begin_layout Standard
10111 I'm going to say this again, nice and clear, so that there's no misunderstanding
10112 :
10113 \end_layout
10114
10115 \begin_layout Standard
10116 \begin_inset VSpace bigskip
10117 \end_inset
10118
10119
10120 \end_layout
10121
10122 \begin_layout Standard
10123 \align center
10124
10125 \size large
10126 This section documents the class 
10127 \begin_inset Quotes eld
10128 \end_inset
10129
10130
10131 \family sans
10132 slides (FoilTeX)
10133 \family default
10134
10135 \begin_inset Quotes erd
10136 \end_inset
10137
10138  
10139 \emph on
10140 only.
10141 \end_layout
10142
10143 \begin_layout Standard
10144 \begin_inset VSpace bigskip
10145 \end_inset
10146
10147
10148 \end_layout
10149
10150 \begin_layout Standard
10151 If you're looking for the documentation for 
10152 \begin_inset Quotes eld
10153 \end_inset
10154
10155
10156 \family sans
10157 slides (default)
10158 \family default
10159
10160 \begin_inset Quotes erd
10161 \end_inset
10162
10163 , check out section
10164 \begin_inset space ~
10165 \end_inset
10166
10167
10168 \begin_inset CommandInset ref
10169 LatexCommand ref
10170 reference "sec:slitex"
10171
10172 \end_inset
10173
10174 .
10175  If your machine doesn't have the 
10176 \family sans
10177 foils
10178 \family default
10179  class [
10180 \begin_inset Quotes eld
10181 \end_inset
10182
10183
10184 \family sans
10185 slides (FoilTeX)
10186 \family default
10187
10188 \begin_inset Quotes erd
10189 \end_inset
10190
10191 ] installed, you'll probably have to use the default 
10192 \family sans
10193 slides
10194 \family default
10195  class, which isn't quite as good as 
10196 \family sans
10197 foils.
10198 \end_layout
10199
10200 \begin_layout Standard
10201 The 
10202 \family sans
10203 foils
10204 \family default
10205  class is designed for use with version 2.1 of the 
10206 \family sans
10207 foils.cls
10208 \family default
10209  LaTeX class file which is now an integral part of LaTeX2e.
10210 \end_layout
10211
10212 \begin_layout Subsection
10213 Getting Started
10214 \end_layout
10215
10216 \begin_layout Standard
10217 Obviously, to use this document class, you need to select 
10218 \begin_inset Quotes eld
10219 \end_inset
10220
10221
10222 \family sans
10223 slides (FoilTeX)
10224 \family default
10225
10226 \begin_inset Quotes erd
10227 \end_inset
10228
10229  from the 
10230 \family sans
10231 Class
10232 \family default
10233  entry in the 
10234 \family sans
10235 Document
10236 \begin_inset space ~
10237 \end_inset
10238
10239 Layout
10240 \family default
10241  dialog.
10242  There are some settings in the 
10243 \family sans
10244 Document
10245 \begin_inset space ~
10246 \end_inset
10247
10248 Layout
10249 \family default
10250  dialog that you should know about that are specific to this class:
10251 \end_layout
10252
10253 \begin_layout Itemize
10254 Don't change the options 
10255 \family sans
10256 Sides
10257 \family default
10258  and 
10259 \family sans
10260 Columns
10261 \family default
10262  on the 
10263 \family sans
10264 Document
10265 \begin_inset space ~
10266 \end_inset
10267
10268 Layout
10269 \family default
10270  dialog.
10271  They're ignored by the 
10272 \family sans
10273 foils
10274 \family default
10275  class.
10276 \end_layout
10277
10278 \begin_layout Itemize
10279 The default font size is 20
10280 \begin_inset space \thinspace{}
10281 \end_inset
10282
10283 pt with the other options being 17
10284 \begin_inset space \thinspace{}
10285 \end_inset
10286
10287 pt, 25
10288 \begin_inset space \thinspace{}
10289 \end_inset
10290
10291 pt and 30
10292 \begin_inset space \thinspace{}
10293 \end_inset
10294
10295 pt.
10296 \end_layout
10297
10298 \begin_layout Itemize
10299 The default font is 
10300 \family sans
10301 sans
10302 \family default
10303  
10304 \family sans
10305 serif
10306 \family default
10307  but all math equations are still typeset in the usual roman font.
10308 \end_layout
10309
10310 \begin_layout Itemize
10311
10312 \family sans
10313 FoilTeX
10314 \family default
10315  supports A4 and Letter paper sizes as well as a special size for working
10316  with 35
10317 \begin_inset space \thinspace{}
10318 \end_inset
10319
10320 mm slides.
10321  It doesn't support A5, B5, legal or executive paper sizes.
10322 \end_layout
10323
10324 \begin_layout Itemize
10325 Don't bother changing the 
10326 \family sans
10327 Float Placement
10328 \family default
10329  settings because they are ignored anyway.
10330  All floats appear where they are defined in the text.
10331 \end_layout
10332
10333 \begin_layout Itemize
10334 The 
10335 \family sans
10336 Pagestyle
10337 \family default
10338  setting behaves a bit differently for this class.
10339  
10340 \family sans
10341 FoilTeX
10342 \family default
10343  provides extensive footer and header capabilities including a user-defined
10344  logo.
10345  See section
10346 \begin_inset space ~
10347 \end_inset
10348
10349
10350 \begin_inset CommandInset ref
10351 LatexCommand ref
10352 reference "sec:foilfoot"
10353
10354 \end_inset
10355
10356  for more details.
10357  The title page is treated differently to all other pages in the document
10358  and is 
10359 \emph on
10360 always
10361 \emph default
10362  unnumbered and 
10363 \emph on
10364 always
10365 \emph default
10366  has the logo centered at the bottom of the page (if one is defined).
10367  The possible page style choices and what they do are as follows:
10368 \end_layout
10369
10370 \begin_deeper
10371 \begin_layout Labeling
10372 \labelwidthstring MMMMMMM
10373
10374 \family sans
10375 \series bold
10376 empty
10377 \family default
10378 \series default
10379  The final output contains no page numbers, or other headers or footers
10380  (except footnotes of course).
10381  
10382 \end_layout
10383
10384 \begin_layout Labeling
10385 \labelwidthstring MMMMMMM
10386
10387 \family sans
10388 \series bold
10389 plain
10390 \family default
10391 \series default
10392  The final output contains page numbers centered at the bottom of the page.
10393  No other headings or footers (other than footnotes).
10394 \end_layout
10395
10396 \begin_layout Labeling
10397 \labelwidthstring MMMMMMM
10398
10399 \series bold
10400 foilheadings
10401 \series default
10402  Page numbers in lower right corner.
10403  Additional headers and footers are also shown.
10404  This is also the default.
10405 \end_layout
10406
10407 \begin_layout Labeling
10408 \labelwidthstring MMMMMMM
10409
10410 \series bold
10411 fancy
10412 \series default
10413  Gives you access to the 
10414 \family sans
10415 fancyheadings
10416 \family default
10417  package although its use with 
10418 \family sans
10419 FoilTeX
10420 \family default
10421  is discouraged by the writer of the 
10422 \family sans
10423 FoilTeX
10424 \family default
10425  package because of some potential page layout clashes.
10426 \end_layout
10427
10428 \end_deeper
10429 \begin_layout Subsubsection
10430 Extra Options
10431 \end_layout
10432
10433 \begin_layout Standard
10434 The following options may be used in the extra class options in the 
10435 \family sans
10436 Document\SpecialChar \menuseparator
10437 Settings
10438 \family default
10439  dialog.
10440 \end_layout
10441
10442 \begin_layout Labeling
10443 \labelwidthstring MMMMMMx
10444
10445 \series bold
10446 35mmSlide
10447 \series default
10448  This sets up the page layout for 7.33
10449 \begin_inset space \thinspace{}
10450 \end_inset
10451
10452 in by 11
10453 \begin_inset space \thinspace{}
10454 \end_inset
10455
10456 in paper, which is about the same aspect ratio as a 35
10457 \begin_inset space \thinspace{}
10458 \end_inset
10459
10460 mm slide, making it a bit easier to work with this medium.
10461 \end_layout
10462
10463 \begin_layout Labeling
10464 \labelwidthstring MMMMMMx
10465
10466 \series bold
10467 headrule
10468 \series default
10469  Places a rule across the page below the header on every page except the
10470  title page.
10471 \end_layout
10472
10473 \begin_layout Labeling
10474 \labelwidthstring MMMMMMx
10475
10476 \series bold
10477 footrule
10478 \series default
10479  Places a rule across the page above the footer on every page except the
10480  title page.
10481 \end_layout
10482
10483 \begin_layout Labeling
10484 \labelwidthstring MMMMMMx
10485
10486 \series bold
10487 dvips
10488 \series default
10489  This is automatically set each time you create a new 
10490 \family sans
10491 foils
10492 \family default
10493  document.
10494  This option tells 
10495 \family sans
10496 FoilTeX
10497 \family default
10498  to use the dvips driver to rotate those pages that are set as landscape
10499  foils.
10500 \end_layout
10501
10502 \begin_layout Labeling
10503 \labelwidthstring MMMMMMx
10504
10505 \series bold
10506 landscape
10507 \series default
10508  Simply changes the page dimensions to those of a landscape page but doesn't
10509  do any rotation.
10510  Thus if you use this option you need to use an external program to rotate
10511  each page or feed your paper through your printer as landscape.
10512  Note that this option effectively reverses the roles of the 
10513 \family sans
10514 Foilhead
10515 \family default
10516  and 
10517 \family sans
10518 Rotatefoilhead
10519 \family default
10520  environments (don't worry these are described in the next section).
10521 \end_layout
10522
10523 \begin_layout Labeling
10524 \labelwidthstring MMMMMMx
10525
10526 \series bold
10527 leqno
10528 \series default
10529  Equation numbers on the left.
10530 \end_layout
10531
10532 \begin_layout Labeling
10533 \labelwidthstring MMMMMMx
10534
10535 \series bold
10536 fleqn
10537 \series default
10538  Flush-left equations.
10539 \end_layout
10540
10541 \begin_layout Subsection
10542 Supported Environments
10543 \end_layout
10544
10545 \begin_layout Standard
10546 Most of the environments commonly supported in other classes are also supported
10547  by the 
10548 \family sans
10549 foils
10550 \family default
10551  class.
10552  There are several additional environments provided by 
10553 \family sans
10554 FoilTeX
10555 \family default
10556  as well as a couple added by LyX.
10557  The following environments are shared with other classes:
10558 \end_layout
10559
10560 \begin_layout Standard
10561 \begin_inset Flex Multiple Columns
10562 status open
10563
10564 \begin_layout Itemize
10565
10566 \family sans
10567 Standard
10568 \end_layout
10569
10570 \begin_layout Itemize
10571
10572 \family sans
10573 Itemize
10574 \end_layout
10575
10576 \begin_layout Itemize
10577
10578 \family sans
10579 Enumerate
10580 \end_layout
10581
10582 \begin_layout Itemize
10583
10584 \family sans
10585 Description
10586 \end_layout
10587
10588 \begin_layout Itemize
10589
10590 \family sans
10591 List
10592 \end_layout
10593
10594 \begin_layout Itemize
10595
10596 \family sans
10597 LyX-Code
10598 \end_layout
10599
10600 \begin_layout Itemize
10601
10602 \family sans
10603 Verse
10604 \end_layout
10605
10606 \begin_layout Itemize
10607
10608 \family sans
10609 Quote
10610 \end_layout
10611
10612 \begin_layout Itemize
10613
10614 \family sans
10615 Quotation
10616 \end_layout
10617
10618 \begin_layout Itemize
10619
10620 \family sans
10621 Title
10622 \end_layout
10623
10624 \begin_layout Itemize
10625
10626 \family sans
10627 Author
10628 \end_layout
10629
10630 \begin_layout Itemize
10631
10632 \family sans
10633 Date
10634 \end_layout
10635
10636 \begin_layout Itemize
10637
10638 \family sans
10639 Abstract
10640 \end_layout
10641
10642 \begin_layout Itemize
10643
10644 \family sans
10645 Bibliography
10646 \end_layout
10647
10648 \begin_layout Itemize
10649
10650 \family sans
10651 Address
10652 \end_layout
10653
10654 \begin_layout Itemize
10655
10656 \family sans
10657 RightAddress
10658 \end_layout
10659
10660 \begin_layout Itemize
10661
10662 \family sans
10663 Caption
10664 \end_layout
10665
10666 \begin_layout Itemize
10667
10668 \family sans
10669 Comment
10670 \end_layout
10671
10672 \end_inset
10673
10674
10675 \end_layout
10676
10677 \begin_layout Standard
10678 That is, all the major environments apart from the sectioning environments.
10679  Since foils are essentially self-contained sections, with a title and body,
10680  
10681 \family sans
10682 FoilTeX
10683 \family default
10684  provides specific commands for starting new foils and these are:
10685 \end_layout
10686
10687 \begin_layout Itemize
10688
10689 \family sans
10690 Foilhead
10691 \end_layout
10692
10693 \begin_layout Itemize
10694
10695 \family sans
10696 Rotatefoilhead
10697 \end_layout
10698
10699 \begin_layout Standard
10700 LyX also provides slightly modified versions of these two environments called:
10701 \end_layout
10702
10703 \begin_layout Itemize
10704
10705 \family sans
10706 ShortFoilhead
10707 \end_layout
10708
10709 \begin_layout Itemize
10710
10711 \family sans
10712 ShortRotatefoilhead
10713 \end_layout
10714
10715 \begin_layout Standard
10716 and the differences will be explained in the next section.
10717 \end_layout
10718
10719 \begin_layout Standard
10720 Since foils are often used in presenting ideas or new theorems and such
10721  
10722 \family sans
10723 FoilTeX
10724 \family default
10725  also provides a comprehensive box of goodies for presenting them:
10726 \end_layout
10727
10728 \begin_layout Standard
10729 \begin_inset Flex Multiple Columns
10730 status open
10731
10732 \begin_layout Itemize
10733
10734 \family sans
10735 Theorem
10736 \end_layout
10737
10738 \begin_layout Itemize
10739
10740 \family sans
10741 Lemma
10742 \end_layout
10743
10744 \begin_layout Itemize
10745
10746 \family sans
10747 Corollary
10748 \end_layout
10749
10750 \begin_layout Itemize
10751
10752 \family sans
10753 Proposition
10754 \end_layout
10755
10756 \begin_layout Itemize
10757
10758 \family sans
10759 Definition
10760 \end_layout
10761
10762 \begin_layout Itemize
10763
10764 \family sans
10765 Proof
10766 \end_layout
10767
10768 \begin_layout Itemize
10769
10770 \family sans
10771 Theorem*
10772 \end_layout
10773
10774 \begin_layout Itemize
10775
10776 \family sans
10777 Lemma*
10778 \end_layout
10779
10780 \begin_layout Itemize
10781
10782 \family sans
10783 Corollary*
10784 \end_layout
10785
10786 \begin_layout Itemize
10787
10788 \family sans
10789 Proposition*
10790 \end_layout
10791
10792 \begin_layout Itemize
10793
10794 \family sans
10795 Definition*
10796 \end_layout
10797
10798 \end_inset
10799
10800
10801 \end_layout
10802
10803 \begin_layout Standard
10804 The starred versions are unnumbered while the unstarred versions are numbered.
10805  There are also two list environments added by LyX and these are:
10806 \end_layout
10807
10808 \begin_layout Itemize
10809
10810 \family sans
10811 TickList
10812 \end_layout
10813
10814 \begin_layout Itemize
10815
10816 \family sans
10817 CrossList
10818 \end_layout
10819
10820 \begin_layout Standard
10821
10822 \family sans
10823 FoilTeX
10824 \family default
10825  provides some powerful header and footer capabilities that are best set
10826  in the preamble although they may be set at any point in a document.
10827  If you want to change these settings in your document the best place to
10828  do so is at the very top of a foil, i.
10829 \begin_inset space \thinspace{}
10830 \end_inset
10831
10832 e.
10833 \emph on
10834
10835 \begin_inset space \space{}
10836 \end_inset
10837
10838
10839 \emph default
10840 straight after the foilhead.
10841 \end_layout
10842
10843 \begin_layout Standard
10844 For this purpose, the following command styles are provided [
10845 \shape smallcaps
10846 Martin Vermeer
10847 \shape default
10848 ]:
10849 \end_layout
10850
10851 \begin_layout Standard
10852 \begin_inset Flex Multiple Columns
10853 status open
10854
10855 \begin_layout Itemize
10856
10857 \family sans
10858 My
10859 \begin_inset space ~
10860 \end_inset
10861
10862 Logo
10863 \end_layout
10864
10865 \begin_layout Itemize
10866
10867 \family sans
10868 Restriction
10869 \end_layout
10870
10871 \begin_layout Itemize
10872
10873 \family sans
10874 Right
10875 \begin_inset space ~
10876 \end_inset
10877
10878 Footer
10879 \end_layout
10880
10881 \begin_layout Itemize
10882
10883 \family sans
10884 Right
10885 \begin_inset space ~
10886 \end_inset
10887
10888 Header
10889 \end_layout
10890
10891 \begin_layout Itemize
10892
10893 \family sans
10894 Left
10895 \begin_inset space ~
10896 \end_inset
10897
10898 Header
10899 \end_layout
10900
10901 \begin_deeper
10902 \begin_layout Plain Layout
10903 \begin_inset space ~
10904 \end_inset
10905
10906
10907 \end_layout
10908
10909 \end_deeper
10910 \end_inset
10911
10912
10913 \end_layout
10914
10915 \begin_layout Standard
10916 There are also a few commands provided by 
10917 \family sans
10918 FoilTeX
10919 \family default
10920  that aren't directly supported by LyX but I'll tell you what they do and
10921  how to use them in section
10922 \begin_inset space ~
10923 \end_inset
10924
10925
10926 \begin_inset CommandInset ref
10927 LatexCommand ref
10928 reference "sec:unsuppfoils"
10929
10930 \end_inset
10931
10932 .
10933 \end_layout
10934
10935 \begin_layout Subsection
10936 Building a Set of Foils
10937 \end_layout
10938
10939 \begin_layout Standard
10940 This section will give a simple introduction to using the different environments
10941  to build a set of foils.
10942  If you want to see an example set of foils, take a look at the 
10943 \family typewriter
10944 Foils.lyx
10945 \family default
10946  file you find in LyX's 
10947 \family typewriter
10948 examples
10949 \family default
10950  folder.
10951 \end_layout
10952
10953 \begin_layout Subsubsection
10954 Give It a Title Page
10955 \end_layout
10956
10957 \begin_layout Standard
10958 Unlike other classes that provide 
10959 \family sans
10960 Title
10961 \family default
10962
10963 \family sans
10964 Author
10965 \family default
10966
10967 \family sans
10968 Date
10969 \family default
10970  and 
10971 \family sans
10972 Abstract
10973 \family default
10974  environments, 
10975 \family sans
10976 foils
10977 \family default
10978  creates the title on a page of its own.
10979  If you leave out the 
10980 \family sans
10981 Date
10982 \family default
10983  environment LaTeX will substitute the current date (every time you regenerate
10984  the output).
10985 \end_layout
10986
10987 \begin_layout Subsubsection
10988 Start a New Foil
10989 \end_layout
10990
10991 \begin_layout Standard
10992 As I mentioned earlier, there are four ways of starting a new foil.
10993  For portrait foils you should use 
10994 \family sans
10995 Foilhead
10996 \family default
10997  or 
10998 \family sans
10999 ShortFoilhead.
11000
11001 \family default
11002  The difference between these two environments is the amount of space between
11003  the title of the foil (the foilhead) and the body of the foil.
11004 \end_layout
11005
11006 \begin_layout Standard
11007 Landscape foils are generated using the 
11008 \family sans
11009 Rotatefoilhead
11010 \family default
11011  and 
11012 \family sans
11013 ShortRotatefoilhead
11014 \family default
11015  environments.
11016  Again the only difference is the spacing between foilhead and body.
11017  Both of the short versions have 0.5
11018 \begin_inset space ~
11019 \end_inset
11020
11021 inches less separation between the foilhead and the body.
11022  
11023 \end_layout
11024
11025 \begin_layout Standard
11026 One problem with the support for landscape foils is the requirement that
11027  you have to use the 
11028 \family typewriter
11029 dvips
11030 \family default
11031  driver to generate the PostScript output otherwise the foils won't be rotated.
11032  It is possible to get landscape foils even if you haven't got the 
11033 \family typewriter
11034 dvips
11035 \family default
11036  driver provided you can feed your foils sideways through your printer ;-)
11037 \end_layout
11038
11039 \begin_layout Subsubsection
11040 Theorems, Lemmas, Proofs and more
11041 \end_layout
11042
11043 \begin_layout Standard
11044 Due to a small bug in LyX you can't have two of the same type of these environme
11045 nts directly following each other.
11046  They must be separated by something.
11047  If you try, you will just be extending the previous environment as if you
11048  had merged the two environments together.
11049  So, how do you get around this problem? The simplest option is to insert
11050  some text between the two environments or add a 
11051 \family sans
11052 LaTeX
11053 \family default
11054  environment between the two with just a 
11055 \begin_inset Quotes eld
11056 \end_inset
11057
11058
11059 \family typewriter
11060 %
11061 \family default
11062
11063 \begin_inset Quotes erd
11064 \end_inset
11065
11066  in it.
11067  This will force LyX to produce two separate environments and hence the
11068  correct LaTeX output.
11069  An example is provided in the example file included with the LyX distribution.
11070  Remember, this problem only occurs if you are trying to place two of the
11071  same type of theorem-like environments one directly after the other.
11072 \end_layout
11073
11074 \begin_layout Subsubsection
11075 Lists
11076 \end_layout
11077
11078 \begin_layout Standard
11079 You get all the commonly supported list styles found in other classes as
11080  well as two new ones.
11081  I'll only describe the new ones here.
11082  If you want to find out more about the other list environments check out
11083  the 
11084 \emph on
11085 User's Guide.
11086
11087 \emph default
11088  If you intend to use itemized lists you might also want to read about the
11089  
11090 \family sans
11091 Itemize
11092 \begin_inset space ~
11093 \end_inset
11094
11095 Bullet
11096 \begin_inset space ~
11097 \end_inset
11098
11099 Selection
11100 \family default
11101  dialog described above in section
11102 \begin_inset space ~
11103 \end_inset
11104
11105
11106 \begin_inset CommandInset ref
11107 LatexCommand ref
11108 reference "sec:bullet"
11109
11110 \end_inset
11111
11112 .
11113 \end_layout
11114
11115 \begin_layout Standard
11116 The two new list styles, 
11117 \family sans
11118 TickList
11119 \family default
11120  and 
11121 \family sans
11122 CrossList
11123 \family default
11124 , are designed to make it easier for you to create lists of do's and don'ts
11125  or right and wrong by providing dedicated environments that use a tick
11126  or a cross as the label of the list.
11127  These lists are in fact dedicated variants of the 
11128 \family sans
11129 Itemize
11130 \family default
11131  environment.
11132  They do however require that you have the 
11133 \family typewriter
11134 psnfss
11135 \family default
11136  packages installed.
11137 \end_layout
11138
11139 \begin_layout Subsubsection
11140 Figures and Tables
11141 \end_layout
11142
11143 \begin_layout Standard
11144
11145 \family sans
11146 FoilTeX
11147 \family default
11148  redefines the floating tables and figures so that they appear exactly where
11149  they are in the text rather than pushing them to the top of the page or
11150  to some user specified location.
11151  In fact if you change the float placement settings they are simply ignored.
11152 \end_layout
11153
11154 \begin_layout Subsubsection
11155 Page Headers and Footers
11156 \begin_inset CommandInset label
11157 LatexCommand label
11158 name "sec:foilfoot"
11159
11160 \end_inset
11161
11162
11163 \end_layout
11164
11165 \begin_layout Standard
11166
11167 \family sans
11168 My
11169 \begin_inset space ~
11170 \end_inset
11171
11172 Logo
11173 \family default
11174  and 
11175 \family sans
11176 Restriction
11177 \family default
11178  are two commands used to control the left-footer text string.
11179  The first is meant to allow you to include a graphic logo on your foils
11180  and defaults to 
11181 \begin_inset Quotes eld
11182 \end_inset
11183
11184 -Typeset by 
11185 \family sans
11186 FoilTeX
11187 \family default
11188 -
11189 \begin_inset Quotes erd
11190 \end_inset
11191
11192 .
11193  While the second is meant to provide a classification for the audience,
11194  
11195 \emph on
11196 e.
11197 \begin_inset space \thinspace{}
11198 \end_inset
11199
11200 g.
11201 \emph default
11202
11203 \begin_inset space \space{}
11204 \end_inset
11205
11206 Confidential.
11207  It is empty by default.
11208 \end_layout
11209
11210 \begin_layout Standard
11211 The remaining page corners can be filled by 
11212 \family sans
11213 Right
11214 \begin_inset space ~
11215 \end_inset
11216
11217 Footer
11218 \family default
11219  (which defaults to page numbers), 
11220 \family sans
11221 Right
11222 \begin_inset space ~
11223 \end_inset
11224
11225 Header
11226 \family default
11227  (top right) and 
11228 \family sans
11229 Left
11230 \begin_inset space ~
11231 \end_inset
11232
11233 Header
11234 \family default
11235  (top left).
11236 \end_layout
11237
11238 \begin_layout Subsection
11239 Unsupported 
11240 \family sans
11241 FoilTeX
11242 \family default
11243  Goodies
11244 \begin_inset CommandInset label
11245 LatexCommand label
11246 name "sec:unsuppfoils"
11247
11248 \end_inset
11249
11250
11251 \end_layout
11252
11253 \begin_layout Standard
11254 All the commands mentioned below need to be set in a 
11255 \family sans
11256 LaTeX
11257 \family default
11258  environment or as 
11259 \family sans
11260 TeX
11261 \family default
11262  within another environment.
11263 \end_layout
11264
11265 \begin_layout Subsubsection
11266 Lengths
11267 \end_layout
11268
11269 \begin_layout Standard
11270 All lengths are adjusted using the 
11271 \family typewriter
11272
11273 \backslash
11274 setlength{
11275 \family default
11276 \emph on
11277 lengthname
11278 \family typewriter
11279 \emph default
11280 }{
11281 \family default
11282 \emph on
11283 newlength
11284 \family typewriter
11285 \emph default
11286 }
11287 \family default
11288  command.
11289  Where 
11290 \emph on
11291 lengthname
11292 \emph default
11293  should be replaced by the name given to the length you want to change and
11294  
11295 \emph on
11296 newlength
11297 \emph default
11298  is the length value.
11299  All lengths should be specified in units of length such as inches (
11300 \family typewriter
11301 in
11302 \family default
11303 ), millimeters (
11304 \family typewriter
11305 mm
11306 \family default
11307 ) or points (
11308 \family typewriter
11309 pt
11310 \family default
11311 ) or relative to some document or font-based length such as 
11312 \family typewriter
11313
11314 \backslash
11315 textwidth
11316 \family default
11317 .
11318  
11319 \end_layout
11320
11321 \begin_layout Standard
11322 It's possible to change the spacing between a foilhead and the body of the
11323  foil by adjusting the length specified by 
11324 \family typewriter
11325
11326 \backslash
11327 foilheadskip
11328 \family default
11329 .
11330  For example, to make 
11331 \emph on
11332 all
11333 \emph default
11334  foilheads 0.5
11335 \begin_inset space \space{}
11336 \end_inset
11337
11338 in closer to their bodies put the following in the preamble: 
11339 \family typewriter
11340
11341 \backslash
11342 setlength{
11343 \backslash
11344 foilheadskip}{-0.5in}
11345 \end_layout
11346
11347 \begin_layout Standard
11348 The spacings around floats can be adjusted by setting these lengths:
11349 \end_layout
11350
11351 \begin_layout Labeling
11352 \labelwidthstring MMMMMMMMMMM
11353
11354 \family typewriter
11355
11356 \backslash
11357 abovefloatskip
11358 \family default
11359  Separation between the text and the top of the float
11360 \end_layout
11361
11362 \begin_layout Labeling
11363 \labelwidthstring MMMMMMMMMMM
11364
11365 \family typewriter
11366
11367 \backslash
11368 abovecaptionskip
11369 \family default
11370  Separation between the float and the caption
11371 \end_layout
11372
11373 \begin_layout Labeling
11374 \labelwidthstring MMMMMMMMMMM
11375
11376 \family typewriter
11377
11378 \backslash
11379 belowcaptionskip
11380 \family default
11381  Separation between the caption and the following text
11382 \end_layout
11383
11384 \begin_layout Labeling
11385 \labelwidthstring MMMMMMMMMMM
11386
11387 \family typewriter
11388
11389 \backslash
11390 captionwidth
11391 \family default
11392  You can make the captions narrower than the surrounding text by adjusting
11393  this length.
11394  Best done relative to 
11395 \family typewriter
11396
11397 \backslash
11398 textwidth
11399 \family default
11400 .
11401 \end_layout
11402
11403 \begin_layout Standard
11404 There are also several title page related lengths that you may find useful
11405  if you have a long title or several authors:
11406 \end_layout
11407
11408 \begin_layout Labeling
11409 \labelwidthstring MMMMMMMMMMM
11410
11411 \family typewriter
11412
11413 \backslash
11414 abovetitleskip
11415 \family default
11416  Separation from headers to 
11417 \family sans
11418 Title
11419 \end_layout
11420
11421 \begin_layout Labeling
11422 \labelwidthstring MMMMMMMMMMM
11423
11424 \family typewriter
11425
11426 \backslash
11427 titleauthorskip
11428 \family default
11429  between 
11430 \family sans
11431 Title
11432 \family default
11433  and 
11434 \family sans
11435 Author
11436 \family default
11437  environments
11438 \end_layout
11439
11440 \begin_layout Labeling
11441 \labelwidthstring MMMMMMMMMMM
11442
11443 \family typewriter
11444
11445 \backslash
11446 authorauthorskip
11447 \family default
11448  between multiple 
11449 \family sans
11450 Author
11451 \family default
11452  lines
11453 \end_layout
11454
11455 \begin_layout Labeling
11456 \labelwidthstring MMMMMMMMMMM
11457
11458 \family typewriter
11459
11460 \backslash
11461 authordateskip
11462 \family default
11463  between the 
11464 \family sans
11465 Author
11466 \family default
11467  and the 
11468 \family sans
11469 Date
11470 \end_layout
11471
11472 \begin_layout Labeling
11473 \labelwidthstring MMMMMMMMMMM
11474
11475 \family typewriter
11476
11477 \backslash
11478 dateabstractskip
11479 \family default
11480  between the 
11481 \family sans
11482 Date
11483 \family default
11484  and the 
11485 \family sans
11486 Abstract
11487 \end_layout
11488
11489 \begin_layout Standard
11490 The last length related command affects all the list environments.
11491  If you place 
11492 \family typewriter
11493
11494 \backslash
11495 zerolistvertdimens
11496 \family default
11497  
11498 \emph on
11499 inside
11500 \emph default
11501  a list environment then all the vertical spacing between the list items
11502  is removed.
11503  Note that this is a command not a length so it doesn't require 
11504 \family typewriter
11505
11506 \backslash
11507 setlength
11508 \family default
11509  like the stuff mentioned above.
11510 \end_layout
11511
11512 \begin_layout Subsubsection
11513 Headers and Footers
11514 \end_layout
11515
11516 \begin_layout Standard
11517 The 
11518 \family typewriter
11519
11520 \backslash
11521 LogoOn
11522 \family default
11523  and 
11524 \family typewriter
11525
11526 \backslash
11527 LogoOff
11528 \family default
11529  commands control whether the logo in the 
11530 \family sans
11531 MyLogo
11532 \family default
11533  definition appear on a given page.
11534  If you put 
11535 \family typewriter
11536
11537 \backslash
11538 LogoOff
11539 \family default
11540  in the preamble then none of the foils will have the logo on them.
11541  If you don't want the logo on a particular page place the 
11542 \family typewriter
11543
11544 \backslash
11545 LogoOff
11546 \family default
11547  directly after the foilhead of that page and the 
11548 \family typewriter
11549
11550 \backslash
11551 LogoOn
11552 \family default
11553  directly after the next foilhead.
11554 \end_layout
11555
11556 \begin_layout Standard
11557 If you decide to use the 
11558 \family sans
11559 fancy
11560 \family default
11561  page style setting in the 
11562 \family sans
11563 Document
11564 \begin_inset space ~
11565 \end_inset
11566
11567 Layout
11568 \family default
11569  dialog you should probably add 
11570 \family typewriter
11571
11572 \backslash
11573 let
11574 \backslash
11575 headwidth
11576 \backslash
11577 textwidth
11578 \family default
11579  to your preamble so headers and footers on landscape pages are correctly
11580  placed when rotated.
11581  This is due to some clashes between the page layouts provided by the 
11582 \family sans
11583 fancyheadings
11584 \family default
11585  package and the 
11586 \family sans
11587 foils
11588 \family default
11589  class.
11590 \end_layout
11591
11592 \begin_layout Section
11593 Hollywood (Hollywood spec scripts)
11594 \end_layout
11595
11596 \begin_layout Standard
11597 by 
11598 \shape smallcaps
11599 Garst Reese
11600 \end_layout
11601
11602 \begin_layout Subsection
11603 Introduction
11604 \end_layout
11605
11606 \begin_layout Standard
11607 Getting the format of a Hollywood script right is a 
11608 \begin_inset Quotes eld
11609 \end_inset
11610
11611 rite of passage.
11612 \begin_inset Quotes erd
11613 \end_inset
11614
11615  It is designed to make the readers focus on content and to be easy and
11616  familiar for the actors to read.
11617  Each page of a script should be one minute of film.
11618  Nothing goes in a script that you cannot see or hear on screen.
11619  The courier 12 pt font should be used throughout.
11620  No italics.
11621 \end_layout
11622
11623 \begin_layout Subsection
11624 Special problems
11625 \end_layout
11626
11627 \begin_layout Standard
11628 Speakers' lines should NEVER break in mid-sentence.
11629  If a speaker's lines continue over a page break, repeat the 
11630 \family sans
11631 Speaker
11632 \family default
11633  title followed by (Cont'd).
11634 \end_layout
11635
11636 \begin_layout Subsection
11637 Special features
11638 \end_layout
11639
11640 \begin_layout Standard
11641 Insert the 
11642 \family sans
11643 Speaker
11644 \family default
11645  names as labels then cross-reference the label to insert the name.
11646  The cross-reference dialog will show the current cast of characters.
11647  You can use this to insert the speaker name in narratives also.
11648 \end_layout
11649
11650 \begin_layout Subsection
11651 Paper size and Margins
11652 \end_layout
11653
11654 \begin_layout Standard
11655 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11656 \end_layout
11657
11658 \begin_layout Subsection
11659 Environments
11660 \end_layout
11661
11662 \begin_layout Standard
11663 The following environments are available.
11664  You can use hollywood.bind to get the bind keys shown at the right.
11665 \end_layout
11666
11667 \begin_layout Itemize
11668
11669 \family sans
11670 Standard
11671 \begin_inset Newline newline
11672 \end_inset
11673
11674
11675 \family default
11676 Used where nothing else works.
11677  Try to avoid it.
11678 \end_layout
11679
11680 \begin_layout Itemize
11681
11682 \family sans
11683 FADE_IN
11684 \family default
11685 :
11686 \begin_inset space \hfill{}
11687 \end_inset
11688
11689
11690 \family sans
11691 M-z S-I
11692 \family default
11693
11694 \begin_inset Newline newline
11695 \end_inset
11696
11697 Usually followed by something like 
11698 \begin_inset Quotes eld
11699 \end_inset
11700
11701 on Sally waking up.
11702 \begin_inset Quotes erd
11703 \end_inset
11704
11705
11706 \end_layout
11707
11708 \begin_layout Itemize
11709
11710 \family sans
11711 INT:
11712 \begin_inset space \hfill{}
11713 \end_inset
11714
11715 M-z i
11716 \begin_inset Newline newline
11717 \end_inset
11718
11719
11720 \family default
11721 Introduces a new INTERIOR camera set-up.
11722  Always followed by DAY or NIGHT, or something similar to define the lighting
11723  required.
11724  Everthing on this line in CAPS.
11725 \end_layout
11726
11727 \begin_layout Itemize
11728
11729 \family sans
11730 EXT:
11731 \begin_inset space \hfill{}
11732 \end_inset
11733
11734 M-z e
11735 \begin_inset Newline newline
11736 \end_inset
11737
11738
11739 \family default
11740 Introduces a new EXTERIOR camera set-up.
11741  Everthing on this line in CAPS.
11742 \end_layout
11743
11744 \begin_layout Itemize
11745
11746 \family sans
11747 Speaker
11748 \begin_inset space \hfill{}
11749 \end_inset
11750
11751 M-z s
11752 \begin_inset Newline newline
11753 \end_inset
11754
11755
11756 \family default
11757 The character speaking.
11758 \end_layout
11759
11760 \begin_layout Itemize
11761
11762 \family sans
11763 Parenthetical
11764 \begin_inset space \hfill{}
11765 \end_inset
11766
11767 M-z p
11768 \begin_inset Newline newline
11769 \end_inset
11770
11771
11772 \family default
11773 Instructions to the speaker.
11774  The () are automatically inserted, but only the ( will show in LyX.
11775  Both will be printed.
11776 \end_layout
11777
11778 \begin_layout Itemize
11779
11780 \family sans
11781 Dialogue
11782 \begin_inset space \hfill{}
11783 \end_inset
11784
11785 M-z d
11786 \begin_inset Newline newline
11787 \end_inset
11788
11789
11790 \family default
11791 What the 
11792 \family sans
11793 Speaker
11794 \family default
11795  says.
11796 \end_layout
11797
11798 \begin_layout Itemize
11799
11800 \family sans
11801 Transition
11802 \begin_inset space \hfill{}
11803 \end_inset
11804
11805 M-z t
11806 \begin_inset Newline newline
11807 \end_inset
11808
11809
11810 \family default
11811 Camera movement instruction.
11812  e.
11813 \begin_inset space \thinspace{}
11814 \end_inset
11815
11816 g.
11817 \begin_inset space \space{}
11818 \end_inset
11819
11820 CUT TO:
11821 \end_layout
11822
11823 \begin_layout Itemize
11824
11825 \family sans
11826 FADE OUT:
11827 \begin_inset space \hfill{}
11828 \end_inset
11829
11830 M-z S-I
11831 \end_layout
11832
11833 \begin_layout Itemize
11834
11835 \family sans
11836 Author
11837 \begin_inset space \hfill{}
11838 \end_inset
11839
11840 M-z S-A
11841 \end_layout
11842
11843 \begin_layout Itemize
11844
11845 \family sans
11846 Title
11847 \begin_inset space \hfill{}
11848 \end_inset
11849
11850 M-z S-T
11851 \end_layout
11852
11853 \begin_layout Itemize
11854
11855 \family sans
11856 Right_Address
11857 \begin_inset space \hfill{}
11858 \end_inset
11859
11860 M-z r
11861 \end_layout
11862
11863 \begin_layout Subsection
11864 Script jargon
11865 \end_layout
11866
11867 \begin_layout Itemize
11868 (O.S) — off screen
11869 \end_layout
11870
11871 \begin_layout Itemize
11872 (V.0) — voice over
11873 \end_layout
11874
11875 \begin_layout Itemize
11876 b.
11877 \begin_inset space \thinspace{}
11878 \end_inset
11879
11880 g.
11881  — background
11882 \end_layout
11883
11884 \begin_layout Itemize
11885 C.U.
11886  — close-up
11887 \end_layout
11888
11889 \begin_layout Itemize
11890 PAN — camera movement
11891 \end_layout
11892
11893 \begin_layout Itemize
11894 INSERT — cut to close-up of
11895 \end_layout
11896
11897 \begin_layout Section
11898 ijmpc and ijmpd
11899 \end_layout
11900
11901 \begin_layout Standard
11902 by 
11903 \noun on
11904 Panayotis Papasotiriou
11905 \end_layout
11906
11907 \begin_layout Subsection
11908 Overview
11909 \end_layout
11910
11911 \begin_layout Standard
11912 The ijmpc package is a set of macros that facilitates electronic manuscript
11913  submission to the 
11914 \emph on
11915 International Journal of Modern Physics C
11916 \emph default
11917 .
11918  Similarly, the ijmpd package is for creating manuscripts to be submitted
11919  to the 
11920 \emph on
11921 International Journal of Modern Physics D
11922 \emph default
11923 .
11924  Both journals are published by World Scientific.
11925  The corresponding document classes are named 
11926 \family typewriter
11927 ws-ijmpc.cls
11928 \family default
11929  and 
11930 \family typewriter
11931 ws-ijmpd.cls
11932 \family default
11933 , respectively.
11934  These files, together with instructions for the authors, can be downloaded
11935  from the sites 
11936 \begin_inset Flex URL
11937 status collapsed
11938
11939 \begin_layout Plain Layout
11940
11941 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11942 \end_layout
11943
11944 \end_inset
11945
11946  and 
11947 \begin_inset Flex URL
11948 status collapsed
11949
11950 \begin_layout Plain Layout
11951
11952 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11953 \end_layout
11954
11955 \end_inset
11956
11957 .
11958  Both packages are modified versions of the standard 
11959 \begin_inset Quotes eld
11960 \end_inset
11961
11962 article
11963 \begin_inset Quotes erd
11964 \end_inset
11965
11966  package, and they are almost (but not exactly) identical.
11967  Most of their features are supported by LyX.
11968  I have used LyX successfully to write articles submitted to both journals
11969  without any problem.
11970 \end_layout
11971
11972 \begin_layout Subsection
11973 Writing a paper
11974 \end_layout
11975
11976 \begin_layout Standard
11977 As usual, the easiest way to write a paper is to start with a template.
11978  Click on 
11979 \family sans
11980 File\SpecialChar \menuseparator
11981 New from
11982 \family default
11983  
11984 \family sans
11985 \bar under
11986 T
11987 \bar default
11988 emplate
11989 \family default
11990 , then choose the 
11991 \family typewriter
11992 ijmpc.lyx
11993 \family default
11994  or 
11995 \family typewriter
11996 ijmpd.lyx
11997 \family default
11998  template.
11999  This will give an (almost) empty document that includes the most common
12000  fields found in a manuscript.
12001  Simply overwrite the existing text (including the brackets, 
12002 \family typewriter
12003 <>
12004 \family default
12005 ) with your text.
12006  You should keep in mind the following remarks.
12007 \end_layout
12008
12009 \begin_layout Enumerate
12010 LyX won't let you change the font size and the page style of the document,
12011  because such modifications are not allowed by both packages.
12012 \end_layout
12013
12014 \begin_layout Enumerate
12015 The language of the document should not be changed.
12016  Before previewing your paper, be sure that the babel package is not used.
12017  To do this, click on 
12018 \family sans
12019 Tools\SpecialChar \menuseparator
12020 Preferences
12021 \family default
12022 , select the 
12023 \family sans
12024 Lang Opts
12025 \family default
12026  tab, deselect the 
12027 \family sans
12028 Use babel
12029 \family default
12030  checkbox in the language settings, and click on 
12031 \family sans
12032 Apply
12033 \family default
12034  (or 
12035 \family sans
12036 Save
12037 \family default
12038 , if you wish to make this change permanent).
12039 \end_layout
12040
12041 \begin_layout Enumerate
12042 The 
12043 \begin_inset Quotes eld
12044 \end_inset
12045
12046 Keywords
12047 \begin_inset Quotes erd
12048 \end_inset
12049
12050  style must be used to define keywords.
12051 \end_layout
12052
12053 \begin_layout Enumerate
12054 The ijmpc package provides a style named 
12055 \begin_inset Quotes eld
12056 \end_inset
12057
12058 Classification Codes
12059 \begin_inset Quotes erd
12060 \end_inset
12061
12062 , which can be used to define classification codes, such as PACS numbers.
12063  Note that this facility is not supported by the ijmpd package.
12064 \end_layout
12065
12066 \begin_layout Enumerate
12067 Several new environments are available: 
12068 \begin_inset Quotes eld
12069 \end_inset
12070
12071 Definition
12072 \begin_inset Quotes erd
12073 \end_inset
12074
12075
12076 \begin_inset Quotes eld
12077 \end_inset
12078
12079 Step
12080 \begin_inset Quotes erd
12081 \end_inset
12082
12083
12084 \begin_inset Quotes eld
12085 \end_inset
12086
12087 Example
12088 \begin_inset Quotes erd
12089 \end_inset
12090
12091
12092 \begin_inset Quotes eld
12093 \end_inset
12094
12095 Remark
12096 \begin_inset Quotes erd
12097 \end_inset
12098
12099
12100 \begin_inset Quotes eld
12101 \end_inset
12102
12103 Notation
12104 \begin_inset Quotes erd
12105 \end_inset
12106
12107
12108 \begin_inset Quotes eld
12109 \end_inset
12110
12111 Theorem
12112 \begin_inset Quotes erd
12113 \end_inset
12114
12115
12116 \begin_inset Quotes eld
12117 \end_inset
12118
12119 Proof
12120 \begin_inset Quotes erd
12121 \end_inset
12122
12123
12124 \begin_inset Quotes eld
12125 \end_inset
12126
12127 Corollary
12128 \begin_inset Quotes erd
12129 \end_inset
12130
12131
12132 \begin_inset Quotes eld
12133 \end_inset
12134
12135 Lemma
12136 \begin_inset Quotes erd
12137 \end_inset
12138
12139
12140 \begin_inset Quotes eld
12141 \end_inset
12142
12143 Proposition
12144 \begin_inset Quotes erd
12145 \end_inset
12146
12147
12148 \begin_inset Quotes eld
12149 \end_inset
12150
12151 Prop
12152 \begin_inset Quotes erd
12153 \end_inset
12154
12155
12156 \begin_inset Quotes eld
12157 \end_inset
12158
12159 Question
12160 \begin_inset Quotes erd
12161 \end_inset
12162
12163
12164 \begin_inset Quotes eld
12165 \end_inset
12166
12167 Claim
12168 \begin_inset Quotes erd
12169 \end_inset
12170
12171 , and 
12172 \begin_inset Quotes eld
12173 \end_inset
12174
12175 Conjecture
12176 \begin_inset Quotes erd
12177 \end_inset
12178
12179 .
12180  Their use is more or less obvious.
12181  LyX supports all these environments; it will use the proper label, text
12182  style, and numbering scheme for each of them.
12183 \end_layout
12184
12185 \begin_layout Enumerate
12186 Both packages use basic citations; the natbib package should not be used.
12187  In LyX, citation references are shown as usual; in the output, citations
12188  are shown as superscripts.
12189  If you want to use a citation as normal text, you should use the 
12190 \family typewriter
12191 refcite
12192 \family default
12193  command, e.
12194 \begin_inset space \thinspace{}
12195 \end_inset
12196
12197 g.
12198 \begin_inset space \space{}
12199 \end_inset
12200
12201
12202 \begin_inset Quotes eld
12203 \end_inset
12204
12205 See Ref.
12206 \begin_inset space \space{}
12207 \end_inset
12208
12209
12210 \family typewriter
12211
12212 \backslash
12213 refcite{key}
12214 \family default
12215
12216 \begin_inset Quotes erd
12217 \end_inset
12218
12219 .
12220 \end_layout
12221
12222 \begin_layout Enumerate
12223 There is no 
12224 \begin_inset Quotes eld
12225 \end_inset
12226
12227 Acknowledgments
12228 \begin_inset Quotes erd
12229 \end_inset
12230
12231  section in both packages.
12232  To put acknowledgments, just use the 
12233 \begin_inset Quotes eld
12234 \end_inset
12235
12236 Section*
12237 \begin_inset Quotes erd
12238 \end_inset
12239
12240  environment.
12241 \end_layout
12242
12243 \begin_layout Enumerate
12244 Appendices may be added to the paper, 
12245 \emph on
12246 after
12247 \emph default
12248  the Acknowledgments and 
12249 \shape italic
12250 before
12251 \shape default
12252  the References.
12253  LyX provides a special environment, called 
12254 \begin_inset Quotes eld
12255 \end_inset
12256
12257 Appendices Section
12258 \begin_inset Quotes erd
12259 \end_inset
12260
12261  which marks the beginning of the appendices.
12262  This environment should be left blank; it just sends a LaTeX command, but
12263  nothing is really printed.
12264  In LyX, the word 
12265 \begin_inset Quotes eld
12266 \end_inset
12267
12268 Appendix
12269 \begin_inset Quotes erd
12270 \end_inset
12271
12272  is printed with blue letters, as a signal that all sections after that
12273  point are appendices.
12274  To write an appendix, use the 
12275 \begin_inset Quotes eld
12276 \end_inset
12277
12278 Appendix
12279 \begin_inset Quotes erd
12280 \end_inset
12281
12282  environment.
12283  LyX will number each appendix with capital letters, as required by both
12284  journals.
12285  Note that 
12286 \begin_inset Quotes eld
12287 \end_inset
12288
12289 Appendices Section
12290 \begin_inset Quotes erd
12291 \end_inset
12292
12293  
12294 \emph on
12295 must
12296 \emph default
12297  be present before the first appendix; if not, all appendices will be numbered
12298  as normal sections in the output.
12299 \end_layout
12300
12301 \begin_layout Enumerate
12302 The ijmpc and the ijmpd packages use the 
12303 \family typewriter
12304 tbl
12305 \family default
12306  command to implement table captions.
12307  As a result, a table created by LyX is printed correctly, but its caption
12308  is ignored.
12309  However, you can use some TeX code to overcome this problem, so that captions
12310  are printed as expected.
12311  To do so, create a float table as usual, remove the caption, and replace
12312  it with the TeX code 
12313 \family typewriter
12314
12315 \backslash
12316 tbl{
12317 \emph on
12318 your table caption
12319 \emph default
12320 }{
12321 \family default
12322  (sic); you must also the TeX code 
12323 \family typewriter
12324 }
12325 \family default
12326  immediately after the tabular material.
12327  Study the example table included in the template files to see how this
12328  trick is implemented.
12329  Alternatively, If you need table captions, you should implement the whole
12330  table float in a 
12331 \family typewriter
12332 .tex
12333 \family default
12334  file, then include this file to the LyX document (
12335 \family sans
12336 Insert\SpecialChar \menuseparator
12337 File\SpecialChar \menuseparator
12338 Child
12339 \begin_inset space ~
12340 \end_inset
12341
12342 Document
12343 \family default
12344 ).
12345  Details on how to create a table float can be found in the files 
12346 \family typewriter
12347 ws-ijmpc.tex
12348 \family default
12349  and 
12350 \family typewriter
12351 ws-ijmpd.tex
12352 \family default
12353 , included in the corresponding packages.
12354 \end_layout
12355
12356 \begin_layout Subsection
12357 Preparing a paper for submission
12358 \end_layout
12359
12360 \begin_layout Standard
12361 Before you submit your paper you must export the LyX document as a LaTeX
12362  file (
12363 \family sans
12364 File\SpecialChar \menuseparator
12365 Export\SpecialChar \menuseparator
12366 LaTeX
12367 \family default
12368 )
12369 \begin_inset Foot
12370 status open
12371
12372 \begin_layout Plain Layout
12373 Actually you have the choice between LaTeX (plain) and pdflatex.
12374  If you intend to use pdflatex to prepare the paper, you should use the
12375  pdflatex option so that included graphics are converted to PDF format,
12376  ready for use by pdflatex.
12377 \end_layout
12378
12379 \end_inset
12380
12381 , then make the following changes to the resulting 
12382 \family typewriter
12383 .tex
12384 \family default
12385  file.
12386 \end_layout
12387
12388 \begin_layout Enumerate
12389 Remove the comment lines before the 
12390 \family typewriter
12391
12392 \backslash
12393 documentclass
12394 \family default
12395  command.
12396 \end_layout
12397
12398 \begin_layout Enumerate
12399 Remove everything between (and including) the 
12400 \family typewriter
12401
12402 \backslash
12403 makeatletter
12404 \family default
12405  and 
12406 \family typewriter
12407
12408 \backslash
12409 makeatother
12410 \family default
12411  commands, except for any commands you specifically put into the LaTeX preamble.
12412 \end_layout
12413
12414 \begin_layout Standard
12415 The modified 
12416 \family typewriter
12417 .tex
12418 \family default
12419  file should be saved and processed through LaTeX as many times as necessary.
12420  You may also want to check the resulting 
12421 \family typewriter
12422 .dvi
12423 \family default
12424  document.
12425 \end_layout
12426
12427 \begin_layout Subsection
12428 Use of TeX code
12429 \end_layout
12430
12431 \begin_layout Standard
12432 The use of TeX code is reduced to two commands, which must be placed at
12433  the top of the document.
12434  If you started writing your paper by using the 
12435 \family typewriter
12436 ijmpc.lyx
12437 \family default
12438  or the 
12439 \family typewriter
12440 ijmpd.lyx
12441 \family default
12442  template, the TeX code needed is already in its place; you usually don't
12443  need to delete it.
12444  You may only modify the first TeX code to specify the information printed
12445  to the top of odd and even pages (authors' names and short paper's title,
12446  respectively).
12447  This TeX code must have the form 
12448 \family typewriter
12449
12450 \backslash
12451 markboth{Authors' Names}{Short Paper's Title}
12452 \family default
12453 .
12454 \end_layout
12455
12456 \begin_layout Section
12457 iopart
12458 \end_layout
12459
12460 \begin_layout Standard
12461 by 
12462 \noun on
12463 Uwe Stöhr
12464 \end_layout
12465
12466 \begin_layout Subsection
12467 Overview
12468 \end_layout
12469
12470 \begin_layout Standard
12471 The iopart package provides a document class to create electronic manuscript
12472  submission to the journals published by the Institute of Physics.
12473  Instructions for the authors how to create a paper using the iopart class
12474  can be downloaded together with the iopart package from the site 
12475 \begin_inset Flex URL
12476 status collapsed
12477
12478 \begin_layout Plain Layout
12479
12480 ftp://ftp.iop.org/pub/journals/latex2e
12481 \end_layout
12482
12483 \end_inset
12484
12485 .
12486 \end_layout
12487
12488 \begin_layout Subsection
12489 Writing a paper
12490 \end_layout
12491
12492 \begin_layout Standard
12493 The easiest way to write a paper is to start with the file 
12494 \emph on
12495 IOP-article.lyx
12496 \emph default
12497  that is available in LyX's examples files folder.
12498  Open this file, save it under a new name, and start writing.
12499  The example file explains how to use the special text environments.
12500  Here are the most important advices:
12501 \end_layout
12502
12503 \begin_layout Itemize
12504 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12505  two options 
12506 \family sans
12507 Use AMS math package
12508 \family default
12509  in the document settings under 
12510 \family sans
12511 Math Options
12512 \family default
12513  are not used!
12514 \end_layout
12515
12516 \begin_layout Itemize
12517
12518 \size normal
12519 The title environment defines the kind of your paper.
12520  So use one of the following environments for the title:
12521 \end_layout
12522
12523 \begin_deeper
12524 \begin_layout Itemize
12525
12526 \family sans
12527 \size normal
12528 Title
12529 \family default
12530  for a Paper
12531 \end_layout
12532
12533 \begin_layout Itemize
12534
12535 \family sans
12536 \size normal
12537 Review
12538 \family default
12539  for a Review
12540 \end_layout
12541
12542 \begin_layout Itemize
12543
12544 \family sans
12545 \size normal
12546 Topical
12547 \family default
12548  for a Topical review
12549 \end_layout
12550
12551 \begin_layout Itemize
12552
12553 \family sans
12554 \size normal
12555 Comment
12556 \family default
12557  for a Comment
12558 \end_layout
12559
12560 \begin_layout Itemize
12561
12562 \family sans
12563 \size normal
12564 Note
12565 \family default
12566  for a Note
12567 \end_layout
12568
12569 \begin_layout Itemize
12570
12571 \family sans
12572 \size normal
12573 Paper
12574 \family default
12575  for a Paper (same as Title)
12576 \end_layout
12577
12578 \begin_layout Itemize
12579
12580 \family sans
12581 \size normal
12582 Prelim
12583 \family default
12584  for a Preliminary communication
12585 \end_layout
12586
12587 \begin_layout Itemize
12588
12589 \family sans
12590 \size normal
12591 Rapid
12592 \family default
12593  for a Rapid communication
12594 \end_layout
12595
12596 \begin_layout Itemize
12597
12598 \family sans
12599 \size normal
12600 Letter
12601 \family default
12602  for a Letter to the editor
12603 \end_layout
12604
12605 \end_deeper
12606 \begin_layout Itemize
12607
12608 \size normal
12609 All title environments except of 
12610 \family sans
12611 Letter
12612 \family default
12613  can have an optional short title.
12614 \end_layout
12615
12616 \begin_layout Itemize
12617 There is a general title environment 
12618 \family sans
12619 Article
12620 \family default
12621  which is not directly supported by the LyX.
12622  This can be used as TeX code when your document doesn't fit into one of
12623  the other title types.
12624 \end_layout
12625
12626 \begin_layout Standard
12627 For more informations like hints for special table and formula formatting,
12628  look at the IOP author guidelines.
12629 \end_layout
12630
12631 \begin_layout Section
12632 Kluwer
12633 \end_layout
12634
12635 \begin_layout Standard
12636 by 
12637 \noun on
12638 Panayotis Papasotiriou
12639 \end_layout
12640
12641 \begin_layout Subsection
12642 Overview
12643 \end_layout
12644
12645 \begin_layout Standard
12646 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12647  that facilitates electronic manuscript submission to the journals they
12648  publish.
12649  Most known of them (at least in my domain of interest) are 
12650 \emph on
12651 Astrophysics and Space Science
12652 \emph default
12653  and 
12654 \emph on
12655 Solar Physics
12656 \emph default
12657 , but there are many others (see a complete list at 
12658 \begin_inset Flex URL
12659 status open
12660
12661 \begin_layout Plain Layout
12662
12663 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12664 \end_layout
12665
12666 \end_inset
12667
12668 ).
12669  The Kluwer package may be downloaded from the site 
12670 \begin_inset Flex URL
12671 status collapsed
12672
12673 \begin_layout Plain Layout
12674
12675 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12676 \end_layout
12677
12678 \end_inset
12679
12680 .
12681  A complete user guide is contained in that package (but it can also be
12682  downloaded separately).
12683 \end_layout
12684
12685 \begin_layout Standard
12686 LyX supports many features of the package but not everything.
12687  However, the TeX code needed is reduced to some 
12688 \begin_inset Quotes eld
12689 \end_inset
12690
12691 peculiar
12692 \begin_inset Quotes erd
12693 \end_inset
12694
12695  commands of the package (see
12696 \begin_inset space ~
12697 \end_inset
12698
12699
12700 \begin_inset CommandInset ref
12701 LatexCommand ref
12702 reference "subsec:kluwer_peculiarities"
12703
12704 \end_inset
12705
12706 ).
12707  I have recently used LyX to write an article submitted to the 
12708 \emph on
12709 Astrophysics and Space Science
12710 \emph default
12711  without any problem.
12712 \end_layout
12713
12714 \begin_layout Subsection
12715 Writing a paper
12716 \end_layout
12717
12718 \begin_layout Standard
12719 The easiest way to write a paper is to start with the Kluwer template file.
12720  Click on 
12721 \family sans
12722 File\SpecialChar \menuseparator
12723 New from
12724 \family default
12725  
12726 \family sans
12727 Template
12728 \family default
12729 , then choose the 
12730 \family typewriter
12731 kluwer.lyx
12732 \family default
12733  template.
12734  This will give an (almost) empty document that includes the most common
12735  fields found in a manuscript and a short description of their use.
12736  As in most templates, simply overwrite the existing text (including the
12737  brackets, 
12738 \family typewriter
12739 <>
12740 \family default
12741 ) with the correct information.
12742 \end_layout
12743
12744 \begin_layout Subsection
12745 Preparing a paper for submission
12746 \end_layout
12747
12748 \begin_layout Standard
12749 As in the AASTeX package, before you submit your paper to a journal you
12750  must 
12751 \begin_inset Quotes eld
12752 \end_inset
12753
12754 postprocess
12755 \begin_inset Quotes erd
12756 \end_inset
12757
12758  it as follows.
12759 \end_layout
12760
12761 \begin_layout Enumerate
12762 Export your paper as a LaTeX file.
12763  To do this, click on 
12764 \family sans
12765 File\SpecialChar \menuseparator
12766 Export\SpecialChar \menuseparator
12767 LaTeX
12768 \family default
12769 .
12770  
12771 \end_layout
12772
12773 \begin_layout Enumerate
12774 Edit the resulting 
12775 \family typewriter
12776 .tex
12777 \family default
12778  file with a text editor and make the following changes
12779 \end_layout
12780
12781 \begin_deeper
12782 \begin_layout Enumerate
12783 remove the comment lines before the 
12784 \family typewriter
12785
12786 \backslash
12787 documentclass
12788 \family default
12789  command,
12790 \end_layout
12791
12792 \begin_layout Enumerate
12793 remove everything between (and including) the 
12794 \family typewriter
12795
12796 \backslash
12797 makeatletter
12798 \family default
12799  and 
12800 \family typewriter
12801
12802 \backslash
12803 makeatother
12804 \family default
12805  commands, except for any commands you specifically put into the LaTeX preamble.
12806 \end_layout
12807
12808 \begin_layout Standard
12809 Save the resulting 
12810 \family typewriter
12811 .tex
12812 \family default
12813  file.
12814 \end_layout
12815
12816 \end_deeper
12817 \begin_layout Enumerate
12818 Run the 
12819 \family typewriter
12820 .tex
12821 \family default
12822  file through LaTeX as many times as necessary (usually up to three).
12823 \end_layout
12824
12825 \begin_layout Enumerate
12826 View the resulting 
12827 \family typewriter
12828 .dvi
12829 \family default
12830  document using, e.
12831 \begin_inset space \thinspace{}
12832 \end_inset
12833
12834 g.
12835 \begin_inset space \space{}
12836 \end_inset
12837
12838
12839 \family sans
12840 xdvi
12841 \family default
12842 , and check if everything is OK (it should, if you didn't make any mistake).
12843 \end_layout
12844
12845 \begin_layout Subsection
12846 \begin_inset Quotes eld
12847 \end_inset
12848
12849 Peculiarities
12850 \begin_inset Quotes erd
12851 \end_inset
12852
12853  of the Kluwer package
12854 \begin_inset CommandInset label
12855 LatexCommand label
12856 name "subsec:kluwer_peculiarities"
12857
12858 \end_inset
12859
12860
12861 \end_layout
12862
12863 \begin_layout Standard
12864 The Kluwer package has the following 
12865 \begin_inset Quotes eld
12866 \end_inset
12867
12868 peculiarities
12869 \begin_inset Quotes erd
12870 \end_inset
12871
12872 .
12873 \end_layout
12874
12875 \begin_layout Enumerate
12876 It is possible to write multiple articles in the same LaTeX file
12877 \begin_inset Foot
12878 status collapsed
12879
12880 \begin_layout Plain Layout
12881 I can't imagine any good reason to do this.
12882 \end_layout
12883
12884 \end_inset
12885
12886 .
12887  Each article must be included in the environment 
12888 \begin_inset Quotes eld
12889 \end_inset
12890
12891 article
12892 \begin_inset Quotes erd
12893 \end_inset
12894
12895 .
12896  Unfortunately, this environment cannot be omitted, even if you write just
12897  one article.
12898  Therefore, each article starts with the command 
12899 \family typewriter
12900
12901 \backslash
12902 begin{article}
12903 \family default
12904  and, obviously, ends with the command 
12905 \family typewriter
12906
12907 \backslash
12908 end{article}
12909 \family default
12910 .
12911  Although this can be implemented in LyX, I didn't included it, since it
12912  looks ugly and can confuse the novice user.
12913  Therefore, you need to enter them directly and mark them as LaTeX code
12914  (the well-known 
12915 \begin_inset Quotes eld
12916 \end_inset
12917
12918 TeX code
12919 \begin_inset Quotes erd
12920 \end_inset
12921
12922 ).
12923 \end_layout
12924
12925 \begin_layout Enumerate
12926 Information given at the beginning of the article (i.
12927 \begin_inset space \thinspace{}
12928 \end_inset
12929
12930 e.
12931 \begin_inset space \space{}
12932 \end_inset
12933
12934 title, subtitle, author, institution, running title, running author, abstract
12935  and keywords) must be included in an environment called 
12936 \begin_inset Quotes eld
12937 \end_inset
12938
12939 opening
12940 \begin_inset Quotes erd
12941 \end_inset
12942
12943 .
12944  This is not implemented in LyX, so you must enter title, subtitle etc.
12945 \begin_inset space ~
12946 \end_inset
12947
12948 between two TeX code lines (
12949 \family typewriter
12950
12951 \backslash
12952 begin{opening}
12953 \family default
12954  and 
12955 \family typewriter
12956
12957 \backslash
12958 end{opening}
12959 \family default
12960 ).
12961 \end_layout
12962
12963 \begin_layout Enumerate
12964 According to the user manual, the label of each bibliography item must be
12965  written as 
12966 \family typewriter
12967
12968 \backslash
12969 protect
12970 \backslash
12971 citeauthoryear{
12972 \family default
12973 \emph on
12974 author(s)
12975 \family typewriter
12976 \emph default
12977 }{
12978 \family default
12979 \emph on
12980 year
12981 \family typewriter
12982 \emph default
12983 }
12984 \family default
12985 .
12986 \end_layout
12987
12988 \begin_layout Standard
12989 The 
12990 \family typewriter
12991 kluwer.lyx
12992 \family default
12993  template takes care of all these 
12994 \begin_inset Quotes eld
12995 \end_inset
12996
12997 peculiarities
12998 \begin_inset Quotes erd
12999 \end_inset
13000
13001 .
13002  If you start a new paper using this template you don't need to do anything
13003  special.
13004  Just 
13005 \end_layout
13006
13007 \begin_layout Enumerate
13008 don't delete the TeX code included in the template, and
13009 \end_layout
13010
13011 \begin_layout Enumerate
13012 copy the example bibliography item included in the template and modify it
13013  as necessary to enter new bibliography items.
13014 \end_layout
13015
13016 \begin_layout Section
13017 Koma-Script
13018 \end_layout
13019
13020 \begin_layout Standard
13021 by 
13022 \noun on
13023 Bernd Rellermeyer
13024 \end_layout
13025
13026 \begin_layout Subsection
13027 Overview
13028 \end_layout
13029
13030 \begin_layout Standard
13031 The LyX document classes 
13032 \emph on
13033 article (koma-script)
13034 \emph default
13035
13036 \emph on
13037 report (koma-script)
13038 \emph default
13039
13040 \emph on
13041 book
13042 \emph default
13043  
13044 \emph on
13045 (koma-script)
13046 \emph default
13047 , and 
13048 \emph on
13049 letter
13050 \emph default
13051  
13052 \emph on
13053 (koma-script)
13054 \emph default
13055  correspond to the LaTeX document classes 
13056 \family typewriter
13057 scrartcl.cls
13058 \family default
13059
13060 \family typewriter
13061 scrreprt.cls
13062 \family default
13063
13064 \family typewriter
13065 scrbook.cls
13066 \family default
13067 , and 
13068 \family typewriter
13069 scrlettr.cls
13070 \family default
13071 , resp.
13072 \begin_inset space ~
13073 \end_inset
13074
13075 of the Koma-Script family.
13076  They are replacements for the standard document classes 
13077 \family typewriter
13078 article.cls
13079 \family default
13080
13081 \family typewriter
13082 report.cls
13083 \family default
13084
13085 \family typewriter
13086 book.cls
13087 \family default
13088  and 
13089 \family typewriter
13090 letter.cls
13091 \family default
13092 , resp., and fit better to European typography conventions in a number of
13093  points.
13094 \end_layout
13095
13096 \begin_layout Itemize
13097 Standard character size is 11pt in 
13098 \emph on
13099 article (koma-script)
13100 \emph default
13101
13102 \emph on
13103 report (koma-script)
13104 \emph default
13105 , and 
13106 \emph on
13107 book (koma-script)
13108 \emph default
13109 , and 12pt in 
13110 \emph on
13111 letter (koma-script)
13112 \emph default
13113 .
13114 \end_layout
13115
13116 \begin_layout Itemize
13117 Headings, labels of the description environment, and a number of elements
13118  of the 
13119 \emph on
13120 letter (koma-script)
13121 \emph default
13122  document class are set in a bold sans serif font.
13123 \begin_inset Foot
13124 status collapsed
13125
13126 \begin_layout Plain Layout
13127 There is a big difference between the bold sans serif old cm fonts and new
13128  ec fonts, especially in the appearance of headings.
13129  In comparison, the ec bold sans serif fonts look a bit thin.
13130  Here the LaTeX package 
13131 \family typewriter
13132 cmsd.sty by
13133 \family default
13134  
13135 \shape smallcaps
13136 Walter Schmidt
13137 \shape default
13138  helps to produce the 
13139 \begin_inset Quotes eld
13140 \end_inset
13141
13142 usual
13143 \begin_inset Quotes erd
13144 \end_inset
13145
13146  appearance when using the ec fonts.
13147 \end_layout
13148
13149 \end_inset
13150
13151  The numbering of chapter headings is made in the same way as the numbering
13152  of section headings, that is without the extra line 
13153 \begin_inset Quotes eld
13154 \end_inset
13155
13156 Chapter\SpecialChar \ldots{}
13157
13158 \begin_inset Quotes erd
13159 \end_inset
13160
13161 .
13162  In addition, the appearance of the headings can be modified by using a
13163  number of options (in LyX to be entered in the field 
13164 \family sans
13165 Extra
13166 \begin_inset space ~
13167 \end_inset
13168
13169 Options
13170 \family default
13171  of the dialog 
13172 \family sans
13173 Layout\SpecialChar \menuseparator
13174 Document
13175 \family default
13176 ).
13177  
13178 \end_layout
13179
13180 \begin_layout Itemize
13181 The main means in the Koma-Script document classes to design the type area
13182  are the options 
13183 \family sans
13184 BCOR
13185 \family default
13186  and 
13187 \family sans
13188 DIV
13189 \family default
13190  (in LyX to be entered in the extra class options field in the dialog 
13191 \family sans
13192 Document\SpecialChar \menuseparator
13193 Settings
13194 \family default
13195 ).
13196  They make a clearer modification of page margins possible as do the options
13197  of the dialog 
13198 \family sans
13199 Document\SpecialChar \menuseparator
13200 Settings
13201 \family default
13202 .
13203  
13204 \end_layout
13205
13206 \begin_layout Itemize
13207 The LaTeX document classes of the Koma-Script family define a number of
13208  additional commands.
13209  Those part of it which makes sense in LyX is implemented in corresponding
13210  paragraph types.
13211 \end_layout
13212
13213 \begin_layout Standard
13214 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13215  can be found in the Koma-Script documentation 
13216 \emph on
13217 scrguide
13218 \emph default
13219  (German) and 
13220 \emph on
13221 scrguien
13222 \emph default
13223  (English).
13224 \end_layout
13225
13226 \begin_layout Subsection
13227 article (koma-script), report (koma-script), and book (koma-script)
13228 \end_layout
13229
13230 \begin_layout Standard
13231 The document classes 
13232 \emph on
13233 article (koma-script)
13234 \emph default
13235
13236 \emph on
13237 report (koma-script)
13238 \emph default
13239 , and 
13240 \emph on
13241 book
13242 \emph default
13243  
13244 \emph on
13245 (koma-script)
13246 \emph default
13247  are implemented in the layout files 
13248 \family typewriter
13249 scrartcl.layout
13250 \family default
13251
13252 \family typewriter
13253 scrreprt.layout
13254 \family default
13255 , and 
13256 \family typewriter
13257 scrbook.layout
13258 \family default
13259 , resp.
13260  They contain all the paragraph types of the corresponding standard document
13261  classes 
13262 \emph on
13263 article
13264 \emph default
13265
13266 \emph on
13267 report
13268 \emph default
13269 , and 
13270 \emph on
13271 book
13272 \emph default
13273 , resp., partly modified, with the exception of the LyX specific 
13274 \family sans
13275 List
13276 \family default
13277 -type, which is replaced by the new 
13278 \family sans
13279 Labeling
13280 \family default
13281 -type having the same functionality.
13282  Beside the 
13283 \family sans
13284 Labeling
13285 \family default
13286 -Type there is a number of new paragraph types added.
13287  They are 
13288 \emph on
13289 not
13290 \emph default
13291  part of 
13292 \emph on
13293 letter (koma-script)
13294 \emph default
13295 .
13296 \end_layout
13297
13298 \begin_layout Itemize
13299
13300 \family sans
13301 Addpart, Addchap
13302 \family default
13303
13304 \family sans
13305 Addsec
13306 \family default
13307 : are equivalents to 
13308 \family sans
13309 Part*, Chapter*
13310 \family default
13311  and 
13312 \family sans
13313 Section*
13314 \family default
13315 , resp., additionally inserting an entry in the table of contents.
13316  
13317 \family sans
13318 Addpart
13319 \family default
13320  and 
13321 \family sans
13322 Addchap
13323 \family default
13324  are not contained in 
13325 \emph on
13326 article (koma-script)
13327 \emph default
13328 .
13329 \end_layout
13330
13331 \begin_layout Itemize
13332
13333 \family sans
13334 Addchap*
13335 \family default
13336
13337 \family sans
13338 Addsec*
13339 \family default
13340 : behave exactly as 
13341 \family sans
13342 Addchap
13343 \family default
13344  and 
13345 \family sans
13346 Addsec
13347 \family default
13348 , resp., additionally clearing running heads.
13349  
13350 \family sans
13351 Addchap*
13352 \family default
13353  is not contained in 
13354 \emph on
13355 article (koma-script)
13356 \emph default
13357 .
13358 \begin_inset Foot
13359 status collapsed
13360
13361 \begin_layout Plain Layout
13362 There is also an 
13363 \family typewriter
13364
13365 \backslash
13366 addpart*
13367 \family default
13368  command in 
13369 \emph on
13370 book (koma-script)
13371 \emph default
13372  and in 
13373 \emph on
13374 report (koma-script)
13375 \emph default
13376 , but since this is identical to 
13377 \family sans
13378 Part*
13379 \family default
13380 , is has not been implemented in LyX.
13381 \end_layout
13382
13383 \end_inset
13384
13385
13386 \end_layout
13387
13388 \begin_layout Itemize
13389
13390 \family sans
13391 Minisec
13392 \family default
13393 : generates a heading directly above the following paragraph in the standard
13394  character size without affecting the structure of the document.
13395 \end_layout
13396
13397 \begin_layout Itemize
13398
13399 \family sans
13400 Captionabove
13401 \family default
13402  and 
13403 \family sans
13404 Captionbelow
13405 \family default
13406  are special captions which respect the different space settings needed
13407  for captions placed above or below an element (if you follow strict typographic
13408  rules, you might want to place table captions always above the table).
13409  You can also use the class option 
13410 \family typewriter
13411 tablecaptionsabove
13412 \family default
13413 , which will switch 
13414 \family sans
13415 caption
13416 \family default
13417  to 
13418 \family sans
13419 captionabove
13420 \family default
13421  for tables and 
13422 \family sans
13423 captionbelow
13424 \family default
13425  for figures.
13426  You need at least Koma-Script version 2.8q to use this.
13427 \end_layout
13428
13429 \begin_layout Itemize
13430
13431 \family sans
13432 Dictum
13433 \family default
13434 : can be used to set a bonmot, e.
13435 \begin_inset space \thinspace{}
13436 \end_inset
13437
13438 g.
13439 \begin_inset space \space{}
13440 \end_inset
13441
13442 at the beginning of a chapter.
13443  If you use the optional argument (
13444 \family sans
13445 Insert\SpecialChar \menuseparator
13446 Short
13447 \begin_inset space ~
13448 \end_inset
13449
13450 Title
13451 \family default
13452 ), you can insert the dictum's author there.
13453  Dictum and author are separated by a line.
13454  You need at least Koma-Script version 2.8q to use this.
13455  
13456 \family sans
13457 Dictum
13458 \family default
13459  is not contained in 
13460 \emph on
13461 article (koma-script)
13462 \emph default
13463 .
13464 \end_layout
13465
13466 \begin_layout Standard
13467 The following types, together with the standard types 
13468 \family sans
13469 Title
13470 \family default
13471
13472 \family sans
13473 Author
13474 \family default
13475 , and 
13476 \family sans
13477 Date
13478 \family default
13479 , form the title area of the document.
13480  They must be entered ahead of the first 
13481 \begin_inset Quotes eld
13482 \end_inset
13483
13484 ordinary
13485 \begin_inset Quotes erd
13486 \end_inset
13487
13488  paragraph.
13489 \begin_inset Foot
13490 status collapsed
13491
13492 \begin_layout Plain Layout
13493 The corresponding LaTeX commands must appear before the 
13494 \family typewriter
13495
13496 \backslash
13497 maketitle
13498 \family default
13499  command.
13500 \end_layout
13501
13502 \end_inset
13503
13504  When such a type is used more than once, the latter usage overwrites the
13505  former one, that means, for every type only the latest usage is valid.
13506  The order of the different types however has, like 
13507 \family sans
13508 Title
13509 \family default
13510
13511 \family sans
13512 Author
13513 \family default
13514 , and 
13515 \family sans
13516 Date
13517 \family default
13518 , no effect on the appearance of the produced document.
13519 \end_layout
13520
13521 \begin_layout Itemize
13522
13523 \family sans
13524 Subject
13525 \family default
13526 : produces a centered paragraph above the ordinary title (
13527 \family sans
13528 Title
13529 \family default
13530
13531 \family sans
13532 Author
13533 \family default
13534
13535 \family sans
13536 Date
13537 \family default
13538 ) for the subject of the document.
13539 \end_layout
13540
13541 \begin_layout Itemize
13542
13543 \family sans
13544 Publishers
13545 \family default
13546 : produces a centered paragraph below the ordinary title (
13547 \family sans
13548 Title
13549 \family default
13550
13551 \family sans
13552 Author
13553 \family default
13554
13555 \family sans
13556 Date
13557 \family default
13558 ) for the publishers' name.
13559 \end_layout
13560
13561 \begin_layout Itemize
13562
13563 \family sans
13564 Dedication
13565 \family default
13566 : in 
13567 \emph on
13568 report (koma-script)
13569 \emph default
13570  and 
13571 \emph on
13572 book (koma-script)
13573 \emph default
13574  produces a centered paragraph on its own page behind the title page, or
13575  in 
13576 \emph on
13577 article (koma-script)
13578 \emph default
13579  produces a centered paragraph below the ordinary title (
13580 \family sans
13581 Title
13582 \family default
13583
13584 \family sans
13585 Author
13586 \family default
13587
13588 \family sans
13589 Date
13590 \family default
13591
13592 \family sans
13593 Publishers
13594 \family default
13595 ) for a dedication.
13596 \end_layout
13597
13598 \begin_layout Itemize
13599
13600 \family sans
13601 Titlehead
13602 \family default
13603 : produces a left aligned paragraph above the ordinary title (
13604 \family sans
13605 Title
13606 \family default
13607
13608 \family sans
13609 Author
13610 \family default
13611
13612 \family sans
13613 Date
13614 \family default
13615
13616 \family sans
13617 Subject
13618 \family default
13619 ) for a document`s head.
13620 \end_layout
13621
13622 \begin_layout Itemize
13623
13624 \family sans
13625 Uppertitleback
13626 \family default
13627 : produces in a double-sided print in 
13628 \emph on
13629 report (koma-script)
13630 \emph default
13631  and 
13632 \emph on
13633 book (koma-script)
13634 \emph default
13635  a left-aligned paragraph at the top of the title page`s back or has no
13636  effect in a single-sided print or in 
13637 \emph on
13638 article (koma-script)
13639 \emph default
13640 .
13641 \end_layout
13642
13643 \begin_layout Itemize
13644
13645 \family sans
13646 Lowertitleback
13647 \family default
13648 : produces in a double-sided print in 
13649 \emph on
13650 report (koma-script)
13651 \emph default
13652  and 
13653 \emph on
13654 book (koma-script)
13655 \emph default
13656  a left-aligned paragraph at the bottom of the title page`s back or has
13657  no effect in a single-sided print or in 
13658 \emph on
13659 article (koma-script)
13660 \emph default
13661 .
13662 \end_layout
13663
13664 \begin_layout Itemize
13665
13666 \family sans
13667 Extratitle
13668 \family default
13669 : produces a special 
13670 \begin_inset Quotes eld
13671 \end_inset
13672
13673 dirty
13674 \begin_inset Quotes erd
13675 \end_inset
13676
13677  page ahead of the actual document containing a paragraph without special
13678  formatting.
13679 \end_layout
13680
13681 \begin_layout Standard
13682 The layout files for the document classes 
13683 \emph on
13684 article (koma-script)
13685 \emph default
13686
13687 \emph on
13688 report (koma-script)
13689 \emph default
13690 , and 
13691 \emph on
13692 book (koma-script)
13693 \emph default
13694  do include the file 
13695 \family typewriter
13696 scrmacros.inc
13697 \family default
13698 .
13699  This is thought of as a place to define your own types.
13700  Copy scrmacros
13701 \family typewriter
13702 .inc
13703 \family default
13704  in your personal layout directory and edit the file!
13705 \end_layout
13706
13707 \begin_layout Subsection
13708 letter (koma-script)
13709 \end_layout
13710
13711 \begin_layout Standard
13712 \noindent
13713 The document class 
13714 \emph on
13715 letter (koma-script)
13716 \emph default
13717  is implemented in the layout file 
13718 \family typewriter
13719 scrlettr.layout
13720 \family default
13721 .
13722  It contains all the paragraph types of the corresponding standard document
13723  class 
13724 \emph on
13725 letter
13726 \emph default
13727 , partly modified, with the exception of the LyX specific types 
13728 \family sans
13729 LyX-Code
13730 \family default
13731  and 
13732 \family sans
13733 Comment
13734 \family default
13735  and the 
13736 \family sans
13737 List
13738 \family default
13739  type, which is replaced by the new 
13740 \family sans
13741 Labeling
13742 \family default
13743  type.
13744  In addition, it contains, in contrast to the standard document class, the
13745  standard types 
13746 \family sans
13747 LaTeX
13748 \family default
13749
13750 \family sans
13751 Quotation
13752 \family default
13753
13754 \family sans
13755 Quote
13756 \family default
13757 , and 
13758 \family sans
13759 Verse
13760 \family default
13761 .
13762  Furthermore, there are a number of new letter specific types.
13763 \end_layout
13764
13765 \begin_layout Standard
13766 The appearance of the letter produced by this document class can be controlled
13767  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13768 \begin_inset Foot
13769 status collapsed
13770
13771 \begin_layout Plain Layout
13772 For example, the standard appearance of the letter`s heading, consisting
13773  of name and address, is quite self-willed.
13774  An 
13775 \begin_inset Quotes eld
13776 \end_inset
13777
13778 ordinary
13779 \begin_inset Quotes erd
13780 \end_inset
13781
13782  heading is produced by the following LaTeX commands in the preamble:
13783 \end_layout
13784
13785 \begin_layout LyX-Code
13786
13787 \backslash
13788 firsthead{
13789 \backslash
13790 parbox[b]{
13791 \backslash
13792 textwidth}
13793 \end_layout
13794
13795 \begin_layout LyX-Code
13796   {
13797 \backslash
13798 ignorespaces 
13799 \backslash
13800 fromname
13801 \backslash
13802
13803 \backslash
13804  
13805 \backslash
13806 ignorespaces 
13807 \backslash
13808 fromaddress}} 
13809 \end_layout
13810
13811 \begin_layout LyX-Code
13812
13813 \backslash
13814 nexthead{
13815 \backslash
13816 parbox[b]{
13817 \backslash
13818 textwidth}
13819 \end_layout
13820
13821 \begin_layout LyX-Code
13822   {
13823 \backslash
13824 ignorespaces 
13825 \backslash
13826 fromname 
13827 \backslash
13828 hfill 
13829 \backslash
13830 ignorespaces 
13831 \backslash
13832 pagename
13833 \backslash
13834  
13835 \backslash
13836 thepage}}
13837 \end_layout
13838
13839 \end_inset
13840
13841  A detailed German description of such LaTeX commands can be found in the
13842  Koma-Script documentation 
13843 \emph on
13844 scrguide
13845 \emph default
13846 .
13847  With it, the letter's author can produce his personal letter layout.
13848 \end_layout
13849
13850 \begin_layout Standard
13851 The types 
13852 \family sans
13853 Letter
13854 \family default
13855  and 
13856 \family sans
13857 Opening
13858 \family default
13859  define the beginning of the letter and must be used in every letter.
13860  To emphasize them in the LyX document class, they are marked with the letter
13861  
13862 \shape italic
13863 L
13864 \shape default
13865  or 
13866 \shape italic
13867 O
13868 \shape default
13869 , resp.
13870 \begin_inset space ~
13871 \end_inset
13872
13873 in the left margin.
13874  It is possible to write any number of letters in one file.
13875  An 
13876 \family sans
13877 Opening
13878 \family default
13879  type produces a new letter using the same addressee and a 
13880 \family sans
13881 Letter
13882 \family default
13883  type produces a new addressee.
13884  The types 
13885 \family sans
13886 Closing
13887 \family default
13888
13889 \family sans
13890 PS
13891 \family default
13892
13893 \family sans
13894 CC
13895 \family default
13896 , and 
13897 \family sans
13898 Encl
13899 \family default
13900  are ordinary paragraph types and can also be used several times in one
13901  and the same letter.
13902 \end_layout
13903
13904 \begin_layout Itemize
13905
13906 \family sans
13907 Letter
13908 \family default
13909 : produces a paragraph for the addressee and implicitly defines the beginning
13910  of the letter.
13911 \end_layout
13912
13913 \begin_layout Itemize
13914
13915 \family sans
13916 Opening
13917 \family default
13918 : produces a paragraph for the form of address and implicitly produces a
13919  new letter.
13920 \end_layout
13921
13922 \begin_layout Itemize
13923
13924 \family sans
13925 Closing
13926 \family default
13927 : produces a paragraph for a close.
13928 \end_layout
13929
13930 \begin_layout Itemize
13931
13932 \family sans
13933 PS
13934 \family default
13935 : produces a paragraph for a postscript.
13936 \end_layout
13937
13938 \begin_layout Itemize
13939
13940 \family sans
13941 CC
13942 \family default
13943 : produces a paragraph for a distribution list.
13944 \end_layout
13945
13946 \begin_layout Itemize
13947
13948 \family sans
13949 Encl
13950 \family default
13951 : produces a paragraph for enclosures.
13952 \end_layout
13953
13954 \begin_layout Standard
13955 The types 
13956 \family sans
13957 Name
13958 \family default
13959
13960 \family sans
13961 Signature
13962 \family default
13963
13964 \family sans
13965 Address
13966 \family default
13967
13968 \family sans
13969 Telephone
13970 \family default
13971
13972 \family sans
13973 Place
13974 \family default
13975
13976 \family sans
13977 Backaddress
13978 \family default
13979
13980 \family sans
13981 Specialmail
13982 \family default
13983
13984 \family sans
13985 Location
13986 \family default
13987
13988 \family sans
13989 Title
13990 \family default
13991 , and 
13992 \family sans
13993 Subject
13994 \family default
13995  are input types provided with a label to enter information, which will
13996  be processed by the document class.
13997 \begin_inset Foot
13998 status open
13999
14000 \begin_layout Plain Layout
14001 It could be seen as a matter of inconsequence, that the types 
14002 \family sans
14003 Letter
14004 \family default
14005  and 
14006 \family sans
14007 Opening
14008 \family default
14009  described above are not such input types as well.
14010  Because of the special meaning of those types, however, I have implemented
14011  them as ordinary paragraph types with a one letter mark in the left margin.
14012  Moreover, it would affect my feeling of symmetry, if the 
14013 \family sans
14014 Opening
14015 \family default
14016  type and the 
14017 \family sans
14018 Closing
14019 \family default
14020  type had such a serious different appearance.
14021 \end_layout
14022
14023 \end_inset
14024
14025  The types must be used ahead of the corresponding 
14026 \family sans
14027 Opening
14028 \family default
14029  type.
14030 \end_layout
14031
14032 \begin_layout Standard
14033 An implementation of these types in a WYSIWYG fashion does not seem to make
14034  sense, because the real appearance of the produced letter does not only
14035  depend on the usage of the particular type, but also on other factors.
14036  For example, a signature entered in the 
14037 \family sans
14038 Signature
14039 \family default
14040  type will in the standard behavior appear in the produced letter only,
14041  when in the same letter also a 
14042 \family sans
14043 Closing
14044 \family default
14045  type is used.
14046  The entered value of the 
14047 \family sans
14048 Telephone
14049 \family default
14050  type will in the standard behavior not appear in the produced letter at
14051  all.
14052  The possibility to design the letter`s heading freely is already indicated
14053  in a footnote above.
14054 \end_layout
14055
14056 \begin_layout Standard
14057 The input types can also be used as empty paragraphs.
14058  This makes sense e.
14059 \begin_inset space \thinspace{}
14060 \end_inset
14061
14062 g.
14063 \begin_inset space \space{}
14064 \end_inset
14065
14066 for the 
14067 \family sans
14068 Signature
14069 \family default
14070  type.
14071  If the 
14072 \family sans
14073 Signature
14074 \family default
14075  type is not used at all, in the standard behavior the value of the 
14076 \family sans
14077 Name
14078 \family default
14079  type is used as signature, whereas if an empty 
14080 \family sans
14081 Signature
14082 \family default
14083  type is used, no signature value is defined.
14084 \end_layout
14085
14086 \begin_layout Standard
14087 By using the input types it is possible to write a letter template, containing
14088  filled input types with your personal dates (name, address, etc.) and empty
14089  input types for other dates you want to enter.
14090 \end_layout
14091
14092 \begin_layout Itemize
14093
14094 \family sans
14095 Name
14096 \family default
14097 : sender's name, in the standard behavior appears as a centered paragraph
14098  in small caps in the letter`s heading.
14099 \end_layout
14100
14101 \begin_layout Itemize
14102
14103 \family sans
14104 Signature
14105 \family default
14106 : sender's signature, in the standard behavior appears below the 
14107 \family sans
14108 Closing
14109 \family default
14110  type.
14111  If no 
14112 \family sans
14113 Signature
14114 \family default
14115  type is used, the value of the 
14116 \family sans
14117 Name
14118 \family default
14119  type appears instead.
14120 \end_layout
14121
14122 \begin_layout Itemize
14123
14124 \family sans
14125 Address
14126 \family default
14127 : sender's address, in the standard behavior appears in a centered paragraph
14128  in the letter`s heading below the sender's name.
14129 \end_layout
14130
14131 \begin_layout Itemize
14132
14133 \family sans
14134 Telephone
14135 \family default
14136 : sender's telephone number, in the standard behavior only sets the LaTeX
14137  variable 
14138 \family typewriter
14139
14140 \backslash
14141 telephonenum
14142 \family default
14143 .
14144 \end_layout
14145
14146 \begin_layout Itemize
14147
14148 \family sans
14149 Place
14150 \family default
14151 : place of the letter`s making.
14152 \end_layout
14153
14154 \begin_layout Itemize
14155
14156 \family sans
14157 Date
14158 \family default
14159 : date of the letter`s making.
14160  
14161 \family sans
14162 Place
14163 \family default
14164  and 
14165 \family sans
14166 Date
14167 \family default
14168 , in the standard behavior, produce the place and the date in a right-aligned
14169  line below the addressee's field.
14170  If an empty 
14171 \family sans
14172 Date
14173 \family default
14174  type is used, neither place nor date appear, independent of the value of
14175  the 
14176 \family sans
14177 Place
14178 \family default
14179  type.
14180  If no 
14181 \family sans
14182 Date
14183 \family default
14184  type is used, the date of the letter `s production is used.
14185 \end_layout
14186
14187 \begin_layout Itemize
14188
14189 \family sans
14190 Backaddress
14191 \family default
14192 : sender`s back address, in the standard behavior appears above the addressee's
14193  field in a small sans serif font.
14194 \end_layout
14195
14196 \begin_layout Itemize
14197
14198 \family sans
14199 Specialmail
14200 \family default
14201 : special mail information, in the standard behavior appears underlined
14202  above the addressee's field below the back address.
14203 \end_layout
14204
14205 \begin_layout Itemize
14206
14207 \family sans
14208 Location
14209 \family default
14210 : additional information, in the standard behavior appears on right side
14211  below the addressee`s field.
14212 \end_layout
14213
14214 \begin_layout Itemize
14215
14216 \family sans
14217 Title
14218 \family default
14219 : the letter's title, in the standard behavior appears in a big, bold, sans
14220  serif font above the subject.
14221 \end_layout
14222
14223 \begin_layout Itemize
14224
14225 \family sans
14226 Subject
14227 \family default
14228 : the letter's subject, in the standard behavior appears in a bold font
14229  above the 
14230 \family sans
14231 Opening
14232 \family default
14233  paragraph.
14234 \end_layout
14235
14236 \begin_layout Standard
14237 The types 
14238 \family sans
14239 Yourref
14240 \family default
14241
14242 \family sans
14243 Yourmail
14244 \family default
14245
14246 \family sans
14247 Myref
14248 \family default
14249
14250 \family sans
14251 Customer
14252 \family default
14253 , and 
14254 \family sans
14255 Invoice
14256 \family default
14257  produce a business letter like line above the 
14258 \family sans
14259 Title
14260 \family default
14261  line containing the fields 
14262 \begin_inset Quotes eld
14263 \end_inset
14264
14265 Your ref.
14266 \begin_inset Quotes erd
14267 \end_inset
14268
14269
14270 \begin_inset Quotes eld
14271 \end_inset
14272
14273 Your letter of
14274 \begin_inset Quotes erd
14275 \end_inset
14276
14277
14278 \begin_inset Quotes eld
14279 \end_inset
14280
14281 Our ref.
14282 \begin_inset Quotes erd
14283 \end_inset
14284
14285
14286 \begin_inset Quotes eld
14287 \end_inset
14288
14289 Customer no.
14290 \begin_inset Quotes erd
14291 \end_inset
14292
14293
14294 \begin_inset Quotes eld
14295 \end_inset
14296
14297 Invoice no.
14298 \begin_inset Quotes erd
14299 \end_inset
14300
14301 , and 
14302 \begin_inset Quotes eld
14303 \end_inset
14304
14305 Date
14306 \begin_inset Quotes erd
14307 \end_inset
14308
14309 .
14310  For the date field, the value of the 
14311 \family sans
14312 Date
14313 \family default
14314  type is used.
14315  If one of these 
14316 \begin_inset Quotes eld
14317 \end_inset
14318
14319 business letter types
14320 \begin_inset Quotes erd
14321 \end_inset
14322
14323  is used, the value of the 
14324 \family sans
14325 Place
14326 \family default
14327  type however does not appear, but only the LaTeX variable 
14328 \family typewriter
14329
14330 \backslash
14331 fromplace
14332 \family default
14333  is set.
14334  The ordinary output of place and date in a right-aligned line below the
14335  addressee`s field is suppressed.
14336  The types are implemented as input types provided with a label and must
14337  be used ahead of the corresponding 
14338 \family sans
14339 Opening
14340 \family default
14341  type.
14342 \end_layout
14343
14344 \begin_layout Itemize
14345
14346 \family sans
14347 Yourref
14348 \family default
14349 : Your ref.
14350 \end_layout
14351
14352 \begin_layout Itemize
14353
14354 \family sans
14355 Yourmail
14356 \family default
14357 : Your letter of.
14358 \end_layout
14359
14360 \begin_layout Itemize
14361
14362 \family sans
14363 Myref
14364 \family default
14365 : Our ref.
14366 \end_layout
14367
14368 \begin_layout Itemize
14369
14370 \family sans
14371 Customer
14372 \family default
14373 : Customer no.
14374 \end_layout
14375
14376 \begin_layout Itemize
14377
14378 \family sans
14379 Invoice
14380 \family default
14381 : Invoice no.
14382 \end_layout
14383
14384 \begin_layout Subsection
14385 The new letter class: letter (koma-script v.2)
14386 \end_layout
14387
14388 \begin_layout Standard
14389 by 
14390 \noun on
14391 Jürgen Spitzmüller
14392 \end_layout
14393
14394 \begin_layout Standard
14395 \begin_inset VSpace medskip
14396 \end_inset
14397
14398
14399 \end_layout
14400
14401 \begin_layout Standard
14402 \noindent
14403 Koma-Script version 2.8 has introduced a new letter class 
14404 \family typewriter
14405 scrlttr2
14406 \family default
14407  which supersedes the now unsupported 
14408 \family typewriter
14409 scrlettr
14410 \family default
14411 .
14412  It has — on the LaTeX side — a completely new interface and is not compatible
14413  with the old class.
14414  Therefore, LyX supports both, though it is recommended you use the new
14415  class.
14416 \end_layout
14417
14418 \begin_layout Standard
14419 This class covers the same functionality as 
14420 \emph on
14421 letter (koma-script),
14422 \emph default
14423  and a few more.
14424  The basic items are 
14425 \family sans
14426 Address
14427 \family default
14428  (receiver's address, same as 
14429 \family sans
14430 Letter
14431 \family default
14432  in the old layout), 
14433 \family sans
14434 Opening
14435 \family default
14436 , and 
14437 \family sans
14438 Closing
14439 \family default
14440 .
14441  
14442 \family sans
14443 NextAddress
14444 \family default
14445  will start a new letter (i.
14446 \begin_inset space \thinspace{}
14447 \end_inset
14448
14449 e.
14450 \begin_inset space \space{}
14451 \end_inset
14452
14453 you can write several letters per document).
14454  New elements are sender's 
14455 \family sans
14456 E-Mail
14457 \family default
14458
14459 \family sans
14460 URL
14461 \family default
14462
14463 \family sans
14464 Fax
14465 \family default
14466
14467 \family sans
14468 Bank
14469 \family default
14470  and the possibility to use a 
14471 \family sans
14472 Logo
14473 \family default
14474  (via 
14475 \family sans
14476 Insert\SpecialChar \menuseparator
14477 Graphics
14478 \family default
14479 ) in the header.
14480 \end_layout
14481
14482 \begin_layout Standard
14483 The biggest improvement is, though, that the letter's layout is configurable
14484  to meet almost any needs.
14485  This can be done via the preamble or with a special style file (Letter
14486  Class Option, extension 
14487 \family typewriter
14488 *.lco
14489 \family default
14490 ), that will be read in as a class option.
14491 \begin_inset Foot
14492 status collapsed
14493
14494 \begin_layout Plain Layout
14495 The KOMA package comes with some default 
14496 \family typewriter
14497 *.lco
14498 \family default
14499  files.
14500  There is, for instance, a 
14501 \family typewriter
14502 DIN.lco
14503 \family default
14504  file that follows german typesetting rules, or a 
14505 \family typewriter
14506 KOMAold.lco
14507 \family default
14508  that provides the default layout of the old 
14509 \family typewriter
14510 scrlettr
14511 \family default
14512  class.
14513  The latter can be loaded with the class option 
14514 \family typewriter
14515 KOMAold
14516 \family default
14517 , inserted via the 
14518 \family sans
14519 \bar under
14520 L
14521 \bar default
14522 ayout\SpecialChar \menuseparator
14523
14524 \bar under
14525 D
14526 \bar default
14527 ocument\SpecialChar \menuseparator
14528 Extra Options
14529 \family default
14530  field.
14531 \end_layout
14532
14533 \end_inset
14534
14535  Have a look at the 
14536 \emph on
14537 koma-letter2
14538 \emph default
14539  template that is included in LyX for examples.
14540  A detailed description is to be found in the Koma-Script documentation
14541  (
14542 \emph on
14543 scrguide
14544 \emph default
14545 ).
14546 \end_layout
14547
14548 \begin_layout Subsection
14549 Problems
14550 \end_layout
14551
14552 \begin_layout Standard
14553 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14554  some problems.
14555 \end_layout
14556
14557 \begin_layout Itemize
14558 The chapter number of a 
14559 \family sans
14560 Chapter
14561 \family default
14562  type appears on a line of its own above the chapter heading instead of
14563  appearing in the same line ahead of it.
14564  The cause for that is the LyX internal behavior for the labeltype 
14565 \family sans
14566 Counter_Chapter
14567 \family default
14568  in the layout file.
14569 \end_layout
14570
14571 \begin_layout Itemize
14572 The headings of the types 
14573 \family sans
14574 Addchap
14575 \family default
14576  and 
14577 \family sans
14578 Addsec
14579 \family default
14580  are only put in the 
14581 \begin_inset Quotes eld
14582 \end_inset
14583
14584 true
14585 \begin_inset Quotes erd
14586 \end_inset
14587
14588  LaTeX table of contents, but not in the LyX table of contents (
14589 \family sans
14590 Document\SpecialChar \menuseparator
14591 Table
14592 \begin_inset space ~
14593 \end_inset
14594
14595 of
14596 \begin_inset space ~
14597 \end_inset
14598
14599 Contents
14600 \family default
14601 ).
14602 \end_layout
14603
14604 \begin_layout Itemize
14605 The paragraphs in a 
14606 \emph on
14607 letter
14608 \emph default
14609  document class appear in a skip separation mode, not indented.
14610  This is the standard behavior, no special LaTeX commands are needed for
14611  that.
14612  But in the 
14613 \family sans
14614 Document\SpecialChar \menuseparator
14615 Settings
14616 \family default
14617  dialog the corresponding radio button indicates 
14618 \family sans
14619 Indent
14620 \family default
14621 .
14622  A 
14623 \family sans
14624 Skip
14625 \family default
14626  value always has the effect that extra LaTeX commands are inserted in the
14627  document to produce the gap, which is not what is wanted in this case.
14628 \end_layout
14629
14630 \begin_layout Section
14631 Memoir
14632 \end_layout
14633
14634 \begin_layout Standard
14635 By 
14636 \noun on
14637 Jürgen Spitzmüller
14638 \end_layout
14639
14640 \begin_layout Subsection
14641 Overview
14642 \end_layout
14643
14644 \begin_layout Standard
14645 Memoir is a very powerful and constantly evolving class.
14646  It has been designed with regard to fictional and non-fictional literature.
14647  Its aim is to let the user have maximum control over the typesetting of
14648  his document.
14649  Memoir is based on the standard book class, but it can also emulate the
14650  article class (see below).
14651 \end_layout
14652
14653 \begin_layout Standard
14654 Peter Wilson, the developer of Memoir, is known as the author of lots of
14655  useful packages in the LaTeX world.
14656  Most of them have been merged with Memoir.
14657  Therefore, it is much easier to layout the table of contents, appendices,
14658  chapter designs and such.
14659  LyX, though, does not support all of these goodies natively.
14660  Some of them might be added to forthcoming releases
14661 \begin_inset Foot
14662 status collapsed
14663
14664 \begin_layout Plain Layout
14665 You are invited to send suggestions to 
14666 \begin_inset Flex URL
14667 status collapsed
14668
14669 \begin_layout Plain Layout
14670
14671 lyx-devel@lists.lyx.org
14672 \end_layout
14673
14674 \end_inset
14675
14676 .
14677 \end_layout
14678
14679 \end_inset
14680
14681 , lots will probably never be supported, due to the limitations of LyX's
14682  framework.
14683  Of course you can still use all features with the help of some native LaTeX
14684  commands (TeX code
14685 \begin_inset Foot
14686 status collapsed
14687
14688 \begin_layout Plain Layout
14689 Cf.
14690 \begin_inset ERT
14691 status collapsed
14692
14693 \begin_layout Plain Layout
14694
14695
14696 \backslash
14697  
14698 \end_layout
14699
14700 \end_inset
14701
14702 section
14703 \begin_inset space ~
14704 \end_inset
14705
14706
14707 \begin_inset CommandInset ref
14708 LatexCommand ref
14709 reference "sec:Inserting-TeX-Code"
14710
14711 \end_inset
14712
14713  for details.
14714 \end_layout
14715
14716 \end_inset
14717
14718 ).
14719  In this section, we can only list those features that are natively supported
14720  by LyX.
14721  For detailed descriptions (and for the rest of features) we recommend you
14722  have a look at the detailed manual of the Memoir class
14723 \begin_inset Foot
14724 status collapsed
14725
14726 \begin_layout Plain Layout
14727 Cf.
14728 \begin_inset ERT
14729 status collapsed
14730
14731 \begin_layout Plain Layout
14732
14733
14734 \backslash
14735  
14736 \end_layout
14737
14738 \end_inset
14739
14740
14741 \begin_inset Flex URL
14742 status collapsed
14743
14744 \begin_layout Plain Layout
14745
14746 CTAN:/macros/latex/memoir/memman.pdf
14747 \end_layout
14748
14749 \end_inset
14750
14751 .
14752 \end_layout
14753
14754 \end_inset
14755
14756 , which is not only a user guide for the class, but also both a comprehensive
14757  description on good typesetting and a superb example for good typesetting
14758  itself.
14759 \end_layout
14760
14761 \begin_layout Subsection
14762 Basic features and restrictions
14763 \end_layout
14764
14765 \begin_layout Standard
14766 Memoir supports basically all features of the standard book classes.
14767  There are, however, some differences, as follows:
14768 \end_layout
14769
14770 \begin_layout Description
14771 Font
14772 \begin_inset space ~
14773 \end_inset
14774
14775 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14776 \end_layout
14777
14778 \begin_layout Description
14779 Page
14780 \begin_inset space ~
14781 \end_inset
14782
14783 style: The fancy page style is not supported, due to a command clash between
14784  Memoir and the fancyhdr package (they both define a command with the same
14785  name, which confuses LaTeX).
14786  Instead, Memoir comes with a number of its own page styles (see 
14787 \family sans
14788 Layout\SpecialChar \menuseparator
14789 Document\SpecialChar \menuseparator
14790 Page
14791 \begin_inset space ~
14792 \end_inset
14793
14794 Style
14795 \family default
14796 ).
14797  If you want to use these for the chapter pages, you have to use the command
14798  
14799 \family typewriter
14800
14801 \backslash
14802 chapterstyle
14803 \family default
14804  in the main text or in preamble (e.
14805 \begin_inset space \thinspace{}
14806 \end_inset
14807
14808 g.
14809 \begin_inset space \space{}
14810 \end_inset
14811
14812
14813 \family typewriter
14814
14815 \backslash
14816 chapterstyle{companion}
14817 \family default
14818 ).
14819 \end_layout
14820
14821 \begin_layout Description
14822 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14823  optional argument in the standard classes.
14824  With this, you can specify an alternative version of the title for the
14825  table of contents and the headers (for instance, if the title is too long).
14826  In LyX, you can do this via 
14827 \family sans
14828 Insert\SpecialChar \menuseparator
14829 Short
14830 \begin_inset space ~
14831 \end_inset
14832
14833 Title
14834 \family default
14835  at the beginning of a chapter/section.
14836  Memoir features a second optional argument and thus separates the table
14837  of contents from the header.
14838  You can define three variants of a title with this: one for the main text,
14839  one for the table of contents, and one for the headers.
14840  Simply insert two optional arguments if you need this feature, the first
14841  one containing the short title for the Table of Contents, the second one
14842  containing an alternative short title for the headers.
14843 \end_layout
14844
14845 \begin_layout Description
14846 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14847  of contents, the list of figures and the list of table start a new page
14848  automatically.
14849  Memoir does not follow this route.
14850  You have to insert a page break yourself, if you want to have one.
14851 \end_layout
14852
14853 \begin_layout Description
14854 Titlepage: For some unknown reason, Memoir uses pagination on the title
14855  page (in the standard classes, title pages are 
14856 \begin_inset Quotes eld
14857 \end_inset
14858
14859 empty
14860 \begin_inset Quotes erd
14861 \end_inset
14862
14863 ).
14864  If you want an empty title page, type 
14865 \family typewriter
14866
14867 \backslash
14868 aliaspagestyle{title}{empty}
14869 \family default
14870  in the preamble.
14871 \end_layout
14872
14873 \begin_layout Description
14874 Article: With the class option 
14875 \emph on
14876 article
14877 \emph default
14878  (to be inserted in 
14879 \family sans
14880 Layout\SpecialChar \menuseparator
14881 Document\SpecialChar \menuseparator
14882 Extra
14883 \begin_inset space ~
14884 \end_inset
14885
14886 Options
14887 \family default
14888 ), you can emulate article style.
14889  That is, counters (footnotes, figures, tables etc.) will not be reset on
14890  new chapters, chapters don't start a new page (but are—in contrary to 
14891 \begin_inset Quotes eld
14892 \end_inset
14893
14894 real
14895 \begin_inset Quotes erd
14896 \end_inset
14897
14898  article classes—still allowed), parts, though, use their own page, as in
14899  book.
14900 \end_layout
14901
14902 \begin_layout Description
14903 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14904  font commands, which have been used in the old LaTeX version 2.09 (e.
14905 \begin_inset space \thinspace{}
14906 \end_inset
14907
14908 g.
14909 \begin_inset space \space{}
14910 \end_inset
14911
14912
14913 \family typewriter
14914
14915 \backslash
14916 rm
14917 \family default
14918
14919 \family typewriter
14920
14921 \backslash
14922 it
14923 \family default
14924 ).
14925  It produces an error and stops LaTeX whenever such a command appears.
14926  The class option 
14927 \emph on
14928 oldfontcommands
14929 \emph default
14930  reallows the commands and spits out warnings instead (which does at least
14931  not stop LaTeX).
14932  Since a lot of packages and particularly BibTeX style files are still using
14933  those commands, we have decided to use this option by default.
14934 \end_layout
14935
14936 \begin_layout Subsection
14937 Extra features
14938 \end_layout
14939
14940 \begin_layout Standard
14941 We will only describe the features supported by LyX (which is not much currently
14942 ).
14943  Please consult the Memoir manual
14944 \begin_inset Foot
14945 status collapsed
14946
14947 \begin_layout Plain Layout
14948 Cf.
14949 \begin_inset ERT
14950 status collapsed
14951
14952 \begin_layout Plain Layout
14953
14954
14955 \backslash
14956  
14957 \end_layout
14958
14959 \end_inset
14960
14961
14962 \begin_inset Flex URL
14963 status collapsed
14964
14965 \begin_layout Plain Layout
14966
14967 CTAN:/macros/latex/memoir/memman.pdf
14968 \end_layout
14969
14970 \end_inset
14971
14972 .
14973 \end_layout
14974
14975 \end_inset
14976
14977  for details.
14978 \end_layout
14979
14980 \begin_layout Description
14981 Abstract: You may wonder why an abstract is an extra feature.
14982  Well, it is in book class.
14983  Usually books don't have abstracts.
14984  Memoir, however, has.
14985  You can use it wherever and how often you like.
14986 \end_layout
14987
14988 \begin_layout Description
14989 Chapterprecis: You may know this older typesetting style: The contents of
14990  a chapter are summarized below the title and also in the table of contents
14991  (e.
14992 \begin_inset space \thinspace{}
14993 \end_inset
14994
14995 g.
14996 \begin_inset space \space{}
14997 \end_inset
14998
14999
15000 \emph on
15001 Our hero arrives in Troia; he loses some friends; he finds others
15002 \emph default
15003 ).
15004  Chapterprecis does exactly this.
15005  It is therefore only sensible below a chapter.
15006 \end_layout
15007
15008 \begin_layout Description
15009 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
15010  The epigraph environment provides an elegant way of typesetting such a
15011  motto.
15012  The motto itself (text) and its author (source) are divided by a short
15013  line.
15014  Unfortunately, we have to fool LyX a bit here again, since the environment
15015  needs two arguments (text and source).
15016  In this case, we have to use curly brackets (in TeX mode) between the two
15017  arguments: 
15018 \emph on
15019 <smart slogan>
15020 \emph default
15021  
15022 \family typewriter
15023 }{
15024 \family default
15025  
15026 \emph on
15027 <author of the slogan>.
15028 \end_layout
15029
15030 \begin_layout Description
15031 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
15032  complex figurative poems).
15033  LyX can only support a few of them.
15034  One is poemtitle, which is a centered title for poems, which will also
15035  be added to the table of contents (verse is the standard environment for
15036  poems.
15037  Memoir has some enhanced versions of verse, but you need to use TeX code,
15038  because they have to be nested inside regular verse environments, which
15039  is not possible with LyX).
15040 \end_layout
15041
15042 \begin_layout Description
15043 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
15044 \end_layout
15045
15046 \begin_layout Section
15047 Article (mwart), book (mwbk) and report (mwrep)
15048 \begin_inset Argument status
15049 status collapsed
15050
15051 \begin_layout Plain Layout
15052 The 
15053 \family typewriter
15054 mw
15055 \family default
15056  Classes
15057 \end_layout
15058
15059 \end_inset
15060
15061
15062 \end_layout
15063
15064 \begin_layout Standard
15065 by 
15066 \noun on
15067 Tomasz Luczak
15068 \end_layout
15069
15070 \begin_layout Standard
15071 The LyX document classes 
15072 \emph on
15073 article (mwart)
15074 \emph default
15075
15076 \emph on
15077 report (mwrep)
15078 \emph default
15079  and 
15080 \emph on
15081 book
15082 \emph default
15083  
15084 \emph on
15085 (mwbk)
15086 \emph default
15087  correspond to the LaTeX document classes 
15088 \family typewriter
15089 mwart.cls
15090 \family default
15091
15092 \family typewriter
15093 mwrep.cls
15094 \family default
15095  and 
15096 \family typewriter
15097 mwbk.cls
15098 \family default
15099 , resp.
15100  They are replacements for the standard document classes 
15101 \family typewriter
15102 article.cls
15103 \family default
15104
15105 \family typewriter
15106 report.cls
15107 \family default
15108  and 
15109 \family typewriter
15110 book.cls
15111 \family default
15112 , resp., and fit better to Polish typography conventions in a number of points.
15113  
15114 \end_layout
15115
15116 \begin_layout Standard
15117 Basic differences:
15118 \end_layout
15119
15120 \begin_layout Itemize
15121 Unnumbered titles (with star, e.
15122 \begin_inset space \thinspace{}
15123 \end_inset
15124
15125 g.
15126 \begin_inset space \space{}
15127 \end_inset
15128
15129
15130 \family sans
15131 Section*
15132 \family default
15133 ) are added into table of contents,
15134 \end_layout
15135
15136 \begin_layout Itemize
15137 Additional page styles:
15138 \end_layout
15139
15140 \begin_deeper
15141 \begin_layout Description
15142 uheadings header with separated lines,
15143 \end_layout
15144
15145 \begin_layout Description
15146 myheadings custom header, contents headers via commands: 
15147 \family typewriter
15148
15149 \backslash
15150 markright
15151 \family default
15152  and 
15153 \family typewriter
15154
15155 \backslash
15156 markboth
15157 \family default
15158 ,
15159 \end_layout
15160
15161 \begin_layout Description
15162 myuheadings custom header with separated lines,
15163 \end_layout
15164
15165 \begin_layout Description
15166 outer page number is placed on outer side of page
15167 \end_layout
15168
15169 \end_deeper
15170 \begin_layout Itemize
15171 Options 
15172 \end_layout
15173
15174 \begin_deeper
15175 \begin_layout Description
15176 rmheadings serif titles — default,
15177 \end_layout
15178
15179 \begin_layout Description
15180 sfheadings sansserif titles,
15181 \end_layout
15182
15183 \begin_layout Description
15184 authortitle on title page first placed is author next title — default,
15185 \end_layout
15186
15187 \begin_layout Description
15188 titleauthor on title page first placed is title next author,
15189 \end_layout
15190
15191 \begin_layout Description
15192 withmarginpar reserve place on page for margins.
15193 \end_layout
15194
15195 \end_deeper
15196 \begin_layout Section
15197 Paper
15198 \end_layout
15199
15200 \begin_layout Standard
15201 The document class 
15202 \family sans
15203 paper
15204 \family default
15205  provides an alternative to the standard 
15206 \family sans
15207 article
15208 \family default
15209  class.
15210  It provides similar functionality, but you might prefer this layout with
15211  sans serif sections, headings, and more.
15212 \end_layout
15213
15214 \begin_layout Section
15215 RevTeX4
15216 \end_layout
15217
15218 \begin_layout Standard
15219 by 
15220 \noun on
15221 Amir Karger
15222 \end_layout
15223
15224 \begin_layout Standard
15225 \begin_inset VSpace bigskip
15226 \end_inset
15227
15228
15229 \end_layout
15230
15231 \begin_layout Standard
15232 \noindent
15233 The 
15234 \family sans
15235 Revtex
15236 \begin_inset space ~
15237 \end_inset
15238
15239 4
15240 \family default
15241  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15242 \begin_inset Formula $\beta$
15243 \end_inset
15244
15245  release of May, 1999) class.
15246 \end_layout
15247
15248 \begin_layout Standard
15249 LyX has a 
15250 \family sans
15251 Revtex
15252 \family default
15253  textclass, which works with RevTeX 3.1.
15254  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15255  That means that it doesn't interact very well with LyX, which requires
15256  LaTeX2e, although it has been kludged to work.
15257  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15258  LyX with the 
15259 \family sans
15260 RevTeX
15261 \begin_inset space ~
15262 \end_inset
15263
15264 4
15265 \family default
15266  textclass should also be pretty easy to use.
15267 \end_layout
15268
15269 \begin_layout Standard
15270 These documents are supposed to be used in 
15271 \emph on
15272 addition
15273 \emph default
15274  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15275  macros, and assume you'll know what to put in the preamble if necessary.
15276 \end_layout
15277
15278 \begin_layout Subsection
15279 Installation
15280 \end_layout
15281
15282 \begin_layout Standard
15283 All you need to do is install RevTeX 4, as described in the package's README
15284  file.
15285  The package can be found at The RevTeX 4 Web Site 
15286 \begin_inset Flex URL
15287 status collapsed
15288
15289 \begin_layout Plain Layout
15290
15291 http://publish.aps.org/revtex4/
15292 \end_layout
15293
15294 \end_inset
15295
15296 .
15297  Install it somewhere that LaTeX can see it.
15298  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15299  (i.
15300 \begin_inset space \thinspace{}
15301 \end_inset
15302
15303 e.
15304 \begin_inset space \space{}
15305 \end_inset
15306
15307 not the directory where you installed the class file.) Then, if you reconfigure
15308  LyX, it will find the class file and let you use the RevTeX4 textclass.
15309 \end_layout
15310
15311 \begin_layout Standard
15312 Probably the easiest way to get started is either to import a RevTeX 4 document
15313  using 
15314 \family typewriter
15315 tex2lyx
15316 \family default
15317 , or to use the 
15318 \family sans
15319 Revtex
15320 \begin_inset space ~
15321 \end_inset
15322
15323 4
15324 \family default
15325  template, found in the templates directory.
15326 \end_layout
15327
15328 \begin_layout Subsection
15329 Preamble Matter
15330 \end_layout
15331
15332 \begin_layout Standard
15333 Optional arguments to 
15334 \family typewriter
15335
15336 \backslash
15337 documentclass
15338 \family default
15339 , like 
15340 \begin_inset Quotes eld
15341 \end_inset
15342
15343 preprint
15344 \begin_inset Quotes erd
15345 \end_inset
15346
15347  and 
15348 \begin_inset Quotes eld
15349 \end_inset
15350
15351 aps
15352 \begin_inset Quotes erd
15353 \end_inset
15354
15355 , go in the 
15356 \family sans
15357 E
15358 \bar under
15359 x
15360 \bar default
15361 tra
15362 \begin_inset space ~
15363 \end_inset
15364
15365 Options
15366 \family default
15367  field in the 
15368 \family sans
15369 Document
15370 \begin_inset space ~
15371 \end_inset
15372
15373 Layout
15374 \family default
15375  dialog, as usual.
15376  Remember that in RevTeX, at least one optional argument is required! 
15377 \end_layout
15378
15379 \begin_layout Standard
15380 Other preamble matter, like 
15381 \family typewriter
15382
15383 \backslash
15384 draft
15385 \family default
15386  etc.
15387 \begin_inset space ~
15388 \end_inset
15389
15390 goes in the 
15391 \family sans
15392 LaTeX
15393 \begin_inset space ~
15394 \end_inset
15395
15396 Preamble
15397 \family default
15398  dialog, also as usual.
15399 \end_layout
15400
15401 \begin_layout Subsection
15402 Layouts
15403 \end_layout
15404
15405 \begin_layout Standard
15406 The layouts basically correspond to the commands in RevTeX4.0.
15407  For example, the Email layout corresponds to 
15408 \family typewriter
15409
15410 \backslash
15411 email{}
15412 \family default
15413 .
15414  Note that (at least as of RevTeX 4.0 Beta), the 
15415 \family sans
15416 Address
15417 \family default
15418  and 
15419 \family sans
15420 Affiliation
15421 \family default
15422  layouts are exactly equivalent, so you shouldn't need to use both.
15423 \begin_inset Foot
15424 status collapsed
15425
15426 \begin_layout Plain Layout
15427 In case you're curious, both were included so that 
15428 \family typewriter
15429 tex2lyx
15430 \family default
15431  would be able to translate both 
15432 \family typewriter
15433
15434 \backslash
15435 address
15436 \family default
15437  and 
15438 \family typewriter
15439
15440 \backslash
15441 affiliation
15442 \family default
15443 .
15444 \end_layout
15445
15446 \end_inset
15447
15448
15449 \end_layout
15450
15451 \begin_layout Subsection
15452 Important Notes
15453 \end_layout
15454
15455 \begin_layout Standard
15456 There are a couple of important unique aspects of RevTeX 4 which might cause
15457  bugs that will be even more confusing in LyX.
15458 \end_layout
15459
15460 \begin_layout Standard
15461 In RevTeX, the 
15462 \family typewriter
15463
15464 \backslash
15465 thanks
15466 \family default
15467  command goes 
15468 \emph on
15469 outside
15470 \emph default
15471  the 
15472 \family typewriter
15473
15474 \backslash
15475 author
15476 \family default
15477  command.
15478  The LyX equivalent is that there is a separate Thanks layout.
15479  Do 
15480 \emph on
15481 not
15482 \emph default
15483  write footnotes in the 
15484 \family sans
15485 Author
15486 \family default
15487  layout, or weird things may happen.
15488  See the RevTeX 4 documentation for more details.
15489 \end_layout
15490
15491 \begin_layout Standard
15492 Also, the 
15493 \family sans
15494 Author
15495 \begin_inset space ~
15496 \end_inset
15497
15498 Email
15499 \family default
15500
15501 \family sans
15502 Author
15503 \begin_inset space ~
15504 \end_inset
15505
15506 URL
15507 \family default
15508 , and 
15509 \family sans
15510 Thanks
15511 \family default
15512  layouts must be placed 
15513 \emph on
15514 in between
15515 \emph default
15516  the 
15517 \family sans
15518 Author
15519 \family default
15520  layout and the corresponding 
15521 \family sans
15522 Address
15523 \family default
15524  (or equivalent 
15525 \family sans
15526 Affiliation
15527 \family default
15528 ) layout.
15529  If you put the 
15530 \family sans
15531 Thanks
15532 \family default
15533  after the 
15534 \family sans
15535 Address
15536 \family default
15537 , the LaTeX won't compile.
15538 \end_layout
15539
15540 \begin_layout Subsection
15541 Drawbacks
15542 \end_layout
15543
15544 \begin_layout Standard
15545 The main problem with this layout is that you can't use the optional arguments
15546  to layouts like Email and Title.
15547  (The problem is not unique to this layout; you can't use optional arguments
15548  to the Section layouts either.) This means that after you export that file
15549  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15550  need to edit the LaTeX file with a text editor to add the optional arguments
15551  to set, e.
15552 \begin_inset space \thinspace{}
15553 \end_inset
15554
15555 g.
15556 \begin_inset space \space{}
15557 \end_inset
15558
15559 the running title for the page headers.
15560  Lacking these layouts makes the 
15561 \family typewriter
15562
15563 \backslash
15564 altaffiliation
15565 \family default
15566  (and the equivalent 
15567 \family typewriter
15568
15569 \backslash
15570 altaddress
15571 \family default
15572 ) useless, so the corresponding layouts don't exist, and will have to be
15573  added by hand.
15574 \begin_inset Foot
15575 status collapsed
15576
15577 \begin_layout Plain Layout
15578
15579 \emph on
15580 Note from JMarc:
15581 \emph default
15582  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15583  has not been updated yet to take advantage of it.
15584 \end_layout
15585
15586 \end_inset
15587
15588  
15589 \end_layout
15590
15591 \begin_layout Section
15592 Springer Journals (
15593 \family sans
15594 svjour
15595 \family default
15596 )
15597 \end_layout
15598
15599 \begin_layout Standard
15600 by 
15601 \noun on
15602 Martin Vermeer
15603 \end_layout
15604
15605 \begin_layout Subsection
15606 Description
15607 \end_layout
15608
15609 \begin_layout Standard
15610 These are the layout files for some of the journal formats used by Springer
15611  Verlag and listed on 
15612 \begin_inset Flex URL
15613 status collapsed
15614
15615 \begin_layout Plain Layout
15616
15617 http://www.springer.de/author/tex/help-journals.html
15618 \end_layout
15619
15620 \end_inset
15621
15622 , where you should also go to fetch the class files (yes, these are LaTeX2e
15623  now!).
15624  It is a modular system: the things common to all journals are implemented
15625  in 
15626 \family typewriter
15627 svjour.inc
15628 \family default
15629 , which journal-specific layout files (such as, e.
15630 \begin_inset space \thinspace{}
15631 \end_inset
15632
15633 g.
15634 \begin_inset space \space{}
15635 \end_inset
15636
15637
15638 \family typewriter
15639 svjog.layout
15640 \family default
15641  for Journal of Geodesy) can include.
15642 \end_layout
15643
15644 \begin_layout Standard
15645 This means that implementing support for any other Springer journal on this
15646  list is as simple as writing your own 
15647 \family typewriter
15648 sv
15649 \family default
15650 <myjournal>
15651 \family typewriter
15652 .layout
15653 \family default
15654  file following the outline given in 
15655 \family typewriter
15656 svjog.layout
15657 \family default
15658 .
15659  
15660 \end_layout
15661
15662 \begin_layout Standard
15663 It is reasonably well tested only for the Journal of Geodesy.
15664  
15665 \family typewriter
15666 svjour
15667 \family default
15668  and 
15669 \family typewriter
15670 svjog
15671 \family default
15672  come with the standard LyX distribution.
15673  Install the relevant class file (downloaded from Springer) in a proper
15674  directory, reconfigure LaTeX (in the teTeX case by running 
15675 \family typewriter
15676 texhash
15677 \family default
15678 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15679  and it should work.
15680 \end_layout
15681
15682 \begin_layout Subsection
15683 New styles
15684 \end_layout
15685
15686 \begin_layout Standard
15687 A large number of theorem-like styles — 
15688 \family sans
15689 Claim, Conjecture,
15690 \family default
15691  
15692 \family sans
15693 \SpecialChar \ldots{}
15694 Theorem
15695 \family default
15696 .
15697 \end_layout
15698
15699 \begin_layout Standard
15700
15701 \family sans
15702 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15703  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15704 \family default
15705 .
15706  See the Springer class file documentation for details.
15707 \end_layout
15708
15709 \begin_layout Subsection
15710 Supported journals
15711 \end_layout
15712
15713 \begin_layout Itemize
15714
15715 \emph on
15716 Journal of Geodesy
15717 \emph default
15718
15719 \family typewriter
15720 svjog.layout
15721 \family default
15722  — Martin Vermeer
15723 \end_layout
15724
15725 \begin_layout Itemize
15726
15727 \emph on
15728 Probability Theory and Related Fields
15729 \emph default
15730
15731 \family typewriter
15732 svprobth.layout
15733 \family default
15734  — Jean-Marc Lasgouttes
15735 \end_layout
15736
15737 \begin_layout Standard
15738 Add your own, it isn't so hard!
15739 \end_layout
15740
15741 \begin_layout Subsection
15742 Credits
15743 \end_layout
15744
15745 \begin_layout Standard
15746 These files are partly based on the older 
15747 \family typewriter
15748 ejour2.layout
15749 \family default
15750 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15751  file from Springer.
15752  All this, and the 
15753 \family typewriter
15754 ejour2
15755 \family default
15756  layout, are now defunct.
15757  Jean-Marc Lasgouttes helped out big in making me find my way around the
15758  LyX layout file mechanism.
15759 \end_layout
15760
15761 \begin_layout Subsection
15762 Bugs
15763 \end_layout
15764
15765 \begin_layout Standard
15766 Probably.
15767  But probably less than in the old hacked-LaTeX 
15768 \family typewriter
15769 ejour2
15770 \family default
15771 .
15772 \end_layout
15773
15774 \begin_layout Standard
15775 Limitations e.
15776 \begin_inset space \thinspace{}
15777 \end_inset
15778
15779 g.: does not display the number for theorem-like layouts, just #.
15780 \end_layout
15781
15782 \begin_layout Section
15783 Slides [aka 
15784 \noun on
15785 SliTeX
15786 \noun default
15787 ]
15788 \begin_inset CommandInset label
15789 LatexCommand label
15790 name "sec:slitex"
15791
15792 \end_inset
15793
15794
15795 \end_layout
15796
15797 \begin_layout Standard
15798 by 
15799 \noun on
15800 John Weiss
15801 \noun default
15802  
15803 \end_layout
15804
15805 \begin_layout Subsection
15806 Introduction
15807 \end_layout
15808
15809 \begin_layout Standard
15810 This section describes how to use LyX to make slides for overhead projectors.
15811  There are two document classes that can do this: the default slides class
15812  and the 
15813 \family sans
15814 FoilTeX
15815 \family default
15816  slides class.
15817  This section documents the former.
15818 \end_layout
15819
15820 \begin_layout Standard
15821 I'm going to say this again, nice and clear, so that there's no misunderstanding
15822 :
15823 \end_layout
15824
15825 \begin_layout Standard
15826 \begin_inset VSpace bigskip
15827 \end_inset
15828
15829
15830 \end_layout
15831
15832 \begin_layout Standard
15833 \align center
15834
15835 \size large
15836 This section documents the class 
15837 \begin_inset Quotes eld
15838 \end_inset
15839
15840
15841 \family sans
15842 slides (default)
15843 \family default
15844
15845 \begin_inset Quotes erd
15846 \end_inset
15847
15848  
15849 \emph on
15850 only.
15851 \end_layout
15852
15853 \begin_layout Standard
15854 \begin_inset VSpace bigskip
15855 \end_inset
15856
15857
15858 \end_layout
15859
15860 \begin_layout Standard
15861 If you're looking for the documentation for 
15862 \begin_inset Quotes eld
15863 \end_inset
15864
15865
15866 \family sans
15867 slides (FoilTeX)
15868 \family default
15869
15870 \begin_inset Quotes erd
15871 \end_inset
15872
15873 , check out section
15874 \begin_inset space ~
15875 \end_inset
15876
15877
15878 \begin_inset CommandInset ref
15879 LatexCommand ref
15880 reference "sec:foiltex"
15881
15882 \end_inset
15883
15884 .
15885  The 
15886 \family sans
15887 foils
15888 \family default
15889  class [
15890 \begin_inset Quotes eld
15891 \end_inset
15892
15893
15894 \family sans
15895 slides (FoilTeX)
15896 \family default
15897
15898 \begin_inset Quotes erd
15899 \end_inset
15900
15901 ] is actually somewhat better than the default 
15902 \family sans
15903 slides
15904 \family default
15905  class,
15906 \begin_inset Foot
15907 status collapsed
15908
15909 \begin_layout Plain Layout
15910 \SpecialChar \ldots{}
15911 or so I've been told repeatedly by its advocates.
15912  Having never used it, I have no idea if this claim is true or not.
15913 \end_layout
15914
15915 \end_inset
15916
15917  which this section documents.
15918 \end_layout
15919
15920 \begin_layout Standard
15921 This class is the LaTeX2e improvement of the old 
15922 \noun on
15923 SliTeX
15924 \noun default
15925  package.
15926  Every LaTeX2e distribution includes this class [which I'll just refer to
15927  as 
15928 \begin_inset Quotes eld
15929 \end_inset
15930
15931
15932 \family sans
15933 slides
15934 \family default
15935
15936 \begin_inset Quotes erd
15937 \end_inset
15938
15939  from now on], so you're bound to have it.
15940  As I noted earlier, there are other classes, such as 
15941 \family sans
15942 foils
15943 \family default
15944 , which also produce slides for overhead projectors and do a better job
15945  at it.
15946  However, there are some things which 
15947 \family sans
15948 slides
15949 \family default
15950  can do which the others can't, such as generate overlays.
15951  Read on to learn more!
15952 \end_layout
15953
15954 \begin_layout Subsection
15955 Getting Started
15956 \begin_inset CommandInset label
15957 LatexCommand label
15958 name "sec:slidesetup"
15959
15960 \end_inset
15961
15962
15963 \end_layout
15964
15965 \begin_layout Standard
15966 Obviously, to use this document class, you need to select 
15967 \begin_inset Quotes eld
15968 \end_inset
15969
15970
15971 \family sans
15972 slides (default)
15973 \family default
15974
15975 \begin_inset Quotes erd
15976 \end_inset
15977
15978  from the class list in the 
15979 \family sans
15980 Document\SpecialChar \menuseparator
15981 Settings
15982 \family default
15983  dialog.
15984  There are some other special things you should know about this class:
15985 \end_layout
15986
15987 \begin_layout Itemize
15988 Don't bother changing the options 
15989 \family sans
15990 Sides and Columns
15991 \family default
15992 .
15993  They're not supported by the 
15994 \family sans
15995 slides
15996 \family default
15997  class, anyways.
15998 \end_layout
15999
16000 \begin_layout Itemize
16001 The option 
16002 \family sans
16003 Page
16004 \begin_inset space ~
16005 \end_inset
16006
16007 style
16008 \family default
16009  behaves a bit differently for this class.
16010  The possible choices and what they do are as follows:
16011 \end_layout
16012
16013 \begin_deeper
16014 \begin_layout Description
16015
16016 \family sans
16017 plain
16018 \family default
16019  The final output contains page numbers in the lower right corner.
16020 \end_layout
16021
16022 \begin_layout Description
16023
16024 \family sans
16025 headings
16026 \family default
16027  Like 
16028 \family sans
16029 plain
16030 \family default
16031 , but also prints out any time markers you've put in.
16032  This is the default.
16033 \end_layout
16034
16035 \begin_layout Description
16036
16037 \family sans
16038 empty
16039 \family default
16040  The final output contains no page numbers, time markers, or alignment markers.
16041 \end_layout
16042
16043 \end_deeper
16044 \begin_layout Itemize
16045 The 
16046 \family sans
16047 slides
16048 \family default
16049  class has an extra option: 
16050 \family typewriter
16051 clock
16052 \family default
16053 .
16054  To use it, put 
16055 \begin_inset Quotes eld
16056 \end_inset
16057
16058
16059 \family typewriter
16060 clock
16061 \family default
16062
16063 \begin_inset Quotes erd
16064 \end_inset
16065
16066  in the extra class options.
16067 \end_layout
16068
16069 \begin_deeper
16070 \begin_layout Standard
16071 Using this options allows you to add time markers to 
16072 \family sans
16073 Note
16074 \family default
16075 s.
16076  See section
16077 \begin_inset space ~
16078 \end_inset
16079
16080
16081 \begin_inset CommandInset ref
16082 LatexCommand ref
16083 reference "sec:slideNote"
16084
16085 \end_inset
16086
16087  for more details.
16088 \end_layout
16089
16090 \end_deeper
16091 \begin_layout Standard
16092 You can also use the template file 
16093 \begin_inset Quotes eld
16094 \end_inset
16095
16096
16097 \family typewriter
16098 slides.lyx
16099 \family default
16100
16101 \begin_inset Quotes erd
16102 \end_inset
16103
16104  to automatically set up a document to use the 
16105 \family sans
16106 slides
16107 \family default
16108  class [using 
16109 \family sans
16110 File\SpecialChar \menuseparator
16111 New
16112 \begin_inset space ~
16113 \end_inset
16114
16115 from
16116 \begin_inset space ~
16117 \end_inset
16118
16119 Template
16120 \family default
16121  to open your new document].
16122  The template file also contains some examples of the special paragraph
16123  environments used by this class.
16124  I'll describe those next.
16125 \end_layout
16126
16127 \begin_layout Subsection
16128 Paragraph Environments
16129 \end_layout
16130
16131 \begin_layout Subsubsection
16132 Supported Environments
16133 \end_layout
16134
16135 \begin_layout Standard
16136 The first thing you'll notice when you start up a new 
16137 \family sans
16138 slides
16139 \family default
16140  document is the font size and type: it's the equivalent of the size 
16141 \begin_inset Quotes eld
16142 \end_inset
16143
16144
16145 \family sans
16146 Largest
16147 \family default
16148
16149 \begin_inset Quotes erd
16150 \end_inset
16151
16152  in the 
16153 \family sans
16154 Sans
16155 \begin_inset space ~
16156 \end_inset
16157
16158 Serif
16159 \family default
16160  font.
16161  This is also what's used in the output.
16162  Think of this as a 
16163 \begin_inset Quotes eld
16164 \end_inset
16165
16166 visual cue
16167 \begin_inset Quotes erd
16168 \end_inset
16169
16170  to remind you that this is a slide.
16171  Your final slides will use a larger font; ergo, you'll have less space.
16172  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16173 \end_layout
16174
16175 \begin_layout Standard
16176 The next thing that becomes obvious is the changes to the paragraph environment
16177  pull-down box [at the far-left end of the toolbar].
16178  Most of the paragraph environments you're used to seeing are missing.
16179  There are also five new ones.
16180  That's because the 
16181 \family sans
16182 slides
16183 \family default
16184  class itself only supports certain paragraph environments:
16185 \end_layout
16186
16187 \begin_layout Itemize
16188
16189 \family sans
16190 Standard
16191 \end_layout
16192
16193 \begin_layout Itemize
16194
16195 \family sans
16196 Itemize
16197 \end_layout
16198
16199 \begin_layout Itemize
16200
16201 \family sans
16202 Enumerate
16203 \end_layout
16204
16205 \begin_layout Itemize
16206
16207 \family sans
16208 Description
16209 \end_layout
16210
16211 \begin_layout Itemize
16212
16213 \family sans
16214 List
16215 \end_layout
16216
16217 \begin_layout Itemize
16218
16219 \family sans
16220 Quotation
16221 \end_layout
16222
16223 \begin_layout Itemize
16224
16225 \family sans
16226 Quote
16227 \end_layout
16228
16229 \begin_layout Itemize
16230
16231 \family sans
16232 Verse
16233 \end_layout
16234
16235 \begin_layout Itemize
16236
16237 \family sans
16238 Caption
16239 \end_layout
16240
16241 \begin_layout Itemize
16242
16243 \family sans
16244 LyX-Code
16245 \end_layout
16246
16247 \begin_layout Itemize
16248
16249 \family sans
16250 Comment
16251 \end_layout
16252
16253 \begin_layout Standard
16254 All of the other standard environments, including the section-heading environmen
16255 ts, aren't used in the 
16256 \family sans
16257 slides
16258 \family default
16259  class.
16260 \end_layout
16261
16262 \begin_layout Standard
16263 On the other hand, you'll notice the following new environments:
16264 \end_layout
16265
16266 \begin_layout Itemize
16267
16268 \family sans
16269 Slide
16270 \end_layout
16271
16272 \begin_layout Itemize
16273
16274 \family sans
16275 Overlay
16276 \end_layout
16277
16278 \begin_layout Itemize
16279
16280 \family sans
16281 Note
16282 \end_layout
16283
16284 \begin_layout Itemize
16285
16286 \family sans
16287 InvisibleText
16288 \end_layout
16289
16290 \begin_layout Itemize
16291
16292 \family sans
16293 VisibleText
16294 \end_layout
16295
16296 \begin_layout Standard
16297 These five are kind of quirky, due to a 
16298 \begin_inset Quotes eld
16299 \end_inset
16300
16301 feature
16302 \begin_inset Quotes erd
16303 \end_inset
16304
16305  in LyX.
16306  You see, LyX doesn't permit you to nest any other paragraph environment
16307  into an empty environment.
16308  Now, that's fine and dandy, but it means that you wouldn't be able to start
16309  a slide with anything except plain text.
16310  To deal with this, I've performed a little 
16311 \begin_inset Quotes eld
16312 \end_inset
16313
16314 LaTeX magic.
16315 \begin_inset Quotes erd
16316 \end_inset
16317
16318  
16319 \end_layout
16320
16321 \begin_layout Subsubsection
16322 Quirks of the New Environments
16323 \begin_inset CommandInset label
16324 LatexCommand label
16325 name "sec:slideQuirk"
16326
16327 \end_inset
16328
16329
16330 \end_layout
16331
16332 \begin_layout Standard
16333 All five of the new paragraph environments are somewhat quirky due to inherent
16334  limitiations in the current version of LyX.
16335  As I just mentioned, LyX forbids environments that begin with another environme
16336 nt.
16337  To get around this, the 
16338 \family sans
16339 Slide
16340 \family default
16341  environment isn't a paragraph environment as described in the 
16342 \emph on
16343 User's Guide
16344 \emph default
16345 .
16346  
16347 \end_layout
16348
16349 \begin_layout Standard
16350 You should consider 
16351 \family sans
16352 Slide
16353 \family default
16354
16355 \family sans
16356 Overlay
16357 \family default
16358 , and 
16359 \family sans
16360 Note
16361 \family default
16362  to be 
16363 \begin_inset Quotes eld
16364 \end_inset
16365
16366 pseudo-environments.
16367 \begin_inset Quotes erd
16368 \end_inset
16369
16370  They look like a section heading or a 
16371 \begin_inset Quotes eld
16372 \end_inset
16373
16374
16375 \family sans
16376 Caption
16377 \family default
16378 ,
16379 \begin_inset Quotes erd
16380 \end_inset
16381
16382  but really begin a [and, if necessary, end the previous] paragraph environment.
16383  Likewise, treat 
16384 \family sans
16385 InvisibleText
16386 \family default
16387  and 
16388 \family sans
16389 VisibleText
16390 \family default
16391  as 
16392 \begin_inset Quotes eld
16393 \end_inset
16394
16395 pseudo-commands.
16396 \begin_inset Quotes erd
16397 \end_inset
16398
16399  These two perform some action.
16400 \end_layout
16401
16402 \begin_layout Standard
16403 A common feature of all five environments, 
16404 \family sans
16405 Slide
16406 \family default
16407
16408 \family sans
16409 Overlay
16410 \family default
16411
16412 \family sans
16413 Note
16414 \family default
16415
16416 \family sans
16417 InvisibleText
16418 \family default
16419  and 
16420 \family sans
16421 VisibleText
16422 \family default
16423 , is a rather long-ish label.
16424  The text following this label — ordinarily the contents of the paragraph
16425  environment — is utterly irrelevant for 
16426 \family sans
16427 Slide
16428 \family default
16429
16430 \family sans
16431 Overlay
16432 \family default
16433
16434 \family sans
16435 Note
16436 \family default
16437
16438 \family sans
16439 InvisibleText
16440 \family default
16441  and 
16442 \family sans
16443 VisibleText
16444 \family default
16445 .
16446  LyX completely ignores it.
16447  In fact, you can leave these five environments completely empty.
16448  
16449 \end_layout
16450
16451 \begin_layout Standard
16452 While you don't 
16453 \emph on
16454 have
16455 \emph default
16456  to put any text after the rather long-ish label, you might want to.
16457  This could be a short description of the contents of the 
16458 \family sans
16459 Slide
16460 \family default
16461 , for example.
16462  In that case, enter your descriptive comment and hit 
16463 \family sans
16464 Return
16465 \family default
16466  as you normally would.
16467 \end_layout
16468
16469 \begin_layout Standard
16470 If, on the other hand, you don't want to enter any descriptive text, you'll
16471  hit another LyX quirk.
16472  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16473  environment until you put something in the old one.
16474  So, do this:
16475 \end_layout
16476
16477 \begin_layout Itemize
16478 Start entering the text that will 
16479 \emph on
16480 follow
16481 \emph default
16482  the new 
16483 \family sans
16484 Slide
16485 \family default
16486
16487 \family sans
16488 Overlay
16489 \family default
16490
16491 \family sans
16492 Note
16493 \family default
16494
16495 \family sans
16496 InvisibleText
16497 \family default
16498  or 
16499 \family sans
16500 VisibleText
16501 \family default
16502 .
16503  
16504 \end_layout
16505
16506 \begin_layout Itemize
16507 Now move to the beginning of that paragraph.
16508  
16509 \end_layout
16510
16511 \begin_layout Itemize
16512 Next, hit 
16513 \family sans
16514 Return
16515 \family default
16516 .
16517  
16518 \end_layout
16519
16520 \begin_layout Itemize
16521 Finally, change this new, empty paragraph to a 
16522 \family sans
16523 Slide
16524 \family default
16525
16526 \family sans
16527 Overlay
16528 \family default
16529
16530 \family sans
16531 Note
16532 \family default
16533
16534 \family sans
16535 InvisibleText
16536 \family default
16537  or 
16538 \family sans
16539 VisibleText
16540 \family default
16541 .
16542  
16543 \end_layout
16544
16545 \begin_layout Standard
16546 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16547
16548 \end_layout
16549
16550 \begin_layout Subsection
16551 Making a Presentation with 
16552 \family sans
16553 Slide
16554 \family default
16555
16556 \family sans
16557 Overlay
16558 \family default
16559  and 
16560 \family sans
16561 Note
16562 \end_layout
16563
16564 \begin_layout Subsubsection
16565 Using the 
16566 \family sans
16567 Slide
16568 \family default
16569  Environment
16570 \end_layout
16571
16572 \begin_layout Standard
16573 If you're expecting this section to teach you how to actually make a presentatio
16574 n, you'll be sorely disappointed.
16575  Naturally, I'll describe all of the ways the 
16576 \family sans
16577 slides
16578 \family default
16579  class can assist you in preparing the materials for a presentation.
16580  Filling in the contents, however, is up to you.
16581  [Then again, that 
16582 \emph on
16583 is
16584 \emph default
16585  the LyX philosophy.]
16586 \end_layout
16587
16588 \begin_layout Standard
16589 Choosing the 
16590 \family sans
16591 Slide
16592 \family default
16593  environment [in the manner described in section
16594 \begin_inset space ~
16595 \end_inset
16596
16597
16598 \begin_inset CommandInset ref
16599 LatexCommand ref
16600 reference "sec:slideQuirk"
16601
16602 \end_inset
16603
16604 ] tells LyX to begin a new slide [duh].
16605  The label for this environment/
16606 \begin_inset Quotes erd
16607 \end_inset
16608
16609 pseudo-command
16610 \begin_inset Quotes erd
16611 \end_inset
16612
16613  is an 
16614 \begin_inset Quotes eld
16615 \end_inset
16616
16617 ASCII line,
16618 \begin_inset Quotes erd
16619 \end_inset
16620
16621  in cool blue, followed by the label, 
16622 \begin_inset Quotes eld
16623 \end_inset
16624
16625 NewSlide:
16626 \begin_inset Quotes erd
16627 \end_inset
16628
16629 .
16630  Any text or paragraph environments that follow this one go on the new slide.
16631  It's that simple.
16632 \end_layout
16633
16634 \begin_layout Standard
16635 Slides are probably the only time you'll need to forcibly end pages in LyX
16636  (this can be specified in the 
16637 \family sans
16638 Paragraph Layout
16639 \family default
16640  dialog).
16641  In fact, you'll want to, once you finish entering the contents of one slide.
16642  If you've entered more text than can physically fit on a slide, the extra
16643  overflows onto a new slide.
16644  I don't recommend doing this, however, since the overflow slide won't have
16645  any page number on it.
16646  Furthermore, it may interfere with any 
16647 \family sans
16648 Overlay
16649 \family default
16650  you've made to accompany the oversized 
16651 \family sans
16652 Slide
16653 \family default
16654 .
16655 \end_layout
16656
16657 \begin_layout Standard
16658 The 
16659 \family sans
16660 Overlay
16661 \family default
16662  and 
16663 \family sans
16664 Note
16665 \family default
16666  environments work the same way as the 
16667 \family sans
16668 Slide
16669 \family default
16670  environment.
16671  They both create an 
16672 \begin_inset Quotes eld
16673 \end_inset
16674
16675 ASCII line
16676 \begin_inset Quotes erd
16677 \end_inset
16678
16679  followed by a label [
16680 \begin_inset Quotes eld
16681 \end_inset
16682
16683 NewOverlay:
16684 \begin_inset Quotes erd
16685 \end_inset
16686
16687  and 
16688 \begin_inset Quotes eld
16689 \end_inset
16690
16691 NewNote:
16692 \begin_inset Quotes erd
16693 \end_inset
16694
16695 , respectively].
16696  The color is a stunning magenta instead of blue, and the 
16697 \begin_inset Quotes eld
16698 \end_inset
16699
16700 ASCII line
16701 \begin_inset Quotes erd
16702 \end_inset
16703
16704  will look different, in style and in length.
16705  The label fonts of all three also differ from one another.
16706 \end_layout
16707
16708 \begin_layout Standard
16709 As with a 
16710 \family sans
16711 Slide
16712 \family default
16713 , if the contents of a 
16714 \family sans
16715 Note
16716 \family default
16717  or 
16718 \family sans
16719 Overlay
16720 \family default
16721  exceed the physical size of a slide or sheet of paper, the extra will overflow
16722  onto a new sheet.
16723  Again, you should avoid this.
16724  It defeats the whole purpose of 
16725 \family sans
16726 Note
16727 \family default
16728 s and 
16729 \family sans
16730 Overlay
16731 \family default
16732 s.
16733 \end_layout
16734
16735 \begin_layout Subsubsection
16736 Using 
16737 \family sans
16738 Overlay
16739 \family default
16740  with 
16741 \family sans
16742 Slide
16743 \end_layout
16744
16745 \begin_layout Standard
16746 The idea behind an 
16747 \family sans
16748 Overlay
16749 \family default
16750  is a slide that sits atop another slide.
16751  Perhaps you wish to discuss a figure on the main 
16752 \family sans
16753 Slide
16754 \family default
16755  before displaying the text associated with it.
16756  One way to accomplish this is tape a flap of dark paper over the part of
16757  the 
16758 \family sans
16759 Slide
16760 \family default
16761  you want to display later.
16762  This method fails, however, if you wish to overlap one graph with another,
16763  for example.
16764  You would then have to fumble while speaking to align the two separate,
16765  overlapping 
16766 \family sans
16767 Slide
16768 \family default
16769 s to align the two graphs.
16770  The use of an 
16771 \family sans
16772 Overlay
16773 \family default
16774  environment in both cases makes life much easier.
16775 \end_layout
16776
16777 \begin_layout Standard
16778 Each 
16779 \family sans
16780 Overlay
16781 \family default
16782  receives the page number of its 
16783 \begin_inset Quotes eld
16784 \end_inset
16785
16786 parent
16787 \begin_inset Quotes erd
16788 \end_inset
16789
16790  
16791 \family sans
16792 Slide
16793 \family default
16794 , appended by 
16795 \begin_inset Quotes eld
16796 \end_inset
16797
16798
16799 \family typewriter
16800 -a
16801 \family default
16802
16803 \begin_inset Quotes erd
16804 \end_inset
16805
16806 .
16807 \begin_inset Foot
16808 status collapsed
16809
16810 \begin_layout Plain Layout
16811 Presumably, mutliple 
16812 \family sans
16813 Overlay
16814 \family default
16815 s would have 
16816 \begin_inset Quotes eld
16817 \end_inset
16818
16819
16820 \family typewriter
16821 -a
16822 \family default
16823
16824 \begin_inset Quotes erd
16825 \end_inset
16826
16827
16828 \begin_inset Quotes eld
16829 \end_inset
16830
16831
16832 \family typewriter
16833 -b
16834 \family default
16835
16836 \begin_inset Quotes erd
16837 \end_inset
16838
16839
16840 \begin_inset Quotes eld
16841 \end_inset
16842
16843
16844 \family typewriter
16845 -c
16846 \family default
16847
16848 \begin_inset Quotes erd
16849 \end_inset
16850
16851 , etc.
16852 \begin_inset space ~
16853 \end_inset
16854
16855 appended to the page number of the parent 
16856 \family sans
16857 Slide
16858 \family default
16859 .
16860  
16861 \end_layout
16862
16863 \end_inset
16864
16865  Clearly, you want the contents of both the 
16866 \family sans
16867 Slide
16868 \family default
16869  and the 
16870 \family sans
16871 Overlay
16872 \family default
16873  to each fit on a single physical slide! You should probably consider an
16874  
16875 \family sans
16876 Overlay
16877 \family default
16878  as 
16879 \begin_inset Quotes eld
16880 \end_inset
16881
16882 part of
16883 \begin_inset Quotes erd
16884 \end_inset
16885
16886  a 
16887 \family sans
16888 Slide
16889 \family default
16890 .
16891  Indeed, the LyX 
16892 \family sans
16893 slides
16894 \family default
16895  class provides a visual cue for this: the label at the start of an 
16896 \family sans
16897 Overlay
16898 \family default
16899  is shorter than that at the start of a 
16900 \family sans
16901 Slide
16902 \family default
16903 .
16904  Lastly, when you generate printable output, you'll find alignment markers
16905  in all four corners of both the 
16906 \family sans
16907 Overlay
16908 \family default
16909  page and its parent 
16910 \family sans
16911 Slide
16912 \family default
16913 .
16914  These will assist you in lining up the two physical slides.
16915 \end_layout
16916
16917 \begin_layout Standard
16918 The major problem in overlaying two slides is aligning the contents of the
16919  two transparencies.
16920  How much space should you leave for that graph on the second slide? Worse
16921  still, what if you want a graph and a sentence on second slide, but there
16922  is text on the main transparency that goes in between them? You could try
16923  and insert vertical space of the right size.
16924  The better way is to use 
16925 \family sans
16926 InvisibleText
16927 \family default
16928  and 
16929 \family sans
16930 VisibleText
16931 \family default
16932 .
16933 \end_layout
16934
16935 \begin_layout Standard
16936 As their names imply, 
16937 \family sans
16938 InvisibleText
16939 \family default
16940  and 
16941 \family sans
16942 VisibleText
16943 \family default
16944  are two command-like paragraph environments that make all subsequent text
16945  invisible and visible, respectively.
16946  Note from section
16947 \begin_inset space ~
16948 \end_inset
16949
16950
16951 \begin_inset CommandInset ref
16952 LatexCommand ref
16953 reference "sec:slideQuirk"
16954
16955 \end_inset
16956
16957  that you don't place anything 
16958 \emph on
16959 into
16960 \emph default
16961  these two environments, however.
16962  When you create an 
16963 \family sans
16964 InvisibleText
16965 \family default
16966 , it inserts a centered, sky-blue label into the page reading 
16967 \begin_inset Quotes eld
16968 \end_inset
16969
16970 <Invisible Text Follows>
16971 \begin_inset Quotes erd
16972 \end_inset
16973
16974 .
16975  For paragraphs following this label, the parts of the 
16976 \family sans
16977 Slide
16978 \family default
16979  [or 
16980 \family sans
16981 Overlay
16982 \family default
16983 ; it doesn't matter which] where they would be contain instead blank space.
16984  
16985 \end_layout
16986
16987 \begin_layout Standard
16988 For 
16989 \family sans
16990 VisibleText
16991 \family default
16992 , the corresponding centered label is 
16993 \begin_inset Quotes eld
16994 \end_inset
16995
16996 <Visible Text Follows>
16997 \begin_inset Quotes erd
16998 \end_inset
16999
17000  in blazing green.
17001  Paragraphs following this label behave normally.
17002  Note that the beginning of a new 
17003 \family sans
17004 Slide
17005 \family default
17006
17007 \family sans
17008 Overlay
17009 \family default
17010 , or 
17011 \family sans
17012 Note
17013 \family default
17014  automatically shuts off an 
17015 \family sans
17016 InvisibleText
17017 \family default
17018 .
17019  It's therefore not necessary to use 
17020 \family sans
17021 VisibleText
17022 \family default
17023  at the end of a 
17024 \family sans
17025 Slide
17026 \family default
17027 .
17028 \end_layout
17029
17030 \begin_layout Standard
17031 By now, it should be obvious how to create overlay transparencies using
17032  the proper combination of 
17033 \family sans
17034 InvisibleText
17035 \family default
17036  and 
17037 \family sans
17038 VisibleText
17039 \family default
17040  on a 
17041 \family sans
17042 Slide
17043 \family default
17044  and 
17045 \family sans
17046 Overlay
17047 \family default
17048 :
17049 \end_layout
17050
17051 \begin_layout Enumerate
17052 Create a 
17053 \family sans
17054 Slide
17055 \family default
17056 , including everything that will appear on it, whether on the main slide
17057  or on the 
17058 \family sans
17059 Overlay
17060 \family default
17061 .
17062 \end_layout
17063
17064 \begin_layout Enumerate
17065 Before each figure or paragraph that will appear only on the 
17066 \family sans
17067 Overlay
17068 \family default
17069 , insert an 
17070 \family sans
17071 InvisibleText
17072 \family default
17073  environment.
17074  If necessary, insert a 
17075 \family sans
17076 VisibleText
17077 \family default
17078  environment after the 
17079 \family sans
17080 Overlay
17081 \family default
17082 -only text.
17083 \end_layout
17084
17085 \begin_layout Enumerate
17086 Start an 
17087 \family sans
17088 Overlay
17089 \family default
17090  immediately following the 
17091 \family sans
17092 Slide
17093 \family default
17094 .
17095 \end_layout
17096
17097 \begin_layout Enumerate
17098 Copy the contents of this 
17099 \family sans
17100 Slide
17101 \family default
17102  into the 
17103 \family sans
17104 Overlay
17105 \family default
17106 .
17107 \end_layout
17108
17109 \begin_layout Enumerate
17110 Within the 
17111 \family sans
17112 Overlay
17113 \family default
17114 , change all of the 
17115 \family sans
17116 InvisibleText
17117 \family default
17118  lines to 
17119 \family sans
17120 VisibleText
17121 \family default
17122  and vice-versa.
17123 \end_layout
17124
17125 \begin_layout Standard
17126 That's it.
17127  You've just made an 
17128 \family sans
17129 Overlay
17130 \family default
17131 .
17132 \end_layout
17133
17134 \begin_layout Standard
17135 There's one problem with the way I've designed the LyX 
17136 \family sans
17137 slides
17138 \family default
17139  class: you can't make text in the middle of a paragraph invisible, nor
17140  make text in the middle of an invisible paragraph visible again.
17141  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17142 \begin_inset Foot
17143 status collapsed
17144
17145 \begin_layout Plain Layout
17146 The commands of interest are: 
17147 \end_layout
17148
17149 \begin_layout Itemize
17150
17151 \family typewriter
17152 {
17153 \backslash
17154 invisible \SpecialChar \ldots{}
17155  }
17156 \end_layout
17157
17158 \begin_layout Itemize
17159
17160 \family typewriter
17161 {
17162 \backslash
17163 visible \SpecialChar \ldots{}
17164  }
17165 \end_layout
17166
17167 \begin_layout Plain Layout
17168 \SpecialChar \ldots{}
17169 and need to be marked as TeX.
17170  The text whose 
17171 \begin_inset Quotes eld
17172 \end_inset
17173
17174 visibility
17175 \begin_inset Quotes erd
17176 \end_inset
17177
17178  you wish to change goes in between the brackets [and after the 
17179 \family typewriter
17180
17181 \backslash
17182 invisible
17183 \family default
17184  or 
17185 \family typewriter
17186
17187 \backslash
17188 visible
17189 \family default
17190  command].
17191  If you don't know how to mark text as TeX, see the appropriate section
17192  of the 
17193 \emph on
17194 User's Guide
17195 \emph default
17196 .
17197 \end_layout
17198
17199 \end_inset
17200
17201
17202 \end_layout
17203
17204 \begin_layout Subsubsection
17205 Using 
17206 \family sans
17207 Note
17208 \family default
17209  with 
17210 \family sans
17211 Slide
17212 \family default
17213
17214 \begin_inset CommandInset label
17215 LatexCommand label
17216 name "sec:slideNote"
17217
17218 \end_inset
17219
17220
17221 \end_layout
17222
17223 \begin_layout Standard
17224 Like an 
17225 \family sans
17226 Overlay
17227 \family default
17228 , a 
17229 \family sans
17230 Note
17231 \family default
17232  is associated with a 
17233 \begin_inset Quotes eld
17234 \end_inset
17235
17236 parent
17237 \begin_inset Quotes erd
17238 \end_inset
17239
17240  
17241 \family sans
17242 Slide
17243 \family default
17244 .
17245  Here, too, the LyX 
17246 \family sans
17247 slides
17248 \family default
17249  class provides visual cues.
17250  The label for a 
17251 \family sans
17252 Note
17253 \family default
17254  is shorter than that of a 
17255 \family sans
17256 Slide
17257 \family default
17258  [yet longer than that of an 
17259 \family sans
17260 Overlay
17261 \family default
17262 ] and, like the label of an 
17263 \family sans
17264 Overlay
17265 \family default
17266  is shockingly magenta.
17267  Additionally, the printed 
17268 \family sans
17269 Note
17270 \family default
17271  has the page number of its 
17272 \begin_inset Quotes eld
17273 \end_inset
17274
17275 parent
17276 \begin_inset Quotes erd
17277 \end_inset
17278
17279  
17280 \family sans
17281 Slide
17282 \family default
17283 , appended by 
17284 \begin_inset Quotes eld
17285 \end_inset
17286
17287
17288 \family typewriter
17289 -
17290 \family default
17291 1
17292 \begin_inset Quotes erd
17293 \end_inset
17294
17295
17296 \begin_inset Quotes eld
17297 \end_inset
17298
17299
17300 \family typewriter
17301 -
17302 \family default
17303 2
17304 \begin_inset Quotes erd
17305 \end_inset
17306
17307
17308 \begin_inset Quotes eld
17309 \end_inset
17310
17311
17312 \family typewriter
17313 -
17314 \family default
17315 3
17316 \begin_inset Quotes erd
17317 \end_inset
17318
17319 , etc.
17320  You can have multiple 
17321 \family sans
17322 Note
17323 \family default
17324 s associated with a single 
17325 \family sans
17326 Slide
17327 \family default
17328 , and, as with 
17329 \family sans
17330 Slide
17331 \family default
17332  and 
17333 \family sans
17334 Overlay
17335 \family default
17336 , you'll probably want to break up long 
17337 \family sans
17338 Note
17339 \family default
17340 s so that they fit on a single sheet of paper.
17341 \end_layout
17342
17343 \begin_layout Standard
17344 The purpose of a 
17345 \family sans
17346 Note
17347 \family default
17348  is obvious: it contains anything additional you might want to say about
17349  a 
17350 \family sans
17351 Slide
17352 \family default
17353 .
17354  It could also be used as a sheet of reminders for a particular 
17355 \family sans
17356 Slide
17357 \family default
17358 .
17359  In the case of the latter, you might want to make use of time markers.
17360  Currently, the LyX 
17361 \family sans
17362 slides
17363 \family default
17364  class has no 
17365 \begin_inset Quotes eld
17366 \end_inset
17367
17368 native
17369 \begin_inset Quotes erd
17370 \end_inset
17371
17372  support for time markers, a 
17373 \noun on
17374 SliTeX
17375 \noun default
17376  feature.
17377  So, you'll have to resort to using the LaTeX codes.
17378 \end_layout
17379
17380 \begin_layout Standard
17381 To use time markers, you'll need to specify the extra class option 
17382 \begin_inset Quotes eld
17383 \end_inset
17384
17385
17386 \family typewriter
17387 clock
17388 \family default
17389
17390 \begin_inset Quotes erd
17391 \end_inset
17392
17393  [see section
17394 \begin_inset space ~
17395 \end_inset
17396
17397
17398 \begin_inset CommandInset ref
17399 LatexCommand ref
17400 reference "sec:slidesetup"
17401
17402 \end_inset
17403
17404 ].
17405  This option turns on timing marks, which will appear in the lower-left-hand
17406  corner of every 
17407 \family sans
17408 Note
17409 \family default
17410  you generate.
17411  To set what appears in the time marker, you use the LaTeX commands 
17412 \begin_inset Quotes eld
17413 \end_inset
17414
17415
17416 \family typewriter
17417
17418 \backslash
17419 settime{}
17420 \family default
17421
17422 \begin_inset Quotes erd
17423 \end_inset
17424
17425  and 
17426 \begin_inset Quotes eld
17427 \end_inset
17428
17429
17430 \family typewriter
17431
17432 \backslash
17433 addtime{}
17434 \family default
17435
17436 \begin_inset Quotes erd
17437 \end_inset
17438
17439 .
17440  The arguments of both commands are time measured in seconds.
17441  
17442 \begin_inset Quotes eld
17443 \end_inset
17444
17445
17446 \family typewriter
17447
17448 \backslash
17449 settime{}
17450 \family default
17451
17452 \begin_inset Quotes erd
17453 \end_inset
17454
17455  sets the time marker to a given time.
17456  
17457 \begin_inset Quotes eld
17458 \end_inset
17459
17460
17461 \family typewriter
17462
17463 \backslash
17464 addtime{}
17465 \family default
17466
17467 \begin_inset Quotes erd
17468 \end_inset
17469
17470  increments the time marker by the specified amount.
17471  Using time markers and 
17472 \family sans
17473 Note
17474 \family default
17475 s in this fashion, you can remind yourself how much time to spend on a particula
17476
17477 \family sans
17478 Slide
17479 \family default
17480 .
17481 \end_layout
17482
17483 \begin_layout Standard
17484 There's one last feature to describe.
17485  Clearly, you'd like to print out all of your 
17486 \family sans
17487 Slide
17488 \family default
17489 s and 
17490 \family sans
17491 Overlay
17492 \family default
17493 s on transparencies while printing all of your 
17494 \family sans
17495 Note
17496 \family default
17497 s on plain paper.
17498  However, a 
17499 \family sans
17500 Note
17501 \family default
17502  
17503 \emph on
17504 must
17505 \emph default
17506  follow the 
17507 \family sans
17508 Slide
17509 \family default
17510  with which it is associated.
17511  What's a person to do?
17512 \end_layout
17513
17514 \begin_layout Standard
17515 Luckily, there are two LaTeX commands that allow you to select what to print
17516  out.
17517  Both must be placed into the preamble of your document.
17518  The command 
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  will cause the output to contain only the 
17535 \family sans
17536 Slide
17537 \family default
17538 s and 
17539 \family sans
17540 Overlay
17541 \family default
17542 s.
17543  Correspondingly, the command 
17544 \begin_inset Quotes eld
17545 \end_inset
17546
17547
17548 \family typewriter
17549
17550 \backslash
17551 onlynotes{
17552 \backslash
17553 notes}
17554 \family default
17555
17556 \begin_inset Quotes erd
17557 \end_inset
17558
17559  prevents the output of anything but 
17560 \family sans
17561 Note
17562 \family default
17563 s.
17564  I'd advise placing both commands in the preamble and initially comment
17565  both out.
17566  You can then preview your entire presentation as you write.
17567  When you're done writing, you can then uncomment one of the two to select
17568  what you want to print.
17569  I like to uncomment 
17570 \begin_inset Quotes eld
17571 \end_inset
17572
17573
17574 \family typewriter
17575
17576 \backslash
17577 onlyslides{
17578 \backslash
17579 slides}
17580 \family default
17581
17582 \begin_inset Quotes erd
17583 \end_inset
17584
17585  , print to a file with 
17586 \begin_inset Quotes eld
17587 \end_inset
17588
17589
17590 \family typewriter
17591 -slides
17592 \family default
17593
17594 \begin_inset Quotes erd
17595 \end_inset
17596
17597  in its name, comment it back out, then uncomment 
17598 \begin_inset Quotes eld
17599 \end_inset
17600
17601
17602 \family typewriter
17603
17604 \backslash
17605 onlynotes{
17606 \backslash
17607 notes}
17608 \family default
17609
17610 \begin_inset Quotes erd
17611 \end_inset
17612
17613  and print to a 
17614 \begin_inset Quotes eld
17615 \end_inset
17616
17617
17618 \family typewriter
17619 *-notes.ps
17620 \family default
17621
17622 \begin_inset Quotes erd
17623 \end_inset
17624
17625  file.
17626  I can then send either file to a printer, loading transparencies or plain
17627  paper as appropriate.
17628 \end_layout
17629
17630 \begin_layout Standard
17631 You can also provide other arguments to the 
17632 \begin_inset Quotes eld
17633 \end_inset
17634
17635
17636 \family typewriter
17637
17638 \backslash
17639 onlyslides{}
17640 \family default
17641
17642 \begin_inset Quotes erd
17643 \end_inset
17644
17645  and 
17646 \begin_inset Quotes eld
17647 \end_inset
17648
17649
17650 \family typewriter
17651
17652 \backslash
17653 onlynotes{}
17654 \family default
17655
17656 \begin_inset Quotes erd
17657 \end_inset
17658
17659  commands.
17660  See a good LaTeX book for details.
17661 \end_layout
17662
17663 \begin_layout Subsection
17664 The 
17665 \family sans
17666 slides
17667 \family default
17668  Class Template File
17669 \end_layout
17670
17671 \begin_layout Standard
17672 I have also provided a template file, 
17673 \begin_inset Quotes eld
17674 \end_inset
17675
17676
17677 \family typewriter
17678 slides.lyx
17679 \family default
17680
17681 \begin_inset Quotes erd
17682 \end_inset
17683
17684 , with the 
17685 \family sans
17686 slides
17687 \family default
17688  class.
17689  To use it, begin your new presentation with 
17690 \family sans
17691 \bar under
17692 F
17693 \bar default
17694 ile\SpecialChar \menuseparator
17695 New
17696 \begin_inset space ~
17697 \end_inset
17698
17699 from
17700 \begin_inset space ~
17701 \end_inset
17702
17703
17704 \bar under
17705 T
17706 \bar default
17707 emplate
17708 \family default
17709 .
17710  Your new LyX presentation file will contain an example 
17711 \family sans
17712 Slide
17713 \family default
17714  – 
17715 \family sans
17716 Overlay
17717 \family default
17718  – 
17719 \family sans
17720 Note
17721 \family default
17722  triplet.
17723  The 
17724 \family sans
17725 Slide
17726 \family default
17727  and 
17728 \family sans
17729 Overlay
17730 \family default
17731  additionally contain an example of the use of 
17732 \family sans
17733 InvisibleText
17734 \family default
17735  and 
17736 \family sans
17737 VisibleText
17738 \family default
17739 .
17740  Lastly, the preamble will contain:
17741 \end_layout
17742
17743 \begin_layout LyX-Code
17744 % Uncomment to print out only slides and overlays
17745 \end_layout
17746
17747 \begin_layout LyX-Code
17748 %
17749 \end_layout
17750
17751 \begin_layout LyX-Code
17752 %
17753 \backslash
17754 onlyslides{
17755 \backslash
17756 slides}
17757 \begin_inset Newline newline
17758 \end_inset
17759
17760  
17761 \end_layout
17762
17763 \begin_layout LyX-Code
17764 % Uncomment to print out only notes
17765 \end_layout
17766
17767 \begin_layout LyX-Code
17768 %
17769 \end_layout
17770
17771 \begin_layout LyX-Code
17772 %
17773 \backslash
17774 onlynotes{
17775 \backslash
17776 notes}
17777 \end_layout
17778
17779 \begin_layout Standard
17780 One final thing: I created this class to support the LaTeX2e 
17781 \begin_inset Quotes eld
17782 \end_inset
17783
17784
17785 \noun on
17786 SliTeX
17787 \noun default
17788  emulation
17789 \begin_inset Quotes erd
17790 \end_inset
17791
17792  class, one of the built-in LaTeX2e classes.
17793  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17794  built-in slide class.
17795  It's here if you want it or need it.
17796  There exist other LaTeX2e classes for creating presentations, such as the
17797  
17798 \family sans
17799 Foils
17800 \family default
17801  class [see section
17802 \begin_inset space ~
17803 \end_inset
17804
17805
17806 \begin_inset CommandInset ref
17807 LatexCommand ref
17808 reference "sec:foiltex"
17809
17810 \end_inset
17811
17812 ] or the 
17813 \begin_inset Quotes eld
17814 \end_inset
17815
17816
17817 \family typewriter
17818 seminar
17819 \family default
17820
17821 \begin_inset Quotes erd
17822 \end_inset
17823
17824  package [present on some TeX distributions].
17825  The latter is not yet supported under LyX.
17826 \begin_inset Foot
17827 status collapsed
17828
17829 \begin_layout Plain Layout
17830 Perhaps you can take on the task\SpecialChar \ldots{}
17831
17832 \end_layout
17833
17834 \end_inset
17835
17836  I know nothing about these other classes.
17837  Try them out to see what sort of alternative they provide.
17838 \end_layout
17839
17840 \begin_layout Chapter
17841 LyX Features needing Extra Software
17842 \end_layout
17843
17844 \begin_layout Section
17845 Checking TeX
17846 \end_layout
17847
17848 \begin_layout Standard
17849 by 
17850 \noun on
17851 Asger Alstrup
17852 \end_layout
17853
17854 \begin_layout Subsection
17855 Introduction
17856 \end_layout
17857
17858 \begin_layout Standard
17859 If you have the 
17860 \family typewriter
17861 chktex
17862 \family default
17863  program installed
17864 \begin_inset Foot
17865 status collapsed
17866
17867 \begin_layout Plain Layout
17868
17869 \family typewriter
17870 chktex
17871 \family default
17872  is not yet available when you are using the LaTeX distribution MiKTeX.
17873 \end_layout
17874
17875 \end_inset
17876
17877 , you'll find in the 
17878 \family sans
17879 Tools
17880 \family default
17881  menu the entry: 
17882 \family sans
17883 Check
17884 \begin_inset space ~
17885 \end_inset
17886
17887 TeX
17888 \family default
17889 .
17890  You can get 
17891 \family typewriter
17892 chktex
17893 \family default
17894  from CTAN,
17895 \begin_inset Newline newline
17896 \end_inset
17897
17898
17899 \begin_inset CommandInset href
17900 LatexCommand href
17901 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17902
17903 \end_inset
17904
17905 .
17906 \end_layout
17907
17908 \begin_layout Standard
17909 The 
17910 \family sans
17911 ChkTeX
17912 \family default
17913  package is a program that was written by 
17914 \begin_inset Flex Noun
17915 status collapsed
17916
17917 \begin_layout Plain Layout
17918 Jens T.
17919 \begin_inset space ~
17920 \end_inset
17921
17922 Berger Thielemann
17923 \end_layout
17924
17925 \end_inset
17926
17927  in frustration because some constructs in LaTeX are sometimes non-intuitive,
17928  and easy to forget.
17929  The program runs over your LaTeX file, checks the integrity of the file,
17930  and flags some common errors.
17931  In other technical words, it is 
17932 \family typewriter
17933 lint
17934 \family default
17935  for LaTeX.
17936 \end_layout
17937
17938 \begin_layout Standard
17939 Well, what is a syntax checker doing in LyX which is supposed to produce
17940  correct LaTeX anyways? The answer is simple: Just as 
17941 \family typewriter
17942 Lint
17943 \family default
17944  not only checks the 
17945 \emph on
17946 syntax
17947 \emph default
17948  of C programs, but also does 
17949 \emph on
17950 semantic
17951 \emph default
17952  checks for type-errors, 
17953 \family sans
17954 ChkTeX
17955 \family default
17956  catches some common 
17957 \emph on
17958 typographic
17959 \emph default
17960  errors, in addition to the syntactical ones.
17961  Specifically, 
17962 \family sans
17963 ChkTeX
17964 \family default
17965  is capable of detecting several common errors, such as
17966 \end_layout
17967
17968 \begin_layout Itemize
17969 Ellipsis detection:
17970 \begin_inset Newline newline
17971 \end_inset
17972
17973 Use \SpecialChar \ldots{}
17974  instead of ...
17975 \end_layout
17976
17977 \begin_layout Itemize
17978 No space in front of/after parenthesis:
17979 \begin_inset Newline newline
17980 \end_inset
17981
17982 ( wrong spacing )
17983 \end_layout
17984
17985 \begin_layout Itemize
17986 Enforcement of normal space after common abbreviations:
17987 \begin_inset Newline newline
17988 \end_inset
17989
17990 e.
17991 \begin_inset space \thinspace{}
17992 \end_inset
17993
17994 g.
17995 \begin_inset space \space{}
17996 \end_inset
17997
17998 is too wide spacing.
17999 \end_layout
18000
18001 \begin_layout Itemize
18002 Enforcement of end-of-sentence space when the last sentence ends with a
18003  capital letter:
18004 \begin_inset Newline newline
18005 \end_inset
18006
18007 This is a TEST.
18008  And this is wrong spacing.
18009 \end_layout
18010
18011 \begin_layout Itemize
18012 Space in front of labels and similar commands:
18013 \begin_inset Newline newline
18014 \end_inset
18015
18016 The label should stick right up to the text to avoid falling to a wrong
18017  page.
18018  
18019 \begin_inset CommandInset label
18020 LatexCommand label
18021 name "sec:chktex"
18022
18023 \end_inset
18024
18025  
18026 \begin_inset Foot
18027 status collapsed
18028
18029 \begin_layout Plain Layout
18030 This footnote is in danger of falling off to a wrong page
18031 \end_layout
18032
18033 \end_inset
18034
18035  The label is separated too much.
18036 \end_layout
18037
18038 \begin_layout Itemize
18039 Space in front of references, instead of hard spaces:
18040 \begin_inset Newline newline
18041 \end_inset
18042
18043 If you have bad luck, the text will break right between the referenced text
18044  and reference number, and that's a pity.
18045  See section 
18046 \begin_inset CommandInset ref
18047 LatexCommand ref
18048 reference "sec:chktex"
18049
18050 \end_inset
18051
18052 .
18053 \end_layout
18054
18055 \begin_layout Itemize
18056 Use of 
18057 \begin_inset Quotes eld
18058 \end_inset
18059
18060 x
18061 \begin_inset Quotes erd
18062 \end_inset
18063
18064  instead of 
18065 \begin_inset Formula $\times$
18066 \end_inset
18067
18068  between numbers:
18069 \begin_inset Newline newline
18070 \end_inset
18071
18072 2x2 looks cheap compared to 
18073 \begin_inset Formula $2\times2$
18074 \end_inset
18075
18076 .
18077 \end_layout
18078
18079 \begin_layout Standard
18080 and more \SpecialChar \ldots{}
18081  It is an invaluable tool when you are 
18082 \begin_inset Quotes eld
18083 \end_inset
18084
18085 finishing up
18086 \begin_inset Quotes erd
18087 \end_inset
18088
18089  your document before printing, and you should run it right after the obligatory
18090  spelling check, and before you go fine tuning the typesetting.
18091 \end_layout
18092
18093 \begin_layout Subsection
18094 How to use it
18095 \end_layout
18096
18097 \begin_layout Standard
18098 If you have the program installed, usage is as simple as choosing 
18099 \family sans
18100 Tools\SpecialChar \menuseparator
18101 Check
18102 \begin_inset space ~
18103 \end_inset
18104
18105 TeX
18106 \family default
18107 .
18108  This will make LyX generate a LaTeX file of your document, start 
18109 \family sans
18110 ChkTeX
18111 \family default
18112  to check it, and then make LyX insert 
18113 \begin_inset Quotes eld
18114 \end_inset
18115
18116 error boxes
18117 \begin_inset Quotes erd
18118 \end_inset
18119
18120  with the warnings from 
18121 \family sans
18122 ChkTeX
18123 \family default
18124 , if there were any.
18125  The warnings will be placed close to the point of the mistake, and you
18126  can quickly find them by using the 
18127 \family sans
18128 Navigate\SpecialChar \menuseparator
18129 Error
18130 \family default
18131  menu item, or the shortcut key 
18132 \family sans
18133 C-g
18134 \family default
18135  from the default 
18136 \family typewriter
18137 cua
18138 \family default
18139  bind file.
18140  Open the error boxes by clicking on them with the mouse, or use the shortcut
18141  key 
18142 \family sans
18143 C-i
18144 \family default
18145  from 
18146 \family typewriter
18147 cua
18148 \family default
18149  bindings, or the corresponding 
18150 \family sans
18151 C-o
18152 \family default
18153  for the alternate 
18154 \family typewriter
18155 emacs
18156 \family default
18157  bind file.
18158  Read the warning and correct the mistake, if it is a mistake.
18159  If you have trouble understanding what the warning is about, you can safely
18160  ignore it.
18161  Remember that there is a hidden layer between the document on screen and
18162  the technical details in invoking 
18163 \family sans
18164 ChkTeX
18165 \family default
18166 , and this gap can make some warnings seem arcane or just plain silly.
18167 \end_layout
18168
18169 \begin_layout Standard
18170 This document is an excellent testing bed for the feature, and it should
18171  provide quite a few warnings for you to fiddle with.
18172  Since computers are only so smart, expect most of the warnings to be false
18173  alarms, though.
18174 \end_layout
18175
18176 \begin_layout Subsection
18177 How to fine tune it
18178 \end_layout
18179
18180 \begin_layout Standard
18181 Sometimes, you'll find that 
18182 \family sans
18183 ChkTeX
18184 \family default
18185  makes more noise than suits your mood.
18186  Then you can choose not to use it, wait until your mood changes, or try
18187  to customize 
18188 \family sans
18189 ChkTeX
18190 \family default
18191  to get better along with you.
18192 \end_layout
18193
18194 \begin_layout Standard
18195 Although 
18196 \family sans
18197 ChkTeX
18198 \family default
18199  
18200 \emph on
18201 is
18202 \emph default
18203  very configurable and extensible, you should not expect to solve all problems
18204  with 
18205 \family sans
18206 ChkTeX
18207 \family default
18208  in LyX this way.
18209  Since LyX has to generate a somewhat special LaTeX file to be able to match
18210  the line numbers from the 
18211 \family sans
18212 ChkTeX
18213 \family default
18214  output
18215 \begin_inset Foot
18216 status collapsed
18217
18218 \begin_layout Plain Layout
18219 You can inspect the specific output from 
18220 \family sans
18221 chktex
18222 \family default
18223  by using 
18224 \family sans
18225 Document\SpecialChar \menuseparator
18226 LaTeX
18227 \begin_inset space ~
18228 \end_inset
18229
18230 Log
18231 \family default
18232  right after a 
18233 \family sans
18234 chktex
18235 \family default
18236  run.
18237 \end_layout
18238
18239 \end_inset
18240
18241  to the internal document structure, some of the warnings will not appear
18242  correctly.
18243  There are two things you can do about this:
18244 \end_layout
18245
18246 \begin_layout Itemize
18247 Fine tune the 
18248 \family sans
18249 ChkTeX
18250 \family default
18251  invocation command line in 
18252 \begin_inset Flex MenuItem
18253 status collapsed
18254
18255 \begin_layout Plain Layout
18256 Tools\SpecialChar \menuseparator
18257 Preferences\SpecialChar \menuseparator
18258 Output\SpecialChar \menuseparator
18259 LaTeX\SpecialChar \menuseparator
18260 CheckTeX command
18261 \end_layout
18262
18263 \end_inset
18264
18265 , or the global 
18266 \family sans
18267 ChkTeX
18268 \family default
18269  installation configuration file (usually with the file 
18270 \family typewriter
18271 chktexrc
18272 \family default
18273 ).
18274  See below to learn what warnings can be enabled and disabled on the command
18275  line.
18276 \end_layout
18277
18278 \begin_layout Itemize
18279 Export your document as a raw LaTeX file using 
18280 \family sans
18281 File\SpecialChar \menuseparator
18282 Export\SpecialChar \menuseparator
18283 LaTeX
18284 \family default
18285  and run 
18286 \family typewriter
18287 chktex
18288 \family default
18289  manually on that.
18290  Invoked in this way, it can be a hassle to find the corresponding place
18291  in the document inside LyX, but with a little patience, you should be able
18292  to do it.
18293 \end_layout
18294
18295 \begin_layout Standard
18296 Here follows the warning messages that can be enabled and disabled in 
18297 \family sans
18298 Preferences
18299 \family default
18300 .
18301  Use 
18302 \family typewriter
18303 -n#
18304 \family default
18305  to disable a warning, and 
18306 \family typewriter
18307 -w#
18308 \family default
18309  to enable a warning.
18310  The emphasized entries are disabled by default, because the default is
18311  "
18312 \family typewriter
18313 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18314 \family default
18315 ".
18316 \end_layout
18317
18318 \begin_layout Standard
18319 Notice that you should only use the options that enable and disable warnings,
18320  because LyX relies on some of the other command line parameters to be set
18321  in a specific way to have a chance to communicate with 
18322 \family typewriter
18323 chktex
18324 \family default
18325 .
18326 \end_layout
18327
18328 \begin_layout Enumerate
18329
18330 \size small
18331 \emph on
18332 Command terminated with space.
18333 \end_layout
18334
18335 \begin_layout Enumerate
18336
18337 \size small
18338 Non-breaking space (
18339 \begin_inset Quotes eld
18340 \end_inset
18341
18342
18343 \family typewriter
18344 ~
18345 \family default
18346
18347 \begin_inset Quotes erd
18348 \end_inset
18349
18350 ) should have been used.
18351 \end_layout
18352
18353 \begin_layout Enumerate
18354
18355 \size small
18356 \emph on
18357 You should enclose the previous parenthesis with 
18358 \begin_inset Quotes eld
18359 \end_inset
18360
18361
18362 \family typewriter
18363 {}
18364 \family default
18365
18366 \begin_inset Quotes erd
18367 \end_inset
18368
18369 .
18370 \end_layout
18371
18372 \begin_layout Enumerate
18373
18374 \size small
18375 Italic correction (
18376 \begin_inset Quotes eld
18377 \end_inset
18378
18379
18380 \family typewriter
18381
18382 \backslash
18383 /
18384 \family default
18385
18386 \begin_inset Quotes erd
18387 \end_inset
18388
18389 ) found in non-italic buffer.
18390 \end_layout
18391
18392 \begin_layout Enumerate
18393
18394 \size small
18395 Italic correction (
18396 \begin_inset Quotes eld
18397 \end_inset
18398
18399
18400 \family typewriter
18401
18402 \backslash
18403 /
18404 \family default
18405
18406 \begin_inset Quotes erd
18407 \end_inset
18408
18409 ) found more than once.
18410 \end_layout
18411
18412 \begin_layout Enumerate
18413
18414 \size small
18415 \emph on
18416 No italic correction (
18417 \begin_inset Quotes eld
18418 \end_inset
18419
18420
18421 \family typewriter
18422
18423 \backslash
18424 /
18425 \family default
18426
18427 \begin_inset Quotes erd
18428 \end_inset
18429
18430 ) found.
18431 \end_layout
18432
18433 \begin_layout Enumerate
18434
18435 \size small
18436 Accent command 
18437 \begin_inset Quotes eld
18438 \end_inset
18439
18440
18441 \family typewriter
18442 cmd
18443 \family default
18444
18445 \begin_inset Quotes erd
18446 \end_inset
18447
18448  needs use of 
18449 \begin_inset Quotes eld
18450 \end_inset
18451
18452
18453 \family typewriter
18454 cmd
18455 \family default
18456
18457 \begin_inset Quotes erd
18458 \end_inset
18459
18460 .
18461 \end_layout
18462
18463 \begin_layout Enumerate
18464
18465 \size small
18466 Wrong length of dash may have been used.
18467 \end_layout
18468
18469 \begin_layout Enumerate
18470
18471 \size small
18472 \emph on
18473 \begin_inset Quotes eld
18474 \end_inset
18475
18476
18477 \family typewriter
18478 %s
18479 \family default
18480
18481 \begin_inset Quotes erd
18482 \end_inset
18483
18484  expected, found 
18485 \begin_inset Quotes eld
18486 \end_inset
18487
18488
18489 \family typewriter
18490 %s
18491 \family default
18492
18493 \begin_inset Quotes erd
18494 \end_inset
18495
18496 .
18497 \end_layout
18498
18499 \begin_layout Enumerate
18500
18501 \size small
18502 Solo 
18503 \begin_inset Quotes eld
18504 \end_inset
18505
18506
18507 \family typewriter
18508 %s
18509 \family default
18510
18511 \begin_inset Quotes erd
18512 \end_inset
18513
18514  found.
18515 \end_layout
18516
18517 \begin_layout Enumerate
18518
18519 \size small
18520 You should use 
18521 \begin_inset Quotes eld
18522 \end_inset
18523
18524
18525 \family typewriter
18526 %s
18527 \family default
18528
18529 \begin_inset Quotes erd
18530 \end_inset
18531
18532  to achieve an ellipsis.
18533 \end_layout
18534
18535 \begin_layout Enumerate
18536
18537 \size small
18538 Inter-word spacing (
18539 \begin_inset Quotes eld
18540 \end_inset
18541
18542
18543 \family typewriter
18544
18545 \backslash
18546
18547 \family default
18548  
18549 \begin_inset Quotes eld
18550 \end_inset
18551
18552 ) should perhaps be used.
18553 \end_layout
18554
18555 \begin_layout Enumerate
18556
18557 \size small
18558 Inter-sentence spacing (
18559 \begin_inset Quotes eld
18560 \end_inset
18561
18562
18563 \family typewriter
18564
18565 \backslash
18566 @
18567 \family default
18568
18569 \begin_inset Quotes erd
18570 \end_inset
18571
18572 ) should perhaps be used.
18573 \end_layout
18574
18575 \begin_layout Enumerate
18576
18577 \size small
18578 Could not find argument for command.
18579 \end_layout
18580
18581 \begin_layout Enumerate
18582
18583 \size small
18584 No match found for 
18585 \begin_inset Quotes eld
18586 \end_inset
18587
18588
18589 \family typewriter
18590 %s
18591 \family default
18592
18593 \begin_inset Quotes erd
18594 \end_inset
18595
18596 .
18597 \end_layout
18598
18599 \begin_layout Enumerate
18600
18601 \size small
18602 Math mode still on at end of LaTeX file.
18603 \end_layout
18604
18605 \begin_layout Enumerate
18606
18607 \size small
18608 Number of 
18609 \begin_inset Quotes eld
18610 \end_inset
18611
18612
18613 \family typewriter
18614 char
18615 \family default
18616
18617 \begin_inset Quotes erd
18618 \end_inset
18619
18620  doesn't match the number of 
18621 \begin_inset Quotes eld
18622 \end_inset
18623
18624
18625 \family typewriter
18626 char
18627 \family default
18628
18629 \begin_inset Quotes erd
18630 \end_inset
18631
18632 .
18633 \end_layout
18634
18635 \begin_layout Enumerate
18636
18637 \size small
18638 You should use either 
18639 \family typewriter
18640
18641 \begin_inset Quotes eld
18642 \end_inset
18643
18644
18645 \family default
18646  or 
18647 \family typewriter
18648
18649 \begin_inset Quotes erd
18650 \end_inset
18651
18652
18653 \family default
18654  as an alternative to 
18655 \begin_inset Quotes eld
18656 \end_inset
18657
18658
18659 \family typewriter
18660 "
18661 \family default
18662
18663 \begin_inset Quotes erd
18664 \end_inset
18665
18666 .
18667 \end_layout
18668
18669 \begin_layout Enumerate
18670
18671 \size small
18672 You should use "
18673 \family typewriter
18674 '
18675 \family default
18676 " (ASCII 39) instead of "
18677 \family typewriter
18678 ´
18679 \family default
18680 " (ASCII 180).
18681 \end_layout
18682
18683 \begin_layout Enumerate
18684
18685 \size small
18686 User-specified pattern found.
18687 \end_layout
18688
18689 \begin_layout Enumerate
18690
18691 \size small
18692 This command might not be intended.
18693 \end_layout
18694
18695 \begin_layout Enumerate
18696
18697 \size small
18698 \emph on
18699 Comment displayed.
18700 \end_layout
18701
18702 \begin_layout Enumerate
18703
18704 \size small
18705 Either 
18706 \family typewriter
18707 ''
18708 \backslash
18709 ,'
18710 \family default
18711  or 
18712 \family typewriter
18713 '
18714 \backslash
18715 ,''
18716 \family default
18717  will look better.
18718 \end_layout
18719
18720 \begin_layout Enumerate
18721
18722 \size small
18723 Delete this space to maintain correct page references.
18724 \end_layout
18725
18726 \begin_layout Enumerate
18727
18728 \size small
18729 \emph on
18730 You might wish to put this between a pair of 
18731 \begin_inset Quotes eld
18732 \end_inset
18733
18734
18735 \family typewriter
18736 {}
18737 \family default
18738
18739 \begin_inset Quotes erd
18740 \end_inset
18741
18742 .
18743 \end_layout
18744
18745 \begin_layout Enumerate
18746
18747 \size small
18748 You ought to remove spaces in front of punctuation.
18749 \end_layout
18750
18751 \begin_layout Enumerate
18752
18753 \size small
18754 Could not execute LaTeX command.
18755 \end_layout
18756
18757 \begin_layout Enumerate
18758
18759 \size small
18760 Don't use 
18761 \family typewriter
18762
18763 \backslash
18764 /
18765 \family default
18766  in front of small punctuation.
18767 \end_layout
18768
18769 \begin_layout Enumerate
18770
18771 \family typewriter
18772 \size small
18773 $
18774 \backslash
18775 times$
18776 \family default
18777  may look prettier here.
18778 \end_layout
18779
18780 \begin_layout Enumerate
18781
18782 \size small
18783 \emph on
18784 Multiple spaces detected in output.
18785 \end_layout
18786
18787 \begin_layout Enumerate
18788
18789 \size small
18790 This text may be ignored.
18791 \end_layout
18792
18793 \begin_layout Enumerate
18794
18795 \size small
18796 Use 
18797 \family typewriter
18798
18799 \begin_inset Quotes eld
18800 \end_inset
18801
18802
18803 \family default
18804  to begin quotation, not 
18805 \family typewriter
18806 '
18807 \family default
18808 .
18809 \end_layout
18810
18811 \begin_layout Enumerate
18812
18813 \size small
18814 Use 
18815 \family typewriter
18816 '
18817 \family default
18818  to end quotation, not 
18819 \family typewriter
18820
18821 \begin_inset Quotes eld
18822 \end_inset
18823
18824
18825 \family default
18826 .
18827 \end_layout
18828
18829 \begin_layout Enumerate
18830
18831 \size small
18832 Don't mix quotes.
18833 \end_layout
18834
18835 \begin_layout Enumerate
18836
18837 \size small
18838 You should perhaps use 
18839 \begin_inset Quotes eld
18840 \end_inset
18841
18842
18843 \family typewriter
18844 cmd
18845 \family default
18846
18847 \begin_inset Quotes erd
18848 \end_inset
18849
18850  instead.
18851 \end_layout
18852
18853 \begin_layout Enumerate
18854
18855 \size small
18856 You should put a space in front of/after parenthesis.
18857 \end_layout
18858
18859 \begin_layout Enumerate
18860
18861 \size small
18862 You should avoid spaces in front of/after parenthesis.
18863 \end_layout
18864
18865 \begin_layout Enumerate
18866
18867 \size small
18868 \emph on
18869 You should not use punctuation in front of/after quotes.
18870 \end_layout
18871
18872 \begin_layout Enumerate
18873
18874 \size small
18875 Double space found.
18876 \end_layout
18877
18878 \begin_layout Enumerate
18879
18880 \size small
18881 You should put punctuation outside inner/inside display math mode.
18882 \end_layout
18883
18884 \begin_layout Enumerate
18885
18886 \size small
18887 You ought to not use primitive TeX in LaTeX code.
18888 \end_layout
18889
18890 \begin_layout Enumerate
18891
18892 \size small
18893 You should remove spaces in front of 
18894 \begin_inset Quotes eld
18895 \end_inset
18896
18897
18898 \family typewriter
18899 %s
18900 \family default
18901
18902 \begin_inset Quotes erd
18903 \end_inset
18904
18905
18906 \end_layout
18907
18908 \begin_layout Enumerate
18909
18910 \size small
18911 \begin_inset Quotes eld
18912 \end_inset
18913
18914
18915 \family typewriter
18916 %s
18917 \family default
18918
18919 \begin_inset Quotes erd
18920 \end_inset
18921
18922  is normally not followed by 
18923 \begin_inset Quotes eld
18924 \end_inset
18925
18926
18927 \family typewriter
18928 %c
18929 \family default
18930
18931 \begin_inset Quotes erd
18932 \end_inset
18933
18934 .
18935 \end_layout
18936
18937 \begin_layout Standard
18938 In later versions of LyX, we hope to provide a more complete interface to
18939  this tool (and it's smaller cousin 
18940 \family typewriter
18941 lacheck
18942 \family default
18943 ) to exploit the full power of it.
18944  But it's not exactly useless as it is now: go try it on one of your existing
18945  documents of a certain length and be surprised.
18946 \end_layout
18947
18948 \begin_layout Section
18949 Version Control in LyX
18950 \end_layout
18951
18952 \begin_layout Standard
18953 by
18954 \noun on
18955  Lars Gullik Bjønnes 
18956 \noun default
18957 and 
18958 \noun on
18959 Pavel Sanda
18960 \end_layout
18961
18962 \begin_layout Subsection
18963 Introduction
18964 \end_layout
18965
18966 \begin_layout Standard
18967 LyX supports some of the most basic RCS/CVS/SVN/GIT commands.
18968  If you need something a bit more sophisticated you will have to do that
18969  manually in a terminal.
18970 \end_layout
18971
18972 \begin_layout Standard
18973 Also note that CVS support is not as good as subversion support so we advise
18974  using SVN instead.
18975  A good place to start learning Subversion is SVN Book
18976 \begin_inset Foot
18977 status open
18978
18979 \begin_layout Plain Layout
18980 \begin_inset CommandInset href
18981 LatexCommand href
18982 target "http://svnbook.red-bean.com/"
18983
18984 \end_inset
18985
18986
18987 \end_layout
18988
18989 \end_inset
18990
18991 .
18992  In the case of RCS you should read 
18993 \begin_inset Quotes eld
18994 \end_inset
18995
18996 rcsintro
18997 \begin_inset Quotes erd
18998 \end_inset
18999
19000  (a man file, read it with 
19001 \family typewriter
19002 man rcsintro
19003 \family default
19004 ).
19005  This file describes all the basic features of RCS.
19006  You should especially notice the comment about a RCS directory, and the
19007  notion of a master RCS file (the file ending in 
19008 \family typewriter
19009 ,v
19010 \family default
19011 ).
19012 \end_layout
19013
19014 \begin_layout Standard
19015 Before you begin to use the version control features in LyX, you should
19016  be familiar with RCS/CVS/SVN/GIT usage.
19017  The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
19018  package — no guarantees are made for older versions.
19019  Most of the log messages are not currently displayed after operations —
19020  you can check them in the Messages pane if unsure.
19021  Regular users of version control will appreciate VC toolbar, which can
19022  be enabled via 
19023 \family sans
19024 View\SpecialChar \menuseparator
19025 Toolbars\SpecialChar \menuseparator
19026 Version
19027 \begin_inset space ~
19028 \end_inset
19029
19030 Control
19031 \family default
19032 .
19033 \end_layout
19034
19035 \begin_layout Standard
19036 For introducing your own external commands consult vc-command in the manual
19037  of LyX functions.
19038 \end_layout
19039
19040 \begin_layout Subsection
19041 RCS commands in LyX
19042 \end_layout
19043
19044 \begin_layout Standard
19045 The following sections describe the RCS commands supported by LyX.
19046  You can find them in the 
19047 \family sans
19048 File\SpecialChar \menuseparator
19049 Version
19050 \begin_inset space ~
19051 \end_inset
19052
19053 Control
19054 \family default
19055  submenu.
19056  LyX was tested against RCS 5.7/5.8
19057 \begin_inset Foot
19058 status open
19059
19060 \begin_layout Plain Layout
19061 Note that old DOS / MS Windows builds (5.7) need to setup environment variables
19062  in order to work properly with LyX.
19063  In particular time zone (TZ) should be set and more importantly RCSINIT
19064  in order to change default archive location ("SET RCSINIT=-x,v/") --- LyX
19065  expects archive to be found in file.lyx,v within the original document directory.
19066  See also README shipped with Windows RCS binaries.
19067 \end_layout
19068
19069 \end_inset
19070
19071 .
19072 \end_layout
19073
19074 \begin_layout Subsubsection
19075
19076 \family sans
19077 Register
19078 \end_layout
19079
19080 \begin_layout Standard
19081 If your document is not under revision control, this is the only item shown
19082  in the menu.
19083  And if it is under revision control, the 
19084 \family sans
19085 Register
19086 \family default
19087  item is not visible.
19088  
19089 \end_layout
19090
19091 \begin_layout Standard
19092 This command registers your document with RCS (unless you are under the
19093  directory managed by CVS)\SpecialChar \@.
19094  You are asked interactively to supply an initial
19095  description of the document.
19096  The document is now set in Read-Only mode and you have to 
19097 \family sans
19098 Check
19099 \begin_inset space ~
19100 \end_inset
19101
19102 Out
19103 \begin_inset space ~
19104 \end_inset
19105
19106 For
19107 \begin_inset space ~
19108 \end_inset
19109
19110 Edit
19111 \family default
19112 , before making any changes to it.
19113  A document under revision control has a 
19114 \begin_inset Quotes eld
19115 \end_inset
19116
19117 [RCS:<version> <locker>]
19118 \begin_inset Quotes erd
19119 \end_inset
19120
19121  item tagged to the filename in the minibuffer.
19122 \end_layout
19123
19124 \begin_layout Standard
19125 RCS command that is run: 
19126 \family typewriter
19127 ci -q -u -i -t-"<initial description>" <file-name>
19128 \end_layout
19129
19130 \begin_layout Standard
19131 Read 
19132 \family typewriter
19133 man ci
19134 \family default
19135  to understand the switches.
19136  
19137 \end_layout
19138
19139 \begin_layout Subsubsection
19140
19141 \family sans
19142 Check In Changes
19143 \end_layout
19144
19145 \begin_layout Standard
19146 When you are finished editing a file, you check in your changes.
19147  When you do this, you are asked for a description of the changes.
19148  This is stored in the history log.
19149  The version number is bumped, your changes are applied to the master RCS
19150  file, the document is unlocked and set to Read-Only mode.
19151 \end_layout
19152
19153 \begin_layout Standard
19154 RCS command: 
19155 \family typewriter
19156 ci -q -u -m"<description>" <file-name>
19157 \end_layout
19158
19159 \begin_layout Subsubsection
19160
19161 \family sans
19162 Check Out For Edit
19163 \end_layout
19164
19165 \begin_layout Standard
19166 By doing this you lock the document so that only you can edit it.
19167  This will also make the document Read-Write only for you.
19168  You will usually continue editing for a while and when you are finished
19169  you check in your changes.
19170  The status line is changed to reflect that you have locked the file.
19171 \end_layout
19172
19173 \begin_layout Standard
19174 RCS command: 
19175 \family typewriter
19176 co -q -l <file-name>
19177 \end_layout
19178
19179 \begin_layout Subsubsection
19180
19181 \family sans
19182 Revert To Repository Version
19183 \end_layout
19184
19185 \begin_layout Standard
19186 This will discard all changes made to the document since the last check
19187  in.
19188  You get a warning before changes are discarded.
19189 \end_layout
19190
19191 \begin_layout Standard
19192 RCS command: 
19193 \family typewriter
19194 co -f -u<version> <file-name>
19195 \end_layout
19196
19197 \begin_layout Subsubsection
19198
19199 \family sans
19200 Copy
19201 \end_layout
19202
19203 \begin_layout Standard
19204 This will create a copy of the current document.
19205  Since RCS does not support copy operations natively, the version history
19206  is not preserved, and the copy is added as a new file.
19207  It requires a clean document without any changes since the last checkin.
19208  You are asked for a file name and a description of the copy operation.
19209  After that the copy is created, both locally and in the repository.
19210  If the parent directories of the copied and original document differ, all
19211  relative paths of included files of the copy are adjusted (like in 
19212 \family sans
19213 File\SpecialChar \menuseparator
19214 Save As
19215 \family default
19216 \SpecialChar \ldots{}
19217 ).
19218  Finally, the copy is loaded instead of the original document.
19219 \end_layout
19220
19221 \begin_layout Labeling
19222 \labelwidthstring 00.00.0000
19223 RCS
19224 \begin_inset space ~
19225 \end_inset
19226
19227 commands: 
19228 \begin_inset space ~
19229 \end_inset
19230
19231
19232 \begin_inset Newline newline
19233 \end_inset
19234
19235 Copy 
19236 \begin_inset Flex Code
19237 status collapsed
19238
19239 \begin_layout Plain Layout
19240
19241 \family typewriter
19242 \begin_inset Quotes eld
19243 \end_inset
19244
19245 <file-name>
19246 \begin_inset Quotes erd
19247 \end_inset
19248
19249
19250 \end_layout
19251
19252 \end_inset
19253
19254  to 
19255 \begin_inset Flex Code
19256 status collapsed
19257
19258 \begin_layout Plain Layout
19259
19260 \family typewriter
19261 \begin_inset Quotes eld
19262 \end_inset
19263
19264 <new-file-name>
19265 \begin_inset Quotes erd
19266 \end_inset
19267
19268
19269 \end_layout
19270
19271 \end_inset
19272
19273
19274 \begin_inset Newline newline
19275 \end_inset
19276
19277
19278 \begin_inset Flex Code
19279 status collapsed
19280
19281 \begin_layout Plain Layout
19282 ci -q -u 
19283 \family typewriter
19284 -i 
19285 \begin_inset Quotes eld
19286 \end_inset
19287
19288 <new-file-name>
19289 \begin_inset Quotes erd
19290 \end_inset
19291
19292
19293 \end_layout
19294
19295 \end_inset
19296
19297
19298 \end_layout
19299
19300 \begin_layout Subsubsection
19301
19302 \family sans
19303 Undo Last Checkin
19304 \end_layout
19305
19306 \begin_layout Standard
19307 This makes as if the last check in never happened.
19308  No changes are made to the document loaded into LyX, but the last version
19309  is removed from the master RCS file.
19310 \end_layout
19311
19312 \begin_layout Standard
19313 RCS command: 
19314 \family typewriter
19315 rcs -o<version> <file-name>
19316 \end_layout
19317
19318 \begin_layout Subsubsection
19319
19320 \family sans
19321 Show History
19322 \end_layout
19323
19324 \begin_layout Standard
19325 This shows the complete history of the RCS document.
19326  The output of 
19327 \family typewriter
19328 rlog <file-name>
19329 \family default
19330  is shown in a browser.
19331  See 
19332 \family typewriter
19333 man rlog
19334 \family default
19335  for more info.
19336 \end_layout
19337
19338 \begin_layout Subsubsection
19339 Revision info
19340 \end_layout
19341
19342 \begin_layout Standard
19343 LyX supports RCS version number, author name, date and time of last commit.
19344  All those are extracted from 
19345 \family typewriter
19346 rlog -r <file-name>
19347 \family default
19348 .
19349  See 
19350 \begin_inset CommandInset ref
19351 LatexCommand ref
19352 reference "sub:VCS-Revision-Information"
19353
19354 \end_inset
19355
19356  for details.
19357 \end_layout
19358
19359 \begin_layout Subsection
19360 CVS commands in LyX
19361 \end_layout
19362
19363 \begin_layout Standard
19364 A subset of CVS operations is supported by LyX.
19365  You can find the commands in the 
19366 \family sans
19367 File\SpecialChar \menuseparator
19368 Version
19369 \begin_inset space ~
19370 \end_inset
19371
19372 Control
19373 \family default
19374  submenu.
19375  The version control system SVN is more powerful, so please use it instead
19376  of CVS if possible.
19377 \end_layout
19378
19379 \begin_layout Subsubsection
19380
19381 \family sans
19382 General CVS usage
19383 \end_layout
19384
19385 \begin_layout Standard
19386 If you start from scratch with CVS you have to create your repository and
19387  checkout the working copy with external tools.
19388  If you're using a client-server setup you may need to login before doing
19389  the first repository checkout.
19390 \end_layout
19391
19392 \begin_layout Standard
19393 If your documents are under revision control and others are using the same
19394  repository problems arise when different changes to the same document at
19395  the same location happen.
19396  Standard CVS repositories don't operate with a file locking mechanism.
19397  This may be surprising, but conflicts only occur if people disagree on
19398  the proper content of the same part of a document.
19399  So, if co-workers are used to communicate regularly, these conflicts occur
19400  rarely.
19401  If they don't communicate they have a fundamental problem anyway.
19402  Nevertheless some people like to work with so called 
19403 \begin_inset Quotes eld
19404 \end_inset
19405
19406 reserved checkouts
19407 \begin_inset Quotes erd
19408 \end_inset
19409
19410 .
19411  If they do so the working copy of all files is readonly when checked out
19412  first and the user starts editing after using a special command to make
19413  the working copy writable.
19414  When the changes are checked in the working copy returns to readonly state.
19415  With LyX one has to edit the 
19416 \begin_inset Flex Code
19417 status collapsed
19418
19419 \begin_layout Plain Layout
19420 .cvsrc
19421 \end_layout
19422
19423 \end_inset
19424
19425  file and add the line 
19426 \begin_inset Flex Code
19427 status collapsed
19428
19429 \begin_layout Plain Layout
19430 cvs -r
19431 \end_layout
19432
19433 \end_inset
19434
19435  to work with reserved checkouts.
19436  The benefit is the possibility to see who is using a writable copy of some
19437  document.
19438  It's not guaranteed only one user makes a copy writable.
19439 \end_layout
19440
19441 \begin_layout Standard
19442 LyX tries to guess if you're using reserved or non-reserved checkouts.
19443  If your working copy is readonly or it is writable and an additional copy
19444  of your document exists in the CVS/Base sub-directory a reserved otherwise
19445  a non-reserved checkout is assumed.
19446  When a reserved checkout is detected you have to use 
19447 \begin_inset Flex MenuItem
19448 status collapsed
19449
19450 \begin_layout Plain Layout
19451 Check Out
19452 \end_layout
19453
19454 \end_inset
19455
19456  to make your working copy writable if it's readonly.
19457  After doing so the 
19458 \begin_inset Flex MenuItem
19459 status collapsed
19460
19461 \begin_layout Plain Layout
19462 Check In
19463 \end_layout
19464
19465 \end_inset
19466
19467  operation is possible and that makes your working copy readonly again after
19468  transferring your changes to the repository.
19469 \end_layout
19470
19471 \begin_layout Standard
19472 More information about CVS can be found here 
19473 \begin_inset Flex URL
19474 status collapsed
19475
19476 \begin_layout Plain Layout
19477
19478 http://www.nongnu.org/cvs
19479 \end_layout
19480
19481 \end_inset
19482
19483  and here 
19484 \begin_inset Flex URL
19485 status collapsed
19486
19487 \begin_layout Plain Layout
19488
19489 http://ximbiot.com/cvs
19490 \end_layout
19491
19492 \end_inset
19493
19494 .
19495 \end_layout
19496
19497 \begin_layout Standard
19498 Read 
19499 \family typewriter
19500 man cvs
19501 \family default
19502  to understand the sub-commands and the switches mentioned below.
19503 \end_layout
19504
19505 \begin_layout Subsubsection
19506
19507 \family sans
19508 Register
19509 \end_layout
19510
19511 \begin_layout Standard
19512 If your document is not under revision control, this is the only item shown
19513  in the menu.
19514  And if it is under revision control, the 
19515 \family sans
19516 \bar under
19517 R
19518 \bar default
19519 egister
19520 \family default
19521  item is not visible.
19522  
19523 \end_layout
19524
19525 \begin_layout Standard
19526 This command registers in CVS your document 
19527 \begin_inset Flex Strong
19528 status collapsed
19529
19530 \begin_layout Plain Layout
19531
19532 \emph on
19533 only
19534 \end_layout
19535
19536 \end_inset
19537
19538  in the case you have already the documents directory under CVS control
19539  (in particular 
19540 \family typewriter
19541 CVS/Entries
19542 \family default
19543  file exists).
19544  This means you have to create or checkout the archive by yourself using
19545  external tools.
19546  (In case you forget that step LyX registers the document with RCS.)
19547 \end_layout
19548
19549 \begin_layout Standard
19550 Then you are asked interactively to supply an initial description of the
19551  document.
19552  Don't forget that registered file is not yet checked in.
19553 \end_layout
19554
19555 \begin_layout Standard
19556 CVS command that is run: 
19557 \family typewriter
19558 cvs -q add -m"<entered message>" "<file-name>"
19559 \end_layout
19560
19561 \begin_layout Standard
19562 The term 
19563 \family typewriter
19564 "<file-name>"
19565 \family default
19566  above and for all other CVS commands is an abbreviation for 
19567 \begin_inset Quotes eld
19568 \end_inset
19569
19570 change the current working directory to file location and use the file name
19571  without path component as argument
19572 \begin_inset Quotes erd
19573 \end_inset
19574
19575 .
19576 \end_layout
19577
19578 \begin_layout Subsubsection
19579
19580 \family sans
19581 Check In Changes
19582 \end_layout
19583
19584 \begin_layout Standard
19585 When you are finished editing a file, you commit your changes.
19586  When you do this and you had changed the document, you are asked for a
19587  description of the changes.
19588  After that changes are written to the repository.
19589  In case you didn't change the document and a reserved checkout is detected
19590  the reservation made on 
19591 \begin_inset Flex MenuItem
19592 status collapsed
19593
19594 \begin_layout Plain Layout
19595 Check Out
19596 \end_layout
19597
19598 \end_inset
19599
19600  is undone.
19601 \end_layout
19602
19603 \begin_layout Labeling
19604 \labelwidthstring 00.00.0000
19605 CVS
19606 \begin_inset space ~
19607 \end_inset
19608
19609 command: 
19610 \begin_inset space ~
19611 \end_inset
19612
19613
19614 \begin_inset Newline newline
19615 \end_inset
19616
19617
19618 \begin_inset Flex Code
19619 status collapsed
19620
19621 \begin_layout Plain Layout
19622 cvs 
19623 \family typewriter
19624 -q commit -m"<description>" "<file-name>"
19625 \end_layout
19626
19627 \end_inset
19628
19629  or
19630 \begin_inset Newline newline
19631 \end_inset
19632
19633
19634 \begin_inset Flex Code
19635 status collapsed
19636
19637 \begin_layout Plain Layout
19638 cvs -q unedit 
19639 \family typewriter
19640 "<file-name>"
19641 \end_layout
19642
19643 \end_inset
19644
19645
19646 \end_layout
19647
19648 \begin_layout Subsubsection
19649
19650 \family sans
19651 Check Out Changes
19652 \end_layout
19653
19654 \begin_layout Standard
19655 When you are sharing a repository with others, you may have to incorporate
19656  their changes into your working copy.
19657 \end_layout
19658
19659 \begin_layout Standard
19660 CVS command: 
19661 \family typewriter
19662 cvs -q update "<file-name>"
19663 \end_layout
19664
19665 \begin_layout Standard
19666 If a readonly checkout is detected the working copy is made writable and
19667  reserved.
19668 \end_layout
19669
19670 \begin_layout Standard
19671 CVS command: 
19672 \family typewriter
19673 cvs -q edit "<file-name>"
19674 \end_layout
19675
19676 \begin_layout Subsubsection
19677
19678 \family sans
19679 Revert To Repository Version
19680 \end_layout
19681
19682 \begin_layout Standard
19683 This will discard all changes made to the document since the last check
19684  in.
19685  You get a warning before changes are discarded.
19686  Firstly the file is deleted, secondly CVS update command is run.
19687 \end_layout
19688
19689 \begin_layout Standard
19690 CVS command: 
19691 \family typewriter
19692 cvs -q update "<file-name>"
19693 \end_layout
19694
19695 \begin_layout Standard
19696 If a reserved checkout is detected and the working copy has no changes only
19697  the reservation is undone.
19698 \end_layout
19699
19700 \begin_layout Standard
19701 CVS command: 
19702 \family typewriter
19703 cvs -q unedit "<file-name>"
19704 \end_layout
19705
19706 \begin_layout Subsubsection
19707
19708 \family sans
19709 Copy
19710 \end_layout
19711
19712 \begin_layout Standard
19713 This will create a copy of the current document.
19714  Since CVS does not support copy operations natively, the version history
19715  is not preserved, and the copy is added as a new file.
19716  It requires a clean document without any changes since the last checkin.
19717  You are asked for a file name and a description of the copy operation.
19718  After that the copy is created, both locally and in the repository.
19719  If the parent directories of the copied and original document differ, all
19720  relative paths of included files of the copy are adjusted (like in 
19721 \family sans
19722 File\SpecialChar \menuseparator
19723 Save As
19724 \family default
19725 \SpecialChar \ldots{}
19726 ).
19727  Finally, the copy is loaded instead of the original document.
19728 \end_layout
19729
19730 \begin_layout Labeling
19731 \labelwidthstring 00.00.0000
19732 CVS
19733 \begin_inset space ~
19734 \end_inset
19735
19736 commands: 
19737 \begin_inset space ~
19738 \end_inset
19739
19740
19741 \begin_inset Newline newline
19742 \end_inset
19743
19744 Copy 
19745 \begin_inset Flex Code
19746 status collapsed
19747
19748 \begin_layout Plain Layout
19749
19750 \family typewriter
19751 \begin_inset Quotes eld
19752 \end_inset
19753
19754 <file-name>
19755 \begin_inset Quotes erd
19756 \end_inset
19757
19758
19759 \end_layout
19760
19761 \end_inset
19762
19763  to 
19764 \begin_inset Flex Code
19765 status collapsed
19766
19767 \begin_layout Plain Layout
19768
19769 \family typewriter
19770 \begin_inset Quotes eld
19771 \end_inset
19772
19773 <new-file-name>
19774 \begin_inset Quotes erd
19775 \end_inset
19776
19777
19778 \end_layout
19779
19780 \end_inset
19781
19782
19783 \begin_inset Newline newline
19784 \end_inset
19785
19786
19787 \begin_inset Flex Code
19788 status collapsed
19789
19790 \begin_layout Plain Layout
19791 cvs -q add 
19792 \family typewriter
19793
19794 \begin_inset Quotes eld
19795 \end_inset
19796
19797 <new-file-name>
19798 \begin_inset Quotes erd
19799 \end_inset
19800
19801
19802 \end_layout
19803
19804 \end_inset
19805
19806
19807 \end_layout
19808
19809 \begin_layout Subsubsection
19810
19811 \family sans
19812 Rename
19813 \end_layout
19814
19815 \begin_layout Standard
19816 This will rename the current document.
19817  Since CVS does not support rename operations natively, the version history
19818  is not preserved, the renamed document is added as a new file, and the
19819  original document is deleted.
19820  It requires a clean document without any changes since the last checkin.
19821  You are asked for a file name and a description of the rename operation.
19822  After that the document is renamed, both locally and in the repository.
19823  If the parent directories of the new and old file names differ, all relative
19824  paths of included files are adjusted (like in 
19825 \family sans
19826 File\SpecialChar \menuseparator
19827 Save As
19828 \family default
19829 \SpecialChar \ldots{}
19830 ).
19831  Finally, the document is reloaded using the new name.
19832 \end_layout
19833
19834 \begin_layout Labeling
19835 \labelwidthstring 00.00.0000
19836 CVS
19837 \begin_inset space ~
19838 \end_inset
19839
19840 commands: 
19841 \begin_inset space ~
19842 \end_inset
19843
19844
19845 \begin_inset Newline newline
19846 \end_inset
19847
19848 Rename 
19849 \begin_inset Flex Code
19850 status collapsed
19851
19852 \begin_layout Plain Layout
19853
19854 \family typewriter
19855 \begin_inset Quotes eld
19856 \end_inset
19857
19858 <file-name>
19859 \begin_inset Quotes erd
19860 \end_inset
19861
19862
19863 \end_layout
19864
19865 \end_inset
19866
19867  to 
19868 \begin_inset Flex Code
19869 status collapsed
19870
19871 \begin_layout Plain Layout
19872
19873 \family typewriter
19874 \begin_inset Quotes eld
19875 \end_inset
19876
19877 <new-file-name>
19878 \begin_inset Quotes erd
19879 \end_inset
19880
19881
19882 \end_layout
19883
19884 \end_inset
19885
19886
19887 \begin_inset Newline newline
19888 \end_inset
19889
19890
19891 \begin_inset Flex Code
19892 status collapsed
19893
19894 \begin_layout Plain Layout
19895 cvs -q add 
19896 \family typewriter
19897
19898 \begin_inset Quotes eld
19899 \end_inset
19900
19901 <new-file-name>
19902 \begin_inset Quotes erd
19903 \end_inset
19904
19905
19906 \end_layout
19907
19908 \end_inset
19909
19910
19911 \begin_inset Newline newline
19912 \end_inset
19913
19914
19915 \begin_inset Flex Code
19916 status collapsed
19917
19918 \begin_layout Plain Layout
19919 cvs -q remove 
19920 \family typewriter
19921
19922 \begin_inset Quotes eld
19923 \end_inset
19924
19925 <file-name>
19926 \begin_inset Quotes erd
19927 \end_inset
19928
19929
19930 \end_layout
19931
19932 \end_inset
19933
19934
19935 \end_layout
19936
19937 \begin_layout Subsubsection
19938 Update of the local directory checkout from repository
19939 \end_layout
19940
19941 \begin_layout Standard
19942 Once your documents gets more complex, containing sub-documents and pictures,
19943  including external 
19944 \begin_inset Flex Code
19945 status collapsed
19946
19947 \begin_layout Plain Layout
19948 .tex
19949 \end_layout
19950
19951 \end_inset
19952
19953  files and so on using version control becomes more complicated.
19954  LyX supports updating the whole tree in which resides the document.
19955  This become especially useful once you cooperate with people which neither
19956  have detailed knowledge about CVS usage nor they have ambition to commit
19957  additional material to the repository.
19958  You have to organize the files structure so that all external files are
19959  in the same directory or subdirectories of the document.
19960  It's good practice anyway to store multipart documents in an extra directory.
19961 \end_layout
19962
19963 \begin_layout Standard
19964 The 
19965 \begin_inset Flex Code
19966 status collapsed
19967
19968 \begin_layout Plain Layout
19969 Update local directory from repository
19970 \end_layout
19971
19972 \end_inset
19973
19974  command updates the whole directory.
19975  If local changes are detected user is warned before update starts.
19976  In case of merge conflicts both versions of the conflicting document parts
19977  are placed in the final document.
19978  You have to review and correct the result of the merge.
19979  You'll find the conflicts enclosed in pairs of 
19980 \begin_inset Flex Code
19981 status collapsed
19982
19983 \begin_layout Plain Layout
19984 <<<<<<<
19985 \end_layout
19986
19987 \end_inset
19988
19989  and 
19990 \begin_inset Flex Code
19991 status collapsed
19992
19993 \begin_layout Plain Layout
19994 >>>>>>>
19995 \end_layout
19996
19997 \end_inset
19998
19999  separated by 
20000 \begin_inset Flex Code
20001 status collapsed
20002
20003 \begin_layout Plain Layout
20004 =======
20005 \end_layout
20006
20007 \end_inset
20008
20009 .
20010  The first part is your version as before the update operation with the
20011  document name prepended.
20012  The second one is the repository version with the version number after
20013  the sequence of 
20014 \begin_inset Flex Code
20015 status collapsed
20016
20017 \begin_layout Plain Layout
20018 >
20019 \end_layout
20020
20021 \end_inset
20022
20023  signs.
20024 \end_layout
20025
20026 \begin_layout Labeling
20027 \labelwidthstring 00.00.0000
20028 CVS
20029 \begin_inset space ~
20030 \end_inset
20031
20032 commands: 
20033 \begin_inset space ~
20034 \end_inset
20035
20036
20037 \begin_inset Newline newline
20038 \end_inset
20039
20040
20041 \begin_inset Flex Code
20042 status collapsed
20043
20044 \begin_layout Plain Layout
20045 cd $path; cvs diff 
20046 \family typewriter
20047 "."
20048 \end_layout
20049
20050 \end_inset
20051
20052  (Ask if changes are detected.)
20053 \begin_inset Newline newline
20054 \end_inset
20055
20056
20057 \begin_inset Flex Code
20058 status collapsed
20059
20060 \begin_layout Plain Layout
20061 cd $path; cvs -q update 
20062 \family typewriter
20063 "."
20064 \end_layout
20065
20066 \end_inset
20067
20068
20069 \end_layout
20070
20071 \begin_layout Standard
20072 where 
20073 \begin_inset Flex Code
20074 status collapsed
20075
20076 \begin_layout Plain Layout
20077 $path
20078 \end_layout
20079
20080 \end_inset
20081
20082  stands for the path to the document.
20083 \end_layout
20084
20085 \begin_layout Subsubsection
20086
20087 \family sans
20088 Show History
20089 \end_layout
20090
20091 \begin_layout Standard
20092 This shows the complete history of the CVS document.
20093  The output of 
20094 \family typewriter
20095 cvs log "<file-name>"
20096 \family default
20097  is shown in a browser.
20098 \end_layout
20099
20100 \begin_layout Subsubsection
20101 Revision info
20102 \end_layout
20103
20104 \begin_layout Standard
20105 LyX supports CVS version number, author name, date and time of last commit.
20106  All those are extracted from 
20107 \family typewriter
20108 cvs log -r <file-name>
20109 \family default
20110 .
20111  See 
20112 \begin_inset CommandInset ref
20113 LatexCommand ref
20114 reference "sub:VCS-Revision-Information"
20115
20116 \end_inset
20117
20118  for details.
20119 \end_layout
20120
20121 \begin_layout Subsection
20122 SVN commands in LyX
20123 \end_layout
20124
20125 \begin_layout Standard
20126 SVN is now partially supported by LyX.
20127  You can find the commands in the 
20128 \family sans
20129 File\SpecialChar \menuseparator
20130 Version
20131 \begin_inset space ~
20132 \end_inset
20133
20134 Control
20135 \family default
20136  submenu.
20137  Please note that if you use password protected access to repository via
20138  ssh, you will be asked in terminal window.
20139  LyX was tested against SVN 1.5, 1.6, 1.7 and 1.8
20140 \begin_inset Foot
20141 status open
20142
20143 \begin_layout Plain Layout
20144 Most of the commands will work with 1.4 too, see 
20145 \begin_inset CommandInset ref
20146 LatexCommand ref
20147 reference "sub:SVN-Repo-Update"
20148
20149 \end_inset
20150
20151 .
20152  There seems to be currently unresolved permissions problem under SVN 1.8
20153  with reverting changes when file is locked.
20154 \end_layout
20155
20156 \end_inset
20157
20158
20159 \end_layout
20160
20161 \begin_layout Subsubsection
20162
20163 \family sans
20164 Register
20165 \end_layout
20166
20167 \begin_layout Standard
20168 If your document is not under revision control, this is the only item shown
20169  in the menu.
20170  And if it is under revision control, the 
20171 \family sans
20172 \bar under
20173 R
20174 \bar default
20175 egister
20176 \family default
20177  item is not visible.
20178 \end_layout
20179
20180 \begin_layout Standard
20181 This command registers in SVN your document ONLY in case you have already
20182  the documents directory under SVN control (in particular 
20183 \family typewriter
20184 .svn/entries
20185 \family default
20186  file exists).
20187  This means you have to checkout the archive by yourself.
20188 \end_layout
20189
20190 \begin_layout Standard
20191 Then you are asked interactively to supply an initial description of the
20192  document.
20193  Don't forget that registered file is not yet commited.
20194 \end_layout
20195
20196 \begin_layout Standard
20197 SVN command that is run: 
20198 \family typewriter
20199 svn add -q 
20200 \begin_inset Quotes eld
20201 \end_inset
20202
20203 <file-name>
20204 \begin_inset Quotes erd
20205 \end_inset
20206
20207
20208 \end_layout
20209
20210 \begin_layout Standard
20211 Read 
20212 \family typewriter
20213 man svn
20214 \family default
20215  to understand the switches.
20216 \end_layout
20217
20218 \begin_layout Subsubsection
20219
20220 \family sans
20221 Check In Changes
20222 \end_layout
20223
20224 \begin_layout Standard
20225 When you are finished editing a file, you commit your changes.
20226  When you do this, you are asked for a description of the changes.
20227  After that changes are commited.
20228 \end_layout
20229
20230 \begin_layout Standard
20231 SVN command:
20232 \begin_inset Foot
20233 status collapsed
20234
20235 \begin_layout Plain Layout
20236 In case locking is not enabled.
20237  See Section 
20238 \begin_inset CommandInset ref
20239 LatexCommand ref
20240 reference "subsec:SVN-File-Locking"
20241
20242 \end_inset
20243
20244 .
20245 \end_layout
20246
20247 \end_inset
20248
20249  
20250 \family typewriter
20251 svn commit -q -m"<description>" <file-name>
20252 \end_layout
20253
20254 \begin_layout Subsubsection
20255
20256 \family sans
20257 Check Out For Edit
20258 \end_layout
20259
20260 \begin_layout Standard
20261 Updates the changes of this file from the repository.
20262  Be sure you understand SVN merging and conflicts resolving before using
20263  this function, because all conflicts has to be resolved manually by you!
20264 \end_layout
20265
20266 \begin_layout Standard
20267 SVN command:
20268 \begin_inset Foot
20269 status collapsed
20270
20271 \begin_layout Plain Layout
20272 Ditto.
20273 \end_layout
20274
20275 \end_inset
20276
20277  
20278 \family typewriter
20279 svn update --non-interactive 
20280 \begin_inset Quotes eld
20281 \end_inset
20282
20283 <file-name>
20284 \begin_inset Quotes erd
20285 \end_inset
20286
20287
20288 \end_layout
20289
20290 \begin_layout Subsubsection
20291
20292 \family sans
20293 Revert To Repository Version
20294 \end_layout
20295
20296 \begin_layout Standard
20297 This will discard all changes made to the document since the last check
20298  in.
20299  You get a warning before changes are discarded.
20300 \end_layout
20301
20302 \begin_layout Standard
20303 SVN command: 
20304 \family typewriter
20305 svn revert -q 
20306 \begin_inset Quotes eld
20307 \end_inset
20308
20309 <file-name>
20310 \begin_inset Quotes erd
20311 \end_inset
20312
20313
20314 \end_layout
20315
20316 \begin_layout Subsubsection
20317
20318 \family sans
20319 Copy
20320 \end_layout
20321
20322 \begin_layout Standard
20323 This will create a copy of the current document including the version history.
20324  It requires a clean document without any changes since the last checkin.
20325  You are asked for a file name and a description of the copy operation.
20326  After that the copy is created, both locally and in the repository.
20327  If the parent directories of the copied and original document differ, all
20328  relative paths of included files of the copy are adjusted (like in 
20329 \family sans
20330 File\SpecialChar \menuseparator
20331 Save As
20332 \family default
20333 \SpecialChar \ldots{}
20334 ).
20335  Finally, the copy is loaded instead of the original document.
20336 \end_layout
20337
20338 \begin_layout Labeling
20339 \labelwidthstring 00.00.0000
20340 SVN
20341 \begin_inset space ~
20342 \end_inset
20343
20344 commands: 
20345 \begin_inset space ~
20346 \end_inset
20347
20348
20349 \begin_inset Newline newline
20350 \end_inset
20351
20352
20353 \begin_inset Flex Code
20354 status collapsed
20355
20356 \begin_layout Plain Layout
20357 svn copy -q 
20358 \family typewriter
20359
20360 \begin_inset Quotes eld
20361 \end_inset
20362
20363 <file-name>
20364 \begin_inset Quotes erd
20365 \end_inset
20366
20367  
20368 \begin_inset Quotes eld
20369 \end_inset
20370
20371 <new-file-name>
20372 \begin_inset Quotes erd
20373 \end_inset
20374
20375
20376 \end_layout
20377
20378 \end_inset
20379
20380
20381 \begin_inset Newline newline
20382 \end_inset
20383
20384
20385 \begin_inset Flex Code
20386 status collapsed
20387
20388 \begin_layout Plain Layout
20389 svn commit
20390 \end_layout
20391
20392 \end_inset
20393
20394
20395 \end_layout
20396
20397 \begin_layout Subsubsection
20398
20399 \family sans
20400 Rename
20401 \end_layout
20402
20403 \begin_layout Standard
20404 This will rename the current document including the version history.
20405  It requires a clean document without any changes since the last checkin.
20406  You are asked for a file name and a description of the rename operation.
20407  After that the document is renamed, both locally and in the repository.
20408  If the parent directories of the new and old file names differ, all relative
20409  paths of included files are adjusted (like in 
20410 \family sans
20411 File\SpecialChar \menuseparator
20412 Save As
20413 \family default
20414 \SpecialChar \ldots{}
20415 ).
20416  Finally, the document is reloaded using the new name.
20417 \end_layout
20418
20419 \begin_layout Labeling
20420 \labelwidthstring 00.00.0000
20421 SVN
20422 \begin_inset space ~
20423 \end_inset
20424
20425 commands: 
20426 \begin_inset space ~
20427 \end_inset
20428
20429
20430 \begin_inset Newline newline
20431 \end_inset
20432
20433
20434 \begin_inset Flex Code
20435 status collapsed
20436
20437 \begin_layout Plain Layout
20438 svn move -q 
20439 \family typewriter
20440
20441 \begin_inset Quotes eld
20442 \end_inset
20443
20444 <file-name>
20445 \begin_inset Quotes erd
20446 \end_inset
20447
20448  
20449 \begin_inset Quotes eld
20450 \end_inset
20451
20452 <new-file-name>
20453 \begin_inset Quotes erd
20454 \end_inset
20455
20456
20457 \end_layout
20458
20459 \end_inset
20460
20461
20462 \begin_inset Newline newline
20463 \end_inset
20464
20465
20466 \begin_inset Flex Code
20467 status collapsed
20468
20469 \begin_layout Plain Layout
20470 svn commit
20471 \end_layout
20472
20473 \end_inset
20474
20475
20476 \end_layout
20477
20478 \begin_layout Subsubsection
20479 \begin_inset CommandInset label
20480 LatexCommand label
20481 name "sub:SVN-Repo-Update"
20482
20483 \end_inset
20484
20485 Update of the local directory checkout from repository
20486 \begin_inset Foot
20487 status collapsed
20488
20489 \begin_layout Plain Layout
20490 Note that this command will work only with subversion 
20491 \begin_inset Formula $\geqq1.5$
20492 \end_inset
20493
20494
20495 \end_layout
20496
20497 \end_inset
20498
20499
20500 \end_layout
20501
20502 \begin_layout Standard
20503 All the commands above have one shortcomming - they deal with the current
20504  document only.
20505  Once your document contains pictures, includes external 
20506 \begin_inset Flex Code
20507 status collapsed
20508
20509 \begin_layout Plain Layout
20510 .tex
20511 \end_layout
20512
20513 \end_inset
20514
20515  files and so on administration becomes more complicated.
20516  LyX now supports updating the whole tree in which resides the document
20517 \begin_inset Foot
20518 status collapsed
20519
20520 \begin_layout Plain Layout
20521 One need to organize the files structure so that all external files are
20522  in the same directory or subdirectories of the document.
20523  
20524 \end_layout
20525
20526 \end_inset
20527
20528 .
20529  This become especially useful once you cooperate with people which neither
20530  know about subversion management nor they have ambition to commit additional
20531  material to the repository.
20532  
20533 \end_layout
20534
20535 \begin_layout Standard
20536 \begin_inset Flex Code
20537 status collapsed
20538
20539 \begin_layout Plain Layout
20540 Update local directory from repository
20541 \end_layout
20542
20543 \end_inset
20544
20545  command updates the whole directory and in case of merge conflicts local
20546  version of the files are left, so no unintended data loss occurs.
20547  If local changes are detected user is warned before update starts.
20548 \end_layout
20549
20550 \begin_layout Labeling
20551 \labelwidthstring 00.00.0000
20552 SVN
20553 \begin_inset space ~
20554 \end_inset
20555
20556 commands: 
20557 \begin_inset space ~
20558 \end_inset
20559
20560
20561 \begin_inset Newline newline
20562 \end_inset
20563
20564
20565 \begin_inset Flex Code
20566 status collapsed
20567
20568 \begin_layout Plain Layout
20569 svn diff $path
20570 \end_layout
20571
20572 \end_inset
20573
20574  (Ask if changes are detected.)
20575 \begin_inset Newline newline
20576 \end_inset
20577
20578
20579 \begin_inset Flex Code
20580 status collapsed
20581
20582 \begin_layout Plain Layout
20583 svn update --accept mine-full $path
20584 \end_layout
20585
20586 \end_inset
20587
20588
20589 \end_layout
20590
20591 \begin_layout Standard
20592 where 
20593 \begin_inset Flex Code
20594 status collapsed
20595
20596 \begin_layout Plain Layout
20597 $path
20598 \end_layout
20599
20600 \end_inset
20601
20602  stands for the path to the document.
20603 \end_layout
20604
20605 \begin_layout Subsubsection
20606
20607 \family sans
20608 Show History
20609 \end_layout
20610
20611 \begin_layout Standard
20612 This shows the complete history of the SVN document.
20613  The output of 
20614 \family typewriter
20615 svn log 
20616 \begin_inset Quotes eld
20617 \end_inset
20618
20619 <file-name>
20620 \begin_inset Quotes erd
20621 \end_inset
20622
20623
20624 \family default
20625  is shown in a browser.
20626 \end_layout
20627
20628 \begin_layout Subsubsection
20629 File Locking
20630 \begin_inset CommandInset label
20631 LatexCommand label
20632 name "subsec:SVN-File-Locking"
20633
20634 \end_inset
20635
20636
20637 \end_layout
20638
20639 \begin_layout Standard
20640 The file exchange through various revision control systems brings the problem
20641  of merge conflicts in case two different users try to edit the same (parts
20642  of) document.
20643  When such a conflict happens it needs manual resolving and one reasonable
20644  alternative is to provide some kind of locking mechanism, which guarantees
20645  that only one user is allowed to edit file at the given time.
20646 \end_layout
20647
20648 \begin_layout Standard
20649 SVN has two such mechanisms to provide mutual exclusivity for file access
20650  - locks and automatic setting of write permissions (see sec.
20651  
20652 \begin_inset CommandInset ref
20653 LatexCommand ref
20654 reference "subsec:Automatical-Locking-Property"
20655
20656 \end_inset
20657
20658 ) based on 
20659 \begin_inset Flex Code
20660 status collapsed
20661
20662 \begin_layout Plain Layout
20663 svn:needs-lock
20664 \end_layout
20665
20666 \end_inset
20667
20668  file svn property
20669 \begin_inset Foot
20670 status open
20671
20672 \begin_layout Plain Layout
20673 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20674 \end_layout
20675
20676 \end_inset
20677
20678 .
20679  If this property is detected for a given document LyX starts to use SVN
20680  locks for document editing automatically and the whole check-in/out mechanism
20681  switches to the same regimen as for RCS.
20682  This in particular means there are two different modes of file use in LyX:
20683 \end_layout
20684
20685 \begin_layout Itemize
20686 Unlocked state.
20687  The loaded file is in the read-only mode.
20688  For editing on needs to check-out.
20689  
20690 \emph on
20691 Check-out
20692 \emph default
20693  consists of updating from the repository and gaining write lock.
20694  If the lock is not possible to obtain, we remain in unlocked state.
20695 \end_layout
20696
20697 \begin_layout Itemize
20698 Locked state.
20699  The loaded file is in the 'normal' edit mode.
20700  No other user is allowed to edit the file.
20701  
20702 \emph on
20703 Check-in
20704 \emph default
20705  consists of commiting changes and releasing write-lock.
20706  If no changes have been made to the document, no commit will be produced
20707 \begin_inset Foot
20708 status collapsed
20709
20710 \begin_layout Plain Layout
20711 Don't be puzzled by the fact that you will be asked for commit message anyway.
20712 \end_layout
20713
20714 \end_inset
20715
20716  and only the write-lock will be released.
20717 \end_layout
20718
20719 \begin_layout Standard
20720 SVN commands:
20721 \end_layout
20722
20723 \begin_layout Labeling
20724 \labelwidthstring 00.00.0000
20725 Check-in:
20726 \family typewriter
20727  svn commit -q -m"<description>" "<file-name>"
20728 \begin_inset Newline newline
20729 \end_inset
20730
20731 svn unlock "<file-name>"
20732 \end_layout
20733
20734 \begin_layout Labeling
20735 \labelwidthstring 00.00.0000
20736 Check-out: 
20737 \family typewriter
20738 svn update "<file-name>"
20739 \begin_inset Newline newline
20740 \end_inset
20741
20742 svn lock "<file-name>"
20743 \end_layout
20744
20745 \begin_layout Subsubsection
20746
20747 \family typewriter
20748 \begin_inset CommandInset label
20749 LatexCommand label
20750 name "subsec:Automatical-Locking-Property"
20751
20752 \end_inset
20753
20754
20755 \family default
20756 Automatic Locking Property
20757 \end_layout
20758
20759 \begin_layout Standard
20760 The above mentioned automatic setting of write permissions of the .lyx file
20761  can be set through
20762 \family sans
20763 \bar under
20764  F
20765 \bar default
20766 ile\SpecialChar \menuseparator
20767
20768 \bar under
20769 V
20770 \bar default
20771 ersion
20772 \begin_inset space ~
20773 \end_inset
20774
20775 Control\SpecialChar \menuseparator
20776
20777 \bar under
20778 T
20779 \bar default
20780 oggle locking property
20781 \family default
20782 .
20783  This command is active only when the file is not locked on the svn server
20784  (i.e.
20785  you need to check-out before proceeding).
20786 \end_layout
20787
20788 \begin_layout Labeling
20789 \labelwidthstring 00.00.0000
20790 SVN
20791 \begin_inset space ~
20792 \end_inset
20793
20794 commands:
20795 \end_layout
20796
20797 \begin_layout Labeling
20798 \labelwidthstring 00.00.0000
20799 Set:
20800 \family typewriter
20801  svn propset svn:needs-lock ON "<file-name>"
20802 \end_layout
20803
20804 \begin_layout Labeling
20805 \labelwidthstring 00.00.0000
20806 Unset: 
20807 \family typewriter
20808 svn propdel svn:needs-lock "<file-name>"
20809 \end_layout
20810
20811 \begin_layout Subsubsection
20812 \begin_inset CommandInset label
20813 LatexCommand label
20814 name "sub:VCS-Revision-Information"
20815
20816 \end_inset
20817
20818 Revision Information in Documents
20819 \end_layout
20820
20821 \begin_layout Standard
20822 There are more possibilities how to activate revision information in our
20823  document.
20824 \end_layout
20825
20826 \begin_layout Itemize
20827 LyX supports directly:
20828 \end_layout
20829
20830 \begin_deeper
20831 \begin_layout Itemize
20832 tree revision information (
20833 \begin_inset Flex Code
20834 status collapsed
20835
20836 \begin_layout Plain Layout
20837 vcs-tree-revision
20838 \end_layout
20839
20840 \end_inset
20841
20842 ).
20843  The result is the output of the 
20844 \begin_inset Flex Code
20845 status collapsed
20846
20847 \begin_layout Plain Layout
20848 svnversion
20849 \end_layout
20850
20851 \end_inset
20852
20853  command, the following table gives you an idea, how to read the results.
20854 \end_layout
20855
20856 \begin_layout Standard
20857 \align center
20858 \begin_inset Tabular
20859 <lyxtabular version="3" rows="6" columns="2">
20860 <features rotate="0" tabularvalignment="middle">
20861 <column alignment="center" valignment="top">
20862 <column alignment="center" valignment="top">
20863 <row>
20864 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20865 \begin_inset Text
20866
20867 \begin_layout Plain Layout
20868 Output
20869 \end_layout
20870
20871 \end_inset
20872 </cell>
20873 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20874 \begin_inset Text
20875
20876 \begin_layout Plain Layout
20877 Meaning
20878 \end_layout
20879
20880 \end_inset
20881 </cell>
20882 </row>
20883 <row>
20884 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20885 \begin_inset Text
20886
20887 \begin_layout Plain Layout
20888 4123:4168
20889 \end_layout
20890
20891 \end_inset
20892 </cell>
20893 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20894 \begin_inset Text
20895
20896 \begin_layout Plain Layout
20897 mixed revision working copy
20898 \end_layout
20899
20900 \end_inset
20901 </cell>
20902 </row>
20903 <row>
20904 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20905 \begin_inset Text
20906
20907 \begin_layout Plain Layout
20908 4168M
20909 \end_layout
20910
20911 \end_inset
20912 </cell>
20913 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20914 \begin_inset Text
20915
20916 \begin_layout Plain Layout
20917 modified working copy
20918 \end_layout
20919
20920 \end_inset
20921 </cell>
20922 </row>
20923 <row>
20924 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20925 \begin_inset Text
20926
20927 \begin_layout Plain Layout
20928 4123S
20929 \end_layout
20930
20931 \end_inset
20932 </cell>
20933 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20934 \begin_inset Text
20935
20936 \begin_layout Plain Layout
20937 switched working copy
20938 \end_layout
20939
20940 \end_inset
20941 </cell>
20942 </row>
20943 <row>
20944 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20945 \begin_inset Text
20946
20947 \begin_layout Plain Layout
20948 4123P
20949 \end_layout
20950
20951 \end_inset
20952 </cell>
20953 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20954 \begin_inset Text
20955
20956 \begin_layout Plain Layout
20957 partial working copy, from a sparse checkout
20958 \end_layout
20959
20960 \end_inset
20961 </cell>
20962 </row>
20963 <row>
20964 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20965 \begin_inset Text
20966
20967 \begin_layout Plain Layout
20968 4123:4168MS
20969 \end_layout
20970
20971 \end_inset
20972 </cell>
20973 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20974 \begin_inset Text
20975
20976 \begin_layout Plain Layout
20977 mixed revision, modified, switched working copy
20978 \end_layout
20979
20980 \end_inset
20981 </cell>
20982 </row>
20983 </lyxtabular>
20984
20985 \end_inset
20986
20987
20988 \end_layout
20989
20990 \begin_layout Itemize
20991 file revision information.
20992  The result comes from parsing the output of 
20993 \begin_inset Flex Code
20994 status collapsed
20995
20996 \begin_layout Plain Layout
20997 svn
20998 \begin_inset space ~
20999 \end_inset
21000
21001 info
21002 \begin_inset space ~
21003 \end_inset
21004
21005 --xml
21006 \begin_inset space ~
21007 \end_inset
21008
21009 file.lyx
21010 \end_layout
21011
21012 \end_inset
21013
21014 .
21015  Supported flags are:
21016 \end_layout
21017
21018 \begin_deeper
21019 \begin_layout Itemize
21020 version number of the last commit (
21021 \begin_inset Flex Code
21022 status collapsed
21023
21024 \begin_layout Plain Layout
21025 vcs-revision
21026 \end_layout
21027
21028 \end_inset
21029
21030 )
21031 \end_layout
21032
21033 \begin_layout Itemize
21034 author of the last commit (
21035 \begin_inset Flex Code
21036 status collapsed
21037
21038 \begin_layout Plain Layout
21039 vcs-author
21040 \end_layout
21041
21042 \end_inset
21043
21044 )
21045 \end_layout
21046
21047 \begin_layout Itemize
21048 date of the last commit (
21049 \begin_inset Flex Code
21050 status collapsed
21051
21052 \begin_layout Plain Layout
21053 vcs-date
21054 \end_layout
21055
21056 \end_inset
21057
21058 )
21059 \end_layout
21060
21061 \begin_layout Itemize
21062 time of the last commit (
21063 \begin_inset Flex Code
21064 status collapsed
21065
21066 \begin_layout Plain Layout
21067 vcs-time
21068 \end_layout
21069
21070 \end_inset
21071
21072 )
21073 \end_layout
21074
21075 \end_deeper
21076 \begin_layout Standard
21077 You can obtain this info via InsetInfo (e.g.
21078  
21079 \begin_inset Flex Code
21080 status collapsed
21081
21082 \begin_layout Plain Layout
21083 info-insert buffer vcs-date
21084 \end_layout
21085
21086 \end_inset
21087
21088 ).
21089  The information will be available only when you have the file stored under
21090  svn managment (i.e.
21091  the 
21092 \begin_inset Flex Code
21093 status collapsed
21094
21095 \begin_layout Plain Layout
21096 .svn
21097 \end_layout
21098
21099 \end_inset
21100
21101  directory is available with your document).
21102 \end_layout
21103
21104 \end_deeper
21105 \begin_layout Itemize
21106 Another---a hacking one---possibility is to use svn keywords
21107 \begin_inset Foot
21108 status collapsed
21109
21110 \begin_layout Plain Layout
21111 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
21112 \end_layout
21113
21114 \end_inset
21115
21116 .
21117  In short -- you set file keywords property (e.g.
21118  
21119 \family sans
21120 svn propset svn:keywords 'Rev' file.lyx
21121 \family default
21122 ) and then paste keyword TeX code
21123 \begin_inset Foot
21124 status collapsed
21125
21126 \begin_layout Plain Layout
21127 This is an easy way how to ensure that LyX won't break the line in the middle
21128  of keyword tag.
21129 \end_layout
21130
21131 \end_inset
21132
21133  tag in your document (e.g.
21134  
21135 \begin_inset ERT
21136 status open
21137
21138 \begin_layout Plain Layout
21139
21140 $Rev$
21141 \end_layout
21142
21143 \end_inset
21144
21145 ).
21146  This way svn client will automatically substitute revision number (e.g.
21147  
21148 \begin_inset ERT
21149 status open
21150
21151 \begin_layout Plain Layout
21152
21153 $Rev: 59 $
21154 \end_layout
21155
21156 \end_inset
21157
21158 ) after each update and commit.
21159  There are more problems with this approach.
21160  Firstly, the '$' character is used in TeX world for math equations, so
21161  any occurence of math formula 
21162 \begin_inset Formula $Rev$
21163 \end_inset
21164
21165  become 
21166 \begin_inset Formula $Rev:59$
21167 \end_inset
21168
21169  in your LyX document.
21170  Similarly for other keywords like Id, Date, Author, etc.
21171  Secondly svn output is dependent on your locales, so its very easy that
21172  svn would produce some problematic strings once Date is used.
21173  Thirdly you get the whole 'Rev: 59' string in your document instead of
21174  the plain number.
21175  Until subversion implements user's custom keywords it will be hard to use
21176  this approach reliably or let LyX to support it directly.
21177 \end_layout
21178
21179 \begin_layout Subsection
21180 SVN and Windows Environment
21181 \end_layout
21182
21183 \begin_layout Quote
21184 My inclination is to say that if the user cannot figure out the command
21185  line operations on their own fairly quickly, they would be well advised
21186  to use TortoiseSVN.
21187  ---P.
21188  A.
21189  Rubin
21190 \end_layout
21191
21192 \begin_layout Subsubsection
21193 Preparation
21194 \end_layout
21195
21196 \begin_layout Standard
21197 In addition to installing LyX, and having access to a Subversion repository,
21198  the user will need to install the Subversion client program.
21199  A Windows installer for the client program is available from 
21200 \begin_inset CommandInset href
21201 LatexCommand href
21202 name "CollabNet"
21203 target "http://www.collab.net/nonav/downloads/subversion/"
21204
21205 \end_inset
21206
21207 .
21208  The user may also want to install 
21209 \begin_inset CommandInset href
21210 LatexCommand href
21211 name "TortoiseSVN"
21212 target "http://tortoisesvn.tigris.org/"
21213
21214 \end_inset
21215
21216 , which integrates Subversion operations into the context (rightclick) menu
21217  of Windows Explorer.
21218  Operations done outside LyX will typically be more convenient using the
21219  Explorer context menu.
21220  Note that TortoiseSVN is not a replacement for the client program, which
21221  is what LyX itself will use.
21222 \end_layout
21223
21224 \begin_layout Subsubsection
21225 Bringing a document under Subversion control
21226 \end_layout
21227
21228 \begin_layout Standard
21229 Before a LyX document can be brought under version control in Subversion,
21230  its parent directory needs to be under version control.
21231  If the document is being added to a project already in the repository,
21232  this is accomplished by checking the project out to the directory where
21233  the new document will be placed.
21234  If the project itself is not yet under version control (for instance, if
21235  this document starts a new project), the directory must be imported into
21236  the repository.
21237  This is done outside LyX.
21238  Both import and checkout are easily accomplished from the Explorer context
21239  menu using TortoiseSVN, or alternatively can be done using the command
21240  line client at a DOS prompt.
21241  The procedure for importing the project using TortoiseSVN is described
21242  below, assuming an existing repository and a new project being started
21243  in 
21244 \family typewriter
21245 C:
21246 \backslash
21247 new project
21248 \family default
21249 .
21250  For information on using the Subversion client program, run 
21251 \family typewriter
21252 svn --help 
21253 \family default
21254 in a DOS shell.
21255 \end_layout
21256
21257 \begin_layout Enumerate
21258 Locate 
21259 \family typewriter
21260 C:
21261 \backslash
21262 new project 
21263 \family default
21264 in Windows Explorer, right click it, and select 
21265 \family sans
21266 TortoiseSVN\SpecialChar \menuseparator
21267 Repo-browser
21268 \family default
21269 .
21270  If necessary, adjust the URL for the repository, then click OK.
21271 \end_layout
21272
21273 \begin_layout Enumerate
21274 Right click the level of the repository under which you want to place the
21275  new project folder (typically the top level) and click 
21276 \family sans
21277 Create folder
21278 \family default
21279  Supply a name for the project folder and click OK.
21280  Add a message for the log file if desired, then click OK again.
21281  The new project folder should appear in the repository.
21282  Finally, click OK again to exit the repository browser.
21283 \end_layout
21284
21285 \begin_layout Enumerate
21286 Once again right click 
21287 \family typewriter
21288 C:
21289 \backslash
21290 new project
21291 \family default
21292 , this time selecting SVN Checkout\SpecialChar \ldots{}
21293  Select the URL of the project folder
21294  you just created in the repository, and set the checkout directory to 
21295 \family typewriter
21296 C:
21297 \backslash
21298 new project.
21299
21300 \family default
21301  Click OK.
21302  You will be warned about a non-empty folder; click OK to proceed.
21303  You should now have a 
21304 \family typewriter
21305 .svn
21306 \family default
21307  directory under 
21308 \family typewriter
21309 C:
21310 \backslash
21311 new project.
21312 \end_layout
21313
21314 \begin_layout Enumerate
21315 Create or open your document in LyX and click 
21316 \family sans
21317 File\SpecialChar \menuseparator
21318 Version
21319 \begin_inset space ~
21320 \end_inset
21321
21322 Control\SpecialChar \menuseparator
21323 Register.
21324  
21325 \family default
21326 Add a log message and click OK to commit the document to version control.
21327 \end_layout
21328
21329 \begin_layout Standard
21330 From this point onward, you should have full functionality in the 
21331 \family sans
21332 File\SpecialChar \menuseparator
21333 Version
21334 \begin_inset space ~
21335 \end_inset
21336
21337 Control
21338 \family default
21339  menu.
21340  You also have the option of checking the document in and out, viewing its
21341  history, etc.
21342  using the TortoiseSVN context menu in Windows Explorer or the Subversion
21343  client program from a command prompt.
21344 \end_layout
21345
21346 \begin_layout Subsubsection
21347 SSH tunnel used with SVN under Windows
21348 \end_layout
21349
21350 \begin_layout Standard
21351 Compared with Linux setting up an svn client to communicate over ssh under
21352  Windows is a rather troublesome task.
21353  We will at least offer some hints how to setup the client side but prior
21354  knowledge about ssh and the Windows command line is needed, also be prepared
21355  for a great deal of frustration\SpecialChar \ldots{}
21356
21357 \end_layout
21358
21359 \begin_layout Enumerate
21360 Get an svn client for windows, as described in the previous sections.
21361  When it is a fresh install run some svn command (e.g.
21362  
21363 \begin_inset Flex Code
21364 status collapsed
21365
21366 \begin_layout Plain Layout
21367 svn --version
21368 \end_layout
21369
21370 \end_inset
21371
21372 ) to create config files, which you will need to change later on.
21373 \end_layout
21374
21375 \begin_layout Enumerate
21376 Choose an ssh client for Windows.
21377  There are several possibilities, we will use the one from Putty tools
21378 \begin_inset Foot
21379 status collapsed
21380
21381 \begin_layout Plain Layout
21382 \begin_inset Flex URL
21383 status collapsed
21384
21385 \begin_layout Plain Layout
21386
21387 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21388 \end_layout
21389
21390 \end_inset
21391
21392
21393 \end_layout
21394
21395 \end_inset
21396
21397 .
21398  You will need to set the connection up so that the client doesn't ask for
21399  any password from you.
21400  To keep things easy we will use only keys without any additional password
21401  protection etc.
21402 \end_layout
21403
21404 \begin_deeper
21405 \begin_layout Enumerate
21406 Generate keys by 
21407 \begin_inset Flex Code
21408 status collapsed
21409
21410 \begin_layout Plain Layout
21411 puttygen
21412 \end_layout
21413
21414 \end_inset
21415
21416 .
21417  Save your private .ppk key file and put the public one on the server side.
21418  If the SVN server runs on Linux, note that the format of the public key
21419  is not compatible with Linux openssh and you will need to direcly copy-paste
21420  the key from the “
21421 \emph on
21422 Public key for pasting into OpenSSH authorized_keys file
21423 \emph default
21424 :” edit field into the server's 
21425 \begin_inset Flex Code
21426 status collapsed
21427
21428 \begin_layout Plain Layout
21429 ~/.ssh/authorized_keys
21430 \end_layout
21431
21432 \end_inset
21433
21434  / 
21435 \begin_inset Flex Code
21436 status collapsed
21437
21438 \begin_layout Plain Layout
21439 authorized_keys2
21440 \end_layout
21441
21442 \end_inset
21443
21444  file.
21445 \end_layout
21446
21447 \begin_layout Enumerate
21448 Get the Putty's 
21449 \begin_inset Flex Code
21450 status collapsed
21451
21452 \begin_layout Plain Layout
21453 plink
21454 \end_layout
21455
21456 \end_inset
21457
21458 .
21459  In the SVN config file
21460 \begin_inset Foot
21461 status collapsed
21462
21463 \begin_layout Plain Layout
21464 Exact path depends on Windows version, usually somewhere around 
21465 \begin_inset Flex Code
21466 status collapsed
21467
21468 \begin_layout Plain Layout
21469 c:
21470 \backslash
21471 Documents and Settings
21472 \backslash
21473 user
21474 \backslash
21475 Application Data
21476 \backslash
21477 Subversion
21478 \backslash
21479 config
21480 \end_layout
21481
21482 \end_inset
21483
21484  / 
21485 \begin_inset Flex Code
21486 status collapsed
21487
21488 \begin_layout Plain Layout
21489 AppData
21490 \backslash
21491 Roaming
21492 \backslash
21493 Subversion
21494 \end_layout
21495
21496 \end_inset
21497
21498 .
21499 \end_layout
21500
21501 \end_inset
21502
21503 , section [tunnels], setup ssh command, e.g.
21504  
21505 \begin_inset Flex Code
21506 status collapsed
21507
21508 \begin_layout Plain Layout
21509 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21510 \end_layout
21511
21512 \end_inset
21513
21514 .
21515 \begin_inset Foot
21516 status collapsed
21517
21518 \begin_layout Plain Layout
21519 It will usually take a lot of time to get exact command right and it depends
21520  on many things.
21521  For example do not have some remote server saved as a default session in
21522  Putty etc.
21523  If things fail, try to connect via plink without SVN first.
21524 \end_layout
21525
21526 \end_inset
21527
21528
21529 \end_layout
21530
21531 \end_deeper
21532 \begin_layout Enumerate
21533 Checkout the SVN archive, e.
21534 \begin_inset space \thinspace{}
21535 \end_inset
21536
21537 g.
21538 \begin_inset Newline newline
21539 \end_inset
21540
21541
21542 \begin_inset Flex Code
21543 status collapsed
21544
21545 \begin_layout Plain Layout
21546 svn co svn+ssh://user@server/repository_path
21547 \end_layout
21548
21549 \end_inset
21550
21551 .
21552 \end_layout
21553
21554 \begin_layout Subsubsection
21555 End-of-Line Conversions
21556 \end_layout
21557
21558 \begin_layout Standard
21559 When the collaborators are mixing Linux and Windows environments, LyX will
21560  use different line endings inside the .lyx files.
21561  This is not a problem as far as LyX functionality is concerned, but the
21562  commit diffs will be huge and merge-conflicts prone.
21563  Fortunately SVN itself knows
21564 \begin_inset Foot
21565 status collapsed
21566
21567 \begin_layout Plain Layout
21568 \begin_inset Flex URL
21569 status collapsed
21570
21571 \begin_layout Plain Layout
21572
21573 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21574 \end_layout
21575
21576 \end_inset
21577
21578
21579 \end_layout
21580
21581 \end_inset
21582
21583  how to deal with CR/LF problems when switching .lyx files to the 
21584 \begin_inset Flex Code
21585 status collapsed
21586
21587 \begin_layout Plain Layout
21588 native
21589 \end_layout
21590
21591 \end_inset
21592
21593  mode.
21594 \begin_inset Foot
21595 status collapsed
21596
21597 \begin_layout Plain Layout
21598 For the lazy guys: 
21599 \begin_inset Flex Code
21600 status collapsed
21601
21602 \begin_layout Plain Layout
21603 svn propset svn:eol-style native FILE_NAME
21604 \end_layout
21605
21606 \end_inset
21607
21608
21609 \end_layout
21610
21611 \end_inset
21612
21613
21614 \end_layout
21615
21616 \begin_layout Subsection
21617 GIT commands in LyX
21618 \end_layout
21619
21620 \begin_layout Standard
21621 A minimal subset of GIT commands is now supported by LyX.
21622  You can find the commands in the 
21623 \family sans
21624 File\SpecialChar \menuseparator
21625 Version
21626 \begin_inset space ~
21627 \end_inset
21628
21629 Control
21630 \family default
21631  submenu.
21632  Please note that if you use password protected access to repository via
21633  ssh, you will be asked in terminal window.
21634  LyX was tested against GIT 1.7.
21635 \end_layout
21636
21637 \begin_layout Standard
21638 One big difference of GIT and the other supported version control systems
21639  is the distributed nature of GIT: With traditional version control systems
21640  there is one central server which hosts the repository.
21641  Users commit their changes to the server, and get updates made by other
21642  users from it.
21643  With GIT, users commit to a local repository.
21644  The local repository can be synchronized with one or more remote repositories
21645  using the 
21646 \begin_inset Flex Code
21647 status collapsed
21648
21649 \begin_layout Plain Layout
21650 pull
21651 \end_layout
21652
21653 \end_inset
21654
21655  and 
21656 \begin_inset Flex Code
21657 status collapsed
21658
21659 \begin_layout Plain Layout
21660 push
21661 \end_layout
21662
21663 \end_inset
21664
21665  GIT commands.
21666  LyX does not interact in any way with remote GIT repositories.
21667  It works exclusively with the local repository in a very similar way as
21668  with a central CVS or SVN repository.
21669  If you use remote GIT repositories you need to do the 
21670 \begin_inset Flex Code
21671 status collapsed
21672
21673 \begin_layout Plain Layout
21674 pull
21675 \end_layout
21676
21677 \end_inset
21678
21679  and 
21680 \begin_inset Flex Code
21681 status collapsed
21682
21683 \begin_layout Plain Layout
21684 push
21685 \end_layout
21686
21687 \end_inset
21688
21689  operations with your favourite GIT client.
21690 \end_layout
21691
21692 \begin_layout Subsubsection
21693
21694 \family sans
21695 Register
21696 \end_layout
21697
21698 \begin_layout Standard
21699 If your document is not under revision control, this is the only item shown
21700  in the menu.
21701  And if it is under revision control, the 
21702 \family sans
21703 \bar under
21704 R
21705 \bar default
21706 egister
21707 \family default
21708  item is not visible.
21709 \end_layout
21710
21711 \begin_layout Standard
21712 This command registers in GIT your document ONLY in case you have already
21713  the documents directory under GIT control (in particular 
21714 \family typewriter
21715 .git/index
21716 \family default
21717  file exists).
21718  This means you have to checkout the archive by yourself.
21719 \end_layout
21720
21721 \begin_layout Standard
21722 Then you are asked interactively to supply an initial description of the
21723  document.
21724  Don't forget that registered file is not yet commited.
21725 \end_layout
21726
21727 \begin_layout Standard
21728 GIT command that is run: 
21729 \family typewriter
21730 git add 
21731 \begin_inset Quotes eld
21732 \end_inset
21733
21734 <file-name>
21735 \begin_inset Quotes erd
21736 \end_inset
21737
21738
21739 \end_layout
21740
21741 \begin_layout Standard
21742 Read 
21743 \family typewriter
21744 man git
21745 \family default
21746  to understand the switches.
21747 \end_layout
21748
21749 \begin_layout Subsubsection
21750
21751 \family sans
21752 Check In Changes
21753 \end_layout
21754
21755 \begin_layout Standard
21756 When you are finished editing a file, you commit your changes.
21757  When you do this, you are asked for a description of the changes.
21758  After that changes are commited.
21759 \end_layout
21760
21761 \begin_layout Standard
21762 GIT command: 
21763 \family typewriter
21764 git commit -q -m"<description>" <file-name>
21765 \end_layout
21766
21767 \begin_layout Subsubsection
21768
21769 \family sans
21770 Revert To Repository Version
21771 \end_layout
21772
21773 \begin_layout Standard
21774 This will discard all changes made to the document since the last check
21775  in.
21776  You get a warning before changes are discarded.
21777 \end_layout
21778
21779 \begin_layout Standard
21780 GIT command: 
21781 \family typewriter
21782 git checkout -q 
21783 \begin_inset Quotes eld
21784 \end_inset
21785
21786 <file-name>
21787 \begin_inset Quotes erd
21788 \end_inset
21789
21790
21791 \end_layout
21792
21793 \begin_layout Subsubsection
21794
21795 \family sans
21796 Rename
21797 \end_layout
21798
21799 \begin_layout Standard
21800 This will rename the current document including the version history.
21801  It requires a clean document without any changes since the last checkin.
21802  You are asked for a file name and a description of the rename operation.
21803  After that the document is renamed, both locally and in the repository.
21804  If the parent directories of the new and old file names differ, all relative
21805  paths of included files are adjusted (like in 
21806 \family sans
21807 File\SpecialChar \menuseparator
21808 Save As
21809 \family default
21810 \SpecialChar \ldots{}
21811 ).
21812  Finally, the document is reloaded using the new name.
21813 \end_layout
21814
21815 \begin_layout Labeling
21816 \labelwidthstring 00.00.0000
21817 GIT
21818 \begin_inset space ~
21819 \end_inset
21820
21821 commands: 
21822 \begin_inset space ~
21823 \end_inset
21824
21825
21826 \begin_inset Newline newline
21827 \end_inset
21828
21829
21830 \begin_inset Flex Code
21831 status collapsed
21832
21833 \begin_layout Plain Layout
21834 git mv 
21835 \family typewriter
21836
21837 \begin_inset Quotes eld
21838 \end_inset
21839
21840 <file-name>
21841 \begin_inset Quotes erd
21842 \end_inset
21843
21844  
21845 \begin_inset Quotes eld
21846 \end_inset
21847
21848 <new-file-name>
21849 \begin_inset Quotes erd
21850 \end_inset
21851
21852
21853 \end_layout
21854
21855 \end_inset
21856
21857
21858 \begin_inset Newline newline
21859 \end_inset
21860
21861
21862 \begin_inset Flex Code
21863 status collapsed
21864
21865 \begin_layout Plain Layout
21866 git commit
21867 \end_layout
21868
21869 \end_inset
21870
21871
21872 \end_layout
21873
21874 \begin_layout Subsubsection
21875
21876 \family sans
21877 Show History
21878 \end_layout
21879
21880 \begin_layout Standard
21881 This shows the complete history of the GIT document.
21882  The output of 
21883 \family typewriter
21884 git log 
21885 \begin_inset Quotes eld
21886 \end_inset
21887
21888 <file-name>
21889 \begin_inset Quotes erd
21890 \end_inset
21891
21892
21893 \family default
21894  is shown in a browser.
21895 \end_layout
21896
21897 \begin_layout Subsubsection
21898 Version Info
21899 \end_layout
21900
21901 \begin_layout Standard
21902 LyX supports GIT hash number of the last commit to the file, author name,
21903  date and time of last commit.
21904  All those are extracted from 
21905 \family typewriter
21906 git log -n 1 --pretty=format:%H%n%an%n%ai
21907 \family default
21908 .
21909  Tree version information is obtained via 
21910 \family typewriter
21911 git describe --abbrev --dirty --long
21912 \family default
21913 .
21914  See 
21915 \begin_inset CommandInset ref
21916 LatexCommand ref
21917 reference "sub:VCS-Revision-Information"
21918
21919 \end_inset
21920
21921  for other details.
21922 \end_layout
21923
21924 \begin_layout Subsection
21925 Further tuning
21926 \end_layout
21927
21928 \begin_layout Standard
21929 With the recent addition of the vc-command function LyX power users are
21930  allowed to create their own commands for revision control.
21931 \end_layout
21932
21933 \begin_layout Standard
21934 As an example you can see how two TortoiseSVN commands could be integrated
21935  directly:
21936 \end_layout
21937
21938 \begin_layout Description
21939 Commit: 
21940 \begin_inset Flex Code
21941 status collapsed
21942
21943 \begin_layout Plain Layout
21944 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21945 \end_layout
21946
21947 \end_inset
21948
21949
21950 \end_layout
21951
21952 \begin_layout Description
21953 Revert: 
21954 \begin_inset Flex Code
21955 status collapsed
21956
21957 \begin_layout Plain Layout
21958 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21959 \end_layout
21960
21961 \end_inset
21962
21963
21964 \end_layout
21965
21966 \begin_layout Subsection
21967 Version control and Document comparison
21968 \end_layout
21969
21970 \begin_layout Standard
21971 One of the typical uses of version control is to inspect the changes between
21972  revisions, usually by creating 
21973 \begin_inset Flex Code
21974 status collapsed
21975
21976 \begin_layout Plain Layout
21977 diff
21978 \end_layout
21979
21980 \end_inset
21981
21982  dumps.
21983  While this is useful for plain text files, it is much less useful in the
21984  case of LyX files, which have more a complicated structure.
21985  Hence we provide binding to the Document comparison feature.
21986  There are two ways of calling this feature - either by direct call of 
21987 \begin_inset Flex Code
21988 status collapsed
21989
21990 \begin_layout Plain Layout
21991 VC_COMPARE
21992 \end_layout
21993
21994 \end_inset
21995
21996  LyX function (for details see LyX functions manual) or by icon/menu item
21997  
21998 \begin_inset Flex MenuItem
21999 status collapsed
22000
22001 \begin_layout Plain Layout
22002 Compare with older revision...
22003 \end_layout
22004
22005 \end_inset
22006
22007 .
22008  One can either compare two chosen revisions of the document or he can simply
22009  compare the current version of edited text with older revisions (where
22010  '
22011 \begin_inset Flex MenuItem
22012 status collapsed
22013
22014 \begin_layout Plain Layout
22015 0
22016 \end_layout
22017
22018 \end_inset
22019
22020 ' revisions back means comparison of the edited file with last commited
22021  revision).
22022  
22023 \end_layout
22024
22025 \begin_layout Standard
22026 This feature is supported for SVN and RCS though due to the more complicated
22027  versioning scheme of RCS there is a constraint -- when addressing the revisions
22028  in dialog, numbers always point to the last number in RCS revision number,
22029  i.e.
22030  '35' in '1.2.35'.
22031  We don't currently support GIT addressing of revisions, one can just compare
22032  edited document with its revision X steps backs, where X is addressed as
22033  HEAD~X.
22034 \end_layout
22035
22036 \begin_layout Section
22037 Literate Programming
22038 \end_layout
22039
22040 \begin_layout Standard
22041 Updated by 
22042 \noun on
22043 Kayvan Sylvan 
22044 \noun default
22045 (kayvan@sylvan.com)
22046 \noun on
22047
22048 \noun default
22049 original documentation written by 
22050 \noun on
22051 Edmar Wienskoski Jr.
22052
22053 \noun default
22054  (edmar-w-jr@technologist.com)
22055 \end_layout
22056
22057 \begin_layout Subsection
22058 Introduction
22059 \end_layout
22060
22061 \begin_layout Standard
22062 The main purpose of this documentation is to show you how to use LyX for
22063  literate programming, where it is assumed that you are familiar with this
22064  programming technique, and know what 
22065 \begin_inset Quotes eld
22066 \end_inset
22067
22068 tangling
22069 \begin_inset Quotes erd
22070 \end_inset
22071
22072  and 
22073 \begin_inset Quotes eld
22074 \end_inset
22075
22076 weaving
22077 \begin_inset Quotes erd
22078 \end_inset
22079
22080  means.
22081  If that is not the case, please follow the web links provided in the following
22082  sections.
22083  There is a lot of good documentation out there covering old development
22084  history to the latest tools tips.
22085 \end_layout
22086
22087 \begin_layout Standard
22088 It is also assumed that you are familiar with LyX itself to a point that
22089  you are comfortable changing your LyX preferences, and X resources file.
22090  If that is not the case please refer to other LyX documentation to cover
22091  your specific needs.
22092 \end_layout
22093
22094 \begin_layout Subsection
22095 Literate Programming
22096 \end_layout
22097
22098 \begin_layout Standard
22099 From the Literate Programming FAQ: 
22100 \end_layout
22101
22102 \begin_layout Quotation
22103 Literate programming is the combination of documentation and source together
22104  in a fashion suited for reading by human beings.
22105  In fact, literate programs should be enjoyable reading, even inviting!
22106  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
22107  and documentation in a single file.
22108  Literate programming tools then parse the file to produce either readable
22109  documentation or compilable source.
22110  The WEB style of literate programming was created by D.
22111 \begin_inset space \thinspace{}
22112 \end_inset
22113
22114 E.
22115  Knuth during the development of his TeX typesetting software.
22116  
22117 \end_layout
22118
22119 \begin_layout Standard
22120 Another excerpt says:
22121 \end_layout
22122
22123 \begin_layout Quotation
22124
22125 \emph on
22126 How is literate programming different from verbose commenting?
22127 \end_layout
22128
22129 \begin_layout Quotation
22130 There are three distinguishing characteristics.
22131  In order of importance, they are: 
22132 \end_layout
22133
22134 \begin_deeper
22135 \begin_layout Itemize
22136 flexible order of elaboration 
22137 \end_layout
22138
22139 \begin_layout Itemize
22140 automatic support for browsing 
22141 \end_layout
22142
22143 \begin_layout Itemize
22144 typeset documentation, especially diagrams and mathematics 
22145 \end_layout
22146
22147 \end_deeper
22148 \begin_layout Standard
22149 Now that I sparked your curiosity, take a look in the references.
22150 \end_layout
22151
22152 \begin_layout Subsubsection
22153 References
22154 \end_layout
22155
22156 \begin_layout Standard
22157 The complete Literate Programming FAQ can be found at:
22158 \end_layout
22159
22160 \begin_layout Quote
22161 Literate Programming FAQ 
22162 \begin_inset Flex URL
22163 status collapsed
22164
22165 \begin_layout Plain Layout
22166
22167 http://www.literateprogramming.com/lpfaq.pdf
22168 \end_layout
22169
22170 \end_inset
22171
22172
22173 \end_layout
22174
22175 \begin_layout Standard
22176 The FAQ lists 23 (twenty three!) different literate programming tools.
22177  Where some are specialized or 
22178 \begin_inset Quotes eld
22179 \end_inset
22180
22181 tailored
22182 \begin_inset Quotes erd
22183 \end_inset
22184
22185  for particular programming languages, while other have general scope.
22186  I selected 
22187 \noun on
22188 Noweb
22189 \noun default
22190  for my own use for several reasons:
22191 \end_layout
22192
22193 \begin_layout Itemize
22194 It can generate the documentation either in LaTeX or HTML.
22195 \end_layout
22196
22197 \begin_layout Itemize
22198 It has a open architecture, i.
22199 \begin_inset space \thinspace{}
22200 \end_inset
22201
22202 e.
22203 \begin_inset space \space{}
22204 \end_inset
22205
22206 it is easy to plug in new filters and to perform special processing that
22207  you may need.
22208  
22209 \end_layout
22210
22211 \begin_layout Itemize
22212 There is a good selection of filters available already (the HTML is one
22213  of them).
22214 \end_layout
22215
22216 \begin_layout Itemize
22217 It is free.
22218 \end_layout
22219
22220 \begin_layout Standard
22221 The Noweb web page can be found at: 
22222 \end_layout
22223
22224 \begin_layout Quote
22225 Noweb home page 
22226 \begin_inset Flex URL
22227 status collapsed
22228
22229 \begin_layout Plain Layout
22230
22231 http://www.cs.virginia.edu/~nr/noweb/
22232 \end_layout
22233
22234 \end_inset
22235
22236
22237 \end_layout
22238
22239 \begin_layout Standard
22240 Starting from there you can reach many other interesting links and even
22241  some literate program examples.
22242 \end_layout
22243
22244 \begin_layout Subsection
22245 LyX and Literate Programming with Noweb
22246 \end_layout
22247
22248 \begin_layout Standard
22249 The LyX support for Literate Programming is provided by using the generic
22250  LyX converters mechanism.
22251  This support is provided in a 
22252 \begin_inset Quotes eld
22253 \end_inset
22254
22255 Noweb independent
22256 \begin_inset Quotes erd
22257 \end_inset
22258
22259  way, i.
22260 \begin_inset space \thinspace{}
22261 \end_inset
22262
22263 e.
22264 \begin_inset space \space{}
22265 \end_inset
22266
22267 you will be able to use this new LyX feature with some other literate programmin
22268 g tool of your choice by just changing your LyX preferences.
22269 \end_layout
22270
22271 \begin_layout Subsubsection
22272 Generating documents and code (weaving and tangling)
22273 \end_layout
22274
22275 \begin_layout Paragraph
22276 Using the noweb module
22277 \end_layout
22278
22279 \begin_layout Standard
22280 If you have installed Noweb and LyX successfully, whenever you open a new
22281  document, after you have chosen its document class, use the Document->Settings
22282  menu to add the 
22283 \begin_inset Quotes eld
22284 \end_inset
22285
22286 noweb
22287 \begin_inset Quotes erd
22288 \end_inset
22289
22290  module.
22291  If Noweb is correctly installed, when you click on the 
22292 \begin_inset Quotes eld
22293 \end_inset
22294
22295 Modules
22296 \begin_inset Quotes erd
22297 \end_inset
22298
22299  link, you will see the 
22300 \begin_inset Quotes eld
22301 \end_inset
22302
22303 noweb
22304 \begin_inset Quotes erd
22305 \end_inset
22306
22307  module in the available list and you can add it to your document.
22308 \end_layout
22309
22310 \begin_layout Paragraph
22311 Typing code in
22312 \end_layout
22313
22314 \begin_layout Standard
22315 LyX enables you to write code with a layout named 
22316 \begin_inset Flex Noun
22317 status collapsed
22318
22319 \begin_layout Plain Layout
22320 Chunk
22321 \end_layout
22322
22323 \end_inset
22324
22325 .
22326  Noweb delimits chunks like this:
22327 \end_layout
22328
22329 \begin_layout LyX-Code
22330 <<My code>>=
22331 \end_layout
22332
22333 \begin_layout LyX-Code
22334   code
22335 \end_layout
22336
22337 \begin_layout LyX-Code
22338   more code
22339 \end_layout
22340
22341 \begin_layout LyX-Code
22342   even more code
22343 \end_layout
22344
22345 \begin_layout LyX-Code
22346   @
22347 \end_layout
22348
22349 \begin_layout Standard
22350 The problem is that whatever is written in between the << and the 
22351 \family typewriter
22352 @
22353 \family default
22354  must be taken literally, i.
22355 \begin_inset space \thinspace{}
22356 \end_inset
22357
22358 e.
22359 \begin_inset space \space{}
22360 \end_inset
22361
22362 LyX should be prevented from making any special interpretation of what has
22363  been written.
22364  This is also handled by 
22365 \begin_inset Flex Noun
22366 status collapsed
22367
22368 \begin_layout Plain Layout
22369 Chunk
22370 \end_layout
22371
22372 \end_inset
22373
22374 , that works like a normal paragraph but has a free spacing capability.
22375 \end_layout
22376
22377 \begin_layout Standard
22378 As a special note, you can also use the 
22379 \begin_inset Quotes eld
22380 \end_inset
22381
22382 %def
22383 \begin_inset Quotes erd
22384 \end_inset
22385
22386  construct of Noweb in your chunks to add items to Noweb's identifier cross-refe
22387 rence:
22388 \end_layout
22389
22390 \begin_layout LyX-Code
22391 <<My chunk>>=
22392 \end_layout
22393
22394 \begin_layout LyX-Code
22395 def some_function(args):
22396 \end_layout
22397
22398 \begin_layout LyX-Code
22399    "This is the doc string for this function."
22400 \end_layout
22401
22402 \begin_layout LyX-Code
22403    print "My args: ", args
22404 \end_layout
22405
22406 \begin_layout LyX-Code
22407 @ %def some_function
22408 \end_layout
22409
22410 \begin_layout Standard
22411 For an example of this usage and the resulting cross-reference output, look
22412  at the Literate python program in 
22413 \emph on
22414 LIBDIR/examples/listerrors.lyx
22415 \emph default
22416  which should make this all clear.
22417 \end_layout
22418
22419 \begin_layout Paragraph
22420 Generating the documentation
22421 \end_layout
22422
22423 \begin_layout Standard
22424 At this point you already have a new document file with a proper document
22425  class, and with some code and text on it.
22426  How do I print it? The answer is simple, you select 
22427 \family sans
22428 View\SpecialChar \menuseparator
22429 DVI,
22430 \family default
22431  etc.
22432  Just like you would do for a plain document.
22433  No special procedure is required.
22434 \end_layout
22435
22436 \begin_layout Standard
22437 To help orientate you, I will now explain what happens inside LyX:
22438 \end_layout
22439
22440 \begin_layout Enumerate
22441 When the 
22442 \family sans
22443 Update\SpecialChar \menuseparator
22444 DVI
22445 \family default
22446  menu option is chosen, a LaTeX file is generated.
22447  
22448 \end_layout
22449
22450 \begin_deeper
22451 \begin_layout Standard
22452 If the document is of any literate class the generated file will be named
22453  with an extension name defined by the 
22454 \begin_inset Quotes eld
22455 \end_inset
22456
22457 literate
22458 \begin_inset Quotes erd
22459 \end_inset
22460
22461  format (defined in the Preferences panel), otherwise the file will have
22462  the usual 
22463 \family typewriter
22464 .tex
22465 \family default
22466  extension.
22467 \end_layout
22468
22469 \end_deeper
22470 \begin_layout Enumerate
22471 Note that the only difference so far is in the name of the file, no special
22472  processing is required by LyX.
22473  Given that you formatted the code using the 
22474 \begin_inset Flex Noun
22475 status collapsed
22476
22477 \begin_layout Plain Layout
22478 Chunk
22479 \end_layout
22480
22481 \end_inset
22482
22483  layout that, by itself, takes care of the business.
22484 \end_layout
22485
22486 \begin_layout Enumerate
22487 If the document is of any literate class LyX will then use the internal
22488  LyX to Noweb converter, followed by the Noweb to LaTeX converter
22489 \begin_inset Foot
22490 status collapsed
22491
22492 \begin_layout Plain Layout
22493 The converters are defined in the 
22494 \family sans
22495 Tools\SpecialChar \menuseparator
22496 Preferences
22497 \family default
22498  panel, under the 
22499 \begin_inset Quotes eld
22500 \end_inset
22501
22502 Conversion
22503 \begin_inset Quotes erd
22504 \end_inset
22505
22506  tab.
22507  See section 
22508 \emph on
22509 Converters
22510 \emph default
22511  of the 
22512 \emph on
22513 Customization
22514 \emph default
22515  manual for general information about converters.
22516 \end_layout
22517
22518 \end_inset
22519
22520  to generate the LaTeX file.
22521 \end_layout
22522
22523 \begin_deeper
22524 \begin_layout Standard
22525 Otherwise it will just skip this step.
22526 \end_layout
22527
22528 \end_deeper
22529 \begin_layout Enumerate
22530 Finally, LaTeX is invoked and the regular post processing continues as in
22531  a plain document.
22532 \end_layout
22533
22534 \begin_layout Standard
22535 Independence from a particular 
22536 \begin_inset Quotes eld
22537 \end_inset
22538
22539 literate tool
22540 \begin_inset Quotes erd
22541 \end_inset
22542
22543  is easily achieved by changing the commands that are run by the various
22544  converters.
22545 \end_layout
22546
22547 \begin_layout Paragraph
22548 Generating the code
22549 \end_layout
22550
22551 \begin_layout Standard
22552 When the build menu option is chosen or the corresponding button in the
22553  toolbar is pressed, a LaTeX file is generated just like step 1 above.
22554  Next, LyX invokes the 
22555 \family typewriter
22556 Noweb->Program
22557 \family default
22558  converter.
22559  This converter needs to be defined by the user and is not installed by
22560  default, though the Program format is.
22561  This converter (like any other converter) will have two parts:
22562 \end_layout
22563
22564 \begin_layout Enumerate
22565 The converter program itself.
22566  This program performs the conversion from the one format to the other (in
22567  this case, from the Noweb format to the Program pseudo-format).
22568 \end_layout
22569
22570 \begin_layout Enumerate
22571 The error log parser.
22572  This is a program whose sole purpose is to rewrite error messages in a
22573  format that LyX understands.
22574  This makes it possible for LyX to place error boxes in the right places
22575  in the file buffer.
22576 \end_layout
22577
22578 \begin_layout Standard
22579 The first part, the 
22580 \begin_inset Quotes eld
22581 \end_inset
22582
22583 Converter
22584 \begin_inset Quotes erd
22585 \end_inset
22586
22587  setting, should be set to
22588 \begin_inset Newline newline
22589 \end_inset
22590
22591
22592 \begin_inset Quotes eld
22593 \end_inset
22594
22595
22596 \family typewriter
22597 build-script $$i
22598 \family default
22599  $$r
22600 \begin_inset Quotes erd
22601 \end_inset
22602
22603 .
22604 \begin_inset Newline newline
22605 \end_inset
22606
22607 This basically means that LyX will call 
22608 \begin_inset Quotes eld
22609 \end_inset
22610
22611 build-script
22612 \begin_inset Quotes erd
22613 \end_inset
22614
22615  (a program or script) with the name of the Noweb file (normally a file
22616  in the LyX temp directory) and the directory path of the original LyX file.
22617  
22618 \end_layout
22619
22620 \begin_layout Standard
22621 This is an implementation of 
22622 \begin_inset Quotes eld
22623 \end_inset
22624
22625 build-script
22626 \begin_inset Quotes erd
22627 \end_inset
22628
22629  that you can place in a directory on your path:
22630 \end_layout
22631
22632 \begin_layout Standard
22633 \begin_inset VSpace defskip
22634 \end_inset
22635
22636
22637 \end_layout
22638
22639 \begin_layout Standard
22640 \begin_inset Newpage pagebreak
22641 \end_inset
22642
22643
22644 \end_layout
22645
22646 \begin_layout Standard
22647
22648 \family sans
22649 #!/bin/sh
22650 \end_layout
22651
22652 \begin_layout Standard
22653
22654 \family sans
22655 #
22656 \end_layout
22657
22658 \begin_layout Standard
22659
22660 \family sans
22661 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
22662 \end_layout
22663
22664 \begin_layout Standard
22665 \begin_inset VSpace defskip
22666 \end_inset
22667
22668
22669 \end_layout
22670
22671 \begin_layout Standard
22672 The next part of the converter setting is the 
22673 \begin_inset Quotes eld
22674 \end_inset
22675
22676 Flags
22677 \begin_inset Quotes erd
22678 \end_inset
22679
22680  which is to be set to
22681 \begin_inset Newline newline
22682 \end_inset
22683
22684
22685 \begin_inset Quotes eld
22686 \end_inset
22687
22688
22689 \family typewriter
22690 parselog=$$s/scripts/listerrors
22691 \family default
22692
22693 \begin_inset Quotes erd
22694 \end_inset
22695
22696 .
22697 \begin_inset Newline newline
22698 \end_inset
22699
22700 This will run any errors that are generated by the 
22701 \begin_inset Quotes eld
22702 \end_inset
22703
22704 build-script
22705 \begin_inset Quotes erd
22706 \end_inset
22707
22708  process through the 
22709 \begin_inset Quotes eld
22710 \end_inset
22711
22712 listerrors
22713 \begin_inset Quotes erd
22714 \end_inset
22715
22716  program.
22717 \end_layout
22718
22719 \begin_layout Standard
22720 The build will normally take place in LyX's temporary directory, so the
22721  files produced by the conversion will be in that directory.
22722  LyX will copy out what it regards as the `main' file, but the 
22723 \family typewriter
22724 Noweb->Program
22725 \family default
22726  conversion may produce several files, and so most of these would then be
22727  deleted when LyX was closed.
22728  This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
22729  the build-script chunk can place the generated files in that location.
22730 \end_layout
22731
22732 \begin_layout Paragraph
22733 Build instructions in the document
22734 \end_layout
22735
22736 \begin_layout Standard
22737 The last piece of the integration between LyX and noweb is the 
22738 \begin_inset Quotes eld
22739 \end_inset
22740
22741 build-script
22742 \begin_inset Quotes erd
22743 \end_inset
22744
22745  chunk.
22746  Generally, the instructions for building your program should be embedded
22747  in a chunk of its own.
22748  The noweb-specific 
22749 \begin_inset Quotes eld
22750 \end_inset
22751
22752 build-script
22753 \begin_inset Quotes erd
22754 \end_inset
22755
22756  above uses the notangle command to look for this chunk (called 
22757 \begin_inset Quotes eld
22758 \end_inset
22759
22760 build-script
22761 \begin_inset Quotes erd
22762 \end_inset
22763
22764 ) and runs its contents through 
22765 \begin_inset Quotes eld
22766 \end_inset
22767
22768 sh
22769 \begin_inset Quotes erd
22770 \end_inset
22771
22772 .
22773 \end_layout
22774
22775 \begin_layout Standard
22776 Typically, such a chunk would look something like this:
22777 \end_layout
22778
22779 \begin_layout LyX-Code
22780 <<build-script>>=
22781 \end_layout
22782
22783 \begin_layout LyX-Code
22784 #!/bin/sh
22785 \begin_inset Newline newline
22786 \end_inset
22787
22788 if [ -z "${NOWEB_SOURCE}" ]
22789 \begin_inset Newline newline
22790 \end_inset
22791
22792 then
22793 \end_layout
22794
22795 \begin_layout LyX-Code
22796 NOWEB_SOURCE=myfile.nw
22797 \begin_inset Newline newline
22798 \end_inset
22799
22800 fi
22801 \begin_inset Newline newline
22802 \end_inset
22803
22804 [...
22805  code to extract files ...
22806  use NOWEB_OUTPUT_DIR here ...]
22807 \begin_inset Newline newline
22808 \end_inset
22809
22810 [...
22811  code to compile files ...]
22812 \begin_inset Newline newline
22813 \end_inset
22814
22815 @
22816 \end_layout
22817
22818 \begin_layout Standard
22819 Look in 
22820 \emph on
22821 LIBDIR/examples/listerrors.lyx
22822 \emph default
22823  or in 
22824 \emph on
22825 LIBDIR/examples/Literate.lyx
22826 \emph default
22827  which implement two versions of the 
22828 \begin_inset Quotes eld
22829 \end_inset
22830
22831 listerrors
22832 \begin_inset Quotes erd
22833 \end_inset
22834
22835  program for some illustrations of how all of these pieces go together or
22836  in 
22837 \emph on
22838 LIBDIR/examples/noweb2lyx.lyx.
22839
22840 \emph default
22841  Interestingly, these three files show off the language-indepence of the
22842  LyX literate programming support since they are written in Python, C and
22843  Perl respectively.
22844 \end_layout
22845
22846 \begin_layout Subsubsection
22847 Configuring LyX
22848 \end_layout
22849
22850 \begin_layout Standard
22851 All the Literate Programming support is configured by the 
22852 \family sans
22853 Tools\SpecialChar \menuseparator
22854 Preferences
22855 \family default
22856  panel in the 
22857 \begin_inset Quotes eld
22858 \end_inset
22859
22860 File Handling
22861 \begin_inset Quotes erd
22862 \end_inset
22863
22864  tab.
22865  The important parts are:
22866 \end_layout
22867
22868 \begin_layout Description
22869 the
22870 \begin_inset space ~
22871 \end_inset
22872
22873
22874 \begin_inset Quotes eld
22875 \end_inset
22876
22877 NoWeb
22878 \begin_inset Quotes erd
22879 \end_inset
22880
22881
22882 \begin_inset space ~
22883 \end_inset
22884
22885 format Set up via the File Formats tab, this is where the Noweb-specific
22886  pieces are set up.
22887  The 
22888 \family sans
22889 GUI Name
22890 \family default
22891  is set to 
22892 \family typewriter
22893 NoWeb
22894 \family default
22895 , the file extension is set to 
22896 \family typewriter
22897 .nw
22898 \family default
22899 .
22900  This tells LyX to create a file with a 
22901 \family typewriter
22902 .nw
22903 \family default
22904  extension in the first step of the conversion process.
22905 \end_layout
22906
22907 \begin_layout Description
22908 the
22909 \begin_inset space ~
22910 \end_inset
22911
22912
22913 \family sans
22914 Program
22915 \family default
22916
22917 \begin_inset space ~
22918 \end_inset
22919
22920 format This is an empty format whose sole purpose is to be the endpoint
22921  of a conversion (which then allows us to set up a converter for it).
22922 \end_layout
22923
22924 \begin_layout Description
22925
22926 \family sans
22927 NoWeb
22928 \family default
22929 ->
22930 \family sans
22931 LaTeX
22932 \family default
22933  This converter performs the 
22934 \begin_inset Quotes eld
22935 \end_inset
22936
22937 weaving
22938 \begin_inset Quotes erd
22939 \end_inset
22940
22941  of the literate document.
22942  For Noweb, it is set to 
22943 \begin_inset Quotes eld
22944 \end_inset
22945
22946
22947 \family typewriter
22948 noweave -delay -index $$i > $$o
22949 \family default
22950
22951 \begin_inset Quotes erd
22952 \end_inset
22953
22954
22955 \end_layout
22956
22957 \begin_layout Description
22958
22959 \family sans
22960 NoWeb
22961 \family default
22962 ->
22963 \family sans
22964 Program
22965 \family default
22966  This performs the 
22967 \begin_inset Quotes eld
22968 \end_inset
22969
22970 tangling step
22971 \begin_inset Quotes erd
22972 \end_inset
22973
22974 .
22975  As stated above, the Converter is set to 
22976 \begin_inset Quotes eld
22977 \end_inset
22978
22979
22980 \family typewriter
22981 build-script $$i
22982 \family default
22983  $$r
22984 \begin_inset Quotes erd
22985 \end_inset
22986
22987 , with Flags set to
22988 \begin_inset Newline newline
22989 \end_inset
22990
22991
22992 \begin_inset Quotes eld
22993 \end_inset
22994
22995
22996 \family typewriter
22997 parselog=$$s/scripts/listerrors
22998 \family default
22999
23000 \begin_inset Quotes erd
23001 \end_inset
23002
23003 .
23004 \end_layout
23005
23006 \begin_layout Subsubsection
23007 Debug extensions
23008 \end_layout
23009
23010 \begin_layout Standard
23011 There is also a new function implemented in the LyX server, the 
23012 \begin_inset Quotes eld
23013 \end_inset
23014
23015 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
23016  
23017 \end_layout
23018
23019 \begin_layout Standard
23020 When debugging code with ddd/gdb, it is possible to invoke a text editor
23021  at the current execution position with a single key stroke.
23022  The default ddd configuration for that is shift-ctrl-V.
23023  It happens that you can define the editor command line invocation in ddd
23024  by accessing the 
23025 \family sans
23026 Edit\SpecialChar \menuseparator
23027 Preferences\SpecialChar \menuseparator
23028 Helpers
23029 \family default
23030  dialog and changing the "Edit Sources" entry.
23031 \end_layout
23032
23033 \begin_layout Standard
23034 I take advantage of the newly created LyX server function and this ddd feature,
23035  and set 
23036 \begin_inset Quotes eld
23037 \end_inset
23038
23039 Edit Sources
23040 \begin_inset Quotes erd
23041 \end_inset
23042
23043  to:
23044 \end_layout
23045
23046 \begin_layout Standard
23047 \begin_inset VSpace defskip
23048 \end_inset
23049
23050
23051 \end_layout
23052
23053 \begin_layout Standard
23054
23055 \family sans
23056 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
23057 \end_layout
23058
23059 \begin_layout Standard
23060 \begin_inset VSpace defskip
23061 \end_inset
23062
23063
23064 \end_layout
23065
23066 \begin_layout Standard
23067 With this, whenever you are using ddd and find a point in the program that
23068  you want to edit, you just press shift-ctrl-V (in the ddd window), and
23069  ddd will forward this information to LyX through the LyX server and then
23070  the LyX window will show the same file with the cursor at the same position
23071  ddd was pointing to.
23072  No more guessing or long scrolling to locate a point in the program back
23073  from debugging !
23074 \end_layout
23075
23076 \begin_layout Standard
23077 Note however that you must enable the LyX server to get this feature working
23078  (it is disabled by default).
23079  You can enable it in 
23080 \family sans
23081 Preferences
23082 \family default
23083  (tabs 
23084 \family sans
23085 Inputs
23086 \family default
23087
23088 \family sans
23089 Paths
23090 \family default
23091 ) by entering in the 
23092 \family sans
23093 LyXserver pipe
23094 \family default
23095  a path like 
23096 \begin_inset Quotes eld
23097 \end_inset
23098
23099
23100 \family typewriter
23101 /home/<your-home-directory>/.lyx/lyxpipe
23102 \family default
23103
23104 \begin_inset Quotes erd
23105 \end_inset
23106
23107
23108 \end_layout
23109
23110 \begin_layout Standard
23111 Read the LyX server documentation in the 
23112 \emph on
23113 Customization Manual
23114 \emph default
23115  for further information.
23116 \end_layout
23117
23118 \begin_layout Subsubsection
23119 Toolbar extensions
23120 \end_layout
23121
23122 \begin_layout Standard
23123 There are six new buttons that can be added to your LyX toolbar.
23124  Five of these buttons are short cuts to layout styles: 
23125 \family sans
23126 Standard
23127 \family default
23128
23129 \family sans
23130 Section
23131 \family default
23132
23133 \family sans
23134 LaTeX
23135 \family default
23136
23137 \family sans
23138 LyX-Code
23139 \family default
23140 , and 
23141 \family sans
23142 Chunk
23143 \family default
23144 .
23145  The last one is a short cut to the 
23146 \begin_inset Quotes eld
23147 \end_inset
23148
23149 Build Program
23150 \begin_inset Quotes erd
23151 \end_inset
23152
23153  File menu entry.
23154  
23155 \end_layout
23156
23157 \begin_layout Standard
23158 LyX has a range of buttons that are available for tool bar customization.
23159  In my toolbar I like to combine the six short cuts above with two more:
23160  One for 
23161 \family sans
23162 Document
23163 \family default
23164 \SpecialChar \menuseparator
23165
23166 \family sans
23167 Update
23168 \family default
23169 \SpecialChar \menuseparator
23170
23171 \family sans
23172 DVI
23173 \family default
23174  and the other for 
23175 \family sans
23176 Document\SpecialChar \menuseparator
23177 View\SpecialChar \menuseparator
23178 DVI
23179 \family default
23180  File menu entries.
23181  Here is how it looks like:
23182 \end_layout
23183
23184 \begin_layout LyX-Code
23185 Toolbar
23186 \end_layout
23187
23188 \begin_layout LyX-Code
23189   Layouts
23190 \end_layout
23191
23192 \begin_layout LyX-Code
23193   Icon "layout Standard"
23194 \end_layout
23195
23196 \begin_layout LyX-Code
23197   Icon "layout Section"
23198 \end_layout
23199
23200 \begin_layout LyX-Code
23201   Icon "layout LaTeX"
23202 \end_layout
23203
23204 \begin_layout LyX-Code
23205   Icon "layout LyX-Code"
23206 \end_layout
23207
23208 \begin_layout LyX-Code
23209   Icon "layout Chunk"
23210 \end_layout
23211
23212 \begin_layout LyX-Code
23213   Separator
23214 \end_layout
23215
23216 \begin_layout LyX-Code
23217   Icon "buffer-view"
23218 \end_layout
23219
23220 \begin_layout LyX-Code
23221   Icon "buffer-typeset"
23222 \end_layout
23223
23224 \begin_layout LyX-Code
23225   Icon "build-program"
23226 \end_layout
23227
23228 \begin_layout LyX-Code
23229   Separator
23230 \end_layout
23231
23232 \begin_layout LyX-Code
23233 .
23234 \end_layout
23235
23236 \begin_layout LyX-Code
23237 .
23238 \end_layout
23239
23240 \begin_layout LyX-Code
23241 .
23242 \end_layout
23243
23244 \begin_layout LyX-Code
23245 End
23246 \end_layout
23247
23248 \begin_layout Subsubsection
23249 Colors customization
23250 \end_layout
23251
23252 \begin_layout Standard
23253 There are a number of colors in LyX that can be customized in 
23254 \family sans
23255 Preferences
23256 \family default
23257 .
23258  One of the things that bothers people is the LaTeX font color.
23259  The default color is red, since the chunks uses LaTeX font, and there is
23260  a lot of chunks in literate documents, you may get tired of seeing everything
23261  in red.
23262  You can change it by going to the tabs 
23263 \family sans
23264 Look&Feel
23265 \family default
23266
23267 \family sans
23268 Colors.
23269 \end_layout
23270
23271 \begin_layout Standard
23272 The next thing is the visible presence of the newline character in the screen.
23273  You can choose the color of this particular character and make it blend
23274  in the background.
23275  I recommend you choosing a color that is close to the background but not
23276  equal, that way you still can see it is there, but it is not bothering
23277  you anymore.
23278 \end_layout
23279
23280 \begin_layout Subsection
23281 LyX and knitr/Sweave
23282 \end_layout
23283
23284 \begin_layout Standard
23285 Support for 
23286 \family sans
23287 knitr
23288 \family default
23289  and 
23290 \family sans
23291 Sweave
23292 \family default
23293  is documented in the 
23294 \emph on
23295 knitr.lyx
23296 \emph default
23297  example file and in the Sweave manual (menu 
23298 \family sans
23299 Help\SpecialChar \menuseparator
23300 Specific Manuals
23301 \family default
23302 ).
23303 \end_layout
23304
23305 \begin_layout Chapter
23306 Special features
23307 \end_layout
23308
23309 \begin_layout Standard
23310 You can do everything with LyX that you can do with LaTeX.
23311  However, LyX cannot support every LaTeX feature directly.
23312  But you can always use TeX Code.
23313  This chapter shows you some more special things you might want to use.
23314  For other special things you can do with figures, tables, floats, boxes
23315  and notes, have a look at the 
23316 \emph on
23317 Embedded
23318 \begin_inset space ~
23319 \end_inset
23320
23321 Objects
23322 \emph default
23323  manual.
23324 \end_layout
23325
23326 \begin_layout Section
23327 Multiple Text Columns
23328 \end_layout
23329
23330 \begin_layout Standard
23331 This feature is independent of the option 
23332 \family sans
23333 Two-column document
23334 \family default
23335  in the document settings under 
23336 \family sans
23337 Text Layout
23338 \family default
23339 .
23340  If you want to have 2
23341 \begin_inset space ~
23342 \end_inset
23343
23344 columns for the whole document, it is recommended to use the 
23345 \family sans
23346 Two-column document
23347 \family default
23348  option.
23349  For all other cases use this feature.
23350 \end_layout
23351
23352 \begin_layout Standard
23353 To use multiple text columns in your document, you have to load the module
23354  
23355 \family sans
23356 Multiple Columns
23357 \family default
23358  (menu 
23359 \family sans
23360 Document\SpecialChar \menuseparator
23361 Settings\SpecialChar \menuseparator
23362 Modules
23363 \family default
23364 ) and must have the LaTeX-package 
23365 \series bold
23366 multicol
23367 \series default
23368  installed.
23369 \end_layout
23370
23371 \begin_layout Standard
23372 Footnotes within multiple columns will be placed at the bottom of the page
23373  and not under each column.
23374  Within the different columns you can use everything, with the limitation
23375  that for floats you need to use the float option 
23376 \family sans
23377 Span columns
23378 \family default
23379 .
23380 \end_layout
23381
23382 \begin_layout Subsection
23383 Basics
23384 \end_layout
23385
23386 \begin_layout Standard
23387 If you want to have 2
23388 \begin_inset space ~
23389 \end_inset
23390
23391 columns in your text, insert a multicolumn inset via the menu 
23392 \family sans
23393 Insert\SpecialChar \menuseparator
23394 Custom
23395 \begin_inset space ~
23396 \end_inset
23397
23398 Insets\SpecialChar \menuseparator
23399 Multiple
23400 \begin_inset space ~
23401 \end_inset
23402
23403 Columns
23404 \family default
23405  where the columns should start.
23406  Write all text that should be printed in 2
23407 \begin_inset space ~
23408 \end_inset
23409
23410 columns into this inset.
23411 \end_layout
23412
23413 \begin_layout Standard
23414 Here is an example:
23415 \end_layout
23416
23417 \begin_layout Standard
23418 \noindent
23419 \begin_inset Flex Multiple Columns
23420 status open
23421
23422 \begin_layout Plain Layout
23423 \noindent
23424
23425 \series bold
23426 \size small
23427 The Adventure of the Empty House
23428 \series default
23429
23430 \begin_inset Newline newline
23431 \end_inset
23432
23433 by Sir Arthur Conan Doyle
23434 \end_layout
23435
23436 \begin_layout Plain Layout
23437
23438 \size small
23439 It was in the spring of the year 1894 that all London was interested, and
23440  the fashionable world dismayed, by the murder of the Honourable Ronald
23441  Adair under most unusual and inexplicable circumstances.
23442  The public has already learned those particulars of the crime which came
23443  out in the police investigation, but a good deal was suppressed upon that
23444  occasion, since the case for the prosecution was so overwhelmingly strong
23445  that it was not necessary to bring forward all the facts.
23446  Only now, at the end of nearly ten years, am I allowed to supply those
23447  missing links which make up the whole of that remarkable chain.
23448  The crime was of interest in itself, but that interest was as nothing to
23449  me compared to the inconceivable sequel, which afforded me the greatest
23450  shock and surprise of any event in my adventurous life.
23451  Even now, after this long interval, I find myself thrilling as I think
23452  of it, and feeling once more that sudden flood of joy, amazement, and increduli
23453 ty which utterly submerged my mind.
23454  Let me say to that public, which has shown some interest in those glimpses
23455  which I have occasionally given them of the thoughts and actions of a very
23456  remarkable man, that they are not to blame me if I have not shared my knowledge
23457  with them, for I should have considered it my first duty to do so, had
23458  I not been barred by a positive prohibition from his own lips, which was
23459  only withdrawn upon the third of last month.
23460 \end_layout
23461
23462 \end_inset
23463
23464
23465 \end_layout
23466
23467 \begin_layout Standard
23468 To get 3 or more columns, set the cursor into the multicolumn inset and
23469  use the menu 
23470 \family sans
23471 Insert\SpecialChar \menuseparator
23472 Number
23473 \begin_inset space ~
23474 \end_inset
23475
23476 of
23477 \begin_inset space ~
23478 \end_inset
23479
23480 Columns
23481 \family default
23482 .
23483  The number of the desired columns is written into that inset (for 3
23484 \begin_inset space ~
23485 \end_inset
23486
23487 columns write 
23488 \begin_inset Quotes eld
23489 \end_inset
23490
23491 3
23492 \begin_inset Quotes erd
23493 \end_inset
23494
23495 ).
23496 \begin_inset Newline newline
23497 \end_inset
23498
23499 Here is an example with 3
23500 \begin_inset space ~
23501 \end_inset
23502
23503 columns:
23504 \end_layout
23505
23506 \begin_layout Standard
23507 \begin_inset Flex Multiple Columns
23508 status open
23509
23510 \begin_layout Plain Layout
23511
23512 \size footnotesize
23513 \begin_inset Argument 1
23514 status open
23515
23516 \begin_layout Plain Layout
23517 3
23518 \end_layout
23519
23520 \end_inset
23521
23522 It can be imagined that my close intimacy with Sherlock Holmes had interested
23523  me deeply in crime, and that after his disappearance I never failed to
23524  read with care the various problems which came before the public.
23525  And I even attempted, more than once, for my own private satisfaction,
23526  to employ his methods in their solution, though with indifferent success.
23527  There was none, however, which appealed to me like this tragedy of Ronald
23528  Adair.
23529  As I read the evidence at the inquest, which led up to a verdict of willful
23530  murder against some person or persons unknown, I realized more clearly
23531  than I had ever done the loss which the community had sustained by the
23532  death of Sherlock Holmes.
23533  There were points about this strange business which would, I was sure,
23534  have specially appealed to him, and the efforts of the police would have
23535  been supplemented, or more probably anticipated, by the trained observation
23536  and the alert mind of the first criminal agent in Europe.
23537  All day, as I drove upon my round, I turned over the case in my mind and
23538  found no explanation which appeared to me to be adequate.
23539  At the risk of telling a twice-told tale, I will recapitulate the facts
23540  as they were known to the public at the conclusion of the inquest.
23541 \end_layout
23542
23543 \end_inset
23544
23545
23546 \end_layout
23547
23548 \begin_layout Standard
23549 You can have up to 10
23550 \begin_inset space ~
23551 \end_inset
23552
23553 columns if you want to, but that might not be very pleasant for the readers
23554  of your document.
23555 \end_layout
23556
23557 \begin_layout Standard
23558 \begin_inset Newpage newpage
23559 \end_inset
23560
23561
23562 \end_layout
23563
23564 \begin_layout Subsection
23565 Columns inside Columns
23566 \end_layout
23567
23568 \begin_layout Standard
23569 You can also have columns inside columns:
23570 \end_layout
23571
23572 \begin_layout Standard
23573 \begin_inset Flex Multiple Columns
23574 status open
23575
23576 \begin_layout Plain Layout
23577
23578 \size footnotesize
23579 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
23580  at that time governor of one of the Australian colonies.
23581  Adair's mother had returned from Australia to undergo the operation for
23582  cataract, and she, her son Ronald, and her daughter Hilda were living together
23583  at 427 Park Lane.
23584 \end_layout
23585
23586 \begin_layout Plain Layout
23587 \begin_inset Flex Multiple Columns
23588 status open
23589
23590 \begin_layout Plain Layout
23591
23592 \size footnotesize
23593 The youth moved in the best society–had, so far as was known, no enemies
23594  and no particular vices.
23595  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
23596  had been broken off by mutual consent some months before, and there was
23597  no sign that it had left any very profound feeling behind it.
23598  For the rest {sic} the man's life moved in a narrow and conventional circle,
23599  for his habits were quiet and his nature unemotional.
23600  Yet it was upon this easy-going young aristocrat that death came, in most
23601  strange and unexpected form, between the hours of ten and eleven-twenty
23602  on the night of March 30, 1894.
23603 \end_layout
23604
23605 \end_inset
23606
23607
23608 \end_layout
23609
23610 \begin_layout Plain Layout
23611
23612 \size footnotesize
23613 Ronald Adair was fond of cards–playing continually, but never for such stakes
23614  as would hurt him.
23615  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
23616  It was shown that, after dinner on the day of his death, he had played
23617  a rubber of whist at the latter club.
23618  He had also played there in the afternoon.
23619
23620 \size default
23621  
23622 \size footnotesize
23623 The evidence of those who had played with him– Mr.
23624  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
23625  and that there was a fairly equal fall of the cards.
23626  Adair might have lost five pounds, but not more.
23627  His fortune was a considerable one, and such a loss could not in any way
23628  affect him.
23629  He had played nearly every day at one club or other, but he was a cautious
23630  player, and usually rose a winner.
23631  It came out in evidence that, in partnership with Colonel Moran, he had
23632  actually won as much as four hundred and twenty pounds in a sitting, some
23633  weeks before, from Godfrey Milner and Lord Balmoral.
23634  So much for his recent history as it came out at the inquest.
23635 \end_layout
23636
23637 \end_inset
23638
23639
23640 \end_layout
23641
23642 \begin_layout Subsection
23643 Advanced Examples
23644 \end_layout
23645
23646 \begin_layout Standard
23647 The examples in this section show some more special features of multiple
23648  columns.
23649 \end_layout
23650
23651 \begin_layout Standard
23652 For more features of multiple columns, have a look at the documentation
23653  of the LaTeX-package 
23654 \series bold
23655 multicol
23656 \series default
23657
23658 \begin_inset CommandInset citation
23659 LatexCommand cite
23660 key "multicol"
23661
23662 \end_inset
23663
23664 .
23665 \end_layout
23666
23667 \begin_layout Subsubsection
23668 Preface
23669 \end_layout
23670
23671 \begin_layout Standard
23672 To add a preface text for multiple columns, set the cursor into the multicolumn
23673  inset and use the menu 
23674 \family sans
23675 Insert\SpecialChar \menuseparator
23676 Preface
23677 \family default
23678 .
23679  Write your preface text into that inset.
23680 \begin_inset Newline newline
23681 \end_inset
23682
23683 This is an example with some preface text:
23684 \end_layout
23685
23686 \begin_layout Standard
23687 \begin_inset VSpace bigskip
23688 \end_inset
23689
23690
23691 \end_layout
23692
23693 \begin_layout Standard
23694 \begin_inset Flex Multiple Columns
23695 status open
23696
23697 \begin_layout Plain Layout
23698 \begin_inset Argument 2
23699 status open
23700
23701 \begin_layout Plain Layout
23702 And the story continues and continues and continues and continues\SpecialChar \ldots{}
23703
23704 \end_layout
23705
23706 \end_inset
23707
23708
23709 \size small
23710 On the evening of the crime, he returned from the club exactly at ten.
23711  His mother and sister were out spending the evening with a relation.
23712  The servant deposed that she heard him enter the front room on the second
23713  floor, generally used as his sitting-room.
23714  She had lit a fire there, and as it smoked she had opened the window.
23715  No sound was heard from the room until eleven-twenty, the hour of the return
23716  of Lady Maynooth and her daughter.
23717  Desiring to say good-night, she attempted to enter her son's room.
23718  The door was locked on the inside, and no answer could be got to their
23719  cries and knocking.
23720  Help was obtained, and the door forced.
23721  The unfortunate young man was found lying near the table.
23722  His head had been horribly mutilated by an expanding revolver bullet, but
23723  no weapon of any sort was to be found in the room.
23724 \end_layout
23725
23726 \end_inset
23727
23728
23729 \end_layout
23730
23731 \begin_layout Standard
23732 You can also use a section heading as the preface if you use a section command
23733  as TeX Code.
23734  For example the command
23735 \end_layout
23736
23737 \begin_layout Standard
23738
23739 \series bold
23740
23741 \backslash
23742 subsection{subsection title}
23743 \end_layout
23744
23745 \begin_layout Standard
23746 creates a subsection.
23747  In this example the preface is a subsubsection:
23748 \end_layout
23749
23750 \begin_layout Standard
23751 \begin_inset Flex Multiple Columns
23752 status open
23753
23754 \begin_layout Plain Layout
23755 \begin_inset Argument 2
23756 status open
23757
23758 \begin_layout Plain Layout
23759 \begin_inset ERT
23760 status collapsed
23761
23762 \begin_layout Plain Layout
23763
23764
23765 \backslash
23766 subsubsection{
23767 \end_layout
23768
23769 \end_inset
23770
23771 This is a subsubsection heading as a preface
23772 \begin_inset ERT
23773 status collapsed
23774
23775 \begin_layout Plain Layout
23776
23777 }
23778 \end_layout
23779
23780 \end_inset
23781
23782
23783 \end_layout
23784
23785 \end_inset
23786
23787
23788 \size small
23789 A minute examination of the circumstances served only to make the case more
23790  complex.
23791  In the first place, no reason could be given why the young man should have
23792  fastened the door upon the inside.
23793  There was the possibility that the murderer had done this, and had afterwards
23794  escaped by the window.
23795  The drop was at least twenty feet, however, and a bed of crocuses in full
23796  bloom lay beneath.
23797  Neither the flowers nor the earth showed any sign of having been disturbed,
23798  nor were there any marks upon the narrow strip of grass which separated
23799  the house from the road.
23800  Apparently, therefore, it was the young man himself who had fastened the
23801  door.
23802  But how did he come by his death? No one could have climbed up to the window
23803  without leaving traces.
23804  Suppose a man had fired through the window, he would indeed be a remarkable
23805  shot who could with a revolver inflict so deadly a wound.
23806  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
23807  a hundred yards of the house.
23808  No one had heard a shot.
23809 \end_layout
23810
23811 \end_inset
23812
23813
23814 \end_layout
23815
23816 \begin_layout Standard
23817 If there is less vertical space than 6
23818 \begin_inset space ~
23819 \end_inset
23820
23821 text lines is left on the page at the beginning of the multiple columns,
23822  a page break will be inserted before the multiple columns.
23823  Depending on the number of lines of the preface text, you might want to
23824  change this space.
23825  This is done by setting the cursor into the mulitcolumn inset behind the
23826  preface (if there is any) and using the menu 
23827 \family sans
23828 Insert\SpecialChar \menuseparator
23829 Space
23830 \begin_inset space ~
23831 \end_inset
23832
23833 Before
23834 \begin_inset space ~
23835 \end_inset
23836
23837 Page
23838 \begin_inset space ~
23839 \end_inset
23840
23841 Break
23842 \family default
23843 .
23844  Insert into that inset the amount of space like e.
23845 \begin_inset space \thinspace{}
23846 \end_inset
23847
23848 g.
23849 \begin_inset space \space{}
23850 \end_inset
23851
23852
23853 \begin_inset Quotes eld
23854 \end_inset
23855
23856 5cm
23857 \begin_inset Quotes erd
23858 \end_inset
23859
23860 .
23861 \begin_inset Newline newline
23862 \end_inset
23863
23864 In this example the space is set to 7
23865 \begin_inset space ~
23866 \end_inset
23867
23868 text lines by using 
23869 \begin_inset Quotes eld
23870 \end_inset
23871
23872 7
23873 \backslash
23874 baselineskip
23875 \begin_inset Quotes erd
23876 \end_inset
23877
23878  (where the command 
23879 \series bold
23880
23881 \backslash
23882 baselineskip
23883 \series default
23884  needs to be inserted as TeX code):
23885 \end_layout
23886
23887 \begin_layout Standard
23888 \begin_inset Flex Multiple Columns
23889 status open
23890
23891 \begin_layout Plain Layout
23892 \begin_inset Argument 3
23893 status open
23894
23895 \begin_layout Plain Layout
23896 7
23897 \begin_inset ERT
23898 status collapsed
23899
23900 \begin_layout Plain Layout
23901
23902
23903 \backslash
23904 baselineskip
23905 \end_layout
23906
23907 \end_inset
23908
23909
23910 \end_layout
23911
23912 \end_inset
23913
23914
23915 \size small
23916 On the evening of the crime, he returned from the club exactly at ten.
23917  His mother and sister were out spending the evening with a relation.
23918  The servant deposed that she heard him enter the front room on the second
23919  floor, generally used as his sitting-room.
23920  She had lit a fire there, and as it smoked she had opened the window.
23921  No sound was heard from the room until eleven-twenty, the hour of the return
23922  of Lady Maynooth and her daughter.
23923  Desiring to say good-night, she attempted to enter her son's room.
23924  The door was locked on the inside, and no answer could be got to their
23925  cries and knocking.
23926  Help was obtained, and the door forced.
23927  The unfortunate young man was found lying near the table.
23928  His head had been horribly mutilated by an expanding revolver bullet, but
23929  no weapon of any sort was to be found in the room.
23930 \end_layout
23931
23932 \end_inset
23933
23934
23935 \end_layout
23936
23937 \begin_layout Subsubsection
23938 Surrounding Space
23939 \end_layout
23940
23941 \begin_layout Standard
23942 The amount of space before and after multiple columns can be changed by
23943  changing the length 
23944 \series bold
23945
23946 \backslash
23947 multicolsep
23948 \series default
23949 .
23950  For example the command
23951 \end_layout
23952
23953 \begin_layout Standard
23954
23955 \series bold
23956
23957 \backslash
23958 setlength{
23959 \backslash
23960 multicolsep}{3cm}
23961 \end_layout
23962
23963 \begin_layout Standard
23964 in TeX Code changes its value to 3
23965 \begin_inset space \thinspace{}
23966 \end_inset
23967
23968 cm.
23969  The change must be made before the multiple columns' start.
23970  The predefined value is 13
23971 \begin_inset space \thinspace{}
23972 \end_inset
23973
23974 pt.
23975 \end_layout
23976
23977 \begin_layout Standard
23978 For this example 
23979 \series bold
23980
23981 \backslash
23982 multicolsep
23983 \series default
23984  was set to 2.5
23985 \begin_inset space \thinspace{}
23986 \end_inset
23987
23988 cm:
23989 \end_layout
23990
23991 \begin_layout Standard
23992 \begin_inset ERT
23993 status open
23994
23995 \begin_layout Plain Layout
23996
23997
23998 \backslash
23999 setlength{
24000 \backslash
24001 multicolsep}{2.5cm}
24002 \end_layout
24003
24004 \end_inset
24005
24006
24007 \end_layout
24008
24009 \begin_layout Standard
24010 \begin_inset Flex Multiple Columns
24011 status open
24012
24013 \begin_layout Plain Layout
24014
24015 \size small
24016 All day I turned these facts over in my mind, endeavouring to hit upon some
24017  theory which could reconcile them all, and to find that line of least resistanc
24018 e which my poor friend had declared to be the starting-point of every investigat
24019 ion.
24020  I confess that I made little progress.
24021  In the evening I strolled across the Park, and found myself about six o'clock
24022  at the Oxford Street end of Park Lane.
24023  A group of loafers upon the pavements, all staring up at a particular window,
24024  directed me to the house which I had come to see.
24025  A tall, thin man with coloured glasses, whom I strongly suspected of being
24026  a plain-clothes detective, was pointing out some theory of his own, while
24027  the others crowded round to listen to what he said.
24028  I got as near him as I could, but his observations seemed to me to be absurd,
24029  so I withdrew again in some disgust.
24030  As I did so I struck against an elderly, deformed man, who had been behind
24031  me, and I knocked down several books which he was carrying.
24032 \end_layout
24033
24034 \end_inset
24035
24036
24037 \end_layout
24038
24039 \begin_layout Standard
24040 \begin_inset Note Greyedout
24041 status open
24042
24043 \begin_layout Plain Layout
24044
24045 \series bold
24046 Note:
24047 \series default
24048  The values you set with 
24049 \series bold
24050
24051 \backslash
24052 setlength
24053 \series default
24054  will be used for all following multiple columns until you change them again.
24055 \end_layout
24056
24057 \end_inset
24058
24059
24060 \end_layout
24061
24062 \begin_layout Standard
24063 \begin_inset ERT
24064 status collapsed
24065
24066 \begin_layout Plain Layout
24067
24068
24069 \backslash
24070 setlength{
24071 \backslash
24072 multicolsep}{13pt}
24073 \end_layout
24074
24075 \end_inset
24076
24077
24078 \begin_inset Note Note
24079 status collapsed
24080
24081 \begin_layout Plain Layout
24082 go back to the default
24083 \end_layout
24084
24085 \end_inset
24086
24087
24088 \end_layout
24089
24090 \begin_layout Standard
24091 \begin_inset Newpage newpage
24092 \end_inset
24093
24094
24095 \end_layout
24096
24097 \begin_layout Subsubsection
24098 Column Breaks
24099 \end_layout
24100
24101 \begin_layout Standard
24102 A column break can be forced by inserting the command 
24103 \series bold
24104
24105 \backslash
24106 columnbreak{}
24107 \series default
24108  as TeX-Code to that position in the text where the column should be broken.
24109  Note that this leads in most cases to whitespace in the text.
24110 \begin_inset Newline newline
24111 \end_inset
24112
24113 Here is an example:
24114 \end_layout
24115
24116 \begin_layout Standard
24117 \begin_inset Flex Multiple Columns
24118 status open
24119
24120 \begin_layout Plain Layout
24121
24122 \size small
24123 \begin_inset Quotes eld
24124 \end_inset
24125
24126 You're surprised to see me, sir,
24127 \begin_inset Quotes erd
24128 \end_inset
24129
24130  said he, in a strange, croaking voice.
24131 \end_layout
24132
24133 \begin_layout Plain Layout
24134
24135 \size small
24136 I acknowledged that I was.
24137 \end_layout
24138
24139 \begin_layout Plain Layout
24140
24141 \size small
24142 \begin_inset Quotes eld
24143 \end_inset
24144
24145 Well, I've a conscience, sir, and when I chanced to see you go into this
24146  house, as I came hobbling after you, I thought to myself, I'll just step
24147  in and see that kind gentleman, and tell him that if I was a bit gruff
24148  in my manner there was not any harm meant, and that I am much obliged to
24149  him for picking up my books.
24150 \begin_inset Quotes erd
24151 \end_inset
24152
24153
24154 \end_layout
24155
24156 \begin_layout Plain Layout
24157
24158 \size small
24159 \begin_inset Quotes eld
24160 \end_inset
24161
24162 You make too much of a trifle,
24163 \begin_inset Quotes erd
24164 \end_inset
24165
24166  said I.
24167  
24168 \begin_inset Quotes eld
24169 \end_inset
24170
24171 May I ask how you knew who I was?
24172 \begin_inset Quotes erd
24173 \end_inset
24174
24175  AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED.
24176 \begin_inset ERT
24177 status collapsed
24178
24179 \begin_layout Plain Layout
24180
24181
24182 \backslash
24183 columnbreak{}
24184 \end_layout
24185
24186 \end_inset
24187
24188
24189 \end_layout
24190
24191 \begin_layout Plain Layout
24192
24193 \size small
24194 \begin_inset Quotes eld
24195 \end_inset
24196
24197 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24198  you'll find my little bookshop at the corner of Church Street, and very
24199  happy to see you, I am sure.
24200  Maybe you collect yourself, sir.
24201  Here's 
24202 \noun on
24203 British
24204 \begin_inset space ~
24205 \end_inset
24206
24207 Birds
24208 \noun default
24209 , and 
24210 \noun on
24211 Catullus
24212 \noun default
24213 , and 
24214 \noun on
24215 The Holy War
24216 \noun default
24217 --a bargain, every one of them.
24218  With five volumes you could just fill that gap on that second shelf.
24219  It looks untidy, does it not, sir?
24220 \begin_inset Quotes erd
24221 \end_inset
24222
24223
24224 \end_layout
24225
24226 \end_inset
24227
24228
24229 \end_layout
24230
24231 \begin_layout Subsubsection
24232 Column Separation
24233 \end_layout
24234
24235 \begin_layout Standard
24236 The width of the columns is automatically calculated, but you can modify
24237  the space between the columns.
24238  This is done by changing the length 
24239 \series bold
24240
24241 \backslash
24242 columnsep
24243 \series default
24244 .
24245  Its predefined value is 10
24246 \begin_inset space \thinspace{}
24247 \end_inset
24248
24249 pt.
24250  Here is an example where 
24251 \series bold
24252
24253 \backslash
24254 columnsep
24255 \series default
24256  is set to 3
24257 \begin_inset space \thinspace{}
24258 \end_inset
24259
24260 cm:
24261 \end_layout
24262
24263 \begin_layout Standard
24264 \begin_inset ERT
24265 status open
24266
24267 \begin_layout Plain Layout
24268
24269
24270 \backslash
24271 setlength{
24272 \backslash
24273 columnsep}{3cm}
24274 \end_layout
24275
24276 \end_inset
24277
24278
24279 \end_layout
24280
24281 \begin_layout Standard
24282 \begin_inset Flex Multiple Columns
24283 status open
24284
24285 \begin_layout Plain Layout
24286
24287 \size small
24288 My observations of No.
24289 \begin_inset space \space{}
24290 \end_inset
24291
24292 427 Park Lane did little to clear up the problem in which I was interested.
24293  The house was separated from the street by a low wall and railing, the
24294  whole not more than five feet high.
24295  It was perfectly easy, therefore, for anyone to get into the garden, but
24296  the window was entirely inaccessible, since there was no water pipe or
24297  anything which could help the most active man to climb it.
24298  More puzzled than ever, I retraced my steps to Kensington.
24299  I had not been in my study five minutes when the maid entered to say that
24300  a person desired to see me.
24301  To my astonishment it was none other than my strange old book collector,
24302  his sharp, wizened face peering out from a frame of white hair, and his
24303  precious volumes, a dozen of them at least, wedged under his right arm.
24304 \end_layout
24305
24306 \end_inset
24307
24308
24309 \end_layout
24310
24311 \begin_layout Standard
24312 \begin_inset ERT
24313 status collapsed
24314
24315 \begin_layout Plain Layout
24316
24317
24318 \backslash
24319 setlength{
24320 \backslash
24321 columnsep}{10pt}
24322 \end_layout
24323
24324 \end_inset
24325
24326
24327 \begin_inset Note Note
24328 status collapsed
24329
24330 \begin_layout Plain Layout
24331 go back to the default
24332 \end_layout
24333
24334 \end_inset
24335
24336
24337 \end_layout
24338
24339 \begin_layout Subsubsection
24340 Vertical Lines
24341 \end_layout
24342
24343 \begin_layout Standard
24344 Between the columns a rule with a width of the length 
24345 \series bold
24346
24347 \backslash
24348 columnseprule
24349 \series default
24350  is placed.
24351  If this rule width is set to 0
24352 \begin_inset space \thinspace{}
24353 \end_inset
24354
24355 pt (this is the default), the rule is suppressed.
24356  In the following example the rule is 2
24357 \begin_inset space \thinspace{}
24358 \end_inset
24359
24360 pt wide:
24361 \end_layout
24362
24363 \begin_layout Standard
24364 \begin_inset ERT
24365 status open
24366
24367 \begin_layout Plain Layout
24368
24369
24370 \backslash
24371 setlength{
24372 \backslash
24373 columnseprule}{2pt}
24374 \end_layout
24375
24376 \end_inset
24377
24378
24379 \end_layout
24380
24381 \begin_layout Standard
24382 \begin_inset Flex Multiple Columns
24383 status open
24384
24385 \begin_layout Plain Layout
24386
24387 \size small
24388 \begin_inset Quotes eld
24389 \end_inset
24390
24391 You're surprised to see me, sir,
24392 \begin_inset Quotes erd
24393 \end_inset
24394
24395  said he, in a strange, croaking voice.
24396 \end_layout
24397
24398 \begin_layout Plain Layout
24399
24400 \size small
24401 I acknowledged that I was.
24402 \end_layout
24403
24404 \begin_layout Plain Layout
24405
24406 \size small
24407 \begin_inset Quotes eld
24408 \end_inset
24409
24410 Well, I've a conscience, sir, and when I chanced to see you go into this
24411  house, as I came hobbling after you, I thought to myself, I'll just step
24412  in and see that kind gentleman, and tell him that if I was a bit gruff
24413  in my manner there was not any harm meant, and that I am much obliged to
24414  him for picking up my books.
24415 \begin_inset Quotes erd
24416 \end_inset
24417
24418
24419 \end_layout
24420
24421 \begin_layout Plain Layout
24422
24423 \size small
24424 \begin_inset Quotes eld
24425 \end_inset
24426
24427 You make too much of a trifle,
24428 \begin_inset Quotes erd
24429 \end_inset
24430
24431  said I.
24432  
24433 \begin_inset Quotes eld
24434 \end_inset
24435
24436 May I ask how you knew who I was?
24437 \begin_inset Quotes erd
24438 \end_inset
24439
24440
24441 \end_layout
24442
24443 \begin_layout Plain Layout
24444
24445 \size small
24446 \begin_inset Quotes eld
24447 \end_inset
24448
24449 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24450  you'll find my little bookshop at the corner of Church Street, and very
24451  happy to see you, I am sure.
24452  Maybe you collect yourself, sir.
24453  Here's 
24454 \noun on
24455 British
24456 \begin_inset space ~
24457 \end_inset
24458
24459 Birds
24460 \noun default
24461 , and 
24462 \noun on
24463 Catullus
24464 \noun default
24465 , and 
24466 \noun on
24467 The Holy War
24468 \noun default
24469 --a bargain, every one of them.
24470  With five volumes you could just fill that gap on that second shelf.
24471  It looks untidy, does it not, sir?
24472 \begin_inset Quotes erd
24473 \end_inset
24474
24475
24476 \end_layout
24477
24478 \end_inset
24479
24480
24481 \end_layout
24482
24483 \begin_layout Standard
24484 \begin_inset VSpace defskip
24485 \end_inset
24486
24487
24488 \end_layout
24489
24490 \begin_layout Standard
24491 The rule can be colored by redefining the command 
24492 \series bold
24493
24494 \backslash
24495 columnseprulecolor
24496 \series default
24497 .
24498  This is done by inserting the command
24499 \begin_inset Newline newline
24500 \end_inset
24501
24502
24503 \series bold
24504
24505 \backslash
24506 renewcommand{
24507 \backslash
24508 columnseprulecolor}{
24509 \backslash
24510 color{red}}
24511 \series default
24512
24513 \begin_inset Newline newline
24514 \end_inset
24515
24516 as TeX-Code before the multicolumn inset.
24517  Replace 
24518 \series bold
24519 red
24520 \series default
24521  in this command by a color of your choice.
24522  You can use all pre- and self-defined colors.
24523  See the 
24524 \emph on
24525 EmbeddedObjects
24526 \emph default
24527  manual, section 
24528 \emph on
24529 Colored
24530 \begin_inset space ~
24531 \end_inset
24532
24533 Tables
24534 \emph default
24535  for more information about pre- and self-defined colors.
24536  To go back to the default color insert the command
24537 \begin_inset Newline newline
24538 \end_inset
24539
24540
24541 \series bold
24542
24543 \backslash
24544 renewcommand{
24545 \backslash
24546 columnseprulecolor}{
24547 \backslash
24548 normalcolor}
24549 \series default
24550
24551 \begin_inset Newline newline
24552 \end_inset
24553
24554 Here is the example with a cyan rule and 1
24555 \begin_inset space \thinspace{}
24556 \end_inset
24557
24558 cm column separation:
24559 \end_layout
24560
24561 \begin_layout Standard
24562 \begin_inset ERT
24563 status open
24564
24565 \begin_layout Plain Layout
24566
24567
24568 \backslash
24569 setlength{
24570 \backslash
24571 columnsep}{1cm}
24572 \end_layout
24573
24574 \begin_layout Plain Layout
24575
24576
24577 \backslash
24578 renewcommand{
24579 \backslash
24580 columnseprulecolor}{
24581 \backslash
24582 color{cyan}}
24583 \end_layout
24584
24585 \end_inset
24586
24587
24588 \end_layout
24589
24590 \begin_layout Standard
24591 \begin_inset Flex Multiple Columns
24592 status open
24593
24594 \begin_layout Plain Layout
24595
24596 \size small
24597 \begin_inset Quotes eld
24598 \end_inset
24599
24600 You're surprised to see me, sir,
24601 \begin_inset Quotes erd
24602 \end_inset
24603
24604  said he, in a strange, croaking voice.
24605 \end_layout
24606
24607 \begin_layout Plain Layout
24608
24609 \size small
24610 I acknowledged that I was.
24611 \end_layout
24612
24613 \begin_layout Plain Layout
24614
24615 \size small
24616 \begin_inset Quotes eld
24617 \end_inset
24618
24619 Well, I've a conscience, sir, and when I chanced to see you go into this
24620  house, as I came hobbling after you, I thought to myself, I'll just step
24621  in and see that kind gentleman, and tell him that if I was a bit gruff
24622  in my manner there was not any harm meant, and that I am much obliged to
24623  him for picking up my books.
24624 \begin_inset Quotes erd
24625 \end_inset
24626
24627
24628 \end_layout
24629
24630 \begin_layout Plain Layout
24631
24632 \size small
24633 \begin_inset Quotes eld
24634 \end_inset
24635
24636 You make too much of a trifle,
24637 \begin_inset Quotes erd
24638 \end_inset
24639
24640  said I.
24641  
24642 \begin_inset Quotes eld
24643 \end_inset
24644
24645 May I ask how you knew who I was?
24646 \begin_inset Quotes erd
24647 \end_inset
24648
24649
24650 \end_layout
24651
24652 \begin_layout Plain Layout
24653
24654 \size small
24655 \begin_inset Quotes eld
24656 \end_inset
24657
24658 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24659  you'll find my little bookshop at the corner of Church Street, and very
24660  happy to see you, I am sure.
24661  Maybe you collect yourself, sir.
24662  Here's 
24663 \noun on
24664 British
24665 \begin_inset space ~
24666 \end_inset
24667
24668 Birds
24669 \noun default
24670 , and 
24671 \noun on
24672 Catullus
24673 \noun default
24674 , and 
24675 \noun on
24676 The Holy War
24677 \noun default
24678 --a bargain, every one of them.
24679  With five volumes you could just fill that gap on that second shelf.
24680  It looks untidy, does it not, sir?
24681 \begin_inset Quotes erd
24682 \end_inset
24683
24684
24685 \end_layout
24686
24687 \end_inset
24688
24689
24690 \end_layout
24691
24692 \begin_layout Standard
24693 \begin_inset ERT
24694 status collapsed
24695
24696 \begin_layout Plain Layout
24697
24698
24699 \backslash
24700 setlength{
24701 \backslash
24702 columnseprule}{0pt}
24703 \end_layout
24704
24705 \begin_layout Plain Layout
24706
24707
24708 \backslash
24709 renewcommand{
24710 \backslash
24711 columnseprulecolor}{
24712 \backslash
24713 normalcolor}
24714 \end_layout
24715
24716 \end_inset
24717
24718
24719 \begin_inset Note Note
24720 status collapsed
24721
24722 \begin_layout Plain Layout
24723 go back to the default
24724 \end_layout
24725
24726 \end_inset
24727
24728
24729 \end_layout
24730
24731 \begin_layout Section
24732 Non-standard Paragraph Shapes
24733 \end_layout
24734
24735 \begin_layout Standard
24736 \noindent
24737 LaTeX as well as any other text processor uses by default rectangular paragraphs.
24738  For special cases like for example posters, invitation cards or poems you
24739  can modify the paragraph shape to one of your choice.
24740  This can be done by using the LaTeX-package 
24741 \series bold
24742 shapepar
24743 \series default
24744  which is loaded by using in the document settings the module 
24745 \family sans
24746 Custom paragraph shapes
24747 \family default
24748 .
24749 \end_layout
24750
24751 \begin_layout Subsection
24752 Predefined shapes
24753 \end_layout
24754
24755 \begin_layout Standard
24756
24757 \series bold
24758 shapepar
24759 \series default
24760  provides the following shapes:
24761 \end_layout
24762
24763 \begin_layout Standard
24764 \begin_inset Tabular
24765 <lyxtabular version="3" rows="13" columns="3">
24766 <features rotate="0" booktabs="true" islongtable="true" longtabularalignment="center">
24767 <column alignment="center" valignment="middle" width="16col%">
24768 <column alignment="center" valignment="middle" width="40col%">
24769 <column alignment="center" valignment="middle" width="35col%">
24770 <row endhead="true">
24771 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24772 \begin_inset Text
24773
24774 \begin_layout Plain Layout
24775 Name
24776 \end_layout
24777
24778 \end_inset
24779 </cell>
24780 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24781 \begin_inset Text
24782
24783 \begin_layout Plain Layout
24784 Description
24785 \end_layout
24786
24787 \end_inset
24788 </cell>
24789 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
24790 \begin_inset Text
24791
24792 \begin_layout Plain Layout
24793 Annotation
24794 \end_layout
24795
24796 \end_inset
24797 </cell>
24798 </row>
24799 <row>
24800 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24801 \begin_inset Text
24802
24803 \begin_layout Plain Layout
24804 CDlabel
24805 \end_layout
24806
24807 \end_inset
24808 </cell>
24809 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24810 \begin_inset Text
24811
24812 \begin_layout Plain Layout
24813 Circle with circular hole (in the size of a CD/DVD)
24814 \end_layout
24815
24816 \end_inset
24817 </cell>
24818 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24819 \begin_inset Text
24820
24821 \begin_layout Plain Layout
24822 Cannot be scaled, take care there is not too much text
24823 \end_layout
24824
24825 \end_inset
24826 </cell>
24827 </row>
24828 <row>
24829 <cell alignment="center" valignment="top" topline="true" usebox="none">
24830 \begin_inset Text
24831
24832 \begin_layout Plain Layout
24833 Circle
24834 \end_layout
24835
24836 \end_inset
24837 </cell>
24838 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24839 \begin_inset Text
24840
24841 \begin_layout Plain Layout
24842 Circle
24843 \end_layout
24844
24845 \end_inset
24846 </cell>
24847 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24848 \begin_inset Text
24849
24850 \begin_layout Plain Layout
24851 Fragile, calculation might fail
24852 \end_layout
24853
24854 \end_inset
24855 </cell>
24856 </row>
24857 <row>
24858 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24859 \begin_inset Text
24860
24861 \begin_layout Plain Layout
24862 Diamond
24863 \end_layout
24864
24865 \end_inset
24866 </cell>
24867 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24868 \begin_inset Text
24869
24870 \begin_layout Plain Layout
24871 Rhomboid (symbolizing a 
24872 \begin_inset Quotes eld
24873 \end_inset
24874
24875 diamond
24876 \begin_inset Quotes erd
24877 \end_inset
24878
24879 )
24880 \end_layout
24881
24882 \end_inset
24883 </cell>
24884 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24885 \begin_inset Text
24886
24887 \begin_layout Plain Layout
24888 -
24889 \end_layout
24890
24891 \end_inset
24892 </cell>
24893 </row>
24894 <row>
24895 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24896 \begin_inset Text
24897
24898 \begin_layout Plain Layout
24899 Heart
24900 \end_layout
24901
24902 \end_inset
24903 </cell>
24904 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24905 \begin_inset Text
24906
24907 \begin_layout Plain Layout
24908 Heart-like shape
24909 \end_layout
24910
24911 \end_inset
24912 </cell>
24913 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24914 \begin_inset Text
24915
24916 \begin_layout Plain Layout
24917 -
24918 \end_layout
24919
24920 \end_inset
24921 </cell>
24922 </row>
24923 <row>
24924 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24925 \begin_inset Text
24926
24927 \begin_layout Plain Layout
24928 Hexagon
24929 \end_layout
24930
24931 \end_inset
24932 </cell>
24933 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24934 \begin_inset Text
24935
24936 \begin_layout Plain Layout
24937 Hexagon
24938 \end_layout
24939
24940 \end_inset
24941 </cell>
24942 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24943 \begin_inset Text
24944
24945 \begin_layout Plain Layout
24946 -
24947 \end_layout
24948
24949 \end_inset
24950 </cell>
24951 </row>
24952 <row>
24953 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24954 \begin_inset Text
24955
24956 \begin_layout Plain Layout
24957 Nut
24958 \end_layout
24959
24960 \end_inset
24961 </cell>
24962 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24963 \begin_inset Text
24964
24965 \begin_layout Plain Layout
24966 Nut for bolt (hexagon with circular hole)
24967 \end_layout
24968
24969 \end_inset
24970 </cell>
24971 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24972 \begin_inset Text
24973
24974 \begin_layout Plain Layout
24975 -
24976 \end_layout
24977
24978 \end_inset
24979 </cell>
24980 </row>
24981 <row>
24982 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24983 \begin_inset Text
24984
24985 \begin_layout Plain Layout
24986 Square
24987 \end_layout
24988
24989 \end_inset
24990 </cell>
24991 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24992 \begin_inset Text
24993
24994 \begin_layout Plain Layout
24995 Square
24996 \end_layout
24997
24998 \end_inset
24999 </cell>
25000 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25001 \begin_inset Text
25002
25003 \begin_layout Plain Layout
25004 -
25005 \end_layout
25006
25007 \end_inset
25008 </cell>
25009 </row>
25010 <row>
25011 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25012 \begin_inset Text
25013
25014 \begin_layout Plain Layout
25015 Star
25016 \end_layout
25017
25018 \end_inset
25019 </cell>
25020 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25021 \begin_inset Text
25022
25023 \begin_layout Plain Layout
25024 Five-point star
25025 \end_layout
25026
25027 \end_inset
25028 </cell>
25029 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
25030 \begin_inset Text
25031
25032 \begin_layout Plain Layout
25033 -
25034 \end_layout
25035
25036 \end_inset
25037 </cell>
25038 </row>
25039 <row>
25040 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25041 \begin_inset Text
25042
25043 \begin_layout Plain Layout
25044 Candle
25045 \end_layout
25046
25047 \end_inset
25048 </cell>
25049 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25050 \begin_inset Text
25051
25052 \begin_layout Plain Layout
25053 Burning candle
25054 \end_layout
25055
25056 \end_inset
25057 </cell>
25058 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25059 \begin_inset Text
25060
25061 \begin_layout Plain Layout
25062 -
25063 \end_layout
25064
25065 \end_inset
25066 </cell>
25067 </row>
25068 <row>
25069 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25070 \begin_inset Text
25071
25072 \begin_layout Plain Layout
25073 Drop down/up
25074 \end_layout
25075
25076 \end_inset
25077 </cell>
25078 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25079 \begin_inset Text
25080
25081 \begin_layout Plain Layout
25082 Normal/reversed rain drop
25083 \end_layout
25084
25085 \end_inset
25086 </cell>
25087 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25088 \begin_inset Text
25089
25090 \begin_layout Plain Layout
25091 Fragile, calculation might fail
25092 \end_layout
25093
25094 \end_inset
25095 </cell>
25096 </row>
25097 <row>
25098 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25099 \begin_inset Text
25100
25101 \begin_layout Plain Layout
25102 TeX
25103 \end_layout
25104
25105 \end_inset
25106 </cell>
25107 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25108 \begin_inset Text
25109
25110 \begin_layout Plain Layout
25111 The TeX logo
25112 \end_layout
25113
25114 \end_inset
25115 </cell>
25116 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25117 \begin_inset Text
25118
25119 \begin_layout Plain Layout
25120 -
25121 \end_layout
25122
25123 \end_inset
25124 </cell>
25125 </row>
25126 <row>
25127 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25128 \begin_inset Text
25129
25130 \begin_layout Plain Layout
25131 Triangle up/down/
25132 \begin_inset Newline newline
25133 \end_inset
25134
25135 left/right
25136 \end_layout
25137
25138 \end_inset
25139 </cell>
25140 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25141 \begin_inset Text
25142
25143 \begin_layout Plain Layout
25144 Triangles in different orientations
25145 \end_layout
25146
25147 \end_inset
25148 </cell>
25149 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
25150 \begin_inset Text
25151
25152 \begin_layout Plain Layout
25153 -
25154 \end_layout
25155
25156 \end_inset
25157 </cell>
25158 </row>
25159 </lyxtabular>
25160
25161 \end_inset
25162
25163
25164 \end_layout
25165
25166 \begin_layout Standard
25167 To use a shape for your paragraph, simply select it in LyX's pull-down box
25168  for environments in the toolbar.
25169 \end_layout
25170
25171 \begin_layout Standard
25172 \begin_inset Newpage newpage
25173 \end_inset
25174
25175
25176 \end_layout
25177
25178 \begin_layout Standard
25179 Here is an example paragraph in the shape of a nut:
25180 \end_layout
25181
25182 \begin_layout Standard
25183 \begin_inset VSpace bigskip
25184 \end_inset
25185
25186
25187 \end_layout
25188
25189 \begin_layout Nut
25190
25191 \lang latin
25192 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25193  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25194  voluptua.
25195  At vero eos et accusam et justo duo dolores et ea rebum.
25196  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25197  sit amet.
25198  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25199  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25200  voluptua.
25201 \end_layout
25202
25203 \begin_layout Standard
25204 \begin_inset VSpace bigskip
25205 \end_inset
25206
25207
25208 \end_layout
25209
25210 \begin_layout Standard
25211 \begin_inset Note Greyedout
25212 status open
25213
25214 \begin_layout Plain Layout
25215
25216 \series bold
25217 Note
25218 \series default
25219 : shapepar paragraphs cannot run over a page break.
25220 \end_layout
25221
25222 \end_inset
25223
25224
25225 \end_layout
25226
25227 \begin_layout Standard
25228 \begin_inset VSpace bigskip
25229 \end_inset
25230
25231
25232 \end_layout
25233
25234 \begin_layout Standard
25235
25236 \series bold
25237 shapepar
25238 \series default
25239  takes care that the shape will always be preserved, no matter how much
25240  text is in the paragraph.
25241  Therefore the paragraph size changes with the amount of contained text.
25242  This can lead to paragraph sizes exceeding the page margins.
25243  To demonstrate the size scaling, here is the same example paragraph but
25244  with twice as much text:
25245 \end_layout
25246
25247 \begin_layout Standard
25248 \begin_inset Newpage newpage
25249 \end_inset
25250
25251
25252 \end_layout
25253
25254 \begin_layout Nut
25255
25256 \lang latin
25257 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25258  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25259  voluptua.
25260  At vero eos et accusam et justo duo dolores et ea rebum.
25261  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25262  sit amet.
25263  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25264  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25265  voluptua.
25266  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25267  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25268  voluptua.
25269  At vero eos et accusam et justo duo dolores et ea rebum.
25270  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25271  sit amet.
25272  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25273  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25274  voluptua.
25275 \end_layout
25276
25277 \begin_layout Standard
25278 \begin_inset VSpace bigskip
25279 \end_inset
25280
25281
25282 \end_layout
25283
25284 \begin_layout Standard
25285 An exception is the shape 
25286 \family sans
25287 CDlabel
25288 \family default
25289 .
25290  It cannot be scaled because it must fit the size of a CD/DVD.
25291  Therefore the amount of text that fits into the shape is limited.
25292 \begin_inset Newline newline
25293 \end_inset
25294
25295 The 
25296 \family sans
25297 drop
25298 \family default
25299  shapes and the 
25300 \family sans
25301 circle
25302 \family default
25303  shape are fragile, meaning that the calculation of their size can fail,
25304  depending on the amount of text.
25305  You will then get the LaTeX error 
25306 \begin_inset Quotes eld
25307 \end_inset
25308
25309 Arithmetic overflow
25310 \begin_inset Quotes erd
25311 \end_inset
25312
25313 .
25314  In this case one can try to remove or add some text; if nothing works one
25315  has to use another shape.
25316 \end_layout
25317
25318 \begin_layout Standard
25319 \begin_inset VSpace bigskip
25320 \end_inset
25321
25322
25323 \end_layout
25324
25325 \begin_layout Standard
25326 For shapes with tips you will maybe see that LaTeX's hyphenation routine
25327  fails for text in the tips.
25328  Therefore it is often necessary to add hyphenation points 
25329 \family sans
25330 (
25331 \begin_inset Info
25332 type  "shortcut"
25333 arg   "specialchar-insert hyphenation"
25334 \end_inset
25335
25336
25337 \family default
25338 ) to the corresponding text parts.
25339 \end_layout
25340
25341 \begin_layout Standard
25342 \begin_inset VSpace bigskip
25343 \end_inset
25344
25345
25346 \end_layout
25347
25348 \begin_layout Standard
25349 Shapepar paragraphs are either always centered or placed on the page so
25350  that their left border touches the left page margin.
25351  You can therefore not use the paragraph dialog to align such paragraphs.
25352  A solution is to put the paragraph into a minipage or parbox and align
25353  the box.
25354  The problem is hereby to find the right width for the box.
25355  Because if it is too wide and you center the box, the paragraph is not
25356  centered too because it sticks at the left side of the box.
25357  So you might have to play a bit with the width until it fits.
25358  Here are two heart-shaped paragraphs, the first one is not aligned, the
25359  second one is right-aligned:
25360 \end_layout
25361
25362 \begin_layout Standard
25363 \begin_inset Newpage newpage
25364 \end_inset
25365
25366
25367 \end_layout
25368
25369 \begin_layout Heart
25370 \noindent
25371
25372 \lang latin
25373 Lo\SpecialChar \-
25374 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25375  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25376  voluptua.
25377  At vero eos et accusam et justo duo dolores et ea rebum.
25378  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25379  sit amet.
25380 \end_layout
25381
25382 \begin_layout Standard
25383 \begin_inset VSpace bigskip
25384 \end_inset
25385
25386
25387 \end_layout
25388
25389 \begin_layout Standard
25390 \noindent
25391 \align right
25392 \begin_inset Box Frameless
25393 position "t"
25394 hor_pos "c"
25395 has_inner_box 1
25396 inner_pos "t"
25397 use_parbox 1
25398 use_makebox 0
25399 width "42col%"
25400 special "none"
25401 height "1in"
25402 height_special "totalheight"
25403 status open
25404
25405 \begin_layout Heart
25406 \noindent
25407
25408 \lang latin
25409 Lo\SpecialChar \-
25410 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25411  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25412  voluptua.
25413  At vero eos et accusam et justo duo dolores et ea rebum.
25414  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25415  sit amet.
25416 \end_layout
25417
25418 \end_inset
25419
25420
25421 \end_layout
25422
25423 \begin_layout Subsection
25424 Custom shapes
25425 \end_layout
25426
25427 \begin_layout Standard
25428 You can define any shape you want.
25429  Doing this manually is a lot of work because every coordinate must be specified.
25430  But there is a way to let the computer calculate the coordinates:
25431 \end_layout
25432
25433 \begin_layout Enumerate
25434 Install the program 
25435 \begin_inset CommandInset href
25436 LatexCommand href
25437 name "Jpgfdraw"
25438 target "http://www.ctan.org/tex-archive/graphics/jpgfdraw"
25439
25440 \end_inset
25441
25442 .
25443 \end_layout
25444
25445 \begin_layout Enumerate
25446 In 
25447 \family sans
25448 Jpgfdraw
25449 \family default
25450  go to the menu 
25451 \family sans
25452 Te
25453 \begin_inset ERT
25454 status collapsed
25455
25456 \begin_layout Plain Layout
25457
25458 {}
25459 \end_layout
25460
25461 \end_inset
25462
25463 X/LaT
25464 \begin_inset ERT
25465 status collapsed
25466
25467 \begin_layout Plain Layout
25468
25469 {}
25470 \end_layout
25471
25472 \end_inset
25473
25474 eX\SpecialChar \menuseparator
25475 Settings\SpecialChar \menuseparator
25476 Set Normal Size
25477 \family default
25478  and select the font size you are using in your document.
25479  For example this document uses the size 12
25480 \begin_inset space \thinspace{}
25481 \end_inset
25482
25483 pt.
25484 \end_layout
25485
25486 \begin_layout Enumerate
25487 Draw a shape.
25488 \end_layout
25489
25490 \begin_layout Enumerate
25491 Use the menu 
25492 \family sans
25493 Te
25494 \begin_inset ERT
25495 status collapsed
25496
25497 \begin_layout Plain Layout
25498
25499 {}
25500 \end_layout
25501
25502 \end_inset
25503
25504 X/LaT
25505 \begin_inset ERT
25506 status collapsed
25507
25508 \begin_layout Plain Layout
25509
25510 {}
25511 \end_layout
25512
25513 \end_inset
25514
25515 eX\SpecialChar \menuseparator
25516 Shapepar
25517 \family default
25518  to export the shape to coordinates.
25519  In the appearing dialog use either the outline of your shape for the coordinate
25520 s or the path itself.
25521 \begin_inset Foot
25522 status collapsed
25523
25524 \begin_layout Plain Layout
25525 For more information see 
25526 \begin_inset CommandInset href
25527 LatexCommand href
25528 target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html"
25529
25530 \end_inset
25531
25532
25533 \end_layout
25534
25535 \end_inset
25536
25537
25538 \end_layout
25539
25540 \begin_layout Standard
25541 The coordinates are written into a TeX-file.
25542  To use it for your LyX document
25543 \end_layout
25544
25545 \begin_layout Enumerate
25546 Place the cursor before the first character of your paragraph (or into a
25547  new empty one).
25548 \end_layout
25549
25550 \begin_layout Enumerate
25551 Open in LyX the menu 
25552 \family sans
25553 Insert\SpecialChar \menuseparator
25554 File\SpecialChar \menuseparator
25555 Child
25556 \begin_inset space ~
25557 \end_inset
25558
25559 Document
25560 \family default
25561 , select the file and use 
25562 \family sans
25563 Input
25564 \family default
25565  as 
25566 \family sans
25567 Include Type.
25568 \end_layout
25569
25570 \begin_layout Standard
25571 \begin_inset VSpace defskip
25572 \end_inset
25573
25574
25575 \end_layout
25576
25577 \begin_layout Standard
25578 \begin_inset Note Greyedout
25579 status open
25580
25581 \begin_layout Plain Layout
25582
25583 \series bold
25584 Note
25585 \series default
25586 : The changed shape only applies to the current paragraph; everything is
25587  reset to normal for the next paragraph.
25588  Therefore the shape definition file must be input into every paragraph
25589  with the desired shape.
25590 \end_layout
25591
25592 \end_inset
25593
25594
25595 \end_layout
25596
25597 \begin_layout Standard
25598 \begin_inset VSpace bigskip
25599 \end_inset
25600
25601
25602 \end_layout
25603
25604 \begin_layout Standard
25605 Here is an example:
25606 \end_layout
25607
25608 \begin_layout Standard
25609 \begin_inset VSpace bigskip
25610 \end_inset
25611
25612
25613 \end_layout
25614
25615 \begin_layout Standard
25616 \begin_inset CommandInset include
25617 LatexCommand input
25618 filename "SpecialParagraphShape.tex"
25619
25620 \end_inset
25621
25622
25623 \lang latin
25624 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25625  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25626  voluptua.
25627  At vero eos et accusam et justo duo dolores et ea rebum.
25628  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25629  sit amet.
25630  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25631  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25632  voluptua.
25633 \end_layout
25634
25635 \begin_layout Standard
25636 \begin_inset VSpace bigskip
25637 \end_inset
25638
25639
25640 \end_layout
25641
25642 \begin_layout Standard
25643
25644 \series bold
25645 A tip:
25646 \series default
25647  to draw complexer shapes in 
25648 \family sans
25649 Jpgfdraw
25650 \family default
25651  you can draw the shape in a program of your choice and import the resulting
25652  image to 
25653 \family sans
25654 Jpgfdraw
25655 \family default
25656 .
25657  Then you only need to draw a line or spline along the outline of the image.
25658 \end_layout
25659
25660 \begin_layout Standard
25661 \begin_inset VSpace bigskip
25662 \end_inset
25663
25664
25665 \end_layout
25666
25667 \begin_layout Standard
25668 The module 
25669 \family sans
25670 Custom paragraph shapes
25671 \family default
25672  also provides the two commands 
25673 \family sans
25674 shapepar
25675 \family default
25676  and 
25677 \family sans
25678 Shapepar
25679 \family default
25680  which can be used to define custom shapes coordinate by coordinate.
25681 \begin_inset Foot
25682 status collapsed
25683
25684 \begin_layout Plain Layout
25685 These commands are internally used for all shapes described here.
25686 \end_layout
25687
25688 \end_inset
25689
25690  For information how these styles are used and about further customization
25691  possibilities, have a look at the documentation of the package 
25692 \series bold
25693 shapepar
25694 \series default
25695
25696 \begin_inset CommandInset citation
25697 LatexCommand cite
25698 key "shapepar"
25699
25700 \end_inset
25701
25702 .
25703 \end_layout
25704
25705 \begin_layout Bibliography
25706 \begin_inset CommandInset bibitem
25707 LatexCommand bibitem
25708 key "multicol"
25709
25710 \end_inset
25711
25712 Documentation of the LaTeX-package 
25713 \begin_inset CommandInset href
25714 LatexCommand href
25715 name "multicol"
25716 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
25717
25718 \end_inset
25719
25720
25721 \end_layout
25722
25723 \begin_layout Bibliography
25724 \begin_inset CommandInset bibitem
25725 LatexCommand bibitem
25726 key "shapepar"
25727
25728 \end_inset
25729
25730 Documentation of the LaTeX-package 
25731 \begin_inset CommandInset href
25732 LatexCommand href
25733 name "shapepar"
25734 target "http://mirrors.ctan.org/macros/latex/contrib/shapepar/shapepar.pdf"
25735
25736 \end_inset
25737
25738
25739 \end_layout
25740
25741 \end_body
25742 \end_document