]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
multicol.module: use the layout argument mechanism
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 459
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 esint 0
105 \use_package mathdots 1
106 \use_package mathtools 0
107 \use_package mhchem 1
108 \use_package stackrel 0
109 \use_package stmaryrd 0
110 \use_package undertilde 0
111 \cite_engine basic
112 \cite_engine_type numerical
113 \biblio_style plain
114 \use_bibtopic false
115 \use_indices false
116 \paperorientation portrait
117 \suppress_date false
118 \justification true
119 \use_refstyle 0
120 \notefontcolor #0000ff
121 \index Index
122 \shortcut idx
123 \color #008000
124 \end_index
125 \secnumdepth 3
126 \tocdepth 3
127 \paragraph_separation indent
128 \paragraph_indentation default
129 \quotes_language english
130 \papercolumns 1
131 \papersides 2
132 \paperpagestyle headings
133 \tracking_changes false
134 \output_changes false
135 \html_math_output 0
136 \html_css_as_file 0
137 \html_be_strict true
138 \end_header
139
140 \begin_body
141
142 \begin_layout Title
143 Additional LyX Features
144 \end_layout
145
146 \begin_layout Subtitle
147 Version 2.0.x
148 \end_layout
149
150 \begin_layout Author
151 by the LyX Team
152 \begin_inset Foot
153 status collapsed
154
155 \begin_layout Plain Layout
156 \noindent
157 Principal maintainer of this file is
158 \noun on
159  Richard Heck
160 \noun default
161 .
162  If you have comments or error corrections, please send them to the LyX
163  Documentation mailing list, 
164 \begin_inset Flex Code
165 status collapsed
166
167 \begin_layout Plain Layout
168 \noindent
169 <lyx-docs@lists.lyx.org>
170 \end_layout
171
172 \end_inset
173
174 .
175 \end_layout
176
177 \end_inset
178
179
180 \end_layout
181
182 \begin_layout Standard
183 \begin_inset CommandInset toc
184 LatexCommand tableofcontents
185
186 \end_inset
187
188
189 \end_layout
190
191 \begin_layout Chapter
192 Introduction
193 \end_layout
194
195 \begin_layout Standard
196 This manual is essentially Part II of the 
197 \emph on
198 User's Guide\SpecialChar \@.
199
200 \emph default
201  The reason for separating the two documents is simple: the 
202 \emph on
203 User's Guide
204 \emph default
205  is already quite lengthy, and it contains information on all of the basic
206  features one needs to know in order to prepare most documents.
207  However, the LyX Team has worked to make LyX extensible through various
208  configuration files and external packages.
209  That means that if you want to support the Fizzwizzle LaTeX package, you
210  can create a layout file (or module) for it without having to alter LyX
211  itself.
212  We've already had contributions of several new features this way, and some
213  of them are documented here.
214  There are also some more `advanced' features, such as how to control the
215  presentation of bibliographies and how to work with multi-part documents,
216  that are not covered in the 
217 \emph on
218 User's Guide
219 \emph default
220  and are discussed here.
221 \end_layout
222
223 \begin_layout Standard
224 This manual also documents some special features, like fax support, version
225  control, and SGML support, which require additional software to work properly.
226  There is also a chapter on LyX's support for HTML.
227  And lastly, there's a chapter of LaTeX tools and tips, things you can use
228  to spruce up your documents by directly using the powerful features of
229  LaTeX.
230  After all, LyX 
231 \emph on
232 is
233 \emph default
234  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
235 \end_layout
236
237 \begin_layout Standard
238 If you haven't read the 
239 \emph on
240 Introduction
241 \emph default
242  yet, you are definitely in the wrong manual.
243  The 
244 \emph on
245 Introduction
246 \emph default
247  is the first place to go, since it describes the notation and format of
248  all of the manuals.
249  You should also be thoroughly familiar with the 
250 \emph on
251 User's Guide
252 \emph default
253  and all of the basic features of LyX before attempting to read this one.
254 \end_layout
255
256 \begin_layout Standard
257 Since many of the topics in this manual depend heavily on LyX's interaction
258  with LaTeX, this first chapter covers the inner workings of LyX and how
259  to direct LyX to generate exactly the LaTeX code you want.
260  It is obviously for more seasoned LyX users.
261 \end_layout
262
263 \begin_layout Chapter
264 LyX and LaTeX
265 \end_layout
266
267 \begin_layout Section
268 How LyX Uses LaTeX
269 \end_layout
270
271 \begin_layout Standard
272 This chapter is for both TeX-nicians and the LaTeX-curious.
273  In it, we'll explain how LyX and LaTeX work together to produce printable
274  output.
275  This is the only place in any of the manuals where we assume you know something
276  about LaTeX.
277 \end_layout
278
279 \begin_layout Standard
280 At one time, LyX was called a 
281 \begin_inset Quotes eld
282 \end_inset
283
284 WYSIWYM frontend to LaTeX,
285 \begin_inset Quotes erd
286 \end_inset
287
288  but that's no longer true.
289  There are frontends to LaTeX out there.
290 \begin_inset Foot
291 status collapsed
292
293 \begin_layout Plain Layout
294 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
295  There are also the LaTeX modes for vi and emacs, of course.
296 \end_layout
297
298 \end_inset
299
300  These are basically text editors with the ability to run LaTeX and mark
301  any errors in the file you're editing.
302  Although LyX 
303 \emph on
304 is
305 \emph default
306  an editor, and it 
307 \emph on
308 does
309 \emph default
310  run LaTeX, and it also indicates errors in the file, it also does much,
311  much more.
312  For one thing, you don't need to know LaTeX to use LyX effectively.
313  And LyX has added its own extensions to LaTeX.
314  Try the following sometime: select 
315 \begin_inset Flex MenuItem
316 status collapsed
317
318 \begin_layout Plain Layout
319 Export\SpecialChar \menuseparator
320 LaTeX
321 \end_layout
322
323 \end_inset
324
325  from the 
326 \begin_inset Flex MenuItem
327 status collapsed
328
329 \begin_layout Plain Layout
330 File
331 \end_layout
332
333 \end_inset
334
335  menu (or 
336 \begin_inset Flex MenuItem
337 status collapsed
338
339 \begin_layout Plain Layout
340 View\SpecialChar \menuseparator
341 Source
342 \end_layout
343
344 \end_inset
345
346 ), then look at the preamble of the resulting 
347 \begin_inset Flex Code
348 status collapsed
349
350 \begin_layout Plain Layout
351 .tex
352 \end_layout
353
354 \end_inset
355
356  file.
357  You'll notice a variety of new macros defined specifically by LyX.
358  These macros are defined automatically, according to the features you use
359  in the document.
360 \end_layout
361
362 \begin_layout Standard
363 There are several commands that automatically invoke LaTeX.
364  They are:
365 \end_layout
366
367 \begin_layout Itemize
368 \begin_inset Flex MenuItem
369 status collapsed
370
371 \begin_layout Plain Layout
372 View\SpecialChar \menuseparator
373 View
374 \end_layout
375
376 \end_inset
377
378
379 \end_layout
380
381 \begin_layout Itemize
382 \begin_inset Flex MenuItem
383 status collapsed
384
385 \begin_layout Plain Layout
386 View\SpecialChar \menuseparator
387 Update
388 \end_layout
389
390 \end_inset
391
392
393 \end_layout
394
395 \begin_layout Itemize
396 \begin_inset Flex MenuItem
397 status collapsed
398
399 \begin_layout Plain Layout
400 File\SpecialChar \menuseparator
401 Print
402 \end_layout
403
404 \end_inset
405
406
407 \end_layout
408
409 \begin_layout Itemize
410 \begin_inset Flex MenuItem
411 status collapsed
412
413 \begin_layout Plain Layout
414 File\SpecialChar \menuseparator
415 Fax
416 \end_layout
417
418 \end_inset
419
420
421 \end_layout
422
423 \begin_layout Standard
424 They will only invoke LaTeX if the file has changed since the last time
425  LaTeX was run.
426  
427 \end_layout
428
429 \begin_layout Standard
430 When LyX runs LaTeX on the file you're editing, it performs these steps:
431 \end_layout
432
433 \begin_layout Enumerate
434 Convert the document to LaTeX and save to a file with the extension 
435 \begin_inset Flex Code
436 status collapsed
437
438 \begin_layout Plain Layout
439 .tex
440 \end_layout
441
442 \end_inset
443
444  in place of 
445 \begin_inset Flex Code
446 status collapsed
447
448 \begin_layout Plain Layout
449 .lyx
450 \end_layout
451
452 \end_inset
453
454 .
455 \end_layout
456
457 \begin_layout Enumerate
458 Run LaTeX on the 
459 \begin_inset Flex Code
460 status collapsed
461
462 \begin_layout Plain Layout
463 .tex
464 \end_layout
465
466 \end_inset
467
468  file (maybe several times), and run any other commands (such as 
469 \begin_inset Flex Code
470 status collapsed
471
472 \begin_layout Plain Layout
473 bibtex
474 \end_layout
475
476 \end_inset
477
478  or 
479 \begin_inset Flex Code
480 status collapsed
481
482 \begin_layout Plain Layout
483 makeindex
484 \end_layout
485
486 \end_inset
487
488 ) needed to compile the LaTeX file.
489 \end_layout
490
491 \begin_layout Enumerate
492 If there are any errors, show the error log.
493 \end_layout
494
495 \begin_layout Standard
496 If you have run LaTeX using 
497 \begin_inset Flex MenuItem
498 status collapsed
499
500 \begin_layout Plain Layout
501 View
502 \bar under
503 \SpecialChar \menuseparator
504
505 \bar default
506 DVI
507 \end_layout
508
509 \end_inset
510
511 , LyX then runs a DVI viewer to display the DVI-file.
512  If you have used 
513 \begin_inset Flex MenuItem
514 status collapsed
515
516 \begin_layout Plain Layout
517 View
518 \bar under
519 \SpecialChar \menuseparator
520
521 \bar default
522 PostScript
523 \end_layout
524
525 \end_inset
526
527 , LyX performs further steps:
528 \end_layout
529
530 \begin_layout Itemize
531 Run 
532 \begin_inset Flex Code
533 status collapsed
534
535 \begin_layout Plain Layout
536 dvips
537 \end_layout
538
539 \end_inset
540
541  to convert the DVI file to PostScript.
542 \end_layout
543
544 \begin_layout Itemize
545 Run a PostScript viewer, such as 
546 \begin_inset Flex Code
547 status collapsed
548
549 \begin_layout Plain Layout
550 ghostview
551 \end_layout
552
553 \end_inset
554
555 , to display the PostScript file.
556 \end_layout
557
558 \begin_layout Standard
559 LyX does similar things when viewing, or exporting, other formats.
560 \end_layout
561
562 \begin_layout Section
563 Translating LaTeX files into LyX
564 \end_layout
565
566 \begin_layout Standard
567 You can import a LaTeX file into LyX by using the 
568 \begin_inset Flex MenuItem
569 status collapsed
570
571 \begin_layout Plain Layout
572 File\SpecialChar \menuseparator
573 Import\SpecialChar \menuseparator
574 LaTeX
575 \end_layout
576
577 \end_inset
578
579  command in LyX.
580  This will call a program named 
581 \begin_inset Flex Code
582 status collapsed
583
584 \begin_layout Plain Layout
585 tex2lyx
586 \end_layout
587
588 \end_inset
589
590  which will create a file 
591 \begin_inset Flex Code
592 status collapsed
593
594 \begin_layout Plain Layout
595 foo.lyx
596 \end_layout
597
598 \end_inset
599
600  from the file 
601 \begin_inset Flex Code
602 status collapsed
603
604 \begin_layout Plain Layout
605 foo.tex
606 \end_layout
607
608 \end_inset
609
610 .
611  LyX will then open that file.
612 \begin_inset Foot
613 status collapsed
614
615 \begin_layout Plain Layout
616 \begin_inset Flex Code
617 status collapsed
618
619 \begin_layout Plain Layout
620 tex2lyx
621 \end_layout
622
623 \end_inset
624
625  can also be run from the command line, of course.
626 \end_layout
627
628 \end_inset
629
630
631 \end_layout
632
633 \begin_layout Standard
634 \begin_inset Flex Code
635 status collapsed
636
637 \begin_layout Plain Layout
638 tex2lyx
639 \end_layout
640
641 \end_inset
642
643  will translate most legal LaTeX, but not everything.
644  It will put things it doesn't understand into TeX code, so after translating
645  a file with 
646 \begin_inset Flex Code
647 status collapsed
648
649 \begin_layout Plain Layout
650 tex2lyx
651 \end_layout
652
653 \end_inset
654
655 , you can look for TeX code and hand-edit it until it looks right.
656 \end_layout
657
658 \begin_layout Standard
659 If you don't know what TeX code is, read the next section.
660 \end_layout
661
662 \begin_layout Section
663 \begin_inset CommandInset label
664 LatexCommand label
665 name "sec:Inserting-TeX-Code"
666
667 \end_inset
668
669 Inserting TeX Code into LyX Documents 
670 \end_layout
671
672 \begin_layout Standard
673 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
674  You can always insert TeX code into any LyX document.
675  LyX cannot, and will never be able to, display every possible LaTeX construct.
676  If ever you need to insert LaTeX commands into your LyX document, you can
677  use the 
678 \begin_inset Flex Code
679 status collapsed
680
681 \begin_layout Plain Layout
682 TeX Code
683 \end_layout
684
685 \end_inset
686
687  box, which you can insert into your document with 
688 \begin_inset Flex MenuItem
689 status collapsed
690
691 \begin_layout Plain Layout
692 Insert\SpecialChar \menuseparator
693 TeX Code
694 \end_layout
695
696 \end_inset
697
698  or the keyboard shortcut 
699 \begin_inset Info
700 type  "shortcut"
701 arg   "ert-insert"
702 \end_inset
703
704 .
705 \end_layout
706
707 \begin_layout Standard
708 Here's an example of inserting LaTeX commands in a LyX document.
709  The code looks like this:
710 \end_layout
711
712 \begin_layout LyX-Code
713
714 \backslash
715 begin{tabular}{ll}
716 \begin_inset Newline newline
717 \end_inset
718
719
720 \backslash
721 begin{minipage}{5cm}
722 \begin_inset Newline newline
723 \end_inset
724
725 This is an example of a minipage environment.
726  You 
727 \begin_inset Newline newline
728 \end_inset
729
730 can put nearly everything in it, even (non-floating) 
731 \begin_inset Newline newline
732 \end_inset
733
734 figures and tables.
735  
736 \begin_inset Newline newline
737 \end_inset
738
739
740 \backslash
741 end{minipage}
742 \begin_inset Newline newline
743 \end_inset
744
745 &
746 \begin_inset Newline newline
747 \end_inset
748
749
750 \backslash
751 begin{minipage}{5cm}
752 \begin_inset Newline newline
753 \end_inset
754
755
756 \backslash
757 begin{verbatim}
758 \begin_inset Newline newline
759 \end_inset
760
761
762 \backslash
763 begin{minipage}{5cm}
764 \begin_inset Newline newline
765 \end_inset
766
767 This ...
768  
769 \begin_inset Newline newline
770 \end_inset
771
772
773 \backslash
774 end{minipage}
775 \begin_inset Newline newline
776 \end_inset
777
778
779 \backslash
780 end{verbatim}
781 \begin_inset Newline newline
782 \end_inset
783
784
785 \backslash
786 end{minipage}
787 \begin_inset Newline newline
788 \end_inset
789
790
791 \backslash
792 end{tabular}
793 \end_layout
794
795 \begin_layout LyX-Code
796
797 \end_layout
798
799 \begin_layout Standard
800 The 
801 \begin_inset Flex Code
802 status collapsed
803
804 \begin_layout Plain Layout
805 TeX Code
806 \end_layout
807
808 \end_inset
809
810  box containing this text is directly after this paragraph.
811  Those of you reading the manual in LyX will only see the TeX code inset.
812  Those reading a printed version of the manuals will see the actual results:
813 \begin_inset VSpace bigskip
814 \end_inset
815
816
817 \end_layout
818
819 \begin_layout Standard
820 \begin_inset ERT
821 status open
822
823 \begin_layout Plain Layout
824
825
826 \backslash
827 begin{tabular}{ll}
828 \end_layout
829
830 \begin_layout Plain Layout
831
832
833 \backslash
834 begin{minipage}{5cm}
835 \end_layout
836
837 \begin_layout Plain Layout
838
839 This is an example of a minipage environment.
840  You can put nearly everything in it, even (non-floating) figures and tables.
841  
842 \end_layout
843
844 \begin_layout Plain Layout
845
846
847 \backslash
848 end{minipage}
849 \end_layout
850
851 \begin_layout Plain Layout
852
853 &
854 \end_layout
855
856 \begin_layout Plain Layout
857
858
859 \backslash
860 begin{minipage}{5cm}
861 \end_layout
862
863 \begin_layout Plain Layout
864
865
866 \backslash
867 begin{verbatim}
868 \end_layout
869
870 \begin_layout Plain Layout
871
872
873 \backslash
874 begin{minipage}{5cm}
875 \end_layout
876
877 \begin_layout Plain Layout
878
879 This ...
880  
881 \end_layout
882
883 \begin_layout Plain Layout
884
885
886 \backslash
887 end{minipage}
888 \end_layout
889
890 \begin_layout Plain Layout
891
892
893 \backslash
894 end{verbatim}
895 \end_layout
896
897 \begin_layout Plain Layout
898
899
900 \backslash
901 end{minipage}
902 \end_layout
903
904 \begin_layout Plain Layout
905
906
907 \backslash
908 end{tabular}
909 \end_layout
910
911 \end_inset
912
913
914 \begin_inset VSpace bigskip
915 \end_inset
916
917
918 \end_layout
919
920 \begin_layout Standard
921 In addition to using TeX code, you can also create a separate file containing
922  some complex LaTeX structure and then use 
923 \begin_inset Flex MenuItem
924 status collapsed
925
926 \begin_layout Plain Layout
927 Insert\SpecialChar \menuseparator
928 Child
929 \begin_inset space ~
930 \end_inset
931
932 Document
933 \end_layout
934
935 \end_inset
936
937  to include your file (you should select the type 
938 \begin_inset Flex Code
939 status collapsed
940
941 \begin_layout Plain Layout
942 Input
943 \end_layout
944
945 \end_inset
946
947 ).
948  We recommend that you only do this if you have a 
949 \begin_inset Flex Code
950 status collapsed
951
952 \begin_layout Plain Layout
953 .tex
954 \end_layout
955
956 \end_inset
957
958  file which you 
959 \emph on
960 know
961 \emph default
962  works already.
963  Otherwise, you'll have a big job tracking down LaTeX errors.
964 \end_layout
965
966 \begin_layout Standard
967 There are a few last points to emphasize:
968 \end_layout
969
970 \begin_layout Itemize
971 LyX 
972 \emph on
973 does not
974 \emph default
975  check if your LaTeX code is correct.
976 \end_layout
977
978 \begin_layout Itemize
979 Beware of reinventing the wheel.
980 \end_layout
981
982 \begin_layout Standard
983 On that last point, LyX does have quite a few features tucked into it, and
984  more are coming.
985  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
986  feature before you decide you have to do it by hand.
987  Moreover, there are numerous LaTeX packages out there to do all sorts of
988  things, from labels to envelopes to fancy multipage tables.
989  Check out 
990 \begin_inset CommandInset href
991 LatexCommand href
992 name "CTAN"
993 target "http://www.ctan.org/"
994
995 \end_inset
996
997  for details.
998 \end_layout
999
1000 \begin_layout Standard
1001 If you do need to do some wild and fancy things within your document, be
1002  sure to check out a good LaTeX book for assistance.
1003  There are a number of them listed in the bibliography of the 
1004 \emph on
1005 User's Guide
1006 \emph default
1007 .
1008 \end_layout
1009
1010 \begin_layout Section
1011 LyX and the LaTeX Preamble
1012 \end_layout
1013
1014 \begin_layout Subsection
1015 About the LaTeX Preamble
1016 \end_layout
1017
1018 \begin_layout Standard
1019 If you already know LaTeX, there is no need to explain here what the preamble
1020  is good for.
1021  If you don't, the following will give you some ideas—we recommend again
1022  that you consult a LaTeX book for further information.
1023  In any case, you should read the points below, because they explain what
1024  you can do and what you don't need to do in the LaTeX preamble of a LyX
1025  document.
1026 \end_layout
1027
1028 \begin_layout Standard
1029 The LaTeX preamble comes at the very beginning of a document, 
1030 \emph on
1031 before
1032 \emph default
1033  the text.
1034  It serves to:
1035 \end_layout
1036
1037 \begin_layout Itemize
1038 Declare the document class.
1039  
1040 \begin_inset Newline newline
1041 \end_inset
1042
1043 LyX already does this for you.
1044  If you're a seasoned LaTeX-nician, and you have a custom document class
1045  you want to use, check out the 
1046 \emph on
1047 Customization Manual
1048 \emph default
1049  for information on how to make LyX interface to it.
1050 \end_layout
1051
1052 \begin_layout Itemize
1053 Declare the usage of packages.
1054  
1055 \begin_inset Newline newline
1056 \end_inset
1057
1058 LaTeX packages provide special commands, which are only available within
1059  a document when the package has been declared in the preamble.
1060  In addition to providing special commands, the inclusion of a package can
1061  change the document.
1062  For example, the package 
1063 \begin_inset Flex Code
1064 status collapsed
1065
1066 \begin_layout Plain Layout
1067 indentfirst
1068 \end_layout
1069
1070 \end_inset
1071
1072  forces all paragraphs to be indented.
1073  There are other packages for labels, envelopes, margins, etc.
1074  
1075 \end_layout
1076
1077 \begin_layout Itemize
1078 Set counters, variables, lengths and widths.
1079  
1080 \begin_inset Newline newline
1081 \end_inset
1082
1083 There are several LaTeX counters and variables that 
1084 \emph on
1085 must
1086 \emph default
1087  be set globally from within the preamble in order to have the desired effect.
1088  (There are variables that you can set and reset inside the document, too.)
1089  Margins are a good example of something that must be set in the preamble.
1090  Another example is the label format for lists.
1091  You can actually set these just about anywhere, but it's best to do it
1092  just once, inside the preamble.
1093 \end_layout
1094
1095 \begin_layout Itemize
1096 Declare user defined commands (with 
1097 \begin_inset Flex Code
1098 status collapsed
1099
1100 \begin_layout Plain Layout
1101
1102 \backslash
1103 newcommand
1104 \end_layout
1105
1106 \end_inset
1107
1108  or 
1109 \begin_inset Flex Code
1110 status collapsed
1111
1112 \begin_layout Plain Layout
1113
1114 \backslash
1115 renewcommand
1116 \end_layout
1117
1118 \end_inset
1119
1120 ).
1121 \begin_inset Newline newline
1122 \end_inset
1123
1124 These are abbreviations for LaTeX commands which appear very often inside
1125  a document.
1126  Although the preamble is a good place to declare such commands, they 
1127 \emph on
1128 can
1129 \emph default
1130  be declared anywhere (before they are used for the first time, of course).
1131  This can be useful if there is a lot of raw LaTeX code in your document,
1132  which normally should not be the case.
1133 \end_layout
1134
1135 \begin_layout Standard
1136 LyX adds its own set of definitions to the preamble of the 
1137 \begin_inset Flex Code
1138 status collapsed
1139
1140 \begin_layout Plain Layout
1141 .tex
1142 \end_layout
1143
1144 \end_inset
1145
1146  file it produces.
1147  This makes LaTeX files generated by LyX portable.
1148 \end_layout
1149
1150 \begin_layout Subsection
1151 Changing the Preamble
1152 \end_layout
1153
1154 \begin_layout Standard
1155 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1156  can't change them without patching LyX itself.
1157  You can, however, add your own stuff to the preamble by selecting 
1158 \begin_inset Flex MenuItem
1159 status collapsed
1160
1161 \begin_layout Plain Layout
1162 LaTeX
1163 \begin_inset space ~
1164 \end_inset
1165
1166 Preamble
1167 \end_layout
1168
1169 \end_inset
1170
1171  in the 
1172 \begin_inset Flex MenuItem
1173 status collapsed
1174
1175 \begin_layout Plain Layout
1176 Document\SpecialChar \menuseparator
1177 Settings
1178 \end_layout
1179
1180 \end_inset
1181
1182  dialog.
1183  LyX adds anything in the 
1184 \begin_inset Flex MenuItem
1185 status collapsed
1186
1187 \begin_layout Plain Layout
1188 Preamble
1189 \end_layout
1190
1191 \end_inset
1192
1193  dialog to its own built-in preamble.
1194  Before adding your own declarations in the preamble, you should make sure
1195  that LyX doesn't already support what you want to do.
1196  (Remember what we said about reinventing the wheel?) Also, 
1197 \emph on
1198 make sure your preamble code is correct
1199 \emph default
1200 .
1201  LyX doesn't check it for you.
1202  If there is an error, you're likely to get an error like 
1203 \begin_inset Quotes eld
1204 \end_inset
1205
1206
1207 \begin_inset Flex Code
1208 status collapsed
1209
1210 \begin_layout Plain Layout
1211 Missing 
1212 \backslash
1213 begin{document}
1214 \end_layout
1215
1216 \end_inset
1217
1218
1219 \begin_inset Quotes erd
1220 \end_inset
1221
1222 .
1223  If you see this error, check your preamble.
1224 \end_layout
1225
1226 \begin_layout Subsection
1227 Examples
1228 \end_layout
1229
1230 \begin_layout Standard
1231 Here are some examples of what you can add to a preamble, and what they
1232  do.
1233 \end_layout
1234
1235 \begin_layout Subsubsection
1236 Example #1: Offsets
1237 \end_layout
1238
1239 \begin_layout Standard
1240 There are two variables under LaTeX that control page position: 
1241 \begin_inset Flex Code
1242 status collapsed
1243
1244 \begin_layout Plain Layout
1245
1246 \backslash
1247 hoffset
1248 \end_layout
1249
1250 \end_inset
1251
1252  and 
1253 \begin_inset Flex Code
1254 status collapsed
1255
1256 \begin_layout Plain Layout
1257
1258 \backslash
1259 voffset
1260 \end_layout
1261
1262 \end_inset
1263
1264 .
1265  Their names should be self-explanatory.
1266  These variables are useful if you think for a moment about computer labels.
1267  Sometimes, the size of a print medium and the area of the medium that you
1268  can actually print on aren't the same.
1269  This is where 
1270 \begin_inset Flex Code
1271 status collapsed
1272
1273 \begin_layout Plain Layout
1274
1275 \backslash
1276 hoffset
1277 \end_layout
1278
1279 \end_inset
1280
1281  and 
1282 \begin_inset Flex Code
1283 status collapsed
1284
1285 \begin_layout Plain Layout
1286
1287 \backslash
1288 voffset
1289 \end_layout
1290
1291 \end_inset
1292
1293  come in.
1294 \end_layout
1295
1296 \begin_layout Standard
1297 The default values for 
1298 \begin_inset Flex Code
1299 status collapsed
1300
1301 \begin_layout Plain Layout
1302
1303 \backslash
1304 hoffset
1305 \end_layout
1306
1307 \end_inset
1308
1309  and 
1310 \begin_inset Flex Code
1311 status collapsed
1312
1313 \begin_layout Plain Layout
1314
1315 \backslash
1316 voffset
1317 \end_layout
1318
1319 \end_inset
1320
1321  are both 0
1322 \begin_inset space \thinspace{}
1323 \end_inset
1324
1325 points, i.
1326 \begin_inset space \thinspace{}
1327 \end_inset
1328
1329 e.
1330 \begin_inset space \space{}
1331 \end_inset
1332
1333 the page isn't shifted.
1334  Unfortunately, some DVI drivers always seem to shift the page.
1335  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1336  If you're using LyX on a system that you don't personally maintain, and
1337  your sysadmin is a doofus, 
1338 \begin_inset Flex Code
1339 status collapsed
1340
1341 \begin_layout Plain Layout
1342
1343 \backslash
1344 hoffset
1345 \end_layout
1346
1347 \end_inset
1348
1349  and 
1350 \begin_inset Flex Code
1351 status collapsed
1352
1353 \begin_layout Plain Layout
1354
1355 \backslash
1356 voffset
1357 \end_layout
1358
1359 \end_inset
1360
1361  can save the day.
1362  Suppose your left and top margins are always 0.5
1363 \begin_inset space \thinspace{}
1364 \end_inset
1365
1366 inches too big.
1367  You can add this to the preamble:
1368 \end_layout
1369
1370 \begin_layout LyX-Code
1371
1372 \backslash
1373 setlength{
1374 \backslash
1375 hoffset}{-0.5 in}
1376 \end_layout
1377
1378 \begin_layout LyX-Code
1379
1380 \backslash
1381 setlength{
1382 \backslash
1383 voffset}{-0.5 in}
1384 \end_layout
1385
1386 \begin_layout Standard
1387 and your margins should now be correct.
1388 \end_layout
1389
1390 \begin_layout Subsubsection
1391 Example #2: Labels
1392 \end_layout
1393
1394 \begin_layout Standard
1395 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1396  There's a rather nice package, available at your nearest CTAN archive,
1397  for printing sheets of labels: 
1398 \begin_inset Flex Code
1399 status collapsed
1400
1401 \begin_layout Plain Layout
1402 labels.sty
1403 \end_layout
1404
1405 \end_inset
1406
1407 .
1408  Now, your system may not have this package installed by default.
1409  We leave that up to you to check.
1410  You'll also want to read the documentation for it; we're not going to do
1411  that for you.
1412  Since this is an example, however, we'll give you an example of how you
1413  use this package.
1414 \end_layout
1415
1416 \begin_layout Standard
1417 First, make sure you're using the 
1418 \begin_inset Flex Code
1419 status collapsed
1420
1421 \begin_layout Plain Layout
1422 article
1423 \end_layout
1424
1425 \end_inset
1426
1427  document class.
1428  Next, you need to put the following in your preamble:
1429 \end_layout
1430
1431 \begin_layout LyX-Code
1432
1433 \backslash
1434 usepackage{labels}
1435 \end_layout
1436
1437 \begin_layout LyX-Code
1438
1439 \backslash
1440 LabelCols=3
1441 \end_layout
1442
1443 \begin_layout LyX-Code
1444
1445 \backslash
1446 LabelRows=7
1447 \end_layout
1448
1449 \begin_layout LyX-Code
1450
1451 \backslash
1452 LeftBorder=8mm
1453 \end_layout
1454
1455 \begin_layout LyX-Code
1456
1457 \backslash
1458 RightBorder=8mm
1459 \end_layout
1460
1461 \begin_layout LyX-Code
1462
1463 \backslash
1464 TopBorder=9mm
1465 \end_layout
1466
1467 \begin_layout LyX-Code
1468
1469 \backslash
1470 BottomBorder=2mm
1471 \end_layout
1472
1473 \begin_layout Standard
1474 This sets things up for Avery label sheets, stock #5360.
1475  You're now ready to print labels, but you'll need to insert LaTeX code,
1476  placing the commands 
1477 \begin_inset Flex Code
1478 status collapsed
1479
1480 \begin_layout Plain Layout
1481
1482 \backslash
1483 begin{labels}
1484 \end_layout
1485
1486 \end_inset
1487
1488  and 
1489 \begin_inset Flex Code
1490 status collapsed
1491
1492 \begin_layout Plain Layout
1493
1494 \backslash
1495 end{labels}
1496 \end_layout
1497
1498 \end_inset
1499
1500  around each label text.
1501  This and other special features of 
1502 \begin_inset Flex Code
1503 status collapsed
1504
1505 \begin_layout Plain Layout
1506 labels.sty
1507 \end_layout
1508
1509 \end_inset
1510
1511  are explained in its documentation.
1512 \end_layout
1513
1514 \begin_layout Standard
1515 Someday, someone may write a LyX layout file to support this package directly.
1516  Maybe that someone is you.
1517 \end_layout
1518
1519 \begin_layout Subsubsection
1520 Example #3: Paragraph Indentation
1521 \end_layout
1522
1523 \begin_layout Standard
1524 Americans are trained to indent the first line of 
1525 \emph on
1526 every
1527 \emph default
1528  paragraph.
1529  As with all of their other weird quirks, most Americans will whine and
1530  moan until they can have their way and indent the first line of all paragraphs.
1531  (Yes, we're joking.
1532  (We are?) 
1533 \emph on
1534 Yeah
1535 \emph default
1536 , we are.)
1537 \end_layout
1538
1539 \begin_layout Standard
1540 Of course, this behavior isn't standard typography.
1541  In books, you typically only indent the first line of a paragraph 
1542 \emph on
1543 if
1544 \emph default
1545  it follows another one.
1546  The idea behind indenting the first line of a paragraph is to distinguish
1547  neighboring paragraphs from one another.
1548  If there is no previous paragraph—for example, if it follows a figure or
1549  is the first paragraph in a section—then there is no need for indentation.
1550  
1551 \end_layout
1552
1553 \begin_layout Standard
1554 If you're a typical American (we're still joking!), though, you don't care
1555  about such esoteric things; you want your indentation! Add this to the
1556  preamble:
1557 \end_layout
1558
1559 \begin_layout LyX-Code
1560
1561 \backslash
1562 usepackage{indentfirst}
1563 \end_layout
1564
1565 \begin_layout Standard
1566 If your TeX distribution isn't braindead, you'll have this package, and
1567  all of your paragraphs will get the indentation the Founding Fathers intended
1568  they should have.
1569 \end_layout
1570
1571 \begin_layout Subsubsection
1572 Example #4: This Document
1573 \end_layout
1574
1575 \begin_layout Standard
1576 You can also check out the preamble of this document to get an idea of some
1577  of the advanced things you can do.
1578 \end_layout
1579
1580 \begin_layout Section
1581 LyX and LaTeX Errors
1582 \end_layout
1583
1584 \begin_layout Standard
1585 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1586  going.
1587  It then uses the logfile from the LaTeX run to do a post-mortem.
1588  After analyzing the logfile, LyX displays a dialog listing the errors.
1589  Clicking on any one of them will take you to the position in your LyX file
1590  where the error occurred.
1591 \begin_inset Foot
1592 status collapsed
1593
1594 \begin_layout Plain Layout
1595 Well, usually.
1596  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1597  right line.
1598  There are also cases where LaTeX reports the error on one line, but the
1599  actual error is earlier.
1600  This is not unlike forgetting a closing brace in a program: You'll get
1601  an error, but only later.
1602 \end_layout
1603
1604 \end_inset
1605
1606
1607 \end_layout
1608
1609 \begin_layout Standard
1610 Some folks also like to look at the log file directly: It is available from
1611  
1612 \begin_inset Flex MenuItem
1613 status collapsed
1614
1615 \begin_layout Plain Layout
1616 Document
1617 \bar under
1618 \SpecialChar \menuseparator
1619
1620 \bar default
1621 Latex
1622 \begin_inset space ~
1623 \end_inset
1624
1625 Log
1626 \end_layout
1627
1628 \end_inset
1629
1630 .
1631  There are some fairly common error messages and warnings.
1632  We'll cover those here.
1633  You should look at a good LaTeX book for a complete listing.
1634 \end_layout
1635
1636 \begin_layout Itemize
1637 \begin_inset Flex Code
1638 status collapsed
1639
1640 \begin_layout Plain Layout
1641 LaTeX Warning
1642 \end_layout
1643
1644 \end_inset
1645
1646
1647 \begin_inset Newline newline
1648 \end_inset
1649
1650 Anything beginning with these words is a warning message for the purpose
1651  of 
1652 \begin_inset Quotes eld
1653 \end_inset
1654
1655 debugging
1656 \begin_inset Quotes erd
1657 \end_inset
1658
1659  the LaTeX code itself.
1660  You'll get messages like this if you added or changed cross-references
1661  or bibliography entries, in which case, LaTeX is trying to tell you that
1662  you need to make another run.
1663  You can by-and-large ignore these.
1664 \end_layout
1665
1666 \begin_layout Itemize
1667 \begin_inset Flex Code
1668 status collapsed
1669
1670 \begin_layout Plain Layout
1671 LaTeX Font Warning
1672 \end_layout
1673
1674 \end_inset
1675
1676
1677 \begin_inset Newline newline
1678 \end_inset
1679
1680 Another warning message, this time about fonts which LaTeX couldn't find.
1681  The rest of the message will often say something about a replacement font
1682  that LaTeX used.
1683  You can safely ignore these, too.
1684 \end_layout
1685
1686 \begin_layout Itemize
1687 \begin_inset Flex Code
1688 status collapsed
1689
1690 \begin_layout Plain Layout
1691 Overfull 
1692 \backslash
1693 hbox
1694 \end_layout
1695
1696 \end_inset
1697
1698
1699 \begin_inset Newline newline
1700 \end_inset
1701
1702 LaTeX absolutely 
1703 \emph on
1704 loves
1705 \emph default
1706  to spew these out.
1707  They are warnings about lines that were too long and run past the right
1708  margin.
1709  Almost always, this is unnoticeable in the final output.
1710  (It can be just a point or two.) Or, only one or two characters extend past
1711  the margin.
1712  LaTeX seems to generate at least one of these messages for just about any
1713  document you write.
1714 \begin_inset Newline newline
1715 \end_inset
1716
1717 You can ignore these messages.
1718  Your eyes will tell you if there's a problem with something that's too
1719  wide; just look at the output.
1720 \begin_inset Foot
1721 status collapsed
1722
1723 \begin_layout Plain Layout
1724 You can also enable the `draft' option in 
1725 \begin_inset Flex MenuItem
1726 status collapsed
1727
1728 \begin_layout Plain Layout
1729 Document
1730 \bar under
1731 \SpecialChar \menuseparator
1732
1733 \bar default
1734 Settings
1735 \end_layout
1736
1737 \end_inset
1738
1739 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1740 \end_layout
1741
1742 \end_inset
1743
1744
1745 \end_layout
1746
1747 \begin_layout Itemize
1748 \begin_inset Flex Code
1749 status collapsed
1750
1751 \begin_layout Plain Layout
1752 Underfull 
1753 \backslash
1754 hbox
1755 \end_layout
1756
1757 \end_inset
1758
1759
1760 \begin_inset Newline newline
1761 \end_inset
1762
1763 Not quite as common as its cousin.
1764  LaTeX seems to like to print lines that are a bit too wide as opposed to
1765  ones that are a bit too narrow.
1766  We have no idea why.
1767 \end_layout
1768
1769 \begin_layout Itemize
1770 \begin_inset Flex Code
1771 status collapsed
1772
1773 \begin_layout Plain Layout
1774 Overfull 
1775 \backslash
1776 vbox
1777 \end_layout
1778
1779 \end_inset
1780
1781  and 
1782 \begin_inset Flex Code
1783 status collapsed
1784
1785 \begin_layout Plain Layout
1786 Underfull 
1787 \backslash
1788 vbox
1789 \end_layout
1790
1791 \end_inset
1792
1793
1794 \begin_inset Newline newline
1795 \end_inset
1796
1797 Warnings about troubles breaking the page.
1798  Once again, just look at the output.
1799  Your eyes will tell you where something has gone wrong.
1800 \end_layout
1801
1802 \begin_layout Itemize
1803 \begin_inset Flex Code
1804 status collapsed
1805
1806 \begin_layout Plain Layout
1807 LaTeX Error: File 
1808 \begin_inset Quotes els
1809 \end_inset
1810
1811 Xxxx
1812 \begin_inset Quotes ers
1813 \end_inset
1814
1815  not found
1816 \end_layout
1817
1818 \end_inset
1819
1820
1821 \begin_inset Newline newline
1822 \end_inset
1823
1824 The file 
1825 \begin_inset Quotes eld
1826 \end_inset
1827
1828 Xxxx
1829 \begin_inset Quotes erd
1830 \end_inset
1831
1832  isn't installed on this system.
1833  This usually appears because some package your document needs isn't installed.
1834  If you didn't touch the preamble or didn't use the 
1835 \begin_inset Flex Code
1836 status collapsed
1837
1838 \begin_layout Plain Layout
1839
1840 \backslash
1841 usepackage{}
1842 \end_layout
1843
1844 \end_inset
1845
1846  command, then one of the packages LyX tried to load is missing.
1847  Use 
1848 \begin_inset Flex MenuItem
1849 status collapsed
1850
1851 \begin_layout Plain Layout
1852 Help\SpecialChar \menuseparator
1853 LaTeX Configuration
1854 \end_layout
1855
1856 \end_inset
1857
1858  to get a list of packages that LyX knows about.
1859  This file is updated whenever you reconfigure LyX (using 
1860 \begin_inset Flex MenuItem
1861 status collapsed
1862
1863 \begin_layout Plain Layout
1864 Tools\SpecialChar \menuseparator
1865 Reconfigure
1866 \end_layout
1867
1868 \end_inset
1869
1870 ) and tells you which packages have been detected and what they do.
1871 \begin_inset Newline newline
1872 \end_inset
1873
1874 If you did use the 
1875 \begin_inset Flex Code
1876 status collapsed
1877
1878 \begin_layout Plain Layout
1879
1880 \backslash
1881 usepackage{}
1882 \end_layout
1883
1884 \end_inset
1885
1886  command and the package in question isn't installed, then you'll need to
1887  install it yourself.
1888 \end_layout
1889
1890 \begin_layout Itemize
1891 \begin_inset Flex Code
1892 status collapsed
1893
1894 \begin_layout Plain Layout
1895 LaTeX Error: Unknown option
1896 \end_layout
1897
1898 \end_inset
1899
1900
1901 \begin_inset Newline newline
1902 \end_inset
1903
1904 Error messages beginning with this are trying to tell you that you specified
1905  a bad or undefined option to a package.
1906  Check the package's documentation.
1907 \end_layout
1908
1909 \begin_layout Itemize
1910 \begin_inset Flex Code
1911 status collapsed
1912
1913 \begin_layout Plain Layout
1914 Undefined control sequence
1915 \end_layout
1916
1917 \end_inset
1918
1919
1920 \begin_inset Newline newline
1921 \end_inset
1922
1923 If you've inserted LaTeX code into your document, but made a typo, you'll
1924  get one of these.
1925  You may have forgotten to load a package.
1926  In any case, this error message usually means that you used an undefined
1927  command.
1928  
1929 \end_layout
1930
1931 \begin_layout Standard
1932 There are other error and warning messages.
1933  Some are self-explanatory.
1934  These are usually LaTeX messages.
1935  Others are downright cryptic.
1936  These are usually TeX error messages, and we really have 
1937 \emph on
1938 no clue
1939 \emph default
1940  what they mean or how to decipher them.
1941  No-one does.
1942 \end_layout
1943
1944 \begin_layout Standard
1945 There's a general sequence you should follow if you get error messages:
1946 \end_layout
1947
1948 \begin_layout Enumerate
1949 Look at the LaTeX code you inserted for typos.
1950 \end_layout
1951
1952 \begin_layout Enumerate
1953 If there are no typos, check that you used the command(s) correctly.
1954 \end_layout
1955
1956 \begin_layout Enumerate
1957 If you get a bunch of error boxes piled up at the very top of the document—and
1958  especially if you see a 
1959 \begin_inset Quotes eld
1960 \end_inset
1961
1962
1963 \begin_inset Flex Code
1964 status collapsed
1965
1966 \begin_layout Plain Layout
1967 Missing 
1968 \backslash
1969 begin{document}
1970 \end_layout
1971
1972 \end_inset
1973
1974
1975 \begin_inset Quotes erd
1976 \end_inset
1977
1978  error—it means that there are errors in the preamble.
1979  Start debugging your preamble.
1980 \end_layout
1981
1982 \begin_layout Enumerate
1983 If you didn't add anything to the preamble and didn't add any LaTeX code
1984  to the document, the first suspect is your LaTeX distribution itself.
1985  Check for missing packages and install them.
1986 \end_layout
1987
1988 \begin_layout Enumerate
1989 Okay, so there are no missing packages.
1990  Did you use any of the fine-tuning options in LyX? Specifically, did you
1991  
1992 \emph on
1993 misuse
1994 \emph default
1995  any of them, like trying to manually insert lots of 
1996 \begin_inset Flex Code
1997 status collapsed
1998
1999 \begin_layout Plain Layout
2000 Protected
2001 \begin_inset space ~
2002 \end_inset
2003
2004 Blanks
2005 \end_layout
2006
2007 \end_inset
2008
2009
2010 \begin_inset Flex Code
2011 status collapsed
2012
2013 \begin_layout Plain Layout
2014 Linebreaks
2015 \end_layout
2016
2017 \end_inset
2018
2019 , or 
2020 \begin_inset Flex Code
2021 status collapsed
2022
2023 \begin_layout Plain Layout
2024 Pagebreaks
2025 \end_layout
2026
2027 \end_inset
2028
2029 ? Did you try to kludge something together with these instead of using the
2030  appropriate paragraph environment?
2031 \end_layout
2032
2033 \begin_layout Enumerate
2034 All right, you didn't use any of the fine-tuning options, you played by
2035  the rules.
2036  Did you try to pull a fancy maneuver? Did you do something funky inside
2037  a table or an equation, like inserting a graphic into a table cell?
2038 \end_layout
2039
2040 \begin_layout Enumerate
2041 Do you have long sections of text where LaTeX cannot find a place to break
2042  a line? By default, LaTeX is rather strict about how much extra inter-word
2043  spacing it will add in order to break a line.
2044  Preferably, you should rework the paragraph to avoid the problem.
2045  If this isn't an option, you can wrap your text in 
2046 \begin_inset Flex Code
2047 status collapsed
2048
2049 \begin_layout Plain Layout
2050
2051 \backslash
2052 sloppypar
2053 \end_layout
2054
2055 \end_inset
2056
2057  to make LaTeX's line breaking more, well, sloppy.
2058 \end_layout
2059
2060 \begin_layout Enumerate
2061 Did you go overboard with the nesting? LyX (currently) doesn't check to
2062  make sure you're in the limits for nesting environments.
2063  If you nested a bunch of environments to the 
2064 \begin_inset Formula $17^{\mathrm{th}}$
2065 \end_inset
2066
2067  level, that's the problem.
2068  (The limit in LaTeX is five.)
2069 \end_layout
2070
2071 \begin_layout Enumerate
2072 Okay, you didn't get any error messages, but your output looks awful.
2073  If you have a table or figure that's too wide or long for the page, you
2074  need to:
2075 \end_layout
2076
2077 \begin_deeper
2078 \begin_layout Enumerate
2079 rescale the figure so it fits.
2080 \end_layout
2081
2082 \begin_layout Enumerate
2083 trim down the table so it fits.
2084 \end_layout
2085
2086 \end_deeper
2087 \begin_layout Enumerate
2088 If something else is wrong with the output, and you didn't try to pull anything
2089  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2090 \end_layout
2091
2092 \begin_layout Standard
2093 If all this doesn't help—well, then 
2094 \emph on
2095 perhaps
2096 \emph default
2097  you might have found a bug in LyX\SpecialChar \ldots{}
2098 .
2099 \end_layout
2100
2101 \begin_layout Chapter
2102 Supplemental Tools
2103 \end_layout
2104
2105 \begin_layout Section
2106 Customizing Bibliographies with BibTeX
2107 \end_layout
2108
2109 \begin_layout Standard
2110 The most basic information about how to use BibTeX with LyX is contained
2111  in the section 
2112 \emph on
2113 Bibliography databases (BibTeX)
2114 \emph default
2115  of the 
2116 \emph on
2117 User's Guide
2118 \emph default
2119 .
2120  The following subsections explain special bibliography features supported
2121  by LyX.
2122 \end_layout
2123
2124 \begin_layout Subsection
2125 Alternative Citation Styles
2126 \end_layout
2127
2128 \begin_layout Standard
2129 Standard BibTeX uses numbers (e.
2130 \begin_inset space \thinspace{}
2131 \end_inset
2132
2133 g.
2134 \begin_inset space \space{}
2135 \end_inset
2136
2137
2138 \begin_inset Quotes eld
2139 \end_inset
2140
2141 [12]
2142 \begin_inset Quotes erd
2143 \end_inset
2144
2145 ) to refer to a cited work.
2146  However, in many scientific disciplines, other citation styles are in use.
2147  The most common one is the author-year style (e.
2148 \begin_inset space \thinspace{}
2149 \end_inset
2150
2151 g.
2152 \begin_inset space \space{}
2153 \end_inset
2154
2155
2156 \begin_inset Quotes eld
2157 \end_inset
2158
2159 Knuth 1984a
2160 \begin_inset Quotes erd
2161 \end_inset
2162
2163 ).
2164  LyX supports two packages that provide this style, 
2165 \begin_inset Flex Code
2166 status collapsed
2167
2168 \begin_layout Plain Layout
2169 natbib
2170 \end_layout
2171
2172 \end_inset
2173
2174  and 
2175 \begin_inset Flex Code
2176 status collapsed
2177
2178 \begin_layout Plain Layout
2179 jurabib
2180 \end_layout
2181
2182 \end_inset
2183
2184 .
2185  Both packages have their pros and cons, which cannot be listed in detail.
2186  If you only want to have simple author-year (or author-numerical) style,
2187  or if you want to use one of the countless style files for 
2188 \begin_inset Flex Code
2189 status collapsed
2190
2191 \begin_layout Plain Layout
2192 natbib
2193 \end_layout
2194
2195 \end_inset
2196
2197 , then the established 
2198 \begin_inset Flex Code
2199 status collapsed
2200
2201 \begin_layout Plain Layout
2202 natbib
2203 \end_layout
2204
2205 \end_inset
2206
2207  package is probably your choice.
2208  If you need special features like short title references, ibidem etc., you
2209  might consider the 
2210 \begin_inset Flex Code
2211 status collapsed
2212
2213 \begin_layout Plain Layout
2214 jurabib
2215 \end_layout
2216
2217 \end_inset
2218
2219  package.
2220 \end_layout
2221
2222 \begin_layout Standard
2223 The handling of both packages in LyX is basically the same.
2224  Go to 
2225 \begin_inset Flex MenuItem
2226 status collapsed
2227
2228 \begin_layout Plain Layout
2229 Document\SpecialChar \menuseparator
2230 Settings
2231 \end_layout
2232
2233 \end_inset
2234
2235  and select under 
2236 \begin_inset Flex MenuItem
2237 status collapsed
2238
2239 \begin_layout Plain Layout
2240 Bibliography
2241 \end_layout
2242
2243 \end_inset
2244
2245  the option 
2246 \begin_inset Flex MenuItem
2247 status collapsed
2248
2249 \begin_layout Plain Layout
2250 Natbib
2251 \end_layout
2252
2253 \end_inset
2254
2255  or 
2256 \begin_inset Flex MenuItem
2257 status collapsed
2258
2259 \begin_layout Plain Layout
2260 Jurabib
2261 \end_layout
2262
2263 \end_inset
2264
2265 .
2266  With both packages, you will get some extra features in the citation dialog
2267  and you can select the style of the reference (
2268 \begin_inset Quotes eld
2269 \end_inset
2270
2271 Knuth 1984
2272 \begin_inset Quotes erd
2273 \end_inset
2274
2275
2276 \begin_inset Quotes eld
2277 \end_inset
2278
2279 Knuth (1984)
2280 \begin_inset Quotes erd
2281 \end_inset
2282
2283
2284 \begin_inset Quotes eld
2285 \end_inset
2286
2287 Knuth, 1984
2288 \begin_inset Quotes erd
2289 \end_inset
2290
2291
2292 \begin_inset Quotes eld
2293 \end_inset
2294
2295 1984
2296 \begin_inset Quotes erd
2297 \end_inset
2298
2299  etc.).
2300  Note that both packages need specifically designed style files.
2301  They both ship their own, but there are lots of additional style files,
2302  and there is even an interactive style file builder
2303 \begin_inset Foot
2304 status collapsed
2305
2306 \begin_layout Plain Layout
2307 See 
2308 \begin_inset Flex URL
2309 status open
2310
2311 \begin_layout Plain Layout
2312
2313 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2314 \end_layout
2315
2316 \end_inset
2317
2318
2319 \end_layout
2320
2321 \end_inset
2322
2323  for 
2324 \begin_inset Flex Code
2325 status collapsed
2326
2327 \begin_layout Plain Layout
2328 natbib
2329 \end_layout
2330
2331 \end_inset
2332
2333 .
2334 \end_layout
2335
2336 \begin_layout Subsection
2337 Sectioned Bibliographies
2338 \end_layout
2339
2340 \begin_layout Standard
2341 Sometimes you might need to divide your bibliography into several sections.
2342  If you are for instance a historian, the possibility to separate sources
2343  and scientific works is most likely a 
2344 \begin_inset Quotes eld
2345 \end_inset
2346
2347 must have
2348 \begin_inset Quotes erd
2349 \end_inset
2350
2351 .
2352  Unfortunately, BibTeX itself does not allow you to do this.
2353  But with the help of some LaTeX packages, BibTeX can be extended to fit
2354  your needs.
2355 \end_layout
2356
2357 \begin_layout Standard
2358 LyX provides native support for one of these packages, 
2359 \family typewriter
2360 bibtopic
2361 \family default
2362 .
2363 \begin_inset Foot
2364 status collapsed
2365
2366 \begin_layout Plain Layout
2367 Available from 
2368 \begin_inset Flex URL
2369 status open
2370
2371 \begin_layout Plain Layout
2372
2373 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2374 \end_layout
2375
2376 \end_inset
2377
2378
2379 \end_layout
2380
2381 \end_inset
2382
2383  The advantage of this package (compared to other packages like 
2384 \family typewriter
2385 multibib
2386 \family default
2387 ) is that you don't need to define new citation commands.
2388  Instead, you need to prepare different bibliographic databases which include
2389  the entries for the different sections of the bibliography.
2390  For example: If you want to divide your bibliography into the sections
2391  
2392 \begin_inset Quotes eld
2393 \end_inset
2394
2395 Sources
2396 \begin_inset Quotes erd
2397 \end_inset
2398
2399  and 
2400 \begin_inset Quotes eld
2401 \end_inset
2402
2403 Scientific works
2404 \begin_inset Quotes erd
2405 \end_inset
2406
2407 , you first need to create two bibliographic databases, e.
2408 \begin_inset space \thinspace{}
2409 \end_inset
2410
2411 g.
2412 \begin_inset space \space{}
2413 \end_inset
2414
2415
2416 \begin_inset Flex Code
2417 status collapsed
2418
2419 \begin_layout Plain Layout
2420 sources.bib
2421 \end_layout
2422
2423 \end_inset
2424
2425  and 
2426 \begin_inset Flex Code
2427 status collapsed
2428
2429 \begin_layout Plain Layout
2430 scientific.bib
2431 \end_layout
2432
2433 \end_inset
2434
2435 .
2436  
2437 \end_layout
2438
2439 \begin_layout Standard
2440 Go to 
2441 \begin_inset Flex MenuItem
2442 status collapsed
2443
2444 \begin_layout Plain Layout
2445 Document\SpecialChar \menuseparator
2446 Settings
2447 \end_layout
2448
2449 \end_inset
2450
2451  and check under 
2452 \begin_inset Flex MenuItem
2453 status collapsed
2454
2455 \begin_layout Plain Layout
2456 Bibliography
2457 \end_layout
2458
2459 \end_inset
2460
2461  the option 
2462 \begin_inset Flex MenuItem
2463 status collapsed
2464
2465 \begin_layout Plain Layout
2466 Sectioned bibliography
2467 \end_layout
2468
2469 \end_inset
2470
2471 .
2472  Now you can insert multiple BibTeX bibliographies, one for each section
2473  of your bibliography.
2474  Returning to our example: Insert the BibTeX bibliography 
2475 \begin_inset Flex Code
2476 status collapsed
2477
2478 \begin_layout Plain Layout
2479 sources.bib
2480 \end_layout
2481
2482 \end_inset
2483
2484  and a second one for the database 
2485 \begin_inset Flex Code
2486 status collapsed
2487
2488 \begin_layout Plain Layout
2489 scientific.bib
2490 \end_layout
2491
2492 \end_inset
2493
2494 .
2495  You are free to use the same or different styles for each section.
2496  Additionally, you can choose if the bibliography section should contain
2497  
2498 \begin_inset Quotes eld
2499 \end_inset
2500
2501 all cited references
2502 \begin_inset Quotes erd
2503 \end_inset
2504
2505  of the specified database(s) (which is the default), 
2506 \begin_inset Quotes eld
2507 \end_inset
2508
2509 all uncited references
2510 \begin_inset Quotes erd
2511 \end_inset
2512
2513  or even 
2514 \begin_inset Quotes eld
2515 \end_inset
2516
2517 all references
2518 \begin_inset Quotes erd
2519 \end_inset
2520
2521 .
2522  This might be useful if you would like to separate your bibliography into
2523  three sections: 
2524 \begin_inset Quotes eld
2525 \end_inset
2526
2527 Cited sources
2528 \begin_inset Quotes erd
2529 \end_inset
2530
2531
2532 \begin_inset Quotes eld
2533 \end_inset
2534
2535 Uncited sources
2536 \begin_inset Quotes erd
2537 \end_inset
2538
2539 , and 
2540 \begin_inset Quotes eld
2541 \end_inset
2542
2543 Scientific works
2544 \begin_inset Quotes erd
2545 \end_inset
2546
2547 .
2548  The titles for the sections can be added as ordinary sections or subsections.
2549  Since 
2550 \begin_inset Flex Code
2551 status collapsed
2552
2553 \begin_layout Plain Layout
2554 bibtopic
2555 \end_layout
2556
2557 \end_inset
2558
2559  removes the bibliography title, you have to manually re-add that, too (as
2560  a chapter* or section*, for instance).
2561 \end_layout
2562
2563 \begin_layout Subsection
2564 Multiple Bibliographies
2565 \end_layout
2566
2567 \begin_layout Standard
2568 Multiple bibliographies, e.
2569 \begin_inset space \thinspace{}
2570 \end_inset
2571
2572 g.
2573 \begin_inset space \space{}
2574 \end_inset
2575
2576 a bibliography for each section or chapter of the document, are not supported
2577  by BibTeX itself.
2578  But the 
2579 \begin_inset Flex Code
2580 status collapsed
2581
2582 \begin_layout Plain Layout
2583 bibtopic
2584 \end_layout
2585
2586 \end_inset
2587
2588  package, which is used for the creation of sectioned bibliographies in
2589  LyX (see the previous section), provides an easy way to solve this task,
2590  if you are willing to use some 
2591 \begin_inset Flex MenuItem
2592 status collapsed
2593
2594 \begin_layout Plain Layout
2595 TeX Code
2596 \end_layout
2597
2598 \end_inset
2599
2600  (see section
2601 \begin_inset space ~
2602 \end_inset
2603
2604
2605 \begin_inset CommandInset ref
2606 LatexCommand ref
2607 reference "sec:Inserting-TeX-Code"
2608
2609 \end_inset
2610
2611 ).
2612 \begin_inset Foot
2613 status collapsed
2614
2615 \begin_layout Plain Layout
2616 An alternative approach is to use the 
2617 \begin_inset Flex Code
2618 status collapsed
2619
2620 \begin_layout Plain Layout
2621 chapterbib
2622 \end_layout
2623
2624 \end_inset
2625
2626  or 
2627 \begin_inset Flex Code
2628 status collapsed
2629
2630 \begin_layout Plain Layout
2631 bibunits
2632 \end_layout
2633
2634 \end_inset
2635
2636  package, respectively.
2637 \end_layout
2638
2639 \end_inset
2640
2641
2642 \end_layout
2643
2644 \begin_layout Standard
2645 First go to 
2646 \begin_inset Flex MenuItem
2647 status collapsed
2648
2649 \begin_layout Plain Layout
2650 Document\SpecialChar \menuseparator
2651 Settings
2652 \end_layout
2653
2654 \end_inset
2655
2656  and under 
2657 \begin_inset Flex MenuItem
2658 status collapsed
2659
2660 \begin_layout Plain Layout
2661 Bibliography
2662 \end_layout
2663
2664 \end_inset
2665
2666  check 
2667 \begin_inset Flex MenuItem
2668 status collapsed
2669
2670 \begin_layout Plain Layout
2671 Sectioned bibliography
2672 \end_layout
2673
2674 \end_inset
2675
2676 .
2677  In the document, you have to enclose the sections, which shall contain
2678  their own bibliography (including the BibTeX bibliography itself), between
2679  
2680 \begin_inset Flex Code
2681 status collapsed
2682
2683 \begin_layout Plain Layout
2684
2685 \backslash
2686 begin{btUnit}
2687 \end_layout
2688
2689 \end_inset
2690
2691  and 
2692 \begin_inset Flex Code
2693 status collapsed
2694
2695 \begin_layout Plain Layout
2696
2697 \backslash
2698 end{btUnit}
2699 \end_layout
2700
2701 \end_inset
2702
2703  (those commands have to be inserted as TeX code).
2704  The bibliography will contain all references that have been cited in the
2705  current 
2706 \begin_inset Flex Code
2707 status collapsed
2708
2709 \begin_layout Plain Layout
2710 btUnit
2711 \end_layout
2712
2713 \end_inset
2714
2715 .
2716  
2717 \series bold
2718 Note:
2719 \series default
2720  If you are using this approach, then every citation reference has to be
2721  inside some 
2722 \begin_inset Flex Code
2723 status collapsed
2724
2725 \begin_layout Plain Layout
2726 btUnit
2727 \end_layout
2728
2729 \end_inset
2730
2731 .
2732  Also, the 
2733 \begin_inset Flex Code
2734 status collapsed
2735
2736 \begin_layout Plain Layout
2737 btUnit
2738 \end_layout
2739
2740 \end_inset
2741
2742 s cannot be nested.
2743 \end_layout
2744
2745 \begin_layout Section
2746 Multipart Documents
2747 \end_layout
2748
2749 \begin_layout Subsection
2750 General Operation
2751 \end_layout
2752
2753 \begin_layout Standard
2754 When you are working on a large file with many sections, it is often convenient
2755  to break up the document into several files, or perhaps you have something
2756  where a table may change from time to time, but the preceding text does
2757  not.
2758  In these cases, you should seriously consider using multipart documents.
2759  For example, scientific papers often have five major sections: the introduction
2760 , observations, results, discussion, and conclusion.
2761  Each of these could be its own separate LyX file, with one 
2762 \begin_inset Quotes eld
2763 \end_inset
2764
2765 master
2766 \begin_inset Quotes erd
2767 \end_inset
2768
2769  file which contains the title, authors, abstract, references, etc., plus
2770  the five included files.
2771  It is important to note that each of these files is a full LyX file which
2772  can be formatted and printed on its own, as well as included in a master
2773  file.
2774  Each of these files must have the same document class, however—don't attempt
2775  to mix book classes with article classes.
2776  You may also include LaTeX files; however, these files must not have their
2777  own preamble (i.
2778 \begin_inset space \thinspace{}
2779 \end_inset
2780
2781 e.
2782 \begin_inset space \space{}
2783 \end_inset
2784
2785 everything up to and including the 
2786 \begin_inset Flex Code
2787 status collapsed
2788
2789 \begin_layout Plain Layout
2790
2791 \backslash
2792 begin{document}
2793 \end_layout
2794
2795 \end_inset
2796
2797  line as well as the 
2798 \begin_inset Flex Code
2799 status collapsed
2800
2801 \begin_layout Plain Layout
2802
2803 \backslash
2804 end{document}
2805 \end_layout
2806
2807 \end_inset
2808
2809  line must be deleted) or else errors will be generated when you try to
2810  make a DVI file.
2811 \end_layout
2812
2813 \begin_layout Standard
2814 LyX allows you to include files quite easily with 
2815 \begin_inset Flex MenuItem
2816 status collapsed
2817
2818 \begin_layout Plain Layout
2819 Insert\SpecialChar \menuseparator
2820 ChiId
2821 \begin_inset space ~
2822 \end_inset
2823
2824 Document
2825 \end_layout
2826
2827 \end_inset
2828
2829 .
2830  When you click on this selection a small box is inserted into the file
2831  at the current cursor location.
2832  Clicking on the box raises a dialog which allows you to select the file
2833  to be included, and the method of its inclusion.
2834  
2835 \end_layout
2836
2837 \begin_layout Standard
2838 The file selection box should by now be obvious.
2839  The three inclusion methods are 
2840 \begin_inset Quotes eld
2841 \end_inset
2842
2843 include
2844 \begin_inset Quotes erd
2845 \end_inset
2846
2847
2848 \begin_inset Quotes eld
2849 \end_inset
2850
2851 input
2852 \begin_inset Quotes erd
2853 \end_inset
2854
2855 , and 
2856 \begin_inset Quotes eld
2857 \end_inset
2858
2859 verbatim
2860 \begin_inset Quotes erd
2861 \end_inset
2862
2863 .
2864  The difference between 
2865 \begin_inset Quotes eld
2866 \end_inset
2867
2868 include
2869 \begin_inset Quotes erd
2870 \end_inset
2871
2872  and 
2873 \begin_inset Quotes eld
2874 \end_inset
2875
2876 input
2877 \begin_inset Quotes erd
2878 \end_inset
2879
2880  is really only meaningful to LaTeXperts, but the practical difference is
2881  that files that are 
2882 \begin_inset Quotes eld
2883 \end_inset
2884
2885 included
2886 \begin_inset Quotes erd
2887 \end_inset
2888
2889  are typeset beginning on a new page, while files that are 
2890 \begin_inset Quotes eld
2891 \end_inset
2892
2893 inputted
2894 \begin_inset Quotes erd
2895 \end_inset
2896
2897  are typeset starting on the current page.
2898 \end_layout
2899
2900 \begin_layout Standard
2901 Generally, the master file is converted into a full LaTeX file before typesettin
2902 g, while the included files are converted to LaTeX files that do not have
2903  all the preamble information.
2904 \end_layout
2905
2906 \begin_layout Standard
2907
2908 \begin_inset Quotes eld
2909 \end_inset
2910
2911 verbatim
2912 \begin_inset Quotes erd
2913 \end_inset
2914
2915  included file allows you to include a file typeset exactly as it appears
2916  in the file, i.
2917 \begin_inset space \thinspace{}
2918 \end_inset
2919
2920 e.
2921 \begin_inset space \space{}
2922 \end_inset
2923
2924 in 
2925 \begin_inset Flex Code
2926 status collapsed
2927
2928 \begin_layout Plain Layout
2929 verbatim
2930 \end_layout
2931
2932 \end_inset
2933
2934  mode, with the characters set in a fixed-width typewriter font.
2935  Normally, spaces in this file are invisible, though two consecutive spaces
2936  are conserved, unlike LyX's normal treatment of spaces.
2937  However, setting the 
2938 \begin_inset Flex MenuItem
2939 status collapsed
2940
2941 \begin_layout Plain Layout
2942 Mark
2943 \begin_inset space ~
2944 \end_inset
2945
2946 spaces
2947 \begin_inset space ~
2948 \end_inset
2949
2950 in
2951 \begin_inset space ~
2952 \end_inset
2953
2954 output
2955 \end_layout
2956
2957 \end_inset
2958
2959  checkbox typesets a mark to unambiguously define the presence of a space.
2960  
2961 \end_layout
2962
2963 \begin_layout Subsection
2964 Cross-References Between Files
2965 \end_layout
2966
2967 \begin_layout Standard
2968 \begin_inset Box Shadowbox
2969 position "t"
2970 hor_pos "c"
2971 has_inner_box 1
2972 inner_pos "t"
2973 use_parbox 0
2974 use_makebox 0
2975 width "100col%"
2976 special "none"
2977 height "1in"
2978 height_special "totalheight"
2979 status open
2980
2981 \begin_layout Plain Layout
2982 This section is somewhat out of date.
2983  Need to describe default master documents and how children are opened when
2984  the master is.
2985  [[FIXME]]
2986 \end_layout
2987
2988 \end_inset
2989
2990
2991 \end_layout
2992
2993 \begin_layout Standard
2994 It is possible to set up cross-references between the different files.
2995  First, open all the files in question: let's call them A and B in a two
2996  file example, where B is included in A.
2997  Let's say you insert a label in A, then want to reference it in B.
2998  Open the cross-reference dialog whilst in document B, and you can select
2999  the 
3000 \begin_inset Quotes eld
3001 \end_inset
3002
3003 buffer
3004 \begin_inset Quotes erd
3005 \end_inset
3006
3007  to use.
3008 \end_layout
3009
3010 \begin_layout Subsection
3011 Bibliography Lists in all Subdocuments
3012 \end_layout
3013
3014 \begin_layout Standard
3015 \begin_inset Box Frameless
3016 position "t"
3017 hor_pos "c"
3018 has_inner_box 1
3019 inner_pos "t"
3020 use_parbox 0
3021 use_makebox 0
3022 width "100col%"
3023 special "none"
3024 height "1in"
3025 height_special "totalheight"
3026 status open
3027
3028 \begin_layout Plain Layout
3029 This section also needs updating.
3030  There is now material about this on the wiki, and it could be copied here.
3031 \end_layout
3032
3033 \end_inset
3034
3035
3036 \end_layout
3037
3038 \begin_layout Standard
3039 Copy the bibliography list with all entries to all subdocuments and transform
3040  them to a comment.
3041  This way LyX will find the 
3042 \begin_inset Flex Code
3043 status collapsed
3044
3045 \begin_layout Plain Layout
3046 .bib
3047 \end_layout
3048
3049 \end_inset
3050
3051 -files and you can easily insert references without making the bibliography
3052  list visible.
3053 \end_layout
3054
3055 \begin_layout Standard
3056 As the bibliography list is in a comment, LaTeX won't use it and the references
3057  will look like this: [?], instead of like this: [1].
3058  One solution is to use the LaTeX-package 
3059 \begin_inset Flex Code
3060 status collapsed
3061
3062 \begin_layout Plain Layout
3063 comment
3064 \end_layout
3065
3066 \end_inset
3067
3068  that will only include comments by processing the files separately.
3069  To do this, add in the LaTeX preamble of every subdocument the following:
3070 \end_layout
3071
3072 \begin_layout LyX-Code
3073
3074 \backslash
3075 usepackage{comment}
3076 \end_layout
3077
3078 \begin_layout LyX-Code
3079
3080 \backslash
3081 includecomment{comment}
3082 \end_layout
3083
3084 \begin_layout Standard
3085 See also 
3086 \begin_inset Flex URL
3087 status collapsed
3088
3089 \begin_layout Plain Layout
3090
3091 http://wiki.lyx.org/FAQ/Unsorted#toc31
3092 \end_layout
3093
3094 \end_inset
3095
3096 .
3097 \end_layout
3098
3099 \begin_layout Section
3100 LyX Archives
3101 \end_layout
3102
3103 \begin_layout Standard
3104 Users sometimes need to be able to 
3105 \begin_inset Quotes eld
3106 \end_inset
3107
3108 bundle
3109 \begin_inset Quotes erd
3110 \end_inset
3111
3112  a LyX file together with all the images (and other files) on which it depends,
3113  either for sending to a publisher or for sharing with a co-author.
3114  LyX 2.0 includes a Python script (
3115 \begin_inset Flex Code
3116 status collapsed
3117
3118 \begin_layout Plain Layout
3119 lyxpak.py
3120 \end_layout
3121
3122 \end_inset
3123
3124 ) that automates this process.
3125  To use it, you must have either the 
3126 \begin_inset Flex Code
3127 status collapsed
3128
3129 \begin_layout Plain Layout
3130 zipfile
3131 \end_layout
3132
3133 \end_inset
3134
3135  or 
3136 \begin_inset Flex Code
3137 status collapsed
3138
3139 \begin_layout Plain Layout
3140 tarfile
3141 \end_layout
3142
3143 \end_inset
3144
3145  python modules installed on your system.
3146  By default, the script prefers the 
3147 \begin_inset Flex Code
3148 status collapsed
3149
3150 \begin_layout Plain Layout
3151 gzip
3152 \end_layout
3153
3154 \end_inset
3155
3156 -compressed 
3157 \begin_inset Flex Code
3158 status collapsed
3159
3160 \begin_layout Plain Layout
3161 tar
3162 \end_layout
3163
3164 \end_inset
3165
3166  format on Unix-like systems and the 
3167 \begin_inset Flex Code
3168 status collapsed
3169
3170 \begin_layout Plain Layout
3171 zip
3172 \end_layout
3173
3174 \end_inset
3175
3176  format on Windows.
3177 \end_layout
3178
3179 \begin_layout Standard
3180 LyX's configuration process will set the script up to export a `LyX Archive',
3181  and this format will then be available under 
3182 \begin_inset Flex Code
3183 status collapsed
3184
3185 \begin_layout Plain Layout
3186 File\SpecialChar \menuseparator
3187 Export
3188 \end_layout
3189
3190 \end_inset
3191
3192 .
3193 \end_layout
3194
3195 \begin_layout Standard
3196 Independently of the platform, the generation of a particular archive format
3197  can be forced by adding either the 
3198 \begin_inset Flex Code
3199 status collapsed
3200
3201 \begin_layout Plain Layout
3202 -t
3203 \end_layout
3204
3205 \end_inset
3206
3207  (for the 
3208 \begin_inset Flex Code
3209 status collapsed
3210
3211 \begin_layout Plain Layout
3212 tar
3213 \end_layout
3214
3215 \end_inset
3216
3217  format) or 
3218 \begin_inset Flex Code
3219 status collapsed
3220
3221 \begin_layout Plain Layout
3222 -z
3223 \end_layout
3224
3225 \end_inset
3226
3227  (for the 
3228 \begin_inset Flex Code
3229 status collapsed
3230
3231 \begin_layout Plain Layout
3232 zip
3233 \end_layout
3234
3235 \end_inset
3236
3237  format) switch to the 
3238 \begin_inset Flex Code
3239 status collapsed
3240
3241 \begin_layout Plain Layout
3242 LyX\SpecialChar \menuseparator
3243 LyX Archive
3244 \end_layout
3245
3246 \end_inset
3247
3248  converter in 
3249 \begin_inset Flex Code
3250 status collapsed
3251
3252 \begin_layout Plain Layout
3253 Tools\SpecialChar \menuseparator
3254 Preferences\SpecialChar \menuseparator
3255 File Handling\SpecialChar \menuseparator
3256 Converters
3257 \end_layout
3258
3259 \end_inset
3260
3261 .
3262  (Make sure you add the switch after the script name, not before it.)
3263 \end_layout
3264
3265 \begin_layout Section
3266 Fancy Headers and Footers
3267 \end_layout
3268
3269 \begin_layout Standard
3270 The default page layout is rather plain; for an 
3271 \begin_inset Flex Code
3272 status collapsed
3273
3274 \begin_layout Plain Layout
3275 article
3276 \end_layout
3277
3278 \end_inset
3279
3280  document class, all you get is a centered page number at the bottom of
3281  the page.
3282  This document uses KOMA-script's book class, so it appears to be a bit
3283  fancier.
3284  But to really put on a show, you need to set the document page style to
3285  
3286 \begin_inset Quotes eld
3287 \end_inset
3288
3289 fancy
3290 \begin_inset Quotes erd
3291 \end_inset
3292
3293 , as mentioned in the 
3294 \emph on
3295 User Guide
3296 \emph default
3297 .
3298  This section describes the LaTeX code you need to insert in your LaTeX
3299  preamble in order to get the desired effects.
3300 \end_layout
3301
3302 \begin_layout Standard
3303 For more information on fancy headers, see the 
3304 \begin_inset Flex Code
3305 status collapsed
3306
3307 \begin_layout Plain Layout
3308 fancyhdr
3309 \end_layout
3310
3311 \end_inset
3312
3313  package documentation.
3314  (
3315 \begin_inset Flex URL
3316 status collapsed
3317
3318 \begin_layout Plain Layout
3319
3320 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3321 \end_layout
3322
3323 \end_inset
3324
3325 )
3326 \end_layout
3327
3328 \begin_layout Standard
3329 The page header is divided into three fields, not surprisingly labeled 
3330 \begin_inset Quotes eld
3331 \end_inset
3332
3333 left
3334 \begin_inset Quotes erd
3335 \end_inset
3336
3337
3338 \begin_inset Quotes eld
3339 \end_inset
3340
3341 center
3342 \begin_inset Quotes erd
3343 \end_inset
3344
3345 , and 
3346 \begin_inset Quotes eld
3347 \end_inset
3348
3349 right
3350 \begin_inset Quotes erd
3351 \end_inset
3352
3353 .
3354  The footer is also divided into these three fields.
3355  The LaTeX commands to set these fields in the simplest manner are 
3356 \begin_inset Flex Code
3357 status collapsed
3358
3359 \begin_layout Plain Layout
3360
3361 \backslash
3362 lhead
3363 \end_layout
3364
3365 \end_inset
3366
3367
3368 \begin_inset Flex Code
3369 status collapsed
3370
3371 \begin_layout Plain Layout
3372
3373 \backslash
3374 chead
3375 \end_layout
3376
3377 \end_inset
3378
3379
3380 \begin_inset Flex Code
3381 status collapsed
3382
3383 \begin_layout Plain Layout
3384
3385 \backslash
3386 rhead
3387 \end_layout
3388
3389 \end_inset
3390
3391
3392 \begin_inset Flex Code
3393 status collapsed
3394
3395 \begin_layout Plain Layout
3396
3397 \backslash
3398 lfoot
3399 \end_layout
3400
3401 \end_inset
3402
3403 , etc.
3404  Suppose you wish to put your name in the upper left hand corner of each
3405  page.
3406  Simply insert the following command in the preamble: 
3407 \end_layout
3408
3409 \begin_layout Standard
3410
3411 \family typewriter
3412
3413 \backslash
3414 lhead{John Q.
3415  DocWriter}
3416 \end_layout
3417
3418 \begin_layout Standard
3419 You will now see your name in the upper left.
3420  If a field has a default entry that you would like to get rid of (often
3421  the page number appears in the central footer) simply include a command
3422  with a blank argument, e.
3423 \begin_inset space \thinspace{}
3424 \end_inset
3425
3426 g.:
3427 \end_layout
3428
3429 \begin_layout Standard
3430
3431 \family typewriter
3432
3433 \backslash
3434 cfoot{}
3435 \end_layout
3436
3437 \begin_layout Standard
3438 Let's get really fancy: lets put the section number with the word 
3439 \begin_inset Quotes eld
3440 \end_inset
3441
3442 Section
3443 \begin_inset Quotes erd
3444 \end_inset
3445
3446  (e.
3447 \begin_inset space \thinspace{}
3448 \end_inset
3449
3450 g.
3451 \begin_inset space \space{}
3452 \end_inset
3453
3454 Section 3) in the upper left, the page number (e.
3455 \begin_inset space \thinspace{}
3456 \end_inset
3457
3458 g.
3459 \begin_inset space \space{}
3460 \end_inset
3461
3462 Page 4) in the upper right, your name in the lower left, and the date in
3463  the lower right.
3464  The following commands should now appear in the preamble:
3465 \end_layout
3466
3467 \begin_layout Standard
3468
3469 \family typewriter
3470
3471 \backslash
3472 lhead{Section 
3473 \backslash
3474 thesection}
3475 \end_layout
3476
3477 \begin_layout Standard
3478
3479 \family typewriter
3480
3481 \backslash
3482 chead{}
3483 \end_layout
3484
3485 \begin_layout Standard
3486
3487 \family typewriter
3488
3489 \backslash
3490 rhead{Page 
3491 \backslash
3492 thepage}
3493 \end_layout
3494
3495 \begin_layout Standard
3496
3497 \family typewriter
3498
3499 \backslash
3500 lfoot{John Q.
3501  DocWriter}
3502 \end_layout
3503
3504 \begin_layout Standard
3505
3506 \family typewriter
3507
3508 \backslash
3509 cfoot{}
3510 \end_layout
3511
3512 \begin_layout Standard
3513
3514 \family typewriter
3515
3516 \backslash
3517 rfoot{
3518 \backslash
3519 today}
3520 \end_layout
3521
3522 \begin_layout Standard
3523 The commands 
3524 \begin_inset Flex Code
3525 status collapsed
3526
3527 \begin_layout Plain Layout
3528
3529 \backslash
3530 thesection
3531 \end_layout
3532
3533 \end_inset
3534
3535  and 
3536 \begin_inset Flex Code
3537 status collapsed
3538
3539 \begin_layout Plain Layout
3540
3541 \backslash
3542 thepage
3543 \end_layout
3544
3545 \end_inset
3546
3547  access LaTeX's section and page counters, and so print out the current
3548  section and page numbers.
3549  
3550 \begin_inset Flex Code
3551 status collapsed
3552
3553 \begin_layout Plain Layout
3554
3555 \backslash
3556 today
3557 \end_layout
3558
3559 \end_inset
3560
3561  simply prints out today's date.
3562 \end_layout
3563
3564 \begin_layout Standard
3565 The thicknesses of the horizontal rules drawn beneath the header and above
3566  the footer can also be modified.
3567  If you don't want one of the rules, set its thickness to 0.
3568  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3569  Use commands
3570 \family typewriter
3571  
3572 \family default
3573 like 
3574 \begin_inset Flex Code
3575 status collapsed
3576
3577 \begin_layout Plain Layout
3578
3579 \backslash
3580 renewcommand{
3581 \backslash
3582 headrulewidth}{0.4pt}
3583 \end_layout
3584
3585 \end_inset
3586
3587  and 
3588 \begin_inset Flex Code
3589 status collapsed
3590
3591 \begin_layout Plain Layout
3592
3593 \backslash
3594 renewcommand{
3595 \backslash
3596 footrulewidth}{0.4pt}
3597 \end_layout
3598
3599 \end_inset
3600
3601  to set the thicknesses.
3602 \end_layout
3603
3604 \begin_layout Standard
3605 You can switch the header/footer settings on and off for individual pages
3606  using commands like 
3607 \begin_inset Flex Code
3608 status collapsed
3609
3610 \begin_layout Plain Layout
3611
3612 \backslash
3613 thispagestyle{empty}
3614 \end_layout
3615
3616 \end_inset
3617
3618
3619 \begin_inset Flex Code
3620 status collapsed
3621
3622 \begin_layout Plain Layout
3623
3624 \backslash
3625 thispagestyle{plain}
3626 \end_layout
3627
3628 \end_inset
3629
3630 , and 
3631 \begin_inset Flex Code
3632 status collapsed
3633
3634 \begin_layout Plain Layout
3635
3636 \backslash
3637 thispagestyle{fancy}
3638 \end_layout
3639
3640 \end_inset
3641
3642 .
3643  Simply insert them in the text on the page you want changed and mark them
3644  as TeX code.
3645  In fact, title pages are marked as plain by default, while following pages
3646  are marked fancy when using the global fancy setting.
3647 \end_layout
3648
3649 \begin_layout Standard
3650 As a final example, it is possible to include an image in the header or
3651  footer.
3652  Suppose you want to put a company logo in the upper lefthand corner.
3653  You might try something like
3654 \end_layout
3655
3656 \begin_layout Standard
3657
3658 \family typewriter
3659
3660 \backslash
3661 lhead{
3662 \backslash
3663 resizebox{1in}{!}{
3664 \backslash
3665 includegraphics{logo.eps}}}
3666 \end_layout
3667
3668 \begin_layout Standard
3669 \noindent
3670 (you may need to preface this with 
3671 \begin_inset Flex Code
3672 status collapsed
3673
3674 \begin_layout Plain Layout
3675 \noindent
3676
3677 \backslash
3678 usepackage{graphics}
3679 \end_layout
3680
3681 \end_inset
3682
3683  if you don't include graphics elsewhere in your document).
3684 \end_layout
3685
3686 \begin_layout Section
3687 Itemize Bullet Selection
3688 \begin_inset CommandInset label
3689 LatexCommand label
3690 name "sec:bullet"
3691
3692 \end_inset
3693
3694
3695 \end_layout
3696
3697 \begin_layout Standard
3698 by
3699 \noun on
3700  Allan Rae
3701 \end_layout
3702
3703 \begin_layout Subsection
3704 Introduction
3705 \end_layout
3706
3707 \begin_layout Standard
3708 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3709  Using this dialog you can easily specify what bullet shape to use at each
3710  level of an itemized list.
3711  These settings are document-wide so you won't be able to specify different
3712  sets of bullets for different paragraphs.
3713 \begin_inset Foot
3714 status collapsed
3715
3716 \begin_layout Plain Layout
3717 Well, actually you can but you'll have to do it by hand.
3718 \end_layout
3719
3720 \end_inset
3721
3722
3723 \end_layout
3724
3725 \begin_layout Subsection
3726 How it looks
3727 \end_layout
3728
3729 \begin_layout Standard
3730 Open the dialog by selecting the 
3731 \begin_inset Flex MenuItem
3732 status collapsed
3733
3734 \begin_layout Plain Layout
3735 Document\SpecialChar \menuseparator
3736 Settings
3737 \end_layout
3738
3739 \end_inset
3740
3741  menu item and then select the 
3742 \begin_inset Flex MenuItem
3743 status collapsed
3744
3745 \begin_layout Plain Layout
3746 Bullets
3747 \end_layout
3748
3749 \end_inset
3750
3751  tab.
3752 \end_layout
3753
3754 \begin_layout Standard
3755 The dialog provides you with a table of bullet shapes.
3756  A column of buttons on the left of the table provides access to the six
3757  different panels of bullet shapes.
3758  The row of buttons across the top is used to select which bullet depth
3759  you are changing.
3760  A text entry under the table shows the currently selected bullet shape's
3761  LaTeX equivalent and this can be edited if desired.
3762  If you do modify the text you will also need to specify any needed packages
3763  in the LaTeX preamble.
3764 \end_layout
3765
3766 \begin_layout Standard
3767 The six panels are divided up by the packages they require.
3768  The following table shows the mappings from button name to LaTeX package.
3769 \end_layout
3770
3771 \begin_layout Standard
3772 \align center
3773 \begin_inset Tabular
3774 <lyxtabular version="3" rows="7" columns="2">
3775 <features rotate="0" tabularvalignment="middle">
3776 <column alignment="center" valignment="top" width="0pt">
3777 <column alignment="center" valignment="top" width="0pt">
3778 <row>
3779 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3780 \begin_inset Text
3781
3782 \begin_layout Plain Layout
3783
3784 \family roman
3785 \series medium
3786 \shape up
3787 \size normal
3788 \emph off
3789 \bar no
3790 \noun off
3791 \color none
3792 Button
3793 \end_layout
3794
3795 \end_inset
3796 </cell>
3797 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3798 \begin_inset Text
3799
3800 \begin_layout Plain Layout
3801
3802 \family roman
3803 \series medium
3804 \shape up
3805 \size normal
3806 \emph off
3807 \bar no
3808 \noun off
3809 \color none
3810 Packages Required
3811 \end_layout
3812
3813 \end_inset
3814 </cell>
3815 </row>
3816 <row>
3817 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3818 \begin_inset Text
3819
3820 \begin_layout Plain Layout
3821
3822 \family sans
3823 \series medium
3824 \shape up
3825 \size normal
3826 \emph off
3827 \bar no
3828 \noun off
3829 \color none
3830 Standard
3831 \end_layout
3832
3833 \end_inset
3834 </cell>
3835 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3836 \begin_inset Text
3837
3838 \begin_layout Plain Layout
3839
3840 \series medium
3841 \shape up
3842 \size normal
3843 \emph off
3844 \bar no
3845 \noun off
3846 \color none
3847 base LaTeX
3848 \end_layout
3849
3850 \end_inset
3851 </cell>
3852 </row>
3853 <row>
3854 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3855 \begin_inset Text
3856
3857 \begin_layout Plain Layout
3858
3859 \family sans
3860 \series medium
3861 \shape up
3862 \size normal
3863 \emph off
3864 \bar no
3865 \noun off
3866 \color none
3867 Maths
3868 \end_layout
3869
3870 \end_inset
3871 </cell>
3872 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3873 \begin_inset Text
3874
3875 \begin_layout Plain Layout
3876
3877 \family typewriter
3878 \series medium
3879 \shape up
3880 \size normal
3881 \emph off
3882 \bar no
3883 \noun off
3884 \color none
3885 amssymb.sty
3886 \end_layout
3887
3888 \end_inset
3889 </cell>
3890 </row>
3891 <row>
3892 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3893 \begin_inset Text
3894
3895 \begin_layout Plain Layout
3896
3897 \family sans
3898 \series medium
3899 \shape up
3900 \size normal
3901 \emph off
3902 \bar no
3903 \noun off
3904 \color none
3905 Ding1
3906 \end_layout
3907
3908 \end_inset
3909 </cell>
3910 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3911 \begin_inset Text
3912
3913 \begin_layout Plain Layout
3914
3915 \family typewriter
3916 \series medium
3917 \shape up
3918 \size normal
3919 \emph off
3920 \bar no
3921 \noun off
3922 \color none
3923 pifont.sty
3924 \end_layout
3925
3926 \end_inset
3927 </cell>
3928 </row>
3929 <row>
3930 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3931 \begin_inset Text
3932
3933 \begin_layout Plain Layout
3934
3935 \family sans
3936 \series medium
3937 \shape up
3938 \size normal
3939 \emph off
3940 \bar no
3941 \noun off
3942 \color none
3943 Ding2
3944 \end_layout
3945
3946 \end_inset
3947 </cell>
3948 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3949 \begin_inset Text
3950
3951 \begin_layout Plain Layout
3952
3953 \family typewriter
3954 \series medium
3955 \shape up
3956 \size normal
3957 \emph off
3958 \bar no
3959 \noun off
3960 \color none
3961 pifont.sty
3962 \end_layout
3963
3964 \end_inset
3965 </cell>
3966 </row>
3967 <row>
3968 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3969 \begin_inset Text
3970
3971 \begin_layout Plain Layout
3972
3973 \family sans
3974 \series medium
3975 \shape up
3976 \size normal
3977 \emph off
3978 \bar no
3979 \noun off
3980 \color none
3981 Ding3
3982 \end_layout
3983
3984 \end_inset
3985 </cell>
3986 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3987 \begin_inset Text
3988
3989 \begin_layout Plain Layout
3990
3991 \family typewriter
3992 \series medium
3993 \shape up
3994 \size normal
3995 \emph off
3996 \bar no
3997 \noun off
3998 \color none
3999 pifont.sty
4000 \end_layout
4001
4002 \end_inset
4003 </cell>
4004 </row>
4005 <row>
4006 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4007 \begin_inset Text
4008
4009 \begin_layout Plain Layout
4010
4011 \family sans
4012 \series medium
4013 \shape up
4014 \size normal
4015 \emph off
4016 \bar no
4017 \noun off
4018 \color none
4019 Ding4
4020 \end_layout
4021
4022 \end_inset
4023 </cell>
4024 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4025 \begin_inset Text
4026
4027 \begin_layout Plain Layout
4028
4029 \family typewriter
4030 \series medium
4031 \shape up
4032 \size normal
4033 \emph off
4034 \bar no
4035 \noun off
4036 \color none
4037 pifont.sty
4038 \end_layout
4039
4040 \end_inset
4041 </cell>
4042 </row>
4043 </lyxtabular>
4044
4045 \end_inset
4046
4047
4048 \end_layout
4049
4050 \begin_layout Standard
4051 LyX doesn't stop you using bullets from packages you don't have.
4052  If you get errors from LaTeX when you try to view or print the file, then
4053  it is likely you are missing a package.
4054 \begin_inset Foot
4055 status collapsed
4056
4057 \begin_layout Plain Layout
4058 LyX doesn't restrict your use since you may be editing locally and exporting
4059  elsewhere.
4060 \end_layout
4061
4062 \end_inset
4063
4064
4065 \end_layout
4066
4067 \begin_layout Subsection
4068 How to use it
4069 \end_layout
4070
4071 \begin_layout Standard
4072 Select which bullet depth you want to change then select the bullet shape
4073  and size.
4074  Any changes will not be visible in LyX, but are visible when viewing the
4075  document.
4076 \end_layout
4077
4078 \begin_layout Standard
4079 You can reset a bullet shape to the default simply by clicking your right
4080  mouse button on the appropriate bullet depth button.
4081 \begin_inset Foot
4082 status collapsed
4083
4084 \begin_layout Plain Layout
4085 If you 
4086 \emph on
4087 really
4088 \emph default
4089  want to have multiple sets of paragraphs with different sets of bullets
4090  in each, then you're going to have to get your hands dirty with TeX code.
4091  The bullet selection dialog can help though because it provides you with
4092  the LaTeX code for a wide range of bullet shapes.
4093  To make your own custom paragraphs you have the following options:
4094 \end_layout
4095
4096 \begin_layout Plain Layout
4097 \begin_inset ERT
4098 status open
4099
4100 \begin_layout Plain Layout
4101
4102
4103 \backslash
4104 let
4105 \backslash
4106 savelabelitemi=
4107 \backslash
4108 labelitemi
4109 \end_layout
4110
4111 \end_inset
4112
4113
4114 \end_layout
4115
4116 \begin_layout Plain Layout
4117 \begin_inset ERT
4118 status open
4119
4120 \begin_layout Plain Layout
4121
4122
4123 \backslash
4124 renewcommand
4125 \backslash
4126 labelitemi[0]{
4127 \backslash
4128 small
4129 \backslash
4130 (
4131 \backslash
4132 sharp
4133 \backslash
4134 )}
4135 \end_layout
4136
4137 \end_inset
4138
4139
4140 \end_layout
4141
4142 \begin_layout Itemize
4143 Use the LaTeX command 
4144 \begin_inset Flex Code
4145 status collapsed
4146
4147 \begin_layout Plain Layout
4148
4149 \backslash
4150 renewcommand{}{}
4151 \end_layout
4152
4153 \end_inset
4154
4155  to specify a new bullet shape for a given depth.
4156  You'll also need to save the current bullet shape so you can restore it
4157  again afterwards.
4158  In this itemized list the following LaTeX code was used to change the bullet
4159  used for the first depth.
4160 \end_layout
4161
4162 \begin_deeper
4163 \begin_layout LyX-Code
4164
4165 \backslash
4166 let
4167 \backslash
4168 savelabelitemi=
4169 \backslash
4170 labelitemi 
4171 \end_layout
4172
4173 \begin_layout LyX-Code
4174
4175 \backslash
4176 renewcommand
4177 \backslash
4178 labelitemi[0]{
4179 \backslash
4180 small
4181 \backslash
4182 (
4183 \backslash
4184 sharp
4185 \backslash
4186 )}
4187 \end_layout
4188
4189 \end_deeper
4190 \begin_layout Itemize
4191 Note that the itemize depth is specified in Roman numerals as part of the
4192  
4193 \family typewriter
4194
4195 \backslash
4196 labelitem
4197 \family default
4198  command.
4199 \end_layout
4200
4201 \begin_layout Itemize
4202 \begin_inset ERT
4203 status open
4204
4205 \begin_layout Plain Layout
4206
4207 [
4208 \backslash
4209 (
4210 \backslash
4211 star
4212 \backslash
4213 )]
4214 \end_layout
4215
4216 \end_inset
4217
4218  Specify each individual entry by starting each item with the bullet shape
4219  enclosed in square brackets and set as 
4220 \begin_inset Flex MenuItem
4221 status collapsed
4222
4223 \begin_layout Plain Layout
4224 TeX Code
4225 \end_layout
4226
4227 \end_inset
4228
4229 .
4230  For example, this item was started with 
4231 \begin_inset Flex Code
4232 status collapsed
4233
4234 \begin_layout Plain Layout
4235 [
4236 \backslash
4237 (
4238 \backslash
4239 star
4240 \backslash
4241 )]
4242 \end_layout
4243
4244 \end_inset
4245
4246 .
4247 \end_layout
4248
4249 \begin_layout Plain Layout
4250 \begin_inset ERT
4251 status open
4252
4253 \begin_layout Plain Layout
4254
4255
4256 \backslash
4257 renewcommand
4258 \backslash
4259 labelitemi[0]{
4260 \backslash
4261 savelabelitemi}
4262 \end_layout
4263
4264 \end_inset
4265
4266
4267 \end_layout
4268
4269 \begin_layout Plain Layout
4270 You'll also need to revert the labelitem back to its previous setting for
4271  the global bullet shape settings to remain in effect.
4272  The way used here was:
4273 \end_layout
4274
4275 \begin_layout LyX-Code
4276
4277 \backslash
4278 renewcommand
4279 \backslash
4280 labelitemi[0]{
4281 \backslash
4282 savelabelitemi}
4283 \end_layout
4284
4285 \end_inset
4286
4287
4288 \end_layout
4289
4290 \begin_layout Chapter
4291 LyX and the World Wide Web
4292 \end_layout
4293
4294 \begin_layout Standard
4295 LyX has long supported the export of documents to various web-friendly formats,
4296  such as HTML.
4297  Before verson 2.0, however, HTML export was always accomplished by the use
4298  of external converters.
4299 \begin_inset Foot
4300 status collapsed
4301
4302 \begin_layout Plain Layout
4303 For details on the use of external converters with LyX, see the 
4304 \emph on
4305 Converters
4306 \emph default
4307  section of the Customization manual.
4308 \end_layout
4309
4310 \end_inset
4311
4312  These fall into two large groups: there are converters that use LaTeX as
4313  an intermediate format, such as 
4314 \begin_inset Flex Code
4315 status collapsed
4316
4317 \begin_layout Plain Layout
4318 htlatex
4319 \end_layout
4320
4321 \end_inset
4322
4323
4324 \begin_inset Flex Code
4325 status collapsed
4326
4327 \begin_layout Plain Layout
4328 html2latex
4329 \end_layout
4330
4331 \end_inset
4332
4333 , and 
4334 \begin_inset Flex Code
4335 status collapsed
4336
4337 \begin_layout Plain Layout
4338 plastex
4339 \end_layout
4340
4341 \end_inset
4342
4343 , relying upon LyX to produce the LaTeX; and there is a converter that works
4344  directly on LyX files, 
4345 \begin_inset Flex Code
4346 status collapsed
4347
4348 \begin_layout Plain Layout
4349 eLyXer
4350 \end_layout
4351
4352 \end_inset
4353
4354 .
4355  All of these have different advantages and disadvantages.
4356  
4357 \end_layout
4358
4359 \begin_layout Standard
4360 The LaTeX-based converters have the advantage that, in principle, they know
4361  everything about the exported document that LaTeX does.
4362  Such converters do not care, for example, if a certain block of code was
4363  produced by LyX or was Evil Red Text.
4364  These converters know about 
4365 \begin_inset Flex Code
4366 status collapsed
4367
4368 \begin_layout Plain Layout
4369 aux
4370 \end_layout
4371
4372 \end_inset
4373
4374  files, counters, and references, and can often make use of the 
4375 \begin_inset Flex Code
4376 status collapsed
4377
4378 \begin_layout Plain Layout
4379 bbl
4380 \end_layout
4381
4382 \end_inset
4383
4384  files generated by BibTeX.
4385  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4386  said that only TeX itself understands TeX---and LaTeX-based converters
4387  will often choke on what seem to be quite simple constructs; complex ones
4388  can throw them completely, and as of this writing, for example, the 
4389 \emph on
4390 Embedded Objects
4391 \emph default
4392  manual will not export with 
4393 \begin_inset Flex Code
4394 status collapsed
4395
4396 \begin_layout Plain Layout
4397 htlatex
4398 \end_layout
4399
4400 \end_inset
4401
4402 , though the others will.
4403  The other issue concerns how math is handled.
4404  These converters typically convert the formulae into little pictures that
4405  are then linked from the HTML document.
4406  Since these are actually generated by LaTeX, they are accurate.
4407  But they do not scale well, and just getting them to look as if they are
4408  actually meant to be in your document---so that the font sizes seem to
4409  be roughly the same---can be a challenge.
4410 \end_layout
4411
4412 \begin_layout Standard
4413 Alex Fernandez's 
4414 \begin_inset Flex Code
4415 status collapsed
4416
4417 \begin_layout Plain Layout
4418 eLyXer
4419 \end_layout
4420
4421 \end_inset
4422
4423  (
4424 \begin_inset CommandInset href
4425 LatexCommand href
4426 name "http://elyxer.nongnu.org/"
4427 target "http://elyxer.nongnu.org/"
4428
4429 \end_inset
4430
4431 ) solves some of these problems.
4432  In particular, the formulae it produces scale perfectly, since it renders
4433  math using a combination of HTML and CSS rather than converting the formulae
4434  to images.
4435  But even moderately complex formula are rendered less well than with 
4436 \begin_inset Flex Code
4437 status collapsed
4438
4439 \begin_layout Plain Layout
4440 htlatex
4441 \end_layout
4442
4443 \end_inset
4444
4445 ; this reflects the limitations of HTML.
4446 \begin_inset Foot
4447 status collapsed
4448
4449 \begin_layout Plain Layout
4450 That said, 
4451 \begin_inset Flex Code
4452 status collapsed
4453
4454 \begin_layout Plain Layout
4455 eLyXer
4456 \end_layout
4457
4458 \end_inset
4459
4460  can also use jsMath and MathJax for equations, but this setting is only
4461  available globally and requires one to have access to a server that runs
4462  the backend.
4463 \end_layout
4464
4465 \end_inset
4466
4467  More importantly (as of version 1.1.1, at least), 
4468 \begin_inset Flex Code
4469 status collapsed
4470
4471 \begin_layout Plain Layout
4472 eLyXer
4473 \end_layout
4474
4475 \end_inset
4476
4477  has limited support for math macros and no support for user-defined paragraph
4478  or character styles.
4479  These limitations make 
4480 \begin_inset Flex Code
4481 status collapsed
4482
4483 \begin_layout Plain Layout
4484 eLyXer
4485 \end_layout
4486
4487 \end_inset
4488
4489  unsuitable for many of the documents LyX users produce.
4490  In principle, of course, these problems could be solved, but the LyX developers
4491  have decided to follow a different path and have made LyX itself capable
4492  of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4493  plaintext.
4494 \end_layout
4495
4496 \begin_layout Standard
4497 As of this writing, XHTML output remains under development and should probably
4498  be regarded as 
4499 \begin_inset Quotes eld
4500 \end_inset
4501
4502 experimental
4503 \begin_inset Quotes erd
4504 \end_inset
4505
4506 .
4507 \begin_inset Foot
4508 status collapsed
4509
4510 \begin_layout Plain Layout
4511 The file 
4512 \begin_inset Flex Code
4513 status collapsed
4514
4515 \begin_layout Plain Layout
4516 development/HTML.notes
4517 \end_layout
4518
4519 \end_inset
4520
4521 , which can be found in the LyX source tree or 
4522 \begin_inset CommandInset href
4523 LatexCommand href
4524 name "accessed online"
4525 target "http://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
4526
4527 \end_inset
4528
4529 , usually contains up-to-date information about the state of XHTML output.
4530  See also the list of XHTML bugs on 
4531 \begin_inset CommandInset href
4532 LatexCommand href
4533 name "the bug tracker"
4534 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"
4535
4536 \end_inset
4537
4538 .
4539 \end_layout
4540
4541 \end_inset
4542
4543  Still, the developers have chosen this approach because it has several
4544  potential advantages over the other two.
4545 \end_layout
4546
4547 \begin_layout Standard
4548 These advantages are primarily due to the fact that the XHTML output routines,
4549  since they are part of LyX, know everything LyX knows about the document
4550  being exported.
4551 \begin_inset Foot
4552 status collapsed
4553
4554 \begin_layout Plain Layout
4555 Another advantage is that, since these routines are internal to LyX, they
4556  are immune to changes in LyX's file format, or to changes in the semantics
4557  of existing insets.
4558 \end_layout
4559
4560 \end_inset
4561
4562  So they know about the table of contents (as displayed in the outline),
4563  about the counters associated with different paragraph styles, and about
4564  user-defined styles.
4565  The XHTML output routines know what LyX knows about internationalization,
4566  too, so they will output 
4567 \begin_inset Quotes eld
4568 \end_inset
4569
4570 Chapter 1
4571 \begin_inset Quotes erd
4572 \end_inset
4573
4574  or 
4575 \begin_inset Quotes eld
4576 \end_inset
4577
4578
4579 \lang ngerman
4580 Kapitel
4581 \lang english
4582  1
4583 \begin_inset Quotes erd
4584 \end_inset
4585
4586 , depending upon the language in effect at the time.
4587  
4588 \end_layout
4589
4590 \begin_layout Standard
4591 Quite generally, the output routines know what LyX knows about document
4592  layout, that is, about how the document is to be rendered on screen.
4593  We use this information when we output the document as XHTML.
4594  In particular, LyX 
4595 \emph on
4596 automatically
4597 \emph default
4598  generates CSS style information corresponding to the layout information
4599  it uses to render the document on screen: if section headings are supposed
4600  to be sans-serif and bold as seen in LyX, then (by default) they will be
4601  sans-serif and bold when viewed in a web browser, too.
4602  And this is true not just for pre-defined styles, like Section, but for
4603  any style, including user-defined styles.
4604  Indeed, the XHTML output routines make no distinction between user-defined
4605  paragraph and character styles and LyX's own pre-defined styles: in each
4606  case, everything LyX knows about the styles is contained in the layout
4607  files.
4608  And much the same is true as regards pre-defined textual insets, such as
4609  footnotes, and various custom insets.
4610  
4611 \end_layout
4612
4613 \begin_layout Standard
4614 The result is that XHTML output can be customized and extended in exactly
4615  the same way LaTeX output can be customized and extended: through layout
4616  files and modules.
4617  See chapter five of the 
4618 \emph on
4619 Customization 
4620 \emph default
4621 manual for the details.
4622 \end_layout
4623
4624 \begin_layout Standard
4625 The remainder of this chapter contains more detailed information on XHTML
4626  output, its limitations, and ways to work around those limitations.
4627 \end_layout
4628
4629 \begin_layout Section
4630 Math Output in XHTML
4631 \end_layout
4632
4633 \begin_layout Standard
4634 LyX offers four choices for how math is rendered.
4635  These have various advantages and disadvantages:
4636 \end_layout
4637
4638 \begin_layout Itemize
4639 MathML
4640 \begin_inset Newline newline
4641 \end_inset
4642
4643 MathML is a dialect of XML designed specifically for mathematics on the
4644  web, and it typically renders very well in browsers that support it.
4645  The disadvantage is that not all browsers support MathML, and support is
4646  not complete even in the Gecko-based browsers, such as Firefox.
4647 \begin_inset Newline newline
4648 \end_inset
4649
4650 If LyX is unable to render a formula as MathML---for example, if the formula
4651  uses the 
4652 \begin_inset Flex Code
4653 status collapsed
4654
4655 \begin_layout Plain Layout
4656 xymatrix
4657 \end_layout
4658
4659 \end_inset
4660
4661  package or ERT---then it will instead output the formula as an image.
4662  
4663 \end_layout
4664
4665 \begin_layout Itemize
4666 HTML
4667 \begin_inset Newline newline
4668 \end_inset
4669
4670 As mentioned above, 
4671 \begin_inset Flex Code
4672 status collapsed
4673
4674 \begin_layout Plain Layout
4675 elyxer
4676 \end_layout
4677
4678 \end_inset
4679
4680  outputs math as HTML, styled by CSS.
4681 \begin_inset Foot
4682 status collapsed
4683
4684 \begin_layout Plain Layout
4685 LyX has borrowed some of the CSS for its HTML output from 
4686 \begin_inset Flex Code
4687 status collapsed
4688
4689 \begin_layout Plain Layout
4690 elyxer
4691 \end_layout
4692
4693 \end_inset
4694
4695 .
4696 \end_layout
4697
4698 \end_inset
4699
4700  For simple formulae, this can work quite well, though with more complicated
4701  formulae it tends to break down.
4702  Still, this method has the advantage that it is very widely supported and
4703  so it may be appropriate for documents that contain only a little, fairly
4704  simple math.
4705 \begin_inset Newline newline
4706 \end_inset
4707
4708 If Lyx is unable to render a formula as HTML---for example, if the formula
4709  uses the 
4710 \begin_inset Flex Code
4711 status collapsed
4712
4713 \begin_layout Plain Layout
4714 xymatrix
4715 \end_layout
4716
4717 \end_inset
4718
4719  package or ERT---then it will instead output the formula as an image.
4720  
4721 \end_layout
4722
4723 \begin_layout Itemize
4724 Images
4725 \begin_inset Newline newline
4726 \end_inset
4727
4728 Like 
4729 \begin_inset Flex Code
4730 status collapsed
4731
4732 \begin_layout Plain Layout
4733 htlatex
4734 \end_layout
4735
4736 \end_inset
4737
4738 , LyX will output formulae as images, the very same images, in fact, that
4739  are used for instant preview.
4740 \begin_inset Foot
4741 status collapsed
4742
4743 \begin_layout Plain Layout
4744 Instant preview does 
4745 \emph on
4746 not 
4747 \emph default
4748 have to be on for images to be output, however.
4749 \end_layout
4750
4751 \end_inset
4752
4753  The advantage to this method is that the images are simply generated by
4754  LaTeX, so they are very accurate.
4755  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4756  so they do not scale terribly well, and one cannot copy them, etc.
4757  (As of this writing, there are also problems about equation numbering.
4758  See 
4759 \begin_inset CommandInset href
4760 LatexCommand href
4761 name "bug 6894"
4762 target "http://www.lyx.org/trac/ticket/6894"
4763
4764 \end_inset
4765
4766 .)
4767 \begin_inset Newline newline
4768 \end_inset
4769
4770 The size of the images can be controlled by setting the 
4771 \begin_inset Quotes eld
4772 \end_inset
4773
4774 Math Images Scaling
4775 \begin_inset Quotes erd
4776 \end_inset
4777
4778  parameter under 
4779 \begin_inset Flex MenuItem
4780 status collapsed
4781
4782 \begin_layout Plain Layout
4783 Document\SpecialChar \menuseparator
4784 Settings\SpecialChar \menuseparator
4785 Output
4786 \end_layout
4787
4788 \end_inset
4789
4790 .
4791 \begin_inset Foot
4792 status collapsed
4793
4794 \begin_layout Plain Layout
4795 For those who want to know, this controls the resolution of the image in
4796  dots per inch and is based upon a default of 75 dpi.
4797 \end_layout
4798
4799 \end_inset
4800
4801
4802 \begin_inset Newline newline
4803 \end_inset
4804
4805 If LyX for some reason fails to create an image for a formula (e.g., if a
4806  required LaTeX package is not installed), then it will fall back to outputing
4807  the raw LaTeX.
4808 \end_layout
4809
4810 \begin_layout Itemize
4811 LaTeX
4812 \begin_inset Newline newline
4813 \end_inset
4814
4815 Finally, LyX will happily output math as LaTeX.
4816  As well as being the output of last resort, this method can be used with
4817  such tools as 
4818 \begin_inset CommandInset href
4819 LatexCommand href
4820 name "jsMath"
4821 target "http://www.math.union.edu/~dpvc/jsMath/"
4822
4823 \end_inset
4824
4825 , which uses JavaScript to render LaTeX embedded in HTML documents.
4826  LyX wraps the LaTeX in either a 
4827 \begin_inset Flex Code
4828 status collapsed
4829
4830 \begin_layout Plain Layout
4831 span
4832 \end_layout
4833
4834 \end_inset
4835
4836  (for inline formulas) or 
4837 \begin_inset Flex Code
4838 status collapsed
4839
4840 \begin_layout Plain Layout
4841 div
4842 \end_layout
4843
4844 \end_inset
4845
4846  (for displayed formulas) with 
4847 \begin_inset Flex Code
4848 status collapsed
4849
4850 \begin_layout Plain Layout
4851 class='math'
4852 \end_layout
4853
4854 \end_inset
4855
4856 , as is required for jsMath.
4857 \end_layout
4858
4859 \begin_layout Standard
4860 One of these output methods must be selected under 
4861 \begin_inset Flex MenuItem
4862 status collapsed
4863
4864 \begin_layout Plain Layout
4865 Document\SpecialChar \menuseparator
4866 Settings\SpecialChar \menuseparator
4867 Output
4868 \end_layout
4869
4870 \end_inset
4871
4872 .
4873  By default, LyX outputs MathML.
4874  This is a document-wide setting, therefore.
4875 \end_layout
4876
4877 \begin_layout Standard
4878 Eventually, LyX will offer the user the option to select an alternate output
4879  method for a particular inset, say, one that isn't being rendered very
4880  well by MathML.
4881 \begin_inset Foot
4882 status collapsed
4883
4884 \begin_layout Plain Layout
4885 That said, since LyX falls back to images if the inset contains ERT, then
4886  one can force output as an image by putting some harmless ERT into the
4887  math, for example: 
4888 \begin_inset Formula $a=b\relax$
4889 \end_inset
4890
4891 .
4892 \end_layout
4893
4894 \end_inset
4895
4896
4897 \end_layout
4898
4899 \begin_layout Section
4900 Bibliography and Citations
4901 \end_layout
4902
4903 \begin_layout Standard
4904 XHTML output fully supports bibliographies and citations.
4905  
4906 \end_layout
4907
4908 \begin_layout Standard
4909 Citation labels are generated by the same machinery that generates LyX's
4910  on-screen labels, so the labels will look in the output much as they do
4911  in LyX, though better.
4912  If you are using numerical citations, then LyX will output numerical labels,
4913  such as [1] or [17], rather than simply showing the citation key in square
4914  brackets, as it does on-screen.
4915  If you are using author-year citations, then LyX will add lowercase letters
4916  to the years, just as BibTeX does, if it finds more than one citation for
4917  a given author-year combination.
4918  The labels will be printed with the bibliography entries.
4919  Note that there is, at present, no way to customize the appearance of the
4920  labels, for example, to choose between square brackets and parentheses.
4921 \end_layout
4922
4923 \begin_layout Standard
4924 Bibliography output is handled by the same machinery that handles the presentati
4925 on of reference information in the citation dialog, so you will see in the
4926  XHTML output pretty much what you would see if you were to look at a given
4927  entry in the citation dialog.
4928  The formatting can be customized in your layout file or, preferably, in
4929  a module.
4930  See the 
4931 \emph on
4932 Customization
4933 \emph default
4934  manual for the details.
4935 \end_layout
4936
4937 \begin_layout Standard
4938 The main defect at present is that cross-referenced information is printed
4939  with every entry with which it is associated.
4940  So you can see things like this:
4941 \end_layout
4942
4943 \begin_layout Quote
4944 Jason Stanley, 
4945 \begin_inset Quotes eld
4946 \end_inset
4947
4948 Context and Logical Form
4949 \begin_inset Quotes erd
4950 \end_inset
4951
4952 , in 
4953 \emph on
4954 Language in Context: Selected Essays
4955 \emph default
4956  (Oxford: Oxford University Press, 2007), pp.
4957  30--68.
4958 \end_layout
4959
4960 \begin_layout Quote
4961 Jason Stanley, 
4962 \begin_inset Quotes eld
4963 \end_inset
4964
4965 Semantics in Context
4966 \begin_inset Quotes erd
4967 \end_inset
4968
4969 , in 
4970 \emph on
4971 Language in Context: Selected Essays
4972 \emph default
4973  (Oxford: Oxford University Press, 2007), pp.
4974  201--30.
4975 \end_layout
4976
4977 \begin_layout Standard
4978 This should be fixed before long.
4979 \end_layout
4980
4981 \begin_layout Standard
4982 There is no support at present for sectioned bibliographies.
4983  If you have multiple bibliographies, then LyX will print the same bibliography
4984  over and over.
4985 \end_layout
4986
4987 \begin_layout Section
4988 Indexes
4989 \end_layout
4990
4991 \begin_layout Standard
4992 LyX will happily export indexes as XHTML, but with certain limitations at
4993  the moment.
4994 \end_layout
4995
4996 \begin_layout Standard
4997 Index export will be most reliable when you do not attempt to use the fancy
4998  constructs that are described in the section on indexes in the 
4999 \emph on
5000 User's Guide
5001 \emph default
5002 .
5003 \begin_inset Foot
5004 status collapsed
5005
5006 \begin_layout Plain Layout
5007 The main issue here is that LyX itself does not really handle these.
5008  It just lets you enter what you would have to enter in raw LaTeX.
5009 \end_layout
5010
5011 \end_inset
5012
5013  We'll describe how they are handled using the subsection headings from
5014  that section.
5015 \end_layout
5016
5017 \begin_layout Itemize
5018 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5019  these, but the entries must be separated by 
5020 \begin_inset Quotes eld
5021 \end_inset
5022
5023  ! 
5024 \begin_inset Quotes erd
5025 \end_inset
5026
5027 , that is, there must be spaces around the exclamation point.
5028  This is because it is otherwise too difficult to check for escaped exclamation
5029  points, ones in math, and so forth.
5030 \end_layout
5031
5032 \begin_layout Itemize
5033 Page Ranges: There is no support at all for page ranges, since these make
5034  no sense with XHMTL.
5035  Instead, you will just get two index entries, one at either end.
5036 \end_layout
5037
5038 \begin_layout Itemize
5039 Cross-referencing: There is no support for cross-referencing.
5040  If LyX finds an entry containing the 
5041 \begin_inset Quotes eld
5042 \end_inset
5043
5044 |see\SpecialChar \ldots{}
5045
5046 \begin_inset Quotes erd
5047 \end_inset
5048
5049  construct, it is just dropped, and the rest is treated as an ordinary index
5050  entry.
5051 \end_layout
5052
5053 \begin_layout Itemize
5054 Index Entry Order: LyX does support attempts to fix the sorting order.
5055  It will take what is before the first `@' it finds and use that for sorting,
5056  taking what follows the first `@' to be the actual entry.
5057  At present, LyX does not check for escaped `@', so do not try to index
5058  email addresses.
5059 \end_layout
5060
5061 \begin_layout Itemize
5062 Index Entry Layout: You can format entries by using the text style dialog,
5063  or by using any other method available within LyX itself.
5064  There is no support for constructs like: 
5065 \begin_inset Quotes eld
5066 \end_inset
5067
5068 entry|textbf
5069 \begin_inset Quotes erd
5070 \end_inset
5071
5072 .
5073  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5074  and everything that follows it.
5075 \end_layout
5076
5077 \begin_layout Itemize
5078 Multiple Indexes: There is no support for multiple indexes.
5079  Rather, all index entries will be printed as one large index.
5080  To avoid our printing several versions of the index, we print only the
5081  main index, so make sure you have one.
5082 \end_layout
5083
5084 \begin_layout Section
5085 Nomenclature and Glossary
5086 \end_layout
5087
5088 \begin_layout Standard
5089 There is at present no support for glossaries.
5090  Adding it would be fairly trivial, and welcome.
5091 \end_layout
5092
5093 \begin_layout Chapter
5094 The LyX Server
5095 \end_layout
5096
5097 \begin_layout Section
5098 Introduction
5099 \end_layout
5100
5101 \begin_layout Standard
5102 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5103  and retrieve information about the LyX internal state.
5104  This is only intended for advanced users, but they should find it useful.
5105  It is by writing to the LyX server, for example, that bibliography managers,
5106  such as JabRef, are able to 
5107 \begin_inset Quotes eld
5108 \end_inset
5109
5110 push
5111 \begin_inset Quotes erd
5112 \end_inset
5113
5114  citations to LyX.
5115 \end_layout
5116
5117 \begin_layout Section
5118 Starting the LyX Server
5119 \end_layout
5120
5121 \begin_layout Standard
5122 The LyX server works through the use of a pair of named pipes.
5123  These are usually located in 
5124 \begin_inset Flex Code
5125 status collapsed
5126
5127 \begin_layout Plain Layout
5128 UserDir
5129 \end_layout
5130
5131 \end_inset
5132
5133 , (except on Windows, where 
5134 \emph on
5135 local
5136 \emph default
5137  named pipes are special objects located in 
5138 \begin_inset Flex Code
5139 status collapsed
5140
5141 \begin_layout Plain Layout
5142
5143 \backslash
5144
5145 \backslash
5146 .
5147 \backslash
5148 pipe
5149 \end_layout
5150
5151 \end_inset
5152
5153 ) and have the names 
5154 \begin_inset Quotes eld
5155 \end_inset
5156
5157
5158 \begin_inset Flex Code
5159 status collapsed
5160
5161 \begin_layout Plain Layout
5162 lyxpipe.in
5163 \end_layout
5164
5165 \end_inset
5166
5167
5168 \begin_inset Quotes erd
5169 \end_inset
5170
5171  and 
5172 \begin_inset Quotes eld
5173 \end_inset
5174
5175
5176 \begin_inset Flex Code
5177 status collapsed
5178
5179 \begin_layout Plain Layout
5180 lyxpipe.out
5181 \end_layout
5182
5183 \end_inset
5184
5185
5186 \begin_inset Quotes erd
5187 \end_inset
5188
5189 .
5190  External programs write into 
5191 \begin_inset Flex Code
5192 status collapsed
5193
5194 \begin_layout Plain Layout
5195 lyxpipe.in
5196 \end_layout
5197
5198 \end_inset
5199
5200  and read back data from 
5201 \begin_inset Flex Code
5202 status collapsed
5203
5204 \begin_layout Plain Layout
5205 lyxpipe.out
5206 \end_layout
5207
5208 \end_inset
5209
5210 .
5211  The stem of the pipe names can be defined in the 
5212 \begin_inset Flex MenuItem
5213 status collapsed
5214
5215 \begin_layout Plain Layout
5216 Tools\SpecialChar \menuseparator
5217 Preferences
5218 \end_layout
5219
5220 \end_inset
5221
5222  dialog, for example 
5223 \begin_inset Flex Code
5224 status collapsed
5225
5226 \begin_layout Plain Layout
5227 "/home/myhome/lyxpipe"
5228 \end_layout
5229
5230 \end_inset
5231
5232 , or 
5233 \begin_inset Flex Code
5234 status collapsed
5235
5236 \begin_layout Plain Layout
5237 "
5238 \backslash
5239
5240 \backslash
5241 .
5242 \backslash
5243 pipe
5244 \backslash
5245 lyxpipe"
5246 \end_layout
5247
5248 \end_inset
5249
5250  on Windows (but any working path can be used).
5251  You 
5252 \emph on
5253 must
5254 \emph default
5255  configure this manually in order for the server to start.
5256 \end_layout
5257
5258 \begin_layout Standard
5259 LyX will add the '
5260 \begin_inset Flex Code
5261 status collapsed
5262
5263 \begin_layout Plain Layout
5264 .in
5265 \end_layout
5266
5267 \end_inset
5268
5269 ' and '
5270 \begin_inset Flex Code
5271 status collapsed
5272
5273 \begin_layout Plain Layout
5274 .out
5275 \end_layout
5276
5277 \end_inset
5278
5279 ' to create the pipes.
5280  If one of the pipes already exists, LyX will assume that another LyX process
5281  is already running and will not start the server.
5282  On POSIX (Unix like) systems, if for some other reason, an unused 
5283 \begin_inset Quotes eld
5284 \end_inset
5285
5286 stale
5287 \begin_inset Quotes erd
5288 \end_inset
5289
5290  pipe is left in existence when LyX closes, then LyX will try to delete
5291  it.
5292  If this fails for some reason, you will need to delete the pipes manually
5293  and then restart LyX.
5294  On Windows, pipes are deleted by the OS on program termination or crash,
5295  so 
5296 \begin_inset Quotes eld
5297 \end_inset
5298
5299 stale
5300 \begin_inset Quotes erd
5301 \end_inset
5302
5303  pipes should not be possible.
5304 \end_layout
5305
5306 \begin_layout Standard
5307 To have several LyX processes with servers at the same time, you have to
5308  use different configurations, perhaps by using separate user directories,
5309  each with its own 
5310 \begin_inset Flex Code
5311 status collapsed
5312
5313 \begin_layout Plain Layout
5314 preferences
5315 \end_layout
5316
5317 \end_inset
5318
5319  file, for each process.
5320 \end_layout
5321
5322 \begin_layout Standard
5323 If you are developing a client program, you might find it useful to enable
5324  debugging information from the LyX server.
5325  Do this by starting LyX as 
5326 \begin_inset Flex Code
5327 status collapsed
5328
5329 \begin_layout Plain Layout
5330 lyx -dbg lyxserver
5331 \end_layout
5332
5333 \end_inset
5334
5335 .
5336 \end_layout
5337
5338 \begin_layout Standard
5339 You can find a complete example client written in C in the source distribution
5340  as 
5341 \begin_inset Flex Code
5342 status collapsed
5343
5344 \begin_layout Plain Layout
5345 development/lyxserver/server_monitor.c
5346 \end_layout
5347
5348 \end_inset
5349
5350 .
5351 \end_layout
5352
5353 \begin_layout Standard
5354 Another useful tool is the command-line based clientfound in 
5355 \begin_inset Flex Code
5356 status collapsed
5357
5358 \begin_layout Plain Layout
5359 src/client/lyxclient
5360 \end_layout
5361
5362 \end_inset
5363
5364 .
5365 \end_layout
5366
5367 \begin_layout Section
5368 Normal communication
5369 \end_layout
5370
5371 \begin_layout Standard
5372 To issue a LyX call, the client writes a line of ASCII text into the input
5373  pipe.
5374  This line has the following format:
5375 \end_layout
5376
5377 \begin_layout Quote
5378 LYXCMD:
5379 \emph on
5380 clientname
5381 \emph default
5382 :
5383 \emph on
5384 function
5385 \emph default
5386 :
5387 \emph on
5388 argument
5389 \end_layout
5390
5391 \begin_layout Description
5392 clientname is a name that the client can choose arbitrarily.
5393  Its only use is that LyX will echo it if it sends an answer—so a client
5394  can dispatch results from different requesters.
5395 \end_layout
5396
5397 \begin_layout Description
5398 function is the function you want LyX to perform.
5399  It is the same as the commands you'd use in the minibuffer.
5400 \end_layout
5401
5402 \begin_layout Description
5403 argument is an optional argument which is meaningful only to some functions
5404  (for instance, the 
5405 \begin_inset Quotes eld
5406 \end_inset
5407
5408 self-insert
5409 \begin_inset Quotes erd
5410 \end_inset
5411
5412  LFUN will insert the argument as text at the cursor position).
5413 \end_layout
5414
5415 \begin_layout Standard
5416 The answer from LyX will arrive in the output pipe and be of the form
5417 \end_layout
5418
5419 \begin_layout Quote
5420 INFO:
5421 \emph on
5422 clientname
5423 \emph default
5424 :
5425 \emph on
5426 function
5427 \emph default
5428 :
5429 \emph on
5430 data
5431 \end_layout
5432
5433 \begin_layout Standard
5434 where 
5435 \emph on
5436 clientname
5437 \emph default
5438  and 
5439 \emph on
5440 function
5441 \emph default
5442  are just echoed from the command request, while 
5443 \emph on
5444 data
5445 \emph default
5446  is more or less useful information filled according to how the command
5447  execution worked out.
5448  Some commands, such as 
5449 \begin_inset Quotes eld
5450 \end_inset
5451
5452 font-state
5453 \begin_inset Quotes erd
5454 \end_inset
5455
5456 , will return information about the internal state of LyX, while other will
5457  return an empty data-response.
5458  This means that the command execution went fine.
5459 \end_layout
5460
5461 \begin_layout Standard
5462 In case of errors, the response from LyX will have this form
5463 \end_layout
5464
5465 \begin_layout Quote
5466 ERROR:
5467 \emph on
5468 clientname
5469 \emph default
5470 :
5471 \emph on
5472 function
5473 \emph default
5474 :
5475 \emph on
5476 error message
5477 \end_layout
5478
5479 \begin_layout Standard
5480 where the 
5481 \emph on
5482 error message
5483 \emph default
5484  should contain an explanation of why the command failed.
5485 \end_layout
5486
5487 \begin_layout Standard
5488 Examples:
5489 \end_layout
5490
5491 \begin_layout LyX-Code
5492 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5493 \begin_inset Newline newline
5494 \end_inset
5495
5496 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5497 \begin_inset Newline newline
5498 \end_inset
5499
5500 read a <~/.lyxpipe.out
5501 \begin_inset Newline newline
5502 \end_inset
5503
5504 echo $a
5505 \end_layout
5506
5507 \begin_layout Section
5508 Notification
5509 \end_layout
5510
5511 \begin_layout Standard
5512 LyX can notify clients of events going on asynchronously.
5513  Currently it will only do this if the user binds a key sequence with the
5514  function 
5515 \begin_inset Quotes eld
5516 \end_inset
5517
5518 notify
5519 \begin_inset Quotes erd
5520 \end_inset
5521
5522 .
5523  The format of the string LyX sends is as follows:
5524 \end_layout
5525
5526 \begin_layout Quote
5527 \begin_inset Flex Code
5528 status collapsed
5529
5530 \begin_layout Plain Layout
5531 NOTIFY:
5532 \end_layout
5533
5534 \end_inset
5535
5536
5537 \emph on
5538 key-sequence
5539 \end_layout
5540
5541 \begin_layout Standard
5542 where 
5543 \emph on
5544 key-sequence
5545 \emph default
5546  is the printed representation of the key sequence that was actually typed
5547  by the user.
5548 \end_layout
5549
5550 \begin_layout Standard
5551 This mechanism can be used to extend LyX's command set and implement macros.
5552  Bind some key sequence to 
5553 \begin_inset Quotes eld
5554 \end_inset
5555
5556 notify
5557 \begin_inset Quotes erd
5558 \end_inset
5559
5560 .
5561  Then start a client that listens on the output pipe, dispatches the command
5562  according to the sequence, and starts a function that may use LyX calls
5563  and LyX requests to issue a command or a series of commands to LyX.
5564 \end_layout
5565
5566 \begin_layout Section
5567 The simple LyX Server Protocol
5568 \end_layout
5569
5570 \begin_layout Standard
5571 LyX implements a simple protocol that can be used for session management.
5572  All messages are of the form
5573 \end_layout
5574
5575 \begin_layout Quote
5576 LYXSRV:
5577 \emph on
5578 clientname
5579 \emph default
5580 :
5581 \emph on
5582 protocol message
5583 \end_layout
5584
5585 \begin_layout Standard
5586 where 
5587 \emph on
5588 protocol message
5589 \emph default
5590  can be 
5591 \begin_inset Quotes eld
5592 \end_inset
5593
5594 hello
5595 \begin_inset Quotes erd
5596 \end_inset
5597
5598  or 
5599 \begin_inset Quotes eld
5600 \end_inset
5601
5602 bye
5603 \begin_inset Quotes erd
5604 \end_inset
5605
5606 .
5607  If 
5608 \begin_inset Quotes eld
5609 \end_inset
5610
5611 hello
5612 \begin_inset Quotes erd
5613 \end_inset
5614
5615  is received from a client, LyX will report back to inform the client that
5616  it's listening to it's messages, while 
5617 \begin_inset Quotes eld
5618 \end_inset
5619
5620 bye
5621 \begin_inset Quotes erd
5622 \end_inset
5623
5624  sent from LyX will inform clients that LyX is closing.
5625 \end_layout
5626
5627 \begin_layout Section
5628 Reverse DVI/PDF search
5629 \end_layout
5630
5631 \begin_layout Standard
5632 Some DVI/PDF viewers
5633 \begin_inset Foot
5634 status collapsed
5635
5636 \begin_layout Plain Layout
5637 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5638  Skim on Mac OSX and SumatraPDF on Windows.
5639 \end_layout
5640
5641 \end_inset
5642
5643  provide 
5644 \emph on
5645 reverse search
5646 \emph default
5647  facility (also called 
5648 \emph on
5649 inverse search
5650 \emph default
5651 ).
5652  This means that you can tell LyX to put the cursor to a specific line in
5653  the document by clicking at the respective position in the DVI/PDF output.
5654  To achieve this, the viewer must be able to communicate with LyX.
5655  This is done via the LyX server either by using the named pipe (
5656 \emph on
5657 lyxpipe
5658 \emph default
5659 ), or the UNIX domain socket (
5660 \emph on
5661 lyxsocket
5662 \emph default
5663 ) that LyX creates in its temporary directory (this is the way the 
5664 \begin_inset Flex Code
5665 status collapsed
5666
5667 \begin_layout Plain Layout
5668 lyxclient
5669 \end_layout
5670
5671 \end_inset
5672
5673  program communicates with LyX).
5674  In some cases, you need a helper script that mediates between the viewer
5675  and LyX, in others, the viewer can communicate with LyX directly.
5676  This depends on the selected viewer and on your operating system.
5677  The same applies to the way viewers need to be configured and the way the
5678  reverse search is actually performed.
5679  In what follows, we will thus describe how to setup reverse search for
5680  specific viewers.
5681  Before we turn to this, though, we will explain what needs to be done generally
5682  to enable reverse search in the DVI/PDF output.
5683 \end_layout
5684
5685 \begin_layout Subsection
5686 Automatic setup
5687 \begin_inset CommandInset label
5688 LatexCommand label
5689 name "sub:rev-search"
5690
5691 \end_inset
5692
5693
5694 \end_layout
5695
5696 \begin_layout Standard
5697 In most cases LyX will do the work for you by enabling the option 
5698 \begin_inset Flex MenuItem
5699 status collapsed
5700
5701 \begin_layout Plain Layout
5702 Synchronize with Output
5703 \end_layout
5704
5705 \end_inset
5706
5707  in the menu 
5708 \begin_inset Flex MenuItem
5709 status collapsed
5710
5711 \begin_layout Plain Layout
5712 Document\SpecialChar \menuseparator
5713 Settings\SpecialChar \menuseparator
5714 Output
5715 \end_layout
5716
5717 \end_inset
5718
5719 .
5720  In such a case LyX will automatically insert the necessary SyncTeX macro
5721  (for PDF) or load the srcltx package (for DVI) respectively.
5722  This option can be easily reached also on 
5723 \begin_inset Flex Code
5724 status collapsed
5725
5726 \begin_layout Plain Layout
5727 View/Update
5728 \end_layout
5729
5730 \end_inset
5731
5732  Toolbar.
5733 \end_layout
5734
5735 \begin_layout Standard
5736 If you need a different setting, you can select or input a custom macro
5737  from the drop down box just below 
5738 \begin_inset Flex MenuItem
5739 status collapsed
5740
5741 \begin_layout Plain Layout
5742 Document\SpecialChar \menuseparator
5743 Settings\SpecialChar \menuseparator
5744 Output\SpecialChar \menuseparator
5745 Synchronize with Output
5746 \end_layout
5747
5748 \end_inset
5749
5750 .
5751 \end_layout
5752
5753 \begin_layout Standard
5754 Note that the method 
5755 \begin_inset Flex Code
5756 status collapsed
5757
5758 \begin_layout Plain Layout
5759
5760 \backslash
5761 synctex=1
5762 \end_layout
5763
5764 \end_inset
5765
5766  enables gzip compression.
5767  If your viewer does not support it, you should instead use 
5768 \begin_inset Flex Code
5769 status collapsed
5770
5771 \begin_layout Plain Layout
5772
5773 \backslash
5774 synctex=-1
5775 \end_layout
5776
5777 \end_inset
5778
5779 .
5780 \end_layout
5781
5782 \begin_layout Standard
5783 Please aöso note that including the 
5784 \begin_inset Flex Code
5785 status collapsed
5786
5787 \begin_layout Plain Layout
5788 srcltx
5789 \end_layout
5790
5791 \end_inset
5792
5793  package or 
5794 \begin_inset Flex Code
5795 status collapsed
5796
5797 \begin_layout Plain Layout
5798 src-specials
5799 \end_layout
5800
5801 \end_inset
5802
5803  sometimes has an undesired impact on the typesetting.
5804  Thus, you should switch output synchronization off for the final typesetting
5805  if you use the 
5806 \begin_inset Flex Code
5807 status collapsed
5808
5809 \begin_layout Plain Layout
5810 srcltx
5811 \end_layout
5812
5813 \end_inset
5814
5815  package or 
5816 \begin_inset Flex Code
5817 status collapsed
5818
5819 \begin_layout Plain Layout
5820 src-specials
5821 \end_layout
5822
5823 \end_inset
5824
5825 .
5826  
5827 \end_layout
5828
5829 \begin_layout Standard
5830 In case you need some more special settings that are not covered by the
5831  automatic settings, read the next section about how to set up output synchroniz
5832 ation manually.
5833  If the automatic setup suits your needs, you can readily jump to section
5834 \begin_inset space ~
5835 \end_inset
5836
5837
5838 \begin_inset CommandInset ref
5839 LatexCommand ref
5840 reference "sub:configuring-viewers"
5841
5842 \end_inset
5843
5844 , where the necessary configuration steps in your viewer -- needed both
5845  with the automatic and the manual setup -- are described.
5846 \end_layout
5847
5848 \begin_layout Subsection
5849 Manual setup
5850 \end_layout
5851
5852 \begin_layout Standard
5853 LaTeX provides several different methods for reverse search.
5854  Some are built-in in the 
5855 \begin_inset Flex Code
5856 status collapsed
5857
5858 \begin_layout Plain Layout
5859 latex/pdflatex
5860 \end_layout
5861
5862 \end_inset
5863
5864  program, some are provided by external packages.
5865  Your choice depends on whether your LaTeX distribution already provides
5866  a given method (the built-in methods are rather new) and whether your viewer
5867  can cope with it.
5868  The available methods are described in the following.
5869 \end_layout
5870
5871 \begin_layout Subsubsection*
5872 Built-in DVI-search via src-specials (DVI only) 
5873 \end_layout
5874
5875 \begin_layout Standard
5876 This method provides the DVI file with the necessary information for reverse
5877  search.
5878  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5879  distribution should include it), and it works reliably.
5880  To enable it, change the 
5881 \begin_inset Flex MenuItem
5882 status collapsed
5883
5884 \begin_layout Plain Layout
5885 LaT
5886 \begin_inset ERT
5887 status collapsed
5888
5889 \begin_layout Plain Layout
5890
5891 {}
5892 \end_layout
5893
5894 \end_inset
5895
5896 eX (plain)->DVI
5897 \end_layout
5898
5899 \end_inset
5900
5901  or 
5902 \begin_inset Flex MenuItem
5903 status collapsed
5904
5905 \begin_layout Plain Layout
5906 LaT
5907 \begin_inset ERT
5908 status collapsed
5909
5910 \begin_layout Plain Layout
5911
5912 {}
5913 \end_layout
5914
5915 \end_inset
5916
5917 eX (plain)->DraftDVI
5918 \end_layout
5919
5920 \end_inset
5921
5922  converter in 
5923 \begin_inset Flex MenuItem
5924 status collapsed
5925
5926 \begin_layout Plain Layout
5927 Preferences\SpecialChar \menuseparator
5928 File Handling\SpecialChar \menuseparator
5929 Converters
5930 \end_layout
5931
5932 \end_inset
5933
5934  to 
5935 \begin_inset Flex Code
5936 status collapsed
5937
5938 \begin_layout Plain Layout
5939 latex -src-specials $$i
5940 \end_layout
5941
5942 \end_inset
5943
5944 .
5945  If this doesn't work, check if your TeX engine needs different options
5946  (the syntax might differ in some distributions).
5947 \end_layout
5948
5949 \begin_layout Subsubsection*
5950 External Packages (PDFSync and scrltx) 
5951 \end_layout
5952
5953 \begin_layout Standard
5954 The packages 
5955 \emph on
5956 pdfsync
5957 \emph default
5958  and 
5959 \emph on
5960 scrltx
5961 \emph default
5962  provide reverse search facility for PDF output (via pdflatex) and DVI output,
5963  respectively.
5964  In order to enable it, load the packages in the LyX preamble: 
5965 \end_layout
5966
5967 \begin_layout Itemize
5968 \begin_inset Flex Code
5969 status collapsed
5970
5971 \begin_layout Plain Layout
5972
5973 \backslash
5974 usepackage{pdfsync}
5975 \end_layout
5976
5977 \end_inset
5978
5979  for reverse PDF search,
5980 \end_layout
5981
5982 \begin_layout Itemize
5983 \begin_inset Flex Code
5984 status collapsed
5985
5986 \begin_layout Plain Layout
5987
5988 \backslash
5989 usepackage[active]{srcltx}
5990 \end_layout
5991
5992 \end_inset
5993
5994  for reverse DVI search.
5995 \end_layout
5996
5997 \begin_layout Standard
5998 If you want to be able to perform both DVI and PDF reverse searches, you
5999  can also insert in the preamble the following lines
6000 \end_layout
6001
6002 \begin_layout LyX-Code
6003
6004 \backslash
6005 usepackage{ifpdf}
6006 \begin_inset Newline newline
6007 \end_inset
6008
6009
6010 \backslash
6011 ifpdf
6012 \begin_inset Newline newline
6013 \end_inset
6014
6015   
6016 \backslash
6017 usepackage{pdfsync}
6018 \begin_inset Newline newline
6019 \end_inset
6020
6021
6022 \backslash
6023 else
6024 \begin_inset Newline newline
6025 \end_inset
6026
6027   
6028 \backslash
6029 usepackage[active]{srcltx}
6030 \begin_inset Newline newline
6031 \end_inset
6032
6033
6034 \backslash
6035 fi
6036 \end_layout
6037
6038 \begin_layout Standard
6039 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6040  right package will be used.
6041 \end_layout
6042
6043 \begin_layout Standard
6044 Note that PDFSync might affect the output layout of your document.
6045  It is therefore advised to disable PDFsync for final documents.
6046 \end_layout
6047
6048 \begin_layout Subsubsection*
6049 Built-in reverse search via SyncTeX (DVI and PDF) 
6050 \end_layout
6051
6052 \begin_layout Standard
6053 Recent versions of 
6054 \begin_inset Flex Code
6055 status collapsed
6056
6057 \begin_layout Plain Layout
6058 (pdf)latex
6059 \end_layout
6060
6061 \end_inset
6062
6063  have built-in support for both PDF and DVI reverse search.
6064  This so-called 
6065 \emph on
6066 SyncTeX
6067 \emph default
6068  facility is basically the result of the integration of the PDFSync package
6069  to the pdftex program and its merge with the 
6070 \emph on
6071 scr-specials
6072 \emph default
6073  approach.
6074  You need at least TeXLive 2008 or a recent MikTeX distribution in order
6075  to use it.
6076  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6077  already provide SyncTeX support.
6078 \end_layout
6079
6080 \begin_layout Standard
6081 To enable SyncTeX for DVI output, change the 
6082 \begin_inset Flex MenuItem
6083 status collapsed
6084
6085 \begin_layout Plain Layout
6086 LaT
6087 \begin_inset ERT
6088 status collapsed
6089
6090 \begin_layout Plain Layout
6091
6092 {}
6093 \end_layout
6094
6095 \end_inset
6096
6097 eX (plain) -> DVI
6098 \end_layout
6099
6100 \end_inset
6101
6102  or 
6103 \begin_inset Flex MenuItem
6104 status collapsed
6105
6106 \begin_layout Plain Layout
6107 LaT
6108 \begin_inset ERT
6109 status collapsed
6110
6111 \begin_layout Plain Layout
6112
6113 {}
6114 \end_layout
6115
6116 \end_inset
6117
6118 eX (plain) -> DraftDVI
6119 \end_layout
6120
6121 \end_inset
6122
6123  converter in 
6124 \begin_inset Flex MenuItem
6125 status collapsed
6126
6127 \begin_layout Plain Layout
6128 Preferences\SpecialChar \menuseparator
6129 File Handling\SpecialChar \menuseparator
6130 Converters
6131 \end_layout
6132
6133 \end_inset
6134
6135  to 
6136 \begin_inset Flex Code
6137 status collapsed
6138
6139 \begin_layout Plain Layout
6140 latex -synctex=1 $$i
6141 \end_layout
6142
6143 \end_inset
6144
6145 , and for PDF output, change the 
6146 \begin_inset Flex MenuItem
6147 status collapsed
6148
6149 \begin_layout Plain Layout
6150 LaT
6151 \begin_inset ERT
6152 status collapsed
6153
6154 \begin_layout Plain Layout
6155
6156 {}
6157 \end_layout
6158
6159 \end_inset
6160
6161 eX (pdflatex) -> PDF (pdflatex)
6162 \end_layout
6163
6164 \end_inset
6165
6166  or converter to 
6167 \begin_inset Flex Code
6168 status collapsed
6169
6170 \begin_layout Plain Layout
6171 pdflatex -synctex=1 $$i
6172 \end_layout
6173
6174 \end_inset
6175
6176 .
6177  Check the documentation of your viewer whether the viewer needs to be configure
6178 d for the use with SyncTeX.
6179 \begin_inset Foot
6180 status collapsed
6181
6182 \begin_layout Plain Layout
6183 Note that the option 
6184 \begin_inset Flex Code
6185 status collapsed
6186
6187 \begin_layout Plain Layout
6188 -synctex=1
6189 \end_layout
6190
6191 \end_inset
6192
6193  option enables gzip compression.
6194  If your viewer does not support it, you should instead use 
6195 \begin_inset Flex Code
6196 status collapsed
6197
6198 \begin_layout Plain Layout
6199 -synctex=-1
6200 \end_layout
6201
6202 \end_inset
6203
6204 .
6205 \end_layout
6206
6207 \end_inset
6208
6209
6210 \end_layout
6211
6212 \begin_layout Subsection
6213 Configuring and using specific viewers
6214 \begin_inset CommandInset label
6215 LatexCommand label
6216 name "sub:configuring-viewers"
6217
6218 \end_inset
6219
6220
6221 \end_layout
6222
6223 \begin_layout Subsubsection*
6224 Xdvi (all platforms)
6225 \end_layout
6226
6227 \begin_layout Standard
6228 If you use 
6229 \begin_inset Flex Code
6230 status collapsed
6231
6232 \begin_layout Plain Layout
6233 xdvi
6234 \end_layout
6235
6236 \end_inset
6237
6238 , you don't need to do anything else for performing a reverse DVI search,
6239  as LyX already provides the necessary hooks for automatically using the
6240  
6241 \begin_inset Flex Code
6242 status collapsed
6243
6244 \begin_layout Plain Layout
6245 lyxclient
6246 \end_layout
6247
6248 \end_inset
6249
6250  program.
6251  Just setup your document as described above (reverse search is triggered
6252  by Ctrl-click or Alt-click on Mac OSX, respectively).
6253 \end_layout
6254
6255 \begin_layout Standard
6256 However, if for whatever reason you want to use the named pipe instead of
6257  the socket for communicating with LyX, simply change the DVI viewer in
6258  
6259 \begin_inset Flex MenuItem
6260 status collapsed
6261
6262 \begin_layout Plain Layout
6263 Preferences\SpecialChar \menuseparator
6264 File Handling\SpecialChar \menuseparator
6265 File formats
6266 \end_layout
6267
6268 \end_inset
6269
6270  to
6271 \begin_inset Foot
6272 status collapsed
6273
6274 \begin_layout Plain Layout
6275 On Mac OSX you have to use 
6276 \begin_inset Flex Code
6277 status collapsed
6278
6279 \begin_layout Plain Layout
6280 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6281 \end_layout
6282
6283 \end_inset
6284
6285
6286 \end_layout
6287
6288 \end_inset
6289
6290  
6291 \begin_inset Flex Code
6292 status collapsed
6293
6294 \begin_layout Plain Layout
6295 xdvi -editor 'lyxeditor.sh %f %l'
6296 \end_layout
6297
6298 \end_inset
6299
6300 , where 
6301 \begin_inset Flex Code
6302 status collapsed
6303
6304 \begin_layout Plain Layout
6305 lyxeditor.sh
6306 \end_layout
6307
6308 \end_inset
6309
6310  is a suitable script.
6311  For example, a minimal shell script is the following one:
6312 \end_layout
6313
6314 \begin_layout LyX-Code
6315 #!/bin/sh
6316 \begin_inset Newline newline
6317 \end_inset
6318
6319 LYXPIPE="/path/to/lyxpipe"
6320 \begin_inset Newline newline
6321 \end_inset
6322
6323 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6324 \begin_inset Newline newline
6325 \end_inset
6326
6327 echo "$COMMAND" > "${LYXPIPE}".in || exit
6328 \begin_inset Newline newline
6329 \end_inset
6330
6331 read < "${LYXPIPE}".out || exit
6332 \end_layout
6333
6334 \begin_layout Standard
6335 where 
6336 \begin_inset Flex Code
6337 status collapsed
6338
6339 \begin_layout Plain Layout
6340 /path/to/lyxpipe
6341 \end_layout
6342
6343 \end_inset
6344
6345  is the Ly
6346 \begin_inset ERT
6347 status collapsed
6348
6349 \begin_layout Plain Layout
6350
6351 {}
6352 \end_layout
6353
6354 \end_inset
6355
6356 XServer pipe path specified in 
6357 \begin_inset Flex MenuItem
6358 status collapsed
6359
6360 \begin_layout Plain Layout
6361 Preferences\SpecialChar \menuseparator
6362 Paths
6363 \end_layout
6364
6365 \end_inset
6366
6367 .
6368 \begin_inset Foot
6369 status collapsed
6370
6371 \begin_layout Plain Layout
6372 In the 
6373 \begin_inset Flex Code
6374 status collapsed
6375
6376 \begin_layout Plain Layout
6377 development/tools
6378 \end_layout
6379
6380 \end_inset
6381
6382  folder of a source distribution you can find a 
6383 \begin_inset Flex Code
6384 status collapsed
6385
6386 \begin_layout Plain Layout
6387 lyxeditor
6388 \end_layout
6389
6390 \end_inset
6391
6392  script which is able to locate the 
6393 \emph on
6394 lyxpipe
6395 \emph default
6396  based on your preferences.
6397 \end_layout
6398
6399 \end_inset
6400
6401
6402 \end_layout
6403
6404 \begin_layout Subsubsection*
6405 MacDviX (Mac OSX)
6406 \end_layout
6407
6408 \begin_layout Standard
6409 At the end of 
6410 \begin_inset Flex Code
6411 status collapsed
6412
6413 \begin_layout Plain Layout
6414 /Applications/MacDviX_Folder/calleditor.script
6415 \end_layout
6416
6417 \end_inset
6418
6419 , add the following lines:
6420 \end_layout
6421
6422 \begin_layout LyX-Code
6423 /Applications/Ly
6424 \begin_inset ERT
6425 status collapsed
6426
6427 \begin_layout Plain Layout
6428
6429 {}
6430 \end_layout
6431
6432 \end_inset
6433
6434 X.app/Contents/MacOS/lyxeditor "$2" $1
6435 \begin_inset Newline newline
6436 \end_inset
6437
6438 exit 1
6439 \end_layout
6440
6441 \begin_layout Standard
6442 Modify the lines accordingly if you install LyX somewhere else than in the
6443  Applications folder.
6444 \end_layout
6445
6446 \begin_layout Standard
6447 Reverse search is triggered by Alt-click (OPTION-click).
6448 \end_layout
6449
6450 \begin_layout Subsubsection*
6451 Skim (Mac OSX)
6452 \end_layout
6453
6454 \begin_layout Standard
6455 Enter 
6456 \begin_inset Flex Code
6457 status collapsed
6458
6459 \begin_layout Plain Layout
6460 open -a Skim.app $$i
6461 \end_layout
6462
6463 \end_inset
6464
6465  to the viewer setting in 
6466 \begin_inset Flex MenuItem
6467 status collapsed
6468
6469 \begin_layout Plain Layout
6470 Preferences\SpecialChar \menuseparator
6471 File Handling\SpecialChar \menuseparator
6472 File formats\SpecialChar \menuseparator
6473 PDF (pdflatex)
6474 \end_layout
6475
6476 \end_inset
6477
6478 , and then in 
6479 \begin_inset Flex MenuItem
6480 status collapsed
6481
6482 \begin_layout Plain Layout
6483 Skim\SpecialChar \menuseparator
6484 Preferences\SpecialChar \menuseparator
6485 Sync
6486 \end_layout
6487
6488 \end_inset
6489
6490  choose 
6491 \begin_inset Flex MenuItem
6492 status collapsed
6493
6494 \begin_layout Plain Layout
6495 custom
6496 \end_layout
6497
6498 \end_inset
6499
6500  preset and enter command 
6501 \begin_inset Flex MenuItem
6502 status collapsed
6503
6504 \begin_layout Plain Layout
6505 /Applications/LyX.app/Contents/MacOS/lyxeditor
6506 \end_layout
6507
6508 \end_inset
6509
6510 .
6511 \end_layout
6512
6513 \begin_layout Standard
6514 Reverse search is triggered by COMMAND-SHIFT-click
6515 \end_layout
6516
6517 \begin_layout Subsubsection*
6518 Okular (KDE)
6519 \end_layout
6520
6521 \begin_layout Standard
6522 Go to 
6523 \begin_inset Flex MenuItem
6524 status collapsed
6525
6526 \begin_layout Plain Layout
6527 Settings\SpecialChar \menuseparator
6528 Configure Okular\SpecialChar \ldots{}
6529 \SpecialChar \menuseparator
6530 Editor
6531 \end_layout
6532
6533 \end_inset
6534
6535 , select 
6536 \begin_inset Quotes eld
6537 \end_inset
6538
6539 Custom Text Editor
6540 \begin_inset Quotes erd
6541 \end_inset
6542
6543  and add the command 
6544 \begin_inset Flex Code
6545 status collapsed
6546
6547 \begin_layout Plain Layout
6548 lyxclient -g %f %l
6549 \end_layout
6550
6551 \end_inset
6552
6553 .
6554 \end_layout
6555
6556 \begin_layout Standard
6557 Reverse search is triggered by SHIFT-click.
6558 \end_layout
6559
6560 \begin_layout Subsubsection*
6561 YAP (Windows)
6562 \end_layout
6563
6564 \begin_layout Standard
6565 Launch yap, choose its 
6566 \begin_inset Flex MenuItem
6567 status collapsed
6568
6569 \begin_layout Plain Layout
6570 View\SpecialChar \menuseparator
6571 Options
6572 \end_layout
6573
6574 \end_inset
6575
6576  menu and select the 
6577 \begin_inset Quotes eld
6578 \end_inset
6579
6580 Inverse DVI Search
6581 \begin_inset Quotes erd
6582 \end_inset
6583
6584  tab.
6585  Click on the 
6586 \begin_inset Quotes eld
6587 \end_inset
6588
6589 New\SpecialChar \ldots{}
6590
6591 \begin_inset Quotes erd
6592 \end_inset
6593
6594  button and, in the window that opens, enter 
6595 \begin_inset Quotes eld
6596 \end_inset
6597
6598 LyX Editor
6599 \begin_inset Quotes erd
6600 \end_inset
6601
6602  (or any other name you like) in the 
6603 \begin_inset Quotes eld
6604 \end_inset
6605
6606 Name:
6607 \begin_inset Quotes erd
6608 \end_inset
6609
6610  field.
6611  Now click on the button labeled 
6612 \begin_inset Quotes eld
6613 \end_inset
6614
6615 \SpecialChar \ldots{}
6616
6617 \begin_inset Quotes erd
6618 \end_inset
6619
6620  to open a file dialog and navigate to the directory containing the batch
6621  file 
6622 \begin_inset Flex Code
6623 status collapsed
6624
6625 \begin_layout Plain Layout
6626 lyxeditor.bat
6627 \end_layout
6628
6629 \end_inset
6630
6631  (see below).
6632  Select 
6633 \begin_inset Flex Code
6634 status collapsed
6635
6636 \begin_layout Plain Layout
6637 lyxeditor.bat
6638 \end_layout
6639
6640 \end_inset
6641
6642  and then specify the program arguments as 
6643 \begin_inset Flex Code
6644 status collapsed
6645
6646 \begin_layout Plain Layout
6647 %f %l
6648 \end_layout
6649
6650 \end_inset
6651
6652 .
6653  The 
6654 \begin_inset Flex Code
6655 status collapsed
6656
6657 \begin_layout Plain Layout
6658 lyxeditor.bat
6659 \end_layout
6660
6661 \end_inset
6662
6663  wrapper is used for communicating with LyX through the 
6664 \emph on
6665 lyxpipe
6666 \emph default
6667  and is as follows:
6668 \end_layout
6669
6670 \begin_layout LyX-Code
6671 @echo off
6672 \begin_inset Newline newline
6673 \end_inset
6674
6675 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6676 \backslash
6677
6678 \backslash
6679 .
6680 \backslash
6681 pipe
6682 \backslash
6683 lyxpipe.in
6684 \begin_inset Newline newline
6685 \end_inset
6686
6687 type 
6688 \backslash
6689
6690 \backslash
6691 .
6692 \backslash
6693 pipe
6694 \backslash
6695 lyxpipe.out
6696 \end_layout
6697
6698 \begin_layout Standard
6699 Make sure that the LyXServer pipe path you specified in LyX is 
6700 \begin_inset Flex Code
6701 status collapsed
6702
6703 \begin_layout Plain Layout
6704
6705 \backslash
6706
6707 \backslash
6708 .
6709 \backslash
6710 pipe
6711 \backslash
6712 lyxpipe
6713 \end_layout
6714
6715 \end_inset
6716
6717 , otherwise change the 
6718 \begin_inset Flex Code
6719 status collapsed
6720
6721 \begin_layout Plain Layout
6722 lyxeditor.bat
6723 \end_layout
6724
6725 \end_inset
6726
6727  wrapper accordingly.
6728 \end_layout
6729
6730 \begin_layout Standard
6731 In yap, reverse search is triggered by double-click.
6732 \end_layout
6733
6734 \begin_layout Subsubsection*
6735 SumatraPDF (Windows)
6736 \end_layout
6737
6738 \begin_layout Standard
6739 In order to use SumatraPDF for inverse search, enter 
6740 \begin_inset Flex Code
6741 status collapsed
6742
6743 \begin_layout Plain Layout
6744 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6745 \end_layout
6746
6747 \end_inset
6748
6749  in the viewer setting in 
6750 \begin_inset Flex MenuItem
6751 status collapsed
6752
6753 \begin_layout Plain Layout
6754 Preferences\SpecialChar \menuseparator
6755 File Handling\SpecialChar \menuseparator
6756 File formats\SpecialChar \menuseparator
6757 PDF (pdflatex)
6758 \end_layout
6759
6760 \end_inset
6761
6762 , where 
6763 \begin_inset Flex Code
6764 status collapsed
6765
6766 \begin_layout Plain Layout
6767 lyxeditor.bat
6768 \end_layout
6769
6770 \end_inset
6771
6772  is the previous wrapper.
6773  If SumatraPDF.exe is not in your command PATH, use its full file name.
6774 \end_layout
6775
6776 \begin_layout Standard
6777 Reverse search is triggered by double-click.
6778 \end_layout
6779
6780 \begin_layout Subsubsection*
6781 YAP (Cygwin)
6782 \end_layout
6783
6784 \begin_layout Standard
6785 First of all, make sure that yap is your default DVI viewer in the Windows
6786  environment, then launch it, choose its 
6787 \begin_inset Flex MenuItem
6788 status collapsed
6789
6790 \begin_layout Plain Layout
6791 View\SpecialChar \menuseparator
6792 Options
6793 \end_layout
6794
6795 \end_inset
6796
6797  menu and select the 
6798 \begin_inset Quotes eld
6799 \end_inset
6800
6801 Inverse DVI Search
6802 \begin_inset Quotes erd
6803 \end_inset
6804
6805  tab.
6806  Click on the 
6807 \begin_inset Quotes eld
6808 \end_inset
6809
6810 New\SpecialChar \ldots{}
6811
6812 \begin_inset Quotes erd
6813 \end_inset
6814
6815  button and, in the window that opens, enter 
6816 \begin_inset Quotes eld
6817 \end_inset
6818
6819 LyX Editor
6820 \begin_inset Quotes erd
6821 \end_inset
6822
6823  (or any other name you like) in the 
6824 \begin_inset Quotes eld
6825 \end_inset
6826
6827 Name:
6828 \begin_inset Quotes erd
6829 \end_inset
6830
6831  field.
6832  Now click on the button labeled 
6833 \begin_inset Quotes eld
6834 \end_inset
6835
6836 \SpecialChar \ldots{}
6837
6838 \begin_inset Quotes erd
6839 \end_inset
6840
6841  to open a file dialog and navigate to the directory containing the 
6842 \begin_inset Flex Code
6843 status collapsed
6844
6845 \begin_layout Plain Layout
6846 lyxeditor.exe
6847 \end_layout
6848
6849 \end_inset
6850
6851  program (which is installed by default on Cygwin along with the LyX executable).
6852  Select 
6853 \begin_inset Flex Code
6854 status collapsed
6855
6856 \begin_layout Plain Layout
6857 lyxeditor.exe
6858 \end_layout
6859
6860 \end_inset
6861
6862  and then specify the program arguments as 
6863 \begin_inset Flex Code
6864 status collapsed
6865
6866 \begin_layout Plain Layout
6867 -g %f %l
6868 \end_layout
6869
6870 \end_inset
6871
6872 .
6873  In this way, you will be using the 
6874 \emph on
6875 lyxsocket
6876 \emph default
6877  for communicating with LyX.
6878  If, for whatever reason, you want to use the 
6879 \emph on
6880 lyxpipe
6881 \emph default
6882 , omit the 
6883 \begin_inset Flex Code
6884 status collapsed
6885
6886 \begin_layout Plain Layout
6887 -g
6888 \end_layout
6889
6890 \end_inset
6891
6892  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6893 \end_layout
6894
6895 \begin_layout Standard
6896 In yap, reverse search is triggered by double-click.
6897 \end_layout
6898
6899 \begin_layout Subsubsection*
6900 SumatraPDF (Cygwin)
6901 \end_layout
6902
6903 \begin_layout Standard
6904 In order to use SumatraPDF for inverse search, enter 
6905 \begin_inset Flex Code
6906 status collapsed
6907
6908 \begin_layout Plain Layout
6909 SumatraPDF -inverse-search "lyxeditor -g %f %l"
6910 \end_layout
6911
6912 \end_inset
6913
6914  in the viewer setting in 
6915 \begin_inset Flex MenuItem
6916 status collapsed
6917
6918 \begin_layout Plain Layout
6919 Preferences\SpecialChar \menuseparator
6920 File Handling\SpecialChar \menuseparator
6921 File formats\SpecialChar \menuseparator
6922 PDF (pdflatex)
6923 \end_layout
6924
6925 \end_inset
6926
6927 .
6928  If SumatraPDF.exe is not in your command PATH, use its full posix path.
6929  The 
6930 \begin_inset Flex Code
6931 status collapsed
6932
6933 \begin_layout Plain Layout
6934 -g
6935 \end_layout
6936
6937 \end_inset
6938
6939  enables communication via the 
6940 \emph on
6941 lyxsocket
6942 \emph default
6943 .
6944  Again, omit the 
6945 \begin_inset Flex Code
6946 status collapsed
6947
6948 \begin_layout Plain Layout
6949 -g
6950 \end_layout
6951
6952 \end_inset
6953
6954  option if you want to use the 
6955 \emph on
6956 lyxpipe
6957 \emph default
6958 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6959 \end_layout
6960
6961 \begin_layout Standard
6962 Reverse search is triggered by double-click.
6963 \end_layout
6964
6965 \begin_layout Section
6966 Forward search
6967 \end_layout
6968
6969 \begin_layout Standard
6970 Forward search is, as the name implies, in a sense the 
6971 \begin_inset Quotes eld
6972 \end_inset
6973
6974 opposite
6975 \begin_inset Quotes erd
6976 \end_inset
6977
6978  of reverse search.
6979  It allows you to let the viewer jump to a given position from within LyX.
6980  If forward search is set up (as described in what follows), you can put
6981  the cursor anywhere in your LyX document, and hit 
6982 \begin_inset Flex MenuItem
6983 status collapsed
6984
6985 \begin_layout Plain Layout
6986 Navigate\SpecialChar \menuseparator
6987 Forward search
6988 \end_layout
6989
6990 \end_inset
6991
6992  (or select 
6993 \begin_inset Flex MenuItem
6994 status collapsed
6995
6996 \begin_layout Plain Layout
6997 Forward search
6998 \end_layout
6999
7000 \end_inset
7001
7002  in the context menu via right mouse click), and then the viewer will jump
7003  to that position as well.
7004  This implies, of course, that your viewer supports this function.
7005 \end_layout
7006
7007 \begin_layout Standard
7008 To make forward search possible, you first need to provide the generated
7009  output PDF/DVI file with additional information about the TeX sources.
7010  This can be done via the methods described in the section 
7011 \begin_inset CommandInset ref
7012 LatexCommand ref
7013 reference "sub:rev-search"
7014
7015 \end_inset
7016
7017 .
7018 \end_layout
7019
7020 \begin_layout Standard
7021 Additionally, you need to configure LyX for using your viewers in 
7022 \begin_inset Flex MenuItem
7023 status collapsed
7024
7025 \begin_layout Plain Layout
7026 Tools\SpecialChar \menuseparator
7027 Preferences\SpecialChar \menuseparator
7028 Output\SpecialChar \menuseparator
7029 General
7030 \end_layout
7031
7032 \end_inset
7033
7034 .
7035  We provide a range of tested configurations for some viewers, which you
7036  can select from the drop down list.
7037  If none of these configurations suits you, you have to find out and enter
7038  a suitable configuration yourself.
7039  The definition syntax uses the following placeholders:
7040 \end_layout
7041
7042 \begin_layout Itemize
7043 \noindent
7044 \begin_inset Flex Code
7045 status collapsed
7046
7047 \begin_layout Plain Layout
7048 $$n
7049 \end_layout
7050
7051 \end_inset
7052
7053 : row number
7054 \end_layout
7055
7056 \begin_layout Itemize
7057 \noindent
7058 \begin_inset Flex Code
7059 status collapsed
7060
7061 \begin_layout Plain Layout
7062 $$t
7063 \end_layout
7064
7065 \end_inset
7066
7067 : name of the (temporary) exported .tex file (without path)
7068 \end_layout
7069
7070 \begin_layout Itemize
7071 \noindent
7072 \begin_inset Flex Code
7073 status collapsed
7074
7075 \begin_layout Plain Layout
7076 $$f
7077 \end_layout
7078
7079 \end_inset
7080
7081 : name of the (temporary) exported .tex file (including path)
7082 \end_layout
7083
7084 \begin_layout Itemize
7085 \noindent
7086 \begin_inset Flex Code
7087 status collapsed
7088
7089 \begin_layout Plain Layout
7090 $$o
7091 \end_layout
7092
7093 \end_inset
7094
7095 : name of the exported output file (either dvi or pdf, depending on which
7096  one exists in the temporary directory)
7097 \end_layout
7098
7099 \begin_layout Standard
7100 Note that only some of the viewers provide full forward search functionality,
7101  among them yap, xdvi, okular and Sumatra PDF.
7102 \begin_inset Foot
7103 status collapsed
7104
7105 \begin_layout Plain Layout
7106 For Sumatra CMCDDE is needed --- downloadable from 
7107 \begin_inset CommandInset href
7108 LatexCommand href
7109 target "http://www.istri.fr/zip/CMCDDE.zip"
7110
7111 \end_inset
7112
7113
7114 \end_layout
7115
7116 \end_inset
7117
7118  While many of the widespread PDF viewers (most notably Adobe Reader) do
7119  not support forward search at all, some other viewers -- e.
7120 \begin_inset space \thinspace{}
7121 \end_inset
7122
7123 g.
7124  evince and xpdf -- allow at least to reload the document and jump to a
7125  specific page of the file, so you can at least navigate 
7126 \begin_inset Quotes eld
7127 \end_inset
7128
7129 near
7130 \begin_inset Quotes erd
7131 \end_inset
7132
7133 .
7134  This latter functionality is provided by an external call of synctex (see
7135  the predefined example configurations).
7136  
7137 \end_layout
7138
7139 \begin_layout Standard
7140 Forward search works both with DVI and PDF output.
7141  LyX simply checks which preview format you have used before (i.
7142 \begin_inset space \thinspace{}
7143 \end_inset
7144
7145 e., which format is already there in the temporary directory) and chooses
7146  the appropriate configuration for the respective format.
7147 \end_layout
7148
7149 \begin_layout Chapter
7150 Special Document Classes
7151 \end_layout
7152
7153 \begin_layout Section
7154 A&A Paper
7155 \end_layout
7156
7157 \begin_layout Standard
7158 by 
7159 \noun on
7160 Peter Sütterlin
7161 \end_layout
7162
7163 \begin_layout Subsection
7164 Introduction
7165 \end_layout
7166
7167 \begin_layout Standard
7168 This section describes how LyX can be used to write articles for submission
7169  to the scientific journal 
7170 \emph on
7171 Astronomy and Astrophysics
7172 \emph default
7173  (www.edpsciences.fr/aa/ 
7174 \begin_inset Flex URL
7175 status collapsed
7176
7177 \begin_layout Plain Layout
7178
7179 http://www.edpsciences.fr/aa/
7180 \end_layout
7181
7182 \end_inset
7183
7184 ) using Version 5.01 of the document class 
7185 \family typewriter
7186 aa.cls
7187 \family default
7188 .
7189  This package can be downloaded from the ftp site
7190 \end_layout
7191
7192 \begin_layout Standard
7193 \begin_inset VSpace medskip
7194 \end_inset
7195
7196
7197 \end_layout
7198
7199 \begin_layout Standard
7200 \align center
7201 \begin_inset Flex URL
7202 status collapsed
7203
7204 \begin_layout Plain Layout
7205
7206 ftp://ftp.edpsciences.org/pub/aa/readme.html
7207 \end_layout
7208
7209 \end_inset
7210
7211
7212 \end_layout
7213
7214 \begin_layout Standard
7215 \begin_inset VSpace medskip
7216 \end_inset
7217
7218
7219 \end_layout
7220
7221 \begin_layout Standard
7222 A manual comes together with that package, and this text is not meant to
7223  replace the original manual but is merely a short guide in how to realize
7224  the correct form of your paper.
7225  
7226 \end_layout
7227
7228 \begin_layout Standard
7229 Please note that the publisher of the journal was changed from Springer
7230  to EDP Sciences starting January 1, 2001.
7231  That change involved also some slight changes to the style files, namely
7232  the removal of the thesaurus command.
7233  The LyX class aa supports the newest version of these style files, V 5.01.
7234  If you have an older version installed, please upgrade.
7235  For compatibility, the old (version 4) layout has been kept as 
7236 \family sans
7237 article (A&A V4)
7238 \family default
7239 .
7240  Please refer to the comments in 
7241 \family typewriter
7242 LyXDir/layouts/aapaper.layout
7243 \family default
7244 .
7245 \end_layout
7246
7247 \begin_layout Subsection
7248 Getting started
7249 \end_layout
7250
7251 \begin_layout Standard
7252 It is recommended you start from the example template distributed with LyX.
7253  If you are not using a template, note the following settings:
7254 \end_layout
7255
7256 \begin_layout Itemize
7257 Select 
7258 \family sans
7259 article (A&A)
7260 \family default
7261  in the 
7262 \family sans
7263 Document\SpecialChar \menuseparator
7264 Settings
7265 \family default
7266  dialog (OK, that one was obvious).
7267 \end_layout
7268
7269 \begin_layout Itemize
7270 Don't change the option 
7271 \family sans
7272 Page
7273 \begin_inset space ~
7274 \end_inset
7275
7276 style
7277 \family default
7278 : Leave it set to 
7279 \family sans
7280 default
7281 \family default
7282 .
7283  The whole layout is done by the macros, you shouldn't change anything.
7284 \end_layout
7285
7286 \begin_layout Subsection
7287 The header block
7288 \end_layout
7289
7290 \begin_layout Standard
7291 First thing to enter is the header information.
7292  It consists of seven entries, of which some are optional.
7293  They are
7294 \end_layout
7295
7296 \begin_layout Itemize
7297
7298 \family sans
7299 Title
7300 \family default
7301 : [required] 
7302 \end_layout
7303
7304 \begin_layout Itemize
7305
7306 \family sans
7307 Subtitle
7308 \family default
7309 : [optional] 
7310 \end_layout
7311
7312 \begin_layout Itemize
7313
7314 \family sans
7315 Author
7316 \family default
7317 : [required]
7318 \end_layout
7319
7320 \begin_layout Itemize
7321
7322 \family sans
7323 Address
7324 \family default
7325 : [required]
7326 \end_layout
7327
7328 \begin_layout Itemize
7329
7330 \family sans
7331 Offprints
7332 \family default
7333 : [optional] if more than one author: whom to contact for offprint requests.
7334 \end_layout
7335
7336 \begin_layout Itemize
7337
7338 \family sans
7339 Mail
7340 \family default
7341 : [optional] mail address for contacts.
7342 \end_layout
7343
7344 \begin_layout Itemize
7345
7346 \family sans
7347 Date
7348 \family default
7349 : [required].
7350  Suggested format is 
7351 \family typewriter
7352 Received: <date>; Accepted <date> 
7353 \end_layout
7354
7355 \begin_layout Standard
7356 There is no need to issue the 
7357 \family typewriter
7358
7359 \backslash
7360 maketitle
7361 \family default
7362  command, this is done automatically by LyX when the header is finished.
7363  Although the order of the single header entries doesn't matter it is advised
7364  to keep the above sequence, just to get the best optics and meets the layout
7365  of the real document.
7366 \end_layout
7367
7368 \begin_layout Standard
7369 If you want to place footnotes in the header block, e.
7370 \begin_inset space \thinspace{}
7371 \end_inset
7372
7373 g.
7374 \begin_inset space \space{}
7375 \end_inset
7376
7377 to state your present address, just use the standard footnote via the menu
7378  
7379 \family sans
7380 Insert\SpecialChar \menuseparator
7381 Footnote.
7382
7383 \family default
7384  LyX will automagically use the term 
7385 \family typewriter
7386
7387 \backslash
7388 thanks{}
7389 \family default
7390  in that case.
7391 \end_layout
7392
7393 \begin_layout Standard
7394 In addition to these topics, the macros use three additional LaTeX commands
7395  that have no counterpart in LyX:
7396 \end_layout
7397
7398 \begin_layout Itemize
7399
7400 \family typewriter
7401
7402 \backslash
7403 and
7404 \family default
7405  to separate different names for more than one author and institute, respectivel
7406 y.
7407 \end_layout
7408
7409 \begin_layout Itemize
7410
7411 \family typewriter
7412
7413 \backslash
7414 inst{<nr>}
7415 \family default
7416 to mark corresponding author/institute pairs.
7417  The institutes are numbered sequentially as they appear in the 
7418 \family sans
7419 Address
7420 \family default
7421  field, so you have to put a marker to each author.
7422 \end_layout
7423
7424 \begin_layout Itemize
7425
7426 \family typewriter
7427
7428 \backslash
7429 email{address}
7430 \family default
7431  to supply an email address for fast contact.
7432 \end_layout
7433
7434 \begin_layout Standard
7435 In all cases, the appropriate command has to be entered in LyX and marked
7436  as LaTeX code.
7437  See the examples.
7438  
7439 \end_layout
7440
7441 \begin_layout Subsection
7442 The abstract
7443 \end_layout
7444
7445 \begin_layout Standard
7446 The abstract should immediately follow the header block.
7447  With version 5 the abstract environment was changed to a command, and there
7448  is now a resctriction to only one paragraph.
7449  In addition, it should contain an entry with the keywords.
7450  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7451  command 
7452 \family typewriter
7453
7454 \backslash
7455 keywords{}
7456 \family default
7457  by hand and mark it as LaTeX code.
7458  Refer to the example paper.
7459 \end_layout
7460
7461 \begin_layout Subsection
7462 Supported environments
7463 \end_layout
7464
7465 \begin_layout Standard
7466 The A&A paper layout supports the following environments for structuring
7467  your text:
7468 \end_layout
7469
7470 \begin_layout Itemize
7471
7472 \family sans
7473 Standard
7474 \end_layout
7475
7476 \begin_layout Itemize
7477
7478 \family sans
7479 Section
7480 \end_layout
7481
7482 \begin_layout Itemize
7483
7484 \family sans
7485 Subsection
7486 \end_layout
7487
7488 \begin_layout Itemize
7489
7490 \family sans
7491 Subsubsection
7492 \end_layout
7493
7494 \begin_layout Itemize
7495
7496 \family sans
7497 Itemize
7498 \end_layout
7499
7500 \begin_layout Itemize
7501
7502 \family sans
7503 Enumerate
7504 \end_layout
7505
7506 \begin_layout Itemize
7507
7508 \family sans
7509 Description
7510 \end_layout
7511
7512 \begin_layout Itemize
7513
7514 \family sans
7515 Caption
7516 \end_layout
7517
7518 \begin_layout Itemize
7519
7520 \family sans
7521 Abstract
7522 \end_layout
7523
7524 \begin_layout Itemize
7525
7526 \family sans
7527 Acknowledgment
7528 \end_layout
7529
7530 \begin_layout Itemize
7531
7532 \family sans
7533 Bibliography
7534 \end_layout
7535
7536 \begin_layout Itemize
7537
7538 \family sans
7539 LaTeX
7540 \end_layout
7541
7542 \begin_layout Subsection
7543 Commands not supported by LyX
7544 \end_layout
7545
7546 \begin_layout Standard
7547 Some commands are not yet supported by the 
7548 \family sans
7549 paper (A&A)
7550 \family default
7551  layout for LyX.
7552  Some have already been mentioned.
7553  For the sake of completeness, they are listed all together here:
7554 \end_layout
7555
7556 \begin_layout Itemize
7557
7558 \family typewriter
7559
7560 \backslash
7561 and
7562 \end_layout
7563
7564 \begin_layout Itemize
7565
7566 \family typewriter
7567
7568 \backslash
7569 email
7570 \end_layout
7571
7572 \begin_layout Itemize
7573
7574 \family typewriter
7575
7576 \backslash
7577 appendix
7578 \end_layout
7579
7580 \begin_layout Itemize
7581
7582 \family typewriter
7583
7584 \backslash
7585 authorrunning
7586 \end_layout
7587
7588 \begin_layout Itemize
7589
7590 \family typewriter
7591
7592 \backslash
7593 inst{}
7594 \end_layout
7595
7596 \begin_layout Itemize
7597
7598 \family typewriter
7599
7600 \backslash
7601 keywords{}
7602 \end_layout
7603
7604 \begin_layout Itemize
7605
7606 \family typewriter
7607
7608 \backslash
7609 object{}
7610 \end_layout
7611
7612 \begin_layout Itemize
7613
7614 \family typewriter
7615
7616 \backslash
7617 titlerunning{}
7618 \end_layout
7619
7620 \begin_layout Standard
7621 If you want to use any of these commands, you have to enter them yourself.
7622  
7623 \series bold
7624 Do not forget to mark them as LaTeX code!
7625 \end_layout
7626
7627 \begin_layout Subsection
7628 Figure and Table Floats
7629 \end_layout
7630
7631 \begin_layout Standard
7632 LyX provides support for the necessary float environments 
7633 \family sans
7634 figure, figure*, table
7635 \family default
7636  and 
7637 \family sans
7638 table*
7639 \family default
7640 , therefore we won't tell much about it here.
7641  Refer to the 
7642 \emph on
7643 User's
7644 \begin_inset space ~
7645 \end_inset
7646
7647 Guide
7648 \emph default
7649 .
7650  Just remember that tables should be left-aligned.
7651  For that, select the table and change the alignment in 
7652 \family sans
7653 Edit\SpecialChar \menuseparator
7654 Paragraph
7655 \begin_inset space ~
7656 \end_inset
7657
7658 Settings.
7659 \end_layout
7660
7661 \begin_layout Standard
7662 There is only one special thing: the figures with caption besides the figure.
7663  To create such a figure, you have to do the following:
7664 \end_layout
7665
7666 \begin_layout Enumerate
7667 Create a wide figure float: 
7668 \family sans
7669 Insert\SpecialChar \menuseparator
7670 Float\SpecialChar \menuseparator
7671 Figure
7672 \family default
7673 , then right click in the figure and select 
7674 \family sans
7675 \bar under
7676 S
7677 \bar default
7678 pan
7679 \begin_inset space ~
7680 \end_inset
7681
7682 columns
7683 \family default
7684 .
7685 \end_layout
7686
7687 \begin_layout Enumerate
7688 Enter your caption text.
7689 \end_layout
7690
7691 \begin_layout Enumerate
7692 Press 
7693 \family sans
7694 Return
7695 \family default
7696  to move the cursor above the caption.
7697 \end_layout
7698
7699 \begin_layout Enumerate
7700 Insert your figure
7701 \end_layout
7702
7703 \begin_layout Enumerate
7704 Position the cursor behind the figure and insert a horizontal fill: 
7705 \family sans
7706 Insert\SpecialChar \menuseparator
7707 Special
7708 \begin_inset space ~
7709 \end_inset
7710
7711 Character\SpecialChar \menuseparator
7712 Horizontal
7713 \begin_inset space ~
7714 \end_inset
7715
7716 Fill
7717 \family default
7718 .
7719 \end_layout
7720
7721 \begin_layout Enumerate
7722 Switch to LaTeX mode: 
7723 \family sans
7724 M-c
7725 \begin_inset space ~
7726 \end_inset
7727
7728 t
7729 \family default
7730 .
7731 \end_layout
7732
7733 \begin_layout Enumerate
7734 Enter 
7735 \family typewriter
7736
7737 \backslash
7738 parbox[b]{55mm}{
7739 \family default
7740 .
7741  
7742 \series bold
7743 Do not close the brace!
7744 \end_layout
7745
7746 \begin_layout Enumerate
7747 Position the cursor behind the caption text, switch to LaTeX mode and insert
7748  the closing brace: 
7749 \family sans
7750 M-c
7751 \begin_inset space ~
7752 \end_inset
7753
7754 t
7755 \family default
7756  
7757 \family typewriter
7758 }
7759 \family default
7760 .
7761 \end_layout
7762
7763 \begin_layout Standard
7764 Also, refer to the figures in the example paper.
7765 \end_layout
7766
7767 \begin_layout Subsection
7768 Referee layout
7769 \end_layout
7770
7771 \begin_layout Standard
7772 For submission, the paper has to be formated in a special double-spacing
7773  layout.
7774  For this purpose, you have to give the option 
7775 \family typewriter
7776 referee
7777 \family default
7778  to the documentclass.
7779  This must be done using the extra class options field in the 
7780 \family sans
7781 Document\SpecialChar \menuseparator
7782 Settings
7783 \family default
7784  dialog.
7785  Just enter the string 
7786 \family typewriter
7787 referee
7788 \family default
7789  there.
7790 \end_layout
7791
7792 \begin_layout Subsection
7793 The example paper
7794 \end_layout
7795
7796 \begin_layout Standard
7797 The 
7798 \family sans
7799 Examples
7800 \family default
7801  directory contains an example paper written with LyX.
7802  It is the example paper from the original macro package, translated to
7803  LyX.
7804  Use it for inspiration, and compare the original LaTeX code with LyX way
7805  of writing.
7806 \end_layout
7807
7808 \begin_layout Section
7809 AASTeX
7810 \end_layout
7811
7812 \begin_layout Standard
7813 by 
7814 \noun on
7815 Mike Ressler
7816 \end_layout
7817
7818 \begin_layout Subsection
7819 Introduction
7820 \end_layout
7821
7822 \begin_layout Standard
7823 AASTeX is a set of macros produced by the American Astronomical Society
7824  to facilitate electronic manuscript submission to the three journals they
7825  publish: the Astrophysical Journal (including the Letters and Supplement),
7826  the Astronomical Journal, and the Publications of the Astronomical Society
7827  of the Pacific.
7828  LyX has proven to be an excellent tool for generating these documents,
7829  especially given its equation, citation, and figure handling capabilities.
7830  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7831  is the version described here, or higher.
7832  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7833  incompatible with LyX.
7834  The AASTeX package may be downloaded from the AASTeX Web site
7835 \end_layout
7836
7837 \begin_layout Standard
7838 \begin_inset VSpace medskip
7839 \end_inset
7840
7841
7842 \end_layout
7843
7844 \begin_layout Standard
7845 \align center
7846 \begin_inset Flex URL
7847 status collapsed
7848
7849 \begin_layout Plain Layout
7850
7851 http://www.journals.uchicago.edu/AAS/AASTeX
7852 \end_layout
7853
7854 \end_inset
7855
7856
7857 \end_layout
7858
7859 \begin_layout Standard
7860 \begin_inset VSpace medskip
7861 \end_inset
7862
7863
7864 \end_layout
7865
7866 \begin_layout Standard
7867 A complete user guide is contained in that package and you should familiarize
7868  yourself with it thoroughly before embarking on writing a paper in LyX.
7869  LyX will not reduce the need to figure out all the AASTeX commands, it
7870  will only reduce the drudgery of typing everything in.
7871  It is your responsibility to ensure that the final exported LaTeX document
7872  conforms completely to the requirements of the journal to which you are
7873  submitting your paper.
7874 \end_layout
7875
7876 \begin_layout Subsection
7877 Starting a New Paper
7878 \end_layout
7879
7880 \begin_layout Standard
7881 I strongly suggest that you start with the AASTeX template file.
7882  Click on 
7883 \family sans
7884 File\SpecialChar \menuseparator
7885 New from
7886 \family default
7887  
7888 \family sans
7889 Template
7890 \family default
7891 , enter the new file name, then choose the 
7892 \family typewriter
7893 aastex.lyx
7894 \family default
7895  template.
7896  This will show the most common fields found in a manuscript.
7897  Simply overwrite the existing text (including the brackets, 
7898 \family typewriter
7899 <>
7900 \family default
7901 ) with the correct information.
7902  Many of the AASTeX commands and environments can be implemented directly
7903  in LyX, but some cannot: most noticeably 
7904 \family typewriter
7905
7906 \backslash
7907 altaffilmark
7908 \family default
7909  and 
7910 \family typewriter
7911
7912 \backslash
7913 altaffiltext
7914 \family default
7915 , which should stick out like a sore thumb if you actually just opened the
7916  template file.
7917  For commands such as these, the LaTeX code must be entered directly and
7918  marked as such.
7919  Such commands are referred to as TeX code, or Evil Red Text.
7920  I tried to minimize the amount of TeX code needed in an AASTeX document,
7921  but there is still a bit more required than any of us would like.
7922 \end_layout
7923
7924 \begin_layout Subsection
7925 Finishing Your Paper
7926 \end_layout
7927
7928 \begin_layout Standard
7929 When the paper is finished to your satisfaction and previews/prints correctly,
7930  there are a few 
7931 \begin_inset Quotes eld
7932 \end_inset
7933
7934 postprocessing
7935 \begin_inset Quotes erd
7936 \end_inset
7937
7938  actions which need to be done before you submit it to the journals.
7939  
7940 \end_layout
7941
7942 \begin_layout Enumerate
7943 Export your paper as a LaTeX file (
7944 \family sans
7945 File\SpecialChar \menuseparator
7946 Export\SpecialChar \menuseparator
7947 LaTeX
7948 \family default
7949 ).
7950  
7951 \end_layout
7952
7953 \begin_layout Enumerate
7954 Edit the resulting 
7955 \family typewriter
7956 .tex
7957 \family default
7958  file with your favorite text editor
7959 \end_layout
7960
7961 \begin_deeper
7962 \begin_layout Enumerate
7963 remove the comment lines before the 
7964 \family typewriter
7965
7966 \backslash
7967 documentclass
7968 \family default
7969  command
7970 \end_layout
7971
7972 \begin_layout Enumerate
7973 remove the 
7974 \family typewriter
7975
7976 \backslash
7977 usepackage...{fontenc}
7978 \family default
7979  line if it appears (usually just after 
7980 \family typewriter
7981
7982 \backslash
7983 documentclass
7984 \family default
7985 }; also remove the 
7986 \family typewriter
7987
7988 \backslash
7989 secnumdepth
7990 \family default
7991  line if it appears.
7992 \end_layout
7993
7994 \begin_layout Enumerate
7995 remove everything between (and including) the 
7996 \family typewriter
7997
7998 \backslash
7999 makeatletter
8000 \family default
8001  and 
8002 \family typewriter
8003
8004 \backslash
8005 makeatother
8006 \family default
8007  commands, except for any commands you specifically put into the LaTeX preamble
8008  (which should appear immediately after the 
8009 \begin_inset Quotes eld
8010 \end_inset
8011
8012 User specified LaTeX commands
8013 \begin_inset Quotes erd
8014 \end_inset
8015
8016  comment in the 
8017 \family typewriter
8018 .tex
8019 \family default
8020  file).
8021 \end_layout
8022
8023 \end_deeper
8024 \begin_layout Enumerate
8025 Run the resulting file through LaTeX to make sure it still processes correctly.
8026 \end_layout
8027
8028 \begin_layout Enumerate
8029 Reread the journal requirements to make sure your filenames and formats
8030  are correct.
8031 \end_layout
8032
8033 \begin_layout Enumerate
8034 Submit it.
8035 \end_layout
8036
8037 \begin_layout Subsection
8038 Comments On Specific Commands
8039 \end_layout
8040
8041 \begin_layout Standard
8042 I will not describe the detailed usage of the individual AASTeX commands:
8043  the AASTeX User Guide (
8044 \family typewriter
8045 aasguide.tex
8046 \family default
8047 ) gives a good description of each.
8048  Thus it's probably easiest for me to go down the list as found in the guide
8049  and offer comments where necessary.
8050  So let's begin \SpecialChar \ldots{}
8051
8052 \end_layout
8053
8054 \begin_layout Subsubsection
8055 Things that work as expected
8056 \end_layout
8057
8058 \begin_layout Standard
8059 Because they work as you might expect, I simply list them and the section
8060  they are found in: 
8061 \family typewriter
8062
8063 \backslash
8064 documentclass
8065 \family default
8066  (2.1.1), 
8067 \family typewriter
8068
8069 \backslash
8070 begin{document}
8071 \family default
8072  (2.2), 
8073 \family typewriter
8074
8075 \backslash
8076 title
8077 \family default
8078  (2.3), 
8079 \family typewriter
8080
8081 \backslash
8082 author
8083 \family default
8084  (2.3), 
8085 \family typewriter
8086
8087 \backslash
8088 affil
8089 \family default
8090  (2.3), 
8091 \family typewriter
8092
8093 \backslash
8094 abstract
8095 \family default
8096  (2.4), 
8097 \family typewriter
8098
8099 \backslash
8100 keywords
8101 \family default
8102  (2.5), 
8103 \family typewriter
8104
8105 \backslash
8106 section
8107 \family default
8108  (2.7), 
8109 \family typewriter
8110
8111 \backslash
8112 subsection
8113 \family default
8114  (2.7), 
8115 \family typewriter
8116
8117 \backslash
8118 subsubsection
8119 \family default
8120  (2.7), 
8121 \family typewriter
8122
8123 \backslash
8124 paragraph
8125 \family default
8126  (2.7), 
8127 \family typewriter
8128
8129 \backslash
8130 facility
8131 \family default
8132  (2.10), 
8133 \family typewriter
8134
8135 \backslash
8136 begin{displaymath}
8137 \family default
8138  (2.12), 
8139 \family typewriter
8140
8141 \backslash
8142 begin{equation}
8143 \family default
8144  (2.12), 
8145 \family typewriter
8146
8147 \backslash
8148 begin{eqnarray}
8149 \family default
8150  (2.12), 
8151 \family typewriter
8152
8153 \backslash
8154 begin{mathletters}
8155 \family default
8156  (2.12), 
8157 \family typewriter
8158
8159 \backslash
8160 begin{thebibliography}
8161 \family default
8162  (2.13.1), 
8163 \family typewriter
8164
8165 \backslash
8166 bibitem
8167 \family default
8168  (2.13.2), all the cite commands and their variations (2.13.2), the generic
8169  graphicx figure commands (2.14.1), 
8170 \family typewriter
8171
8172 \backslash
8173 begin{table}
8174 \family default
8175  (2.15.4), 
8176 \family typewriter
8177
8178 \backslash
8179 begin{tabular}
8180 \family default
8181  (2.15.4), 
8182 \family typewriter
8183
8184 \backslash
8185 caption
8186 \family default
8187  (2.15.4), 
8188 \family typewriter
8189
8190 \backslash
8191 label
8192 \family default
8193  (2.15.4, amongst other places), 
8194 \family typewriter
8195
8196 \backslash
8197 tablerefs
8198 \family default
8199  (2.15.5), 
8200 \family typewriter
8201
8202 \backslash
8203 tablecomments
8204 \family default
8205  (2.15.5), 
8206 \family typewriter
8207
8208 \backslash
8209 url
8210 \family default
8211  (2.17.4), 
8212 \family typewriter
8213
8214 \backslash
8215 end{document}
8216 \family default
8217  (2.18).
8218 \end_layout
8219
8220 \begin_layout Standard
8221 The following style options also work correctly: 
8222 \family typewriter
8223 longabstract
8224 \family default
8225  (2.4), 
8226 \family typewriter
8227 preprint
8228 \family default
8229  (3.2.1), 
8230 \family typewriter
8231 preprint2
8232 \family default
8233  (3.2.2), 
8234 \family typewriter
8235 eqsecnum
8236 \family default
8237  (3.3), 
8238 \family typewriter
8239 flushrt
8240 \family default
8241  (3.4).
8242  Simply put them in the 
8243 \family sans
8244 Options
8245 \family default
8246  box in 
8247 \family sans
8248 Layout\SpecialChar \menuseparator
8249 Document
8250 \family default
8251 .
8252 \end_layout
8253
8254 \begin_layout Subsubsection
8255 Things that work, but require more comment
8256 \end_layout
8257
8258 \begin_layout Standard
8259 The following items work, but require a little more discussion:
8260 \end_layout
8261
8262 \begin_layout Itemize
8263 These items are reserved for use by the journal editors, but you can put
8264  them into the LaTeX preamble if you feel compelled to do so: 
8265 \family typewriter
8266
8267 \backslash
8268 received
8269 \family default
8270
8271 \family typewriter
8272
8273 \backslash
8274 revised
8275 \family default
8276
8277 \family typewriter
8278
8279 \backslash
8280 accepted
8281 \family default
8282
8283 \family typewriter
8284
8285 \backslash
8286 ccc
8287 \family default
8288
8289 \family typewriter
8290
8291 \backslash
8292 cpright
8293 \family default
8294  (all from 2.1.3)
8295 \end_layout
8296
8297 \begin_layout Itemize
8298 These items may be placed in the LaTeX preamble, and are included as blanks
8299  in the template file: 
8300 \family typewriter
8301
8302 \backslash
8303 slugcomment
8304 \family default
8305  (2.1.4), 
8306 \family typewriter
8307
8308 \backslash
8309 shorttitle
8310 \family default
8311  (2.1.5), 
8312 \family typewriter
8313
8314 \backslash
8315 shortauthors
8316 \family default
8317  (2.1.5)
8318 \end_layout
8319
8320 \begin_layout Itemize
8321
8322 \family typewriter
8323
8324 \backslash
8325 email
8326 \family default
8327  (2.3) – can only be used 
8328 \begin_inset Quotes eld
8329 \end_inset
8330
8331 standalone
8332 \begin_inset Quotes erd
8333 \end_inset
8334
8335 , not in the middle of a paragraph.
8336  Use TeX code if you need to embed it.
8337 \end_layout
8338
8339 \begin_layout Itemize
8340
8341 \family typewriter
8342
8343 \backslash
8344 and
8345 \family default
8346  (2.3) – will have extra {} after it.
8347  This should not cause an error.
8348 \end_layout
8349
8350 \begin_layout Itemize
8351
8352 \family typewriter
8353
8354 \backslash
8355 notetoeditor
8356 \family default
8357  (2.6) – can only be used 
8358 \begin_inset Quotes eld
8359 \end_inset
8360
8361 standalone
8362 \begin_inset Quotes erd
8363 \end_inset
8364
8365 , not in the middle of a paragraph.
8366  Use TeX code if you need to embed it.
8367 \end_layout
8368
8369 \begin_layout Itemize
8370
8371 \family typewriter
8372
8373 \backslash
8374 placetable
8375 \family default
8376  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8377  hand
8378 \end_layout
8379
8380 \begin_layout Itemize
8381
8382 \family typewriter
8383
8384 \backslash
8385 placefigure
8386 \family default
8387  (2.8) – same as for 
8388 \family typewriter
8389
8390 \backslash
8391 placetable
8392 \end_layout
8393
8394 \begin_layout Itemize
8395
8396 \family typewriter
8397
8398 \backslash
8399 acknowledgements
8400 \family default
8401  (2.9) – will have extra {} after it.
8402  This should not cause an error.
8403 \end_layout
8404
8405 \begin_layout Itemize
8406
8407 \family typewriter
8408
8409 \backslash
8410 appendix
8411 \family default
8412  (2.11) – will have extra {} after it.
8413  This should not cause an error.
8414 \end_layout
8415
8416 \begin_layout Itemize
8417
8418 \family typewriter
8419
8420 \backslash
8421 figcaption
8422 \family default
8423  (2.14.2) – you can insert an optional filename argument by placing the cursor
8424  at the beginning of the text and selecting 
8425 \family sans
8426 Insert\SpecialChar \menuseparator
8427 Short Title
8428 \family default
8429 .
8430  
8431 \begin_inset Quotes eld
8432 \end_inset
8433
8434 Short Title
8435 \begin_inset Quotes erd
8436 \end_inset
8437
8438  inserts an optional argument of the type needed by 
8439 \family typewriter
8440
8441 \backslash
8442 figcaption
8443 \family default
8444 .
8445  Hopefully it will be renamed someday.
8446 \end_layout
8447
8448 \begin_layout Itemize
8449
8450 \family typewriter
8451
8452 \backslash
8453 objectname
8454 \family default
8455  (2.17.1) – same as 
8456 \family typewriter
8457
8458 \backslash
8459 figcaption
8460 \family default
8461  for the catalog ID optional parameter
8462 \end_layout
8463
8464 \begin_layout Itemize
8465
8466 \family typewriter
8467
8468 \backslash
8469 dataset
8470 \family default
8471  (2.17.1) – same as 
8472 \family typewriter
8473
8474 \backslash
8475 figcaption
8476 \family default
8477  for the catalog ID optional parameter
8478 \end_layout
8479
8480 \begin_layout Subsubsection
8481 Things not implemented, use TeX code
8482 \end_layout
8483
8484 \begin_layout Standard
8485
8486 \family typewriter
8487
8488 \backslash
8489 altaffilmark
8490 \family default
8491  (2.3), 
8492 \family typewriter
8493
8494 \backslash
8495 altaffiltext
8496 \family default
8497  (2.3), 
8498 \family typewriter
8499
8500 \backslash
8501 eqnum
8502 \family default
8503  (2.12), 
8504 \family typewriter
8505
8506 \backslash
8507 setcounter{equation}
8508 \family default
8509  (2.12), Journal name abbreviations (2.13.4), 
8510 \family typewriter
8511
8512 \backslash
8513 figurenum
8514 \family default
8515  (2.14.1), 
8516 \family typewriter
8517
8518 \backslash
8519 epsscale
8520 \family default
8521  (2.14.1), 
8522 \family typewriter
8523
8524 \backslash
8525 plotone
8526 \family default
8527  (2.14.1), 
8528 \family typewriter
8529
8530 \backslash
8531 plottwo
8532 \family default
8533  (2.14.1), 
8534 \family typewriter
8535
8536 \backslash
8537 tablenum
8538 \family default
8539  (2.15.4), 
8540 \family typewriter
8541
8542 \backslash
8543 tableline
8544 \family default
8545  (2.15.4, insert it as the first element in the lefthand cell after where
8546  you want it.
8547  Don't use any of LyX's rules in the table), 
8548 \family typewriter
8549
8550 \backslash
8551 tablenotemark
8552 \family default
8553  (2.15.5), 
8554 \family typewriter
8555
8556 \backslash
8557 tablenotetext
8558 \family default
8559  (2.15.5), much of Misc (2.17, except 
8560 \family typewriter
8561
8562 \backslash
8563 objectname
8564 \family default
8565
8566 \family typewriter
8567
8568 \backslash
8569 dataset
8570 \family default
8571
8572 \family typewriter
8573
8574 \backslash
8575 url
8576 \family default
8577 , and 
8578 \family typewriter
8579
8580 \backslash
8581 email
8582 \family default
8583 ; see above), 
8584 \family typewriter
8585
8586 \backslash
8587 singlespace
8588 \family default
8589  (3.1), 
8590 \family typewriter
8591
8592 \backslash
8593 doublespace
8594 \family default
8595  (3.1), 
8596 \family typewriter
8597
8598 \backslash
8599 onecolumn
8600 \family default
8601  (3.2), 
8602 \family typewriter
8603
8604 \backslash
8605 twocolumn
8606 \family default
8607  (3.2)
8608 \end_layout
8609
8610 \begin_layout Subsubsection
8611 Things that cannot be implemented
8612 \end_layout
8613
8614 \begin_layout Standard
8615 \SpecialChar \ldots{}
8616  at least in any meaningful sort of way, so I suggest ignoring them.
8617  They are the references environment (2.13.3), and the deluxetable environment
8618  (2.15).
8619  If you really, really need to use deluxetable, I suggest editing it in
8620  a separate file with a text editor, then using 
8621 \family sans
8622 Insert\SpecialChar \menuseparator
8623 Child
8624 \begin_inset space ~
8625 \end_inset
8626
8627 Document
8628 \family default
8629  to include it in your LyX document.
8630  See the 
8631 \family typewriter
8632 aas_sample.lyx
8633 \family default
8634  file to see an example of this.
8635 \end_layout
8636
8637 \begin_layout Subsection
8638 FAQs, Tips, Tricks, and Other Ruminations
8639 \end_layout
8640
8641 \begin_layout Subsubsection
8642 Getting LyX and AASTeX to cooperate
8643 \end_layout
8644
8645 \begin_layout Standard
8646 It can be a bit tricky to get LyX to recognize a new layout and document
8647  class.
8648  When all else fails, do this:
8649 \end_layout
8650
8651 \begin_layout Enumerate
8652 Make certain that LaTeX can find AASTeX.
8653  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8654  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8655 \family typewriter
8656 sample.tex
8657 \family default
8658 .
8659 \end_layout
8660
8661 \begin_layout Enumerate
8662 Make certain that 
8663 \family typewriter
8664 aastex.layout
8665 \family default
8666  appears in LyX's 
8667 \family typewriter
8668 layouts
8669 \family default
8670  folder
8671 \end_layout
8672
8673 \begin_layout Enumerate
8674 Rerun 
8675 \family sans
8676 Tools\SpecialChar \menuseparator
8677 Reconfigure
8678 \family default
8679  in LyX, then restart LyX.
8680 \end_layout
8681
8682 \begin_layout Enumerate
8683 Open a regular new file, not from a template.
8684  Does AASTeX appear in the class list in 
8685 \family sans
8686 Document\SpecialChar \menuseparator
8687 Settings
8688 \family default
8689 ?
8690 \end_layout
8691
8692 \begin_layout Standard
8693 If you get a warning from an existing AASTeX document about not being able
8694  to find the AASTeX layout or a message about 
8695 \begin_inset Quotes eld
8696 \end_inset
8697
8698 You should not mix title layouts with normal ones
8699 \begin_inset Quotes erd
8700 \end_inset
8701
8702 , things haven't been installed correctly.
8703 \end_layout
8704
8705 \begin_layout Subsubsection
8706 LaTeX error processing a table 
8707 \end_layout
8708
8709 \begin_layout Standard
8710 LyX, by default, attempts to center the table caption/title.
8711  This seems to produce a bad interaction in AASTeX so you should click somewhere
8712  in the caption/title, then select 
8713 \family sans
8714 Edit\SpecialChar \menuseparator
8715 Paragraph
8716 \begin_inset space ~
8717 \end_inset
8718
8719 Settings
8720 \family default
8721 , then set the 
8722 \family sans
8723 Alignment
8724 \family default
8725  to 
8726 \family sans
8727 Block
8728 \family default
8729 .
8730  This took care of it for me.
8731 \end_layout
8732
8733 \begin_layout Subsubsection
8734 References
8735 \end_layout
8736
8737 \begin_layout Standard
8738 A couple of things: 1) I have noticed some funny spacing in the reference
8739  entries in the text.
8740  When you enter the bibliography item data, make sure their is 
8741 \emph on
8742 no
8743 \emph default
8744  space between the last author and the parenthesis setting off the year;
8745  
8746 \emph on
8747 e.
8748 \begin_inset space \thinspace{}
8749 \end_inset
8750
8751 g.
8752 \begin_inset space \space{}
8753 \end_inset
8754
8755
8756 \emph default
8757 type 
8758 \family typewriter
8759 Ressler(1992)
8760 \family default
8761 , not 
8762 \family typewriter
8763 Ressler (1992)
8764 \family default
8765 .
8766  2) Entering the references at all is not obvious.
8767  The easiest thing is to start typing your first reference at the end of
8768  the document, then mark it as type 
8769 \family sans
8770 References
8771 \family default
8772 .
8773  That will put a small gray box in front of what you just typed.
8774  Click on the box to fill in the rest of the information.
8775  For new references, go to the end of an existing reference and press return.
8776  That will create a new line with its own box, etc.
8777 \end_layout
8778
8779 \begin_layout Subsubsection
8780 Including EPS files
8781 \end_layout
8782
8783 \begin_layout Standard
8784 Even though AASTeX provides its own figure commands (
8785 \family typewriter
8786
8787 \backslash
8788 plotone
8789 \family default
8790 , for example), I much prefer LaTeX's standard figure commands (with the
8791  default graphicx).
8792  You can insert the 
8793 \family typewriter
8794
8795 \backslash
8796 plotone
8797 \family default
8798 , etc.
8799 \begin_inset space ~
8800 \end_inset
8801
8802 commands as TeX code into a Figure Float box if you desire, but I never
8803  have much luck getting the layout right.
8804  With the standard graphics, LyX will insert a 
8805 \family typewriter
8806
8807 \backslash
8808 usepackage{graphicx}
8809 \family default
8810  command into the LaTeX preamble and handle the figures in the standard
8811  LaTeX2e way, interspersing the figures in the text.
8812  I believe ApJ accepts figures exactly this way now; AJ might still use
8813  the 
8814 \begin_inset Quotes eld
8815 \end_inset
8816
8817 stack everything at the end
8818 \begin_inset Quotes erd
8819 \end_inset
8820
8821  technique.
8822 \end_layout
8823
8824 \begin_layout Subsubsection
8825 Things I could have done, but didn't
8826 \end_layout
8827
8828 \begin_layout Standard
8829 There are a few 
8830 \begin_inset Quotes eld
8831 \end_inset
8832
8833 pretty
8834 \begin_inset Quotes erd
8835 \end_inset
8836
8837  things I could have implemented, but chose not to.
8838  For instance, I saw no point in double-spacing the text in the LyX window,
8839  even though it is double-spaced in the paper manuscript.
8840  Also, I chose not to make separate layouts for the preprint and preprint2
8841  styles.
8842  Since I assume you will spend most of your time in the plain manuscript
8843  mode anyway, I decided not to chew up more disk space with this.
8844  
8845 \end_layout
8846
8847 \begin_layout Subsection
8848 Final Caveat
8849 \end_layout
8850
8851 \begin_layout Standard
8852 Your mileage may vary.
8853  I've now had papers published by both ApJ and AJ that have had 98% of the
8854  effort done in LyX; the last 2% was the LaTeX post-processing and a few
8855  cleanups.
8856  I have had no trouble with the submission process, and I'm sure the journals
8857  were never aware that there might be a difference.
8858  So, go forth and publish!
8859 \end_layout
8860
8861 \begin_layout Section
8862 AMS LaTeX
8863 \end_layout
8864
8865 \begin_layout Standard
8866 by 
8867 \noun on
8868 David Johnson
8869 \noun default
8870 ; updated by 
8871 \noun on
8872 Richard Heck
8873 \end_layout
8874
8875 \begin_layout Standard
8876 \begin_inset VSpace bigskip
8877 \end_inset
8878
8879
8880 \end_layout
8881
8882 \begin_layout Standard
8883 \noindent
8884 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8885  papers to be submitted to American Mathematical Society publications.
8886  The layouts are not tailored to a specific journal, but easily can be.
8887  You should refer to the AMS documentation for specific instructions for
8888  each journal (usually it will entail only changing a single line in the
8889  TeX output).
8890  That documentation is available on the Web at 
8891 \begin_inset Flex URL
8892 status open
8893
8894 \begin_layout Plain Layout
8895
8896 http://www.ams.org
8897 \end_layout
8898
8899 \end_inset
8900
8901  or by ftp at 
8902 \begin_inset Flex URL
8903 status open
8904
8905 \begin_layout Plain Layout
8906
8907 ftp://ftp.ams.org/pub/tex/amslatex/
8908 \end_layout
8909
8910 \end_inset
8911
8912 .
8913  These layouts are appropriate, and useful, for any mathematical writing.
8914  
8915 \end_layout
8916
8917 \begin_layout Standard
8918 There are two basic AMS LaTeX layouts: 
8919 \end_layout
8920
8921 \begin_layout Itemize
8922 amsart: The standard AMS article format.
8923 \end_layout
8924
8925 \begin_layout Itemize
8926 amsbook: the standard AMS book (really, monograph) format.
8927  
8928 \end_layout
8929
8930 \begin_layout Standard
8931 The layouts themselves contain only the minimum necessary to use the AMS
8932  classes.
8933  They do not, in particular, contain any of the `theorem' environments used
8934  for setting theorems, lemmas, and the like.
8935  These are contained, instead, in the 
8936 \begin_inset Flex Code
8937 status collapsed
8938
8939 \begin_layout Plain Layout
8940 Theorems (AMS)
8941 \end_layout
8942
8943 \end_inset
8944
8945  module, which is loaded by default when you select one of the AMS classes.
8946  (It can also be used with other classes and can be removed, if you would
8947  rather use something else.) Less commonly used environments are in the 
8948 \begin_inset Flex Code
8949 status collapsed
8950
8951 \begin_layout Plain Layout
8952 Theorems (AMS-Extended)
8953 \end_layout
8954
8955 \end_inset
8956
8957  module, which must be loaded manually.
8958 \end_layout
8959
8960 \begin_layout Standard
8961 By default, theorems and the like are numbered consecutively throughout
8962  the document, but this may be modified by loading the module 
8963 \begin_inset Flex Code
8964 status collapsed
8965
8966 \begin_layout Plain Layout
8967 Theorems (Order by Section)
8968 \end_layout
8969
8970 \end_inset
8971
8972  or, if you are using 
8973 \begin_inset Flex Code
8974 status collapsed
8975
8976 \begin_layout Plain Layout
8977 book (AMS)
8978 \end_layout
8979
8980 \end_inset
8981
8982 , the module 
8983 \begin_inset Flex Code
8984 status collapsed
8985
8986 \begin_layout Plain Layout
8987 Theorems (Order by Chapter)
8988 \end_layout
8989
8990 \end_inset
8991
8992 .
8993  These will number the results as 
8994 \begin_inset Formula $n.m$
8995 \end_inset
8996
8997 , where the first number refers to the section (or chapter) and the second
8998  refers to the total number of results so far in that section (or chapter).
8999  Many environments are also available unnumbered.
9000  These are indicated by an asterisk at the end.
9001  If you happen to want 
9002 \emph on
9003 only
9004 \emph default
9005  unnumbered results, the module 
9006 \begin_inset Flex Code
9007 status collapsed
9008
9009 \begin_layout Plain Layout
9010 Theorems (Starred)
9011 \end_layout
9012
9013 \end_inset
9014
9015  provides that option.
9016 \end_layout
9017
9018 \begin_layout Standard
9019 Note that these modules do not 
9020 \emph on
9021 have
9022 \emph default
9023  to be used with the AMS classes.
9024  It is perfectly possible to use the 
9025 \begin_inset Flex Code
9026 status collapsed
9027
9028 \begin_layout Plain Layout
9029 Theorems (AMS)
9030 \end_layout
9031
9032 \end_inset
9033
9034  module, and the others mentioned, with other classes, such as 
9035 \begin_inset Flex Code
9036 status collapsed
9037
9038 \begin_layout Plain Layout
9039 article
9040 \end_layout
9041
9042 \end_inset
9043
9044
9045 \begin_inset Flex Code
9046 status collapsed
9047
9048 \begin_layout Plain Layout
9049 report
9050 \end_layout
9051
9052 \end_inset
9053
9054
9055 \begin_inset Flex Code
9056 status collapsed
9057
9058 \begin_layout Plain Layout
9059 book (KOMA-script)
9060 \end_layout
9061
9062 \end_inset
9063
9064 , and so forth.
9065 \end_layout
9066
9067 \begin_layout Subsection
9068 What these layouts provide
9069 \end_layout
9070
9071 \begin_layout Standard
9072 There is a long list of included environments provided by these layouts.
9073  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9074  variety of `theorem' environments.
9075  However, the AMS recommends the environments that are available in LyX.
9076  
9077 \end_layout
9078
9079 \begin_layout Standard
9080 The following environments—as well as the standard environments, such as
9081  
9082 \begin_inset Flex Noun
9083 status collapsed
9084
9085 \begin_layout Plain Layout
9086 section
9087 \end_layout
9088
9089 \end_inset
9090
9091
9092 \begin_inset Flex Noun
9093 status collapsed
9094
9095 \begin_layout Plain Layout
9096 bibliography
9097 \end_layout
9098
9099 \end_inset
9100
9101
9102 \begin_inset Flex Noun
9103 status collapsed
9104
9105 \begin_layout Plain Layout
9106 title
9107 \end_layout
9108
9109 \end_inset
9110
9111
9112 \begin_inset Flex Noun
9113 status collapsed
9114
9115 \begin_layout Plain Layout
9116 author
9117 \end_layout
9118
9119 \end_inset
9120
9121 , and 
9122 \begin_inset Flex Noun
9123 status collapsed
9124
9125 \begin_layout Plain Layout
9126 date
9127 \end_layout
9128
9129 \end_inset
9130
9131 —are provided by 
9132 \begin_inset Flex Code
9133 status collapsed
9134
9135 \begin_layout Plain Layout
9136 article (AMS)
9137 \end_layout
9138
9139 \end_inset
9140
9141  and 
9142 \begin_inset Flex Code
9143 status collapsed
9144
9145 \begin_layout Plain Layout
9146 book (AMS)
9147 \end_layout
9148
9149 \end_inset
9150
9151 :
9152 \end_layout
9153
9154 \begin_layout Description
9155 Address This should be the author's permanent address.
9156 \end_layout
9157
9158 \begin_layout Description
9159 Current
9160 \begin_inset space ~
9161 \end_inset
9162
9163 Address This should be the author's temporary address at the time of submission,
9164  if different from the Address.
9165 \end_layout
9166
9167 \begin_layout Description
9168 Email Author's e-mail address
9169 \end_layout
9170
9171 \begin_layout Description
9172 URL Author's Web address, if desired.
9173 \end_layout
9174
9175 \begin_layout Description
9176 Keywords Key words or phrases used to identify specific topics discussed
9177  in the paper.
9178 \end_layout
9179
9180 \begin_layout Description
9181 Subjectclass These refer to the AMS Subject Classifications, published and
9182  described in 
9183 \emph on
9184 Mathematical Reviews
9185 \emph default
9186 .
9187  These are also available online at the AMS cites listed above.
9188 \end_layout
9189
9190 \begin_layout Description
9191 Thanks
9192 \end_layout
9193
9194 \begin_layout Description
9195 Dedicatory
9196 \end_layout
9197
9198 \begin_layout Description
9199 Translator
9200 \end_layout
9201
9202 \begin_layout Standard
9203 The following environments are provided by both the 
9204 \begin_inset Flex Code
9205 status collapsed
9206
9207 \begin_layout Plain Layout
9208 Theorems
9209 \end_layout
9210
9211 \end_inset
9212
9213  and 
9214 \begin_inset Flex Code
9215 status collapsed
9216
9217 \begin_layout Plain Layout
9218 Theorems (AMS)
9219 \end_layout
9220
9221 \end_inset
9222
9223  modules, in the latter case in both starred (unnumbered) and unstarred
9224  (numbered) versions.
9225  These same environments are provided only in the starred versions by the
9226  
9227 \begin_inset Flex Code
9228 status collapsed
9229
9230 \begin_layout Plain Layout
9231 Theorems (Starred)
9232 \end_layout
9233
9234 \end_inset
9235
9236  module:
9237 \end_layout
9238
9239 \begin_layout Theorem
9240 This is typically used for the statements of major results.
9241  
9242 \end_layout
9243
9244 \begin_layout Corollary*
9245 This is used for statements which follow fairly directly from previous statement
9246 s.
9247  Again, these can be major results.
9248  
9249 \end_layout
9250
9251 \begin_layout Lemma
9252 These are smaller results needed to prove other statements.
9253 \end_layout
9254
9255 \begin_layout Proposition
9256 These are less major results which (hopefully) add to the general theory
9257  being discussed.
9258 \end_layout
9259
9260 \begin_layout Conjecture
9261 These are statements provided without justification, which the author does
9262  not know how to prove, but which seem to be true (to the author, at least).
9263 \end_layout
9264
9265 \begin_layout Definition*
9266 Guess what this is for.
9267  The font is different for this environment than for the previous ones.
9268  
9269 \end_layout
9270
9271 \begin_layout Example*
9272 Used for examples illustrating proven results.
9273 \end_layout
9274
9275 \begin_layout Problem
9276 It's not really known what this is for.
9277  You should figure it out.
9278 \end_layout
9279
9280 \begin_layout Exercise*
9281 Write a description for this one.
9282 \end_layout
9283
9284 \begin_layout Remark
9285 This environment is also a type of theorem, usually a lesser sort of observation.
9286 \end_layout
9287
9288 \begin_layout Claim*
9289 Often used in the course of giving a proof of a larger result.
9290 \end_layout
9291
9292 \begin_layout Case
9293 Generally, these are used to break up long arguments, using specific instances
9294  of some condition.
9295  
9296 \end_layout
9297
9298 \begin_layout Case
9299 The numbering scheme for cases is on its own, not together with other numbered
9300  statements.
9301  
9302 \end_layout
9303
9304 \begin_layout Proof
9305 At the end of this environment, a QED symbol (usually a square, but it can
9306  vary with different styles) is placed.
9307  If you want to have other environments within this one—for example, Case
9308  environments—and have the QED symbol appear only after them, then the other
9309  environments need to be nested within the proof environment.
9310  See the section 
9311 \emph on
9312 Nesting Environments
9313 \emph default
9314  of the 
9315 \emph on
9316 User's Guide
9317 \emph default
9318  for information on nesting.
9319 \end_layout
9320
9321 \begin_layout Standard
9322 And these environments are provided by 
9323 \begin_inset Flex Code
9324 status collapsed
9325
9326 \begin_layout Plain Layout
9327 Theorems (AMS-Extended)
9328 \end_layout
9329
9330 \end_inset
9331
9332 :
9333 \end_layout
9334
9335 \begin_layout Criterion*
9336 A required condition.
9337 \end_layout
9338
9339 \begin_layout Algorithm*
9340 A general procedure to be used.
9341 \end_layout
9342
9343 \begin_layout Axiom*
9344 This is a property or statement taken as true within the system being discussed.
9345 \end_layout
9346
9347 \begin_layout Condition*
9348 Sometimes used to state a condition assumed within the present context of
9349  discussion.
9350 \end_layout
9351
9352 \begin_layout Note*
9353 Similar to a Remark.
9354 \end_layout
9355
9356 \begin_layout Notation*
9357 Used for the explanation of, yes, notation.
9358 \end_layout
9359
9360 \begin_layout Summary
9361 Do we really need to tell you? 
9362 \end_layout
9363
9364 \begin_layout Acknowledgement*
9365 Acknowledgement.
9366 \end_layout
9367
9368 \begin_layout Conclusion*
9369 Sometimes used at the end of a long train of argument.
9370 \end_layout
9371
9372 \begin_layout Fact
9373 Used in a way similar to Proposition, though perhaps lower on the scale.
9374 \end_layout
9375
9376 \begin_layout Standard
9377 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9378  fonts packages.
9379  They need to be available on your system in order to use these environments.
9380 \end_layout
9381
9382 \begin_layout Section
9383 AGU journals (
9384 \family sans
9385 aguplus
9386 \family default
9387 )
9388 \end_layout
9389
9390 \begin_layout Standard
9391 by 
9392 \shape smallcaps
9393 Martin Vermeer
9394 \end_layout
9395
9396 \begin_layout Subsection
9397 Description
9398 \end_layout
9399
9400 \begin_layout Standard
9401 These are the layout files for some of the journals of the American Geophysical
9402  Society.
9403  It is assumed that you have both the AGU's own class files and AGUplus
9404  installed (everything to be found at
9405 \begin_inset Flex URL
9406 status collapsed
9407
9408 \begin_layout Plain Layout
9409
9410 ftp://ftp.agu.org/journals/latex/journals
9411 \end_layout
9412
9413 \end_inset
9414
9415 ).
9416 \end_layout
9417
9418 \begin_layout Subsection
9419 New styles
9420 \end_layout
9421
9422 \begin_layout Standard
9423 Redefined are 
9424 \family sans
9425 Paragraph
9426 \family default
9427
9428 \family sans
9429 Paragraph*
9430 \family default
9431 .
9432  They are still called this in the LyX GUI, though their LaTeX equivalents
9433  in the AGU classes are 
9434 \family sans
9435 Subsubsubsection
9436 \family default
9437  and 
9438 \family sans
9439 Subsubsubsection*
9440 \family default
9441 .
9442 \end_layout
9443
9444 \begin_layout Standard
9445 Newly defined styles are 
9446 \family sans
9447 Left_Header
9448 \family default
9449
9450 \family sans
9451 Right_Header
9452 \family default
9453
9454 \family sans
9455 Received
9456 \family default
9457
9458 \family sans
9459 Revised
9460 \family default
9461
9462 \family sans
9463 Accepted
9464 \family default
9465
9466 \family sans
9467 CCC
9468 \family default
9469
9470 \family sans
9471 PaperId
9472 \family default
9473
9474 \family sans
9475 AuthorAddr
9476 \family default
9477
9478 \family sans
9479 SlugComment
9480 \family default
9481 .
9482  These are mostly manuscript attributes and defined in the AGU class documentati
9483 on.
9484 \end_layout
9485
9486 \begin_layout Standard
9487 I suspect this is still badly incomplete.
9488 \end_layout
9489
9490 \begin_layout Subsection
9491 New floats
9492 \end_layout
9493
9494 \begin_layout Standard
9495
9496 \family sans
9497 Planotable
9498 \family default
9499  and 
9500 \family sans
9501 Plate
9502 \family default
9503 .
9504  We also have a new 
9505 \family sans
9506 Table_Caption
9507 \family default
9508 .
9509 \end_layout
9510
9511 \begin_layout Subsection
9512 Supported journals
9513 \end_layout
9514
9515 \begin_layout Itemize
9516
9517 \emph on
9518 Journal of Geophysical Research
9519 \emph default
9520
9521 \family typewriter
9522 jgrga.layout
9523 \family default
9524  — Martin Vermeer
9525 \end_layout
9526
9527 \begin_layout Standard
9528 Add your own, it isn't so hard! Look at the 
9529 \family typewriter
9530 jgrga.layout
9531 \family default
9532  example and 
9533 \family typewriter
9534 aguplus.inc
9535 \family default
9536 .
9537 \end_layout
9538
9539 \begin_layout Subsection
9540 Bugs and things to remember
9541 \end_layout
9542
9543 \begin_layout Standard
9544 In order to use the new layouts, you must remember to do the following for
9545  a new document:
9546 \end_layout
9547
9548 \begin_layout Enumerate
9549
9550 \emph on
9551 Turn off babel
9552 \emph default
9553 .
9554  This can be done in the 
9555 \family sans
9556 Layout\SpecialChar \menuseparator
9557 Document
9558 \family default
9559  or 
9560 \family sans
9561 Document\SpecialChar \menuseparator
9562 Settings
9563 \family default
9564  menu item.
9565  (AGU articles are always in English, right? So 
9566 \emph on
9567 don't
9568 \emph default
9569  choose a language.)
9570 \end_layout
9571
9572 \begin_layout Enumerate
9573 Enter 
9574 \family typewriter
9575 jgrga
9576 \family default
9577  into the document's 
9578 \family sans
9579 Extra Options
9580 \family default
9581  field.
9582  (Yes, this is a bug.)
9583 \end_layout
9584
9585 \begin_layout Enumerate
9586 Make sure you use the 
9587 \family typewriter
9588 agu.bst
9589 \family default
9590  bibliography style, by entering 
9591 \family sans
9592 agu
9593 \family default
9594  into the second field of the BibTeX inset.
9595  None of the standard styles will do.
9596 \end_layout
9597
9598 \begin_layout Section
9599 Broadway
9600 \end_layout
9601
9602 \begin_layout Standard
9603 by 
9604 \shape smallcaps
9605 Garst Reese
9606 \end_layout
9607
9608 \begin_layout Subsection
9609 Introduction
9610 \end_layout
9611
9612 \begin_layout Standard
9613 Broadway is for writing plays.
9614  The format is more decorative than Hollywood, and much less standardized.
9615  This format should be suitable for workshops.
9616 \end_layout
9617
9618 \begin_layout Subsection
9619 Special problems
9620 \end_layout
9621
9622 \begin_layout Standard
9623 The same as in Hollywood.
9624 \end_layout
9625
9626 \begin_layout Subsection
9627 Special features
9628 \end_layout
9629
9630 \begin_layout Standard
9631 Insert the 
9632 \family sans
9633 Speaker
9634 \family default
9635  names as labels then cross-reference the label to insert the name.
9636  The cross-reference dialog will show the current cast of characters.
9637 \end_layout
9638
9639 \begin_layout Subsection
9640 Paper size and Margins
9641 \end_layout
9642
9643 \begin_layout Standard
9644 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9645 \end_layout
9646
9647 \begin_layout Subsection
9648 Environments
9649 \end_layout
9650
9651 \begin_layout Standard
9652 The following environments are available.
9653  You can use broadway.bind to get the bind keys shown at the right.
9654 \end_layout
9655
9656 \begin_layout Itemize
9657
9658 \family sans
9659 Standard
9660 \begin_inset Newline newline
9661 \end_inset
9662
9663
9664 \family default
9665 You should not have to use this, but it is here for anything that does not
9666  fit otherwise.
9667 \end_layout
9668
9669 \begin_layout Itemize
9670
9671 \family sans
9672 Narrative
9673 \begin_inset space \hfill{}
9674 \end_inset
9675
9676 M-z n
9677 \begin_inset Newline newline
9678 \end_inset
9679
9680
9681 \family default
9682 Used to describe stage setting and the action.
9683  First use of speaker names in all CAPs.
9684 \end_layout
9685
9686 \begin_layout Itemize
9687
9688 \family sans
9689 ACT
9690 \begin_inset space \hfill{}
9691 \end_inset
9692
9693 M-z a
9694 \begin_inset Newline newline
9695 \end_inset
9696
9697
9698 \family default
9699 Automatically numbered.
9700  On screen it will be arabic, but will print as Roman.
9701 \end_layout
9702
9703 \begin_layout Itemize
9704
9705 \family sans
9706 ACT*
9707 \begin_inset space \hfill{}
9708 \end_inset
9709
9710 M-z S at
9711 \begin_inset Newline newline
9712 \end_inset
9713
9714
9715 \family default
9716 Subtitle for 
9717 \family sans
9718 ACT.
9719
9720 \family default
9721  It is just centered text.
9722 \end_layout
9723
9724 \begin_layout Itemize
9725
9726 \family sans
9727 SCENE
9728 \begin_inset space \hfill{}
9729 \end_inset
9730
9731 M-z S-S
9732 \begin_inset Newline newline
9733 \end_inset
9734
9735
9736 \family default
9737 Not automatically numbered.
9738  You supply the number.
9739  This is because I couldn't figure out how.
9740 \end_layout
9741
9742 \begin_layout Itemize
9743
9744 \family sans
9745 AT_RISE:
9746 \begin_inset space \hfill{}
9747 \end_inset
9748
9749 M-z S-R
9750 \begin_inset Newline newline
9751 \end_inset
9752
9753
9754 \family default
9755 A special case of Narrative to describe the setting and action as the curtain
9756  rises.
9757 \end_layout
9758
9759 \begin_layout Itemize
9760
9761 \family sans
9762 Speaker
9763 \begin_inset space \hfill{}
9764 \end_inset
9765
9766 M-z s
9767 \begin_inset Newline newline
9768 \end_inset
9769
9770
9771 \family default
9772 The speaker's (actor's) title, centered in all CAPS.
9773 \end_layout
9774
9775 \begin_layout Itemize
9776
9777 \family sans
9778 Parenthetical
9779 \begin_inset space \hfill{}
9780 \end_inset
9781
9782 M-z p
9783 \begin_inset Newline newline
9784 \end_inset
9785
9786
9787 \family default
9788 Instructions to the speaker.
9789  The parentheses are automatically inserted.
9790  The ( will appear on screen, but both will be in the printed play.
9791  This environment is only used within 
9792 \family sans
9793 Dialogue
9794 \family default
9795 .
9796 \end_layout
9797
9798 \begin_layout Itemize
9799
9800 \family sans
9801 Dialogue
9802 \begin_inset space \hfill{}
9803 \end_inset
9804
9805 M-z d
9806 \begin_inset Newline newline
9807 \end_inset
9808
9809
9810 \family default
9811 What the Speaker says.
9812 \end_layout
9813
9814 \begin_layout Itemize
9815
9816 \family sans
9817 CURTAIN
9818 \begin_inset space \hfill{}
9819 \end_inset
9820
9821 M-z S-C
9822 \begin_inset Newline newline
9823 \end_inset
9824
9825
9826 \family default
9827 The curtain comes down.
9828 \end_layout
9829
9830 \begin_layout Itemize
9831
9832 \family sans
9833 Title
9834 \begin_inset space \hfill{}
9835 \end_inset
9836
9837 M-z S-T
9838 \end_layout
9839
9840 \begin_layout Itemize
9841
9842 \family sans
9843 Author
9844 \begin_inset space \hfill{}
9845 \end_inset
9846
9847 M-z S-A
9848 \end_layout
9849
9850 \begin_layout Itemize
9851
9852 \family sans
9853 Right_Address
9854 \begin_inset space \hfill{}
9855 \end_inset
9856
9857 M-z r
9858 \end_layout
9859
9860 \begin_layout Standard
9861 Hello there.
9862 \end_layout
9863
9864 \begin_layout Section
9865 Dinbrief
9866 \end_layout
9867
9868 \begin_layout Standard
9869 The document class 
9870 \family sans
9871 dinbrief
9872 \family default
9873  can be used to type letters according to German conventions.
9874  A template file is included in 
9875 \family typewriter
9876 .../lyx/share/templates
9877 \family default
9878  for you to use as a starting point.
9879 \end_layout
9880
9881 \begin_layout Section
9882 EGS journals (
9883 \family sans
9884 egs
9885 \family default
9886 )
9887 \end_layout
9888
9889 \begin_layout Standard
9890 by 
9891 \shape smallcaps
9892 Martin Vermeer
9893 \end_layout
9894
9895 \begin_layout Subsection
9896 Description
9897 \end_layout
9898
9899 \begin_layout Standard
9900 This is the layout file for the European Geophysical Society journals.
9901  The needed 
9902 \family typewriter
9903 egs.cls
9904 \family default
9905  can be downloaded from the web site of the EGS under 
9906 \begin_inset Flex URL
9907 status collapsed
9908
9909 \begin_layout Plain Layout
9910
9911 www.copernicus.org
9912 \end_layout
9913
9914 \end_inset
9915
9916 .
9917 \end_layout
9918
9919 \begin_layout Subsection
9920 New styles
9921 \end_layout
9922
9923 \begin_layout Standard
9924
9925 \family sans
9926 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9927  Accepted
9928 \family default
9929
9930 \family sans
9931 Offsets
9932 \family default
9933 .
9934  The current layout file is unfortunately very unmodular and would benefit
9935  from using the various 
9936 \family typewriter
9937 std*.inc
9938 \family default
9939  file inclusions.
9940 \end_layout
9941
9942 \begin_layout Section
9943 Elsevier Journals
9944 \end_layout
9945
9946 \begin_layout Standard
9947 See the LyX template file 
9948 \family typewriter
9949 elsarticle.lyx
9950 \family default
9951 .
9952  It contains all infos you need.
9953 \end_layout
9954
9955 \begin_layout Section
9956 Foils [aka 
9957 \family sans
9958 FoilTeX
9959 \family default
9960 ]
9961 \begin_inset CommandInset label
9962 LatexCommand label
9963 name "sec:foiltex"
9964
9965 \end_inset
9966
9967
9968 \end_layout
9969
9970 \begin_layout Standard
9971 by 
9972 \noun on
9973 Allan Rae
9974 \end_layout
9975
9976 \begin_layout Subsection
9977 Introduction
9978 \end_layout
9979
9980 \begin_layout Standard
9981 This section describes how to use LyX to make slides for overhead projectors.
9982  There are two document classes that can do this: the default slides class
9983  and the 
9984 \family sans
9985 FoilTeX
9986 \family default
9987  slides class.
9988  This section documents the latter.
9989 \end_layout
9990
9991 \begin_layout Standard
9992 I'm going to say this again, nice and clear, so that there's no misunderstanding
9993 :
9994 \end_layout
9995
9996 \begin_layout Standard
9997 \begin_inset VSpace bigskip
9998 \end_inset
9999
10000
10001 \end_layout
10002
10003 \begin_layout Standard
10004 \align center
10005
10006 \size large
10007 This section documents the class 
10008 \begin_inset Quotes eld
10009 \end_inset
10010
10011
10012 \family sans
10013 slides (FoilTeX)
10014 \family default
10015
10016 \begin_inset Quotes erd
10017 \end_inset
10018
10019  
10020 \emph on
10021 only.
10022 \end_layout
10023
10024 \begin_layout Standard
10025 \begin_inset VSpace bigskip
10026 \end_inset
10027
10028
10029 \end_layout
10030
10031 \begin_layout Standard
10032 If you're looking for the documentation for 
10033 \begin_inset Quotes eld
10034 \end_inset
10035
10036
10037 \family sans
10038 slides (default)
10039 \family default
10040
10041 \begin_inset Quotes erd
10042 \end_inset
10043
10044 , check out section
10045 \begin_inset space ~
10046 \end_inset
10047
10048
10049 \begin_inset CommandInset ref
10050 LatexCommand ref
10051 reference "sec:slitex"
10052
10053 \end_inset
10054
10055 .
10056  If your machine doesn't have the 
10057 \family sans
10058 foils
10059 \family default
10060  class [
10061 \begin_inset Quotes eld
10062 \end_inset
10063
10064
10065 \family sans
10066 slides (FoilTeX)
10067 \family default
10068
10069 \begin_inset Quotes erd
10070 \end_inset
10071
10072 ] installed, you'll probably have to use the default 
10073 \family sans
10074 slides
10075 \family default
10076  class, which isn't quite as good as 
10077 \family sans
10078 foils.
10079 \end_layout
10080
10081 \begin_layout Standard
10082 The 
10083 \family sans
10084 foils
10085 \family default
10086  class is designed for use with version 2.1 of the 
10087 \family sans
10088 foils.cls
10089 \family default
10090  LaTeX class file which is now an integral part of LaTeX2e.
10091 \end_layout
10092
10093 \begin_layout Subsection
10094 Getting Started
10095 \end_layout
10096
10097 \begin_layout Standard
10098 Obviously, to use this document class, you need to select 
10099 \begin_inset Quotes eld
10100 \end_inset
10101
10102
10103 \family sans
10104 slides (FoilTeX)
10105 \family default
10106
10107 \begin_inset Quotes erd
10108 \end_inset
10109
10110  from the 
10111 \family sans
10112 Class
10113 \family default
10114  entry in the 
10115 \family sans
10116 Document
10117 \begin_inset space ~
10118 \end_inset
10119
10120 Layout
10121 \family default
10122  dialog.
10123  There are some settings in the 
10124 \family sans
10125 Document
10126 \begin_inset space ~
10127 \end_inset
10128
10129 Layout
10130 \family default
10131  dialog that you should know about that are specific to this class:
10132 \end_layout
10133
10134 \begin_layout Itemize
10135 Don't change the options 
10136 \family sans
10137 Sides
10138 \family default
10139  and 
10140 \family sans
10141 Columns
10142 \family default
10143  on the 
10144 \family sans
10145 Document
10146 \begin_inset space ~
10147 \end_inset
10148
10149 Layout
10150 \family default
10151  dialog.
10152  They're ignored by the 
10153 \family sans
10154 foils
10155 \family default
10156  class.
10157 \end_layout
10158
10159 \begin_layout Itemize
10160 The default font size is 20
10161 \begin_inset space \thinspace{}
10162 \end_inset
10163
10164 pt with the other options being 17
10165 \begin_inset space \thinspace{}
10166 \end_inset
10167
10168 pt, 25
10169 \begin_inset space \thinspace{}
10170 \end_inset
10171
10172 pt and 30
10173 \begin_inset space \thinspace{}
10174 \end_inset
10175
10176 pt.
10177 \end_layout
10178
10179 \begin_layout Itemize
10180 The default font is 
10181 \family sans
10182 sans
10183 \family default
10184  
10185 \family sans
10186 serif
10187 \family default
10188  but all math equations are still typeset in the usual roman font.
10189 \end_layout
10190
10191 \begin_layout Itemize
10192
10193 \family sans
10194 FoilTeX
10195 \family default
10196  supports A4 and Letter paper sizes as well as a special size for working
10197  with 35
10198 \begin_inset space \thinspace{}
10199 \end_inset
10200
10201 mm slides.
10202  It doesn't support A5, B5, legal or executive paper sizes.
10203 \end_layout
10204
10205 \begin_layout Itemize
10206 Don't bother changing the 
10207 \family sans
10208 Float Placement
10209 \family default
10210  settings because they are ignored anyway.
10211  All floats appear where they are defined in the text.
10212 \end_layout
10213
10214 \begin_layout Itemize
10215 The 
10216 \family sans
10217 Pagestyle
10218 \family default
10219  setting behaves a bit differently for this class.
10220  
10221 \family sans
10222 FoilTeX
10223 \family default
10224  provides extensive footer and header capabilities including a user-defined
10225  logo.
10226  See section
10227 \begin_inset space ~
10228 \end_inset
10229
10230
10231 \begin_inset CommandInset ref
10232 LatexCommand ref
10233 reference "sec:foilfoot"
10234
10235 \end_inset
10236
10237  for more details.
10238  The title page is treated differently to all other pages in the document
10239  and is 
10240 \emph on
10241 always
10242 \emph default
10243  unnumbered and 
10244 \emph on
10245 always
10246 \emph default
10247  has the logo centered at the bottom of the page (if one is defined).
10248  The possible page style choices and what they do are as follows:
10249 \end_layout
10250
10251 \begin_deeper
10252 \begin_layout Labeling
10253 \labelwidthstring MMMMMMM
10254
10255 \family sans
10256 \series bold
10257 empty
10258 \family default
10259 \series default
10260  The final output contains no page numbers, or other headers or footers
10261  (except footnotes of course).
10262  
10263 \end_layout
10264
10265 \begin_layout Labeling
10266 \labelwidthstring MMMMMMM
10267
10268 \family sans
10269 \series bold
10270 plain
10271 \family default
10272 \series default
10273  The final output contains page numbers centered at the bottom of the page.
10274  No other headings or footers (other than footnotes).
10275 \end_layout
10276
10277 \begin_layout Labeling
10278 \labelwidthstring MMMMMMM
10279
10280 \series bold
10281 foilheadings
10282 \series default
10283  Page numbers in lower right corner.
10284  Additional headers and footers are also shown.
10285  This is also the default.
10286 \end_layout
10287
10288 \begin_layout Labeling
10289 \labelwidthstring MMMMMMM
10290
10291 \series bold
10292 fancy
10293 \series default
10294  Gives you access to the 
10295 \family sans
10296 fancyheadings
10297 \family default
10298  package although its use with 
10299 \family sans
10300 FoilTeX
10301 \family default
10302  is discouraged by the writer of the 
10303 \family sans
10304 FoilTeX
10305 \family default
10306  package because of some potential page layout clashes.
10307 \end_layout
10308
10309 \end_deeper
10310 \begin_layout Subsubsection
10311 Extra Options
10312 \end_layout
10313
10314 \begin_layout Standard
10315 The following options may be used in the extra class options in the 
10316 \family sans
10317 Document\SpecialChar \menuseparator
10318 Settings
10319 \family default
10320  dialog.
10321 \end_layout
10322
10323 \begin_layout Labeling
10324 \labelwidthstring MMMMMMx
10325
10326 \series bold
10327 35mmSlide
10328 \series default
10329  This sets up the page layout for 7.33
10330 \begin_inset space \thinspace{}
10331 \end_inset
10332
10333 in by 11
10334 \begin_inset space \thinspace{}
10335 \end_inset
10336
10337 in paper, which is about the same aspect ratio as a 35
10338 \begin_inset space \thinspace{}
10339 \end_inset
10340
10341 mm slide, making it a bit easier to work with this medium.
10342 \end_layout
10343
10344 \begin_layout Labeling
10345 \labelwidthstring MMMMMMx
10346
10347 \series bold
10348 headrule
10349 \series default
10350  Places a rule across the page below the header on every page except the
10351  title page.
10352 \end_layout
10353
10354 \begin_layout Labeling
10355 \labelwidthstring MMMMMMx
10356
10357 \series bold
10358 footrule
10359 \series default
10360  Places a rule across the page above the footer on every page except the
10361  title page.
10362 \end_layout
10363
10364 \begin_layout Labeling
10365 \labelwidthstring MMMMMMx
10366
10367 \series bold
10368 dvips
10369 \series default
10370  This is automatically set each time you create a new 
10371 \family sans
10372 foils
10373 \family default
10374  document.
10375  This option tells 
10376 \family sans
10377 FoilTeX
10378 \family default
10379  to use the dvips driver to rotate those pages that are set as landscape
10380  foils.
10381 \end_layout
10382
10383 \begin_layout Labeling
10384 \labelwidthstring MMMMMMx
10385
10386 \series bold
10387 landscape
10388 \series default
10389  Simply changes the page dimensions to those of a landscape page but doesn't
10390  do any rotation.
10391  Thus if you use this option you need to use an external program to rotate
10392  each page or feed your paper through your printer as landscape.
10393  Note that this option effectively reverses the roles of the 
10394 \family sans
10395 Foilhead
10396 \family default
10397  and 
10398 \family sans
10399 Rotatefoilhead
10400 \family default
10401  environments (don't worry these are described in the next section).
10402 \end_layout
10403
10404 \begin_layout Labeling
10405 \labelwidthstring MMMMMMx
10406
10407 \series bold
10408 leqno
10409 \series default
10410  Equation numbers on the left.
10411 \end_layout
10412
10413 \begin_layout Labeling
10414 \labelwidthstring MMMMMMx
10415
10416 \series bold
10417 fleqn
10418 \series default
10419  Flush-left equations.
10420 \end_layout
10421
10422 \begin_layout Subsection
10423 Supported Environments
10424 \end_layout
10425
10426 \begin_layout Standard
10427 Most of the environments commonly supported in other classes are also supported
10428  by the 
10429 \family sans
10430 foils
10431 \family default
10432  class.
10433  There are several additional environments provided by 
10434 \family sans
10435 FoilTeX
10436 \family default
10437  as well as a couple added by LyX.
10438  The following environments are shared with other classes:
10439 \end_layout
10440
10441 \begin_layout Standard
10442 \begin_inset ERT
10443 status open
10444
10445 \begin_layout Plain Layout
10446
10447
10448 \backslash
10449 begin{multicols}{2}
10450 \end_layout
10451
10452 \end_inset
10453
10454
10455 \end_layout
10456
10457 \begin_layout Itemize
10458
10459 \family sans
10460 Standard
10461 \end_layout
10462
10463 \begin_layout Itemize
10464
10465 \family sans
10466 Itemize
10467 \end_layout
10468
10469 \begin_layout Itemize
10470
10471 \family sans
10472 Enumerate
10473 \end_layout
10474
10475 \begin_layout Itemize
10476
10477 \family sans
10478 Description
10479 \end_layout
10480
10481 \begin_layout Itemize
10482
10483 \family sans
10484 List
10485 \end_layout
10486
10487 \begin_layout Itemize
10488
10489 \family sans
10490 LyX-Code
10491 \end_layout
10492
10493 \begin_layout Itemize
10494
10495 \family sans
10496 Verse
10497 \end_layout
10498
10499 \begin_layout Itemize
10500
10501 \family sans
10502 Quote
10503 \end_layout
10504
10505 \begin_layout Itemize
10506
10507 \family sans
10508 Quotation
10509 \end_layout
10510
10511 \begin_layout Itemize
10512
10513 \family sans
10514 Title
10515 \end_layout
10516
10517 \begin_layout Itemize
10518
10519 \family sans
10520 Author
10521 \end_layout
10522
10523 \begin_layout Itemize
10524
10525 \family sans
10526 Date
10527 \end_layout
10528
10529 \begin_layout Itemize
10530
10531 \family sans
10532 Abstract
10533 \end_layout
10534
10535 \begin_layout Itemize
10536
10537 \family sans
10538 Bibliography
10539 \end_layout
10540
10541 \begin_layout Itemize
10542
10543 \family sans
10544 Address
10545 \end_layout
10546
10547 \begin_layout Itemize
10548
10549 \family sans
10550 RightAddress
10551 \end_layout
10552
10553 \begin_layout Itemize
10554
10555 \family sans
10556 Caption
10557 \end_layout
10558
10559 \begin_layout Itemize
10560
10561 \family sans
10562 Comment
10563 \end_layout
10564
10565 \begin_layout Standard
10566 \begin_inset ERT
10567 status open
10568
10569 \begin_layout Plain Layout
10570
10571
10572 \backslash
10573 end{multicols}
10574 \end_layout
10575
10576 \end_inset
10577
10578
10579 \end_layout
10580
10581 \begin_layout Standard
10582 That is, all the major environments apart from the sectioning environments.
10583  Since foils are essentially self-contained sections, with a title and body,
10584  
10585 \family sans
10586 FoilTeX
10587 \family default
10588  provides specific commands for starting new foils and these are:
10589 \end_layout
10590
10591 \begin_layout Itemize
10592
10593 \family sans
10594 Foilhead
10595 \end_layout
10596
10597 \begin_layout Itemize
10598
10599 \family sans
10600 Rotatefoilhead
10601 \end_layout
10602
10603 \begin_layout Standard
10604 LyX also provides slightly modified versions of these two environments called:
10605 \end_layout
10606
10607 \begin_layout Itemize
10608
10609 \family sans
10610 ShortFoilhead
10611 \end_layout
10612
10613 \begin_layout Itemize
10614
10615 \family sans
10616 ShortRotatefoilhead
10617 \end_layout
10618
10619 \begin_layout Standard
10620 and the differences will be explained in the next section.
10621 \end_layout
10622
10623 \begin_layout Standard
10624 Since foils are often used in presenting ideas or new theorems and such
10625  
10626 \family sans
10627 FoilTeX
10628 \family default
10629  also provides a comprehensive box of goodies for presenting them:
10630 \end_layout
10631
10632 \begin_layout Standard
10633 \begin_inset ERT
10634 status open
10635
10636 \begin_layout Plain Layout
10637
10638
10639 \backslash
10640 begin{multicols}{2}
10641 \end_layout
10642
10643 \end_inset
10644
10645
10646 \end_layout
10647
10648 \begin_layout Itemize
10649
10650 \family sans
10651 Theorem
10652 \end_layout
10653
10654 \begin_layout Itemize
10655
10656 \family sans
10657 Lemma
10658 \end_layout
10659
10660 \begin_layout Itemize
10661
10662 \family sans
10663 Corollary
10664 \end_layout
10665
10666 \begin_layout Itemize
10667
10668 \family sans
10669 Proposition
10670 \end_layout
10671
10672 \begin_layout Itemize
10673
10674 \family sans
10675 Definition
10676 \end_layout
10677
10678 \begin_layout Itemize
10679
10680 \family sans
10681 Proof
10682 \end_layout
10683
10684 \begin_layout Itemize
10685
10686 \family sans
10687 Theorem*
10688 \end_layout
10689
10690 \begin_layout Itemize
10691
10692 \family sans
10693 Lemma*
10694 \end_layout
10695
10696 \begin_layout Itemize
10697
10698 \family sans
10699 Corollary*
10700 \end_layout
10701
10702 \begin_layout Itemize
10703
10704 \family sans
10705 Proposition*
10706 \end_layout
10707
10708 \begin_layout Itemize
10709
10710 \family sans
10711 Definition*
10712 \end_layout
10713
10714 \begin_layout Standard
10715 \begin_inset ERT
10716 status open
10717
10718 \begin_layout Plain Layout
10719
10720
10721 \backslash
10722 end{multicols}
10723 \end_layout
10724
10725 \end_inset
10726
10727
10728 \end_layout
10729
10730 \begin_layout Standard
10731 The starred versions are unnumbered while the unstarred versions are numbered.
10732  There are also two list environments added by LyX and these are:
10733 \end_layout
10734
10735 \begin_layout Itemize
10736
10737 \family sans
10738 TickList
10739 \end_layout
10740
10741 \begin_layout Itemize
10742
10743 \family sans
10744 CrossList
10745 \end_layout
10746
10747 \begin_layout Standard
10748
10749 \family sans
10750 FoilTeX
10751 \family default
10752  provides some powerful header and footer capabilities that are best set
10753  in the preamble although they may be set at any point in a document.
10754  If you want to change these settings in your document the best place to
10755  do so is at the very top of a foil, i.
10756 \begin_inset space \thinspace{}
10757 \end_inset
10758
10759 e.
10760 \emph on
10761
10762 \begin_inset space \space{}
10763 \end_inset
10764
10765
10766 \emph default
10767 straight after the foilhead.
10768 \end_layout
10769
10770 \begin_layout Standard
10771 For this purpose, the following command styles are provided [
10772 \shape smallcaps
10773 Martin Vermeer
10774 \shape default
10775 ]:
10776 \end_layout
10777
10778 \begin_layout Standard
10779 \begin_inset ERT
10780 status open
10781
10782 \begin_layout Plain Layout
10783
10784
10785 \backslash
10786 begin{multicols}{2}
10787 \end_layout
10788
10789 \end_inset
10790
10791
10792 \end_layout
10793
10794 \begin_layout Itemize
10795
10796 \family sans
10797 My
10798 \begin_inset space ~
10799 \end_inset
10800
10801 Logo
10802 \end_layout
10803
10804 \begin_layout Itemize
10805
10806 \family sans
10807 Restriction
10808 \end_layout
10809
10810 \begin_layout Itemize
10811
10812 \family sans
10813 Right
10814 \begin_inset space ~
10815 \end_inset
10816
10817 Footer
10818 \end_layout
10819
10820 \begin_layout Itemize
10821
10822 \family sans
10823 Right
10824 \begin_inset space ~
10825 \end_inset
10826
10827 Header
10828 \end_layout
10829
10830 \begin_layout Itemize
10831
10832 \family sans
10833 Left
10834 \begin_inset space ~
10835 \end_inset
10836
10837 Header
10838 \end_layout
10839
10840 \begin_deeper
10841 \begin_layout Standard
10842 \begin_inset space ~
10843 \end_inset
10844
10845
10846 \end_layout
10847
10848 \end_deeper
10849 \begin_layout Standard
10850 \begin_inset ERT
10851 status open
10852
10853 \begin_layout Plain Layout
10854
10855
10856 \backslash
10857 end{multicols}
10858 \end_layout
10859
10860 \end_inset
10861
10862
10863 \end_layout
10864
10865 \begin_layout Standard
10866 There are also a few commands provided by 
10867 \family sans
10868 FoilTeX
10869 \family default
10870  that aren't directly supported by LyX but I'll tell you what they do and
10871  how to use them in section
10872 \begin_inset space ~
10873 \end_inset
10874
10875
10876 \begin_inset CommandInset ref
10877 LatexCommand ref
10878 reference "sec:unsuppfoils"
10879
10880 \end_inset
10881
10882 .
10883 \end_layout
10884
10885 \begin_layout Subsection
10886 Building a Set of Foils
10887 \end_layout
10888
10889 \begin_layout Standard
10890 This section will give a simple introduction to using the different environments
10891  to build a set of foils.
10892  If you want to see an example set of foils, take a look at the 
10893 \family typewriter
10894 Foils.lyx
10895 \family default
10896  file you find in LyX's 
10897 \family typewriter
10898 examples
10899 \family default
10900  folder.
10901 \end_layout
10902
10903 \begin_layout Subsubsection
10904 Give It a Title Page
10905 \end_layout
10906
10907 \begin_layout Standard
10908 Unlike other classes that provide 
10909 \family sans
10910 Title
10911 \family default
10912
10913 \family sans
10914 Author
10915 \family default
10916
10917 \family sans
10918 Date
10919 \family default
10920  and 
10921 \family sans
10922 Abstract
10923 \family default
10924  environments, 
10925 \family sans
10926 foils
10927 \family default
10928  creates the title on a page of its own.
10929  If you leave out the 
10930 \family sans
10931 Date
10932 \family default
10933  environment LaTeX will substitute the current date (every time you regenerate
10934  the output).
10935 \end_layout
10936
10937 \begin_layout Subsubsection
10938 Start a New Foil
10939 \end_layout
10940
10941 \begin_layout Standard
10942 As I mentioned earlier, there are four ways of starting a new foil.
10943  For portrait foils you should use 
10944 \family sans
10945 Foilhead
10946 \family default
10947  or 
10948 \family sans
10949 ShortFoilhead.
10950
10951 \family default
10952  The difference between these two environments is the amount of space between
10953  the title of the foil (the foilhead) and the body of the foil.
10954 \end_layout
10955
10956 \begin_layout Standard
10957 Landscape foils are generated using the 
10958 \family sans
10959 Rotatefoilhead
10960 \family default
10961  and 
10962 \family sans
10963 ShortRotatefoilhead
10964 \family default
10965  environments.
10966  Again the only difference is the spacing between foilhead and body.
10967  Both of the short versions have 0.5 inches less separation between the foilhead
10968  and the body.
10969  
10970 \end_layout
10971
10972 \begin_layout Standard
10973 One problem with the support for landscape foils is the requirement that
10974  you have to use the 
10975 \family typewriter
10976 dvips
10977 \family default
10978  driver to generate the PostScript output otherwise the foils won't be rotated.
10979  It is possible to get landscape foils even if you haven't got the 
10980 \family typewriter
10981 dvips
10982 \family default
10983  driver provided you can feed your foils sideways through your printer ;-)
10984 \end_layout
10985
10986 \begin_layout Subsubsection
10987 Theorems, Lemmas, Proofs and more
10988 \end_layout
10989
10990 \begin_layout Standard
10991 Due to a small bug in LyX you can't have two of the same type of these environme
10992 nts directly following each other.
10993  They must be separated by something.
10994  If you try, you will just be extending the previous environment as if you
10995  had merged the two environments together.
10996  So, how do you get around this problem? The simplest option is to insert
10997  some text between the two environments or add a 
10998 \family sans
10999 LaTeX
11000 \family default
11001  environment between the two with just a 
11002 \begin_inset Quotes eld
11003 \end_inset
11004
11005
11006 \family typewriter
11007 %
11008 \family default
11009
11010 \begin_inset Quotes erd
11011 \end_inset
11012
11013  in it.
11014  This will force LyX to produce two separate environments and hence the
11015  correct LaTeX output.
11016  An example is provided in the example file included with the LyX distribution.
11017  Remember, this problem only occurs if you are trying to place two of the
11018  same type of theorem-like environments one directly after the other.
11019 \end_layout
11020
11021 \begin_layout Subsubsection
11022 Lists
11023 \end_layout
11024
11025 \begin_layout Standard
11026 You get all the commonly supported list styles found in other classes as
11027  well as two new ones.
11028  I'll only describe the new ones here.
11029  If you want to find out more about the other list environments check out
11030  the 
11031 \emph on
11032 User's Guide.
11033
11034 \emph default
11035  If you intend to use itemized lists you might also want to read about the
11036  
11037 \family sans
11038 Itemize
11039 \begin_inset space ~
11040 \end_inset
11041
11042 Bullet
11043 \begin_inset space ~
11044 \end_inset
11045
11046 Selection
11047 \family default
11048  dialog described above in section
11049 \begin_inset space ~
11050 \end_inset
11051
11052
11053 \begin_inset CommandInset ref
11054 LatexCommand ref
11055 reference "sec:bullet"
11056
11057 \end_inset
11058
11059 .
11060 \end_layout
11061
11062 \begin_layout Standard
11063 The two new list styles, 
11064 \family sans
11065 TickList
11066 \family default
11067  and 
11068 \family sans
11069 CrossList
11070 \family default
11071 , are designed to make it easier for you to create lists of do's and don'ts
11072  or right and wrong by providing dedicated environments that use a tick
11073  or a cross as the label of the list.
11074  These lists are in fact dedicated variants of the 
11075 \family sans
11076 Itemize
11077 \family default
11078  environment.
11079  They do however require that you have the 
11080 \family typewriter
11081 psnfss
11082 \family default
11083  packages installed.
11084 \end_layout
11085
11086 \begin_layout Subsubsection
11087 Figures and Tables
11088 \end_layout
11089
11090 \begin_layout Standard
11091
11092 \family sans
11093 FoilTeX
11094 \family default
11095  redefines the floating tables and figures so that they appear exactly where
11096  they are in the text rather than pushing them to the top of the page or
11097  to some user specified location.
11098  In fact if you change the float placement settings they are simply ignored.
11099 \end_layout
11100
11101 \begin_layout Subsubsection
11102 Page Headers and Footers
11103 \begin_inset CommandInset label
11104 LatexCommand label
11105 name "sec:foilfoot"
11106
11107 \end_inset
11108
11109
11110 \end_layout
11111
11112 \begin_layout Standard
11113
11114 \family sans
11115 My
11116 \begin_inset space ~
11117 \end_inset
11118
11119 Logo
11120 \family default
11121  and 
11122 \family sans
11123 Restriction
11124 \family default
11125  are two commands used to control the left-footer text string.
11126  The first is meant to allow you to include a graphic logo on your foils
11127  and defaults to 
11128 \begin_inset Quotes eld
11129 \end_inset
11130
11131 -Typeset by 
11132 \family sans
11133 FoilTeX
11134 \family default
11135 -
11136 \begin_inset Quotes erd
11137 \end_inset
11138
11139 .
11140  While the second is meant to provide a classification for the audience,
11141  
11142 \emph on
11143 e.
11144 \begin_inset space \thinspace{}
11145 \end_inset
11146
11147 g.
11148 \emph default
11149
11150 \begin_inset space \space{}
11151 \end_inset
11152
11153 Confidential.
11154  It is empty by default.
11155 \end_layout
11156
11157 \begin_layout Standard
11158 The remaining page corners can be filled by 
11159 \family sans
11160 Right
11161 \begin_inset space ~
11162 \end_inset
11163
11164 Footer
11165 \family default
11166  (which defaults to page numbers), 
11167 \family sans
11168 Right
11169 \begin_inset space ~
11170 \end_inset
11171
11172 Header
11173 \family default
11174  (top right) and 
11175 \family sans
11176 Left
11177 \begin_inset space ~
11178 \end_inset
11179
11180 Header
11181 \family default
11182  (top left).
11183 \end_layout
11184
11185 \begin_layout Subsection
11186 Unsupported 
11187 \family sans
11188 FoilTeX
11189 \family default
11190  Goodies
11191 \begin_inset CommandInset label
11192 LatexCommand label
11193 name "sec:unsuppfoils"
11194
11195 \end_inset
11196
11197
11198 \end_layout
11199
11200 \begin_layout Standard
11201 All the commands mentioned below need to be set in a 
11202 \family sans
11203 LaTeX
11204 \family default
11205  environment or as 
11206 \family sans
11207 TeX
11208 \family default
11209  within another environment.
11210 \end_layout
11211
11212 \begin_layout Subsubsection
11213 Lengths
11214 \end_layout
11215
11216 \begin_layout Standard
11217 All lengths are adjusted using the 
11218 \family typewriter
11219
11220 \backslash
11221 setlength{
11222 \family default
11223 \emph on
11224 lengthname
11225 \family typewriter
11226 \emph default
11227 }{
11228 \family default
11229 \emph on
11230 newlength
11231 \family typewriter
11232 \emph default
11233 }
11234 \family default
11235  command.
11236  Where 
11237 \emph on
11238 lengthname
11239 \emph default
11240  should be replaced by the name given to the length you want to change and
11241  
11242 \emph on
11243 newlength
11244 \emph default
11245  is the length value.
11246  All lengths should be specified in units of length such as inches (
11247 \family typewriter
11248 in
11249 \family default
11250 ), millimeters (
11251 \family typewriter
11252 mm
11253 \family default
11254 ) or points (
11255 \family typewriter
11256 pt
11257 \family default
11258 ) or relative to some document or font-based length such as 
11259 \family typewriter
11260
11261 \backslash
11262 textwidth
11263 \family default
11264 .
11265  
11266 \end_layout
11267
11268 \begin_layout Standard
11269 It's possible to change the spacing between a foilhead and the body of the
11270  foil by adjusting the length specified by 
11271 \family typewriter
11272
11273 \backslash
11274 foilheadskip
11275 \family default
11276 .
11277  For example, to make 
11278 \emph on
11279 all
11280 \emph default
11281  foilheads 0.5
11282 \begin_inset space \space{}
11283 \end_inset
11284
11285 in closer to their bodies put the following in the preamble: 
11286 \family typewriter
11287
11288 \backslash
11289 setlength{
11290 \backslash
11291 foilheadskip}{-0.5in}
11292 \end_layout
11293
11294 \begin_layout Standard
11295 The spacings around floats can be adjusted by setting these lengths:
11296 \end_layout
11297
11298 \begin_layout Labeling
11299 \labelwidthstring MMMMMMMMMMM
11300
11301 \family typewriter
11302
11303 \backslash
11304 abovefloatskip
11305 \family default
11306  Separation between the text and the top of the float
11307 \end_layout
11308
11309 \begin_layout Labeling
11310 \labelwidthstring MMMMMMMMMMM
11311
11312 \family typewriter
11313
11314 \backslash
11315 abovecaptionskip
11316 \family default
11317  Separation between the float and the caption
11318 \end_layout
11319
11320 \begin_layout Labeling
11321 \labelwidthstring MMMMMMMMMMM
11322
11323 \family typewriter
11324
11325 \backslash
11326 belowcaptionskip
11327 \family default
11328  Separation between the caption and the following text
11329 \end_layout
11330
11331 \begin_layout Labeling
11332 \labelwidthstring MMMMMMMMMMM
11333
11334 \family typewriter
11335
11336 \backslash
11337 captionwidth
11338 \family default
11339  You can make the captions narrower than the surrounding text by adjusting
11340  this length.
11341  Best done relative to 
11342 \family typewriter
11343
11344 \backslash
11345 textwidth
11346 \family default
11347 .
11348 \end_layout
11349
11350 \begin_layout Standard
11351 There are also several title page related lengths that you may find useful
11352  if you have a long title or several authors:
11353 \end_layout
11354
11355 \begin_layout Labeling
11356 \labelwidthstring MMMMMMMMMMM
11357
11358 \family typewriter
11359
11360 \backslash
11361 abovetitleskip
11362 \family default
11363  Separation from headers to 
11364 \family sans
11365 Title
11366 \end_layout
11367
11368 \begin_layout Labeling
11369 \labelwidthstring MMMMMMMMMMM
11370
11371 \family typewriter
11372
11373 \backslash
11374 titleauthorskip
11375 \family default
11376  between 
11377 \family sans
11378 Title
11379 \family default
11380  and 
11381 \family sans
11382 Author
11383 \family default
11384  environments
11385 \end_layout
11386
11387 \begin_layout Labeling
11388 \labelwidthstring MMMMMMMMMMM
11389
11390 \family typewriter
11391
11392 \backslash
11393 authorauthorskip
11394 \family default
11395  between multiple 
11396 \family sans
11397 Author
11398 \family default
11399  lines
11400 \end_layout
11401
11402 \begin_layout Labeling
11403 \labelwidthstring MMMMMMMMMMM
11404
11405 \family typewriter
11406
11407 \backslash
11408 authordateskip
11409 \family default
11410  between the 
11411 \family sans
11412 Author
11413 \family default
11414  and the 
11415 \family sans
11416 Date
11417 \end_layout
11418
11419 \begin_layout Labeling
11420 \labelwidthstring MMMMMMMMMMM
11421
11422 \family typewriter
11423
11424 \backslash
11425 dateabstractskip
11426 \family default
11427  between the 
11428 \family sans
11429 Date
11430 \family default
11431  and the 
11432 \family sans
11433 Abstract
11434 \end_layout
11435
11436 \begin_layout Standard
11437 The last length related command affects all the list environments.
11438  If you place 
11439 \family typewriter
11440
11441 \backslash
11442 zerolistvertdimens
11443 \family default
11444  
11445 \emph on
11446 inside
11447 \emph default
11448  a list environment then all the vertical spacing between the list items
11449  is removed.
11450  Note that this is a command not a length so it doesn't require 
11451 \family typewriter
11452
11453 \backslash
11454 setlength
11455 \family default
11456  like the stuff mentioned above.
11457 \end_layout
11458
11459 \begin_layout Subsubsection
11460 Headers and Footers
11461 \end_layout
11462
11463 \begin_layout Standard
11464 The 
11465 \family typewriter
11466
11467 \backslash
11468 LogoOn
11469 \family default
11470  and 
11471 \family typewriter
11472
11473 \backslash
11474 LogoOff
11475 \family default
11476  commands control whether the logo in the 
11477 \family sans
11478 MyLogo
11479 \family default
11480  definition appear on a given page.
11481  If you put 
11482 \family typewriter
11483
11484 \backslash
11485 LogoOff
11486 \family default
11487  in the preamble then none of the foils will have the logo on them.
11488  If you don't want the logo on a particular page place the 
11489 \family typewriter
11490
11491 \backslash
11492 LogoOff
11493 \family default
11494  directly after the foilhead of that page and the 
11495 \family typewriter
11496
11497 \backslash
11498 LogoOn
11499 \family default
11500  directly after the next foilhead.
11501 \end_layout
11502
11503 \begin_layout Standard
11504 If you decide to use the 
11505 \family sans
11506 fancy
11507 \family default
11508  page style setting in the 
11509 \family sans
11510 Document
11511 \begin_inset space ~
11512 \end_inset
11513
11514 Layout
11515 \family default
11516  dialog you should probably add 
11517 \family typewriter
11518
11519 \backslash
11520 let
11521 \backslash
11522 headwidth
11523 \backslash
11524 textwidth
11525 \family default
11526  to your preamble so headers and footers on landscape pages are correctly
11527  placed when rotated.
11528  This is due to some clashes between the page layouts provided by the 
11529 \family sans
11530 fancyheadings
11531 \family default
11532  package and the 
11533 \family sans
11534 foils
11535 \family default
11536  class.
11537 \end_layout
11538
11539 \begin_layout Section
11540 Hollywood (Hollywood spec scripts)
11541 \end_layout
11542
11543 \begin_layout Standard
11544 by 
11545 \shape smallcaps
11546 Garst Reese
11547 \end_layout
11548
11549 \begin_layout Subsection
11550 Introduction
11551 \end_layout
11552
11553 \begin_layout Standard
11554 Getting the format of a Hollywood script right is a 
11555 \begin_inset Quotes eld
11556 \end_inset
11557
11558 rite of passage.
11559 \begin_inset Quotes erd
11560 \end_inset
11561
11562  It is designed to make the readers focus on content and to be easy and
11563  familiar for the actors to read.
11564  Each page of a script should be one minute of film.
11565  Nothing goes in a script that you cannot see or hear on screen.
11566  The courier 12 pt font should be used throughout.
11567  No italics.
11568 \end_layout
11569
11570 \begin_layout Subsection
11571 Special problems
11572 \end_layout
11573
11574 \begin_layout Standard
11575 Speakers' lines should NEVER break in mid-sentence.
11576  If a speaker's lines continue over a page break, repeat the 
11577 \family sans
11578 Speaker
11579 \family default
11580  title followed by (Cont'd).
11581 \end_layout
11582
11583 \begin_layout Subsection
11584 Special features
11585 \end_layout
11586
11587 \begin_layout Standard
11588 Insert the 
11589 \family sans
11590 Speaker
11591 \family default
11592  names as labels then cross-reference the label to insert the name.
11593  The cross-reference dialog will show the current cast of characters.
11594  You can use this to insert the speaker name in narratives also.
11595 \end_layout
11596
11597 \begin_layout Subsection
11598 Paper size and Margins
11599 \end_layout
11600
11601 \begin_layout Standard
11602 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11603 \end_layout
11604
11605 \begin_layout Subsection
11606 Environments
11607 \end_layout
11608
11609 \begin_layout Standard
11610 The following environments are available.
11611  You can use hollywood.bind to get the bind keys shown at the right.
11612 \end_layout
11613
11614 \begin_layout Itemize
11615
11616 \family sans
11617 Standard
11618 \begin_inset Newline newline
11619 \end_inset
11620
11621
11622 \family default
11623 Used where nothing else works.
11624  Try to avoid it.
11625 \end_layout
11626
11627 \begin_layout Itemize
11628
11629 \family sans
11630 FADE_IN
11631 \family default
11632 :
11633 \begin_inset space \hfill{}
11634 \end_inset
11635
11636
11637 \family sans
11638 M-z S-I
11639 \family default
11640
11641 \begin_inset Newline newline
11642 \end_inset
11643
11644 Usually followed by something like 
11645 \begin_inset Quotes eld
11646 \end_inset
11647
11648 on Sally waking up.
11649 \begin_inset Quotes erd
11650 \end_inset
11651
11652
11653 \end_layout
11654
11655 \begin_layout Itemize
11656
11657 \family sans
11658 INT:
11659 \begin_inset space \hfill{}
11660 \end_inset
11661
11662 M-z i
11663 \begin_inset Newline newline
11664 \end_inset
11665
11666
11667 \family default
11668 Introduces a new INTERIOR camera set-up.
11669  Always followed by DAY or NIGHT, or something similar to define the lighting
11670  required.
11671  Everthing on this line in CAPS.
11672 \end_layout
11673
11674 \begin_layout Itemize
11675
11676 \family sans
11677 EXT:
11678 \begin_inset space \hfill{}
11679 \end_inset
11680
11681 M-z e
11682 \begin_inset Newline newline
11683 \end_inset
11684
11685
11686 \family default
11687 Introduces a new EXTERIOR camera set-up.
11688  Everthing on this line in CAPS.
11689 \end_layout
11690
11691 \begin_layout Itemize
11692
11693 \family sans
11694 Speaker
11695 \begin_inset space \hfill{}
11696 \end_inset
11697
11698 M-z s
11699 \begin_inset Newline newline
11700 \end_inset
11701
11702
11703 \family default
11704 The character speaking.
11705 \end_layout
11706
11707 \begin_layout Itemize
11708
11709 \family sans
11710 Parenthetical
11711 \begin_inset space \hfill{}
11712 \end_inset
11713
11714 M-z p
11715 \begin_inset Newline newline
11716 \end_inset
11717
11718
11719 \family default
11720 Instructions to the speaker.
11721  The () are automatically inserted, but only the ( will show in LyX.
11722  Both will be printed.
11723 \end_layout
11724
11725 \begin_layout Itemize
11726
11727 \family sans
11728 Dialogue
11729 \begin_inset space \hfill{}
11730 \end_inset
11731
11732 M-z d
11733 \begin_inset Newline newline
11734 \end_inset
11735
11736
11737 \family default
11738 What the 
11739 \family sans
11740 Speaker
11741 \family default
11742  says.
11743 \end_layout
11744
11745 \begin_layout Itemize
11746
11747 \family sans
11748 Transition
11749 \begin_inset space \hfill{}
11750 \end_inset
11751
11752 M-z t
11753 \begin_inset Newline newline
11754 \end_inset
11755
11756
11757 \family default
11758 Camera movement instruction.
11759  e.
11760 \begin_inset space \thinspace{}
11761 \end_inset
11762
11763 g.
11764 \begin_inset space \space{}
11765 \end_inset
11766
11767 CUT TO:
11768 \end_layout
11769
11770 \begin_layout Itemize
11771
11772 \family sans
11773 FADE OUT:
11774 \begin_inset space \hfill{}
11775 \end_inset
11776
11777 M-z S-I
11778 \end_layout
11779
11780 \begin_layout Itemize
11781
11782 \family sans
11783 Author
11784 \begin_inset space \hfill{}
11785 \end_inset
11786
11787 M-z S-A
11788 \end_layout
11789
11790 \begin_layout Itemize
11791
11792 \family sans
11793 Title
11794 \begin_inset space \hfill{}
11795 \end_inset
11796
11797 M-z S-T
11798 \end_layout
11799
11800 \begin_layout Itemize
11801
11802 \family sans
11803 Right_Address
11804 \begin_inset space \hfill{}
11805 \end_inset
11806
11807 M-z r
11808 \end_layout
11809
11810 \begin_layout Subsection
11811 Script jargon
11812 \end_layout
11813
11814 \begin_layout Itemize
11815 (O.S) — off screen
11816 \end_layout
11817
11818 \begin_layout Itemize
11819 (V.0) — voice over
11820 \end_layout
11821
11822 \begin_layout Itemize
11823 b.
11824 \begin_inset space \thinspace{}
11825 \end_inset
11826
11827 g.
11828  — background
11829 \end_layout
11830
11831 \begin_layout Itemize
11832 C.U.
11833  — close-up
11834 \end_layout
11835
11836 \begin_layout Itemize
11837 PAN — camera movement
11838 \end_layout
11839
11840 \begin_layout Itemize
11841 INSERT — cut to close-up of
11842 \end_layout
11843
11844 \begin_layout Section
11845 ijmpc and ijmpd
11846 \end_layout
11847
11848 \begin_layout Standard
11849 by 
11850 \noun on
11851 Panayotis Papasotiriou
11852 \end_layout
11853
11854 \begin_layout Subsection
11855 Overview
11856 \end_layout
11857
11858 \begin_layout Standard
11859 The ijmpc package is a set of macros that facilitates electronic manuscript
11860  submission to the 
11861 \emph on
11862 International Journal of Modern Physics C
11863 \emph default
11864 .
11865  Similarly, the ijmpd package is for creating manuscripts to be submitted
11866  to the 
11867 \emph on
11868 International Journal of Modern Physics D
11869 \emph default
11870 .
11871  Both journals are published by World Scientific.
11872  The corresponding document classes are named 
11873 \family typewriter
11874 ws-ijmpc.cls
11875 \family default
11876  and 
11877 \family typewriter
11878 ws-ijmpd.cls
11879 \family default
11880 , respectively.
11881  These files, together with instructions for the authors, can be downloaded
11882  from the sites 
11883 \begin_inset Flex URL
11884 status collapsed
11885
11886 \begin_layout Plain Layout
11887
11888 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11889 \end_layout
11890
11891 \end_inset
11892
11893  and 
11894 \begin_inset Flex URL
11895 status collapsed
11896
11897 \begin_layout Plain Layout
11898
11899 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11900 \end_layout
11901
11902 \end_inset
11903
11904 .
11905  Both packages are modified versions of the standard 
11906 \begin_inset Quotes eld
11907 \end_inset
11908
11909 article
11910 \begin_inset Quotes erd
11911 \end_inset
11912
11913  package, and they are almost (but not exactly) identical.
11914  Most of their features are supported by LyX.
11915  I have used LyX successfully to write articles submitted to both journals
11916  without any problem.
11917 \end_layout
11918
11919 \begin_layout Subsection
11920 Writing a paper
11921 \end_layout
11922
11923 \begin_layout Standard
11924 As usual, the easiest way to write a paper is to start with a template.
11925  Click on 
11926 \family sans
11927 File\SpecialChar \menuseparator
11928 New from
11929 \family default
11930  
11931 \family sans
11932 \bar under
11933 T
11934 \bar default
11935 emplate
11936 \family default
11937 , then choose the 
11938 \family typewriter
11939 ijmpc.lyx
11940 \family default
11941  or 
11942 \family typewriter
11943 ijmpd.lyx
11944 \family default
11945  template.
11946  This will give an (almost) empty document that includes the most common
11947  fields found in a manuscript.
11948  Simply overwrite the existing text (including the brackets, 
11949 \family typewriter
11950 <>
11951 \family default
11952 ) with your text.
11953  You should keep in mind the following remarks.
11954 \end_layout
11955
11956 \begin_layout Enumerate
11957 LyX won't let you change the font size and the page style of the document,
11958  because such modifications are not allowed by both packages.
11959 \end_layout
11960
11961 \begin_layout Enumerate
11962 The language of the document should not be changed.
11963  Before previewing your paper, be sure that the babel package is not used.
11964  To do this, click on 
11965 \family sans
11966 Tools\SpecialChar \menuseparator
11967 Preferences
11968 \family default
11969 , select the 
11970 \family sans
11971 Lang Opts
11972 \family default
11973  tab, deselect the 
11974 \family sans
11975 Use babel
11976 \family default
11977  checkbox in the language settings, and click on 
11978 \family sans
11979 Apply
11980 \family default
11981  (or 
11982 \family sans
11983 Save
11984 \family default
11985 , if you wish to make this change permanent).
11986 \end_layout
11987
11988 \begin_layout Enumerate
11989 The 
11990 \begin_inset Quotes eld
11991 \end_inset
11992
11993 Keywords
11994 \begin_inset Quotes erd
11995 \end_inset
11996
11997  style must be used to define keywords.
11998 \end_layout
11999
12000 \begin_layout Enumerate
12001 The ijmpc package provides a style named 
12002 \begin_inset Quotes eld
12003 \end_inset
12004
12005 Classification Codes
12006 \begin_inset Quotes erd
12007 \end_inset
12008
12009 , which can be used to define classification codes, such as PACS numbers.
12010  Note that this facility is not supported by the ijmpd package.
12011 \end_layout
12012
12013 \begin_layout Enumerate
12014 Several new environments are available: 
12015 \begin_inset Quotes eld
12016 \end_inset
12017
12018 Definition
12019 \begin_inset Quotes erd
12020 \end_inset
12021
12022
12023 \begin_inset Quotes eld
12024 \end_inset
12025
12026 Step
12027 \begin_inset Quotes erd
12028 \end_inset
12029
12030
12031 \begin_inset Quotes eld
12032 \end_inset
12033
12034 Example
12035 \begin_inset Quotes erd
12036 \end_inset
12037
12038
12039 \begin_inset Quotes eld
12040 \end_inset
12041
12042 Remark
12043 \begin_inset Quotes erd
12044 \end_inset
12045
12046
12047 \begin_inset Quotes eld
12048 \end_inset
12049
12050 Notation
12051 \begin_inset Quotes erd
12052 \end_inset
12053
12054
12055 \begin_inset Quotes eld
12056 \end_inset
12057
12058 Theorem
12059 \begin_inset Quotes erd
12060 \end_inset
12061
12062
12063 \begin_inset Quotes eld
12064 \end_inset
12065
12066 Proof
12067 \begin_inset Quotes erd
12068 \end_inset
12069
12070
12071 \begin_inset Quotes eld
12072 \end_inset
12073
12074 Corollary
12075 \begin_inset Quotes erd
12076 \end_inset
12077
12078
12079 \begin_inset Quotes eld
12080 \end_inset
12081
12082 Lemma
12083 \begin_inset Quotes erd
12084 \end_inset
12085
12086
12087 \begin_inset Quotes eld
12088 \end_inset
12089
12090 Proposition
12091 \begin_inset Quotes erd
12092 \end_inset
12093
12094
12095 \begin_inset Quotes eld
12096 \end_inset
12097
12098 Prop
12099 \begin_inset Quotes erd
12100 \end_inset
12101
12102
12103 \begin_inset Quotes eld
12104 \end_inset
12105
12106 Question
12107 \begin_inset Quotes erd
12108 \end_inset
12109
12110
12111 \begin_inset Quotes eld
12112 \end_inset
12113
12114 Claim
12115 \begin_inset Quotes erd
12116 \end_inset
12117
12118 , and 
12119 \begin_inset Quotes eld
12120 \end_inset
12121
12122 Conjecture
12123 \begin_inset Quotes erd
12124 \end_inset
12125
12126 .
12127  Their use is more or less obvious.
12128  LyX supports all these environments; it will use the proper label, text
12129  style, and numbering scheme for each of them.
12130 \end_layout
12131
12132 \begin_layout Enumerate
12133 Both packages use basic citations; the natbib package should not be used.
12134  In LyX, citation references are shown as usual; in the output, citations
12135  are shown as superscripts.
12136  If you want to use a citation as normal text, you should use the 
12137 \family typewriter
12138 refcite
12139 \family default
12140  command, e.
12141 \begin_inset space \thinspace{}
12142 \end_inset
12143
12144 g.
12145 \begin_inset space \space{}
12146 \end_inset
12147
12148
12149 \begin_inset Quotes eld
12150 \end_inset
12151
12152 See Ref.
12153 \begin_inset space \space{}
12154 \end_inset
12155
12156
12157 \family typewriter
12158
12159 \backslash
12160 refcite{key}
12161 \family default
12162
12163 \begin_inset Quotes erd
12164 \end_inset
12165
12166 .
12167 \end_layout
12168
12169 \begin_layout Enumerate
12170 There is no 
12171 \begin_inset Quotes eld
12172 \end_inset
12173
12174 Acknowledgments
12175 \begin_inset Quotes erd
12176 \end_inset
12177
12178  section in both packages.
12179  To put acknowledgments, just use the 
12180 \begin_inset Quotes eld
12181 \end_inset
12182
12183 Section*
12184 \begin_inset Quotes erd
12185 \end_inset
12186
12187  environment.
12188 \end_layout
12189
12190 \begin_layout Enumerate
12191 Appendices may be added to the paper, 
12192 \emph on
12193 after
12194 \emph default
12195  the Acknowledgments and 
12196 \shape italic
12197 before
12198 \shape default
12199  the References.
12200  LyX provides a special environment, called 
12201 \begin_inset Quotes eld
12202 \end_inset
12203
12204 Appendices Section
12205 \begin_inset Quotes erd
12206 \end_inset
12207
12208  which marks the beginning of the appendices.
12209  This environment should be left blank; it just sends a LaTeX command, but
12210  nothing is really printed.
12211  In LyX, the word 
12212 \begin_inset Quotes eld
12213 \end_inset
12214
12215 Appendix
12216 \begin_inset Quotes erd
12217 \end_inset
12218
12219  is printed with blue letters, as a signal that all sections after that
12220  point are appendices.
12221  To write an appendix, use the 
12222 \begin_inset Quotes eld
12223 \end_inset
12224
12225 Appendix
12226 \begin_inset Quotes erd
12227 \end_inset
12228
12229  environment.
12230  LyX will number each appendix with capital letters, as required by both
12231  journals.
12232  Note that 
12233 \begin_inset Quotes eld
12234 \end_inset
12235
12236 Appendices Section
12237 \begin_inset Quotes erd
12238 \end_inset
12239
12240  
12241 \emph on
12242 must
12243 \emph default
12244  be present before the first appendix; if not, all appendices will be numbered
12245  as normal sections in the output.
12246 \end_layout
12247
12248 \begin_layout Enumerate
12249 The ijmpc and the ijmpd packages use the 
12250 \family typewriter
12251 tbl
12252 \family default
12253  command to implement table captions.
12254  As a result, a table created by LyX is printed correctly, but its caption
12255  is ignored.
12256  However, you can use some TeX code to overcome this problem, so that captions
12257  are printed as expected.
12258  To do so, create a float table as usual, remove the caption, and replace
12259  it with the TeX code 
12260 \family typewriter
12261
12262 \backslash
12263 tbl{
12264 \emph on
12265 your table caption
12266 \emph default
12267 }{
12268 \family default
12269  (sic); you must also the TeX code 
12270 \family typewriter
12271 }
12272 \family default
12273  immediately after the tabular material.
12274  Study the example table included in the template files to see how this
12275  trick is implemented.
12276  Alternatively, If you need table captions, you should implement the whole
12277  table float in a 
12278 \family typewriter
12279 .tex
12280 \family default
12281  file, then include this file to the LyX document (
12282 \family sans
12283 Insert\SpecialChar \menuseparator
12284 File\SpecialChar \menuseparator
12285 Child
12286 \begin_inset space ~
12287 \end_inset
12288
12289 Document
12290 \family default
12291 ).
12292  Details on how to create a table float can be found in the files 
12293 \family typewriter
12294 ws-ijmpc.tex
12295 \family default
12296  and 
12297 \family typewriter
12298 ws-ijmpd.tex
12299 \family default
12300 , included in the corresponding packages.
12301 \end_layout
12302
12303 \begin_layout Subsection
12304 Preparing a paper for submission
12305 \end_layout
12306
12307 \begin_layout Standard
12308 Before you submit your paper you must export the LyX document as a LaTeX
12309  file (
12310 \family sans
12311 File\SpecialChar \menuseparator
12312 Export\SpecialChar \menuseparator
12313 LaTeX
12314 \family default
12315 )
12316 \begin_inset Foot
12317 status open
12318
12319 \begin_layout Plain Layout
12320 Actually you have the choice between LaTeX (plain) and pdflatex.
12321  If you intend to use pdflatex to prepare the paper, you should use the
12322  pdflatex option so that included graphics are converted to PDF format,
12323  ready for use by pdflatex.
12324 \end_layout
12325
12326 \end_inset
12327
12328 , then make the following changes to the resulting 
12329 \family typewriter
12330 .tex
12331 \family default
12332  file.
12333 \end_layout
12334
12335 \begin_layout Enumerate
12336 Remove the comment lines before the 
12337 \family typewriter
12338
12339 \backslash
12340 documentclass
12341 \family default
12342  command.
12343 \end_layout
12344
12345 \begin_layout Enumerate
12346 Remove everything between (and including) the 
12347 \family typewriter
12348
12349 \backslash
12350 makeatletter
12351 \family default
12352  and 
12353 \family typewriter
12354
12355 \backslash
12356 makeatother
12357 \family default
12358  commands, except for any commands you specifically put into the LaTeX preamble.
12359 \end_layout
12360
12361 \begin_layout Standard
12362 The modified 
12363 \family typewriter
12364 .tex
12365 \family default
12366  file should be saved and processed through LaTeX as many times as necessary.
12367  You may also want to check the resulting 
12368 \family typewriter
12369 .dvi
12370 \family default
12371  document.
12372 \end_layout
12373
12374 \begin_layout Subsection
12375 Use of TeX code
12376 \end_layout
12377
12378 \begin_layout Standard
12379 The use of TeX code is reduced to two commands, which must be placed at
12380  the top of the document.
12381  If you started writing your paper by using the 
12382 \family typewriter
12383 ijmpc.lyx
12384 \family default
12385  or the 
12386 \family typewriter
12387 ijmpd.lyx
12388 \family default
12389  template, the TeX code needed is already in its place; you usually don't
12390  need to delete it.
12391  You may only modify the first TeX code to specify the information printed
12392  to the top of odd and even pages (authors' names and short paper's title,
12393  respectively).
12394  This TeX code must have the form 
12395 \family typewriter
12396
12397 \backslash
12398 markboth{Authors' Names}{Short Paper's Title}
12399 \family default
12400 .
12401 \end_layout
12402
12403 \begin_layout Section
12404 iopart
12405 \end_layout
12406
12407 \begin_layout Standard
12408 by 
12409 \noun on
12410 Uwe Stöhr
12411 \end_layout
12412
12413 \begin_layout Subsection
12414 Overview
12415 \end_layout
12416
12417 \begin_layout Standard
12418 The iopart package provides a document class to create electronic manuscript
12419  submission to the journals published by the Institute of Physics.
12420  Instructions for the authors how to create a paper using the iopart class
12421  can be downloaded together with the iopart package from the site 
12422 \begin_inset Flex URL
12423 status collapsed
12424
12425 \begin_layout Plain Layout
12426
12427 ftp://ftp.iop.org/pub/journals/latex2e
12428 \end_layout
12429
12430 \end_inset
12431
12432 .
12433 \end_layout
12434
12435 \begin_layout Subsection
12436 Writing a paper
12437 \end_layout
12438
12439 \begin_layout Standard
12440 The easiest way to write a paper is to start with the file 
12441 \emph on
12442 IOP-article.lyx
12443 \emph default
12444  that is available in LyX's examples files folder.
12445  Open this file, save it under a new name, and start writing.
12446  The example file explains how to use the special text environments.
12447  Here are the most important advices:
12448 \end_layout
12449
12450 \begin_layout Itemize
12451 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12452  two options 
12453 \family sans
12454 Use AMS math package
12455 \family default
12456  in the document settings under 
12457 \family sans
12458 Math Options
12459 \family default
12460  are not used!
12461 \end_layout
12462
12463 \begin_layout Itemize
12464
12465 \size normal
12466 The title environment defines the kind of your paper.
12467  So use one of the following environments for the title:
12468 \end_layout
12469
12470 \begin_deeper
12471 \begin_layout Itemize
12472
12473 \family sans
12474 \size normal
12475 Title
12476 \family default
12477  for a Paper
12478 \end_layout
12479
12480 \begin_layout Itemize
12481
12482 \family sans
12483 \size normal
12484 Review
12485 \family default
12486  for a Review
12487 \end_layout
12488
12489 \begin_layout Itemize
12490
12491 \family sans
12492 \size normal
12493 Topical
12494 \family default
12495  for a Topical review
12496 \end_layout
12497
12498 \begin_layout Itemize
12499
12500 \family sans
12501 \size normal
12502 Comment
12503 \family default
12504  for a Comment
12505 \end_layout
12506
12507 \begin_layout Itemize
12508
12509 \family sans
12510 \size normal
12511 Note
12512 \family default
12513  for a Note
12514 \end_layout
12515
12516 \begin_layout Itemize
12517
12518 \family sans
12519 \size normal
12520 Paper
12521 \family default
12522  for a Paper (same as Title)
12523 \end_layout
12524
12525 \begin_layout Itemize
12526
12527 \family sans
12528 \size normal
12529 Prelim
12530 \family default
12531  for a Preliminary communication
12532 \end_layout
12533
12534 \begin_layout Itemize
12535
12536 \family sans
12537 \size normal
12538 Rapid
12539 \family default
12540  for a Rapid communication
12541 \end_layout
12542
12543 \begin_layout Itemize
12544
12545 \family sans
12546 \size normal
12547 Letter
12548 \family default
12549  for a Letter to the editor
12550 \end_layout
12551
12552 \end_deeper
12553 \begin_layout Itemize
12554
12555 \size normal
12556 All title environments except of 
12557 \family sans
12558 Letter
12559 \family default
12560  can have an optional short title.
12561 \end_layout
12562
12563 \begin_layout Itemize
12564 There is a general title environment 
12565 \family sans
12566 Article
12567 \family default
12568  which is not directly supported by the LyX.
12569  This can be used as TeX code when your document doesn't fit into one of
12570  the other title types.
12571 \end_layout
12572
12573 \begin_layout Standard
12574 For more informations like hints for special table and formula formatting,
12575  look at the IOP author guidelines.
12576 \end_layout
12577
12578 \begin_layout Section
12579 Kluwer
12580 \end_layout
12581
12582 \begin_layout Standard
12583 by 
12584 \noun on
12585 Panayotis Papasotiriou
12586 \end_layout
12587
12588 \begin_layout Subsection
12589 Overview
12590 \end_layout
12591
12592 \begin_layout Standard
12593 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12594  that facilitates electronic manuscript submission to the journals they
12595  publish.
12596  Most known of them (at least in my domain of interest) are 
12597 \emph on
12598 Astrophysics and Space Science
12599 \emph default
12600  and 
12601 \emph on
12602 Solar Physics
12603 \emph default
12604 , but there are many others (see a complete list at 
12605 \begin_inset Flex URL
12606 status open
12607
12608 \begin_layout Plain Layout
12609
12610 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12611 \end_layout
12612
12613 \end_inset
12614
12615 ).
12616  The Kluwer package may be downloaded from the site 
12617 \begin_inset Flex URL
12618 status collapsed
12619
12620 \begin_layout Plain Layout
12621
12622 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12623 \end_layout
12624
12625 \end_inset
12626
12627 .
12628  A complete user guide is contained in that package (but it can also be
12629  downloaded separately).
12630 \end_layout
12631
12632 \begin_layout Standard
12633 LyX supports many features of the package but not everything.
12634  However, the TeX code needed is reduced to some 
12635 \begin_inset Quotes eld
12636 \end_inset
12637
12638 peculiar
12639 \begin_inset Quotes erd
12640 \end_inset
12641
12642  commands of the package (see
12643 \begin_inset space ~
12644 \end_inset
12645
12646
12647 \begin_inset CommandInset ref
12648 LatexCommand ref
12649 reference "subsec:kluwer_peculiarities"
12650
12651 \end_inset
12652
12653 ).
12654  I have recently used LyX to write an article submitted to the 
12655 \emph on
12656 Astrophysics and Space Science
12657 \emph default
12658  without any problem.
12659 \end_layout
12660
12661 \begin_layout Subsection
12662 Writing a paper
12663 \end_layout
12664
12665 \begin_layout Standard
12666 The easiest way to write a paper is to start with the Kluwer template file.
12667  Click on 
12668 \family sans
12669 File\SpecialChar \menuseparator
12670 New from
12671 \family default
12672  
12673 \family sans
12674 Template
12675 \family default
12676 , then choose the 
12677 \family typewriter
12678 kluwer.lyx
12679 \family default
12680  template.
12681  This will give an (almost) empty document that includes the most common
12682  fields found in a manuscript and a short description of their use.
12683  As in most templates, simply overwrite the existing text (including the
12684  brackets, 
12685 \family typewriter
12686 <>
12687 \family default
12688 ) with the correct information.
12689 \end_layout
12690
12691 \begin_layout Subsection
12692 Preparing a paper for submission
12693 \end_layout
12694
12695 \begin_layout Standard
12696 As in the AASTeX package, before you submit your paper to a journal you
12697  must 
12698 \begin_inset Quotes eld
12699 \end_inset
12700
12701 postprocess
12702 \begin_inset Quotes erd
12703 \end_inset
12704
12705  it as follows.
12706 \end_layout
12707
12708 \begin_layout Enumerate
12709 Export your paper as a LaTeX file.
12710  To do this, click on 
12711 \family sans
12712 File\SpecialChar \menuseparator
12713 Export\SpecialChar \menuseparator
12714 LaTeX
12715 \family default
12716 .
12717  
12718 \end_layout
12719
12720 \begin_layout Enumerate
12721 Edit the resulting 
12722 \family typewriter
12723 .tex
12724 \family default
12725  file with a text editor and make the following changes
12726 \end_layout
12727
12728 \begin_deeper
12729 \begin_layout Enumerate
12730 remove the comment lines before the 
12731 \family typewriter
12732
12733 \backslash
12734 documentclass
12735 \family default
12736  command,
12737 \end_layout
12738
12739 \begin_layout Enumerate
12740 remove everything between (and including) the 
12741 \family typewriter
12742
12743 \backslash
12744 makeatletter
12745 \family default
12746  and 
12747 \family typewriter
12748
12749 \backslash
12750 makeatother
12751 \family default
12752  commands, except for any commands you specifically put into the LaTeX preamble.
12753 \end_layout
12754
12755 \begin_layout Standard
12756 Save the resulting 
12757 \family typewriter
12758 .tex
12759 \family default
12760  file.
12761 \end_layout
12762
12763 \end_deeper
12764 \begin_layout Enumerate
12765 Run the 
12766 \family typewriter
12767 .tex
12768 \family default
12769  file through LaTeX as many times as necessary (usually up to three).
12770 \end_layout
12771
12772 \begin_layout Enumerate
12773 View the resulting 
12774 \family typewriter
12775 .dvi
12776 \family default
12777  document using, e.
12778 \begin_inset space \thinspace{}
12779 \end_inset
12780
12781 g.
12782 \begin_inset space \space{}
12783 \end_inset
12784
12785
12786 \family sans
12787 xdvi
12788 \family default
12789 , and check if everything is OK (it should, if you didn't make any mistake).
12790 \end_layout
12791
12792 \begin_layout Subsection
12793 \begin_inset Quotes eld
12794 \end_inset
12795
12796 Peculiarities
12797 \begin_inset Quotes erd
12798 \end_inset
12799
12800  of the Kluwer package
12801 \begin_inset CommandInset label
12802 LatexCommand label
12803 name "subsec:kluwer_peculiarities"
12804
12805 \end_inset
12806
12807
12808 \end_layout
12809
12810 \begin_layout Standard
12811 The Kluwer package has the following 
12812 \begin_inset Quotes eld
12813 \end_inset
12814
12815 peculiarities
12816 \begin_inset Quotes erd
12817 \end_inset
12818
12819 .
12820 \end_layout
12821
12822 \begin_layout Enumerate
12823 It is possible to write multiple articles in the same LaTeX file
12824 \begin_inset Foot
12825 status collapsed
12826
12827 \begin_layout Plain Layout
12828 I can't imagine any good reason to do this.
12829 \end_layout
12830
12831 \end_inset
12832
12833 .
12834  Each article must be included in the environment 
12835 \begin_inset Quotes eld
12836 \end_inset
12837
12838 article
12839 \begin_inset Quotes erd
12840 \end_inset
12841
12842 .
12843  Unfortunately, this environment cannot be omitted, even if you write just
12844  one article.
12845  Therefore, each article starts with the command 
12846 \family typewriter
12847
12848 \backslash
12849 begin{article}
12850 \family default
12851  and, obviously, ends with the command 
12852 \family typewriter
12853
12854 \backslash
12855 end{article}
12856 \family default
12857 .
12858  Although this can be implemented in LyX, I didn't included it, since it
12859  looks ugly and can confuse the novice user.
12860  Therefore, you need to enter them directly and mark them as LaTeX code
12861  (the well-known 
12862 \begin_inset Quotes eld
12863 \end_inset
12864
12865 TeX code
12866 \begin_inset Quotes erd
12867 \end_inset
12868
12869 ).
12870 \end_layout
12871
12872 \begin_layout Enumerate
12873 Information given at the beginning of the article (i.
12874 \begin_inset space \thinspace{}
12875 \end_inset
12876
12877 e.
12878 \begin_inset space \space{}
12879 \end_inset
12880
12881 title, subtitle, author, institution, running title, running author, abstract
12882  and keywords) must be included in an environment called 
12883 \begin_inset Quotes eld
12884 \end_inset
12885
12886 opening
12887 \begin_inset Quotes erd
12888 \end_inset
12889
12890 .
12891  This is not implemented in LyX, so you must enter title, subtitle etc.
12892 \begin_inset space ~
12893 \end_inset
12894
12895 between two TeX code lines (
12896 \family typewriter
12897
12898 \backslash
12899 begin{opening}
12900 \family default
12901  and 
12902 \family typewriter
12903
12904 \backslash
12905 end{opening}
12906 \family default
12907 ).
12908 \end_layout
12909
12910 \begin_layout Enumerate
12911 According to the user manual, the label of each bibliography item must be
12912  written as 
12913 \family typewriter
12914
12915 \backslash
12916 protect
12917 \backslash
12918 citeauthoryear{
12919 \family default
12920 \emph on
12921 author(s)
12922 \family typewriter
12923 \emph default
12924 }{
12925 \family default
12926 \emph on
12927 year
12928 \family typewriter
12929 \emph default
12930 }
12931 \family default
12932 .
12933 \end_layout
12934
12935 \begin_layout Standard
12936 The 
12937 \family typewriter
12938 kluwer.lyx
12939 \family default
12940  template takes care of all these 
12941 \begin_inset Quotes eld
12942 \end_inset
12943
12944 peculiarities
12945 \begin_inset Quotes erd
12946 \end_inset
12947
12948 .
12949  If you start a new paper using this template you don't need to do anything
12950  special.
12951  Just 
12952 \end_layout
12953
12954 \begin_layout Enumerate
12955 don't delete the TeX code included in the template, and
12956 \end_layout
12957
12958 \begin_layout Enumerate
12959 copy the example bibliography item included in the template and modify it
12960  as necessary to enter new bibliography items.
12961 \end_layout
12962
12963 \begin_layout Section
12964 Koma-Script
12965 \end_layout
12966
12967 \begin_layout Standard
12968 by 
12969 \noun on
12970 Bernd Rellermeyer
12971 \end_layout
12972
12973 \begin_layout Subsection
12974 Overview
12975 \end_layout
12976
12977 \begin_layout Standard
12978 The LyX document classes 
12979 \emph on
12980 article (koma-script)
12981 \emph default
12982
12983 \emph on
12984 report (koma-script)
12985 \emph default
12986
12987 \emph on
12988 book
12989 \emph default
12990  
12991 \emph on
12992 (koma-script)
12993 \emph default
12994 , and 
12995 \emph on
12996 letter
12997 \emph default
12998  
12999 \emph on
13000 (koma-script)
13001 \emph default
13002  correspond to the LaTeX document classes 
13003 \family typewriter
13004 scrartcl.cls
13005 \family default
13006
13007 \family typewriter
13008 scrreprt.cls
13009 \family default
13010
13011 \family typewriter
13012 scrbook.cls
13013 \family default
13014 , and 
13015 \family typewriter
13016 scrlettr.cls
13017 \family default
13018 , resp.
13019 \begin_inset space ~
13020 \end_inset
13021
13022 of the Koma-Script family.
13023  They are replacements for the standard document classes 
13024 \family typewriter
13025 article.cls
13026 \family default
13027
13028 \family typewriter
13029 report.cls
13030 \family default
13031
13032 \family typewriter
13033 book.cls
13034 \family default
13035  and 
13036 \family typewriter
13037 letter.cls
13038 \family default
13039 , resp., and fit better to European typography conventions in a number of
13040  points.
13041 \end_layout
13042
13043 \begin_layout Itemize
13044 Standard character size is 11pt in 
13045 \emph on
13046 article (koma-script)
13047 \emph default
13048
13049 \emph on
13050 report (koma-script)
13051 \emph default
13052 , and 
13053 \emph on
13054 book (koma-script)
13055 \emph default
13056 , and 12pt in 
13057 \emph on
13058 letter (koma-script)
13059 \emph default
13060 .
13061 \end_layout
13062
13063 \begin_layout Itemize
13064 Headings, labels of the description environment, and a number of elements
13065  of the 
13066 \emph on
13067 letter (koma-script)
13068 \emph default
13069  document class are set in a bold sans serif font.
13070 \begin_inset Foot
13071 status collapsed
13072
13073 \begin_layout Plain Layout
13074 There is a big difference between the bold sans serif old cm fonts and new
13075  ec fonts, especially in the appearance of headings.
13076  In comparison, the ec bold sans serif fonts look a bit thin.
13077  Here the LaTeX package 
13078 \family typewriter
13079 cmsd.sty by
13080 \family default
13081  
13082 \shape smallcaps
13083 Walter Schmidt
13084 \shape default
13085  helps to produce the 
13086 \begin_inset Quotes eld
13087 \end_inset
13088
13089 usual
13090 \begin_inset Quotes erd
13091 \end_inset
13092
13093  appearance when using the ec fonts.
13094 \end_layout
13095
13096 \end_inset
13097
13098  The numbering of chapter headings is made in the same way as the numbering
13099  of section headings, that is without the extra line 
13100 \begin_inset Quotes eld
13101 \end_inset
13102
13103 Chapter\SpecialChar \ldots{}
13104
13105 \begin_inset Quotes erd
13106 \end_inset
13107
13108 .
13109  In addition, the appearance of the headings can be modified by using a
13110  number of options (in LyX to be entered in the field 
13111 \family sans
13112 Extra
13113 \begin_inset space ~
13114 \end_inset
13115
13116 Options
13117 \family default
13118  of the dialog 
13119 \family sans
13120 Layout\SpecialChar \menuseparator
13121 Document
13122 \family default
13123 ).
13124  
13125 \end_layout
13126
13127 \begin_layout Itemize
13128 The main means in the Koma-Script document classes to design the type area
13129  are the options 
13130 \family sans
13131 BCOR
13132 \family default
13133  and 
13134 \family sans
13135 DIV
13136 \family default
13137  (in LyX to be entered in the extra class options field in the dialog 
13138 \family sans
13139 Document\SpecialChar \menuseparator
13140 Settings
13141 \family default
13142 ).
13143  They make a clearer modification of page margins possible as do the options
13144  of the dialog 
13145 \family sans
13146 Document\SpecialChar \menuseparator
13147 Settings
13148 \family default
13149 .
13150  
13151 \end_layout
13152
13153 \begin_layout Itemize
13154 The LaTeX document classes of the Koma-Script family define a number of
13155  additional commands.
13156  Those part of it which makes sense in LyX is implemented in corresponding
13157  paragraph types.
13158 \end_layout
13159
13160 \begin_layout Standard
13161 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13162  can be found in the Koma-Script documentation 
13163 \emph on
13164 scrguide
13165 \emph default
13166  (German) and 
13167 \emph on
13168 scrguien
13169 \emph default
13170  (English).
13171 \end_layout
13172
13173 \begin_layout Subsection
13174 article (koma-script), report (koma-script), and book (koma-script)
13175 \end_layout
13176
13177 \begin_layout Standard
13178 The document classes 
13179 \emph on
13180 article (koma-script)
13181 \emph default
13182
13183 \emph on
13184 report (koma-script)
13185 \emph default
13186 , and 
13187 \emph on
13188 book
13189 \emph default
13190  
13191 \emph on
13192 (koma-script)
13193 \emph default
13194  are implemented in the layout files 
13195 \family typewriter
13196 scrartcl.layout
13197 \family default
13198
13199 \family typewriter
13200 scrreprt.layout
13201 \family default
13202 , and 
13203 \family typewriter
13204 scrbook.layout
13205 \family default
13206 , resp.
13207  They contain all the paragraph types of the corresponding standard document
13208  classes 
13209 \emph on
13210 article
13211 \emph default
13212
13213 \emph on
13214 report
13215 \emph default
13216 , and 
13217 \emph on
13218 book
13219 \emph default
13220 , resp., partly modified, with the exception of the LyX specific 
13221 \family sans
13222 List
13223 \family default
13224 -type, which is replaced by the new 
13225 \family sans
13226 Labeling
13227 \family default
13228 -type having the same functionality.
13229  Beside the 
13230 \family sans
13231 Labeling
13232 \family default
13233 -Type there is a number of new paragraph types added.
13234  They are 
13235 \emph on
13236 not
13237 \emph default
13238  part of 
13239 \emph on
13240 letter (koma-script)
13241 \emph default
13242 .
13243 \end_layout
13244
13245 \begin_layout Itemize
13246
13247 \family sans
13248 Addpart, Addchap
13249 \family default
13250
13251 \family sans
13252 Addsec
13253 \family default
13254 : are equivalents to 
13255 \family sans
13256 Part*, Chapter*
13257 \family default
13258  and 
13259 \family sans
13260 Section*
13261 \family default
13262 , resp., additionally inserting an entry in the table of contents.
13263  
13264 \family sans
13265 Addpart
13266 \family default
13267  and 
13268 \family sans
13269 Addchap
13270 \family default
13271  are not contained in 
13272 \emph on
13273 article (koma-script)
13274 \emph default
13275 .
13276 \end_layout
13277
13278 \begin_layout Itemize
13279
13280 \family sans
13281 Addchap*
13282 \family default
13283
13284 \family sans
13285 Addsec*
13286 \family default
13287 : behave exactly as 
13288 \family sans
13289 Addchap
13290 \family default
13291  and 
13292 \family sans
13293 Addsec
13294 \family default
13295 , resp., additionally clearing running heads.
13296  
13297 \family sans
13298 Addchap*
13299 \family default
13300  is not contained in 
13301 \emph on
13302 article (koma-script)
13303 \emph default
13304 .
13305 \begin_inset Foot
13306 status collapsed
13307
13308 \begin_layout Plain Layout
13309 There is also an 
13310 \family typewriter
13311
13312 \backslash
13313 addpart*
13314 \family default
13315  command in 
13316 \emph on
13317 book (koma-script)
13318 \emph default
13319  and in 
13320 \emph on
13321 report (koma-script)
13322 \emph default
13323 , but since this is identical to 
13324 \family sans
13325 Part*
13326 \family default
13327 , is has not been implemented in LyX.
13328 \end_layout
13329
13330 \end_inset
13331
13332
13333 \end_layout
13334
13335 \begin_layout Itemize
13336
13337 \family sans
13338 Minisec
13339 \family default
13340 : generates a heading directly above the following paragraph in the standard
13341  character size without affecting the structure of the document.
13342 \end_layout
13343
13344 \begin_layout Itemize
13345
13346 \family sans
13347 Captionabove
13348 \family default
13349  and 
13350 \family sans
13351 Captionbelow
13352 \family default
13353  are special captions which respect the different space settings needed
13354  for captions placed above or below an element (if you follow strict typographic
13355  rules, you might want to place table captions always above the table).
13356  You can also use the class option 
13357 \family typewriter
13358 tablecaptionsabove
13359 \family default
13360 , which will switch 
13361 \family sans
13362 caption
13363 \family default
13364  to 
13365 \family sans
13366 captionabove
13367 \family default
13368  for tables and 
13369 \family sans
13370 captionbelow
13371 \family default
13372  for figures.
13373  You need at least Koma-Script version 2.8q to use this.
13374 \end_layout
13375
13376 \begin_layout Itemize
13377
13378 \family sans
13379 Dictum
13380 \family default
13381 : can be used to set a bonmot, e.
13382 \begin_inset space \thinspace{}
13383 \end_inset
13384
13385 g.
13386 \begin_inset space \space{}
13387 \end_inset
13388
13389 at the beginning of a chapter.
13390  If you use the optional argument (
13391 \family sans
13392 Insert\SpecialChar \menuseparator
13393 Short
13394 \begin_inset space ~
13395 \end_inset
13396
13397 Title
13398 \family default
13399 ), you can insert the dictum's author there.
13400  Dictum and author are separated by a line.
13401  You need at least Koma-Script version 2.8q to use this.
13402  
13403 \family sans
13404 Dictum
13405 \family default
13406  is not contained in 
13407 \emph on
13408 article (koma-script)
13409 \emph default
13410 .
13411 \end_layout
13412
13413 \begin_layout Standard
13414 The following types, together with the standard types 
13415 \family sans
13416 Title
13417 \family default
13418
13419 \family sans
13420 Author
13421 \family default
13422 , and 
13423 \family sans
13424 Date
13425 \family default
13426 , form the title area of the document.
13427  They must be entered ahead of the first 
13428 \begin_inset Quotes eld
13429 \end_inset
13430
13431 ordinary
13432 \begin_inset Quotes erd
13433 \end_inset
13434
13435  paragraph.
13436 \begin_inset Foot
13437 status collapsed
13438
13439 \begin_layout Plain Layout
13440 The corresponding LaTeX commands must appear before the 
13441 \family typewriter
13442
13443 \backslash
13444 maketitle
13445 \family default
13446  command.
13447 \end_layout
13448
13449 \end_inset
13450
13451  When such a type is used more than once, the latter usage overwrites the
13452  former one, that means, for every type only the latest usage is valid.
13453  The order of the different types however has, like 
13454 \family sans
13455 Title
13456 \family default
13457
13458 \family sans
13459 Author
13460 \family default
13461 , and 
13462 \family sans
13463 Date
13464 \family default
13465 , no effect on the appearance of the produced document.
13466 \end_layout
13467
13468 \begin_layout Itemize
13469
13470 \family sans
13471 Subject
13472 \family default
13473 : produces a centered paragraph above the ordinary title (
13474 \family sans
13475 Title
13476 \family default
13477
13478 \family sans
13479 Author
13480 \family default
13481
13482 \family sans
13483 Date
13484 \family default
13485 ) for the subject of the document.
13486 \end_layout
13487
13488 \begin_layout Itemize
13489
13490 \family sans
13491 Publishers
13492 \family default
13493 : produces a centered paragraph below the ordinary title (
13494 \family sans
13495 Title
13496 \family default
13497
13498 \family sans
13499 Author
13500 \family default
13501
13502 \family sans
13503 Date
13504 \family default
13505 ) for the publishers' name.
13506 \end_layout
13507
13508 \begin_layout Itemize
13509
13510 \family sans
13511 Dedication
13512 \family default
13513 : in 
13514 \emph on
13515 report (koma-script)
13516 \emph default
13517  and 
13518 \emph on
13519 book (koma-script)
13520 \emph default
13521  produces a centered paragraph on its own page behind the title page, or
13522  in 
13523 \emph on
13524 article (koma-script)
13525 \emph default
13526  produces a centered paragraph below the ordinary title (
13527 \family sans
13528 Title
13529 \family default
13530
13531 \family sans
13532 Author
13533 \family default
13534
13535 \family sans
13536 Date
13537 \family default
13538
13539 \family sans
13540 Publishers
13541 \family default
13542 ) for a dedication.
13543 \end_layout
13544
13545 \begin_layout Itemize
13546
13547 \family sans
13548 Titlehead
13549 \family default
13550 : produces a left aligned paragraph above the ordinary title (
13551 \family sans
13552 Title
13553 \family default
13554
13555 \family sans
13556 Author
13557 \family default
13558
13559 \family sans
13560 Date
13561 \family default
13562
13563 \family sans
13564 Subject
13565 \family default
13566 ) for a document`s head.
13567 \end_layout
13568
13569 \begin_layout Itemize
13570
13571 \family sans
13572 Uppertitleback
13573 \family default
13574 : produces in a double-sided print in 
13575 \emph on
13576 report (koma-script)
13577 \emph default
13578  and 
13579 \emph on
13580 book (koma-script)
13581 \emph default
13582  a left-aligned paragraph at the top of the title page`s back or has no
13583  effect in a single-sided print or in 
13584 \emph on
13585 article (koma-script)
13586 \emph default
13587 .
13588 \end_layout
13589
13590 \begin_layout Itemize
13591
13592 \family sans
13593 Lowertitleback
13594 \family default
13595 : produces in a double-sided print in 
13596 \emph on
13597 report (koma-script)
13598 \emph default
13599  and 
13600 \emph on
13601 book (koma-script)
13602 \emph default
13603  a left-aligned paragraph at the bottom of the title page`s back or has
13604  no effect in a single-sided print or in 
13605 \emph on
13606 article (koma-script)
13607 \emph default
13608 .
13609 \end_layout
13610
13611 \begin_layout Itemize
13612
13613 \family sans
13614 Extratitle
13615 \family default
13616 : produces a special 
13617 \begin_inset Quotes eld
13618 \end_inset
13619
13620 dirty
13621 \begin_inset Quotes erd
13622 \end_inset
13623
13624  page ahead of the actual document containing a paragraph without special
13625  formatting.
13626 \end_layout
13627
13628 \begin_layout Standard
13629 The layout files for the document classes 
13630 \emph on
13631 article (koma-script)
13632 \emph default
13633
13634 \emph on
13635 report (koma-script)
13636 \emph default
13637 , and 
13638 \emph on
13639 book (koma-script)
13640 \emph default
13641  do include the file 
13642 \family typewriter
13643 scrmacros.inc
13644 \family default
13645 .
13646  This is thought of as a place to define your own types.
13647  Copy scrmacros
13648 \family typewriter
13649 .inc
13650 \family default
13651  in your personal layout directory and edit the file!
13652 \end_layout
13653
13654 \begin_layout Subsection
13655 letter (koma-script)
13656 \end_layout
13657
13658 \begin_layout Standard
13659 \noindent
13660 The document class 
13661 \emph on
13662 letter (koma-script)
13663 \emph default
13664  is implemented in the layout file 
13665 \family typewriter
13666 scrlettr.layout
13667 \family default
13668 .
13669  It contains all the paragraph types of the corresponding standard document
13670  class 
13671 \emph on
13672 letter
13673 \emph default
13674 , partly modified, with the exception of the LyX specific types 
13675 \family sans
13676 LyX-Code
13677 \family default
13678  and 
13679 \family sans
13680 Comment
13681 \family default
13682  and the 
13683 \family sans
13684 List
13685 \family default
13686  type, which is replaced by the new 
13687 \family sans
13688 Labeling
13689 \family default
13690  type.
13691  In addition, it contains, in contrast to the standard document class, the
13692  standard types 
13693 \family sans
13694 LaTeX
13695 \family default
13696
13697 \family sans
13698 Quotation
13699 \family default
13700
13701 \family sans
13702 Quote
13703 \family default
13704 , and 
13705 \family sans
13706 Verse
13707 \family default
13708 .
13709  Furthermore, there are a number of new letter specific types.
13710 \end_layout
13711
13712 \begin_layout Standard
13713 The appearance of the letter produced by this document class can be controlled
13714  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13715 \begin_inset Foot
13716 status collapsed
13717
13718 \begin_layout Plain Layout
13719 For example, the standard appearance of the letter`s heading, consisting
13720  of name and address, is quite self-willed.
13721  An 
13722 \begin_inset Quotes eld
13723 \end_inset
13724
13725 ordinary
13726 \begin_inset Quotes erd
13727 \end_inset
13728
13729  heading is produced by the following LaTeX commands in the preamble:
13730 \end_layout
13731
13732 \begin_layout LyX-Code
13733
13734 \backslash
13735 firsthead{
13736 \backslash
13737 parbox[b]{
13738 \backslash
13739 textwidth}
13740 \end_layout
13741
13742 \begin_layout LyX-Code
13743   {
13744 \backslash
13745 ignorespaces 
13746 \backslash
13747 fromname
13748 \backslash
13749
13750 \backslash
13751  
13752 \backslash
13753 ignorespaces 
13754 \backslash
13755 fromaddress}} 
13756 \end_layout
13757
13758 \begin_layout LyX-Code
13759
13760 \backslash
13761 nexthead{
13762 \backslash
13763 parbox[b]{
13764 \backslash
13765 textwidth}
13766 \end_layout
13767
13768 \begin_layout LyX-Code
13769   {
13770 \backslash
13771 ignorespaces 
13772 \backslash
13773 fromname 
13774 \backslash
13775 hfill 
13776 \backslash
13777 ignorespaces 
13778 \backslash
13779 pagename
13780 \backslash
13781  
13782 \backslash
13783 thepage}}
13784 \end_layout
13785
13786 \end_inset
13787
13788  A detailed German description of such LaTeX commands can be found in the
13789  Koma-Script documentation 
13790 \emph on
13791 scrguide
13792 \emph default
13793 .
13794  With it, the letter's author can produce his personal letter layout.
13795 \end_layout
13796
13797 \begin_layout Standard
13798 The types 
13799 \family sans
13800 Letter
13801 \family default
13802  and 
13803 \family sans
13804 Opening
13805 \family default
13806  define the beginning of the letter and must be used in every letter.
13807  To emphasize them in the LyX document class, they are marked with the letter
13808  
13809 \shape italic
13810 L
13811 \shape default
13812  or 
13813 \shape italic
13814 O
13815 \shape default
13816 , resp.
13817 \begin_inset space ~
13818 \end_inset
13819
13820 in the left margin.
13821  It is possible to write any number of letters in one file.
13822  An 
13823 \family sans
13824 Opening
13825 \family default
13826  type produces a new letter using the same addressee and a 
13827 \family sans
13828 Letter
13829 \family default
13830  type produces a new addressee.
13831  The types 
13832 \family sans
13833 Closing
13834 \family default
13835
13836 \family sans
13837 PS
13838 \family default
13839
13840 \family sans
13841 CC
13842 \family default
13843 , and 
13844 \family sans
13845 Encl
13846 \family default
13847  are ordinary paragraph types and can also be used several times in one
13848  and the same letter.
13849 \end_layout
13850
13851 \begin_layout Itemize
13852
13853 \family sans
13854 Letter
13855 \family default
13856 : produces a paragraph for the addressee and implicitly defines the beginning
13857  of the letter.
13858 \end_layout
13859
13860 \begin_layout Itemize
13861
13862 \family sans
13863 Opening
13864 \family default
13865 : produces a paragraph for the form of address and implicitly produces a
13866  new letter.
13867 \end_layout
13868
13869 \begin_layout Itemize
13870
13871 \family sans
13872 Closing
13873 \family default
13874 : produces a paragraph for a close.
13875 \end_layout
13876
13877 \begin_layout Itemize
13878
13879 \family sans
13880 PS
13881 \family default
13882 : produces a paragraph for a postscript.
13883 \end_layout
13884
13885 \begin_layout Itemize
13886
13887 \family sans
13888 CC
13889 \family default
13890 : produces a paragraph for a distribution list.
13891 \end_layout
13892
13893 \begin_layout Itemize
13894
13895 \family sans
13896 Encl
13897 \family default
13898 : produces a paragraph for enclosures.
13899 \end_layout
13900
13901 \begin_layout Standard
13902 The types 
13903 \family sans
13904 Name
13905 \family default
13906
13907 \family sans
13908 Signature
13909 \family default
13910
13911 \family sans
13912 Address
13913 \family default
13914
13915 \family sans
13916 Telephone
13917 \family default
13918
13919 \family sans
13920 Place
13921 \family default
13922
13923 \family sans
13924 Backaddress
13925 \family default
13926
13927 \family sans
13928 Specialmail
13929 \family default
13930
13931 \family sans
13932 Location
13933 \family default
13934
13935 \family sans
13936 Title
13937 \family default
13938 , and 
13939 \family sans
13940 Subject
13941 \family default
13942  are input types provided with a label to enter information, which will
13943  be processed by the document class.
13944 \begin_inset Foot
13945 status open
13946
13947 \begin_layout Plain Layout
13948 It could be seen as a matter of inconsequence, that the types 
13949 \family sans
13950 Letter
13951 \family default
13952  and 
13953 \family sans
13954 Opening
13955 \family default
13956  described above are not such input types as well.
13957  Because of the special meaning of those types, however, I have implemented
13958  them as ordinary paragraph types with a one letter mark in the left margin.
13959  Moreover, it would affect my feeling of symmetry, if the 
13960 \family sans
13961 Opening
13962 \family default
13963  type and the 
13964 \family sans
13965 Closing
13966 \family default
13967  type had such a serious different appearance.
13968 \end_layout
13969
13970 \end_inset
13971
13972  The types must be used ahead of the corresponding 
13973 \family sans
13974 Opening
13975 \family default
13976  type.
13977 \end_layout
13978
13979 \begin_layout Standard
13980 An implementation of these types in a WYSIWYG fashion does not seem to make
13981  sense, because the real appearance of the produced letter does not only
13982  depend on the usage of the particular type, but also on other factors.
13983  For example, a signature entered in the 
13984 \family sans
13985 Signature
13986 \family default
13987  type will in the standard behavior appear in the produced letter only,
13988  when in the same letter also a 
13989 \family sans
13990 Closing
13991 \family default
13992  type is used.
13993  The entered value of the 
13994 \family sans
13995 Telephone
13996 \family default
13997  type will in the standard behavior not appear in the produced letter at
13998  all.
13999  The possibility to design the letter`s heading freely is already indicated
14000  in a footnote above.
14001 \end_layout
14002
14003 \begin_layout Standard
14004 The input types can also be used as empty paragraphs.
14005  This makes sense e.
14006 \begin_inset space \thinspace{}
14007 \end_inset
14008
14009 g.
14010 \begin_inset space \space{}
14011 \end_inset
14012
14013 for the 
14014 \family sans
14015 Signature
14016 \family default
14017  type.
14018  If the 
14019 \family sans
14020 Signature
14021 \family default
14022  type is not used at all, in the standard behavior the value of the 
14023 \family sans
14024 Name
14025 \family default
14026  type is used as signature, whereas if an empty 
14027 \family sans
14028 Signature
14029 \family default
14030  type is used, no signature value is defined.
14031 \end_layout
14032
14033 \begin_layout Standard
14034 By using the input types it is possible to write a letter template, containing
14035  filled input types with your personal dates (name, address, etc.) and empty
14036  input types for other dates you want to enter.
14037 \end_layout
14038
14039 \begin_layout Itemize
14040
14041 \family sans
14042 Name
14043 \family default
14044 : sender's name, in the standard behavior appears as a centered paragraph
14045  in small caps in the letter`s heading.
14046 \end_layout
14047
14048 \begin_layout Itemize
14049
14050 \family sans
14051 Signature
14052 \family default
14053 : sender's signature, in the standard behavior appears below the 
14054 \family sans
14055 Closing
14056 \family default
14057  type.
14058  If no 
14059 \family sans
14060 Signature
14061 \family default
14062  type is used, the value of the 
14063 \family sans
14064 Name
14065 \family default
14066  type appears instead.
14067 \end_layout
14068
14069 \begin_layout Itemize
14070
14071 \family sans
14072 Address
14073 \family default
14074 : sender's address, in the standard behavior appears in a centered paragraph
14075  in the letter`s heading below the sender's name.
14076 \end_layout
14077
14078 \begin_layout Itemize
14079
14080 \family sans
14081 Telephone
14082 \family default
14083 : sender's telephone number, in the standard behavior only sets the LaTeX
14084  variable 
14085 \family typewriter
14086
14087 \backslash
14088 telephonenum
14089 \family default
14090 .
14091 \end_layout
14092
14093 \begin_layout Itemize
14094
14095 \family sans
14096 Place
14097 \family default
14098 : place of the letter`s making.
14099 \end_layout
14100
14101 \begin_layout Itemize
14102
14103 \family sans
14104 Date
14105 \family default
14106 : date of the letter`s making.
14107  
14108 \family sans
14109 Place
14110 \family default
14111  and 
14112 \family sans
14113 Date
14114 \family default
14115 , in the standard behavior, produce the place and the date in a right-aligned
14116  line below the addressee's field.
14117  If an empty 
14118 \family sans
14119 Date
14120 \family default
14121  type is used, neither place nor date appear, independent of the value of
14122  the 
14123 \family sans
14124 Place
14125 \family default
14126  type.
14127  If no 
14128 \family sans
14129 Date
14130 \family default
14131  type is used, the date of the letter `s production is used.
14132 \end_layout
14133
14134 \begin_layout Itemize
14135
14136 \family sans
14137 Backaddress
14138 \family default
14139 : sender`s back address, in the standard behavior appears above the addressee's
14140  field in a small sans serif font.
14141 \end_layout
14142
14143 \begin_layout Itemize
14144
14145 \family sans
14146 Specialmail
14147 \family default
14148 : special mail information, in the standard behavior appears underlined
14149  above the addressee's field below the back address.
14150 \end_layout
14151
14152 \begin_layout Itemize
14153
14154 \family sans
14155 Location
14156 \family default
14157 : additional information, in the standard behavior appears on right side
14158  below the addressee`s field.
14159 \end_layout
14160
14161 \begin_layout Itemize
14162
14163 \family sans
14164 Title
14165 \family default
14166 : the letter's title, in the standard behavior appears in a big, bold, sans
14167  serif font above the subject.
14168 \end_layout
14169
14170 \begin_layout Itemize
14171
14172 \family sans
14173 Subject
14174 \family default
14175 : the letter's subject, in the standard behavior appears in a bold font
14176  above the 
14177 \family sans
14178 Opening
14179 \family default
14180  paragraph.
14181 \end_layout
14182
14183 \begin_layout Standard
14184 The types 
14185 \family sans
14186 Yourref
14187 \family default
14188
14189 \family sans
14190 Yourmail
14191 \family default
14192
14193 \family sans
14194 Myref
14195 \family default
14196
14197 \family sans
14198 Customer
14199 \family default
14200 , and 
14201 \family sans
14202 Invoice
14203 \family default
14204  produce a business letter like line above the 
14205 \family sans
14206 Title
14207 \family default
14208  line containing the fields 
14209 \begin_inset Quotes eld
14210 \end_inset
14211
14212 Your ref.
14213 \begin_inset Quotes erd
14214 \end_inset
14215
14216
14217 \begin_inset Quotes eld
14218 \end_inset
14219
14220 Your letter of
14221 \begin_inset Quotes erd
14222 \end_inset
14223
14224
14225 \begin_inset Quotes eld
14226 \end_inset
14227
14228 Our ref.
14229 \begin_inset Quotes erd
14230 \end_inset
14231
14232
14233 \begin_inset Quotes eld
14234 \end_inset
14235
14236 Customer no.
14237 \begin_inset Quotes erd
14238 \end_inset
14239
14240
14241 \begin_inset Quotes eld
14242 \end_inset
14243
14244 Invoice no.
14245 \begin_inset Quotes erd
14246 \end_inset
14247
14248 , and 
14249 \begin_inset Quotes eld
14250 \end_inset
14251
14252 Date
14253 \begin_inset Quotes erd
14254 \end_inset
14255
14256 .
14257  For the date field, the value of the 
14258 \family sans
14259 Date
14260 \family default
14261  type is used.
14262  If one of these 
14263 \begin_inset Quotes eld
14264 \end_inset
14265
14266 business letter types
14267 \begin_inset Quotes erd
14268 \end_inset
14269
14270  is used, the value of the 
14271 \family sans
14272 Place
14273 \family default
14274  type however does not appear, but only the LaTeX variable 
14275 \family typewriter
14276
14277 \backslash
14278 fromplace
14279 \family default
14280  is set.
14281  The ordinary output of place and date in a right-aligned line below the
14282  addressee`s field is suppressed.
14283  The types are implemented as input types provided with a label and must
14284  be used ahead of the corresponding 
14285 \family sans
14286 Opening
14287 \family default
14288  type.
14289 \end_layout
14290
14291 \begin_layout Itemize
14292
14293 \family sans
14294 Yourref
14295 \family default
14296 : Your ref.
14297 \end_layout
14298
14299 \begin_layout Itemize
14300
14301 \family sans
14302 Yourmail
14303 \family default
14304 : Your letter of.
14305 \end_layout
14306
14307 \begin_layout Itemize
14308
14309 \family sans
14310 Myref
14311 \family default
14312 : Our ref.
14313 \end_layout
14314
14315 \begin_layout Itemize
14316
14317 \family sans
14318 Customer
14319 \family default
14320 : Customer no.
14321 \end_layout
14322
14323 \begin_layout Itemize
14324
14325 \family sans
14326 Invoice
14327 \family default
14328 : Invoice no.
14329 \end_layout
14330
14331 \begin_layout Subsection
14332 The new letter class: letter (koma-script v.2)
14333 \end_layout
14334
14335 \begin_layout Standard
14336 by 
14337 \noun on
14338 Jürgen Spitzmüller
14339 \end_layout
14340
14341 \begin_layout Standard
14342 \begin_inset VSpace medskip
14343 \end_inset
14344
14345
14346 \end_layout
14347
14348 \begin_layout Standard
14349 \noindent
14350 Koma-Script version 2.8 has introduced a new letter class 
14351 \family typewriter
14352 scrlttr2
14353 \family default
14354  which supersedes the now unsupported 
14355 \family typewriter
14356 scrlettr
14357 \family default
14358 .
14359  It has — on the LaTeX side — a completely new interface and is not compatible
14360  with the old class.
14361  Therefore, LyX supports both, though it is recommended you use the new
14362  class.
14363 \end_layout
14364
14365 \begin_layout Standard
14366 This class covers the same functionality as 
14367 \emph on
14368 letter (koma-script),
14369 \emph default
14370  and a few more.
14371  The basic items are 
14372 \family sans
14373 Address
14374 \family default
14375  (receiver's address, same as 
14376 \family sans
14377 Letter
14378 \family default
14379  in the old layout), 
14380 \family sans
14381 Opening
14382 \family default
14383 , and 
14384 \family sans
14385 Closing
14386 \family default
14387 .
14388  
14389 \family sans
14390 NextAddress
14391 \family default
14392  will start a new letter (i.
14393 \begin_inset space \thinspace{}
14394 \end_inset
14395
14396 e.
14397 \begin_inset space \space{}
14398 \end_inset
14399
14400 you can write several letters per document).
14401  New elements are sender's 
14402 \family sans
14403 E-Mail
14404 \family default
14405
14406 \family sans
14407 URL
14408 \family default
14409
14410 \family sans
14411 Fax
14412 \family default
14413
14414 \family sans
14415 Bank
14416 \family default
14417  and the possibility to use a 
14418 \family sans
14419 Logo
14420 \family default
14421  (via 
14422 \family sans
14423 Insert\SpecialChar \menuseparator
14424 Graphics
14425 \family default
14426 ) in the header.
14427 \end_layout
14428
14429 \begin_layout Standard
14430 The biggest improvement is, though, that the letter's layout is configurable
14431  to meet almost any needs.
14432  This can be done via the preamble or with a special style file (Letter
14433  Class Option, extension 
14434 \family typewriter
14435 *.lco
14436 \family default
14437 ), that will be read in as a class option.
14438 \begin_inset Foot
14439 status collapsed
14440
14441 \begin_layout Plain Layout
14442 The KOMA package comes with some default 
14443 \family typewriter
14444 *.lco
14445 \family default
14446  files.
14447  There is, for instance, a 
14448 \family typewriter
14449 DIN.lco
14450 \family default
14451  file that follows german typesetting rules, or a 
14452 \family typewriter
14453 KOMAold.lco
14454 \family default
14455  that provides the default layout of the old 
14456 \family typewriter
14457 scrlettr
14458 \family default
14459  class.
14460  The latter can be loaded with the class option 
14461 \family typewriter
14462 KOMAold
14463 \family default
14464 , inserted via the 
14465 \family sans
14466 \bar under
14467 L
14468 \bar default
14469 ayout\SpecialChar \menuseparator
14470
14471 \bar under
14472 D
14473 \bar default
14474 ocument\SpecialChar \menuseparator
14475 Extra Options
14476 \family default
14477  field.
14478 \end_layout
14479
14480 \end_inset
14481
14482  Have a look at the 
14483 \emph on
14484 koma-letter2
14485 \emph default
14486  template that is included in LyX for examples.
14487  A detailed description is to be found in the Koma-Script documentation
14488  (
14489 \emph on
14490 scrguide
14491 \emph default
14492 ).
14493 \end_layout
14494
14495 \begin_layout Subsection
14496 Problems
14497 \end_layout
14498
14499 \begin_layout Standard
14500 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14501  some problems.
14502 \end_layout
14503
14504 \begin_layout Itemize
14505 The chapter number of a 
14506 \family sans
14507 Chapter
14508 \family default
14509  type appears on a line of its own above the chapter heading instead of
14510  appearing in the same line ahead of it.
14511  The cause for that is the LyX internal behavior for the labeltype 
14512 \family sans
14513 Counter_Chapter
14514 \family default
14515  in the layout file.
14516 \end_layout
14517
14518 \begin_layout Itemize
14519 The headings of the types 
14520 \family sans
14521 Addchap
14522 \family default
14523  and 
14524 \family sans
14525 Addsec
14526 \family default
14527  are only put in the 
14528 \begin_inset Quotes eld
14529 \end_inset
14530
14531 true
14532 \begin_inset Quotes erd
14533 \end_inset
14534
14535  LaTeX table of contents, but not in the LyX table of contents (
14536 \family sans
14537 Document\SpecialChar \menuseparator
14538 Table
14539 \begin_inset space ~
14540 \end_inset
14541
14542 of
14543 \begin_inset space ~
14544 \end_inset
14545
14546 Contents
14547 \family default
14548 ).
14549 \end_layout
14550
14551 \begin_layout Itemize
14552 The paragraphs in a 
14553 \emph on
14554 letter
14555 \emph default
14556  document class appear in a skip separation mode, not indented.
14557  This is the standard behavior, no special LaTeX commands are needed for
14558  that.
14559  But in the 
14560 \family sans
14561 Document\SpecialChar \menuseparator
14562 Settings
14563 \family default
14564  dialog the corresponding radio button indicates 
14565 \family sans
14566 Indent
14567 \family default
14568 .
14569  A 
14570 \family sans
14571 Skip
14572 \family default
14573  value always has the effect that extra LaTeX commands are inserted in the
14574  document to produce the gap, which is not what is wanted in this case.
14575 \end_layout
14576
14577 \begin_layout Section
14578 Memoir
14579 \end_layout
14580
14581 \begin_layout Standard
14582 By 
14583 \noun on
14584 Jürgen Spitzmüller
14585 \end_layout
14586
14587 \begin_layout Subsection
14588 Overview
14589 \end_layout
14590
14591 \begin_layout Standard
14592 Memoir is a very powerful and constantly evolving class.
14593  It has been designed with regard to fictional and non-fictional literature.
14594  Its aim is to let the user have maximum control over the typesetting of
14595  his document.
14596  Memoir is based on the standard book class, but it can also emulate the
14597  article class (see below).
14598 \end_layout
14599
14600 \begin_layout Standard
14601 Peter Wilson, the developer of Memoir, is known as the author of lots of
14602  useful packages in the LaTeX world.
14603  Most of them have been merged with Memoir.
14604  Therefore, it is much easier to layout the table of contents, appendices,
14605  chapter designs and such.
14606  LyX, though, does not support all of these goodies natively.
14607  Some of them might be added to forthcoming releases
14608 \begin_inset Foot
14609 status collapsed
14610
14611 \begin_layout Plain Layout
14612 You are invited to send suggestions to 
14613 \begin_inset Flex URL
14614 status collapsed
14615
14616 \begin_layout Plain Layout
14617
14618 lyx-devel@lists.lyx.org
14619 \end_layout
14620
14621 \end_inset
14622
14623 .
14624 \end_layout
14625
14626 \end_inset
14627
14628 , lots will probably never be supported, due to the limitations of LyX's
14629  framework.
14630  Of course you can still use all features with the help of some native LaTeX
14631  commands (TeX code
14632 \begin_inset Foot
14633 status collapsed
14634
14635 \begin_layout Plain Layout
14636 Cf.
14637 \begin_inset ERT
14638 status collapsed
14639
14640 \begin_layout Plain Layout
14641
14642
14643 \backslash
14644  
14645 \end_layout
14646
14647 \end_inset
14648
14649 section
14650 \begin_inset space ~
14651 \end_inset
14652
14653
14654 \begin_inset CommandInset ref
14655 LatexCommand ref
14656 reference "sec:Inserting-TeX-Code"
14657
14658 \end_inset
14659
14660  for details.
14661 \end_layout
14662
14663 \end_inset
14664
14665 ).
14666  In this section, we can only list those features that are natively supported
14667  by LyX.
14668  For detailed descriptions (and for the rest of features) we recommend you
14669  have a look at the detailed manual of the Memoir class
14670 \begin_inset Foot
14671 status collapsed
14672
14673 \begin_layout Plain Layout
14674 Cf.
14675 \begin_inset ERT
14676 status collapsed
14677
14678 \begin_layout Plain Layout
14679
14680
14681 \backslash
14682  
14683 \end_layout
14684
14685 \end_inset
14686
14687
14688 \begin_inset Flex URL
14689 status collapsed
14690
14691 \begin_layout Plain Layout
14692
14693 CTAN:/macros/latex/memoir/memman.pdf
14694 \end_layout
14695
14696 \end_inset
14697
14698 .
14699 \end_layout
14700
14701 \end_inset
14702
14703 , which is not only a user guide for the class, but also both a comprehensive
14704  description on good typesetting and a superb example for good typesetting
14705  itself.
14706 \end_layout
14707
14708 \begin_layout Subsection
14709 Basic features and restrictions
14710 \end_layout
14711
14712 \begin_layout Standard
14713 Memoir supports basically all features of the standard book classes.
14714  There are, however, some differences, as follows:
14715 \end_layout
14716
14717 \begin_layout Description
14718 Font
14719 \begin_inset space ~
14720 \end_inset
14721
14722 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14723 \end_layout
14724
14725 \begin_layout Description
14726 Page
14727 \begin_inset space ~
14728 \end_inset
14729
14730 style: The fancy page style is not supported, due to a command clash between
14731  Memoir and the fancyhdr package (they both define a command with the same
14732  name, which confuses LaTeX).
14733  Instead, Memoir comes with a number of its own page styles (see 
14734 \family sans
14735 Layout\SpecialChar \menuseparator
14736 Document\SpecialChar \menuseparator
14737 Page
14738 \begin_inset space ~
14739 \end_inset
14740
14741 Style
14742 \family default
14743 ).
14744  If you want to use these for the chapter pages, you have to use the command
14745  
14746 \family typewriter
14747
14748 \backslash
14749 chapterstyle
14750 \family default
14751  in the main text or in preamble (e.
14752 \begin_inset space \thinspace{}
14753 \end_inset
14754
14755 g.
14756 \begin_inset space \space{}
14757 \end_inset
14758
14759
14760 \family typewriter
14761
14762 \backslash
14763 chapterstyle{companion}
14764 \family default
14765 ).
14766 \end_layout
14767
14768 \begin_layout Description
14769 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14770  optional argument in the standard classes.
14771  With this, you can specify an alternative version of the title for the
14772  table of contents and the headers (for instance, if the title is too long).
14773  In LyX, you can do this via 
14774 \family sans
14775 Insert\SpecialChar \menuseparator
14776 Short
14777 \begin_inset space ~
14778 \end_inset
14779
14780 Title
14781 \family default
14782  at the beginning of a chapter/section.
14783  Memoir features a second optional argument and thus separates the table
14784  of contents from the header.
14785  You can define three variants of a title with this: one for the main text,
14786  one for the table of contents, and one for the headers.
14787  Simply insert two optional arguments if you need this feature, the first
14788  one containing the short title for the Table of Contents, the second one
14789  containing an alternative short title for the headers.
14790 \end_layout
14791
14792 \begin_layout Description
14793 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14794  of contents, the list of figures and the list of table start a new page
14795  automatically.
14796  Memoir does not follow this route.
14797  You have to insert a page break yourself, if you want to have one.
14798 \end_layout
14799
14800 \begin_layout Description
14801 Titlepage: For some unknown reason, Memoir uses pagination on the title
14802  page (in the standard classes, title pages are 
14803 \begin_inset Quotes eld
14804 \end_inset
14805
14806 empty
14807 \begin_inset Quotes erd
14808 \end_inset
14809
14810 ).
14811  If you want an empty title page, type 
14812 \family typewriter
14813
14814 \backslash
14815 aliaspagestyle{title}{empty}
14816 \family default
14817  in the preamble.
14818 \end_layout
14819
14820 \begin_layout Description
14821 Article: With the class option 
14822 \emph on
14823 article
14824 \emph default
14825  (to be inserted in 
14826 \family sans
14827 Layout\SpecialChar \menuseparator
14828 Document\SpecialChar \menuseparator
14829 Extra
14830 \begin_inset space ~
14831 \end_inset
14832
14833 Options
14834 \family default
14835 ), you can emulate article style.
14836  That is, counters (footnotes, figures, tables etc.) will not be reset on
14837  new chapters, chapters don't start a new page (but are—in contrary to 
14838 \begin_inset Quotes eld
14839 \end_inset
14840
14841 real
14842 \begin_inset Quotes erd
14843 \end_inset
14844
14845  article classes—still allowed), parts, though, use their own page, as in
14846  book.
14847 \end_layout
14848
14849 \begin_layout Description
14850 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14851  font commands, which have been used in the old LaTeX version 2.09 (e.
14852 \begin_inset space \thinspace{}
14853 \end_inset
14854
14855 g.
14856 \begin_inset space \space{}
14857 \end_inset
14858
14859
14860 \family typewriter
14861
14862 \backslash
14863 rm
14864 \family default
14865
14866 \family typewriter
14867
14868 \backslash
14869 it
14870 \family default
14871 ).
14872  It produces an error and stops LaTeX whenever such a command appears.
14873  The class option 
14874 \emph on
14875 oldfontcommands
14876 \emph default
14877  reallows the commands and spits out warnings instead (which does at least
14878  not stop LaTeX).
14879  Since a lot of packages and particularly BibTeX style files are still using
14880  those commands, we have decided to use this option by default.
14881 \end_layout
14882
14883 \begin_layout Subsection
14884 Extra features
14885 \end_layout
14886
14887 \begin_layout Standard
14888 We will only describe the features supported by LyX (which is not much currently
14889 ).
14890  Please consult the Memoir manual
14891 \begin_inset Foot
14892 status collapsed
14893
14894 \begin_layout Plain Layout
14895 Cf.
14896 \begin_inset ERT
14897 status collapsed
14898
14899 \begin_layout Plain Layout
14900
14901
14902 \backslash
14903  
14904 \end_layout
14905
14906 \end_inset
14907
14908
14909 \begin_inset Flex URL
14910 status collapsed
14911
14912 \begin_layout Plain Layout
14913
14914 CTAN:/macros/latex/memoir/memman.pdf
14915 \end_layout
14916
14917 \end_inset
14918
14919 .
14920 \end_layout
14921
14922 \end_inset
14923
14924  for details.
14925 \end_layout
14926
14927 \begin_layout Description
14928 Abstract: You may wonder why an abstract is an extra feature.
14929  Well, it is in book class.
14930  Usually books don't have abstracts.
14931  Memoir, however, has.
14932  You can use it wherever and how often you like.
14933 \end_layout
14934
14935 \begin_layout Description
14936 Chapterprecis: You may know this older typesetting style: The contents of
14937  a chapter are summarized below the title and also in the table of contents
14938  (e.
14939 \begin_inset space \thinspace{}
14940 \end_inset
14941
14942 g.
14943 \begin_inset space \space{}
14944 \end_inset
14945
14946
14947 \emph on
14948 Our hero arrives in Troia; he loses some friends; he finds others
14949 \emph default
14950 ).
14951  Chapterprecis does exactly this.
14952  It is therefore only sensible below a chapter.
14953 \end_layout
14954
14955 \begin_layout Description
14956 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14957  The epigraph environment provides an elegant way of typesetting such a
14958  motto.
14959  The motto itself (text) and its author (source) are divided by a short
14960  line.
14961  Unfortunately, we have to fool LyX a bit here again, since the environment
14962  needs two arguments (text and source).
14963  In this case, we have to use curly brackets (in TeX mode) between the two
14964  arguments: 
14965 \emph on
14966 <smart slogan>
14967 \emph default
14968  
14969 \family typewriter
14970 }{
14971 \family default
14972  
14973 \emph on
14974 <author of the slogan>.
14975 \end_layout
14976
14977 \begin_layout Description
14978 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14979  complex figurative poems).
14980  LyX can only support a few of them.
14981  One is poemtitle, which is a centered title for poems, which will also
14982  be added to the table of contents (verse is the standard environment for
14983  poems.
14984  Memoir has some enhanced versions of verse, but you need to use TeX code,
14985  because they have to be nested inside regular verse environments, which
14986  is not possible with LyX).
14987 \end_layout
14988
14989 \begin_layout Description
14990 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14991 \end_layout
14992
14993 \begin_layout Section
14994 Article (mwart), book (mwbk) and report (mwrep)
14995 \begin_inset Argument status
14996 status collapsed
14997
14998 \begin_layout Plain Layout
14999 The 
15000 \family typewriter
15001 mw
15002 \family default
15003  Classes
15004 \end_layout
15005
15006 \end_inset
15007
15008
15009 \end_layout
15010
15011 \begin_layout Standard
15012 by 
15013 \noun on
15014 Tomasz Luczak
15015 \end_layout
15016
15017 \begin_layout Standard
15018 The LyX document classes 
15019 \emph on
15020 article (mwart)
15021 \emph default
15022
15023 \emph on
15024 report (mwrep)
15025 \emph default
15026  and 
15027 \emph on
15028 book
15029 \emph default
15030  
15031 \emph on
15032 (mwbk)
15033 \emph default
15034  correspond to the LaTeX document classes 
15035 \family typewriter
15036 mwart.cls
15037 \family default
15038
15039 \family typewriter
15040 mwrep.cls
15041 \family default
15042  and 
15043 \family typewriter
15044 mwbk.cls
15045 \family default
15046 , resp.
15047  They are replacements for the standard document classes 
15048 \family typewriter
15049 article.cls
15050 \family default
15051
15052 \family typewriter
15053 report.cls
15054 \family default
15055  and 
15056 \family typewriter
15057 book.cls
15058 \family default
15059 , resp., and fit better to Polish typography conventions in a number of points.
15060  
15061 \end_layout
15062
15063 \begin_layout Standard
15064 Basic differences:
15065 \end_layout
15066
15067 \begin_layout Itemize
15068 Unnumbered titles (with star, e.
15069 \begin_inset space \thinspace{}
15070 \end_inset
15071
15072 g.
15073 \begin_inset space \space{}
15074 \end_inset
15075
15076
15077 \family sans
15078 Section*
15079 \family default
15080 ) are added into table of contents,
15081 \end_layout
15082
15083 \begin_layout Itemize
15084 Additional page styles:
15085 \end_layout
15086
15087 \begin_deeper
15088 \begin_layout Description
15089 uheadings header with separated lines,
15090 \end_layout
15091
15092 \begin_layout Description
15093 myheadings custom header, contents headers via commands: 
15094 \family typewriter
15095
15096 \backslash
15097 markright
15098 \family default
15099  and 
15100 \family typewriter
15101
15102 \backslash
15103 markboth
15104 \family default
15105 ,
15106 \end_layout
15107
15108 \begin_layout Description
15109 myuheadings custom header with separated lines,
15110 \end_layout
15111
15112 \begin_layout Description
15113 outer page number is placed on outer side of page
15114 \end_layout
15115
15116 \end_deeper
15117 \begin_layout Itemize
15118 Options 
15119 \end_layout
15120
15121 \begin_deeper
15122 \begin_layout Description
15123 rmheadings serif titles — default,
15124 \end_layout
15125
15126 \begin_layout Description
15127 sfheadings sansserif titles,
15128 \end_layout
15129
15130 \begin_layout Description
15131 authortitle on title page first placed is author next title — default,
15132 \end_layout
15133
15134 \begin_layout Description
15135 titleauthor on title page first placed is title next author,
15136 \end_layout
15137
15138 \begin_layout Description
15139 withmarginpar reserve place on page for margins.
15140 \end_layout
15141
15142 \end_deeper
15143 \begin_layout Section
15144 Paper
15145 \end_layout
15146
15147 \begin_layout Standard
15148 The document class 
15149 \family sans
15150 paper
15151 \family default
15152  provides an alternative to the standard 
15153 \family sans
15154 article
15155 \family default
15156  class.
15157  It provides similar functionality, but you might prefer this layout with
15158  sans serif sections, headings, and more.
15159 \end_layout
15160
15161 \begin_layout Section
15162 RevTeX4
15163 \end_layout
15164
15165 \begin_layout Standard
15166 by 
15167 \noun on
15168 Amir Karger
15169 \end_layout
15170
15171 \begin_layout Standard
15172 \begin_inset VSpace bigskip
15173 \end_inset
15174
15175
15176 \end_layout
15177
15178 \begin_layout Standard
15179 \noindent
15180 The 
15181 \family sans
15182 Revtex
15183 \begin_inset space ~
15184 \end_inset
15185
15186 4
15187 \family default
15188  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15189 \begin_inset Formula $\beta$
15190 \end_inset
15191
15192  release of May, 1999) class.
15193 \end_layout
15194
15195 \begin_layout Standard
15196 LyX has a 
15197 \family sans
15198 Revtex
15199 \family default
15200  textclass, which works with RevTeX 3.1.
15201  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15202  That means that it doesn't interact very well with LyX, which requires
15203  LaTeX2e, although it has been kludged to work.
15204  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15205  LyX with the 
15206 \family sans
15207 RevTeX
15208 \begin_inset space ~
15209 \end_inset
15210
15211 4
15212 \family default
15213  textclass should also be pretty easy to use.
15214 \end_layout
15215
15216 \begin_layout Standard
15217 These documents are supposed to be used in 
15218 \emph on
15219 addition
15220 \emph default
15221  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15222  macros, and assume you'll know what to put in the preamble if necessary.
15223 \end_layout
15224
15225 \begin_layout Subsection
15226 Installation
15227 \end_layout
15228
15229 \begin_layout Standard
15230 All you need to do is install RevTeX 4, as described in the package's README
15231  file.
15232  The package can be found at The RevTeX 4 Web Site 
15233 \begin_inset Flex URL
15234 status collapsed
15235
15236 \begin_layout Plain Layout
15237
15238 http://publish.aps.org/revtex4/
15239 \end_layout
15240
15241 \end_inset
15242
15243 .
15244  Install it somewhere that LaTeX can see it.
15245  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15246  (i.
15247 \begin_inset space \thinspace{}
15248 \end_inset
15249
15250 e.
15251 \begin_inset space \space{}
15252 \end_inset
15253
15254 not the directory where you installed the class file.) Then, if you reconfigure
15255  LyX, it will find the class file and let you use the RevTeX4 textclass.
15256 \end_layout
15257
15258 \begin_layout Standard
15259 Probably the easiest way to get started is either to import a RevTeX 4 document
15260  using 
15261 \family typewriter
15262 tex2lyx
15263 \family default
15264 , or to use the 
15265 \family sans
15266 Revtex
15267 \begin_inset space ~
15268 \end_inset
15269
15270 4
15271 \family default
15272  template, found in the templates directory.
15273 \end_layout
15274
15275 \begin_layout Subsection
15276 Preamble Matter
15277 \end_layout
15278
15279 \begin_layout Standard
15280 Optional arguments to 
15281 \family typewriter
15282
15283 \backslash
15284 documentclass
15285 \family default
15286 , like 
15287 \begin_inset Quotes eld
15288 \end_inset
15289
15290 preprint
15291 \begin_inset Quotes erd
15292 \end_inset
15293
15294  and 
15295 \begin_inset Quotes eld
15296 \end_inset
15297
15298 aps
15299 \begin_inset Quotes erd
15300 \end_inset
15301
15302 , go in the 
15303 \family sans
15304 E
15305 \bar under
15306 x
15307 \bar default
15308 tra
15309 \begin_inset space ~
15310 \end_inset
15311
15312 Options
15313 \family default
15314  field in the 
15315 \family sans
15316 Document
15317 \begin_inset space ~
15318 \end_inset
15319
15320 Layout
15321 \family default
15322  dialog, as usual.
15323  Remember that in RevTeX, at least one optional argument is required! 
15324 \end_layout
15325
15326 \begin_layout Standard
15327 Other preamble matter, like 
15328 \family typewriter
15329
15330 \backslash
15331 draft
15332 \family default
15333  etc.
15334 \begin_inset space ~
15335 \end_inset
15336
15337 goes in the 
15338 \family sans
15339 LaTeX
15340 \begin_inset space ~
15341 \end_inset
15342
15343 Preamble
15344 \family default
15345  dialog, also as usual.
15346 \end_layout
15347
15348 \begin_layout Subsection
15349 Layouts
15350 \end_layout
15351
15352 \begin_layout Standard
15353 The layouts basically correspond to the commands in RevTeX4.0.
15354  For example, the Email layout corresponds to 
15355 \family typewriter
15356
15357 \backslash
15358 email{}
15359 \family default
15360 .
15361  Note that (at least as of RevTeX 4.0 Beta), the 
15362 \family sans
15363 Address
15364 \family default
15365  and 
15366 \family sans
15367 Affiliation
15368 \family default
15369  layouts are exactly equivalent, so you shouldn't need to use both.
15370 \begin_inset Foot
15371 status collapsed
15372
15373 \begin_layout Plain Layout
15374 In case you're curious, both were included so that 
15375 \family typewriter
15376 tex2lyx
15377 \family default
15378  would be able to translate both 
15379 \family typewriter
15380
15381 \backslash
15382 address
15383 \family default
15384  and 
15385 \family typewriter
15386
15387 \backslash
15388 affiliation
15389 \family default
15390 .
15391 \end_layout
15392
15393 \end_inset
15394
15395
15396 \end_layout
15397
15398 \begin_layout Subsection
15399 Important Notes
15400 \end_layout
15401
15402 \begin_layout Standard
15403 There are a couple of important unique aspects of RevTeX 4 which might cause
15404  bugs that will be even more confusing in LyX.
15405 \end_layout
15406
15407 \begin_layout Standard
15408 In RevTeX, the 
15409 \family typewriter
15410
15411 \backslash
15412 thanks
15413 \family default
15414  command goes 
15415 \emph on
15416 outside
15417 \emph default
15418  the 
15419 \family typewriter
15420
15421 \backslash
15422 author
15423 \family default
15424  command.
15425  The LyX equivalent is that there is a separate Thanks layout.
15426  Do 
15427 \emph on
15428 not
15429 \emph default
15430  write footnotes in the 
15431 \family sans
15432 Author
15433 \family default
15434  layout, or weird things may happen.
15435  See the RevTeX 4 documentation for more details.
15436 \end_layout
15437
15438 \begin_layout Standard
15439 Also, the 
15440 \family sans
15441 Author
15442 \begin_inset space ~
15443 \end_inset
15444
15445 Email
15446 \family default
15447
15448 \family sans
15449 Author
15450 \begin_inset space ~
15451 \end_inset
15452
15453 URL
15454 \family default
15455 , and 
15456 \family sans
15457 Thanks
15458 \family default
15459  layouts must be placed 
15460 \emph on
15461 in between
15462 \emph default
15463  the 
15464 \family sans
15465 Author
15466 \family default
15467  layout and the corresponding 
15468 \family sans
15469 Address
15470 \family default
15471  (or equivalent 
15472 \family sans
15473 Affiliation
15474 \family default
15475 ) layout.
15476  If you put the 
15477 \family sans
15478 Thanks
15479 \family default
15480  after the 
15481 \family sans
15482 Address
15483 \family default
15484 , the LaTeX won't compile.
15485 \end_layout
15486
15487 \begin_layout Subsection
15488 Drawbacks
15489 \end_layout
15490
15491 \begin_layout Standard
15492 The main problem with this layout is that you can't use the optional arguments
15493  to layouts like Email and Title.
15494  (The problem is not unique to this layout; you can't use optional arguments
15495  to the Section layouts either.) This means that after you export that file
15496  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15497  need to edit the LaTeX file with a text editor to add the optional arguments
15498  to set, e.
15499 \begin_inset space \thinspace{}
15500 \end_inset
15501
15502 g.
15503 \begin_inset space \space{}
15504 \end_inset
15505
15506 the running title for the page headers.
15507  Lacking these layouts makes the 
15508 \family typewriter
15509
15510 \backslash
15511 altaffiliation
15512 \family default
15513  (and the equivalent 
15514 \family typewriter
15515
15516 \backslash
15517 altaddress
15518 \family default
15519 ) useless, so the corresponding layouts don't exist, and will have to be
15520  added by hand.
15521 \begin_inset Foot
15522 status collapsed
15523
15524 \begin_layout Plain Layout
15525
15526 \emph on
15527 Note from JMarc:
15528 \emph default
15529  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15530  has not been updated yet to take advantage of it.
15531 \end_layout
15532
15533 \end_inset
15534
15535  
15536 \end_layout
15537
15538 \begin_layout Section
15539 Springer Journals (
15540 \family sans
15541 svjour
15542 \family default
15543 )
15544 \end_layout
15545
15546 \begin_layout Standard
15547 by 
15548 \noun on
15549 Martin Vermeer
15550 \end_layout
15551
15552 \begin_layout Subsection
15553 Description
15554 \end_layout
15555
15556 \begin_layout Standard
15557 These are the layout files for some of the journal formats used by Springer
15558  Verlag and listed on 
15559 \begin_inset Flex URL
15560 status collapsed
15561
15562 \begin_layout Plain Layout
15563
15564 http://www.springer.de/author/tex/help-journals.html
15565 \end_layout
15566
15567 \end_inset
15568
15569 , where you should also go to fetch the class files (yes, these are LaTeX2e
15570  now!).
15571  It is a modular system: the things common to all journals are implemented
15572  in 
15573 \family typewriter
15574 svjour.inc
15575 \family default
15576 , which journal-specific layout files (such as, e.
15577 \begin_inset space \thinspace{}
15578 \end_inset
15579
15580 g.
15581 \begin_inset space \space{}
15582 \end_inset
15583
15584
15585 \family typewriter
15586 svjog.layout
15587 \family default
15588  for Journal of Geodesy) can include.
15589 \end_layout
15590
15591 \begin_layout Standard
15592 This means that implementing support for any other Springer journal on this
15593  list is as simple as writing your own 
15594 \family typewriter
15595 sv
15596 \family default
15597 <myjournal>
15598 \family typewriter
15599 .layout
15600 \family default
15601  file following the outline given in 
15602 \family typewriter
15603 svjog.layout
15604 \family default
15605 .
15606  
15607 \end_layout
15608
15609 \begin_layout Standard
15610 It is reasonably well tested only for the Journal of Geodesy.
15611  
15612 \family typewriter
15613 svjour
15614 \family default
15615  and 
15616 \family typewriter
15617 svjog
15618 \family default
15619  come with the standard LyX distribution.
15620  Install the relevant class file (downloaded from Springer) in a proper
15621  directory, reconfigure LaTeX (in the teTeX case by running 
15622 \family typewriter
15623 texhash
15624 \family default
15625 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15626  and it should work.
15627 \end_layout
15628
15629 \begin_layout Subsection
15630 New styles
15631 \end_layout
15632
15633 \begin_layout Standard
15634 A large number of theorem-like styles — 
15635 \family sans
15636 Claim, Conjecture,
15637 \family default
15638  
15639 \family sans
15640 \SpecialChar \ldots{}
15641 Theorem
15642 \family default
15643 .
15644 \end_layout
15645
15646 \begin_layout Standard
15647
15648 \family sans
15649 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15650  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15651 \family default
15652 .
15653  See the Springer class file documentation for details.
15654 \end_layout
15655
15656 \begin_layout Subsection
15657 Supported journals
15658 \end_layout
15659
15660 \begin_layout Itemize
15661
15662 \emph on
15663 Journal of Geodesy
15664 \emph default
15665
15666 \family typewriter
15667 svjog.layout
15668 \family default
15669  — Martin Vermeer
15670 \end_layout
15671
15672 \begin_layout Itemize
15673
15674 \emph on
15675 Probability Theory and Related Fields
15676 \emph default
15677
15678 \family typewriter
15679 svprobth.layout
15680 \family default
15681  — Jean-Marc Lasgouttes
15682 \end_layout
15683
15684 \begin_layout Standard
15685 Add your own, it isn't so hard!
15686 \end_layout
15687
15688 \begin_layout Subsection
15689 Credits
15690 \end_layout
15691
15692 \begin_layout Standard
15693 These files are partly based on the older 
15694 \family typewriter
15695 ejour2.layout
15696 \family default
15697 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15698  file from Springer.
15699  All this, and the 
15700 \family typewriter
15701 ejour2
15702 \family default
15703  layout, are now defunct.
15704  Jean-Marc Lasgouttes helped out big in making me find my way around the
15705  LyX layout file mechanism.
15706 \end_layout
15707
15708 \begin_layout Subsection
15709 Bugs
15710 \end_layout
15711
15712 \begin_layout Standard
15713 Probably.
15714  But probably less than in the old hacked-LaTeX 
15715 \family typewriter
15716 ejour2
15717 \family default
15718 .
15719 \end_layout
15720
15721 \begin_layout Standard
15722 Limitations e.
15723 \begin_inset space \thinspace{}
15724 \end_inset
15725
15726 g.: does not display the number for theorem-like layouts, just #.
15727 \end_layout
15728
15729 \begin_layout Section
15730 Slides [aka 
15731 \noun on
15732 SliTeX
15733 \noun default
15734 ]
15735 \begin_inset CommandInset label
15736 LatexCommand label
15737 name "sec:slitex"
15738
15739 \end_inset
15740
15741
15742 \end_layout
15743
15744 \begin_layout Standard
15745 by 
15746 \noun on
15747 John Weiss
15748 \noun default
15749  
15750 \end_layout
15751
15752 \begin_layout Subsection
15753 Introduction
15754 \end_layout
15755
15756 \begin_layout Standard
15757 This section describes how to use LyX to make slides for overhead projectors.
15758  There are two document classes that can do this: the default slides class
15759  and the 
15760 \family sans
15761 FoilTeX
15762 \family default
15763  slides class.
15764  This section documents the former.
15765 \end_layout
15766
15767 \begin_layout Standard
15768 I'm going to say this again, nice and clear, so that there's no misunderstanding
15769 :
15770 \end_layout
15771
15772 \begin_layout Standard
15773 \begin_inset VSpace bigskip
15774 \end_inset
15775
15776
15777 \end_layout
15778
15779 \begin_layout Standard
15780 \align center
15781
15782 \size large
15783 This section documents the class 
15784 \begin_inset Quotes eld
15785 \end_inset
15786
15787
15788 \family sans
15789 slides (default)
15790 \family default
15791
15792 \begin_inset Quotes erd
15793 \end_inset
15794
15795  
15796 \emph on
15797 only.
15798 \end_layout
15799
15800 \begin_layout Standard
15801 \begin_inset VSpace bigskip
15802 \end_inset
15803
15804
15805 \end_layout
15806
15807 \begin_layout Standard
15808 If you're looking for the documentation for 
15809 \begin_inset Quotes eld
15810 \end_inset
15811
15812
15813 \family sans
15814 slides (FoilTeX)
15815 \family default
15816
15817 \begin_inset Quotes erd
15818 \end_inset
15819
15820 , check out section
15821 \begin_inset space ~
15822 \end_inset
15823
15824
15825 \begin_inset CommandInset ref
15826 LatexCommand ref
15827 reference "sec:foiltex"
15828
15829 \end_inset
15830
15831 .
15832  The 
15833 \family sans
15834 foils
15835 \family default
15836  class [
15837 \begin_inset Quotes eld
15838 \end_inset
15839
15840
15841 \family sans
15842 slides (FoilTeX)
15843 \family default
15844
15845 \begin_inset Quotes erd
15846 \end_inset
15847
15848 ] is actually somewhat better than the default 
15849 \family sans
15850 slides
15851 \family default
15852  class,
15853 \begin_inset Foot
15854 status collapsed
15855
15856 \begin_layout Plain Layout
15857 \SpecialChar \ldots{}
15858 or so I've been told repeatedly by its advocates.
15859  Having never used it, I have no idea if this claim is true or not.
15860 \end_layout
15861
15862 \end_inset
15863
15864  which this section documents.
15865 \end_layout
15866
15867 \begin_layout Standard
15868 This class is the LaTeX2e improvement of the old 
15869 \noun on
15870 SliTeX
15871 \noun default
15872  package.
15873  Every LaTeX2e distribution includes this class [which I'll just refer to
15874  as 
15875 \begin_inset Quotes eld
15876 \end_inset
15877
15878
15879 \family sans
15880 slides
15881 \family default
15882
15883 \begin_inset Quotes erd
15884 \end_inset
15885
15886  from now on], so you're bound to have it.
15887  As I noted earlier, there are other classes, such as 
15888 \family sans
15889 foils
15890 \family default
15891 , which also produce slides for overhead projectors and do a better job
15892  at it.
15893  However, there are some things which 
15894 \family sans
15895 slides
15896 \family default
15897  can do which the others can't, such as generate overlays.
15898  Read on to learn more!
15899 \end_layout
15900
15901 \begin_layout Subsection
15902 Getting Started
15903 \begin_inset CommandInset label
15904 LatexCommand label
15905 name "sec:slidesetup"
15906
15907 \end_inset
15908
15909
15910 \end_layout
15911
15912 \begin_layout Standard
15913 Obviously, to use this document class, you need to select 
15914 \begin_inset Quotes eld
15915 \end_inset
15916
15917
15918 \family sans
15919 slides (default)
15920 \family default
15921
15922 \begin_inset Quotes erd
15923 \end_inset
15924
15925  from the class list in the 
15926 \family sans
15927 Document\SpecialChar \menuseparator
15928 Settings
15929 \family default
15930  dialog.
15931  There are some other special things you should know about this class:
15932 \end_layout
15933
15934 \begin_layout Itemize
15935 Don't bother changing the options 
15936 \family sans
15937 Sides and Columns
15938 \family default
15939 .
15940  They're not supported by the 
15941 \family sans
15942 slides
15943 \family default
15944  class, anyways.
15945 \end_layout
15946
15947 \begin_layout Itemize
15948 The option 
15949 \family sans
15950 Page
15951 \begin_inset space ~
15952 \end_inset
15953
15954 style
15955 \family default
15956  behaves a bit differently for this class.
15957  The possible choices and what they do are as follows:
15958 \end_layout
15959
15960 \begin_deeper
15961 \begin_layout Description
15962
15963 \family sans
15964 plain
15965 \family default
15966  The final output contains page numbers in the lower right corner.
15967 \end_layout
15968
15969 \begin_layout Description
15970
15971 \family sans
15972 headings
15973 \family default
15974  Like 
15975 \family sans
15976 plain
15977 \family default
15978 , but also prints out any time markers you've put in.
15979  This is the default.
15980 \end_layout
15981
15982 \begin_layout Description
15983
15984 \family sans
15985 empty
15986 \family default
15987  The final output contains no page numbers, time markers, or alignment markers.
15988 \end_layout
15989
15990 \end_deeper
15991 \begin_layout Itemize
15992 The 
15993 \family sans
15994 slides
15995 \family default
15996  class has an extra option: 
15997 \family typewriter
15998 clock
15999 \family default
16000 .
16001  To use it, put 
16002 \begin_inset Quotes eld
16003 \end_inset
16004
16005
16006 \family typewriter
16007 clock
16008 \family default
16009
16010 \begin_inset Quotes erd
16011 \end_inset
16012
16013  in the extra class options.
16014 \end_layout
16015
16016 \begin_deeper
16017 \begin_layout Standard
16018 Using this options allows you to add time markers to 
16019 \family sans
16020 Note
16021 \family default
16022 s.
16023  See section
16024 \begin_inset space ~
16025 \end_inset
16026
16027
16028 \begin_inset CommandInset ref
16029 LatexCommand ref
16030 reference "sec:slideNote"
16031
16032 \end_inset
16033
16034  for more details.
16035 \end_layout
16036
16037 \end_deeper
16038 \begin_layout Standard
16039 You can also use the template file 
16040 \begin_inset Quotes eld
16041 \end_inset
16042
16043
16044 \family typewriter
16045 slides.lyx
16046 \family default
16047
16048 \begin_inset Quotes erd
16049 \end_inset
16050
16051  to automatically set up a document to use the 
16052 \family sans
16053 slides
16054 \family default
16055  class [using 
16056 \family sans
16057 File\SpecialChar \menuseparator
16058 New
16059 \begin_inset space ~
16060 \end_inset
16061
16062 from
16063 \begin_inset space ~
16064 \end_inset
16065
16066 Template
16067 \family default
16068  to open your new document].
16069  The template file also contains some examples of the special paragraph
16070  environments used by this class.
16071  I'll describe those next.
16072 \end_layout
16073
16074 \begin_layout Subsection
16075 Paragraph Environments
16076 \end_layout
16077
16078 \begin_layout Subsubsection
16079 Supported Environments
16080 \end_layout
16081
16082 \begin_layout Standard
16083 The first thing you'll notice when you start up a new 
16084 \family sans
16085 slides
16086 \family default
16087  document is the font size and type: it's the equivalent of the size 
16088 \begin_inset Quotes eld
16089 \end_inset
16090
16091
16092 \family sans
16093 Largest
16094 \family default
16095
16096 \begin_inset Quotes erd
16097 \end_inset
16098
16099  in the 
16100 \family sans
16101 Sans
16102 \begin_inset space ~
16103 \end_inset
16104
16105 Serif
16106 \family default
16107  font.
16108  This is also what's used in the output.
16109  Think of this as a 
16110 \begin_inset Quotes eld
16111 \end_inset
16112
16113 visual cue
16114 \begin_inset Quotes erd
16115 \end_inset
16116
16117  to remind you that this is a slide.
16118  Your final slides will use a larger font; ergo, you'll have less space.
16119  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16120 \end_layout
16121
16122 \begin_layout Standard
16123 The next thing that becomes obvious is the changes to the paragraph environment
16124  pull-down box [at the far-left end of the toolbar].
16125  Most of the paragraph environments you're used to seeing are missing.
16126  There are also five new ones.
16127  That's because the 
16128 \family sans
16129 slides
16130 \family default
16131  class itself only supports certain paragraph environments:
16132 \end_layout
16133
16134 \begin_layout Itemize
16135
16136 \family sans
16137 Standard
16138 \end_layout
16139
16140 \begin_layout Itemize
16141
16142 \family sans
16143 Itemize
16144 \end_layout
16145
16146 \begin_layout Itemize
16147
16148 \family sans
16149 Enumerate
16150 \end_layout
16151
16152 \begin_layout Itemize
16153
16154 \family sans
16155 Description
16156 \end_layout
16157
16158 \begin_layout Itemize
16159
16160 \family sans
16161 List
16162 \end_layout
16163
16164 \begin_layout Itemize
16165
16166 \family sans
16167 Quotation
16168 \end_layout
16169
16170 \begin_layout Itemize
16171
16172 \family sans
16173 Quote
16174 \end_layout
16175
16176 \begin_layout Itemize
16177
16178 \family sans
16179 Verse
16180 \end_layout
16181
16182 \begin_layout Itemize
16183
16184 \family sans
16185 Caption
16186 \end_layout
16187
16188 \begin_layout Itemize
16189
16190 \family sans
16191 LyX-Code
16192 \end_layout
16193
16194 \begin_layout Itemize
16195
16196 \family sans
16197 Comment
16198 \end_layout
16199
16200 \begin_layout Standard
16201 All of the other standard environments, including the section-heading environmen
16202 ts, aren't used in the 
16203 \family sans
16204 slides
16205 \family default
16206  class.
16207 \end_layout
16208
16209 \begin_layout Standard
16210 On the other hand, you'll notice the following new environments:
16211 \end_layout
16212
16213 \begin_layout Itemize
16214
16215 \family sans
16216 Slide
16217 \end_layout
16218
16219 \begin_layout Itemize
16220
16221 \family sans
16222 Overlay
16223 \end_layout
16224
16225 \begin_layout Itemize
16226
16227 \family sans
16228 Note
16229 \end_layout
16230
16231 \begin_layout Itemize
16232
16233 \family sans
16234 InvisibleText
16235 \end_layout
16236
16237 \begin_layout Itemize
16238
16239 \family sans
16240 VisibleText
16241 \end_layout
16242
16243 \begin_layout Standard
16244 These five are kind of quirky, due to a 
16245 \begin_inset Quotes eld
16246 \end_inset
16247
16248 feature
16249 \begin_inset Quotes erd
16250 \end_inset
16251
16252  in LyX.
16253  You see, LyX doesn't permit you to nest any other paragraph environment
16254  into an empty environment.
16255  Now, that's fine and dandy, but it means that you wouldn't be able to start
16256  a slide with anything except plain text.
16257  To deal with this, I've performed a little 
16258 \begin_inset Quotes eld
16259 \end_inset
16260
16261 LaTeX magic.
16262 \begin_inset Quotes erd
16263 \end_inset
16264
16265  
16266 \end_layout
16267
16268 \begin_layout Subsubsection
16269 Quirks of the New Environments
16270 \begin_inset CommandInset label
16271 LatexCommand label
16272 name "sec:slideQuirk"
16273
16274 \end_inset
16275
16276
16277 \end_layout
16278
16279 \begin_layout Standard
16280 All five of the new paragraph environments are somewhat quirky due to inherent
16281  limitiations in the current version of LyX.
16282  As I just mentioned, LyX forbids environments that begin with another environme
16283 nt.
16284  To get around this, the 
16285 \family sans
16286 Slide
16287 \family default
16288  environment isn't a paragraph environment as described in the 
16289 \emph on
16290 User's Guide
16291 \emph default
16292 .
16293  
16294 \end_layout
16295
16296 \begin_layout Standard
16297 You should consider 
16298 \family sans
16299 Slide
16300 \family default
16301
16302 \family sans
16303 Overlay
16304 \family default
16305 , and 
16306 \family sans
16307 Note
16308 \family default
16309  to be 
16310 \begin_inset Quotes eld
16311 \end_inset
16312
16313 pseudo-environments.
16314 \begin_inset Quotes erd
16315 \end_inset
16316
16317  They look like a section heading or a 
16318 \begin_inset Quotes eld
16319 \end_inset
16320
16321
16322 \family sans
16323 Caption
16324 \family default
16325 ,
16326 \begin_inset Quotes erd
16327 \end_inset
16328
16329  but really begin a [and, if necessary, end the previous] paragraph environment.
16330  Likewise, treat 
16331 \family sans
16332 InvisibleText
16333 \family default
16334  and 
16335 \family sans
16336 VisibleText
16337 \family default
16338  as 
16339 \begin_inset Quotes eld
16340 \end_inset
16341
16342 pseudo-commands.
16343 \begin_inset Quotes erd
16344 \end_inset
16345
16346  These two perform some action.
16347 \end_layout
16348
16349 \begin_layout Standard
16350 A common feature of all five environments, 
16351 \family sans
16352 Slide
16353 \family default
16354
16355 \family sans
16356 Overlay
16357 \family default
16358
16359 \family sans
16360 Note
16361 \family default
16362
16363 \family sans
16364 InvisibleText
16365 \family default
16366  and 
16367 \family sans
16368 VisibleText
16369 \family default
16370 , is a rather long-ish label.
16371  The text following this label — ordinarily the contents of the paragraph
16372  environment — is utterly irrelevant for 
16373 \family sans
16374 Slide
16375 \family default
16376
16377 \family sans
16378 Overlay
16379 \family default
16380
16381 \family sans
16382 Note
16383 \family default
16384
16385 \family sans
16386 InvisibleText
16387 \family default
16388  and 
16389 \family sans
16390 VisibleText
16391 \family default
16392 .
16393  LyX completely ignores it.
16394  In fact, you can leave these five environments completely empty.
16395  
16396 \end_layout
16397
16398 \begin_layout Standard
16399 While you don't 
16400 \emph on
16401 have
16402 \emph default
16403  to put any text after the rather long-ish label, you might want to.
16404  This could be a short description of the contents of the 
16405 \family sans
16406 Slide
16407 \family default
16408 , for example.
16409  In that case, enter your descriptive comment and hit 
16410 \family sans
16411 Return
16412 \family default
16413  as you normally would.
16414 \end_layout
16415
16416 \begin_layout Standard
16417 If, on the other hand, you don't want to enter any descriptive text, you'll
16418  hit another LyX quirk.
16419  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16420  environment until you put something in the old one.
16421  So, do this:
16422 \end_layout
16423
16424 \begin_layout Itemize
16425 Start entering the text that will 
16426 \emph on
16427 follow
16428 \emph default
16429  the new 
16430 \family sans
16431 Slide
16432 \family default
16433
16434 \family sans
16435 Overlay
16436 \family default
16437
16438 \family sans
16439 Note
16440 \family default
16441
16442 \family sans
16443 InvisibleText
16444 \family default
16445  or 
16446 \family sans
16447 VisibleText
16448 \family default
16449 .
16450  
16451 \end_layout
16452
16453 \begin_layout Itemize
16454 Now move to the beginning of that paragraph.
16455  
16456 \end_layout
16457
16458 \begin_layout Itemize
16459 Next, hit 
16460 \family sans
16461 Return
16462 \family default
16463 .
16464  
16465 \end_layout
16466
16467 \begin_layout Itemize
16468 Finally, change this new, empty paragraph to a 
16469 \family sans
16470 Slide
16471 \family default
16472
16473 \family sans
16474 Overlay
16475 \family default
16476
16477 \family sans
16478 Note
16479 \family default
16480
16481 \family sans
16482 InvisibleText
16483 \family default
16484  or 
16485 \family sans
16486 VisibleText
16487 \family default
16488 .
16489  
16490 \end_layout
16491
16492 \begin_layout Standard
16493 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16494
16495 \end_layout
16496
16497 \begin_layout Subsection
16498 Making a Presentation with 
16499 \family sans
16500 Slide
16501 \family default
16502
16503 \family sans
16504 Overlay
16505 \family default
16506  and 
16507 \family sans
16508 Note
16509 \end_layout
16510
16511 \begin_layout Subsubsection
16512 Using the 
16513 \family sans
16514 Slide
16515 \family default
16516  Environment
16517 \end_layout
16518
16519 \begin_layout Standard
16520 If you're expecting this section to teach you how to actually make a presentatio
16521 n, you'll be sorely disappointed.
16522  Naturally, I'll describe all of the ways the 
16523 \family sans
16524 slides
16525 \family default
16526  class can assist you in preparing the materials for a presentation.
16527  Filling in the contents, however, is up to you.
16528  [Then again, that 
16529 \emph on
16530 is
16531 \emph default
16532  the LyX philosophy.]
16533 \end_layout
16534
16535 \begin_layout Standard
16536 Choosing the 
16537 \family sans
16538 Slide
16539 \family default
16540  environment [in the manner described in section
16541 \begin_inset space ~
16542 \end_inset
16543
16544
16545 \begin_inset CommandInset ref
16546 LatexCommand ref
16547 reference "sec:slideQuirk"
16548
16549 \end_inset
16550
16551 ] tells LyX to begin a new slide [duh].
16552  The label for this environment/
16553 \begin_inset Quotes erd
16554 \end_inset
16555
16556 pseudo-command
16557 \begin_inset Quotes erd
16558 \end_inset
16559
16560  is an 
16561 \begin_inset Quotes eld
16562 \end_inset
16563
16564 ASCII line,
16565 \begin_inset Quotes erd
16566 \end_inset
16567
16568  in cool blue, followed by the label, 
16569 \begin_inset Quotes eld
16570 \end_inset
16571
16572 NewSlide:
16573 \begin_inset Quotes erd
16574 \end_inset
16575
16576 .
16577  Any text or paragraph environments that follow this one go on the new slide.
16578  It's that simple.
16579 \end_layout
16580
16581 \begin_layout Standard
16582 Slides are probably the only time you'll need to forcibly end pages in LyX
16583  (this can be specified in the 
16584 \family sans
16585 Paragraph Layout
16586 \family default
16587  dialog).
16588  In fact, you'll want to, once you finish entering the contents of one slide.
16589  If you've entered more text than can physically fit on a slide, the extra
16590  overflows onto a new slide.
16591  I don't recommend doing this, however, since the overflow slide won't have
16592  any page number on it.
16593  Furthermore, it may interfere with any 
16594 \family sans
16595 Overlay
16596 \family default
16597  you've made to accompany the oversized 
16598 \family sans
16599 Slide
16600 \family default
16601 .
16602 \end_layout
16603
16604 \begin_layout Standard
16605 The 
16606 \family sans
16607 Overlay
16608 \family default
16609  and 
16610 \family sans
16611 Note
16612 \family default
16613  environments work the same way as the 
16614 \family sans
16615 Slide
16616 \family default
16617  environment.
16618  They both create an 
16619 \begin_inset Quotes eld
16620 \end_inset
16621
16622 ASCII line
16623 \begin_inset Quotes erd
16624 \end_inset
16625
16626  followed by a label [
16627 \begin_inset Quotes eld
16628 \end_inset
16629
16630 NewOverlay:
16631 \begin_inset Quotes erd
16632 \end_inset
16633
16634  and 
16635 \begin_inset Quotes eld
16636 \end_inset
16637
16638 NewNote:
16639 \begin_inset Quotes erd
16640 \end_inset
16641
16642 , respectively].
16643  The color is a stunning magenta instead of blue, and the 
16644 \begin_inset Quotes eld
16645 \end_inset
16646
16647 ASCII line
16648 \begin_inset Quotes erd
16649 \end_inset
16650
16651  will look different, in style and in length.
16652  The label fonts of all three also differ from one another.
16653 \end_layout
16654
16655 \begin_layout Standard
16656 As with a 
16657 \family sans
16658 Slide
16659 \family default
16660 , if the contents of a 
16661 \family sans
16662 Note
16663 \family default
16664  or 
16665 \family sans
16666 Overlay
16667 \family default
16668  exceed the physical size of a slide or sheet of paper, the extra will overflow
16669  onto a new sheet.
16670  Again, you should avoid this.
16671  It defeats the whole purpose of 
16672 \family sans
16673 Note
16674 \family default
16675 s and 
16676 \family sans
16677 Overlay
16678 \family default
16679 s.
16680 \end_layout
16681
16682 \begin_layout Subsubsection
16683 Using 
16684 \family sans
16685 Overlay
16686 \family default
16687  with 
16688 \family sans
16689 Slide
16690 \end_layout
16691
16692 \begin_layout Standard
16693 The idea behind an 
16694 \family sans
16695 Overlay
16696 \family default
16697  is a slide that sits atop another slide.
16698  Perhaps you wish to discuss a figure on the main 
16699 \family sans
16700 Slide
16701 \family default
16702  before displaying the text associated with it.
16703  One way to accomplish this is tape a flap of dark paper over the part of
16704  the 
16705 \family sans
16706 Slide
16707 \family default
16708  you want to display later.
16709  This method fails, however, if you wish to overlap one graph with another,
16710  for example.
16711  You would then have to fumble while speaking to align the two separate,
16712  overlapping 
16713 \family sans
16714 Slide
16715 \family default
16716 s to align the two graphs.
16717  The use of an 
16718 \family sans
16719 Overlay
16720 \family default
16721  environment in both cases makes life much easier.
16722 \end_layout
16723
16724 \begin_layout Standard
16725 Each 
16726 \family sans
16727 Overlay
16728 \family default
16729  receives the page number of its 
16730 \begin_inset Quotes eld
16731 \end_inset
16732
16733 parent
16734 \begin_inset Quotes erd
16735 \end_inset
16736
16737  
16738 \family sans
16739 Slide
16740 \family default
16741 , appended by 
16742 \begin_inset Quotes eld
16743 \end_inset
16744
16745
16746 \family typewriter
16747 -a
16748 \family default
16749
16750 \begin_inset Quotes erd
16751 \end_inset
16752
16753 .
16754 \begin_inset Foot
16755 status collapsed
16756
16757 \begin_layout Plain Layout
16758 Presumably, mutliple 
16759 \family sans
16760 Overlay
16761 \family default
16762 s would have 
16763 \begin_inset Quotes eld
16764 \end_inset
16765
16766
16767 \family typewriter
16768 -a
16769 \family default
16770
16771 \begin_inset Quotes erd
16772 \end_inset
16773
16774
16775 \begin_inset Quotes eld
16776 \end_inset
16777
16778
16779 \family typewriter
16780 -b
16781 \family default
16782
16783 \begin_inset Quotes erd
16784 \end_inset
16785
16786
16787 \begin_inset Quotes eld
16788 \end_inset
16789
16790
16791 \family typewriter
16792 -c
16793 \family default
16794
16795 \begin_inset Quotes erd
16796 \end_inset
16797
16798 , etc.
16799 \begin_inset space ~
16800 \end_inset
16801
16802 appended to the page number of the parent 
16803 \family sans
16804 Slide
16805 \family default
16806 .
16807  
16808 \end_layout
16809
16810 \end_inset
16811
16812  Clearly, you want the contents of both the 
16813 \family sans
16814 Slide
16815 \family default
16816  and the 
16817 \family sans
16818 Overlay
16819 \family default
16820  to each fit on a single physical slide! You should probably consider an
16821  
16822 \family sans
16823 Overlay
16824 \family default
16825  as 
16826 \begin_inset Quotes eld
16827 \end_inset
16828
16829 part of
16830 \begin_inset Quotes erd
16831 \end_inset
16832
16833  a 
16834 \family sans
16835 Slide
16836 \family default
16837 .
16838  Indeed, the LyX 
16839 \family sans
16840 slides
16841 \family default
16842  class provides a visual cue for this: the label at the start of an 
16843 \family sans
16844 Overlay
16845 \family default
16846  is shorter than that at the start of a 
16847 \family sans
16848 Slide
16849 \family default
16850 .
16851  Lastly, when you generate printable output, you'll find alignment markers
16852  in all four corners of both the 
16853 \family sans
16854 Overlay
16855 \family default
16856  page and its parent 
16857 \family sans
16858 Slide
16859 \family default
16860 .
16861  These will assist you in lining up the two physical slides.
16862 \end_layout
16863
16864 \begin_layout Standard
16865 The major problem in overlaying two slides is aligning the contents of the
16866  two transparencies.
16867  How much space should you leave for that graph on the second slide? Worse
16868  still, what if you want a graph and a sentence on second slide, but there
16869  is text on the main transparency that goes in between them? You could try
16870  and insert vertical space of the right size.
16871  The better way is to use 
16872 \family sans
16873 InvisibleText
16874 \family default
16875  and 
16876 \family sans
16877 VisibleText
16878 \family default
16879 .
16880 \end_layout
16881
16882 \begin_layout Standard
16883 As their names imply, 
16884 \family sans
16885 InvisibleText
16886 \family default
16887  and 
16888 \family sans
16889 VisibleText
16890 \family default
16891  are two command-like paragraph environments that make all subsequent text
16892  invisible and visible, respectively.
16893  Note from section
16894 \begin_inset space ~
16895 \end_inset
16896
16897
16898 \begin_inset CommandInset ref
16899 LatexCommand ref
16900 reference "sec:slideQuirk"
16901
16902 \end_inset
16903
16904  that you don't place anything 
16905 \emph on
16906 into
16907 \emph default
16908  these two environments, however.
16909  When you create an 
16910 \family sans
16911 InvisibleText
16912 \family default
16913 , it inserts a centered, sky-blue label into the page reading 
16914 \begin_inset Quotes eld
16915 \end_inset
16916
16917 <Invisible Text Follows>
16918 \begin_inset Quotes erd
16919 \end_inset
16920
16921 .
16922  For paragraphs following this label, the parts of the 
16923 \family sans
16924 Slide
16925 \family default
16926  [or 
16927 \family sans
16928 Overlay
16929 \family default
16930 ; it doesn't matter which] where they would be contain instead blank space.
16931  
16932 \end_layout
16933
16934 \begin_layout Standard
16935 For 
16936 \family sans
16937 VisibleText
16938 \family default
16939 , the corresponding centered label is 
16940 \begin_inset Quotes eld
16941 \end_inset
16942
16943 <Visible Text Follows>
16944 \begin_inset Quotes erd
16945 \end_inset
16946
16947  in blazing green.
16948  Paragraphs following this label behave normally.
16949  Note that the beginning of a new 
16950 \family sans
16951 Slide
16952 \family default
16953
16954 \family sans
16955 Overlay
16956 \family default
16957 , or 
16958 \family sans
16959 Note
16960 \family default
16961  automatically shuts off an 
16962 \family sans
16963 InvisibleText
16964 \family default
16965 .
16966  It's therefore not necessary to use 
16967 \family sans
16968 VisibleText
16969 \family default
16970  at the end of a 
16971 \family sans
16972 Slide
16973 \family default
16974 .
16975 \end_layout
16976
16977 \begin_layout Standard
16978 By now, it should be obvious how to create overlay transparencies using
16979  the proper combination of 
16980 \family sans
16981 InvisibleText
16982 \family default
16983  and 
16984 \family sans
16985 VisibleText
16986 \family default
16987  on a 
16988 \family sans
16989 Slide
16990 \family default
16991  and 
16992 \family sans
16993 Overlay
16994 \family default
16995 :
16996 \end_layout
16997
16998 \begin_layout Enumerate
16999 Create a 
17000 \family sans
17001 Slide
17002 \family default
17003 , including everything that will appear on it, whether on the main slide
17004  or on the 
17005 \family sans
17006 Overlay
17007 \family default
17008 .
17009 \end_layout
17010
17011 \begin_layout Enumerate
17012 Before each figure or paragraph that will appear only on the 
17013 \family sans
17014 Overlay
17015 \family default
17016 , insert an 
17017 \family sans
17018 InvisibleText
17019 \family default
17020  environment.
17021  If necessary, insert a 
17022 \family sans
17023 VisibleText
17024 \family default
17025  environment after the 
17026 \family sans
17027 Overlay
17028 \family default
17029 -only text.
17030 \end_layout
17031
17032 \begin_layout Enumerate
17033 Start an 
17034 \family sans
17035 Overlay
17036 \family default
17037  immediately following the 
17038 \family sans
17039 Slide
17040 \family default
17041 .
17042 \end_layout
17043
17044 \begin_layout Enumerate
17045 Copy the contents of this 
17046 \family sans
17047 Slide
17048 \family default
17049  into the 
17050 \family sans
17051 Overlay
17052 \family default
17053 .
17054 \end_layout
17055
17056 \begin_layout Enumerate
17057 Within the 
17058 \family sans
17059 Overlay
17060 \family default
17061 , change all of the 
17062 \family sans
17063 InvisibleText
17064 \family default
17065  lines to 
17066 \family sans
17067 VisibleText
17068 \family default
17069  and vice-versa.
17070 \end_layout
17071
17072 \begin_layout Standard
17073 That's it.
17074  You've just made an 
17075 \family sans
17076 Overlay
17077 \family default
17078 .
17079 \end_layout
17080
17081 \begin_layout Standard
17082 There's one problem with the way I've designed the LyX 
17083 \family sans
17084 slides
17085 \family default
17086  class: you can't make text in the middle of a paragraph invisible, nor
17087  make text in the middle of an invisible paragraph visible again.
17088  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17089 \begin_inset Foot
17090 status collapsed
17091
17092 \begin_layout Plain Layout
17093 The commands of interest are: 
17094 \end_layout
17095
17096 \begin_layout Itemize
17097
17098 \family typewriter
17099 {
17100 \backslash
17101 invisible \SpecialChar \ldots{}
17102  }
17103 \end_layout
17104
17105 \begin_layout Itemize
17106
17107 \family typewriter
17108 {
17109 \backslash
17110 visible \SpecialChar \ldots{}
17111  }
17112 \end_layout
17113
17114 \begin_layout Plain Layout
17115 \SpecialChar \ldots{}
17116 and need to be marked as TeX.
17117  The text whose 
17118 \begin_inset Quotes eld
17119 \end_inset
17120
17121 visibility
17122 \begin_inset Quotes erd
17123 \end_inset
17124
17125  you wish to change goes in between the brackets [and after the 
17126 \family typewriter
17127
17128 \backslash
17129 invisible
17130 \family default
17131  or 
17132 \family typewriter
17133
17134 \backslash
17135 visible
17136 \family default
17137  command].
17138  If you don't know how to mark text as TeX, see the appropriate section
17139  of the 
17140 \emph on
17141 User's Guide
17142 \emph default
17143 .
17144 \end_layout
17145
17146 \end_inset
17147
17148
17149 \end_layout
17150
17151 \begin_layout Subsubsection
17152 Using 
17153 \family sans
17154 Note
17155 \family default
17156  with 
17157 \family sans
17158 Slide
17159 \family default
17160
17161 \begin_inset CommandInset label
17162 LatexCommand label
17163 name "sec:slideNote"
17164
17165 \end_inset
17166
17167
17168 \end_layout
17169
17170 \begin_layout Standard
17171 Like an 
17172 \family sans
17173 Overlay
17174 \family default
17175 , a 
17176 \family sans
17177 Note
17178 \family default
17179  is associated with a 
17180 \begin_inset Quotes eld
17181 \end_inset
17182
17183 parent
17184 \begin_inset Quotes erd
17185 \end_inset
17186
17187  
17188 \family sans
17189 Slide
17190 \family default
17191 .
17192  Here, too, the LyX 
17193 \family sans
17194 slides
17195 \family default
17196  class provides visual cues.
17197  The label for a 
17198 \family sans
17199 Note
17200 \family default
17201  is shorter than that of a 
17202 \family sans
17203 Slide
17204 \family default
17205  [yet longer than that of an 
17206 \family sans
17207 Overlay
17208 \family default
17209 ] and, like the label of an 
17210 \family sans
17211 Overlay
17212 \family default
17213  is shockingly magenta.
17214  Additionally, the printed 
17215 \family sans
17216 Note
17217 \family default
17218  has the page number of its 
17219 \begin_inset Quotes eld
17220 \end_inset
17221
17222 parent
17223 \begin_inset Quotes erd
17224 \end_inset
17225
17226  
17227 \family sans
17228 Slide
17229 \family default
17230 , appended by 
17231 \begin_inset Quotes eld
17232 \end_inset
17233
17234
17235 \family typewriter
17236 -
17237 \family default
17238 1
17239 \begin_inset Quotes erd
17240 \end_inset
17241
17242
17243 \begin_inset Quotes eld
17244 \end_inset
17245
17246
17247 \family typewriter
17248 -
17249 \family default
17250 2
17251 \begin_inset Quotes erd
17252 \end_inset
17253
17254
17255 \begin_inset Quotes eld
17256 \end_inset
17257
17258
17259 \family typewriter
17260 -
17261 \family default
17262 3
17263 \begin_inset Quotes erd
17264 \end_inset
17265
17266 , etc.
17267  You can have multiple 
17268 \family sans
17269 Note
17270 \family default
17271 s associated with a single 
17272 \family sans
17273 Slide
17274 \family default
17275 , and, as with 
17276 \family sans
17277 Slide
17278 \family default
17279  and 
17280 \family sans
17281 Overlay
17282 \family default
17283 , you'll probably want to break up long 
17284 \family sans
17285 Note
17286 \family default
17287 s so that they fit on a single sheet of paper.
17288 \end_layout
17289
17290 \begin_layout Standard
17291 The purpose of a 
17292 \family sans
17293 Note
17294 \family default
17295  is obvious: it contains anything additional you might want to say about
17296  a 
17297 \family sans
17298 Slide
17299 \family default
17300 .
17301  It could also be used as a sheet of reminders for a particular 
17302 \family sans
17303 Slide
17304 \family default
17305 .
17306  In the case of the latter, you might want to make use of time markers.
17307  Currently, the LyX 
17308 \family sans
17309 slides
17310 \family default
17311  class has no 
17312 \begin_inset Quotes eld
17313 \end_inset
17314
17315 native
17316 \begin_inset Quotes erd
17317 \end_inset
17318
17319  support for time markers, a 
17320 \noun on
17321 SliTeX
17322 \noun default
17323  feature.
17324  So, you'll have to resort to using the LaTeX codes.
17325 \end_layout
17326
17327 \begin_layout Standard
17328 To use time markers, you'll need to specify the extra class option 
17329 \begin_inset Quotes eld
17330 \end_inset
17331
17332
17333 \family typewriter
17334 clock
17335 \family default
17336
17337 \begin_inset Quotes erd
17338 \end_inset
17339
17340  [see section
17341 \begin_inset space ~
17342 \end_inset
17343
17344
17345 \begin_inset CommandInset ref
17346 LatexCommand ref
17347 reference "sec:slidesetup"
17348
17349 \end_inset
17350
17351 ].
17352  This option turns on timing marks, which will appear in the lower-left-hand
17353  corner of every 
17354 \family sans
17355 Note
17356 \family default
17357  you generate.
17358  To set what appears in the time marker, you use the LaTeX commands 
17359 \begin_inset Quotes eld
17360 \end_inset
17361
17362
17363 \family typewriter
17364
17365 \backslash
17366 settime{}
17367 \family default
17368
17369 \begin_inset Quotes erd
17370 \end_inset
17371
17372  and 
17373 \begin_inset Quotes eld
17374 \end_inset
17375
17376
17377 \family typewriter
17378
17379 \backslash
17380 addtime{}
17381 \family default
17382
17383 \begin_inset Quotes erd
17384 \end_inset
17385
17386 .
17387  The arguments of both commands are time measured in seconds.
17388  
17389 \begin_inset Quotes eld
17390 \end_inset
17391
17392
17393 \family typewriter
17394
17395 \backslash
17396 settime{}
17397 \family default
17398
17399 \begin_inset Quotes erd
17400 \end_inset
17401
17402  sets the time marker to a given time.
17403  
17404 \begin_inset Quotes eld
17405 \end_inset
17406
17407
17408 \family typewriter
17409
17410 \backslash
17411 addtime{}
17412 \family default
17413
17414 \begin_inset Quotes erd
17415 \end_inset
17416
17417  increments the time marker by the specified amount.
17418  Using time markers and 
17419 \family sans
17420 Note
17421 \family default
17422 s in this fashion, you can remind yourself how much time to spend on a particula
17423
17424 \family sans
17425 Slide
17426 \family default
17427 .
17428 \end_layout
17429
17430 \begin_layout Standard
17431 There's one last feature to describe.
17432  Clearly, you'd like to print out all of your 
17433 \family sans
17434 Slide
17435 \family default
17436 s and 
17437 \family sans
17438 Overlay
17439 \family default
17440 s on transparencies while printing all of your 
17441 \family sans
17442 Note
17443 \family default
17444 s on plain paper.
17445  However, a 
17446 \family sans
17447 Note
17448 \family default
17449  
17450 \emph on
17451 must
17452 \emph default
17453  follow the 
17454 \family sans
17455 Slide
17456 \family default
17457  with which it is associated.
17458  What's a person to do?
17459 \end_layout
17460
17461 \begin_layout Standard
17462 Luckily, there are two LaTeX commands that allow you to select what to print
17463  out.
17464  Both must be placed into the preamble of your document.
17465  The command 
17466 \begin_inset Quotes eld
17467 \end_inset
17468
17469
17470 \family typewriter
17471
17472 \backslash
17473 onlyslides{
17474 \backslash
17475 slides}
17476 \family default
17477
17478 \begin_inset Quotes erd
17479 \end_inset
17480
17481  will cause the output to contain only the 
17482 \family sans
17483 Slide
17484 \family default
17485 s and 
17486 \family sans
17487 Overlay
17488 \family default
17489 s.
17490  Correspondingly, the command 
17491 \begin_inset Quotes eld
17492 \end_inset
17493
17494
17495 \family typewriter
17496
17497 \backslash
17498 onlynotes{
17499 \backslash
17500 notes}
17501 \family default
17502
17503 \begin_inset Quotes erd
17504 \end_inset
17505
17506  prevents the output of anything but 
17507 \family sans
17508 Note
17509 \family default
17510 s.
17511  I'd advise placing both commands in the preamble and initially comment
17512  both out.
17513  You can then preview your entire presentation as you write.
17514  When you're done writing, you can then uncomment one of the two to select
17515  what you want to print.
17516  I like to uncomment 
17517 \begin_inset Quotes eld
17518 \end_inset
17519
17520
17521 \family typewriter
17522
17523 \backslash
17524 onlyslides{
17525 \backslash
17526 slides}
17527 \family default
17528
17529 \begin_inset Quotes erd
17530 \end_inset
17531
17532  , print to a file with 
17533 \begin_inset Quotes eld
17534 \end_inset
17535
17536
17537 \family typewriter
17538 -slides
17539 \family default
17540
17541 \begin_inset Quotes erd
17542 \end_inset
17543
17544  in its name, comment it back out, then uncomment 
17545 \begin_inset Quotes eld
17546 \end_inset
17547
17548
17549 \family typewriter
17550
17551 \backslash
17552 onlynotes{
17553 \backslash
17554 notes}
17555 \family default
17556
17557 \begin_inset Quotes erd
17558 \end_inset
17559
17560  and print to a 
17561 \begin_inset Quotes eld
17562 \end_inset
17563
17564
17565 \family typewriter
17566 *-notes.ps
17567 \family default
17568
17569 \begin_inset Quotes erd
17570 \end_inset
17571
17572  file.
17573  I can then send either file to a printer, loading transparencies or plain
17574  paper as appropriate.
17575 \end_layout
17576
17577 \begin_layout Standard
17578 You can also provide other arguments to the 
17579 \begin_inset Quotes eld
17580 \end_inset
17581
17582
17583 \family typewriter
17584
17585 \backslash
17586 onlyslides{}
17587 \family default
17588
17589 \begin_inset Quotes erd
17590 \end_inset
17591
17592  and 
17593 \begin_inset Quotes eld
17594 \end_inset
17595
17596
17597 \family typewriter
17598
17599 \backslash
17600 onlynotes{}
17601 \family default
17602
17603 \begin_inset Quotes erd
17604 \end_inset
17605
17606  commands.
17607  See a good LaTeX book for details.
17608 \end_layout
17609
17610 \begin_layout Subsection
17611 The 
17612 \family sans
17613 slides
17614 \family default
17615  Class Template File
17616 \end_layout
17617
17618 \begin_layout Standard
17619 I have also provided a template file, 
17620 \begin_inset Quotes eld
17621 \end_inset
17622
17623
17624 \family typewriter
17625 slides.lyx
17626 \family default
17627
17628 \begin_inset Quotes erd
17629 \end_inset
17630
17631 , with the 
17632 \family sans
17633 slides
17634 \family default
17635  class.
17636  To use it, begin your new presentation with 
17637 \family sans
17638 \bar under
17639 F
17640 \bar default
17641 ile\SpecialChar \menuseparator
17642 New
17643 \begin_inset space ~
17644 \end_inset
17645
17646 from
17647 \begin_inset space ~
17648 \end_inset
17649
17650
17651 \bar under
17652 T
17653 \bar default
17654 emplate
17655 \family default
17656 .
17657  Your new LyX presentation file will contain an example 
17658 \family sans
17659 Slide
17660 \family default
17661  – 
17662 \family sans
17663 Overlay
17664 \family default
17665  – 
17666 \family sans
17667 Note
17668 \family default
17669  triplet.
17670  The 
17671 \family sans
17672 Slide
17673 \family default
17674  and 
17675 \family sans
17676 Overlay
17677 \family default
17678  additionally contain an example of the use of 
17679 \family sans
17680 InvisibleText
17681 \family default
17682  and 
17683 \family sans
17684 VisibleText
17685 \family default
17686 .
17687  Lastly, the preamble will contain:
17688 \end_layout
17689
17690 \begin_layout LyX-Code
17691 % Uncomment to print out only slides and overlays
17692 \end_layout
17693
17694 \begin_layout LyX-Code
17695 %
17696 \end_layout
17697
17698 \begin_layout LyX-Code
17699 %
17700 \backslash
17701 onlyslides{
17702 \backslash
17703 slides}
17704 \begin_inset Newline newline
17705 \end_inset
17706
17707  
17708 \end_layout
17709
17710 \begin_layout LyX-Code
17711 % Uncomment to print out only notes
17712 \end_layout
17713
17714 \begin_layout LyX-Code
17715 %
17716 \end_layout
17717
17718 \begin_layout LyX-Code
17719 %
17720 \backslash
17721 onlynotes{
17722 \backslash
17723 notes}
17724 \end_layout
17725
17726 \begin_layout Standard
17727 One final thing: I created this class to support the LaTeX2e 
17728 \begin_inset Quotes eld
17729 \end_inset
17730
17731
17732 \noun on
17733 SliTeX
17734 \noun default
17735  emulation
17736 \begin_inset Quotes erd
17737 \end_inset
17738
17739  class, one of the built-in LaTeX2e classes.
17740  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17741  built-in slide class.
17742  It's here if you want it or need it.
17743  There exist other LaTeX2e classes for creating presentations, such as the
17744  
17745 \family sans
17746 Foils
17747 \family default
17748  class [see section
17749 \begin_inset space ~
17750 \end_inset
17751
17752
17753 \begin_inset CommandInset ref
17754 LatexCommand ref
17755 reference "sec:foiltex"
17756
17757 \end_inset
17758
17759 ] or the 
17760 \begin_inset Quotes eld
17761 \end_inset
17762
17763
17764 \family typewriter
17765 seminar
17766 \family default
17767
17768 \begin_inset Quotes erd
17769 \end_inset
17770
17771  package [present on some TeX distributions].
17772  The latter is not yet supported under LyX.
17773 \begin_inset Foot
17774 status collapsed
17775
17776 \begin_layout Plain Layout
17777 Perhaps you can take on the task\SpecialChar \ldots{}
17778
17779 \end_layout
17780
17781 \end_inset
17782
17783  I know nothing about these other classes.
17784  Try them out to see what sort of alternative they provide.
17785 \end_layout
17786
17787 \begin_layout Chapter
17788 LyX Features needing Extra Software
17789 \end_layout
17790
17791 \begin_layout Section
17792 Checking TeX
17793 \end_layout
17794
17795 \begin_layout Standard
17796 by 
17797 \noun on
17798 Asger Alstrup
17799 \end_layout
17800
17801 \begin_layout Subsection
17802 Introduction
17803 \end_layout
17804
17805 \begin_layout Standard
17806 If you have the 
17807 \family typewriter
17808 chktex
17809 \family default
17810  program installed
17811 \begin_inset Foot
17812 status collapsed
17813
17814 \begin_layout Plain Layout
17815
17816 \family typewriter
17817 chktex
17818 \family default
17819  is not yet available when you are using the LaTeX distribution MiKTeX.
17820 \end_layout
17821
17822 \end_inset
17823
17824 , you'll find in the 
17825 \family sans
17826 Tools
17827 \family default
17828  menu the entry: 
17829 \family sans
17830 Check
17831 \begin_inset space ~
17832 \end_inset
17833
17834 TeX
17835 \family default
17836 .
17837  You can get 
17838 \family typewriter
17839 chktex
17840 \family default
17841  from CTAN,
17842 \begin_inset Newline newline
17843 \end_inset
17844
17845
17846 \begin_inset CommandInset href
17847 LatexCommand href
17848 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17849
17850 \end_inset
17851
17852 .
17853 \end_layout
17854
17855 \begin_layout Standard
17856 The 
17857 \family sans
17858 ChkTeX
17859 \family default
17860  package is a program that was written by 
17861 \begin_inset Flex Noun
17862 status collapsed
17863
17864 \begin_layout Plain Layout
17865 Jens T.
17866 \begin_inset space ~
17867 \end_inset
17868
17869 Berger Thielemann
17870 \end_layout
17871
17872 \end_inset
17873
17874  in frustration because some constructs in LaTeX are sometimes non-intuitive,
17875  and easy to forget.
17876  The program runs over your LaTeX file, checks the integrity of the file,
17877  and flags some common errors.
17878  In other technical words, it is 
17879 \family typewriter
17880 lint
17881 \family default
17882  for LaTeX.
17883 \end_layout
17884
17885 \begin_layout Standard
17886 Well, what is a syntax checker doing in LyX which is supposed to produce
17887  correct LaTeX anyways? The answer is simple: Just as 
17888 \family typewriter
17889 Lint
17890 \family default
17891  not only checks the 
17892 \emph on
17893 syntax
17894 \emph default
17895  of C programs, but also does 
17896 \emph on
17897 semantic
17898 \emph default
17899  checks for type-errors, 
17900 \family sans
17901 ChkTeX
17902 \family default
17903  catches some common 
17904 \emph on
17905 typographic
17906 \emph default
17907  errors, in addition to the syntactical ones.
17908  Specifically, 
17909 \family sans
17910 ChkTeX
17911 \family default
17912  is capable of detecting several common errors, such as
17913 \end_layout
17914
17915 \begin_layout Itemize
17916 Ellipsis detection:
17917 \begin_inset Newline newline
17918 \end_inset
17919
17920 Use \SpecialChar \ldots{}
17921  instead of ...
17922 \end_layout
17923
17924 \begin_layout Itemize
17925 No space in front of/after parenthesis:
17926 \begin_inset Newline newline
17927 \end_inset
17928
17929 ( wrong spacing )
17930 \end_layout
17931
17932 \begin_layout Itemize
17933 Enforcement of normal space after common abbreviations:
17934 \begin_inset Newline newline
17935 \end_inset
17936
17937 e.
17938 \begin_inset space \thinspace{}
17939 \end_inset
17940
17941 g.
17942 \begin_inset space \space{}
17943 \end_inset
17944
17945 is too wide spacing.
17946 \end_layout
17947
17948 \begin_layout Itemize
17949 Enforcement of end-of-sentence space when the last sentence ends with a
17950  capital letter:
17951 \begin_inset Newline newline
17952 \end_inset
17953
17954 This is a TEST.
17955  And this is wrong spacing.
17956 \end_layout
17957
17958 \begin_layout Itemize
17959 Space in front of labels and similar commands:
17960 \begin_inset Newline newline
17961 \end_inset
17962
17963 The label should stick right up to the text to avoid falling to a wrong
17964  page.
17965  
17966 \begin_inset CommandInset label
17967 LatexCommand label
17968 name "sec:chktex"
17969
17970 \end_inset
17971
17972  
17973 \begin_inset Foot
17974 status collapsed
17975
17976 \begin_layout Plain Layout
17977 This footnote is in danger of falling off to a wrong page
17978 \end_layout
17979
17980 \end_inset
17981
17982  The label is separated too much.
17983 \end_layout
17984
17985 \begin_layout Itemize
17986 Space in front of references, instead of hard spaces:
17987 \begin_inset Newline newline
17988 \end_inset
17989
17990 If you have bad luck, the text will break right between the referenced text
17991  and reference number, and that's a pity.
17992  See section 
17993 \begin_inset CommandInset ref
17994 LatexCommand ref
17995 reference "sec:chktex"
17996
17997 \end_inset
17998
17999 .
18000 \end_layout
18001
18002 \begin_layout Itemize
18003 Use of 
18004 \begin_inset Quotes eld
18005 \end_inset
18006
18007 x
18008 \begin_inset Quotes erd
18009 \end_inset
18010
18011  instead of 
18012 \begin_inset Formula $\times$
18013 \end_inset
18014
18015  between numbers:
18016 \begin_inset Newline newline
18017 \end_inset
18018
18019 2x2 looks cheap compared to 
18020 \begin_inset Formula $2\times2$
18021 \end_inset
18022
18023 .
18024 \end_layout
18025
18026 \begin_layout Standard
18027 and more \SpecialChar \ldots{}
18028  It is an invaluable tool when you are 
18029 \begin_inset Quotes eld
18030 \end_inset
18031
18032 finishing up
18033 \begin_inset Quotes erd
18034 \end_inset
18035
18036  your document before printing, and you should run it right after the obligatory
18037  spelling check, and before you go fine tuning the typesetting.
18038 \end_layout
18039
18040 \begin_layout Subsection
18041 How to use it
18042 \end_layout
18043
18044 \begin_layout Standard
18045 If you have the program installed, usage is as simple as choosing 
18046 \family sans
18047 Tools\SpecialChar \menuseparator
18048 Check
18049 \begin_inset space ~
18050 \end_inset
18051
18052 TeX
18053 \family default
18054 .
18055  This will make LyX generate a LaTeX file of your document, start 
18056 \family sans
18057 ChkTeX
18058 \family default
18059  to check it, and then make LyX insert 
18060 \begin_inset Quotes eld
18061 \end_inset
18062
18063 error boxes
18064 \begin_inset Quotes erd
18065 \end_inset
18066
18067  with the warnings from 
18068 \family sans
18069 ChkTeX
18070 \family default
18071 , if there were any.
18072  The warnings will be placed close to the point of the mistake, and you
18073  can quickly find them by using the 
18074 \family sans
18075 Navigate\SpecialChar \menuseparator
18076 Error
18077 \family default
18078  menu item, or the shortcut key 
18079 \family sans
18080 C-g
18081 \family default
18082  from the default 
18083 \family typewriter
18084 cua
18085 \family default
18086  bind file.
18087  Open the error boxes by clicking on them with the mouse, or use the shortcut
18088  key 
18089 \family sans
18090 C-i
18091 \family default
18092  from 
18093 \family typewriter
18094 cua
18095 \family default
18096  bindings, or the corresponding 
18097 \family sans
18098 C-o
18099 \family default
18100  for the alternate 
18101 \family typewriter
18102 emacs
18103 \family default
18104  bind file.
18105  Read the warning and correct the mistake, if it is a mistake.
18106  If you have trouble understanding what the warning is about, you can safely
18107  ignore it.
18108  Remember that there is a hidden layer between the document on screen and
18109  the technical details in invoking 
18110 \family sans
18111 ChkTeX
18112 \family default
18113 , and this gap can make some warnings seem arcane or just plain silly.
18114 \end_layout
18115
18116 \begin_layout Standard
18117 This document is an excellent testing bed for the feature, and it should
18118  provide quite a few warnings for you to fiddle with.
18119  Since computers are only so smart, expect most of the warnings to be false
18120  alarms, though.
18121 \end_layout
18122
18123 \begin_layout Subsection
18124 How to fine tune it
18125 \end_layout
18126
18127 \begin_layout Standard
18128 Sometimes, you'll find that 
18129 \family sans
18130 ChkTeX
18131 \family default
18132  makes more noise than suits your mood.
18133  Then you can choose not to use it, wait until your mood changes, or try
18134  to customize 
18135 \family sans
18136 ChkTeX
18137 \family default
18138  to get better along with you.
18139 \end_layout
18140
18141 \begin_layout Standard
18142 Although 
18143 \family sans
18144 ChkTeX
18145 \family default
18146  
18147 \emph on
18148 is
18149 \emph default
18150  very configurable and extensible, you shouldn't expect to solve all problems
18151  with 
18152 \family sans
18153 ChkTeX
18154 \family default
18155  in LyX this way.
18156  Since LyX has to generate a somewhat special LaTeX file to be able to match
18157  the line numbers from the 
18158 \family sans
18159 ChkTeX
18160 \family default
18161  output
18162 \begin_inset Foot
18163 status collapsed
18164
18165 \begin_layout Plain Layout
18166 You can inspect the specific output from 
18167 \family sans
18168 chktex
18169 \family default
18170  by using 
18171 \family sans
18172 Edit\SpecialChar \menuseparator
18173 View
18174 \begin_inset space ~
18175 \end_inset
18176
18177 LaTeX
18178 \begin_inset space ~
18179 \end_inset
18180
18181 Log
18182 \family default
18183  right after a 
18184 \family sans
18185 chktex
18186 \family default
18187  run.
18188 \end_layout
18189
18190 \end_inset
18191
18192  to the internal document structure, some of the warnings will not appear
18193  correctly.
18194  There are two things you can do about this:
18195 \end_layout
18196
18197 \begin_layout Itemize
18198 Fine tune the 
18199 \family sans
18200 ChkTeX
18201 \family default
18202  invocation command line in 
18203 \begin_inset Flex MenuItem
18204 status collapsed
18205
18206 \begin_layout Plain Layout
18207 Tools\SpecialChar \menuseparator
18208 Preferences\SpecialChar \menuseparator
18209 Output\SpecialChar \menuseparator
18210 LaTeX\SpecialChar \menuseparator
18211 CheckTeX command
18212 \end_layout
18213
18214 \end_inset
18215
18216 , or the global 
18217 \family sans
18218 ChkTeX
18219 \family default
18220  installation configuration file (usually with the file 
18221 \family typewriter
18222 chktexrc
18223 \family default
18224 ).
18225  See below to learn what warnings can be enabled and disabled on the command
18226  line.
18227 \end_layout
18228
18229 \begin_layout Itemize
18230 Export your document as a raw LaTeX file using 
18231 \family sans
18232 File\SpecialChar \menuseparator
18233 Export\SpecialChar \menuseparator
18234 LaTeX
18235 \family default
18236  and run 
18237 \family typewriter
18238 chktex
18239 \family default
18240  manually on that.
18241  Invoked in this way, it can be a hassle to find the corresponding place
18242  in the document inside LyX, but with a little patience, you should be able
18243  to do it.
18244 \end_layout
18245
18246 \begin_layout Standard
18247 Here follows the warning messages that can be enabled and disabled in 
18248 \family sans
18249 Preferences
18250 \family default
18251 .
18252  Use 
18253 \family typewriter
18254 -n#
18255 \family default
18256  to disable a warning, and 
18257 \family typewriter
18258 -w#
18259 \family default
18260  to enable a warning.
18261  The emphasized entries are disabled by default, because the default is
18262  "
18263 \family typewriter
18264 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18265 \family default
18266 ".
18267 \end_layout
18268
18269 \begin_layout Standard
18270 Notice that you should only use the options that enable and disable warnings,
18271  because LyX relies on some of the other command line parameters to be set
18272  in a specific way to have a chance to communicate with 
18273 \family typewriter
18274 chktex
18275 \family default
18276 .
18277 \end_layout
18278
18279 \begin_layout Enumerate
18280
18281 \size small
18282 \emph on
18283 Command terminated with space.
18284 \end_layout
18285
18286 \begin_layout Enumerate
18287
18288 \size small
18289 Non-breaking space (
18290 \begin_inset Quotes eld
18291 \end_inset
18292
18293
18294 \family typewriter
18295 ~
18296 \family default
18297
18298 \begin_inset Quotes erd
18299 \end_inset
18300
18301 ) should have been used.
18302 \end_layout
18303
18304 \begin_layout Enumerate
18305
18306 \size small
18307 \emph on
18308 You should enclose the previous parenthesis with 
18309 \begin_inset Quotes eld
18310 \end_inset
18311
18312
18313 \family typewriter
18314 {}
18315 \family default
18316
18317 \begin_inset Quotes erd
18318 \end_inset
18319
18320 .
18321 \end_layout
18322
18323 \begin_layout Enumerate
18324
18325 \size small
18326 Italic correction (
18327 \begin_inset Quotes eld
18328 \end_inset
18329
18330
18331 \family typewriter
18332
18333 \backslash
18334 /
18335 \family default
18336
18337 \begin_inset Quotes erd
18338 \end_inset
18339
18340 ) found in non-italic buffer.
18341 \end_layout
18342
18343 \begin_layout Enumerate
18344
18345 \size small
18346 Italic correction (
18347 \begin_inset Quotes eld
18348 \end_inset
18349
18350
18351 \family typewriter
18352
18353 \backslash
18354 /
18355 \family default
18356
18357 \begin_inset Quotes erd
18358 \end_inset
18359
18360 ) found more than once.
18361 \end_layout
18362
18363 \begin_layout Enumerate
18364
18365 \size small
18366 \emph on
18367 No italic correction (
18368 \begin_inset Quotes eld
18369 \end_inset
18370
18371
18372 \family typewriter
18373
18374 \backslash
18375 /
18376 \family default
18377
18378 \begin_inset Quotes erd
18379 \end_inset
18380
18381 ) found.
18382 \end_layout
18383
18384 \begin_layout Enumerate
18385
18386 \size small
18387 Accent command 
18388 \begin_inset Quotes eld
18389 \end_inset
18390
18391
18392 \family typewriter
18393 cmd
18394 \family default
18395
18396 \begin_inset Quotes erd
18397 \end_inset
18398
18399  needs use of 
18400 \begin_inset Quotes eld
18401 \end_inset
18402
18403
18404 \family typewriter
18405 cmd
18406 \family default
18407
18408 \begin_inset Quotes erd
18409 \end_inset
18410
18411 .
18412 \end_layout
18413
18414 \begin_layout Enumerate
18415
18416 \size small
18417 Wrong length of dash may have been used.
18418 \end_layout
18419
18420 \begin_layout Enumerate
18421
18422 \size small
18423 \emph on
18424 \begin_inset Quotes eld
18425 \end_inset
18426
18427
18428 \family typewriter
18429 %s
18430 \family default
18431
18432 \begin_inset Quotes erd
18433 \end_inset
18434
18435  expected, found 
18436 \begin_inset Quotes eld
18437 \end_inset
18438
18439
18440 \family typewriter
18441 %s
18442 \family default
18443
18444 \begin_inset Quotes erd
18445 \end_inset
18446
18447 .
18448 \end_layout
18449
18450 \begin_layout Enumerate
18451
18452 \size small
18453 Solo 
18454 \begin_inset Quotes eld
18455 \end_inset
18456
18457
18458 \family typewriter
18459 %s
18460 \family default
18461
18462 \begin_inset Quotes erd
18463 \end_inset
18464
18465  found.
18466 \end_layout
18467
18468 \begin_layout Enumerate
18469
18470 \size small
18471 You should use 
18472 \begin_inset Quotes eld
18473 \end_inset
18474
18475
18476 \family typewriter
18477 %s
18478 \family default
18479
18480 \begin_inset Quotes erd
18481 \end_inset
18482
18483  to achieve an ellipsis.
18484 \end_layout
18485
18486 \begin_layout Enumerate
18487
18488 \size small
18489 Inter-word spacing (
18490 \begin_inset Quotes eld
18491 \end_inset
18492
18493
18494 \family typewriter
18495
18496 \backslash
18497
18498 \family default
18499  
18500 \begin_inset Quotes eld
18501 \end_inset
18502
18503 ) should perhaps be used.
18504 \end_layout
18505
18506 \begin_layout Enumerate
18507
18508 \size small
18509 Inter-sentence spacing (
18510 \begin_inset Quotes eld
18511 \end_inset
18512
18513
18514 \family typewriter
18515
18516 \backslash
18517 @
18518 \family default
18519
18520 \begin_inset Quotes erd
18521 \end_inset
18522
18523 ) should perhaps be used.
18524 \end_layout
18525
18526 \begin_layout Enumerate
18527
18528 \size small
18529 Could not find argument for command.
18530 \end_layout
18531
18532 \begin_layout Enumerate
18533
18534 \size small
18535 No match found for 
18536 \begin_inset Quotes eld
18537 \end_inset
18538
18539
18540 \family typewriter
18541 %s
18542 \family default
18543
18544 \begin_inset Quotes erd
18545 \end_inset
18546
18547 .
18548 \end_layout
18549
18550 \begin_layout Enumerate
18551
18552 \size small
18553 Math mode still on at end of LaTeX file.
18554 \end_layout
18555
18556 \begin_layout Enumerate
18557
18558 \size small
18559 Number of 
18560 \begin_inset Quotes eld
18561 \end_inset
18562
18563
18564 \family typewriter
18565 char
18566 \family default
18567
18568 \begin_inset Quotes erd
18569 \end_inset
18570
18571  doesn't match the number of 
18572 \begin_inset Quotes eld
18573 \end_inset
18574
18575
18576 \family typewriter
18577 char
18578 \family default
18579
18580 \begin_inset Quotes erd
18581 \end_inset
18582
18583 .
18584 \end_layout
18585
18586 \begin_layout Enumerate
18587
18588 \size small
18589 You should use either 
18590 \family typewriter
18591
18592 \begin_inset Quotes eld
18593 \end_inset
18594
18595
18596 \family default
18597  or 
18598 \family typewriter
18599
18600 \begin_inset Quotes erd
18601 \end_inset
18602
18603
18604 \family default
18605  as an alternative to 
18606 \begin_inset Quotes eld
18607 \end_inset
18608
18609
18610 \family typewriter
18611 "
18612 \family default
18613
18614 \begin_inset Quotes erd
18615 \end_inset
18616
18617 .
18618 \end_layout
18619
18620 \begin_layout Enumerate
18621
18622 \size small
18623 You should use "
18624 \family typewriter
18625 '
18626 \family default
18627 " (ASCII 39) instead of "
18628 \family typewriter
18629 ´
18630 \family default
18631 " (ASCII 180).
18632 \end_layout
18633
18634 \begin_layout Enumerate
18635
18636 \size small
18637 User-specified pattern found.
18638 \end_layout
18639
18640 \begin_layout Enumerate
18641
18642 \size small
18643 This command might not be intended.
18644 \end_layout
18645
18646 \begin_layout Enumerate
18647
18648 \size small
18649 \emph on
18650 Comment displayed.
18651 \end_layout
18652
18653 \begin_layout Enumerate
18654
18655 \size small
18656 Either 
18657 \family typewriter
18658 ''
18659 \backslash
18660 ,'
18661 \family default
18662  or 
18663 \family typewriter
18664 '
18665 \backslash
18666 ,''
18667 \family default
18668  will look better.
18669 \end_layout
18670
18671 \begin_layout Enumerate
18672
18673 \size small
18674 Delete this space to maintain correct page references.
18675 \end_layout
18676
18677 \begin_layout Enumerate
18678
18679 \size small
18680 \emph on
18681 You might wish to put this between a pair of 
18682 \begin_inset Quotes eld
18683 \end_inset
18684
18685
18686 \family typewriter
18687 {}
18688 \family default
18689
18690 \begin_inset Quotes erd
18691 \end_inset
18692
18693 .
18694 \end_layout
18695
18696 \begin_layout Enumerate
18697
18698 \size small
18699 You ought to remove spaces in front of punctuation.
18700 \end_layout
18701
18702 \begin_layout Enumerate
18703
18704 \size small
18705 Could not execute LaTeX command.
18706 \end_layout
18707
18708 \begin_layout Enumerate
18709
18710 \size small
18711 Don't use 
18712 \family typewriter
18713
18714 \backslash
18715 /
18716 \family default
18717  in front of small punctuation.
18718 \end_layout
18719
18720 \begin_layout Enumerate
18721
18722 \family typewriter
18723 \size small
18724 $
18725 \backslash
18726 times$
18727 \family default
18728  may look prettier here.
18729 \end_layout
18730
18731 \begin_layout Enumerate
18732
18733 \size small
18734 \emph on
18735 Multiple spaces detected in output.
18736 \end_layout
18737
18738 \begin_layout Enumerate
18739
18740 \size small
18741 This text may be ignored.
18742 \end_layout
18743
18744 \begin_layout Enumerate
18745
18746 \size small
18747 Use 
18748 \family typewriter
18749
18750 \begin_inset Quotes eld
18751 \end_inset
18752
18753
18754 \family default
18755  to begin quotation, not 
18756 \family typewriter
18757 '
18758 \family default
18759 .
18760 \end_layout
18761
18762 \begin_layout Enumerate
18763
18764 \size small
18765 Use 
18766 \family typewriter
18767 '
18768 \family default
18769  to end quotation, not 
18770 \family typewriter
18771
18772 \begin_inset Quotes eld
18773 \end_inset
18774
18775
18776 \family default
18777 .
18778 \end_layout
18779
18780 \begin_layout Enumerate
18781
18782 \size small
18783 Don't mix quotes.
18784 \end_layout
18785
18786 \begin_layout Enumerate
18787
18788 \size small
18789 You should perhaps use 
18790 \begin_inset Quotes eld
18791 \end_inset
18792
18793
18794 \family typewriter
18795 cmd
18796 \family default
18797
18798 \begin_inset Quotes erd
18799 \end_inset
18800
18801  instead.
18802 \end_layout
18803
18804 \begin_layout Enumerate
18805
18806 \size small
18807 You should put a space in front of/after parenthesis.
18808 \end_layout
18809
18810 \begin_layout Enumerate
18811
18812 \size small
18813 You should avoid spaces in front of/after parenthesis.
18814 \end_layout
18815
18816 \begin_layout Enumerate
18817
18818 \size small
18819 \emph on
18820 You should not use punctuation in front of/after quotes.
18821 \end_layout
18822
18823 \begin_layout Enumerate
18824
18825 \size small
18826 Double space found.
18827 \end_layout
18828
18829 \begin_layout Enumerate
18830
18831 \size small
18832 You should put punctuation outside inner/inside display math mode.
18833 \end_layout
18834
18835 \begin_layout Enumerate
18836
18837 \size small
18838 You ought to not use primitive TeX in LaTeX code.
18839 \end_layout
18840
18841 \begin_layout Enumerate
18842
18843 \size small
18844 You should remove spaces in front of 
18845 \begin_inset Quotes eld
18846 \end_inset
18847
18848
18849 \family typewriter
18850 %s
18851 \family default
18852
18853 \begin_inset Quotes erd
18854 \end_inset
18855
18856
18857 \end_layout
18858
18859 \begin_layout Enumerate
18860
18861 \size small
18862 \begin_inset Quotes eld
18863 \end_inset
18864
18865
18866 \family typewriter
18867 %s
18868 \family default
18869
18870 \begin_inset Quotes erd
18871 \end_inset
18872
18873  is normally not followed by 
18874 \begin_inset Quotes eld
18875 \end_inset
18876
18877
18878 \family typewriter
18879 %c
18880 \family default
18881
18882 \begin_inset Quotes erd
18883 \end_inset
18884
18885 .
18886 \end_layout
18887
18888 \begin_layout Standard
18889 In later versions of LyX, we hope to provide a more complete interface to
18890  this tool (and it's smaller cousin 
18891 \family typewriter
18892 lacheck
18893 \family default
18894 ) to exploit the full power of it.
18895  But it's not exactly useless as it is now: go try it on one of your existing
18896  documents of a certain length and be surprised.
18897 \end_layout
18898
18899 \begin_layout Section
18900 Version Control in LyX
18901 \end_layout
18902
18903 \begin_layout Standard
18904 by
18905 \noun on
18906  Lars Gullik Bjønnes 
18907 \noun default
18908 and 
18909 \noun on
18910 Pavel Sanda
18911 \end_layout
18912
18913 \begin_layout Subsection
18914 Introduction
18915 \end_layout
18916
18917 \begin_layout Standard
18918 LyX supports some of the most basic RCS/CVS/SVN commands.
18919  If you need something a bit more sophisticated you will have to do that
18920  manually in a terminal.
18921 \end_layout
18922
18923 \begin_layout Standard
18924 Also note that CVS support is not as good as subversion support so we advise
18925  using SVN instead.
18926  A good place to start learning Subversion is SVN Book
18927 \begin_inset Foot
18928 status open
18929
18930 \begin_layout Plain Layout
18931 \begin_inset CommandInset href
18932 LatexCommand href
18933 target "http://svnbook.red-bean.com/"
18934
18935 \end_inset
18936
18937
18938 \end_layout
18939
18940 \end_inset
18941
18942 .
18943  In the case of RCS you should read 
18944 \begin_inset Quotes eld
18945 \end_inset
18946
18947 rcsintro
18948 \begin_inset Quotes erd
18949 \end_inset
18950
18951  (a man file, read it with 
18952 \family typewriter
18953 man rcsintro
18954 \family default
18955 ).
18956  This file describes all the basic features of RCS.
18957  You should especially notice the comment about a RCS directory, and the
18958  notion of a master RCS file (the file ending in 
18959 \family typewriter
18960 ,v
18961 \family default
18962 ).
18963 \end_layout
18964
18965 \begin_layout Standard
18966 Before you begin to use the version control features in LyX, you should
18967  be familiar with RCS/CVS/SVN usage.
18968  The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18969  package—no guarantees are made for older versions.
18970  Most of the log messages are not currently displayed after operations —
18971  you can check them in the Messages pane if unsure.
18972  Regular users of version control will appreciate VC toolbar, which can
18973  be enabled via 
18974 \family sans
18975 View\SpecialChar \menuseparator
18976 Toolbars\SpecialChar \menuseparator
18977 Version
18978 \begin_inset space ~
18979 \end_inset
18980
18981 Control
18982 \family default
18983 .
18984 \end_layout
18985
18986 \begin_layout Standard
18987 For introducing your own external commands consult vc-command in the manual
18988  of LyX functions.
18989 \end_layout
18990
18991 \begin_layout Subsection
18992 RCS commands in LyX
18993 \end_layout
18994
18995 \begin_layout Standard
18996 The following sections describe the RCS commands supported by LyX.
18997  You can find them in the 
18998 \family sans
18999 File\SpecialChar \menuseparator
19000 Version
19001 \begin_inset space ~
19002 \end_inset
19003
19004 Control
19005 \family default
19006  submenu.
19007  LyX was tested against RCS 5.7/5.8
19008 \begin_inset Foot
19009 status open
19010
19011 \begin_layout Plain Layout
19012 Note that old DOS / MS Windows builds (5.7) need to setup environment variables
19013  in order to work properly with LyX.
19014  In particular time zone (TZ) should be set and more importantly RCSINIT
19015  in order to change default archive location ("SET RCSINIT=-x,v/") --- LyX
19016  expects archive to be found in file.lyx,v within the original document directory.
19017  See also README shipped with Windows RCS binaries.
19018 \end_layout
19019
19020 \end_inset
19021
19022 .
19023 \end_layout
19024
19025 \begin_layout Subsubsection
19026
19027 \family sans
19028 Register
19029 \end_layout
19030
19031 \begin_layout Standard
19032 If your document is not under revision control, this is the only item shown
19033  in the menu.
19034  And if it is under revision control, the 
19035 \family sans
19036 Register
19037 \family default
19038  item is not visible.
19039  
19040 \end_layout
19041
19042 \begin_layout Standard
19043 This command registers your document with RCS (unless you are under the
19044  directory managed by CVS)\SpecialChar \@.
19045  You are asked interactively to supply an initial
19046  description of the document.
19047  The document is now set in Read-Only mode and you have to 
19048 \family sans
19049 Check
19050 \begin_inset space ~
19051 \end_inset
19052
19053 Out
19054 \begin_inset space ~
19055 \end_inset
19056
19057 For
19058 \begin_inset space ~
19059 \end_inset
19060
19061 Edit
19062 \family default
19063 , before making any changes to it.
19064  A document under revision control has a 
19065 \begin_inset Quotes eld
19066 \end_inset
19067
19068 [RCS:<version> <locker>]
19069 \begin_inset Quotes erd
19070 \end_inset
19071
19072  item tagged to the filename in the minibuffer.
19073 \end_layout
19074
19075 \begin_layout Standard
19076 RCS command that is run: 
19077 \family typewriter
19078 ci -q -u -i -t-"<initial description>" <file-name>
19079 \end_layout
19080
19081 \begin_layout Standard
19082 Read 
19083 \family typewriter
19084 man ci
19085 \family default
19086  to understand the switches.
19087  
19088 \end_layout
19089
19090 \begin_layout Subsubsection
19091
19092 \family sans
19093 Check In Changes
19094 \end_layout
19095
19096 \begin_layout Standard
19097 When you are finished editing a file, you check in your changes.
19098  When you do this, you are asked for a description of the changes.
19099  This is stored in the history log.
19100  The version number is bumped, your changes are applied to the master RCS
19101  file, the document is unlocked and set to Read-Only mode.
19102  
19103 \end_layout
19104
19105 \begin_layout Standard
19106 RCS command: 
19107 \family typewriter
19108 ci -q -u -m"<description>" <file-name>
19109 \end_layout
19110
19111 \begin_layout Subsubsection
19112
19113 \family sans
19114 Check Out For Edit
19115 \end_layout
19116
19117 \begin_layout Standard
19118 By doing this you lock the document so that only you can edit it.
19119  This will also make the document Read-Write only for you.
19120  You will usually continue editing for a while and when you are finished
19121  you check in your changes.
19122  The status line is changed to reflect that you have locked the file.
19123  
19124 \end_layout
19125
19126 \begin_layout Standard
19127 RCS command: 
19128 \family typewriter
19129 co -q -l <file-name>
19130 \end_layout
19131
19132 \begin_layout Subsubsection
19133
19134 \family sans
19135 Revert To Repository Version
19136 \end_layout
19137
19138 \begin_layout Standard
19139 This will discard all changes made to the document since the last check
19140  in.
19141  You get a warning before changes are discarded.
19142 \end_layout
19143
19144 \begin_layout Standard
19145 RCS command: 
19146 \family typewriter
19147 co -f -u<version> <file-name>
19148 \end_layout
19149
19150 \begin_layout Subsubsection
19151
19152 \family sans
19153 Undo Last Checkin
19154 \end_layout
19155
19156 \begin_layout Standard
19157 This makes as if the last check in never happened.
19158  No changes are made to the document loaded into LyX, but the last version
19159  is removed from the master RCS file.
19160  
19161 \end_layout
19162
19163 \begin_layout Standard
19164 RCS command: 
19165 \family typewriter
19166 rcs -o<version> <file-name>
19167 \end_layout
19168
19169 \begin_layout Subsubsection
19170
19171 \family sans
19172 Show History
19173 \end_layout
19174
19175 \begin_layout Standard
19176 This shows the complete history of the RCS document.
19177  The output of 
19178 \family typewriter
19179 rlog <file-name>
19180 \family default
19181  is shown in a browser.
19182  See 
19183 \family typewriter
19184 man rlog
19185 \family default
19186  for more info.
19187 \end_layout
19188
19189 \begin_layout Subsubsection
19190 Revision info
19191 \end_layout
19192
19193 \begin_layout Standard
19194 LyX supports RCS version number, author name, date and time of last commit.
19195  All those are extracted from 
19196 \family typewriter
19197 rlog -r <file-name>
19198 \family default
19199 .
19200  For other details see 
19201 \begin_inset CommandInset ref
19202 LatexCommand ref
19203 reference "sub:VCS-Revision-Information"
19204
19205 \end_inset
19206
19207  for details.
19208 \end_layout
19209
19210 \begin_layout Subsection
19211 CVS commands in LyX
19212 \end_layout
19213
19214 \begin_layout Standard
19215 A subset of CVS operations is supported by LyX.
19216  You can find the commands in the 
19217 \family sans
19218 File\SpecialChar \menuseparator
19219 Version
19220 \begin_inset space ~
19221 \end_inset
19222
19223 Control
19224 \family default
19225  submenu.
19226  The version control system SVN is more powerful, so please use it instead
19227  of CVS if possible.
19228 \end_layout
19229
19230 \begin_layout Subsubsection
19231
19232 \family sans
19233 General CVS usage
19234 \end_layout
19235
19236 \begin_layout Standard
19237 If you start from scratch with CVS you have to create your repository and
19238  checkout the working copy with external tools.
19239  If you're using a client-server setup you may need to login before doing
19240  the first repository checkout.
19241 \end_layout
19242
19243 \begin_layout Standard
19244 If your documents are under revision control and others are using the same
19245  repository problems arise when different changes to the same document at
19246  the same location happen.
19247  Standard CVS repositories doesn't operate with a file locking mechanism.
19248  This may be surprising, but conflicts only occur if people disagree on
19249  the proper content of the same part of a document.
19250  So, if co-workers are used to communicate regularly, these conflicts occur
19251  rarely.
19252  If they don't communicate they have a fundamental problem anyway.
19253  Nevertheless some people like to work with so called 
19254 \begin_inset Quotes eld
19255 \end_inset
19256
19257 reserved checkouts
19258 \begin_inset Quotes erd
19259 \end_inset
19260
19261 .
19262  If they do so the working copy of all files is readonly when checked out
19263  first and the user starts editing after using a special command to make
19264  the working copy writable.
19265  When the changes are checked in the working copy returns to readonly state.
19266  With LyX one has to edit the 
19267 \begin_inset Flex Code
19268 status collapsed
19269
19270 \begin_layout Plain Layout
19271 .cvsrc
19272 \end_layout
19273
19274 \end_inset
19275
19276  file and add the line 
19277 \begin_inset Flex Code
19278 status collapsed
19279
19280 \begin_layout Plain Layout
19281 cvs -r
19282 \end_layout
19283
19284 \end_inset
19285
19286  to work with reserved checkouts.
19287  The benefit is the possibility to see who is using a writable copy of some
19288  document.
19289  It's not guaranteed only one user makes a copy writable.
19290 \end_layout
19291
19292 \begin_layout Standard
19293 LyX tries to guess if you're using reserved or non-reserved checkouts.
19294  If your working copy is readonly or it is writable and an additional copy
19295  of your document exists in the CVS/Base sub-directory a reserved otherwise
19296  a non-reserved checkout is assumed.
19297  When a reserved checkout is detected you have to use 
19298 \begin_inset Flex MenuItem
19299 status collapsed
19300
19301 \begin_layout Plain Layout
19302 Check Out
19303 \end_layout
19304
19305 \end_inset
19306
19307  to make your working copy writable if it's readonly.
19308  After doing so the 
19309 \begin_inset Flex MenuItem
19310 status collapsed
19311
19312 \begin_layout Plain Layout
19313 Check In
19314 \end_layout
19315
19316 \end_inset
19317
19318  operation is possible and that makes your working copy readonly again after
19319  transferring your changes to the repository.
19320 \end_layout
19321
19322 \begin_layout Standard
19323 More information about CVS can be found here 
19324 \begin_inset Flex URL
19325 status collapsed
19326
19327 \begin_layout Plain Layout
19328
19329 http://www.nongnu.org/cvs
19330 \end_layout
19331
19332 \end_inset
19333
19334  and here 
19335 \begin_inset Flex URL
19336 status collapsed
19337
19338 \begin_layout Plain Layout
19339
19340 http://ximbiot.com/cvs
19341 \end_layout
19342
19343 \end_inset
19344
19345 .
19346 \end_layout
19347
19348 \begin_layout Standard
19349 Read 
19350 \family typewriter
19351 man cvs
19352 \family default
19353  to understand the sub-commands and the switches mentioned below.
19354 \end_layout
19355
19356 \begin_layout Subsubsection
19357
19358 \family sans
19359 Register
19360 \end_layout
19361
19362 \begin_layout Standard
19363 If your document is not under revision control, this is the only item shown
19364  in the menu.
19365  And if it is under revision control, the 
19366 \family sans
19367 \bar under
19368 R
19369 \bar default
19370 egister
19371 \family default
19372  item is not visible.
19373  
19374 \end_layout
19375
19376 \begin_layout Standard
19377 This command registers in CVS your document 
19378 \begin_inset Flex Strong
19379 status collapsed
19380
19381 \begin_layout Plain Layout
19382
19383 \emph on
19384 only
19385 \end_layout
19386
19387 \end_inset
19388
19389  in the case you have already the documents directory under CVS control
19390  (in particular 
19391 \family typewriter
19392 CVS/Entries
19393 \family default
19394  file exists).
19395  This means you have to create or checkout the archive by yourself using
19396  external tools.
19397  (In case you forget that step LyX registers the document with RCS.)
19398 \end_layout
19399
19400 \begin_layout Standard
19401 Then you are asked interactively to supply an initial description of the
19402  document.
19403  Don't forget that registered file is not yet checked in.
19404 \end_layout
19405
19406 \begin_layout Standard
19407 CVS command that is run: 
19408 \family typewriter
19409 cvs -q add -m"<entered message>" "<file-name>"
19410 \end_layout
19411
19412 \begin_layout Standard
19413 The term 
19414 \family typewriter
19415 "<file-name>"
19416 \family default
19417  above and for all other CVS commands is an abbreviation for 
19418 \begin_inset Quotes eld
19419 \end_inset
19420
19421 change the current working directory to file location and use the file name
19422  without path component as argument
19423 \begin_inset Quotes erd
19424 \end_inset
19425
19426 .
19427 \end_layout
19428
19429 \begin_layout Subsubsection
19430
19431 \family sans
19432 Check In Changes
19433 \end_layout
19434
19435 \begin_layout Standard
19436 When you are finished editing a file, you commit your changes.
19437  When you do this and you had changed the document, you are asked for a
19438  description of the changes.
19439  After that changes are written to the repository.
19440  In case you didn't change the document and a reserved checkout is detected
19441  the reservation made on 
19442 \begin_inset Flex MenuItem
19443 status collapsed
19444
19445 \begin_layout Plain Layout
19446 Check Out
19447 \end_layout
19448
19449 \end_inset
19450
19451  is undone.
19452 \end_layout
19453
19454 \begin_layout Labeling
19455 \labelwidthstring 00.00.0000
19456 CVS
19457 \begin_inset space ~
19458 \end_inset
19459
19460 command: 
19461 \begin_inset space ~
19462 \end_inset
19463
19464
19465 \begin_inset Newline newline
19466 \end_inset
19467
19468
19469 \begin_inset Flex Code
19470 status collapsed
19471
19472 \begin_layout Plain Layout
19473 cvs 
19474 \family typewriter
19475 -q commit -m"<description>" "<file-name>"
19476 \end_layout
19477
19478 \end_inset
19479
19480  or
19481 \begin_inset Newline newline
19482 \end_inset
19483
19484
19485 \begin_inset Flex Code
19486 status collapsed
19487
19488 \begin_layout Plain Layout
19489 cvs -q unedit 
19490 \family typewriter
19491 "<file-name>"
19492 \end_layout
19493
19494 \end_inset
19495
19496
19497 \end_layout
19498
19499 \begin_layout Subsubsection
19500
19501 \family sans
19502 Check Out Changes
19503 \end_layout
19504
19505 \begin_layout Standard
19506 When you are sharing a repository with others, you may have to incorporate
19507  their changes into your working copy.
19508 \end_layout
19509
19510 \begin_layout Standard
19511 CVS command: 
19512 \family typewriter
19513 cvs -q update "<file-name>"
19514 \end_layout
19515
19516 \begin_layout Standard
19517 If a readonly checkout is detected the working copy is made writable and
19518  reserved.
19519 \end_layout
19520
19521 \begin_layout Standard
19522 CVS command: 
19523 \family typewriter
19524 cvs -q edit "<file-name>"
19525 \end_layout
19526
19527 \begin_layout Subsubsection
19528
19529 \family sans
19530 Revert To Repository Version
19531 \end_layout
19532
19533 \begin_layout Standard
19534 This will discard all changes made to the document since the last check
19535  in.
19536  You get a warning before changes are discarded.
19537  Firstly the file is deleted, secondly CVS update command is run.
19538 \end_layout
19539
19540 \begin_layout Standard
19541 CVS command: 
19542 \family typewriter
19543 cvs -q update "<file-name>"
19544 \end_layout
19545
19546 \begin_layout Standard
19547 If a reserved checkout is detected and the working copy has no changes only
19548  the reservation is undone.
19549 \end_layout
19550
19551 \begin_layout Standard
19552 CVS command: 
19553 \family typewriter
19554 cvs -q unedit "<file-name>"
19555 \end_layout
19556
19557 \begin_layout Subsubsection
19558 Update of the local directory checkout from repository
19559 \end_layout
19560
19561 \begin_layout Standard
19562 Once your documents gets more complex, containing sub-documents and pictures,
19563  including external 
19564 \begin_inset Flex Code
19565 status collapsed
19566
19567 \begin_layout Plain Layout
19568 .tex
19569 \end_layout
19570
19571 \end_inset
19572
19573  files and so on using version control becomes more complicated.
19574  LyX supports updating the whole tree in which resides the document.
19575  This become especially useful once you cooperate with people which neither
19576  have detailed knowledge about CVS usage nor they have ambition to commit
19577  additional material to the repository.
19578  You have to organize the files structure so that all external files are
19579  in the same directory or subdirectories of the document.
19580  It's good practice anyway to store multipart documents in an extra directory.
19581 \end_layout
19582
19583 \begin_layout Standard
19584 The 
19585 \begin_inset Flex Code
19586 status collapsed
19587
19588 \begin_layout Plain Layout
19589 Update local directory from repository
19590 \end_layout
19591
19592 \end_inset
19593
19594  command updates the whole directory.
19595  If local changes are detected user is warned before update starts.
19596  In case of merge conflicts both versions of the conflicting document parts
19597  are placed in the final document.
19598  You have to review and correct the result of the merge.
19599  You'll find the conflicts enclosed in pairs of 
19600 \begin_inset Flex Code
19601 status collapsed
19602
19603 \begin_layout Plain Layout
19604 <<<<<<<
19605 \end_layout
19606
19607 \end_inset
19608
19609  and 
19610 \begin_inset Flex Code
19611 status collapsed
19612
19613 \begin_layout Plain Layout
19614 >>>>>>>
19615 \end_layout
19616
19617 \end_inset
19618
19619  separated by 
19620 \begin_inset Flex Code
19621 status collapsed
19622
19623 \begin_layout Plain Layout
19624 =======
19625 \end_layout
19626
19627 \end_inset
19628
19629 .
19630  The first part is your version as before the update operation with the
19631  document name prepended.
19632  The second one is the repository version with the version number after
19633  the sequence of 
19634 \begin_inset Flex Code
19635 status collapsed
19636
19637 \begin_layout Plain Layout
19638 >
19639 \end_layout
19640
19641 \end_inset
19642
19643  signs.
19644 \end_layout
19645
19646 \begin_layout Labeling
19647 \labelwidthstring 00.00.0000
19648 CVS
19649 \begin_inset space ~
19650 \end_inset
19651
19652 commands: 
19653 \begin_inset space ~
19654 \end_inset
19655
19656
19657 \begin_inset Newline newline
19658 \end_inset
19659
19660
19661 \begin_inset Flex Code
19662 status collapsed
19663
19664 \begin_layout Plain Layout
19665 cd $path; cvs diff 
19666 \family typewriter
19667 "."
19668 \end_layout
19669
19670 \end_inset
19671
19672  (Ask if changes are detected.)
19673 \begin_inset Newline newline
19674 \end_inset
19675
19676
19677 \begin_inset Flex Code
19678 status collapsed
19679
19680 \begin_layout Plain Layout
19681 cd $path; cvs -q update 
19682 \family typewriter
19683 "."
19684 \end_layout
19685
19686 \end_inset
19687
19688
19689 \end_layout
19690
19691 \begin_layout Standard
19692 where 
19693 \begin_inset Flex Code
19694 status collapsed
19695
19696 \begin_layout Plain Layout
19697 $path
19698 \end_layout
19699
19700 \end_inset
19701
19702  stands for the path to the document.
19703 \end_layout
19704
19705 \begin_layout Subsubsection
19706
19707 \family sans
19708 Show History
19709 \end_layout
19710
19711 \begin_layout Standard
19712 This shows the complete history of the CVS document.
19713  The output of 
19714 \family typewriter
19715 cvs log "<file-name>"
19716 \family default
19717  is shown in a browser.
19718 \end_layout
19719
19720 \begin_layout Subsection
19721 SVN commands in LyX
19722 \end_layout
19723
19724 \begin_layout Standard
19725 SVN is now partially supported by LyX.
19726  You can find the commands in the 
19727 \family sans
19728 File\SpecialChar \menuseparator
19729 Version
19730 \begin_inset space ~
19731 \end_inset
19732
19733 Control
19734 \family default
19735  submenu.
19736  Please note that if you use password protected access to repository via
19737  ssh, you will be asked in terminal window.
19738  LyX was tested against SVN 1.5 and 1.6
19739 \begin_inset Foot
19740 status open
19741
19742 \begin_layout Plain Layout
19743 Most of the commands will work with 1.4 too, see 
19744 \begin_inset CommandInset ref
19745 LatexCommand ref
19746 reference "sub:SVN-Repo-Update"
19747
19748 \end_inset
19749
19750 .
19751 \end_layout
19752
19753 \end_inset
19754
19755
19756 \end_layout
19757
19758 \begin_layout Subsubsection
19759
19760 \family sans
19761 Register
19762 \end_layout
19763
19764 \begin_layout Standard
19765 If your document is not under revision control, this is the only item shown
19766  in the menu.
19767  And if it is under revision control, the 
19768 \family sans
19769 \bar under
19770 R
19771 \bar default
19772 egister
19773 \family default
19774  item is not visible.
19775  
19776 \end_layout
19777
19778 \begin_layout Standard
19779 This command registers in SVN your document ONLY in case you have already
19780  the documents directory under SVN control (in particular 
19781 \family typewriter
19782 .svn/entries
19783 \family default
19784  file exists).
19785  This means you have to checkout the archive by yourself.
19786  
19787 \end_layout
19788
19789 \begin_layout Standard
19790 Then you are asked interactively to supply an initial description of the
19791  document.
19792  Don't forget that registered file is not yet commited.
19793 \end_layout
19794
19795 \begin_layout Standard
19796 SVN command that is run: 
19797 \family typewriter
19798 svn add -q 
19799 \begin_inset Quotes eld
19800 \end_inset
19801
19802 <file-name>
19803 \begin_inset Quotes erd
19804 \end_inset
19805
19806
19807 \end_layout
19808
19809 \begin_layout Standard
19810 Read 
19811 \family typewriter
19812 man svn
19813 \family default
19814  to understand the switches.
19815  
19816 \end_layout
19817
19818 \begin_layout Subsubsection
19819
19820 \family sans
19821 Check In Changes
19822 \end_layout
19823
19824 \begin_layout Standard
19825 When you are finished editing a file, you commit your changes.
19826  When you do this, you are asked for a description of the changes.
19827  After that changes are commited.
19828 \end_layout
19829
19830 \begin_layout Standard
19831 SVN command:
19832 \begin_inset Foot
19833 status collapsed
19834
19835 \begin_layout Plain Layout
19836 In case locking is not enabled.
19837  See Section 
19838 \begin_inset CommandInset ref
19839 LatexCommand ref
19840 reference "subsec:SVN-File-Locking"
19841
19842 \end_inset
19843
19844 .
19845 \end_layout
19846
19847 \end_inset
19848
19849  
19850 \family typewriter
19851 svn commit -q -m"<description>" <file-name>
19852 \end_layout
19853
19854 \begin_layout Subsubsection
19855
19856 \family sans
19857 Check Out For Edit
19858 \end_layout
19859
19860 \begin_layout Standard
19861 Updates the changes of this file from the repository.
19862  Be sure you understand SVN merging and conflicts resolving before using
19863  this function, because all conflicts has to be resolved manually by you!
19864 \end_layout
19865
19866 \begin_layout Standard
19867 SVN command:
19868 \begin_inset Foot
19869 status collapsed
19870
19871 \begin_layout Plain Layout
19872 Ditto.
19873 \end_layout
19874
19875 \end_inset
19876
19877  
19878 \family typewriter
19879 svn update --non-interactive 
19880 \begin_inset Quotes eld
19881 \end_inset
19882
19883 <file-name>
19884 \begin_inset Quotes erd
19885 \end_inset
19886
19887
19888 \end_layout
19889
19890 \begin_layout Subsubsection
19891
19892 \family sans
19893 Revert To Repository Version
19894 \end_layout
19895
19896 \begin_layout Standard
19897 This will discard all changes made to the document since the last check
19898  in.
19899  You get a warning before changes are discarded.
19900  
19901 \end_layout
19902
19903 \begin_layout Standard
19904 SVN command: 
19905 \family typewriter
19906 svn revert -q 
19907 \begin_inset Quotes eld
19908 \end_inset
19909
19910 <file-name>
19911 \begin_inset Quotes erd
19912 \end_inset
19913
19914
19915 \end_layout
19916
19917 \begin_layout Subsubsection
19918 \begin_inset CommandInset label
19919 LatexCommand label
19920 name "sub:SVN-Repo-Update"
19921
19922 \end_inset
19923
19924 Update of the local directory checkout from repository
19925 \begin_inset Foot
19926 status collapsed
19927
19928 \begin_layout Plain Layout
19929 Note that this command will work only with subversion 
19930 \begin_inset Formula $\geqq1.5$
19931 \end_inset
19932
19933
19934 \end_layout
19935
19936 \end_inset
19937
19938
19939 \end_layout
19940
19941 \begin_layout Standard
19942 All the commands above have one shortcomming - they deal with the current
19943  document only.
19944  Once your document contains pictures, includes external 
19945 \begin_inset Flex Code
19946 status collapsed
19947
19948 \begin_layout Plain Layout
19949 .tex
19950 \end_layout
19951
19952 \end_inset
19953
19954  files and so on administration becomes more complicated.
19955  LyX now supports updating the whole tree in which resides the document
19956 \begin_inset Foot
19957 status collapsed
19958
19959 \begin_layout Plain Layout
19960 One need to organize the files structure so that all external files are
19961  in the same directory or subdirectories of the document.
19962  
19963 \end_layout
19964
19965 \end_inset
19966
19967 .
19968  This become especially useful once you cooperate with people which neither
19969  know about subversion management nor they have ambition to commit additional
19970  material to the repository.
19971  
19972 \end_layout
19973
19974 \begin_layout Standard
19975 \begin_inset Flex Code
19976 status collapsed
19977
19978 \begin_layout Plain Layout
19979 Update local directory from repository
19980 \end_layout
19981
19982 \end_inset
19983
19984  command updates the whole directory and in case of merge conflicts local
19985  version of the files are left, so no unintended data loss occurs.
19986  If local changes are detected user is warned before update starts.
19987 \end_layout
19988
19989 \begin_layout Labeling
19990 \labelwidthstring 00.00.0000
19991 SVN
19992 \begin_inset space ~
19993 \end_inset
19994
19995 commands: 
19996 \begin_inset space ~
19997 \end_inset
19998
19999
20000 \begin_inset Newline newline
20001 \end_inset
20002
20003
20004 \begin_inset Flex Code
20005 status collapsed
20006
20007 \begin_layout Plain Layout
20008 svn diff $path
20009 \end_layout
20010
20011 \end_inset
20012
20013  (Ask if changes are detected.)
20014 \begin_inset Newline newline
20015 \end_inset
20016
20017
20018 \begin_inset Flex Code
20019 status collapsed
20020
20021 \begin_layout Plain Layout
20022 svn update --accept mine-full $path
20023 \end_layout
20024
20025 \end_inset
20026
20027
20028 \end_layout
20029
20030 \begin_layout Standard
20031 where 
20032 \begin_inset Flex Code
20033 status collapsed
20034
20035 \begin_layout Plain Layout
20036 $path
20037 \end_layout
20038
20039 \end_inset
20040
20041  stands for the path to the document.
20042 \end_layout
20043
20044 \begin_layout Subsubsection
20045
20046 \family sans
20047 Show History
20048 \end_layout
20049
20050 \begin_layout Standard
20051 This shows the complete history of the SVN document.
20052  The output of 
20053 \family typewriter
20054 svn log 
20055 \begin_inset Quotes eld
20056 \end_inset
20057
20058 <file-name>
20059 \begin_inset Quotes erd
20060 \end_inset
20061
20062
20063 \family default
20064  is shown in a browser.
20065 \end_layout
20066
20067 \begin_layout Subsubsection
20068 File Locking
20069 \begin_inset CommandInset label
20070 LatexCommand label
20071 name "subsec:SVN-File-Locking"
20072
20073 \end_inset
20074
20075
20076 \end_layout
20077
20078 \begin_layout Standard
20079 The file exchange through various revision control systems brings the problem
20080  of merge conflicts in case two different users try to edit the same (parts
20081  of) document.
20082  When such a conflict happens it needs manual resolving and one reasonable
20083  alternative is to provide some kind of locking mechanism, which guarantees
20084  that only one user is allowed to edit file at the given time.
20085 \end_layout
20086
20087 \begin_layout Standard
20088 SVN has two such mechanisms to provide mutual exclusivity for file access
20089  - locks and automatic setting of write permissions (see sec.
20090  
20091 \begin_inset CommandInset ref
20092 LatexCommand ref
20093 reference "subsec:Automatical-Locking-Property"
20094
20095 \end_inset
20096
20097 ) based on 
20098 \begin_inset Flex Code
20099 status collapsed
20100
20101 \begin_layout Plain Layout
20102 svn:needs-lock
20103 \end_layout
20104
20105 \end_inset
20106
20107  file svn property
20108 \begin_inset Foot
20109 status open
20110
20111 \begin_layout Plain Layout
20112 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20113 \end_layout
20114
20115 \end_inset
20116
20117 .
20118  If this property is detected for a given document LyX starts to use SVN
20119  locks for document editing automatically and the whole check-in/out mechanism
20120  switches to the same regimen as for RCS.
20121  This in particular means there are two different modes of file use in LyX:
20122 \end_layout
20123
20124 \begin_layout Itemize
20125 Unlocked state.
20126  The loaded file is in the read-only mode.
20127  For editing on needs to check-out.
20128  
20129 \emph on
20130 Check-out
20131 \emph default
20132  consists of updating from the repository and gaining write lock.
20133  If the lock is not possible to obtain, we remain in unlocked state.
20134 \end_layout
20135
20136 \begin_layout Itemize
20137 Locked state.
20138  The loaded file is in the 'normal' edit mode.
20139  No other user is allowed to edit the file.
20140  
20141 \emph on
20142 Check-in
20143 \emph default
20144  consists of commiting changes and releasing write-lock.
20145  If no changes have been made to the document, no commit will be produced
20146 \begin_inset Foot
20147 status collapsed
20148
20149 \begin_layout Plain Layout
20150 Don't be puzzled by the fact that you will be asked for commit message anyway.
20151 \end_layout
20152
20153 \end_inset
20154
20155  and only the write-lock will be released.
20156 \end_layout
20157
20158 \begin_layout Standard
20159 SVN commands:
20160 \end_layout
20161
20162 \begin_layout Labeling
20163 \labelwidthstring 00.00.0000
20164 Check-in:
20165 \family typewriter
20166  svn commit -q -m"<description>" "<file-name>"
20167 \begin_inset Newline newline
20168 \end_inset
20169
20170 svn unlock "<file-name>"
20171 \end_layout
20172
20173 \begin_layout Labeling
20174 \labelwidthstring 00.00.0000
20175 Check-out: 
20176 \family typewriter
20177 svn update "<file-name>"
20178 \begin_inset Newline newline
20179 \end_inset
20180
20181 svn lock "<file-name>"
20182 \end_layout
20183
20184 \begin_layout Subsubsection
20185
20186 \family typewriter
20187 \begin_inset CommandInset label
20188 LatexCommand label
20189 name "subsec:Automatical-Locking-Property"
20190
20191 \end_inset
20192
20193
20194 \family default
20195 Automatic Locking Property
20196 \end_layout
20197
20198 \begin_layout Standard
20199 The above mentioned automatic setting of write permissions of the .lyx file
20200  can be set through
20201 \family sans
20202 \bar under
20203  F
20204 \bar default
20205 ile\SpecialChar \menuseparator
20206
20207 \bar under
20208 V
20209 \bar default
20210 ersion
20211 \begin_inset space ~
20212 \end_inset
20213
20214 Control\SpecialChar \menuseparator
20215
20216 \bar under
20217 T
20218 \bar default
20219 oggle locking property
20220 \family default
20221 .
20222  This command is active only when the file is not locked on the svn server
20223  (i.e.
20224  you need to check-out before proceeding).
20225 \end_layout
20226
20227 \begin_layout Labeling
20228 \labelwidthstring 00.00.0000
20229 SVN
20230 \begin_inset space ~
20231 \end_inset
20232
20233 commands:
20234 \end_layout
20235
20236 \begin_layout Labeling
20237 \labelwidthstring 00.00.0000
20238 Set:
20239 \family typewriter
20240  svn propset svn:needs-lock ON "<file-name>"
20241 \end_layout
20242
20243 \begin_layout Labeling
20244 \labelwidthstring 00.00.0000
20245 Unset: 
20246 \family typewriter
20247 svn propdel svn:needs-lock "<file-name>"
20248 \end_layout
20249
20250 \begin_layout Subsubsection
20251 \begin_inset CommandInset label
20252 LatexCommand label
20253 name "sub:VCS-Revision-Information"
20254
20255 \end_inset
20256
20257 Revision Information in Documents
20258 \end_layout
20259
20260 \begin_layout Standard
20261 There are more possibilities how to activate revision information in our
20262  document.
20263 \end_layout
20264
20265 \begin_layout Itemize
20266 LyX supports directly:
20267 \end_layout
20268
20269 \begin_deeper
20270 \begin_layout Itemize
20271 tree revision information (
20272 \begin_inset Flex Code
20273 status collapsed
20274
20275 \begin_layout Plain Layout
20276 vcs-tree-revision
20277 \end_layout
20278
20279 \end_inset
20280
20281 ).
20282  The result is the output of the 
20283 \begin_inset Flex Code
20284 status collapsed
20285
20286 \begin_layout Plain Layout
20287 svnversion
20288 \end_layout
20289
20290 \end_inset
20291
20292  command, the following table gives you an idea, how to read the results.
20293 \end_layout
20294
20295 \begin_layout Standard
20296 \align center
20297 \begin_inset Tabular
20298 <lyxtabular version="3" rows="6" columns="2">
20299 <features rotate="0" tabularvalignment="middle">
20300 <column alignment="center" valignment="top" width="0">
20301 <column alignment="center" valignment="top" width="0">
20302 <row>
20303 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20304 \begin_inset Text
20305
20306 \begin_layout Plain Layout
20307 Output
20308 \end_layout
20309
20310 \end_inset
20311 </cell>
20312 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20313 \begin_inset Text
20314
20315 \begin_layout Plain Layout
20316 Meaning
20317 \end_layout
20318
20319 \end_inset
20320 </cell>
20321 </row>
20322 <row>
20323 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20324 \begin_inset Text
20325
20326 \begin_layout Plain Layout
20327 4123:4168
20328 \end_layout
20329
20330 \end_inset
20331 </cell>
20332 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20333 \begin_inset Text
20334
20335 \begin_layout Plain Layout
20336 mixed revision working copy
20337 \end_layout
20338
20339 \end_inset
20340 </cell>
20341 </row>
20342 <row>
20343 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20344 \begin_inset Text
20345
20346 \begin_layout Plain Layout
20347 4168M
20348 \end_layout
20349
20350 \end_inset
20351 </cell>
20352 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20353 \begin_inset Text
20354
20355 \begin_layout Plain Layout
20356 modified working copy
20357 \end_layout
20358
20359 \end_inset
20360 </cell>
20361 </row>
20362 <row>
20363 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20364 \begin_inset Text
20365
20366 \begin_layout Plain Layout
20367 4123S
20368 \end_layout
20369
20370 \end_inset
20371 </cell>
20372 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20373 \begin_inset Text
20374
20375 \begin_layout Plain Layout
20376 switched working copy
20377 \end_layout
20378
20379 \end_inset
20380 </cell>
20381 </row>
20382 <row>
20383 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20384 \begin_inset Text
20385
20386 \begin_layout Plain Layout
20387 4123P
20388 \end_layout
20389
20390 \end_inset
20391 </cell>
20392 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20393 \begin_inset Text
20394
20395 \begin_layout Plain Layout
20396 partial working copy, from a sparse checkout
20397 \end_layout
20398
20399 \end_inset
20400 </cell>
20401 </row>
20402 <row>
20403 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20404 \begin_inset Text
20405
20406 \begin_layout Plain Layout
20407 4123:4168MS
20408 \end_layout
20409
20410 \end_inset
20411 </cell>
20412 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20413 \begin_inset Text
20414
20415 \begin_layout Plain Layout
20416 mixed revision, modified, switched working copy
20417 \end_layout
20418
20419 \end_inset
20420 </cell>
20421 </row>
20422 </lyxtabular>
20423
20424 \end_inset
20425
20426
20427 \end_layout
20428
20429 \begin_layout Itemize
20430 file revision information.
20431  The result comes from parsing the output of 
20432 \begin_inset Flex Code
20433 status collapsed
20434
20435 \begin_layout Plain Layout
20436 svn
20437 \begin_inset space ~
20438 \end_inset
20439
20440 info
20441 \begin_inset space ~
20442 \end_inset
20443
20444 --xml
20445 \begin_inset space ~
20446 \end_inset
20447
20448 file.lyx
20449 \end_layout
20450
20451 \end_inset
20452
20453 .
20454  Supported flags are:
20455 \end_layout
20456
20457 \begin_deeper
20458 \begin_layout Itemize
20459 version number of the last commit (
20460 \begin_inset Flex Code
20461 status collapsed
20462
20463 \begin_layout Plain Layout
20464 vcs-revision
20465 \end_layout
20466
20467 \end_inset
20468
20469 )
20470 \end_layout
20471
20472 \begin_layout Itemize
20473 author of the last commit (
20474 \begin_inset Flex Code
20475 status collapsed
20476
20477 \begin_layout Plain Layout
20478 vcs-author
20479 \end_layout
20480
20481 \end_inset
20482
20483 )
20484 \end_layout
20485
20486 \begin_layout Itemize
20487 date of the last commit (
20488 \begin_inset Flex Code
20489 status collapsed
20490
20491 \begin_layout Plain Layout
20492 vcs-date
20493 \end_layout
20494
20495 \end_inset
20496
20497 )
20498 \end_layout
20499
20500 \begin_layout Itemize
20501 time of the last commit (
20502 \begin_inset Flex Code
20503 status collapsed
20504
20505 \begin_layout Plain Layout
20506 vcs-time
20507 \end_layout
20508
20509 \end_inset
20510
20511 )
20512 \end_layout
20513
20514 \end_deeper
20515 \begin_layout Standard
20516 You can obtain this info via InsetInfo (e.g.
20517  
20518 \begin_inset Flex Code
20519 status collapsed
20520
20521 \begin_layout Plain Layout
20522 info-insert buffer vcs-date
20523 \end_layout
20524
20525 \end_inset
20526
20527 ).
20528  The information will be available only when you have the file stored under
20529  svn managment (i.e.
20530  the 
20531 \begin_inset Flex Code
20532 status collapsed
20533
20534 \begin_layout Plain Layout
20535 .svn
20536 \end_layout
20537
20538 \end_inset
20539
20540  directory is available with your document).
20541 \end_layout
20542
20543 \end_deeper
20544 \begin_layout Itemize
20545 Another---a hacking one---possibility is to use svn keywords
20546 \begin_inset Foot
20547 status collapsed
20548
20549 \begin_layout Plain Layout
20550 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20551 \end_layout
20552
20553 \end_inset
20554
20555 .
20556  In short -- you set file keywords property (e.g.
20557  
20558 \family sans
20559 svn propset svn:keywords 'Rev' file.lyx
20560 \family default
20561 ) and then paste keyword TeX code
20562 \begin_inset Foot
20563 status collapsed
20564
20565 \begin_layout Plain Layout
20566 This is an easy way how to ensure that LyX won't break the line in the middle
20567  of keyword tag.
20568 \end_layout
20569
20570 \end_inset
20571
20572  tag in your document (e.g.
20573  
20574 \begin_inset ERT
20575 status open
20576
20577 \begin_layout Plain Layout
20578
20579 $Rev$
20580 \end_layout
20581
20582 \end_inset
20583
20584 ).
20585  This way svn client will automatically substitute revision number (e.g.
20586  
20587 \begin_inset ERT
20588 status open
20589
20590 \begin_layout Plain Layout
20591
20592 $Rev: 59 $
20593 \end_layout
20594
20595 \end_inset
20596
20597 ) after each update and commit.
20598  There are more problems with this approach.
20599  Firstly, the '$' character is used in TeX world for math equations, so
20600  any occurence of math formula 
20601 \begin_inset Formula $Rev$
20602 \end_inset
20603
20604  become 
20605 \begin_inset Formula $Rev:59$
20606 \end_inset
20607
20608  in your LyX document.
20609  Similarly for other keywords like Id, Date, Author, etc.
20610  Secondly svn output is dependent on your locales, so its very easy that
20611  svn would produce some problematic strings once Date is used.
20612  Thirdly you get the whole 'Rev: 59' string in your document instead of
20613  the plain number.
20614  Until subversion implements user's custom keywords it will be hard to use
20615  this approach reliably or let LyX to support it directly.
20616 \end_layout
20617
20618 \begin_layout Subsection
20619 SVN and Windows Environment
20620 \end_layout
20621
20622 \begin_layout Quote
20623 My inclination is to say that if the user cannot figure out the command
20624  line operations on their own fairly quickly, they would be well advised
20625  to use TortoiseSVN.
20626  ---P.
20627  A.
20628  Rubin
20629 \end_layout
20630
20631 \begin_layout Subsubsection
20632 Preparation
20633 \end_layout
20634
20635 \begin_layout Standard
20636 In addition to installing LyX, and having access to a Subversion repository,
20637  the user will need to install the Subversion client program.
20638  A Windows installer for the client program is available from 
20639 \begin_inset CommandInset href
20640 LatexCommand href
20641 name "CollabNet"
20642 target "http://www.collab.net/nonav/downloads/subversion/"
20643
20644 \end_inset
20645
20646 .
20647  The user may also want to install 
20648 \begin_inset CommandInset href
20649 LatexCommand href
20650 name "TortoiseSVN"
20651 target "http://tortoisesvn.tigris.org/"
20652
20653 \end_inset
20654
20655 , which integrates Subversion operations into the context (rightclick) menu
20656  of Windows Explorer.
20657  Operations done outside LyX will typically be more convenient using the
20658  Explorer context menu.
20659  Note that TortoiseSVN is not a replacement for the client program, which
20660  is what LyX itself will use.
20661 \end_layout
20662
20663 \begin_layout Subsubsection
20664 Bringing a document under Subversion control
20665 \end_layout
20666
20667 \begin_layout Standard
20668 Before a LyX document can be brought under version control in Subversion,
20669  its parent directory needs to be under version control.
20670  If the document is being added to a project already in the repository,
20671  this is accomplished by checking the project out to the directory where
20672  the new document will be placed.
20673  If the project itself is not yet under version control (for instance, if
20674  this document starts a new project), the directory must be imported into
20675  the repository.
20676  This is done outside LyX.
20677  Both import and checkout are easily accomplished from the Explorer context
20678  menu using TortoiseSVN, or alternatively can be done using the command
20679  line client at a DOS prompt.
20680  The procedure for importing the project using TortoiseSVN is described
20681  below, assuming an existing repository and a new project being started
20682  in 
20683 \family typewriter
20684 C:
20685 \backslash
20686 new project
20687 \family default
20688 .
20689  For information on using the Subversion client program, run 
20690 \family typewriter
20691 svn --help 
20692 \family default
20693 in a DOS shell.
20694 \end_layout
20695
20696 \begin_layout Enumerate
20697 Locate 
20698 \family typewriter
20699 C:
20700 \backslash
20701 new project 
20702 \family default
20703 in Windows Explorer, right click it, and select 
20704 \family sans
20705 TortoiseSVN\SpecialChar \menuseparator
20706 Repo-browser
20707 \family default
20708 .
20709  If necessary, adjust the URL for the repository, then click OK.
20710 \end_layout
20711
20712 \begin_layout Enumerate
20713 Right click the level of the repository under which you want to place the
20714  new project folder (typically the top level) and click 
20715 \family sans
20716 Create folder
20717 \family default
20718  Supply a name for the project folder and click OK.
20719  Add a message for the log file if desired, then click OK again.
20720  The new project folder should appear in the repository.
20721  Finally, click OK again to exit the repository browser.
20722 \end_layout
20723
20724 \begin_layout Enumerate
20725 Once again right click 
20726 \family typewriter
20727 C:
20728 \backslash
20729 new project
20730 \family default
20731 , this time selecting SVN Checkout\SpecialChar \ldots{}
20732  Select the URL of the project folder
20733  you just created in the repository, and set the checkout directory to 
20734 \family typewriter
20735 C:
20736 \backslash
20737 new project.
20738
20739 \family default
20740  Click OK.
20741  You will be warned about a non-empty folder; click OK to proceed.
20742  You should now have a 
20743 \family typewriter
20744 .svn
20745 \family default
20746  directory under 
20747 \family typewriter
20748 C:
20749 \backslash
20750 new project.
20751 \end_layout
20752
20753 \begin_layout Enumerate
20754 Create or open your document in LyX and click 
20755 \family sans
20756 File\SpecialChar \menuseparator
20757 Version
20758 \begin_inset space ~
20759 \end_inset
20760
20761 Control\SpecialChar \menuseparator
20762 Register.
20763  
20764 \family default
20765 Add a log message and click OK to commit the document to version control.
20766 \end_layout
20767
20768 \begin_layout Standard
20769 From this point onward, you should have full functionality in the 
20770 \family sans
20771 File\SpecialChar \menuseparator
20772 Version
20773 \begin_inset space ~
20774 \end_inset
20775
20776 Control
20777 \family default
20778  menu.
20779  You also have the option of checking the document in and out, viewing its
20780  history, etc.
20781  using the TortoiseSVN context menu in Windows Explorer or the Subversion
20782  client program from a command prompt.
20783 \end_layout
20784
20785 \begin_layout Subsubsection
20786 SSH tunnel used with SVN under Windows
20787 \end_layout
20788
20789 \begin_layout Standard
20790 Compared with Linux setting up an svn client to communicate over ssh under
20791  Windows is a rather troublesome task.
20792  We will at least offer some hints how to setup the client side but prior
20793  knowledge about ssh and the Windows command line is needed, also be prepared
20794  for a great deal of frustration\SpecialChar \ldots{}
20795
20796 \end_layout
20797
20798 \begin_layout Enumerate
20799 Get an svn client for windows, as described in the previous sections.
20800  When it is a fresh install run some svn command (e.g.
20801  
20802 \begin_inset Flex Code
20803 status collapsed
20804
20805 \begin_layout Plain Layout
20806 svn --version
20807 \end_layout
20808
20809 \end_inset
20810
20811 ) to create config files, which you will need to change later on.
20812 \end_layout
20813
20814 \begin_layout Enumerate
20815 Choose an ssh client for Windows.
20816  There are several possibilities, we will use the one from Putty tools
20817 \begin_inset Foot
20818 status collapsed
20819
20820 \begin_layout Plain Layout
20821 \begin_inset Flex URL
20822 status collapsed
20823
20824 \begin_layout Plain Layout
20825
20826 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20827 \end_layout
20828
20829 \end_inset
20830
20831
20832 \end_layout
20833
20834 \end_inset
20835
20836 .
20837  You will need to set the connection up so that the client doesn't ask for
20838  any password from you.
20839  To keep things easy we will use only keys without any additional password
20840  protection etc.
20841 \end_layout
20842
20843 \begin_deeper
20844 \begin_layout Enumerate
20845 Generate keys by 
20846 \begin_inset Flex Code
20847 status collapsed
20848
20849 \begin_layout Plain Layout
20850 puttygen
20851 \end_layout
20852
20853 \end_inset
20854
20855 .
20856  Save your private .ppk key file and put the public one on the server side.
20857  If the SVN server runs on Linux, note that the format of the public key
20858  is not compatible with Linux openssh and you will need to direcly copy-paste
20859  the key from the “
20860 \emph on
20861 Public key for pasting into OpenSSH authorized_keys file
20862 \emph default
20863 :” edit field into the server's 
20864 \begin_inset Flex Code
20865 status collapsed
20866
20867 \begin_layout Plain Layout
20868 ~/.ssh/authorized_keys
20869 \end_layout
20870
20871 \end_inset
20872
20873  / 
20874 \begin_inset Flex Code
20875 status collapsed
20876
20877 \begin_layout Plain Layout
20878 authorized_keys2
20879 \end_layout
20880
20881 \end_inset
20882
20883  file.
20884 \end_layout
20885
20886 \begin_layout Enumerate
20887 Get the Putty's 
20888 \begin_inset Flex Code
20889 status collapsed
20890
20891 \begin_layout Plain Layout
20892 plink
20893 \end_layout
20894
20895 \end_inset
20896
20897 .
20898  In the SVN config file
20899 \begin_inset Foot
20900 status collapsed
20901
20902 \begin_layout Plain Layout
20903 Exact path depends on Windows version, usually somewhere around 
20904 \begin_inset Flex Code
20905 status collapsed
20906
20907 \begin_layout Plain Layout
20908 c:
20909 \backslash
20910 Documents and Settings
20911 \backslash
20912 user
20913 \backslash
20914 Application Data
20915 \backslash
20916 Subversion
20917 \backslash
20918 config
20919 \end_layout
20920
20921 \end_inset
20922
20923  / 
20924 \begin_inset Flex Code
20925 status collapsed
20926
20927 \begin_layout Plain Layout
20928 AppData
20929 \backslash
20930 Roaming
20931 \backslash
20932 Subversion
20933 \end_layout
20934
20935 \end_inset
20936
20937 .
20938 \end_layout
20939
20940 \end_inset
20941
20942 , section [tunnels], setup ssh command, e.g.
20943  
20944 \begin_inset Flex Code
20945 status collapsed
20946
20947 \begin_layout Plain Layout
20948 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20949 \end_layout
20950
20951 \end_inset
20952
20953 .
20954 \begin_inset Foot
20955 status collapsed
20956
20957 \begin_layout Plain Layout
20958 It will usually take a lot of time to get exact command right and it depends
20959  on many things.
20960  For example do not have some remote server saved as a default session in
20961  Putty etc.
20962  If things fail, try to connect via plink without SVN first.
20963 \end_layout
20964
20965 \end_inset
20966
20967
20968 \end_layout
20969
20970 \end_deeper
20971 \begin_layout Enumerate
20972 Checkout the SVN archive, e.
20973 \begin_inset space \thinspace{}
20974 \end_inset
20975
20976 g.
20977 \begin_inset Newline newline
20978 \end_inset
20979
20980
20981 \begin_inset Flex Code
20982 status collapsed
20983
20984 \begin_layout Plain Layout
20985 svn co svn+ssh://user@server/repository_path
20986 \end_layout
20987
20988 \end_inset
20989
20990 .
20991 \end_layout
20992
20993 \begin_layout Subsubsection
20994 End-of-Line Conversions
20995 \end_layout
20996
20997 \begin_layout Standard
20998 When the collaborators are mixing Linux and Windows environments, LyX will
20999  use different line endings inside the .lyx files.
21000  This is not a problem as far as LyX functionality is concerned, but the
21001  commit diffs will be huge and merge-conflicts prone.
21002  Fortunately SVN itself knows
21003 \begin_inset Foot
21004 status collapsed
21005
21006 \begin_layout Plain Layout
21007 \begin_inset Flex URL
21008 status collapsed
21009
21010 \begin_layout Plain Layout
21011
21012 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21013 \end_layout
21014
21015 \end_inset
21016
21017
21018 \end_layout
21019
21020 \end_inset
21021
21022  how to deal with CR/LF problems when switching .lyx files to the 
21023 \begin_inset Flex Code
21024 status collapsed
21025
21026 \begin_layout Plain Layout
21027 native
21028 \end_layout
21029
21030 \end_inset
21031
21032  mode.
21033 \begin_inset Foot
21034 status collapsed
21035
21036 \begin_layout Plain Layout
21037 For the lazy guys: 
21038 \begin_inset Flex Code
21039 status collapsed
21040
21041 \begin_layout Plain Layout
21042 svn propset svn:eol-style native FILE_NAME
21043 \end_layout
21044
21045 \end_inset
21046
21047
21048 \end_layout
21049
21050 \end_inset
21051
21052
21053 \end_layout
21054
21055 \begin_layout Subsection
21056 Further tuning
21057 \end_layout
21058
21059 \begin_layout Standard
21060 With the recent addition of the vc-command function LyX power users are
21061  allowed to create their own commands for revision control.
21062 \end_layout
21063
21064 \begin_layout Standard
21065 As an example you can see how two TortoiseSVN commands could be integrated
21066  directly:
21067 \end_layout
21068
21069 \begin_layout Description
21070 Commit: 
21071 \begin_inset Flex Code
21072 status collapsed
21073
21074 \begin_layout Plain Layout
21075 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21076 \end_layout
21077
21078 \end_inset
21079
21080
21081 \end_layout
21082
21083 \begin_layout Description
21084 Revert: 
21085 \begin_inset Flex Code
21086 status collapsed
21087
21088 \begin_layout Plain Layout
21089 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21090 \end_layout
21091
21092 \end_inset
21093
21094
21095 \end_layout
21096
21097 \begin_layout Subsection
21098 Version control and Document comparison
21099 \end_layout
21100
21101 \begin_layout Standard
21102 One of the typical uses of version control is to inspect the changes between
21103  revisions, usually by creating 
21104 \begin_inset Flex Code
21105 status collapsed
21106
21107 \begin_layout Plain Layout
21108 diff
21109 \end_layout
21110
21111 \end_inset
21112
21113  dumps.
21114  While this is useful for plain text files, it is much less useful in the
21115  case of LyX files, which have more a complicated structure.
21116  Hence we provide binding to the Document comparison feature.
21117  There are two ways of calling this feature - either by direct call of 
21118 \begin_inset Flex Code
21119 status collapsed
21120
21121 \begin_layout Plain Layout
21122 VC_COMPARE
21123 \end_layout
21124
21125 \end_inset
21126
21127  LyX function (for details see LyX functions manual) or by icon/menu item
21128  
21129 \begin_inset Flex MenuItem
21130 status collapsed
21131
21132 \begin_layout Plain Layout
21133 Compare with older revision...
21134 \end_layout
21135
21136 \end_inset
21137
21138 .
21139  One can either compare two chosen revisions of the document or he can simply
21140  compare the current version of edited text with older revisions (where
21141  '
21142 \begin_inset Flex MenuItem
21143 status collapsed
21144
21145 \begin_layout Plain Layout
21146 0
21147 \end_layout
21148
21149 \end_inset
21150
21151 ' revisions back means comparison of the edited file with last commited
21152  revision).
21153  
21154 \end_layout
21155
21156 \begin_layout Standard
21157 This feature is supported for SVN and RCS though due to the more complicated
21158  versioning scheme of RCS there is a constraint -- when addressing the revisions
21159  in dialog, numbers always point to the last number in RCS revision number,
21160  i.e.
21161  '35' in '1.2.35'.
21162 \end_layout
21163
21164 \begin_layout Section
21165 Literate Programming
21166 \end_layout
21167
21168 \begin_layout Standard
21169 Updated by 
21170 \noun on
21171 Kayvan Sylvan 
21172 \noun default
21173 (kayvan@sylvan.com)
21174 \noun on
21175
21176 \noun default
21177 original documentation written by 
21178 \noun on
21179 Edmar Wienskoski Jr.
21180
21181 \noun default
21182  (edmar-w-jr@technologist.com)
21183 \end_layout
21184
21185 \begin_layout Subsection
21186 Introduction
21187 \end_layout
21188
21189 \begin_layout Standard
21190 The main purpose of this documentation is to show you how to use LyX for
21191  literate programming, where it is assumed that you are familiar with this
21192  programming technique, and know what 
21193 \begin_inset Quotes eld
21194 \end_inset
21195
21196 tangling
21197 \begin_inset Quotes erd
21198 \end_inset
21199
21200  and 
21201 \begin_inset Quotes eld
21202 \end_inset
21203
21204 weaving
21205 \begin_inset Quotes erd
21206 \end_inset
21207
21208  means.
21209  If that is not the case, please follow the web links provided in the following
21210  sections.
21211  There is a lot of good documentation out there covering old development
21212  history to the latest tools tips.
21213 \end_layout
21214
21215 \begin_layout Standard
21216 It is also assumed that you are familiar with LyX itself to a point that
21217  you are comfortable changing your LyX preferences, and X resources file.
21218  If that is not the case please refer to other LyX documentation to cover
21219  your specific needs.
21220 \end_layout
21221
21222 \begin_layout Subsection
21223 Literate Programming
21224 \end_layout
21225
21226 \begin_layout Standard
21227 From the Literate Programming FAQ: 
21228 \end_layout
21229
21230 \begin_layout Quotation
21231 Literate programming is the combination of documentation and source together
21232  in a fashion suited for reading by human beings.
21233  In fact, literate programs should be enjoyable reading, even inviting!
21234  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21235  and documentation in a single file.
21236  Literate programming tools then parse the file to produce either readable
21237  documentation or compilable source.
21238  The WEB style of literate programming was created by D.
21239 \begin_inset space \thinspace{}
21240 \end_inset
21241
21242 E.
21243  Knuth during the development of his TeX typesetting software.
21244  
21245 \end_layout
21246
21247 \begin_layout Standard
21248 Another excerpt says:
21249 \end_layout
21250
21251 \begin_layout Quotation
21252
21253 \emph on
21254 How is literate programming different from verbose commenting?
21255 \end_layout
21256
21257 \begin_layout Quotation
21258 There are three distinguishing characteristics.
21259  In order of importance, they are: 
21260 \end_layout
21261
21262 \begin_deeper
21263 \begin_layout Itemize
21264 flexible order of elaboration 
21265 \end_layout
21266
21267 \begin_layout Itemize
21268 automatic support for browsing 
21269 \end_layout
21270
21271 \begin_layout Itemize
21272 typeset documentation, especially diagrams and mathematics 
21273 \end_layout
21274
21275 \end_deeper
21276 \begin_layout Standard
21277 Now that I sparked your curiosity, take a look in the references.
21278 \end_layout
21279
21280 \begin_layout Subsubsection
21281 References
21282 \end_layout
21283
21284 \begin_layout Standard
21285 The complete Literate Programming FAQ can be found at:
21286 \end_layout
21287
21288 \begin_layout Quote
21289 Literate Programming FAQ 
21290 \begin_inset Flex URL
21291 status collapsed
21292
21293 \begin_layout Plain Layout
21294
21295 http://www.literateprogramming.com/lpfaq.pdf
21296 \end_layout
21297
21298 \end_inset
21299
21300
21301 \end_layout
21302
21303 \begin_layout Standard
21304 The FAQ lists 23 (twenty three!) different literate programming tools.
21305  Where some are specialized or 
21306 \begin_inset Quotes eld
21307 \end_inset
21308
21309 tailored
21310 \begin_inset Quotes erd
21311 \end_inset
21312
21313  for particular programming languages, while other have general scope.
21314  I selected 
21315 \noun on
21316 Noweb
21317 \noun default
21318  for my own use for several reasons:
21319 \end_layout
21320
21321 \begin_layout Itemize
21322 It can generate the documentation either in LaTeX or HTML.
21323 \end_layout
21324
21325 \begin_layout Itemize
21326 It has a open architecture, i.
21327 \begin_inset space \thinspace{}
21328 \end_inset
21329
21330 e.
21331 \begin_inset space \space{}
21332 \end_inset
21333
21334 it is easy to plug in new filters and to perform special processing that
21335  you may need.
21336  
21337 \end_layout
21338
21339 \begin_layout Itemize
21340 There is a good selection of filters available already (the HTML is one
21341  of them).
21342 \end_layout
21343
21344 \begin_layout Itemize
21345 It is free.
21346 \end_layout
21347
21348 \begin_layout Standard
21349 The Noweb web page can be found at: 
21350 \end_layout
21351
21352 \begin_layout Quote
21353 Noweb home page 
21354 \begin_inset Flex URL
21355 status collapsed
21356
21357 \begin_layout Plain Layout
21358
21359 http://www.cs.virginia.edu/~nr/noweb/
21360 \end_layout
21361
21362 \end_inset
21363
21364
21365 \end_layout
21366
21367 \begin_layout Standard
21368 Starting from there you can reach many other interesting links and even
21369  some literate program examples.
21370 \end_layout
21371
21372 \begin_layout Subsection
21373 LyX and Literate Programming with Noweb
21374 \end_layout
21375
21376 \begin_layout Standard
21377 The LyX support for Literate Programming is provided by using the generic
21378  LyX converters mechanism.
21379  This support is provided in a 
21380 \begin_inset Quotes eld
21381 \end_inset
21382
21383 Noweb independent
21384 \begin_inset Quotes erd
21385 \end_inset
21386
21387  way, i.
21388 \begin_inset space \thinspace{}
21389 \end_inset
21390
21391 e.
21392 \begin_inset space \space{}
21393 \end_inset
21394
21395 you will be able to use this new LyX feature with some other literate programmin
21396 g tool of your choice by just changing your LyX preferences.
21397 \end_layout
21398
21399 \begin_layout Subsubsection
21400 Generating documents and code (weaving and tangling)
21401 \end_layout
21402
21403 \begin_layout Paragraph
21404 Using the noweb module
21405 \end_layout
21406
21407 \begin_layout Standard
21408 If you have installed Noweb and LyX successfully, whenever you open a new
21409  document, after you have chosen its document class, use the Document->Settings
21410  menu to add the 
21411 \begin_inset Quotes eld
21412 \end_inset
21413
21414 noweb
21415 \begin_inset Quotes erd
21416 \end_inset
21417
21418  module.
21419  If Noweb is correctly installed, when you click on the 
21420 \begin_inset Quotes eld
21421 \end_inset
21422
21423 Modules
21424 \begin_inset Quotes erd
21425 \end_inset
21426
21427  link, you will see the 
21428 \begin_inset Quotes eld
21429 \end_inset
21430
21431 noweb
21432 \begin_inset Quotes erd
21433 \end_inset
21434
21435  module in the available list and you can add it to your document.
21436 \end_layout
21437
21438 \begin_layout Paragraph
21439 Typing code in
21440 \end_layout
21441
21442 \begin_layout Standard
21443 LyX enables you to write code with a layout named 
21444 \begin_inset Flex Noun
21445 status collapsed
21446
21447 \begin_layout Plain Layout
21448 Chunk
21449 \end_layout
21450
21451 \end_inset
21452
21453 .
21454  Noweb delimits chunks like this:
21455 \end_layout
21456
21457 \begin_layout LyX-Code
21458 <<My code>>=
21459 \end_layout
21460
21461 \begin_layout LyX-Code
21462   code
21463 \end_layout
21464
21465 \begin_layout LyX-Code
21466   more code
21467 \end_layout
21468
21469 \begin_layout LyX-Code
21470   even more code
21471 \end_layout
21472
21473 \begin_layout LyX-Code
21474   @
21475 \end_layout
21476
21477 \begin_layout Standard
21478 The problem is that whatever is written in between the << and the 
21479 \family typewriter
21480 @
21481 \family default
21482  must be taken literally, i.
21483 \begin_inset space \thinspace{}
21484 \end_inset
21485
21486 e.
21487 \begin_inset space \space{}
21488 \end_inset
21489
21490 LyX should be prevented from making any special interpretation of what has
21491  been written.
21492  This is also handled by 
21493 \begin_inset Flex Noun
21494 status collapsed
21495
21496 \begin_layout Plain Layout
21497 Chunk
21498 \end_layout
21499
21500 \end_inset
21501
21502 , that works like a normal paragraph but has a free spacing capability.
21503 \end_layout
21504
21505 \begin_layout Standard
21506 As a special note, you can also use the 
21507 \begin_inset Quotes eld
21508 \end_inset
21509
21510 %def
21511 \begin_inset Quotes erd
21512 \end_inset
21513
21514  construct of Noweb in your chunks to add items to Noweb's identifier cross-refe
21515 rence:
21516 \end_layout
21517
21518 \begin_layout LyX-Code
21519 <<My chunk>>=
21520 \end_layout
21521
21522 \begin_layout LyX-Code
21523 def some_function(args):
21524 \end_layout
21525
21526 \begin_layout LyX-Code
21527    "This is the doc string for this function."
21528 \end_layout
21529
21530 \begin_layout LyX-Code
21531    print "My args: ", args
21532 \end_layout
21533
21534 \begin_layout LyX-Code
21535 @ %def some_function
21536 \end_layout
21537
21538 \begin_layout Standard
21539 For an example of this usage and the resulting cross-reference output, look
21540  at the Literate python program in 
21541 \emph on
21542 LIBDIR/examples/listerrors.lyx
21543 \emph default
21544  which should make this all clear.
21545 \end_layout
21546
21547 \begin_layout Paragraph
21548 Generating the documentation
21549 \end_layout
21550
21551 \begin_layout Standard
21552 At this point you already have a new document file with a proper document
21553  class, and with some code and text on it.
21554  How do I print it? The answer is simple, you select 
21555 \family sans
21556 View\SpecialChar \menuseparator
21557 DVI,
21558 \family default
21559  etc.
21560  Just like you would do for a plain document.
21561  No special procedure is required.
21562 \end_layout
21563
21564 \begin_layout Standard
21565 To help orientate you, I will now explain what happens inside LyX:
21566 \end_layout
21567
21568 \begin_layout Enumerate
21569 When the 
21570 \family sans
21571 Update\SpecialChar \menuseparator
21572 DVI
21573 \family default
21574  menu option is chosen, a LaTeX file is generated.
21575  
21576 \end_layout
21577
21578 \begin_deeper
21579 \begin_layout Standard
21580 If the document is of any literate class the generated file will be named
21581  with an extension name defined by the 
21582 \begin_inset Quotes eld
21583 \end_inset
21584
21585 literate
21586 \begin_inset Quotes erd
21587 \end_inset
21588
21589  format (defined in the Preferences panel), otherwise the file will have
21590  the usual 
21591 \family typewriter
21592 .tex
21593 \family default
21594  extension.
21595 \end_layout
21596
21597 \end_deeper
21598 \begin_layout Enumerate
21599 Note that the only difference so far is in the name of the file, no special
21600  processing is required by LyX.
21601  Given that you formatted the code using the 
21602 \begin_inset Flex Noun
21603 status collapsed
21604
21605 \begin_layout Plain Layout
21606 Chunk
21607 \end_layout
21608
21609 \end_inset
21610
21611  layout that, by itself, takes care of the business.
21612 \end_layout
21613
21614 \begin_layout Enumerate
21615 If the document is of any literate class LyX will then use the internal
21616  LyX to Noweb converter, followed by the Noweb to LaTeX converter
21617 \begin_inset Foot
21618 status collapsed
21619
21620 \begin_layout Plain Layout
21621 The converters are defined in the 
21622 \family sans
21623 Tools\SpecialChar \menuseparator
21624 Preferences
21625 \family default
21626  panel, under the 
21627 \begin_inset Quotes eld
21628 \end_inset
21629
21630 Conversion
21631 \begin_inset Quotes erd
21632 \end_inset
21633
21634  tab.
21635  See section 
21636 \emph on
21637 Converters
21638 \emph default
21639  of the 
21640 \emph on
21641 Customization
21642 \emph default
21643  manual for general information about converters.
21644 \end_layout
21645
21646 \end_inset
21647
21648  to generate the LaTeX file.
21649 \end_layout
21650
21651 \begin_deeper
21652 \begin_layout Standard
21653 Otherwise it will just skip this step.
21654 \end_layout
21655
21656 \end_deeper
21657 \begin_layout Enumerate
21658 Finally, LaTeX is invoked and the regular post processing continues as in
21659  a plain document.
21660 \end_layout
21661
21662 \begin_layout Standard
21663 Independence from a particular 
21664 \begin_inset Quotes eld
21665 \end_inset
21666
21667 literate tool
21668 \begin_inset Quotes erd
21669 \end_inset
21670
21671  is easily achieved by changing the commands that are run by the various
21672  converters.
21673 \end_layout
21674
21675 \begin_layout Paragraph
21676 Generating the code
21677 \end_layout
21678
21679 \begin_layout Standard
21680 When the build menu option is chosen or the corresponding button in the
21681  toolbar is pressed, a LaTeX file is generated just like step 1 above.
21682  Next, LyX invokes the 
21683 \family typewriter
21684 Noweb->Program
21685 \family default
21686  converter.
21687  This converter needs to be defined by the user and is not installed by
21688  default, though the Program format is.
21689  This converter (like any other converter) will have two parts:
21690 \end_layout
21691
21692 \begin_layout Enumerate
21693 The converter program itself.
21694  This program performs the conversion from the one format to the other (in
21695  this case, from the Noweb format to the Program pseudo-format).
21696 \end_layout
21697
21698 \begin_layout Enumerate
21699 The error log parser.
21700  This is a program whose sole purpose is to rewrite error messages in a
21701  format that LyX understands.
21702  This makes it possible for LyX to place error boxes in the right places
21703  in the file buffer.
21704 \end_layout
21705
21706 \begin_layout Standard
21707 The first part, the 
21708 \begin_inset Quotes eld
21709 \end_inset
21710
21711 Converter
21712 \begin_inset Quotes erd
21713 \end_inset
21714
21715  setting, should be set to
21716 \begin_inset Newline newline
21717 \end_inset
21718
21719
21720 \begin_inset Quotes eld
21721 \end_inset
21722
21723
21724 \family typewriter
21725 build-script $$i
21726 \family default
21727  $$r
21728 \begin_inset Quotes erd
21729 \end_inset
21730
21731 .
21732 \begin_inset Newline newline
21733 \end_inset
21734
21735 This basically means that LyX will call 
21736 \begin_inset Quotes eld
21737 \end_inset
21738
21739 build-script
21740 \begin_inset Quotes erd
21741 \end_inset
21742
21743  (a program or script) with the name of the Noweb file (normally a file
21744  in the LyX temp directory) and the directory path of the original LyX file.
21745  
21746 \end_layout
21747
21748 \begin_layout Standard
21749 This is an implementation of 
21750 \begin_inset Quotes eld
21751 \end_inset
21752
21753 build-script
21754 \begin_inset Quotes erd
21755 \end_inset
21756
21757  that you can place in a directory on your path:
21758 \end_layout
21759
21760 \begin_layout Standard
21761 \begin_inset VSpace defskip
21762 \end_inset
21763
21764
21765 \end_layout
21766
21767 \begin_layout Standard
21768 \begin_inset Newpage pagebreak
21769 \end_inset
21770
21771
21772 \end_layout
21773
21774 \begin_layout Standard
21775
21776 \family sans
21777 #!/bin/sh
21778 \end_layout
21779
21780 \begin_layout Standard
21781
21782 \family sans
21783 #
21784 \end_layout
21785
21786 \begin_layout Standard
21787
21788 \family sans
21789 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
21790 \end_layout
21791
21792 \begin_layout Standard
21793 \begin_inset VSpace defskip
21794 \end_inset
21795
21796
21797 \end_layout
21798
21799 \begin_layout Standard
21800 The next part of the converter setting is the 
21801 \begin_inset Quotes eld
21802 \end_inset
21803
21804 Flags
21805 \begin_inset Quotes erd
21806 \end_inset
21807
21808  which is to be set to
21809 \begin_inset Newline newline
21810 \end_inset
21811
21812
21813 \begin_inset Quotes eld
21814 \end_inset
21815
21816
21817 \family typewriter
21818 parselog=$$s/scripts/listerrors
21819 \family default
21820
21821 \begin_inset Quotes erd
21822 \end_inset
21823
21824 .
21825 \begin_inset Newline newline
21826 \end_inset
21827
21828 This will run any errors that are generated by the 
21829 \begin_inset Quotes eld
21830 \end_inset
21831
21832 build-script
21833 \begin_inset Quotes erd
21834 \end_inset
21835
21836  process through the 
21837 \begin_inset Quotes eld
21838 \end_inset
21839
21840 listerrors
21841 \begin_inset Quotes erd
21842 \end_inset
21843
21844  program.
21845 \end_layout
21846
21847 \begin_layout Standard
21848 The build will normally take place in LyX's temporary directory, so the
21849  files produced by the conversion will be in that directory.
21850  LyX will copy out what it regards as the `main' file, but the 
21851 \family typewriter
21852 Noweb->Program
21853 \family default
21854  conversion may produce several files, and so most of these would then be
21855  deleted when LyX was closed.
21856  This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
21857  the build-script chunk can place the generated files in that location.
21858 \end_layout
21859
21860 \begin_layout Paragraph
21861 Build instructions in the document
21862 \end_layout
21863
21864 \begin_layout Standard
21865 The last piece of the integration between LyX and noweb is the 
21866 \begin_inset Quotes eld
21867 \end_inset
21868
21869 build-script
21870 \begin_inset Quotes erd
21871 \end_inset
21872
21873  chunk.
21874  Generally, the instructions for building your program should be embedded
21875  in a chunk of its own.
21876  The noweb-specific 
21877 \begin_inset Quotes eld
21878 \end_inset
21879
21880 build-script
21881 \begin_inset Quotes erd
21882 \end_inset
21883
21884  above uses the notangle command to look for this chunk (called 
21885 \begin_inset Quotes eld
21886 \end_inset
21887
21888 build-script
21889 \begin_inset Quotes erd
21890 \end_inset
21891
21892 ) and runs its contents through 
21893 \begin_inset Quotes eld
21894 \end_inset
21895
21896 sh
21897 \begin_inset Quotes erd
21898 \end_inset
21899
21900 .
21901 \end_layout
21902
21903 \begin_layout Standard
21904 Typically, such a chunk would look something like this:
21905 \end_layout
21906
21907 \begin_layout LyX-Code
21908 <<build-script>>=
21909 \end_layout
21910
21911 \begin_layout LyX-Code
21912 #!/bin/sh
21913 \begin_inset Newline newline
21914 \end_inset
21915
21916 if [ -z "${NOWEB_SOURCE}" ]
21917 \begin_inset Newline newline
21918 \end_inset
21919
21920 then
21921 \end_layout
21922
21923 \begin_layout LyX-Code
21924 NOWEB_SOURCE=myfile.nw
21925 \begin_inset Newline newline
21926 \end_inset
21927
21928 fi
21929 \begin_inset Newline newline
21930 \end_inset
21931
21932 [...
21933  code to extract files ...
21934  use NOWEB_OUTPUT_DIR here ...]
21935 \begin_inset Newline newline
21936 \end_inset
21937
21938 [...
21939  code to compile files ...]
21940 \begin_inset Newline newline
21941 \end_inset
21942
21943 @
21944 \end_layout
21945
21946 \begin_layout Standard
21947 Look in 
21948 \emph on
21949 LIBDIR/examples/listerrors.lyx
21950 \emph default
21951  or in 
21952 \emph on
21953 LIBDIR/examples/Literate.lyx
21954 \emph default
21955  which implement two versions of the 
21956 \begin_inset Quotes eld
21957 \end_inset
21958
21959 listerrors
21960 \begin_inset Quotes erd
21961 \end_inset
21962
21963  program for some illustrations of how all of these pieces go together or
21964  in 
21965 \emph on
21966 LIBDIR/examples/noweb2lyx.lyx.
21967
21968 \emph default
21969  Interestingly, these three files show off the language-indepence of the
21970  LyX literate programming support since they are written in Python, C and
21971  Perl respectively.
21972 \end_layout
21973
21974 \begin_layout Subsubsection
21975 Configuring LyX
21976 \end_layout
21977
21978 \begin_layout Standard
21979 All the Literate Programming support is configured by the 
21980 \family sans
21981 Tools\SpecialChar \menuseparator
21982 Preferences
21983 \family default
21984  panel in the 
21985 \begin_inset Quotes eld
21986 \end_inset
21987
21988 File Handling
21989 \begin_inset Quotes erd
21990 \end_inset
21991
21992  tab.
21993  The important parts are:
21994 \end_layout
21995
21996 \begin_layout Description
21997 the
21998 \begin_inset space ~
21999 \end_inset
22000
22001
22002 \begin_inset Quotes eld
22003 \end_inset
22004
22005 NoWeb
22006 \begin_inset Quotes erd
22007 \end_inset
22008
22009
22010 \begin_inset space ~
22011 \end_inset
22012
22013 format Set up via the File Formats tab, this is where the Noweb-specific
22014  pieces are set up.
22015  The 
22016 \family sans
22017 GUI Name
22018 \family default
22019  is set to 
22020 \family typewriter
22021 NoWeb
22022 \family default
22023 , the file extension is set to 
22024 \family typewriter
22025 .nw
22026 \family default
22027 .
22028  This tells LyX to create a file with a 
22029 \family typewriter
22030 .nw
22031 \family default
22032  extension in the first step of the conversion process.
22033 \end_layout
22034
22035 \begin_layout Description
22036 the
22037 \begin_inset space ~
22038 \end_inset
22039
22040
22041 \family sans
22042 Program
22043 \family default
22044
22045 \begin_inset space ~
22046 \end_inset
22047
22048 format This is an empty format whose sole purpose is to be the endpoint
22049  of a conversion (which then allows us to set up a converter for it).
22050 \end_layout
22051
22052 \begin_layout Description
22053
22054 \family sans
22055 NoWeb
22056 \family default
22057 ->
22058 \family sans
22059 LaTeX
22060 \family default
22061  This converter performs the 
22062 \begin_inset Quotes eld
22063 \end_inset
22064
22065 weaving
22066 \begin_inset Quotes erd
22067 \end_inset
22068
22069  of the literate document.
22070  For Noweb, it is set to 
22071 \begin_inset Quotes eld
22072 \end_inset
22073
22074
22075 \family typewriter
22076 noweave -delay -index $$i > $$o
22077 \family default
22078
22079 \begin_inset Quotes erd
22080 \end_inset
22081
22082
22083 \end_layout
22084
22085 \begin_layout Description
22086
22087 \family sans
22088 NoWeb
22089 \family default
22090 ->
22091 \family sans
22092 Program
22093 \family default
22094  This performs the 
22095 \begin_inset Quotes eld
22096 \end_inset
22097
22098 tangling step
22099 \begin_inset Quotes erd
22100 \end_inset
22101
22102 .
22103  As stated above, the Converter is set to 
22104 \begin_inset Quotes eld
22105 \end_inset
22106
22107
22108 \family typewriter
22109 build-script $$i
22110 \family default
22111  $$r
22112 \begin_inset Quotes erd
22113 \end_inset
22114
22115 , with Flags set to
22116 \begin_inset Newline newline
22117 \end_inset
22118
22119
22120 \begin_inset Quotes eld
22121 \end_inset
22122
22123
22124 \family typewriter
22125 parselog=$$s/scripts/listerrors
22126 \family default
22127
22128 \begin_inset Quotes erd
22129 \end_inset
22130
22131 .
22132 \end_layout
22133
22134 \begin_layout Subsubsection
22135 Debug extensions
22136 \end_layout
22137
22138 \begin_layout Standard
22139 There is also a new function implemented in the LyX server, the 
22140 \begin_inset Quotes eld
22141 \end_inset
22142
22143 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22144  
22145 \end_layout
22146
22147 \begin_layout Standard
22148 When debugging code with ddd/gdb, it is possible to invoke a text editor
22149  at the current execution position with a single key stroke.
22150  The default ddd configuration for that is shift-ctrl-V.
22151  It happens that you can define the editor command line invocation in ddd
22152  by accessing the 
22153 \family sans
22154 Edit\SpecialChar \menuseparator
22155 Preferences\SpecialChar \menuseparator
22156 Helpers
22157 \family default
22158  dialog and changing the "Edit Sources" entry.
22159 \end_layout
22160
22161 \begin_layout Standard
22162 I take advantage of the newly created LyX server function and this ddd feature,
22163  and set 
22164 \begin_inset Quotes eld
22165 \end_inset
22166
22167 Edit Sources
22168 \begin_inset Quotes erd
22169 \end_inset
22170
22171  to:
22172 \end_layout
22173
22174 \begin_layout Standard
22175 \begin_inset VSpace defskip
22176 \end_inset
22177
22178
22179 \end_layout
22180
22181 \begin_layout Standard
22182
22183 \family sans
22184 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22185 \end_layout
22186
22187 \begin_layout Standard
22188 \begin_inset VSpace defskip
22189 \end_inset
22190
22191
22192 \end_layout
22193
22194 \begin_layout Standard
22195 With this, whenever you are using ddd and find a point in the program that
22196  you want to edit, you just press shift-ctrl-V (in the ddd window), and
22197  ddd will forward this information to LyX through the LyX server and then
22198  the LyX window will show the same file with the cursor at the same position
22199  ddd was pointing to.
22200  No more guessing or long scrolling to locate a point in the program back
22201  from debugging !
22202 \end_layout
22203
22204 \begin_layout Standard
22205 Note however that you must enable the LyX server to get this feature working
22206  (it is disabled by default).
22207  You can enable it in 
22208 \family sans
22209 Preferences
22210 \family default
22211  (tabs 
22212 \family sans
22213 Inputs
22214 \family default
22215
22216 \family sans
22217 Paths
22218 \family default
22219 ) by entering in the 
22220 \family sans
22221 LyXserver pipe
22222 \family default
22223  a path like 
22224 \begin_inset Quotes eld
22225 \end_inset
22226
22227
22228 \family typewriter
22229 /home/<your-home-directory>/.lyx/lyxpipe
22230 \family default
22231
22232 \begin_inset Quotes erd
22233 \end_inset
22234
22235
22236 \end_layout
22237
22238 \begin_layout Standard
22239 Read the LyX server documentation in the 
22240 \emph on
22241 Customization Manual
22242 \emph default
22243  for further information.
22244 \end_layout
22245
22246 \begin_layout Subsubsection
22247 Toolbar extensions
22248 \end_layout
22249
22250 \begin_layout Standard
22251 There are six new buttons that can be added to your LyX toolbar.
22252  Five of these buttons are short cuts to layout styles: 
22253 \family sans
22254 Standard
22255 \family default
22256
22257 \family sans
22258 Section
22259 \family default
22260
22261 \family sans
22262 LaTeX
22263 \family default
22264
22265 \family sans
22266 LyX-Code
22267 \family default
22268 , and 
22269 \family sans
22270 Chunk
22271 \family default
22272 .
22273  The last one is a short cut to the 
22274 \begin_inset Quotes eld
22275 \end_inset
22276
22277 Build Program
22278 \begin_inset Quotes erd
22279 \end_inset
22280
22281  File menu entry.
22282  
22283 \end_layout
22284
22285 \begin_layout Standard
22286 LyX has a range of buttons that are available for tool bar customization.
22287  In my toolbar I like to combine the six short cuts above with two more:
22288  One for 
22289 \family sans
22290 View
22291 \family default
22292 \SpecialChar \menuseparator
22293
22294 \family sans
22295 Update
22296 \family default
22297 \SpecialChar \menuseparator
22298
22299 \family sans
22300 DVI
22301 \family default
22302  and the other for 
22303 \family sans
22304 View\SpecialChar \menuseparator
22305 DVI
22306 \family default
22307  File menu entries.
22308  Here is how it looks like:
22309 \end_layout
22310
22311 \begin_layout LyX-Code
22312 Toolbar
22313 \end_layout
22314
22315 \begin_layout LyX-Code
22316   Layouts
22317 \end_layout
22318
22319 \begin_layout LyX-Code
22320   Icon "layout Standard"
22321 \end_layout
22322
22323 \begin_layout LyX-Code
22324   Icon "layout Section"
22325 \end_layout
22326
22327 \begin_layout LyX-Code
22328   Icon "layout LaTeX"
22329 \end_layout
22330
22331 \begin_layout LyX-Code
22332   Icon "layout LyX-Code"
22333 \end_layout
22334
22335 \begin_layout LyX-Code
22336   Icon "layout Chunk"
22337 \end_layout
22338
22339 \begin_layout LyX-Code
22340   Separator
22341 \end_layout
22342
22343 \begin_layout LyX-Code
22344   Icon "buffer-view"
22345 \end_layout
22346
22347 \begin_layout LyX-Code
22348   Icon "buffer-typeset"
22349 \end_layout
22350
22351 \begin_layout LyX-Code
22352   Icon "build-program"
22353 \end_layout
22354
22355 \begin_layout LyX-Code
22356   Separator
22357 \end_layout
22358
22359 \begin_layout LyX-Code
22360 .
22361 \end_layout
22362
22363 \begin_layout LyX-Code
22364 .
22365 \end_layout
22366
22367 \begin_layout LyX-Code
22368 .
22369 \end_layout
22370
22371 \begin_layout LyX-Code
22372 End
22373 \end_layout
22374
22375 \begin_layout Subsubsection
22376 Colors customization
22377 \end_layout
22378
22379 \begin_layout Standard
22380 There are a number of colors in LyX that can be customized in 
22381 \family sans
22382 Preferences
22383 \family default
22384 .
22385  One of the things that bothers people is the LaTeX font color.
22386  The default color is red, since the chunks uses LaTeX font, and there is
22387  a lot of chunks in literate documents, you may get tired of seeing everything
22388  in red.
22389  You can change it by going to the tabs 
22390 \family sans
22391 Look&Feel
22392 \family default
22393
22394 \family sans
22395 Colors.
22396 \end_layout
22397
22398 \begin_layout Standard
22399 The next thing is the visible presence of the newline character in the screen.
22400  You can choose the color of this particular character and make it blend
22401  in the background.
22402  I recommend you choosing a color that is close to the background but not
22403  equal, that way you still can see it is there, but it is not bothering
22404  you anymore.
22405 \end_layout
22406
22407 \begin_layout Subsection
22408 LyX and knitr/Sweave
22409 \end_layout
22410
22411 \begin_layout Standard
22412 Support for 
22413 \family sans
22414 knitr
22415 \family default
22416  and 
22417 \family sans
22418 Sweave
22419 \family default
22420  is documented in the 
22421 \emph on
22422 knitr.lyx
22423 \emph default
22424  example file and in the Sweave manual (menu 
22425 \family sans
22426 Help\SpecialChar \menuseparator
22427 Specific Manuals
22428 \family default
22429 ).
22430 \end_layout
22431
22432 \begin_layout Chapter
22433 Special features
22434 \end_layout
22435
22436 \begin_layout Standard
22437 You can do everything with LyX that you can do with LaTeX.
22438  However, LyX cannot support every LaTeX feature directly.
22439  But you can always use TeX Code.
22440  This chapter shows you some more special things you might want to use.
22441  For other special things you can do with figures, tables, floats, boxes
22442  and notes, have a look at the 
22443 \emph on
22444 Embedded
22445 \begin_inset space ~
22446 \end_inset
22447
22448 Objects
22449 \emph default
22450  manual.
22451 \end_layout
22452
22453 \begin_layout Section
22454 Multiple Text Columns
22455 \end_layout
22456
22457 \begin_layout Standard
22458 This feature is independent of the option 
22459 \family sans
22460 Two-column document
22461 \family default
22462  in the document settings under 
22463 \family sans
22464 Text Layout
22465 \family default
22466 .
22467  If you want to have 2
22468 \begin_inset space ~
22469 \end_inset
22470
22471 columns for the whole document, it is recommended to use the 
22472 \family sans
22473 Two-column document
22474 \family default
22475  option.
22476  For all other cases use this feature.
22477 \end_layout
22478
22479 \begin_layout Standard
22480 To use multiple text columns in your document, you have to load the module
22481  
22482 \family sans
22483 Multiple Columns
22484 \family default
22485  (menu 
22486 \family sans
22487 Document\SpecialChar \menuseparator
22488 Settings\SpecialChar \menuseparator
22489 Modules
22490 \family default
22491 ) and must have the LaTeX-package 
22492 \series bold
22493 multicol
22494 \series default
22495  installed.
22496 \end_layout
22497
22498 \begin_layout Standard
22499 Footnotes within multiple columns will be placed at the bottom of the page
22500  and not under each column.
22501  Within the different columns you can use everything, with the limitation
22502  that for floats you need to use the float option 
22503 \family sans
22504 Span columns
22505 \family default
22506 .
22507 \end_layout
22508
22509 \begin_layout Subsection
22510 Basics
22511 \end_layout
22512
22513 \begin_layout Standard
22514 If you want to have 2
22515 \begin_inset space ~
22516 \end_inset
22517
22518 columns in your text, use the style 
22519 \family sans
22520 Begin Multiple Columns
22521 \family default
22522  where the columns should start.
22523  The content of the style is the number of the columns, so in this case
22524  use a 
22525 \begin_inset Quotes eld
22526 \end_inset
22527
22528 2
22529 \begin_inset Quotes erd
22530 \end_inset
22531
22532 .
22533  At the point where the columns should end use the style 
22534 \family sans
22535 End Multiple Columns
22536 \family default
22537  and keep it empty.
22538 \end_layout
22539
22540 \begin_layout Standard
22541 Here is an example:
22542 \end_layout
22543
22544 \begin_layout Begin Multiple Columns
22545 2
22546 \end_layout
22547
22548 \begin_layout Standard
22549 \noindent
22550
22551 \series bold
22552 \size small
22553 The Adventure of the Empty House
22554 \series default
22555
22556 \begin_inset Newline newline
22557 \end_inset
22558
22559 by 
22560 \noun on
22561 Sir Arthur Conan Doyle
22562 \end_layout
22563
22564 \begin_layout Standard
22565
22566 \size small
22567 It was in the spring of the year 1894 that all London was interested, and
22568  the fashionable world dismayed, by the murder of the Honourable Ronald
22569  Adair under most unusual and inexplicable circumstances.
22570  The public has already learned those particulars of the crime which came
22571  out in the police investigation, but a good deal was suppressed upon that
22572  occasion, since the case for the prosecution was so overwhelmingly strong
22573  that it was not necessary to bring forward all the facts.
22574  Only now, at the end of nearly ten years, am I allowed to supply those
22575  missing links which make up the whole of that remarkable chain.
22576  The crime was of interest in itself, but that interest was as nothing to
22577  me compared to the inconceivable sequel, which afforded me the greatest
22578  shock and surprise of any event in my adventurous life.
22579  Even now, after this long interval, I find myself thrilling as I think
22580  of it, and feeling once more that sudden flood of joy, amazement, and increduli
22581 ty which utterly submerged my mind.
22582  Let me say to that public, which has shown some interest in those glimpses
22583  which I have occasionally given them of the thoughts and actions of a very
22584  remarkable man, that they are not to blame me if I have not shared my knowledge
22585  with them, for I should have considered it my first duty to do so, had
22586  I not been barred by a positive prohibition from his own lips, which was
22587  only withdrawn upon the third of last month.
22588 \end_layout
22589
22590 \begin_layout End Multiple Columns
22591
22592 \end_layout
22593
22594 \begin_layout Standard
22595 Here is an example with 3
22596 \begin_inset space ~
22597 \end_inset
22598
22599 columns:
22600 \end_layout
22601
22602 \begin_layout Begin Multiple Columns
22603 3
22604 \end_layout
22605
22606 \begin_layout Standard
22607
22608 \size footnotesize
22609 It can be imagined that my close intimacy with Sherlock Holmes had interested
22610  me deeply in crime, and that after his disappearance I never failed to
22611  read with care the various problems which came before the public.
22612  And I even attempted, more than once, for my own private satisfaction,
22613  to employ his methods in their solution, though with indifferent success.
22614  There was none, however, which appealed to me like this tragedy of Ronald
22615  Adair.
22616  As I read the evidence at the inquest, which led up to a verdict of willful
22617  murder against some person or persons unknown, I realized more clearly
22618  than I had ever done the loss which the community had sustained by the
22619  death of Sherlock Holmes.
22620  There were points about this strange business which would, I was sure,
22621  have specially appealed to him, and the efforts of the police would have
22622  been supplemented, or more probably anticipated, by the trained observation
22623  and the alert mind of the first criminal agent in Europe.
22624  All day, as I drove upon my round, I turned over the case in my mind and
22625  found no explanation which appeared to me to be adequate.
22626  At the risk of telling a twice-told tale, I will recapitulate the facts
22627  as they were known to the public at the conclusion of the inquest.
22628 \end_layout
22629
22630 \begin_layout End Multiple Columns
22631
22632 \end_layout
22633
22634 \begin_layout Standard
22635 You can have up to 10
22636 \begin_inset space ~
22637 \end_inset
22638
22639 columns if you want to, but that might not be very pleasant for the readers
22640  of your document.
22641 \end_layout
22642
22643 \begin_layout Standard
22644 \begin_inset Newpage newpage
22645 \end_inset
22646
22647
22648 \end_layout
22649
22650 \begin_layout Subsection
22651 Columns inside Columns
22652 \end_layout
22653
22654 \begin_layout Standard
22655 You can also have columns inside columns:
22656 \end_layout
22657
22658 \begin_layout Begin Multiple Columns
22659 2
22660 \end_layout
22661
22662 \begin_layout Standard
22663
22664 \size footnotesize
22665 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22666  at that time governor of one of the Australian colonies.
22667  Adair's mother had returned from Australia to undergo the operation for
22668  cataract, and she, her son Ronald, and her daughter Hilda were living together
22669  at 427 Park Lane.
22670 \end_layout
22671
22672 \begin_layout Begin Multiple Columns
22673 2
22674 \end_layout
22675
22676 \begin_layout Standard
22677
22678 \size footnotesize
22679 The youth moved in the best society–had, so far as was known, no enemies
22680  and no particular vices.
22681  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22682  had been broken off by mutual consent some months before, and there was
22683  no sign that it had left any very profound feeling behind it.
22684  For the rest {sic} the man's life moved in a narrow and conventional circle,
22685  for his habits were quiet and his nature unemotional.
22686  Yet it was upon this easy-going young aristocrat that death came, in most
22687  strange and unexpected form, between the hours of ten and eleven-twenty
22688  on the night of March 30, 1894.
22689 \end_layout
22690
22691 \begin_layout End Multiple Columns
22692
22693 \end_layout
22694
22695 \begin_layout Standard
22696
22697 \size footnotesize
22698 Ronald Adair was fond of cards–playing continually, but never for such stakes
22699  as would hurt him.
22700  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22701  It was shown that, after dinner on the day of his death, he had played
22702  a rubber of whist at the latter club.
22703  He had also played there in the afternoon.
22704
22705 \size default
22706  
22707 \size footnotesize
22708 The evidence of those who had played with him– Mr.
22709  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22710  and that there was a fairly equal fall of the cards.
22711  Adair might have lost five pounds, but not more.
22712  His fortune was a considerable one, and such a loss could not in any way
22713  affect him.
22714  He had played nearly every day at one club or other, but he was a cautious
22715  player, and usually rose a winner.
22716  It came out in evidence that, in partnership with Colonel Moran, he had
22717  actually won as much as four hundred and twenty pounds in a sitting, some
22718  weeks before, from Godfrey Milner and Lord Balmoral.
22719  So much for his recent history as it came out at the inquest.
22720 \end_layout
22721
22722 \begin_layout End Multiple Columns
22723
22724 \end_layout
22725
22726 \begin_layout Subsection
22727 Advanced Examples
22728 \end_layout
22729
22730 \begin_layout Standard
22731 The examples in this section show some more special features of multiple
22732  columns.
22733 \end_layout
22734
22735 \begin_layout Standard
22736 For more features of multiple columns, have a look at the documentation
22737  of the LaTeX-package 
22738 \series bold
22739 multicol
22740 \series default
22741
22742 \begin_inset CommandInset citation
22743 LatexCommand cite
22744 key "multicol"
22745
22746 \end_inset
22747
22748 .
22749 \end_layout
22750
22751 \begin_layout Subsubsection
22752 Preface
22753 \end_layout
22754
22755 \begin_layout Standard
22756 To add a preface text for multiple columns, add the optional parameter 
22757 \family sans
22758 Preface
22759 \family default
22760  behind the number of columns in the
22761 \family sans
22762  Begin Multiple Columns
22763 \family default
22764  style.
22765  Write in there your preface.
22766  An example with some preface text:
22767 \end_layout
22768
22769 \begin_layout Standard
22770 \begin_inset VSpace bigskip
22771 \end_inset
22772
22773
22774 \end_layout
22775
22776 \begin_layout Begin Multiple Columns
22777 2
22778 \begin_inset Argument post:1
22779 status open
22780
22781 \begin_layout Plain Layout
22782 And the story continues and continues and continues and continues\SpecialChar \ldots{}
22783
22784 \end_layout
22785
22786 \end_inset
22787
22788
22789 \end_layout
22790
22791 \begin_layout Standard
22792
22793 \size small
22794 On the evening of the crime, he returned from the club exactly at ten.
22795  His mother and sister were out spending the evening with a relation.
22796  The servant deposed that she heard him enter the front room on the second
22797  floor, generally used as his sitting-room.
22798  She had lit a fire there, and as it smoked she had opened the window.
22799  No sound was heard from the room until eleven-twenty, the hour of the return
22800  of Lady Maynooth and her daughter.
22801  Desiring to say good-night, she attempted to enter her son's room.
22802  The door was locked on the inside, and no answer could be got to their
22803  cries and knocking.
22804  Help was obtained, and the door forced.
22805  The unfortunate young man was found lying near the table.
22806  His head had been horribly mutilated by an expanding revolver bullet, but
22807  no weapon of any sort was to be found in the room.
22808 \end_layout
22809
22810 \begin_layout End Multiple Columns
22811
22812 \end_layout
22813
22814 \begin_layout Standard
22815 You can also use a section heading as the preface if you use a section command
22816  as TeX Code.
22817  For example the command
22818 \end_layout
22819
22820 \begin_layout Standard
22821
22822 \series bold
22823
22824 \backslash
22825 subsection{subsection title}
22826 \end_layout
22827
22828 \begin_layout Standard
22829 creates a subsection.
22830  In this example the preface is a subsubsection:
22831 \end_layout
22832
22833 \begin_layout Begin Multiple Columns
22834 2
22835 \begin_inset Argument post:1
22836 status open
22837
22838 \begin_layout Plain Layout
22839 \begin_inset ERT
22840 status collapsed
22841
22842 \begin_layout Plain Layout
22843
22844
22845 \backslash
22846 subsubsection{
22847 \end_layout
22848
22849 \end_inset
22850
22851 This is a subsubsection heading as a preface
22852 \begin_inset ERT
22853 status collapsed
22854
22855 \begin_layout Plain Layout
22856
22857 }
22858 \end_layout
22859
22860 \end_inset
22861
22862
22863 \end_layout
22864
22865 \end_inset
22866
22867
22868 \end_layout
22869
22870 \begin_layout Standard
22871
22872 \size small
22873 A minute examination of the circumstances served only to make the case more
22874  complex.
22875  In the first place, no reason could be given why the young man should have
22876  fastened the door upon the inside.
22877  There was the possibility that the murderer had done this, and had afterwards
22878  escaped by the window.
22879  The drop was at least twenty feet, however, and a bed of crocuses in full
22880  bloom lay beneath.
22881  Neither the flowers nor the earth showed any sign of having been disturbed,
22882  nor were there any marks upon the narrow strip of grass which separated
22883  the house from the road.
22884  Apparently, therefore, it was the young man himself who had fastened the
22885  door.
22886  But how did he come by his death? No one could have climbed up to the window
22887  without leaving traces.
22888  Suppose a man had fired through the window, he would indeed be a remarkable
22889  shot who could with a revolver inflict so deadly a wound.
22890  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
22891  a hundred yards of the house.
22892  No one had heard a shot.
22893 \end_layout
22894
22895 \begin_layout End Multiple Columns
22896
22897 \end_layout
22898
22899 \begin_layout Standard
22900 If there is less vertical space than 6
22901 \begin_inset space ~
22902 \end_inset
22903
22904 text lines is left on the page at the beginning of the multiple columns,
22905  a page break will be inserted before the multiple columns.
22906  Depending on the number of lines of the preface text, you might want to
22907  change this space.
22908  This is done by inserting the optional parameter 
22909 \family sans
22910 Space before page break
22911 \family default
22912  behind the preface.
22913  There insert the amount of space like e.
22914 \begin_inset space \thinspace{}
22915 \end_inset
22916
22917 g.
22918 \begin_inset space \space{}
22919 \end_inset
22920
22921
22922 \begin_inset Quotes eld
22923 \end_inset
22924
22925 5cm
22926 \begin_inset Quotes erd
22927 \end_inset
22928
22929 .
22930  In this example the space is set to 7
22931 \begin_inset space ~
22932 \end_inset
22933
22934 text lines by using 
22935 \begin_inset Quotes eld
22936 \end_inset
22937
22938 7
22939 \backslash
22940 baselineskip
22941 \begin_inset Quotes erd
22942 \end_inset
22943
22944  (where the command 
22945 \series bold
22946
22947 \backslash
22948 baselineskip
22949 \series default
22950  needs to be inserted as TeX code):
22951 \end_layout
22952
22953 \begin_layout Begin Multiple Columns
22954 2
22955 \begin_inset Argument post:1
22956 status open
22957
22958 \begin_layout Plain Layout
22959 \begin_inset ERT
22960 status collapsed
22961
22962 \begin_layout Plain Layout
22963
22964
22965 \backslash
22966 subsubsection{
22967 \end_layout
22968
22969 \end_inset
22970
22971 This is the sectioning command
22972 \begin_inset Newline newline
22973 \end_inset
22974
22975 as a preface and
22976 \begin_inset Newline newline
22977 \end_inset
22978
22979 with multiple text lines
22980 \begin_inset ERT
22981 status collapsed
22982
22983 \begin_layout Plain Layout
22984
22985 }
22986 \end_layout
22987
22988 \end_inset
22989
22990
22991 \end_layout
22992
22993 \end_inset
22994
22995
22996 \begin_inset Argument post:2
22997 status open
22998
22999 \begin_layout Plain Layout
23000 7
23001 \begin_inset ERT
23002 status collapsed
23003
23004 \begin_layout Plain Layout
23005
23006
23007 \backslash
23008 baselineskip
23009 \end_layout
23010
23011 \end_inset
23012
23013
23014 \end_layout
23015
23016 \end_inset
23017
23018
23019 \end_layout
23020
23021 \begin_layout Standard
23022
23023 \size small
23024 On the evening of the crime, he returned from the club exactly at ten.
23025  His mother and sister were out spending the evening with a relation.
23026  The servant deposed that she heard him enter the front room on the second
23027  floor, generally used as his sitting-room.
23028  She had lit a fire there, and as it smoked she had opened the window.
23029  No sound was heard from the room until eleven-twenty, the hour of the return
23030  of Lady Maynooth and her daughter.
23031  Desiring to say good-night, she attempted to enter her son's room.
23032  The door was locked on the inside, and no answer could be got to their
23033  cries and knocking.
23034  Help was obtained, and the door forced.
23035  The unfortunate young man was found lying near the table.
23036  His head had been horribly mutilated by an expanding revolver bullet, but
23037  no weapon of any sort was to be found in the room.
23038 \end_layout
23039
23040 \begin_layout End Multiple Columns
23041
23042 \end_layout
23043
23044 \begin_layout Subsubsection
23045 Surrounding Space
23046 \end_layout
23047
23048 \begin_layout Standard
23049 The amount of space before and after multiple columns can be changed by
23050  changing the length 
23051 \series bold
23052
23053 \backslash
23054 multicolsep
23055 \series default
23056 .
23057  For example the command
23058 \end_layout
23059
23060 \begin_layout Standard
23061
23062 \series bold
23063
23064 \backslash
23065 setlength{
23066 \backslash
23067 multicolsep}{3cm}
23068 \end_layout
23069
23070 \begin_layout Standard
23071 in TeX Code changes its value to 3
23072 \begin_inset space \thinspace{}
23073 \end_inset
23074
23075 cm.
23076  The change must be made before the multiple columns' start.
23077  The predefined value is 13
23078 \begin_inset space \thinspace{}
23079 \end_inset
23080
23081 pt.
23082 \end_layout
23083
23084 \begin_layout Standard
23085 For this example 
23086 \series bold
23087
23088 \backslash
23089 multicolsep
23090 \series default
23091  was set to 2.5
23092 \begin_inset space \thinspace{}
23093 \end_inset
23094
23095 cm:
23096 \end_layout
23097
23098 \begin_layout Standard
23099 \begin_inset ERT
23100 status open
23101
23102 \begin_layout Plain Layout
23103
23104
23105 \backslash
23106 setlength{
23107 \backslash
23108 multicolsep}{2.5cm}
23109 \end_layout
23110
23111 \end_inset
23112
23113
23114 \end_layout
23115
23116 \begin_layout Begin Multiple Columns
23117 2
23118 \end_layout
23119
23120 \begin_layout Standard
23121
23122 \size small
23123 All day I turned these facts over in my mind, endeavouring to hit upon some
23124  theory which could reconcile them all, and to find that line of least resistanc
23125 e which my poor friend had declared to be the starting-point of every investigat
23126 ion.
23127  I confess that I made little progress.
23128  In the evening I strolled across the Park, and found myself about six o'clock
23129  at the Oxford Street end of Park Lane.
23130  A group of loafers upon the pavements, all staring up at a particular window,
23131  directed me to the house which I had come to see.
23132  A tall, thin man with coloured glasses, whom I strongly suspected of being
23133  a plain-clothes detective, was pointing out some theory of his own, while
23134  the others crowded round to listen to what he said.
23135  I got as near him as I could, but his observations seemed to me to be absurd,
23136  so I withdrew again in some disgust.
23137  As I did so I struck against an elderly, deformed man, who had been behind
23138  me, and I knocked down several books which he was carrying.
23139 \end_layout
23140
23141 \begin_layout End Multiple Columns
23142
23143 \end_layout
23144
23145 \begin_layout Standard
23146 \begin_inset Note Greyedout
23147 status open
23148
23149 \begin_layout Plain Layout
23150
23151 \series bold
23152 Note:
23153 \series default
23154  The values you set with 
23155 \series bold
23156
23157 \backslash
23158 setlength
23159 \series default
23160  will be used for all following multiple columns until you change them again.
23161 \end_layout
23162
23163 \end_inset
23164
23165
23166 \end_layout
23167
23168 \begin_layout Standard
23169 \begin_inset ERT
23170 status collapsed
23171
23172 \begin_layout Plain Layout
23173
23174
23175 \backslash
23176 setlength{
23177 \backslash
23178 multicolsep}{13pt}
23179 \end_layout
23180
23181 \end_inset
23182
23183
23184 \begin_inset Note Note
23185 status collapsed
23186
23187 \begin_layout Plain Layout
23188 go back to the default
23189 \end_layout
23190
23191 \end_inset
23192
23193
23194 \end_layout
23195
23196 \begin_layout Standard
23197 \begin_inset Newpage newpage
23198 \end_inset
23199
23200
23201 \end_layout
23202
23203 \begin_layout Subsubsection
23204 Column Separation
23205 \end_layout
23206
23207 \begin_layout Standard
23208 The width of the columns is automatically calculated, but you can modify
23209  the space between the columns.
23210  This is done by changing the length 
23211 \series bold
23212
23213 \backslash
23214 columnsep
23215 \series default
23216 .
23217  Its predefined value is 10
23218 \begin_inset space \thinspace{}
23219 \end_inset
23220
23221 pt.
23222  Here is an example where 
23223 \series bold
23224
23225 \backslash
23226 columnsep
23227 \series default
23228  is set to 3
23229 \begin_inset space \thinspace{}
23230 \end_inset
23231
23232 cm:
23233 \end_layout
23234
23235 \begin_layout Standard
23236 \begin_inset ERT
23237 status open
23238
23239 \begin_layout Plain Layout
23240
23241
23242 \backslash
23243 setlength{
23244 \backslash
23245 columnsep}{3cm}
23246 \end_layout
23247
23248 \end_inset
23249
23250
23251 \end_layout
23252
23253 \begin_layout Begin Multiple Columns
23254 2
23255 \end_layout
23256
23257 \begin_layout Standard
23258
23259 \size small
23260 My observations of No.
23261 \begin_inset space \space{}
23262 \end_inset
23263
23264 427 Park Lane did little to clear up the problem in which I was interested.
23265  The house was separated from the street by a low wall and railing, the
23266  whole not more than five feet high.
23267  It was perfectly easy, therefore, for anyone to get into the garden, but
23268  the window was entirely inaccessible, since there was no water pipe or
23269  anything which could help the most active man to climb it.
23270  More puzzled than ever, I retraced my steps to Kensington.
23271  I had not been in my study five minutes when the maid entered to say that
23272  a person desired to see me.
23273  To my astonishment it was none other than my strange old book collector,
23274  his sharp, wizened face peering out from a frame of white hair, and his
23275  precious volumes, a dozen of them at least, wedged under his right arm.
23276 \end_layout
23277
23278 \begin_layout End Multiple Columns
23279
23280 \end_layout
23281
23282 \begin_layout Standard
23283 \begin_inset ERT
23284 status collapsed
23285
23286 \begin_layout Plain Layout
23287
23288
23289 \backslash
23290 setlength{
23291 \backslash
23292 columnsep}{10pt}
23293 \end_layout
23294
23295 \end_inset
23296
23297
23298 \begin_inset Note Note
23299 status collapsed
23300
23301 \begin_layout Plain Layout
23302 go back to the default
23303 \end_layout
23304
23305 \end_inset
23306
23307
23308 \end_layout
23309
23310 \begin_layout Subsubsection
23311 Vertical Lines
23312 \end_layout
23313
23314 \begin_layout Standard
23315 Between the columns a rule with a width of the length 
23316 \series bold
23317
23318 \backslash
23319 columnseprule
23320 \series default
23321  is placed.
23322  If this rule width is set to 0
23323 \begin_inset space \thinspace{}
23324 \end_inset
23325
23326 pt (this is the default), the rule is suppressed.
23327  In the following example the line is 2
23328 \begin_inset space \thinspace{}
23329 \end_inset
23330
23331 pt wide:
23332 \end_layout
23333
23334 \begin_layout Standard
23335 \begin_inset ERT
23336 status open
23337
23338 \begin_layout Plain Layout
23339
23340
23341 \backslash
23342 setlength{
23343 \backslash
23344 columnseprule}{2pt}
23345 \end_layout
23346
23347 \end_inset
23348
23349
23350 \end_layout
23351
23352 \begin_layout Begin Multiple Columns
23353 2
23354 \end_layout
23355
23356 \begin_layout Standard
23357
23358 \size small
23359 \begin_inset Quotes eld
23360 \end_inset
23361
23362 You're surprised to see me, sir,
23363 \begin_inset Quotes erd
23364 \end_inset
23365
23366  said he, in a strange, croaking voice.
23367 \end_layout
23368
23369 \begin_layout Standard
23370
23371 \size small
23372 I acknowledged that I was.
23373 \end_layout
23374
23375 \begin_layout Standard
23376
23377 \size small
23378 \begin_inset Quotes eld
23379 \end_inset
23380
23381 Well, I've a conscience, sir, and when I chanced to see you go into this
23382  house, as I came hobbling after you, I thought to myself, I'll just step
23383  in and see that kind gentleman, and tell him that if I was a bit gruff
23384  in my manner there was not any harm meant, and that I am much obliged to
23385  him for picking up my books.
23386 \begin_inset Quotes erd
23387 \end_inset
23388
23389
23390 \end_layout
23391
23392 \begin_layout Standard
23393
23394 \size small
23395 \begin_inset Quotes eld
23396 \end_inset
23397
23398 You make too much of a trifle,
23399 \begin_inset Quotes erd
23400 \end_inset
23401
23402  said I.
23403  
23404 \begin_inset Quotes eld
23405 \end_inset
23406
23407 May I ask how you knew who I was?
23408 \begin_inset Quotes erd
23409 \end_inset
23410
23411
23412 \end_layout
23413
23414 \begin_layout Standard
23415
23416 \size small
23417 \begin_inset Quotes eld
23418 \end_inset
23419
23420 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
23421  you'll find my little bookshop at the corner of Church Street, and very
23422  happy to see you, I am sure.
23423  Maybe you collect yourself, sir.
23424  Here's 
23425 \noun on
23426 British
23427 \begin_inset space ~
23428 \end_inset
23429
23430 Birds
23431 \noun default
23432 , and 
23433 \noun on
23434 Catullus
23435 \noun default
23436 , and 
23437 \noun on
23438 The Holy War
23439 \noun default
23440 --a bargain, every one of them.
23441  With five volumes you could just fill that gap on that second shelf.
23442  It looks untidy, does it not, sir?
23443 \begin_inset Quotes erd
23444 \end_inset
23445
23446
23447 \end_layout
23448
23449 \begin_layout End Multiple Columns
23450
23451 \end_layout
23452
23453 \begin_layout Standard
23454 \begin_inset ERT
23455 status collapsed
23456
23457 \begin_layout Plain Layout
23458
23459
23460 \backslash
23461 setlength{
23462 \backslash
23463 columnseprule}{0pt}
23464 \end_layout
23465
23466 \end_inset
23467
23468
23469 \begin_inset Note Note
23470 status collapsed
23471
23472 \begin_layout Plain Layout
23473 go back to the default
23474 \end_layout
23475
23476 \end_inset
23477
23478
23479 \end_layout
23480
23481 \begin_layout Standard
23482 \begin_inset Newpage newpage
23483 \end_inset
23484
23485
23486 \end_layout
23487
23488 \begin_layout Section
23489 Non-standard Paragraph Shapes
23490 \end_layout
23491
23492 \begin_layout Standard
23493 \noindent
23494 LaTeX as well as any other text processor uses by default rectangular paragraphs.
23495  For special cases like for example posters, invitation cards or poems you
23496  can modify the paragraph shape to one of your choice.
23497  This can be done by using the LaTeX-package 
23498 \series bold
23499 shapepar
23500 \series default
23501  which is loaded by using in the document settings the module 
23502 \family sans
23503 Custom paragraph shapes
23504 \family default
23505 .
23506 \end_layout
23507
23508 \begin_layout Subsection
23509 Predefined shapes
23510 \end_layout
23511
23512 \begin_layout Standard
23513
23514 \series bold
23515 shapepar
23516 \series default
23517  provides the following shapes:
23518 \end_layout
23519
23520 \begin_layout Standard
23521 \begin_inset Tabular
23522 <lyxtabular version="3" rows="13" columns="3">
23523 <features rotate="0" booktabs="true" islongtable="true" longtabularalignment="center">
23524 <column alignment="center" valignment="middle" width="16col%">
23525 <column alignment="center" valignment="middle" width="40col%">
23526 <column alignment="center" valignment="middle" width="35col%">
23527 <row endhead="true">
23528 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
23529 \begin_inset Text
23530
23531 \begin_layout Plain Layout
23532 Name
23533 \end_layout
23534
23535 \end_inset
23536 </cell>
23537 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
23538 \begin_inset Text
23539
23540 \begin_layout Plain Layout
23541 Description
23542 \end_layout
23543
23544 \end_inset
23545 </cell>
23546 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
23547 \begin_inset Text
23548
23549 \begin_layout Plain Layout
23550 Annotation
23551 \end_layout
23552
23553 \end_inset
23554 </cell>
23555 </row>
23556 <row>
23557 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
23558 \begin_inset Text
23559
23560 \begin_layout Plain Layout
23561 CDlabel
23562 \end_layout
23563
23564 \end_inset
23565 </cell>
23566 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
23567 \begin_inset Text
23568
23569 \begin_layout Plain Layout
23570 Circle with circular hole (in the size of a CD/DVD)
23571 \end_layout
23572
23573 \end_inset
23574 </cell>
23575 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
23576 \begin_inset Text
23577
23578 \begin_layout Plain Layout
23579 Cannot be scaled, take care there is not too much text
23580 \end_layout
23581
23582 \end_inset
23583 </cell>
23584 </row>
23585 <row>
23586 <cell alignment="center" valignment="top" topline="true" usebox="none">
23587 \begin_inset Text
23588
23589 \begin_layout Plain Layout
23590 Circle
23591 \end_layout
23592
23593 \end_inset
23594 </cell>
23595 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
23596 \begin_inset Text
23597
23598 \begin_layout Plain Layout
23599 Circle
23600 \end_layout
23601
23602 \end_inset
23603 </cell>
23604 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
23605 \begin_inset Text
23606
23607 \begin_layout Plain Layout
23608 Fragile, calculation might fail
23609 \end_layout
23610
23611 \end_inset
23612 </cell>
23613 </row>
23614 <row>
23615 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
23616 \begin_inset Text
23617
23618 \begin_layout Plain Layout
23619 Diamond
23620 \end_layout
23621
23622 \end_inset
23623 </cell>
23624 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
23625 \begin_inset Text
23626
23627 \begin_layout Plain Layout
23628 Rhomboid (symbolizing a 
23629 \begin_inset Quotes eld
23630 \end_inset
23631
23632 diamond
23633 \begin_inset Quotes erd
23634 \end_inset
23635
23636 )
23637 \end_layout
23638
23639 \end_inset
23640 </cell>
23641 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
23642 \begin_inset Text
23643
23644 \begin_layout Plain Layout
23645 -
23646 \end_layout
23647
23648 \end_inset
23649 </cell>
23650 </row>
23651 <row>
23652 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
23653 \begin_inset Text
23654
23655 \begin_layout Plain Layout
23656 Heart
23657 \end_layout
23658
23659 \end_inset
23660 </cell>
23661 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
23662 \begin_inset Text
23663
23664 \begin_layout Plain Layout
23665 Heart-like shape
23666 \end_layout
23667
23668 \end_inset
23669 </cell>
23670 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
23671 \begin_inset Text
23672
23673 \begin_layout Plain Layout
23674 -
23675 \end_layout
23676
23677 \end_inset
23678 </cell>
23679 </row>
23680 <row>
23681 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
23682 \begin_inset Text
23683
23684 \begin_layout Plain Layout
23685 Hexagon
23686 \end_layout
23687
23688 \end_inset
23689 </cell>
23690 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
23691 \begin_inset Text
23692
23693 \begin_layout Plain Layout
23694 Hexagon
23695 \end_layout
23696
23697 \end_inset
23698 </cell>
23699 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
23700 \begin_inset Text
23701
23702 \begin_layout Plain Layout
23703 -
23704 \end_layout
23705
23706 \end_inset
23707 </cell>
23708 </row>
23709 <row>
23710 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
23711 \begin_inset Text
23712
23713 \begin_layout Plain Layout
23714 Nut
23715 \end_layout
23716
23717 \end_inset
23718 </cell>
23719 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
23720 \begin_inset Text
23721
23722 \begin_layout Plain Layout
23723 Nut for bolt (hexagon with circular hole)
23724 \end_layout
23725
23726 \end_inset
23727 </cell>
23728 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
23729 \begin_inset Text
23730
23731 \begin_layout Plain Layout
23732 -
23733 \end_layout
23734
23735 \end_inset
23736 </cell>
23737 </row>
23738 <row>
23739 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
23740 \begin_inset Text
23741
23742 \begin_layout Plain Layout
23743 Square
23744 \end_layout
23745
23746 \end_inset
23747 </cell>
23748 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
23749 \begin_inset Text
23750
23751 \begin_layout Plain Layout
23752 Square
23753 \end_layout
23754
23755 \end_inset
23756 </cell>
23757 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
23758 \begin_inset Text
23759
23760 \begin_layout Plain Layout
23761 -
23762 \end_layout
23763
23764 \end_inset
23765 </cell>
23766 </row>
23767 <row>
23768 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
23769 \begin_inset Text
23770
23771 \begin_layout Plain Layout
23772 Star
23773 \end_layout
23774
23775 \end_inset
23776 </cell>
23777 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
23778 \begin_inset Text
23779
23780 \begin_layout Plain Layout
23781 Five-point star
23782 \end_layout
23783
23784 \end_inset
23785 </cell>
23786 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
23787 \begin_inset Text
23788
23789 \begin_layout Plain Layout
23790 -
23791 \end_layout
23792
23793 \end_inset
23794 </cell>
23795 </row>
23796 <row>
23797 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
23798 \begin_inset Text
23799
23800 \begin_layout Plain Layout
23801 Candle
23802 \end_layout
23803
23804 \end_inset
23805 </cell>
23806 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
23807 \begin_inset Text
23808
23809 \begin_layout Plain Layout
23810 Burning candle
23811 \end_layout
23812
23813 \end_inset
23814 </cell>
23815 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
23816 \begin_inset Text
23817
23818 \begin_layout Plain Layout
23819 -
23820 \end_layout
23821
23822 \end_inset
23823 </cell>
23824 </row>
23825 <row>
23826 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
23827 \begin_inset Text
23828
23829 \begin_layout Plain Layout
23830 Drop down/up
23831 \end_layout
23832
23833 \end_inset
23834 </cell>
23835 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
23836 \begin_inset Text
23837
23838 \begin_layout Plain Layout
23839 Normal/reversed rain drop
23840 \end_layout
23841
23842 \end_inset
23843 </cell>
23844 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
23845 \begin_inset Text
23846
23847 \begin_layout Plain Layout
23848 Fragile, calculation might fail
23849 \end_layout
23850
23851 \end_inset
23852 </cell>
23853 </row>
23854 <row>
23855 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
23856 \begin_inset Text
23857
23858 \begin_layout Plain Layout
23859 TeX
23860 \end_layout
23861
23862 \end_inset
23863 </cell>
23864 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
23865 \begin_inset Text
23866
23867 \begin_layout Plain Layout
23868 The TeX logo
23869 \end_layout
23870
23871 \end_inset
23872 </cell>
23873 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
23874 \begin_inset Text
23875
23876 \begin_layout Plain Layout
23877 -
23878 \end_layout
23879
23880 \end_inset
23881 </cell>
23882 </row>
23883 <row>
23884 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
23885 \begin_inset Text
23886
23887 \begin_layout Plain Layout
23888 Triangle up/down/
23889 \begin_inset Newline newline
23890 \end_inset
23891
23892 left/right
23893 \end_layout
23894
23895 \end_inset
23896 </cell>
23897 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
23898 \begin_inset Text
23899
23900 \begin_layout Plain Layout
23901 Triangles in different orientations
23902 \end_layout
23903
23904 \end_inset
23905 </cell>
23906 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
23907 \begin_inset Text
23908
23909 \begin_layout Plain Layout
23910 -
23911 \end_layout
23912
23913 \end_inset
23914 </cell>
23915 </row>
23916 </lyxtabular>
23917
23918 \end_inset
23919
23920
23921 \end_layout
23922
23923 \begin_layout Standard
23924 To use a shape for your paragraph, simply select it in LyX's pull-down box
23925  for environments in the toolbar.
23926 \end_layout
23927
23928 \begin_layout Standard
23929 \begin_inset Newpage newpage
23930 \end_inset
23931
23932
23933 \end_layout
23934
23935 \begin_layout Standard
23936 Here is an example paragraph in the shape of a nut:
23937 \end_layout
23938
23939 \begin_layout Standard
23940 \begin_inset VSpace bigskip
23941 \end_inset
23942
23943
23944 \end_layout
23945
23946 \begin_layout Nut
23947
23948 \lang latin
23949 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
23950  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
23951  voluptua.
23952  At vero eos et accusam et justo duo dolores et ea rebum.
23953  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
23954  sit amet.
23955  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
23956  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
23957  voluptua.
23958 \end_layout
23959
23960 \begin_layout Standard
23961 \begin_inset VSpace bigskip
23962 \end_inset
23963
23964
23965 \end_layout
23966
23967 \begin_layout Standard
23968 \begin_inset Note Greyedout
23969 status open
23970
23971 \begin_layout Plain Layout
23972
23973 \series bold
23974 Note
23975 \series default
23976 : shapepar paragraphs cannot run over a page break.
23977 \end_layout
23978
23979 \end_inset
23980
23981
23982 \end_layout
23983
23984 \begin_layout Standard
23985 \begin_inset VSpace bigskip
23986 \end_inset
23987
23988
23989 \end_layout
23990
23991 \begin_layout Standard
23992
23993 \series bold
23994 shapepar
23995 \series default
23996  takes care that the shape will always be preserved, no matter how much
23997  text is in the paragraph.
23998  Therefore the paragraph size changes with the amount of contained text.
23999  This can lead to paragraph sizes exceeding the page margins.
24000  To demonstrate the size scaling, here is the same example paragraph but
24001  with twice as much text:
24002 \end_layout
24003
24004 \begin_layout Standard
24005 \begin_inset Newpage newpage
24006 \end_inset
24007
24008
24009 \end_layout
24010
24011 \begin_layout Nut
24012
24013 \lang latin
24014 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
24015  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
24016  voluptua.
24017  At vero eos et accusam et justo duo dolores et ea rebum.
24018  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
24019  sit amet.
24020  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
24021  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
24022  voluptua.
24023  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
24024  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
24025  voluptua.
24026  At vero eos et accusam et justo duo dolores et ea rebum.
24027  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
24028  sit amet.
24029  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
24030  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
24031  voluptua.
24032 \end_layout
24033
24034 \begin_layout Standard
24035 \begin_inset VSpace bigskip
24036 \end_inset
24037
24038
24039 \end_layout
24040
24041 \begin_layout Standard
24042 An exception is the shape 
24043 \family sans
24044 CDlabel
24045 \family default
24046 .
24047  It cannot be scaled because it must fit the size of a CD/DVD.
24048  Therefore the amount of text that fits into the shape is limited.
24049 \begin_inset Newline newline
24050 \end_inset
24051
24052 The 
24053 \family sans
24054 drop
24055 \family default
24056  shapes and the 
24057 \family sans
24058 circle
24059 \family default
24060  shape are fragile, meaning that the calculation of their size can fail,
24061  depending on the amount of text.
24062  You will then get the LaTeX error 
24063 \begin_inset Quotes eld
24064 \end_inset
24065
24066 Arithmetic overflow
24067 \begin_inset Quotes erd
24068 \end_inset
24069
24070 .
24071  In this case one can try to remove or add some text; if nothing works one
24072  has to use another shape.
24073 \end_layout
24074
24075 \begin_layout Standard
24076 \begin_inset VSpace bigskip
24077 \end_inset
24078
24079
24080 \end_layout
24081
24082 \begin_layout Standard
24083 For shapes with tips you will maybe see that LaTeX's hyphenation routine
24084  fails for text in the tips.
24085  Therefore it is often necessary to add hyphenation points 
24086 \family sans
24087 (
24088 \begin_inset Info
24089 type  "shortcut"
24090 arg   "specialchar-insert hyphenation"
24091 \end_inset
24092
24093
24094 \family default
24095 ) to the corresponding text parts.
24096 \end_layout
24097
24098 \begin_layout Standard
24099 \begin_inset VSpace bigskip
24100 \end_inset
24101
24102
24103 \end_layout
24104
24105 \begin_layout Standard
24106 Shapepar paragraphs are always placed on the page that their left border
24107  touches the left page margin.
24108  You can therefore not use the paragraph dialog to align such paragraphs.
24109  A solution is to put the paragraph into a minipage or parbox and align
24110  the box.
24111  The problem is hereby to find the right width for the box.
24112  Because if it is too wide and you center the box, the paragraph is not
24113  centered too because it sticks at the left side of the box.
24114  So you might have to play a bit with the width until it fits.
24115  Here are two triangular paragraphs, the first one is not aligned, the second
24116  one is centered:
24117 \end_layout
24118
24119 \begin_layout Standard
24120 \begin_inset Newpage newpage
24121 \end_inset
24122
24123
24124 \end_layout
24125
24126 \begin_layout Triangle up
24127
24128 \lang latin
24129 Lo\SpecialChar \-
24130 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
24131  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
24132  voluptua.
24133  At vero eos et accusam et justo duo dolores et ea rebum.
24134  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
24135  sit amet.
24136 \end_layout
24137
24138 \begin_layout Standard
24139 \begin_inset VSpace bigskip
24140 \end_inset
24141
24142
24143 \end_layout
24144
24145 \begin_layout Standard
24146 \align center
24147 \begin_inset Box Frameless
24148 position "t"
24149 hor_pos "c"
24150 has_inner_box 1
24151 inner_pos "t"
24152 use_parbox 1
24153 use_makebox 0
24154 width "42col%"
24155 special "none"
24156 height "1in"
24157 height_special "totalheight"
24158 status open
24159
24160 \begin_layout Triangle up
24161
24162 \lang latin
24163 Lo\SpecialChar \-
24164 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
24165  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
24166  voluptua.
24167  At vero eos et accusam et justo duo dolores et ea rebum.
24168  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
24169  sit amet.
24170 \end_layout
24171
24172 \end_inset
24173
24174
24175 \end_layout
24176
24177 \begin_layout Subsection
24178 Custom shapes
24179 \end_layout
24180
24181 \begin_layout Standard
24182 You can define any shape you want.
24183  Doing this manually is a lot of work because every coordinate must be specified.
24184  But there is a way to let the computer calculate the coordinates:
24185 \end_layout
24186
24187 \begin_layout Enumerate
24188 Install the program 
24189 \begin_inset CommandInset href
24190 LatexCommand href
24191 name "Jpgfdraw"
24192 target "http://www.ctan.org/tex-archive/graphics/jpgfdraw"
24193
24194 \end_inset
24195
24196 .
24197 \end_layout
24198
24199 \begin_layout Enumerate
24200 In 
24201 \family sans
24202 Jpgfdraw
24203 \family default
24204  go to the menu 
24205 \family sans
24206 Te
24207 \begin_inset ERT
24208 status collapsed
24209
24210 \begin_layout Plain Layout
24211
24212 {}
24213 \end_layout
24214
24215 \end_inset
24216
24217 X/LaT
24218 \begin_inset ERT
24219 status collapsed
24220
24221 \begin_layout Plain Layout
24222
24223 {}
24224 \end_layout
24225
24226 \end_inset
24227
24228 eX\SpecialChar \menuseparator
24229 Settings\SpecialChar \menuseparator
24230 Set Normal Size
24231 \family default
24232  and select the font size you are using in your document.
24233  For example this document uses the size 12
24234 \begin_inset space \thinspace{}
24235 \end_inset
24236
24237 pt.
24238 \end_layout
24239
24240 \begin_layout Enumerate
24241 Draw a shape.
24242 \end_layout
24243
24244 \begin_layout Enumerate
24245 Use the menu 
24246 \family sans
24247 Te
24248 \begin_inset ERT
24249 status collapsed
24250
24251 \begin_layout Plain Layout
24252
24253 {}
24254 \end_layout
24255
24256 \end_inset
24257
24258 X/LaT
24259 \begin_inset ERT
24260 status collapsed
24261
24262 \begin_layout Plain Layout
24263
24264 {}
24265 \end_layout
24266
24267 \end_inset
24268
24269 eX\SpecialChar \menuseparator
24270 Shapepar
24271 \family default
24272  to export the shape to coordinates.
24273  In the appearing dialog use either the outline of your shape for the coordinate
24274 s or the path itself.
24275 \begin_inset Foot
24276 status collapsed
24277
24278 \begin_layout Plain Layout
24279 For more information see 
24280 \begin_inset CommandInset href
24281 LatexCommand href
24282 target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html"
24283
24284 \end_inset
24285
24286
24287 \end_layout
24288
24289 \end_inset
24290
24291
24292 \end_layout
24293
24294 \begin_layout Standard
24295 The coordinates are written into a TeX-file.
24296  To use it for your LyX document
24297 \end_layout
24298
24299 \begin_layout Enumerate
24300 Place the cursor before the first character of your paragraph (or into a
24301  new empty one).
24302 \end_layout
24303
24304 \begin_layout Enumerate
24305 Open in LyX the menu 
24306 \family sans
24307 Insert\SpecialChar \menuseparator
24308 File\SpecialChar \menuseparator
24309 Child
24310 \begin_inset space ~
24311 \end_inset
24312
24313 Document
24314 \family default
24315 , select the file and use 
24316 \family sans
24317 Input
24318 \family default
24319  as 
24320 \family sans
24321 Include Type.
24322 \end_layout
24323
24324 \begin_layout Standard
24325 \begin_inset VSpace defskip
24326 \end_inset
24327
24328
24329 \end_layout
24330
24331 \begin_layout Standard
24332 \begin_inset Note Greyedout
24333 status open
24334
24335 \begin_layout Plain Layout
24336
24337 \series bold
24338 Note
24339 \series default
24340 : The changed shape only applies to the current paragraph; everything is
24341  reset to normal for the next paragraph.
24342  Therefore the shape definition file must be input into every paragraph
24343  with the desired shape.
24344 \end_layout
24345
24346 \end_inset
24347
24348
24349 \end_layout
24350
24351 \begin_layout Standard
24352 \begin_inset VSpace bigskip
24353 \end_inset
24354
24355
24356 \end_layout
24357
24358 \begin_layout Standard
24359 Here is an example:
24360 \end_layout
24361
24362 \begin_layout Standard
24363 \begin_inset VSpace bigskip
24364 \end_inset
24365
24366
24367 \end_layout
24368
24369 \begin_layout Standard
24370 \begin_inset CommandInset include
24371 LatexCommand input
24372 filename "SpecialParagraphShape.tex"
24373
24374 \end_inset
24375
24376
24377 \lang latin
24378 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
24379  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
24380  voluptua.
24381  At vero eos et accusam et justo duo dolores et ea rebum.
24382  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
24383  sit amet.
24384  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
24385  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
24386  voluptua.
24387 \end_layout
24388
24389 \begin_layout Standard
24390 \begin_inset VSpace bigskip
24391 \end_inset
24392
24393
24394 \end_layout
24395
24396 \begin_layout Standard
24397
24398 \series bold
24399 A tip:
24400 \series default
24401  to draw complexer shapes in 
24402 \family sans
24403 Jpgfdraw
24404 \family default
24405  you can draw the shape in a program of your choice and import the resulting
24406  image to 
24407 \family sans
24408 Jpgfdraw
24409 \family default
24410 .
24411  Then you only need to draw a line or spline along the outline of the image.
24412 \end_layout
24413
24414 \begin_layout Standard
24415 \begin_inset VSpace bigskip
24416 \end_inset
24417
24418
24419 \end_layout
24420
24421 \begin_layout Standard
24422 The module 
24423 \family sans
24424 Custom paragraph shapes
24425 \family default
24426  also provides the two commands 
24427 \family sans
24428 shapepar
24429 \family default
24430  and 
24431 \family sans
24432 Shapepar
24433 \family default
24434  which can be used to define custom shapes coordinate by coordinate.
24435 \begin_inset Foot
24436 status collapsed
24437
24438 \begin_layout Plain Layout
24439 These commands are internally used for all shapes described here.
24440 \end_layout
24441
24442 \end_inset
24443
24444  For information how these styles are used and about further customization
24445  possibilities, have a look at the documentation of the package 
24446 \series bold
24447 shapepar
24448 \series default
24449
24450 \begin_inset CommandInset citation
24451 LatexCommand cite
24452 key "shapepar"
24453
24454 \end_inset
24455
24456 .
24457 \end_layout
24458
24459 \begin_layout Bibliography
24460 \begin_inset CommandInset bibitem
24461 LatexCommand bibitem
24462 key "multicol"
24463
24464 \end_inset
24465
24466 Documentation of the LaTeX-package 
24467 \begin_inset CommandInset href
24468 LatexCommand href
24469 name "multicol"
24470 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
24471
24472 \end_inset
24473
24474
24475 \end_layout
24476
24477 \begin_layout Bibliography
24478 \begin_inset CommandInset bibitem
24479 LatexCommand bibitem
24480 key "shapepar"
24481
24482 \end_inset
24483
24484 Documentation of the LaTeX-package 
24485 \begin_inset CommandInset href
24486 LatexCommand href
24487 name "shapepar"
24488 target "http://mirrors.ctan.org/macros/latex/contrib/shapepar/shapepar.pdf"
24489
24490 \end_inset
24491
24492
24493 \end_layout
24494
24495 \end_body
24496 \end_document