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