]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
* Additional.lyx - fix lyxeditor.sh example.
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 474
3 \begin_document
4 \begin_header
5 \textclass scrbook
6 \begin_preamble
7 % DO NOT ALTER THIS PREAMBLE!!!
8 %
9 % This preamble is designed to ensure that the manual prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the manual may not print out as expected.  If you
12 % have problems LaTeXing this file, please contact 
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
15
16 % if pdflatex is used
17 \usepackage{ifpdf}
18 \ifpdf
19
20  % set fonts for nicer pdf view
21  \IfFileExists{lmodern.sty}
22   {\usepackage{lmodern}}{}
23
24 \fi % end if pdflatex is used
25
26 % the pages of the TOC are numbered roman
27 % and a PDF-bookmark for the TOC is added
28 \pagenumbering{roman}
29 \let\myTOC\tableofcontents
30 \renewcommand{\tableofcontents}{%
31  \pdfbookmark[1]{\contentsname}{}
32  \myTOC
33  \cleardoublepage
34  \pagenumbering{arabic}}
35
36 % extra space for tables
37 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
38 \end_preamble
39 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
40 \use_default_options false
41 \begin_modules
42 logicalmkup
43 theorems-ams
44 theorems-ams-extended
45 multicol
46 shapepar
47 \end_modules
48 \maintain_unincluded_children false
49 \begin_local_layout
50 Format 7
51 InsetLayout CharStyle:MenuItem
52 LyxType               charstyle
53 LabelString           menu
54 LatexType             command
55 LatexName             menuitem
56 Font
57 Family              Sans
58 EndFont
59 Preamble
60 \newcommand*{\menuitem}[1]{{\sffamily #1}}
61 EndPreamble
62 End
63 \end_local_layout
64 \language english
65 \language_package default
66 \inputencoding auto
67 \fontencoding global
68 \font_roman default
69 \font_sans default
70 \font_typewriter default
71 \font_math auto
72 \font_default_family default
73 \use_non_tex_fonts false
74 \font_sc false
75 \font_osf false
76 \font_sf_scale 100
77 \font_tt_scale 100
78 \graphics default
79 \default_output_format default
80 \output_sync 0
81 \bibtex_command default
82 \index_command default
83 \paperfontsize 12
84 \spacing single
85 \use_hyperref true
86 \pdf_title "LyX's Additional Features manual"
87 \pdf_author "LyX Team"
88 \pdf_subject "LyX's additional features documentation"
89 \pdf_keywords "LyX, Documentation, Additional"
90 \pdf_bookmarks true
91 \pdf_bookmarksnumbered true
92 \pdf_bookmarksopen false
93 \pdf_bookmarksopenlevel 1
94 \pdf_breaklinks false
95 \pdf_pdfborder false
96 \pdf_colorlinks true
97 \pdf_backref false
98 \pdf_pdfusetitle false
99 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
100 \papersize a4paper
101 \use_geometry false
102 \use_package amsmath 1
103 \use_package amssymb 1
104 \use_package cancel 0
105 \use_package esint 0
106 \use_package mathdots 1
107 \use_package mathtools 0
108 \use_package mhchem 1
109 \use_package stackrel 0
110 \use_package stmaryrd 0
111 \use_package undertilde 0
112 \cite_engine basic
113 \cite_engine_type default
114 \biblio_style plain
115 \use_bibtopic false
116 \use_indices false
117 \paperorientation portrait
118 \suppress_date false
119 \justification true
120 \use_refstyle 0
121 \notefontcolor #0000ff
122 \index Index
123 \shortcut idx
124 \color #008000
125 \end_index
126 \secnumdepth 3
127 \tocdepth 3
128 \paragraph_separation indent
129 \paragraph_indentation default
130 \quotes_language english
131 \papercolumns 1
132 \papersides 2
133 \paperpagestyle headings
134 \tracking_changes false
135 \output_changes false
136 \html_math_output 0
137 \html_css_as_file 0
138 \html_be_strict true
139 \end_header
140
141 \begin_body
142
143 \begin_layout Title
144 Additional LyX Features
145 \end_layout
146
147 \begin_layout Subtitle
148 Version 2.1.x
149 \end_layout
150
151 \begin_layout Author
152 by the LyX Team
153 \begin_inset Foot
154 status collapsed
155
156 \begin_layout Plain Layout
157 \noindent
158 Principal maintainer of this file is
159 \noun on
160  Richard Heck
161 \noun default
162 .
163  If you have comments or error corrections, please send them to the LyX
164  Documentation mailing list, 
165 \begin_inset Flex Code
166 status collapsed
167
168 \begin_layout Plain Layout
169 \noindent
170 <lyx-docs@lists.lyx.org>
171 \end_layout
172
173 \end_inset
174
175 .
176 \end_layout
177
178 \end_inset
179
180
181 \end_layout
182
183 \begin_layout Standard
184 \begin_inset CommandInset toc
185 LatexCommand tableofcontents
186
187 \end_inset
188
189
190 \end_layout
191
192 \begin_layout Chapter
193 Introduction
194 \end_layout
195
196 \begin_layout Standard
197 This manual is essentially Part II of the 
198 \emph on
199 User's Guide\SpecialChar \@.
200
201 \emph default
202  The reason for separating the two documents is simple: the 
203 \emph on
204 User's Guide
205 \emph default
206  is already quite lengthy, and it contains information on all of the basic
207  features one needs to know in order to prepare most documents.
208  However, the LyX Team has worked to make LyX extensible through various
209  configuration files and external packages.
210  That means that if you want to support the Fizzwizzle LaTeX package, you
211  can create a layout file (or module) for it without having to alter LyX
212  itself.
213  We've already had contributions of several new features this way, and some
214  of them are documented here.
215  There are also some more `advanced' features, such as how to control the
216  presentation of bibliographies and how to work with multi-part documents,
217  that are not covered in the 
218 \emph on
219 User's Guide
220 \emph default
221  and are discussed here.
222 \end_layout
223
224 \begin_layout Standard
225 This manual also documents some special features, like fax support, version
226  control, and SGML support, which require additional software to work properly.
227  There is also a chapter on LyX's support for HTML.
228  And lastly, there's a chapter of LaTeX tools and tips, things you can use
229  to spruce up your documents by directly using the powerful features of
230  LaTeX.
231  After all, LyX 
232 \emph on
233 is
234 \emph default
235  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
236 \end_layout
237
238 \begin_layout Standard
239 If you haven't read the 
240 \emph on
241 Introduction
242 \emph default
243  yet, you are definitely in the wrong manual.
244  The 
245 \emph on
246 Introduction
247 \emph default
248  is the first place to go, since it describes the notation and format of
249  all of the manuals.
250  You should also be thoroughly familiar with the 
251 \emph on
252 User's Guide
253 \emph default
254  and all of the basic features of LyX before attempting to read this one.
255 \end_layout
256
257 \begin_layout Standard
258 Since many of the topics in this manual depend heavily on LyX's interaction
259  with LaTeX, this first chapter covers the inner workings of LyX and how
260  to direct LyX to generate exactly the LaTeX code you want.
261  It is obviously for more seasoned LyX users.
262 \end_layout
263
264 \begin_layout Chapter
265 LyX and LaTeX
266 \end_layout
267
268 \begin_layout Section
269 How LyX Uses LaTeX
270 \end_layout
271
272 \begin_layout Standard
273 This chapter is for both TeX-nicians and the LaTeX-curious.
274  In it, we'll explain how LyX and LaTeX work together to produce printable
275  output.
276  This is the only place in any of the manuals where we assume you know something
277  about LaTeX.
278 \end_layout
279
280 \begin_layout Standard
281 At one time, LyX was called a 
282 \begin_inset Quotes eld
283 \end_inset
284
285 WYSIWYM frontend to LaTeX,
286 \begin_inset Quotes erd
287 \end_inset
288
289  but that's no longer true.
290  There are frontends to LaTeX out there.
291 \begin_inset Foot
292 status collapsed
293
294 \begin_layout Plain Layout
295 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
296  There are also the LaTeX modes for vi and emacs, of course.
297 \end_layout
298
299 \end_inset
300
301  These are basically text editors with the ability to run LaTeX and mark
302  any errors in the file you're editing.
303  Although LyX 
304 \emph on
305 is
306 \emph default
307  an editor, and it 
308 \emph on
309 does
310 \emph default
311  run LaTeX, and it also indicates errors in the file, it also does much,
312  much more.
313  For one thing, you don't need to know LaTeX to use LyX effectively.
314  And LyX has added its own extensions to LaTeX.
315  Try the following sometime: select 
316 \begin_inset Flex MenuItem
317 status collapsed
318
319 \begin_layout Plain Layout
320 Export\SpecialChar \menuseparator
321 LaTeX
322 \end_layout
323
324 \end_inset
325
326  from the 
327 \begin_inset Flex MenuItem
328 status collapsed
329
330 \begin_layout Plain Layout
331 File
332 \end_layout
333
334 \end_inset
335
336  menu (or 
337 \begin_inset Flex MenuItem
338 status collapsed
339
340 \begin_layout Plain Layout
341 View\SpecialChar \menuseparator
342 Source
343 \end_layout
344
345 \end_inset
346
347 ), then look at the preamble of the resulting 
348 \begin_inset Flex Code
349 status collapsed
350
351 \begin_layout Plain Layout
352 .tex
353 \end_layout
354
355 \end_inset
356
357  file.
358  You'll notice a variety of new macros defined specifically by LyX.
359  These macros are defined automatically, according to the features you use
360  in the document.
361 \end_layout
362
363 \begin_layout Standard
364 There are several commands that automatically invoke LaTeX.
365  They are:
366 \end_layout
367
368 \begin_layout Itemize
369 \begin_inset Flex MenuItem
370 status collapsed
371
372 \begin_layout Plain Layout
373 View\SpecialChar \menuseparator
374 View
375 \end_layout
376
377 \end_inset
378
379
380 \end_layout
381
382 \begin_layout Itemize
383 \begin_inset Flex MenuItem
384 status collapsed
385
386 \begin_layout Plain Layout
387 View\SpecialChar \menuseparator
388 Update
389 \end_layout
390
391 \end_inset
392
393
394 \end_layout
395
396 \begin_layout Itemize
397 \begin_inset Flex MenuItem
398 status collapsed
399
400 \begin_layout Plain Layout
401 File\SpecialChar \menuseparator
402 Print
403 \end_layout
404
405 \end_inset
406
407
408 \end_layout
409
410 \begin_layout Itemize
411 \begin_inset Flex MenuItem
412 status collapsed
413
414 \begin_layout Plain Layout
415 File\SpecialChar \menuseparator
416 Fax
417 \end_layout
418
419 \end_inset
420
421
422 \end_layout
423
424 \begin_layout Standard
425 They will only invoke LaTeX if the file has changed since the last time
426  LaTeX was run.
427  
428 \end_layout
429
430 \begin_layout Standard
431 When LyX runs LaTeX on the file you're editing, it performs these steps:
432 \end_layout
433
434 \begin_layout Enumerate
435 Convert the document to LaTeX and save to a file with the extension 
436 \begin_inset Flex Code
437 status collapsed
438
439 \begin_layout Plain Layout
440 .tex
441 \end_layout
442
443 \end_inset
444
445  in place of 
446 \begin_inset Flex Code
447 status collapsed
448
449 \begin_layout Plain Layout
450 .lyx
451 \end_layout
452
453 \end_inset
454
455 .
456 \end_layout
457
458 \begin_layout Enumerate
459 Run LaTeX on the 
460 \begin_inset Flex Code
461 status collapsed
462
463 \begin_layout Plain Layout
464 .tex
465 \end_layout
466
467 \end_inset
468
469  file (maybe several times), and run any other commands (such as 
470 \begin_inset Flex Code
471 status collapsed
472
473 \begin_layout Plain Layout
474 bibtex
475 \end_layout
476
477 \end_inset
478
479  or 
480 \begin_inset Flex Code
481 status collapsed
482
483 \begin_layout Plain Layout
484 makeindex
485 \end_layout
486
487 \end_inset
488
489 ) needed to compile the LaTeX file.
490 \end_layout
491
492 \begin_layout Enumerate
493 If there are any errors, show the error log.
494 \end_layout
495
496 \begin_layout Standard
497 If you have run LaTeX using 
498 \begin_inset Flex MenuItem
499 status collapsed
500
501 \begin_layout Plain Layout
502 View
503 \bar under
504 \SpecialChar \menuseparator
505
506 \bar default
507 DVI
508 \end_layout
509
510 \end_inset
511
512 , LyX then runs a DVI viewer to display the DVI-file.
513  If you have used 
514 \begin_inset Flex MenuItem
515 status collapsed
516
517 \begin_layout Plain Layout
518 View
519 \bar under
520 \SpecialChar \menuseparator
521
522 \bar default
523 PostScript
524 \end_layout
525
526 \end_inset
527
528 , LyX performs further steps:
529 \end_layout
530
531 \begin_layout Itemize
532 Run 
533 \begin_inset Flex Code
534 status collapsed
535
536 \begin_layout Plain Layout
537 dvips
538 \end_layout
539
540 \end_inset
541
542  to convert the DVI file to PostScript.
543 \end_layout
544
545 \begin_layout Itemize
546 Run a PostScript viewer, such as 
547 \begin_inset Flex Code
548 status collapsed
549
550 \begin_layout Plain Layout
551 ghostview
552 \end_layout
553
554 \end_inset
555
556 , to display the PostScript file.
557 \end_layout
558
559 \begin_layout Standard
560 LyX does similar things when viewing, or exporting, other formats.
561 \end_layout
562
563 \begin_layout Section
564 Translating LaTeX files into LyX
565 \end_layout
566
567 \begin_layout Standard
568 You can import a LaTeX file into LyX by using the 
569 \begin_inset Flex MenuItem
570 status collapsed
571
572 \begin_layout Plain Layout
573 File\SpecialChar \menuseparator
574 Import\SpecialChar \menuseparator
575 LaTeX
576 \end_layout
577
578 \end_inset
579
580  command in LyX.
581  This will call a program named 
582 \begin_inset Flex Code
583 status collapsed
584
585 \begin_layout Plain Layout
586 tex2lyx
587 \end_layout
588
589 \end_inset
590
591  which will create a file 
592 \begin_inset Flex Code
593 status collapsed
594
595 \begin_layout Plain Layout
596 foo.lyx
597 \end_layout
598
599 \end_inset
600
601  from the file 
602 \begin_inset Flex Code
603 status collapsed
604
605 \begin_layout Plain Layout
606 foo.tex
607 \end_layout
608
609 \end_inset
610
611 .
612  LyX will then open that file.
613 \begin_inset Foot
614 status collapsed
615
616 \begin_layout Plain Layout
617 \begin_inset Flex Code
618 status collapsed
619
620 \begin_layout Plain Layout
621 tex2lyx
622 \end_layout
623
624 \end_inset
625
626  can also be run from the command line, of course.
627 \end_layout
628
629 \end_inset
630
631
632 \end_layout
633
634 \begin_layout Standard
635 \begin_inset Flex Code
636 status collapsed
637
638 \begin_layout Plain Layout
639 tex2lyx
640 \end_layout
641
642 \end_inset
643
644  will translate most legal LaTeX, but not everything.
645  It will put things it doesn't understand into TeX code, so after translating
646  a file with 
647 \begin_inset Flex Code
648 status collapsed
649
650 \begin_layout Plain Layout
651 tex2lyx
652 \end_layout
653
654 \end_inset
655
656 , you can look for TeX code and hand-edit it until it looks right.
657 \end_layout
658
659 \begin_layout Standard
660 If you don't know what TeX code is, read the next section.
661 \end_layout
662
663 \begin_layout Section
664 \begin_inset CommandInset label
665 LatexCommand label
666 name "sec:Inserting-TeX-Code"
667
668 \end_inset
669
670 Inserting TeX Code into LyX Documents 
671 \end_layout
672
673 \begin_layout Standard
674 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
675  You can always insert TeX code into any LyX document.
676  LyX cannot, and will never be able to, display every possible LaTeX construct.
677  If ever you need to insert LaTeX commands into your LyX document, you can
678  use the 
679 \begin_inset Flex Code
680 status collapsed
681
682 \begin_layout Plain Layout
683 TeX Code
684 \end_layout
685
686 \end_inset
687
688  box, which you can insert into your document with 
689 \begin_inset Flex MenuItem
690 status collapsed
691
692 \begin_layout Plain Layout
693 Insert\SpecialChar \menuseparator
694 TeX Code
695 \end_layout
696
697 \end_inset
698
699  or the keyboard shortcut 
700 \begin_inset Info
701 type  "shortcut"
702 arg   "ert-insert"
703 \end_inset
704
705 .
706 \end_layout
707
708 \begin_layout Standard
709 Here's an example of inserting LaTeX commands in a LyX document.
710  The code looks like this:
711 \end_layout
712
713 \begin_layout LyX-Code
714
715 \backslash
716 begin{tabular}{ll}
717 \begin_inset Newline newline
718 \end_inset
719
720
721 \backslash
722 begin{minipage}{5cm}
723 \begin_inset Newline newline
724 \end_inset
725
726 This is an example of a minipage environment.
727  You 
728 \begin_inset Newline newline
729 \end_inset
730
731 can put nearly everything in it, even (non-floating) 
732 \begin_inset Newline newline
733 \end_inset
734
735 figures and tables.
736  
737 \begin_inset Newline newline
738 \end_inset
739
740
741 \backslash
742 end{minipage}
743 \begin_inset Newline newline
744 \end_inset
745
746 &
747 \begin_inset Newline newline
748 \end_inset
749
750
751 \backslash
752 begin{minipage}{5cm}
753 \begin_inset Newline newline
754 \end_inset
755
756
757 \backslash
758 begin{verbatim}
759 \begin_inset Newline newline
760 \end_inset
761
762
763 \backslash
764 begin{minipage}{5cm}
765 \begin_inset Newline newline
766 \end_inset
767
768 This ...
769  
770 \begin_inset Newline newline
771 \end_inset
772
773
774 \backslash
775 end{minipage}
776 \begin_inset Newline newline
777 \end_inset
778
779
780 \backslash
781 end{verbatim}
782 \begin_inset Newline newline
783 \end_inset
784
785
786 \backslash
787 end{minipage}
788 \begin_inset Newline newline
789 \end_inset
790
791
792 \backslash
793 end{tabular}
794 \end_layout
795
796 \begin_layout LyX-Code
797
798 \end_layout
799
800 \begin_layout Standard
801 The 
802 \begin_inset Flex Code
803 status collapsed
804
805 \begin_layout Plain Layout
806 TeX Code
807 \end_layout
808
809 \end_inset
810
811  box containing this text is directly after this paragraph.
812  Those of you reading the manual in LyX will only see the TeX code inset.
813  Those reading a printed version of the manuals will see the actual results:
814 \begin_inset VSpace bigskip
815 \end_inset
816
817
818 \end_layout
819
820 \begin_layout Standard
821 \begin_inset ERT
822 status open
823
824 \begin_layout Plain Layout
825
826
827 \backslash
828 begin{tabular}{ll}
829 \end_layout
830
831 \begin_layout Plain Layout
832
833
834 \backslash
835 begin{minipage}{5cm}
836 \end_layout
837
838 \begin_layout Plain Layout
839
840 This is an example of a minipage environment.
841  You can put nearly everything in it, even (non-floating) figures and tables.
842  
843 \end_layout
844
845 \begin_layout Plain Layout
846
847
848 \backslash
849 end{minipage}
850 \end_layout
851
852 \begin_layout Plain Layout
853
854 &
855 \end_layout
856
857 \begin_layout Plain Layout
858
859
860 \backslash
861 begin{minipage}{5cm}
862 \end_layout
863
864 \begin_layout Plain Layout
865
866
867 \backslash
868 begin{verbatim}
869 \end_layout
870
871 \begin_layout Plain Layout
872
873
874 \backslash
875 begin{minipage}{5cm}
876 \end_layout
877
878 \begin_layout Plain Layout
879
880 This ...
881  
882 \end_layout
883
884 \begin_layout Plain Layout
885
886
887 \backslash
888 end{minipage}
889 \end_layout
890
891 \begin_layout Plain Layout
892
893
894 \backslash
895 end{verbatim}
896 \end_layout
897
898 \begin_layout Plain Layout
899
900
901 \backslash
902 end{minipage}
903 \end_layout
904
905 \begin_layout Plain Layout
906
907
908 \backslash
909 end{tabular}
910 \end_layout
911
912 \end_inset
913
914
915 \begin_inset VSpace bigskip
916 \end_inset
917
918
919 \end_layout
920
921 \begin_layout Standard
922 In addition to using TeX code, you can also create a separate file containing
923  some complex LaTeX structure and then use 
924 \begin_inset Flex MenuItem
925 status collapsed
926
927 \begin_layout Plain Layout
928 Insert\SpecialChar \menuseparator
929 Child
930 \begin_inset space ~
931 \end_inset
932
933 Document
934 \end_layout
935
936 \end_inset
937
938  to include your file (you should select the type 
939 \begin_inset Flex Code
940 status collapsed
941
942 \begin_layout Plain Layout
943 Input
944 \end_layout
945
946 \end_inset
947
948 ).
949  We recommend that you only do this if you have a 
950 \begin_inset Flex Code
951 status collapsed
952
953 \begin_layout Plain Layout
954 .tex
955 \end_layout
956
957 \end_inset
958
959  file which you 
960 \emph on
961 know
962 \emph default
963  works already.
964  Otherwise, you'll have a big job tracking down LaTeX errors.
965 \end_layout
966
967 \begin_layout Standard
968 There are a few last points to emphasize:
969 \end_layout
970
971 \begin_layout Itemize
972 LyX 
973 \emph on
974 does not
975 \emph default
976  check if your LaTeX code is correct.
977 \end_layout
978
979 \begin_layout Itemize
980 Beware of reinventing the wheel.
981 \end_layout
982
983 \begin_layout Standard
984 On that last point, LyX does have quite a few features tucked into it, and
985  more are coming.
986  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
987  feature before you decide you have to do it by hand.
988  Moreover, there are numerous LaTeX packages out there to do all sorts of
989  things, from labels to envelopes to fancy multipage tables.
990  Check out 
991 \begin_inset CommandInset href
992 LatexCommand href
993 name "CTAN"
994 target "http://www.ctan.org/"
995
996 \end_inset
997
998  for details.
999 \end_layout
1000
1001 \begin_layout Standard
1002 If you do need to do some wild and fancy things within your document, be
1003  sure to check out a good LaTeX book for assistance.
1004  There are a number of them listed in the bibliography of the 
1005 \emph on
1006 User's Guide
1007 \emph default
1008 .
1009 \end_layout
1010
1011 \begin_layout Section
1012 LyX and the LaTeX Preamble
1013 \end_layout
1014
1015 \begin_layout Subsection
1016 About the LaTeX Preamble
1017 \end_layout
1018
1019 \begin_layout Standard
1020 If you already know LaTeX, there is no need to explain here what the preamble
1021  is good for.
1022  If you don't, the following will give you some ideas—we recommend again
1023  that you consult a LaTeX book for further information.
1024  In any case, you should read the points below, because they explain what
1025  you can do and what you don't need to do in the LaTeX preamble of a LyX
1026  document.
1027 \end_layout
1028
1029 \begin_layout Standard
1030 The LaTeX preamble comes at the very beginning of a document, 
1031 \emph on
1032 before
1033 \emph default
1034  the text.
1035  It serves to:
1036 \end_layout
1037
1038 \begin_layout Itemize
1039 Declare the document class.
1040  
1041 \begin_inset Newline newline
1042 \end_inset
1043
1044 LyX already does this for you.
1045  If you're a seasoned LaTeX-nician, and you have a custom document class
1046  you want to use, check out the 
1047 \emph on
1048 Customization Manual
1049 \emph default
1050  for information on how to make LyX interface to it.
1051 \end_layout
1052
1053 \begin_layout Itemize
1054 Declare the usage of packages.
1055  
1056 \begin_inset Newline newline
1057 \end_inset
1058
1059 LaTeX packages provide special commands, which are only available within
1060  a document when the package has been declared in the preamble.
1061  In addition to providing special commands, the inclusion of a package can
1062  change the document.
1063  For example, the package 
1064 \begin_inset Flex Code
1065 status collapsed
1066
1067 \begin_layout Plain Layout
1068 indentfirst
1069 \end_layout
1070
1071 \end_inset
1072
1073  forces all paragraphs to be indented.
1074  There are other packages for labels, envelopes, margins, etc.
1075  
1076 \end_layout
1077
1078 \begin_layout Itemize
1079 Set counters, variables, lengths and widths.
1080  
1081 \begin_inset Newline newline
1082 \end_inset
1083
1084 There are several LaTeX counters and variables that 
1085 \emph on
1086 must
1087 \emph default
1088  be set globally from within the preamble in order to have the desired effect.
1089  (There are variables that you can set and reset inside the document, too.)
1090  Margins are a good example of something that must be set in the preamble.
1091  Another example is the label format for lists.
1092  You can actually set these just about anywhere, but it's best to do it
1093  just once, inside the preamble.
1094 \end_layout
1095
1096 \begin_layout Itemize
1097 Declare user defined commands (with 
1098 \begin_inset Flex Code
1099 status collapsed
1100
1101 \begin_layout Plain Layout
1102
1103 \backslash
1104 newcommand
1105 \end_layout
1106
1107 \end_inset
1108
1109  or 
1110 \begin_inset Flex Code
1111 status collapsed
1112
1113 \begin_layout Plain Layout
1114
1115 \backslash
1116 renewcommand
1117 \end_layout
1118
1119 \end_inset
1120
1121 ).
1122 \begin_inset Newline newline
1123 \end_inset
1124
1125 These are abbreviations for LaTeX commands which appear very often inside
1126  a document.
1127  Although the preamble is a good place to declare such commands, they 
1128 \emph on
1129 can
1130 \emph default
1131  be declared anywhere (before they are used for the first time, of course).
1132  This can be useful if there is a lot of raw LaTeX code in your document,
1133  which normally should not be the case.
1134 \end_layout
1135
1136 \begin_layout Standard
1137 LyX adds its own set of definitions to the preamble of the 
1138 \begin_inset Flex Code
1139 status collapsed
1140
1141 \begin_layout Plain Layout
1142 .tex
1143 \end_layout
1144
1145 \end_inset
1146
1147  file it produces.
1148  This makes LaTeX files generated by LyX portable.
1149 \end_layout
1150
1151 \begin_layout Subsection
1152 Changing the Preamble
1153 \end_layout
1154
1155 \begin_layout Standard
1156 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1157  can't change them without patching LyX itself.
1158  You can, however, add your own stuff to the preamble by selecting 
1159 \begin_inset Flex MenuItem
1160 status collapsed
1161
1162 \begin_layout Plain Layout
1163 LaTeX
1164 \begin_inset space ~
1165 \end_inset
1166
1167 Preamble
1168 \end_layout
1169
1170 \end_inset
1171
1172  in the 
1173 \begin_inset Flex MenuItem
1174 status collapsed
1175
1176 \begin_layout Plain Layout
1177 Document\SpecialChar \menuseparator
1178 Settings
1179 \end_layout
1180
1181 \end_inset
1182
1183  dialog.
1184  LyX adds anything in the 
1185 \begin_inset Flex MenuItem
1186 status collapsed
1187
1188 \begin_layout Plain Layout
1189 Preamble
1190 \end_layout
1191
1192 \end_inset
1193
1194  dialog to its own built-in preamble.
1195  Before adding your own declarations in the preamble, you should make sure
1196  that LyX doesn't already support what you want to do.
1197  (Remember what we said about reinventing the wheel?) Also, 
1198 \emph on
1199 make sure your preamble code is correct
1200 \emph default
1201 .
1202  LyX doesn't check it for you.
1203  If there is an error, you're likely to get an error like 
1204 \begin_inset Quotes eld
1205 \end_inset
1206
1207
1208 \begin_inset Flex Code
1209 status collapsed
1210
1211 \begin_layout Plain Layout
1212 Missing 
1213 \backslash
1214 begin{document}
1215 \end_layout
1216
1217 \end_inset
1218
1219
1220 \begin_inset Quotes erd
1221 \end_inset
1222
1223 .
1224  If you see this error, check your preamble.
1225 \end_layout
1226
1227 \begin_layout Subsection
1228 Examples
1229 \end_layout
1230
1231 \begin_layout Standard
1232 Here are some examples of what you can add to a preamble, and what they
1233  do.
1234 \end_layout
1235
1236 \begin_layout Subsubsection
1237 Example #1: Offsets
1238 \end_layout
1239
1240 \begin_layout Standard
1241 There are two variables under LaTeX that control page position: 
1242 \begin_inset Flex Code
1243 status collapsed
1244
1245 \begin_layout Plain Layout
1246
1247 \backslash
1248 hoffset
1249 \end_layout
1250
1251 \end_inset
1252
1253  and 
1254 \begin_inset Flex Code
1255 status collapsed
1256
1257 \begin_layout Plain Layout
1258
1259 \backslash
1260 voffset
1261 \end_layout
1262
1263 \end_inset
1264
1265 .
1266  Their names should be self-explanatory.
1267  These variables are useful if you think for a moment about computer labels.
1268  Sometimes, the size of a print medium and the area of the medium that you
1269  can actually print on aren't the same.
1270  This is where 
1271 \begin_inset Flex Code
1272 status collapsed
1273
1274 \begin_layout Plain Layout
1275
1276 \backslash
1277 hoffset
1278 \end_layout
1279
1280 \end_inset
1281
1282  and 
1283 \begin_inset Flex Code
1284 status collapsed
1285
1286 \begin_layout Plain Layout
1287
1288 \backslash
1289 voffset
1290 \end_layout
1291
1292 \end_inset
1293
1294  come in.
1295 \end_layout
1296
1297 \begin_layout Standard
1298 The default values for 
1299 \begin_inset Flex Code
1300 status collapsed
1301
1302 \begin_layout Plain Layout
1303
1304 \backslash
1305 hoffset
1306 \end_layout
1307
1308 \end_inset
1309
1310  and 
1311 \begin_inset Flex Code
1312 status collapsed
1313
1314 \begin_layout Plain Layout
1315
1316 \backslash
1317 voffset
1318 \end_layout
1319
1320 \end_inset
1321
1322  are both 0
1323 \begin_inset space \thinspace{}
1324 \end_inset
1325
1326 points, i.
1327 \begin_inset space \thinspace{}
1328 \end_inset
1329
1330 e.
1331 \begin_inset space \space{}
1332 \end_inset
1333
1334 the page isn't shifted.
1335  Unfortunately, some DVI drivers always seem to shift the page.
1336  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1337  If you're using LyX on a system that you don't personally maintain, and
1338  your sysadmin is a doofus, 
1339 \begin_inset Flex Code
1340 status collapsed
1341
1342 \begin_layout Plain Layout
1343
1344 \backslash
1345 hoffset
1346 \end_layout
1347
1348 \end_inset
1349
1350  and 
1351 \begin_inset Flex Code
1352 status collapsed
1353
1354 \begin_layout Plain Layout
1355
1356 \backslash
1357 voffset
1358 \end_layout
1359
1360 \end_inset
1361
1362  can save the day.
1363  Suppose your left and top margins are always 0.5
1364 \begin_inset space \thinspace{}
1365 \end_inset
1366
1367 inches too big.
1368  You can add this to the preamble:
1369 \end_layout
1370
1371 \begin_layout LyX-Code
1372
1373 \backslash
1374 setlength{
1375 \backslash
1376 hoffset}{-0.5 in}
1377 \end_layout
1378
1379 \begin_layout LyX-Code
1380
1381 \backslash
1382 setlength{
1383 \backslash
1384 voffset}{-0.5 in}
1385 \end_layout
1386
1387 \begin_layout Standard
1388 and your margins should now be correct.
1389 \end_layout
1390
1391 \begin_layout Subsubsection
1392 Example #2: Labels
1393 \end_layout
1394
1395 \begin_layout Standard
1396 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1397  There's a rather nice package, available at your nearest CTAN archive,
1398  for printing sheets of labels: 
1399 \begin_inset Flex Code
1400 status collapsed
1401
1402 \begin_layout Plain Layout
1403 labels.sty
1404 \end_layout
1405
1406 \end_inset
1407
1408 .
1409  Now, your system may not have this package installed by default.
1410  We leave that up to you to check.
1411  You'll also want to read the documentation for it; we're not going to do
1412  that for you.
1413  Since this is an example, however, we'll give you an example of how you
1414  use this package.
1415 \end_layout
1416
1417 \begin_layout Standard
1418 First, make sure you're using the 
1419 \begin_inset Flex Code
1420 status collapsed
1421
1422 \begin_layout Plain Layout
1423 article
1424 \end_layout
1425
1426 \end_inset
1427
1428  document class.
1429  Next, you need to put the following in your preamble:
1430 \end_layout
1431
1432 \begin_layout LyX-Code
1433
1434 \backslash
1435 usepackage{labels}
1436 \end_layout
1437
1438 \begin_layout LyX-Code
1439
1440 \backslash
1441 LabelCols=3
1442 \end_layout
1443
1444 \begin_layout LyX-Code
1445
1446 \backslash
1447 LabelRows=7
1448 \end_layout
1449
1450 \begin_layout LyX-Code
1451
1452 \backslash
1453 LeftBorder=8mm
1454 \end_layout
1455
1456 \begin_layout LyX-Code
1457
1458 \backslash
1459 RightBorder=8mm
1460 \end_layout
1461
1462 \begin_layout LyX-Code
1463
1464 \backslash
1465 TopBorder=9mm
1466 \end_layout
1467
1468 \begin_layout LyX-Code
1469
1470 \backslash
1471 BottomBorder=2mm
1472 \end_layout
1473
1474 \begin_layout Standard
1475 This sets things up for Avery label sheets, stock #5360.
1476  You're now ready to print labels, but you'll need to insert LaTeX code,
1477  placing the commands 
1478 \begin_inset Flex Code
1479 status collapsed
1480
1481 \begin_layout Plain Layout
1482
1483 \backslash
1484 begin{labels}
1485 \end_layout
1486
1487 \end_inset
1488
1489  and 
1490 \begin_inset Flex Code
1491 status collapsed
1492
1493 \begin_layout Plain Layout
1494
1495 \backslash
1496 end{labels}
1497 \end_layout
1498
1499 \end_inset
1500
1501  around each label text.
1502  This and other special features of 
1503 \begin_inset Flex Code
1504 status collapsed
1505
1506 \begin_layout Plain Layout
1507 labels.sty
1508 \end_layout
1509
1510 \end_inset
1511
1512  are explained in its documentation.
1513 \end_layout
1514
1515 \begin_layout Standard
1516 Someday, someone may write a LyX layout file to support this package directly.
1517  Maybe that someone is you.
1518 \end_layout
1519
1520 \begin_layout Subsubsection
1521 Example #3: Paragraph Indentation
1522 \end_layout
1523
1524 \begin_layout Standard
1525 Americans are trained to indent the first line of 
1526 \emph on
1527 every
1528 \emph default
1529  paragraph.
1530  As with all of their other weird quirks, most Americans will whine and
1531  moan until they can have their way and indent the first line of all paragraphs.
1532  (Yes, we're joking.
1533  (We are?) 
1534 \emph on
1535 Yeah
1536 \emph default
1537 , we are.)
1538 \end_layout
1539
1540 \begin_layout Standard
1541 Of course, this behavior isn't standard typography.
1542  In books, you typically only indent the first line of a paragraph 
1543 \emph on
1544 if
1545 \emph default
1546  it follows another one.
1547  The idea behind indenting the first line of a paragraph is to distinguish
1548  neighboring paragraphs from one another.
1549  If there is no previous paragraph—for example, if it follows a figure or
1550  is the first paragraph in a section—then there is no need for indentation.
1551  
1552 \end_layout
1553
1554 \begin_layout Standard
1555 If you're a typical American (we're still joking!), though, you don't care
1556  about such esoteric things; you want your indentation! Add this to the
1557  preamble:
1558 \end_layout
1559
1560 \begin_layout LyX-Code
1561
1562 \backslash
1563 usepackage{indentfirst}
1564 \end_layout
1565
1566 \begin_layout Standard
1567 If your TeX distribution isn't braindead, you'll have this package, and
1568  all of your paragraphs will get the indentation the Founding Fathers intended
1569  they should have.
1570 \end_layout
1571
1572 \begin_layout Subsubsection
1573 Example #4: This Document
1574 \end_layout
1575
1576 \begin_layout Standard
1577 You can also check out the preamble of this document to get an idea of some
1578  of the advanced things you can do.
1579 \end_layout
1580
1581 \begin_layout Section
1582 LyX and LaTeX Errors
1583 \end_layout
1584
1585 \begin_layout Standard
1586 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1587  going.
1588  It then uses the logfile from the LaTeX run to do a post-mortem.
1589  After analyzing the logfile, LyX displays a dialog listing the errors.
1590  Clicking on any one of them will take you to the position in your LyX file
1591  where the error occurred.
1592 \begin_inset Foot
1593 status collapsed
1594
1595 \begin_layout Plain Layout
1596 Well, usually.
1597  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1598  right line.
1599  There are also cases where LaTeX reports the error on one line, but the
1600  actual error is earlier.
1601  This is not unlike forgetting a closing brace in a program: You'll get
1602  an error, but only later.
1603 \end_layout
1604
1605 \end_inset
1606
1607
1608 \end_layout
1609
1610 \begin_layout Standard
1611 Some folks also like to look at the log file directly: It is available from
1612  
1613 \begin_inset Flex MenuItem
1614 status collapsed
1615
1616 \begin_layout Plain Layout
1617 Document
1618 \bar under
1619 \SpecialChar \menuseparator
1620
1621 \bar default
1622 Latex
1623 \begin_inset space ~
1624 \end_inset
1625
1626 Log
1627 \end_layout
1628
1629 \end_inset
1630
1631 .
1632  There are some fairly common error messages and warnings.
1633  We'll cover those here.
1634  You should look at a good LaTeX book for a complete listing.
1635 \end_layout
1636
1637 \begin_layout Itemize
1638 \begin_inset Flex Code
1639 status collapsed
1640
1641 \begin_layout Plain Layout
1642 LaTeX Warning
1643 \end_layout
1644
1645 \end_inset
1646
1647
1648 \begin_inset Newline newline
1649 \end_inset
1650
1651 Anything beginning with these words is a warning message for the purpose
1652  of 
1653 \begin_inset Quotes eld
1654 \end_inset
1655
1656 debugging
1657 \begin_inset Quotes erd
1658 \end_inset
1659
1660  the LaTeX code itself.
1661  You'll get messages like this if you added or changed cross-references
1662  or bibliography entries, in which case, LaTeX is trying to tell you that
1663  you need to make another run.
1664  You can by-and-large ignore these.
1665 \end_layout
1666
1667 \begin_layout Itemize
1668 \begin_inset Flex Code
1669 status collapsed
1670
1671 \begin_layout Plain Layout
1672 LaTeX Font Warning
1673 \end_layout
1674
1675 \end_inset
1676
1677
1678 \begin_inset Newline newline
1679 \end_inset
1680
1681 Another warning message, this time about fonts which LaTeX couldn't find.
1682  The rest of the message will often say something about a replacement font
1683  that LaTeX used.
1684  You can safely ignore these, too.
1685 \end_layout
1686
1687 \begin_layout Itemize
1688 \begin_inset Flex Code
1689 status collapsed
1690
1691 \begin_layout Plain Layout
1692 Overfull 
1693 \backslash
1694 hbox
1695 \end_layout
1696
1697 \end_inset
1698
1699
1700 \begin_inset Newline newline
1701 \end_inset
1702
1703 LaTeX absolutely 
1704 \emph on
1705 loves
1706 \emph default
1707  to spew these out.
1708  They are warnings about lines that were too long and run past the right
1709  margin.
1710  Almost always, this is unnoticeable in the final output.
1711  (It can be just a point or two.) Or, only one or two characters extend past
1712  the margin.
1713  LaTeX seems to generate at least one of these messages for just about any
1714  document you write.
1715 \begin_inset Newline newline
1716 \end_inset
1717
1718 You can ignore these messages.
1719  Your eyes will tell you if there's a problem with something that's too
1720  wide; just look at the output.
1721 \begin_inset Foot
1722 status collapsed
1723
1724 \begin_layout Plain Layout
1725 You can also enable the `draft' option in 
1726 \begin_inset Flex MenuItem
1727 status collapsed
1728
1729 \begin_layout Plain Layout
1730 Document
1731 \bar under
1732 \SpecialChar \menuseparator
1733
1734 \bar default
1735 Settings
1736 \end_layout
1737
1738 \end_inset
1739
1740 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1741 \end_layout
1742
1743 \end_inset
1744
1745
1746 \end_layout
1747
1748 \begin_layout Itemize
1749 \begin_inset Flex Code
1750 status collapsed
1751
1752 \begin_layout Plain Layout
1753 Underfull 
1754 \backslash
1755 hbox
1756 \end_layout
1757
1758 \end_inset
1759
1760
1761 \begin_inset Newline newline
1762 \end_inset
1763
1764 Not quite as common as its cousin.
1765  LaTeX seems to like to print lines that are a bit too wide as opposed to
1766  ones that are a bit too narrow.
1767  We have no idea why.
1768 \end_layout
1769
1770 \begin_layout Itemize
1771 \begin_inset Flex Code
1772 status collapsed
1773
1774 \begin_layout Plain Layout
1775 Overfull 
1776 \backslash
1777 vbox
1778 \end_layout
1779
1780 \end_inset
1781
1782  and 
1783 \begin_inset Flex Code
1784 status collapsed
1785
1786 \begin_layout Plain Layout
1787 Underfull 
1788 \backslash
1789 vbox
1790 \end_layout
1791
1792 \end_inset
1793
1794
1795 \begin_inset Newline newline
1796 \end_inset
1797
1798 Warnings about troubles breaking the page.
1799  Once again, just look at the output.
1800  Your eyes will tell you where something has gone wrong.
1801 \end_layout
1802
1803 \begin_layout Itemize
1804 \begin_inset Flex Code
1805 status collapsed
1806
1807 \begin_layout Plain Layout
1808 LaTeX Error: File 
1809 \begin_inset Quotes els
1810 \end_inset
1811
1812 Xxxx
1813 \begin_inset Quotes ers
1814 \end_inset
1815
1816  not found
1817 \end_layout
1818
1819 \end_inset
1820
1821
1822 \begin_inset Newline newline
1823 \end_inset
1824
1825 The file 
1826 \begin_inset Quotes eld
1827 \end_inset
1828
1829 Xxxx
1830 \begin_inset Quotes erd
1831 \end_inset
1832
1833  isn't installed on this system.
1834  This usually appears because some package your document needs isn't installed.
1835  If you didn't touch the preamble or didn't use the 
1836 \begin_inset Flex Code
1837 status collapsed
1838
1839 \begin_layout Plain Layout
1840
1841 \backslash
1842 usepackage{}
1843 \end_layout
1844
1845 \end_inset
1846
1847  command, then one of the packages LyX tried to load is missing.
1848  Use 
1849 \begin_inset Flex MenuItem
1850 status collapsed
1851
1852 \begin_layout Plain Layout
1853 Help\SpecialChar \menuseparator
1854 LaTeX Configuration
1855 \end_layout
1856
1857 \end_inset
1858
1859  to get a list of packages that LyX knows about.
1860  This file is updated whenever you reconfigure LyX (using 
1861 \begin_inset Flex MenuItem
1862 status collapsed
1863
1864 \begin_layout Plain Layout
1865 Tools\SpecialChar \menuseparator
1866 Reconfigure
1867 \end_layout
1868
1869 \end_inset
1870
1871 ) and tells you which packages have been detected and what they do.
1872 \begin_inset Newline newline
1873 \end_inset
1874
1875 If you did use the 
1876 \begin_inset Flex Code
1877 status collapsed
1878
1879 \begin_layout Plain Layout
1880
1881 \backslash
1882 usepackage{}
1883 \end_layout
1884
1885 \end_inset
1886
1887  command and the package in question isn't installed, then you'll need to
1888  install it yourself.
1889 \end_layout
1890
1891 \begin_layout Itemize
1892 \begin_inset Flex Code
1893 status collapsed
1894
1895 \begin_layout Plain Layout
1896 LaTeX Error: Unknown option
1897 \end_layout
1898
1899 \end_inset
1900
1901
1902 \begin_inset Newline newline
1903 \end_inset
1904
1905 Error messages beginning with this are trying to tell you that you specified
1906  a bad or undefined option to a package.
1907  Check the package's documentation.
1908 \end_layout
1909
1910 \begin_layout Itemize
1911 \begin_inset Flex Code
1912 status collapsed
1913
1914 \begin_layout Plain Layout
1915 Undefined control sequence
1916 \end_layout
1917
1918 \end_inset
1919
1920
1921 \begin_inset Newline newline
1922 \end_inset
1923
1924 If you've inserted LaTeX code into your document, but made a typo, you'll
1925  get one of these.
1926  You may have forgotten to load a package.
1927  In any case, this error message usually means that you used an undefined
1928  command.
1929  
1930 \end_layout
1931
1932 \begin_layout Standard
1933 There are other error and warning messages.
1934  Some are self-explanatory.
1935  These are usually LaTeX messages.
1936  Others are downright cryptic.
1937  These are usually TeX error messages, and we really have 
1938 \emph on
1939 no clue
1940 \emph default
1941  what they mean or how to decipher them.
1942  No-one does.
1943 \end_layout
1944
1945 \begin_layout Standard
1946 There's a general sequence you should follow if you get error messages:
1947 \end_layout
1948
1949 \begin_layout Enumerate
1950 Look at the LaTeX code you inserted for typos.
1951 \end_layout
1952
1953 \begin_layout Enumerate
1954 If there are no typos, check that you used the command(s) correctly.
1955 \end_layout
1956
1957 \begin_layout Enumerate
1958 If you get a bunch of error boxes piled up at the very top of the document—and
1959  especially if you see a 
1960 \begin_inset Quotes eld
1961 \end_inset
1962
1963
1964 \begin_inset Flex Code
1965 status collapsed
1966
1967 \begin_layout Plain Layout
1968 Missing 
1969 \backslash
1970 begin{document}
1971 \end_layout
1972
1973 \end_inset
1974
1975
1976 \begin_inset Quotes erd
1977 \end_inset
1978
1979  error—it means that there are errors in the preamble.
1980  Start debugging your preamble.
1981 \end_layout
1982
1983 \begin_layout Enumerate
1984 If you didn't add anything to the preamble and didn't add any LaTeX code
1985  to the document, the first suspect is your LaTeX distribution itself.
1986  Check for missing packages and install them.
1987 \end_layout
1988
1989 \begin_layout Enumerate
1990 Okay, so there are no missing packages.
1991  Did you use any of the fine-tuning options in LyX? Specifically, did you
1992  
1993 \emph on
1994 misuse
1995 \emph default
1996  any of them, like trying to manually insert lots of 
1997 \begin_inset Flex Code
1998 status collapsed
1999
2000 \begin_layout Plain Layout
2001 Protected
2002 \begin_inset space ~
2003 \end_inset
2004
2005 Blanks
2006 \end_layout
2007
2008 \end_inset
2009
2010
2011 \begin_inset Flex Code
2012 status collapsed
2013
2014 \begin_layout Plain Layout
2015 Linebreaks
2016 \end_layout
2017
2018 \end_inset
2019
2020 , or 
2021 \begin_inset Flex Code
2022 status collapsed
2023
2024 \begin_layout Plain Layout
2025 Pagebreaks
2026 \end_layout
2027
2028 \end_inset
2029
2030 ? Did you try to kludge something together with these instead of using the
2031  appropriate paragraph environment?
2032 \end_layout
2033
2034 \begin_layout Enumerate
2035 All right, you didn't use any of the fine-tuning options, you played by
2036  the rules.
2037  Did you try to pull a fancy maneuver? Did you do something funky inside
2038  a table or an equation, like inserting a graphic into a table cell?
2039 \end_layout
2040
2041 \begin_layout Enumerate
2042 Do you have long sections of text where LaTeX cannot find a place to break
2043  a line? By default, LaTeX is rather strict about how much extra inter-word
2044  spacing it will add in order to break a line.
2045  Preferably, you should rework the paragraph to avoid the problem.
2046  If this isn't an option, you can wrap your text in 
2047 \begin_inset Flex Code
2048 status collapsed
2049
2050 \begin_layout Plain Layout
2051
2052 \backslash
2053 sloppypar
2054 \end_layout
2055
2056 \end_inset
2057
2058  to make LaTeX's line breaking more, well, sloppy.
2059 \end_layout
2060
2061 \begin_layout Enumerate
2062 Did you go overboard with the nesting? LyX (currently) doesn't check to
2063  make sure you're in the limits for nesting environments.
2064  If you nested a bunch of environments to the 
2065 \begin_inset Formula $17^{\mathrm{th}}$
2066 \end_inset
2067
2068  level, that's the problem.
2069  (The limit in LaTeX is five.)
2070 \end_layout
2071
2072 \begin_layout Enumerate
2073 Okay, you didn't get any error messages, but your output looks awful.
2074  If you have a table or figure that's too wide or long for the page, you
2075  need to:
2076 \end_layout
2077
2078 \begin_deeper
2079 \begin_layout Enumerate
2080 rescale the figure so it fits.
2081 \end_layout
2082
2083 \begin_layout Enumerate
2084 trim down the table so it fits.
2085 \end_layout
2086
2087 \end_deeper
2088 \begin_layout Enumerate
2089 If something else is wrong with the output, and you didn't try to pull anything
2090  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2091 \end_layout
2092
2093 \begin_layout Standard
2094 If all this doesn't help—well, then 
2095 \emph on
2096 perhaps
2097 \emph default
2098  you might have found a bug in LyX\SpecialChar \ldots{}
2099 .
2100 \end_layout
2101
2102 \begin_layout Chapter
2103 Supplemental Tools
2104 \end_layout
2105
2106 \begin_layout Section
2107 Customizing Bibliographies with BibTeX
2108 \end_layout
2109
2110 \begin_layout Standard
2111 The most basic information about how to use BibTeX with LyX is contained
2112  in the section 
2113 \emph on
2114 Bibliography databases (BibTeX)
2115 \emph default
2116  of the 
2117 \emph on
2118 User's Guide
2119 \emph default
2120 .
2121  The following subsections explain special bibliography features supported
2122  by LyX.
2123 \end_layout
2124
2125 \begin_layout Subsection
2126 Alternative Citation Styles
2127 \end_layout
2128
2129 \begin_layout Standard
2130 Standard BibTeX uses numbers (e.
2131 \begin_inset space \thinspace{}
2132 \end_inset
2133
2134 g.
2135 \begin_inset space \space{}
2136 \end_inset
2137
2138
2139 \begin_inset Quotes eld
2140 \end_inset
2141
2142 [12]
2143 \begin_inset Quotes erd
2144 \end_inset
2145
2146 ) to refer to a cited work.
2147  However, in many scientific disciplines, other citation styles are in use.
2148  The most common one is the author-year style (e.
2149 \begin_inset space \thinspace{}
2150 \end_inset
2151
2152 g.
2153 \begin_inset space \space{}
2154 \end_inset
2155
2156
2157 \begin_inset Quotes eld
2158 \end_inset
2159
2160 Knuth 1984a
2161 \begin_inset Quotes erd
2162 \end_inset
2163
2164 ).
2165  LyX supports two packages that provide this style, 
2166 \begin_inset Flex Code
2167 status collapsed
2168
2169 \begin_layout Plain Layout
2170 natbib
2171 \end_layout
2172
2173 \end_inset
2174
2175  and 
2176 \begin_inset Flex Code
2177 status collapsed
2178
2179 \begin_layout Plain Layout
2180 jurabib
2181 \end_layout
2182
2183 \end_inset
2184
2185 .
2186  Both packages have their pros and cons, which cannot be listed in detail.
2187  If you only want to have simple author-year (or author-numerical) style,
2188  or if you want to use one of the countless style files for 
2189 \begin_inset Flex Code
2190 status collapsed
2191
2192 \begin_layout Plain Layout
2193 natbib
2194 \end_layout
2195
2196 \end_inset
2197
2198 , then the established 
2199 \begin_inset Flex Code
2200 status collapsed
2201
2202 \begin_layout Plain Layout
2203 natbib
2204 \end_layout
2205
2206 \end_inset
2207
2208  package is probably your choice.
2209  If you need special features like short title references, ibidem etc., you
2210  might consider the 
2211 \begin_inset Flex Code
2212 status collapsed
2213
2214 \begin_layout Plain Layout
2215 jurabib
2216 \end_layout
2217
2218 \end_inset
2219
2220  package.
2221 \end_layout
2222
2223 \begin_layout Standard
2224 The handling of both packages in LyX is basically the same.
2225  Go to 
2226 \begin_inset Flex MenuItem
2227 status collapsed
2228
2229 \begin_layout Plain Layout
2230 Document\SpecialChar \menuseparator
2231 Settings
2232 \end_layout
2233
2234 \end_inset
2235
2236  and select under 
2237 \begin_inset Flex MenuItem
2238 status collapsed
2239
2240 \begin_layout Plain Layout
2241 Bibliography
2242 \end_layout
2243
2244 \end_inset
2245
2246  the option 
2247 \begin_inset Flex MenuItem
2248 status collapsed
2249
2250 \begin_layout Plain Layout
2251 Natbib
2252 \end_layout
2253
2254 \end_inset
2255
2256  or 
2257 \begin_inset Flex MenuItem
2258 status collapsed
2259
2260 \begin_layout Plain Layout
2261 Jurabib
2262 \end_layout
2263
2264 \end_inset
2265
2266 .
2267  With both packages, you will get some extra features in the citation dialog
2268  and you can select the style of the reference (
2269 \begin_inset Quotes eld
2270 \end_inset
2271
2272 Knuth 1984
2273 \begin_inset Quotes erd
2274 \end_inset
2275
2276
2277 \begin_inset Quotes eld
2278 \end_inset
2279
2280 Knuth (1984)
2281 \begin_inset Quotes erd
2282 \end_inset
2283
2284
2285 \begin_inset Quotes eld
2286 \end_inset
2287
2288 Knuth, 1984
2289 \begin_inset Quotes erd
2290 \end_inset
2291
2292
2293 \begin_inset Quotes eld
2294 \end_inset
2295
2296 1984
2297 \begin_inset Quotes erd
2298 \end_inset
2299
2300  etc.).
2301  Note that both packages need specifically designed style files.
2302  They both ship their own, but there are lots of additional style files,
2303  and there is even an interactive style file builder
2304 \begin_inset Foot
2305 status collapsed
2306
2307 \begin_layout Plain Layout
2308 See 
2309 \begin_inset Flex URL
2310 status open
2311
2312 \begin_layout Plain Layout
2313
2314 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2315 \end_layout
2316
2317 \end_inset
2318
2319
2320 \end_layout
2321
2322 \end_inset
2323
2324  for 
2325 \begin_inset Flex Code
2326 status collapsed
2327
2328 \begin_layout Plain Layout
2329 natbib
2330 \end_layout
2331
2332 \end_inset
2333
2334 .
2335 \end_layout
2336
2337 \begin_layout Subsection
2338 Sectioned Bibliographies
2339 \end_layout
2340
2341 \begin_layout Standard
2342 Sometimes you might need to divide your bibliography into several sections.
2343  If you are for instance a historian, the possibility to separate sources
2344  and scientific works is most likely a 
2345 \begin_inset Quotes eld
2346 \end_inset
2347
2348 must have
2349 \begin_inset Quotes erd
2350 \end_inset
2351
2352 .
2353  Unfortunately, BibTeX itself does not allow you to do this.
2354  But with the help of some LaTeX packages, BibTeX can be extended to fit
2355  your needs.
2356 \end_layout
2357
2358 \begin_layout Standard
2359 LyX provides native support for one of these packages, 
2360 \family typewriter
2361 bibtopic
2362 \family default
2363 .
2364 \begin_inset Foot
2365 status collapsed
2366
2367 \begin_layout Plain Layout
2368 Available from 
2369 \begin_inset Flex URL
2370 status open
2371
2372 \begin_layout Plain Layout
2373
2374 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2375 \end_layout
2376
2377 \end_inset
2378
2379
2380 \end_layout
2381
2382 \end_inset
2383
2384  The advantage of this package (compared to other packages like 
2385 \family typewriter
2386 multibib
2387 \family default
2388 ) is that you don't need to define new citation commands.
2389  Instead, you need to prepare different bibliographic databases which include
2390  the entries for the different sections of the bibliography.
2391  For example: If you want to divide your bibliography into the sections
2392  
2393 \begin_inset Quotes eld
2394 \end_inset
2395
2396 Sources
2397 \begin_inset Quotes erd
2398 \end_inset
2399
2400  and 
2401 \begin_inset Quotes eld
2402 \end_inset
2403
2404 Scientific works
2405 \begin_inset Quotes erd
2406 \end_inset
2407
2408 , you first need to create two bibliographic databases, e.
2409 \begin_inset space \thinspace{}
2410 \end_inset
2411
2412 g.
2413 \begin_inset space \space{}
2414 \end_inset
2415
2416
2417 \begin_inset Flex Code
2418 status collapsed
2419
2420 \begin_layout Plain Layout
2421 sources.bib
2422 \end_layout
2423
2424 \end_inset
2425
2426  and 
2427 \begin_inset Flex Code
2428 status collapsed
2429
2430 \begin_layout Plain Layout
2431 scientific.bib
2432 \end_layout
2433
2434 \end_inset
2435
2436 .
2437  
2438 \end_layout
2439
2440 \begin_layout Standard
2441 Go to 
2442 \begin_inset Flex MenuItem
2443 status collapsed
2444
2445 \begin_layout Plain Layout
2446 Document\SpecialChar \menuseparator
2447 Settings
2448 \end_layout
2449
2450 \end_inset
2451
2452  and check under 
2453 \begin_inset Flex MenuItem
2454 status collapsed
2455
2456 \begin_layout Plain Layout
2457 Bibliography
2458 \end_layout
2459
2460 \end_inset
2461
2462  the option 
2463 \begin_inset Flex MenuItem
2464 status collapsed
2465
2466 \begin_layout Plain Layout
2467 Sectioned bibliography
2468 \end_layout
2469
2470 \end_inset
2471
2472 .
2473  Now you can insert multiple BibTeX bibliographies, one for each section
2474  of your bibliography.
2475  Returning to our example: Insert the BibTeX bibliography 
2476 \begin_inset Flex Code
2477 status collapsed
2478
2479 \begin_layout Plain Layout
2480 sources.bib
2481 \end_layout
2482
2483 \end_inset
2484
2485  and a second one for the database 
2486 \begin_inset Flex Code
2487 status collapsed
2488
2489 \begin_layout Plain Layout
2490 scientific.bib
2491 \end_layout
2492
2493 \end_inset
2494
2495 .
2496  You are free to use the same or different styles for each section.
2497  Additionally, you can choose if the bibliography section should contain
2498  
2499 \begin_inset Quotes eld
2500 \end_inset
2501
2502 all cited references
2503 \begin_inset Quotes erd
2504 \end_inset
2505
2506  of the specified database(s) (which is the default), 
2507 \begin_inset Quotes eld
2508 \end_inset
2509
2510 all uncited references
2511 \begin_inset Quotes erd
2512 \end_inset
2513
2514  or even 
2515 \begin_inset Quotes eld
2516 \end_inset
2517
2518 all references
2519 \begin_inset Quotes erd
2520 \end_inset
2521
2522 .
2523  This might be useful if you would like to separate your bibliography into
2524  three sections: 
2525 \begin_inset Quotes eld
2526 \end_inset
2527
2528 Cited sources
2529 \begin_inset Quotes erd
2530 \end_inset
2531
2532
2533 \begin_inset Quotes eld
2534 \end_inset
2535
2536 Uncited sources
2537 \begin_inset Quotes erd
2538 \end_inset
2539
2540 , and 
2541 \begin_inset Quotes eld
2542 \end_inset
2543
2544 Scientific works
2545 \begin_inset Quotes erd
2546 \end_inset
2547
2548 .
2549  The titles for the sections can be added as ordinary sections or subsections.
2550  Since 
2551 \begin_inset Flex Code
2552 status collapsed
2553
2554 \begin_layout Plain Layout
2555 bibtopic
2556 \end_layout
2557
2558 \end_inset
2559
2560  removes the bibliography title, you have to manually re-add that, too (as
2561  a chapter* or section*, for instance).
2562 \end_layout
2563
2564 \begin_layout Subsection
2565 Multiple Bibliographies
2566 \end_layout
2567
2568 \begin_layout Standard
2569 Multiple bibliographies, e.
2570 \begin_inset space \thinspace{}
2571 \end_inset
2572
2573 g.
2574 \begin_inset space \space{}
2575 \end_inset
2576
2577 a bibliography for each section or chapter of the document, are not supported
2578  by BibTeX itself.
2579  But the 
2580 \begin_inset Flex Code
2581 status collapsed
2582
2583 \begin_layout Plain Layout
2584 bibtopic
2585 \end_layout
2586
2587 \end_inset
2588
2589  package, which is used for the creation of sectioned bibliographies in
2590  LyX (see the previous section), provides an easy way to solve this task,
2591  if you are willing to use some 
2592 \begin_inset Flex MenuItem
2593 status collapsed
2594
2595 \begin_layout Plain Layout
2596 TeX Code
2597 \end_layout
2598
2599 \end_inset
2600
2601  (see section
2602 \begin_inset space ~
2603 \end_inset
2604
2605
2606 \begin_inset CommandInset ref
2607 LatexCommand ref
2608 reference "sec:Inserting-TeX-Code"
2609
2610 \end_inset
2611
2612 ).
2613 \begin_inset Foot
2614 status collapsed
2615
2616 \begin_layout Plain Layout
2617 An alternative approach is to use the 
2618 \begin_inset Flex Code
2619 status collapsed
2620
2621 \begin_layout Plain Layout
2622 chapterbib
2623 \end_layout
2624
2625 \end_inset
2626
2627  or 
2628 \begin_inset Flex Code
2629 status collapsed
2630
2631 \begin_layout Plain Layout
2632 bibunits
2633 \end_layout
2634
2635 \end_inset
2636
2637  package, respectively.
2638 \end_layout
2639
2640 \end_inset
2641
2642
2643 \end_layout
2644
2645 \begin_layout Standard
2646 First go to 
2647 \begin_inset Flex MenuItem
2648 status collapsed
2649
2650 \begin_layout Plain Layout
2651 Document\SpecialChar \menuseparator
2652 Settings
2653 \end_layout
2654
2655 \end_inset
2656
2657  and under 
2658 \begin_inset Flex MenuItem
2659 status collapsed
2660
2661 \begin_layout Plain Layout
2662 Bibliography
2663 \end_layout
2664
2665 \end_inset
2666
2667  check 
2668 \begin_inset Flex MenuItem
2669 status collapsed
2670
2671 \begin_layout Plain Layout
2672 Sectioned bibliography
2673 \end_layout
2674
2675 \end_inset
2676
2677 .
2678  In the document, you have to enclose the sections, which shall contain
2679  their own bibliography (including the BibTeX bibliography itself), between
2680  
2681 \begin_inset Flex Code
2682 status collapsed
2683
2684 \begin_layout Plain Layout
2685
2686 \backslash
2687 begin{btUnit}
2688 \end_layout
2689
2690 \end_inset
2691
2692  and 
2693 \begin_inset Flex Code
2694 status collapsed
2695
2696 \begin_layout Plain Layout
2697
2698 \backslash
2699 end{btUnit}
2700 \end_layout
2701
2702 \end_inset
2703
2704  (those commands have to be inserted as TeX code).
2705  The bibliography will contain all references that have been cited in the
2706  current 
2707 \begin_inset Flex Code
2708 status collapsed
2709
2710 \begin_layout Plain Layout
2711 btUnit
2712 \end_layout
2713
2714 \end_inset
2715
2716 .
2717  
2718 \series bold
2719 Note:
2720 \series default
2721  If you are using this approach, then every citation reference has to be
2722  inside some 
2723 \begin_inset Flex Code
2724 status collapsed
2725
2726 \begin_layout Plain Layout
2727 btUnit
2728 \end_layout
2729
2730 \end_inset
2731
2732 .
2733  Also, the 
2734 \begin_inset Flex Code
2735 status collapsed
2736
2737 \begin_layout Plain Layout
2738 btUnit
2739 \end_layout
2740
2741 \end_inset
2742
2743 s cannot be nested.
2744 \end_layout
2745
2746 \begin_layout Section
2747 Multipart Documents
2748 \end_layout
2749
2750 \begin_layout Subsection
2751 General Operation
2752 \end_layout
2753
2754 \begin_layout Standard
2755 When you are working on a large file with many sections, it is often convenient
2756  to break up the document into several files, or perhaps you have something
2757  where a table may change from time to time, but the preceding text does
2758  not.
2759  In these cases, you should seriously consider using multipart documents.
2760  For example, scientific papers often have five major sections: the introduction
2761 , observations, results, discussion, and conclusion.
2762  Each of these could be its own separate LyX file, with one 
2763 \begin_inset Quotes eld
2764 \end_inset
2765
2766 master
2767 \begin_inset Quotes erd
2768 \end_inset
2769
2770  file which contains the title, authors, abstract, references, etc., plus
2771  the five included files.
2772  It is important to note that each of these files is a full LyX file which
2773  can be formatted and printed on its own, as well as included in a master
2774  file.
2775  Each of these files must have the same document class, however—don't attempt
2776  to mix book classes with article classes.
2777  You may also include LaTeX files; however, these files must not have their
2778  own preamble (i.
2779 \begin_inset space \thinspace{}
2780 \end_inset
2781
2782 e.
2783 \begin_inset space \space{}
2784 \end_inset
2785
2786 everything up to and including the 
2787 \begin_inset Flex Code
2788 status collapsed
2789
2790 \begin_layout Plain Layout
2791
2792 \backslash
2793 begin{document}
2794 \end_layout
2795
2796 \end_inset
2797
2798  line as well as the 
2799 \begin_inset Flex Code
2800 status collapsed
2801
2802 \begin_layout Plain Layout
2803
2804 \backslash
2805 end{document}
2806 \end_layout
2807
2808 \end_inset
2809
2810  line must be deleted) or else errors will be generated when you try to
2811  make a DVI file.
2812 \end_layout
2813
2814 \begin_layout Standard
2815 LyX allows you to include files quite easily with 
2816 \begin_inset Flex MenuItem
2817 status collapsed
2818
2819 \begin_layout Plain Layout
2820 Insert\SpecialChar \menuseparator
2821 ChiId
2822 \begin_inset space ~
2823 \end_inset
2824
2825 Document
2826 \end_layout
2827
2828 \end_inset
2829
2830 .
2831  When you click on this selection a small box is inserted into the file
2832  at the current cursor location.
2833  Clicking on the box raises a dialog which allows you to select the file
2834  to be included, and the method of its inclusion.
2835  
2836 \end_layout
2837
2838 \begin_layout Standard
2839 The file selection box should by now be obvious.
2840  The three inclusion methods are 
2841 \begin_inset Quotes eld
2842 \end_inset
2843
2844 include
2845 \begin_inset Quotes erd
2846 \end_inset
2847
2848
2849 \begin_inset Quotes eld
2850 \end_inset
2851
2852 input
2853 \begin_inset Quotes erd
2854 \end_inset
2855
2856 , and 
2857 \begin_inset Quotes eld
2858 \end_inset
2859
2860 verbatim
2861 \begin_inset Quotes erd
2862 \end_inset
2863
2864 .
2865  The difference between 
2866 \begin_inset Quotes eld
2867 \end_inset
2868
2869 include
2870 \begin_inset Quotes erd
2871 \end_inset
2872
2873  and 
2874 \begin_inset Quotes eld
2875 \end_inset
2876
2877 input
2878 \begin_inset Quotes erd
2879 \end_inset
2880
2881  is really only meaningful to LaTeXperts, but the practical difference is
2882  that files that are 
2883 \begin_inset Quotes eld
2884 \end_inset
2885
2886 included
2887 \begin_inset Quotes erd
2888 \end_inset
2889
2890  are typeset beginning on a new page, while files that are 
2891 \begin_inset Quotes eld
2892 \end_inset
2893
2894 inputted
2895 \begin_inset Quotes erd
2896 \end_inset
2897
2898  are typeset starting on the current page.
2899 \end_layout
2900
2901 \begin_layout Standard
2902 Generally, the master file is converted into a full LaTeX file before typesettin
2903 g, while the included files are converted to LaTeX files that do not have
2904  all the preamble information.
2905 \end_layout
2906
2907 \begin_layout Standard
2908
2909 \begin_inset Quotes eld
2910 \end_inset
2911
2912 verbatim
2913 \begin_inset Quotes erd
2914 \end_inset
2915
2916  included file allows you to include a file typeset exactly as it appears
2917  in the file, i.
2918 \begin_inset space \thinspace{}
2919 \end_inset
2920
2921 e.
2922 \begin_inset space \space{}
2923 \end_inset
2924
2925 in 
2926 \begin_inset Flex Code
2927 status collapsed
2928
2929 \begin_layout Plain Layout
2930 verbatim
2931 \end_layout
2932
2933 \end_inset
2934
2935  mode, with the characters set in a fixed-width typewriter font.
2936  Normally, spaces in this file are invisible, though two consecutive spaces
2937  are conserved, unlike LyX's normal treatment of spaces.
2938  However, setting the 
2939 \begin_inset Flex MenuItem
2940 status collapsed
2941
2942 \begin_layout Plain Layout
2943 Mark
2944 \begin_inset space ~
2945 \end_inset
2946
2947 spaces
2948 \begin_inset space ~
2949 \end_inset
2950
2951 in
2952 \begin_inset space ~
2953 \end_inset
2954
2955 output
2956 \end_layout
2957
2958 \end_inset
2959
2960  checkbox typesets a mark to unambiguously define the presence of a space.
2961  
2962 \end_layout
2963
2964 \begin_layout Subsection
2965 Cross-References Between Files
2966 \end_layout
2967
2968 \begin_layout Standard
2969 \begin_inset Box Shadowbox
2970 position "t"
2971 hor_pos "c"
2972 has_inner_box 1
2973 inner_pos "t"
2974 use_parbox 0
2975 use_makebox 0
2976 width "100col%"
2977 special "none"
2978 height "1in"
2979 height_special "totalheight"
2980 status open
2981
2982 \begin_layout Plain Layout
2983 This section is somewhat out of date.
2984  Need to describe default master documents and how children are opened when
2985  the master is.
2986  [[FIXME]]
2987 \end_layout
2988
2989 \end_inset
2990
2991
2992 \end_layout
2993
2994 \begin_layout Standard
2995 It is possible to set up cross-references between the different files.
2996  First, open all the files in question: let's call them A and B in a two
2997  file example, where B is included in A.
2998  Let's say you insert a label in A, then want to reference it in B.
2999  Open the cross-reference dialog whilst in document B, and you can select
3000  the 
3001 \begin_inset Quotes eld
3002 \end_inset
3003
3004 buffer
3005 \begin_inset Quotes erd
3006 \end_inset
3007
3008  to use.
3009 \end_layout
3010
3011 \begin_layout Subsection
3012 Bibliography Lists in all Subdocuments
3013 \end_layout
3014
3015 \begin_layout Standard
3016 \begin_inset Box Frameless
3017 position "t"
3018 hor_pos "c"
3019 has_inner_box 1
3020 inner_pos "t"
3021 use_parbox 0
3022 use_makebox 0
3023 width "100col%"
3024 special "none"
3025 height "1in"
3026 height_special "totalheight"
3027 status open
3028
3029 \begin_layout Plain Layout
3030 This section also needs updating.
3031  There is now material about this on the wiki, and it could be copied here.
3032 \end_layout
3033
3034 \end_inset
3035
3036
3037 \end_layout
3038
3039 \begin_layout Standard
3040 Copy the bibliography list with all entries to all subdocuments and transform
3041  them to a comment.
3042  This way LyX will find the 
3043 \begin_inset Flex Code
3044 status collapsed
3045
3046 \begin_layout Plain Layout
3047 .bib
3048 \end_layout
3049
3050 \end_inset
3051
3052 -files and you can easily insert references without making the bibliography
3053  list visible.
3054 \end_layout
3055
3056 \begin_layout Standard
3057 As the bibliography list is in a comment, LaTeX won't use it and the references
3058  will look like this: [?], instead of like this: [1].
3059  One solution is to use the LaTeX-package 
3060 \begin_inset Flex Code
3061 status collapsed
3062
3063 \begin_layout Plain Layout
3064 comment
3065 \end_layout
3066
3067 \end_inset
3068
3069  that will only include comments by processing the files separately.
3070  To do this, add in the LaTeX preamble of every subdocument the following:
3071 \end_layout
3072
3073 \begin_layout LyX-Code
3074
3075 \backslash
3076 usepackage{comment}
3077 \end_layout
3078
3079 \begin_layout LyX-Code
3080
3081 \backslash
3082 includecomment{comment}
3083 \end_layout
3084
3085 \begin_layout Standard
3086 See also 
3087 \begin_inset Flex URL
3088 status collapsed
3089
3090 \begin_layout Plain Layout
3091
3092 http://wiki.lyx.org/FAQ/Unsorted#toc31
3093 \end_layout
3094
3095 \end_inset
3096
3097 .
3098 \end_layout
3099
3100 \begin_layout Section
3101 LyX Archives
3102 \end_layout
3103
3104 \begin_layout Standard
3105 Users sometimes need to be able to 
3106 \begin_inset Quotes eld
3107 \end_inset
3108
3109 bundle
3110 \begin_inset Quotes erd
3111 \end_inset
3112
3113  a LyX file together with all the images (and other files) on which it depends,
3114  either for sending to a publisher or for sharing with a co-author.
3115  LyX 2.0 includes a Python script (
3116 \begin_inset Flex Code
3117 status collapsed
3118
3119 \begin_layout Plain Layout
3120 lyxpak.py
3121 \end_layout
3122
3123 \end_inset
3124
3125 ) that automates this process.
3126  To use it, you must have either the 
3127 \begin_inset Flex Code
3128 status collapsed
3129
3130 \begin_layout Plain Layout
3131 zipfile
3132 \end_layout
3133
3134 \end_inset
3135
3136  or 
3137 \begin_inset Flex Code
3138 status collapsed
3139
3140 \begin_layout Plain Layout
3141 tarfile
3142 \end_layout
3143
3144 \end_inset
3145
3146  python modules installed on your system.
3147  By default, the script prefers the 
3148 \begin_inset Flex Code
3149 status collapsed
3150
3151 \begin_layout Plain Layout
3152 gzip
3153 \end_layout
3154
3155 \end_inset
3156
3157 -compressed 
3158 \begin_inset Flex Code
3159 status collapsed
3160
3161 \begin_layout Plain Layout
3162 tar
3163 \end_layout
3164
3165 \end_inset
3166
3167  format on Unix-like systems and the 
3168 \begin_inset Flex Code
3169 status collapsed
3170
3171 \begin_layout Plain Layout
3172 zip
3173 \end_layout
3174
3175 \end_inset
3176
3177  format on Windows.
3178 \end_layout
3179
3180 \begin_layout Standard
3181 LyX's configuration process will set the script up to export a `LyX Archive',
3182  and this format will then be available under 
3183 \begin_inset Flex Code
3184 status collapsed
3185
3186 \begin_layout Plain Layout
3187 File\SpecialChar \menuseparator
3188 Export
3189 \end_layout
3190
3191 \end_inset
3192
3193 .
3194 \end_layout
3195
3196 \begin_layout Standard
3197 Independently of the platform, the generation of a particular archive format
3198  can be forced by adding either the 
3199 \begin_inset Flex Code
3200 status collapsed
3201
3202 \begin_layout Plain Layout
3203 -t
3204 \end_layout
3205
3206 \end_inset
3207
3208  (for the 
3209 \begin_inset Flex Code
3210 status collapsed
3211
3212 \begin_layout Plain Layout
3213 tar
3214 \end_layout
3215
3216 \end_inset
3217
3218  format) or 
3219 \begin_inset Flex Code
3220 status collapsed
3221
3222 \begin_layout Plain Layout
3223 -z
3224 \end_layout
3225
3226 \end_inset
3227
3228  (for the 
3229 \begin_inset Flex Code
3230 status collapsed
3231
3232 \begin_layout Plain Layout
3233 zip
3234 \end_layout
3235
3236 \end_inset
3237
3238  format) switch to the 
3239 \begin_inset Flex Code
3240 status collapsed
3241
3242 \begin_layout Plain Layout
3243 LyX\SpecialChar \menuseparator
3244 LyX Archive
3245 \end_layout
3246
3247 \end_inset
3248
3249  converter in 
3250 \begin_inset Flex Code
3251 status collapsed
3252
3253 \begin_layout Plain Layout
3254 Tools\SpecialChar \menuseparator
3255 Preferences\SpecialChar \menuseparator
3256 File Handling\SpecialChar \menuseparator
3257 Converters
3258 \end_layout
3259
3260 \end_inset
3261
3262 .
3263  (Make sure you add the switch after the script name, not before it.)
3264 \end_layout
3265
3266 \begin_layout Section
3267 Fancy Headers and Footers
3268 \end_layout
3269
3270 \begin_layout Standard
3271 The default page layout is rather plain; for an 
3272 \begin_inset Flex Code
3273 status collapsed
3274
3275 \begin_layout Plain Layout
3276 article
3277 \end_layout
3278
3279 \end_inset
3280
3281  document class, all you get is a centered page number at the bottom of
3282  the page.
3283  This document uses KOMA-script's book class, so it appears to be a bit
3284  fancier.
3285  But to really put on a show, you need to set the document page style to
3286  
3287 \begin_inset Quotes eld
3288 \end_inset
3289
3290 fancy
3291 \begin_inset Quotes erd
3292 \end_inset
3293
3294 , as mentioned in the 
3295 \emph on
3296 User Guide
3297 \emph default
3298 .
3299  This section describes the LaTeX code you need to insert in your LaTeX
3300  preamble in order to get the desired effects.
3301 \end_layout
3302
3303 \begin_layout Standard
3304 For more information on fancy headers, see the 
3305 \begin_inset Flex Code
3306 status collapsed
3307
3308 \begin_layout Plain Layout
3309 fancyhdr
3310 \end_layout
3311
3312 \end_inset
3313
3314  package documentation.
3315  (
3316 \begin_inset Flex URL
3317 status collapsed
3318
3319 \begin_layout Plain Layout
3320
3321 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3322 \end_layout
3323
3324 \end_inset
3325
3326 )
3327 \end_layout
3328
3329 \begin_layout Standard
3330 The page header is divided into three fields, not surprisingly labeled 
3331 \begin_inset Quotes eld
3332 \end_inset
3333
3334 left
3335 \begin_inset Quotes erd
3336 \end_inset
3337
3338
3339 \begin_inset Quotes eld
3340 \end_inset
3341
3342 center
3343 \begin_inset Quotes erd
3344 \end_inset
3345
3346 , and 
3347 \begin_inset Quotes eld
3348 \end_inset
3349
3350 right
3351 \begin_inset Quotes erd
3352 \end_inset
3353
3354 .
3355  The footer is also divided into these three fields.
3356  The LaTeX commands to set these fields in the simplest manner are 
3357 \begin_inset Flex Code
3358 status collapsed
3359
3360 \begin_layout Plain Layout
3361
3362 \backslash
3363 lhead
3364 \end_layout
3365
3366 \end_inset
3367
3368
3369 \begin_inset Flex Code
3370 status collapsed
3371
3372 \begin_layout Plain Layout
3373
3374 \backslash
3375 chead
3376 \end_layout
3377
3378 \end_inset
3379
3380
3381 \begin_inset Flex Code
3382 status collapsed
3383
3384 \begin_layout Plain Layout
3385
3386 \backslash
3387 rhead
3388 \end_layout
3389
3390 \end_inset
3391
3392
3393 \begin_inset Flex Code
3394 status collapsed
3395
3396 \begin_layout Plain Layout
3397
3398 \backslash
3399 lfoot
3400 \end_layout
3401
3402 \end_inset
3403
3404 , etc.
3405  Suppose you wish to put your name in the upper left hand corner of each
3406  page.
3407  Simply insert the following command in the preamble: 
3408 \end_layout
3409
3410 \begin_layout Standard
3411
3412 \family typewriter
3413
3414 \backslash
3415 lhead{John Q.
3416  DocWriter}
3417 \end_layout
3418
3419 \begin_layout Standard
3420 You will now see your name in the upper left.
3421  If a field has a default entry that you would like to get rid of (often
3422  the page number appears in the central footer) simply include a command
3423  with a blank argument, e.
3424 \begin_inset space \thinspace{}
3425 \end_inset
3426
3427 g.:
3428 \end_layout
3429
3430 \begin_layout Standard
3431
3432 \family typewriter
3433
3434 \backslash
3435 cfoot{}
3436 \end_layout
3437
3438 \begin_layout Standard
3439 Let's get really fancy: lets put the section number with the word 
3440 \begin_inset Quotes eld
3441 \end_inset
3442
3443 Section
3444 \begin_inset Quotes erd
3445 \end_inset
3446
3447  (e.
3448 \begin_inset space \thinspace{}
3449 \end_inset
3450
3451 g.
3452 \begin_inset space \space{}
3453 \end_inset
3454
3455 Section 3) in the upper left, the page number (e.
3456 \begin_inset space \thinspace{}
3457 \end_inset
3458
3459 g.
3460 \begin_inset space \space{}
3461 \end_inset
3462
3463 Page 4) in the upper right, your name in the lower left, and the date in
3464  the lower right.
3465  The following commands should now appear in the preamble:
3466 \end_layout
3467
3468 \begin_layout Standard
3469
3470 \family typewriter
3471
3472 \backslash
3473 lhead{Section 
3474 \backslash
3475 thesection}
3476 \end_layout
3477
3478 \begin_layout Standard
3479
3480 \family typewriter
3481
3482 \backslash
3483 chead{}
3484 \end_layout
3485
3486 \begin_layout Standard
3487
3488 \family typewriter
3489
3490 \backslash
3491 rhead{Page 
3492 \backslash
3493 thepage}
3494 \end_layout
3495
3496 \begin_layout Standard
3497
3498 \family typewriter
3499
3500 \backslash
3501 lfoot{John Q.
3502  DocWriter}
3503 \end_layout
3504
3505 \begin_layout Standard
3506
3507 \family typewriter
3508
3509 \backslash
3510 cfoot{}
3511 \end_layout
3512
3513 \begin_layout Standard
3514
3515 \family typewriter
3516
3517 \backslash
3518 rfoot{
3519 \backslash
3520 today}
3521 \end_layout
3522
3523 \begin_layout Standard
3524 The commands 
3525 \begin_inset Flex Code
3526 status collapsed
3527
3528 \begin_layout Plain Layout
3529
3530 \backslash
3531 thesection
3532 \end_layout
3533
3534 \end_inset
3535
3536  and 
3537 \begin_inset Flex Code
3538 status collapsed
3539
3540 \begin_layout Plain Layout
3541
3542 \backslash
3543 thepage
3544 \end_layout
3545
3546 \end_inset
3547
3548  access LaTeX's section and page counters, and so print out the current
3549  section and page numbers.
3550  
3551 \begin_inset Flex Code
3552 status collapsed
3553
3554 \begin_layout Plain Layout
3555
3556 \backslash
3557 today
3558 \end_layout
3559
3560 \end_inset
3561
3562  simply prints out today's date.
3563 \end_layout
3564
3565 \begin_layout Standard
3566 The thicknesses of the horizontal rules drawn beneath the header and above
3567  the footer can also be modified.
3568  If you don't want one of the rules, set its thickness to 0.
3569  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3570  Use commands
3571 \family typewriter
3572  
3573 \family default
3574 like 
3575 \begin_inset Flex Code
3576 status collapsed
3577
3578 \begin_layout Plain Layout
3579
3580 \backslash
3581 renewcommand{
3582 \backslash
3583 headrulewidth}{0.4pt}
3584 \end_layout
3585
3586 \end_inset
3587
3588  and 
3589 \begin_inset Flex Code
3590 status collapsed
3591
3592 \begin_layout Plain Layout
3593
3594 \backslash
3595 renewcommand{
3596 \backslash
3597 footrulewidth}{0.4pt}
3598 \end_layout
3599
3600 \end_inset
3601
3602  to set the thicknesses.
3603 \end_layout
3604
3605 \begin_layout Standard
3606 You can switch the header/footer settings on and off for individual pages
3607  using commands like 
3608 \begin_inset Flex Code
3609 status collapsed
3610
3611 \begin_layout Plain Layout
3612
3613 \backslash
3614 thispagestyle{empty}
3615 \end_layout
3616
3617 \end_inset
3618
3619
3620 \begin_inset Flex Code
3621 status collapsed
3622
3623 \begin_layout Plain Layout
3624
3625 \backslash
3626 thispagestyle{plain}
3627 \end_layout
3628
3629 \end_inset
3630
3631 , and 
3632 \begin_inset Flex Code
3633 status collapsed
3634
3635 \begin_layout Plain Layout
3636
3637 \backslash
3638 thispagestyle{fancy}
3639 \end_layout
3640
3641 \end_inset
3642
3643 .
3644  Simply insert them in the text on the page you want changed and mark them
3645  as TeX code.
3646  In fact, title pages are marked as plain by default, while following pages
3647  are marked fancy when using the global fancy setting.
3648 \end_layout
3649
3650 \begin_layout Standard
3651 As a final example, it is possible to include an image in the header or
3652  footer.
3653  Suppose you want to put a company logo in the upper lefthand corner.
3654  You might try something like
3655 \end_layout
3656
3657 \begin_layout Standard
3658
3659 \family typewriter
3660
3661 \backslash
3662 lhead{
3663 \backslash
3664 resizebox{1in}{!}{
3665 \backslash
3666 includegraphics{logo.eps}}}
3667 \end_layout
3668
3669 \begin_layout Standard
3670 \noindent
3671 (you may need to preface this with 
3672 \begin_inset Flex Code
3673 status collapsed
3674
3675 \begin_layout Plain Layout
3676 \noindent
3677
3678 \backslash
3679 usepackage{graphics}
3680 \end_layout
3681
3682 \end_inset
3683
3684  if you don't include graphics elsewhere in your document).
3685 \end_layout
3686
3687 \begin_layout Section
3688 Itemize Bullet Selection
3689 \begin_inset CommandInset label
3690 LatexCommand label
3691 name "sec:bullet"
3692
3693 \end_inset
3694
3695
3696 \end_layout
3697
3698 \begin_layout Standard
3699 by
3700 \noun on
3701  Allan Rae
3702 \end_layout
3703
3704 \begin_layout Subsection
3705 Introduction
3706 \end_layout
3707
3708 \begin_layout Standard
3709 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3710  Using this dialog you can easily specify what bullet shape to use at each
3711  level of an itemized list.
3712  These settings are document-wide so you won't be able to specify different
3713  sets of bullets for different paragraphs.
3714 \begin_inset Foot
3715 status collapsed
3716
3717 \begin_layout Plain Layout
3718 Well, actually you can but you'll have to do it by hand.
3719 \end_layout
3720
3721 \end_inset
3722
3723
3724 \end_layout
3725
3726 \begin_layout Subsection
3727 How it looks
3728 \end_layout
3729
3730 \begin_layout Standard
3731 Open the dialog by selecting the 
3732 \begin_inset Flex MenuItem
3733 status collapsed
3734
3735 \begin_layout Plain Layout
3736 Document\SpecialChar \menuseparator
3737 Settings
3738 \end_layout
3739
3740 \end_inset
3741
3742  menu item and then select the 
3743 \begin_inset Flex MenuItem
3744 status collapsed
3745
3746 \begin_layout Plain Layout
3747 Bullets
3748 \end_layout
3749
3750 \end_inset
3751
3752  tab.
3753 \end_layout
3754
3755 \begin_layout Standard
3756 The dialog provides you with a table of bullet shapes.
3757  A column of buttons on the left of the table provides access to the six
3758  different panels of bullet shapes.
3759  The row of buttons across the top is used to select which bullet depth
3760  you are changing.
3761  A text entry under the table shows the currently selected bullet shape's
3762  LaTeX equivalent and this can be edited if desired.
3763  If you do modify the text you will also need to specify any needed packages
3764  in the LaTeX preamble.
3765 \end_layout
3766
3767 \begin_layout Standard
3768 The six panels are divided up by the packages they require.
3769  The following table shows the mappings from button name to LaTeX package.
3770 \end_layout
3771
3772 \begin_layout Standard
3773 \align center
3774 \begin_inset Tabular
3775 <lyxtabular version="3" rows="7" columns="2">
3776 <features rotate="0" tabularvalignment="middle">
3777 <column alignment="center" valignment="top" width="0pt">
3778 <column alignment="center" valignment="top" width="0pt">
3779 <row>
3780 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3781 \begin_inset Text
3782
3783 \begin_layout Plain Layout
3784
3785 \family roman
3786 \series medium
3787 \shape up
3788 \size normal
3789 \emph off
3790 \bar no
3791 \noun off
3792 \color none
3793 Button
3794 \end_layout
3795
3796 \end_inset
3797 </cell>
3798 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3799 \begin_inset Text
3800
3801 \begin_layout Plain Layout
3802
3803 \family roman
3804 \series medium
3805 \shape up
3806 \size normal
3807 \emph off
3808 \bar no
3809 \noun off
3810 \color none
3811 Packages Required
3812 \end_layout
3813
3814 \end_inset
3815 </cell>
3816 </row>
3817 <row>
3818 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3819 \begin_inset Text
3820
3821 \begin_layout Plain Layout
3822
3823 \family sans
3824 \series medium
3825 \shape up
3826 \size normal
3827 \emph off
3828 \bar no
3829 \noun off
3830 \color none
3831 Standard
3832 \end_layout
3833
3834 \end_inset
3835 </cell>
3836 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3837 \begin_inset Text
3838
3839 \begin_layout Plain Layout
3840
3841 \series medium
3842 \shape up
3843 \size normal
3844 \emph off
3845 \bar no
3846 \noun off
3847 \color none
3848 base LaTeX
3849 \end_layout
3850
3851 \end_inset
3852 </cell>
3853 </row>
3854 <row>
3855 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3856 \begin_inset Text
3857
3858 \begin_layout Plain Layout
3859
3860 \family sans
3861 \series medium
3862 \shape up
3863 \size normal
3864 \emph off
3865 \bar no
3866 \noun off
3867 \color none
3868 Maths
3869 \end_layout
3870
3871 \end_inset
3872 </cell>
3873 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3874 \begin_inset Text
3875
3876 \begin_layout Plain Layout
3877
3878 \family typewriter
3879 \series medium
3880 \shape up
3881 \size normal
3882 \emph off
3883 \bar no
3884 \noun off
3885 \color none
3886 amssymb.sty
3887 \end_layout
3888
3889 \end_inset
3890 </cell>
3891 </row>
3892 <row>
3893 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3894 \begin_inset Text
3895
3896 \begin_layout Plain Layout
3897
3898 \family sans
3899 \series medium
3900 \shape up
3901 \size normal
3902 \emph off
3903 \bar no
3904 \noun off
3905 \color none
3906 Ding1
3907 \end_layout
3908
3909 \end_inset
3910 </cell>
3911 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3912 \begin_inset Text
3913
3914 \begin_layout Plain Layout
3915
3916 \family typewriter
3917 \series medium
3918 \shape up
3919 \size normal
3920 \emph off
3921 \bar no
3922 \noun off
3923 \color none
3924 pifont.sty
3925 \end_layout
3926
3927 \end_inset
3928 </cell>
3929 </row>
3930 <row>
3931 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3932 \begin_inset Text
3933
3934 \begin_layout Plain Layout
3935
3936 \family sans
3937 \series medium
3938 \shape up
3939 \size normal
3940 \emph off
3941 \bar no
3942 \noun off
3943 \color none
3944 Ding2
3945 \end_layout
3946
3947 \end_inset
3948 </cell>
3949 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3950 \begin_inset Text
3951
3952 \begin_layout Plain Layout
3953
3954 \family typewriter
3955 \series medium
3956 \shape up
3957 \size normal
3958 \emph off
3959 \bar no
3960 \noun off
3961 \color none
3962 pifont.sty
3963 \end_layout
3964
3965 \end_inset
3966 </cell>
3967 </row>
3968 <row>
3969 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3970 \begin_inset Text
3971
3972 \begin_layout Plain Layout
3973
3974 \family sans
3975 \series medium
3976 \shape up
3977 \size normal
3978 \emph off
3979 \bar no
3980 \noun off
3981 \color none
3982 Ding3
3983 \end_layout
3984
3985 \end_inset
3986 </cell>
3987 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3988 \begin_inset Text
3989
3990 \begin_layout Plain Layout
3991
3992 \family typewriter
3993 \series medium
3994 \shape up
3995 \size normal
3996 \emph off
3997 \bar no
3998 \noun off
3999 \color none
4000 pifont.sty
4001 \end_layout
4002
4003 \end_inset
4004 </cell>
4005 </row>
4006 <row>
4007 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4008 \begin_inset Text
4009
4010 \begin_layout Plain Layout
4011
4012 \family sans
4013 \series medium
4014 \shape up
4015 \size normal
4016 \emph off
4017 \bar no
4018 \noun off
4019 \color none
4020 Ding4
4021 \end_layout
4022
4023 \end_inset
4024 </cell>
4025 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4026 \begin_inset Text
4027
4028 \begin_layout Plain Layout
4029
4030 \family typewriter
4031 \series medium
4032 \shape up
4033 \size normal
4034 \emph off
4035 \bar no
4036 \noun off
4037 \color none
4038 pifont.sty
4039 \end_layout
4040
4041 \end_inset
4042 </cell>
4043 </row>
4044 </lyxtabular>
4045
4046 \end_inset
4047
4048
4049 \end_layout
4050
4051 \begin_layout Standard
4052 LyX doesn't stop you using bullets from packages you don't have.
4053  If you get errors from LaTeX when you try to view or print the file, then
4054  it is likely you are missing a package.
4055 \begin_inset Foot
4056 status collapsed
4057
4058 \begin_layout Plain Layout
4059 LyX doesn't restrict your use since you may be editing locally and exporting
4060  elsewhere.
4061 \end_layout
4062
4063 \end_inset
4064
4065
4066 \end_layout
4067
4068 \begin_layout Subsection
4069 How to use it
4070 \end_layout
4071
4072 \begin_layout Standard
4073 Select which bullet depth you want to change then select the bullet shape
4074  and size.
4075  Any changes will not be visible in LyX, but are visible when viewing the
4076  document.
4077 \end_layout
4078
4079 \begin_layout Standard
4080 You can reset a bullet shape to the default simply by clicking your right
4081  mouse button on the appropriate bullet depth button.
4082 \begin_inset Foot
4083 status collapsed
4084
4085 \begin_layout Plain Layout
4086 If you 
4087 \emph on
4088 really
4089 \emph default
4090  want to have multiple sets of paragraphs with different sets of bullets
4091  in each, then you're going to have to get your hands dirty with TeX code.
4092  The bullet selection dialog can help though because it provides you with
4093  the LaTeX code for a wide range of bullet shapes.
4094  To make your own custom paragraphs you have the following options:
4095 \end_layout
4096
4097 \begin_layout Plain Layout
4098 \begin_inset ERT
4099 status open
4100
4101 \begin_layout Plain Layout
4102
4103
4104 \backslash
4105 let
4106 \backslash
4107 savelabelitemi=
4108 \backslash
4109 labelitemi
4110 \end_layout
4111
4112 \end_inset
4113
4114
4115 \end_layout
4116
4117 \begin_layout Plain Layout
4118 \begin_inset ERT
4119 status open
4120
4121 \begin_layout Plain Layout
4122
4123
4124 \backslash
4125 renewcommand
4126 \backslash
4127 labelitemi[0]{
4128 \backslash
4129 small
4130 \backslash
4131 (
4132 \backslash
4133 sharp
4134 \backslash
4135 )}
4136 \end_layout
4137
4138 \end_inset
4139
4140
4141 \end_layout
4142
4143 \begin_layout Itemize
4144 Use the LaTeX command 
4145 \begin_inset Flex Code
4146 status collapsed
4147
4148 \begin_layout Plain Layout
4149
4150 \backslash
4151 renewcommand{}{}
4152 \end_layout
4153
4154 \end_inset
4155
4156  to specify a new bullet shape for a given depth.
4157  You'll also need to save the current bullet shape so you can restore it
4158  again afterwards.
4159  In this itemized list the following LaTeX code was used to change the bullet
4160  used for the first depth.
4161 \end_layout
4162
4163 \begin_deeper
4164 \begin_layout LyX-Code
4165
4166 \backslash
4167 let
4168 \backslash
4169 savelabelitemi=
4170 \backslash
4171 labelitemi 
4172 \end_layout
4173
4174 \begin_layout LyX-Code
4175
4176 \backslash
4177 renewcommand
4178 \backslash
4179 labelitemi[0]{
4180 \backslash
4181 small
4182 \backslash
4183 (
4184 \backslash
4185 sharp
4186 \backslash
4187 )}
4188 \end_layout
4189
4190 \end_deeper
4191 \begin_layout Itemize
4192 Note that the itemize depth is specified in Roman numerals as part of the
4193  
4194 \family typewriter
4195
4196 \backslash
4197 labelitem
4198 \family default
4199  command.
4200 \end_layout
4201
4202 \begin_layout Itemize
4203 \begin_inset ERT
4204 status open
4205
4206 \begin_layout Plain Layout
4207
4208 [
4209 \backslash
4210 (
4211 \backslash
4212 star
4213 \backslash
4214 )]
4215 \end_layout
4216
4217 \end_inset
4218
4219  Specify each individual entry by starting each item with the bullet shape
4220  enclosed in square brackets and set as 
4221 \begin_inset Flex MenuItem
4222 status collapsed
4223
4224 \begin_layout Plain Layout
4225 TeX Code
4226 \end_layout
4227
4228 \end_inset
4229
4230 .
4231  For example, this item was started with 
4232 \begin_inset Flex Code
4233 status collapsed
4234
4235 \begin_layout Plain Layout
4236 [
4237 \backslash
4238 (
4239 \backslash
4240 star
4241 \backslash
4242 )]
4243 \end_layout
4244
4245 \end_inset
4246
4247 .
4248 \end_layout
4249
4250 \begin_layout Plain Layout
4251 \begin_inset ERT
4252 status open
4253
4254 \begin_layout Plain Layout
4255
4256
4257 \backslash
4258 renewcommand
4259 \backslash
4260 labelitemi[0]{
4261 \backslash
4262 savelabelitemi}
4263 \end_layout
4264
4265 \end_inset
4266
4267
4268 \end_layout
4269
4270 \begin_layout Plain Layout
4271 You'll also need to revert the labelitem back to its previous setting for
4272  the global bullet shape settings to remain in effect.
4273  The way used here was:
4274 \end_layout
4275
4276 \begin_layout LyX-Code
4277
4278 \backslash
4279 renewcommand
4280 \backslash
4281 labelitemi[0]{
4282 \backslash
4283 savelabelitemi}
4284 \end_layout
4285
4286 \end_inset
4287
4288
4289 \end_layout
4290
4291 \begin_layout Chapter
4292 LyX and the World Wide Web
4293 \end_layout
4294
4295 \begin_layout Standard
4296 LyX has long supported the export of documents to various web-friendly formats,
4297  such as HTML.
4298  Before verson 2.0, however, HTML export was always accomplished by the use
4299  of external converters.
4300 \begin_inset Foot
4301 status collapsed
4302
4303 \begin_layout Plain Layout
4304 For details on the use of external converters with LyX, see the 
4305 \emph on
4306 Converters
4307 \emph default
4308  section of the Customization manual.
4309 \end_layout
4310
4311 \end_inset
4312
4313  These fall into two large groups: there are converters that use LaTeX as
4314  an intermediate format, such as 
4315 \begin_inset Flex Code
4316 status collapsed
4317
4318 \begin_layout Plain Layout
4319 htlatex
4320 \end_layout
4321
4322 \end_inset
4323
4324
4325 \begin_inset Flex Code
4326 status collapsed
4327
4328 \begin_layout Plain Layout
4329 html2latex
4330 \end_layout
4331
4332 \end_inset
4333
4334 , and 
4335 \begin_inset Flex Code
4336 status collapsed
4337
4338 \begin_layout Plain Layout
4339 plastex
4340 \end_layout
4341
4342 \end_inset
4343
4344 , relying upon LyX to produce the LaTeX; and there is a converter that works
4345  directly on LyX files, 
4346 \begin_inset Flex Code
4347 status collapsed
4348
4349 \begin_layout Plain Layout
4350 eLyXer
4351 \end_layout
4352
4353 \end_inset
4354
4355 .
4356  All of these have different advantages and disadvantages.
4357  
4358 \end_layout
4359
4360 \begin_layout Standard
4361 The LaTeX-based converters have the advantage that, in principle, they know
4362  everything about the exported document that LaTeX does.
4363  Such converters do not care, for example, if a certain block of code was
4364  produced by LyX or was Evil Red Text.
4365  These converters know about 
4366 \begin_inset Flex Code
4367 status collapsed
4368
4369 \begin_layout Plain Layout
4370 aux
4371 \end_layout
4372
4373 \end_inset
4374
4375  files, counters, and references, and can often make use of the 
4376 \begin_inset Flex Code
4377 status collapsed
4378
4379 \begin_layout Plain Layout
4380 bbl
4381 \end_layout
4382
4383 \end_inset
4384
4385  files generated by BibTeX.
4386  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4387  said that only TeX itself understands TeX---and LaTeX-based converters
4388  will often choke on what seem to be quite simple constructs; complex ones
4389  can throw them completely, and as of this writing, for example, the 
4390 \emph on
4391 Embedded Objects
4392 \emph default
4393  manual will not export with 
4394 \begin_inset Flex Code
4395 status collapsed
4396
4397 \begin_layout Plain Layout
4398 htlatex
4399 \end_layout
4400
4401 \end_inset
4402
4403 , though the others will.
4404  The other issue concerns how math is handled.
4405  These converters typically convert the formulae into little pictures that
4406  are then linked from the HTML document.
4407  Since these are actually generated by LaTeX, they are accurate.
4408  But they do not scale well, and just getting them to look as if they are
4409  actually meant to be in your document---so that the font sizes seem to
4410  be roughly the same---can be a challenge.
4411 \end_layout
4412
4413 \begin_layout Standard
4414 Alex Fernandez's 
4415 \begin_inset Flex Code
4416 status collapsed
4417
4418 \begin_layout Plain Layout
4419 eLyXer
4420 \end_layout
4421
4422 \end_inset
4423
4424  (
4425 \begin_inset CommandInset href
4426 LatexCommand href
4427 name "http://elyxer.nongnu.org/"
4428 target "http://elyxer.nongnu.org/"
4429
4430 \end_inset
4431
4432 ) solves some of these problems.
4433  In particular, the formulae it produces scale perfectly, since it renders
4434  math using a combination of HTML and CSS rather than converting the formulae
4435  to images.
4436  But even moderately complex formula are rendered less well than with 
4437 \begin_inset Flex Code
4438 status collapsed
4439
4440 \begin_layout Plain Layout
4441 htlatex
4442 \end_layout
4443
4444 \end_inset
4445
4446 ; this reflects the limitations of HTML.
4447 \begin_inset Foot
4448 status collapsed
4449
4450 \begin_layout Plain Layout
4451 That said, 
4452 \begin_inset Flex Code
4453 status collapsed
4454
4455 \begin_layout Plain Layout
4456 eLyXer
4457 \end_layout
4458
4459 \end_inset
4460
4461  can also use jsMath and MathJax for equations, but this setting is only
4462  available globally and requires one to have access to a server that runs
4463  the backend.
4464 \end_layout
4465
4466 \end_inset
4467
4468  More importantly (as of version 1.1.1, at least), 
4469 \begin_inset Flex Code
4470 status collapsed
4471
4472 \begin_layout Plain Layout
4473 eLyXer
4474 \end_layout
4475
4476 \end_inset
4477
4478  has limited support for math macros and no support for user-defined paragraph
4479  or character styles.
4480  These limitations make 
4481 \begin_inset Flex Code
4482 status collapsed
4483
4484 \begin_layout Plain Layout
4485 eLyXer
4486 \end_layout
4487
4488 \end_inset
4489
4490  unsuitable for many of the documents LyX users produce.
4491  In principle, of course, these problems could be solved, but the LyX developers
4492  have decided to follow a different path and have made LyX itself capable
4493  of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4494  plaintext.
4495 \end_layout
4496
4497 \begin_layout Standard
4498 As of this writing, XHTML output remains under development and should probably
4499  be regarded as 
4500 \begin_inset Quotes eld
4501 \end_inset
4502
4503 experimental
4504 \begin_inset Quotes erd
4505 \end_inset
4506
4507 .
4508 \begin_inset Foot
4509 status collapsed
4510
4511 \begin_layout Plain Layout
4512 The file 
4513 \begin_inset Flex Code
4514 status collapsed
4515
4516 \begin_layout Plain Layout
4517 development/HTML.notes
4518 \end_layout
4519
4520 \end_inset
4521
4522 , which can be found in the LyX source tree or 
4523 \begin_inset CommandInset href
4524 LatexCommand href
4525 name "accessed online"
4526 target "http://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
4527
4528 \end_inset
4529
4530 , usually contains up-to-date information about the state of XHTML output.
4531  See also the list of XHTML bugs on 
4532 \begin_inset CommandInset href
4533 LatexCommand href
4534 name "the bug tracker"
4535 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"
4536
4537 \end_inset
4538
4539 .
4540 \end_layout
4541
4542 \end_inset
4543
4544  Still, the developers have chosen this approach because it has several
4545  potential advantages over the other two.
4546 \end_layout
4547
4548 \begin_layout Standard
4549 These advantages are primarily due to the fact that the XHTML output routines,
4550  since they are part of LyX, know everything LyX knows about the document
4551  being exported.
4552 \begin_inset Foot
4553 status collapsed
4554
4555 \begin_layout Plain Layout
4556 Another advantage is that, since these routines are internal to LyX, they
4557  are immune to changes in LyX's file format, or to changes in the semantics
4558  of existing insets.
4559 \end_layout
4560
4561 \end_inset
4562
4563  So they know about the table of contents (as displayed in the outline),
4564  about the counters associated with different paragraph styles, and about
4565  user-defined styles.
4566  The XHTML output routines know what LyX knows about internationalization,
4567  too, so they will output 
4568 \begin_inset Quotes eld
4569 \end_inset
4570
4571 Chapter 1
4572 \begin_inset Quotes erd
4573 \end_inset
4574
4575  or 
4576 \begin_inset Quotes eld
4577 \end_inset
4578
4579
4580 \lang ngerman
4581 Kapitel
4582 \lang english
4583  1
4584 \begin_inset Quotes erd
4585 \end_inset
4586
4587 , depending upon the language in effect at the time.
4588  
4589 \end_layout
4590
4591 \begin_layout Standard
4592 Quite generally, the output routines know what LyX knows about document
4593  layout, that is, about how the document is to be rendered on screen.
4594  We use this information when we output the document as XHTML.
4595  In particular, LyX 
4596 \emph on
4597 automatically
4598 \emph default
4599  generates CSS style information corresponding to the layout information
4600  it uses to render the document on screen: if section headings are supposed
4601  to be sans-serif and bold as seen in LyX, then (by default) they will be
4602  sans-serif and bold when viewed in a web browser, too.
4603  And this is true not just for pre-defined styles, like Section, but for
4604  any style, including user-defined styles.
4605  Indeed, the XHTML output routines make no distinction between user-defined
4606  paragraph and character styles and LyX's own pre-defined styles: in each
4607  case, everything LyX knows about the styles is contained in the layout
4608  files.
4609  And much the same is true as regards pre-defined textual insets, such as
4610  footnotes, and various custom insets.
4611  
4612 \end_layout
4613
4614 \begin_layout Standard
4615 The result is that XHTML output can be customized and extended in exactly
4616  the same way LaTeX output can be customized and extended: through layout
4617  files and modules.
4618  See chapter five of the 
4619 \emph on
4620 Customization 
4621 \emph default
4622 manual for the details.
4623 \end_layout
4624
4625 \begin_layout Standard
4626 The remainder of this chapter contains more detailed information on XHTML
4627  output, its limitations, and ways to work around those limitations.
4628 \end_layout
4629
4630 \begin_layout Section
4631 Math Output in XHTML
4632 \end_layout
4633
4634 \begin_layout Standard
4635 LyX offers four choices for how math is rendered.
4636  These have various advantages and disadvantages:
4637 \end_layout
4638
4639 \begin_layout Itemize
4640 MathML
4641 \begin_inset Newline newline
4642 \end_inset
4643
4644 MathML is a dialect of XML designed specifically for mathematics on the
4645  web, and it typically renders very well in browsers that support it.
4646  The disadvantage is that not all browsers support MathML, and support is
4647  not complete even in the Gecko-based browsers, such as Firefox.
4648 \begin_inset Newline newline
4649 \end_inset
4650
4651 If LyX is unable to render a formula as MathML---for example, if the formula
4652  uses the 
4653 \begin_inset Flex Code
4654 status collapsed
4655
4656 \begin_layout Plain Layout
4657 xymatrix
4658 \end_layout
4659
4660 \end_inset
4661
4662  package or ERT---then it will instead output the formula as an image.
4663  
4664 \end_layout
4665
4666 \begin_layout Itemize
4667 HTML
4668 \begin_inset Newline newline
4669 \end_inset
4670
4671 As mentioned above, 
4672 \begin_inset Flex Code
4673 status collapsed
4674
4675 \begin_layout Plain Layout
4676 elyxer
4677 \end_layout
4678
4679 \end_inset
4680
4681  outputs math as HTML, styled by CSS.
4682 \begin_inset Foot
4683 status collapsed
4684
4685 \begin_layout Plain Layout
4686 LyX has borrowed some of the CSS for its HTML output from 
4687 \begin_inset Flex Code
4688 status collapsed
4689
4690 \begin_layout Plain Layout
4691 elyxer
4692 \end_layout
4693
4694 \end_inset
4695
4696 .
4697 \end_layout
4698
4699 \end_inset
4700
4701  For simple formulae, this can work quite well, though with more complicated
4702  formulae it tends to break down.
4703  Still, this method has the advantage that it is very widely supported and
4704  so it may be appropriate for documents that contain only a little, fairly
4705  simple math.
4706 \begin_inset Newline newline
4707 \end_inset
4708
4709 If Lyx is unable to render a formula as HTML---for example, if the formula
4710  uses the 
4711 \begin_inset Flex Code
4712 status collapsed
4713
4714 \begin_layout Plain Layout
4715 xymatrix
4716 \end_layout
4717
4718 \end_inset
4719
4720  package or ERT---then it will instead output the formula as an image.
4721  
4722 \end_layout
4723
4724 \begin_layout Itemize
4725 Images
4726 \begin_inset Newline newline
4727 \end_inset
4728
4729 Like 
4730 \begin_inset Flex Code
4731 status collapsed
4732
4733 \begin_layout Plain Layout
4734 htlatex
4735 \end_layout
4736
4737 \end_inset
4738
4739 , LyX will output formulae as images, the very same images, in fact, that
4740  are used for instant preview.
4741 \begin_inset Foot
4742 status collapsed
4743
4744 \begin_layout Plain Layout
4745 Instant preview does 
4746 \emph on
4747 not 
4748 \emph default
4749 have to be on for images to be output, however.
4750 \end_layout
4751
4752 \end_inset
4753
4754  The advantage to this method is that the images are simply generated by
4755  LaTeX, so they are very accurate.
4756  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4757  so they do not scale terribly well, and one cannot copy them, etc.
4758  (As of this writing, there are also problems about equation numbering.
4759  See 
4760 \begin_inset CommandInset href
4761 LatexCommand href
4762 name "bug 6894"
4763 target "http://www.lyx.org/trac/ticket/6894"
4764
4765 \end_inset
4766
4767 .)
4768 \begin_inset Newline newline
4769 \end_inset
4770
4771 The size of the images can be controlled by setting the 
4772 \begin_inset Quotes eld
4773 \end_inset
4774
4775 Math Images Scaling
4776 \begin_inset Quotes erd
4777 \end_inset
4778
4779  parameter under 
4780 \begin_inset Flex MenuItem
4781 status collapsed
4782
4783 \begin_layout Plain Layout
4784 Document\SpecialChar \menuseparator
4785 Settings\SpecialChar \menuseparator
4786 Output
4787 \end_layout
4788
4789 \end_inset
4790
4791 .
4792 \begin_inset Foot
4793 status collapsed
4794
4795 \begin_layout Plain Layout
4796 For those who want to know, this controls the resolution of the image in
4797  dots per inch and is based upon a default of 75 dpi.
4798 \end_layout
4799
4800 \end_inset
4801
4802
4803 \begin_inset Newline newline
4804 \end_inset
4805
4806 If LyX for some reason fails to create an image for a formula (e.g., if a
4807  required LaTeX package is not installed), then it will fall back to outputing
4808  the raw LaTeX.
4809 \end_layout
4810
4811 \begin_layout Itemize
4812 LaTeX
4813 \begin_inset Newline newline
4814 \end_inset
4815
4816 Finally, LyX will happily output math as LaTeX.
4817  As well as being the output of last resort, this method can be used with
4818  such tools as 
4819 \begin_inset CommandInset href
4820 LatexCommand href
4821 name "jsMath"
4822 target "http://www.math.union.edu/~dpvc/jsMath/"
4823
4824 \end_inset
4825
4826 , which uses JavaScript to render LaTeX embedded in HTML documents.
4827  LyX wraps the LaTeX in either a 
4828 \begin_inset Flex Code
4829 status collapsed
4830
4831 \begin_layout Plain Layout
4832 span
4833 \end_layout
4834
4835 \end_inset
4836
4837  (for inline formulas) or 
4838 \begin_inset Flex Code
4839 status collapsed
4840
4841 \begin_layout Plain Layout
4842 div
4843 \end_layout
4844
4845 \end_inset
4846
4847  (for displayed formulas) with 
4848 \begin_inset Flex Code
4849 status collapsed
4850
4851 \begin_layout Plain Layout
4852 class='math'
4853 \end_layout
4854
4855 \end_inset
4856
4857 , as is required for jsMath.
4858 \end_layout
4859
4860 \begin_layout Standard
4861 One of these output methods must be selected under 
4862 \begin_inset Flex MenuItem
4863 status collapsed
4864
4865 \begin_layout Plain Layout
4866 Document\SpecialChar \menuseparator
4867 Settings\SpecialChar \menuseparator
4868 Output
4869 \end_layout
4870
4871 \end_inset
4872
4873 .
4874  By default, LyX outputs MathML.
4875  This is a document-wide setting, therefore.
4876 \end_layout
4877
4878 \begin_layout Standard
4879 Eventually, LyX will offer the user the option to select an alternate output
4880  method for a particular inset, say, one that isn't being rendered very
4881  well by MathML.
4882 \begin_inset Foot
4883 status collapsed
4884
4885 \begin_layout Plain Layout
4886 That said, since LyX falls back to images if the inset contains ERT, then
4887  one can force output as an image by putting some harmless ERT into the
4888  math, for example: 
4889 \begin_inset Formula $a=b\relax$
4890 \end_inset
4891
4892 .
4893 \end_layout
4894
4895 \end_inset
4896
4897
4898 \end_layout
4899
4900 \begin_layout Section
4901 Bibliography and Citations
4902 \end_layout
4903
4904 \begin_layout Standard
4905 XHTML output fully supports bibliographies and citations.
4906  
4907 \end_layout
4908
4909 \begin_layout Standard
4910 Citation labels are generated by the same machinery that generates LyX's
4911  on-screen labels, so the labels will look in the output much as they do
4912  in LyX, though better.
4913  If you are using numerical citations, then LyX will output numerical labels,
4914  such as [1] or [17], rather than simply showing the citation key in square
4915  brackets, as it does on-screen.
4916  If you are using author-year citations, then LyX will add lowercase letters
4917  to the years, just as BibTeX does, if it finds more than one citation for
4918  a given author-year combination.
4919  The labels will be printed with the bibliography entries.
4920  Note that there is, at present, no way to customize the appearance of the
4921  labels, for example, to choose between square brackets and parentheses.
4922 \end_layout
4923
4924 \begin_layout Standard
4925 Bibliography output is handled by the same machinery that handles the presentati
4926 on of reference information in the citation dialog, so you will see in the
4927  XHTML output pretty much what you would see if you were to look at a given
4928  entry in the citation dialog.
4929  The formatting can be customized in your layout file or, preferably, in
4930  a module.
4931  See the 
4932 \emph on
4933 Customization
4934 \emph default
4935  manual for the details.
4936 \end_layout
4937
4938 \begin_layout Standard
4939 The main defect at present is that cross-referenced information is printed
4940  with every entry with which it is associated.
4941  So you can see things like this:
4942 \end_layout
4943
4944 \begin_layout Quote
4945 Jason Stanley, 
4946 \begin_inset Quotes eld
4947 \end_inset
4948
4949 Context and Logical Form
4950 \begin_inset Quotes erd
4951 \end_inset
4952
4953 , in 
4954 \emph on
4955 Language in Context: Selected Essays
4956 \emph default
4957  (Oxford: Oxford University Press, 2007), pp.
4958  30--68.
4959 \end_layout
4960
4961 \begin_layout Quote
4962 Jason Stanley, 
4963 \begin_inset Quotes eld
4964 \end_inset
4965
4966 Semantics in Context
4967 \begin_inset Quotes erd
4968 \end_inset
4969
4970 , in 
4971 \emph on
4972 Language in Context: Selected Essays
4973 \emph default
4974  (Oxford: Oxford University Press, 2007), pp.
4975  201--30.
4976 \end_layout
4977
4978 \begin_layout Standard
4979 This should be fixed before long.
4980 \end_layout
4981
4982 \begin_layout Standard
4983 There is no support at present for sectioned bibliographies.
4984  If you have multiple bibliographies, then LyX will print the same bibliography
4985  over and over.
4986 \end_layout
4987
4988 \begin_layout Section
4989 Indexes
4990 \end_layout
4991
4992 \begin_layout Standard
4993 LyX will happily export indexes as XHTML, but with certain limitations at
4994  the moment.
4995 \end_layout
4996
4997 \begin_layout Standard
4998 Index export will be most reliable when you do not attempt to use the fancy
4999  constructs that are described in the section on indexes in the 
5000 \emph on
5001 User's Guide
5002 \emph default
5003 .
5004 \begin_inset Foot
5005 status collapsed
5006
5007 \begin_layout Plain Layout
5008 The main issue here is that LyX itself does not really handle these.
5009  It just lets you enter what you would have to enter in raw LaTeX.
5010 \end_layout
5011
5012 \end_inset
5013
5014  We'll describe how they are handled using the subsection headings from
5015  that section.
5016 \end_layout
5017
5018 \begin_layout Itemize
5019 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5020  these, but the entries must be separated by 
5021 \begin_inset Quotes eld
5022 \end_inset
5023
5024  ! 
5025 \begin_inset Quotes erd
5026 \end_inset
5027
5028 , that is, there must be spaces around the exclamation point.
5029  This is because it is otherwise too difficult to check for escaped exclamation
5030  points, ones in math, and so forth.
5031 \end_layout
5032
5033 \begin_layout Itemize
5034 Page Ranges: There is no support at all for page ranges, since these make
5035  no sense with XHMTL.
5036  Instead, you will just get two index entries, one at either end.
5037 \end_layout
5038
5039 \begin_layout Itemize
5040 Cross-referencing: There is no support for cross-referencing.
5041  If LyX finds an entry containing the 
5042 \begin_inset Quotes eld
5043 \end_inset
5044
5045 |see\SpecialChar \ldots{}
5046
5047 \begin_inset Quotes erd
5048 \end_inset
5049
5050  construct, it is just dropped, and the rest is treated as an ordinary index
5051  entry.
5052 \end_layout
5053
5054 \begin_layout Itemize
5055 Index Entry Order: LyX does support attempts to fix the sorting order.
5056  It will take what is before the first `@' it finds and use that for sorting,
5057  taking what follows the first `@' to be the actual entry.
5058  At present, LyX does not check for escaped `@', so do not try to index
5059  email addresses.
5060 \end_layout
5061
5062 \begin_layout Itemize
5063 Index Entry Layout: You can format entries by using the text style dialog,
5064  or by using any other method available within LyX itself.
5065  There is no support for constructs like: 
5066 \begin_inset Quotes eld
5067 \end_inset
5068
5069 entry|textbf
5070 \begin_inset Quotes erd
5071 \end_inset
5072
5073 .
5074  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5075  and everything that follows it.
5076 \end_layout
5077
5078 \begin_layout Itemize
5079 Multiple Indexes: There is no support for multiple indexes.
5080  Rather, all index entries will be printed as one large index.
5081  To avoid our printing several versions of the index, we print only the
5082  main index, so make sure you have one.
5083 \end_layout
5084
5085 \begin_layout Section
5086 Nomenclature and Glossary
5087 \end_layout
5088
5089 \begin_layout Standard
5090 There is at present no support for glossaries.
5091  Adding it would be fairly trivial, and welcome.
5092 \end_layout
5093
5094 \begin_layout Chapter
5095 The LyX Server
5096 \end_layout
5097
5098 \begin_layout Section
5099 Introduction
5100 \end_layout
5101
5102 \begin_layout Standard
5103 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5104  and retrieve information about the LyX internal state.
5105  This is only intended for advanced users, but they should find it useful.
5106  It is by writing to the LyX server, for example, that bibliography managers,
5107  such as JabRef, are able to 
5108 \begin_inset Quotes eld
5109 \end_inset
5110
5111 push
5112 \begin_inset Quotes erd
5113 \end_inset
5114
5115  citations to LyX.
5116 \end_layout
5117
5118 \begin_layout Section
5119 Starting the LyX Server
5120 \end_layout
5121
5122 \begin_layout Standard
5123 The LyX server works through the use of a pair of named pipes.
5124  These are usually located in 
5125 \begin_inset Flex Code
5126 status collapsed
5127
5128 \begin_layout Plain Layout
5129 UserDir
5130 \end_layout
5131
5132 \end_inset
5133
5134 , (except on Windows, where 
5135 \emph on
5136 local
5137 \emph default
5138  named pipes are special objects located in 
5139 \begin_inset Flex Code
5140 status collapsed
5141
5142 \begin_layout Plain Layout
5143
5144 \backslash
5145
5146 \backslash
5147 .
5148 \backslash
5149 pipe
5150 \end_layout
5151
5152 \end_inset
5153
5154 ) and have the names 
5155 \begin_inset Quotes eld
5156 \end_inset
5157
5158
5159 \begin_inset Flex Code
5160 status collapsed
5161
5162 \begin_layout Plain Layout
5163 lyxpipe.in
5164 \end_layout
5165
5166 \end_inset
5167
5168
5169 \begin_inset Quotes erd
5170 \end_inset
5171
5172  and 
5173 \begin_inset Quotes eld
5174 \end_inset
5175
5176
5177 \begin_inset Flex Code
5178 status collapsed
5179
5180 \begin_layout Plain Layout
5181 lyxpipe.out
5182 \end_layout
5183
5184 \end_inset
5185
5186
5187 \begin_inset Quotes erd
5188 \end_inset
5189
5190 .
5191  External programs write into 
5192 \begin_inset Flex Code
5193 status collapsed
5194
5195 \begin_layout Plain Layout
5196 lyxpipe.in
5197 \end_layout
5198
5199 \end_inset
5200
5201  and read back data from 
5202 \begin_inset Flex Code
5203 status collapsed
5204
5205 \begin_layout Plain Layout
5206 lyxpipe.out
5207 \end_layout
5208
5209 \end_inset
5210
5211 .
5212  The stem of the pipe names can be defined in the 
5213 \begin_inset Flex MenuItem
5214 status collapsed
5215
5216 \begin_layout Plain Layout
5217 Tools\SpecialChar \menuseparator
5218 Preferences
5219 \end_layout
5220
5221 \end_inset
5222
5223  dialog, for example 
5224 \begin_inset Flex Code
5225 status collapsed
5226
5227 \begin_layout Plain Layout
5228 "/home/myhome/lyxpipe"
5229 \end_layout
5230
5231 \end_inset
5232
5233 , or 
5234 \begin_inset Flex Code
5235 status collapsed
5236
5237 \begin_layout Plain Layout
5238 "
5239 \backslash
5240
5241 \backslash
5242 .
5243 \backslash
5244 pipe
5245 \backslash
5246 lyxpipe"
5247 \end_layout
5248
5249 \end_inset
5250
5251  on Windows (but any working path can be used).
5252  You 
5253 \emph on
5254 must
5255 \emph default
5256  configure this manually in order for the server to start.
5257 \end_layout
5258
5259 \begin_layout Standard
5260 LyX will add the '
5261 \begin_inset Flex Code
5262 status collapsed
5263
5264 \begin_layout Plain Layout
5265 .in
5266 \end_layout
5267
5268 \end_inset
5269
5270 ' and '
5271 \begin_inset Flex Code
5272 status collapsed
5273
5274 \begin_layout Plain Layout
5275 .out
5276 \end_layout
5277
5278 \end_inset
5279
5280 ' to create the pipes.
5281  If one of the pipes already exists, LyX will assume that another LyX process
5282  is already running and will not start the server.
5283  On POSIX (Unix like) systems, if for some other reason, an unused 
5284 \begin_inset Quotes eld
5285 \end_inset
5286
5287 stale
5288 \begin_inset Quotes erd
5289 \end_inset
5290
5291  pipe is left in existence when LyX closes, then LyX will try to delete
5292  it.
5293  If this fails for some reason, you will need to delete the pipes manually
5294  and then restart LyX.
5295  On Windows, pipes are deleted by the OS on program termination or crash,
5296  so 
5297 \begin_inset Quotes eld
5298 \end_inset
5299
5300 stale
5301 \begin_inset Quotes erd
5302 \end_inset
5303
5304  pipes should not be possible.
5305 \end_layout
5306
5307 \begin_layout Standard
5308 To have several LyX processes with servers at the same time, you have to
5309  use different configurations, perhaps by using separate user directories,
5310  each with its own 
5311 \begin_inset Flex Code
5312 status collapsed
5313
5314 \begin_layout Plain Layout
5315 preferences
5316 \end_layout
5317
5318 \end_inset
5319
5320  file, for each process.
5321 \end_layout
5322
5323 \begin_layout Standard
5324 If you are developing a client program, you might find it useful to enable
5325  debugging information from the LyX server.
5326  Do this by starting LyX as 
5327 \begin_inset Flex Code
5328 status collapsed
5329
5330 \begin_layout Plain Layout
5331 lyx -dbg lyxserver
5332 \end_layout
5333
5334 \end_inset
5335
5336 .
5337 \end_layout
5338
5339 \begin_layout Standard
5340 You can find a complete example client written in C in the source distribution
5341  as 
5342 \begin_inset Flex Code
5343 status collapsed
5344
5345 \begin_layout Plain Layout
5346 development/lyxserver/server_monitor.c
5347 \end_layout
5348
5349 \end_inset
5350
5351 .
5352 \end_layout
5353
5354 \begin_layout Standard
5355 Another useful tool is the command-line based clientfound in 
5356 \begin_inset Flex Code
5357 status collapsed
5358
5359 \begin_layout Plain Layout
5360 src/client/lyxclient
5361 \end_layout
5362
5363 \end_inset
5364
5365 .
5366 \end_layout
5367
5368 \begin_layout Section
5369 Normal communication
5370 \end_layout
5371
5372 \begin_layout Standard
5373 To issue a LyX call, the client writes a line of ASCII text into the input
5374  pipe.
5375  This line has the following format:
5376 \end_layout
5377
5378 \begin_layout Quote
5379 LYXCMD:
5380 \emph on
5381 clientname
5382 \emph default
5383 :
5384 \emph on
5385 function
5386 \emph default
5387 :
5388 \emph on
5389 argument
5390 \end_layout
5391
5392 \begin_layout Description
5393 clientname is a name that the client can choose arbitrarily.
5394  Its only use is that LyX will echo it if it sends an answer—so a client
5395  can dispatch results from different requesters.
5396 \end_layout
5397
5398 \begin_layout Description
5399 function is the function you want LyX to perform.
5400  It is the same as the commands you'd use in the minibuffer.
5401 \end_layout
5402
5403 \begin_layout Description
5404 argument is an optional argument which is meaningful only to some functions
5405  (for instance, the 
5406 \begin_inset Quotes eld
5407 \end_inset
5408
5409 self-insert
5410 \begin_inset Quotes erd
5411 \end_inset
5412
5413  LFUN will insert the argument as text at the cursor position).
5414 \end_layout
5415
5416 \begin_layout Standard
5417 The answer from LyX will arrive in the output pipe and be of the form
5418 \end_layout
5419
5420 \begin_layout Quote
5421 INFO:
5422 \emph on
5423 clientname
5424 \emph default
5425 :
5426 \emph on
5427 function
5428 \emph default
5429 :
5430 \emph on
5431 data
5432 \end_layout
5433
5434 \begin_layout Standard
5435 where 
5436 \emph on
5437 clientname
5438 \emph default
5439  and 
5440 \emph on
5441 function
5442 \emph default
5443  are just echoed from the command request, while 
5444 \emph on
5445 data
5446 \emph default
5447  is more or less useful information filled according to how the command
5448  execution worked out.
5449  Some commands, such as 
5450 \begin_inset Quotes eld
5451 \end_inset
5452
5453 font-state
5454 \begin_inset Quotes erd
5455 \end_inset
5456
5457 , will return information about the internal state of LyX, while other will
5458  return an empty data-response.
5459  This means that the command execution went fine.
5460 \end_layout
5461
5462 \begin_layout Standard
5463 In case of errors, the response from LyX will have this form
5464 \end_layout
5465
5466 \begin_layout Quote
5467 ERROR:
5468 \emph on
5469 clientname
5470 \emph default
5471 :
5472 \emph on
5473 function
5474 \emph default
5475 :
5476 \emph on
5477 error message
5478 \end_layout
5479
5480 \begin_layout Standard
5481 where the 
5482 \emph on
5483 error message
5484 \emph default
5485  should contain an explanation of why the command failed.
5486 \end_layout
5487
5488 \begin_layout Standard
5489 Examples:
5490 \end_layout
5491
5492 \begin_layout LyX-Code
5493 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5494 \begin_inset Newline newline
5495 \end_inset
5496
5497 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5498 \begin_inset Newline newline
5499 \end_inset
5500
5501 read a <~/.lyxpipe.out
5502 \begin_inset Newline newline
5503 \end_inset
5504
5505 echo $a
5506 \end_layout
5507
5508 \begin_layout Section
5509 Notification
5510 \end_layout
5511
5512 \begin_layout Standard
5513 LyX can notify clients of events going on asynchronously.
5514  Currently it will only do this if the user binds a key sequence with the
5515  function 
5516 \begin_inset Quotes eld
5517 \end_inset
5518
5519 notify
5520 \begin_inset Quotes erd
5521 \end_inset
5522
5523 .
5524  The format of the string LyX sends is as follows:
5525 \end_layout
5526
5527 \begin_layout Quote
5528 \begin_inset Flex Code
5529 status collapsed
5530
5531 \begin_layout Plain Layout
5532 NOTIFY:
5533 \end_layout
5534
5535 \end_inset
5536
5537
5538 \emph on
5539 key-sequence
5540 \end_layout
5541
5542 \begin_layout Standard
5543 where 
5544 \emph on
5545 key-sequence
5546 \emph default
5547  is the printed representation of the key sequence that was actually typed
5548  by the user.
5549 \end_layout
5550
5551 \begin_layout Standard
5552 This mechanism can be used to extend LyX's command set and implement macros.
5553  Bind some key sequence to 
5554 \begin_inset Quotes eld
5555 \end_inset
5556
5557 notify
5558 \begin_inset Quotes erd
5559 \end_inset
5560
5561 .
5562  Then start a client that listens on the output pipe, dispatches the command
5563  according to the sequence, and starts a function that may use LyX calls
5564  and LyX requests to issue a command or a series of commands to LyX.
5565 \end_layout
5566
5567 \begin_layout Section
5568 The simple LyX Server Protocol
5569 \end_layout
5570
5571 \begin_layout Standard
5572 LyX implements a simple protocol that can be used for session management.
5573  All messages are of the form
5574 \end_layout
5575
5576 \begin_layout Quote
5577 LYXSRV:
5578 \emph on
5579 clientname
5580 \emph default
5581 :
5582 \emph on
5583 protocol message
5584 \end_layout
5585
5586 \begin_layout Standard
5587 where 
5588 \emph on
5589 protocol message
5590 \emph default
5591  can be 
5592 \begin_inset Quotes eld
5593 \end_inset
5594
5595 hello
5596 \begin_inset Quotes erd
5597 \end_inset
5598
5599  or 
5600 \begin_inset Quotes eld
5601 \end_inset
5602
5603 bye
5604 \begin_inset Quotes erd
5605 \end_inset
5606
5607 .
5608  If 
5609 \begin_inset Quotes eld
5610 \end_inset
5611
5612 hello
5613 \begin_inset Quotes erd
5614 \end_inset
5615
5616  is received from a client, LyX will report back to inform the client that
5617  it's listening to it's messages, while 
5618 \begin_inset Quotes eld
5619 \end_inset
5620
5621 bye
5622 \begin_inset Quotes erd
5623 \end_inset
5624
5625  sent from LyX will inform clients that LyX is closing.
5626 \end_layout
5627
5628 \begin_layout Section
5629 Reverse DVI/PDF search
5630 \end_layout
5631
5632 \begin_layout Standard
5633 Some DVI/PDF viewers
5634 \begin_inset Foot
5635 status collapsed
5636
5637 \begin_layout Plain Layout
5638 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5639  Skim on Mac OSX and SumatraPDF on Windows.
5640 \end_layout
5641
5642 \end_inset
5643
5644  provide 
5645 \emph on
5646 reverse search
5647 \emph default
5648  facility (also called 
5649 \emph on
5650 inverse search
5651 \emph default
5652 ).
5653  This means that you can tell LyX to put the cursor to a specific line in
5654  the document by clicking at the respective position in the DVI/PDF output.
5655  To achieve this, the viewer must be able to communicate with LyX.
5656  This is done via the LyX server either by using the named pipe (
5657 \emph on
5658 lyxpipe
5659 \emph default
5660 ), or the UNIX domain socket (
5661 \emph on
5662 lyxsocket
5663 \emph default
5664 ) that LyX creates in its temporary directory (this is the way the 
5665 \begin_inset Flex Code
5666 status collapsed
5667
5668 \begin_layout Plain Layout
5669 lyxclient
5670 \end_layout
5671
5672 \end_inset
5673
5674  program communicates with LyX).
5675  In some cases, you need a helper script that mediates between the viewer
5676  and LyX, in others, the viewer can communicate with LyX directly.
5677  This depends on the selected viewer and on your operating system.
5678  The same applies to the way viewers need to be configured and the way the
5679  reverse search is actually performed.
5680  In what follows, we will thus describe how to setup reverse search for
5681  specific viewers.
5682  Before we turn to this, though, we will explain what needs to be done generally
5683  to enable reverse search in the DVI/PDF output.
5684 \end_layout
5685
5686 \begin_layout Subsection
5687 Automatic setup
5688 \begin_inset CommandInset label
5689 LatexCommand label
5690 name "sub:rev-search"
5691
5692 \end_inset
5693
5694
5695 \end_layout
5696
5697 \begin_layout Standard
5698 In most cases LyX will do the work for you by enabling the option 
5699 \begin_inset Flex MenuItem
5700 status collapsed
5701
5702 \begin_layout Plain Layout
5703 Synchronize with Output
5704 \end_layout
5705
5706 \end_inset
5707
5708  in the menu 
5709 \begin_inset Flex MenuItem
5710 status collapsed
5711
5712 \begin_layout Plain Layout
5713 Document\SpecialChar \menuseparator
5714 Settings\SpecialChar \menuseparator
5715 Output
5716 \end_layout
5717
5718 \end_inset
5719
5720 .
5721  In such a case LyX will automatically insert the necessary SyncTeX macro
5722  (for PDF) or load the srcltx package (for DVI) respectively.
5723  This option can be easily reached also on 
5724 \begin_inset Flex Code
5725 status collapsed
5726
5727 \begin_layout Plain Layout
5728 View/Update
5729 \end_layout
5730
5731 \end_inset
5732
5733  Toolbar.
5734 \end_layout
5735
5736 \begin_layout Standard
5737 If you need a different setting, you can select or input a custom macro
5738  from the drop down box just below 
5739 \begin_inset Flex MenuItem
5740 status collapsed
5741
5742 \begin_layout Plain Layout
5743 Document\SpecialChar \menuseparator
5744 Settings\SpecialChar \menuseparator
5745 Output\SpecialChar \menuseparator
5746 Synchronize with Output
5747 \end_layout
5748
5749 \end_inset
5750
5751 .
5752 \end_layout
5753
5754 \begin_layout Standard
5755 Note that the method 
5756 \begin_inset Flex Code
5757 status collapsed
5758
5759 \begin_layout Plain Layout
5760
5761 \backslash
5762 synctex=1
5763 \end_layout
5764
5765 \end_inset
5766
5767  enables gzip compression.
5768  If your viewer does not support it, you should instead use 
5769 \begin_inset Flex Code
5770 status collapsed
5771
5772 \begin_layout Plain Layout
5773
5774 \backslash
5775 synctex=-1
5776 \end_layout
5777
5778 \end_inset
5779
5780 .
5781 \end_layout
5782
5783 \begin_layout Standard
5784 Please aöso note that including the 
5785 \begin_inset Flex Code
5786 status collapsed
5787
5788 \begin_layout Plain Layout
5789 srcltx
5790 \end_layout
5791
5792 \end_inset
5793
5794  package or 
5795 \begin_inset Flex Code
5796 status collapsed
5797
5798 \begin_layout Plain Layout
5799 src-specials
5800 \end_layout
5801
5802 \end_inset
5803
5804  sometimes has an undesired impact on the typesetting.
5805  Thus, you should switch output synchronization off for the final typesetting
5806  if you use the 
5807 \begin_inset Flex Code
5808 status collapsed
5809
5810 \begin_layout Plain Layout
5811 srcltx
5812 \end_layout
5813
5814 \end_inset
5815
5816  package or 
5817 \begin_inset Flex Code
5818 status collapsed
5819
5820 \begin_layout Plain Layout
5821 src-specials
5822 \end_layout
5823
5824 \end_inset
5825
5826 .
5827  
5828 \end_layout
5829
5830 \begin_layout Standard
5831 In case you need some more special settings that are not covered by the
5832  automatic settings, read the next section about how to set up output synchroniz
5833 ation manually.
5834  If the automatic setup suits your needs, you can readily jump to section
5835 \begin_inset space ~
5836 \end_inset
5837
5838
5839 \begin_inset CommandInset ref
5840 LatexCommand ref
5841 reference "sub:configuring-viewers"
5842
5843 \end_inset
5844
5845 , where the necessary configuration steps in your viewer -- needed both
5846  with the automatic and the manual setup -- are described.
5847 \end_layout
5848
5849 \begin_layout Subsection
5850 Manual setup
5851 \end_layout
5852
5853 \begin_layout Standard
5854 LaTeX provides several different methods for reverse search.
5855  Some are built-in in the 
5856 \begin_inset Flex Code
5857 status collapsed
5858
5859 \begin_layout Plain Layout
5860 latex/pdflatex
5861 \end_layout
5862
5863 \end_inset
5864
5865  program, some are provided by external packages.
5866  Your choice depends on whether your LaTeX distribution already provides
5867  a given method (the built-in methods are rather new) and whether your viewer
5868  can cope with it.
5869  The available methods are described in the following.
5870 \end_layout
5871
5872 \begin_layout Subsubsection*
5873 Built-in DVI-search via src-specials (DVI only) 
5874 \end_layout
5875
5876 \begin_layout Standard
5877 This method provides the DVI file with the necessary information for reverse
5878  search.
5879  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5880  distribution should include it), and it works reliably.
5881  To enable it, change the 
5882 \begin_inset Flex MenuItem
5883 status collapsed
5884
5885 \begin_layout Plain Layout
5886 LaT
5887 \begin_inset ERT
5888 status collapsed
5889
5890 \begin_layout Plain Layout
5891
5892 {}
5893 \end_layout
5894
5895 \end_inset
5896
5897 eX (plain)->DVI
5898 \end_layout
5899
5900 \end_inset
5901
5902  or 
5903 \begin_inset Flex MenuItem
5904 status collapsed
5905
5906 \begin_layout Plain Layout
5907 LaT
5908 \begin_inset ERT
5909 status collapsed
5910
5911 \begin_layout Plain Layout
5912
5913 {}
5914 \end_layout
5915
5916 \end_inset
5917
5918 eX (plain)->DraftDVI
5919 \end_layout
5920
5921 \end_inset
5922
5923  converter in 
5924 \begin_inset Flex MenuItem
5925 status collapsed
5926
5927 \begin_layout Plain Layout
5928 Preferences\SpecialChar \menuseparator
5929 File Handling\SpecialChar \menuseparator
5930 Converters
5931 \end_layout
5932
5933 \end_inset
5934
5935  to 
5936 \begin_inset Flex Code
5937 status collapsed
5938
5939 \begin_layout Plain Layout
5940 latex -src-specials $$i
5941 \end_layout
5942
5943 \end_inset
5944
5945 .
5946  If this doesn't work, check if your TeX engine needs different options
5947  (the syntax might differ in some distributions).
5948 \end_layout
5949
5950 \begin_layout Subsubsection*
5951 External Packages (PDFSync and scrltx) 
5952 \end_layout
5953
5954 \begin_layout Standard
5955 The packages 
5956 \emph on
5957 pdfsync
5958 \emph default
5959  and 
5960 \emph on
5961 scrltx
5962 \emph default
5963  provide reverse search facility for PDF output (via pdflatex) and DVI output,
5964  respectively.
5965  In order to enable it, load the packages in the LyX preamble: 
5966 \end_layout
5967
5968 \begin_layout Itemize
5969 \begin_inset Flex Code
5970 status collapsed
5971
5972 \begin_layout Plain Layout
5973
5974 \backslash
5975 usepackage{pdfsync}
5976 \end_layout
5977
5978 \end_inset
5979
5980  for reverse PDF search,
5981 \end_layout
5982
5983 \begin_layout Itemize
5984 \begin_inset Flex Code
5985 status collapsed
5986
5987 \begin_layout Plain Layout
5988
5989 \backslash
5990 usepackage[active]{srcltx}
5991 \end_layout
5992
5993 \end_inset
5994
5995  for reverse DVI search.
5996 \end_layout
5997
5998 \begin_layout Standard
5999 If you want to be able to perform both DVI and PDF reverse searches, you
6000  can also insert in the preamble the following lines
6001 \end_layout
6002
6003 \begin_layout LyX-Code
6004
6005 \backslash
6006 usepackage{ifpdf}
6007 \begin_inset Newline newline
6008 \end_inset
6009
6010
6011 \backslash
6012 ifpdf
6013 \begin_inset Newline newline
6014 \end_inset
6015
6016   
6017 \backslash
6018 usepackage{pdfsync}
6019 \begin_inset Newline newline
6020 \end_inset
6021
6022
6023 \backslash
6024 else
6025 \begin_inset Newline newline
6026 \end_inset
6027
6028   
6029 \backslash
6030 usepackage[active]{srcltx}
6031 \begin_inset Newline newline
6032 \end_inset
6033
6034
6035 \backslash
6036 fi
6037 \end_layout
6038
6039 \begin_layout Standard
6040 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6041  right package will be used.
6042 \end_layout
6043
6044 \begin_layout Standard
6045 Note that PDFSync might affect the output layout of your document.
6046  It is therefore advised to disable PDFsync for final documents.
6047 \end_layout
6048
6049 \begin_layout Subsubsection*
6050 Built-in reverse search via SyncTeX (DVI and PDF) 
6051 \end_layout
6052
6053 \begin_layout Standard
6054 Recent versions of 
6055 \begin_inset Flex Code
6056 status collapsed
6057
6058 \begin_layout Plain Layout
6059 (pdf)latex
6060 \end_layout
6061
6062 \end_inset
6063
6064  have built-in support for both PDF and DVI reverse search.
6065  This so-called 
6066 \emph on
6067 SyncTeX
6068 \emph default
6069  facility is basically the result of the integration of the PDFSync package
6070  to the pdftex program and its merge with the 
6071 \emph on
6072 scr-specials
6073 \emph default
6074  approach.
6075  You need at least TeXLive 2008 or a recent MikTeX distribution in order
6076  to use it.
6077  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6078  already provide SyncTeX support.
6079 \end_layout
6080
6081 \begin_layout Standard
6082 To enable SyncTeX for DVI output, change the 
6083 \begin_inset Flex MenuItem
6084 status collapsed
6085
6086 \begin_layout Plain Layout
6087 LaT
6088 \begin_inset ERT
6089 status collapsed
6090
6091 \begin_layout Plain Layout
6092
6093 {}
6094 \end_layout
6095
6096 \end_inset
6097
6098 eX (plain) -> DVI
6099 \end_layout
6100
6101 \end_inset
6102
6103  or 
6104 \begin_inset Flex MenuItem
6105 status collapsed
6106
6107 \begin_layout Plain Layout
6108 LaT
6109 \begin_inset ERT
6110 status collapsed
6111
6112 \begin_layout Plain Layout
6113
6114 {}
6115 \end_layout
6116
6117 \end_inset
6118
6119 eX (plain) -> DraftDVI
6120 \end_layout
6121
6122 \end_inset
6123
6124  converter in 
6125 \begin_inset Flex MenuItem
6126 status collapsed
6127
6128 \begin_layout Plain Layout
6129 Preferences\SpecialChar \menuseparator
6130 File Handling\SpecialChar \menuseparator
6131 Converters
6132 \end_layout
6133
6134 \end_inset
6135
6136  to 
6137 \begin_inset Flex Code
6138 status collapsed
6139
6140 \begin_layout Plain Layout
6141 latex -synctex=1 $$i
6142 \end_layout
6143
6144 \end_inset
6145
6146 , and for PDF output, change the 
6147 \begin_inset Flex MenuItem
6148 status collapsed
6149
6150 \begin_layout Plain Layout
6151 LaT
6152 \begin_inset ERT
6153 status collapsed
6154
6155 \begin_layout Plain Layout
6156
6157 {}
6158 \end_layout
6159
6160 \end_inset
6161
6162 eX (pdflatex) -> PDF (pdflatex)
6163 \end_layout
6164
6165 \end_inset
6166
6167  or converter to 
6168 \begin_inset Flex Code
6169 status collapsed
6170
6171 \begin_layout Plain Layout
6172 pdflatex -synctex=1 $$i
6173 \end_layout
6174
6175 \end_inset
6176
6177 .
6178  Check the documentation of your viewer whether the viewer needs to be configure
6179 d for the use with SyncTeX.
6180 \begin_inset Foot
6181 status collapsed
6182
6183 \begin_layout Plain Layout
6184 Note that the option 
6185 \begin_inset Flex Code
6186 status collapsed
6187
6188 \begin_layout Plain Layout
6189 -synctex=1
6190 \end_layout
6191
6192 \end_inset
6193
6194  option enables gzip compression.
6195  If your viewer does not support it, you should instead use 
6196 \begin_inset Flex Code
6197 status collapsed
6198
6199 \begin_layout Plain Layout
6200 -synctex=-1
6201 \end_layout
6202
6203 \end_inset
6204
6205 .
6206 \end_layout
6207
6208 \end_inset
6209
6210
6211 \end_layout
6212
6213 \begin_layout Subsection
6214 Configuring and using specific viewers
6215 \begin_inset CommandInset label
6216 LatexCommand label
6217 name "sub:configuring-viewers"
6218
6219 \end_inset
6220
6221
6222 \end_layout
6223
6224 \begin_layout Subsubsection*
6225 Xdvi (all platforms)
6226 \end_layout
6227
6228 \begin_layout Standard
6229 If you use 
6230 \begin_inset Flex Code
6231 status collapsed
6232
6233 \begin_layout Plain Layout
6234 xdvi
6235 \end_layout
6236
6237 \end_inset
6238
6239 , you don't need to do anything else for performing a reverse DVI search,
6240  as LyX already provides the necessary hooks for automatically using the
6241  
6242 \begin_inset Flex Code
6243 status collapsed
6244
6245 \begin_layout Plain Layout
6246 lyxclient
6247 \end_layout
6248
6249 \end_inset
6250
6251  program.
6252  Just setup your document as described above (reverse search is triggered
6253  by Ctrl-click or Alt-click on Mac OSX, respectively).
6254 \end_layout
6255
6256 \begin_layout Standard
6257 However, if for whatever reason you want to use the named pipe instead of
6258  the socket for communicating with LyX, simply change the DVI viewer in
6259  
6260 \begin_inset Flex MenuItem
6261 status collapsed
6262
6263 \begin_layout Plain Layout
6264 Preferences\SpecialChar \menuseparator
6265 File Handling\SpecialChar \menuseparator
6266 File formats
6267 \end_layout
6268
6269 \end_inset
6270
6271  to
6272 \begin_inset Foot
6273 status collapsed
6274
6275 \begin_layout Plain Layout
6276 On Mac OSX you have to use 
6277 \begin_inset Flex Code
6278 status collapsed
6279
6280 \begin_layout Plain Layout
6281 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6282 \end_layout
6283
6284 \end_inset
6285
6286
6287 \end_layout
6288
6289 \end_inset
6290
6291  
6292 \begin_inset Flex Code
6293 status collapsed
6294
6295 \begin_layout Plain Layout
6296 xdvi -editor 'lyxeditor.sh %f %l'
6297 \end_layout
6298
6299 \end_inset
6300
6301 , where 
6302 \begin_inset Flex Code
6303 status collapsed
6304
6305 \begin_layout Plain Layout
6306 lyxeditor.sh
6307 \end_layout
6308
6309 \end_inset
6310
6311  is a suitable script.
6312  For example, a minimal shell script is the following one:
6313 \end_layout
6314
6315 \begin_layout LyX-Code
6316 #!/bin/sh
6317 \begin_inset Newline newline
6318 \end_inset
6319
6320 LYXPIPE="/path/to/lyxpipe"
6321 \begin_inset Newline newline
6322 \end_inset
6323
6324 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6325 \begin_inset Newline newline
6326 \end_inset
6327
6328 echo "$COMMAND" > "${LYXPIPE}".in || exit
6329 \begin_inset Newline newline
6330 \end_inset
6331
6332 read TMP < "${LYXPIPE}".out || exit
6333 \end_layout
6334
6335 \begin_layout Standard
6336 where 
6337 \begin_inset Flex Code
6338 status collapsed
6339
6340 \begin_layout Plain Layout
6341 /path/to/lyxpipe
6342 \end_layout
6343
6344 \end_inset
6345
6346  is the Ly
6347 \begin_inset ERT
6348 status collapsed
6349
6350 \begin_layout Plain Layout
6351
6352 {}
6353 \end_layout
6354
6355 \end_inset
6356
6357 XServer pipe path specified in 
6358 \begin_inset Flex MenuItem
6359 status collapsed
6360
6361 \begin_layout Plain Layout
6362 Preferences\SpecialChar \menuseparator
6363 Paths
6364 \end_layout
6365
6366 \end_inset
6367
6368 .
6369 \begin_inset Foot
6370 status collapsed
6371
6372 \begin_layout Plain Layout
6373 In the 
6374 \begin_inset Flex Code
6375 status collapsed
6376
6377 \begin_layout Plain Layout
6378 development/tools
6379 \end_layout
6380
6381 \end_inset
6382
6383  folder of a source distribution you can find a 
6384 \begin_inset Flex Code
6385 status collapsed
6386
6387 \begin_layout Plain Layout
6388 lyxeditor
6389 \end_layout
6390
6391 \end_inset
6392
6393  script which is able to locate the 
6394 \emph on
6395 lyxpipe
6396 \emph default
6397  based on your preferences.
6398 \end_layout
6399
6400 \end_inset
6401
6402
6403 \end_layout
6404
6405 \begin_layout Subsubsection*
6406 MacDviX (Mac OSX)
6407 \end_layout
6408
6409 \begin_layout Standard
6410 At the end of 
6411 \begin_inset Flex Code
6412 status collapsed
6413
6414 \begin_layout Plain Layout
6415 /Applications/MacDviX_Folder/calleditor.script
6416 \end_layout
6417
6418 \end_inset
6419
6420 , add the following lines:
6421 \end_layout
6422
6423 \begin_layout LyX-Code
6424 /Applications/Ly
6425 \begin_inset ERT
6426 status collapsed
6427
6428 \begin_layout Plain Layout
6429
6430 {}
6431 \end_layout
6432
6433 \end_inset
6434
6435 X.app/Contents/MacOS/lyxeditor "$2" $1
6436 \begin_inset Newline newline
6437 \end_inset
6438
6439 exit 1
6440 \end_layout
6441
6442 \begin_layout Standard
6443 Modify the lines accordingly if you install LyX somewhere else than in the
6444  Applications folder.
6445 \end_layout
6446
6447 \begin_layout Standard
6448 Reverse search is triggered by Alt-click (OPTION-click).
6449 \end_layout
6450
6451 \begin_layout Subsubsection*
6452 Skim (Mac OSX)
6453 \end_layout
6454
6455 \begin_layout Standard
6456 Enter 
6457 \begin_inset Flex Code
6458 status collapsed
6459
6460 \begin_layout Plain Layout
6461 open -a Skim.app $$i
6462 \end_layout
6463
6464 \end_inset
6465
6466  to the viewer setting in 
6467 \begin_inset Flex MenuItem
6468 status collapsed
6469
6470 \begin_layout Plain Layout
6471 Preferences\SpecialChar \menuseparator
6472 File Handling\SpecialChar \menuseparator
6473 File formats\SpecialChar \menuseparator
6474 PDF (pdflatex)
6475 \end_layout
6476
6477 \end_inset
6478
6479 , and then in 
6480 \begin_inset Flex MenuItem
6481 status collapsed
6482
6483 \begin_layout Plain Layout
6484 Skim\SpecialChar \menuseparator
6485 Preferences\SpecialChar \menuseparator
6486 Sync
6487 \end_layout
6488
6489 \end_inset
6490
6491  choose 
6492 \begin_inset Flex MenuItem
6493 status collapsed
6494
6495 \begin_layout Plain Layout
6496 custom
6497 \end_layout
6498
6499 \end_inset
6500
6501  preset and enter command 
6502 \begin_inset Flex MenuItem
6503 status collapsed
6504
6505 \begin_layout Plain Layout
6506 /Applications/LyX.app/Contents/MacOS/lyxeditor
6507 \end_layout
6508
6509 \end_inset
6510
6511 .
6512 \end_layout
6513
6514 \begin_layout Standard
6515 Reverse search is triggered by COMMAND-SHIFT-click
6516 \end_layout
6517
6518 \begin_layout Subsubsection*
6519 Okular (KDE)
6520 \end_layout
6521
6522 \begin_layout Standard
6523 Go to 
6524 \begin_inset Flex MenuItem
6525 status collapsed
6526
6527 \begin_layout Plain Layout
6528 Settings\SpecialChar \menuseparator
6529 Configure Okular\SpecialChar \ldots{}
6530 \SpecialChar \menuseparator
6531 Editor
6532 \end_layout
6533
6534 \end_inset
6535
6536 , select 
6537 \begin_inset Quotes eld
6538 \end_inset
6539
6540 Custom Text Editor
6541 \begin_inset Quotes erd
6542 \end_inset
6543
6544  and add the command 
6545 \begin_inset Flex Code
6546 status collapsed
6547
6548 \begin_layout Plain Layout
6549 lyxclient -g %f %l
6550 \end_layout
6551
6552 \end_inset
6553
6554 .
6555 \end_layout
6556
6557 \begin_layout Standard
6558 Reverse search is triggered by SHIFT-click.
6559 \end_layout
6560
6561 \begin_layout Subsubsection*
6562 YAP (Windows)
6563 \end_layout
6564
6565 \begin_layout Standard
6566 Launch yap, choose its 
6567 \begin_inset Flex MenuItem
6568 status collapsed
6569
6570 \begin_layout Plain Layout
6571 View\SpecialChar \menuseparator
6572 Options
6573 \end_layout
6574
6575 \end_inset
6576
6577  menu and select the 
6578 \begin_inset Quotes eld
6579 \end_inset
6580
6581 Inverse DVI Search
6582 \begin_inset Quotes erd
6583 \end_inset
6584
6585  tab.
6586  Click on the 
6587 \begin_inset Quotes eld
6588 \end_inset
6589
6590 New\SpecialChar \ldots{}
6591
6592 \begin_inset Quotes erd
6593 \end_inset
6594
6595  button and, in the window that opens, enter 
6596 \begin_inset Quotes eld
6597 \end_inset
6598
6599 LyX Editor
6600 \begin_inset Quotes erd
6601 \end_inset
6602
6603  (or any other name you like) in the 
6604 \begin_inset Quotes eld
6605 \end_inset
6606
6607 Name:
6608 \begin_inset Quotes erd
6609 \end_inset
6610
6611  field.
6612  Now click on the button labeled 
6613 \begin_inset Quotes eld
6614 \end_inset
6615
6616 \SpecialChar \ldots{}
6617
6618 \begin_inset Quotes erd
6619 \end_inset
6620
6621  to open a file dialog and navigate to the directory containing the batch
6622  file 
6623 \begin_inset Flex Code
6624 status collapsed
6625
6626 \begin_layout Plain Layout
6627 lyxeditor.bat
6628 \end_layout
6629
6630 \end_inset
6631
6632  (see below).
6633  Select 
6634 \begin_inset Flex Code
6635 status collapsed
6636
6637 \begin_layout Plain Layout
6638 lyxeditor.bat
6639 \end_layout
6640
6641 \end_inset
6642
6643  and then specify the program arguments as 
6644 \begin_inset Flex Code
6645 status collapsed
6646
6647 \begin_layout Plain Layout
6648 %f %l
6649 \end_layout
6650
6651 \end_inset
6652
6653 .
6654  The 
6655 \begin_inset Flex Code
6656 status collapsed
6657
6658 \begin_layout Plain Layout
6659 lyxeditor.bat
6660 \end_layout
6661
6662 \end_inset
6663
6664  wrapper is used for communicating with LyX through the 
6665 \emph on
6666 lyxpipe
6667 \emph default
6668  and is as follows:
6669 \end_layout
6670
6671 \begin_layout LyX-Code
6672 @echo off
6673 \begin_inset Newline newline
6674 \end_inset
6675
6676 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6677 \backslash
6678
6679 \backslash
6680 .
6681 \backslash
6682 pipe
6683 \backslash
6684 lyxpipe.in
6685 \begin_inset Newline newline
6686 \end_inset
6687
6688 type 
6689 \backslash
6690
6691 \backslash
6692 .
6693 \backslash
6694 pipe
6695 \backslash
6696 lyxpipe.out
6697 \end_layout
6698
6699 \begin_layout Standard
6700 Make sure that the LyXServer pipe path you specified in LyX is 
6701 \begin_inset Flex Code
6702 status collapsed
6703
6704 \begin_layout Plain Layout
6705
6706 \backslash
6707
6708 \backslash
6709 .
6710 \backslash
6711 pipe
6712 \backslash
6713 lyxpipe
6714 \end_layout
6715
6716 \end_inset
6717
6718 , otherwise change the 
6719 \begin_inset Flex Code
6720 status collapsed
6721
6722 \begin_layout Plain Layout
6723 lyxeditor.bat
6724 \end_layout
6725
6726 \end_inset
6727
6728  wrapper accordingly.
6729 \end_layout
6730
6731 \begin_layout Standard
6732 In yap, reverse search is triggered by double-click.
6733 \end_layout
6734
6735 \begin_layout Subsubsection*
6736 SumatraPDF (Windows)
6737 \end_layout
6738
6739 \begin_layout Standard
6740 In order to use SumatraPDF for inverse search, enter 
6741 \begin_inset Flex Code
6742 status collapsed
6743
6744 \begin_layout Plain Layout
6745 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6746 \end_layout
6747
6748 \end_inset
6749
6750  in the viewer setting in 
6751 \begin_inset Flex MenuItem
6752 status collapsed
6753
6754 \begin_layout Plain Layout
6755 Preferences\SpecialChar \menuseparator
6756 File Handling\SpecialChar \menuseparator
6757 File formats\SpecialChar \menuseparator
6758 PDF (pdflatex)
6759 \end_layout
6760
6761 \end_inset
6762
6763 , where 
6764 \begin_inset Flex Code
6765 status collapsed
6766
6767 \begin_layout Plain Layout
6768 lyxeditor.bat
6769 \end_layout
6770
6771 \end_inset
6772
6773  is the previous wrapper.
6774  If SumatraPDF.exe is not in your command PATH, use its full file name.
6775 \end_layout
6776
6777 \begin_layout Standard
6778 Reverse search is triggered by double-click.
6779 \end_layout
6780
6781 \begin_layout Subsubsection*
6782 YAP (Cygwin)
6783 \end_layout
6784
6785 \begin_layout Standard
6786 First of all, make sure that yap is your default DVI viewer in the Windows
6787  environment, then launch it, choose its 
6788 \begin_inset Flex MenuItem
6789 status collapsed
6790
6791 \begin_layout Plain Layout
6792 View\SpecialChar \menuseparator
6793 Options
6794 \end_layout
6795
6796 \end_inset
6797
6798  menu and select the 
6799 \begin_inset Quotes eld
6800 \end_inset
6801
6802 Inverse DVI Search
6803 \begin_inset Quotes erd
6804 \end_inset
6805
6806  tab.
6807  Click on the 
6808 \begin_inset Quotes eld
6809 \end_inset
6810
6811 New\SpecialChar \ldots{}
6812
6813 \begin_inset Quotes erd
6814 \end_inset
6815
6816  button and, in the window that opens, enter 
6817 \begin_inset Quotes eld
6818 \end_inset
6819
6820 LyX Editor
6821 \begin_inset Quotes erd
6822 \end_inset
6823
6824  (or any other name you like) in the 
6825 \begin_inset Quotes eld
6826 \end_inset
6827
6828 Name:
6829 \begin_inset Quotes erd
6830 \end_inset
6831
6832  field.
6833  Now click on the button labeled 
6834 \begin_inset Quotes eld
6835 \end_inset
6836
6837 \SpecialChar \ldots{}
6838
6839 \begin_inset Quotes erd
6840 \end_inset
6841
6842  to open a file dialog and navigate to the directory containing the 
6843 \begin_inset Flex Code
6844 status collapsed
6845
6846 \begin_layout Plain Layout
6847 lyxeditor.exe
6848 \end_layout
6849
6850 \end_inset
6851
6852  program (which is installed by default on Cygwin along with the LyX executable).
6853  Select 
6854 \begin_inset Flex Code
6855 status collapsed
6856
6857 \begin_layout Plain Layout
6858 lyxeditor.exe
6859 \end_layout
6860
6861 \end_inset
6862
6863  and then specify the program arguments as 
6864 \begin_inset Flex Code
6865 status collapsed
6866
6867 \begin_layout Plain Layout
6868 -g %f %l
6869 \end_layout
6870
6871 \end_inset
6872
6873 .
6874  In this way, you will be using the 
6875 \emph on
6876 lyxsocket
6877 \emph default
6878  for communicating with LyX.
6879  If, for whatever reason, you want to use the 
6880 \emph on
6881 lyxpipe
6882 \emph default
6883 , omit the 
6884 \begin_inset Flex Code
6885 status collapsed
6886
6887 \begin_layout Plain Layout
6888 -g
6889 \end_layout
6890
6891 \end_inset
6892
6893  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6894 \end_layout
6895
6896 \begin_layout Standard
6897 In yap, reverse search is triggered by double-click.
6898 \end_layout
6899
6900 \begin_layout Subsubsection*
6901 SumatraPDF (Cygwin)
6902 \end_layout
6903
6904 \begin_layout Standard
6905 In order to use SumatraPDF for inverse search, enter 
6906 \begin_inset Flex Code
6907 status collapsed
6908
6909 \begin_layout Plain Layout
6910 SumatraPDF -inverse-search "lyxeditor -g %f %l"
6911 \end_layout
6912
6913 \end_inset
6914
6915  in the viewer setting in 
6916 \begin_inset Flex MenuItem
6917 status collapsed
6918
6919 \begin_layout Plain Layout
6920 Preferences\SpecialChar \menuseparator
6921 File Handling\SpecialChar \menuseparator
6922 File formats\SpecialChar \menuseparator
6923 PDF (pdflatex)
6924 \end_layout
6925
6926 \end_inset
6927
6928 .
6929  If SumatraPDF.exe is not in your command PATH, use its full posix path.
6930  The 
6931 \begin_inset Flex Code
6932 status collapsed
6933
6934 \begin_layout Plain Layout
6935 -g
6936 \end_layout
6937
6938 \end_inset
6939
6940  enables communication via the 
6941 \emph on
6942 lyxsocket
6943 \emph default
6944 .
6945  Again, omit the 
6946 \begin_inset Flex Code
6947 status collapsed
6948
6949 \begin_layout Plain Layout
6950 -g
6951 \end_layout
6952
6953 \end_inset
6954
6955  option if you want to use the 
6956 \emph on
6957 lyxpipe
6958 \emph default
6959 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6960 \end_layout
6961
6962 \begin_layout Standard
6963 Reverse search is triggered by double-click.
6964 \end_layout
6965
6966 \begin_layout Section
6967 Forward search
6968 \end_layout
6969
6970 \begin_layout Standard
6971 Forward search is, as the name implies, in a sense the 
6972 \begin_inset Quotes eld
6973 \end_inset
6974
6975 opposite
6976 \begin_inset Quotes erd
6977 \end_inset
6978
6979  of reverse search.
6980  It allows you to let the viewer jump to a given position from within LyX.
6981  If forward search is set up (as described in what follows), you can put
6982  the cursor anywhere in your LyX document, and hit 
6983 \begin_inset Flex MenuItem
6984 status collapsed
6985
6986 \begin_layout Plain Layout
6987 Navigate\SpecialChar \menuseparator
6988 Forward search
6989 \end_layout
6990
6991 \end_inset
6992
6993  (or select 
6994 \begin_inset Flex MenuItem
6995 status collapsed
6996
6997 \begin_layout Plain Layout
6998 Forward search
6999 \end_layout
7000
7001 \end_inset
7002
7003  in the context menu via right mouse click), and then the viewer will jump
7004  to that position as well.
7005  This implies, of course, that your viewer supports this function.
7006 \end_layout
7007
7008 \begin_layout Standard
7009 To make forward search possible, you first need to provide the generated
7010  output PDF/DVI file with additional information about the TeX sources.
7011  This can be done via the methods described in the section 
7012 \begin_inset CommandInset ref
7013 LatexCommand ref
7014 reference "sub:rev-search"
7015
7016 \end_inset
7017
7018 .
7019 \end_layout
7020
7021 \begin_layout Standard
7022 Additionally, you need to configure LyX for using your viewers in 
7023 \begin_inset Flex MenuItem
7024 status collapsed
7025
7026 \begin_layout Plain Layout
7027 Tools\SpecialChar \menuseparator
7028 Preferences\SpecialChar \menuseparator
7029 Output\SpecialChar \menuseparator
7030 General
7031 \end_layout
7032
7033 \end_inset
7034
7035 .
7036  We provide a range of tested configurations for some viewers, which you
7037  can select from the drop down list.
7038  If none of these configurations suits you, you have to find out and enter
7039  a suitable configuration yourself.
7040  The definition syntax uses the following placeholders:
7041 \end_layout
7042
7043 \begin_layout Itemize
7044 \noindent
7045 \begin_inset Flex Code
7046 status collapsed
7047
7048 \begin_layout Plain Layout
7049 $$n
7050 \end_layout
7051
7052 \end_inset
7053
7054 : row number
7055 \end_layout
7056
7057 \begin_layout Itemize
7058 \noindent
7059 \begin_inset Flex Code
7060 status collapsed
7061
7062 \begin_layout Plain Layout
7063 $$t
7064 \end_layout
7065
7066 \end_inset
7067
7068 : name of the (temporary) exported .tex file (without path)
7069 \end_layout
7070
7071 \begin_layout Itemize
7072 \noindent
7073 \begin_inset Flex Code
7074 status collapsed
7075
7076 \begin_layout Plain Layout
7077 $$f
7078 \end_layout
7079
7080 \end_inset
7081
7082 : name of the (temporary) exported .tex file (including path)
7083 \end_layout
7084
7085 \begin_layout Itemize
7086 \noindent
7087 \begin_inset Flex Code
7088 status collapsed
7089
7090 \begin_layout Plain Layout
7091 $$o
7092 \end_layout
7093
7094 \end_inset
7095
7096 : name of the exported output file (either dvi or pdf, depending on which
7097  one exists in the temporary directory)
7098 \end_layout
7099
7100 \begin_layout Standard
7101 Note that only some of the viewers provide full forward search functionality,
7102  among them yap, xdvi, okular and Sumatra PDF.
7103 \begin_inset Foot
7104 status collapsed
7105
7106 \begin_layout Plain Layout
7107 For Sumatra CMCDDE is needed --- downloadable from 
7108 \begin_inset CommandInset href
7109 LatexCommand href
7110 target "http://www.istri.fr/zip/CMCDDE.zip"
7111
7112 \end_inset
7113
7114
7115 \end_layout
7116
7117 \end_inset
7118
7119  While many of the widespread PDF viewers (most notably Adobe Reader) do
7120  not support forward search at all, some other viewers -- e.
7121 \begin_inset space \thinspace{}
7122 \end_inset
7123
7124 g.
7125  evince and xpdf -- allow at least to reload the document and jump to a
7126  specific page of the file, so you can at least navigate 
7127 \begin_inset Quotes eld
7128 \end_inset
7129
7130 near
7131 \begin_inset Quotes erd
7132 \end_inset
7133
7134 .
7135  This latter functionality is provided by an external call of synctex (see
7136  the predefined example configurations).
7137  
7138 \end_layout
7139
7140 \begin_layout Standard
7141 Forward search works both with DVI and PDF output.
7142  LyX simply checks which preview format you have used before (i.
7143 \begin_inset space \thinspace{}
7144 \end_inset
7145
7146 e., which format is already there in the temporary directory) and chooses
7147  the appropriate configuration for the respective format.
7148 \end_layout
7149
7150 \begin_layout Chapter
7151 Special Document Classes
7152 \end_layout
7153
7154 \begin_layout Section
7155 A&A Paper
7156 \end_layout
7157
7158 \begin_layout Standard
7159 by 
7160 \noun on
7161 Peter Sütterlin
7162 \end_layout
7163
7164 \begin_layout Subsection
7165 Introduction
7166 \end_layout
7167
7168 \begin_layout Standard
7169 This section describes how LyX can be used to write articles for submission
7170  to the scientific journal 
7171 \emph on
7172 Astronomy and Astrophysics
7173 \emph default
7174  (www.edpsciences.fr/aa/ 
7175 \begin_inset Flex URL
7176 status collapsed
7177
7178 \begin_layout Plain Layout
7179
7180 http://www.edpsciences.fr/aa/
7181 \end_layout
7182
7183 \end_inset
7184
7185 ) using Version 5.01 of the document class 
7186 \family typewriter
7187 aa.cls
7188 \family default
7189 .
7190  This package can be downloaded from the ftp site
7191 \end_layout
7192
7193 \begin_layout Standard
7194 \begin_inset VSpace medskip
7195 \end_inset
7196
7197
7198 \end_layout
7199
7200 \begin_layout Standard
7201 \align center
7202 \begin_inset Flex URL
7203 status collapsed
7204
7205 \begin_layout Plain Layout
7206
7207 ftp://ftp.edpsciences.org/pub/aa/readme.html
7208 \end_layout
7209
7210 \end_inset
7211
7212
7213 \end_layout
7214
7215 \begin_layout Standard
7216 \begin_inset VSpace medskip
7217 \end_inset
7218
7219
7220 \end_layout
7221
7222 \begin_layout Standard
7223 A manual comes together with that package, and this text is not meant to
7224  replace the original manual but is merely a short guide in how to realize
7225  the correct form of your paper.
7226  
7227 \end_layout
7228
7229 \begin_layout Standard
7230 Please note that the publisher of the journal was changed from Springer
7231  to EDP Sciences starting January 1, 2001.
7232  That change involved also some slight changes to the style files, namely
7233  the removal of the thesaurus command.
7234  The LyX class aa supports the newest version of these style files, V 5.01.
7235  If you have an older version installed, please upgrade.
7236  For compatibility, the old (version 4) layout has been kept as 
7237 \family sans
7238 article (A&A V4)
7239 \family default
7240 .
7241  Please refer to the comments in 
7242 \family typewriter
7243 LyXDir/layouts/aapaper.layout
7244 \family default
7245 .
7246 \end_layout
7247
7248 \begin_layout Subsection
7249 Getting started
7250 \end_layout
7251
7252 \begin_layout Standard
7253 It is recommended you start from the example template distributed with LyX.
7254  If you are not using a template, note the following settings:
7255 \end_layout
7256
7257 \begin_layout Itemize
7258 Select 
7259 \family sans
7260 article (A&A)
7261 \family default
7262  in the 
7263 \family sans
7264 Document\SpecialChar \menuseparator
7265 Settings
7266 \family default
7267  dialog (OK, that one was obvious).
7268 \end_layout
7269
7270 \begin_layout Itemize
7271 Don't change the option 
7272 \family sans
7273 Page
7274 \begin_inset space ~
7275 \end_inset
7276
7277 style
7278 \family default
7279 : Leave it set to 
7280 \family sans
7281 default
7282 \family default
7283 .
7284  The whole layout is done by the macros, you shouldn't change anything.
7285 \end_layout
7286
7287 \begin_layout Subsection
7288 The header block
7289 \end_layout
7290
7291 \begin_layout Standard
7292 First thing to enter is the header information.
7293  It consists of seven entries, of which some are optional.
7294  They are
7295 \end_layout
7296
7297 \begin_layout Itemize
7298
7299 \family sans
7300 Title
7301 \family default
7302 : [required] 
7303 \end_layout
7304
7305 \begin_layout Itemize
7306
7307 \family sans
7308 Subtitle
7309 \family default
7310 : [optional] 
7311 \end_layout
7312
7313 \begin_layout Itemize
7314
7315 \family sans
7316 Author
7317 \family default
7318 : [required]
7319 \end_layout
7320
7321 \begin_layout Itemize
7322
7323 \family sans
7324 Address
7325 \family default
7326 : [required]
7327 \end_layout
7328
7329 \begin_layout Itemize
7330
7331 \family sans
7332 Offprints
7333 \family default
7334 : [optional] if more than one author: whom to contact for offprint requests.
7335 \end_layout
7336
7337 \begin_layout Itemize
7338
7339 \family sans
7340 Mail
7341 \family default
7342 : [optional] mail address for contacts.
7343 \end_layout
7344
7345 \begin_layout Itemize
7346
7347 \family sans
7348 Date
7349 \family default
7350 : [required].
7351  Suggested format is 
7352 \family typewriter
7353 Received: <date>; Accepted <date> 
7354 \end_layout
7355
7356 \begin_layout Standard
7357 There is no need to issue the 
7358 \family typewriter
7359
7360 \backslash
7361 maketitle
7362 \family default
7363  command, this is done automatically by LyX when the header is finished.
7364  Although the order of the single header entries doesn't matter it is advised
7365  to keep the above sequence, just to get the best optics and meets the layout
7366  of the real document.
7367 \end_layout
7368
7369 \begin_layout Standard
7370 If you want to place footnotes in the header block, e.
7371 \begin_inset space \thinspace{}
7372 \end_inset
7373
7374 g.
7375 \begin_inset space \space{}
7376 \end_inset
7377
7378 to state your present address, just use the standard footnote via the menu
7379  
7380 \family sans
7381 Insert\SpecialChar \menuseparator
7382 Footnote.
7383
7384 \family default
7385  LyX will automagically use the term 
7386 \family typewriter
7387
7388 \backslash
7389 thanks{}
7390 \family default
7391  in that case.
7392 \end_layout
7393
7394 \begin_layout Standard
7395 In addition to these topics, the macros use three additional LaTeX commands
7396  that have no counterpart in LyX:
7397 \end_layout
7398
7399 \begin_layout Itemize
7400
7401 \family typewriter
7402
7403 \backslash
7404 and
7405 \family default
7406  to separate different names for more than one author and institute, respectivel
7407 y.
7408 \end_layout
7409
7410 \begin_layout Itemize
7411
7412 \family typewriter
7413
7414 \backslash
7415 inst{<nr>}
7416 \family default
7417 to mark corresponding author/institute pairs.
7418  The institutes are numbered sequentially as they appear in the 
7419 \family sans
7420 Address
7421 \family default
7422  field, so you have to put a marker to each author.
7423 \end_layout
7424
7425 \begin_layout Itemize
7426
7427 \family typewriter
7428
7429 \backslash
7430 email{address}
7431 \family default
7432  to supply an email address for fast contact.
7433 \end_layout
7434
7435 \begin_layout Standard
7436 In all cases, the appropriate command has to be entered in LyX and marked
7437  as LaTeX code.
7438  See the examples.
7439  
7440 \end_layout
7441
7442 \begin_layout Subsection
7443 The abstract
7444 \end_layout
7445
7446 \begin_layout Standard
7447 The abstract should immediately follow the header block.
7448  With version 5 the abstract environment was changed to a command, and there
7449  is now a resctriction to only one paragraph.
7450  In addition, it should contain an entry with the keywords.
7451  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7452  command 
7453 \family typewriter
7454
7455 \backslash
7456 keywords{}
7457 \family default
7458  by hand and mark it as LaTeX code.
7459  Refer to the example paper.
7460 \end_layout
7461
7462 \begin_layout Subsection
7463 Supported environments
7464 \end_layout
7465
7466 \begin_layout Standard
7467 The A&A paper layout supports the following environments for structuring
7468  your text:
7469 \end_layout
7470
7471 \begin_layout Itemize
7472
7473 \family sans
7474 Standard
7475 \end_layout
7476
7477 \begin_layout Itemize
7478
7479 \family sans
7480 Section
7481 \end_layout
7482
7483 \begin_layout Itemize
7484
7485 \family sans
7486 Subsection
7487 \end_layout
7488
7489 \begin_layout Itemize
7490
7491 \family sans
7492 Subsubsection
7493 \end_layout
7494
7495 \begin_layout Itemize
7496
7497 \family sans
7498 Itemize
7499 \end_layout
7500
7501 \begin_layout Itemize
7502
7503 \family sans
7504 Enumerate
7505 \end_layout
7506
7507 \begin_layout Itemize
7508
7509 \family sans
7510 Description
7511 \end_layout
7512
7513 \begin_layout Itemize
7514
7515 \family sans
7516 Caption
7517 \end_layout
7518
7519 \begin_layout Itemize
7520
7521 \family sans
7522 Abstract
7523 \end_layout
7524
7525 \begin_layout Itemize
7526
7527 \family sans
7528 Acknowledgment
7529 \end_layout
7530
7531 \begin_layout Itemize
7532
7533 \family sans
7534 Bibliography
7535 \end_layout
7536
7537 \begin_layout Itemize
7538
7539 \family sans
7540 LaTeX
7541 \end_layout
7542
7543 \begin_layout Subsection
7544 Commands not supported by LyX
7545 \end_layout
7546
7547 \begin_layout Standard
7548 Some commands are not yet supported by the 
7549 \family sans
7550 paper (A&A)
7551 \family default
7552  layout for LyX.
7553  Some have already been mentioned.
7554  For the sake of completeness, they are listed all together here:
7555 \end_layout
7556
7557 \begin_layout Itemize
7558
7559 \family typewriter
7560
7561 \backslash
7562 and
7563 \end_layout
7564
7565 \begin_layout Itemize
7566
7567 \family typewriter
7568
7569 \backslash
7570 email
7571 \end_layout
7572
7573 \begin_layout Itemize
7574
7575 \family typewriter
7576
7577 \backslash
7578 appendix
7579 \end_layout
7580
7581 \begin_layout Itemize
7582
7583 \family typewriter
7584
7585 \backslash
7586 authorrunning
7587 \end_layout
7588
7589 \begin_layout Itemize
7590
7591 \family typewriter
7592
7593 \backslash
7594 inst{}
7595 \end_layout
7596
7597 \begin_layout Itemize
7598
7599 \family typewriter
7600
7601 \backslash
7602 keywords{}
7603 \end_layout
7604
7605 \begin_layout Itemize
7606
7607 \family typewriter
7608
7609 \backslash
7610 object{}
7611 \end_layout
7612
7613 \begin_layout Itemize
7614
7615 \family typewriter
7616
7617 \backslash
7618 titlerunning{}
7619 \end_layout
7620
7621 \begin_layout Standard
7622 If you want to use any of these commands, you have to enter them yourself.
7623  
7624 \series bold
7625 Do not forget to mark them as LaTeX code!
7626 \end_layout
7627
7628 \begin_layout Subsection
7629 Figure and Table Floats
7630 \end_layout
7631
7632 \begin_layout Standard
7633 LyX provides support for the necessary float environments 
7634 \family sans
7635 figure, figure*, table
7636 \family default
7637  and 
7638 \family sans
7639 table*
7640 \family default
7641 , therefore we won't tell much about it here.
7642  Refer to the 
7643 \emph on
7644 User's
7645 \begin_inset space ~
7646 \end_inset
7647
7648 Guide
7649 \emph default
7650 .
7651  Just remember that tables should be left-aligned.
7652  For that, select the table and change the alignment in 
7653 \family sans
7654 Edit\SpecialChar \menuseparator
7655 Paragraph
7656 \begin_inset space ~
7657 \end_inset
7658
7659 Settings.
7660 \end_layout
7661
7662 \begin_layout Standard
7663 There is only one special thing: the figures with caption besides the figure.
7664  To create such a figure, you have to do the following:
7665 \end_layout
7666
7667 \begin_layout Enumerate
7668 Create a wide figure float: 
7669 \family sans
7670 Insert\SpecialChar \menuseparator
7671 Float\SpecialChar \menuseparator
7672 Figure
7673 \family default
7674 , then right click in the figure and select 
7675 \family sans
7676 \bar under
7677 S
7678 \bar default
7679 pan
7680 \begin_inset space ~
7681 \end_inset
7682
7683 columns
7684 \family default
7685 .
7686 \end_layout
7687
7688 \begin_layout Enumerate
7689 Enter your caption text.
7690 \end_layout
7691
7692 \begin_layout Enumerate
7693 Press 
7694 \family sans
7695 Return
7696 \family default
7697  to move the cursor above the caption.
7698 \end_layout
7699
7700 \begin_layout Enumerate
7701 Insert your figure
7702 \end_layout
7703
7704 \begin_layout Enumerate
7705 Position the cursor behind the figure and insert a horizontal fill: 
7706 \family sans
7707 Insert\SpecialChar \menuseparator
7708 Special
7709 \begin_inset space ~
7710 \end_inset
7711
7712 Character\SpecialChar \menuseparator
7713 Horizontal
7714 \begin_inset space ~
7715 \end_inset
7716
7717 Fill
7718 \family default
7719 .
7720 \end_layout
7721
7722 \begin_layout Enumerate
7723 Switch to LaTeX mode: 
7724 \family sans
7725 M-c
7726 \begin_inset space ~
7727 \end_inset
7728
7729 t
7730 \family default
7731 .
7732 \end_layout
7733
7734 \begin_layout Enumerate
7735 Enter 
7736 \family typewriter
7737
7738 \backslash
7739 parbox[b]{55mm}{
7740 \family default
7741 .
7742  
7743 \series bold
7744 Do not close the brace!
7745 \end_layout
7746
7747 \begin_layout Enumerate
7748 Position the cursor behind the caption text, switch to LaTeX mode and insert
7749  the closing brace: 
7750 \family sans
7751 M-c
7752 \begin_inset space ~
7753 \end_inset
7754
7755 t
7756 \family default
7757  
7758 \family typewriter
7759 }
7760 \family default
7761 .
7762 \end_layout
7763
7764 \begin_layout Standard
7765 Also, refer to the figures in the example paper.
7766 \end_layout
7767
7768 \begin_layout Subsection
7769 Referee layout
7770 \end_layout
7771
7772 \begin_layout Standard
7773 For submission, the paper has to be formated in a special double-spacing
7774  layout.
7775  For this purpose, you have to give the option 
7776 \family typewriter
7777 referee
7778 \family default
7779  to the documentclass.
7780  This must be done using the extra class options field in the 
7781 \family sans
7782 Document\SpecialChar \menuseparator
7783 Settings
7784 \family default
7785  dialog.
7786  Just enter the string 
7787 \family typewriter
7788 referee
7789 \family default
7790  there.
7791 \end_layout
7792
7793 \begin_layout Subsection
7794 The example paper
7795 \end_layout
7796
7797 \begin_layout Standard
7798 The 
7799 \family sans
7800 Examples
7801 \family default
7802  directory contains an example paper written with LyX.
7803  It is the example paper from the original macro package, translated to
7804  LyX.
7805  Use it for inspiration, and compare the original LaTeX code with LyX way
7806  of writing.
7807 \end_layout
7808
7809 \begin_layout Section
7810 AASTeX
7811 \end_layout
7812
7813 \begin_layout Standard
7814 by 
7815 \noun on
7816 Mike Ressler
7817 \end_layout
7818
7819 \begin_layout Subsection
7820 Introduction
7821 \end_layout
7822
7823 \begin_layout Standard
7824 AASTeX is a set of macros produced by the American Astronomical Society
7825  to facilitate electronic manuscript submission to the three journals they
7826  publish: the Astrophysical Journal (including the Letters and Supplement),
7827  the Astronomical Journal, and the Publications of the Astronomical Society
7828  of the Pacific.
7829  LyX has proven to be an excellent tool for generating these documents,
7830  especially given its equation, citation, and figure handling capabilities.
7831  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7832  is the version described here, or higher.
7833  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7834  incompatible with LyX.
7835  The AASTeX package may be downloaded from the AASTeX Web site
7836 \end_layout
7837
7838 \begin_layout Standard
7839 \begin_inset VSpace medskip
7840 \end_inset
7841
7842
7843 \end_layout
7844
7845 \begin_layout Standard
7846 \align center
7847 \begin_inset Flex URL
7848 status collapsed
7849
7850 \begin_layout Plain Layout
7851
7852 http://www.journals.uchicago.edu/AAS/AASTeX
7853 \end_layout
7854
7855 \end_inset
7856
7857
7858 \end_layout
7859
7860 \begin_layout Standard
7861 \begin_inset VSpace medskip
7862 \end_inset
7863
7864
7865 \end_layout
7866
7867 \begin_layout Standard
7868 A complete user guide is contained in that package and you should familiarize
7869  yourself with it thoroughly before embarking on writing a paper in LyX.
7870  LyX will not reduce the need to figure out all the AASTeX commands, it
7871  will only reduce the drudgery of typing everything in.
7872  It is your responsibility to ensure that the final exported LaTeX document
7873  conforms completely to the requirements of the journal to which you are
7874  submitting your paper.
7875 \end_layout
7876
7877 \begin_layout Subsection
7878 Starting a New Paper
7879 \end_layout
7880
7881 \begin_layout Standard
7882 I strongly suggest that you start with the AASTeX template file.
7883  Click on 
7884 \family sans
7885 File\SpecialChar \menuseparator
7886 New from
7887 \family default
7888  
7889 \family sans
7890 Template
7891 \family default
7892 , enter the new file name, then choose the 
7893 \family typewriter
7894 aastex.lyx
7895 \family default
7896  template.
7897  This will show the most common fields found in a manuscript.
7898  Simply overwrite the existing text (including the brackets, 
7899 \family typewriter
7900 <>
7901 \family default
7902 ) with the correct information.
7903  Many of the AASTeX commands and environments can be implemented directly
7904  in LyX, but some cannot: most noticeably 
7905 \family typewriter
7906
7907 \backslash
7908 altaffilmark
7909 \family default
7910  and 
7911 \family typewriter
7912
7913 \backslash
7914 altaffiltext
7915 \family default
7916 , which should stick out like a sore thumb if you actually just opened the
7917  template file.
7918  For commands such as these, the LaTeX code must be entered directly and
7919  marked as such.
7920  Such commands are referred to as TeX code, or Evil Red Text.
7921  I tried to minimize the amount of TeX code needed in an AASTeX document,
7922  but there is still a bit more required than any of us would like.
7923 \end_layout
7924
7925 \begin_layout Subsection
7926 Finishing Your Paper
7927 \end_layout
7928
7929 \begin_layout Standard
7930 When the paper is finished to your satisfaction and previews/prints correctly,
7931  there are a few 
7932 \begin_inset Quotes eld
7933 \end_inset
7934
7935 postprocessing
7936 \begin_inset Quotes erd
7937 \end_inset
7938
7939  actions which need to be done before you submit it to the journals.
7940  
7941 \end_layout
7942
7943 \begin_layout Enumerate
7944 Export your paper as a LaTeX file (
7945 \family sans
7946 File\SpecialChar \menuseparator
7947 Export\SpecialChar \menuseparator
7948 LaTeX
7949 \family default
7950 ).
7951  
7952 \end_layout
7953
7954 \begin_layout Enumerate
7955 Edit the resulting 
7956 \family typewriter
7957 .tex
7958 \family default
7959  file with your favorite text editor
7960 \end_layout
7961
7962 \begin_deeper
7963 \begin_layout Enumerate
7964 remove the comment lines before the 
7965 \family typewriter
7966
7967 \backslash
7968 documentclass
7969 \family default
7970  command
7971 \end_layout
7972
7973 \begin_layout Enumerate
7974 remove the 
7975 \family typewriter
7976
7977 \backslash
7978 usepackage...{fontenc}
7979 \family default
7980  line if it appears (usually just after 
7981 \family typewriter
7982
7983 \backslash
7984 documentclass
7985 \family default
7986 }; also remove the 
7987 \family typewriter
7988
7989 \backslash
7990 secnumdepth
7991 \family default
7992  line if it appears.
7993 \end_layout
7994
7995 \begin_layout Enumerate
7996 remove everything between (and including) the 
7997 \family typewriter
7998
7999 \backslash
8000 makeatletter
8001 \family default
8002  and 
8003 \family typewriter
8004
8005 \backslash
8006 makeatother
8007 \family default
8008  commands, except for any commands you specifically put into the LaTeX preamble
8009  (which should appear immediately after the 
8010 \begin_inset Quotes eld
8011 \end_inset
8012
8013 User specified LaTeX commands
8014 \begin_inset Quotes erd
8015 \end_inset
8016
8017  comment in the 
8018 \family typewriter
8019 .tex
8020 \family default
8021  file).
8022 \end_layout
8023
8024 \end_deeper
8025 \begin_layout Enumerate
8026 Run the resulting file through LaTeX to make sure it still processes correctly.
8027 \end_layout
8028
8029 \begin_layout Enumerate
8030 Reread the journal requirements to make sure your filenames and formats
8031  are correct.
8032 \end_layout
8033
8034 \begin_layout Enumerate
8035 Submit it.
8036 \end_layout
8037
8038 \begin_layout Subsection
8039 Comments On Specific Commands
8040 \end_layout
8041
8042 \begin_layout Standard
8043 I will not describe the detailed usage of the individual AASTeX commands:
8044  the AASTeX User Guide (
8045 \family typewriter
8046 aasguide.tex
8047 \family default
8048 ) gives a good description of each.
8049  Thus it's probably easiest for me to go down the list as found in the guide
8050  and offer comments where necessary.
8051  So let's begin \SpecialChar \ldots{}
8052
8053 \end_layout
8054
8055 \begin_layout Subsubsection
8056 Things that work as expected
8057 \end_layout
8058
8059 \begin_layout Standard
8060 Because they work as you might expect, I simply list them and the section
8061  they are found in: 
8062 \family typewriter
8063
8064 \backslash
8065 documentclass
8066 \family default
8067  (2.1.1), 
8068 \family typewriter
8069
8070 \backslash
8071 begin{document}
8072 \family default
8073  (2.2), 
8074 \family typewriter
8075
8076 \backslash
8077 title
8078 \family default
8079  (2.3), 
8080 \family typewriter
8081
8082 \backslash
8083 author
8084 \family default
8085  (2.3), 
8086 \family typewriter
8087
8088 \backslash
8089 affil
8090 \family default
8091  (2.3), 
8092 \family typewriter
8093
8094 \backslash
8095 abstract
8096 \family default
8097  (2.4), 
8098 \family typewriter
8099
8100 \backslash
8101 keywords
8102 \family default
8103  (2.5), 
8104 \family typewriter
8105
8106 \backslash
8107 section
8108 \family default
8109  (2.7), 
8110 \family typewriter
8111
8112 \backslash
8113 subsection
8114 \family default
8115  (2.7), 
8116 \family typewriter
8117
8118 \backslash
8119 subsubsection
8120 \family default
8121  (2.7), 
8122 \family typewriter
8123
8124 \backslash
8125 paragraph
8126 \family default
8127  (2.7), 
8128 \family typewriter
8129
8130 \backslash
8131 facility
8132 \family default
8133  (2.10), 
8134 \family typewriter
8135
8136 \backslash
8137 begin{displaymath}
8138 \family default
8139  (2.12), 
8140 \family typewriter
8141
8142 \backslash
8143 begin{equation}
8144 \family default
8145  (2.12), 
8146 \family typewriter
8147
8148 \backslash
8149 begin{eqnarray}
8150 \family default
8151  (2.12), 
8152 \family typewriter
8153
8154 \backslash
8155 begin{mathletters}
8156 \family default
8157  (2.12), 
8158 \family typewriter
8159
8160 \backslash
8161 begin{thebibliography}
8162 \family default
8163  (2.13.1), 
8164 \family typewriter
8165
8166 \backslash
8167 bibitem
8168 \family default
8169  (2.13.2), all the cite commands and their variations (2.13.2), the generic
8170  graphicx figure commands (2.14.1), 
8171 \family typewriter
8172
8173 \backslash
8174 begin{table}
8175 \family default
8176  (2.15.4), 
8177 \family typewriter
8178
8179 \backslash
8180 begin{tabular}
8181 \family default
8182  (2.15.4), 
8183 \family typewriter
8184
8185 \backslash
8186 caption
8187 \family default
8188  (2.15.4), 
8189 \family typewriter
8190
8191 \backslash
8192 label
8193 \family default
8194  (2.15.4, amongst other places), 
8195 \family typewriter
8196
8197 \backslash
8198 tablerefs
8199 \family default
8200  (2.15.5), 
8201 \family typewriter
8202
8203 \backslash
8204 tablecomments
8205 \family default
8206  (2.15.5), 
8207 \family typewriter
8208
8209 \backslash
8210 url
8211 \family default
8212  (2.17.4), 
8213 \family typewriter
8214
8215 \backslash
8216 end{document}
8217 \family default
8218  (2.18).
8219 \end_layout
8220
8221 \begin_layout Standard
8222 The following style options also work correctly: 
8223 \family typewriter
8224 longabstract
8225 \family default
8226  (2.4), 
8227 \family typewriter
8228 preprint
8229 \family default
8230  (3.2.1), 
8231 \family typewriter
8232 preprint2
8233 \family default
8234  (3.2.2), 
8235 \family typewriter
8236 eqsecnum
8237 \family default
8238  (3.3), 
8239 \family typewriter
8240 flushrt
8241 \family default
8242  (3.4).
8243  Simply put them in the 
8244 \family sans
8245 Options
8246 \family default
8247  box in 
8248 \family sans
8249 Layout\SpecialChar \menuseparator
8250 Document
8251 \family default
8252 .
8253 \end_layout
8254
8255 \begin_layout Subsubsection
8256 Things that work, but require more comment
8257 \end_layout
8258
8259 \begin_layout Standard
8260 The following items work, but require a little more discussion:
8261 \end_layout
8262
8263 \begin_layout Itemize
8264 These items are reserved for use by the journal editors, but you can put
8265  them into the LaTeX preamble if you feel compelled to do so: 
8266 \family typewriter
8267
8268 \backslash
8269 received
8270 \family default
8271
8272 \family typewriter
8273
8274 \backslash
8275 revised
8276 \family default
8277
8278 \family typewriter
8279
8280 \backslash
8281 accepted
8282 \family default
8283
8284 \family typewriter
8285
8286 \backslash
8287 ccc
8288 \family default
8289
8290 \family typewriter
8291
8292 \backslash
8293 cpright
8294 \family default
8295  (all from 2.1.3)
8296 \end_layout
8297
8298 \begin_layout Itemize
8299 These items may be placed in the LaTeX preamble, and are included as blanks
8300  in the template file: 
8301 \family typewriter
8302
8303 \backslash
8304 slugcomment
8305 \family default
8306  (2.1.4), 
8307 \family typewriter
8308
8309 \backslash
8310 shorttitle
8311 \family default
8312  (2.1.5), 
8313 \family typewriter
8314
8315 \backslash
8316 shortauthors
8317 \family default
8318  (2.1.5)
8319 \end_layout
8320
8321 \begin_layout Itemize
8322
8323 \family typewriter
8324
8325 \backslash
8326 email
8327 \family default
8328  (2.3) – can only be used 
8329 \begin_inset Quotes eld
8330 \end_inset
8331
8332 standalone
8333 \begin_inset Quotes erd
8334 \end_inset
8335
8336 , not in the middle of a paragraph.
8337  Use TeX code if you need to embed it.
8338 \end_layout
8339
8340 \begin_layout Itemize
8341
8342 \family typewriter
8343
8344 \backslash
8345 and
8346 \family default
8347  (2.3) – will have extra {} after it.
8348  This should not cause an error.
8349 \end_layout
8350
8351 \begin_layout Itemize
8352
8353 \family typewriter
8354
8355 \backslash
8356 notetoeditor
8357 \family default
8358  (2.6) – can only be used 
8359 \begin_inset Quotes eld
8360 \end_inset
8361
8362 standalone
8363 \begin_inset Quotes erd
8364 \end_inset
8365
8366 , not in the middle of a paragraph.
8367  Use TeX code if you need to embed it.
8368 \end_layout
8369
8370 \begin_layout Itemize
8371
8372 \family typewriter
8373
8374 \backslash
8375 placetable
8376 \family default
8377  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8378  hand
8379 \end_layout
8380
8381 \begin_layout Itemize
8382
8383 \family typewriter
8384
8385 \backslash
8386 placefigure
8387 \family default
8388  (2.8) – same as for 
8389 \family typewriter
8390
8391 \backslash
8392 placetable
8393 \end_layout
8394
8395 \begin_layout Itemize
8396
8397 \family typewriter
8398
8399 \backslash
8400 acknowledgements
8401 \family default
8402  (2.9) – will have extra {} after it.
8403  This should not cause an error.
8404 \end_layout
8405
8406 \begin_layout Itemize
8407
8408 \family typewriter
8409
8410 \backslash
8411 appendix
8412 \family default
8413  (2.11) – will have extra {} after it.
8414  This should not cause an error.
8415 \end_layout
8416
8417 \begin_layout Itemize
8418
8419 \family typewriter
8420
8421 \backslash
8422 figcaption
8423 \family default
8424  (2.14.2) – you can insert an optional filename argument by placing the cursor
8425  at the beginning of the text and selecting 
8426 \family sans
8427 Insert\SpecialChar \menuseparator
8428 Short Title
8429 \family default
8430 .
8431  
8432 \begin_inset Quotes eld
8433 \end_inset
8434
8435 Short Title
8436 \begin_inset Quotes erd
8437 \end_inset
8438
8439  inserts an optional argument of the type needed by 
8440 \family typewriter
8441
8442 \backslash
8443 figcaption
8444 \family default
8445 .
8446  Hopefully it will be renamed someday.
8447 \end_layout
8448
8449 \begin_layout Itemize
8450
8451 \family typewriter
8452
8453 \backslash
8454 objectname
8455 \family default
8456  (2.17.1) – same as 
8457 \family typewriter
8458
8459 \backslash
8460 figcaption
8461 \family default
8462  for the catalog ID optional parameter
8463 \end_layout
8464
8465 \begin_layout Itemize
8466
8467 \family typewriter
8468
8469 \backslash
8470 dataset
8471 \family default
8472  (2.17.1) – same as 
8473 \family typewriter
8474
8475 \backslash
8476 figcaption
8477 \family default
8478  for the catalog ID optional parameter
8479 \end_layout
8480
8481 \begin_layout Subsubsection
8482 Things not implemented, use TeX code
8483 \end_layout
8484
8485 \begin_layout Standard
8486
8487 \family typewriter
8488
8489 \backslash
8490 altaffilmark
8491 \family default
8492  (2.3), 
8493 \family typewriter
8494
8495 \backslash
8496 altaffiltext
8497 \family default
8498  (2.3), 
8499 \family typewriter
8500
8501 \backslash
8502 eqnum
8503 \family default
8504  (2.12), 
8505 \family typewriter
8506
8507 \backslash
8508 setcounter{equation}
8509 \family default
8510  (2.12), Journal name abbreviations (2.13.4), 
8511 \family typewriter
8512
8513 \backslash
8514 figurenum
8515 \family default
8516  (2.14.1), 
8517 \family typewriter
8518
8519 \backslash
8520 epsscale
8521 \family default
8522  (2.14.1), 
8523 \family typewriter
8524
8525 \backslash
8526 plotone
8527 \family default
8528  (2.14.1), 
8529 \family typewriter
8530
8531 \backslash
8532 plottwo
8533 \family default
8534  (2.14.1), 
8535 \family typewriter
8536
8537 \backslash
8538 tablenum
8539 \family default
8540  (2.15.4), 
8541 \family typewriter
8542
8543 \backslash
8544 tableline
8545 \family default
8546  (2.15.4, insert it as the first element in the lefthand cell after where
8547  you want it.
8548  Don't use any of LyX's rules in the table), 
8549 \family typewriter
8550
8551 \backslash
8552 tablenotemark
8553 \family default
8554  (2.15.5), 
8555 \family typewriter
8556
8557 \backslash
8558 tablenotetext
8559 \family default
8560  (2.15.5), much of Misc (2.17, except 
8561 \family typewriter
8562
8563 \backslash
8564 objectname
8565 \family default
8566
8567 \family typewriter
8568
8569 \backslash
8570 dataset
8571 \family default
8572
8573 \family typewriter
8574
8575 \backslash
8576 url
8577 \family default
8578 , and 
8579 \family typewriter
8580
8581 \backslash
8582 email
8583 \family default
8584 ; see above), 
8585 \family typewriter
8586
8587 \backslash
8588 singlespace
8589 \family default
8590  (3.1), 
8591 \family typewriter
8592
8593 \backslash
8594 doublespace
8595 \family default
8596  (3.1), 
8597 \family typewriter
8598
8599 \backslash
8600 onecolumn
8601 \family default
8602  (3.2), 
8603 \family typewriter
8604
8605 \backslash
8606 twocolumn
8607 \family default
8608  (3.2)
8609 \end_layout
8610
8611 \begin_layout Subsubsection
8612 Things that cannot be implemented
8613 \end_layout
8614
8615 \begin_layout Standard
8616 \SpecialChar \ldots{}
8617  at least in any meaningful sort of way, so I suggest ignoring them.
8618  They are the references environment (2.13.3), and the deluxetable environment
8619  (2.15).
8620  If you really, really need to use deluxetable, I suggest editing it in
8621  a separate file with a text editor, then using 
8622 \family sans
8623 Insert\SpecialChar \menuseparator
8624 Child
8625 \begin_inset space ~
8626 \end_inset
8627
8628 Document
8629 \family default
8630  to include it in your LyX document.
8631  See the 
8632 \family typewriter
8633 aas_sample.lyx
8634 \family default
8635  file to see an example of this.
8636 \end_layout
8637
8638 \begin_layout Subsection
8639 FAQs, Tips, Tricks, and Other Ruminations
8640 \end_layout
8641
8642 \begin_layout Subsubsection
8643 Getting LyX and AASTeX to cooperate
8644 \end_layout
8645
8646 \begin_layout Standard
8647 It can be a bit tricky to get LyX to recognize a new layout and document
8648  class.
8649  When all else fails, do this:
8650 \end_layout
8651
8652 \begin_layout Enumerate
8653 Make certain that LaTeX can find AASTeX.
8654  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8655  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8656 \family typewriter
8657 sample.tex
8658 \family default
8659 .
8660 \end_layout
8661
8662 \begin_layout Enumerate
8663 Make certain that 
8664 \family typewriter
8665 aastex.layout
8666 \family default
8667  appears in LyX's 
8668 \family typewriter
8669 layouts
8670 \family default
8671  folder
8672 \end_layout
8673
8674 \begin_layout Enumerate
8675 Rerun 
8676 \family sans
8677 Tools\SpecialChar \menuseparator
8678 Reconfigure
8679 \family default
8680  in LyX, then restart LyX.
8681 \end_layout
8682
8683 \begin_layout Enumerate
8684 Open a regular new file, not from a template.
8685  Does AASTeX appear in the class list in 
8686 \family sans
8687 Document\SpecialChar \menuseparator
8688 Settings
8689 \family default
8690 ?
8691 \end_layout
8692
8693 \begin_layout Standard
8694 If you get a warning from an existing AASTeX document about not being able
8695  to find the AASTeX layout or a message about 
8696 \begin_inset Quotes eld
8697 \end_inset
8698
8699 You should not mix title layouts with normal ones
8700 \begin_inset Quotes erd
8701 \end_inset
8702
8703 , things haven't been installed correctly.
8704 \end_layout
8705
8706 \begin_layout Subsubsection
8707 LaTeX error processing a table 
8708 \end_layout
8709
8710 \begin_layout Standard
8711 LyX, by default, attempts to center the table caption/title.
8712  This seems to produce a bad interaction in AASTeX so you should click somewhere
8713  in the caption/title, then select 
8714 \family sans
8715 Edit\SpecialChar \menuseparator
8716 Paragraph
8717 \begin_inset space ~
8718 \end_inset
8719
8720 Settings
8721 \family default
8722 , then set the 
8723 \family sans
8724 Alignment
8725 \family default
8726  to 
8727 \family sans
8728 Block
8729 \family default
8730 .
8731  This took care of it for me.
8732 \end_layout
8733
8734 \begin_layout Subsubsection
8735 References
8736 \end_layout
8737
8738 \begin_layout Standard
8739 A couple of things: 1) I have noticed some funny spacing in the reference
8740  entries in the text.
8741  When you enter the bibliography item data, make sure their is 
8742 \emph on
8743 no
8744 \emph default
8745  space between the last author and the parenthesis setting off the year;
8746  
8747 \emph on
8748 e.
8749 \begin_inset space \thinspace{}
8750 \end_inset
8751
8752 g.
8753 \begin_inset space \space{}
8754 \end_inset
8755
8756
8757 \emph default
8758 type 
8759 \family typewriter
8760 Ressler(1992)
8761 \family default
8762 , not 
8763 \family typewriter
8764 Ressler (1992)
8765 \family default
8766 .
8767  2) Entering the references at all is not obvious.
8768  The easiest thing is to start typing your first reference at the end of
8769  the document, then mark it as type 
8770 \family sans
8771 References
8772 \family default
8773 .
8774  That will put a small gray box in front of what you just typed.
8775  Click on the box to fill in the rest of the information.
8776  For new references, go to the end of an existing reference and press return.
8777  That will create a new line with its own box, etc.
8778 \end_layout
8779
8780 \begin_layout Subsubsection
8781 Including EPS files
8782 \end_layout
8783
8784 \begin_layout Standard
8785 Even though AASTeX provides its own figure commands (
8786 \family typewriter
8787
8788 \backslash
8789 plotone
8790 \family default
8791 , for example), I much prefer LaTeX's standard figure commands (with the
8792  default graphicx).
8793  You can insert the 
8794 \family typewriter
8795
8796 \backslash
8797 plotone
8798 \family default
8799 , etc.
8800 \begin_inset space ~
8801 \end_inset
8802
8803 commands as TeX code into a Figure Float box if you desire, but I never
8804  have much luck getting the layout right.
8805  With the standard graphics, LyX will insert a 
8806 \family typewriter
8807
8808 \backslash
8809 usepackage{graphicx}
8810 \family default
8811  command into the LaTeX preamble and handle the figures in the standard
8812  LaTeX2e way, interspersing the figures in the text.
8813  I believe ApJ accepts figures exactly this way now; AJ might still use
8814  the 
8815 \begin_inset Quotes eld
8816 \end_inset
8817
8818 stack everything at the end
8819 \begin_inset Quotes erd
8820 \end_inset
8821
8822  technique.
8823 \end_layout
8824
8825 \begin_layout Subsubsection
8826 Things I could have done, but didn't
8827 \end_layout
8828
8829 \begin_layout Standard
8830 There are a few 
8831 \begin_inset Quotes eld
8832 \end_inset
8833
8834 pretty
8835 \begin_inset Quotes erd
8836 \end_inset
8837
8838  things I could have implemented, but chose not to.
8839  For instance, I saw no point in double-spacing the text in the LyX window,
8840  even though it is double-spaced in the paper manuscript.
8841  Also, I chose not to make separate layouts for the preprint and preprint2
8842  styles.
8843  Since I assume you will spend most of your time in the plain manuscript
8844  mode anyway, I decided not to chew up more disk space with this.
8845  
8846 \end_layout
8847
8848 \begin_layout Subsection
8849 Final Caveat
8850 \end_layout
8851
8852 \begin_layout Standard
8853 Your mileage may vary.
8854  I've now had papers published by both ApJ and AJ that have had 98% of the
8855  effort done in LyX; the last 2% was the LaTeX post-processing and a few
8856  cleanups.
8857  I have had no trouble with the submission process, and I'm sure the journals
8858  were never aware that there might be a difference.
8859  So, go forth and publish!
8860 \end_layout
8861
8862 \begin_layout Section
8863 AMS LaTeX
8864 \end_layout
8865
8866 \begin_layout Standard
8867 by 
8868 \noun on
8869 David Johnson
8870 \noun default
8871 ; updated by 
8872 \noun on
8873 Richard Heck
8874 \end_layout
8875
8876 \begin_layout Standard
8877 \begin_inset VSpace bigskip
8878 \end_inset
8879
8880
8881 \end_layout
8882
8883 \begin_layout Standard
8884 \noindent
8885 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8886  papers to be submitted to American Mathematical Society publications.
8887  The layouts are not tailored to a specific journal, but easily can be.
8888  You should refer to the AMS documentation for specific instructions for
8889  each journal (usually it will entail only changing a single line in the
8890  TeX output).
8891  That documentation is available on the Web at 
8892 \begin_inset Flex URL
8893 status open
8894
8895 \begin_layout Plain Layout
8896
8897 http://www.ams.org
8898 \end_layout
8899
8900 \end_inset
8901
8902  or by ftp at 
8903 \begin_inset Flex URL
8904 status open
8905
8906 \begin_layout Plain Layout
8907
8908 ftp://ftp.ams.org/pub/tex/amslatex/
8909 \end_layout
8910
8911 \end_inset
8912
8913 .
8914  These layouts are appropriate, and useful, for any mathematical writing.
8915  
8916 \end_layout
8917
8918 \begin_layout Standard
8919 There are two basic AMS LaTeX layouts: 
8920 \end_layout
8921
8922 \begin_layout Itemize
8923 amsart: The standard AMS article format.
8924 \end_layout
8925
8926 \begin_layout Itemize
8927 amsbook: the standard AMS book (really, monograph) format.
8928  
8929 \end_layout
8930
8931 \begin_layout Standard
8932 The layouts themselves contain only the minimum necessary to use the AMS
8933  classes.
8934  They do not, in particular, contain any of the `theorem' environments used
8935  for setting theorems, lemmas, and the like.
8936  These are contained, instead, in the 
8937 \begin_inset Flex Code
8938 status collapsed
8939
8940 \begin_layout Plain Layout
8941 Theorems (AMS)
8942 \end_layout
8943
8944 \end_inset
8945
8946  module, which is loaded by default when you select one of the AMS classes.
8947  (It can also be used with other classes and can be removed, if you would
8948  rather use something else.) Less commonly used environments are in the 
8949 \begin_inset Flex Code
8950 status collapsed
8951
8952 \begin_layout Plain Layout
8953 Theorems (AMS-Extended)
8954 \end_layout
8955
8956 \end_inset
8957
8958  module, which must be loaded manually.
8959 \end_layout
8960
8961 \begin_layout Standard
8962 By default, theorems and the like are numbered consecutively throughout
8963  the document, but this may be modified by loading the module 
8964 \begin_inset Flex Code
8965 status collapsed
8966
8967 \begin_layout Plain Layout
8968 Theorems (Order by Section)
8969 \end_layout
8970
8971 \end_inset
8972
8973  or, if you are using 
8974 \begin_inset Flex Code
8975 status collapsed
8976
8977 \begin_layout Plain Layout
8978 book (AMS)
8979 \end_layout
8980
8981 \end_inset
8982
8983 , the module 
8984 \begin_inset Flex Code
8985 status collapsed
8986
8987 \begin_layout Plain Layout
8988 Theorems (Order by Chapter)
8989 \end_layout
8990
8991 \end_inset
8992
8993 .
8994  These will number the results as 
8995 \begin_inset Formula $n.m$
8996 \end_inset
8997
8998 , where the first number refers to the section (or chapter) and the second
8999  refers to the total number of results so far in that section (or chapter).
9000  Many environments are also available unnumbered.
9001  These are indicated by an asterisk at the end.
9002  If you happen to want 
9003 \emph on
9004 only
9005 \emph default
9006  unnumbered results, the module 
9007 \begin_inset Flex Code
9008 status collapsed
9009
9010 \begin_layout Plain Layout
9011 Theorems (Starred)
9012 \end_layout
9013
9014 \end_inset
9015
9016  provides that option.
9017 \end_layout
9018
9019 \begin_layout Standard
9020 Note that these modules do not 
9021 \emph on
9022 have
9023 \emph default
9024  to be used with the AMS classes.
9025  It is perfectly possible to use the 
9026 \begin_inset Flex Code
9027 status collapsed
9028
9029 \begin_layout Plain Layout
9030 Theorems (AMS)
9031 \end_layout
9032
9033 \end_inset
9034
9035  module, and the others mentioned, with other classes, such as 
9036 \begin_inset Flex Code
9037 status collapsed
9038
9039 \begin_layout Plain Layout
9040 article
9041 \end_layout
9042
9043 \end_inset
9044
9045
9046 \begin_inset Flex Code
9047 status collapsed
9048
9049 \begin_layout Plain Layout
9050 report
9051 \end_layout
9052
9053 \end_inset
9054
9055
9056 \begin_inset Flex Code
9057 status collapsed
9058
9059 \begin_layout Plain Layout
9060 book (KOMA-script)
9061 \end_layout
9062
9063 \end_inset
9064
9065 , and so forth.
9066 \end_layout
9067
9068 \begin_layout Subsection
9069 What these layouts provide
9070 \end_layout
9071
9072 \begin_layout Standard
9073 There is a long list of included environments provided by these layouts.
9074  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9075  variety of `theorem' environments.
9076  However, the AMS recommends the environments that are available in LyX.
9077  
9078 \end_layout
9079
9080 \begin_layout Standard
9081 The following environments—as well as the standard environments, such as
9082  
9083 \begin_inset Flex Noun
9084 status collapsed
9085
9086 \begin_layout Plain Layout
9087 section
9088 \end_layout
9089
9090 \end_inset
9091
9092
9093 \begin_inset Flex Noun
9094 status collapsed
9095
9096 \begin_layout Plain Layout
9097 bibliography
9098 \end_layout
9099
9100 \end_inset
9101
9102
9103 \begin_inset Flex Noun
9104 status collapsed
9105
9106 \begin_layout Plain Layout
9107 title
9108 \end_layout
9109
9110 \end_inset
9111
9112
9113 \begin_inset Flex Noun
9114 status collapsed
9115
9116 \begin_layout Plain Layout
9117 author
9118 \end_layout
9119
9120 \end_inset
9121
9122 , and 
9123 \begin_inset Flex Noun
9124 status collapsed
9125
9126 \begin_layout Plain Layout
9127 date
9128 \end_layout
9129
9130 \end_inset
9131
9132 —are provided by 
9133 \begin_inset Flex Code
9134 status collapsed
9135
9136 \begin_layout Plain Layout
9137 article (AMS)
9138 \end_layout
9139
9140 \end_inset
9141
9142  and 
9143 \begin_inset Flex Code
9144 status collapsed
9145
9146 \begin_layout Plain Layout
9147 book (AMS)
9148 \end_layout
9149
9150 \end_inset
9151
9152 :
9153 \end_layout
9154
9155 \begin_layout Description
9156 Address This should be the author's permanent address.
9157 \end_layout
9158
9159 \begin_layout Description
9160 Current
9161 \begin_inset space ~
9162 \end_inset
9163
9164 Address This should be the author's temporary address at the time of submission,
9165  if different from the Address.
9166 \end_layout
9167
9168 \begin_layout Description
9169 Email Author's e-mail address
9170 \end_layout
9171
9172 \begin_layout Description
9173 URL Author's Web address, if desired.
9174 \end_layout
9175
9176 \begin_layout Description
9177 Keywords Key words or phrases used to identify specific topics discussed
9178  in the paper.
9179 \end_layout
9180
9181 \begin_layout Description
9182 Subjectclass These refer to the AMS Subject Classifications, published and
9183  described in 
9184 \emph on
9185 Mathematical Reviews
9186 \emph default
9187 .
9188  These are also available online at the AMS cites listed above.
9189 \end_layout
9190
9191 \begin_layout Description
9192 Thanks
9193 \end_layout
9194
9195 \begin_layout Description
9196 Dedicatory
9197 \end_layout
9198
9199 \begin_layout Description
9200 Translator
9201 \end_layout
9202
9203 \begin_layout Standard
9204 The following environments are provided by both the 
9205 \begin_inset Flex Code
9206 status collapsed
9207
9208 \begin_layout Plain Layout
9209 Theorems
9210 \end_layout
9211
9212 \end_inset
9213
9214  and 
9215 \begin_inset Flex Code
9216 status collapsed
9217
9218 \begin_layout Plain Layout
9219 Theorems (AMS)
9220 \end_layout
9221
9222 \end_inset
9223
9224  modules, in the latter case in both starred (unnumbered) and unstarred
9225  (numbered) versions.
9226  These same environments are provided only in the starred versions by the
9227  
9228 \begin_inset Flex Code
9229 status collapsed
9230
9231 \begin_layout Plain Layout
9232 Theorems (Starred)
9233 \end_layout
9234
9235 \end_inset
9236
9237  module:
9238 \end_layout
9239
9240 \begin_layout Theorem
9241 This is typically used for the statements of major results.
9242  
9243 \end_layout
9244
9245 \begin_layout Corollary*
9246 This is used for statements which follow fairly directly from previous statement
9247 s.
9248  Again, these can be major results.
9249  
9250 \end_layout
9251
9252 \begin_layout Lemma
9253 These are smaller results needed to prove other statements.
9254 \end_layout
9255
9256 \begin_layout Proposition
9257 These are less major results which (hopefully) add to the general theory
9258  being discussed.
9259 \end_layout
9260
9261 \begin_layout Conjecture
9262 These are statements provided without justification, which the author does
9263  not know how to prove, but which seem to be true (to the author, at least).
9264 \end_layout
9265
9266 \begin_layout Definition*
9267 Guess what this is for.
9268  The font is different for this environment than for the previous ones.
9269  
9270 \end_layout
9271
9272 \begin_layout Example*
9273 Used for examples illustrating proven results.
9274 \end_layout
9275
9276 \begin_layout Problem
9277 It's not really known what this is for.
9278  You should figure it out.
9279 \end_layout
9280
9281 \begin_layout Exercise*
9282 Write a description for this one.
9283 \end_layout
9284
9285 \begin_layout Remark
9286 This environment is also a type of theorem, usually a lesser sort of observation.
9287 \end_layout
9288
9289 \begin_layout Claim*
9290 Often used in the course of giving a proof of a larger result.
9291 \end_layout
9292
9293 \begin_layout Case
9294 Generally, these are used to break up long arguments, using specific instances
9295  of some condition.
9296  
9297 \end_layout
9298
9299 \begin_layout Case
9300 The numbering scheme for cases is on its own, not together with other numbered
9301  statements.
9302  
9303 \end_layout
9304
9305 \begin_layout Proof
9306 At the end of this environment, a QED symbol (usually a square, but it can
9307  vary with different styles) is placed.
9308  If you want to have other environments within this one—for example, Case
9309  environments—and have the QED symbol appear only after them, then the other
9310  environments need to be nested within the proof environment.
9311  See the section 
9312 \emph on
9313 Nesting Environments
9314 \emph default
9315  of the 
9316 \emph on
9317 User's Guide
9318 \emph default
9319  for information on nesting.
9320 \end_layout
9321
9322 \begin_layout Standard
9323 And these environments are provided by 
9324 \begin_inset Flex Code
9325 status collapsed
9326
9327 \begin_layout Plain Layout
9328 Theorems (AMS-Extended)
9329 \end_layout
9330
9331 \end_inset
9332
9333 :
9334 \end_layout
9335
9336 \begin_layout Criterion*
9337 A required condition.
9338 \end_layout
9339
9340 \begin_layout Algorithm*
9341 A general procedure to be used.
9342 \end_layout
9343
9344 \begin_layout Axiom*
9345 This is a property or statement taken as true within the system being discussed.
9346 \end_layout
9347
9348 \begin_layout Condition*
9349 Sometimes used to state a condition assumed within the present context of
9350  discussion.
9351 \end_layout
9352
9353 \begin_layout Note*
9354 Similar to a Remark.
9355 \end_layout
9356
9357 \begin_layout Notation*
9358 Used for the explanation of, yes, notation.
9359 \end_layout
9360
9361 \begin_layout Summary
9362 Do we really need to tell you? 
9363 \end_layout
9364
9365 \begin_layout Acknowledgement*
9366 Acknowledgement.
9367 \end_layout
9368
9369 \begin_layout Conclusion*
9370 Sometimes used at the end of a long train of argument.
9371 \end_layout
9372
9373 \begin_layout Fact
9374 Used in a way similar to Proposition, though perhaps lower on the scale.
9375 \end_layout
9376
9377 \begin_layout Standard
9378 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9379  fonts packages.
9380  They need to be available on your system in order to use these environments.
9381 \end_layout
9382
9383 \begin_layout Section
9384 AGU journals (
9385 \family sans
9386 aguplus
9387 \family default
9388 )
9389 \end_layout
9390
9391 \begin_layout Standard
9392 by 
9393 \shape smallcaps
9394 Martin Vermeer
9395 \end_layout
9396
9397 \begin_layout Subsection
9398 Description
9399 \end_layout
9400
9401 \begin_layout Standard
9402 These are the layout files for some of the journals of the American Geophysical
9403  Society.
9404  It is assumed that you have both the AGU's own class files and AGUplus
9405  installed (everything to be found at
9406 \begin_inset Flex URL
9407 status collapsed
9408
9409 \begin_layout Plain Layout
9410
9411 ftp://ftp.agu.org/journals/latex/journals
9412 \end_layout
9413
9414 \end_inset
9415
9416 ).
9417 \end_layout
9418
9419 \begin_layout Subsection
9420 New styles
9421 \end_layout
9422
9423 \begin_layout Standard
9424 Redefined are 
9425 \family sans
9426 Paragraph
9427 \family default
9428
9429 \family sans
9430 Paragraph*
9431 \family default
9432 .
9433  They are still called this in the LyX GUI, though their LaTeX equivalents
9434  in the AGU classes are 
9435 \family sans
9436 Subsubsubsection
9437 \family default
9438  and 
9439 \family sans
9440 Subsubsubsection*
9441 \family default
9442 .
9443 \end_layout
9444
9445 \begin_layout Standard
9446 Newly defined styles are 
9447 \family sans
9448 Left_Header
9449 \family default
9450
9451 \family sans
9452 Right_Header
9453 \family default
9454
9455 \family sans
9456 Received
9457 \family default
9458
9459 \family sans
9460 Revised
9461 \family default
9462
9463 \family sans
9464 Accepted
9465 \family default
9466
9467 \family sans
9468 CCC
9469 \family default
9470
9471 \family sans
9472 PaperId
9473 \family default
9474
9475 \family sans
9476 AuthorAddr
9477 \family default
9478
9479 \family sans
9480 SlugComment
9481 \family default
9482 .
9483  These are mostly manuscript attributes and defined in the AGU class documentati
9484 on.
9485 \end_layout
9486
9487 \begin_layout Standard
9488 I suspect this is still badly incomplete.
9489 \end_layout
9490
9491 \begin_layout Subsection
9492 New floats
9493 \end_layout
9494
9495 \begin_layout Standard
9496
9497 \family sans
9498 Planotable
9499 \family default
9500  and 
9501 \family sans
9502 Plate
9503 \family default
9504 .
9505  We also have a new 
9506 \family sans
9507 Table_Caption
9508 \family default
9509 .
9510 \end_layout
9511
9512 \begin_layout Subsection
9513 Supported journals
9514 \end_layout
9515
9516 \begin_layout Itemize
9517
9518 \emph on
9519 Journal of Geophysical Research
9520 \emph default
9521
9522 \family typewriter
9523 jgrga.layout
9524 \family default
9525  — Martin Vermeer
9526 \end_layout
9527
9528 \begin_layout Standard
9529 Add your own, it isn't so hard! Look at the 
9530 \family typewriter
9531 jgrga.layout
9532 \family default
9533  example and 
9534 \family typewriter
9535 aguplus.inc
9536 \family default
9537 .
9538 \end_layout
9539
9540 \begin_layout Subsection
9541 Bugs and things to remember
9542 \end_layout
9543
9544 \begin_layout Standard
9545 In order to use the new layouts, you must remember to do the following for
9546  a new document:
9547 \end_layout
9548
9549 \begin_layout Enumerate
9550
9551 \emph on
9552 Turn off babel
9553 \emph default
9554 .
9555  This can be done in the 
9556 \family sans
9557 Layout\SpecialChar \menuseparator
9558 Document
9559 \family default
9560  or 
9561 \family sans
9562 Document\SpecialChar \menuseparator
9563 Settings
9564 \family default
9565  menu item.
9566  (AGU articles are always in English, right? So 
9567 \emph on
9568 don't
9569 \emph default
9570  choose a language.)
9571 \end_layout
9572
9573 \begin_layout Enumerate
9574 Enter 
9575 \family typewriter
9576 jgrga
9577 \family default
9578  into the document's 
9579 \family sans
9580 Extra Options
9581 \family default
9582  field.
9583  (Yes, this is a bug.)
9584 \end_layout
9585
9586 \begin_layout Enumerate
9587 Make sure you use the 
9588 \family typewriter
9589 agu.bst
9590 \family default
9591  bibliography style, by entering 
9592 \family sans
9593 agu
9594 \family default
9595  into the second field of the BibTeX inset.
9596  None of the standard styles will do.
9597 \end_layout
9598
9599 \begin_layout Section
9600 Broadway
9601 \end_layout
9602
9603 \begin_layout Standard
9604 by 
9605 \shape smallcaps
9606 Garst Reese
9607 \end_layout
9608
9609 \begin_layout Subsection
9610 Introduction
9611 \end_layout
9612
9613 \begin_layout Standard
9614 Broadway is for writing plays.
9615  The format is more decorative than Hollywood, and much less standardized.
9616  This format should be suitable for workshops.
9617 \end_layout
9618
9619 \begin_layout Subsection
9620 Special problems
9621 \end_layout
9622
9623 \begin_layout Standard
9624 The same as in Hollywood.
9625 \end_layout
9626
9627 \begin_layout Subsection
9628 Special features
9629 \end_layout
9630
9631 \begin_layout Standard
9632 Insert the 
9633 \family sans
9634 Speaker
9635 \family default
9636  names as labels then cross-reference the label to insert the name.
9637  The cross-reference dialog will show the current cast of characters.
9638 \end_layout
9639
9640 \begin_layout Subsection
9641 Paper size and Margins
9642 \end_layout
9643
9644 \begin_layout Standard
9645 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9646 \end_layout
9647
9648 \begin_layout Subsection
9649 Environments
9650 \end_layout
9651
9652 \begin_layout Standard
9653 The following environments are available.
9654  You can use broadway.bind to get the bind keys shown at the right.
9655 \end_layout
9656
9657 \begin_layout Itemize
9658
9659 \family sans
9660 Standard
9661 \begin_inset Newline newline
9662 \end_inset
9663
9664
9665 \family default
9666 You should not have to use this, but it is here for anything that does not
9667  fit otherwise.
9668 \end_layout
9669
9670 \begin_layout Itemize
9671
9672 \family sans
9673 Narrative
9674 \begin_inset space \hfill{}
9675 \end_inset
9676
9677 M-z n
9678 \begin_inset Newline newline
9679 \end_inset
9680
9681
9682 \family default
9683 Used to describe stage setting and the action.
9684  First use of speaker names in all CAPs.
9685 \end_layout
9686
9687 \begin_layout Itemize
9688
9689 \family sans
9690 ACT
9691 \begin_inset space \hfill{}
9692 \end_inset
9693
9694 M-z a
9695 \begin_inset Newline newline
9696 \end_inset
9697
9698
9699 \family default
9700 Automatically numbered.
9701  On screen it will be arabic, but will print as Roman.
9702 \end_layout
9703
9704 \begin_layout Itemize
9705
9706 \family sans
9707 ACT*
9708 \begin_inset space \hfill{}
9709 \end_inset
9710
9711 M-z S at
9712 \begin_inset Newline newline
9713 \end_inset
9714
9715
9716 \family default
9717 Subtitle for 
9718 \family sans
9719 ACT.
9720
9721 \family default
9722  It is just centered text.
9723 \end_layout
9724
9725 \begin_layout Itemize
9726
9727 \family sans
9728 SCENE
9729 \begin_inset space \hfill{}
9730 \end_inset
9731
9732 M-z S-S
9733 \begin_inset Newline newline
9734 \end_inset
9735
9736
9737 \family default
9738 Not automatically numbered.
9739  You supply the number.
9740  This is because I couldn't figure out how.
9741 \end_layout
9742
9743 \begin_layout Itemize
9744
9745 \family sans
9746 AT_RISE:
9747 \begin_inset space \hfill{}
9748 \end_inset
9749
9750 M-z S-R
9751 \begin_inset Newline newline
9752 \end_inset
9753
9754
9755 \family default
9756 A special case of Narrative to describe the setting and action as the curtain
9757  rises.
9758 \end_layout
9759
9760 \begin_layout Itemize
9761
9762 \family sans
9763 Speaker
9764 \begin_inset space \hfill{}
9765 \end_inset
9766
9767 M-z s
9768 \begin_inset Newline newline
9769 \end_inset
9770
9771
9772 \family default
9773 The speaker's (actor's) title, centered in all CAPS.
9774 \end_layout
9775
9776 \begin_layout Itemize
9777
9778 \family sans
9779 Parenthetical
9780 \begin_inset space \hfill{}
9781 \end_inset
9782
9783 M-z p
9784 \begin_inset Newline newline
9785 \end_inset
9786
9787
9788 \family default
9789 Instructions to the speaker.
9790  The parentheses are automatically inserted.
9791  The ( will appear on screen, but both will be in the printed play.
9792  This environment is only used within 
9793 \family sans
9794 Dialogue
9795 \family default
9796 .
9797 \end_layout
9798
9799 \begin_layout Itemize
9800
9801 \family sans
9802 Dialogue
9803 \begin_inset space \hfill{}
9804 \end_inset
9805
9806 M-z d
9807 \begin_inset Newline newline
9808 \end_inset
9809
9810
9811 \family default
9812 What the Speaker says.
9813 \end_layout
9814
9815 \begin_layout Itemize
9816
9817 \family sans
9818 CURTAIN
9819 \begin_inset space \hfill{}
9820 \end_inset
9821
9822 M-z S-C
9823 \begin_inset Newline newline
9824 \end_inset
9825
9826
9827 \family default
9828 The curtain comes down.
9829 \end_layout
9830
9831 \begin_layout Itemize
9832
9833 \family sans
9834 Title
9835 \begin_inset space \hfill{}
9836 \end_inset
9837
9838 M-z S-T
9839 \end_layout
9840
9841 \begin_layout Itemize
9842
9843 \family sans
9844 Author
9845 \begin_inset space \hfill{}
9846 \end_inset
9847
9848 M-z S-A
9849 \end_layout
9850
9851 \begin_layout Itemize
9852
9853 \family sans
9854 Right_Address
9855 \begin_inset space \hfill{}
9856 \end_inset
9857
9858 M-z r
9859 \end_layout
9860
9861 \begin_layout Standard
9862 Hello there.
9863 \end_layout
9864
9865 \begin_layout Section
9866 Dinbrief
9867 \end_layout
9868
9869 \begin_layout Standard
9870 The document class 
9871 \family sans
9872 dinbrief
9873 \family default
9874  can be used to type letters according to German conventions.
9875  A template file is included in 
9876 \family typewriter
9877 .../lyx/share/templates
9878 \family default
9879  for you to use as a starting point.
9880 \end_layout
9881
9882 \begin_layout Section
9883 EGS journals (
9884 \family sans
9885 egs
9886 \family default
9887 )
9888 \end_layout
9889
9890 \begin_layout Standard
9891 by 
9892 \shape smallcaps
9893 Martin Vermeer
9894 \end_layout
9895
9896 \begin_layout Subsection
9897 Description
9898 \end_layout
9899
9900 \begin_layout Standard
9901 This is the layout file for the European Geophysical Society journals.
9902  The needed 
9903 \family typewriter
9904 egs.cls
9905 \family default
9906  can be downloaded from the web site of the EGS under 
9907 \begin_inset Flex URL
9908 status collapsed
9909
9910 \begin_layout Plain Layout
9911
9912 www.copernicus.org
9913 \end_layout
9914
9915 \end_inset
9916
9917 .
9918 \end_layout
9919
9920 \begin_layout Subsection
9921 New styles
9922 \end_layout
9923
9924 \begin_layout Standard
9925
9926 \family sans
9927 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9928  Accepted
9929 \family default
9930
9931 \family sans
9932 Offsets
9933 \family default
9934 .
9935  The current layout file is unfortunately very unmodular and would benefit
9936  from using the various 
9937 \family typewriter
9938 std*.inc
9939 \family default
9940  file inclusions.
9941 \end_layout
9942
9943 \begin_layout Section
9944 Elsevier Journals
9945 \end_layout
9946
9947 \begin_layout Standard
9948 See the LyX template file 
9949 \family typewriter
9950 elsarticle.lyx
9951 \family default
9952 .
9953  It contains all infos you need.
9954 \end_layout
9955
9956 \begin_layout Section
9957 Foils [aka 
9958 \family sans
9959 FoilTeX
9960 \family default
9961 ]
9962 \begin_inset CommandInset label
9963 LatexCommand label
9964 name "sec:foiltex"
9965
9966 \end_inset
9967
9968
9969 \end_layout
9970
9971 \begin_layout Standard
9972 by 
9973 \noun on
9974 Allan Rae
9975 \end_layout
9976
9977 \begin_layout Subsection
9978 Introduction
9979 \end_layout
9980
9981 \begin_layout Standard
9982 This section describes how to use LyX to make slides for overhead projectors.
9983  There are two document classes that can do this: the default slides class
9984  and the 
9985 \family sans
9986 FoilTeX
9987 \family default
9988  slides class.
9989  This section documents the latter.
9990 \end_layout
9991
9992 \begin_layout Standard
9993 I'm going to say this again, nice and clear, so that there's no misunderstanding
9994 :
9995 \end_layout
9996
9997 \begin_layout Standard
9998 \begin_inset VSpace bigskip
9999 \end_inset
10000
10001
10002 \end_layout
10003
10004 \begin_layout Standard
10005 \align center
10006
10007 \size large
10008 This section documents the class 
10009 \begin_inset Quotes eld
10010 \end_inset
10011
10012
10013 \family sans
10014 slides (FoilTeX)
10015 \family default
10016
10017 \begin_inset Quotes erd
10018 \end_inset
10019
10020  
10021 \emph on
10022 only.
10023 \end_layout
10024
10025 \begin_layout Standard
10026 \begin_inset VSpace bigskip
10027 \end_inset
10028
10029
10030 \end_layout
10031
10032 \begin_layout Standard
10033 If you're looking for the documentation for 
10034 \begin_inset Quotes eld
10035 \end_inset
10036
10037
10038 \family sans
10039 slides (default)
10040 \family default
10041
10042 \begin_inset Quotes erd
10043 \end_inset
10044
10045 , check out section
10046 \begin_inset space ~
10047 \end_inset
10048
10049
10050 \begin_inset CommandInset ref
10051 LatexCommand ref
10052 reference "sec:slitex"
10053
10054 \end_inset
10055
10056 .
10057  If your machine doesn't have the 
10058 \family sans
10059 foils
10060 \family default
10061  class [
10062 \begin_inset Quotes eld
10063 \end_inset
10064
10065
10066 \family sans
10067 slides (FoilTeX)
10068 \family default
10069
10070 \begin_inset Quotes erd
10071 \end_inset
10072
10073 ] installed, you'll probably have to use the default 
10074 \family sans
10075 slides
10076 \family default
10077  class, which isn't quite as good as 
10078 \family sans
10079 foils.
10080 \end_layout
10081
10082 \begin_layout Standard
10083 The 
10084 \family sans
10085 foils
10086 \family default
10087  class is designed for use with version 2.1 of the 
10088 \family sans
10089 foils.cls
10090 \family default
10091  LaTeX class file which is now an integral part of LaTeX2e.
10092 \end_layout
10093
10094 \begin_layout Subsection
10095 Getting Started
10096 \end_layout
10097
10098 \begin_layout Standard
10099 Obviously, to use this document class, you need to select 
10100 \begin_inset Quotes eld
10101 \end_inset
10102
10103
10104 \family sans
10105 slides (FoilTeX)
10106 \family default
10107
10108 \begin_inset Quotes erd
10109 \end_inset
10110
10111  from the 
10112 \family sans
10113 Class
10114 \family default
10115  entry in the 
10116 \family sans
10117 Document
10118 \begin_inset space ~
10119 \end_inset
10120
10121 Layout
10122 \family default
10123  dialog.
10124  There are some settings in the 
10125 \family sans
10126 Document
10127 \begin_inset space ~
10128 \end_inset
10129
10130 Layout
10131 \family default
10132  dialog that you should know about that are specific to this class:
10133 \end_layout
10134
10135 \begin_layout Itemize
10136 Don't change the options 
10137 \family sans
10138 Sides
10139 \family default
10140  and 
10141 \family sans
10142 Columns
10143 \family default
10144  on the 
10145 \family sans
10146 Document
10147 \begin_inset space ~
10148 \end_inset
10149
10150 Layout
10151 \family default
10152  dialog.
10153  They're ignored by the 
10154 \family sans
10155 foils
10156 \family default
10157  class.
10158 \end_layout
10159
10160 \begin_layout Itemize
10161 The default font size is 20
10162 \begin_inset space \thinspace{}
10163 \end_inset
10164
10165 pt with the other options being 17
10166 \begin_inset space \thinspace{}
10167 \end_inset
10168
10169 pt, 25
10170 \begin_inset space \thinspace{}
10171 \end_inset
10172
10173 pt and 30
10174 \begin_inset space \thinspace{}
10175 \end_inset
10176
10177 pt.
10178 \end_layout
10179
10180 \begin_layout Itemize
10181 The default font is 
10182 \family sans
10183 sans
10184 \family default
10185  
10186 \family sans
10187 serif
10188 \family default
10189  but all math equations are still typeset in the usual roman font.
10190 \end_layout
10191
10192 \begin_layout Itemize
10193
10194 \family sans
10195 FoilTeX
10196 \family default
10197  supports A4 and Letter paper sizes as well as a special size for working
10198  with 35
10199 \begin_inset space \thinspace{}
10200 \end_inset
10201
10202 mm slides.
10203  It doesn't support A5, B5, legal or executive paper sizes.
10204 \end_layout
10205
10206 \begin_layout Itemize
10207 Don't bother changing the 
10208 \family sans
10209 Float Placement
10210 \family default
10211  settings because they are ignored anyway.
10212  All floats appear where they are defined in the text.
10213 \end_layout
10214
10215 \begin_layout Itemize
10216 The 
10217 \family sans
10218 Pagestyle
10219 \family default
10220  setting behaves a bit differently for this class.
10221  
10222 \family sans
10223 FoilTeX
10224 \family default
10225  provides extensive footer and header capabilities including a user-defined
10226  logo.
10227  See section
10228 \begin_inset space ~
10229 \end_inset
10230
10231
10232 \begin_inset CommandInset ref
10233 LatexCommand ref
10234 reference "sec:foilfoot"
10235
10236 \end_inset
10237
10238  for more details.
10239  The title page is treated differently to all other pages in the document
10240  and is 
10241 \emph on
10242 always
10243 \emph default
10244  unnumbered and 
10245 \emph on
10246 always
10247 \emph default
10248  has the logo centered at the bottom of the page (if one is defined).
10249  The possible page style choices and what they do are as follows:
10250 \end_layout
10251
10252 \begin_deeper
10253 \begin_layout Labeling
10254 \labelwidthstring MMMMMMM
10255
10256 \family sans
10257 \series bold
10258 empty
10259 \family default
10260 \series default
10261  The final output contains no page numbers, or other headers or footers
10262  (except footnotes of course).
10263  
10264 \end_layout
10265
10266 \begin_layout Labeling
10267 \labelwidthstring MMMMMMM
10268
10269 \family sans
10270 \series bold
10271 plain
10272 \family default
10273 \series default
10274  The final output contains page numbers centered at the bottom of the page.
10275  No other headings or footers (other than footnotes).
10276 \end_layout
10277
10278 \begin_layout Labeling
10279 \labelwidthstring MMMMMMM
10280
10281 \series bold
10282 foilheadings
10283 \series default
10284  Page numbers in lower right corner.
10285  Additional headers and footers are also shown.
10286  This is also the default.
10287 \end_layout
10288
10289 \begin_layout Labeling
10290 \labelwidthstring MMMMMMM
10291
10292 \series bold
10293 fancy
10294 \series default
10295  Gives you access to the 
10296 \family sans
10297 fancyheadings
10298 \family default
10299  package although its use with 
10300 \family sans
10301 FoilTeX
10302 \family default
10303  is discouraged by the writer of the 
10304 \family sans
10305 FoilTeX
10306 \family default
10307  package because of some potential page layout clashes.
10308 \end_layout
10309
10310 \end_deeper
10311 \begin_layout Subsubsection
10312 Extra Options
10313 \end_layout
10314
10315 \begin_layout Standard
10316 The following options may be used in the extra class options in the 
10317 \family sans
10318 Document\SpecialChar \menuseparator
10319 Settings
10320 \family default
10321  dialog.
10322 \end_layout
10323
10324 \begin_layout Labeling
10325 \labelwidthstring MMMMMMx
10326
10327 \series bold
10328 35mmSlide
10329 \series default
10330  This sets up the page layout for 7.33
10331 \begin_inset space \thinspace{}
10332 \end_inset
10333
10334 in by 11
10335 \begin_inset space \thinspace{}
10336 \end_inset
10337
10338 in paper, which is about the same aspect ratio as a 35
10339 \begin_inset space \thinspace{}
10340 \end_inset
10341
10342 mm slide, making it a bit easier to work with this medium.
10343 \end_layout
10344
10345 \begin_layout Labeling
10346 \labelwidthstring MMMMMMx
10347
10348 \series bold
10349 headrule
10350 \series default
10351  Places a rule across the page below the header on every page except the
10352  title page.
10353 \end_layout
10354
10355 \begin_layout Labeling
10356 \labelwidthstring MMMMMMx
10357
10358 \series bold
10359 footrule
10360 \series default
10361  Places a rule across the page above the footer on every page except the
10362  title page.
10363 \end_layout
10364
10365 \begin_layout Labeling
10366 \labelwidthstring MMMMMMx
10367
10368 \series bold
10369 dvips
10370 \series default
10371  This is automatically set each time you create a new 
10372 \family sans
10373 foils
10374 \family default
10375  document.
10376  This option tells 
10377 \family sans
10378 FoilTeX
10379 \family default
10380  to use the dvips driver to rotate those pages that are set as landscape
10381  foils.
10382 \end_layout
10383
10384 \begin_layout Labeling
10385 \labelwidthstring MMMMMMx
10386
10387 \series bold
10388 landscape
10389 \series default
10390  Simply changes the page dimensions to those of a landscape page but doesn't
10391  do any rotation.
10392  Thus if you use this option you need to use an external program to rotate
10393  each page or feed your paper through your printer as landscape.
10394  Note that this option effectively reverses the roles of the 
10395 \family sans
10396 Foilhead
10397 \family default
10398  and 
10399 \family sans
10400 Rotatefoilhead
10401 \family default
10402  environments (don't worry these are described in the next section).
10403 \end_layout
10404
10405 \begin_layout Labeling
10406 \labelwidthstring MMMMMMx
10407
10408 \series bold
10409 leqno
10410 \series default
10411  Equation numbers on the left.
10412 \end_layout
10413
10414 \begin_layout Labeling
10415 \labelwidthstring MMMMMMx
10416
10417 \series bold
10418 fleqn
10419 \series default
10420  Flush-left equations.
10421 \end_layout
10422
10423 \begin_layout Subsection
10424 Supported Environments
10425 \end_layout
10426
10427 \begin_layout Standard
10428 Most of the environments commonly supported in other classes are also supported
10429  by the 
10430 \family sans
10431 foils
10432 \family default
10433  class.
10434  There are several additional environments provided by 
10435 \family sans
10436 FoilTeX
10437 \family default
10438  as well as a couple added by LyX.
10439  The following environments are shared with other classes:
10440 \end_layout
10441
10442 \begin_layout Standard
10443 \begin_inset Flex Multiple Columns
10444 status open
10445
10446 \begin_layout Itemize
10447
10448 \family sans
10449 Standard
10450 \end_layout
10451
10452 \begin_layout Itemize
10453
10454 \family sans
10455 Itemize
10456 \end_layout
10457
10458 \begin_layout Itemize
10459
10460 \family sans
10461 Enumerate
10462 \end_layout
10463
10464 \begin_layout Itemize
10465
10466 \family sans
10467 Description
10468 \end_layout
10469
10470 \begin_layout Itemize
10471
10472 \family sans
10473 List
10474 \end_layout
10475
10476 \begin_layout Itemize
10477
10478 \family sans
10479 LyX-Code
10480 \end_layout
10481
10482 \begin_layout Itemize
10483
10484 \family sans
10485 Verse
10486 \end_layout
10487
10488 \begin_layout Itemize
10489
10490 \family sans
10491 Quote
10492 \end_layout
10493
10494 \begin_layout Itemize
10495
10496 \family sans
10497 Quotation
10498 \end_layout
10499
10500 \begin_layout Itemize
10501
10502 \family sans
10503 Title
10504 \end_layout
10505
10506 \begin_layout Itemize
10507
10508 \family sans
10509 Author
10510 \end_layout
10511
10512 \begin_layout Itemize
10513
10514 \family sans
10515 Date
10516 \end_layout
10517
10518 \begin_layout Itemize
10519
10520 \family sans
10521 Abstract
10522 \end_layout
10523
10524 \begin_layout Itemize
10525
10526 \family sans
10527 Bibliography
10528 \end_layout
10529
10530 \begin_layout Itemize
10531
10532 \family sans
10533 Address
10534 \end_layout
10535
10536 \begin_layout Itemize
10537
10538 \family sans
10539 RightAddress
10540 \end_layout
10541
10542 \begin_layout Itemize
10543
10544 \family sans
10545 Caption
10546 \end_layout
10547
10548 \begin_layout Itemize
10549
10550 \family sans
10551 Comment
10552 \end_layout
10553
10554 \end_inset
10555
10556
10557 \end_layout
10558
10559 \begin_layout Standard
10560 That is, all the major environments apart from the sectioning environments.
10561  Since foils are essentially self-contained sections, with a title and body,
10562  
10563 \family sans
10564 FoilTeX
10565 \family default
10566  provides specific commands for starting new foils and these are:
10567 \end_layout
10568
10569 \begin_layout Itemize
10570
10571 \family sans
10572 Foilhead
10573 \end_layout
10574
10575 \begin_layout Itemize
10576
10577 \family sans
10578 Rotatefoilhead
10579 \end_layout
10580
10581 \begin_layout Standard
10582 LyX also provides slightly modified versions of these two environments called:
10583 \end_layout
10584
10585 \begin_layout Itemize
10586
10587 \family sans
10588 ShortFoilhead
10589 \end_layout
10590
10591 \begin_layout Itemize
10592
10593 \family sans
10594 ShortRotatefoilhead
10595 \end_layout
10596
10597 \begin_layout Standard
10598 and the differences will be explained in the next section.
10599 \end_layout
10600
10601 \begin_layout Standard
10602 Since foils are often used in presenting ideas or new theorems and such
10603  
10604 \family sans
10605 FoilTeX
10606 \family default
10607  also provides a comprehensive box of goodies for presenting them:
10608 \end_layout
10609
10610 \begin_layout Standard
10611 \begin_inset Flex Multiple Columns
10612 status open
10613
10614 \begin_layout Itemize
10615
10616 \family sans
10617 Theorem
10618 \end_layout
10619
10620 \begin_layout Itemize
10621
10622 \family sans
10623 Lemma
10624 \end_layout
10625
10626 \begin_layout Itemize
10627
10628 \family sans
10629 Corollary
10630 \end_layout
10631
10632 \begin_layout Itemize
10633
10634 \family sans
10635 Proposition
10636 \end_layout
10637
10638 \begin_layout Itemize
10639
10640 \family sans
10641 Definition
10642 \end_layout
10643
10644 \begin_layout Itemize
10645
10646 \family sans
10647 Proof
10648 \end_layout
10649
10650 \begin_layout Itemize
10651
10652 \family sans
10653 Theorem*
10654 \end_layout
10655
10656 \begin_layout Itemize
10657
10658 \family sans
10659 Lemma*
10660 \end_layout
10661
10662 \begin_layout Itemize
10663
10664 \family sans
10665 Corollary*
10666 \end_layout
10667
10668 \begin_layout Itemize
10669
10670 \family sans
10671 Proposition*
10672 \end_layout
10673
10674 \begin_layout Itemize
10675
10676 \family sans
10677 Definition*
10678 \end_layout
10679
10680 \end_inset
10681
10682
10683 \end_layout
10684
10685 \begin_layout Standard
10686 The starred versions are unnumbered while the unstarred versions are numbered.
10687  There are also two list environments added by LyX and these are:
10688 \end_layout
10689
10690 \begin_layout Itemize
10691
10692 \family sans
10693 TickList
10694 \end_layout
10695
10696 \begin_layout Itemize
10697
10698 \family sans
10699 CrossList
10700 \end_layout
10701
10702 \begin_layout Standard
10703
10704 \family sans
10705 FoilTeX
10706 \family default
10707  provides some powerful header and footer capabilities that are best set
10708  in the preamble although they may be set at any point in a document.
10709  If you want to change these settings in your document the best place to
10710  do so is at the very top of a foil, i.
10711 \begin_inset space \thinspace{}
10712 \end_inset
10713
10714 e.
10715 \emph on
10716
10717 \begin_inset space \space{}
10718 \end_inset
10719
10720
10721 \emph default
10722 straight after the foilhead.
10723 \end_layout
10724
10725 \begin_layout Standard
10726 For this purpose, the following command styles are provided [
10727 \shape smallcaps
10728 Martin Vermeer
10729 \shape default
10730 ]:
10731 \end_layout
10732
10733 \begin_layout Standard
10734 \begin_inset Flex Multiple Columns
10735 status open
10736
10737 \begin_layout Itemize
10738
10739 \family sans
10740 My
10741 \begin_inset space ~
10742 \end_inset
10743
10744 Logo
10745 \end_layout
10746
10747 \begin_layout Itemize
10748
10749 \family sans
10750 Restriction
10751 \end_layout
10752
10753 \begin_layout Itemize
10754
10755 \family sans
10756 Right
10757 \begin_inset space ~
10758 \end_inset
10759
10760 Footer
10761 \end_layout
10762
10763 \begin_layout Itemize
10764
10765 \family sans
10766 Right
10767 \begin_inset space ~
10768 \end_inset
10769
10770 Header
10771 \end_layout
10772
10773 \begin_layout Itemize
10774
10775 \family sans
10776 Left
10777 \begin_inset space ~
10778 \end_inset
10779
10780 Header
10781 \end_layout
10782
10783 \begin_deeper
10784 \begin_layout Plain Layout
10785 \begin_inset space ~
10786 \end_inset
10787
10788
10789 \end_layout
10790
10791 \end_deeper
10792 \end_inset
10793
10794
10795 \end_layout
10796
10797 \begin_layout Standard
10798 There are also a few commands provided by 
10799 \family sans
10800 FoilTeX
10801 \family default
10802  that aren't directly supported by LyX but I'll tell you what they do and
10803  how to use them in section
10804 \begin_inset space ~
10805 \end_inset
10806
10807
10808 \begin_inset CommandInset ref
10809 LatexCommand ref
10810 reference "sec:unsuppfoils"
10811
10812 \end_inset
10813
10814 .
10815 \end_layout
10816
10817 \begin_layout Subsection
10818 Building a Set of Foils
10819 \end_layout
10820
10821 \begin_layout Standard
10822 This section will give a simple introduction to using the different environments
10823  to build a set of foils.
10824  If you want to see an example set of foils, take a look at the 
10825 \family typewriter
10826 Foils.lyx
10827 \family default
10828  file you find in LyX's 
10829 \family typewriter
10830 examples
10831 \family default
10832  folder.
10833 \end_layout
10834
10835 \begin_layout Subsubsection
10836 Give It a Title Page
10837 \end_layout
10838
10839 \begin_layout Standard
10840 Unlike other classes that provide 
10841 \family sans
10842 Title
10843 \family default
10844
10845 \family sans
10846 Author
10847 \family default
10848
10849 \family sans
10850 Date
10851 \family default
10852  and 
10853 \family sans
10854 Abstract
10855 \family default
10856  environments, 
10857 \family sans
10858 foils
10859 \family default
10860  creates the title on a page of its own.
10861  If you leave out the 
10862 \family sans
10863 Date
10864 \family default
10865  environment LaTeX will substitute the current date (every time you regenerate
10866  the output).
10867 \end_layout
10868
10869 \begin_layout Subsubsection
10870 Start a New Foil
10871 \end_layout
10872
10873 \begin_layout Standard
10874 As I mentioned earlier, there are four ways of starting a new foil.
10875  For portrait foils you should use 
10876 \family sans
10877 Foilhead
10878 \family default
10879  or 
10880 \family sans
10881 ShortFoilhead.
10882
10883 \family default
10884  The difference between these two environments is the amount of space between
10885  the title of the foil (the foilhead) and the body of the foil.
10886 \end_layout
10887
10888 \begin_layout Standard
10889 Landscape foils are generated using the 
10890 \family sans
10891 Rotatefoilhead
10892 \family default
10893  and 
10894 \family sans
10895 ShortRotatefoilhead
10896 \family default
10897  environments.
10898  Again the only difference is the spacing between foilhead and body.
10899  Both of the short versions have 0.5
10900 \begin_inset space ~
10901 \end_inset
10902
10903 inches less separation between the foilhead and the body.
10904  
10905 \end_layout
10906
10907 \begin_layout Standard
10908 One problem with the support for landscape foils is the requirement that
10909  you have to use the 
10910 \family typewriter
10911 dvips
10912 \family default
10913  driver to generate the PostScript output otherwise the foils won't be rotated.
10914  It is possible to get landscape foils even if you haven't got the 
10915 \family typewriter
10916 dvips
10917 \family default
10918  driver provided you can feed your foils sideways through your printer ;-)
10919 \end_layout
10920
10921 \begin_layout Subsubsection
10922 Theorems, Lemmas, Proofs and more
10923 \end_layout
10924
10925 \begin_layout Standard
10926 Due to a small bug in LyX you can't have two of the same type of these environme
10927 nts directly following each other.
10928  They must be separated by something.
10929  If you try, you will just be extending the previous environment as if you
10930  had merged the two environments together.
10931  So, how do you get around this problem? The simplest option is to insert
10932  some text between the two environments or add a 
10933 \family sans
10934 LaTeX
10935 \family default
10936  environment between the two with just a 
10937 \begin_inset Quotes eld
10938 \end_inset
10939
10940
10941 \family typewriter
10942 %
10943 \family default
10944
10945 \begin_inset Quotes erd
10946 \end_inset
10947
10948  in it.
10949  This will force LyX to produce two separate environments and hence the
10950  correct LaTeX output.
10951  An example is provided in the example file included with the LyX distribution.
10952  Remember, this problem only occurs if you are trying to place two of the
10953  same type of theorem-like environments one directly after the other.
10954 \end_layout
10955
10956 \begin_layout Subsubsection
10957 Lists
10958 \end_layout
10959
10960 \begin_layout Standard
10961 You get all the commonly supported list styles found in other classes as
10962  well as two new ones.
10963  I'll only describe the new ones here.
10964  If you want to find out more about the other list environments check out
10965  the 
10966 \emph on
10967 User's Guide.
10968
10969 \emph default
10970  If you intend to use itemized lists you might also want to read about the
10971  
10972 \family sans
10973 Itemize
10974 \begin_inset space ~
10975 \end_inset
10976
10977 Bullet
10978 \begin_inset space ~
10979 \end_inset
10980
10981 Selection
10982 \family default
10983  dialog described above in section
10984 \begin_inset space ~
10985 \end_inset
10986
10987
10988 \begin_inset CommandInset ref
10989 LatexCommand ref
10990 reference "sec:bullet"
10991
10992 \end_inset
10993
10994 .
10995 \end_layout
10996
10997 \begin_layout Standard
10998 The two new list styles, 
10999 \family sans
11000 TickList
11001 \family default
11002  and 
11003 \family sans
11004 CrossList
11005 \family default
11006 , are designed to make it easier for you to create lists of do's and don'ts
11007  or right and wrong by providing dedicated environments that use a tick
11008  or a cross as the label of the list.
11009  These lists are in fact dedicated variants of the 
11010 \family sans
11011 Itemize
11012 \family default
11013  environment.
11014  They do however require that you have the 
11015 \family typewriter
11016 psnfss
11017 \family default
11018  packages installed.
11019 \end_layout
11020
11021 \begin_layout Subsubsection
11022 Figures and Tables
11023 \end_layout
11024
11025 \begin_layout Standard
11026
11027 \family sans
11028 FoilTeX
11029 \family default
11030  redefines the floating tables and figures so that they appear exactly where
11031  they are in the text rather than pushing them to the top of the page or
11032  to some user specified location.
11033  In fact if you change the float placement settings they are simply ignored.
11034 \end_layout
11035
11036 \begin_layout Subsubsection
11037 Page Headers and Footers
11038 \begin_inset CommandInset label
11039 LatexCommand label
11040 name "sec:foilfoot"
11041
11042 \end_inset
11043
11044
11045 \end_layout
11046
11047 \begin_layout Standard
11048
11049 \family sans
11050 My
11051 \begin_inset space ~
11052 \end_inset
11053
11054 Logo
11055 \family default
11056  and 
11057 \family sans
11058 Restriction
11059 \family default
11060  are two commands used to control the left-footer text string.
11061  The first is meant to allow you to include a graphic logo on your foils
11062  and defaults to 
11063 \begin_inset Quotes eld
11064 \end_inset
11065
11066 -Typeset by 
11067 \family sans
11068 FoilTeX
11069 \family default
11070 -
11071 \begin_inset Quotes erd
11072 \end_inset
11073
11074 .
11075  While the second is meant to provide a classification for the audience,
11076  
11077 \emph on
11078 e.
11079 \begin_inset space \thinspace{}
11080 \end_inset
11081
11082 g.
11083 \emph default
11084
11085 \begin_inset space \space{}
11086 \end_inset
11087
11088 Confidential.
11089  It is empty by default.
11090 \end_layout
11091
11092 \begin_layout Standard
11093 The remaining page corners can be filled by 
11094 \family sans
11095 Right
11096 \begin_inset space ~
11097 \end_inset
11098
11099 Footer
11100 \family default
11101  (which defaults to page numbers), 
11102 \family sans
11103 Right
11104 \begin_inset space ~
11105 \end_inset
11106
11107 Header
11108 \family default
11109  (top right) and 
11110 \family sans
11111 Left
11112 \begin_inset space ~
11113 \end_inset
11114
11115 Header
11116 \family default
11117  (top left).
11118 \end_layout
11119
11120 \begin_layout Subsection
11121 Unsupported 
11122 \family sans
11123 FoilTeX
11124 \family default
11125  Goodies
11126 \begin_inset CommandInset label
11127 LatexCommand label
11128 name "sec:unsuppfoils"
11129
11130 \end_inset
11131
11132
11133 \end_layout
11134
11135 \begin_layout Standard
11136 All the commands mentioned below need to be set in a 
11137 \family sans
11138 LaTeX
11139 \family default
11140  environment or as 
11141 \family sans
11142 TeX
11143 \family default
11144  within another environment.
11145 \end_layout
11146
11147 \begin_layout Subsubsection
11148 Lengths
11149 \end_layout
11150
11151 \begin_layout Standard
11152 All lengths are adjusted using the 
11153 \family typewriter
11154
11155 \backslash
11156 setlength{
11157 \family default
11158 \emph on
11159 lengthname
11160 \family typewriter
11161 \emph default
11162 }{
11163 \family default
11164 \emph on
11165 newlength
11166 \family typewriter
11167 \emph default
11168 }
11169 \family default
11170  command.
11171  Where 
11172 \emph on
11173 lengthname
11174 \emph default
11175  should be replaced by the name given to the length you want to change and
11176  
11177 \emph on
11178 newlength
11179 \emph default
11180  is the length value.
11181  All lengths should be specified in units of length such as inches (
11182 \family typewriter
11183 in
11184 \family default
11185 ), millimeters (
11186 \family typewriter
11187 mm
11188 \family default
11189 ) or points (
11190 \family typewriter
11191 pt
11192 \family default
11193 ) or relative to some document or font-based length such as 
11194 \family typewriter
11195
11196 \backslash
11197 textwidth
11198 \family default
11199 .
11200  
11201 \end_layout
11202
11203 \begin_layout Standard
11204 It's possible to change the spacing between a foilhead and the body of the
11205  foil by adjusting the length specified by 
11206 \family typewriter
11207
11208 \backslash
11209 foilheadskip
11210 \family default
11211 .
11212  For example, to make 
11213 \emph on
11214 all
11215 \emph default
11216  foilheads 0.5
11217 \begin_inset space \space{}
11218 \end_inset
11219
11220 in closer to their bodies put the following in the preamble: 
11221 \family typewriter
11222
11223 \backslash
11224 setlength{
11225 \backslash
11226 foilheadskip}{-0.5in}
11227 \end_layout
11228
11229 \begin_layout Standard
11230 The spacings around floats can be adjusted by setting these lengths:
11231 \end_layout
11232
11233 \begin_layout Labeling
11234 \labelwidthstring MMMMMMMMMMM
11235
11236 \family typewriter
11237
11238 \backslash
11239 abovefloatskip
11240 \family default
11241  Separation between the text and the top of the float
11242 \end_layout
11243
11244 \begin_layout Labeling
11245 \labelwidthstring MMMMMMMMMMM
11246
11247 \family typewriter
11248
11249 \backslash
11250 abovecaptionskip
11251 \family default
11252  Separation between the float and the caption
11253 \end_layout
11254
11255 \begin_layout Labeling
11256 \labelwidthstring MMMMMMMMMMM
11257
11258 \family typewriter
11259
11260 \backslash
11261 belowcaptionskip
11262 \family default
11263  Separation between the caption and the following text
11264 \end_layout
11265
11266 \begin_layout Labeling
11267 \labelwidthstring MMMMMMMMMMM
11268
11269 \family typewriter
11270
11271 \backslash
11272 captionwidth
11273 \family default
11274  You can make the captions narrower than the surrounding text by adjusting
11275  this length.
11276  Best done relative to 
11277 \family typewriter
11278
11279 \backslash
11280 textwidth
11281 \family default
11282 .
11283 \end_layout
11284
11285 \begin_layout Standard
11286 There are also several title page related lengths that you may find useful
11287  if you have a long title or several authors:
11288 \end_layout
11289
11290 \begin_layout Labeling
11291 \labelwidthstring MMMMMMMMMMM
11292
11293 \family typewriter
11294
11295 \backslash
11296 abovetitleskip
11297 \family default
11298  Separation from headers to 
11299 \family sans
11300 Title
11301 \end_layout
11302
11303 \begin_layout Labeling
11304 \labelwidthstring MMMMMMMMMMM
11305
11306 \family typewriter
11307
11308 \backslash
11309 titleauthorskip
11310 \family default
11311  between 
11312 \family sans
11313 Title
11314 \family default
11315  and 
11316 \family sans
11317 Author
11318 \family default
11319  environments
11320 \end_layout
11321
11322 \begin_layout Labeling
11323 \labelwidthstring MMMMMMMMMMM
11324
11325 \family typewriter
11326
11327 \backslash
11328 authorauthorskip
11329 \family default
11330  between multiple 
11331 \family sans
11332 Author
11333 \family default
11334  lines
11335 \end_layout
11336
11337 \begin_layout Labeling
11338 \labelwidthstring MMMMMMMMMMM
11339
11340 \family typewriter
11341
11342 \backslash
11343 authordateskip
11344 \family default
11345  between the 
11346 \family sans
11347 Author
11348 \family default
11349  and the 
11350 \family sans
11351 Date
11352 \end_layout
11353
11354 \begin_layout Labeling
11355 \labelwidthstring MMMMMMMMMMM
11356
11357 \family typewriter
11358
11359 \backslash
11360 dateabstractskip
11361 \family default
11362  between the 
11363 \family sans
11364 Date
11365 \family default
11366  and the 
11367 \family sans
11368 Abstract
11369 \end_layout
11370
11371 \begin_layout Standard
11372 The last length related command affects all the list environments.
11373  If you place 
11374 \family typewriter
11375
11376 \backslash
11377 zerolistvertdimens
11378 \family default
11379  
11380 \emph on
11381 inside
11382 \emph default
11383  a list environment then all the vertical spacing between the list items
11384  is removed.
11385  Note that this is a command not a length so it doesn't require 
11386 \family typewriter
11387
11388 \backslash
11389 setlength
11390 \family default
11391  like the stuff mentioned above.
11392 \end_layout
11393
11394 \begin_layout Subsubsection
11395 Headers and Footers
11396 \end_layout
11397
11398 \begin_layout Standard
11399 The 
11400 \family typewriter
11401
11402 \backslash
11403 LogoOn
11404 \family default
11405  and 
11406 \family typewriter
11407
11408 \backslash
11409 LogoOff
11410 \family default
11411  commands control whether the logo in the 
11412 \family sans
11413 MyLogo
11414 \family default
11415  definition appear on a given page.
11416  If you put 
11417 \family typewriter
11418
11419 \backslash
11420 LogoOff
11421 \family default
11422  in the preamble then none of the foils will have the logo on them.
11423  If you don't want the logo on a particular page place the 
11424 \family typewriter
11425
11426 \backslash
11427 LogoOff
11428 \family default
11429  directly after the foilhead of that page and the 
11430 \family typewriter
11431
11432 \backslash
11433 LogoOn
11434 \family default
11435  directly after the next foilhead.
11436 \end_layout
11437
11438 \begin_layout Standard
11439 If you decide to use the 
11440 \family sans
11441 fancy
11442 \family default
11443  page style setting in the 
11444 \family sans
11445 Document
11446 \begin_inset space ~
11447 \end_inset
11448
11449 Layout
11450 \family default
11451  dialog you should probably add 
11452 \family typewriter
11453
11454 \backslash
11455 let
11456 \backslash
11457 headwidth
11458 \backslash
11459 textwidth
11460 \family default
11461  to your preamble so headers and footers on landscape pages are correctly
11462  placed when rotated.
11463  This is due to some clashes between the page layouts provided by the 
11464 \family sans
11465 fancyheadings
11466 \family default
11467  package and the 
11468 \family sans
11469 foils
11470 \family default
11471  class.
11472 \end_layout
11473
11474 \begin_layout Section
11475 Hollywood (Hollywood spec scripts)
11476 \end_layout
11477
11478 \begin_layout Standard
11479 by 
11480 \shape smallcaps
11481 Garst Reese
11482 \end_layout
11483
11484 \begin_layout Subsection
11485 Introduction
11486 \end_layout
11487
11488 \begin_layout Standard
11489 Getting the format of a Hollywood script right is a 
11490 \begin_inset Quotes eld
11491 \end_inset
11492
11493 rite of passage.
11494 \begin_inset Quotes erd
11495 \end_inset
11496
11497  It is designed to make the readers focus on content and to be easy and
11498  familiar for the actors to read.
11499  Each page of a script should be one minute of film.
11500  Nothing goes in a script that you cannot see or hear on screen.
11501  The courier 12 pt font should be used throughout.
11502  No italics.
11503 \end_layout
11504
11505 \begin_layout Subsection
11506 Special problems
11507 \end_layout
11508
11509 \begin_layout Standard
11510 Speakers' lines should NEVER break in mid-sentence.
11511  If a speaker's lines continue over a page break, repeat the 
11512 \family sans
11513 Speaker
11514 \family default
11515  title followed by (Cont'd).
11516 \end_layout
11517
11518 \begin_layout Subsection
11519 Special features
11520 \end_layout
11521
11522 \begin_layout Standard
11523 Insert the 
11524 \family sans
11525 Speaker
11526 \family default
11527  names as labels then cross-reference the label to insert the name.
11528  The cross-reference dialog will show the current cast of characters.
11529  You can use this to insert the speaker name in narratives also.
11530 \end_layout
11531
11532 \begin_layout Subsection
11533 Paper size and Margins
11534 \end_layout
11535
11536 \begin_layout Standard
11537 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11538 \end_layout
11539
11540 \begin_layout Subsection
11541 Environments
11542 \end_layout
11543
11544 \begin_layout Standard
11545 The following environments are available.
11546  You can use hollywood.bind to get the bind keys shown at the right.
11547 \end_layout
11548
11549 \begin_layout Itemize
11550
11551 \family sans
11552 Standard
11553 \begin_inset Newline newline
11554 \end_inset
11555
11556
11557 \family default
11558 Used where nothing else works.
11559  Try to avoid it.
11560 \end_layout
11561
11562 \begin_layout Itemize
11563
11564 \family sans
11565 FADE_IN
11566 \family default
11567 :
11568 \begin_inset space \hfill{}
11569 \end_inset
11570
11571
11572 \family sans
11573 M-z S-I
11574 \family default
11575
11576 \begin_inset Newline newline
11577 \end_inset
11578
11579 Usually followed by something like 
11580 \begin_inset Quotes eld
11581 \end_inset
11582
11583 on Sally waking up.
11584 \begin_inset Quotes erd
11585 \end_inset
11586
11587
11588 \end_layout
11589
11590 \begin_layout Itemize
11591
11592 \family sans
11593 INT:
11594 \begin_inset space \hfill{}
11595 \end_inset
11596
11597 M-z i
11598 \begin_inset Newline newline
11599 \end_inset
11600
11601
11602 \family default
11603 Introduces a new INTERIOR camera set-up.
11604  Always followed by DAY or NIGHT, or something similar to define the lighting
11605  required.
11606  Everthing on this line in CAPS.
11607 \end_layout
11608
11609 \begin_layout Itemize
11610
11611 \family sans
11612 EXT:
11613 \begin_inset space \hfill{}
11614 \end_inset
11615
11616 M-z e
11617 \begin_inset Newline newline
11618 \end_inset
11619
11620
11621 \family default
11622 Introduces a new EXTERIOR camera set-up.
11623  Everthing on this line in CAPS.
11624 \end_layout
11625
11626 \begin_layout Itemize
11627
11628 \family sans
11629 Speaker
11630 \begin_inset space \hfill{}
11631 \end_inset
11632
11633 M-z s
11634 \begin_inset Newline newline
11635 \end_inset
11636
11637
11638 \family default
11639 The character speaking.
11640 \end_layout
11641
11642 \begin_layout Itemize
11643
11644 \family sans
11645 Parenthetical
11646 \begin_inset space \hfill{}
11647 \end_inset
11648
11649 M-z p
11650 \begin_inset Newline newline
11651 \end_inset
11652
11653
11654 \family default
11655 Instructions to the speaker.
11656  The () are automatically inserted, but only the ( will show in LyX.
11657  Both will be printed.
11658 \end_layout
11659
11660 \begin_layout Itemize
11661
11662 \family sans
11663 Dialogue
11664 \begin_inset space \hfill{}
11665 \end_inset
11666
11667 M-z d
11668 \begin_inset Newline newline
11669 \end_inset
11670
11671
11672 \family default
11673 What the 
11674 \family sans
11675 Speaker
11676 \family default
11677  says.
11678 \end_layout
11679
11680 \begin_layout Itemize
11681
11682 \family sans
11683 Transition
11684 \begin_inset space \hfill{}
11685 \end_inset
11686
11687 M-z t
11688 \begin_inset Newline newline
11689 \end_inset
11690
11691
11692 \family default
11693 Camera movement instruction.
11694  e.
11695 \begin_inset space \thinspace{}
11696 \end_inset
11697
11698 g.
11699 \begin_inset space \space{}
11700 \end_inset
11701
11702 CUT TO:
11703 \end_layout
11704
11705 \begin_layout Itemize
11706
11707 \family sans
11708 FADE OUT:
11709 \begin_inset space \hfill{}
11710 \end_inset
11711
11712 M-z S-I
11713 \end_layout
11714
11715 \begin_layout Itemize
11716
11717 \family sans
11718 Author
11719 \begin_inset space \hfill{}
11720 \end_inset
11721
11722 M-z S-A
11723 \end_layout
11724
11725 \begin_layout Itemize
11726
11727 \family sans
11728 Title
11729 \begin_inset space \hfill{}
11730 \end_inset
11731
11732 M-z S-T
11733 \end_layout
11734
11735 \begin_layout Itemize
11736
11737 \family sans
11738 Right_Address
11739 \begin_inset space \hfill{}
11740 \end_inset
11741
11742 M-z r
11743 \end_layout
11744
11745 \begin_layout Subsection
11746 Script jargon
11747 \end_layout
11748
11749 \begin_layout Itemize
11750 (O.S) — off screen
11751 \end_layout
11752
11753 \begin_layout Itemize
11754 (V.0) — voice over
11755 \end_layout
11756
11757 \begin_layout Itemize
11758 b.
11759 \begin_inset space \thinspace{}
11760 \end_inset
11761
11762 g.
11763  — background
11764 \end_layout
11765
11766 \begin_layout Itemize
11767 C.U.
11768  — close-up
11769 \end_layout
11770
11771 \begin_layout Itemize
11772 PAN — camera movement
11773 \end_layout
11774
11775 \begin_layout Itemize
11776 INSERT — cut to close-up of
11777 \end_layout
11778
11779 \begin_layout Section
11780 ijmpc and ijmpd
11781 \end_layout
11782
11783 \begin_layout Standard
11784 by 
11785 \noun on
11786 Panayotis Papasotiriou
11787 \end_layout
11788
11789 \begin_layout Subsection
11790 Overview
11791 \end_layout
11792
11793 \begin_layout Standard
11794 The ijmpc package is a set of macros that facilitates electronic manuscript
11795  submission to the 
11796 \emph on
11797 International Journal of Modern Physics C
11798 \emph default
11799 .
11800  Similarly, the ijmpd package is for creating manuscripts to be submitted
11801  to the 
11802 \emph on
11803 International Journal of Modern Physics D
11804 \emph default
11805 .
11806  Both journals are published by World Scientific.
11807  The corresponding document classes are named 
11808 \family typewriter
11809 ws-ijmpc.cls
11810 \family default
11811  and 
11812 \family typewriter
11813 ws-ijmpd.cls
11814 \family default
11815 , respectively.
11816  These files, together with instructions for the authors, can be downloaded
11817  from the sites 
11818 \begin_inset Flex URL
11819 status collapsed
11820
11821 \begin_layout Plain Layout
11822
11823 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11824 \end_layout
11825
11826 \end_inset
11827
11828  and 
11829 \begin_inset Flex URL
11830 status collapsed
11831
11832 \begin_layout Plain Layout
11833
11834 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11835 \end_layout
11836
11837 \end_inset
11838
11839 .
11840  Both packages are modified versions of the standard 
11841 \begin_inset Quotes eld
11842 \end_inset
11843
11844 article
11845 \begin_inset Quotes erd
11846 \end_inset
11847
11848  package, and they are almost (but not exactly) identical.
11849  Most of their features are supported by LyX.
11850  I have used LyX successfully to write articles submitted to both journals
11851  without any problem.
11852 \end_layout
11853
11854 \begin_layout Subsection
11855 Writing a paper
11856 \end_layout
11857
11858 \begin_layout Standard
11859 As usual, the easiest way to write a paper is to start with a template.
11860  Click on 
11861 \family sans
11862 File\SpecialChar \menuseparator
11863 New from
11864 \family default
11865  
11866 \family sans
11867 \bar under
11868 T
11869 \bar default
11870 emplate
11871 \family default
11872 , then choose the 
11873 \family typewriter
11874 ijmpc.lyx
11875 \family default
11876  or 
11877 \family typewriter
11878 ijmpd.lyx
11879 \family default
11880  template.
11881  This will give an (almost) empty document that includes the most common
11882  fields found in a manuscript.
11883  Simply overwrite the existing text (including the brackets, 
11884 \family typewriter
11885 <>
11886 \family default
11887 ) with your text.
11888  You should keep in mind the following remarks.
11889 \end_layout
11890
11891 \begin_layout Enumerate
11892 LyX won't let you change the font size and the page style of the document,
11893  because such modifications are not allowed by both packages.
11894 \end_layout
11895
11896 \begin_layout Enumerate
11897 The language of the document should not be changed.
11898  Before previewing your paper, be sure that the babel package is not used.
11899  To do this, click on 
11900 \family sans
11901 Tools\SpecialChar \menuseparator
11902 Preferences
11903 \family default
11904 , select the 
11905 \family sans
11906 Lang Opts
11907 \family default
11908  tab, deselect the 
11909 \family sans
11910 Use babel
11911 \family default
11912  checkbox in the language settings, and click on 
11913 \family sans
11914 Apply
11915 \family default
11916  (or 
11917 \family sans
11918 Save
11919 \family default
11920 , if you wish to make this change permanent).
11921 \end_layout
11922
11923 \begin_layout Enumerate
11924 The 
11925 \begin_inset Quotes eld
11926 \end_inset
11927
11928 Keywords
11929 \begin_inset Quotes erd
11930 \end_inset
11931
11932  style must be used to define keywords.
11933 \end_layout
11934
11935 \begin_layout Enumerate
11936 The ijmpc package provides a style named 
11937 \begin_inset Quotes eld
11938 \end_inset
11939
11940 Classification Codes
11941 \begin_inset Quotes erd
11942 \end_inset
11943
11944 , which can be used to define classification codes, such as PACS numbers.
11945  Note that this facility is not supported by the ijmpd package.
11946 \end_layout
11947
11948 \begin_layout Enumerate
11949 Several new environments are available: 
11950 \begin_inset Quotes eld
11951 \end_inset
11952
11953 Definition
11954 \begin_inset Quotes erd
11955 \end_inset
11956
11957
11958 \begin_inset Quotes eld
11959 \end_inset
11960
11961 Step
11962 \begin_inset Quotes erd
11963 \end_inset
11964
11965
11966 \begin_inset Quotes eld
11967 \end_inset
11968
11969 Example
11970 \begin_inset Quotes erd
11971 \end_inset
11972
11973
11974 \begin_inset Quotes eld
11975 \end_inset
11976
11977 Remark
11978 \begin_inset Quotes erd
11979 \end_inset
11980
11981
11982 \begin_inset Quotes eld
11983 \end_inset
11984
11985 Notation
11986 \begin_inset Quotes erd
11987 \end_inset
11988
11989
11990 \begin_inset Quotes eld
11991 \end_inset
11992
11993 Theorem
11994 \begin_inset Quotes erd
11995 \end_inset
11996
11997
11998 \begin_inset Quotes eld
11999 \end_inset
12000
12001 Proof
12002 \begin_inset Quotes erd
12003 \end_inset
12004
12005
12006 \begin_inset Quotes eld
12007 \end_inset
12008
12009 Corollary
12010 \begin_inset Quotes erd
12011 \end_inset
12012
12013
12014 \begin_inset Quotes eld
12015 \end_inset
12016
12017 Lemma
12018 \begin_inset Quotes erd
12019 \end_inset
12020
12021
12022 \begin_inset Quotes eld
12023 \end_inset
12024
12025 Proposition
12026 \begin_inset Quotes erd
12027 \end_inset
12028
12029
12030 \begin_inset Quotes eld
12031 \end_inset
12032
12033 Prop
12034 \begin_inset Quotes erd
12035 \end_inset
12036
12037
12038 \begin_inset Quotes eld
12039 \end_inset
12040
12041 Question
12042 \begin_inset Quotes erd
12043 \end_inset
12044
12045
12046 \begin_inset Quotes eld
12047 \end_inset
12048
12049 Claim
12050 \begin_inset Quotes erd
12051 \end_inset
12052
12053 , and 
12054 \begin_inset Quotes eld
12055 \end_inset
12056
12057 Conjecture
12058 \begin_inset Quotes erd
12059 \end_inset
12060
12061 .
12062  Their use is more or less obvious.
12063  LyX supports all these environments; it will use the proper label, text
12064  style, and numbering scheme for each of them.
12065 \end_layout
12066
12067 \begin_layout Enumerate
12068 Both packages use basic citations; the natbib package should not be used.
12069  In LyX, citation references are shown as usual; in the output, citations
12070  are shown as superscripts.
12071  If you want to use a citation as normal text, you should use the 
12072 \family typewriter
12073 refcite
12074 \family default
12075  command, e.
12076 \begin_inset space \thinspace{}
12077 \end_inset
12078
12079 g.
12080 \begin_inset space \space{}
12081 \end_inset
12082
12083
12084 \begin_inset Quotes eld
12085 \end_inset
12086
12087 See Ref.
12088 \begin_inset space \space{}
12089 \end_inset
12090
12091
12092 \family typewriter
12093
12094 \backslash
12095 refcite{key}
12096 \family default
12097
12098 \begin_inset Quotes erd
12099 \end_inset
12100
12101 .
12102 \end_layout
12103
12104 \begin_layout Enumerate
12105 There is no 
12106 \begin_inset Quotes eld
12107 \end_inset
12108
12109 Acknowledgments
12110 \begin_inset Quotes erd
12111 \end_inset
12112
12113  section in both packages.
12114  To put acknowledgments, just use the 
12115 \begin_inset Quotes eld
12116 \end_inset
12117
12118 Section*
12119 \begin_inset Quotes erd
12120 \end_inset
12121
12122  environment.
12123 \end_layout
12124
12125 \begin_layout Enumerate
12126 Appendices may be added to the paper, 
12127 \emph on
12128 after
12129 \emph default
12130  the Acknowledgments and 
12131 \shape italic
12132 before
12133 \shape default
12134  the References.
12135  LyX provides a special environment, called 
12136 \begin_inset Quotes eld
12137 \end_inset
12138
12139 Appendices Section
12140 \begin_inset Quotes erd
12141 \end_inset
12142
12143  which marks the beginning of the appendices.
12144  This environment should be left blank; it just sends a LaTeX command, but
12145  nothing is really printed.
12146  In LyX, the word 
12147 \begin_inset Quotes eld
12148 \end_inset
12149
12150 Appendix
12151 \begin_inset Quotes erd
12152 \end_inset
12153
12154  is printed with blue letters, as a signal that all sections after that
12155  point are appendices.
12156  To write an appendix, use the 
12157 \begin_inset Quotes eld
12158 \end_inset
12159
12160 Appendix
12161 \begin_inset Quotes erd
12162 \end_inset
12163
12164  environment.
12165  LyX will number each appendix with capital letters, as required by both
12166  journals.
12167  Note that 
12168 \begin_inset Quotes eld
12169 \end_inset
12170
12171 Appendices Section
12172 \begin_inset Quotes erd
12173 \end_inset
12174
12175  
12176 \emph on
12177 must
12178 \emph default
12179  be present before the first appendix; if not, all appendices will be numbered
12180  as normal sections in the output.
12181 \end_layout
12182
12183 \begin_layout Enumerate
12184 The ijmpc and the ijmpd packages use the 
12185 \family typewriter
12186 tbl
12187 \family default
12188  command to implement table captions.
12189  As a result, a table created by LyX is printed correctly, but its caption
12190  is ignored.
12191  However, you can use some TeX code to overcome this problem, so that captions
12192  are printed as expected.
12193  To do so, create a float table as usual, remove the caption, and replace
12194  it with the TeX code 
12195 \family typewriter
12196
12197 \backslash
12198 tbl{
12199 \emph on
12200 your table caption
12201 \emph default
12202 }{
12203 \family default
12204  (sic); you must also the TeX code 
12205 \family typewriter
12206 }
12207 \family default
12208  immediately after the tabular material.
12209  Study the example table included in the template files to see how this
12210  trick is implemented.
12211  Alternatively, If you need table captions, you should implement the whole
12212  table float in a 
12213 \family typewriter
12214 .tex
12215 \family default
12216  file, then include this file to the LyX document (
12217 \family sans
12218 Insert\SpecialChar \menuseparator
12219 File\SpecialChar \menuseparator
12220 Child
12221 \begin_inset space ~
12222 \end_inset
12223
12224 Document
12225 \family default
12226 ).
12227  Details on how to create a table float can be found in the files 
12228 \family typewriter
12229 ws-ijmpc.tex
12230 \family default
12231  and 
12232 \family typewriter
12233 ws-ijmpd.tex
12234 \family default
12235 , included in the corresponding packages.
12236 \end_layout
12237
12238 \begin_layout Subsection
12239 Preparing a paper for submission
12240 \end_layout
12241
12242 \begin_layout Standard
12243 Before you submit your paper you must export the LyX document as a LaTeX
12244  file (
12245 \family sans
12246 File\SpecialChar \menuseparator
12247 Export\SpecialChar \menuseparator
12248 LaTeX
12249 \family default
12250 )
12251 \begin_inset Foot
12252 status open
12253
12254 \begin_layout Plain Layout
12255 Actually you have the choice between LaTeX (plain) and pdflatex.
12256  If you intend to use pdflatex to prepare the paper, you should use the
12257  pdflatex option so that included graphics are converted to PDF format,
12258  ready for use by pdflatex.
12259 \end_layout
12260
12261 \end_inset
12262
12263 , then make the following changes to the resulting 
12264 \family typewriter
12265 .tex
12266 \family default
12267  file.
12268 \end_layout
12269
12270 \begin_layout Enumerate
12271 Remove the comment lines before the 
12272 \family typewriter
12273
12274 \backslash
12275 documentclass
12276 \family default
12277  command.
12278 \end_layout
12279
12280 \begin_layout Enumerate
12281 Remove everything between (and including) the 
12282 \family typewriter
12283
12284 \backslash
12285 makeatletter
12286 \family default
12287  and 
12288 \family typewriter
12289
12290 \backslash
12291 makeatother
12292 \family default
12293  commands, except for any commands you specifically put into the LaTeX preamble.
12294 \end_layout
12295
12296 \begin_layout Standard
12297 The modified 
12298 \family typewriter
12299 .tex
12300 \family default
12301  file should be saved and processed through LaTeX as many times as necessary.
12302  You may also want to check the resulting 
12303 \family typewriter
12304 .dvi
12305 \family default
12306  document.
12307 \end_layout
12308
12309 \begin_layout Subsection
12310 Use of TeX code
12311 \end_layout
12312
12313 \begin_layout Standard
12314 The use of TeX code is reduced to two commands, which must be placed at
12315  the top of the document.
12316  If you started writing your paper by using the 
12317 \family typewriter
12318 ijmpc.lyx
12319 \family default
12320  or the 
12321 \family typewriter
12322 ijmpd.lyx
12323 \family default
12324  template, the TeX code needed is already in its place; you usually don't
12325  need to delete it.
12326  You may only modify the first TeX code to specify the information printed
12327  to the top of odd and even pages (authors' names and short paper's title,
12328  respectively).
12329  This TeX code must have the form 
12330 \family typewriter
12331
12332 \backslash
12333 markboth{Authors' Names}{Short Paper's Title}
12334 \family default
12335 .
12336 \end_layout
12337
12338 \begin_layout Section
12339 iopart
12340 \end_layout
12341
12342 \begin_layout Standard
12343 by 
12344 \noun on
12345 Uwe Stöhr
12346 \end_layout
12347
12348 \begin_layout Subsection
12349 Overview
12350 \end_layout
12351
12352 \begin_layout Standard
12353 The iopart package provides a document class to create electronic manuscript
12354  submission to the journals published by the Institute of Physics.
12355  Instructions for the authors how to create a paper using the iopart class
12356  can be downloaded together with the iopart package from the site 
12357 \begin_inset Flex URL
12358 status collapsed
12359
12360 \begin_layout Plain Layout
12361
12362 ftp://ftp.iop.org/pub/journals/latex2e
12363 \end_layout
12364
12365 \end_inset
12366
12367 .
12368 \end_layout
12369
12370 \begin_layout Subsection
12371 Writing a paper
12372 \end_layout
12373
12374 \begin_layout Standard
12375 The easiest way to write a paper is to start with the file 
12376 \emph on
12377 IOP-article.lyx
12378 \emph default
12379  that is available in LyX's examples files folder.
12380  Open this file, save it under a new name, and start writing.
12381  The example file explains how to use the special text environments.
12382  Here are the most important advices:
12383 \end_layout
12384
12385 \begin_layout Itemize
12386 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12387  two options 
12388 \family sans
12389 Use AMS math package
12390 \family default
12391  in the document settings under 
12392 \family sans
12393 Math Options
12394 \family default
12395  are not used!
12396 \end_layout
12397
12398 \begin_layout Itemize
12399
12400 \size normal
12401 The title environment defines the kind of your paper.
12402  So use one of the following environments for the title:
12403 \end_layout
12404
12405 \begin_deeper
12406 \begin_layout Itemize
12407
12408 \family sans
12409 \size normal
12410 Title
12411 \family default
12412  for a Paper
12413 \end_layout
12414
12415 \begin_layout Itemize
12416
12417 \family sans
12418 \size normal
12419 Review
12420 \family default
12421  for a Review
12422 \end_layout
12423
12424 \begin_layout Itemize
12425
12426 \family sans
12427 \size normal
12428 Topical
12429 \family default
12430  for a Topical review
12431 \end_layout
12432
12433 \begin_layout Itemize
12434
12435 \family sans
12436 \size normal
12437 Comment
12438 \family default
12439  for a Comment
12440 \end_layout
12441
12442 \begin_layout Itemize
12443
12444 \family sans
12445 \size normal
12446 Note
12447 \family default
12448  for a Note
12449 \end_layout
12450
12451 \begin_layout Itemize
12452
12453 \family sans
12454 \size normal
12455 Paper
12456 \family default
12457  for a Paper (same as Title)
12458 \end_layout
12459
12460 \begin_layout Itemize
12461
12462 \family sans
12463 \size normal
12464 Prelim
12465 \family default
12466  for a Preliminary communication
12467 \end_layout
12468
12469 \begin_layout Itemize
12470
12471 \family sans
12472 \size normal
12473 Rapid
12474 \family default
12475  for a Rapid communication
12476 \end_layout
12477
12478 \begin_layout Itemize
12479
12480 \family sans
12481 \size normal
12482 Letter
12483 \family default
12484  for a Letter to the editor
12485 \end_layout
12486
12487 \end_deeper
12488 \begin_layout Itemize
12489
12490 \size normal
12491 All title environments except of 
12492 \family sans
12493 Letter
12494 \family default
12495  can have an optional short title.
12496 \end_layout
12497
12498 \begin_layout Itemize
12499 There is a general title environment 
12500 \family sans
12501 Article
12502 \family default
12503  which is not directly supported by the LyX.
12504  This can be used as TeX code when your document doesn't fit into one of
12505  the other title types.
12506 \end_layout
12507
12508 \begin_layout Standard
12509 For more informations like hints for special table and formula formatting,
12510  look at the IOP author guidelines.
12511 \end_layout
12512
12513 \begin_layout Section
12514 Kluwer
12515 \end_layout
12516
12517 \begin_layout Standard
12518 by 
12519 \noun on
12520 Panayotis Papasotiriou
12521 \end_layout
12522
12523 \begin_layout Subsection
12524 Overview
12525 \end_layout
12526
12527 \begin_layout Standard
12528 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12529  that facilitates electronic manuscript submission to the journals they
12530  publish.
12531  Most known of them (at least in my domain of interest) are 
12532 \emph on
12533 Astrophysics and Space Science
12534 \emph default
12535  and 
12536 \emph on
12537 Solar Physics
12538 \emph default
12539 , but there are many others (see a complete list at 
12540 \begin_inset Flex URL
12541 status open
12542
12543 \begin_layout Plain Layout
12544
12545 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12546 \end_layout
12547
12548 \end_inset
12549
12550 ).
12551  The Kluwer package may be downloaded from the site 
12552 \begin_inset Flex URL
12553 status collapsed
12554
12555 \begin_layout Plain Layout
12556
12557 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12558 \end_layout
12559
12560 \end_inset
12561
12562 .
12563  A complete user guide is contained in that package (but it can also be
12564  downloaded separately).
12565 \end_layout
12566
12567 \begin_layout Standard
12568 LyX supports many features of the package but not everything.
12569  However, the TeX code needed is reduced to some 
12570 \begin_inset Quotes eld
12571 \end_inset
12572
12573 peculiar
12574 \begin_inset Quotes erd
12575 \end_inset
12576
12577  commands of the package (see
12578 \begin_inset space ~
12579 \end_inset
12580
12581
12582 \begin_inset CommandInset ref
12583 LatexCommand ref
12584 reference "subsec:kluwer_peculiarities"
12585
12586 \end_inset
12587
12588 ).
12589  I have recently used LyX to write an article submitted to the 
12590 \emph on
12591 Astrophysics and Space Science
12592 \emph default
12593  without any problem.
12594 \end_layout
12595
12596 \begin_layout Subsection
12597 Writing a paper
12598 \end_layout
12599
12600 \begin_layout Standard
12601 The easiest way to write a paper is to start with the Kluwer template file.
12602  Click on 
12603 \family sans
12604 File\SpecialChar \menuseparator
12605 New from
12606 \family default
12607  
12608 \family sans
12609 Template
12610 \family default
12611 , then choose the 
12612 \family typewriter
12613 kluwer.lyx
12614 \family default
12615  template.
12616  This will give an (almost) empty document that includes the most common
12617  fields found in a manuscript and a short description of their use.
12618  As in most templates, simply overwrite the existing text (including the
12619  brackets, 
12620 \family typewriter
12621 <>
12622 \family default
12623 ) with the correct information.
12624 \end_layout
12625
12626 \begin_layout Subsection
12627 Preparing a paper for submission
12628 \end_layout
12629
12630 \begin_layout Standard
12631 As in the AASTeX package, before you submit your paper to a journal you
12632  must 
12633 \begin_inset Quotes eld
12634 \end_inset
12635
12636 postprocess
12637 \begin_inset Quotes erd
12638 \end_inset
12639
12640  it as follows.
12641 \end_layout
12642
12643 \begin_layout Enumerate
12644 Export your paper as a LaTeX file.
12645  To do this, click on 
12646 \family sans
12647 File\SpecialChar \menuseparator
12648 Export\SpecialChar \menuseparator
12649 LaTeX
12650 \family default
12651 .
12652  
12653 \end_layout
12654
12655 \begin_layout Enumerate
12656 Edit the resulting 
12657 \family typewriter
12658 .tex
12659 \family default
12660  file with a text editor and make the following changes
12661 \end_layout
12662
12663 \begin_deeper
12664 \begin_layout Enumerate
12665 remove the comment lines before the 
12666 \family typewriter
12667
12668 \backslash
12669 documentclass
12670 \family default
12671  command,
12672 \end_layout
12673
12674 \begin_layout Enumerate
12675 remove everything between (and including) the 
12676 \family typewriter
12677
12678 \backslash
12679 makeatletter
12680 \family default
12681  and 
12682 \family typewriter
12683
12684 \backslash
12685 makeatother
12686 \family default
12687  commands, except for any commands you specifically put into the LaTeX preamble.
12688 \end_layout
12689
12690 \begin_layout Standard
12691 Save the resulting 
12692 \family typewriter
12693 .tex
12694 \family default
12695  file.
12696 \end_layout
12697
12698 \end_deeper
12699 \begin_layout Enumerate
12700 Run the 
12701 \family typewriter
12702 .tex
12703 \family default
12704  file through LaTeX as many times as necessary (usually up to three).
12705 \end_layout
12706
12707 \begin_layout Enumerate
12708 View the resulting 
12709 \family typewriter
12710 .dvi
12711 \family default
12712  document using, e.
12713 \begin_inset space \thinspace{}
12714 \end_inset
12715
12716 g.
12717 \begin_inset space \space{}
12718 \end_inset
12719
12720
12721 \family sans
12722 xdvi
12723 \family default
12724 , and check if everything is OK (it should, if you didn't make any mistake).
12725 \end_layout
12726
12727 \begin_layout Subsection
12728 \begin_inset Quotes eld
12729 \end_inset
12730
12731 Peculiarities
12732 \begin_inset Quotes erd
12733 \end_inset
12734
12735  of the Kluwer package
12736 \begin_inset CommandInset label
12737 LatexCommand label
12738 name "subsec:kluwer_peculiarities"
12739
12740 \end_inset
12741
12742
12743 \end_layout
12744
12745 \begin_layout Standard
12746 The Kluwer package has the following 
12747 \begin_inset Quotes eld
12748 \end_inset
12749
12750 peculiarities
12751 \begin_inset Quotes erd
12752 \end_inset
12753
12754 .
12755 \end_layout
12756
12757 \begin_layout Enumerate
12758 It is possible to write multiple articles in the same LaTeX file
12759 \begin_inset Foot
12760 status collapsed
12761
12762 \begin_layout Plain Layout
12763 I can't imagine any good reason to do this.
12764 \end_layout
12765
12766 \end_inset
12767
12768 .
12769  Each article must be included in the environment 
12770 \begin_inset Quotes eld
12771 \end_inset
12772
12773 article
12774 \begin_inset Quotes erd
12775 \end_inset
12776
12777 .
12778  Unfortunately, this environment cannot be omitted, even if you write just
12779  one article.
12780  Therefore, each article starts with the command 
12781 \family typewriter
12782
12783 \backslash
12784 begin{article}
12785 \family default
12786  and, obviously, ends with the command 
12787 \family typewriter
12788
12789 \backslash
12790 end{article}
12791 \family default
12792 .
12793  Although this can be implemented in LyX, I didn't included it, since it
12794  looks ugly and can confuse the novice user.
12795  Therefore, you need to enter them directly and mark them as LaTeX code
12796  (the well-known 
12797 \begin_inset Quotes eld
12798 \end_inset
12799
12800 TeX code
12801 \begin_inset Quotes erd
12802 \end_inset
12803
12804 ).
12805 \end_layout
12806
12807 \begin_layout Enumerate
12808 Information given at the beginning of the article (i.
12809 \begin_inset space \thinspace{}
12810 \end_inset
12811
12812 e.
12813 \begin_inset space \space{}
12814 \end_inset
12815
12816 title, subtitle, author, institution, running title, running author, abstract
12817  and keywords) must be included in an environment called 
12818 \begin_inset Quotes eld
12819 \end_inset
12820
12821 opening
12822 \begin_inset Quotes erd
12823 \end_inset
12824
12825 .
12826  This is not implemented in LyX, so you must enter title, subtitle etc.
12827 \begin_inset space ~
12828 \end_inset
12829
12830 between two TeX code lines (
12831 \family typewriter
12832
12833 \backslash
12834 begin{opening}
12835 \family default
12836  and 
12837 \family typewriter
12838
12839 \backslash
12840 end{opening}
12841 \family default
12842 ).
12843 \end_layout
12844
12845 \begin_layout Enumerate
12846 According to the user manual, the label of each bibliography item must be
12847  written as 
12848 \family typewriter
12849
12850 \backslash
12851 protect
12852 \backslash
12853 citeauthoryear{
12854 \family default
12855 \emph on
12856 author(s)
12857 \family typewriter
12858 \emph default
12859 }{
12860 \family default
12861 \emph on
12862 year
12863 \family typewriter
12864 \emph default
12865 }
12866 \family default
12867 .
12868 \end_layout
12869
12870 \begin_layout Standard
12871 The 
12872 \family typewriter
12873 kluwer.lyx
12874 \family default
12875  template takes care of all these 
12876 \begin_inset Quotes eld
12877 \end_inset
12878
12879 peculiarities
12880 \begin_inset Quotes erd
12881 \end_inset
12882
12883 .
12884  If you start a new paper using this template you don't need to do anything
12885  special.
12886  Just 
12887 \end_layout
12888
12889 \begin_layout Enumerate
12890 don't delete the TeX code included in the template, and
12891 \end_layout
12892
12893 \begin_layout Enumerate
12894 copy the example bibliography item included in the template and modify it
12895  as necessary to enter new bibliography items.
12896 \end_layout
12897
12898 \begin_layout Section
12899 Koma-Script
12900 \end_layout
12901
12902 \begin_layout Standard
12903 by 
12904 \noun on
12905 Bernd Rellermeyer
12906 \end_layout
12907
12908 \begin_layout Subsection
12909 Overview
12910 \end_layout
12911
12912 \begin_layout Standard
12913 The LyX document classes 
12914 \emph on
12915 article (koma-script)
12916 \emph default
12917
12918 \emph on
12919 report (koma-script)
12920 \emph default
12921
12922 \emph on
12923 book
12924 \emph default
12925  
12926 \emph on
12927 (koma-script)
12928 \emph default
12929 , and 
12930 \emph on
12931 letter
12932 \emph default
12933  
12934 \emph on
12935 (koma-script)
12936 \emph default
12937  correspond to the LaTeX document classes 
12938 \family typewriter
12939 scrartcl.cls
12940 \family default
12941
12942 \family typewriter
12943 scrreprt.cls
12944 \family default
12945
12946 \family typewriter
12947 scrbook.cls
12948 \family default
12949 , and 
12950 \family typewriter
12951 scrlettr.cls
12952 \family default
12953 , resp.
12954 \begin_inset space ~
12955 \end_inset
12956
12957 of the Koma-Script family.
12958  They are replacements for the standard document classes 
12959 \family typewriter
12960 article.cls
12961 \family default
12962
12963 \family typewriter
12964 report.cls
12965 \family default
12966
12967 \family typewriter
12968 book.cls
12969 \family default
12970  and 
12971 \family typewriter
12972 letter.cls
12973 \family default
12974 , resp., and fit better to European typography conventions in a number of
12975  points.
12976 \end_layout
12977
12978 \begin_layout Itemize
12979 Standard character size is 11pt in 
12980 \emph on
12981 article (koma-script)
12982 \emph default
12983
12984 \emph on
12985 report (koma-script)
12986 \emph default
12987 , and 
12988 \emph on
12989 book (koma-script)
12990 \emph default
12991 , and 12pt in 
12992 \emph on
12993 letter (koma-script)
12994 \emph default
12995 .
12996 \end_layout
12997
12998 \begin_layout Itemize
12999 Headings, labels of the description environment, and a number of elements
13000  of the 
13001 \emph on
13002 letter (koma-script)
13003 \emph default
13004  document class are set in a bold sans serif font.
13005 \begin_inset Foot
13006 status collapsed
13007
13008 \begin_layout Plain Layout
13009 There is a big difference between the bold sans serif old cm fonts and new
13010  ec fonts, especially in the appearance of headings.
13011  In comparison, the ec bold sans serif fonts look a bit thin.
13012  Here the LaTeX package 
13013 \family typewriter
13014 cmsd.sty by
13015 \family default
13016  
13017 \shape smallcaps
13018 Walter Schmidt
13019 \shape default
13020  helps to produce the 
13021 \begin_inset Quotes eld
13022 \end_inset
13023
13024 usual
13025 \begin_inset Quotes erd
13026 \end_inset
13027
13028  appearance when using the ec fonts.
13029 \end_layout
13030
13031 \end_inset
13032
13033  The numbering of chapter headings is made in the same way as the numbering
13034  of section headings, that is without the extra line 
13035 \begin_inset Quotes eld
13036 \end_inset
13037
13038 Chapter\SpecialChar \ldots{}
13039
13040 \begin_inset Quotes erd
13041 \end_inset
13042
13043 .
13044  In addition, the appearance of the headings can be modified by using a
13045  number of options (in LyX to be entered in the field 
13046 \family sans
13047 Extra
13048 \begin_inset space ~
13049 \end_inset
13050
13051 Options
13052 \family default
13053  of the dialog 
13054 \family sans
13055 Layout\SpecialChar \menuseparator
13056 Document
13057 \family default
13058 ).
13059  
13060 \end_layout
13061
13062 \begin_layout Itemize
13063 The main means in the Koma-Script document classes to design the type area
13064  are the options 
13065 \family sans
13066 BCOR
13067 \family default
13068  and 
13069 \family sans
13070 DIV
13071 \family default
13072  (in LyX to be entered in the extra class options field in the dialog 
13073 \family sans
13074 Document\SpecialChar \menuseparator
13075 Settings
13076 \family default
13077 ).
13078  They make a clearer modification of page margins possible as do the options
13079  of the dialog 
13080 \family sans
13081 Document\SpecialChar \menuseparator
13082 Settings
13083 \family default
13084 .
13085  
13086 \end_layout
13087
13088 \begin_layout Itemize
13089 The LaTeX document classes of the Koma-Script family define a number of
13090  additional commands.
13091  Those part of it which makes sense in LyX is implemented in corresponding
13092  paragraph types.
13093 \end_layout
13094
13095 \begin_layout Standard
13096 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13097  can be found in the Koma-Script documentation 
13098 \emph on
13099 scrguide
13100 \emph default
13101  (German) and 
13102 \emph on
13103 scrguien
13104 \emph default
13105  (English).
13106 \end_layout
13107
13108 \begin_layout Subsection
13109 article (koma-script), report (koma-script), and book (koma-script)
13110 \end_layout
13111
13112 \begin_layout Standard
13113 The document classes 
13114 \emph on
13115 article (koma-script)
13116 \emph default
13117
13118 \emph on
13119 report (koma-script)
13120 \emph default
13121 , and 
13122 \emph on
13123 book
13124 \emph default
13125  
13126 \emph on
13127 (koma-script)
13128 \emph default
13129  are implemented in the layout files 
13130 \family typewriter
13131 scrartcl.layout
13132 \family default
13133
13134 \family typewriter
13135 scrreprt.layout
13136 \family default
13137 , and 
13138 \family typewriter
13139 scrbook.layout
13140 \family default
13141 , resp.
13142  They contain all the paragraph types of the corresponding standard document
13143  classes 
13144 \emph on
13145 article
13146 \emph default
13147
13148 \emph on
13149 report
13150 \emph default
13151 , and 
13152 \emph on
13153 book
13154 \emph default
13155 , resp., partly modified, with the exception of the LyX specific 
13156 \family sans
13157 List
13158 \family default
13159 -type, which is replaced by the new 
13160 \family sans
13161 Labeling
13162 \family default
13163 -type having the same functionality.
13164  Beside the 
13165 \family sans
13166 Labeling
13167 \family default
13168 -Type there is a number of new paragraph types added.
13169  They are 
13170 \emph on
13171 not
13172 \emph default
13173  part of 
13174 \emph on
13175 letter (koma-script)
13176 \emph default
13177 .
13178 \end_layout
13179
13180 \begin_layout Itemize
13181
13182 \family sans
13183 Addpart, Addchap
13184 \family default
13185
13186 \family sans
13187 Addsec
13188 \family default
13189 : are equivalents to 
13190 \family sans
13191 Part*, Chapter*
13192 \family default
13193  and 
13194 \family sans
13195 Section*
13196 \family default
13197 , resp., additionally inserting an entry in the table of contents.
13198  
13199 \family sans
13200 Addpart
13201 \family default
13202  and 
13203 \family sans
13204 Addchap
13205 \family default
13206  are not contained in 
13207 \emph on
13208 article (koma-script)
13209 \emph default
13210 .
13211 \end_layout
13212
13213 \begin_layout Itemize
13214
13215 \family sans
13216 Addchap*
13217 \family default
13218
13219 \family sans
13220 Addsec*
13221 \family default
13222 : behave exactly as 
13223 \family sans
13224 Addchap
13225 \family default
13226  and 
13227 \family sans
13228 Addsec
13229 \family default
13230 , resp., additionally clearing running heads.
13231  
13232 \family sans
13233 Addchap*
13234 \family default
13235  is not contained in 
13236 \emph on
13237 article (koma-script)
13238 \emph default
13239 .
13240 \begin_inset Foot
13241 status collapsed
13242
13243 \begin_layout Plain Layout
13244 There is also an 
13245 \family typewriter
13246
13247 \backslash
13248 addpart*
13249 \family default
13250  command in 
13251 \emph on
13252 book (koma-script)
13253 \emph default
13254  and in 
13255 \emph on
13256 report (koma-script)
13257 \emph default
13258 , but since this is identical to 
13259 \family sans
13260 Part*
13261 \family default
13262 , is has not been implemented in LyX.
13263 \end_layout
13264
13265 \end_inset
13266
13267
13268 \end_layout
13269
13270 \begin_layout Itemize
13271
13272 \family sans
13273 Minisec
13274 \family default
13275 : generates a heading directly above the following paragraph in the standard
13276  character size without affecting the structure of the document.
13277 \end_layout
13278
13279 \begin_layout Itemize
13280
13281 \family sans
13282 Captionabove
13283 \family default
13284  and 
13285 \family sans
13286 Captionbelow
13287 \family default
13288  are special captions which respect the different space settings needed
13289  for captions placed above or below an element (if you follow strict typographic
13290  rules, you might want to place table captions always above the table).
13291  You can also use the class option 
13292 \family typewriter
13293 tablecaptionsabove
13294 \family default
13295 , which will switch 
13296 \family sans
13297 caption
13298 \family default
13299  to 
13300 \family sans
13301 captionabove
13302 \family default
13303  for tables and 
13304 \family sans
13305 captionbelow
13306 \family default
13307  for figures.
13308  You need at least Koma-Script version 2.8q to use this.
13309 \end_layout
13310
13311 \begin_layout Itemize
13312
13313 \family sans
13314 Dictum
13315 \family default
13316 : can be used to set a bonmot, e.
13317 \begin_inset space \thinspace{}
13318 \end_inset
13319
13320 g.
13321 \begin_inset space \space{}
13322 \end_inset
13323
13324 at the beginning of a chapter.
13325  If you use the optional argument (
13326 \family sans
13327 Insert\SpecialChar \menuseparator
13328 Short
13329 \begin_inset space ~
13330 \end_inset
13331
13332 Title
13333 \family default
13334 ), you can insert the dictum's author there.
13335  Dictum and author are separated by a line.
13336  You need at least Koma-Script version 2.8q to use this.
13337  
13338 \family sans
13339 Dictum
13340 \family default
13341  is not contained in 
13342 \emph on
13343 article (koma-script)
13344 \emph default
13345 .
13346 \end_layout
13347
13348 \begin_layout Standard
13349 The following types, together with the standard types 
13350 \family sans
13351 Title
13352 \family default
13353
13354 \family sans
13355 Author
13356 \family default
13357 , and 
13358 \family sans
13359 Date
13360 \family default
13361 , form the title area of the document.
13362  They must be entered ahead of the first 
13363 \begin_inset Quotes eld
13364 \end_inset
13365
13366 ordinary
13367 \begin_inset Quotes erd
13368 \end_inset
13369
13370  paragraph.
13371 \begin_inset Foot
13372 status collapsed
13373
13374 \begin_layout Plain Layout
13375 The corresponding LaTeX commands must appear before the 
13376 \family typewriter
13377
13378 \backslash
13379 maketitle
13380 \family default
13381  command.
13382 \end_layout
13383
13384 \end_inset
13385
13386  When such a type is used more than once, the latter usage overwrites the
13387  former one, that means, for every type only the latest usage is valid.
13388  The order of the different types however has, like 
13389 \family sans
13390 Title
13391 \family default
13392
13393 \family sans
13394 Author
13395 \family default
13396 , and 
13397 \family sans
13398 Date
13399 \family default
13400 , no effect on the appearance of the produced document.
13401 \end_layout
13402
13403 \begin_layout Itemize
13404
13405 \family sans
13406 Subject
13407 \family default
13408 : produces a centered paragraph above the ordinary title (
13409 \family sans
13410 Title
13411 \family default
13412
13413 \family sans
13414 Author
13415 \family default
13416
13417 \family sans
13418 Date
13419 \family default
13420 ) for the subject of the document.
13421 \end_layout
13422
13423 \begin_layout Itemize
13424
13425 \family sans
13426 Publishers
13427 \family default
13428 : produces a centered paragraph below the ordinary title (
13429 \family sans
13430 Title
13431 \family default
13432
13433 \family sans
13434 Author
13435 \family default
13436
13437 \family sans
13438 Date
13439 \family default
13440 ) for the publishers' name.
13441 \end_layout
13442
13443 \begin_layout Itemize
13444
13445 \family sans
13446 Dedication
13447 \family default
13448 : in 
13449 \emph on
13450 report (koma-script)
13451 \emph default
13452  and 
13453 \emph on
13454 book (koma-script)
13455 \emph default
13456  produces a centered paragraph on its own page behind the title page, or
13457  in 
13458 \emph on
13459 article (koma-script)
13460 \emph default
13461  produces a centered paragraph below the ordinary title (
13462 \family sans
13463 Title
13464 \family default
13465
13466 \family sans
13467 Author
13468 \family default
13469
13470 \family sans
13471 Date
13472 \family default
13473
13474 \family sans
13475 Publishers
13476 \family default
13477 ) for a dedication.
13478 \end_layout
13479
13480 \begin_layout Itemize
13481
13482 \family sans
13483 Titlehead
13484 \family default
13485 : produces a left aligned paragraph above the ordinary title (
13486 \family sans
13487 Title
13488 \family default
13489
13490 \family sans
13491 Author
13492 \family default
13493
13494 \family sans
13495 Date
13496 \family default
13497
13498 \family sans
13499 Subject
13500 \family default
13501 ) for a document`s head.
13502 \end_layout
13503
13504 \begin_layout Itemize
13505
13506 \family sans
13507 Uppertitleback
13508 \family default
13509 : produces in a double-sided print in 
13510 \emph on
13511 report (koma-script)
13512 \emph default
13513  and 
13514 \emph on
13515 book (koma-script)
13516 \emph default
13517  a left-aligned paragraph at the top of the title page`s back or has no
13518  effect in a single-sided print or in 
13519 \emph on
13520 article (koma-script)
13521 \emph default
13522 .
13523 \end_layout
13524
13525 \begin_layout Itemize
13526
13527 \family sans
13528 Lowertitleback
13529 \family default
13530 : produces in a double-sided print in 
13531 \emph on
13532 report (koma-script)
13533 \emph default
13534  and 
13535 \emph on
13536 book (koma-script)
13537 \emph default
13538  a left-aligned paragraph at the bottom of the title page`s back or has
13539  no effect in a single-sided print or in 
13540 \emph on
13541 article (koma-script)
13542 \emph default
13543 .
13544 \end_layout
13545
13546 \begin_layout Itemize
13547
13548 \family sans
13549 Extratitle
13550 \family default
13551 : produces a special 
13552 \begin_inset Quotes eld
13553 \end_inset
13554
13555 dirty
13556 \begin_inset Quotes erd
13557 \end_inset
13558
13559  page ahead of the actual document containing a paragraph without special
13560  formatting.
13561 \end_layout
13562
13563 \begin_layout Standard
13564 The layout files for the document classes 
13565 \emph on
13566 article (koma-script)
13567 \emph default
13568
13569 \emph on
13570 report (koma-script)
13571 \emph default
13572 , and 
13573 \emph on
13574 book (koma-script)
13575 \emph default
13576  do include the file 
13577 \family typewriter
13578 scrmacros.inc
13579 \family default
13580 .
13581  This is thought of as a place to define your own types.
13582  Copy scrmacros
13583 \family typewriter
13584 .inc
13585 \family default
13586  in your personal layout directory and edit the file!
13587 \end_layout
13588
13589 \begin_layout Subsection
13590 letter (koma-script)
13591 \end_layout
13592
13593 \begin_layout Standard
13594 \noindent
13595 The document class 
13596 \emph on
13597 letter (koma-script)
13598 \emph default
13599  is implemented in the layout file 
13600 \family typewriter
13601 scrlettr.layout
13602 \family default
13603 .
13604  It contains all the paragraph types of the corresponding standard document
13605  class 
13606 \emph on
13607 letter
13608 \emph default
13609 , partly modified, with the exception of the LyX specific types 
13610 \family sans
13611 LyX-Code
13612 \family default
13613  and 
13614 \family sans
13615 Comment
13616 \family default
13617  and the 
13618 \family sans
13619 List
13620 \family default
13621  type, which is replaced by the new 
13622 \family sans
13623 Labeling
13624 \family default
13625  type.
13626  In addition, it contains, in contrast to the standard document class, the
13627  standard types 
13628 \family sans
13629 LaTeX
13630 \family default
13631
13632 \family sans
13633 Quotation
13634 \family default
13635
13636 \family sans
13637 Quote
13638 \family default
13639 , and 
13640 \family sans
13641 Verse
13642 \family default
13643 .
13644  Furthermore, there are a number of new letter specific types.
13645 \end_layout
13646
13647 \begin_layout Standard
13648 The appearance of the letter produced by this document class can be controlled
13649  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13650 \begin_inset Foot
13651 status collapsed
13652
13653 \begin_layout Plain Layout
13654 For example, the standard appearance of the letter`s heading, consisting
13655  of name and address, is quite self-willed.
13656  An 
13657 \begin_inset Quotes eld
13658 \end_inset
13659
13660 ordinary
13661 \begin_inset Quotes erd
13662 \end_inset
13663
13664  heading is produced by the following LaTeX commands in the preamble:
13665 \end_layout
13666
13667 \begin_layout LyX-Code
13668
13669 \backslash
13670 firsthead{
13671 \backslash
13672 parbox[b]{
13673 \backslash
13674 textwidth}
13675 \end_layout
13676
13677 \begin_layout LyX-Code
13678   {
13679 \backslash
13680 ignorespaces 
13681 \backslash
13682 fromname
13683 \backslash
13684
13685 \backslash
13686  
13687 \backslash
13688 ignorespaces 
13689 \backslash
13690 fromaddress}} 
13691 \end_layout
13692
13693 \begin_layout LyX-Code
13694
13695 \backslash
13696 nexthead{
13697 \backslash
13698 parbox[b]{
13699 \backslash
13700 textwidth}
13701 \end_layout
13702
13703 \begin_layout LyX-Code
13704   {
13705 \backslash
13706 ignorespaces 
13707 \backslash
13708 fromname 
13709 \backslash
13710 hfill 
13711 \backslash
13712 ignorespaces 
13713 \backslash
13714 pagename
13715 \backslash
13716  
13717 \backslash
13718 thepage}}
13719 \end_layout
13720
13721 \end_inset
13722
13723  A detailed German description of such LaTeX commands can be found in the
13724  Koma-Script documentation 
13725 \emph on
13726 scrguide
13727 \emph default
13728 .
13729  With it, the letter's author can produce his personal letter layout.
13730 \end_layout
13731
13732 \begin_layout Standard
13733 The types 
13734 \family sans
13735 Letter
13736 \family default
13737  and 
13738 \family sans
13739 Opening
13740 \family default
13741  define the beginning of the letter and must be used in every letter.
13742  To emphasize them in the LyX document class, they are marked with the letter
13743  
13744 \shape italic
13745 L
13746 \shape default
13747  or 
13748 \shape italic
13749 O
13750 \shape default
13751 , resp.
13752 \begin_inset space ~
13753 \end_inset
13754
13755 in the left margin.
13756  It is possible to write any number of letters in one file.
13757  An 
13758 \family sans
13759 Opening
13760 \family default
13761  type produces a new letter using the same addressee and a 
13762 \family sans
13763 Letter
13764 \family default
13765  type produces a new addressee.
13766  The types 
13767 \family sans
13768 Closing
13769 \family default
13770
13771 \family sans
13772 PS
13773 \family default
13774
13775 \family sans
13776 CC
13777 \family default
13778 , and 
13779 \family sans
13780 Encl
13781 \family default
13782  are ordinary paragraph types and can also be used several times in one
13783  and the same letter.
13784 \end_layout
13785
13786 \begin_layout Itemize
13787
13788 \family sans
13789 Letter
13790 \family default
13791 : produces a paragraph for the addressee and implicitly defines the beginning
13792  of the letter.
13793 \end_layout
13794
13795 \begin_layout Itemize
13796
13797 \family sans
13798 Opening
13799 \family default
13800 : produces a paragraph for the form of address and implicitly produces a
13801  new letter.
13802 \end_layout
13803
13804 \begin_layout Itemize
13805
13806 \family sans
13807 Closing
13808 \family default
13809 : produces a paragraph for a close.
13810 \end_layout
13811
13812 \begin_layout Itemize
13813
13814 \family sans
13815 PS
13816 \family default
13817 : produces a paragraph for a postscript.
13818 \end_layout
13819
13820 \begin_layout Itemize
13821
13822 \family sans
13823 CC
13824 \family default
13825 : produces a paragraph for a distribution list.
13826 \end_layout
13827
13828 \begin_layout Itemize
13829
13830 \family sans
13831 Encl
13832 \family default
13833 : produces a paragraph for enclosures.
13834 \end_layout
13835
13836 \begin_layout Standard
13837 The types 
13838 \family sans
13839 Name
13840 \family default
13841
13842 \family sans
13843 Signature
13844 \family default
13845
13846 \family sans
13847 Address
13848 \family default
13849
13850 \family sans
13851 Telephone
13852 \family default
13853
13854 \family sans
13855 Place
13856 \family default
13857
13858 \family sans
13859 Backaddress
13860 \family default
13861
13862 \family sans
13863 Specialmail
13864 \family default
13865
13866 \family sans
13867 Location
13868 \family default
13869
13870 \family sans
13871 Title
13872 \family default
13873 , and 
13874 \family sans
13875 Subject
13876 \family default
13877  are input types provided with a label to enter information, which will
13878  be processed by the document class.
13879 \begin_inset Foot
13880 status open
13881
13882 \begin_layout Plain Layout
13883 It could be seen as a matter of inconsequence, that the types 
13884 \family sans
13885 Letter
13886 \family default
13887  and 
13888 \family sans
13889 Opening
13890 \family default
13891  described above are not such input types as well.
13892  Because of the special meaning of those types, however, I have implemented
13893  them as ordinary paragraph types with a one letter mark in the left margin.
13894  Moreover, it would affect my feeling of symmetry, if the 
13895 \family sans
13896 Opening
13897 \family default
13898  type and the 
13899 \family sans
13900 Closing
13901 \family default
13902  type had such a serious different appearance.
13903 \end_layout
13904
13905 \end_inset
13906
13907  The types must be used ahead of the corresponding 
13908 \family sans
13909 Opening
13910 \family default
13911  type.
13912 \end_layout
13913
13914 \begin_layout Standard
13915 An implementation of these types in a WYSIWYG fashion does not seem to make
13916  sense, because the real appearance of the produced letter does not only
13917  depend on the usage of the particular type, but also on other factors.
13918  For example, a signature entered in the 
13919 \family sans
13920 Signature
13921 \family default
13922  type will in the standard behavior appear in the produced letter only,
13923  when in the same letter also a 
13924 \family sans
13925 Closing
13926 \family default
13927  type is used.
13928  The entered value of the 
13929 \family sans
13930 Telephone
13931 \family default
13932  type will in the standard behavior not appear in the produced letter at
13933  all.
13934  The possibility to design the letter`s heading freely is already indicated
13935  in a footnote above.
13936 \end_layout
13937
13938 \begin_layout Standard
13939 The input types can also be used as empty paragraphs.
13940  This makes sense e.
13941 \begin_inset space \thinspace{}
13942 \end_inset
13943
13944 g.
13945 \begin_inset space \space{}
13946 \end_inset
13947
13948 for the 
13949 \family sans
13950 Signature
13951 \family default
13952  type.
13953  If the 
13954 \family sans
13955 Signature
13956 \family default
13957  type is not used at all, in the standard behavior the value of the 
13958 \family sans
13959 Name
13960 \family default
13961  type is used as signature, whereas if an empty 
13962 \family sans
13963 Signature
13964 \family default
13965  type is used, no signature value is defined.
13966 \end_layout
13967
13968 \begin_layout Standard
13969 By using the input types it is possible to write a letter template, containing
13970  filled input types with your personal dates (name, address, etc.) and empty
13971  input types for other dates you want to enter.
13972 \end_layout
13973
13974 \begin_layout Itemize
13975
13976 \family sans
13977 Name
13978 \family default
13979 : sender's name, in the standard behavior appears as a centered paragraph
13980  in small caps in the letter`s heading.
13981 \end_layout
13982
13983 \begin_layout Itemize
13984
13985 \family sans
13986 Signature
13987 \family default
13988 : sender's signature, in the standard behavior appears below the 
13989 \family sans
13990 Closing
13991 \family default
13992  type.
13993  If no 
13994 \family sans
13995 Signature
13996 \family default
13997  type is used, the value of the 
13998 \family sans
13999 Name
14000 \family default
14001  type appears instead.
14002 \end_layout
14003
14004 \begin_layout Itemize
14005
14006 \family sans
14007 Address
14008 \family default
14009 : sender's address, in the standard behavior appears in a centered paragraph
14010  in the letter`s heading below the sender's name.
14011 \end_layout
14012
14013 \begin_layout Itemize
14014
14015 \family sans
14016 Telephone
14017 \family default
14018 : sender's telephone number, in the standard behavior only sets the LaTeX
14019  variable 
14020 \family typewriter
14021
14022 \backslash
14023 telephonenum
14024 \family default
14025 .
14026 \end_layout
14027
14028 \begin_layout Itemize
14029
14030 \family sans
14031 Place
14032 \family default
14033 : place of the letter`s making.
14034 \end_layout
14035
14036 \begin_layout Itemize
14037
14038 \family sans
14039 Date
14040 \family default
14041 : date of the letter`s making.
14042  
14043 \family sans
14044 Place
14045 \family default
14046  and 
14047 \family sans
14048 Date
14049 \family default
14050 , in the standard behavior, produce the place and the date in a right-aligned
14051  line below the addressee's field.
14052  If an empty 
14053 \family sans
14054 Date
14055 \family default
14056  type is used, neither place nor date appear, independent of the value of
14057  the 
14058 \family sans
14059 Place
14060 \family default
14061  type.
14062  If no 
14063 \family sans
14064 Date
14065 \family default
14066  type is used, the date of the letter `s production is used.
14067 \end_layout
14068
14069 \begin_layout Itemize
14070
14071 \family sans
14072 Backaddress
14073 \family default
14074 : sender`s back address, in the standard behavior appears above the addressee's
14075  field in a small sans serif font.
14076 \end_layout
14077
14078 \begin_layout Itemize
14079
14080 \family sans
14081 Specialmail
14082 \family default
14083 : special mail information, in the standard behavior appears underlined
14084  above the addressee's field below the back address.
14085 \end_layout
14086
14087 \begin_layout Itemize
14088
14089 \family sans
14090 Location
14091 \family default
14092 : additional information, in the standard behavior appears on right side
14093  below the addressee`s field.
14094 \end_layout
14095
14096 \begin_layout Itemize
14097
14098 \family sans
14099 Title
14100 \family default
14101 : the letter's title, in the standard behavior appears in a big, bold, sans
14102  serif font above the subject.
14103 \end_layout
14104
14105 \begin_layout Itemize
14106
14107 \family sans
14108 Subject
14109 \family default
14110 : the letter's subject, in the standard behavior appears in a bold font
14111  above the 
14112 \family sans
14113 Opening
14114 \family default
14115  paragraph.
14116 \end_layout
14117
14118 \begin_layout Standard
14119 The types 
14120 \family sans
14121 Yourref
14122 \family default
14123
14124 \family sans
14125 Yourmail
14126 \family default
14127
14128 \family sans
14129 Myref
14130 \family default
14131
14132 \family sans
14133 Customer
14134 \family default
14135 , and 
14136 \family sans
14137 Invoice
14138 \family default
14139  produce a business letter like line above the 
14140 \family sans
14141 Title
14142 \family default
14143  line containing the fields 
14144 \begin_inset Quotes eld
14145 \end_inset
14146
14147 Your ref.
14148 \begin_inset Quotes erd
14149 \end_inset
14150
14151
14152 \begin_inset Quotes eld
14153 \end_inset
14154
14155 Your letter of
14156 \begin_inset Quotes erd
14157 \end_inset
14158
14159
14160 \begin_inset Quotes eld
14161 \end_inset
14162
14163 Our ref.
14164 \begin_inset Quotes erd
14165 \end_inset
14166
14167
14168 \begin_inset Quotes eld
14169 \end_inset
14170
14171 Customer no.
14172 \begin_inset Quotes erd
14173 \end_inset
14174
14175
14176 \begin_inset Quotes eld
14177 \end_inset
14178
14179 Invoice no.
14180 \begin_inset Quotes erd
14181 \end_inset
14182
14183 , and 
14184 \begin_inset Quotes eld
14185 \end_inset
14186
14187 Date
14188 \begin_inset Quotes erd
14189 \end_inset
14190
14191 .
14192  For the date field, the value of the 
14193 \family sans
14194 Date
14195 \family default
14196  type is used.
14197  If one of these 
14198 \begin_inset Quotes eld
14199 \end_inset
14200
14201 business letter types
14202 \begin_inset Quotes erd
14203 \end_inset
14204
14205  is used, the value of the 
14206 \family sans
14207 Place
14208 \family default
14209  type however does not appear, but only the LaTeX variable 
14210 \family typewriter
14211
14212 \backslash
14213 fromplace
14214 \family default
14215  is set.
14216  The ordinary output of place and date in a right-aligned line below the
14217  addressee`s field is suppressed.
14218  The types are implemented as input types provided with a label and must
14219  be used ahead of the corresponding 
14220 \family sans
14221 Opening
14222 \family default
14223  type.
14224 \end_layout
14225
14226 \begin_layout Itemize
14227
14228 \family sans
14229 Yourref
14230 \family default
14231 : Your ref.
14232 \end_layout
14233
14234 \begin_layout Itemize
14235
14236 \family sans
14237 Yourmail
14238 \family default
14239 : Your letter of.
14240 \end_layout
14241
14242 \begin_layout Itemize
14243
14244 \family sans
14245 Myref
14246 \family default
14247 : Our ref.
14248 \end_layout
14249
14250 \begin_layout Itemize
14251
14252 \family sans
14253 Customer
14254 \family default
14255 : Customer no.
14256 \end_layout
14257
14258 \begin_layout Itemize
14259
14260 \family sans
14261 Invoice
14262 \family default
14263 : Invoice no.
14264 \end_layout
14265
14266 \begin_layout Subsection
14267 The new letter class: letter (koma-script v.2)
14268 \end_layout
14269
14270 \begin_layout Standard
14271 by 
14272 \noun on
14273 Jürgen Spitzmüller
14274 \end_layout
14275
14276 \begin_layout Standard
14277 \begin_inset VSpace medskip
14278 \end_inset
14279
14280
14281 \end_layout
14282
14283 \begin_layout Standard
14284 \noindent
14285 Koma-Script version 2.8 has introduced a new letter class 
14286 \family typewriter
14287 scrlttr2
14288 \family default
14289  which supersedes the now unsupported 
14290 \family typewriter
14291 scrlettr
14292 \family default
14293 .
14294  It has — on the LaTeX side — a completely new interface and is not compatible
14295  with the old class.
14296  Therefore, LyX supports both, though it is recommended you use the new
14297  class.
14298 \end_layout
14299
14300 \begin_layout Standard
14301 This class covers the same functionality as 
14302 \emph on
14303 letter (koma-script),
14304 \emph default
14305  and a few more.
14306  The basic items are 
14307 \family sans
14308 Address
14309 \family default
14310  (receiver's address, same as 
14311 \family sans
14312 Letter
14313 \family default
14314  in the old layout), 
14315 \family sans
14316 Opening
14317 \family default
14318 , and 
14319 \family sans
14320 Closing
14321 \family default
14322 .
14323  
14324 \family sans
14325 NextAddress
14326 \family default
14327  will start a new letter (i.
14328 \begin_inset space \thinspace{}
14329 \end_inset
14330
14331 e.
14332 \begin_inset space \space{}
14333 \end_inset
14334
14335 you can write several letters per document).
14336  New elements are sender's 
14337 \family sans
14338 E-Mail
14339 \family default
14340
14341 \family sans
14342 URL
14343 \family default
14344
14345 \family sans
14346 Fax
14347 \family default
14348
14349 \family sans
14350 Bank
14351 \family default
14352  and the possibility to use a 
14353 \family sans
14354 Logo
14355 \family default
14356  (via 
14357 \family sans
14358 Insert\SpecialChar \menuseparator
14359 Graphics
14360 \family default
14361 ) in the header.
14362 \end_layout
14363
14364 \begin_layout Standard
14365 The biggest improvement is, though, that the letter's layout is configurable
14366  to meet almost any needs.
14367  This can be done via the preamble or with a special style file (Letter
14368  Class Option, extension 
14369 \family typewriter
14370 *.lco
14371 \family default
14372 ), that will be read in as a class option.
14373 \begin_inset Foot
14374 status collapsed
14375
14376 \begin_layout Plain Layout
14377 The KOMA package comes with some default 
14378 \family typewriter
14379 *.lco
14380 \family default
14381  files.
14382  There is, for instance, a 
14383 \family typewriter
14384 DIN.lco
14385 \family default
14386  file that follows german typesetting rules, or a 
14387 \family typewriter
14388 KOMAold.lco
14389 \family default
14390  that provides the default layout of the old 
14391 \family typewriter
14392 scrlettr
14393 \family default
14394  class.
14395  The latter can be loaded with the class option 
14396 \family typewriter
14397 KOMAold
14398 \family default
14399 , inserted via the 
14400 \family sans
14401 \bar under
14402 L
14403 \bar default
14404 ayout\SpecialChar \menuseparator
14405
14406 \bar under
14407 D
14408 \bar default
14409 ocument\SpecialChar \menuseparator
14410 Extra Options
14411 \family default
14412  field.
14413 \end_layout
14414
14415 \end_inset
14416
14417  Have a look at the 
14418 \emph on
14419 koma-letter2
14420 \emph default
14421  template that is included in LyX for examples.
14422  A detailed description is to be found in the Koma-Script documentation
14423  (
14424 \emph on
14425 scrguide
14426 \emph default
14427 ).
14428 \end_layout
14429
14430 \begin_layout Subsection
14431 Problems
14432 \end_layout
14433
14434 \begin_layout Standard
14435 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14436  some problems.
14437 \end_layout
14438
14439 \begin_layout Itemize
14440 The chapter number of a 
14441 \family sans
14442 Chapter
14443 \family default
14444  type appears on a line of its own above the chapter heading instead of
14445  appearing in the same line ahead of it.
14446  The cause for that is the LyX internal behavior for the labeltype 
14447 \family sans
14448 Counter_Chapter
14449 \family default
14450  in the layout file.
14451 \end_layout
14452
14453 \begin_layout Itemize
14454 The headings of the types 
14455 \family sans
14456 Addchap
14457 \family default
14458  and 
14459 \family sans
14460 Addsec
14461 \family default
14462  are only put in the 
14463 \begin_inset Quotes eld
14464 \end_inset
14465
14466 true
14467 \begin_inset Quotes erd
14468 \end_inset
14469
14470  LaTeX table of contents, but not in the LyX table of contents (
14471 \family sans
14472 Document\SpecialChar \menuseparator
14473 Table
14474 \begin_inset space ~
14475 \end_inset
14476
14477 of
14478 \begin_inset space ~
14479 \end_inset
14480
14481 Contents
14482 \family default
14483 ).
14484 \end_layout
14485
14486 \begin_layout Itemize
14487 The paragraphs in a 
14488 \emph on
14489 letter
14490 \emph default
14491  document class appear in a skip separation mode, not indented.
14492  This is the standard behavior, no special LaTeX commands are needed for
14493  that.
14494  But in the 
14495 \family sans
14496 Document\SpecialChar \menuseparator
14497 Settings
14498 \family default
14499  dialog the corresponding radio button indicates 
14500 \family sans
14501 Indent
14502 \family default
14503 .
14504  A 
14505 \family sans
14506 Skip
14507 \family default
14508  value always has the effect that extra LaTeX commands are inserted in the
14509  document to produce the gap, which is not what is wanted in this case.
14510 \end_layout
14511
14512 \begin_layout Section
14513 Memoir
14514 \end_layout
14515
14516 \begin_layout Standard
14517 By 
14518 \noun on
14519 Jürgen Spitzmüller
14520 \end_layout
14521
14522 \begin_layout Subsection
14523 Overview
14524 \end_layout
14525
14526 \begin_layout Standard
14527 Memoir is a very powerful and constantly evolving class.
14528  It has been designed with regard to fictional and non-fictional literature.
14529  Its aim is to let the user have maximum control over the typesetting of
14530  his document.
14531  Memoir is based on the standard book class, but it can also emulate the
14532  article class (see below).
14533 \end_layout
14534
14535 \begin_layout Standard
14536 Peter Wilson, the developer of Memoir, is known as the author of lots of
14537  useful packages in the LaTeX world.
14538  Most of them have been merged with Memoir.
14539  Therefore, it is much easier to layout the table of contents, appendices,
14540  chapter designs and such.
14541  LyX, though, does not support all of these goodies natively.
14542  Some of them might be added to forthcoming releases
14543 \begin_inset Foot
14544 status collapsed
14545
14546 \begin_layout Plain Layout
14547 You are invited to send suggestions to 
14548 \begin_inset Flex URL
14549 status collapsed
14550
14551 \begin_layout Plain Layout
14552
14553 lyx-devel@lists.lyx.org
14554 \end_layout
14555
14556 \end_inset
14557
14558 .
14559 \end_layout
14560
14561 \end_inset
14562
14563 , lots will probably never be supported, due to the limitations of LyX's
14564  framework.
14565  Of course you can still use all features with the help of some native LaTeX
14566  commands (TeX code
14567 \begin_inset Foot
14568 status collapsed
14569
14570 \begin_layout Plain Layout
14571 Cf.
14572 \begin_inset ERT
14573 status collapsed
14574
14575 \begin_layout Plain Layout
14576
14577
14578 \backslash
14579  
14580 \end_layout
14581
14582 \end_inset
14583
14584 section
14585 \begin_inset space ~
14586 \end_inset
14587
14588
14589 \begin_inset CommandInset ref
14590 LatexCommand ref
14591 reference "sec:Inserting-TeX-Code"
14592
14593 \end_inset
14594
14595  for details.
14596 \end_layout
14597
14598 \end_inset
14599
14600 ).
14601  In this section, we can only list those features that are natively supported
14602  by LyX.
14603  For detailed descriptions (and for the rest of features) we recommend you
14604  have a look at the detailed manual of the Memoir class
14605 \begin_inset Foot
14606 status collapsed
14607
14608 \begin_layout Plain Layout
14609 Cf.
14610 \begin_inset ERT
14611 status collapsed
14612
14613 \begin_layout Plain Layout
14614
14615
14616 \backslash
14617  
14618 \end_layout
14619
14620 \end_inset
14621
14622
14623 \begin_inset Flex URL
14624 status collapsed
14625
14626 \begin_layout Plain Layout
14627
14628 CTAN:/macros/latex/memoir/memman.pdf
14629 \end_layout
14630
14631 \end_inset
14632
14633 .
14634 \end_layout
14635
14636 \end_inset
14637
14638 , which is not only a user guide for the class, but also both a comprehensive
14639  description on good typesetting and a superb example for good typesetting
14640  itself.
14641 \end_layout
14642
14643 \begin_layout Subsection
14644 Basic features and restrictions
14645 \end_layout
14646
14647 \begin_layout Standard
14648 Memoir supports basically all features of the standard book classes.
14649  There are, however, some differences, as follows:
14650 \end_layout
14651
14652 \begin_layout Description
14653 Font
14654 \begin_inset space ~
14655 \end_inset
14656
14657 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14658 \end_layout
14659
14660 \begin_layout Description
14661 Page
14662 \begin_inset space ~
14663 \end_inset
14664
14665 style: The fancy page style is not supported, due to a command clash between
14666  Memoir and the fancyhdr package (they both define a command with the same
14667  name, which confuses LaTeX).
14668  Instead, Memoir comes with a number of its own page styles (see 
14669 \family sans
14670 Layout\SpecialChar \menuseparator
14671 Document\SpecialChar \menuseparator
14672 Page
14673 \begin_inset space ~
14674 \end_inset
14675
14676 Style
14677 \family default
14678 ).
14679  If you want to use these for the chapter pages, you have to use the command
14680  
14681 \family typewriter
14682
14683 \backslash
14684 chapterstyle
14685 \family default
14686  in the main text or in preamble (e.
14687 \begin_inset space \thinspace{}
14688 \end_inset
14689
14690 g.
14691 \begin_inset space \space{}
14692 \end_inset
14693
14694
14695 \family typewriter
14696
14697 \backslash
14698 chapterstyle{companion}
14699 \family default
14700 ).
14701 \end_layout
14702
14703 \begin_layout Description
14704 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14705  optional argument in the standard classes.
14706  With this, you can specify an alternative version of the title for the
14707  table of contents and the headers (for instance, if the title is too long).
14708  In LyX, you can do this via 
14709 \family sans
14710 Insert\SpecialChar \menuseparator
14711 Short
14712 \begin_inset space ~
14713 \end_inset
14714
14715 Title
14716 \family default
14717  at the beginning of a chapter/section.
14718  Memoir features a second optional argument and thus separates the table
14719  of contents from the header.
14720  You can define three variants of a title with this: one for the main text,
14721  one for the table of contents, and one for the headers.
14722  Simply insert two optional arguments if you need this feature, the first
14723  one containing the short title for the Table of Contents, the second one
14724  containing an alternative short title for the headers.
14725 \end_layout
14726
14727 \begin_layout Description
14728 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14729  of contents, the list of figures and the list of table start a new page
14730  automatically.
14731  Memoir does not follow this route.
14732  You have to insert a page break yourself, if you want to have one.
14733 \end_layout
14734
14735 \begin_layout Description
14736 Titlepage: For some unknown reason, Memoir uses pagination on the title
14737  page (in the standard classes, title pages are 
14738 \begin_inset Quotes eld
14739 \end_inset
14740
14741 empty
14742 \begin_inset Quotes erd
14743 \end_inset
14744
14745 ).
14746  If you want an empty title page, type 
14747 \family typewriter
14748
14749 \backslash
14750 aliaspagestyle{title}{empty}
14751 \family default
14752  in the preamble.
14753 \end_layout
14754
14755 \begin_layout Description
14756 Article: With the class option 
14757 \emph on
14758 article
14759 \emph default
14760  (to be inserted in 
14761 \family sans
14762 Layout\SpecialChar \menuseparator
14763 Document\SpecialChar \menuseparator
14764 Extra
14765 \begin_inset space ~
14766 \end_inset
14767
14768 Options
14769 \family default
14770 ), you can emulate article style.
14771  That is, counters (footnotes, figures, tables etc.) will not be reset on
14772  new chapters, chapters don't start a new page (but are—in contrary to 
14773 \begin_inset Quotes eld
14774 \end_inset
14775
14776 real
14777 \begin_inset Quotes erd
14778 \end_inset
14779
14780  article classes—still allowed), parts, though, use their own page, as in
14781  book.
14782 \end_layout
14783
14784 \begin_layout Description
14785 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14786  font commands, which have been used in the old LaTeX version 2.09 (e.
14787 \begin_inset space \thinspace{}
14788 \end_inset
14789
14790 g.
14791 \begin_inset space \space{}
14792 \end_inset
14793
14794
14795 \family typewriter
14796
14797 \backslash
14798 rm
14799 \family default
14800
14801 \family typewriter
14802
14803 \backslash
14804 it
14805 \family default
14806 ).
14807  It produces an error and stops LaTeX whenever such a command appears.
14808  The class option 
14809 \emph on
14810 oldfontcommands
14811 \emph default
14812  reallows the commands and spits out warnings instead (which does at least
14813  not stop LaTeX).
14814  Since a lot of packages and particularly BibTeX style files are still using
14815  those commands, we have decided to use this option by default.
14816 \end_layout
14817
14818 \begin_layout Subsection
14819 Extra features
14820 \end_layout
14821
14822 \begin_layout Standard
14823 We will only describe the features supported by LyX (which is not much currently
14824 ).
14825  Please consult the Memoir manual
14826 \begin_inset Foot
14827 status collapsed
14828
14829 \begin_layout Plain Layout
14830 Cf.
14831 \begin_inset ERT
14832 status collapsed
14833
14834 \begin_layout Plain Layout
14835
14836
14837 \backslash
14838  
14839 \end_layout
14840
14841 \end_inset
14842
14843
14844 \begin_inset Flex URL
14845 status collapsed
14846
14847 \begin_layout Plain Layout
14848
14849 CTAN:/macros/latex/memoir/memman.pdf
14850 \end_layout
14851
14852 \end_inset
14853
14854 .
14855 \end_layout
14856
14857 \end_inset
14858
14859  for details.
14860 \end_layout
14861
14862 \begin_layout Description
14863 Abstract: You may wonder why an abstract is an extra feature.
14864  Well, it is in book class.
14865  Usually books don't have abstracts.
14866  Memoir, however, has.
14867  You can use it wherever and how often you like.
14868 \end_layout
14869
14870 \begin_layout Description
14871 Chapterprecis: You may know this older typesetting style: The contents of
14872  a chapter are summarized below the title and also in the table of contents
14873  (e.
14874 \begin_inset space \thinspace{}
14875 \end_inset
14876
14877 g.
14878 \begin_inset space \space{}
14879 \end_inset
14880
14881
14882 \emph on
14883 Our hero arrives in Troia; he loses some friends; he finds others
14884 \emph default
14885 ).
14886  Chapterprecis does exactly this.
14887  It is therefore only sensible below a chapter.
14888 \end_layout
14889
14890 \begin_layout Description
14891 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14892  The epigraph environment provides an elegant way of typesetting such a
14893  motto.
14894  The motto itself (text) and its author (source) are divided by a short
14895  line.
14896  Unfortunately, we have to fool LyX a bit here again, since the environment
14897  needs two arguments (text and source).
14898  In this case, we have to use curly brackets (in TeX mode) between the two
14899  arguments: 
14900 \emph on
14901 <smart slogan>
14902 \emph default
14903  
14904 \family typewriter
14905 }{
14906 \family default
14907  
14908 \emph on
14909 <author of the slogan>.
14910 \end_layout
14911
14912 \begin_layout Description
14913 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14914  complex figurative poems).
14915  LyX can only support a few of them.
14916  One is poemtitle, which is a centered title for poems, which will also
14917  be added to the table of contents (verse is the standard environment for
14918  poems.
14919  Memoir has some enhanced versions of verse, but you need to use TeX code,
14920  because they have to be nested inside regular verse environments, which
14921  is not possible with LyX).
14922 \end_layout
14923
14924 \begin_layout Description
14925 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14926 \end_layout
14927
14928 \begin_layout Section
14929 Article (mwart), book (mwbk) and report (mwrep)
14930 \begin_inset Argument status
14931 status collapsed
14932
14933 \begin_layout Plain Layout
14934 The 
14935 \family typewriter
14936 mw
14937 \family default
14938  Classes
14939 \end_layout
14940
14941 \end_inset
14942
14943
14944 \end_layout
14945
14946 \begin_layout Standard
14947 by 
14948 \noun on
14949 Tomasz Luczak
14950 \end_layout
14951
14952 \begin_layout Standard
14953 The LyX document classes 
14954 \emph on
14955 article (mwart)
14956 \emph default
14957
14958 \emph on
14959 report (mwrep)
14960 \emph default
14961  and 
14962 \emph on
14963 book
14964 \emph default
14965  
14966 \emph on
14967 (mwbk)
14968 \emph default
14969  correspond to the LaTeX document classes 
14970 \family typewriter
14971 mwart.cls
14972 \family default
14973
14974 \family typewriter
14975 mwrep.cls
14976 \family default
14977  and 
14978 \family typewriter
14979 mwbk.cls
14980 \family default
14981 , resp.
14982  They are replacements for the standard document classes 
14983 \family typewriter
14984 article.cls
14985 \family default
14986
14987 \family typewriter
14988 report.cls
14989 \family default
14990  and 
14991 \family typewriter
14992 book.cls
14993 \family default
14994 , resp., and fit better to Polish typography conventions in a number of points.
14995  
14996 \end_layout
14997
14998 \begin_layout Standard
14999 Basic differences:
15000 \end_layout
15001
15002 \begin_layout Itemize
15003 Unnumbered titles (with star, e.
15004 \begin_inset space \thinspace{}
15005 \end_inset
15006
15007 g.
15008 \begin_inset space \space{}
15009 \end_inset
15010
15011
15012 \family sans
15013 Section*
15014 \family default
15015 ) are added into table of contents,
15016 \end_layout
15017
15018 \begin_layout Itemize
15019 Additional page styles:
15020 \end_layout
15021
15022 \begin_deeper
15023 \begin_layout Description
15024 uheadings header with separated lines,
15025 \end_layout
15026
15027 \begin_layout Description
15028 myheadings custom header, contents headers via commands: 
15029 \family typewriter
15030
15031 \backslash
15032 markright
15033 \family default
15034  and 
15035 \family typewriter
15036
15037 \backslash
15038 markboth
15039 \family default
15040 ,
15041 \end_layout
15042
15043 \begin_layout Description
15044 myuheadings custom header with separated lines,
15045 \end_layout
15046
15047 \begin_layout Description
15048 outer page number is placed on outer side of page
15049 \end_layout
15050
15051 \end_deeper
15052 \begin_layout Itemize
15053 Options 
15054 \end_layout
15055
15056 \begin_deeper
15057 \begin_layout Description
15058 rmheadings serif titles — default,
15059 \end_layout
15060
15061 \begin_layout Description
15062 sfheadings sansserif titles,
15063 \end_layout
15064
15065 \begin_layout Description
15066 authortitle on title page first placed is author next title — default,
15067 \end_layout
15068
15069 \begin_layout Description
15070 titleauthor on title page first placed is title next author,
15071 \end_layout
15072
15073 \begin_layout Description
15074 withmarginpar reserve place on page for margins.
15075 \end_layout
15076
15077 \end_deeper
15078 \begin_layout Section
15079 Paper
15080 \end_layout
15081
15082 \begin_layout Standard
15083 The document class 
15084 \family sans
15085 paper
15086 \family default
15087  provides an alternative to the standard 
15088 \family sans
15089 article
15090 \family default
15091  class.
15092  It provides similar functionality, but you might prefer this layout with
15093  sans serif sections, headings, and more.
15094 \end_layout
15095
15096 \begin_layout Section
15097 RevTeX4
15098 \end_layout
15099
15100 \begin_layout Standard
15101 by 
15102 \noun on
15103 Amir Karger
15104 \end_layout
15105
15106 \begin_layout Standard
15107 \begin_inset VSpace bigskip
15108 \end_inset
15109
15110
15111 \end_layout
15112
15113 \begin_layout Standard
15114 \noindent
15115 The 
15116 \family sans
15117 Revtex
15118 \begin_inset space ~
15119 \end_inset
15120
15121 4
15122 \family default
15123  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15124 \begin_inset Formula $\beta$
15125 \end_inset
15126
15127  release of May, 1999) class.
15128 \end_layout
15129
15130 \begin_layout Standard
15131 LyX has a 
15132 \family sans
15133 Revtex
15134 \family default
15135  textclass, which works with RevTeX 3.1.
15136  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15137  That means that it doesn't interact very well with LyX, which requires
15138  LaTeX2e, although it has been kludged to work.
15139  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15140  LyX with the 
15141 \family sans
15142 RevTeX
15143 \begin_inset space ~
15144 \end_inset
15145
15146 4
15147 \family default
15148  textclass should also be pretty easy to use.
15149 \end_layout
15150
15151 \begin_layout Standard
15152 These documents are supposed to be used in 
15153 \emph on
15154 addition
15155 \emph default
15156  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15157  macros, and assume you'll know what to put in the preamble if necessary.
15158 \end_layout
15159
15160 \begin_layout Subsection
15161 Installation
15162 \end_layout
15163
15164 \begin_layout Standard
15165 All you need to do is install RevTeX 4, as described in the package's README
15166  file.
15167  The package can be found at The RevTeX 4 Web Site 
15168 \begin_inset Flex URL
15169 status collapsed
15170
15171 \begin_layout Plain Layout
15172
15173 http://publish.aps.org/revtex4/
15174 \end_layout
15175
15176 \end_inset
15177
15178 .
15179  Install it somewhere that LaTeX can see it.
15180  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15181  (i.
15182 \begin_inset space \thinspace{}
15183 \end_inset
15184
15185 e.
15186 \begin_inset space \space{}
15187 \end_inset
15188
15189 not the directory where you installed the class file.) Then, if you reconfigure
15190  LyX, it will find the class file and let you use the RevTeX4 textclass.
15191 \end_layout
15192
15193 \begin_layout Standard
15194 Probably the easiest way to get started is either to import a RevTeX 4 document
15195  using 
15196 \family typewriter
15197 tex2lyx
15198 \family default
15199 , or to use the 
15200 \family sans
15201 Revtex
15202 \begin_inset space ~
15203 \end_inset
15204
15205 4
15206 \family default
15207  template, found in the templates directory.
15208 \end_layout
15209
15210 \begin_layout Subsection
15211 Preamble Matter
15212 \end_layout
15213
15214 \begin_layout Standard
15215 Optional arguments to 
15216 \family typewriter
15217
15218 \backslash
15219 documentclass
15220 \family default
15221 , like 
15222 \begin_inset Quotes eld
15223 \end_inset
15224
15225 preprint
15226 \begin_inset Quotes erd
15227 \end_inset
15228
15229  and 
15230 \begin_inset Quotes eld
15231 \end_inset
15232
15233 aps
15234 \begin_inset Quotes erd
15235 \end_inset
15236
15237 , go in the 
15238 \family sans
15239 E
15240 \bar under
15241 x
15242 \bar default
15243 tra
15244 \begin_inset space ~
15245 \end_inset
15246
15247 Options
15248 \family default
15249  field in the 
15250 \family sans
15251 Document
15252 \begin_inset space ~
15253 \end_inset
15254
15255 Layout
15256 \family default
15257  dialog, as usual.
15258  Remember that in RevTeX, at least one optional argument is required! 
15259 \end_layout
15260
15261 \begin_layout Standard
15262 Other preamble matter, like 
15263 \family typewriter
15264
15265 \backslash
15266 draft
15267 \family default
15268  etc.
15269 \begin_inset space ~
15270 \end_inset
15271
15272 goes in the 
15273 \family sans
15274 LaTeX
15275 \begin_inset space ~
15276 \end_inset
15277
15278 Preamble
15279 \family default
15280  dialog, also as usual.
15281 \end_layout
15282
15283 \begin_layout Subsection
15284 Layouts
15285 \end_layout
15286
15287 \begin_layout Standard
15288 The layouts basically correspond to the commands in RevTeX4.0.
15289  For example, the Email layout corresponds to 
15290 \family typewriter
15291
15292 \backslash
15293 email{}
15294 \family default
15295 .
15296  Note that (at least as of RevTeX 4.0 Beta), the 
15297 \family sans
15298 Address
15299 \family default
15300  and 
15301 \family sans
15302 Affiliation
15303 \family default
15304  layouts are exactly equivalent, so you shouldn't need to use both.
15305 \begin_inset Foot
15306 status collapsed
15307
15308 \begin_layout Plain Layout
15309 In case you're curious, both were included so that 
15310 \family typewriter
15311 tex2lyx
15312 \family default
15313  would be able to translate both 
15314 \family typewriter
15315
15316 \backslash
15317 address
15318 \family default
15319  and 
15320 \family typewriter
15321
15322 \backslash
15323 affiliation
15324 \family default
15325 .
15326 \end_layout
15327
15328 \end_inset
15329
15330
15331 \end_layout
15332
15333 \begin_layout Subsection
15334 Important Notes
15335 \end_layout
15336
15337 \begin_layout Standard
15338 There are a couple of important unique aspects of RevTeX 4 which might cause
15339  bugs that will be even more confusing in LyX.
15340 \end_layout
15341
15342 \begin_layout Standard
15343 In RevTeX, the 
15344 \family typewriter
15345
15346 \backslash
15347 thanks
15348 \family default
15349  command goes 
15350 \emph on
15351 outside
15352 \emph default
15353  the 
15354 \family typewriter
15355
15356 \backslash
15357 author
15358 \family default
15359  command.
15360  The LyX equivalent is that there is a separate Thanks layout.
15361  Do 
15362 \emph on
15363 not
15364 \emph default
15365  write footnotes in the 
15366 \family sans
15367 Author
15368 \family default
15369  layout, or weird things may happen.
15370  See the RevTeX 4 documentation for more details.
15371 \end_layout
15372
15373 \begin_layout Standard
15374 Also, the 
15375 \family sans
15376 Author
15377 \begin_inset space ~
15378 \end_inset
15379
15380 Email
15381 \family default
15382
15383 \family sans
15384 Author
15385 \begin_inset space ~
15386 \end_inset
15387
15388 URL
15389 \family default
15390 , and 
15391 \family sans
15392 Thanks
15393 \family default
15394  layouts must be placed 
15395 \emph on
15396 in between
15397 \emph default
15398  the 
15399 \family sans
15400 Author
15401 \family default
15402  layout and the corresponding 
15403 \family sans
15404 Address
15405 \family default
15406  (or equivalent 
15407 \family sans
15408 Affiliation
15409 \family default
15410 ) layout.
15411  If you put the 
15412 \family sans
15413 Thanks
15414 \family default
15415  after the 
15416 \family sans
15417 Address
15418 \family default
15419 , the LaTeX won't compile.
15420 \end_layout
15421
15422 \begin_layout Subsection
15423 Drawbacks
15424 \end_layout
15425
15426 \begin_layout Standard
15427 The main problem with this layout is that you can't use the optional arguments
15428  to layouts like Email and Title.
15429  (The problem is not unique to this layout; you can't use optional arguments
15430  to the Section layouts either.) This means that after you export that file
15431  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15432  need to edit the LaTeX file with a text editor to add the optional arguments
15433  to set, e.
15434 \begin_inset space \thinspace{}
15435 \end_inset
15436
15437 g.
15438 \begin_inset space \space{}
15439 \end_inset
15440
15441 the running title for the page headers.
15442  Lacking these layouts makes the 
15443 \family typewriter
15444
15445 \backslash
15446 altaffiliation
15447 \family default
15448  (and the equivalent 
15449 \family typewriter
15450
15451 \backslash
15452 altaddress
15453 \family default
15454 ) useless, so the corresponding layouts don't exist, and will have to be
15455  added by hand.
15456 \begin_inset Foot
15457 status collapsed
15458
15459 \begin_layout Plain Layout
15460
15461 \emph on
15462 Note from JMarc:
15463 \emph default
15464  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15465  has not been updated yet to take advantage of it.
15466 \end_layout
15467
15468 \end_inset
15469
15470  
15471 \end_layout
15472
15473 \begin_layout Section
15474 Springer Journals (
15475 \family sans
15476 svjour
15477 \family default
15478 )
15479 \end_layout
15480
15481 \begin_layout Standard
15482 by 
15483 \noun on
15484 Martin Vermeer
15485 \end_layout
15486
15487 \begin_layout Subsection
15488 Description
15489 \end_layout
15490
15491 \begin_layout Standard
15492 These are the layout files for some of the journal formats used by Springer
15493  Verlag and listed on 
15494 \begin_inset Flex URL
15495 status collapsed
15496
15497 \begin_layout Plain Layout
15498
15499 http://www.springer.de/author/tex/help-journals.html
15500 \end_layout
15501
15502 \end_inset
15503
15504 , where you should also go to fetch the class files (yes, these are LaTeX2e
15505  now!).
15506  It is a modular system: the things common to all journals are implemented
15507  in 
15508 \family typewriter
15509 svjour.inc
15510 \family default
15511 , which journal-specific layout files (such as, e.
15512 \begin_inset space \thinspace{}
15513 \end_inset
15514
15515 g.
15516 \begin_inset space \space{}
15517 \end_inset
15518
15519
15520 \family typewriter
15521 svjog.layout
15522 \family default
15523  for Journal of Geodesy) can include.
15524 \end_layout
15525
15526 \begin_layout Standard
15527 This means that implementing support for any other Springer journal on this
15528  list is as simple as writing your own 
15529 \family typewriter
15530 sv
15531 \family default
15532 <myjournal>
15533 \family typewriter
15534 .layout
15535 \family default
15536  file following the outline given in 
15537 \family typewriter
15538 svjog.layout
15539 \family default
15540 .
15541  
15542 \end_layout
15543
15544 \begin_layout Standard
15545 It is reasonably well tested only for the Journal of Geodesy.
15546  
15547 \family typewriter
15548 svjour
15549 \family default
15550  and 
15551 \family typewriter
15552 svjog
15553 \family default
15554  come with the standard LyX distribution.
15555  Install the relevant class file (downloaded from Springer) in a proper
15556  directory, reconfigure LaTeX (in the teTeX case by running 
15557 \family typewriter
15558 texhash
15559 \family default
15560 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15561  and it should work.
15562 \end_layout
15563
15564 \begin_layout Subsection
15565 New styles
15566 \end_layout
15567
15568 \begin_layout Standard
15569 A large number of theorem-like styles — 
15570 \family sans
15571 Claim, Conjecture,
15572 \family default
15573  
15574 \family sans
15575 \SpecialChar \ldots{}
15576 Theorem
15577 \family default
15578 .
15579 \end_layout
15580
15581 \begin_layout Standard
15582
15583 \family sans
15584 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15585  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15586 \family default
15587 .
15588  See the Springer class file documentation for details.
15589 \end_layout
15590
15591 \begin_layout Subsection
15592 Supported journals
15593 \end_layout
15594
15595 \begin_layout Itemize
15596
15597 \emph on
15598 Journal of Geodesy
15599 \emph default
15600
15601 \family typewriter
15602 svjog.layout
15603 \family default
15604  — Martin Vermeer
15605 \end_layout
15606
15607 \begin_layout Itemize
15608
15609 \emph on
15610 Probability Theory and Related Fields
15611 \emph default
15612
15613 \family typewriter
15614 svprobth.layout
15615 \family default
15616  — Jean-Marc Lasgouttes
15617 \end_layout
15618
15619 \begin_layout Standard
15620 Add your own, it isn't so hard!
15621 \end_layout
15622
15623 \begin_layout Subsection
15624 Credits
15625 \end_layout
15626
15627 \begin_layout Standard
15628 These files are partly based on the older 
15629 \family typewriter
15630 ejour2.layout
15631 \family default
15632 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15633  file from Springer.
15634  All this, and the 
15635 \family typewriter
15636 ejour2
15637 \family default
15638  layout, are now defunct.
15639  Jean-Marc Lasgouttes helped out big in making me find my way around the
15640  LyX layout file mechanism.
15641 \end_layout
15642
15643 \begin_layout Subsection
15644 Bugs
15645 \end_layout
15646
15647 \begin_layout Standard
15648 Probably.
15649  But probably less than in the old hacked-LaTeX 
15650 \family typewriter
15651 ejour2
15652 \family default
15653 .
15654 \end_layout
15655
15656 \begin_layout Standard
15657 Limitations e.
15658 \begin_inset space \thinspace{}
15659 \end_inset
15660
15661 g.: does not display the number for theorem-like layouts, just #.
15662 \end_layout
15663
15664 \begin_layout Section
15665 Slides [aka 
15666 \noun on
15667 SliTeX
15668 \noun default
15669 ]
15670 \begin_inset CommandInset label
15671 LatexCommand label
15672 name "sec:slitex"
15673
15674 \end_inset
15675
15676
15677 \end_layout
15678
15679 \begin_layout Standard
15680 by 
15681 \noun on
15682 John Weiss
15683 \noun default
15684  
15685 \end_layout
15686
15687 \begin_layout Subsection
15688 Introduction
15689 \end_layout
15690
15691 \begin_layout Standard
15692 This section describes how to use LyX to make slides for overhead projectors.
15693  There are two document classes that can do this: the default slides class
15694  and the 
15695 \family sans
15696 FoilTeX
15697 \family default
15698  slides class.
15699  This section documents the former.
15700 \end_layout
15701
15702 \begin_layout Standard
15703 I'm going to say this again, nice and clear, so that there's no misunderstanding
15704 :
15705 \end_layout
15706
15707 \begin_layout Standard
15708 \begin_inset VSpace bigskip
15709 \end_inset
15710
15711
15712 \end_layout
15713
15714 \begin_layout Standard
15715 \align center
15716
15717 \size large
15718 This section documents the class 
15719 \begin_inset Quotes eld
15720 \end_inset
15721
15722
15723 \family sans
15724 slides (default)
15725 \family default
15726
15727 \begin_inset Quotes erd
15728 \end_inset
15729
15730  
15731 \emph on
15732 only.
15733 \end_layout
15734
15735 \begin_layout Standard
15736 \begin_inset VSpace bigskip
15737 \end_inset
15738
15739
15740 \end_layout
15741
15742 \begin_layout Standard
15743 If you're looking for the documentation for 
15744 \begin_inset Quotes eld
15745 \end_inset
15746
15747
15748 \family sans
15749 slides (FoilTeX)
15750 \family default
15751
15752 \begin_inset Quotes erd
15753 \end_inset
15754
15755 , check out section
15756 \begin_inset space ~
15757 \end_inset
15758
15759
15760 \begin_inset CommandInset ref
15761 LatexCommand ref
15762 reference "sec:foiltex"
15763
15764 \end_inset
15765
15766 .
15767  The 
15768 \family sans
15769 foils
15770 \family default
15771  class [
15772 \begin_inset Quotes eld
15773 \end_inset
15774
15775
15776 \family sans
15777 slides (FoilTeX)
15778 \family default
15779
15780 \begin_inset Quotes erd
15781 \end_inset
15782
15783 ] is actually somewhat better than the default 
15784 \family sans
15785 slides
15786 \family default
15787  class,
15788 \begin_inset Foot
15789 status collapsed
15790
15791 \begin_layout Plain Layout
15792 \SpecialChar \ldots{}
15793 or so I've been told repeatedly by its advocates.
15794  Having never used it, I have no idea if this claim is true or not.
15795 \end_layout
15796
15797 \end_inset
15798
15799  which this section documents.
15800 \end_layout
15801
15802 \begin_layout Standard
15803 This class is the LaTeX2e improvement of the old 
15804 \noun on
15805 SliTeX
15806 \noun default
15807  package.
15808  Every LaTeX2e distribution includes this class [which I'll just refer to
15809  as 
15810 \begin_inset Quotes eld
15811 \end_inset
15812
15813
15814 \family sans
15815 slides
15816 \family default
15817
15818 \begin_inset Quotes erd
15819 \end_inset
15820
15821  from now on], so you're bound to have it.
15822  As I noted earlier, there are other classes, such as 
15823 \family sans
15824 foils
15825 \family default
15826 , which also produce slides for overhead projectors and do a better job
15827  at it.
15828  However, there are some things which 
15829 \family sans
15830 slides
15831 \family default
15832  can do which the others can't, such as generate overlays.
15833  Read on to learn more!
15834 \end_layout
15835
15836 \begin_layout Subsection
15837 Getting Started
15838 \begin_inset CommandInset label
15839 LatexCommand label
15840 name "sec:slidesetup"
15841
15842 \end_inset
15843
15844
15845 \end_layout
15846
15847 \begin_layout Standard
15848 Obviously, to use this document class, you need to select 
15849 \begin_inset Quotes eld
15850 \end_inset
15851
15852
15853 \family sans
15854 slides (default)
15855 \family default
15856
15857 \begin_inset Quotes erd
15858 \end_inset
15859
15860  from the class list in the 
15861 \family sans
15862 Document\SpecialChar \menuseparator
15863 Settings
15864 \family default
15865  dialog.
15866  There are some other special things you should know about this class:
15867 \end_layout
15868
15869 \begin_layout Itemize
15870 Don't bother changing the options 
15871 \family sans
15872 Sides and Columns
15873 \family default
15874 .
15875  They're not supported by the 
15876 \family sans
15877 slides
15878 \family default
15879  class, anyways.
15880 \end_layout
15881
15882 \begin_layout Itemize
15883 The option 
15884 \family sans
15885 Page
15886 \begin_inset space ~
15887 \end_inset
15888
15889 style
15890 \family default
15891  behaves a bit differently for this class.
15892  The possible choices and what they do are as follows:
15893 \end_layout
15894
15895 \begin_deeper
15896 \begin_layout Description
15897
15898 \family sans
15899 plain
15900 \family default
15901  The final output contains page numbers in the lower right corner.
15902 \end_layout
15903
15904 \begin_layout Description
15905
15906 \family sans
15907 headings
15908 \family default
15909  Like 
15910 \family sans
15911 plain
15912 \family default
15913 , but also prints out any time markers you've put in.
15914  This is the default.
15915 \end_layout
15916
15917 \begin_layout Description
15918
15919 \family sans
15920 empty
15921 \family default
15922  The final output contains no page numbers, time markers, or alignment markers.
15923 \end_layout
15924
15925 \end_deeper
15926 \begin_layout Itemize
15927 The 
15928 \family sans
15929 slides
15930 \family default
15931  class has an extra option: 
15932 \family typewriter
15933 clock
15934 \family default
15935 .
15936  To use it, put 
15937 \begin_inset Quotes eld
15938 \end_inset
15939
15940
15941 \family typewriter
15942 clock
15943 \family default
15944
15945 \begin_inset Quotes erd
15946 \end_inset
15947
15948  in the extra class options.
15949 \end_layout
15950
15951 \begin_deeper
15952 \begin_layout Standard
15953 Using this options allows you to add time markers to 
15954 \family sans
15955 Note
15956 \family default
15957 s.
15958  See section
15959 \begin_inset space ~
15960 \end_inset
15961
15962
15963 \begin_inset CommandInset ref
15964 LatexCommand ref
15965 reference "sec:slideNote"
15966
15967 \end_inset
15968
15969  for more details.
15970 \end_layout
15971
15972 \end_deeper
15973 \begin_layout Standard
15974 You can also use the template file 
15975 \begin_inset Quotes eld
15976 \end_inset
15977
15978
15979 \family typewriter
15980 slides.lyx
15981 \family default
15982
15983 \begin_inset Quotes erd
15984 \end_inset
15985
15986  to automatically set up a document to use the 
15987 \family sans
15988 slides
15989 \family default
15990  class [using 
15991 \family sans
15992 File\SpecialChar \menuseparator
15993 New
15994 \begin_inset space ~
15995 \end_inset
15996
15997 from
15998 \begin_inset space ~
15999 \end_inset
16000
16001 Template
16002 \family default
16003  to open your new document].
16004  The template file also contains some examples of the special paragraph
16005  environments used by this class.
16006  I'll describe those next.
16007 \end_layout
16008
16009 \begin_layout Subsection
16010 Paragraph Environments
16011 \end_layout
16012
16013 \begin_layout Subsubsection
16014 Supported Environments
16015 \end_layout
16016
16017 \begin_layout Standard
16018 The first thing you'll notice when you start up a new 
16019 \family sans
16020 slides
16021 \family default
16022  document is the font size and type: it's the equivalent of the size 
16023 \begin_inset Quotes eld
16024 \end_inset
16025
16026
16027 \family sans
16028 Largest
16029 \family default
16030
16031 \begin_inset Quotes erd
16032 \end_inset
16033
16034  in the 
16035 \family sans
16036 Sans
16037 \begin_inset space ~
16038 \end_inset
16039
16040 Serif
16041 \family default
16042  font.
16043  This is also what's used in the output.
16044  Think of this as a 
16045 \begin_inset Quotes eld
16046 \end_inset
16047
16048 visual cue
16049 \begin_inset Quotes erd
16050 \end_inset
16051
16052  to remind you that this is a slide.
16053  Your final slides will use a larger font; ergo, you'll have less space.
16054  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16055 \end_layout
16056
16057 \begin_layout Standard
16058 The next thing that becomes obvious is the changes to the paragraph environment
16059  pull-down box [at the far-left end of the toolbar].
16060  Most of the paragraph environments you're used to seeing are missing.
16061  There are also five new ones.
16062  That's because the 
16063 \family sans
16064 slides
16065 \family default
16066  class itself only supports certain paragraph environments:
16067 \end_layout
16068
16069 \begin_layout Itemize
16070
16071 \family sans
16072 Standard
16073 \end_layout
16074
16075 \begin_layout Itemize
16076
16077 \family sans
16078 Itemize
16079 \end_layout
16080
16081 \begin_layout Itemize
16082
16083 \family sans
16084 Enumerate
16085 \end_layout
16086
16087 \begin_layout Itemize
16088
16089 \family sans
16090 Description
16091 \end_layout
16092
16093 \begin_layout Itemize
16094
16095 \family sans
16096 List
16097 \end_layout
16098
16099 \begin_layout Itemize
16100
16101 \family sans
16102 Quotation
16103 \end_layout
16104
16105 \begin_layout Itemize
16106
16107 \family sans
16108 Quote
16109 \end_layout
16110
16111 \begin_layout Itemize
16112
16113 \family sans
16114 Verse
16115 \end_layout
16116
16117 \begin_layout Itemize
16118
16119 \family sans
16120 Caption
16121 \end_layout
16122
16123 \begin_layout Itemize
16124
16125 \family sans
16126 LyX-Code
16127 \end_layout
16128
16129 \begin_layout Itemize
16130
16131 \family sans
16132 Comment
16133 \end_layout
16134
16135 \begin_layout Standard
16136 All of the other standard environments, including the section-heading environmen
16137 ts, aren't used in the 
16138 \family sans
16139 slides
16140 \family default
16141  class.
16142 \end_layout
16143
16144 \begin_layout Standard
16145 On the other hand, you'll notice the following new environments:
16146 \end_layout
16147
16148 \begin_layout Itemize
16149
16150 \family sans
16151 Slide
16152 \end_layout
16153
16154 \begin_layout Itemize
16155
16156 \family sans
16157 Overlay
16158 \end_layout
16159
16160 \begin_layout Itemize
16161
16162 \family sans
16163 Note
16164 \end_layout
16165
16166 \begin_layout Itemize
16167
16168 \family sans
16169 InvisibleText
16170 \end_layout
16171
16172 \begin_layout Itemize
16173
16174 \family sans
16175 VisibleText
16176 \end_layout
16177
16178 \begin_layout Standard
16179 These five are kind of quirky, due to a 
16180 \begin_inset Quotes eld
16181 \end_inset
16182
16183 feature
16184 \begin_inset Quotes erd
16185 \end_inset
16186
16187  in LyX.
16188  You see, LyX doesn't permit you to nest any other paragraph environment
16189  into an empty environment.
16190  Now, that's fine and dandy, but it means that you wouldn't be able to start
16191  a slide with anything except plain text.
16192  To deal with this, I've performed a little 
16193 \begin_inset Quotes eld
16194 \end_inset
16195
16196 LaTeX magic.
16197 \begin_inset Quotes erd
16198 \end_inset
16199
16200  
16201 \end_layout
16202
16203 \begin_layout Subsubsection
16204 Quirks of the New Environments
16205 \begin_inset CommandInset label
16206 LatexCommand label
16207 name "sec:slideQuirk"
16208
16209 \end_inset
16210
16211
16212 \end_layout
16213
16214 \begin_layout Standard
16215 All five of the new paragraph environments are somewhat quirky due to inherent
16216  limitiations in the current version of LyX.
16217  As I just mentioned, LyX forbids environments that begin with another environme
16218 nt.
16219  To get around this, the 
16220 \family sans
16221 Slide
16222 \family default
16223  environment isn't a paragraph environment as described in the 
16224 \emph on
16225 User's Guide
16226 \emph default
16227 .
16228  
16229 \end_layout
16230
16231 \begin_layout Standard
16232 You should consider 
16233 \family sans
16234 Slide
16235 \family default
16236
16237 \family sans
16238 Overlay
16239 \family default
16240 , and 
16241 \family sans
16242 Note
16243 \family default
16244  to be 
16245 \begin_inset Quotes eld
16246 \end_inset
16247
16248 pseudo-environments.
16249 \begin_inset Quotes erd
16250 \end_inset
16251
16252  They look like a section heading or a 
16253 \begin_inset Quotes eld
16254 \end_inset
16255
16256
16257 \family sans
16258 Caption
16259 \family default
16260 ,
16261 \begin_inset Quotes erd
16262 \end_inset
16263
16264  but really begin a [and, if necessary, end the previous] paragraph environment.
16265  Likewise, treat 
16266 \family sans
16267 InvisibleText
16268 \family default
16269  and 
16270 \family sans
16271 VisibleText
16272 \family default
16273  as 
16274 \begin_inset Quotes eld
16275 \end_inset
16276
16277 pseudo-commands.
16278 \begin_inset Quotes erd
16279 \end_inset
16280
16281  These two perform some action.
16282 \end_layout
16283
16284 \begin_layout Standard
16285 A common feature of all five environments, 
16286 \family sans
16287 Slide
16288 \family default
16289
16290 \family sans
16291 Overlay
16292 \family default
16293
16294 \family sans
16295 Note
16296 \family default
16297
16298 \family sans
16299 InvisibleText
16300 \family default
16301  and 
16302 \family sans
16303 VisibleText
16304 \family default
16305 , is a rather long-ish label.
16306  The text following this label — ordinarily the contents of the paragraph
16307  environment — is utterly irrelevant for 
16308 \family sans
16309 Slide
16310 \family default
16311
16312 \family sans
16313 Overlay
16314 \family default
16315
16316 \family sans
16317 Note
16318 \family default
16319
16320 \family sans
16321 InvisibleText
16322 \family default
16323  and 
16324 \family sans
16325 VisibleText
16326 \family default
16327 .
16328  LyX completely ignores it.
16329  In fact, you can leave these five environments completely empty.
16330  
16331 \end_layout
16332
16333 \begin_layout Standard
16334 While you don't 
16335 \emph on
16336 have
16337 \emph default
16338  to put any text after the rather long-ish label, you might want to.
16339  This could be a short description of the contents of the 
16340 \family sans
16341 Slide
16342 \family default
16343 , for example.
16344  In that case, enter your descriptive comment and hit 
16345 \family sans
16346 Return
16347 \family default
16348  as you normally would.
16349 \end_layout
16350
16351 \begin_layout Standard
16352 If, on the other hand, you don't want to enter any descriptive text, you'll
16353  hit another LyX quirk.
16354  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16355  environment until you put something in the old one.
16356  So, do this:
16357 \end_layout
16358
16359 \begin_layout Itemize
16360 Start entering the text that will 
16361 \emph on
16362 follow
16363 \emph default
16364  the new 
16365 \family sans
16366 Slide
16367 \family default
16368
16369 \family sans
16370 Overlay
16371 \family default
16372
16373 \family sans
16374 Note
16375 \family default
16376
16377 \family sans
16378 InvisibleText
16379 \family default
16380  or 
16381 \family sans
16382 VisibleText
16383 \family default
16384 .
16385  
16386 \end_layout
16387
16388 \begin_layout Itemize
16389 Now move to the beginning of that paragraph.
16390  
16391 \end_layout
16392
16393 \begin_layout Itemize
16394 Next, hit 
16395 \family sans
16396 Return
16397 \family default
16398 .
16399  
16400 \end_layout
16401
16402 \begin_layout Itemize
16403 Finally, change this new, empty paragraph to a 
16404 \family sans
16405 Slide
16406 \family default
16407
16408 \family sans
16409 Overlay
16410 \family default
16411
16412 \family sans
16413 Note
16414 \family default
16415
16416 \family sans
16417 InvisibleText
16418 \family default
16419  or 
16420 \family sans
16421 VisibleText
16422 \family default
16423 .
16424  
16425 \end_layout
16426
16427 \begin_layout Standard
16428 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16429
16430 \end_layout
16431
16432 \begin_layout Subsection
16433 Making a Presentation with 
16434 \family sans
16435 Slide
16436 \family default
16437
16438 \family sans
16439 Overlay
16440 \family default
16441  and 
16442 \family sans
16443 Note
16444 \end_layout
16445
16446 \begin_layout Subsubsection
16447 Using the 
16448 \family sans
16449 Slide
16450 \family default
16451  Environment
16452 \end_layout
16453
16454 \begin_layout Standard
16455 If you're expecting this section to teach you how to actually make a presentatio
16456 n, you'll be sorely disappointed.
16457  Naturally, I'll describe all of the ways the 
16458 \family sans
16459 slides
16460 \family default
16461  class can assist you in preparing the materials for a presentation.
16462  Filling in the contents, however, is up to you.
16463  [Then again, that 
16464 \emph on
16465 is
16466 \emph default
16467  the LyX philosophy.]
16468 \end_layout
16469
16470 \begin_layout Standard
16471 Choosing the 
16472 \family sans
16473 Slide
16474 \family default
16475  environment [in the manner described in section
16476 \begin_inset space ~
16477 \end_inset
16478
16479
16480 \begin_inset CommandInset ref
16481 LatexCommand ref
16482 reference "sec:slideQuirk"
16483
16484 \end_inset
16485
16486 ] tells LyX to begin a new slide [duh].
16487  The label for this environment/
16488 \begin_inset Quotes erd
16489 \end_inset
16490
16491 pseudo-command
16492 \begin_inset Quotes erd
16493 \end_inset
16494
16495  is an 
16496 \begin_inset Quotes eld
16497 \end_inset
16498
16499 ASCII line,
16500 \begin_inset Quotes erd
16501 \end_inset
16502
16503  in cool blue, followed by the label, 
16504 \begin_inset Quotes eld
16505 \end_inset
16506
16507 NewSlide:
16508 \begin_inset Quotes erd
16509 \end_inset
16510
16511 .
16512  Any text or paragraph environments that follow this one go on the new slide.
16513  It's that simple.
16514 \end_layout
16515
16516 \begin_layout Standard
16517 Slides are probably the only time you'll need to forcibly end pages in LyX
16518  (this can be specified in the 
16519 \family sans
16520 Paragraph Layout
16521 \family default
16522  dialog).
16523  In fact, you'll want to, once you finish entering the contents of one slide.
16524  If you've entered more text than can physically fit on a slide, the extra
16525  overflows onto a new slide.
16526  I don't recommend doing this, however, since the overflow slide won't have
16527  any page number on it.
16528  Furthermore, it may interfere with any 
16529 \family sans
16530 Overlay
16531 \family default
16532  you've made to accompany the oversized 
16533 \family sans
16534 Slide
16535 \family default
16536 .
16537 \end_layout
16538
16539 \begin_layout Standard
16540 The 
16541 \family sans
16542 Overlay
16543 \family default
16544  and 
16545 \family sans
16546 Note
16547 \family default
16548  environments work the same way as the 
16549 \family sans
16550 Slide
16551 \family default
16552  environment.
16553  They both create an 
16554 \begin_inset Quotes eld
16555 \end_inset
16556
16557 ASCII line
16558 \begin_inset Quotes erd
16559 \end_inset
16560
16561  followed by a label [
16562 \begin_inset Quotes eld
16563 \end_inset
16564
16565 NewOverlay:
16566 \begin_inset Quotes erd
16567 \end_inset
16568
16569  and 
16570 \begin_inset Quotes eld
16571 \end_inset
16572
16573 NewNote:
16574 \begin_inset Quotes erd
16575 \end_inset
16576
16577 , respectively].
16578  The color is a stunning magenta instead of blue, and the 
16579 \begin_inset Quotes eld
16580 \end_inset
16581
16582 ASCII line
16583 \begin_inset Quotes erd
16584 \end_inset
16585
16586  will look different, in style and in length.
16587  The label fonts of all three also differ from one another.
16588 \end_layout
16589
16590 \begin_layout Standard
16591 As with a 
16592 \family sans
16593 Slide
16594 \family default
16595 , if the contents of a 
16596 \family sans
16597 Note
16598 \family default
16599  or 
16600 \family sans
16601 Overlay
16602 \family default
16603  exceed the physical size of a slide or sheet of paper, the extra will overflow
16604  onto a new sheet.
16605  Again, you should avoid this.
16606  It defeats the whole purpose of 
16607 \family sans
16608 Note
16609 \family default
16610 s and 
16611 \family sans
16612 Overlay
16613 \family default
16614 s.
16615 \end_layout
16616
16617 \begin_layout Subsubsection
16618 Using 
16619 \family sans
16620 Overlay
16621 \family default
16622  with 
16623 \family sans
16624 Slide
16625 \end_layout
16626
16627 \begin_layout Standard
16628 The idea behind an 
16629 \family sans
16630 Overlay
16631 \family default
16632  is a slide that sits atop another slide.
16633  Perhaps you wish to discuss a figure on the main 
16634 \family sans
16635 Slide
16636 \family default
16637  before displaying the text associated with it.
16638  One way to accomplish this is tape a flap of dark paper over the part of
16639  the 
16640 \family sans
16641 Slide
16642 \family default
16643  you want to display later.
16644  This method fails, however, if you wish to overlap one graph with another,
16645  for example.
16646  You would then have to fumble while speaking to align the two separate,
16647  overlapping 
16648 \family sans
16649 Slide
16650 \family default
16651 s to align the two graphs.
16652  The use of an 
16653 \family sans
16654 Overlay
16655 \family default
16656  environment in both cases makes life much easier.
16657 \end_layout
16658
16659 \begin_layout Standard
16660 Each 
16661 \family sans
16662 Overlay
16663 \family default
16664  receives the page number of its 
16665 \begin_inset Quotes eld
16666 \end_inset
16667
16668 parent
16669 \begin_inset Quotes erd
16670 \end_inset
16671
16672  
16673 \family sans
16674 Slide
16675 \family default
16676 , appended by 
16677 \begin_inset Quotes eld
16678 \end_inset
16679
16680
16681 \family typewriter
16682 -a
16683 \family default
16684
16685 \begin_inset Quotes erd
16686 \end_inset
16687
16688 .
16689 \begin_inset Foot
16690 status collapsed
16691
16692 \begin_layout Plain Layout
16693 Presumably, mutliple 
16694 \family sans
16695 Overlay
16696 \family default
16697 s would have 
16698 \begin_inset Quotes eld
16699 \end_inset
16700
16701
16702 \family typewriter
16703 -a
16704 \family default
16705
16706 \begin_inset Quotes erd
16707 \end_inset
16708
16709
16710 \begin_inset Quotes eld
16711 \end_inset
16712
16713
16714 \family typewriter
16715 -b
16716 \family default
16717
16718 \begin_inset Quotes erd
16719 \end_inset
16720
16721
16722 \begin_inset Quotes eld
16723 \end_inset
16724
16725
16726 \family typewriter
16727 -c
16728 \family default
16729
16730 \begin_inset Quotes erd
16731 \end_inset
16732
16733 , etc.
16734 \begin_inset space ~
16735 \end_inset
16736
16737 appended to the page number of the parent 
16738 \family sans
16739 Slide
16740 \family default
16741 .
16742  
16743 \end_layout
16744
16745 \end_inset
16746
16747  Clearly, you want the contents of both the 
16748 \family sans
16749 Slide
16750 \family default
16751  and the 
16752 \family sans
16753 Overlay
16754 \family default
16755  to each fit on a single physical slide! You should probably consider an
16756  
16757 \family sans
16758 Overlay
16759 \family default
16760  as 
16761 \begin_inset Quotes eld
16762 \end_inset
16763
16764 part of
16765 \begin_inset Quotes erd
16766 \end_inset
16767
16768  a 
16769 \family sans
16770 Slide
16771 \family default
16772 .
16773  Indeed, the LyX 
16774 \family sans
16775 slides
16776 \family default
16777  class provides a visual cue for this: the label at the start of an 
16778 \family sans
16779 Overlay
16780 \family default
16781  is shorter than that at the start of a 
16782 \family sans
16783 Slide
16784 \family default
16785 .
16786  Lastly, when you generate printable output, you'll find alignment markers
16787  in all four corners of both the 
16788 \family sans
16789 Overlay
16790 \family default
16791  page and its parent 
16792 \family sans
16793 Slide
16794 \family default
16795 .
16796  These will assist you in lining up the two physical slides.
16797 \end_layout
16798
16799 \begin_layout Standard
16800 The major problem in overlaying two slides is aligning the contents of the
16801  two transparencies.
16802  How much space should you leave for that graph on the second slide? Worse
16803  still, what if you want a graph and a sentence on second slide, but there
16804  is text on the main transparency that goes in between them? You could try
16805  and insert vertical space of the right size.
16806  The better way is to use 
16807 \family sans
16808 InvisibleText
16809 \family default
16810  and 
16811 \family sans
16812 VisibleText
16813 \family default
16814 .
16815 \end_layout
16816
16817 \begin_layout Standard
16818 As their names imply, 
16819 \family sans
16820 InvisibleText
16821 \family default
16822  and 
16823 \family sans
16824 VisibleText
16825 \family default
16826  are two command-like paragraph environments that make all subsequent text
16827  invisible and visible, respectively.
16828  Note from section
16829 \begin_inset space ~
16830 \end_inset
16831
16832
16833 \begin_inset CommandInset ref
16834 LatexCommand ref
16835 reference "sec:slideQuirk"
16836
16837 \end_inset
16838
16839  that you don't place anything 
16840 \emph on
16841 into
16842 \emph default
16843  these two environments, however.
16844  When you create an 
16845 \family sans
16846 InvisibleText
16847 \family default
16848 , it inserts a centered, sky-blue label into the page reading 
16849 \begin_inset Quotes eld
16850 \end_inset
16851
16852 <Invisible Text Follows>
16853 \begin_inset Quotes erd
16854 \end_inset
16855
16856 .
16857  For paragraphs following this label, the parts of the 
16858 \family sans
16859 Slide
16860 \family default
16861  [or 
16862 \family sans
16863 Overlay
16864 \family default
16865 ; it doesn't matter which] where they would be contain instead blank space.
16866  
16867 \end_layout
16868
16869 \begin_layout Standard
16870 For 
16871 \family sans
16872 VisibleText
16873 \family default
16874 , the corresponding centered label is 
16875 \begin_inset Quotes eld
16876 \end_inset
16877
16878 <Visible Text Follows>
16879 \begin_inset Quotes erd
16880 \end_inset
16881
16882  in blazing green.
16883  Paragraphs following this label behave normally.
16884  Note that the beginning of a new 
16885 \family sans
16886 Slide
16887 \family default
16888
16889 \family sans
16890 Overlay
16891 \family default
16892 , or 
16893 \family sans
16894 Note
16895 \family default
16896  automatically shuts off an 
16897 \family sans
16898 InvisibleText
16899 \family default
16900 .
16901  It's therefore not necessary to use 
16902 \family sans
16903 VisibleText
16904 \family default
16905  at the end of a 
16906 \family sans
16907 Slide
16908 \family default
16909 .
16910 \end_layout
16911
16912 \begin_layout Standard
16913 By now, it should be obvious how to create overlay transparencies using
16914  the proper combination of 
16915 \family sans
16916 InvisibleText
16917 \family default
16918  and 
16919 \family sans
16920 VisibleText
16921 \family default
16922  on a 
16923 \family sans
16924 Slide
16925 \family default
16926  and 
16927 \family sans
16928 Overlay
16929 \family default
16930 :
16931 \end_layout
16932
16933 \begin_layout Enumerate
16934 Create a 
16935 \family sans
16936 Slide
16937 \family default
16938 , including everything that will appear on it, whether on the main slide
16939  or on the 
16940 \family sans
16941 Overlay
16942 \family default
16943 .
16944 \end_layout
16945
16946 \begin_layout Enumerate
16947 Before each figure or paragraph that will appear only on the 
16948 \family sans
16949 Overlay
16950 \family default
16951 , insert an 
16952 \family sans
16953 InvisibleText
16954 \family default
16955  environment.
16956  If necessary, insert a 
16957 \family sans
16958 VisibleText
16959 \family default
16960  environment after the 
16961 \family sans
16962 Overlay
16963 \family default
16964 -only text.
16965 \end_layout
16966
16967 \begin_layout Enumerate
16968 Start an 
16969 \family sans
16970 Overlay
16971 \family default
16972  immediately following the 
16973 \family sans
16974 Slide
16975 \family default
16976 .
16977 \end_layout
16978
16979 \begin_layout Enumerate
16980 Copy the contents of this 
16981 \family sans
16982 Slide
16983 \family default
16984  into the 
16985 \family sans
16986 Overlay
16987 \family default
16988 .
16989 \end_layout
16990
16991 \begin_layout Enumerate
16992 Within the 
16993 \family sans
16994 Overlay
16995 \family default
16996 , change all of the 
16997 \family sans
16998 InvisibleText
16999 \family default
17000  lines to 
17001 \family sans
17002 VisibleText
17003 \family default
17004  and vice-versa.
17005 \end_layout
17006
17007 \begin_layout Standard
17008 That's it.
17009  You've just made an 
17010 \family sans
17011 Overlay
17012 \family default
17013 .
17014 \end_layout
17015
17016 \begin_layout Standard
17017 There's one problem with the way I've designed the LyX 
17018 \family sans
17019 slides
17020 \family default
17021  class: you can't make text in the middle of a paragraph invisible, nor
17022  make text in the middle of an invisible paragraph visible again.
17023  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17024 \begin_inset Foot
17025 status collapsed
17026
17027 \begin_layout Plain Layout
17028 The commands of interest are: 
17029 \end_layout
17030
17031 \begin_layout Itemize
17032
17033 \family typewriter
17034 {
17035 \backslash
17036 invisible \SpecialChar \ldots{}
17037  }
17038 \end_layout
17039
17040 \begin_layout Itemize
17041
17042 \family typewriter
17043 {
17044 \backslash
17045 visible \SpecialChar \ldots{}
17046  }
17047 \end_layout
17048
17049 \begin_layout Plain Layout
17050 \SpecialChar \ldots{}
17051 and need to be marked as TeX.
17052  The text whose 
17053 \begin_inset Quotes eld
17054 \end_inset
17055
17056 visibility
17057 \begin_inset Quotes erd
17058 \end_inset
17059
17060  you wish to change goes in between the brackets [and after the 
17061 \family typewriter
17062
17063 \backslash
17064 invisible
17065 \family default
17066  or 
17067 \family typewriter
17068
17069 \backslash
17070 visible
17071 \family default
17072  command].
17073  If you don't know how to mark text as TeX, see the appropriate section
17074  of the 
17075 \emph on
17076 User's Guide
17077 \emph default
17078 .
17079 \end_layout
17080
17081 \end_inset
17082
17083
17084 \end_layout
17085
17086 \begin_layout Subsubsection
17087 Using 
17088 \family sans
17089 Note
17090 \family default
17091  with 
17092 \family sans
17093 Slide
17094 \family default
17095
17096 \begin_inset CommandInset label
17097 LatexCommand label
17098 name "sec:slideNote"
17099
17100 \end_inset
17101
17102
17103 \end_layout
17104
17105 \begin_layout Standard
17106 Like an 
17107 \family sans
17108 Overlay
17109 \family default
17110 , a 
17111 \family sans
17112 Note
17113 \family default
17114  is associated with a 
17115 \begin_inset Quotes eld
17116 \end_inset
17117
17118 parent
17119 \begin_inset Quotes erd
17120 \end_inset
17121
17122  
17123 \family sans
17124 Slide
17125 \family default
17126 .
17127  Here, too, the LyX 
17128 \family sans
17129 slides
17130 \family default
17131  class provides visual cues.
17132  The label for a 
17133 \family sans
17134 Note
17135 \family default
17136  is shorter than that of a 
17137 \family sans
17138 Slide
17139 \family default
17140  [yet longer than that of an 
17141 \family sans
17142 Overlay
17143 \family default
17144 ] and, like the label of an 
17145 \family sans
17146 Overlay
17147 \family default
17148  is shockingly magenta.
17149  Additionally, the printed 
17150 \family sans
17151 Note
17152 \family default
17153  has the page number of its 
17154 \begin_inset Quotes eld
17155 \end_inset
17156
17157 parent
17158 \begin_inset Quotes erd
17159 \end_inset
17160
17161  
17162 \family sans
17163 Slide
17164 \family default
17165 , appended by 
17166 \begin_inset Quotes eld
17167 \end_inset
17168
17169
17170 \family typewriter
17171 -
17172 \family default
17173 1
17174 \begin_inset Quotes erd
17175 \end_inset
17176
17177
17178 \begin_inset Quotes eld
17179 \end_inset
17180
17181
17182 \family typewriter
17183 -
17184 \family default
17185 2
17186 \begin_inset Quotes erd
17187 \end_inset
17188
17189
17190 \begin_inset Quotes eld
17191 \end_inset
17192
17193
17194 \family typewriter
17195 -
17196 \family default
17197 3
17198 \begin_inset Quotes erd
17199 \end_inset
17200
17201 , etc.
17202  You can have multiple 
17203 \family sans
17204 Note
17205 \family default
17206 s associated with a single 
17207 \family sans
17208 Slide
17209 \family default
17210 , and, as with 
17211 \family sans
17212 Slide
17213 \family default
17214  and 
17215 \family sans
17216 Overlay
17217 \family default
17218 , you'll probably want to break up long 
17219 \family sans
17220 Note
17221 \family default
17222 s so that they fit on a single sheet of paper.
17223 \end_layout
17224
17225 \begin_layout Standard
17226 The purpose of a 
17227 \family sans
17228 Note
17229 \family default
17230  is obvious: it contains anything additional you might want to say about
17231  a 
17232 \family sans
17233 Slide
17234 \family default
17235 .
17236  It could also be used as a sheet of reminders for a particular 
17237 \family sans
17238 Slide
17239 \family default
17240 .
17241  In the case of the latter, you might want to make use of time markers.
17242  Currently, the LyX 
17243 \family sans
17244 slides
17245 \family default
17246  class has no 
17247 \begin_inset Quotes eld
17248 \end_inset
17249
17250 native
17251 \begin_inset Quotes erd
17252 \end_inset
17253
17254  support for time markers, a 
17255 \noun on
17256 SliTeX
17257 \noun default
17258  feature.
17259  So, you'll have to resort to using the LaTeX codes.
17260 \end_layout
17261
17262 \begin_layout Standard
17263 To use time markers, you'll need to specify the extra class option 
17264 \begin_inset Quotes eld
17265 \end_inset
17266
17267
17268 \family typewriter
17269 clock
17270 \family default
17271
17272 \begin_inset Quotes erd
17273 \end_inset
17274
17275  [see section
17276 \begin_inset space ~
17277 \end_inset
17278
17279
17280 \begin_inset CommandInset ref
17281 LatexCommand ref
17282 reference "sec:slidesetup"
17283
17284 \end_inset
17285
17286 ].
17287  This option turns on timing marks, which will appear in the lower-left-hand
17288  corner of every 
17289 \family sans
17290 Note
17291 \family default
17292  you generate.
17293  To set what appears in the time marker, you use the LaTeX commands 
17294 \begin_inset Quotes eld
17295 \end_inset
17296
17297
17298 \family typewriter
17299
17300 \backslash
17301 settime{}
17302 \family default
17303
17304 \begin_inset Quotes erd
17305 \end_inset
17306
17307  and 
17308 \begin_inset Quotes eld
17309 \end_inset
17310
17311
17312 \family typewriter
17313
17314 \backslash
17315 addtime{}
17316 \family default
17317
17318 \begin_inset Quotes erd
17319 \end_inset
17320
17321 .
17322  The arguments of both commands are time measured in seconds.
17323  
17324 \begin_inset Quotes eld
17325 \end_inset
17326
17327
17328 \family typewriter
17329
17330 \backslash
17331 settime{}
17332 \family default
17333
17334 \begin_inset Quotes erd
17335 \end_inset
17336
17337  sets the time marker to a given time.
17338  
17339 \begin_inset Quotes eld
17340 \end_inset
17341
17342
17343 \family typewriter
17344
17345 \backslash
17346 addtime{}
17347 \family default
17348
17349 \begin_inset Quotes erd
17350 \end_inset
17351
17352  increments the time marker by the specified amount.
17353  Using time markers and 
17354 \family sans
17355 Note
17356 \family default
17357 s in this fashion, you can remind yourself how much time to spend on a particula
17358
17359 \family sans
17360 Slide
17361 \family default
17362 .
17363 \end_layout
17364
17365 \begin_layout Standard
17366 There's one last feature to describe.
17367  Clearly, you'd like to print out all of your 
17368 \family sans
17369 Slide
17370 \family default
17371 s and 
17372 \family sans
17373 Overlay
17374 \family default
17375 s on transparencies while printing all of your 
17376 \family sans
17377 Note
17378 \family default
17379 s on plain paper.
17380  However, a 
17381 \family sans
17382 Note
17383 \family default
17384  
17385 \emph on
17386 must
17387 \emph default
17388  follow the 
17389 \family sans
17390 Slide
17391 \family default
17392  with which it is associated.
17393  What's a person to do?
17394 \end_layout
17395
17396 \begin_layout Standard
17397 Luckily, there are two LaTeX commands that allow you to select what to print
17398  out.
17399  Both must be placed into the preamble of your document.
17400  The command 
17401 \begin_inset Quotes eld
17402 \end_inset
17403
17404
17405 \family typewriter
17406
17407 \backslash
17408 onlyslides{
17409 \backslash
17410 slides}
17411 \family default
17412
17413 \begin_inset Quotes erd
17414 \end_inset
17415
17416  will cause the output to contain only the 
17417 \family sans
17418 Slide
17419 \family default
17420 s and 
17421 \family sans
17422 Overlay
17423 \family default
17424 s.
17425  Correspondingly, the command 
17426 \begin_inset Quotes eld
17427 \end_inset
17428
17429
17430 \family typewriter
17431
17432 \backslash
17433 onlynotes{
17434 \backslash
17435 notes}
17436 \family default
17437
17438 \begin_inset Quotes erd
17439 \end_inset
17440
17441  prevents the output of anything but 
17442 \family sans
17443 Note
17444 \family default
17445 s.
17446  I'd advise placing both commands in the preamble and initially comment
17447  both out.
17448  You can then preview your entire presentation as you write.
17449  When you're done writing, you can then uncomment one of the two to select
17450  what you want to print.
17451  I like to uncomment 
17452 \begin_inset Quotes eld
17453 \end_inset
17454
17455
17456 \family typewriter
17457
17458 \backslash
17459 onlyslides{
17460 \backslash
17461 slides}
17462 \family default
17463
17464 \begin_inset Quotes erd
17465 \end_inset
17466
17467  , print to a file with 
17468 \begin_inset Quotes eld
17469 \end_inset
17470
17471
17472 \family typewriter
17473 -slides
17474 \family default
17475
17476 \begin_inset Quotes erd
17477 \end_inset
17478
17479  in its name, comment it back out, then uncomment 
17480 \begin_inset Quotes eld
17481 \end_inset
17482
17483
17484 \family typewriter
17485
17486 \backslash
17487 onlynotes{
17488 \backslash
17489 notes}
17490 \family default
17491
17492 \begin_inset Quotes erd
17493 \end_inset
17494
17495  and print to a 
17496 \begin_inset Quotes eld
17497 \end_inset
17498
17499
17500 \family typewriter
17501 *-notes.ps
17502 \family default
17503
17504 \begin_inset Quotes erd
17505 \end_inset
17506
17507  file.
17508  I can then send either file to a printer, loading transparencies or plain
17509  paper as appropriate.
17510 \end_layout
17511
17512 \begin_layout Standard
17513 You can also provide other arguments to the 
17514 \begin_inset Quotes eld
17515 \end_inset
17516
17517
17518 \family typewriter
17519
17520 \backslash
17521 onlyslides{}
17522 \family default
17523
17524 \begin_inset Quotes erd
17525 \end_inset
17526
17527  and 
17528 \begin_inset Quotes eld
17529 \end_inset
17530
17531
17532 \family typewriter
17533
17534 \backslash
17535 onlynotes{}
17536 \family default
17537
17538 \begin_inset Quotes erd
17539 \end_inset
17540
17541  commands.
17542  See a good LaTeX book for details.
17543 \end_layout
17544
17545 \begin_layout Subsection
17546 The 
17547 \family sans
17548 slides
17549 \family default
17550  Class Template File
17551 \end_layout
17552
17553 \begin_layout Standard
17554 I have also provided a template file, 
17555 \begin_inset Quotes eld
17556 \end_inset
17557
17558
17559 \family typewriter
17560 slides.lyx
17561 \family default
17562
17563 \begin_inset Quotes erd
17564 \end_inset
17565
17566 , with the 
17567 \family sans
17568 slides
17569 \family default
17570  class.
17571  To use it, begin your new presentation with 
17572 \family sans
17573 \bar under
17574 F
17575 \bar default
17576 ile\SpecialChar \menuseparator
17577 New
17578 \begin_inset space ~
17579 \end_inset
17580
17581 from
17582 \begin_inset space ~
17583 \end_inset
17584
17585
17586 \bar under
17587 T
17588 \bar default
17589 emplate
17590 \family default
17591 .
17592  Your new LyX presentation file will contain an example 
17593 \family sans
17594 Slide
17595 \family default
17596  – 
17597 \family sans
17598 Overlay
17599 \family default
17600  – 
17601 \family sans
17602 Note
17603 \family default
17604  triplet.
17605  The 
17606 \family sans
17607 Slide
17608 \family default
17609  and 
17610 \family sans
17611 Overlay
17612 \family default
17613  additionally contain an example of the use of 
17614 \family sans
17615 InvisibleText
17616 \family default
17617  and 
17618 \family sans
17619 VisibleText
17620 \family default
17621 .
17622  Lastly, the preamble will contain:
17623 \end_layout
17624
17625 \begin_layout LyX-Code
17626 % Uncomment to print out only slides and overlays
17627 \end_layout
17628
17629 \begin_layout LyX-Code
17630 %
17631 \end_layout
17632
17633 \begin_layout LyX-Code
17634 %
17635 \backslash
17636 onlyslides{
17637 \backslash
17638 slides}
17639 \begin_inset Newline newline
17640 \end_inset
17641
17642  
17643 \end_layout
17644
17645 \begin_layout LyX-Code
17646 % Uncomment to print out only notes
17647 \end_layout
17648
17649 \begin_layout LyX-Code
17650 %
17651 \end_layout
17652
17653 \begin_layout LyX-Code
17654 %
17655 \backslash
17656 onlynotes{
17657 \backslash
17658 notes}
17659 \end_layout
17660
17661 \begin_layout Standard
17662 One final thing: I created this class to support the LaTeX2e 
17663 \begin_inset Quotes eld
17664 \end_inset
17665
17666
17667 \noun on
17668 SliTeX
17669 \noun default
17670  emulation
17671 \begin_inset Quotes erd
17672 \end_inset
17673
17674  class, one of the built-in LaTeX2e classes.
17675  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17676  built-in slide class.
17677  It's here if you want it or need it.
17678  There exist other LaTeX2e classes for creating presentations, such as the
17679  
17680 \family sans
17681 Foils
17682 \family default
17683  class [see section
17684 \begin_inset space ~
17685 \end_inset
17686
17687
17688 \begin_inset CommandInset ref
17689 LatexCommand ref
17690 reference "sec:foiltex"
17691
17692 \end_inset
17693
17694 ] or the 
17695 \begin_inset Quotes eld
17696 \end_inset
17697
17698
17699 \family typewriter
17700 seminar
17701 \family default
17702
17703 \begin_inset Quotes erd
17704 \end_inset
17705
17706  package [present on some TeX distributions].
17707  The latter is not yet supported under LyX.
17708 \begin_inset Foot
17709 status collapsed
17710
17711 \begin_layout Plain Layout
17712 Perhaps you can take on the task\SpecialChar \ldots{}
17713
17714 \end_layout
17715
17716 \end_inset
17717
17718  I know nothing about these other classes.
17719  Try them out to see what sort of alternative they provide.
17720 \end_layout
17721
17722 \begin_layout Chapter
17723 LyX Features needing Extra Software
17724 \end_layout
17725
17726 \begin_layout Section
17727 Checking TeX
17728 \end_layout
17729
17730 \begin_layout Standard
17731 by 
17732 \noun on
17733 Asger Alstrup
17734 \end_layout
17735
17736 \begin_layout Subsection
17737 Introduction
17738 \end_layout
17739
17740 \begin_layout Standard
17741 If you have the 
17742 \family typewriter
17743 chktex
17744 \family default
17745  program installed
17746 \begin_inset Foot
17747 status collapsed
17748
17749 \begin_layout Plain Layout
17750
17751 \family typewriter
17752 chktex
17753 \family default
17754  is not yet available when you are using the LaTeX distribution MiKTeX.
17755 \end_layout
17756
17757 \end_inset
17758
17759 , you'll find in the 
17760 \family sans
17761 Tools
17762 \family default
17763  menu the entry: 
17764 \family sans
17765 Check
17766 \begin_inset space ~
17767 \end_inset
17768
17769 TeX
17770 \family default
17771 .
17772  You can get 
17773 \family typewriter
17774 chktex
17775 \family default
17776  from CTAN,
17777 \begin_inset Newline newline
17778 \end_inset
17779
17780
17781 \begin_inset CommandInset href
17782 LatexCommand href
17783 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17784
17785 \end_inset
17786
17787 .
17788 \end_layout
17789
17790 \begin_layout Standard
17791 The 
17792 \family sans
17793 ChkTeX
17794 \family default
17795  package is a program that was written by 
17796 \begin_inset Flex Noun
17797 status collapsed
17798
17799 \begin_layout Plain Layout
17800 Jens T.
17801 \begin_inset space ~
17802 \end_inset
17803
17804 Berger Thielemann
17805 \end_layout
17806
17807 \end_inset
17808
17809  in frustration because some constructs in LaTeX are sometimes non-intuitive,
17810  and easy to forget.
17811  The program runs over your LaTeX file, checks the integrity of the file,
17812  and flags some common errors.
17813  In other technical words, it is 
17814 \family typewriter
17815 lint
17816 \family default
17817  for LaTeX.
17818 \end_layout
17819
17820 \begin_layout Standard
17821 Well, what is a syntax checker doing in LyX which is supposed to produce
17822  correct LaTeX anyways? The answer is simple: Just as 
17823 \family typewriter
17824 Lint
17825 \family default
17826  not only checks the 
17827 \emph on
17828 syntax
17829 \emph default
17830  of C programs, but also does 
17831 \emph on
17832 semantic
17833 \emph default
17834  checks for type-errors, 
17835 \family sans
17836 ChkTeX
17837 \family default
17838  catches some common 
17839 \emph on
17840 typographic
17841 \emph default
17842  errors, in addition to the syntactical ones.
17843  Specifically, 
17844 \family sans
17845 ChkTeX
17846 \family default
17847  is capable of detecting several common errors, such as
17848 \end_layout
17849
17850 \begin_layout Itemize
17851 Ellipsis detection:
17852 \begin_inset Newline newline
17853 \end_inset
17854
17855 Use \SpecialChar \ldots{}
17856  instead of ...
17857 \end_layout
17858
17859 \begin_layout Itemize
17860 No space in front of/after parenthesis:
17861 \begin_inset Newline newline
17862 \end_inset
17863
17864 ( wrong spacing )
17865 \end_layout
17866
17867 \begin_layout Itemize
17868 Enforcement of normal space after common abbreviations:
17869 \begin_inset Newline newline
17870 \end_inset
17871
17872 e.
17873 \begin_inset space \thinspace{}
17874 \end_inset
17875
17876 g.
17877 \begin_inset space \space{}
17878 \end_inset
17879
17880 is too wide spacing.
17881 \end_layout
17882
17883 \begin_layout Itemize
17884 Enforcement of end-of-sentence space when the last sentence ends with a
17885  capital letter:
17886 \begin_inset Newline newline
17887 \end_inset
17888
17889 This is a TEST.
17890  And this is wrong spacing.
17891 \end_layout
17892
17893 \begin_layout Itemize
17894 Space in front of labels and similar commands:
17895 \begin_inset Newline newline
17896 \end_inset
17897
17898 The label should stick right up to the text to avoid falling to a wrong
17899  page.
17900  
17901 \begin_inset CommandInset label
17902 LatexCommand label
17903 name "sec:chktex"
17904
17905 \end_inset
17906
17907  
17908 \begin_inset Foot
17909 status collapsed
17910
17911 \begin_layout Plain Layout
17912 This footnote is in danger of falling off to a wrong page
17913 \end_layout
17914
17915 \end_inset
17916
17917  The label is separated too much.
17918 \end_layout
17919
17920 \begin_layout Itemize
17921 Space in front of references, instead of hard spaces:
17922 \begin_inset Newline newline
17923 \end_inset
17924
17925 If you have bad luck, the text will break right between the referenced text
17926  and reference number, and that's a pity.
17927  See section 
17928 \begin_inset CommandInset ref
17929 LatexCommand ref
17930 reference "sec:chktex"
17931
17932 \end_inset
17933
17934 .
17935 \end_layout
17936
17937 \begin_layout Itemize
17938 Use of 
17939 \begin_inset Quotes eld
17940 \end_inset
17941
17942 x
17943 \begin_inset Quotes erd
17944 \end_inset
17945
17946  instead of 
17947 \begin_inset Formula $\times$
17948 \end_inset
17949
17950  between numbers:
17951 \begin_inset Newline newline
17952 \end_inset
17953
17954 2x2 looks cheap compared to 
17955 \begin_inset Formula $2\times2$
17956 \end_inset
17957
17958 .
17959 \end_layout
17960
17961 \begin_layout Standard
17962 and more \SpecialChar \ldots{}
17963  It is an invaluable tool when you are 
17964 \begin_inset Quotes eld
17965 \end_inset
17966
17967 finishing up
17968 \begin_inset Quotes erd
17969 \end_inset
17970
17971  your document before printing, and you should run it right after the obligatory
17972  spelling check, and before you go fine tuning the typesetting.
17973 \end_layout
17974
17975 \begin_layout Subsection
17976 How to use it
17977 \end_layout
17978
17979 \begin_layout Standard
17980 If you have the program installed, usage is as simple as choosing 
17981 \family sans
17982 Tools\SpecialChar \menuseparator
17983 Check
17984 \begin_inset space ~
17985 \end_inset
17986
17987 TeX
17988 \family default
17989 .
17990  This will make LyX generate a LaTeX file of your document, start 
17991 \family sans
17992 ChkTeX
17993 \family default
17994  to check it, and then make LyX insert 
17995 \begin_inset Quotes eld
17996 \end_inset
17997
17998 error boxes
17999 \begin_inset Quotes erd
18000 \end_inset
18001
18002  with the warnings from 
18003 \family sans
18004 ChkTeX
18005 \family default
18006 , if there were any.
18007  The warnings will be placed close to the point of the mistake, and you
18008  can quickly find them by using the 
18009 \family sans
18010 Navigate\SpecialChar \menuseparator
18011 Error
18012 \family default
18013  menu item, or the shortcut key 
18014 \family sans
18015 C-g
18016 \family default
18017  from the default 
18018 \family typewriter
18019 cua
18020 \family default
18021  bind file.
18022  Open the error boxes by clicking on them with the mouse, or use the shortcut
18023  key 
18024 \family sans
18025 C-i
18026 \family default
18027  from 
18028 \family typewriter
18029 cua
18030 \family default
18031  bindings, or the corresponding 
18032 \family sans
18033 C-o
18034 \family default
18035  for the alternate 
18036 \family typewriter
18037 emacs
18038 \family default
18039  bind file.
18040  Read the warning and correct the mistake, if it is a mistake.
18041  If you have trouble understanding what the warning is about, you can safely
18042  ignore it.
18043  Remember that there is a hidden layer between the document on screen and
18044  the technical details in invoking 
18045 \family sans
18046 ChkTeX
18047 \family default
18048 , and this gap can make some warnings seem arcane or just plain silly.
18049 \end_layout
18050
18051 \begin_layout Standard
18052 This document is an excellent testing bed for the feature, and it should
18053  provide quite a few warnings for you to fiddle with.
18054  Since computers are only so smart, expect most of the warnings to be false
18055  alarms, though.
18056 \end_layout
18057
18058 \begin_layout Subsection
18059 How to fine tune it
18060 \end_layout
18061
18062 \begin_layout Standard
18063 Sometimes, you'll find that 
18064 \family sans
18065 ChkTeX
18066 \family default
18067  makes more noise than suits your mood.
18068  Then you can choose not to use it, wait until your mood changes, or try
18069  to customize 
18070 \family sans
18071 ChkTeX
18072 \family default
18073  to get better along with you.
18074 \end_layout
18075
18076 \begin_layout Standard
18077 Although 
18078 \family sans
18079 ChkTeX
18080 \family default
18081  
18082 \emph on
18083 is
18084 \emph default
18085  very configurable and extensible, you shouldn't expect to solve all problems
18086  with 
18087 \family sans
18088 ChkTeX
18089 \family default
18090  in LyX this way.
18091  Since LyX has to generate a somewhat special LaTeX file to be able to match
18092  the line numbers from the 
18093 \family sans
18094 ChkTeX
18095 \family default
18096  output
18097 \begin_inset Foot
18098 status collapsed
18099
18100 \begin_layout Plain Layout
18101 You can inspect the specific output from 
18102 \family sans
18103 chktex
18104 \family default
18105  by using 
18106 \family sans
18107 Edit\SpecialChar \menuseparator
18108 View
18109 \begin_inset space ~
18110 \end_inset
18111
18112 LaTeX
18113 \begin_inset space ~
18114 \end_inset
18115
18116 Log
18117 \family default
18118  right after a 
18119 \family sans
18120 chktex
18121 \family default
18122  run.
18123 \end_layout
18124
18125 \end_inset
18126
18127  to the internal document structure, some of the warnings will not appear
18128  correctly.
18129  There are two things you can do about this:
18130 \end_layout
18131
18132 \begin_layout Itemize
18133 Fine tune the 
18134 \family sans
18135 ChkTeX
18136 \family default
18137  invocation command line in 
18138 \begin_inset Flex MenuItem
18139 status collapsed
18140
18141 \begin_layout Plain Layout
18142 Tools\SpecialChar \menuseparator
18143 Preferences\SpecialChar \menuseparator
18144 Output\SpecialChar \menuseparator
18145 LaTeX\SpecialChar \menuseparator
18146 CheckTeX command
18147 \end_layout
18148
18149 \end_inset
18150
18151 , or the global 
18152 \family sans
18153 ChkTeX
18154 \family default
18155  installation configuration file (usually with the file 
18156 \family typewriter
18157 chktexrc
18158 \family default
18159 ).
18160  See below to learn what warnings can be enabled and disabled on the command
18161  line.
18162 \end_layout
18163
18164 \begin_layout Itemize
18165 Export your document as a raw LaTeX file using 
18166 \family sans
18167 File\SpecialChar \menuseparator
18168 Export\SpecialChar \menuseparator
18169 LaTeX
18170 \family default
18171  and run 
18172 \family typewriter
18173 chktex
18174 \family default
18175  manually on that.
18176  Invoked in this way, it can be a hassle to find the corresponding place
18177  in the document inside LyX, but with a little patience, you should be able
18178  to do it.
18179 \end_layout
18180
18181 \begin_layout Standard
18182 Here follows the warning messages that can be enabled and disabled in 
18183 \family sans
18184 Preferences
18185 \family default
18186 .
18187  Use 
18188 \family typewriter
18189 -n#
18190 \family default
18191  to disable a warning, and 
18192 \family typewriter
18193 -w#
18194 \family default
18195  to enable a warning.
18196  The emphasized entries are disabled by default, because the default is
18197  "
18198 \family typewriter
18199 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18200 \family default
18201 ".
18202 \end_layout
18203
18204 \begin_layout Standard
18205 Notice that you should only use the options that enable and disable warnings,
18206  because LyX relies on some of the other command line parameters to be set
18207  in a specific way to have a chance to communicate with 
18208 \family typewriter
18209 chktex
18210 \family default
18211 .
18212 \end_layout
18213
18214 \begin_layout Enumerate
18215
18216 \size small
18217 \emph on
18218 Command terminated with space.
18219 \end_layout
18220
18221 \begin_layout Enumerate
18222
18223 \size small
18224 Non-breaking space (
18225 \begin_inset Quotes eld
18226 \end_inset
18227
18228
18229 \family typewriter
18230 ~
18231 \family default
18232
18233 \begin_inset Quotes erd
18234 \end_inset
18235
18236 ) should have been used.
18237 \end_layout
18238
18239 \begin_layout Enumerate
18240
18241 \size small
18242 \emph on
18243 You should enclose the previous parenthesis with 
18244 \begin_inset Quotes eld
18245 \end_inset
18246
18247
18248 \family typewriter
18249 {}
18250 \family default
18251
18252 \begin_inset Quotes erd
18253 \end_inset
18254
18255 .
18256 \end_layout
18257
18258 \begin_layout Enumerate
18259
18260 \size small
18261 Italic correction (
18262 \begin_inset Quotes eld
18263 \end_inset
18264
18265
18266 \family typewriter
18267
18268 \backslash
18269 /
18270 \family default
18271
18272 \begin_inset Quotes erd
18273 \end_inset
18274
18275 ) found in non-italic buffer.
18276 \end_layout
18277
18278 \begin_layout Enumerate
18279
18280 \size small
18281 Italic correction (
18282 \begin_inset Quotes eld
18283 \end_inset
18284
18285
18286 \family typewriter
18287
18288 \backslash
18289 /
18290 \family default
18291
18292 \begin_inset Quotes erd
18293 \end_inset
18294
18295 ) found more than once.
18296 \end_layout
18297
18298 \begin_layout Enumerate
18299
18300 \size small
18301 \emph on
18302 No italic correction (
18303 \begin_inset Quotes eld
18304 \end_inset
18305
18306
18307 \family typewriter
18308
18309 \backslash
18310 /
18311 \family default
18312
18313 \begin_inset Quotes erd
18314 \end_inset
18315
18316 ) found.
18317 \end_layout
18318
18319 \begin_layout Enumerate
18320
18321 \size small
18322 Accent command 
18323 \begin_inset Quotes eld
18324 \end_inset
18325
18326
18327 \family typewriter
18328 cmd
18329 \family default
18330
18331 \begin_inset Quotes erd
18332 \end_inset
18333
18334  needs use of 
18335 \begin_inset Quotes eld
18336 \end_inset
18337
18338
18339 \family typewriter
18340 cmd
18341 \family default
18342
18343 \begin_inset Quotes erd
18344 \end_inset
18345
18346 .
18347 \end_layout
18348
18349 \begin_layout Enumerate
18350
18351 \size small
18352 Wrong length of dash may have been used.
18353 \end_layout
18354
18355 \begin_layout Enumerate
18356
18357 \size small
18358 \emph on
18359 \begin_inset Quotes eld
18360 \end_inset
18361
18362
18363 \family typewriter
18364 %s
18365 \family default
18366
18367 \begin_inset Quotes erd
18368 \end_inset
18369
18370  expected, found 
18371 \begin_inset Quotes eld
18372 \end_inset
18373
18374
18375 \family typewriter
18376 %s
18377 \family default
18378
18379 \begin_inset Quotes erd
18380 \end_inset
18381
18382 .
18383 \end_layout
18384
18385 \begin_layout Enumerate
18386
18387 \size small
18388 Solo 
18389 \begin_inset Quotes eld
18390 \end_inset
18391
18392
18393 \family typewriter
18394 %s
18395 \family default
18396
18397 \begin_inset Quotes erd
18398 \end_inset
18399
18400  found.
18401 \end_layout
18402
18403 \begin_layout Enumerate
18404
18405 \size small
18406 You should use 
18407 \begin_inset Quotes eld
18408 \end_inset
18409
18410
18411 \family typewriter
18412 %s
18413 \family default
18414
18415 \begin_inset Quotes erd
18416 \end_inset
18417
18418  to achieve an ellipsis.
18419 \end_layout
18420
18421 \begin_layout Enumerate
18422
18423 \size small
18424 Inter-word spacing (
18425 \begin_inset Quotes eld
18426 \end_inset
18427
18428
18429 \family typewriter
18430
18431 \backslash
18432
18433 \family default
18434  
18435 \begin_inset Quotes eld
18436 \end_inset
18437
18438 ) should perhaps be used.
18439 \end_layout
18440
18441 \begin_layout Enumerate
18442
18443 \size small
18444 Inter-sentence spacing (
18445 \begin_inset Quotes eld
18446 \end_inset
18447
18448
18449 \family typewriter
18450
18451 \backslash
18452 @
18453 \family default
18454
18455 \begin_inset Quotes erd
18456 \end_inset
18457
18458 ) should perhaps be used.
18459 \end_layout
18460
18461 \begin_layout Enumerate
18462
18463 \size small
18464 Could not find argument for command.
18465 \end_layout
18466
18467 \begin_layout Enumerate
18468
18469 \size small
18470 No match found for 
18471 \begin_inset Quotes eld
18472 \end_inset
18473
18474
18475 \family typewriter
18476 %s
18477 \family default
18478
18479 \begin_inset Quotes erd
18480 \end_inset
18481
18482 .
18483 \end_layout
18484
18485 \begin_layout Enumerate
18486
18487 \size small
18488 Math mode still on at end of LaTeX file.
18489 \end_layout
18490
18491 \begin_layout Enumerate
18492
18493 \size small
18494 Number of 
18495 \begin_inset Quotes eld
18496 \end_inset
18497
18498
18499 \family typewriter
18500 char
18501 \family default
18502
18503 \begin_inset Quotes erd
18504 \end_inset
18505
18506  doesn't match the number of 
18507 \begin_inset Quotes eld
18508 \end_inset
18509
18510
18511 \family typewriter
18512 char
18513 \family default
18514
18515 \begin_inset Quotes erd
18516 \end_inset
18517
18518 .
18519 \end_layout
18520
18521 \begin_layout Enumerate
18522
18523 \size small
18524 You should use either 
18525 \family typewriter
18526
18527 \begin_inset Quotes eld
18528 \end_inset
18529
18530
18531 \family default
18532  or 
18533 \family typewriter
18534
18535 \begin_inset Quotes erd
18536 \end_inset
18537
18538
18539 \family default
18540  as an alternative to 
18541 \begin_inset Quotes eld
18542 \end_inset
18543
18544
18545 \family typewriter
18546 "
18547 \family default
18548
18549 \begin_inset Quotes erd
18550 \end_inset
18551
18552 .
18553 \end_layout
18554
18555 \begin_layout Enumerate
18556
18557 \size small
18558 You should use "
18559 \family typewriter
18560 '
18561 \family default
18562 " (ASCII 39) instead of "
18563 \family typewriter
18564 ´
18565 \family default
18566 " (ASCII 180).
18567 \end_layout
18568
18569 \begin_layout Enumerate
18570
18571 \size small
18572 User-specified pattern found.
18573 \end_layout
18574
18575 \begin_layout Enumerate
18576
18577 \size small
18578 This command might not be intended.
18579 \end_layout
18580
18581 \begin_layout Enumerate
18582
18583 \size small
18584 \emph on
18585 Comment displayed.
18586 \end_layout
18587
18588 \begin_layout Enumerate
18589
18590 \size small
18591 Either 
18592 \family typewriter
18593 ''
18594 \backslash
18595 ,'
18596 \family default
18597  or 
18598 \family typewriter
18599 '
18600 \backslash
18601 ,''
18602 \family default
18603  will look better.
18604 \end_layout
18605
18606 \begin_layout Enumerate
18607
18608 \size small
18609 Delete this space to maintain correct page references.
18610 \end_layout
18611
18612 \begin_layout Enumerate
18613
18614 \size small
18615 \emph on
18616 You might wish to put this between a pair of 
18617 \begin_inset Quotes eld
18618 \end_inset
18619
18620
18621 \family typewriter
18622 {}
18623 \family default
18624
18625 \begin_inset Quotes erd
18626 \end_inset
18627
18628 .
18629 \end_layout
18630
18631 \begin_layout Enumerate
18632
18633 \size small
18634 You ought to remove spaces in front of punctuation.
18635 \end_layout
18636
18637 \begin_layout Enumerate
18638
18639 \size small
18640 Could not execute LaTeX command.
18641 \end_layout
18642
18643 \begin_layout Enumerate
18644
18645 \size small
18646 Don't use 
18647 \family typewriter
18648
18649 \backslash
18650 /
18651 \family default
18652  in front of small punctuation.
18653 \end_layout
18654
18655 \begin_layout Enumerate
18656
18657 \family typewriter
18658 \size small
18659 $
18660 \backslash
18661 times$
18662 \family default
18663  may look prettier here.
18664 \end_layout
18665
18666 \begin_layout Enumerate
18667
18668 \size small
18669 \emph on
18670 Multiple spaces detected in output.
18671 \end_layout
18672
18673 \begin_layout Enumerate
18674
18675 \size small
18676 This text may be ignored.
18677 \end_layout
18678
18679 \begin_layout Enumerate
18680
18681 \size small
18682 Use 
18683 \family typewriter
18684
18685 \begin_inset Quotes eld
18686 \end_inset
18687
18688
18689 \family default
18690  to begin quotation, not 
18691 \family typewriter
18692 '
18693 \family default
18694 .
18695 \end_layout
18696
18697 \begin_layout Enumerate
18698
18699 \size small
18700 Use 
18701 \family typewriter
18702 '
18703 \family default
18704  to end quotation, not 
18705 \family typewriter
18706
18707 \begin_inset Quotes eld
18708 \end_inset
18709
18710
18711 \family default
18712 .
18713 \end_layout
18714
18715 \begin_layout Enumerate
18716
18717 \size small
18718 Don't mix quotes.
18719 \end_layout
18720
18721 \begin_layout Enumerate
18722
18723 \size small
18724 You should perhaps use 
18725 \begin_inset Quotes eld
18726 \end_inset
18727
18728
18729 \family typewriter
18730 cmd
18731 \family default
18732
18733 \begin_inset Quotes erd
18734 \end_inset
18735
18736  instead.
18737 \end_layout
18738
18739 \begin_layout Enumerate
18740
18741 \size small
18742 You should put a space in front of/after parenthesis.
18743 \end_layout
18744
18745 \begin_layout Enumerate
18746
18747 \size small
18748 You should avoid spaces in front of/after parenthesis.
18749 \end_layout
18750
18751 \begin_layout Enumerate
18752
18753 \size small
18754 \emph on
18755 You should not use punctuation in front of/after quotes.
18756 \end_layout
18757
18758 \begin_layout Enumerate
18759
18760 \size small
18761 Double space found.
18762 \end_layout
18763
18764 \begin_layout Enumerate
18765
18766 \size small
18767 You should put punctuation outside inner/inside display math mode.
18768 \end_layout
18769
18770 \begin_layout Enumerate
18771
18772 \size small
18773 You ought to not use primitive TeX in LaTeX code.
18774 \end_layout
18775
18776 \begin_layout Enumerate
18777
18778 \size small
18779 You should remove spaces in front of 
18780 \begin_inset Quotes eld
18781 \end_inset
18782
18783
18784 \family typewriter
18785 %s
18786 \family default
18787
18788 \begin_inset Quotes erd
18789 \end_inset
18790
18791
18792 \end_layout
18793
18794 \begin_layout Enumerate
18795
18796 \size small
18797 \begin_inset Quotes eld
18798 \end_inset
18799
18800
18801 \family typewriter
18802 %s
18803 \family default
18804
18805 \begin_inset Quotes erd
18806 \end_inset
18807
18808  is normally not followed by 
18809 \begin_inset Quotes eld
18810 \end_inset
18811
18812
18813 \family typewriter
18814 %c
18815 \family default
18816
18817 \begin_inset Quotes erd
18818 \end_inset
18819
18820 .
18821 \end_layout
18822
18823 \begin_layout Standard
18824 In later versions of LyX, we hope to provide a more complete interface to
18825  this tool (and it's smaller cousin 
18826 \family typewriter
18827 lacheck
18828 \family default
18829 ) to exploit the full power of it.
18830  But it's not exactly useless as it is now: go try it on one of your existing
18831  documents of a certain length and be surprised.
18832 \end_layout
18833
18834 \begin_layout Section
18835 Version Control in LyX
18836 \end_layout
18837
18838 \begin_layout Standard
18839 by
18840 \noun on
18841  Lars Gullik Bjønnes 
18842 \noun default
18843 and 
18844 \noun on
18845 Pavel Sanda
18846 \end_layout
18847
18848 \begin_layout Subsection
18849 Introduction
18850 \end_layout
18851
18852 \begin_layout Standard
18853 LyX supports some of the most basic RCS/CVS/SVN/GIT commands.
18854  If you need something a bit more sophisticated you will have to do that
18855  manually in a terminal.
18856 \end_layout
18857
18858 \begin_layout Standard
18859 Also note that CVS support is not as good as subversion support so we advise
18860  using SVN instead.
18861  A good place to start learning Subversion is SVN Book
18862 \begin_inset Foot
18863 status open
18864
18865 \begin_layout Plain Layout
18866 \begin_inset CommandInset href
18867 LatexCommand href
18868 target "http://svnbook.red-bean.com/"
18869
18870 \end_inset
18871
18872
18873 \end_layout
18874
18875 \end_inset
18876
18877 .
18878  In the case of RCS you should read 
18879 \begin_inset Quotes eld
18880 \end_inset
18881
18882 rcsintro
18883 \begin_inset Quotes erd
18884 \end_inset
18885
18886  (a man file, read it with 
18887 \family typewriter
18888 man rcsintro
18889 \family default
18890 ).
18891  This file describes all the basic features of RCS.
18892  You should especially notice the comment about a RCS directory, and the
18893  notion of a master RCS file (the file ending in 
18894 \family typewriter
18895 ,v
18896 \family default
18897 ).
18898 \end_layout
18899
18900 \begin_layout Standard
18901 Before you begin to use the version control features in LyX, you should
18902  be familiar with RCS/CVS/SVN/GIT usage.
18903  The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18904  package — no guarantees are made for older versions.
18905  Most of the log messages are not currently displayed after operations —
18906  you can check them in the Messages pane if unsure.
18907  Regular users of version control will appreciate VC toolbar, which can
18908  be enabled via 
18909 \family sans
18910 View\SpecialChar \menuseparator
18911 Toolbars\SpecialChar \menuseparator
18912 Version
18913 \begin_inset space ~
18914 \end_inset
18915
18916 Control
18917 \family default
18918 .
18919 \end_layout
18920
18921 \begin_layout Standard
18922 For introducing your own external commands consult vc-command in the manual
18923  of LyX functions.
18924 \end_layout
18925
18926 \begin_layout Subsection
18927 RCS commands in LyX
18928 \end_layout
18929
18930 \begin_layout Standard
18931 The following sections describe the RCS commands supported by LyX.
18932  You can find them in the 
18933 \family sans
18934 File\SpecialChar \menuseparator
18935 Version
18936 \begin_inset space ~
18937 \end_inset
18938
18939 Control
18940 \family default
18941  submenu.
18942  LyX was tested against RCS 5.7/5.8
18943 \begin_inset Foot
18944 status open
18945
18946 \begin_layout Plain Layout
18947 Note that old DOS / MS Windows builds (5.7) need to setup environment variables
18948  in order to work properly with LyX.
18949  In particular time zone (TZ) should be set and more importantly RCSINIT
18950  in order to change default archive location ("SET RCSINIT=-x,v/") --- LyX
18951  expects archive to be found in file.lyx,v within the original document directory.
18952  See also README shipped with Windows RCS binaries.
18953 \end_layout
18954
18955 \end_inset
18956
18957 .
18958 \end_layout
18959
18960 \begin_layout Subsubsection
18961
18962 \family sans
18963 Register
18964 \end_layout
18965
18966 \begin_layout Standard
18967 If your document is not under revision control, this is the only item shown
18968  in the menu.
18969  And if it is under revision control, the 
18970 \family sans
18971 Register
18972 \family default
18973  item is not visible.
18974  
18975 \end_layout
18976
18977 \begin_layout Standard
18978 This command registers your document with RCS (unless you are under the
18979  directory managed by CVS)\SpecialChar \@.
18980  You are asked interactively to supply an initial
18981  description of the document.
18982  The document is now set in Read-Only mode and you have to 
18983 \family sans
18984 Check
18985 \begin_inset space ~
18986 \end_inset
18987
18988 Out
18989 \begin_inset space ~
18990 \end_inset
18991
18992 For
18993 \begin_inset space ~
18994 \end_inset
18995
18996 Edit
18997 \family default
18998 , before making any changes to it.
18999  A document under revision control has a 
19000 \begin_inset Quotes eld
19001 \end_inset
19002
19003 [RCS:<version> <locker>]
19004 \begin_inset Quotes erd
19005 \end_inset
19006
19007  item tagged to the filename in the minibuffer.
19008 \end_layout
19009
19010 \begin_layout Standard
19011 RCS command that is run: 
19012 \family typewriter
19013 ci -q -u -i -t-"<initial description>" <file-name>
19014 \end_layout
19015
19016 \begin_layout Standard
19017 Read 
19018 \family typewriter
19019 man ci
19020 \family default
19021  to understand the switches.
19022  
19023 \end_layout
19024
19025 \begin_layout Subsubsection
19026
19027 \family sans
19028 Check In Changes
19029 \end_layout
19030
19031 \begin_layout Standard
19032 When you are finished editing a file, you check in your changes.
19033  When you do this, you are asked for a description of the changes.
19034  This is stored in the history log.
19035  The version number is bumped, your changes are applied to the master RCS
19036  file, the document is unlocked and set to Read-Only mode.
19037 \end_layout
19038
19039 \begin_layout Standard
19040 RCS command: 
19041 \family typewriter
19042 ci -q -u -m"<description>" <file-name>
19043 \end_layout
19044
19045 \begin_layout Subsubsection
19046
19047 \family sans
19048 Check Out For Edit
19049 \end_layout
19050
19051 \begin_layout Standard
19052 By doing this you lock the document so that only you can edit it.
19053  This will also make the document Read-Write only for you.
19054  You will usually continue editing for a while and when you are finished
19055  you check in your changes.
19056  The status line is changed to reflect that you have locked the file.
19057 \end_layout
19058
19059 \begin_layout Standard
19060 RCS command: 
19061 \family typewriter
19062 co -q -l <file-name>
19063 \end_layout
19064
19065 \begin_layout Subsubsection
19066
19067 \family sans
19068 Revert To Repository Version
19069 \end_layout
19070
19071 \begin_layout Standard
19072 This will discard all changes made to the document since the last check
19073  in.
19074  You get a warning before changes are discarded.
19075 \end_layout
19076
19077 \begin_layout Standard
19078 RCS command: 
19079 \family typewriter
19080 co -f -u<version> <file-name>
19081 \end_layout
19082
19083 \begin_layout Subsubsection
19084
19085 \family sans
19086 Copy
19087 \end_layout
19088
19089 \begin_layout Standard
19090 This will create a copy of the current document.
19091  Since RCS does not support copy operations natively, the version history
19092  is not preserved, and the copy is added as a new file.
19093  It requires a clean document without any changes since the last checkin.
19094  You are asked for a file name and a description of the copy operation.
19095  After that the copy is created, both locally and in the repository.
19096  If the parent directories of the copied and original document differ, all
19097  relative paths of included files of the copy are adjusted (like in 
19098 \family sans
19099 File\SpecialChar \menuseparator
19100 Save As
19101 \family default
19102 \SpecialChar \ldots{}
19103 ).
19104  Finally, the copy is loaded instead of the original document.
19105 \end_layout
19106
19107 \begin_layout Labeling
19108 \labelwidthstring 00.00.0000
19109 RCS
19110 \begin_inset space ~
19111 \end_inset
19112
19113 commands: 
19114 \begin_inset space ~
19115 \end_inset
19116
19117
19118 \begin_inset Newline newline
19119 \end_inset
19120
19121 Copy 
19122 \begin_inset Flex Code
19123 status collapsed
19124
19125 \begin_layout Plain Layout
19126
19127 \family typewriter
19128 \begin_inset Quotes eld
19129 \end_inset
19130
19131 <file-name>
19132 \begin_inset Quotes erd
19133 \end_inset
19134
19135
19136 \end_layout
19137
19138 \end_inset
19139
19140  to 
19141 \begin_inset Flex Code
19142 status collapsed
19143
19144 \begin_layout Plain Layout
19145
19146 \family typewriter
19147 \begin_inset Quotes eld
19148 \end_inset
19149
19150 <new-file-name>
19151 \begin_inset Quotes erd
19152 \end_inset
19153
19154
19155 \end_layout
19156
19157 \end_inset
19158
19159
19160 \begin_inset Newline newline
19161 \end_inset
19162
19163
19164 \begin_inset Flex Code
19165 status collapsed
19166
19167 \begin_layout Plain Layout
19168 ci -q -u 
19169 \family typewriter
19170 -i 
19171 \begin_inset Quotes eld
19172 \end_inset
19173
19174 <new-file-name>
19175 \begin_inset Quotes erd
19176 \end_inset
19177
19178
19179 \end_layout
19180
19181 \end_inset
19182
19183
19184 \end_layout
19185
19186 \begin_layout Subsubsection
19187
19188 \family sans
19189 Undo Last Checkin
19190 \end_layout
19191
19192 \begin_layout Standard
19193 This makes as if the last check in never happened.
19194  No changes are made to the document loaded into LyX, but the last version
19195  is removed from the master RCS file.
19196 \end_layout
19197
19198 \begin_layout Standard
19199 RCS command: 
19200 \family typewriter
19201 rcs -o<version> <file-name>
19202 \end_layout
19203
19204 \begin_layout Subsubsection
19205
19206 \family sans
19207 Show History
19208 \end_layout
19209
19210 \begin_layout Standard
19211 This shows the complete history of the RCS document.
19212  The output of 
19213 \family typewriter
19214 rlog <file-name>
19215 \family default
19216  is shown in a browser.
19217  See 
19218 \family typewriter
19219 man rlog
19220 \family default
19221  for more info.
19222 \end_layout
19223
19224 \begin_layout Subsubsection
19225 Revision info
19226 \end_layout
19227
19228 \begin_layout Standard
19229 LyX supports RCS version number, author name, date and time of last commit.
19230  All those are extracted from 
19231 \family typewriter
19232 rlog -r <file-name>
19233 \family default
19234 .
19235  See 
19236 \begin_inset CommandInset ref
19237 LatexCommand ref
19238 reference "sub:VCS-Revision-Information"
19239
19240 \end_inset
19241
19242  for details.
19243 \end_layout
19244
19245 \begin_layout Subsection
19246 CVS commands in LyX
19247 \end_layout
19248
19249 \begin_layout Standard
19250 A subset of CVS operations is supported by LyX.
19251  You can find the commands in the 
19252 \family sans
19253 File\SpecialChar \menuseparator
19254 Version
19255 \begin_inset space ~
19256 \end_inset
19257
19258 Control
19259 \family default
19260  submenu.
19261  The version control system SVN is more powerful, so please use it instead
19262  of CVS if possible.
19263 \end_layout
19264
19265 \begin_layout Subsubsection
19266
19267 \family sans
19268 General CVS usage
19269 \end_layout
19270
19271 \begin_layout Standard
19272 If you start from scratch with CVS you have to create your repository and
19273  checkout the working copy with external tools.
19274  If you're using a client-server setup you may need to login before doing
19275  the first repository checkout.
19276 \end_layout
19277
19278 \begin_layout Standard
19279 If your documents are under revision control and others are using the same
19280  repository problems arise when different changes to the same document at
19281  the same location happen.
19282  Standard CVS repositories don't operate with a file locking mechanism.
19283  This may be surprising, but conflicts only occur if people disagree on
19284  the proper content of the same part of a document.
19285  So, if co-workers are used to communicate regularly, these conflicts occur
19286  rarely.
19287  If they don't communicate they have a fundamental problem anyway.
19288  Nevertheless some people like to work with so called 
19289 \begin_inset Quotes eld
19290 \end_inset
19291
19292 reserved checkouts
19293 \begin_inset Quotes erd
19294 \end_inset
19295
19296 .
19297  If they do so the working copy of all files is readonly when checked out
19298  first and the user starts editing after using a special command to make
19299  the working copy writable.
19300  When the changes are checked in the working copy returns to readonly state.
19301  With LyX one has to edit the 
19302 \begin_inset Flex Code
19303 status collapsed
19304
19305 \begin_layout Plain Layout
19306 .cvsrc
19307 \end_layout
19308
19309 \end_inset
19310
19311  file and add the line 
19312 \begin_inset Flex Code
19313 status collapsed
19314
19315 \begin_layout Plain Layout
19316 cvs -r
19317 \end_layout
19318
19319 \end_inset
19320
19321  to work with reserved checkouts.
19322  The benefit is the possibility to see who is using a writable copy of some
19323  document.
19324  It's not guaranteed only one user makes a copy writable.
19325 \end_layout
19326
19327 \begin_layout Standard
19328 LyX tries to guess if you're using reserved or non-reserved checkouts.
19329  If your working copy is readonly or it is writable and an additional copy
19330  of your document exists in the CVS/Base sub-directory a reserved otherwise
19331  a non-reserved checkout is assumed.
19332  When a reserved checkout is detected you have to use 
19333 \begin_inset Flex MenuItem
19334 status collapsed
19335
19336 \begin_layout Plain Layout
19337 Check Out
19338 \end_layout
19339
19340 \end_inset
19341
19342  to make your working copy writable if it's readonly.
19343  After doing so the 
19344 \begin_inset Flex MenuItem
19345 status collapsed
19346
19347 \begin_layout Plain Layout
19348 Check In
19349 \end_layout
19350
19351 \end_inset
19352
19353  operation is possible and that makes your working copy readonly again after
19354  transferring your changes to the repository.
19355 \end_layout
19356
19357 \begin_layout Standard
19358 More information about CVS can be found here 
19359 \begin_inset Flex URL
19360 status collapsed
19361
19362 \begin_layout Plain Layout
19363
19364 http://www.nongnu.org/cvs
19365 \end_layout
19366
19367 \end_inset
19368
19369  and here 
19370 \begin_inset Flex URL
19371 status collapsed
19372
19373 \begin_layout Plain Layout
19374
19375 http://ximbiot.com/cvs
19376 \end_layout
19377
19378 \end_inset
19379
19380 .
19381 \end_layout
19382
19383 \begin_layout Standard
19384 Read 
19385 \family typewriter
19386 man cvs
19387 \family default
19388  to understand the sub-commands and the switches mentioned below.
19389 \end_layout
19390
19391 \begin_layout Subsubsection
19392
19393 \family sans
19394 Register
19395 \end_layout
19396
19397 \begin_layout Standard
19398 If your document is not under revision control, this is the only item shown
19399  in the menu.
19400  And if it is under revision control, the 
19401 \family sans
19402 \bar under
19403 R
19404 \bar default
19405 egister
19406 \family default
19407  item is not visible.
19408  
19409 \end_layout
19410
19411 \begin_layout Standard
19412 This command registers in CVS your document 
19413 \begin_inset Flex Strong
19414 status collapsed
19415
19416 \begin_layout Plain Layout
19417
19418 \emph on
19419 only
19420 \end_layout
19421
19422 \end_inset
19423
19424  in the case you have already the documents directory under CVS control
19425  (in particular 
19426 \family typewriter
19427 CVS/Entries
19428 \family default
19429  file exists).
19430  This means you have to create or checkout the archive by yourself using
19431  external tools.
19432  (In case you forget that step LyX registers the document with RCS.)
19433 \end_layout
19434
19435 \begin_layout Standard
19436 Then you are asked interactively to supply an initial description of the
19437  document.
19438  Don't forget that registered file is not yet checked in.
19439 \end_layout
19440
19441 \begin_layout Standard
19442 CVS command that is run: 
19443 \family typewriter
19444 cvs -q add -m"<entered message>" "<file-name>"
19445 \end_layout
19446
19447 \begin_layout Standard
19448 The term 
19449 \family typewriter
19450 "<file-name>"
19451 \family default
19452  above and for all other CVS commands is an abbreviation for 
19453 \begin_inset Quotes eld
19454 \end_inset
19455
19456 change the current working directory to file location and use the file name
19457  without path component as argument
19458 \begin_inset Quotes erd
19459 \end_inset
19460
19461 .
19462 \end_layout
19463
19464 \begin_layout Subsubsection
19465
19466 \family sans
19467 Check In Changes
19468 \end_layout
19469
19470 \begin_layout Standard
19471 When you are finished editing a file, you commit your changes.
19472  When you do this and you had changed the document, you are asked for a
19473  description of the changes.
19474  After that changes are written to the repository.
19475  In case you didn't change the document and a reserved checkout is detected
19476  the reservation made on 
19477 \begin_inset Flex MenuItem
19478 status collapsed
19479
19480 \begin_layout Plain Layout
19481 Check Out
19482 \end_layout
19483
19484 \end_inset
19485
19486  is undone.
19487 \end_layout
19488
19489 \begin_layout Labeling
19490 \labelwidthstring 00.00.0000
19491 CVS
19492 \begin_inset space ~
19493 \end_inset
19494
19495 command: 
19496 \begin_inset space ~
19497 \end_inset
19498
19499
19500 \begin_inset Newline newline
19501 \end_inset
19502
19503
19504 \begin_inset Flex Code
19505 status collapsed
19506
19507 \begin_layout Plain Layout
19508 cvs 
19509 \family typewriter
19510 -q commit -m"<description>" "<file-name>"
19511 \end_layout
19512
19513 \end_inset
19514
19515  or
19516 \begin_inset Newline newline
19517 \end_inset
19518
19519
19520 \begin_inset Flex Code
19521 status collapsed
19522
19523 \begin_layout Plain Layout
19524 cvs -q unedit 
19525 \family typewriter
19526 "<file-name>"
19527 \end_layout
19528
19529 \end_inset
19530
19531
19532 \end_layout
19533
19534 \begin_layout Subsubsection
19535
19536 \family sans
19537 Check Out Changes
19538 \end_layout
19539
19540 \begin_layout Standard
19541 When you are sharing a repository with others, you may have to incorporate
19542  their changes into your working copy.
19543 \end_layout
19544
19545 \begin_layout Standard
19546 CVS command: 
19547 \family typewriter
19548 cvs -q update "<file-name>"
19549 \end_layout
19550
19551 \begin_layout Standard
19552 If a readonly checkout is detected the working copy is made writable and
19553  reserved.
19554 \end_layout
19555
19556 \begin_layout Standard
19557 CVS command: 
19558 \family typewriter
19559 cvs -q edit "<file-name>"
19560 \end_layout
19561
19562 \begin_layout Subsubsection
19563
19564 \family sans
19565 Revert To Repository Version
19566 \end_layout
19567
19568 \begin_layout Standard
19569 This will discard all changes made to the document since the last check
19570  in.
19571  You get a warning before changes are discarded.
19572  Firstly the file is deleted, secondly CVS update command is run.
19573 \end_layout
19574
19575 \begin_layout Standard
19576 CVS command: 
19577 \family typewriter
19578 cvs -q update "<file-name>"
19579 \end_layout
19580
19581 \begin_layout Standard
19582 If a reserved checkout is detected and the working copy has no changes only
19583  the reservation is undone.
19584 \end_layout
19585
19586 \begin_layout Standard
19587 CVS command: 
19588 \family typewriter
19589 cvs -q unedit "<file-name>"
19590 \end_layout
19591
19592 \begin_layout Subsubsection
19593
19594 \family sans
19595 Copy
19596 \end_layout
19597
19598 \begin_layout Standard
19599 This will create a copy of the current document.
19600  Since CVS does not support copy operations natively, the version history
19601  is not preserved, and the copy is added as a new file.
19602  It requires a clean document without any changes since the last checkin.
19603  You are asked for a file name and a description of the copy operation.
19604  After that the copy is created, both locally and in the repository.
19605  If the parent directories of the copied and original document differ, all
19606  relative paths of included files of the copy are adjusted (like in 
19607 \family sans
19608 File\SpecialChar \menuseparator
19609 Save As
19610 \family default
19611 \SpecialChar \ldots{}
19612 ).
19613  Finally, the copy is loaded instead of the original document.
19614 \end_layout
19615
19616 \begin_layout Labeling
19617 \labelwidthstring 00.00.0000
19618 CVS
19619 \begin_inset space ~
19620 \end_inset
19621
19622 commands: 
19623 \begin_inset space ~
19624 \end_inset
19625
19626
19627 \begin_inset Newline newline
19628 \end_inset
19629
19630 Copy 
19631 \begin_inset Flex Code
19632 status collapsed
19633
19634 \begin_layout Plain Layout
19635
19636 \family typewriter
19637 \begin_inset Quotes eld
19638 \end_inset
19639
19640 <file-name>
19641 \begin_inset Quotes erd
19642 \end_inset
19643
19644
19645 \end_layout
19646
19647 \end_inset
19648
19649  to 
19650 \begin_inset Flex Code
19651 status collapsed
19652
19653 \begin_layout Plain Layout
19654
19655 \family typewriter
19656 \begin_inset Quotes eld
19657 \end_inset
19658
19659 <new-file-name>
19660 \begin_inset Quotes erd
19661 \end_inset
19662
19663
19664 \end_layout
19665
19666 \end_inset
19667
19668
19669 \begin_inset Newline newline
19670 \end_inset
19671
19672
19673 \begin_inset Flex Code
19674 status collapsed
19675
19676 \begin_layout Plain Layout
19677 cvs -q add 
19678 \family typewriter
19679
19680 \begin_inset Quotes eld
19681 \end_inset
19682
19683 <new-file-name>
19684 \begin_inset Quotes erd
19685 \end_inset
19686
19687
19688 \end_layout
19689
19690 \end_inset
19691
19692
19693 \end_layout
19694
19695 \begin_layout Subsubsection
19696
19697 \family sans
19698 Rename
19699 \end_layout
19700
19701 \begin_layout Standard
19702 This will rename the current document.
19703  Since CVS does not support rename operations natively, the version history
19704  is not preserved, the renamed document is added as a new file, and the
19705  original document is deleted.
19706  It requires a clean document without any changes since the last checkin.
19707  You are asked for a file name and a description of the rename operation.
19708  After that the document is renamed, both locally and in the repository.
19709  If the parent directories of the new and old file names differ, all relative
19710  paths of included files are adjusted (like in 
19711 \family sans
19712 File\SpecialChar \menuseparator
19713 Save As
19714 \family default
19715 \SpecialChar \ldots{}
19716 ).
19717  Finally, the document is reloaded using the new name.
19718 \end_layout
19719
19720 \begin_layout Labeling
19721 \labelwidthstring 00.00.0000
19722 CVS
19723 \begin_inset space ~
19724 \end_inset
19725
19726 commands: 
19727 \begin_inset space ~
19728 \end_inset
19729
19730
19731 \begin_inset Newline newline
19732 \end_inset
19733
19734 Rename 
19735 \begin_inset Flex Code
19736 status collapsed
19737
19738 \begin_layout Plain Layout
19739
19740 \family typewriter
19741 \begin_inset Quotes eld
19742 \end_inset
19743
19744 <file-name>
19745 \begin_inset Quotes erd
19746 \end_inset
19747
19748
19749 \end_layout
19750
19751 \end_inset
19752
19753  to 
19754 \begin_inset Flex Code
19755 status collapsed
19756
19757 \begin_layout Plain Layout
19758
19759 \family typewriter
19760 \begin_inset Quotes eld
19761 \end_inset
19762
19763 <new-file-name>
19764 \begin_inset Quotes erd
19765 \end_inset
19766
19767
19768 \end_layout
19769
19770 \end_inset
19771
19772
19773 \begin_inset Newline newline
19774 \end_inset
19775
19776
19777 \begin_inset Flex Code
19778 status collapsed
19779
19780 \begin_layout Plain Layout
19781 cvs -q add 
19782 \family typewriter
19783
19784 \begin_inset Quotes eld
19785 \end_inset
19786
19787 <new-file-name>
19788 \begin_inset Quotes erd
19789 \end_inset
19790
19791
19792 \end_layout
19793
19794 \end_inset
19795
19796
19797 \begin_inset Newline newline
19798 \end_inset
19799
19800
19801 \begin_inset Flex Code
19802 status collapsed
19803
19804 \begin_layout Plain Layout
19805 cvs -q remove 
19806 \family typewriter
19807
19808 \begin_inset Quotes eld
19809 \end_inset
19810
19811 <file-name>
19812 \begin_inset Quotes erd
19813 \end_inset
19814
19815
19816 \end_layout
19817
19818 \end_inset
19819
19820
19821 \end_layout
19822
19823 \begin_layout Subsubsection
19824 Update of the local directory checkout from repository
19825 \end_layout
19826
19827 \begin_layout Standard
19828 Once your documents gets more complex, containing sub-documents and pictures,
19829  including external 
19830 \begin_inset Flex Code
19831 status collapsed
19832
19833 \begin_layout Plain Layout
19834 .tex
19835 \end_layout
19836
19837 \end_inset
19838
19839  files and so on using version control becomes more complicated.
19840  LyX supports updating the whole tree in which resides the document.
19841  This become especially useful once you cooperate with people which neither
19842  have detailed knowledge about CVS usage nor they have ambition to commit
19843  additional material to the repository.
19844  You have to organize the files structure so that all external files are
19845  in the same directory or subdirectories of the document.
19846  It's good practice anyway to store multipart documents in an extra directory.
19847 \end_layout
19848
19849 \begin_layout Standard
19850 The 
19851 \begin_inset Flex Code
19852 status collapsed
19853
19854 \begin_layout Plain Layout
19855 Update local directory from repository
19856 \end_layout
19857
19858 \end_inset
19859
19860  command updates the whole directory.
19861  If local changes are detected user is warned before update starts.
19862  In case of merge conflicts both versions of the conflicting document parts
19863  are placed in the final document.
19864  You have to review and correct the result of the merge.
19865  You'll find the conflicts enclosed in pairs of 
19866 \begin_inset Flex Code
19867 status collapsed
19868
19869 \begin_layout Plain Layout
19870 <<<<<<<
19871 \end_layout
19872
19873 \end_inset
19874
19875  and 
19876 \begin_inset Flex Code
19877 status collapsed
19878
19879 \begin_layout Plain Layout
19880 >>>>>>>
19881 \end_layout
19882
19883 \end_inset
19884
19885  separated by 
19886 \begin_inset Flex Code
19887 status collapsed
19888
19889 \begin_layout Plain Layout
19890 =======
19891 \end_layout
19892
19893 \end_inset
19894
19895 .
19896  The first part is your version as before the update operation with the
19897  document name prepended.
19898  The second one is the repository version with the version number after
19899  the sequence of 
19900 \begin_inset Flex Code
19901 status collapsed
19902
19903 \begin_layout Plain Layout
19904 >
19905 \end_layout
19906
19907 \end_inset
19908
19909  signs.
19910 \end_layout
19911
19912 \begin_layout Labeling
19913 \labelwidthstring 00.00.0000
19914 CVS
19915 \begin_inset space ~
19916 \end_inset
19917
19918 commands: 
19919 \begin_inset space ~
19920 \end_inset
19921
19922
19923 \begin_inset Newline newline
19924 \end_inset
19925
19926
19927 \begin_inset Flex Code
19928 status collapsed
19929
19930 \begin_layout Plain Layout
19931 cd $path; cvs diff 
19932 \family typewriter
19933 "."
19934 \end_layout
19935
19936 \end_inset
19937
19938  (Ask if changes are detected.)
19939 \begin_inset Newline newline
19940 \end_inset
19941
19942
19943 \begin_inset Flex Code
19944 status collapsed
19945
19946 \begin_layout Plain Layout
19947 cd $path; cvs -q update 
19948 \family typewriter
19949 "."
19950 \end_layout
19951
19952 \end_inset
19953
19954
19955 \end_layout
19956
19957 \begin_layout Standard
19958 where 
19959 \begin_inset Flex Code
19960 status collapsed
19961
19962 \begin_layout Plain Layout
19963 $path
19964 \end_layout
19965
19966 \end_inset
19967
19968  stands for the path to the document.
19969 \end_layout
19970
19971 \begin_layout Subsubsection
19972
19973 \family sans
19974 Show History
19975 \end_layout
19976
19977 \begin_layout Standard
19978 This shows the complete history of the CVS document.
19979  The output of 
19980 \family typewriter
19981 cvs log "<file-name>"
19982 \family default
19983  is shown in a browser.
19984 \end_layout
19985
19986 \begin_layout Subsubsection
19987 Revision info
19988 \end_layout
19989
19990 \begin_layout Standard
19991 LyX supports CVS version number, author name, date and time of last commit.
19992  All those are extracted from 
19993 \family typewriter
19994 cvs log -r <file-name>
19995 \family default
19996 .
19997  See 
19998 \begin_inset CommandInset ref
19999 LatexCommand ref
20000 reference "sub:VCS-Revision-Information"
20001
20002 \end_inset
20003
20004  for details.
20005 \end_layout
20006
20007 \begin_layout Subsection
20008 SVN commands in LyX
20009 \end_layout
20010
20011 \begin_layout Standard
20012 SVN is now partially supported by LyX.
20013  You can find the commands in the 
20014 \family sans
20015 File\SpecialChar \menuseparator
20016 Version
20017 \begin_inset space ~
20018 \end_inset
20019
20020 Control
20021 \family default
20022  submenu.
20023  Please note that if you use password protected access to repository via
20024  ssh, you will be asked in terminal window.
20025  LyX was tested against SVN 1.5 and 1.6
20026 \begin_inset Foot
20027 status open
20028
20029 \begin_layout Plain Layout
20030 Most of the commands will work with 1.4 too, see 
20031 \begin_inset CommandInset ref
20032 LatexCommand ref
20033 reference "sub:SVN-Repo-Update"
20034
20035 \end_inset
20036
20037 .
20038 \end_layout
20039
20040 \end_inset
20041
20042
20043 \end_layout
20044
20045 \begin_layout Subsubsection
20046
20047 \family sans
20048 Register
20049 \end_layout
20050
20051 \begin_layout Standard
20052 If your document is not under revision control, this is the only item shown
20053  in the menu.
20054  And if it is under revision control, the 
20055 \family sans
20056 \bar under
20057 R
20058 \bar default
20059 egister
20060 \family default
20061  item is not visible.
20062 \end_layout
20063
20064 \begin_layout Standard
20065 This command registers in SVN your document ONLY in case you have already
20066  the documents directory under SVN control (in particular 
20067 \family typewriter
20068 .svn/entries
20069 \family default
20070  file exists).
20071  This means you have to checkout the archive by yourself.
20072 \end_layout
20073
20074 \begin_layout Standard
20075 Then you are asked interactively to supply an initial description of the
20076  document.
20077  Don't forget that registered file is not yet commited.
20078 \end_layout
20079
20080 \begin_layout Standard
20081 SVN command that is run: 
20082 \family typewriter
20083 svn add -q 
20084 \begin_inset Quotes eld
20085 \end_inset
20086
20087 <file-name>
20088 \begin_inset Quotes erd
20089 \end_inset
20090
20091
20092 \end_layout
20093
20094 \begin_layout Standard
20095 Read 
20096 \family typewriter
20097 man svn
20098 \family default
20099  to understand the switches.
20100 \end_layout
20101
20102 \begin_layout Subsubsection
20103
20104 \family sans
20105 Check In Changes
20106 \end_layout
20107
20108 \begin_layout Standard
20109 When you are finished editing a file, you commit your changes.
20110  When you do this, you are asked for a description of the changes.
20111  After that changes are commited.
20112 \end_layout
20113
20114 \begin_layout Standard
20115 SVN command:
20116 \begin_inset Foot
20117 status collapsed
20118
20119 \begin_layout Plain Layout
20120 In case locking is not enabled.
20121  See Section 
20122 \begin_inset CommandInset ref
20123 LatexCommand ref
20124 reference "subsec:SVN-File-Locking"
20125
20126 \end_inset
20127
20128 .
20129 \end_layout
20130
20131 \end_inset
20132
20133  
20134 \family typewriter
20135 svn commit -q -m"<description>" <file-name>
20136 \end_layout
20137
20138 \begin_layout Subsubsection
20139
20140 \family sans
20141 Check Out For Edit
20142 \end_layout
20143
20144 \begin_layout Standard
20145 Updates the changes of this file from the repository.
20146  Be sure you understand SVN merging and conflicts resolving before using
20147  this function, because all conflicts has to be resolved manually by you!
20148 \end_layout
20149
20150 \begin_layout Standard
20151 SVN command:
20152 \begin_inset Foot
20153 status collapsed
20154
20155 \begin_layout Plain Layout
20156 Ditto.
20157 \end_layout
20158
20159 \end_inset
20160
20161  
20162 \family typewriter
20163 svn update --non-interactive 
20164 \begin_inset Quotes eld
20165 \end_inset
20166
20167 <file-name>
20168 \begin_inset Quotes erd
20169 \end_inset
20170
20171
20172 \end_layout
20173
20174 \begin_layout Subsubsection
20175
20176 \family sans
20177 Revert To Repository Version
20178 \end_layout
20179
20180 \begin_layout Standard
20181 This will discard all changes made to the document since the last check
20182  in.
20183  You get a warning before changes are discarded.
20184 \end_layout
20185
20186 \begin_layout Standard
20187 SVN command: 
20188 \family typewriter
20189 svn revert -q 
20190 \begin_inset Quotes eld
20191 \end_inset
20192
20193 <file-name>
20194 \begin_inset Quotes erd
20195 \end_inset
20196
20197
20198 \end_layout
20199
20200 \begin_layout Subsubsection
20201
20202 \family sans
20203 Copy
20204 \end_layout
20205
20206 \begin_layout Standard
20207 This will create a copy of the current document including the version history.
20208  It requires a clean document without any changes since the last checkin.
20209  You are asked for a file name and a description of the copy operation.
20210  After that the copy is created, both locally and in the repository.
20211  If the parent directories of the copied and original document differ, all
20212  relative paths of included files of the copy are adjusted (like in 
20213 \family sans
20214 File\SpecialChar \menuseparator
20215 Save As
20216 \family default
20217 \SpecialChar \ldots{}
20218 ).
20219  Finally, the copy is loaded instead of the original document.
20220 \end_layout
20221
20222 \begin_layout Labeling
20223 \labelwidthstring 00.00.0000
20224 SVN
20225 \begin_inset space ~
20226 \end_inset
20227
20228 commands: 
20229 \begin_inset space ~
20230 \end_inset
20231
20232
20233 \begin_inset Newline newline
20234 \end_inset
20235
20236
20237 \begin_inset Flex Code
20238 status collapsed
20239
20240 \begin_layout Plain Layout
20241 svn copy -q 
20242 \family typewriter
20243
20244 \begin_inset Quotes eld
20245 \end_inset
20246
20247 <file-name>
20248 \begin_inset Quotes erd
20249 \end_inset
20250
20251  
20252 \begin_inset Quotes eld
20253 \end_inset
20254
20255 <new-file-name>
20256 \begin_inset Quotes erd
20257 \end_inset
20258
20259
20260 \end_layout
20261
20262 \end_inset
20263
20264
20265 \begin_inset Newline newline
20266 \end_inset
20267
20268
20269 \begin_inset Flex Code
20270 status collapsed
20271
20272 \begin_layout Plain Layout
20273 svn commit
20274 \end_layout
20275
20276 \end_inset
20277
20278
20279 \end_layout
20280
20281 \begin_layout Subsubsection
20282
20283 \family sans
20284 Rename
20285 \end_layout
20286
20287 \begin_layout Standard
20288 This will rename the current document including the version history.
20289  It requires a clean document without any changes since the last checkin.
20290  You are asked for a file name and a description of the rename operation.
20291  After that the document is renamed, both locally and in the repository.
20292  If the parent directories of the new and old file names differ, all relative
20293  paths of included files are adjusted (like in 
20294 \family sans
20295 File\SpecialChar \menuseparator
20296 Save As
20297 \family default
20298 \SpecialChar \ldots{}
20299 ).
20300  Finally, the document is reloaded using the new name.
20301 \end_layout
20302
20303 \begin_layout Labeling
20304 \labelwidthstring 00.00.0000
20305 SVN
20306 \begin_inset space ~
20307 \end_inset
20308
20309 commands: 
20310 \begin_inset space ~
20311 \end_inset
20312
20313
20314 \begin_inset Newline newline
20315 \end_inset
20316
20317
20318 \begin_inset Flex Code
20319 status collapsed
20320
20321 \begin_layout Plain Layout
20322 svn move -q 
20323 \family typewriter
20324
20325 \begin_inset Quotes eld
20326 \end_inset
20327
20328 <file-name>
20329 \begin_inset Quotes erd
20330 \end_inset
20331
20332  
20333 \begin_inset Quotes eld
20334 \end_inset
20335
20336 <new-file-name>
20337 \begin_inset Quotes erd
20338 \end_inset
20339
20340
20341 \end_layout
20342
20343 \end_inset
20344
20345
20346 \begin_inset Newline newline
20347 \end_inset
20348
20349
20350 \begin_inset Flex Code
20351 status collapsed
20352
20353 \begin_layout Plain Layout
20354 svn commit
20355 \end_layout
20356
20357 \end_inset
20358
20359
20360 \end_layout
20361
20362 \begin_layout Subsubsection
20363 \begin_inset CommandInset label
20364 LatexCommand label
20365 name "sub:SVN-Repo-Update"
20366
20367 \end_inset
20368
20369 Update of the local directory checkout from repository
20370 \begin_inset Foot
20371 status collapsed
20372
20373 \begin_layout Plain Layout
20374 Note that this command will work only with subversion 
20375 \begin_inset Formula $\geqq1.5$
20376 \end_inset
20377
20378
20379 \end_layout
20380
20381 \end_inset
20382
20383
20384 \end_layout
20385
20386 \begin_layout Standard
20387 All the commands above have one shortcomming - they deal with the current
20388  document only.
20389  Once your document contains pictures, includes external 
20390 \begin_inset Flex Code
20391 status collapsed
20392
20393 \begin_layout Plain Layout
20394 .tex
20395 \end_layout
20396
20397 \end_inset
20398
20399  files and so on administration becomes more complicated.
20400  LyX now supports updating the whole tree in which resides the document
20401 \begin_inset Foot
20402 status collapsed
20403
20404 \begin_layout Plain Layout
20405 One need to organize the files structure so that all external files are
20406  in the same directory or subdirectories of the document.
20407  
20408 \end_layout
20409
20410 \end_inset
20411
20412 .
20413  This become especially useful once you cooperate with people which neither
20414  know about subversion management nor they have ambition to commit additional
20415  material to the repository.
20416  
20417 \end_layout
20418
20419 \begin_layout Standard
20420 \begin_inset Flex Code
20421 status collapsed
20422
20423 \begin_layout Plain Layout
20424 Update local directory from repository
20425 \end_layout
20426
20427 \end_inset
20428
20429  command updates the whole directory and in case of merge conflicts local
20430  version of the files are left, so no unintended data loss occurs.
20431  If local changes are detected user is warned before update starts.
20432 \end_layout
20433
20434 \begin_layout Labeling
20435 \labelwidthstring 00.00.0000
20436 SVN
20437 \begin_inset space ~
20438 \end_inset
20439
20440 commands: 
20441 \begin_inset space ~
20442 \end_inset
20443
20444
20445 \begin_inset Newline newline
20446 \end_inset
20447
20448
20449 \begin_inset Flex Code
20450 status collapsed
20451
20452 \begin_layout Plain Layout
20453 svn diff $path
20454 \end_layout
20455
20456 \end_inset
20457
20458  (Ask if changes are detected.)
20459 \begin_inset Newline newline
20460 \end_inset
20461
20462
20463 \begin_inset Flex Code
20464 status collapsed
20465
20466 \begin_layout Plain Layout
20467 svn update --accept mine-full $path
20468 \end_layout
20469
20470 \end_inset
20471
20472
20473 \end_layout
20474
20475 \begin_layout Standard
20476 where 
20477 \begin_inset Flex Code
20478 status collapsed
20479
20480 \begin_layout Plain Layout
20481 $path
20482 \end_layout
20483
20484 \end_inset
20485
20486  stands for the path to the document.
20487 \end_layout
20488
20489 \begin_layout Subsubsection
20490
20491 \family sans
20492 Show History
20493 \end_layout
20494
20495 \begin_layout Standard
20496 This shows the complete history of the SVN document.
20497  The output of 
20498 \family typewriter
20499 svn log 
20500 \begin_inset Quotes eld
20501 \end_inset
20502
20503 <file-name>
20504 \begin_inset Quotes erd
20505 \end_inset
20506
20507
20508 \family default
20509  is shown in a browser.
20510 \end_layout
20511
20512 \begin_layout Subsubsection
20513 File Locking
20514 \begin_inset CommandInset label
20515 LatexCommand label
20516 name "subsec:SVN-File-Locking"
20517
20518 \end_inset
20519
20520
20521 \end_layout
20522
20523 \begin_layout Standard
20524 The file exchange through various revision control systems brings the problem
20525  of merge conflicts in case two different users try to edit the same (parts
20526  of) document.
20527  When such a conflict happens it needs manual resolving and one reasonable
20528  alternative is to provide some kind of locking mechanism, which guarantees
20529  that only one user is allowed to edit file at the given time.
20530 \end_layout
20531
20532 \begin_layout Standard
20533 SVN has two such mechanisms to provide mutual exclusivity for file access
20534  - locks and automatic setting of write permissions (see sec.
20535  
20536 \begin_inset CommandInset ref
20537 LatexCommand ref
20538 reference "subsec:Automatical-Locking-Property"
20539
20540 \end_inset
20541
20542 ) based on 
20543 \begin_inset Flex Code
20544 status collapsed
20545
20546 \begin_layout Plain Layout
20547 svn:needs-lock
20548 \end_layout
20549
20550 \end_inset
20551
20552  file svn property
20553 \begin_inset Foot
20554 status open
20555
20556 \begin_layout Plain Layout
20557 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20558 \end_layout
20559
20560 \end_inset
20561
20562 .
20563  If this property is detected for a given document LyX starts to use SVN
20564  locks for document editing automatically and the whole check-in/out mechanism
20565  switches to the same regimen as for RCS.
20566  This in particular means there are two different modes of file use in LyX:
20567 \end_layout
20568
20569 \begin_layout Itemize
20570 Unlocked state.
20571  The loaded file is in the read-only mode.
20572  For editing on needs to check-out.
20573  
20574 \emph on
20575 Check-out
20576 \emph default
20577  consists of updating from the repository and gaining write lock.
20578  If the lock is not possible to obtain, we remain in unlocked state.
20579 \end_layout
20580
20581 \begin_layout Itemize
20582 Locked state.
20583  The loaded file is in the 'normal' edit mode.
20584  No other user is allowed to edit the file.
20585  
20586 \emph on
20587 Check-in
20588 \emph default
20589  consists of commiting changes and releasing write-lock.
20590  If no changes have been made to the document, no commit will be produced
20591 \begin_inset Foot
20592 status collapsed
20593
20594 \begin_layout Plain Layout
20595 Don't be puzzled by the fact that you will be asked for commit message anyway.
20596 \end_layout
20597
20598 \end_inset
20599
20600  and only the write-lock will be released.
20601 \end_layout
20602
20603 \begin_layout Standard
20604 SVN commands:
20605 \end_layout
20606
20607 \begin_layout Labeling
20608 \labelwidthstring 00.00.0000
20609 Check-in:
20610 \family typewriter
20611  svn commit -q -m"<description>" "<file-name>"
20612 \begin_inset Newline newline
20613 \end_inset
20614
20615 svn unlock "<file-name>"
20616 \end_layout
20617
20618 \begin_layout Labeling
20619 \labelwidthstring 00.00.0000
20620 Check-out: 
20621 \family typewriter
20622 svn update "<file-name>"
20623 \begin_inset Newline newline
20624 \end_inset
20625
20626 svn lock "<file-name>"
20627 \end_layout
20628
20629 \begin_layout Subsubsection
20630
20631 \family typewriter
20632 \begin_inset CommandInset label
20633 LatexCommand label
20634 name "subsec:Automatical-Locking-Property"
20635
20636 \end_inset
20637
20638
20639 \family default
20640 Automatic Locking Property
20641 \end_layout
20642
20643 \begin_layout Standard
20644 The above mentioned automatic setting of write permissions of the .lyx file
20645  can be set through
20646 \family sans
20647 \bar under
20648  F
20649 \bar default
20650 ile\SpecialChar \menuseparator
20651
20652 \bar under
20653 V
20654 \bar default
20655 ersion
20656 \begin_inset space ~
20657 \end_inset
20658
20659 Control\SpecialChar \menuseparator
20660
20661 \bar under
20662 T
20663 \bar default
20664 oggle locking property
20665 \family default
20666 .
20667  This command is active only when the file is not locked on the svn server
20668  (i.e.
20669  you need to check-out before proceeding).
20670 \end_layout
20671
20672 \begin_layout Labeling
20673 \labelwidthstring 00.00.0000
20674 SVN
20675 \begin_inset space ~
20676 \end_inset
20677
20678 commands:
20679 \end_layout
20680
20681 \begin_layout Labeling
20682 \labelwidthstring 00.00.0000
20683 Set:
20684 \family typewriter
20685  svn propset svn:needs-lock ON "<file-name>"
20686 \end_layout
20687
20688 \begin_layout Labeling
20689 \labelwidthstring 00.00.0000
20690 Unset: 
20691 \family typewriter
20692 svn propdel svn:needs-lock "<file-name>"
20693 \end_layout
20694
20695 \begin_layout Subsubsection
20696 \begin_inset CommandInset label
20697 LatexCommand label
20698 name "sub:VCS-Revision-Information"
20699
20700 \end_inset
20701
20702 Revision Information in Documents
20703 \end_layout
20704
20705 \begin_layout Standard
20706 There are more possibilities how to activate revision information in our
20707  document.
20708 \end_layout
20709
20710 \begin_layout Itemize
20711 LyX supports directly:
20712 \end_layout
20713
20714 \begin_deeper
20715 \begin_layout Itemize
20716 tree revision information (
20717 \begin_inset Flex Code
20718 status collapsed
20719
20720 \begin_layout Plain Layout
20721 vcs-tree-revision
20722 \end_layout
20723
20724 \end_inset
20725
20726 ).
20727  The result is the output of the 
20728 \begin_inset Flex Code
20729 status collapsed
20730
20731 \begin_layout Plain Layout
20732 svnversion
20733 \end_layout
20734
20735 \end_inset
20736
20737  command, the following table gives you an idea, how to read the results.
20738 \end_layout
20739
20740 \begin_layout Standard
20741 \align center
20742 \begin_inset Tabular
20743 <lyxtabular version="3" rows="6" columns="2">
20744 <features rotate="0" tabularvalignment="middle">
20745 <column alignment="center" valignment="top">
20746 <column alignment="center" valignment="top">
20747 <row>
20748 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20749 \begin_inset Text
20750
20751 \begin_layout Plain Layout
20752 Output
20753 \end_layout
20754
20755 \end_inset
20756 </cell>
20757 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20758 \begin_inset Text
20759
20760 \begin_layout Plain Layout
20761 Meaning
20762 \end_layout
20763
20764 \end_inset
20765 </cell>
20766 </row>
20767 <row>
20768 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20769 \begin_inset Text
20770
20771 \begin_layout Plain Layout
20772 4123:4168
20773 \end_layout
20774
20775 \end_inset
20776 </cell>
20777 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20778 \begin_inset Text
20779
20780 \begin_layout Plain Layout
20781 mixed revision working copy
20782 \end_layout
20783
20784 \end_inset
20785 </cell>
20786 </row>
20787 <row>
20788 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20789 \begin_inset Text
20790
20791 \begin_layout Plain Layout
20792 4168M
20793 \end_layout
20794
20795 \end_inset
20796 </cell>
20797 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20798 \begin_inset Text
20799
20800 \begin_layout Plain Layout
20801 modified working copy
20802 \end_layout
20803
20804 \end_inset
20805 </cell>
20806 </row>
20807 <row>
20808 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20809 \begin_inset Text
20810
20811 \begin_layout Plain Layout
20812 4123S
20813 \end_layout
20814
20815 \end_inset
20816 </cell>
20817 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20818 \begin_inset Text
20819
20820 \begin_layout Plain Layout
20821 switched working copy
20822 \end_layout
20823
20824 \end_inset
20825 </cell>
20826 </row>
20827 <row>
20828 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20829 \begin_inset Text
20830
20831 \begin_layout Plain Layout
20832 4123P
20833 \end_layout
20834
20835 \end_inset
20836 </cell>
20837 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20838 \begin_inset Text
20839
20840 \begin_layout Plain Layout
20841 partial working copy, from a sparse checkout
20842 \end_layout
20843
20844 \end_inset
20845 </cell>
20846 </row>
20847 <row>
20848 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20849 \begin_inset Text
20850
20851 \begin_layout Plain Layout
20852 4123:4168MS
20853 \end_layout
20854
20855 \end_inset
20856 </cell>
20857 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20858 \begin_inset Text
20859
20860 \begin_layout Plain Layout
20861 mixed revision, modified, switched working copy
20862 \end_layout
20863
20864 \end_inset
20865 </cell>
20866 </row>
20867 </lyxtabular>
20868
20869 \end_inset
20870
20871
20872 \end_layout
20873
20874 \begin_layout Itemize
20875 file revision information.
20876  The result comes from parsing the output of 
20877 \begin_inset Flex Code
20878 status collapsed
20879
20880 \begin_layout Plain Layout
20881 svn
20882 \begin_inset space ~
20883 \end_inset
20884
20885 info
20886 \begin_inset space ~
20887 \end_inset
20888
20889 --xml
20890 \begin_inset space ~
20891 \end_inset
20892
20893 file.lyx
20894 \end_layout
20895
20896 \end_inset
20897
20898 .
20899  Supported flags are:
20900 \end_layout
20901
20902 \begin_deeper
20903 \begin_layout Itemize
20904 version number of the last commit (
20905 \begin_inset Flex Code
20906 status collapsed
20907
20908 \begin_layout Plain Layout
20909 vcs-revision
20910 \end_layout
20911
20912 \end_inset
20913
20914 )
20915 \end_layout
20916
20917 \begin_layout Itemize
20918 author of the last commit (
20919 \begin_inset Flex Code
20920 status collapsed
20921
20922 \begin_layout Plain Layout
20923 vcs-author
20924 \end_layout
20925
20926 \end_inset
20927
20928 )
20929 \end_layout
20930
20931 \begin_layout Itemize
20932 date of the last commit (
20933 \begin_inset Flex Code
20934 status collapsed
20935
20936 \begin_layout Plain Layout
20937 vcs-date
20938 \end_layout
20939
20940 \end_inset
20941
20942 )
20943 \end_layout
20944
20945 \begin_layout Itemize
20946 time of the last commit (
20947 \begin_inset Flex Code
20948 status collapsed
20949
20950 \begin_layout Plain Layout
20951 vcs-time
20952 \end_layout
20953
20954 \end_inset
20955
20956 )
20957 \end_layout
20958
20959 \end_deeper
20960 \begin_layout Standard
20961 You can obtain this info via InsetInfo (e.g.
20962  
20963 \begin_inset Flex Code
20964 status collapsed
20965
20966 \begin_layout Plain Layout
20967 info-insert buffer vcs-date
20968 \end_layout
20969
20970 \end_inset
20971
20972 ).
20973  The information will be available only when you have the file stored under
20974  svn managment (i.e.
20975  the 
20976 \begin_inset Flex Code
20977 status collapsed
20978
20979 \begin_layout Plain Layout
20980 .svn
20981 \end_layout
20982
20983 \end_inset
20984
20985  directory is available with your document).
20986 \end_layout
20987
20988 \end_deeper
20989 \begin_layout Itemize
20990 Another---a hacking one---possibility is to use svn keywords
20991 \begin_inset Foot
20992 status collapsed
20993
20994 \begin_layout Plain Layout
20995 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20996 \end_layout
20997
20998 \end_inset
20999
21000 .
21001  In short -- you set file keywords property (e.g.
21002  
21003 \family sans
21004 svn propset svn:keywords 'Rev' file.lyx
21005 \family default
21006 ) and then paste keyword TeX code
21007 \begin_inset Foot
21008 status collapsed
21009
21010 \begin_layout Plain Layout
21011 This is an easy way how to ensure that LyX won't break the line in the middle
21012  of keyword tag.
21013 \end_layout
21014
21015 \end_inset
21016
21017  tag in your document (e.g.
21018  
21019 \begin_inset ERT
21020 status open
21021
21022 \begin_layout Plain Layout
21023
21024 $Rev$
21025 \end_layout
21026
21027 \end_inset
21028
21029 ).
21030  This way svn client will automatically substitute revision number (e.g.
21031  
21032 \begin_inset ERT
21033 status open
21034
21035 \begin_layout Plain Layout
21036
21037 $Rev: 59 $
21038 \end_layout
21039
21040 \end_inset
21041
21042 ) after each update and commit.
21043  There are more problems with this approach.
21044  Firstly, the '$' character is used in TeX world for math equations, so
21045  any occurence of math formula 
21046 \begin_inset Formula $Rev$
21047 \end_inset
21048
21049  become 
21050 \begin_inset Formula $Rev:59$
21051 \end_inset
21052
21053  in your LyX document.
21054  Similarly for other keywords like Id, Date, Author, etc.
21055  Secondly svn output is dependent on your locales, so its very easy that
21056  svn would produce some problematic strings once Date is used.
21057  Thirdly you get the whole 'Rev: 59' string in your document instead of
21058  the plain number.
21059  Until subversion implements user's custom keywords it will be hard to use
21060  this approach reliably or let LyX to support it directly.
21061 \end_layout
21062
21063 \begin_layout Subsection
21064 SVN and Windows Environment
21065 \end_layout
21066
21067 \begin_layout Quote
21068 My inclination is to say that if the user cannot figure out the command
21069  line operations on their own fairly quickly, they would be well advised
21070  to use TortoiseSVN.
21071  ---P.
21072  A.
21073  Rubin
21074 \end_layout
21075
21076 \begin_layout Subsubsection
21077 Preparation
21078 \end_layout
21079
21080 \begin_layout Standard
21081 In addition to installing LyX, and having access to a Subversion repository,
21082  the user will need to install the Subversion client program.
21083  A Windows installer for the client program is available from 
21084 \begin_inset CommandInset href
21085 LatexCommand href
21086 name "CollabNet"
21087 target "http://www.collab.net/nonav/downloads/subversion/"
21088
21089 \end_inset
21090
21091 .
21092  The user may also want to install 
21093 \begin_inset CommandInset href
21094 LatexCommand href
21095 name "TortoiseSVN"
21096 target "http://tortoisesvn.tigris.org/"
21097
21098 \end_inset
21099
21100 , which integrates Subversion operations into the context (rightclick) menu
21101  of Windows Explorer.
21102  Operations done outside LyX will typically be more convenient using the
21103  Explorer context menu.
21104  Note that TortoiseSVN is not a replacement for the client program, which
21105  is what LyX itself will use.
21106 \end_layout
21107
21108 \begin_layout Subsubsection
21109 Bringing a document under Subversion control
21110 \end_layout
21111
21112 \begin_layout Standard
21113 Before a LyX document can be brought under version control in Subversion,
21114  its parent directory needs to be under version control.
21115  If the document is being added to a project already in the repository,
21116  this is accomplished by checking the project out to the directory where
21117  the new document will be placed.
21118  If the project itself is not yet under version control (for instance, if
21119  this document starts a new project), the directory must be imported into
21120  the repository.
21121  This is done outside LyX.
21122  Both import and checkout are easily accomplished from the Explorer context
21123  menu using TortoiseSVN, or alternatively can be done using the command
21124  line client at a DOS prompt.
21125  The procedure for importing the project using TortoiseSVN is described
21126  below, assuming an existing repository and a new project being started
21127  in 
21128 \family typewriter
21129 C:
21130 \backslash
21131 new project
21132 \family default
21133 .
21134  For information on using the Subversion client program, run 
21135 \family typewriter
21136 svn --help 
21137 \family default
21138 in a DOS shell.
21139 \end_layout
21140
21141 \begin_layout Enumerate
21142 Locate 
21143 \family typewriter
21144 C:
21145 \backslash
21146 new project 
21147 \family default
21148 in Windows Explorer, right click it, and select 
21149 \family sans
21150 TortoiseSVN\SpecialChar \menuseparator
21151 Repo-browser
21152 \family default
21153 .
21154  If necessary, adjust the URL for the repository, then click OK.
21155 \end_layout
21156
21157 \begin_layout Enumerate
21158 Right click the level of the repository under which you want to place the
21159  new project folder (typically the top level) and click 
21160 \family sans
21161 Create folder
21162 \family default
21163  Supply a name for the project folder and click OK.
21164  Add a message for the log file if desired, then click OK again.
21165  The new project folder should appear in the repository.
21166  Finally, click OK again to exit the repository browser.
21167 \end_layout
21168
21169 \begin_layout Enumerate
21170 Once again right click 
21171 \family typewriter
21172 C:
21173 \backslash
21174 new project
21175 \family default
21176 , this time selecting SVN Checkout\SpecialChar \ldots{}
21177  Select the URL of the project folder
21178  you just created in the repository, and set the checkout directory to 
21179 \family typewriter
21180 C:
21181 \backslash
21182 new project.
21183
21184 \family default
21185  Click OK.
21186  You will be warned about a non-empty folder; click OK to proceed.
21187  You should now have a 
21188 \family typewriter
21189 .svn
21190 \family default
21191  directory under 
21192 \family typewriter
21193 C:
21194 \backslash
21195 new project.
21196 \end_layout
21197
21198 \begin_layout Enumerate
21199 Create or open your document in LyX and click 
21200 \family sans
21201 File\SpecialChar \menuseparator
21202 Version
21203 \begin_inset space ~
21204 \end_inset
21205
21206 Control\SpecialChar \menuseparator
21207 Register.
21208  
21209 \family default
21210 Add a log message and click OK to commit the document to version control.
21211 \end_layout
21212
21213 \begin_layout Standard
21214 From this point onward, you should have full functionality in the 
21215 \family sans
21216 File\SpecialChar \menuseparator
21217 Version
21218 \begin_inset space ~
21219 \end_inset
21220
21221 Control
21222 \family default
21223  menu.
21224  You also have the option of checking the document in and out, viewing its
21225  history, etc.
21226  using the TortoiseSVN context menu in Windows Explorer or the Subversion
21227  client program from a command prompt.
21228 \end_layout
21229
21230 \begin_layout Subsubsection
21231 SSH tunnel used with SVN under Windows
21232 \end_layout
21233
21234 \begin_layout Standard
21235 Compared with Linux setting up an svn client to communicate over ssh under
21236  Windows is a rather troublesome task.
21237  We will at least offer some hints how to setup the client side but prior
21238  knowledge about ssh and the Windows command line is needed, also be prepared
21239  for a great deal of frustration\SpecialChar \ldots{}
21240
21241 \end_layout
21242
21243 \begin_layout Enumerate
21244 Get an svn client for windows, as described in the previous sections.
21245  When it is a fresh install run some svn command (e.g.
21246  
21247 \begin_inset Flex Code
21248 status collapsed
21249
21250 \begin_layout Plain Layout
21251 svn --version
21252 \end_layout
21253
21254 \end_inset
21255
21256 ) to create config files, which you will need to change later on.
21257 \end_layout
21258
21259 \begin_layout Enumerate
21260 Choose an ssh client for Windows.
21261  There are several possibilities, we will use the one from Putty tools
21262 \begin_inset Foot
21263 status collapsed
21264
21265 \begin_layout Plain Layout
21266 \begin_inset Flex URL
21267 status collapsed
21268
21269 \begin_layout Plain Layout
21270
21271 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21272 \end_layout
21273
21274 \end_inset
21275
21276
21277 \end_layout
21278
21279 \end_inset
21280
21281 .
21282  You will need to set the connection up so that the client doesn't ask for
21283  any password from you.
21284  To keep things easy we will use only keys without any additional password
21285  protection etc.
21286 \end_layout
21287
21288 \begin_deeper
21289 \begin_layout Enumerate
21290 Generate keys by 
21291 \begin_inset Flex Code
21292 status collapsed
21293
21294 \begin_layout Plain Layout
21295 puttygen
21296 \end_layout
21297
21298 \end_inset
21299
21300 .
21301  Save your private .ppk key file and put the public one on the server side.
21302  If the SVN server runs on Linux, note that the format of the public key
21303  is not compatible with Linux openssh and you will need to direcly copy-paste
21304  the key from the “
21305 \emph on
21306 Public key for pasting into OpenSSH authorized_keys file
21307 \emph default
21308 :” edit field into the server's 
21309 \begin_inset Flex Code
21310 status collapsed
21311
21312 \begin_layout Plain Layout
21313 ~/.ssh/authorized_keys
21314 \end_layout
21315
21316 \end_inset
21317
21318  / 
21319 \begin_inset Flex Code
21320 status collapsed
21321
21322 \begin_layout Plain Layout
21323 authorized_keys2
21324 \end_layout
21325
21326 \end_inset
21327
21328  file.
21329 \end_layout
21330
21331 \begin_layout Enumerate
21332 Get the Putty's 
21333 \begin_inset Flex Code
21334 status collapsed
21335
21336 \begin_layout Plain Layout
21337 plink
21338 \end_layout
21339
21340 \end_inset
21341
21342 .
21343  In the SVN config file
21344 \begin_inset Foot
21345 status collapsed
21346
21347 \begin_layout Plain Layout
21348 Exact path depends on Windows version, usually somewhere around 
21349 \begin_inset Flex Code
21350 status collapsed
21351
21352 \begin_layout Plain Layout
21353 c:
21354 \backslash
21355 Documents and Settings
21356 \backslash
21357 user
21358 \backslash
21359 Application Data
21360 \backslash
21361 Subversion
21362 \backslash
21363 config
21364 \end_layout
21365
21366 \end_inset
21367
21368  / 
21369 \begin_inset Flex Code
21370 status collapsed
21371
21372 \begin_layout Plain Layout
21373 AppData
21374 \backslash
21375 Roaming
21376 \backslash
21377 Subversion
21378 \end_layout
21379
21380 \end_inset
21381
21382 .
21383 \end_layout
21384
21385 \end_inset
21386
21387 , section [tunnels], setup ssh command, e.g.
21388  
21389 \begin_inset Flex Code
21390 status collapsed
21391
21392 \begin_layout Plain Layout
21393 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21394 \end_layout
21395
21396 \end_inset
21397
21398 .
21399 \begin_inset Foot
21400 status collapsed
21401
21402 \begin_layout Plain Layout
21403 It will usually take a lot of time to get exact command right and it depends
21404  on many things.
21405  For example do not have some remote server saved as a default session in
21406  Putty etc.
21407  If things fail, try to connect via plink without SVN first.
21408 \end_layout
21409
21410 \end_inset
21411
21412
21413 \end_layout
21414
21415 \end_deeper
21416 \begin_layout Enumerate
21417 Checkout the SVN archive, e.
21418 \begin_inset space \thinspace{}
21419 \end_inset
21420
21421 g.
21422 \begin_inset Newline newline
21423 \end_inset
21424
21425
21426 \begin_inset Flex Code
21427 status collapsed
21428
21429 \begin_layout Plain Layout
21430 svn co svn+ssh://user@server/repository_path
21431 \end_layout
21432
21433 \end_inset
21434
21435 .
21436 \end_layout
21437
21438 \begin_layout Subsubsection
21439 End-of-Line Conversions
21440 \end_layout
21441
21442 \begin_layout Standard
21443 When the collaborators are mixing Linux and Windows environments, LyX will
21444  use different line endings inside the .lyx files.
21445  This is not a problem as far as LyX functionality is concerned, but the
21446  commit diffs will be huge and merge-conflicts prone.
21447  Fortunately SVN itself knows
21448 \begin_inset Foot
21449 status collapsed
21450
21451 \begin_layout Plain Layout
21452 \begin_inset Flex URL
21453 status collapsed
21454
21455 \begin_layout Plain Layout
21456
21457 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21458 \end_layout
21459
21460 \end_inset
21461
21462
21463 \end_layout
21464
21465 \end_inset
21466
21467  how to deal with CR/LF problems when switching .lyx files to the 
21468 \begin_inset Flex Code
21469 status collapsed
21470
21471 \begin_layout Plain Layout
21472 native
21473 \end_layout
21474
21475 \end_inset
21476
21477  mode.
21478 \begin_inset Foot
21479 status collapsed
21480
21481 \begin_layout Plain Layout
21482 For the lazy guys: 
21483 \begin_inset Flex Code
21484 status collapsed
21485
21486 \begin_layout Plain Layout
21487 svn propset svn:eol-style native FILE_NAME
21488 \end_layout
21489
21490 \end_inset
21491
21492
21493 \end_layout
21494
21495 \end_inset
21496
21497
21498 \end_layout
21499
21500 \begin_layout Subsection
21501 GIT commands in LyX
21502 \end_layout
21503
21504 \begin_layout Standard
21505 A minimal subset of GIT commands is now supported by LyX.
21506  You can find the commands in the 
21507 \family sans
21508 File\SpecialChar \menuseparator
21509 Version
21510 \begin_inset space ~
21511 \end_inset
21512
21513 Control
21514 \family default
21515  submenu.
21516  Please note that if you use password protected access to repository via
21517  ssh, you will be asked in terminal window.
21518  LyX was tested against GIT 1.7.
21519 \end_layout
21520
21521 \begin_layout Standard
21522 One big difference of GIT and the other supported version control systems
21523  is the distributed nature of GIT: With traditional version control systems
21524  there is one central server which hosts the repository.
21525  Users commit their changes to the server, and get updates made by other
21526  users from it.
21527  With GIT, users commit to a local repository.
21528  The local repository can be synchronized with one or more remote repositories
21529  using the 
21530 \begin_inset Flex Code
21531 status collapsed
21532
21533 \begin_layout Plain Layout
21534 pull
21535 \end_layout
21536
21537 \end_inset
21538
21539  and 
21540 \begin_inset Flex Code
21541 status collapsed
21542
21543 \begin_layout Plain Layout
21544 push
21545 \end_layout
21546
21547 \end_inset
21548
21549  GIT commands.
21550  LyX does not interact in any way with remote GIT repositories.
21551  It works exclusively with the local repository in a very similar way as
21552  with a central CVS or SVN repository.
21553  If you use remote GIT repositories you need to do the 
21554 \begin_inset Flex Code
21555 status collapsed
21556
21557 \begin_layout Plain Layout
21558 pull
21559 \end_layout
21560
21561 \end_inset
21562
21563  and 
21564 \begin_inset Flex Code
21565 status collapsed
21566
21567 \begin_layout Plain Layout
21568 push
21569 \end_layout
21570
21571 \end_inset
21572
21573  operations with your favourite GIT client.
21574 \end_layout
21575
21576 \begin_layout Subsubsection
21577
21578 \family sans
21579 Register
21580 \end_layout
21581
21582 \begin_layout Standard
21583 If your document is not under revision control, this is the only item shown
21584  in the menu.
21585  And if it is under revision control, the 
21586 \family sans
21587 \bar under
21588 R
21589 \bar default
21590 egister
21591 \family default
21592  item is not visible.
21593 \end_layout
21594
21595 \begin_layout Standard
21596 This command registers in GIT your document ONLY in case you have already
21597  the documents directory under GIT control (in particular 
21598 \family typewriter
21599 .git/index
21600 \family default
21601  file exists).
21602  This means you have to checkout the archive by yourself.
21603 \end_layout
21604
21605 \begin_layout Standard
21606 Then you are asked interactively to supply an initial description of the
21607  document.
21608  Don't forget that registered file is not yet commited.
21609 \end_layout
21610
21611 \begin_layout Standard
21612 GIT command that is run: 
21613 \family typewriter
21614 git add 
21615 \begin_inset Quotes eld
21616 \end_inset
21617
21618 <file-name>
21619 \begin_inset Quotes erd
21620 \end_inset
21621
21622
21623 \end_layout
21624
21625 \begin_layout Standard
21626 Read 
21627 \family typewriter
21628 man git
21629 \family default
21630  to understand the switches.
21631 \end_layout
21632
21633 \begin_layout Subsubsection
21634
21635 \family sans
21636 Check In Changes
21637 \end_layout
21638
21639 \begin_layout Standard
21640 When you are finished editing a file, you commit your changes.
21641  When you do this, you are asked for a description of the changes.
21642  After that changes are commited.
21643 \end_layout
21644
21645 \begin_layout Standard
21646 GIT command: 
21647 \family typewriter
21648 git commit -q -m"<description>" <file-name>
21649 \end_layout
21650
21651 \begin_layout Subsubsection
21652
21653 \family sans
21654 Revert To Repository Version
21655 \end_layout
21656
21657 \begin_layout Standard
21658 This will discard all changes made to the document since the last check
21659  in.
21660  You get a warning before changes are discarded.
21661 \end_layout
21662
21663 \begin_layout Standard
21664 GIT command: 
21665 \family typewriter
21666 git checkout -q 
21667 \begin_inset Quotes eld
21668 \end_inset
21669
21670 <file-name>
21671 \begin_inset Quotes erd
21672 \end_inset
21673
21674
21675 \end_layout
21676
21677 \begin_layout Subsubsection
21678
21679 \family sans
21680 Rename
21681 \end_layout
21682
21683 \begin_layout Standard
21684 This will rename the current document including the version history.
21685  It requires a clean document without any changes since the last checkin.
21686  You are asked for a file name and a description of the rename operation.
21687  After that the document is renamed, both locally and in the repository.
21688  If the parent directories of the new and old file names differ, all relative
21689  paths of included files are adjusted (like in 
21690 \family sans
21691 File\SpecialChar \menuseparator
21692 Save As
21693 \family default
21694 \SpecialChar \ldots{}
21695 ).
21696  Finally, the document is reloaded using the new name.
21697 \end_layout
21698
21699 \begin_layout Labeling
21700 \labelwidthstring 00.00.0000
21701 GIT
21702 \begin_inset space ~
21703 \end_inset
21704
21705 commands: 
21706 \begin_inset space ~
21707 \end_inset
21708
21709
21710 \begin_inset Newline newline
21711 \end_inset
21712
21713
21714 \begin_inset Flex Code
21715 status collapsed
21716
21717 \begin_layout Plain Layout
21718 git mv 
21719 \family typewriter
21720
21721 \begin_inset Quotes eld
21722 \end_inset
21723
21724 <file-name>
21725 \begin_inset Quotes erd
21726 \end_inset
21727
21728  
21729 \begin_inset Quotes eld
21730 \end_inset
21731
21732 <new-file-name>
21733 \begin_inset Quotes erd
21734 \end_inset
21735
21736
21737 \end_layout
21738
21739 \end_inset
21740
21741
21742 \begin_inset Newline newline
21743 \end_inset
21744
21745
21746 \begin_inset Flex Code
21747 status collapsed
21748
21749 \begin_layout Plain Layout
21750 git commit
21751 \end_layout
21752
21753 \end_inset
21754
21755
21756 \end_layout
21757
21758 \begin_layout Subsubsection
21759
21760 \family sans
21761 Show History
21762 \end_layout
21763
21764 \begin_layout Standard
21765 This shows the complete history of the GIT document.
21766  The output of 
21767 \family typewriter
21768 git log 
21769 \begin_inset Quotes eld
21770 \end_inset
21771
21772 <file-name>
21773 \begin_inset Quotes erd
21774 \end_inset
21775
21776
21777 \family default
21778  is shown in a browser.
21779 \end_layout
21780
21781 \begin_layout Subsubsection
21782 Version Info
21783 \end_layout
21784
21785 \begin_layout Standard
21786 LyX supports GIT hash number of the last commit to the file, author name,
21787  date and time of last commit.
21788  All those are extracted from 
21789 \family typewriter
21790 git log -n 1 --pretty=format:%H%n%an%n%ai
21791 \family default
21792 .
21793  Tree version information is obtained via 
21794 \family typewriter
21795 git describe --abbrev --dirty --long
21796 \family default
21797 .
21798  See 
21799 \begin_inset CommandInset ref
21800 LatexCommand ref
21801 reference "sub:VCS-Revision-Information"
21802
21803 \end_inset
21804
21805  for other details.
21806 \end_layout
21807
21808 \begin_layout Subsection
21809 Further tuning
21810 \end_layout
21811
21812 \begin_layout Standard
21813 With the recent addition of the vc-command function LyX power users are
21814  allowed to create their own commands for revision control.
21815 \end_layout
21816
21817 \begin_layout Standard
21818 As an example you can see how two TortoiseSVN commands could be integrated
21819  directly:
21820 \end_layout
21821
21822 \begin_layout Description
21823 Commit: 
21824 \begin_inset Flex Code
21825 status collapsed
21826
21827 \begin_layout Plain Layout
21828 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21829 \end_layout
21830
21831 \end_inset
21832
21833
21834 \end_layout
21835
21836 \begin_layout Description
21837 Revert: 
21838 \begin_inset Flex Code
21839 status collapsed
21840
21841 \begin_layout Plain Layout
21842 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21843 \end_layout
21844
21845 \end_inset
21846
21847
21848 \end_layout
21849
21850 \begin_layout Subsection
21851 Version control and Document comparison
21852 \end_layout
21853
21854 \begin_layout Standard
21855 One of the typical uses of version control is to inspect the changes between
21856  revisions, usually by creating 
21857 \begin_inset Flex Code
21858 status collapsed
21859
21860 \begin_layout Plain Layout
21861 diff
21862 \end_layout
21863
21864 \end_inset
21865
21866  dumps.
21867  While this is useful for plain text files, it is much less useful in the
21868  case of LyX files, which have more a complicated structure.
21869  Hence we provide binding to the Document comparison feature.
21870  There are two ways of calling this feature - either by direct call of 
21871 \begin_inset Flex Code
21872 status collapsed
21873
21874 \begin_layout Plain Layout
21875 VC_COMPARE
21876 \end_layout
21877
21878 \end_inset
21879
21880  LyX function (for details see LyX functions manual) or by icon/menu item
21881  
21882 \begin_inset Flex MenuItem
21883 status collapsed
21884
21885 \begin_layout Plain Layout
21886 Compare with older revision...
21887 \end_layout
21888
21889 \end_inset
21890
21891 .
21892  One can either compare two chosen revisions of the document or he can simply
21893  compare the current version of edited text with older revisions (where
21894  '
21895 \begin_inset Flex MenuItem
21896 status collapsed
21897
21898 \begin_layout Plain Layout
21899 0
21900 \end_layout
21901
21902 \end_inset
21903
21904 ' revisions back means comparison of the edited file with last commited
21905  revision).
21906  
21907 \end_layout
21908
21909 \begin_layout Standard
21910 This feature is supported for SVN and RCS though due to the more complicated
21911  versioning scheme of RCS there is a constraint -- when addressing the revisions
21912  in dialog, numbers always point to the last number in RCS revision number,
21913  i.e.
21914  '35' in '1.2.35'.
21915  We don't currently support GIT addressing of revisions, one can just compare
21916  edited document with its revision X steps backs, where X is addressed as
21917  HEAD~X.
21918 \end_layout
21919
21920 \begin_layout Section
21921 Literate Programming
21922 \end_layout
21923
21924 \begin_layout Standard
21925 Updated by 
21926 \noun on
21927 Kayvan Sylvan 
21928 \noun default
21929 (kayvan@sylvan.com)
21930 \noun on
21931
21932 \noun default
21933 original documentation written by 
21934 \noun on
21935 Edmar Wienskoski Jr.
21936
21937 \noun default
21938  (edmar-w-jr@technologist.com)
21939 \end_layout
21940
21941 \begin_layout Subsection
21942 Introduction
21943 \end_layout
21944
21945 \begin_layout Standard
21946 The main purpose of this documentation is to show you how to use LyX for
21947  literate programming, where it is assumed that you are familiar with this
21948  programming technique, and know what 
21949 \begin_inset Quotes eld
21950 \end_inset
21951
21952 tangling
21953 \begin_inset Quotes erd
21954 \end_inset
21955
21956  and 
21957 \begin_inset Quotes eld
21958 \end_inset
21959
21960 weaving
21961 \begin_inset Quotes erd
21962 \end_inset
21963
21964  means.
21965  If that is not the case, please follow the web links provided in the following
21966  sections.
21967  There is a lot of good documentation out there covering old development
21968  history to the latest tools tips.
21969 \end_layout
21970
21971 \begin_layout Standard
21972 It is also assumed that you are familiar with LyX itself to a point that
21973  you are comfortable changing your LyX preferences, and X resources file.
21974  If that is not the case please refer to other LyX documentation to cover
21975  your specific needs.
21976 \end_layout
21977
21978 \begin_layout Subsection
21979 Literate Programming
21980 \end_layout
21981
21982 \begin_layout Standard
21983 From the Literate Programming FAQ: 
21984 \end_layout
21985
21986 \begin_layout Quotation
21987 Literate programming is the combination of documentation and source together
21988  in a fashion suited for reading by human beings.
21989  In fact, literate programs should be enjoyable reading, even inviting!
21990  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21991  and documentation in a single file.
21992  Literate programming tools then parse the file to produce either readable
21993  documentation or compilable source.
21994  The WEB style of literate programming was created by D.
21995 \begin_inset space \thinspace{}
21996 \end_inset
21997
21998 E.
21999  Knuth during the development of his TeX typesetting software.
22000  
22001 \end_layout
22002
22003 \begin_layout Standard
22004 Another excerpt says:
22005 \end_layout
22006
22007 \begin_layout Quotation
22008
22009 \emph on
22010 How is literate programming different from verbose commenting?
22011 \end_layout
22012
22013 \begin_layout Quotation
22014 There are three distinguishing characteristics.
22015  In order of importance, they are: 
22016 \end_layout
22017
22018 \begin_deeper
22019 \begin_layout Itemize
22020 flexible order of elaboration 
22021 \end_layout
22022
22023 \begin_layout Itemize
22024 automatic support for browsing 
22025 \end_layout
22026
22027 \begin_layout Itemize
22028 typeset documentation, especially diagrams and mathematics 
22029 \end_layout
22030
22031 \end_deeper
22032 \begin_layout Standard
22033 Now that I sparked your curiosity, take a look in the references.
22034 \end_layout
22035
22036 \begin_layout Subsubsection
22037 References
22038 \end_layout
22039
22040 \begin_layout Standard
22041 The complete Literate Programming FAQ can be found at:
22042 \end_layout
22043
22044 \begin_layout Quote
22045 Literate Programming FAQ 
22046 \begin_inset Flex URL
22047 status collapsed
22048
22049 \begin_layout Plain Layout
22050
22051 http://www.literateprogramming.com/lpfaq.pdf
22052 \end_layout
22053
22054 \end_inset
22055
22056
22057 \end_layout
22058
22059 \begin_layout Standard
22060 The FAQ lists 23 (twenty three!) different literate programming tools.
22061  Where some are specialized or 
22062 \begin_inset Quotes eld
22063 \end_inset
22064
22065 tailored
22066 \begin_inset Quotes erd
22067 \end_inset
22068
22069  for particular programming languages, while other have general scope.
22070  I selected 
22071 \noun on
22072 Noweb
22073 \noun default
22074  for my own use for several reasons:
22075 \end_layout
22076
22077 \begin_layout Itemize
22078 It can generate the documentation either in LaTeX or HTML.
22079 \end_layout
22080
22081 \begin_layout Itemize
22082 It has a open architecture, i.
22083 \begin_inset space \thinspace{}
22084 \end_inset
22085
22086 e.
22087 \begin_inset space \space{}
22088 \end_inset
22089
22090 it is easy to plug in new filters and to perform special processing that
22091  you may need.
22092  
22093 \end_layout
22094
22095 \begin_layout Itemize
22096 There is a good selection of filters available already (the HTML is one
22097  of them).
22098 \end_layout
22099
22100 \begin_layout Itemize
22101 It is free.
22102 \end_layout
22103
22104 \begin_layout Standard
22105 The Noweb web page can be found at: 
22106 \end_layout
22107
22108 \begin_layout Quote
22109 Noweb home page 
22110 \begin_inset Flex URL
22111 status collapsed
22112
22113 \begin_layout Plain Layout
22114
22115 http://www.cs.virginia.edu/~nr/noweb/
22116 \end_layout
22117
22118 \end_inset
22119
22120
22121 \end_layout
22122
22123 \begin_layout Standard
22124 Starting from there you can reach many other interesting links and even
22125  some literate program examples.
22126 \end_layout
22127
22128 \begin_layout Subsection
22129 LyX and Literate Programming with Noweb
22130 \end_layout
22131
22132 \begin_layout Standard
22133 The LyX support for Literate Programming is provided by using the generic
22134  LyX converters mechanism.
22135  This support is provided in a 
22136 \begin_inset Quotes eld
22137 \end_inset
22138
22139 Noweb independent
22140 \begin_inset Quotes erd
22141 \end_inset
22142
22143  way, i.
22144 \begin_inset space \thinspace{}
22145 \end_inset
22146
22147 e.
22148 \begin_inset space \space{}
22149 \end_inset
22150
22151 you will be able to use this new LyX feature with some other literate programmin
22152 g tool of your choice by just changing your LyX preferences.
22153 \end_layout
22154
22155 \begin_layout Subsubsection
22156 Generating documents and code (weaving and tangling)
22157 \end_layout
22158
22159 \begin_layout Paragraph
22160 Using the noweb module
22161 \end_layout
22162
22163 \begin_layout Standard
22164 If you have installed Noweb and LyX successfully, whenever you open a new
22165  document, after you have chosen its document class, use the Document->Settings
22166  menu to add the 
22167 \begin_inset Quotes eld
22168 \end_inset
22169
22170 noweb
22171 \begin_inset Quotes erd
22172 \end_inset
22173
22174  module.
22175  If Noweb is correctly installed, when you click on the 
22176 \begin_inset Quotes eld
22177 \end_inset
22178
22179 Modules
22180 \begin_inset Quotes erd
22181 \end_inset
22182
22183  link, you will see the 
22184 \begin_inset Quotes eld
22185 \end_inset
22186
22187 noweb
22188 \begin_inset Quotes erd
22189 \end_inset
22190
22191  module in the available list and you can add it to your document.
22192 \end_layout
22193
22194 \begin_layout Paragraph
22195 Typing code in
22196 \end_layout
22197
22198 \begin_layout Standard
22199 LyX enables you to write code with a layout named 
22200 \begin_inset Flex Noun
22201 status collapsed
22202
22203 \begin_layout Plain Layout
22204 Chunk
22205 \end_layout
22206
22207 \end_inset
22208
22209 .
22210  Noweb delimits chunks like this:
22211 \end_layout
22212
22213 \begin_layout LyX-Code
22214 <<My code>>=
22215 \end_layout
22216
22217 \begin_layout LyX-Code
22218   code
22219 \end_layout
22220
22221 \begin_layout LyX-Code
22222   more code
22223 \end_layout
22224
22225 \begin_layout LyX-Code
22226   even more code
22227 \end_layout
22228
22229 \begin_layout LyX-Code
22230   @
22231 \end_layout
22232
22233 \begin_layout Standard
22234 The problem is that whatever is written in between the << and the 
22235 \family typewriter
22236 @
22237 \family default
22238  must be taken literally, i.
22239 \begin_inset space \thinspace{}
22240 \end_inset
22241
22242 e.
22243 \begin_inset space \space{}
22244 \end_inset
22245
22246 LyX should be prevented from making any special interpretation of what has
22247  been written.
22248  This is also handled by 
22249 \begin_inset Flex Noun
22250 status collapsed
22251
22252 \begin_layout Plain Layout
22253 Chunk
22254 \end_layout
22255
22256 \end_inset
22257
22258 , that works like a normal paragraph but has a free spacing capability.
22259 \end_layout
22260
22261 \begin_layout Standard
22262 As a special note, you can also use the 
22263 \begin_inset Quotes eld
22264 \end_inset
22265
22266 %def
22267 \begin_inset Quotes erd
22268 \end_inset
22269
22270  construct of Noweb in your chunks to add items to Noweb's identifier cross-refe
22271 rence:
22272 \end_layout
22273
22274 \begin_layout LyX-Code
22275 <<My chunk>>=
22276 \end_layout
22277
22278 \begin_layout LyX-Code
22279 def some_function(args):
22280 \end_layout
22281
22282 \begin_layout LyX-Code
22283    "This is the doc string for this function."
22284 \end_layout
22285
22286 \begin_layout LyX-Code
22287    print "My args: ", args
22288 \end_layout
22289
22290 \begin_layout LyX-Code
22291 @ %def some_function
22292 \end_layout
22293
22294 \begin_layout Standard
22295 For an example of this usage and the resulting cross-reference output, look
22296  at the Literate python program in 
22297 \emph on
22298 LIBDIR/examples/listerrors.lyx
22299 \emph default
22300  which should make this all clear.
22301 \end_layout
22302
22303 \begin_layout Paragraph
22304 Generating the documentation
22305 \end_layout
22306
22307 \begin_layout Standard
22308 At this point you already have a new document file with a proper document
22309  class, and with some code and text on it.
22310  How do I print it? The answer is simple, you select 
22311 \family sans
22312 View\SpecialChar \menuseparator
22313 DVI,
22314 \family default
22315  etc.
22316  Just like you would do for a plain document.
22317  No special procedure is required.
22318 \end_layout
22319
22320 \begin_layout Standard
22321 To help orientate you, I will now explain what happens inside LyX:
22322 \end_layout
22323
22324 \begin_layout Enumerate
22325 When the 
22326 \family sans
22327 Update\SpecialChar \menuseparator
22328 DVI
22329 \family default
22330  menu option is chosen, a LaTeX file is generated.
22331  
22332 \end_layout
22333
22334 \begin_deeper
22335 \begin_layout Standard
22336 If the document is of any literate class the generated file will be named
22337  with an extension name defined by the 
22338 \begin_inset Quotes eld
22339 \end_inset
22340
22341 literate
22342 \begin_inset Quotes erd
22343 \end_inset
22344
22345  format (defined in the Preferences panel), otherwise the file will have
22346  the usual 
22347 \family typewriter
22348 .tex
22349 \family default
22350  extension.
22351 \end_layout
22352
22353 \end_deeper
22354 \begin_layout Enumerate
22355 Note that the only difference so far is in the name of the file, no special
22356  processing is required by LyX.
22357  Given that you formatted the code using the 
22358 \begin_inset Flex Noun
22359 status collapsed
22360
22361 \begin_layout Plain Layout
22362 Chunk
22363 \end_layout
22364
22365 \end_inset
22366
22367  layout that, by itself, takes care of the business.
22368 \end_layout
22369
22370 \begin_layout Enumerate
22371 If the document is of any literate class LyX will then use the internal
22372  LyX to Noweb converter, followed by the Noweb to LaTeX converter
22373 \begin_inset Foot
22374 status collapsed
22375
22376 \begin_layout Plain Layout
22377 The converters are defined in the 
22378 \family sans
22379 Tools\SpecialChar \menuseparator
22380 Preferences
22381 \family default
22382  panel, under the 
22383 \begin_inset Quotes eld
22384 \end_inset
22385
22386 Conversion
22387 \begin_inset Quotes erd
22388 \end_inset
22389
22390  tab.
22391  See section 
22392 \emph on
22393 Converters
22394 \emph default
22395  of the 
22396 \emph on
22397 Customization
22398 \emph default
22399  manual for general information about converters.
22400 \end_layout
22401
22402 \end_inset
22403
22404  to generate the LaTeX file.
22405 \end_layout
22406
22407 \begin_deeper
22408 \begin_layout Standard
22409 Otherwise it will just skip this step.
22410 \end_layout
22411
22412 \end_deeper
22413 \begin_layout Enumerate
22414 Finally, LaTeX is invoked and the regular post processing continues as in
22415  a plain document.
22416 \end_layout
22417
22418 \begin_layout Standard
22419 Independence from a particular 
22420 \begin_inset Quotes eld
22421 \end_inset
22422
22423 literate tool
22424 \begin_inset Quotes erd
22425 \end_inset
22426
22427  is easily achieved by changing the commands that are run by the various
22428  converters.
22429 \end_layout
22430
22431 \begin_layout Paragraph
22432 Generating the code
22433 \end_layout
22434
22435 \begin_layout Standard
22436 When the build menu option is chosen or the corresponding button in the
22437  toolbar is pressed, a LaTeX file is generated just like step 1 above.
22438  Next, LyX invokes the 
22439 \family typewriter
22440 Noweb->Program
22441 \family default
22442  converter.
22443  This converter needs to be defined by the user and is not installed by
22444  default, though the Program format is.
22445  This converter (like any other converter) will have two parts:
22446 \end_layout
22447
22448 \begin_layout Enumerate
22449 The converter program itself.
22450  This program performs the conversion from the one format to the other (in
22451  this case, from the Noweb format to the Program pseudo-format).
22452 \end_layout
22453
22454 \begin_layout Enumerate
22455 The error log parser.
22456  This is a program whose sole purpose is to rewrite error messages in a
22457  format that LyX understands.
22458  This makes it possible for LyX to place error boxes in the right places
22459  in the file buffer.
22460 \end_layout
22461
22462 \begin_layout Standard
22463 The first part, the 
22464 \begin_inset Quotes eld
22465 \end_inset
22466
22467 Converter
22468 \begin_inset Quotes erd
22469 \end_inset
22470
22471  setting, should be set to
22472 \begin_inset Newline newline
22473 \end_inset
22474
22475
22476 \begin_inset Quotes eld
22477 \end_inset
22478
22479
22480 \family typewriter
22481 build-script $$i
22482 \family default
22483  $$r
22484 \begin_inset Quotes erd
22485 \end_inset
22486
22487 .
22488 \begin_inset Newline newline
22489 \end_inset
22490
22491 This basically means that LyX will call 
22492 \begin_inset Quotes eld
22493 \end_inset
22494
22495 build-script
22496 \begin_inset Quotes erd
22497 \end_inset
22498
22499  (a program or script) with the name of the Noweb file (normally a file
22500  in the LyX temp directory) and the directory path of the original LyX file.
22501  
22502 \end_layout
22503
22504 \begin_layout Standard
22505 This is an implementation of 
22506 \begin_inset Quotes eld
22507 \end_inset
22508
22509 build-script
22510 \begin_inset Quotes erd
22511 \end_inset
22512
22513  that you can place in a directory on your path:
22514 \end_layout
22515
22516 \begin_layout Standard
22517 \begin_inset VSpace defskip
22518 \end_inset
22519
22520
22521 \end_layout
22522
22523 \begin_layout Standard
22524 \begin_inset Newpage pagebreak
22525 \end_inset
22526
22527
22528 \end_layout
22529
22530 \begin_layout Standard
22531
22532 \family sans
22533 #!/bin/sh
22534 \end_layout
22535
22536 \begin_layout Standard
22537
22538 \family sans
22539 #
22540 \end_layout
22541
22542 \begin_layout Standard
22543
22544 \family sans
22545 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
22546 \end_layout
22547
22548 \begin_layout Standard
22549 \begin_inset VSpace defskip
22550 \end_inset
22551
22552
22553 \end_layout
22554
22555 \begin_layout Standard
22556 The next part of the converter setting is the 
22557 \begin_inset Quotes eld
22558 \end_inset
22559
22560 Flags
22561 \begin_inset Quotes erd
22562 \end_inset
22563
22564  which is to be set to
22565 \begin_inset Newline newline
22566 \end_inset
22567
22568
22569 \begin_inset Quotes eld
22570 \end_inset
22571
22572
22573 \family typewriter
22574 parselog=$$s/scripts/listerrors
22575 \family default
22576
22577 \begin_inset Quotes erd
22578 \end_inset
22579
22580 .
22581 \begin_inset Newline newline
22582 \end_inset
22583
22584 This will run any errors that are generated by the 
22585 \begin_inset Quotes eld
22586 \end_inset
22587
22588 build-script
22589 \begin_inset Quotes erd
22590 \end_inset
22591
22592  process through the 
22593 \begin_inset Quotes eld
22594 \end_inset
22595
22596 listerrors
22597 \begin_inset Quotes erd
22598 \end_inset
22599
22600  program.
22601 \end_layout
22602
22603 \begin_layout Standard
22604 The build will normally take place in LyX's temporary directory, so the
22605  files produced by the conversion will be in that directory.
22606  LyX will copy out what it regards as the `main' file, but the 
22607 \family typewriter
22608 Noweb->Program
22609 \family default
22610  conversion may produce several files, and so most of these would then be
22611  deleted when LyX was closed.
22612  This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
22613  the build-script chunk can place the generated files in that location.
22614 \end_layout
22615
22616 \begin_layout Paragraph
22617 Build instructions in the document
22618 \end_layout
22619
22620 \begin_layout Standard
22621 The last piece of the integration between LyX and noweb is the 
22622 \begin_inset Quotes eld
22623 \end_inset
22624
22625 build-script
22626 \begin_inset Quotes erd
22627 \end_inset
22628
22629  chunk.
22630  Generally, the instructions for building your program should be embedded
22631  in a chunk of its own.
22632  The noweb-specific 
22633 \begin_inset Quotes eld
22634 \end_inset
22635
22636 build-script
22637 \begin_inset Quotes erd
22638 \end_inset
22639
22640  above uses the notangle command to look for this chunk (called 
22641 \begin_inset Quotes eld
22642 \end_inset
22643
22644 build-script
22645 \begin_inset Quotes erd
22646 \end_inset
22647
22648 ) and runs its contents through 
22649 \begin_inset Quotes eld
22650 \end_inset
22651
22652 sh
22653 \begin_inset Quotes erd
22654 \end_inset
22655
22656 .
22657 \end_layout
22658
22659 \begin_layout Standard
22660 Typically, such a chunk would look something like this:
22661 \end_layout
22662
22663 \begin_layout LyX-Code
22664 <<build-script>>=
22665 \end_layout
22666
22667 \begin_layout LyX-Code
22668 #!/bin/sh
22669 \begin_inset Newline newline
22670 \end_inset
22671
22672 if [ -z "${NOWEB_SOURCE}" ]
22673 \begin_inset Newline newline
22674 \end_inset
22675
22676 then
22677 \end_layout
22678
22679 \begin_layout LyX-Code
22680 NOWEB_SOURCE=myfile.nw
22681 \begin_inset Newline newline
22682 \end_inset
22683
22684 fi
22685 \begin_inset Newline newline
22686 \end_inset
22687
22688 [...
22689  code to extract files ...
22690  use NOWEB_OUTPUT_DIR here ...]
22691 \begin_inset Newline newline
22692 \end_inset
22693
22694 [...
22695  code to compile files ...]
22696 \begin_inset Newline newline
22697 \end_inset
22698
22699 @
22700 \end_layout
22701
22702 \begin_layout Standard
22703 Look in 
22704 \emph on
22705 LIBDIR/examples/listerrors.lyx
22706 \emph default
22707  or in 
22708 \emph on
22709 LIBDIR/examples/Literate.lyx
22710 \emph default
22711  which implement two versions of the 
22712 \begin_inset Quotes eld
22713 \end_inset
22714
22715 listerrors
22716 \begin_inset Quotes erd
22717 \end_inset
22718
22719  program for some illustrations of how all of these pieces go together or
22720  in 
22721 \emph on
22722 LIBDIR/examples/noweb2lyx.lyx.
22723
22724 \emph default
22725  Interestingly, these three files show off the language-indepence of the
22726  LyX literate programming support since they are written in Python, C and
22727  Perl respectively.
22728 \end_layout
22729
22730 \begin_layout Subsubsection
22731 Configuring LyX
22732 \end_layout
22733
22734 \begin_layout Standard
22735 All the Literate Programming support is configured by the 
22736 \family sans
22737 Tools\SpecialChar \menuseparator
22738 Preferences
22739 \family default
22740  panel in the 
22741 \begin_inset Quotes eld
22742 \end_inset
22743
22744 File Handling
22745 \begin_inset Quotes erd
22746 \end_inset
22747
22748  tab.
22749  The important parts are:
22750 \end_layout
22751
22752 \begin_layout Description
22753 the
22754 \begin_inset space ~
22755 \end_inset
22756
22757
22758 \begin_inset Quotes eld
22759 \end_inset
22760
22761 NoWeb
22762 \begin_inset Quotes erd
22763 \end_inset
22764
22765
22766 \begin_inset space ~
22767 \end_inset
22768
22769 format Set up via the File Formats tab, this is where the Noweb-specific
22770  pieces are set up.
22771  The 
22772 \family sans
22773 GUI Name
22774 \family default
22775  is set to 
22776 \family typewriter
22777 NoWeb
22778 \family default
22779 , the file extension is set to 
22780 \family typewriter
22781 .nw
22782 \family default
22783 .
22784  This tells LyX to create a file with a 
22785 \family typewriter
22786 .nw
22787 \family default
22788  extension in the first step of the conversion process.
22789 \end_layout
22790
22791 \begin_layout Description
22792 the
22793 \begin_inset space ~
22794 \end_inset
22795
22796
22797 \family sans
22798 Program
22799 \family default
22800
22801 \begin_inset space ~
22802 \end_inset
22803
22804 format This is an empty format whose sole purpose is to be the endpoint
22805  of a conversion (which then allows us to set up a converter for it).
22806 \end_layout
22807
22808 \begin_layout Description
22809
22810 \family sans
22811 NoWeb
22812 \family default
22813 ->
22814 \family sans
22815 LaTeX
22816 \family default
22817  This converter performs the 
22818 \begin_inset Quotes eld
22819 \end_inset
22820
22821 weaving
22822 \begin_inset Quotes erd
22823 \end_inset
22824
22825  of the literate document.
22826  For Noweb, it is set to 
22827 \begin_inset Quotes eld
22828 \end_inset
22829
22830
22831 \family typewriter
22832 noweave -delay -index $$i > $$o
22833 \family default
22834
22835 \begin_inset Quotes erd
22836 \end_inset
22837
22838
22839 \end_layout
22840
22841 \begin_layout Description
22842
22843 \family sans
22844 NoWeb
22845 \family default
22846 ->
22847 \family sans
22848 Program
22849 \family default
22850  This performs the 
22851 \begin_inset Quotes eld
22852 \end_inset
22853
22854 tangling step
22855 \begin_inset Quotes erd
22856 \end_inset
22857
22858 .
22859  As stated above, the Converter is set to 
22860 \begin_inset Quotes eld
22861 \end_inset
22862
22863
22864 \family typewriter
22865 build-script $$i
22866 \family default
22867  $$r
22868 \begin_inset Quotes erd
22869 \end_inset
22870
22871 , with Flags set to
22872 \begin_inset Newline newline
22873 \end_inset
22874
22875
22876 \begin_inset Quotes eld
22877 \end_inset
22878
22879
22880 \family typewriter
22881 parselog=$$s/scripts/listerrors
22882 \family default
22883
22884 \begin_inset Quotes erd
22885 \end_inset
22886
22887 .
22888 \end_layout
22889
22890 \begin_layout Subsubsection
22891 Debug extensions
22892 \end_layout
22893
22894 \begin_layout Standard
22895 There is also a new function implemented in the LyX server, the 
22896 \begin_inset Quotes eld
22897 \end_inset
22898
22899 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22900  
22901 \end_layout
22902
22903 \begin_layout Standard
22904 When debugging code with ddd/gdb, it is possible to invoke a text editor
22905  at the current execution position with a single key stroke.
22906  The default ddd configuration for that is shift-ctrl-V.
22907  It happens that you can define the editor command line invocation in ddd
22908  by accessing the 
22909 \family sans
22910 Edit\SpecialChar \menuseparator
22911 Preferences\SpecialChar \menuseparator
22912 Helpers
22913 \family default
22914  dialog and changing the "Edit Sources" entry.
22915 \end_layout
22916
22917 \begin_layout Standard
22918 I take advantage of the newly created LyX server function and this ddd feature,
22919  and set 
22920 \begin_inset Quotes eld
22921 \end_inset
22922
22923 Edit Sources
22924 \begin_inset Quotes erd
22925 \end_inset
22926
22927  to:
22928 \end_layout
22929
22930 \begin_layout Standard
22931 \begin_inset VSpace defskip
22932 \end_inset
22933
22934
22935 \end_layout
22936
22937 \begin_layout Standard
22938
22939 \family sans
22940 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22941 \end_layout
22942
22943 \begin_layout Standard
22944 \begin_inset VSpace defskip
22945 \end_inset
22946
22947
22948 \end_layout
22949
22950 \begin_layout Standard
22951 With this, whenever you are using ddd and find a point in the program that
22952  you want to edit, you just press shift-ctrl-V (in the ddd window), and
22953  ddd will forward this information to LyX through the LyX server and then
22954  the LyX window will show the same file with the cursor at the same position
22955  ddd was pointing to.
22956  No more guessing or long scrolling to locate a point in the program back
22957  from debugging !
22958 \end_layout
22959
22960 \begin_layout Standard
22961 Note however that you must enable the LyX server to get this feature working
22962  (it is disabled by default).
22963  You can enable it in 
22964 \family sans
22965 Preferences
22966 \family default
22967  (tabs 
22968 \family sans
22969 Inputs
22970 \family default
22971
22972 \family sans
22973 Paths
22974 \family default
22975 ) by entering in the 
22976 \family sans
22977 LyXserver pipe
22978 \family default
22979  a path like 
22980 \begin_inset Quotes eld
22981 \end_inset
22982
22983
22984 \family typewriter
22985 /home/<your-home-directory>/.lyx/lyxpipe
22986 \family default
22987
22988 \begin_inset Quotes erd
22989 \end_inset
22990
22991
22992 \end_layout
22993
22994 \begin_layout Standard
22995 Read the LyX server documentation in the 
22996 \emph on
22997 Customization Manual
22998 \emph default
22999  for further information.
23000 \end_layout
23001
23002 \begin_layout Subsubsection
23003 Toolbar extensions
23004 \end_layout
23005
23006 \begin_layout Standard
23007 There are six new buttons that can be added to your LyX toolbar.
23008  Five of these buttons are short cuts to layout styles: 
23009 \family sans
23010 Standard
23011 \family default
23012
23013 \family sans
23014 Section
23015 \family default
23016
23017 \family sans
23018 LaTeX
23019 \family default
23020
23021 \family sans
23022 LyX-Code
23023 \family default
23024 , and 
23025 \family sans
23026 Chunk
23027 \family default
23028 .
23029  The last one is a short cut to the 
23030 \begin_inset Quotes eld
23031 \end_inset
23032
23033 Build Program
23034 \begin_inset Quotes erd
23035 \end_inset
23036
23037  File menu entry.
23038  
23039 \end_layout
23040
23041 \begin_layout Standard
23042 LyX has a range of buttons that are available for tool bar customization.
23043  In my toolbar I like to combine the six short cuts above with two more:
23044  One for 
23045 \family sans
23046 View
23047 \family default
23048 \SpecialChar \menuseparator
23049
23050 \family sans
23051 Update
23052 \family default
23053 \SpecialChar \menuseparator
23054
23055 \family sans
23056 DVI
23057 \family default
23058  and the other for 
23059 \family sans
23060 View\SpecialChar \menuseparator
23061 DVI
23062 \family default
23063  File menu entries.
23064  Here is how it looks like:
23065 \end_layout
23066
23067 \begin_layout LyX-Code
23068 Toolbar
23069 \end_layout
23070
23071 \begin_layout LyX-Code
23072   Layouts
23073 \end_layout
23074
23075 \begin_layout LyX-Code
23076   Icon "layout Standard"
23077 \end_layout
23078
23079 \begin_layout LyX-Code
23080   Icon "layout Section"
23081 \end_layout
23082
23083 \begin_layout LyX-Code
23084   Icon "layout LaTeX"
23085 \end_layout
23086
23087 \begin_layout LyX-Code
23088   Icon "layout LyX-Code"
23089 \end_layout
23090
23091 \begin_layout LyX-Code
23092   Icon "layout Chunk"
23093 \end_layout
23094
23095 \begin_layout LyX-Code
23096   Separator
23097 \end_layout
23098
23099 \begin_layout LyX-Code
23100   Icon "buffer-view"
23101 \end_layout
23102
23103 \begin_layout LyX-Code
23104   Icon "buffer-typeset"
23105 \end_layout
23106
23107 \begin_layout LyX-Code
23108   Icon "build-program"
23109 \end_layout
23110
23111 \begin_layout LyX-Code
23112   Separator
23113 \end_layout
23114
23115 \begin_layout LyX-Code
23116 .
23117 \end_layout
23118
23119 \begin_layout LyX-Code
23120 .
23121 \end_layout
23122
23123 \begin_layout LyX-Code
23124 .
23125 \end_layout
23126
23127 \begin_layout LyX-Code
23128 End
23129 \end_layout
23130
23131 \begin_layout Subsubsection
23132 Colors customization
23133 \end_layout
23134
23135 \begin_layout Standard
23136 There are a number of colors in LyX that can be customized in 
23137 \family sans
23138 Preferences
23139 \family default
23140 .
23141  One of the things that bothers people is the LaTeX font color.
23142  The default color is red, since the chunks uses LaTeX font, and there is
23143  a lot of chunks in literate documents, you may get tired of seeing everything
23144  in red.
23145  You can change it by going to the tabs 
23146 \family sans
23147 Look&Feel
23148 \family default
23149
23150 \family sans
23151 Colors.
23152 \end_layout
23153
23154 \begin_layout Standard
23155 The next thing is the visible presence of the newline character in the screen.
23156  You can choose the color of this particular character and make it blend
23157  in the background.
23158  I recommend you choosing a color that is close to the background but not
23159  equal, that way you still can see it is there, but it is not bothering
23160  you anymore.
23161 \end_layout
23162
23163 \begin_layout Subsection
23164 LyX and knitr/Sweave
23165 \end_layout
23166
23167 \begin_layout Standard
23168 Support for 
23169 \family sans
23170 knitr
23171 \family default
23172  and 
23173 \family sans
23174 Sweave
23175 \family default
23176  is documented in the 
23177 \emph on
23178 knitr.lyx
23179 \emph default
23180  example file and in the Sweave manual (menu 
23181 \family sans
23182 Help\SpecialChar \menuseparator
23183 Specific Manuals
23184 \family default
23185 ).
23186 \end_layout
23187
23188 \begin_layout Chapter
23189 Special features
23190 \end_layout
23191
23192 \begin_layout Standard
23193 You can do everything with LyX that you can do with LaTeX.
23194  However, LyX cannot support every LaTeX feature directly.
23195  But you can always use TeX Code.
23196  This chapter shows you some more special things you might want to use.
23197  For other special things you can do with figures, tables, floats, boxes
23198  and notes, have a look at the 
23199 \emph on
23200 Embedded
23201 \begin_inset space ~
23202 \end_inset
23203
23204 Objects
23205 \emph default
23206  manual.
23207 \end_layout
23208
23209 \begin_layout Section
23210 Multiple Text Columns
23211 \end_layout
23212
23213 \begin_layout Standard
23214 This feature is independent of the option 
23215 \family sans
23216 Two-column document
23217 \family default
23218  in the document settings under 
23219 \family sans
23220 Text Layout
23221 \family default
23222 .
23223  If you want to have 2
23224 \begin_inset space ~
23225 \end_inset
23226
23227 columns for the whole document, it is recommended to use the 
23228 \family sans
23229 Two-column document
23230 \family default
23231  option.
23232  For all other cases use this feature.
23233 \end_layout
23234
23235 \begin_layout Standard
23236 To use multiple text columns in your document, you have to load the module
23237  
23238 \family sans
23239 Multiple Columns
23240 \family default
23241  (menu 
23242 \family sans
23243 Document\SpecialChar \menuseparator
23244 Settings\SpecialChar \menuseparator
23245 Modules
23246 \family default
23247 ) and must have the LaTeX-package 
23248 \series bold
23249 multicol
23250 \series default
23251  installed.
23252 \end_layout
23253
23254 \begin_layout Standard
23255 Footnotes within multiple columns will be placed at the bottom of the page
23256  and not under each column.
23257  Within the different columns you can use everything, with the limitation
23258  that for floats you need to use the float option 
23259 \family sans
23260 Span columns
23261 \family default
23262 .
23263 \end_layout
23264
23265 \begin_layout Subsection
23266 Basics
23267 \end_layout
23268
23269 \begin_layout Standard
23270 If you want to have 2
23271 \begin_inset space ~
23272 \end_inset
23273
23274 columns in your text, insert a multicolumn inset via the menu 
23275 \family sans
23276 Insert\SpecialChar \menuseparator
23277 Custom
23278 \begin_inset space ~
23279 \end_inset
23280
23281 Insets\SpecialChar \menuseparator
23282 Multiple
23283 \begin_inset space ~
23284 \end_inset
23285
23286 Columns
23287 \family default
23288  where the columns should start.
23289  Write all text that should be printed in 2
23290 \begin_inset space ~
23291 \end_inset
23292
23293 columns into this inset.
23294 \end_layout
23295
23296 \begin_layout Standard
23297 Here is an example:
23298 \end_layout
23299
23300 \begin_layout Standard
23301 \noindent
23302 \begin_inset Flex Multiple Columns
23303 status open
23304
23305 \begin_layout Plain Layout
23306 \noindent
23307
23308 \series bold
23309 \size small
23310 The Adventure of the Empty House
23311 \series default
23312
23313 \begin_inset Newline newline
23314 \end_inset
23315
23316 by Sir Arthur Conan Doyle
23317 \end_layout
23318
23319 \begin_layout Plain Layout
23320
23321 \size small
23322 It was in the spring of the year 1894 that all London was interested, and
23323  the fashionable world dismayed, by the murder of the Honourable Ronald
23324  Adair under most unusual and inexplicable circumstances.
23325  The public has already learned those particulars of the crime which came
23326  out in the police investigation, but a good deal was suppressed upon that
23327  occasion, since the case for the prosecution was so overwhelmingly strong
23328  that it was not necessary to bring forward all the facts.
23329  Only now, at the end of nearly ten years, am I allowed to supply those
23330  missing links which make up the whole of that remarkable chain.
23331  The crime was of interest in itself, but that interest was as nothing to
23332  me compared to the inconceivable sequel, which afforded me the greatest
23333  shock and surprise of any event in my adventurous life.
23334  Even now, after this long interval, I find myself thrilling as I think
23335  of it, and feeling once more that sudden flood of joy, amazement, and increduli
23336 ty which utterly submerged my mind.
23337  Let me say to that public, which has shown some interest in those glimpses
23338  which I have occasionally given them of the thoughts and actions of a very
23339  remarkable man, that they are not to blame me if I have not shared my knowledge
23340  with them, for I should have considered it my first duty to do so, had
23341  I not been barred by a positive prohibition from his own lips, which was
23342  only withdrawn upon the third of last month.
23343 \end_layout
23344
23345 \end_inset
23346
23347
23348 \end_layout
23349
23350 \begin_layout Standard
23351 To get 3 or more columns, set the cursor into the multicolumn inset and
23352  use the menu 
23353 \family sans
23354 Insert\SpecialChar \menuseparator
23355 Number
23356 \begin_inset space ~
23357 \end_inset
23358
23359 of
23360 \begin_inset space ~
23361 \end_inset
23362
23363 Columns
23364 \family default
23365 .
23366  The number of the desired columns is written into that inset (for 3
23367 \begin_inset space ~
23368 \end_inset
23369
23370 columns write 
23371 \begin_inset Quotes eld
23372 \end_inset
23373
23374 3
23375 \begin_inset Quotes erd
23376 \end_inset
23377
23378 ).
23379 \begin_inset Newline newline
23380 \end_inset
23381
23382 Here is an example with 3
23383 \begin_inset space ~
23384 \end_inset
23385
23386 columns:
23387 \end_layout
23388
23389 \begin_layout Standard
23390 \begin_inset Flex Multiple Columns
23391 status open
23392
23393 \begin_layout Plain Layout
23394
23395 \size footnotesize
23396 \begin_inset Argument 1
23397 status open
23398
23399 \begin_layout Plain Layout
23400 3
23401 \end_layout
23402
23403 \end_inset
23404
23405 It can be imagined that my close intimacy with Sherlock Holmes had interested
23406  me deeply in crime, and that after his disappearance I never failed to
23407  read with care the various problems which came before the public.
23408  And I even attempted, more than once, for my own private satisfaction,
23409  to employ his methods in their solution, though with indifferent success.
23410  There was none, however, which appealed to me like this tragedy of Ronald
23411  Adair.
23412  As I read the evidence at the inquest, which led up to a verdict of willful
23413  murder against some person or persons unknown, I realized more clearly
23414  than I had ever done the loss which the community had sustained by the
23415  death of Sherlock Holmes.
23416  There were points about this strange business which would, I was sure,
23417  have specially appealed to him, and the efforts of the police would have
23418  been supplemented, or more probably anticipated, by the trained observation
23419  and the alert mind of the first criminal agent in Europe.
23420  All day, as I drove upon my round, I turned over the case in my mind and
23421  found no explanation which appeared to me to be adequate.
23422  At the risk of telling a twice-told tale, I will recapitulate the facts
23423  as they were known to the public at the conclusion of the inquest.
23424 \end_layout
23425
23426 \end_inset
23427
23428
23429 \end_layout
23430
23431 \begin_layout Standard
23432 You can have up to 10
23433 \begin_inset space ~
23434 \end_inset
23435
23436 columns if you want to, but that might not be very pleasant for the readers
23437  of your document.
23438 \end_layout
23439
23440 \begin_layout Standard
23441 \begin_inset Newpage newpage
23442 \end_inset
23443
23444
23445 \end_layout
23446
23447 \begin_layout Subsection
23448 Columns inside Columns
23449 \end_layout
23450
23451 \begin_layout Standard
23452 You can also have columns inside columns:
23453 \end_layout
23454
23455 \begin_layout Standard
23456 \begin_inset Flex Multiple Columns
23457 status open
23458
23459 \begin_layout Plain Layout
23460
23461 \size footnotesize
23462 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
23463  at that time governor of one of the Australian colonies.
23464  Adair's mother had returned from Australia to undergo the operation for
23465  cataract, and she, her son Ronald, and her daughter Hilda were living together
23466  at 427 Park Lane.
23467 \end_layout
23468
23469 \begin_layout Plain Layout
23470 \begin_inset Flex Multiple Columns
23471 status open
23472
23473 \begin_layout Plain Layout
23474
23475 \size footnotesize
23476 The youth moved in the best society–had, so far as was known, no enemies
23477  and no particular vices.
23478  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
23479  had been broken off by mutual consent some months before, and there was
23480  no sign that it had left any very profound feeling behind it.
23481  For the rest {sic} the man's life moved in a narrow and conventional circle,
23482  for his habits were quiet and his nature unemotional.
23483  Yet it was upon this easy-going young aristocrat that death came, in most
23484  strange and unexpected form, between the hours of ten and eleven-twenty
23485  on the night of March 30, 1894.
23486 \end_layout
23487
23488 \end_inset
23489
23490
23491 \end_layout
23492
23493 \begin_layout Plain Layout
23494
23495 \size footnotesize
23496 Ronald Adair was fond of cards–playing continually, but never for such stakes
23497  as would hurt him.
23498  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
23499  It was shown that, after dinner on the day of his death, he had played
23500  a rubber of whist at the latter club.
23501  He had also played there in the afternoon.
23502
23503 \size default
23504  
23505 \size footnotesize
23506 The evidence of those who had played with him– Mr.
23507  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
23508  and that there was a fairly equal fall of the cards.
23509  Adair might have lost five pounds, but not more.
23510  His fortune was a considerable one, and such a loss could not in any way
23511  affect him.
23512  He had played nearly every day at one club or other, but he was a cautious
23513  player, and usually rose a winner.
23514  It came out in evidence that, in partnership with Colonel Moran, he had
23515  actually won as much as four hundred and twenty pounds in a sitting, some
23516  weeks before, from Godfrey Milner and Lord Balmoral.
23517  So much for his recent history as it came out at the inquest.
23518 \end_layout
23519
23520 \end_inset
23521
23522
23523 \end_layout
23524
23525 \begin_layout Subsection
23526 Advanced Examples
23527 \end_layout
23528
23529 \begin_layout Standard
23530 The examples in this section show some more special features of multiple
23531  columns.
23532 \end_layout
23533
23534 \begin_layout Standard
23535 For more features of multiple columns, have a look at the documentation
23536  of the LaTeX-package 
23537 \series bold
23538 multicol
23539 \series default
23540
23541 \begin_inset CommandInset citation
23542 LatexCommand cite
23543 key "multicol"
23544
23545 \end_inset
23546
23547 .
23548 \end_layout
23549
23550 \begin_layout Subsubsection
23551 Preface
23552 \end_layout
23553
23554 \begin_layout Standard
23555 To add a preface text for multiple columns, set the cursor into the multicolumn
23556  inset and use the menu 
23557 \family sans
23558 Insert\SpecialChar \menuseparator
23559 Preface
23560 \family default
23561 .
23562  Write your preface text into that inset.
23563 \begin_inset Newline newline
23564 \end_inset
23565
23566 This is an example with some preface text:
23567 \end_layout
23568
23569 \begin_layout Standard
23570 \begin_inset VSpace bigskip
23571 \end_inset
23572
23573
23574 \end_layout
23575
23576 \begin_layout Standard
23577 \begin_inset Flex Multiple Columns
23578 status open
23579
23580 \begin_layout Plain Layout
23581 \begin_inset Argument 2
23582 status open
23583
23584 \begin_layout Plain Layout
23585 And the story continues and continues and continues and continues\SpecialChar \ldots{}
23586
23587 \end_layout
23588
23589 \end_inset
23590
23591
23592 \size small
23593 On the evening of the crime, he returned from the club exactly at ten.
23594  His mother and sister were out spending the evening with a relation.
23595  The servant deposed that she heard him enter the front room on the second
23596  floor, generally used as his sitting-room.
23597  She had lit a fire there, and as it smoked she had opened the window.
23598  No sound was heard from the room until eleven-twenty, the hour of the return
23599  of Lady Maynooth and her daughter.
23600  Desiring to say good-night, she attempted to enter her son's room.
23601  The door was locked on the inside, and no answer could be got to their
23602  cries and knocking.
23603  Help was obtained, and the door forced.
23604  The unfortunate young man was found lying near the table.
23605  His head had been horribly mutilated by an expanding revolver bullet, but
23606  no weapon of any sort was to be found in the room.
23607 \end_layout
23608
23609 \end_inset
23610
23611
23612 \end_layout
23613
23614 \begin_layout Standard
23615 You can also use a section heading as the preface if you use a section command
23616  as TeX Code.
23617  For example the command
23618 \end_layout
23619
23620 \begin_layout Standard
23621
23622 \series bold
23623
23624 \backslash
23625 subsection{subsection title}
23626 \end_layout
23627
23628 \begin_layout Standard
23629 creates a subsection.
23630  In this example the preface is a subsubsection:
23631 \end_layout
23632
23633 \begin_layout Standard
23634 \begin_inset Flex Multiple Columns
23635 status open
23636
23637 \begin_layout Plain Layout
23638 \begin_inset Argument 2
23639 status open
23640
23641 \begin_layout Plain Layout
23642 \begin_inset ERT
23643 status collapsed
23644
23645 \begin_layout Plain Layout
23646
23647
23648 \backslash
23649 subsubsection{
23650 \end_layout
23651
23652 \end_inset
23653
23654 This is a subsubsection heading as a preface
23655 \begin_inset ERT
23656 status collapsed
23657
23658 \begin_layout Plain Layout
23659
23660 }
23661 \end_layout
23662
23663 \end_inset
23664
23665
23666 \end_layout
23667
23668 \end_inset
23669
23670
23671 \size small
23672 A minute examination of the circumstances served only to make the case more
23673  complex.
23674  In the first place, no reason could be given why the young man should have
23675  fastened the door upon the inside.
23676  There was the possibility that the murderer had done this, and had afterwards
23677  escaped by the window.
23678  The drop was at least twenty feet, however, and a bed of crocuses in full
23679  bloom lay beneath.
23680  Neither the flowers nor the earth showed any sign of having been disturbed,
23681  nor were there any marks upon the narrow strip of grass which separated
23682  the house from the road.
23683  Apparently, therefore, it was the young man himself who had fastened the
23684  door.
23685  But how did he come by his death? No one could have climbed up to the window
23686  without leaving traces.
23687  Suppose a man had fired through the window, he would indeed be a remarkable
23688  shot who could with a revolver inflict so deadly a wound.
23689  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
23690  a hundred yards of the house.
23691  No one had heard a shot.
23692 \end_layout
23693
23694 \end_inset
23695
23696
23697 \end_layout
23698
23699 \begin_layout Standard
23700 If there is less vertical space than 6
23701 \begin_inset space ~
23702 \end_inset
23703
23704 text lines is left on the page at the beginning of the multiple columns,
23705  a page break will be inserted before the multiple columns.
23706  Depending on the number of lines of the preface text, you might want to
23707  change this space.
23708  This is done by setting the cursor into the mulitcolumn inset behind the
23709  preface (if there is any) and using the menu 
23710 \family sans
23711 Insert\SpecialChar \menuseparator
23712 Space
23713 \begin_inset space ~
23714 \end_inset
23715
23716 Before
23717 \begin_inset space ~
23718 \end_inset
23719
23720 Page
23721 \begin_inset space ~
23722 \end_inset
23723
23724 Break
23725 \family default
23726 .
23727  Insert into that inset the amount of space like e.
23728 \begin_inset space \thinspace{}
23729 \end_inset
23730
23731 g.
23732 \begin_inset space \space{}
23733 \end_inset
23734
23735
23736 \begin_inset Quotes eld
23737 \end_inset
23738
23739 5cm
23740 \begin_inset Quotes erd
23741 \end_inset
23742
23743 .
23744 \begin_inset Newline newline
23745 \end_inset
23746
23747 In this example the space is set to 7
23748 \begin_inset space ~
23749 \end_inset
23750
23751 text lines by using 
23752 \begin_inset Quotes eld
23753 \end_inset
23754
23755 7
23756 \backslash
23757 baselineskip
23758 \begin_inset Quotes erd
23759 \end_inset
23760
23761  (where the command 
23762 \series bold
23763
23764 \backslash
23765 baselineskip
23766 \series default
23767  needs to be inserted as TeX code):
23768 \end_layout
23769
23770 \begin_layout Standard
23771 \begin_inset Flex Multiple Columns
23772 status open
23773
23774 \begin_layout Plain Layout
23775 \begin_inset Argument 3
23776 status open
23777
23778 \begin_layout Plain Layout
23779 7
23780 \begin_inset ERT
23781 status collapsed
23782
23783 \begin_layout Plain Layout
23784
23785
23786 \backslash
23787 baselineskip
23788 \end_layout
23789
23790 \end_inset
23791
23792
23793 \end_layout
23794
23795 \end_inset
23796
23797
23798 \size small
23799 On the evening of the crime, he returned from the club exactly at ten.
23800  His mother and sister were out spending the evening with a relation.
23801  The servant deposed that she heard him enter the front room on the second
23802  floor, generally used as his sitting-room.
23803  She had lit a fire there, and as it smoked she had opened the window.
23804  No sound was heard from the room until eleven-twenty, the hour of the return
23805  of Lady Maynooth and her daughter.
23806  Desiring to say good-night, she attempted to enter her son's room.
23807  The door was locked on the inside, and no answer could be got to their
23808  cries and knocking.
23809  Help was obtained, and the door forced.
23810  The unfortunate young man was found lying near the table.
23811  His head had been horribly mutilated by an expanding revolver bullet, but
23812  no weapon of any sort was to be found in the room.
23813 \end_layout
23814
23815 \end_inset
23816
23817
23818 \end_layout
23819
23820 \begin_layout Subsubsection
23821 Surrounding Space
23822 \end_layout
23823
23824 \begin_layout Standard
23825 The amount of space before and after multiple columns can be changed by
23826  changing the length 
23827 \series bold
23828
23829 \backslash
23830 multicolsep
23831 \series default
23832 .
23833  For example the command
23834 \end_layout
23835
23836 \begin_layout Standard
23837
23838 \series bold
23839
23840 \backslash
23841 setlength{
23842 \backslash
23843 multicolsep}{3cm}
23844 \end_layout
23845
23846 \begin_layout Standard
23847 in TeX Code changes its value to 3
23848 \begin_inset space \thinspace{}
23849 \end_inset
23850
23851 cm.
23852  The change must be made before the multiple columns' start.
23853  The predefined value is 13
23854 \begin_inset space \thinspace{}
23855 \end_inset
23856
23857 pt.
23858 \end_layout
23859
23860 \begin_layout Standard
23861 For this example 
23862 \series bold
23863
23864 \backslash
23865 multicolsep
23866 \series default
23867  was set to 2.5
23868 \begin_inset space \thinspace{}
23869 \end_inset
23870
23871 cm:
23872 \end_layout
23873
23874 \begin_layout Standard
23875 \begin_inset ERT
23876 status open
23877
23878 \begin_layout Plain Layout
23879
23880
23881 \backslash
23882 setlength{
23883 \backslash
23884 multicolsep}{2.5cm}
23885 \end_layout
23886
23887 \end_inset
23888
23889
23890 \end_layout
23891
23892 \begin_layout Standard
23893 \begin_inset Flex Multiple Columns
23894 status open
23895
23896 \begin_layout Plain Layout
23897
23898 \size small
23899 All day I turned these facts over in my mind, endeavouring to hit upon some
23900  theory which could reconcile them all, and to find that line of least resistanc
23901 e which my poor friend had declared to be the starting-point of every investigat
23902 ion.
23903  I confess that I made little progress.
23904  In the evening I strolled across the Park, and found myself about six o'clock
23905  at the Oxford Street end of Park Lane.
23906  A group of loafers upon the pavements, all staring up at a particular window,
23907  directed me to the house which I had come to see.
23908  A tall, thin man with coloured glasses, whom I strongly suspected of being
23909  a plain-clothes detective, was pointing out some theory of his own, while
23910  the others crowded round to listen to what he said.
23911  I got as near him as I could, but his observations seemed to me to be absurd,
23912  so I withdrew again in some disgust.
23913  As I did so I struck against an elderly, deformed man, who had been behind
23914  me, and I knocked down several books which he was carrying.
23915 \end_layout
23916
23917 \end_inset
23918
23919
23920 \end_layout
23921
23922 \begin_layout Standard
23923 \begin_inset Note Greyedout
23924 status open
23925
23926 \begin_layout Plain Layout
23927
23928 \series bold
23929 Note:
23930 \series default
23931  The values you set with 
23932 \series bold
23933
23934 \backslash
23935 setlength
23936 \series default
23937  will be used for all following multiple columns until you change them again.
23938 \end_layout
23939
23940 \end_inset
23941
23942
23943 \end_layout
23944
23945 \begin_layout Standard
23946 \begin_inset ERT
23947 status collapsed
23948
23949 \begin_layout Plain Layout
23950
23951
23952 \backslash
23953 setlength{
23954 \backslash
23955 multicolsep}{13pt}
23956 \end_layout
23957
23958 \end_inset
23959
23960
23961 \begin_inset Note Note
23962 status collapsed
23963
23964 \begin_layout Plain Layout
23965 go back to the default
23966 \end_layout
23967
23968 \end_inset
23969
23970
23971 \end_layout
23972
23973 \begin_layout Standard
23974 \begin_inset Newpage newpage
23975 \end_inset
23976
23977
23978 \end_layout
23979
23980 \begin_layout Subsubsection
23981 Column Breaks
23982 \end_layout
23983
23984 \begin_layout Standard
23985 A column break can be forced by inserting the command 
23986 \series bold
23987
23988 \backslash
23989 columnbreak{}
23990 \series default
23991  as TeX-Code to that position in the text where the column should be broken.
23992  Note that this leads in most cases to whitespace in the text.
23993 \begin_inset Newline newline
23994 \end_inset
23995
23996 Here is an example:
23997 \end_layout
23998
23999 \begin_layout Standard
24000 \begin_inset Flex Multiple Columns
24001 status open
24002
24003 \begin_layout Plain Layout
24004
24005 \size small
24006 \begin_inset Quotes eld
24007 \end_inset
24008
24009 You're surprised to see me, sir,
24010 \begin_inset Quotes erd
24011 \end_inset
24012
24013  said he, in a strange, croaking voice.
24014 \end_layout
24015
24016 \begin_layout Plain Layout
24017
24018 \size small
24019 I acknowledged that I was.
24020 \end_layout
24021
24022 \begin_layout Plain Layout
24023
24024 \size small
24025 \begin_inset Quotes eld
24026 \end_inset
24027
24028 Well, I've a conscience, sir, and when I chanced to see you go into this
24029  house, as I came hobbling after you, I thought to myself, I'll just step
24030  in and see that kind gentleman, and tell him that if I was a bit gruff
24031  in my manner there was not any harm meant, and that I am much obliged to
24032  him for picking up my books.
24033 \begin_inset Quotes erd
24034 \end_inset
24035
24036
24037 \end_layout
24038
24039 \begin_layout Plain Layout
24040
24041 \size small
24042 \begin_inset Quotes eld
24043 \end_inset
24044
24045 You make too much of a trifle,
24046 \begin_inset Quotes erd
24047 \end_inset
24048
24049  said I.
24050  
24051 \begin_inset Quotes eld
24052 \end_inset
24053
24054 May I ask how you knew who I was?
24055 \begin_inset Quotes erd
24056 \end_inset
24057
24058  AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED.
24059 \begin_inset ERT
24060 status collapsed
24061
24062 \begin_layout Plain Layout
24063
24064
24065 \backslash
24066 columnbreak{}
24067 \end_layout
24068
24069 \end_inset
24070
24071
24072 \end_layout
24073
24074 \begin_layout Plain Layout
24075
24076 \size small
24077 \begin_inset Quotes eld
24078 \end_inset
24079
24080 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24081  you'll find my little bookshop at the corner of Church Street, and very
24082  happy to see you, I am sure.
24083  Maybe you collect yourself, sir.
24084  Here's 
24085 \noun on
24086 British
24087 \begin_inset space ~
24088 \end_inset
24089
24090 Birds
24091 \noun default
24092 , and 
24093 \noun on
24094 Catullus
24095 \noun default
24096 , and 
24097 \noun on
24098 The Holy War
24099 \noun default
24100 --a bargain, every one of them.
24101  With five volumes you could just fill that gap on that second shelf.
24102  It looks untidy, does it not, sir?
24103 \begin_inset Quotes erd
24104 \end_inset
24105
24106
24107 \end_layout
24108
24109 \end_inset
24110
24111
24112 \end_layout
24113
24114 \begin_layout Subsubsection
24115 Column Separation
24116 \end_layout
24117
24118 \begin_layout Standard
24119 The width of the columns is automatically calculated, but you can modify
24120  the space between the columns.
24121  This is done by changing the length 
24122 \series bold
24123
24124 \backslash
24125 columnsep
24126 \series default
24127 .
24128  Its predefined value is 10
24129 \begin_inset space \thinspace{}
24130 \end_inset
24131
24132 pt.
24133  Here is an example where 
24134 \series bold
24135
24136 \backslash
24137 columnsep
24138 \series default
24139  is set to 3
24140 \begin_inset space \thinspace{}
24141 \end_inset
24142
24143 cm:
24144 \end_layout
24145
24146 \begin_layout Standard
24147 \begin_inset ERT
24148 status open
24149
24150 \begin_layout Plain Layout
24151
24152
24153 \backslash
24154 setlength{
24155 \backslash
24156 columnsep}{3cm}
24157 \end_layout
24158
24159 \end_inset
24160
24161
24162 \end_layout
24163
24164 \begin_layout Standard
24165 \begin_inset Flex Multiple Columns
24166 status open
24167
24168 \begin_layout Plain Layout
24169
24170 \size small
24171 My observations of No.
24172 \begin_inset space \space{}
24173 \end_inset
24174
24175 427 Park Lane did little to clear up the problem in which I was interested.
24176  The house was separated from the street by a low wall and railing, the
24177  whole not more than five feet high.
24178  It was perfectly easy, therefore, for anyone to get into the garden, but
24179  the window was entirely inaccessible, since there was no water pipe or
24180  anything which could help the most active man to climb it.
24181  More puzzled than ever, I retraced my steps to Kensington.
24182  I had not been in my study five minutes when the maid entered to say that
24183  a person desired to see me.
24184  To my astonishment it was none other than my strange old book collector,
24185  his sharp, wizened face peering out from a frame of white hair, and his
24186  precious volumes, a dozen of them at least, wedged under his right arm.
24187 \end_layout
24188
24189 \end_inset
24190
24191
24192 \end_layout
24193
24194 \begin_layout Standard
24195 \begin_inset ERT
24196 status collapsed
24197
24198 \begin_layout Plain Layout
24199
24200
24201 \backslash
24202 setlength{
24203 \backslash
24204 columnsep}{10pt}
24205 \end_layout
24206
24207 \end_inset
24208
24209
24210 \begin_inset Note Note
24211 status collapsed
24212
24213 \begin_layout Plain Layout
24214 go back to the default
24215 \end_layout
24216
24217 \end_inset
24218
24219
24220 \end_layout
24221
24222 \begin_layout Subsubsection
24223 Vertical Lines
24224 \end_layout
24225
24226 \begin_layout Standard
24227 Between the columns a rule with a width of the length 
24228 \series bold
24229
24230 \backslash
24231 columnseprule
24232 \series default
24233  is placed.
24234  If this rule width is set to 0
24235 \begin_inset space \thinspace{}
24236 \end_inset
24237
24238 pt (this is the default), the rule is suppressed.
24239  In the following example the rule is 2
24240 \begin_inset space \thinspace{}
24241 \end_inset
24242
24243 pt wide:
24244 \end_layout
24245
24246 \begin_layout Standard
24247 \begin_inset ERT
24248 status open
24249
24250 \begin_layout Plain Layout
24251
24252
24253 \backslash
24254 setlength{
24255 \backslash
24256 columnseprule}{2pt}
24257 \end_layout
24258
24259 \end_inset
24260
24261
24262 \end_layout
24263
24264 \begin_layout Standard
24265 \begin_inset Flex Multiple Columns
24266 status open
24267
24268 \begin_layout Plain Layout
24269
24270 \size small
24271 \begin_inset Quotes eld
24272 \end_inset
24273
24274 You're surprised to see me, sir,
24275 \begin_inset Quotes erd
24276 \end_inset
24277
24278  said he, in a strange, croaking voice.
24279 \end_layout
24280
24281 \begin_layout Plain Layout
24282
24283 \size small
24284 I acknowledged that I was.
24285 \end_layout
24286
24287 \begin_layout Plain Layout
24288
24289 \size small
24290 \begin_inset Quotes eld
24291 \end_inset
24292
24293 Well, I've a conscience, sir, and when I chanced to see you go into this
24294  house, as I came hobbling after you, I thought to myself, I'll just step
24295  in and see that kind gentleman, and tell him that if I was a bit gruff
24296  in my manner there was not any harm meant, and that I am much obliged to
24297  him for picking up my books.
24298 \begin_inset Quotes erd
24299 \end_inset
24300
24301
24302 \end_layout
24303
24304 \begin_layout Plain Layout
24305
24306 \size small
24307 \begin_inset Quotes eld
24308 \end_inset
24309
24310 You make too much of a trifle,
24311 \begin_inset Quotes erd
24312 \end_inset
24313
24314  said I.
24315  
24316 \begin_inset Quotes eld
24317 \end_inset
24318
24319 May I ask how you knew who I was?
24320 \begin_inset Quotes erd
24321 \end_inset
24322
24323
24324 \end_layout
24325
24326 \begin_layout Plain Layout
24327
24328 \size small
24329 \begin_inset Quotes eld
24330 \end_inset
24331
24332 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24333  you'll find my little bookshop at the corner of Church Street, and very
24334  happy to see you, I am sure.
24335  Maybe you collect yourself, sir.
24336  Here's 
24337 \noun on
24338 British
24339 \begin_inset space ~
24340 \end_inset
24341
24342 Birds
24343 \noun default
24344 , and 
24345 \noun on
24346 Catullus
24347 \noun default
24348 , and 
24349 \noun on
24350 The Holy War
24351 \noun default
24352 --a bargain, every one of them.
24353  With five volumes you could just fill that gap on that second shelf.
24354  It looks untidy, does it not, sir?
24355 \begin_inset Quotes erd
24356 \end_inset
24357
24358
24359 \end_layout
24360
24361 \end_inset
24362
24363
24364 \end_layout
24365
24366 \begin_layout Standard
24367 \begin_inset VSpace defskip
24368 \end_inset
24369
24370
24371 \end_layout
24372
24373 \begin_layout Standard
24374 The rule can be colored by redefining the command 
24375 \series bold
24376
24377 \backslash
24378 columnseprulecolor
24379 \series default
24380 .
24381  This is done by inserting the command
24382 \begin_inset Newline newline
24383 \end_inset
24384
24385
24386 \series bold
24387
24388 \backslash
24389 renewcommand{
24390 \backslash
24391 columnseprulecolor}{
24392 \backslash
24393 color{red}}
24394 \series default
24395
24396 \begin_inset Newline newline
24397 \end_inset
24398
24399 as TeX-Code before the multicolumn inset.
24400  Replace 
24401 \series bold
24402 red
24403 \series default
24404  in this command by a color of your choice.
24405  You can use all pre- and self-defined colors.
24406  See the 
24407 \emph on
24408 EmbeddedObjects
24409 \emph default
24410  manual, section 
24411 \emph on
24412 Colored
24413 \begin_inset space ~
24414 \end_inset
24415
24416 Tables
24417 \emph default
24418  for more information about pre- and self-defined colors.
24419  To go back to the default color insert the command
24420 \begin_inset Newline newline
24421 \end_inset
24422
24423
24424 \series bold
24425
24426 \backslash
24427 renewcommand{
24428 \backslash
24429 columnseprulecolor}{
24430 \backslash
24431 normalcolor}
24432 \series default
24433
24434 \begin_inset Newline newline
24435 \end_inset
24436
24437 Here is the example with a cyan rule and 1
24438 \begin_inset space \thinspace{}
24439 \end_inset
24440
24441 cm column separation:
24442 \end_layout
24443
24444 \begin_layout Standard
24445 \begin_inset ERT
24446 status open
24447
24448 \begin_layout Plain Layout
24449
24450
24451 \backslash
24452 setlength{
24453 \backslash
24454 columnsep}{1cm}
24455 \end_layout
24456
24457 \begin_layout Plain Layout
24458
24459
24460 \backslash
24461 renewcommand{
24462 \backslash
24463 columnseprulecolor}{
24464 \backslash
24465 color{cyan}}
24466 \end_layout
24467
24468 \end_inset
24469
24470
24471 \end_layout
24472
24473 \begin_layout Standard
24474 \begin_inset Flex Multiple Columns
24475 status open
24476
24477 \begin_layout Plain Layout
24478
24479 \size small
24480 \begin_inset Quotes eld
24481 \end_inset
24482
24483 You're surprised to see me, sir,
24484 \begin_inset Quotes erd
24485 \end_inset
24486
24487  said he, in a strange, croaking voice.
24488 \end_layout
24489
24490 \begin_layout Plain Layout
24491
24492 \size small
24493 I acknowledged that I was.
24494 \end_layout
24495
24496 \begin_layout Plain Layout
24497
24498 \size small
24499 \begin_inset Quotes eld
24500 \end_inset
24501
24502 Well, I've a conscience, sir, and when I chanced to see you go into this
24503  house, as I came hobbling after you, I thought to myself, I'll just step
24504  in and see that kind gentleman, and tell him that if I was a bit gruff
24505  in my manner there was not any harm meant, and that I am much obliged to
24506  him for picking up my books.
24507 \begin_inset Quotes erd
24508 \end_inset
24509
24510
24511 \end_layout
24512
24513 \begin_layout Plain Layout
24514
24515 \size small
24516 \begin_inset Quotes eld
24517 \end_inset
24518
24519 You make too much of a trifle,
24520 \begin_inset Quotes erd
24521 \end_inset
24522
24523  said I.
24524  
24525 \begin_inset Quotes eld
24526 \end_inset
24527
24528 May I ask how you knew who I was?
24529 \begin_inset Quotes erd
24530 \end_inset
24531
24532
24533 \end_layout
24534
24535 \begin_layout Plain Layout
24536
24537 \size small
24538 \begin_inset Quotes eld
24539 \end_inset
24540
24541 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24542  you'll find my little bookshop at the corner of Church Street, and very
24543  happy to see you, I am sure.
24544  Maybe you collect yourself, sir.
24545  Here's 
24546 \noun on
24547 British
24548 \begin_inset space ~
24549 \end_inset
24550
24551 Birds
24552 \noun default
24553 , and 
24554 \noun on
24555 Catullus
24556 \noun default
24557 , and 
24558 \noun on
24559 The Holy War
24560 \noun default
24561 --a bargain, every one of them.
24562  With five volumes you could just fill that gap on that second shelf.
24563  It looks untidy, does it not, sir?
24564 \begin_inset Quotes erd
24565 \end_inset
24566
24567
24568 \end_layout
24569
24570 \end_inset
24571
24572
24573 \end_layout
24574
24575 \begin_layout Standard
24576 \begin_inset ERT
24577 status collapsed
24578
24579 \begin_layout Plain Layout
24580
24581
24582 \backslash
24583 setlength{
24584 \backslash
24585 columnseprule}{0pt}
24586 \end_layout
24587
24588 \begin_layout Plain Layout
24589
24590
24591 \backslash
24592 renewcommand{
24593 \backslash
24594 columnseprulecolor}{
24595 \backslash
24596 normalcolor}
24597 \end_layout
24598
24599 \end_inset
24600
24601
24602 \begin_inset Note Note
24603 status collapsed
24604
24605 \begin_layout Plain Layout
24606 go back to the default
24607 \end_layout
24608
24609 \end_inset
24610
24611
24612 \end_layout
24613
24614 \begin_layout Section
24615 Non-standard Paragraph Shapes
24616 \end_layout
24617
24618 \begin_layout Standard
24619 \noindent
24620 LaTeX as well as any other text processor uses by default rectangular paragraphs.
24621  For special cases like for example posters, invitation cards or poems you
24622  can modify the paragraph shape to one of your choice.
24623  This can be done by using the LaTeX-package 
24624 \series bold
24625 shapepar
24626 \series default
24627  which is loaded by using in the document settings the module 
24628 \family sans
24629 Custom paragraph shapes
24630 \family default
24631 .
24632 \end_layout
24633
24634 \begin_layout Subsection
24635 Predefined shapes
24636 \end_layout
24637
24638 \begin_layout Standard
24639
24640 \series bold
24641 shapepar
24642 \series default
24643  provides the following shapes:
24644 \end_layout
24645
24646 \begin_layout Standard
24647 \begin_inset Tabular
24648 <lyxtabular version="3" rows="13" columns="3">
24649 <features rotate="0" booktabs="true" islongtable="true" longtabularalignment="center">
24650 <column alignment="center" valignment="middle" width="16col%">
24651 <column alignment="center" valignment="middle" width="40col%">
24652 <column alignment="center" valignment="middle" width="35col%">
24653 <row endhead="true">
24654 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24655 \begin_inset Text
24656
24657 \begin_layout Plain Layout
24658 Name
24659 \end_layout
24660
24661 \end_inset
24662 </cell>
24663 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24664 \begin_inset Text
24665
24666 \begin_layout Plain Layout
24667 Description
24668 \end_layout
24669
24670 \end_inset
24671 </cell>
24672 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
24673 \begin_inset Text
24674
24675 \begin_layout Plain Layout
24676 Annotation
24677 \end_layout
24678
24679 \end_inset
24680 </cell>
24681 </row>
24682 <row>
24683 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24684 \begin_inset Text
24685
24686 \begin_layout Plain Layout
24687 CDlabel
24688 \end_layout
24689
24690 \end_inset
24691 </cell>
24692 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24693 \begin_inset Text
24694
24695 \begin_layout Plain Layout
24696 Circle with circular hole (in the size of a CD/DVD)
24697 \end_layout
24698
24699 \end_inset
24700 </cell>
24701 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24702 \begin_inset Text
24703
24704 \begin_layout Plain Layout
24705 Cannot be scaled, take care there is not too much text
24706 \end_layout
24707
24708 \end_inset
24709 </cell>
24710 </row>
24711 <row>
24712 <cell alignment="center" valignment="top" topline="true" usebox="none">
24713 \begin_inset Text
24714
24715 \begin_layout Plain Layout
24716 Circle
24717 \end_layout
24718
24719 \end_inset
24720 </cell>
24721 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24722 \begin_inset Text
24723
24724 \begin_layout Plain Layout
24725 Circle
24726 \end_layout
24727
24728 \end_inset
24729 </cell>
24730 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24731 \begin_inset Text
24732
24733 \begin_layout Plain Layout
24734 Fragile, calculation might fail
24735 \end_layout
24736
24737 \end_inset
24738 </cell>
24739 </row>
24740 <row>
24741 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24742 \begin_inset Text
24743
24744 \begin_layout Plain Layout
24745 Diamond
24746 \end_layout
24747
24748 \end_inset
24749 </cell>
24750 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24751 \begin_inset Text
24752
24753 \begin_layout Plain Layout
24754 Rhomboid (symbolizing a 
24755 \begin_inset Quotes eld
24756 \end_inset
24757
24758 diamond
24759 \begin_inset Quotes erd
24760 \end_inset
24761
24762 )
24763 \end_layout
24764
24765 \end_inset
24766 </cell>
24767 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24768 \begin_inset Text
24769
24770 \begin_layout Plain Layout
24771 -
24772 \end_layout
24773
24774 \end_inset
24775 </cell>
24776 </row>
24777 <row>
24778 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24779 \begin_inset Text
24780
24781 \begin_layout Plain Layout
24782 Heart
24783 \end_layout
24784
24785 \end_inset
24786 </cell>
24787 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24788 \begin_inset Text
24789
24790 \begin_layout Plain Layout
24791 Heart-like shape
24792 \end_layout
24793
24794 \end_inset
24795 </cell>
24796 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24797 \begin_inset Text
24798
24799 \begin_layout Plain Layout
24800 -
24801 \end_layout
24802
24803 \end_inset
24804 </cell>
24805 </row>
24806 <row>
24807 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24808 \begin_inset Text
24809
24810 \begin_layout Plain Layout
24811 Hexagon
24812 \end_layout
24813
24814 \end_inset
24815 </cell>
24816 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24817 \begin_inset Text
24818
24819 \begin_layout Plain Layout
24820 Hexagon
24821 \end_layout
24822
24823 \end_inset
24824 </cell>
24825 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24826 \begin_inset Text
24827
24828 \begin_layout Plain Layout
24829 -
24830 \end_layout
24831
24832 \end_inset
24833 </cell>
24834 </row>
24835 <row>
24836 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24837 \begin_inset Text
24838
24839 \begin_layout Plain Layout
24840 Nut
24841 \end_layout
24842
24843 \end_inset
24844 </cell>
24845 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24846 \begin_inset Text
24847
24848 \begin_layout Plain Layout
24849 Nut for bolt (hexagon with circular hole)
24850 \end_layout
24851
24852 \end_inset
24853 </cell>
24854 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24855 \begin_inset Text
24856
24857 \begin_layout Plain Layout
24858 -
24859 \end_layout
24860
24861 \end_inset
24862 </cell>
24863 </row>
24864 <row>
24865 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24866 \begin_inset Text
24867
24868 \begin_layout Plain Layout
24869 Square
24870 \end_layout
24871
24872 \end_inset
24873 </cell>
24874 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24875 \begin_inset Text
24876
24877 \begin_layout Plain Layout
24878 Square
24879 \end_layout
24880
24881 \end_inset
24882 </cell>
24883 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24884 \begin_inset Text
24885
24886 \begin_layout Plain Layout
24887 -
24888 \end_layout
24889
24890 \end_inset
24891 </cell>
24892 </row>
24893 <row>
24894 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24895 \begin_inset Text
24896
24897 \begin_layout Plain Layout
24898 Star
24899 \end_layout
24900
24901 \end_inset
24902 </cell>
24903 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24904 \begin_inset Text
24905
24906 \begin_layout Plain Layout
24907 Five-point star
24908 \end_layout
24909
24910 \end_inset
24911 </cell>
24912 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
24913 \begin_inset Text
24914
24915 \begin_layout Plain Layout
24916 -
24917 \end_layout
24918
24919 \end_inset
24920 </cell>
24921 </row>
24922 <row>
24923 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24924 \begin_inset Text
24925
24926 \begin_layout Plain Layout
24927 Candle
24928 \end_layout
24929
24930 \end_inset
24931 </cell>
24932 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24933 \begin_inset Text
24934
24935 \begin_layout Plain Layout
24936 Burning candle
24937 \end_layout
24938
24939 \end_inset
24940 </cell>
24941 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24942 \begin_inset Text
24943
24944 \begin_layout Plain Layout
24945 -
24946 \end_layout
24947
24948 \end_inset
24949 </cell>
24950 </row>
24951 <row>
24952 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24953 \begin_inset Text
24954
24955 \begin_layout Plain Layout
24956 Drop down/up
24957 \end_layout
24958
24959 \end_inset
24960 </cell>
24961 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24962 \begin_inset Text
24963
24964 \begin_layout Plain Layout
24965 Normal/reversed rain drop
24966 \end_layout
24967
24968 \end_inset
24969 </cell>
24970 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24971 \begin_inset Text
24972
24973 \begin_layout Plain Layout
24974 Fragile, calculation might fail
24975 \end_layout
24976
24977 \end_inset
24978 </cell>
24979 </row>
24980 <row>
24981 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24982 \begin_inset Text
24983
24984 \begin_layout Plain Layout
24985 TeX
24986 \end_layout
24987
24988 \end_inset
24989 </cell>
24990 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24991 \begin_inset Text
24992
24993 \begin_layout Plain Layout
24994 The TeX logo
24995 \end_layout
24996
24997 \end_inset
24998 </cell>
24999 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25000 \begin_inset Text
25001
25002 \begin_layout Plain Layout
25003 -
25004 \end_layout
25005
25006 \end_inset
25007 </cell>
25008 </row>
25009 <row>
25010 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25011 \begin_inset Text
25012
25013 \begin_layout Plain Layout
25014 Triangle up/down/
25015 \begin_inset Newline newline
25016 \end_inset
25017
25018 left/right
25019 \end_layout
25020
25021 \end_inset
25022 </cell>
25023 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25024 \begin_inset Text
25025
25026 \begin_layout Plain Layout
25027 Triangles in different orientations
25028 \end_layout
25029
25030 \end_inset
25031 </cell>
25032 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
25033 \begin_inset Text
25034
25035 \begin_layout Plain Layout
25036 -
25037 \end_layout
25038
25039 \end_inset
25040 </cell>
25041 </row>
25042 </lyxtabular>
25043
25044 \end_inset
25045
25046
25047 \end_layout
25048
25049 \begin_layout Standard
25050 To use a shape for your paragraph, simply select it in LyX's pull-down box
25051  for environments in the toolbar.
25052 \end_layout
25053
25054 \begin_layout Standard
25055 \begin_inset Newpage newpage
25056 \end_inset
25057
25058
25059 \end_layout
25060
25061 \begin_layout Standard
25062 Here is an example paragraph in the shape of a nut:
25063 \end_layout
25064
25065 \begin_layout Standard
25066 \begin_inset VSpace bigskip
25067 \end_inset
25068
25069
25070 \end_layout
25071
25072 \begin_layout Nut
25073
25074 \lang latin
25075 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25076  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25077  voluptua.
25078  At vero eos et accusam et justo duo dolores et ea rebum.
25079  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25080  sit amet.
25081  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25082  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25083  voluptua.
25084 \end_layout
25085
25086 \begin_layout Standard
25087 \begin_inset VSpace bigskip
25088 \end_inset
25089
25090
25091 \end_layout
25092
25093 \begin_layout Standard
25094 \begin_inset Note Greyedout
25095 status open
25096
25097 \begin_layout Plain Layout
25098
25099 \series bold
25100 Note
25101 \series default
25102 : shapepar paragraphs cannot run over a page break.
25103 \end_layout
25104
25105 \end_inset
25106
25107
25108 \end_layout
25109
25110 \begin_layout Standard
25111 \begin_inset VSpace bigskip
25112 \end_inset
25113
25114
25115 \end_layout
25116
25117 \begin_layout Standard
25118
25119 \series bold
25120 shapepar
25121 \series default
25122  takes care that the shape will always be preserved, no matter how much
25123  text is in the paragraph.
25124  Therefore the paragraph size changes with the amount of contained text.
25125  This can lead to paragraph sizes exceeding the page margins.
25126  To demonstrate the size scaling, here is the same example paragraph but
25127  with twice as much text:
25128 \end_layout
25129
25130 \begin_layout Standard
25131 \begin_inset Newpage newpage
25132 \end_inset
25133
25134
25135 \end_layout
25136
25137 \begin_layout Nut
25138
25139 \lang latin
25140 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25141  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25142  voluptua.
25143  At vero eos et accusam et justo duo dolores et ea rebum.
25144  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25145  sit amet.
25146  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25147  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25148  voluptua.
25149  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25150  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25151  voluptua.
25152  At vero eos et accusam et justo duo dolores et ea rebum.
25153  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25154  sit amet.
25155  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25156  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25157  voluptua.
25158 \end_layout
25159
25160 \begin_layout Standard
25161 \begin_inset VSpace bigskip
25162 \end_inset
25163
25164
25165 \end_layout
25166
25167 \begin_layout Standard
25168 An exception is the shape 
25169 \family sans
25170 CDlabel
25171 \family default
25172 .
25173  It cannot be scaled because it must fit the size of a CD/DVD.
25174  Therefore the amount of text that fits into the shape is limited.
25175 \begin_inset Newline newline
25176 \end_inset
25177
25178 The 
25179 \family sans
25180 drop
25181 \family default
25182  shapes and the 
25183 \family sans
25184 circle
25185 \family default
25186  shape are fragile, meaning that the calculation of their size can fail,
25187  depending on the amount of text.
25188  You will then get the LaTeX error 
25189 \begin_inset Quotes eld
25190 \end_inset
25191
25192 Arithmetic overflow
25193 \begin_inset Quotes erd
25194 \end_inset
25195
25196 .
25197  In this case one can try to remove or add some text; if nothing works one
25198  has to use another shape.
25199 \end_layout
25200
25201 \begin_layout Standard
25202 \begin_inset VSpace bigskip
25203 \end_inset
25204
25205
25206 \end_layout
25207
25208 \begin_layout Standard
25209 For shapes with tips you will maybe see that LaTeX's hyphenation routine
25210  fails for text in the tips.
25211  Therefore it is often necessary to add hyphenation points 
25212 \family sans
25213 (
25214 \begin_inset Info
25215 type  "shortcut"
25216 arg   "specialchar-insert hyphenation"
25217 \end_inset
25218
25219
25220 \family default
25221 ) to the corresponding text parts.
25222 \end_layout
25223
25224 \begin_layout Standard
25225 \begin_inset VSpace bigskip
25226 \end_inset
25227
25228
25229 \end_layout
25230
25231 \begin_layout Standard
25232 Shapepar paragraphs are either always centered or placed on the page so
25233  that their left border touches the left page margin.
25234  You can therefore not use the paragraph dialog to align such paragraphs.
25235  A solution is to put the paragraph into a minipage or parbox and align
25236  the box.
25237  The problem is hereby to find the right width for the box.
25238  Because if it is too wide and you center the box, the paragraph is not
25239  centered too because it sticks at the left side of the box.
25240  So you might have to play a bit with the width until it fits.
25241  Here are two heart-shaped paragraphs, the first one is not aligned, the
25242  second one is right-aligned:
25243 \end_layout
25244
25245 \begin_layout Standard
25246 \begin_inset Newpage newpage
25247 \end_inset
25248
25249
25250 \end_layout
25251
25252 \begin_layout Heart
25253 \noindent
25254
25255 \lang latin
25256 Lo\SpecialChar \-
25257 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25258  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25259  voluptua.
25260  At vero eos et accusam et justo duo dolores et ea rebum.
25261  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25262  sit amet.
25263 \end_layout
25264
25265 \begin_layout Standard
25266 \begin_inset VSpace bigskip
25267 \end_inset
25268
25269
25270 \end_layout
25271
25272 \begin_layout Standard
25273 \noindent
25274 \align right
25275 \begin_inset Box Frameless
25276 position "t"
25277 hor_pos "c"
25278 has_inner_box 1
25279 inner_pos "t"
25280 use_parbox 1
25281 use_makebox 0
25282 width "42col%"
25283 special "none"
25284 height "1in"
25285 height_special "totalheight"
25286 status open
25287
25288 \begin_layout Heart
25289 \noindent
25290
25291 \lang latin
25292 Lo\SpecialChar \-
25293 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25294  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25295  voluptua.
25296  At vero eos et accusam et justo duo dolores et ea rebum.
25297  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25298  sit amet.
25299 \end_layout
25300
25301 \end_inset
25302
25303
25304 \end_layout
25305
25306 \begin_layout Subsection
25307 Custom shapes
25308 \end_layout
25309
25310 \begin_layout Standard
25311 You can define any shape you want.
25312  Doing this manually is a lot of work because every coordinate must be specified.
25313  But there is a way to let the computer calculate the coordinates:
25314 \end_layout
25315
25316 \begin_layout Enumerate
25317 Install the program 
25318 \begin_inset CommandInset href
25319 LatexCommand href
25320 name "Jpgfdraw"
25321 target "http://www.ctan.org/tex-archive/graphics/jpgfdraw"
25322
25323 \end_inset
25324
25325 .
25326 \end_layout
25327
25328 \begin_layout Enumerate
25329 In 
25330 \family sans
25331 Jpgfdraw
25332 \family default
25333  go to the menu 
25334 \family sans
25335 Te
25336 \begin_inset ERT
25337 status collapsed
25338
25339 \begin_layout Plain Layout
25340
25341 {}
25342 \end_layout
25343
25344 \end_inset
25345
25346 X/LaT
25347 \begin_inset ERT
25348 status collapsed
25349
25350 \begin_layout Plain Layout
25351
25352 {}
25353 \end_layout
25354
25355 \end_inset
25356
25357 eX\SpecialChar \menuseparator
25358 Settings\SpecialChar \menuseparator
25359 Set Normal Size
25360 \family default
25361  and select the font size you are using in your document.
25362  For example this document uses the size 12
25363 \begin_inset space \thinspace{}
25364 \end_inset
25365
25366 pt.
25367 \end_layout
25368
25369 \begin_layout Enumerate
25370 Draw a shape.
25371 \end_layout
25372
25373 \begin_layout Enumerate
25374 Use the menu 
25375 \family sans
25376 Te
25377 \begin_inset ERT
25378 status collapsed
25379
25380 \begin_layout Plain Layout
25381
25382 {}
25383 \end_layout
25384
25385 \end_inset
25386
25387 X/LaT
25388 \begin_inset ERT
25389 status collapsed
25390
25391 \begin_layout Plain Layout
25392
25393 {}
25394 \end_layout
25395
25396 \end_inset
25397
25398 eX\SpecialChar \menuseparator
25399 Shapepar
25400 \family default
25401  to export the shape to coordinates.
25402  In the appearing dialog use either the outline of your shape for the coordinate
25403 s or the path itself.
25404 \begin_inset Foot
25405 status collapsed
25406
25407 \begin_layout Plain Layout
25408 For more information see 
25409 \begin_inset CommandInset href
25410 LatexCommand href
25411 target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html"
25412
25413 \end_inset
25414
25415
25416 \end_layout
25417
25418 \end_inset
25419
25420
25421 \end_layout
25422
25423 \begin_layout Standard
25424 The coordinates are written into a TeX-file.
25425  To use it for your LyX document
25426 \end_layout
25427
25428 \begin_layout Enumerate
25429 Place the cursor before the first character of your paragraph (or into a
25430  new empty one).
25431 \end_layout
25432
25433 \begin_layout Enumerate
25434 Open in LyX the menu 
25435 \family sans
25436 Insert\SpecialChar \menuseparator
25437 File\SpecialChar \menuseparator
25438 Child
25439 \begin_inset space ~
25440 \end_inset
25441
25442 Document
25443 \family default
25444 , select the file and use 
25445 \family sans
25446 Input
25447 \family default
25448  as 
25449 \family sans
25450 Include Type.
25451 \end_layout
25452
25453 \begin_layout Standard
25454 \begin_inset VSpace defskip
25455 \end_inset
25456
25457
25458 \end_layout
25459
25460 \begin_layout Standard
25461 \begin_inset Note Greyedout
25462 status open
25463
25464 \begin_layout Plain Layout
25465
25466 \series bold
25467 Note
25468 \series default
25469 : The changed shape only applies to the current paragraph; everything is
25470  reset to normal for the next paragraph.
25471  Therefore the shape definition file must be input into every paragraph
25472  with the desired shape.
25473 \end_layout
25474
25475 \end_inset
25476
25477
25478 \end_layout
25479
25480 \begin_layout Standard
25481 \begin_inset VSpace bigskip
25482 \end_inset
25483
25484
25485 \end_layout
25486
25487 \begin_layout Standard
25488 Here is an example:
25489 \end_layout
25490
25491 \begin_layout Standard
25492 \begin_inset VSpace bigskip
25493 \end_inset
25494
25495
25496 \end_layout
25497
25498 \begin_layout Standard
25499 \begin_inset CommandInset include
25500 LatexCommand input
25501 filename "SpecialParagraphShape.tex"
25502
25503 \end_inset
25504
25505
25506 \lang latin
25507 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25508  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25509  voluptua.
25510  At vero eos et accusam et justo duo dolores et ea rebum.
25511  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25512  sit amet.
25513  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25514  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25515  voluptua.
25516 \end_layout
25517
25518 \begin_layout Standard
25519 \begin_inset VSpace bigskip
25520 \end_inset
25521
25522
25523 \end_layout
25524
25525 \begin_layout Standard
25526
25527 \series bold
25528 A tip:
25529 \series default
25530  to draw complexer shapes in 
25531 \family sans
25532 Jpgfdraw
25533 \family default
25534  you can draw the shape in a program of your choice and import the resulting
25535  image to 
25536 \family sans
25537 Jpgfdraw
25538 \family default
25539 .
25540  Then you only need to draw a line or spline along the outline of the image.
25541 \end_layout
25542
25543 \begin_layout Standard
25544 \begin_inset VSpace bigskip
25545 \end_inset
25546
25547
25548 \end_layout
25549
25550 \begin_layout Standard
25551 The module 
25552 \family sans
25553 Custom paragraph shapes
25554 \family default
25555  also provides the two commands 
25556 \family sans
25557 shapepar
25558 \family default
25559  and 
25560 \family sans
25561 Shapepar
25562 \family default
25563  which can be used to define custom shapes coordinate by coordinate.
25564 \begin_inset Foot
25565 status collapsed
25566
25567 \begin_layout Plain Layout
25568 These commands are internally used for all shapes described here.
25569 \end_layout
25570
25571 \end_inset
25572
25573  For information how these styles are used and about further customization
25574  possibilities, have a look at the documentation of the package 
25575 \series bold
25576 shapepar
25577 \series default
25578
25579 \begin_inset CommandInset citation
25580 LatexCommand cite
25581 key "shapepar"
25582
25583 \end_inset
25584
25585 .
25586 \end_layout
25587
25588 \begin_layout Bibliography
25589 \begin_inset CommandInset bibitem
25590 LatexCommand bibitem
25591 key "multicol"
25592
25593 \end_inset
25594
25595 Documentation of the LaTeX-package 
25596 \begin_inset CommandInset href
25597 LatexCommand href
25598 name "multicol"
25599 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
25600
25601 \end_inset
25602
25603
25604 \end_layout
25605
25606 \begin_layout Bibliography
25607 \begin_inset CommandInset bibitem
25608 LatexCommand bibitem
25609 key "shapepar"
25610
25611 \end_inset
25612
25613 Documentation of the LaTeX-package 
25614 \begin_inset CommandInset href
25615 LatexCommand href
25616 name "shapepar"
25617 target "http://mirrors.ctan.org/macros/latex/contrib/shapepar/shapepar.pdf"
25618
25619 \end_inset
25620
25621
25622 \end_layout
25623
25624 \end_body
25625 \end_document