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