]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
Restore 'pdf' default format of Japanese docs
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 474
3 \begin_document
4 \begin_header
5 \textclass scrbook
6 \begin_preamble
7 % DO NOT ALTER THIS PREAMBLE!!!
8 %
9 % This preamble is designed to ensure that the manual prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the manual may not print out as expected.  If you
12 % have problems LaTeXing this file, please contact 
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
15
16 % if pdflatex is used
17 \usepackage{ifpdf}
18 \ifpdf
19
20  % set fonts for nicer pdf view
21  \IfFileExists{lmodern.sty}
22   {\usepackage{lmodern}}{}
23
24 \fi % end if pdflatex is used
25
26 % the pages of the TOC are numbered roman
27 % and a PDF-bookmark for the TOC is added
28 \pagenumbering{roman}
29 \let\myTOC\tableofcontents
30 \renewcommand{\tableofcontents}{%
31  \pdfbookmark[1]{\contentsname}{}
32  \myTOC
33  \cleardoublepage
34  \pagenumbering{arabic}}
35
36 % extra space for tables
37 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
38 \end_preamble
39 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
40 \use_default_options false
41 \begin_modules
42 logicalmkup
43 theorems-ams
44 theorems-ams-extended
45 multicol
46 shapepar
47 \end_modules
48 \maintain_unincluded_children false
49 \begin_local_layout
50 Format 7
51 InsetLayout CharStyle:MenuItem
52 LyxType               charstyle
53 LabelString           menu
54 LatexType             command
55 LatexName             menuitem
56 Font
57 Family              Sans
58 EndFont
59 Preamble
60 \newcommand*{\menuitem}[1]{{\sffamily #1}}
61 EndPreamble
62 End
63 \end_local_layout
64 \language english
65 \language_package default
66 \inputencoding auto
67 \fontencoding global
68 \font_roman default
69 \font_sans default
70 \font_typewriter default
71 \font_math auto
72 \font_default_family default
73 \use_non_tex_fonts false
74 \font_sc false
75 \font_osf false
76 \font_sf_scale 100
77 \font_tt_scale 100
78 \graphics default
79 \default_output_format default
80 \output_sync 0
81 \bibtex_command default
82 \index_command default
83 \paperfontsize 12
84 \spacing single
85 \use_hyperref true
86 \pdf_title "LyX's Additional Features manual"
87 \pdf_author "LyX Team"
88 \pdf_subject "LyX's additional features documentation"
89 \pdf_keywords "LyX, Documentation, Additional"
90 \pdf_bookmarks true
91 \pdf_bookmarksnumbered true
92 \pdf_bookmarksopen false
93 \pdf_bookmarksopenlevel 1
94 \pdf_breaklinks false
95 \pdf_pdfborder false
96 \pdf_colorlinks true
97 \pdf_backref false
98 \pdf_pdfusetitle false
99 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
100 \papersize a4paper
101 \use_geometry false
102 \use_package amsmath 1
103 \use_package amssymb 1
104 \use_package cancel 0
105 \use_package esint 0
106 \use_package mathdots 1
107 \use_package mathtools 0
108 \use_package mhchem 1
109 \use_package stackrel 0
110 \use_package stmaryrd 0
111 \use_package undertilde 0
112 \cite_engine basic
113 \cite_engine_type default
114 \biblio_style plain
115 \use_bibtopic false
116 \use_indices false
117 \paperorientation portrait
118 \suppress_date false
119 \justification true
120 \use_refstyle 0
121 \notefontcolor #0000ff
122 \index Index
123 \shortcut idx
124 \color #008000
125 \end_index
126 \secnumdepth 3
127 \tocdepth 3
128 \paragraph_separation indent
129 \paragraph_indentation default
130 \quotes_language english
131 \papercolumns 1
132 \papersides 2
133 \paperpagestyle headings
134 \tracking_changes false
135 \output_changes false
136 \html_math_output 0
137 \html_css_as_file 0
138 \html_be_strict true
139 \end_header
140
141 \begin_body
142
143 \begin_layout Title
144 Additional LyX Features
145 \end_layout
146
147 \begin_layout Subtitle
148 Version 2.1.x
149 \end_layout
150
151 \begin_layout Author
152 by the LyX Team
153 \begin_inset Foot
154 status collapsed
155
156 \begin_layout Plain Layout
157 \noindent
158 Principal maintainer of this file is
159 \noun on
160  Richard Heck
161 \noun default
162 .
163  If you have comments or error corrections, please send them to the LyX
164  Documentation mailing list, 
165 \begin_inset Flex Code
166 status collapsed
167
168 \begin_layout Plain Layout
169 \noindent
170 <lyx-docs@lists.lyx.org>
171 \end_layout
172
173 \end_inset
174
175 .
176 \end_layout
177
178 \end_inset
179
180
181 \end_layout
182
183 \begin_layout Standard
184 \begin_inset CommandInset toc
185 LatexCommand tableofcontents
186
187 \end_inset
188
189
190 \end_layout
191
192 \begin_layout Chapter
193 Introduction
194 \end_layout
195
196 \begin_layout Standard
197 This manual is essentially Part II of the 
198 \emph on
199 User's Guide\SpecialChar \@.
200
201 \emph default
202  The reason for separating the two documents is simple: the 
203 \emph on
204 User's Guide
205 \emph default
206  is already quite lengthy, and it contains information on all of the basic
207  features one needs to know in order to prepare most documents.
208  However, the LyX Team has worked to make LyX extensible through various
209  configuration files and external packages.
210  That means that if you want to support the Fizzwizzle LaTeX package, you
211  can create a layout file (or module) for it without having to alter LyX
212  itself.
213  We've already had contributions of several new features this way, and some
214  of them are documented here.
215  There are also some more `advanced' features, such as how to control the
216  presentation of bibliographies and how to work with multi-part documents,
217  that are not covered in the 
218 \emph on
219 User's Guide
220 \emph default
221  and are discussed here.
222 \end_layout
223
224 \begin_layout Standard
225 This manual also documents some special features, like fax support, version
226  control, and SGML support, which require additional software to work properly.
227  There is also a chapter on LyX's support for HTML.
228  And lastly, there's a chapter of LaTeX tools and tips, things you can use
229  to spruce up your documents by directly using the powerful features of
230  LaTeX.
231  After all, LyX 
232 \emph on
233 is
234 \emph default
235  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
236 \end_layout
237
238 \begin_layout Standard
239 If you haven't read the 
240 \emph on
241 Introduction
242 \emph default
243  yet, you are definitely in the wrong manual.
244  The 
245 \emph on
246 Introduction
247 \emph default
248  is the first place to go, since it describes the notation and format of
249  all of the manuals.
250  You should also be thoroughly familiar with the 
251 \emph on
252 User's Guide
253 \emph default
254  and all of the basic features of LyX before attempting to read this one.
255 \end_layout
256
257 \begin_layout Standard
258 Since many of the topics in this manual depend heavily on LyX's interaction
259  with LaTeX, this first chapter covers the inner workings of LyX and how
260  to direct LyX to generate exactly the LaTeX code you want.
261  It is obviously for more seasoned LyX users.
262 \end_layout
263
264 \begin_layout Chapter
265 LyX and LaTeX
266 \end_layout
267
268 \begin_layout Section
269 How LyX Uses LaTeX
270 \end_layout
271
272 \begin_layout Standard
273 This chapter is for both TeX-nicians and the LaTeX-curious.
274  In it, we'll explain how LyX and LaTeX work together to produce printable
275  output.
276  This is the only place in any of the manuals where we assume you know something
277  about LaTeX.
278 \end_layout
279
280 \begin_layout Standard
281 At one time, LyX was called a 
282 \begin_inset Quotes eld
283 \end_inset
284
285 WYSIWYM frontend to LaTeX,
286 \begin_inset Quotes erd
287 \end_inset
288
289  but that's no longer true.
290  There are frontends to LaTeX out there.
291 \begin_inset Foot
292 status collapsed
293
294 \begin_layout Plain Layout
295 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
296  There are also the LaTeX modes for vi and emacs, of course.
297 \end_layout
298
299 \end_inset
300
301  These are basically text editors with the ability to run LaTeX and mark
302  any errors in the file you're editing.
303  Although LyX 
304 \emph on
305 is
306 \emph default
307  an editor, and it 
308 \emph on
309 does
310 \emph default
311  run LaTeX, and it also indicates errors in the file, it also does much,
312  much more.
313  For one thing, you don't need to know LaTeX to use LyX effectively.
314  And LyX has added its own extensions to LaTeX.
315  Try the following sometime: select 
316 \begin_inset Flex MenuItem
317 status collapsed
318
319 \begin_layout Plain Layout
320 Export\SpecialChar \menuseparator
321 LaTeX
322 \end_layout
323
324 \end_inset
325
326  from the 
327 \begin_inset Flex MenuItem
328 status collapsed
329
330 \begin_layout Plain Layout
331 File
332 \end_layout
333
334 \end_inset
335
336  menu (or 
337 \begin_inset Flex MenuItem
338 status collapsed
339
340 \begin_layout Plain Layout
341 View\SpecialChar \menuseparator
342 Source
343 \begin_inset space ~
344 \end_inset
345
346 Pane
347 \end_layout
348
349 \end_inset
350
351 ), then look at the preamble of the resulting 
352 \begin_inset Flex Code
353 status collapsed
354
355 \begin_layout Plain Layout
356 .tex
357 \end_layout
358
359 \end_inset
360
361  file.
362  You'll notice a variety of new macros defined specifically by LyX.
363  These macros are defined automatically, according to the features you use
364  in the document.
365 \end_layout
366
367 \begin_layout Standard
368 There are several commands that automatically invoke LaTeX.
369  They are:
370 \end_layout
371
372 \begin_layout Itemize
373 \begin_inset Flex MenuItem
374 status collapsed
375
376 \begin_layout Plain Layout
377 Document\SpecialChar \menuseparator
378 View
379 \end_layout
380
381 \end_inset
382
383
384 \end_layout
385
386 \begin_layout Itemize
387 \begin_inset Flex MenuItem
388 status collapsed
389
390 \begin_layout Plain Layout
391 Document\SpecialChar \menuseparator
392 Update
393 \end_layout
394
395 \end_inset
396
397
398 \end_layout
399
400 \begin_layout Itemize
401 \begin_inset Flex MenuItem
402 status collapsed
403
404 \begin_layout Plain Layout
405 File\SpecialChar \menuseparator
406 Print
407 \end_layout
408
409 \end_inset
410
411
412 \end_layout
413
414 \begin_layout Itemize
415 \begin_inset Flex MenuItem
416 status collapsed
417
418 \begin_layout Plain Layout
419 File\SpecialChar \menuseparator
420 Fax
421 \end_layout
422
423 \end_inset
424
425
426 \end_layout
427
428 \begin_layout Standard
429 They will only invoke LaTeX if the file has changed since the last time
430  LaTeX was run.
431  
432 \end_layout
433
434 \begin_layout Standard
435 When LyX runs LaTeX on the file you're editing, it performs these steps:
436 \end_layout
437
438 \begin_layout Enumerate
439 Convert the document to LaTeX and save to a file with the extension 
440 \begin_inset Flex Code
441 status collapsed
442
443 \begin_layout Plain Layout
444 .tex
445 \end_layout
446
447 \end_inset
448
449  in place of 
450 \begin_inset Flex Code
451 status collapsed
452
453 \begin_layout Plain Layout
454 .lyx
455 \end_layout
456
457 \end_inset
458
459 .
460 \end_layout
461
462 \begin_layout Enumerate
463 Run LaTeX on the 
464 \begin_inset Flex Code
465 status collapsed
466
467 \begin_layout Plain Layout
468 .tex
469 \end_layout
470
471 \end_inset
472
473  file (maybe several times), and run any other commands (such as 
474 \begin_inset Flex Code
475 status collapsed
476
477 \begin_layout Plain Layout
478 bibtex
479 \end_layout
480
481 \end_inset
482
483  or 
484 \begin_inset Flex Code
485 status collapsed
486
487 \begin_layout Plain Layout
488 makeindex
489 \end_layout
490
491 \end_inset
492
493 ) needed to compile the LaTeX file.
494 \end_layout
495
496 \begin_layout Enumerate
497 If there are any errors, show the error log.
498 \end_layout
499
500 \begin_layout Standard
501 If you have run LaTeX using 
502 \begin_inset Flex MenuItem
503 status collapsed
504
505 \begin_layout Plain Layout
506 View
507 \bar under
508 \SpecialChar \menuseparator
509
510 \bar default
511 DVI
512 \end_layout
513
514 \end_inset
515
516 , LyX then runs a DVI viewer to display the DVI-file.
517  If you have used 
518 \begin_inset Flex MenuItem
519 status collapsed
520
521 \begin_layout Plain Layout
522 View
523 \bar under
524 \SpecialChar \menuseparator
525
526 \bar default
527 PostScript
528 \end_layout
529
530 \end_inset
531
532 , LyX performs further steps:
533 \end_layout
534
535 \begin_layout Itemize
536 Run 
537 \begin_inset Flex Code
538 status collapsed
539
540 \begin_layout Plain Layout
541 dvips
542 \end_layout
543
544 \end_inset
545
546  to convert the DVI file to PostScript.
547 \end_layout
548
549 \begin_layout Itemize
550 Run a PostScript viewer, such as 
551 \begin_inset Flex Code
552 status collapsed
553
554 \begin_layout Plain Layout
555 ghostview
556 \end_layout
557
558 \end_inset
559
560 , to display the PostScript file.
561 \end_layout
562
563 \begin_layout Standard
564 LyX does similar things when viewing, or exporting, other formats.
565 \end_layout
566
567 \begin_layout Section
568 Translating LaTeX files into LyX
569 \end_layout
570
571 \begin_layout Standard
572 You can import a LaTeX file into LyX by using the 
573 \begin_inset Flex MenuItem
574 status collapsed
575
576 \begin_layout Plain Layout
577 File\SpecialChar \menuseparator
578 Import\SpecialChar \menuseparator
579 LaTeX
580 \end_layout
581
582 \end_inset
583
584  command in LyX.
585  This will call a program named 
586 \begin_inset Flex Code
587 status collapsed
588
589 \begin_layout Plain Layout
590 tex2lyx
591 \end_layout
592
593 \end_inset
594
595  which will create a file 
596 \begin_inset Flex Code
597 status collapsed
598
599 \begin_layout Plain Layout
600 foo.lyx
601 \end_layout
602
603 \end_inset
604
605  from the file 
606 \begin_inset Flex Code
607 status collapsed
608
609 \begin_layout Plain Layout
610 foo.tex
611 \end_layout
612
613 \end_inset
614
615 .
616  LyX will then open that file.
617 \begin_inset Foot
618 status collapsed
619
620 \begin_layout Plain Layout
621 \begin_inset Flex Code
622 status collapsed
623
624 \begin_layout Plain Layout
625 tex2lyx
626 \end_layout
627
628 \end_inset
629
630  can also be run from the command line, of course.
631 \end_layout
632
633 \end_inset
634
635
636 \end_layout
637
638 \begin_layout Standard
639 \begin_inset Flex Code
640 status collapsed
641
642 \begin_layout Plain Layout
643 tex2lyx
644 \end_layout
645
646 \end_inset
647
648  will translate most legal LaTeX, but not everything.
649  It will put things it doesn't understand into TeX code, so after translating
650  a file with 
651 \begin_inset Flex Code
652 status collapsed
653
654 \begin_layout Plain Layout
655 tex2lyx
656 \end_layout
657
658 \end_inset
659
660 , you can look for TeX code and hand-edit it until it looks right.
661 \end_layout
662
663 \begin_layout Standard
664 If you don't know what TeX code is, read the next section.
665 \end_layout
666
667 \begin_layout Section
668 \begin_inset CommandInset label
669 LatexCommand label
670 name "sec:Inserting-TeX-Code"
671
672 \end_inset
673
674 Inserting TeX Code into LyX Documents 
675 \end_layout
676
677 \begin_layout Standard
678 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
679  You can always insert TeX code into any LyX document.
680  LyX cannot, and will never be able to, display every possible LaTeX construct.
681  If ever you need to insert LaTeX commands into your LyX document, you can
682  use the 
683 \begin_inset Flex Code
684 status collapsed
685
686 \begin_layout Plain Layout
687 TeX Code
688 \end_layout
689
690 \end_inset
691
692  box, which you can insert into your document with 
693 \begin_inset Flex MenuItem
694 status collapsed
695
696 \begin_layout Plain Layout
697 Insert\SpecialChar \menuseparator
698 TeX Code
699 \end_layout
700
701 \end_inset
702
703  or the keyboard shortcut 
704 \begin_inset Info
705 type  "shortcut"
706 arg   "ert-insert"
707 \end_inset
708
709 .
710 \end_layout
711
712 \begin_layout Standard
713 Here's an example of inserting LaTeX commands in a LyX document.
714  The code looks like this:
715 \end_layout
716
717 \begin_layout LyX-Code
718
719 \backslash
720 begin{tabular}{ll}
721 \begin_inset Newline newline
722 \end_inset
723
724
725 \backslash
726 begin{minipage}{5cm}
727 \begin_inset Newline newline
728 \end_inset
729
730 This is an example of a minipage environment.
731  You 
732 \begin_inset Newline newline
733 \end_inset
734
735 can put nearly everything in it, even (non-floating) 
736 \begin_inset Newline newline
737 \end_inset
738
739 figures and tables.
740  
741 \begin_inset Newline newline
742 \end_inset
743
744
745 \backslash
746 end{minipage}
747 \begin_inset Newline newline
748 \end_inset
749
750 &
751 \begin_inset Newline newline
752 \end_inset
753
754
755 \backslash
756 begin{minipage}{5cm}
757 \begin_inset Newline newline
758 \end_inset
759
760
761 \backslash
762 begin{verbatim}
763 \begin_inset Newline newline
764 \end_inset
765
766
767 \backslash
768 begin{minipage}{5cm}
769 \begin_inset Newline newline
770 \end_inset
771
772 This ...
773  
774 \begin_inset Newline newline
775 \end_inset
776
777
778 \backslash
779 end{minipage}
780 \begin_inset Newline newline
781 \end_inset
782
783
784 \backslash
785 end{verbatim}
786 \begin_inset Newline newline
787 \end_inset
788
789
790 \backslash
791 end{minipage}
792 \begin_inset Newline newline
793 \end_inset
794
795
796 \backslash
797 end{tabular}
798 \end_layout
799
800 \begin_layout LyX-Code
801
802 \end_layout
803
804 \begin_layout Standard
805 The 
806 \begin_inset Flex Code
807 status collapsed
808
809 \begin_layout Plain Layout
810 TeX Code
811 \end_layout
812
813 \end_inset
814
815  box containing this text is directly after this paragraph.
816  Those of you reading the manual in LyX will only see the TeX code inset.
817  Those reading a printed version of the manuals will see the actual results:
818 \begin_inset VSpace bigskip
819 \end_inset
820
821
822 \end_layout
823
824 \begin_layout Standard
825 \begin_inset ERT
826 status open
827
828 \begin_layout Plain Layout
829
830
831 \backslash
832 begin{tabular}{ll}
833 \end_layout
834
835 \begin_layout Plain Layout
836
837
838 \backslash
839 begin{minipage}{5cm}
840 \end_layout
841
842 \begin_layout Plain Layout
843
844 This is an example of a minipage environment.
845  You can put nearly everything in it, even (non-floating) figures and tables.
846  
847 \end_layout
848
849 \begin_layout Plain Layout
850
851
852 \backslash
853 end{minipage}
854 \end_layout
855
856 \begin_layout Plain Layout
857
858 &
859 \end_layout
860
861 \begin_layout Plain Layout
862
863
864 \backslash
865 begin{minipage}{5cm}
866 \end_layout
867
868 \begin_layout Plain Layout
869
870
871 \backslash
872 begin{verbatim}
873 \end_layout
874
875 \begin_layout Plain Layout
876
877
878 \backslash
879 begin{minipage}{5cm}
880 \end_layout
881
882 \begin_layout Plain Layout
883
884 This ...
885  
886 \end_layout
887
888 \begin_layout Plain Layout
889
890
891 \backslash
892 end{minipage}
893 \end_layout
894
895 \begin_layout Plain Layout
896
897
898 \backslash
899 end{verbatim}
900 \end_layout
901
902 \begin_layout Plain Layout
903
904
905 \backslash
906 end{minipage}
907 \end_layout
908
909 \begin_layout Plain Layout
910
911
912 \backslash
913 end{tabular}
914 \end_layout
915
916 \end_inset
917
918
919 \begin_inset VSpace bigskip
920 \end_inset
921
922
923 \end_layout
924
925 \begin_layout Standard
926 In addition to using TeX code, you can also create a separate file containing
927  some complex LaTeX structure and then use 
928 \begin_inset Flex MenuItem
929 status collapsed
930
931 \begin_layout Plain Layout
932 Insert\SpecialChar \menuseparator
933 Child
934 \begin_inset space ~
935 \end_inset
936
937 Document
938 \end_layout
939
940 \end_inset
941
942  to include your file (you should select the type 
943 \begin_inset Flex Code
944 status collapsed
945
946 \begin_layout Plain Layout
947 Input
948 \end_layout
949
950 \end_inset
951
952 ).
953  We recommend that you only do this if you have a 
954 \begin_inset Flex Code
955 status collapsed
956
957 \begin_layout Plain Layout
958 .tex
959 \end_layout
960
961 \end_inset
962
963  file which you 
964 \emph on
965 know
966 \emph default
967  works already.
968  Otherwise, you'll have a big job tracking down LaTeX errors.
969 \end_layout
970
971 \begin_layout Standard
972 There are a few last points to emphasize:
973 \end_layout
974
975 \begin_layout Itemize
976 LyX 
977 \emph on
978 does not
979 \emph default
980  check if your LaTeX code is correct.
981 \end_layout
982
983 \begin_layout Itemize
984 Beware of reinventing the wheel.
985 \end_layout
986
987 \begin_layout Standard
988 On that last point, LyX does have quite a few features tucked into it, and
989  more are coming.
990  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
991  feature before you decide you have to do it by hand.
992  Moreover, there are numerous LaTeX packages out there to do all sorts of
993  things, from labels to envelopes to fancy multipage tables.
994  Check out 
995 \begin_inset CommandInset href
996 LatexCommand href
997 name "CTAN"
998 target "http://www.ctan.org/"
999
1000 \end_inset
1001
1002  for details.
1003 \end_layout
1004
1005 \begin_layout Standard
1006 If you do need to do some wild and fancy things within your document, be
1007  sure to check out a good LaTeX book for assistance.
1008  There are a number of them listed in the bibliography of the 
1009 \emph on
1010 User's Guide
1011 \emph default
1012 .
1013 \end_layout
1014
1015 \begin_layout Section
1016 LyX and the LaTeX Preamble
1017 \end_layout
1018
1019 \begin_layout Subsection
1020 About the LaTeX Preamble
1021 \end_layout
1022
1023 \begin_layout Standard
1024 If you already know LaTeX, there is no need to explain here what the preamble
1025  is good for.
1026  If you don't, the following will give you some ideas—we recommend again
1027  that you consult a LaTeX book for further information.
1028  In any case, you should read the points below, because they explain what
1029  you can do and what you don't need to do in the LaTeX preamble of a LyX
1030  document.
1031 \end_layout
1032
1033 \begin_layout Standard
1034 The LaTeX preamble comes at the very beginning of a document, 
1035 \emph on
1036 before
1037 \emph default
1038  the text.
1039  It serves to:
1040 \end_layout
1041
1042 \begin_layout Itemize
1043 Declare the document class.
1044  
1045 \begin_inset Newline newline
1046 \end_inset
1047
1048 LyX already does this for you.
1049  If you're a seasoned LaTeX-nician, and you have a custom document class
1050  you want to use, check out the 
1051 \emph on
1052 Customization Manual
1053 \emph default
1054  for information on how to make LyX interface to it.
1055 \end_layout
1056
1057 \begin_layout Itemize
1058 Declare the usage of packages.
1059  
1060 \begin_inset Newline newline
1061 \end_inset
1062
1063 LaTeX packages provide special commands, which are only available within
1064  a document when the package has been declared in the preamble.
1065  In addition to providing special commands, the inclusion of a package can
1066  change the document.
1067  For example, the package 
1068 \begin_inset Flex Code
1069 status collapsed
1070
1071 \begin_layout Plain Layout
1072 indentfirst
1073 \end_layout
1074
1075 \end_inset
1076
1077  forces all paragraphs to be indented.
1078  There are other packages for labels, envelopes, margins, etc.
1079  
1080 \end_layout
1081
1082 \begin_layout Itemize
1083 Set counters, variables, lengths and widths.
1084  
1085 \begin_inset Newline newline
1086 \end_inset
1087
1088 There are several LaTeX counters and variables that 
1089 \emph on
1090 must
1091 \emph default
1092  be set globally from within the preamble in order to have the desired effect.
1093  (There are variables that you can set and reset inside the document, too.)
1094  Margins are a good example of something that must be set in the preamble.
1095  Another example is the label format for lists.
1096  You can actually set these just about anywhere, but it's best to do it
1097  just once, inside the preamble.
1098 \end_layout
1099
1100 \begin_layout Itemize
1101 Declare user defined commands (with 
1102 \begin_inset Flex Code
1103 status collapsed
1104
1105 \begin_layout Plain Layout
1106
1107 \backslash
1108 newcommand
1109 \end_layout
1110
1111 \end_inset
1112
1113  or 
1114 \begin_inset Flex Code
1115 status collapsed
1116
1117 \begin_layout Plain Layout
1118
1119 \backslash
1120 renewcommand
1121 \end_layout
1122
1123 \end_inset
1124
1125 ).
1126 \begin_inset Newline newline
1127 \end_inset
1128
1129 These are abbreviations for LaTeX commands which appear very often inside
1130  a document.
1131  Although the preamble is a good place to declare such commands, they 
1132 \emph on
1133 can
1134 \emph default
1135  be declared anywhere (before they are used for the first time, of course).
1136  This can be useful if there is a lot of raw LaTeX code in your document,
1137  which normally should not be the case.
1138 \end_layout
1139
1140 \begin_layout Standard
1141 LyX adds its own set of definitions to the preamble of the 
1142 \begin_inset Flex Code
1143 status collapsed
1144
1145 \begin_layout Plain Layout
1146 .tex
1147 \end_layout
1148
1149 \end_inset
1150
1151  file it produces.
1152  This makes LaTeX files generated by LyX portable.
1153 \end_layout
1154
1155 \begin_layout Subsection
1156 Changing the Preamble
1157 \end_layout
1158
1159 \begin_layout Standard
1160 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1161  can't change them without patching LyX itself.
1162  You can, however, add your own stuff to the preamble by selecting 
1163 \begin_inset Flex MenuItem
1164 status collapsed
1165
1166 \begin_layout Plain Layout
1167 LaTeX
1168 \begin_inset space ~
1169 \end_inset
1170
1171 Preamble
1172 \end_layout
1173
1174 \end_inset
1175
1176  in the 
1177 \begin_inset Flex MenuItem
1178 status collapsed
1179
1180 \begin_layout Plain Layout
1181 Document\SpecialChar \menuseparator
1182 Settings
1183 \end_layout
1184
1185 \end_inset
1186
1187  dialog.
1188  LyX adds anything in the 
1189 \begin_inset Flex MenuItem
1190 status collapsed
1191
1192 \begin_layout Plain Layout
1193 Preamble
1194 \end_layout
1195
1196 \end_inset
1197
1198  dialog to its own built-in preamble.
1199  Before adding your own declarations in the preamble, you should make sure
1200  that LyX doesn't already support what you want to do.
1201  (Remember what we said about reinventing the wheel?) Also, 
1202 \emph on
1203 make sure your preamble code is correct
1204 \emph default
1205 .
1206  LyX doesn't check it for you.
1207  If there is an error, you're likely to get an error like 
1208 \begin_inset Quotes eld
1209 \end_inset
1210
1211
1212 \begin_inset Flex Code
1213 status collapsed
1214
1215 \begin_layout Plain Layout
1216 Missing 
1217 \backslash
1218 begin{document}
1219 \end_layout
1220
1221 \end_inset
1222
1223
1224 \begin_inset Quotes erd
1225 \end_inset
1226
1227 .
1228  If you see this error, check your preamble.
1229 \end_layout
1230
1231 \begin_layout Subsection
1232 Examples
1233 \end_layout
1234
1235 \begin_layout Standard
1236 Here are some examples of what you can add to a preamble, and what they
1237  do.
1238 \end_layout
1239
1240 \begin_layout Subsubsection
1241 Example #1: Offsets
1242 \end_layout
1243
1244 \begin_layout Standard
1245 There are two variables under LaTeX that control page position: 
1246 \begin_inset Flex Code
1247 status collapsed
1248
1249 \begin_layout Plain Layout
1250
1251 \backslash
1252 hoffset
1253 \end_layout
1254
1255 \end_inset
1256
1257  and 
1258 \begin_inset Flex Code
1259 status collapsed
1260
1261 \begin_layout Plain Layout
1262
1263 \backslash
1264 voffset
1265 \end_layout
1266
1267 \end_inset
1268
1269 .
1270  Their names should be self-explanatory.
1271  These variables are useful if you think for a moment about computer labels.
1272  Sometimes, the size of a print medium and the area of the medium that you
1273  can actually print on aren't the same.
1274  This is where 
1275 \begin_inset Flex Code
1276 status collapsed
1277
1278 \begin_layout Plain Layout
1279
1280 \backslash
1281 hoffset
1282 \end_layout
1283
1284 \end_inset
1285
1286  and 
1287 \begin_inset Flex Code
1288 status collapsed
1289
1290 \begin_layout Plain Layout
1291
1292 \backslash
1293 voffset
1294 \end_layout
1295
1296 \end_inset
1297
1298  come in.
1299 \end_layout
1300
1301 \begin_layout Standard
1302 The default values for 
1303 \begin_inset Flex Code
1304 status collapsed
1305
1306 \begin_layout Plain Layout
1307
1308 \backslash
1309 hoffset
1310 \end_layout
1311
1312 \end_inset
1313
1314  and 
1315 \begin_inset Flex Code
1316 status collapsed
1317
1318 \begin_layout Plain Layout
1319
1320 \backslash
1321 voffset
1322 \end_layout
1323
1324 \end_inset
1325
1326  are both 0
1327 \begin_inset space \thinspace{}
1328 \end_inset
1329
1330 points, i.
1331 \begin_inset space \thinspace{}
1332 \end_inset
1333
1334 e.
1335 \begin_inset space \space{}
1336 \end_inset
1337
1338 the page isn't shifted.
1339  Unfortunately, some DVI drivers always seem to shift the page.
1340  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1341  If you're using LyX on a system that you don't personally maintain, and
1342  your sysadmin is a doofus, 
1343 \begin_inset Flex Code
1344 status collapsed
1345
1346 \begin_layout Plain Layout
1347
1348 \backslash
1349 hoffset
1350 \end_layout
1351
1352 \end_inset
1353
1354  and 
1355 \begin_inset Flex Code
1356 status collapsed
1357
1358 \begin_layout Plain Layout
1359
1360 \backslash
1361 voffset
1362 \end_layout
1363
1364 \end_inset
1365
1366  can save the day.
1367  Suppose your left and top margins are always 0.5
1368 \begin_inset space \thinspace{}
1369 \end_inset
1370
1371 inches too big.
1372  You can add this to the preamble:
1373 \end_layout
1374
1375 \begin_layout LyX-Code
1376
1377 \backslash
1378 setlength{
1379 \backslash
1380 hoffset}{-0.5 in}
1381 \end_layout
1382
1383 \begin_layout LyX-Code
1384
1385 \backslash
1386 setlength{
1387 \backslash
1388 voffset}{-0.5 in}
1389 \end_layout
1390
1391 \begin_layout Standard
1392 and your margins should now be correct.
1393 \end_layout
1394
1395 \begin_layout Subsubsection
1396 Example #2: Labels
1397 \end_layout
1398
1399 \begin_layout Standard
1400 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1401  There's a rather nice package, available at your nearest CTAN archive,
1402  for printing sheets of labels: 
1403 \begin_inset Flex Code
1404 status collapsed
1405
1406 \begin_layout Plain Layout
1407 labels.sty
1408 \end_layout
1409
1410 \end_inset
1411
1412 .
1413  Now, your system may not have this package installed by default.
1414  We leave that up to you to check.
1415  You'll also want to read the documentation for it; we're not going to do
1416  that for you.
1417  Since this is an example, however, we'll give you an example of how you
1418  use this package.
1419 \end_layout
1420
1421 \begin_layout Standard
1422 First, make sure you're using the 
1423 \begin_inset Flex Code
1424 status collapsed
1425
1426 \begin_layout Plain Layout
1427 article
1428 \end_layout
1429
1430 \end_inset
1431
1432  document class.
1433  Next, you need to put the following in your preamble:
1434 \end_layout
1435
1436 \begin_layout LyX-Code
1437
1438 \backslash
1439 usepackage{labels}
1440 \end_layout
1441
1442 \begin_layout LyX-Code
1443
1444 \backslash
1445 LabelCols=3
1446 \end_layout
1447
1448 \begin_layout LyX-Code
1449
1450 \backslash
1451 LabelRows=7
1452 \end_layout
1453
1454 \begin_layout LyX-Code
1455
1456 \backslash
1457 LeftBorder=8mm
1458 \end_layout
1459
1460 \begin_layout LyX-Code
1461
1462 \backslash
1463 RightBorder=8mm
1464 \end_layout
1465
1466 \begin_layout LyX-Code
1467
1468 \backslash
1469 TopBorder=9mm
1470 \end_layout
1471
1472 \begin_layout LyX-Code
1473
1474 \backslash
1475 BottomBorder=2mm
1476 \end_layout
1477
1478 \begin_layout Standard
1479 This sets things up for Avery label sheets, stock #5360.
1480  You're now ready to print labels, but you'll need to insert LaTeX code,
1481  placing the commands 
1482 \begin_inset Flex Code
1483 status collapsed
1484
1485 \begin_layout Plain Layout
1486
1487 \backslash
1488 begin{labels}
1489 \end_layout
1490
1491 \end_inset
1492
1493  and 
1494 \begin_inset Flex Code
1495 status collapsed
1496
1497 \begin_layout Plain Layout
1498
1499 \backslash
1500 end{labels}
1501 \end_layout
1502
1503 \end_inset
1504
1505  around each label text.
1506  This and other special features of 
1507 \begin_inset Flex Code
1508 status collapsed
1509
1510 \begin_layout Plain Layout
1511 labels.sty
1512 \end_layout
1513
1514 \end_inset
1515
1516  are explained in its documentation.
1517 \end_layout
1518
1519 \begin_layout Standard
1520 Someday, someone may write a LyX layout file to support this package directly.
1521  Maybe that someone is you.
1522 \end_layout
1523
1524 \begin_layout Subsubsection
1525 Example #3: Paragraph Indentation
1526 \end_layout
1527
1528 \begin_layout Standard
1529 Americans are trained to indent the first line of 
1530 \emph on
1531 every
1532 \emph default
1533  paragraph.
1534  As with all of their other weird quirks, most Americans will whine and
1535  moan until they can have their way and indent the first line of all paragraphs.
1536  (Yes, we're joking.
1537  (We are?) 
1538 \emph on
1539 Yeah
1540 \emph default
1541 , we are.)
1542 \end_layout
1543
1544 \begin_layout Standard
1545 Of course, this behavior isn't standard typography.
1546  In books, you typically only indent the first line of a paragraph 
1547 \emph on
1548 if
1549 \emph default
1550  it follows another one.
1551  The idea behind indenting the first line of a paragraph is to distinguish
1552  neighboring paragraphs from one another.
1553  If there is no previous paragraph—for example, if it follows a figure or
1554  is the first paragraph in a section—then there is no need for indentation.
1555  
1556 \end_layout
1557
1558 \begin_layout Standard
1559 If you're a typical American (we're still joking!), though, you don't care
1560  about such esoteric things; you want your indentation! Add this to the
1561  preamble:
1562 \end_layout
1563
1564 \begin_layout LyX-Code
1565
1566 \backslash
1567 usepackage{indentfirst}
1568 \end_layout
1569
1570 \begin_layout Standard
1571 If your TeX distribution isn't braindead, you'll have this package, and
1572  all of your paragraphs will get the indentation the Founding Fathers intended
1573  they should have.
1574 \end_layout
1575
1576 \begin_layout Subsubsection
1577 Example #4: This Document
1578 \end_layout
1579
1580 \begin_layout Standard
1581 You can also check out the preamble of this document to get an idea of some
1582  of the advanced things you can do.
1583 \end_layout
1584
1585 \begin_layout Section
1586 LyX and LaTeX Errors
1587 \end_layout
1588
1589 \begin_layout Standard
1590 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1591  going.
1592  It then uses the logfile from the LaTeX run to do a post-mortem.
1593  After analyzing the logfile, LyX displays a dialog listing the errors.
1594  Clicking on any one of them will take you to the position in your LyX file
1595  where the error occurred.
1596 \begin_inset Foot
1597 status collapsed
1598
1599 \begin_layout Plain Layout
1600 Well, usually.
1601  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1602  right line.
1603  There are also cases where LaTeX reports the error on one line, but the
1604  actual error is earlier.
1605  This is not unlike forgetting a closing brace in a program: You'll get
1606  an error, but only later.
1607 \end_layout
1608
1609 \end_inset
1610
1611
1612 \end_layout
1613
1614 \begin_layout Standard
1615 Some folks also like to look at the log file directly: It is available from
1616  
1617 \begin_inset Flex MenuItem
1618 status collapsed
1619
1620 \begin_layout Plain Layout
1621 Document
1622 \bar under
1623 \SpecialChar \menuseparator
1624
1625 \bar default
1626 Latex
1627 \begin_inset space ~
1628 \end_inset
1629
1630 Log
1631 \end_layout
1632
1633 \end_inset
1634
1635 .
1636  There are some fairly common error messages and warnings.
1637  We'll cover those here.
1638  You should look at a good LaTeX book for a complete listing.
1639 \end_layout
1640
1641 \begin_layout Itemize
1642 \begin_inset Flex Code
1643 status collapsed
1644
1645 \begin_layout Plain Layout
1646 LaTeX Warning
1647 \end_layout
1648
1649 \end_inset
1650
1651
1652 \begin_inset Newline newline
1653 \end_inset
1654
1655 Anything beginning with these words is a warning message for the purpose
1656  of 
1657 \begin_inset Quotes eld
1658 \end_inset
1659
1660 debugging
1661 \begin_inset Quotes erd
1662 \end_inset
1663
1664  the LaTeX code itself.
1665  You'll get messages like this if you added or changed cross-references
1666  or bibliography entries, in which case, LaTeX is trying to tell you that
1667  you need to make another run.
1668  You can by-and-large ignore these.
1669 \end_layout
1670
1671 \begin_layout Itemize
1672 \begin_inset Flex Code
1673 status collapsed
1674
1675 \begin_layout Plain Layout
1676 LaTeX Font Warning
1677 \end_layout
1678
1679 \end_inset
1680
1681
1682 \begin_inset Newline newline
1683 \end_inset
1684
1685 Another warning message, this time about fonts which LaTeX couldn't find.
1686  The rest of the message will often say something about a replacement font
1687  that LaTeX used.
1688  You can safely ignore these, too.
1689 \end_layout
1690
1691 \begin_layout Itemize
1692 \begin_inset Flex Code
1693 status collapsed
1694
1695 \begin_layout Plain Layout
1696 Overfull 
1697 \backslash
1698 hbox
1699 \end_layout
1700
1701 \end_inset
1702
1703
1704 \begin_inset Newline newline
1705 \end_inset
1706
1707 LaTeX absolutely 
1708 \emph on
1709 loves
1710 \emph default
1711  to spew these out.
1712  They are warnings about lines that were too long and run past the right
1713  margin.
1714  Almost always, this is unnoticeable in the final output.
1715  (It can be just a point or two.) Or, only one or two characters extend past
1716  the margin.
1717  LaTeX seems to generate at least one of these messages for just about any
1718  document you write.
1719 \begin_inset Newline newline
1720 \end_inset
1721
1722 You can ignore these messages.
1723  Your eyes will tell you if there's a problem with something that's too
1724  wide; just look at the output.
1725 \begin_inset Foot
1726 status collapsed
1727
1728 \begin_layout Plain Layout
1729 You can also enable the `draft' option in 
1730 \begin_inset Flex MenuItem
1731 status collapsed
1732
1733 \begin_layout Plain Layout
1734 Document
1735 \bar under
1736 \SpecialChar \menuseparator
1737
1738 \bar default
1739 Settings
1740 \end_layout
1741
1742 \end_inset
1743
1744 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1745 \end_layout
1746
1747 \end_inset
1748
1749
1750 \end_layout
1751
1752 \begin_layout Itemize
1753 \begin_inset Flex Code
1754 status collapsed
1755
1756 \begin_layout Plain Layout
1757 Underfull 
1758 \backslash
1759 hbox
1760 \end_layout
1761
1762 \end_inset
1763
1764
1765 \begin_inset Newline newline
1766 \end_inset
1767
1768 Not quite as common as its cousin.
1769  LaTeX seems to like to print lines that are a bit too wide as opposed to
1770  ones that are a bit too narrow.
1771  We have no idea why.
1772 \end_layout
1773
1774 \begin_layout Itemize
1775 \begin_inset Flex Code
1776 status collapsed
1777
1778 \begin_layout Plain Layout
1779 Overfull 
1780 \backslash
1781 vbox
1782 \end_layout
1783
1784 \end_inset
1785
1786  and 
1787 \begin_inset Flex Code
1788 status collapsed
1789
1790 \begin_layout Plain Layout
1791 Underfull 
1792 \backslash
1793 vbox
1794 \end_layout
1795
1796 \end_inset
1797
1798
1799 \begin_inset Newline newline
1800 \end_inset
1801
1802 Warnings about troubles breaking the page.
1803  Once again, just look at the output.
1804  Your eyes will tell you where something has gone wrong.
1805 \end_layout
1806
1807 \begin_layout Itemize
1808 \begin_inset Flex Code
1809 status collapsed
1810
1811 \begin_layout Plain Layout
1812 LaTeX Error: File 
1813 \begin_inset Quotes els
1814 \end_inset
1815
1816 Xxxx
1817 \begin_inset Quotes ers
1818 \end_inset
1819
1820  not found
1821 \end_layout
1822
1823 \end_inset
1824
1825
1826 \begin_inset Newline newline
1827 \end_inset
1828
1829 The file 
1830 \begin_inset Quotes eld
1831 \end_inset
1832
1833 Xxxx
1834 \begin_inset Quotes erd
1835 \end_inset
1836
1837  isn't installed on this system.
1838  This usually appears because some package your document needs isn't installed.
1839  If you didn't touch the preamble or didn't use the 
1840 \begin_inset Flex Code
1841 status collapsed
1842
1843 \begin_layout Plain Layout
1844
1845 \backslash
1846 usepackage{}
1847 \end_layout
1848
1849 \end_inset
1850
1851  command, then one of the packages LyX tried to load is missing.
1852  Use 
1853 \begin_inset Flex MenuItem
1854 status collapsed
1855
1856 \begin_layout Plain Layout
1857 Help\SpecialChar \menuseparator
1858 LaTeX Configuration
1859 \end_layout
1860
1861 \end_inset
1862
1863  to get a list of packages that LyX knows about.
1864  This file is updated whenever you reconfigure LyX (using 
1865 \begin_inset Flex MenuItem
1866 status collapsed
1867
1868 \begin_layout Plain Layout
1869 Tools\SpecialChar \menuseparator
1870 Reconfigure
1871 \end_layout
1872
1873 \end_inset
1874
1875 ) and tells you which packages have been detected and what they do.
1876 \begin_inset Newline newline
1877 \end_inset
1878
1879 If you did use the 
1880 \begin_inset Flex Code
1881 status collapsed
1882
1883 \begin_layout Plain Layout
1884
1885 \backslash
1886 usepackage{}
1887 \end_layout
1888
1889 \end_inset
1890
1891  command and the package in question isn't installed, then you'll need to
1892  install it yourself.
1893 \end_layout
1894
1895 \begin_layout Itemize
1896 \begin_inset Flex Code
1897 status collapsed
1898
1899 \begin_layout Plain Layout
1900 LaTeX Error: Unknown option
1901 \end_layout
1902
1903 \end_inset
1904
1905
1906 \begin_inset Newline newline
1907 \end_inset
1908
1909 Error messages beginning with this are trying to tell you that you specified
1910  a bad or undefined option to a package.
1911  Check the package's documentation.
1912 \end_layout
1913
1914 \begin_layout Itemize
1915 \begin_inset Flex Code
1916 status collapsed
1917
1918 \begin_layout Plain Layout
1919 Undefined control sequence
1920 \end_layout
1921
1922 \end_inset
1923
1924
1925 \begin_inset Newline newline
1926 \end_inset
1927
1928 If you've inserted LaTeX code into your document, but made a typo, you'll
1929  get one of these.
1930  You may have forgotten to load a package.
1931  In any case, this error message usually means that you used an undefined
1932  command.
1933  
1934 \end_layout
1935
1936 \begin_layout Standard
1937 There are other error and warning messages.
1938  Some are self-explanatory.
1939  These are usually LaTeX messages.
1940  Others are downright cryptic.
1941  These are usually TeX error messages, and we really have 
1942 \emph on
1943 no clue
1944 \emph default
1945  what they mean or how to decipher them.
1946  No-one does.
1947 \end_layout
1948
1949 \begin_layout Standard
1950 There's a general sequence you should follow if you get error messages:
1951 \end_layout
1952
1953 \begin_layout Enumerate
1954 Look at the LaTeX code you inserted for typos.
1955 \end_layout
1956
1957 \begin_layout Enumerate
1958 If there are no typos, check that you used the command(s) correctly.
1959 \end_layout
1960
1961 \begin_layout Enumerate
1962 If you get a bunch of error boxes piled up at the very top of the document—and
1963  especially if you see a 
1964 \begin_inset Quotes eld
1965 \end_inset
1966
1967
1968 \begin_inset Flex Code
1969 status collapsed
1970
1971 \begin_layout Plain Layout
1972 Missing 
1973 \backslash
1974 begin{document}
1975 \end_layout
1976
1977 \end_inset
1978
1979
1980 \begin_inset Quotes erd
1981 \end_inset
1982
1983  error—it means that there are errors in the preamble.
1984  Start debugging your preamble.
1985 \end_layout
1986
1987 \begin_layout Enumerate
1988 If you didn't add anything to the preamble and didn't add any LaTeX code
1989  to the document, the first suspect is your LaTeX distribution itself.
1990  Check for missing packages and install them.
1991 \end_layout
1992
1993 \begin_layout Enumerate
1994 Okay, so there are no missing packages.
1995  Did you use any of the fine-tuning options in LyX? Specifically, did you
1996  
1997 \emph on
1998 misuse
1999 \emph default
2000  any of them, like trying to manually insert lots of 
2001 \begin_inset Flex Code
2002 status collapsed
2003
2004 \begin_layout Plain Layout
2005 Protected
2006 \begin_inset space ~
2007 \end_inset
2008
2009 Blanks
2010 \end_layout
2011
2012 \end_inset
2013
2014
2015 \begin_inset Flex Code
2016 status collapsed
2017
2018 \begin_layout Plain Layout
2019 Linebreaks
2020 \end_layout
2021
2022 \end_inset
2023
2024 , or 
2025 \begin_inset Flex Code
2026 status collapsed
2027
2028 \begin_layout Plain Layout
2029 Pagebreaks
2030 \end_layout
2031
2032 \end_inset
2033
2034 ? Did you try to kludge something together with these instead of using the
2035  appropriate paragraph environment?
2036 \end_layout
2037
2038 \begin_layout Enumerate
2039 All right, you didn't use any of the fine-tuning options, you played by
2040  the rules.
2041  Did you try to pull a fancy maneuver? Did you do something funky inside
2042  a table or an equation, like inserting a graphic into a table cell?
2043 \end_layout
2044
2045 \begin_layout Enumerate
2046 Do you have long sections of text where LaTeX cannot find a place to break
2047  a line? By default, LaTeX is rather strict about how much extra inter-word
2048  spacing it will add in order to break a line.
2049  Preferably, you should rework the paragraph to avoid the problem.
2050  If this isn't an option, you can wrap your text in 
2051 \begin_inset Flex Code
2052 status collapsed
2053
2054 \begin_layout Plain Layout
2055
2056 \backslash
2057 sloppypar
2058 \end_layout
2059
2060 \end_inset
2061
2062  to make LaTeX's line breaking more, well, sloppy.
2063 \end_layout
2064
2065 \begin_layout Enumerate
2066 Did you go overboard with the nesting? LyX (currently) doesn't check to
2067  make sure you're in the limits for nesting environments.
2068  If you nested a bunch of environments to the 
2069 \begin_inset Formula $17^{\mathrm{th}}$
2070 \end_inset
2071
2072  level, that's the problem.
2073  (The limit in LaTeX is five.)
2074 \end_layout
2075
2076 \begin_layout Enumerate
2077 Okay, you didn't get any error messages, but your output looks awful.
2078  If you have a table or figure that's too wide or long for the page, you
2079  need to:
2080 \end_layout
2081
2082 \begin_deeper
2083 \begin_layout Enumerate
2084 rescale the figure so it fits.
2085 \end_layout
2086
2087 \begin_layout Enumerate
2088 trim down the table so it fits.
2089 \end_layout
2090
2091 \end_deeper
2092 \begin_layout Enumerate
2093 If something else is wrong with the output, and you didn't try to pull anything
2094  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2095 \end_layout
2096
2097 \begin_layout Standard
2098 If all this doesn't help—well, then 
2099 \emph on
2100 perhaps
2101 \emph default
2102  you might have found a bug in LyX\SpecialChar \ldots{}
2103 .
2104 \end_layout
2105
2106 \begin_layout Chapter
2107 Supplemental Tools
2108 \end_layout
2109
2110 \begin_layout Section
2111 Customizing Bibliographies with BibTeX
2112 \end_layout
2113
2114 \begin_layout Standard
2115 The most basic information about how to use BibTeX with LyX is contained
2116  in the section 
2117 \emph on
2118 Bibliography databases (BibTeX)
2119 \emph default
2120  of the 
2121 \emph on
2122 User's Guide
2123 \emph default
2124 .
2125  The following subsections explain special bibliography features supported
2126  by LyX.
2127 \end_layout
2128
2129 \begin_layout Subsection
2130 Alternative Citation Styles
2131 \end_layout
2132
2133 \begin_layout Standard
2134 Standard BibTeX uses numbers (e.
2135 \begin_inset space \thinspace{}
2136 \end_inset
2137
2138 g.
2139 \begin_inset space \space{}
2140 \end_inset
2141
2142
2143 \begin_inset Quotes eld
2144 \end_inset
2145
2146 [12]
2147 \begin_inset Quotes erd
2148 \end_inset
2149
2150 ) to refer to a cited work.
2151  However, in many scientific disciplines, other citation styles are in use.
2152  The most common one is the author-year style (e.
2153 \begin_inset space \thinspace{}
2154 \end_inset
2155
2156 g.
2157 \begin_inset space \space{}
2158 \end_inset
2159
2160
2161 \begin_inset Quotes eld
2162 \end_inset
2163
2164 Knuth 1984a
2165 \begin_inset Quotes erd
2166 \end_inset
2167
2168 ).
2169  LyX supports two packages that provide this style, 
2170 \begin_inset Flex Code
2171 status collapsed
2172
2173 \begin_layout Plain Layout
2174 natbib
2175 \end_layout
2176
2177 \end_inset
2178
2179  and 
2180 \begin_inset Flex Code
2181 status collapsed
2182
2183 \begin_layout Plain Layout
2184 jurabib
2185 \end_layout
2186
2187 \end_inset
2188
2189 .
2190  Both packages have their pros and cons, which cannot be listed in detail.
2191  If you only want to have simple author-year (or author-numerical) style,
2192  or if you want to use one of the countless style files for 
2193 \begin_inset Flex Code
2194 status collapsed
2195
2196 \begin_layout Plain Layout
2197 natbib
2198 \end_layout
2199
2200 \end_inset
2201
2202 , then the established 
2203 \begin_inset Flex Code
2204 status collapsed
2205
2206 \begin_layout Plain Layout
2207 natbib
2208 \end_layout
2209
2210 \end_inset
2211
2212  package is probably your choice.
2213  If you need special features like short title references, ibidem etc., you
2214  might consider the 
2215 \begin_inset Flex Code
2216 status collapsed
2217
2218 \begin_layout Plain Layout
2219 jurabib
2220 \end_layout
2221
2222 \end_inset
2223
2224  package.
2225 \end_layout
2226
2227 \begin_layout Standard
2228 The handling of both packages in LyX is basically the same.
2229  Go to 
2230 \begin_inset Flex MenuItem
2231 status collapsed
2232
2233 \begin_layout Plain Layout
2234 Document\SpecialChar \menuseparator
2235 Settings
2236 \end_layout
2237
2238 \end_inset
2239
2240  and select under 
2241 \begin_inset Flex MenuItem
2242 status collapsed
2243
2244 \begin_layout Plain Layout
2245 Bibliography
2246 \end_layout
2247
2248 \end_inset
2249
2250  the option 
2251 \begin_inset Flex MenuItem
2252 status collapsed
2253
2254 \begin_layout Plain Layout
2255 Natbib
2256 \end_layout
2257
2258 \end_inset
2259
2260  or 
2261 \begin_inset Flex MenuItem
2262 status collapsed
2263
2264 \begin_layout Plain Layout
2265 Jurabib
2266 \end_layout
2267
2268 \end_inset
2269
2270 .
2271  With both packages, you will get some extra features in the citation dialog
2272  and you can select the style of the reference (
2273 \begin_inset Quotes eld
2274 \end_inset
2275
2276 Knuth 1984
2277 \begin_inset Quotes erd
2278 \end_inset
2279
2280
2281 \begin_inset Quotes eld
2282 \end_inset
2283
2284 Knuth (1984)
2285 \begin_inset Quotes erd
2286 \end_inset
2287
2288
2289 \begin_inset Quotes eld
2290 \end_inset
2291
2292 Knuth, 1984
2293 \begin_inset Quotes erd
2294 \end_inset
2295
2296
2297 \begin_inset Quotes eld
2298 \end_inset
2299
2300 1984
2301 \begin_inset Quotes erd
2302 \end_inset
2303
2304  etc.).
2305  Note that both packages need specifically designed style files.
2306  They both ship their own, but there are lots of additional style files,
2307  and there is even an interactive style file builder
2308 \begin_inset Foot
2309 status collapsed
2310
2311 \begin_layout Plain Layout
2312 See 
2313 \begin_inset Flex URL
2314 status open
2315
2316 \begin_layout Plain Layout
2317
2318 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2319 \end_layout
2320
2321 \end_inset
2322
2323
2324 \end_layout
2325
2326 \end_inset
2327
2328  for 
2329 \begin_inset Flex Code
2330 status collapsed
2331
2332 \begin_layout Plain Layout
2333 natbib
2334 \end_layout
2335
2336 \end_inset
2337
2338 .
2339 \end_layout
2340
2341 \begin_layout Subsection
2342 Sectioned Bibliographies
2343 \end_layout
2344
2345 \begin_layout Standard
2346 Sometimes you might need to divide your bibliography into several sections.
2347  If you are for instance a historian, the possibility to separate sources
2348  and scientific works is most likely a 
2349 \begin_inset Quotes eld
2350 \end_inset
2351
2352 must have
2353 \begin_inset Quotes erd
2354 \end_inset
2355
2356 .
2357  Unfortunately, BibTeX itself does not allow you to do this.
2358  But with the help of some LaTeX packages, BibTeX can be extended to fit
2359  your needs.
2360 \end_layout
2361
2362 \begin_layout Standard
2363 LyX provides native support for one of these packages, 
2364 \family typewriter
2365 bibtopic
2366 \family default
2367 .
2368 \begin_inset Foot
2369 status collapsed
2370
2371 \begin_layout Plain Layout
2372 Available from 
2373 \begin_inset Flex URL
2374 status open
2375
2376 \begin_layout Plain Layout
2377
2378 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2379 \end_layout
2380
2381 \end_inset
2382
2383
2384 \end_layout
2385
2386 \end_inset
2387
2388  The advantage of this package (compared to other packages like 
2389 \family typewriter
2390 multibib
2391 \family default
2392 ) is that you don't need to define new citation commands.
2393  Instead, you need to prepare different bibliographic databases which include
2394  the entries for the different sections of the bibliography.
2395  For example: If you want to divide your bibliography into the sections
2396  
2397 \begin_inset Quotes eld
2398 \end_inset
2399
2400 Sources
2401 \begin_inset Quotes erd
2402 \end_inset
2403
2404  and 
2405 \begin_inset Quotes eld
2406 \end_inset
2407
2408 Scientific works
2409 \begin_inset Quotes erd
2410 \end_inset
2411
2412 , you first need to create two bibliographic databases, e.
2413 \begin_inset space \thinspace{}
2414 \end_inset
2415
2416 g.
2417 \begin_inset space \space{}
2418 \end_inset
2419
2420
2421 \begin_inset Flex Code
2422 status collapsed
2423
2424 \begin_layout Plain Layout
2425 sources.bib
2426 \end_layout
2427
2428 \end_inset
2429
2430  and 
2431 \begin_inset Flex Code
2432 status collapsed
2433
2434 \begin_layout Plain Layout
2435 scientific.bib
2436 \end_layout
2437
2438 \end_inset
2439
2440 .
2441  
2442 \end_layout
2443
2444 \begin_layout Standard
2445 Go to 
2446 \begin_inset Flex MenuItem
2447 status collapsed
2448
2449 \begin_layout Plain Layout
2450 Document\SpecialChar \menuseparator
2451 Settings
2452 \end_layout
2453
2454 \end_inset
2455
2456  and check under 
2457 \begin_inset Flex MenuItem
2458 status collapsed
2459
2460 \begin_layout Plain Layout
2461 Bibliography
2462 \end_layout
2463
2464 \end_inset
2465
2466  the option 
2467 \begin_inset Flex MenuItem
2468 status collapsed
2469
2470 \begin_layout Plain Layout
2471 Sectioned bibliography
2472 \end_layout
2473
2474 \end_inset
2475
2476 .
2477  Now you can insert multiple BibTeX bibliographies, one for each section
2478  of your bibliography.
2479  Returning to our example: Insert the BibTeX bibliography 
2480 \begin_inset Flex Code
2481 status collapsed
2482
2483 \begin_layout Plain Layout
2484 sources.bib
2485 \end_layout
2486
2487 \end_inset
2488
2489  and a second one for the database 
2490 \begin_inset Flex Code
2491 status collapsed
2492
2493 \begin_layout Plain Layout
2494 scientific.bib
2495 \end_layout
2496
2497 \end_inset
2498
2499 .
2500  You are free to use the same or different styles for each section.
2501  Additionally, you can choose if the bibliography section should contain
2502  
2503 \begin_inset Quotes eld
2504 \end_inset
2505
2506 all cited references
2507 \begin_inset Quotes erd
2508 \end_inset
2509
2510  of the specified database(s) (which is the default), 
2511 \begin_inset Quotes eld
2512 \end_inset
2513
2514 all uncited references
2515 \begin_inset Quotes erd
2516 \end_inset
2517
2518  or even 
2519 \begin_inset Quotes eld
2520 \end_inset
2521
2522 all references
2523 \begin_inset Quotes erd
2524 \end_inset
2525
2526 .
2527  This might be useful if you would like to separate your bibliography into
2528  three sections: 
2529 \begin_inset Quotes eld
2530 \end_inset
2531
2532 Cited sources
2533 \begin_inset Quotes erd
2534 \end_inset
2535
2536
2537 \begin_inset Quotes eld
2538 \end_inset
2539
2540 Uncited sources
2541 \begin_inset Quotes erd
2542 \end_inset
2543
2544 , and 
2545 \begin_inset Quotes eld
2546 \end_inset
2547
2548 Scientific works
2549 \begin_inset Quotes erd
2550 \end_inset
2551
2552 .
2553  The titles for the sections can be added as ordinary sections or subsections.
2554  Since 
2555 \begin_inset Flex Code
2556 status collapsed
2557
2558 \begin_layout Plain Layout
2559 bibtopic
2560 \end_layout
2561
2562 \end_inset
2563
2564  removes the bibliography title, you have to manually re-add that, too (as
2565  a chapter* or section*, for instance).
2566 \end_layout
2567
2568 \begin_layout Subsection
2569 Multiple Bibliographies
2570 \end_layout
2571
2572 \begin_layout Standard
2573 Multiple bibliographies, e.
2574 \begin_inset space \thinspace{}
2575 \end_inset
2576
2577 g.
2578 \begin_inset space \space{}
2579 \end_inset
2580
2581 a bibliography for each section or chapter of the document, are not supported
2582  by BibTeX itself.
2583  But the 
2584 \begin_inset Flex Code
2585 status collapsed
2586
2587 \begin_layout Plain Layout
2588 bibtopic
2589 \end_layout
2590
2591 \end_inset
2592
2593  package, which is used for the creation of sectioned bibliographies in
2594  LyX (see the previous section), provides an easy way to solve this task,
2595  if you are willing to use some 
2596 \begin_inset Flex MenuItem
2597 status collapsed
2598
2599 \begin_layout Plain Layout
2600 TeX Code
2601 \end_layout
2602
2603 \end_inset
2604
2605  (see section
2606 \begin_inset space ~
2607 \end_inset
2608
2609
2610 \begin_inset CommandInset ref
2611 LatexCommand ref
2612 reference "sec:Inserting-TeX-Code"
2613
2614 \end_inset
2615
2616 ).
2617 \begin_inset Foot
2618 status collapsed
2619
2620 \begin_layout Plain Layout
2621 An alternative approach is to use the 
2622 \begin_inset Flex Code
2623 status collapsed
2624
2625 \begin_layout Plain Layout
2626 chapterbib
2627 \end_layout
2628
2629 \end_inset
2630
2631  or 
2632 \begin_inset Flex Code
2633 status collapsed
2634
2635 \begin_layout Plain Layout
2636 bibunits
2637 \end_layout
2638
2639 \end_inset
2640
2641  package, respectively.
2642 \end_layout
2643
2644 \end_inset
2645
2646
2647 \end_layout
2648
2649 \begin_layout Standard
2650 First go to 
2651 \begin_inset Flex MenuItem
2652 status collapsed
2653
2654 \begin_layout Plain Layout
2655 Document\SpecialChar \menuseparator
2656 Settings
2657 \end_layout
2658
2659 \end_inset
2660
2661  and under 
2662 \begin_inset Flex MenuItem
2663 status collapsed
2664
2665 \begin_layout Plain Layout
2666 Bibliography
2667 \end_layout
2668
2669 \end_inset
2670
2671  check 
2672 \begin_inset Flex MenuItem
2673 status collapsed
2674
2675 \begin_layout Plain Layout
2676 Sectioned bibliography
2677 \end_layout
2678
2679 \end_inset
2680
2681 .
2682  In the document, you have to enclose the sections, which shall contain
2683  their own bibliography (including the BibTeX bibliography itself), between
2684  
2685 \begin_inset Flex Code
2686 status collapsed
2687
2688 \begin_layout Plain Layout
2689
2690 \backslash
2691 begin{btUnit}
2692 \end_layout
2693
2694 \end_inset
2695
2696  and 
2697 \begin_inset Flex Code
2698 status collapsed
2699
2700 \begin_layout Plain Layout
2701
2702 \backslash
2703 end{btUnit}
2704 \end_layout
2705
2706 \end_inset
2707
2708  (those commands have to be inserted as TeX code).
2709  The bibliography will contain all references that have been cited in the
2710  current 
2711 \begin_inset Flex Code
2712 status collapsed
2713
2714 \begin_layout Plain Layout
2715 btUnit
2716 \end_layout
2717
2718 \end_inset
2719
2720 .
2721  
2722 \series bold
2723 Note:
2724 \series default
2725  If you are using this approach, then every citation reference has to be
2726  inside some 
2727 \begin_inset Flex Code
2728 status collapsed
2729
2730 \begin_layout Plain Layout
2731 btUnit
2732 \end_layout
2733
2734 \end_inset
2735
2736 .
2737  Also, the 
2738 \begin_inset Flex Code
2739 status collapsed
2740
2741 \begin_layout Plain Layout
2742 btUnit
2743 \end_layout
2744
2745 \end_inset
2746
2747 s cannot be nested.
2748 \end_layout
2749
2750 \begin_layout Section
2751 Multipart Documents
2752 \end_layout
2753
2754 \begin_layout Subsection
2755 General Operation
2756 \end_layout
2757
2758 \begin_layout Standard
2759 When you are working on a large file with many sections, it is often convenient
2760  to break up the document into several files, or perhaps you have something
2761  where a table may change from time to time, but the preceding text does
2762  not.
2763  In these cases, you should seriously consider using multipart documents.
2764  For example, scientific papers often have five major sections: the introduction
2765 , observations, results, discussion, and conclusion.
2766  Each of these could be its own separate LyX file, with one 
2767 \begin_inset Quotes eld
2768 \end_inset
2769
2770 master
2771 \begin_inset Quotes erd
2772 \end_inset
2773
2774  file which contains the title, authors, abstract, references, etc., plus
2775  the five included files.
2776  It is important to note that each of these files is a full LyX file which
2777  can be formatted and printed on its own, as well as included in a master
2778  file.
2779  Each of these files must have the same document class, however—don't attempt
2780  to mix book classes with article classes.
2781  You may also include LaTeX files; however, these files must not have their
2782  own preamble (i.
2783 \begin_inset space \thinspace{}
2784 \end_inset
2785
2786 e.
2787 \begin_inset space \space{}
2788 \end_inset
2789
2790 everything up to and including the 
2791 \begin_inset Flex Code
2792 status collapsed
2793
2794 \begin_layout Plain Layout
2795
2796 \backslash
2797 begin{document}
2798 \end_layout
2799
2800 \end_inset
2801
2802  line as well as the 
2803 \begin_inset Flex Code
2804 status collapsed
2805
2806 \begin_layout Plain Layout
2807
2808 \backslash
2809 end{document}
2810 \end_layout
2811
2812 \end_inset
2813
2814  line must be deleted) or else errors will be generated when you try to
2815  make a DVI file.
2816 \end_layout
2817
2818 \begin_layout Standard
2819 LyX allows you to include files quite easily with 
2820 \begin_inset Flex MenuItem
2821 status collapsed
2822
2823 \begin_layout Plain Layout
2824 Insert\SpecialChar \menuseparator
2825 ChiId
2826 \begin_inset space ~
2827 \end_inset
2828
2829 Document
2830 \end_layout
2831
2832 \end_inset
2833
2834 .
2835  When you click on this selection a small box is inserted into the file
2836  at the current cursor location.
2837  Clicking on the box raises a dialog which allows you to select the file
2838  to be included, and the method of its inclusion.
2839  
2840 \end_layout
2841
2842 \begin_layout Standard
2843 The file selection box should by now be obvious.
2844  The three inclusion methods are 
2845 \begin_inset Quotes eld
2846 \end_inset
2847
2848 include
2849 \begin_inset Quotes erd
2850 \end_inset
2851
2852
2853 \begin_inset Quotes eld
2854 \end_inset
2855
2856 input
2857 \begin_inset Quotes erd
2858 \end_inset
2859
2860 , and 
2861 \begin_inset Quotes eld
2862 \end_inset
2863
2864 verbatim
2865 \begin_inset Quotes erd
2866 \end_inset
2867
2868 .
2869  The difference between 
2870 \begin_inset Quotes eld
2871 \end_inset
2872
2873 include
2874 \begin_inset Quotes erd
2875 \end_inset
2876
2877  and 
2878 \begin_inset Quotes eld
2879 \end_inset
2880
2881 input
2882 \begin_inset Quotes erd
2883 \end_inset
2884
2885  is really only meaningful to LaTeXperts, but the practical difference is
2886  that files that are 
2887 \begin_inset Quotes eld
2888 \end_inset
2889
2890 included
2891 \begin_inset Quotes erd
2892 \end_inset
2893
2894  are typeset beginning on a new page, while files that are 
2895 \begin_inset Quotes eld
2896 \end_inset
2897
2898 inputted
2899 \begin_inset Quotes erd
2900 \end_inset
2901
2902  are typeset starting on the current page.
2903 \end_layout
2904
2905 \begin_layout Standard
2906 Generally, the master file is converted into a full LaTeX file before typesettin
2907 g, while the included files are converted to LaTeX files that do not have
2908  all the preamble information.
2909 \end_layout
2910
2911 \begin_layout Standard
2912
2913 \begin_inset Quotes eld
2914 \end_inset
2915
2916 verbatim
2917 \begin_inset Quotes erd
2918 \end_inset
2919
2920  included file allows you to include a file typeset exactly as it appears
2921  in the file, i.
2922 \begin_inset space \thinspace{}
2923 \end_inset
2924
2925 e.
2926 \begin_inset space \space{}
2927 \end_inset
2928
2929 in 
2930 \begin_inset Flex Code
2931 status collapsed
2932
2933 \begin_layout Plain Layout
2934 verbatim
2935 \end_layout
2936
2937 \end_inset
2938
2939  mode, with the characters set in a fixed-width typewriter font.
2940  Normally, spaces in this file are invisible, though two consecutive spaces
2941  are conserved, unlike LyX's normal treatment of spaces.
2942  However, setting the 
2943 \begin_inset Flex MenuItem
2944 status collapsed
2945
2946 \begin_layout Plain Layout
2947 Mark
2948 \begin_inset space ~
2949 \end_inset
2950
2951 spaces
2952 \begin_inset space ~
2953 \end_inset
2954
2955 in
2956 \begin_inset space ~
2957 \end_inset
2958
2959 output
2960 \end_layout
2961
2962 \end_inset
2963
2964  checkbox typesets a mark to unambiguously define the presence of a space.
2965  
2966 \end_layout
2967
2968 \begin_layout Subsection
2969 Cross-References Between Files
2970 \end_layout
2971
2972 \begin_layout Standard
2973 \begin_inset Box Shadowbox
2974 position "t"
2975 hor_pos "c"
2976 has_inner_box 1
2977 inner_pos "t"
2978 use_parbox 0
2979 use_makebox 0
2980 width "100col%"
2981 special "none"
2982 height "1in"
2983 height_special "totalheight"
2984 status open
2985
2986 \begin_layout Plain Layout
2987 This section is somewhat out of date.
2988  Need to describe default master documents and how children are opened when
2989  the master is.
2990  [[FIXME]]
2991 \end_layout
2992
2993 \end_inset
2994
2995
2996 \end_layout
2997
2998 \begin_layout Standard
2999 It is possible to set up cross-references between the different files.
3000  First, open all the files in question: let's call them A and B in a two
3001  file example, where B is included in A.
3002  Let's say you insert a label in A, then want to reference it in B.
3003  Open the cross-reference dialog whilst in document B, and you can select
3004  the 
3005 \begin_inset Quotes eld
3006 \end_inset
3007
3008 buffer
3009 \begin_inset Quotes erd
3010 \end_inset
3011
3012  to use.
3013 \end_layout
3014
3015 \begin_layout Subsection
3016 Bibliography Lists in all Subdocuments
3017 \end_layout
3018
3019 \begin_layout Standard
3020 \begin_inset Box Frameless
3021 position "t"
3022 hor_pos "c"
3023 has_inner_box 1
3024 inner_pos "t"
3025 use_parbox 0
3026 use_makebox 0
3027 width "100col%"
3028 special "none"
3029 height "1in"
3030 height_special "totalheight"
3031 status open
3032
3033 \begin_layout Plain Layout
3034 This section also needs updating.
3035  There is now material about this on the wiki, and it could be copied here.
3036 \end_layout
3037
3038 \end_inset
3039
3040
3041 \end_layout
3042
3043 \begin_layout Standard
3044 Copy the bibliography list with all entries to all subdocuments and transform
3045  them to a comment.
3046  This way LyX will find the 
3047 \begin_inset Flex Code
3048 status collapsed
3049
3050 \begin_layout Plain Layout
3051 .bib
3052 \end_layout
3053
3054 \end_inset
3055
3056 -files and you can easily insert references without making the bibliography
3057  list visible.
3058 \end_layout
3059
3060 \begin_layout Standard
3061 As the bibliography list is in a comment, LaTeX won't use it and the references
3062  will look like this: [?], instead of like this: [1].
3063  One solution is to use the LaTeX-package 
3064 \begin_inset Flex Code
3065 status collapsed
3066
3067 \begin_layout Plain Layout
3068 comment
3069 \end_layout
3070
3071 \end_inset
3072
3073  that will only include comments by processing the files separately.
3074  To do this, add in the LaTeX preamble of every subdocument the following:
3075 \end_layout
3076
3077 \begin_layout LyX-Code
3078
3079 \backslash
3080 usepackage{comment}
3081 \end_layout
3082
3083 \begin_layout LyX-Code
3084
3085 \backslash
3086 includecomment{comment}
3087 \end_layout
3088
3089 \begin_layout Standard
3090 See also 
3091 \begin_inset Flex URL
3092 status collapsed
3093
3094 \begin_layout Plain Layout
3095
3096 http://wiki.lyx.org/FAQ/Unsorted#toc31
3097 \end_layout
3098
3099 \end_inset
3100
3101 .
3102 \end_layout
3103
3104 \begin_layout Section
3105 LyX Archives
3106 \end_layout
3107
3108 \begin_layout Standard
3109 Users sometimes need to be able to 
3110 \begin_inset Quotes eld
3111 \end_inset
3112
3113 bundle
3114 \begin_inset Quotes erd
3115 \end_inset
3116
3117  a LyX file together with all the images (and other files) on which it depends,
3118  either for sending to a publisher or for sharing with a co-author.
3119  LyX 2.0 includes a Python script (
3120 \begin_inset Flex Code
3121 status collapsed
3122
3123 \begin_layout Plain Layout
3124 lyxpak.py
3125 \end_layout
3126
3127 \end_inset
3128
3129 ) that automates this process.
3130  To use it, you must have either the 
3131 \begin_inset Flex Code
3132 status collapsed
3133
3134 \begin_layout Plain Layout
3135 zipfile
3136 \end_layout
3137
3138 \end_inset
3139
3140  or 
3141 \begin_inset Flex Code
3142 status collapsed
3143
3144 \begin_layout Plain Layout
3145 tarfile
3146 \end_layout
3147
3148 \end_inset
3149
3150  python modules installed on your system.
3151  By default, the script prefers the 
3152 \begin_inset Flex Code
3153 status collapsed
3154
3155 \begin_layout Plain Layout
3156 gzip
3157 \end_layout
3158
3159 \end_inset
3160
3161 -compressed 
3162 \begin_inset Flex Code
3163 status collapsed
3164
3165 \begin_layout Plain Layout
3166 tar
3167 \end_layout
3168
3169 \end_inset
3170
3171  format on Unix-like systems and the 
3172 \begin_inset Flex Code
3173 status collapsed
3174
3175 \begin_layout Plain Layout
3176 zip
3177 \end_layout
3178
3179 \end_inset
3180
3181  format on Windows.
3182 \end_layout
3183
3184 \begin_layout Standard
3185 LyX's configuration process will set the script up to export a `LyX Archive',
3186  and this format will then be available under 
3187 \begin_inset Flex Code
3188 status collapsed
3189
3190 \begin_layout Plain Layout
3191 File\SpecialChar \menuseparator
3192 Export
3193 \end_layout
3194
3195 \end_inset
3196
3197 .
3198 \end_layout
3199
3200 \begin_layout Standard
3201 Independently of the platform, the generation of a particular archive format
3202  can be forced by adding either the 
3203 \begin_inset Flex Code
3204 status collapsed
3205
3206 \begin_layout Plain Layout
3207 -t
3208 \end_layout
3209
3210 \end_inset
3211
3212  (for the 
3213 \begin_inset Flex Code
3214 status collapsed
3215
3216 \begin_layout Plain Layout
3217 tar
3218 \end_layout
3219
3220 \end_inset
3221
3222  format) or 
3223 \begin_inset Flex Code
3224 status collapsed
3225
3226 \begin_layout Plain Layout
3227 -z
3228 \end_layout
3229
3230 \end_inset
3231
3232  (for the 
3233 \begin_inset Flex Code
3234 status collapsed
3235
3236 \begin_layout Plain Layout
3237 zip
3238 \end_layout
3239
3240 \end_inset
3241
3242  format) switch to the 
3243 \begin_inset Flex Code
3244 status collapsed
3245
3246 \begin_layout Plain Layout
3247 LyX\SpecialChar \menuseparator
3248 LyX Archive
3249 \end_layout
3250
3251 \end_inset
3252
3253  converter in 
3254 \begin_inset Flex Code
3255 status collapsed
3256
3257 \begin_layout Plain Layout
3258 Tools\SpecialChar \menuseparator
3259 Preferences\SpecialChar \menuseparator
3260 File Handling\SpecialChar \menuseparator
3261 Converters
3262 \end_layout
3263
3264 \end_inset
3265
3266 .
3267  (Make sure you add the switch after the script name, not before it.)
3268 \end_layout
3269
3270 \begin_layout Section
3271 Fancy Headers and Footers
3272 \end_layout
3273
3274 \begin_layout Standard
3275 The default page layout is rather plain; for an 
3276 \begin_inset Flex Code
3277 status collapsed
3278
3279 \begin_layout Plain Layout
3280 article
3281 \end_layout
3282
3283 \end_inset
3284
3285  document class, all you get is a centered page number at the bottom of
3286  the page.
3287  This document uses KOMA-script's book class, so it appears to be a bit
3288  fancier.
3289  But to really put on a show, you need to set the document page style to
3290  
3291 \begin_inset Quotes eld
3292 \end_inset
3293
3294 fancy
3295 \begin_inset Quotes erd
3296 \end_inset
3297
3298 , as mentioned in the 
3299 \emph on
3300 User Guide
3301 \emph default
3302 .
3303  This section describes the LaTeX code you need to insert in your LaTeX
3304  preamble in order to get the desired effects.
3305 \end_layout
3306
3307 \begin_layout Standard
3308 For more information on fancy headers, see the 
3309 \begin_inset Flex Code
3310 status collapsed
3311
3312 \begin_layout Plain Layout
3313 fancyhdr
3314 \end_layout
3315
3316 \end_inset
3317
3318  package documentation.
3319  (
3320 \begin_inset Flex URL
3321 status collapsed
3322
3323 \begin_layout Plain Layout
3324
3325 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3326 \end_layout
3327
3328 \end_inset
3329
3330 )
3331 \end_layout
3332
3333 \begin_layout Standard
3334 The page header is divided into three fields, not surprisingly labeled 
3335 \begin_inset Quotes eld
3336 \end_inset
3337
3338 left
3339 \begin_inset Quotes erd
3340 \end_inset
3341
3342
3343 \begin_inset Quotes eld
3344 \end_inset
3345
3346 center
3347 \begin_inset Quotes erd
3348 \end_inset
3349
3350 , and 
3351 \begin_inset Quotes eld
3352 \end_inset
3353
3354 right
3355 \begin_inset Quotes erd
3356 \end_inset
3357
3358 .
3359  The footer is also divided into these three fields.
3360  The LaTeX commands to set these fields in the simplest manner are 
3361 \begin_inset Flex Code
3362 status collapsed
3363
3364 \begin_layout Plain Layout
3365
3366 \backslash
3367 lhead
3368 \end_layout
3369
3370 \end_inset
3371
3372
3373 \begin_inset Flex Code
3374 status collapsed
3375
3376 \begin_layout Plain Layout
3377
3378 \backslash
3379 chead
3380 \end_layout
3381
3382 \end_inset
3383
3384
3385 \begin_inset Flex Code
3386 status collapsed
3387
3388 \begin_layout Plain Layout
3389
3390 \backslash
3391 rhead
3392 \end_layout
3393
3394 \end_inset
3395
3396
3397 \begin_inset Flex Code
3398 status collapsed
3399
3400 \begin_layout Plain Layout
3401
3402 \backslash
3403 lfoot
3404 \end_layout
3405
3406 \end_inset
3407
3408 , etc.
3409  Suppose you wish to put your name in the upper left hand corner of each
3410  page.
3411  Simply insert the following command in the preamble: 
3412 \end_layout
3413
3414 \begin_layout Standard
3415
3416 \family typewriter
3417
3418 \backslash
3419 lhead{John Q.
3420  DocWriter}
3421 \end_layout
3422
3423 \begin_layout Standard
3424 You will now see your name in the upper left.
3425  If a field has a default entry that you would like to get rid of (often
3426  the page number appears in the central footer) simply include a command
3427  with a blank argument, e.
3428 \begin_inset space \thinspace{}
3429 \end_inset
3430
3431 g.:
3432 \end_layout
3433
3434 \begin_layout Standard
3435
3436 \family typewriter
3437
3438 \backslash
3439 cfoot{}
3440 \end_layout
3441
3442 \begin_layout Standard
3443 Let's get really fancy: lets put the section number with the word 
3444 \begin_inset Quotes eld
3445 \end_inset
3446
3447 Section
3448 \begin_inset Quotes erd
3449 \end_inset
3450
3451  (e.
3452 \begin_inset space \thinspace{}
3453 \end_inset
3454
3455 g.
3456 \begin_inset space \space{}
3457 \end_inset
3458
3459 Section 3) in the upper left, the page number (e.
3460 \begin_inset space \thinspace{}
3461 \end_inset
3462
3463 g.
3464 \begin_inset space \space{}
3465 \end_inset
3466
3467 Page 4) in the upper right, your name in the lower left, and the date in
3468  the lower right.
3469  The following commands should now appear in the preamble:
3470 \end_layout
3471
3472 \begin_layout Standard
3473
3474 \family typewriter
3475
3476 \backslash
3477 lhead{Section 
3478 \backslash
3479 thesection}
3480 \end_layout
3481
3482 \begin_layout Standard
3483
3484 \family typewriter
3485
3486 \backslash
3487 chead{}
3488 \end_layout
3489
3490 \begin_layout Standard
3491
3492 \family typewriter
3493
3494 \backslash
3495 rhead{Page 
3496 \backslash
3497 thepage}
3498 \end_layout
3499
3500 \begin_layout Standard
3501
3502 \family typewriter
3503
3504 \backslash
3505 lfoot{John Q.
3506  DocWriter}
3507 \end_layout
3508
3509 \begin_layout Standard
3510
3511 \family typewriter
3512
3513 \backslash
3514 cfoot{}
3515 \end_layout
3516
3517 \begin_layout Standard
3518
3519 \family typewriter
3520
3521 \backslash
3522 rfoot{
3523 \backslash
3524 today}
3525 \end_layout
3526
3527 \begin_layout Standard
3528 The commands 
3529 \begin_inset Flex Code
3530 status collapsed
3531
3532 \begin_layout Plain Layout
3533
3534 \backslash
3535 thesection
3536 \end_layout
3537
3538 \end_inset
3539
3540  and 
3541 \begin_inset Flex Code
3542 status collapsed
3543
3544 \begin_layout Plain Layout
3545
3546 \backslash
3547 thepage
3548 \end_layout
3549
3550 \end_inset
3551
3552  access LaTeX's section and page counters, and so print out the current
3553  section and page numbers.
3554  
3555 \begin_inset Flex Code
3556 status collapsed
3557
3558 \begin_layout Plain Layout
3559
3560 \backslash
3561 today
3562 \end_layout
3563
3564 \end_inset
3565
3566  simply prints out today's date.
3567 \end_layout
3568
3569 \begin_layout Standard
3570 The thicknesses of the horizontal rules drawn beneath the header and above
3571  the footer can also be modified.
3572  If you don't want one of the rules, set its thickness to 0.
3573  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3574  Use commands
3575 \family typewriter
3576  
3577 \family default
3578 like 
3579 \begin_inset Flex Code
3580 status collapsed
3581
3582 \begin_layout Plain Layout
3583
3584 \backslash
3585 renewcommand{
3586 \backslash
3587 headrulewidth}{0.4pt}
3588 \end_layout
3589
3590 \end_inset
3591
3592  and 
3593 \begin_inset Flex Code
3594 status collapsed
3595
3596 \begin_layout Plain Layout
3597
3598 \backslash
3599 renewcommand{
3600 \backslash
3601 footrulewidth}{0.4pt}
3602 \end_layout
3603
3604 \end_inset
3605
3606  to set the thicknesses.
3607 \end_layout
3608
3609 \begin_layout Standard
3610 You can switch the header/footer settings on and off for individual pages
3611  using commands like 
3612 \begin_inset Flex Code
3613 status collapsed
3614
3615 \begin_layout Plain Layout
3616
3617 \backslash
3618 thispagestyle{empty}
3619 \end_layout
3620
3621 \end_inset
3622
3623
3624 \begin_inset Flex Code
3625 status collapsed
3626
3627 \begin_layout Plain Layout
3628
3629 \backslash
3630 thispagestyle{plain}
3631 \end_layout
3632
3633 \end_inset
3634
3635 , and 
3636 \begin_inset Flex Code
3637 status collapsed
3638
3639 \begin_layout Plain Layout
3640
3641 \backslash
3642 thispagestyle{fancy}
3643 \end_layout
3644
3645 \end_inset
3646
3647 .
3648  Simply insert them in the text on the page you want changed and mark them
3649  as TeX code.
3650  In fact, title pages are marked as plain by default, while following pages
3651  are marked fancy when using the global fancy setting.
3652 \end_layout
3653
3654 \begin_layout Standard
3655 As a final example, it is possible to include an image in the header or
3656  footer.
3657  Suppose you want to put a company logo in the upper lefthand corner.
3658  You might try something like
3659 \end_layout
3660
3661 \begin_layout Standard
3662
3663 \family typewriter
3664
3665 \backslash
3666 lhead{
3667 \backslash
3668 resizebox{1in}{!}{
3669 \backslash
3670 includegraphics{logo.eps}}}
3671 \end_layout
3672
3673 \begin_layout Standard
3674 \noindent
3675 (you may need to preface this with 
3676 \begin_inset Flex Code
3677 status collapsed
3678
3679 \begin_layout Plain Layout
3680 \noindent
3681
3682 \backslash
3683 usepackage{graphics}
3684 \end_layout
3685
3686 \end_inset
3687
3688  if you don't include graphics elsewhere in your document).
3689 \end_layout
3690
3691 \begin_layout Section
3692 Itemize Bullet Selection
3693 \begin_inset CommandInset label
3694 LatexCommand label
3695 name "sec:bullet"
3696
3697 \end_inset
3698
3699
3700 \end_layout
3701
3702 \begin_layout Standard
3703 by
3704 \noun on
3705  Allan Rae
3706 \end_layout
3707
3708 \begin_layout Subsection
3709 Introduction
3710 \end_layout
3711
3712 \begin_layout Standard
3713 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3714  Using this dialog you can easily specify what bullet shape to use at each
3715  level of an itemized list.
3716  These settings are document-wide so you won't be able to specify different
3717  sets of bullets for different paragraphs.
3718 \begin_inset Foot
3719 status collapsed
3720
3721 \begin_layout Plain Layout
3722 Well, actually you can but you'll have to do it by hand.
3723 \end_layout
3724
3725 \end_inset
3726
3727
3728 \end_layout
3729
3730 \begin_layout Subsection
3731 How it looks
3732 \end_layout
3733
3734 \begin_layout Standard
3735 Open the dialog by selecting the 
3736 \begin_inset Flex MenuItem
3737 status collapsed
3738
3739 \begin_layout Plain Layout
3740 Document\SpecialChar \menuseparator
3741 Settings
3742 \end_layout
3743
3744 \end_inset
3745
3746  menu item and then select the 
3747 \begin_inset Flex MenuItem
3748 status collapsed
3749
3750 \begin_layout Plain Layout
3751 Bullets
3752 \end_layout
3753
3754 \end_inset
3755
3756  tab.
3757 \end_layout
3758
3759 \begin_layout Standard
3760 The dialog provides you with a table of bullet shapes.
3761  A column of buttons on the left of the table provides access to the six
3762  different panels of bullet shapes.
3763  The row of buttons across the top is used to select which bullet depth
3764  you are changing.
3765  A text entry under the table shows the currently selected bullet shape's
3766  LaTeX equivalent and this can be edited if desired.
3767  If you do modify the text you will also need to specify any needed packages
3768  in the LaTeX preamble.
3769 \end_layout
3770
3771 \begin_layout Standard
3772 The six panels are divided up by the packages they require.
3773  The following table shows the mappings from button name to LaTeX package.
3774 \end_layout
3775
3776 \begin_layout Standard
3777 \align center
3778 \begin_inset Tabular
3779 <lyxtabular version="3" rows="7" columns="2">
3780 <features rotate="0" tabularvalignment="middle">
3781 <column alignment="center" valignment="top" width="0pt">
3782 <column alignment="center" valignment="top" width="0pt">
3783 <row>
3784 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3785 \begin_inset Text
3786
3787 \begin_layout Plain Layout
3788
3789 \family roman
3790 \series medium
3791 \shape up
3792 \size normal
3793 \emph off
3794 \bar no
3795 \noun off
3796 \color none
3797 Button
3798 \end_layout
3799
3800 \end_inset
3801 </cell>
3802 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3803 \begin_inset Text
3804
3805 \begin_layout Plain Layout
3806
3807 \family roman
3808 \series medium
3809 \shape up
3810 \size normal
3811 \emph off
3812 \bar no
3813 \noun off
3814 \color none
3815 Packages Required
3816 \end_layout
3817
3818 \end_inset
3819 </cell>
3820 </row>
3821 <row>
3822 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3823 \begin_inset Text
3824
3825 \begin_layout Plain Layout
3826
3827 \family sans
3828 \series medium
3829 \shape up
3830 \size normal
3831 \emph off
3832 \bar no
3833 \noun off
3834 \color none
3835 Standard
3836 \end_layout
3837
3838 \end_inset
3839 </cell>
3840 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3841 \begin_inset Text
3842
3843 \begin_layout Plain Layout
3844
3845 \series medium
3846 \shape up
3847 \size normal
3848 \emph off
3849 \bar no
3850 \noun off
3851 \color none
3852 base LaTeX
3853 \end_layout
3854
3855 \end_inset
3856 </cell>
3857 </row>
3858 <row>
3859 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3860 \begin_inset Text
3861
3862 \begin_layout Plain Layout
3863
3864 \family sans
3865 \series medium
3866 \shape up
3867 \size normal
3868 \emph off
3869 \bar no
3870 \noun off
3871 \color none
3872 Maths
3873 \end_layout
3874
3875 \end_inset
3876 </cell>
3877 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3878 \begin_inset Text
3879
3880 \begin_layout Plain Layout
3881
3882 \family typewriter
3883 \series medium
3884 \shape up
3885 \size normal
3886 \emph off
3887 \bar no
3888 \noun off
3889 \color none
3890 amssymb.sty
3891 \end_layout
3892
3893 \end_inset
3894 </cell>
3895 </row>
3896 <row>
3897 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3898 \begin_inset Text
3899
3900 \begin_layout Plain Layout
3901
3902 \family sans
3903 \series medium
3904 \shape up
3905 \size normal
3906 \emph off
3907 \bar no
3908 \noun off
3909 \color none
3910 Ding1
3911 \end_layout
3912
3913 \end_inset
3914 </cell>
3915 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3916 \begin_inset Text
3917
3918 \begin_layout Plain Layout
3919
3920 \family typewriter
3921 \series medium
3922 \shape up
3923 \size normal
3924 \emph off
3925 \bar no
3926 \noun off
3927 \color none
3928 pifont.sty
3929 \end_layout
3930
3931 \end_inset
3932 </cell>
3933 </row>
3934 <row>
3935 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3936 \begin_inset Text
3937
3938 \begin_layout Plain Layout
3939
3940 \family sans
3941 \series medium
3942 \shape up
3943 \size normal
3944 \emph off
3945 \bar no
3946 \noun off
3947 \color none
3948 Ding2
3949 \end_layout
3950
3951 \end_inset
3952 </cell>
3953 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3954 \begin_inset Text
3955
3956 \begin_layout Plain Layout
3957
3958 \family typewriter
3959 \series medium
3960 \shape up
3961 \size normal
3962 \emph off
3963 \bar no
3964 \noun off
3965 \color none
3966 pifont.sty
3967 \end_layout
3968
3969 \end_inset
3970 </cell>
3971 </row>
3972 <row>
3973 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3974 \begin_inset Text
3975
3976 \begin_layout Plain Layout
3977
3978 \family sans
3979 \series medium
3980 \shape up
3981 \size normal
3982 \emph off
3983 \bar no
3984 \noun off
3985 \color none
3986 Ding3
3987 \end_layout
3988
3989 \end_inset
3990 </cell>
3991 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3992 \begin_inset Text
3993
3994 \begin_layout Plain Layout
3995
3996 \family typewriter
3997 \series medium
3998 \shape up
3999 \size normal
4000 \emph off
4001 \bar no
4002 \noun off
4003 \color none
4004 pifont.sty
4005 \end_layout
4006
4007 \end_inset
4008 </cell>
4009 </row>
4010 <row>
4011 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4012 \begin_inset Text
4013
4014 \begin_layout Plain Layout
4015
4016 \family sans
4017 \series medium
4018 \shape up
4019 \size normal
4020 \emph off
4021 \bar no
4022 \noun off
4023 \color none
4024 Ding4
4025 \end_layout
4026
4027 \end_inset
4028 </cell>
4029 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4030 \begin_inset Text
4031
4032 \begin_layout Plain Layout
4033
4034 \family typewriter
4035 \series medium
4036 \shape up
4037 \size normal
4038 \emph off
4039 \bar no
4040 \noun off
4041 \color none
4042 pifont.sty
4043 \end_layout
4044
4045 \end_inset
4046 </cell>
4047 </row>
4048 </lyxtabular>
4049
4050 \end_inset
4051
4052
4053 \end_layout
4054
4055 \begin_layout Standard
4056 LyX doesn't stop you using bullets from packages you don't have.
4057  If you get errors from LaTeX when you try to view or print the file, then
4058  it is likely you are missing a package.
4059 \begin_inset Foot
4060 status collapsed
4061
4062 \begin_layout Plain Layout
4063 LyX doesn't restrict your use since you may be editing locally and exporting
4064  elsewhere.
4065 \end_layout
4066
4067 \end_inset
4068
4069
4070 \end_layout
4071
4072 \begin_layout Subsection
4073 How to use it
4074 \end_layout
4075
4076 \begin_layout Standard
4077 Select which bullet depth you want to change then select the bullet shape
4078  and size.
4079  Any changes will not be visible in LyX, but are visible when viewing the
4080  document.
4081 \end_layout
4082
4083 \begin_layout Standard
4084 You can reset a bullet shape to the default simply by clicking your right
4085  mouse button on the appropriate bullet depth button.
4086 \begin_inset Foot
4087 status collapsed
4088
4089 \begin_layout Plain Layout
4090 If you 
4091 \emph on
4092 really
4093 \emph default
4094  want to have multiple sets of paragraphs with different sets of bullets
4095  in each, then you're going to have to get your hands dirty with TeX code.
4096  The bullet selection dialog can help though because it provides you with
4097  the LaTeX code for a wide range of bullet shapes.
4098  To make your own custom paragraphs you have the following options:
4099 \end_layout
4100
4101 \begin_layout Plain Layout
4102 \begin_inset ERT
4103 status open
4104
4105 \begin_layout Plain Layout
4106
4107
4108 \backslash
4109 let
4110 \backslash
4111 savelabelitemi=
4112 \backslash
4113 labelitemi
4114 \end_layout
4115
4116 \end_inset
4117
4118
4119 \end_layout
4120
4121 \begin_layout Plain Layout
4122 \begin_inset ERT
4123 status open
4124
4125 \begin_layout Plain Layout
4126
4127
4128 \backslash
4129 renewcommand
4130 \backslash
4131 labelitemi[0]{
4132 \backslash
4133 small
4134 \backslash
4135 (
4136 \backslash
4137 sharp
4138 \backslash
4139 )}
4140 \end_layout
4141
4142 \end_inset
4143
4144
4145 \end_layout
4146
4147 \begin_layout Itemize
4148 Use the LaTeX command 
4149 \begin_inset Flex Code
4150 status collapsed
4151
4152 \begin_layout Plain Layout
4153
4154 \backslash
4155 renewcommand{}{}
4156 \end_layout
4157
4158 \end_inset
4159
4160  to specify a new bullet shape for a given depth.
4161  You'll also need to save the current bullet shape so you can restore it
4162  again afterwards.
4163  In this itemized list the following LaTeX code was used to change the bullet
4164  used for the first depth.
4165 \end_layout
4166
4167 \begin_deeper
4168 \begin_layout LyX-Code
4169
4170 \backslash
4171 let
4172 \backslash
4173 savelabelitemi=
4174 \backslash
4175 labelitemi 
4176 \end_layout
4177
4178 \begin_layout LyX-Code
4179
4180 \backslash
4181 renewcommand
4182 \backslash
4183 labelitemi[0]{
4184 \backslash
4185 small
4186 \backslash
4187 (
4188 \backslash
4189 sharp
4190 \backslash
4191 )}
4192 \end_layout
4193
4194 \end_deeper
4195 \begin_layout Itemize
4196 Note that the itemize depth is specified in Roman numerals as part of the
4197  
4198 \family typewriter
4199
4200 \backslash
4201 labelitem
4202 \family default
4203  command.
4204 \end_layout
4205
4206 \begin_layout Itemize
4207 \begin_inset ERT
4208 status open
4209
4210 \begin_layout Plain Layout
4211
4212 [
4213 \backslash
4214 (
4215 \backslash
4216 star
4217 \backslash
4218 )]
4219 \end_layout
4220
4221 \end_inset
4222
4223  Specify each individual entry by starting each item with the bullet shape
4224  enclosed in square brackets and set as 
4225 \begin_inset Flex MenuItem
4226 status collapsed
4227
4228 \begin_layout Plain Layout
4229 TeX Code
4230 \end_layout
4231
4232 \end_inset
4233
4234 .
4235  For example, this item was started with 
4236 \begin_inset Flex Code
4237 status collapsed
4238
4239 \begin_layout Plain Layout
4240 [
4241 \backslash
4242 (
4243 \backslash
4244 star
4245 \backslash
4246 )]
4247 \end_layout
4248
4249 \end_inset
4250
4251 .
4252 \end_layout
4253
4254 \begin_layout Plain Layout
4255 \begin_inset ERT
4256 status open
4257
4258 \begin_layout Plain Layout
4259
4260
4261 \backslash
4262 renewcommand
4263 \backslash
4264 labelitemi[0]{
4265 \backslash
4266 savelabelitemi}
4267 \end_layout
4268
4269 \end_inset
4270
4271
4272 \end_layout
4273
4274 \begin_layout Plain Layout
4275 You'll also need to revert the labelitem back to its previous setting for
4276  the global bullet shape settings to remain in effect.
4277  The way used here was:
4278 \end_layout
4279
4280 \begin_layout LyX-Code
4281
4282 \backslash
4283 renewcommand
4284 \backslash
4285 labelitemi[0]{
4286 \backslash
4287 savelabelitemi}
4288 \end_layout
4289
4290 \end_inset
4291
4292
4293 \end_layout
4294
4295 \begin_layout Chapter
4296 LyX and the World Wide Web
4297 \end_layout
4298
4299 \begin_layout Standard
4300 LyX has long supported the export of documents to various web-friendly formats,
4301  such as HTML.
4302  Before verson 2.0, however, HTML export was always accomplished by the use
4303  of external converters.
4304 \begin_inset Foot
4305 status collapsed
4306
4307 \begin_layout Plain Layout
4308 For details on the use of external converters with LyX, see the 
4309 \emph on
4310 Converters
4311 \emph default
4312  section of the Customization manual.
4313 \end_layout
4314
4315 \end_inset
4316
4317  These fall into two large groups: there are converters that use LaTeX as
4318  an intermediate format, such as 
4319 \begin_inset Flex Code
4320 status collapsed
4321
4322 \begin_layout Plain Layout
4323 htlatex
4324 \end_layout
4325
4326 \end_inset
4327
4328
4329 \begin_inset Flex Code
4330 status collapsed
4331
4332 \begin_layout Plain Layout
4333 html2latex
4334 \end_layout
4335
4336 \end_inset
4337
4338 , and 
4339 \begin_inset Flex Code
4340 status collapsed
4341
4342 \begin_layout Plain Layout
4343 plastex
4344 \end_layout
4345
4346 \end_inset
4347
4348 , relying upon LyX to produce the LaTeX; and there is a converter that works
4349  directly on LyX files, 
4350 \begin_inset Flex Code
4351 status collapsed
4352
4353 \begin_layout Plain Layout
4354 eLyXer
4355 \end_layout
4356
4357 \end_inset
4358
4359 .
4360  All of these have different advantages and disadvantages.
4361  
4362 \end_layout
4363
4364 \begin_layout Standard
4365 The LaTeX-based converters have the advantage that, in principle, they know
4366  everything about the exported document that LaTeX does.
4367  Such converters do not care, for example, if a certain block of code was
4368  produced by LyX or was Evil Red Text.
4369  These converters know about 
4370 \begin_inset Flex Code
4371 status collapsed
4372
4373 \begin_layout Plain Layout
4374 aux
4375 \end_layout
4376
4377 \end_inset
4378
4379  files, counters, and references, and can often make use of the 
4380 \begin_inset Flex Code
4381 status collapsed
4382
4383 \begin_layout Plain Layout
4384 bbl
4385 \end_layout
4386
4387 \end_inset
4388
4389  files generated by BibTeX.
4390  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4391  said that only TeX itself understands TeX---and LaTeX-based converters
4392  will often choke on what seem to be quite simple constructs; complex ones
4393  can throw them completely, and as of this writing, for example, the 
4394 \emph on
4395 Embedded Objects
4396 \emph default
4397  manual will not export with 
4398 \begin_inset Flex Code
4399 status collapsed
4400
4401 \begin_layout Plain Layout
4402 htlatex
4403 \end_layout
4404
4405 \end_inset
4406
4407 , though the others will.
4408  The other issue concerns how math is handled.
4409  These converters typically convert the formulae into little pictures that
4410  are then linked from the HTML document.
4411  Since these are actually generated by LaTeX, they are accurate.
4412  But they do not scale well, and just getting them to look as if they are
4413  actually meant to be in your document---so that the font sizes seem to
4414  be roughly the same---can be a challenge.
4415 \end_layout
4416
4417 \begin_layout Standard
4418 Alex Fernandez's 
4419 \begin_inset Flex Code
4420 status collapsed
4421
4422 \begin_layout Plain Layout
4423 eLyXer
4424 \end_layout
4425
4426 \end_inset
4427
4428  (
4429 \begin_inset CommandInset href
4430 LatexCommand href
4431 name "http://elyxer.nongnu.org/"
4432 target "http://elyxer.nongnu.org/"
4433
4434 \end_inset
4435
4436 ) solves some of these problems.
4437  In particular, the formulae it produces scale perfectly, since it renders
4438  math using a combination of HTML and CSS rather than converting the formulae
4439  to images.
4440  But even moderately complex formula are rendered less well than with 
4441 \begin_inset Flex Code
4442 status collapsed
4443
4444 \begin_layout Plain Layout
4445 htlatex
4446 \end_layout
4447
4448 \end_inset
4449
4450 ; this reflects the limitations of HTML.
4451 \begin_inset Foot
4452 status collapsed
4453
4454 \begin_layout Plain Layout
4455 That said, 
4456 \begin_inset Flex Code
4457 status collapsed
4458
4459 \begin_layout Plain Layout
4460 eLyXer
4461 \end_layout
4462
4463 \end_inset
4464
4465  can also use jsMath and MathJax for equations, but this setting is only
4466  available globally and requires one to have access to a server that runs
4467  the backend.
4468 \end_layout
4469
4470 \end_inset
4471
4472  More importantly (as of version 1.1.1, at least), 
4473 \begin_inset Flex Code
4474 status collapsed
4475
4476 \begin_layout Plain Layout
4477 eLyXer
4478 \end_layout
4479
4480 \end_inset
4481
4482  has limited support for math macros and no support for user-defined paragraph
4483  or character styles.
4484  These limitations make 
4485 \begin_inset Flex Code
4486 status collapsed
4487
4488 \begin_layout Plain Layout
4489 eLyXer
4490 \end_layout
4491
4492 \end_inset
4493
4494  unsuitable for many of the documents LyX users produce.
4495  In principle, of course, these problems could be solved, but the LyX developers
4496  have decided to follow a different path and have made LyX itself capable
4497  of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4498  plaintext.
4499 \end_layout
4500
4501 \begin_layout Standard
4502 As of this writing, XHTML output remains under development and should probably
4503  be regarded as 
4504 \begin_inset Quotes eld
4505 \end_inset
4506
4507 experimental
4508 \begin_inset Quotes erd
4509 \end_inset
4510
4511 .
4512 \begin_inset Foot
4513 status collapsed
4514
4515 \begin_layout Plain Layout
4516 The file 
4517 \begin_inset Flex Code
4518 status collapsed
4519
4520 \begin_layout Plain Layout
4521 development/HTML.notes
4522 \end_layout
4523
4524 \end_inset
4525
4526 , which can be found in the LyX source tree or 
4527 \begin_inset CommandInset href
4528 LatexCommand href
4529 name "accessed online"
4530 target "http://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
4531
4532 \end_inset
4533
4534 , usually contains up-to-date information about the state of XHTML output.
4535  See also the list of XHTML bugs on 
4536 \begin_inset CommandInset href
4537 LatexCommand href
4538 name "the bug tracker"
4539 target "http://www.lyx.org/trac/query?status=reopened&status=assigned&status=new&max=0&component=xhtml+export&order=id&col=id&col=summary&col=reporter&col=keywords&keywords=%21%7Efixedintrunk&desc=1"
4540
4541 \end_inset
4542
4543 .
4544 \end_layout
4545
4546 \end_inset
4547
4548  Still, the developers have chosen this approach because it has several
4549  potential advantages over the other two.
4550 \end_layout
4551
4552 \begin_layout Standard
4553 These advantages are primarily due to the fact that the XHTML output routines,
4554  since they are part of LyX, know everything LyX knows about the document
4555  being exported.
4556 \begin_inset Foot
4557 status collapsed
4558
4559 \begin_layout Plain Layout
4560 Another advantage is that, since these routines are internal to LyX, they
4561  are immune to changes in LyX's file format, or to changes in the semantics
4562  of existing insets.
4563 \end_layout
4564
4565 \end_inset
4566
4567  So they know about the table of contents (as displayed in the outline),
4568  about the counters associated with different paragraph styles, and about
4569  user-defined styles.
4570  The XHTML output routines know what LyX knows about internationalization,
4571  too, so they will output 
4572 \begin_inset Quotes eld
4573 \end_inset
4574
4575 Chapter 1
4576 \begin_inset Quotes erd
4577 \end_inset
4578
4579  or 
4580 \begin_inset Quotes eld
4581 \end_inset
4582
4583
4584 \lang ngerman
4585 Kapitel
4586 \lang english
4587  1
4588 \begin_inset Quotes erd
4589 \end_inset
4590
4591 , depending upon the language in effect at the time.
4592  
4593 \end_layout
4594
4595 \begin_layout Standard
4596 Quite generally, the output routines know what LyX knows about document
4597  layout, that is, about how the document is to be rendered on screen.
4598  We use this information when we output the document as XHTML.
4599  In particular, LyX 
4600 \emph on
4601 automatically
4602 \emph default
4603  generates CSS style information corresponding to the layout information
4604  it uses to render the document on screen: if section headings are supposed
4605  to be sans-serif and bold as seen in LyX, then (by default) they will be
4606  sans-serif and bold when viewed in a web browser, too.
4607  And this is true not just for pre-defined styles, like Section, but for
4608  any style, including user-defined styles.
4609  Indeed, the XHTML output routines make no distinction between user-defined
4610  paragraph and character styles and LyX's own pre-defined styles: in each
4611  case, everything LyX knows about the styles is contained in the layout
4612  files.
4613  And much the same is true as regards pre-defined textual insets, such as
4614  footnotes, and various custom insets.
4615  
4616 \end_layout
4617
4618 \begin_layout Standard
4619 The result is that XHTML output can be customized and extended in exactly
4620  the same way LaTeX output can be customized and extended: through layout
4621  files and modules.
4622  See chapter five of the 
4623 \emph on
4624 Customization 
4625 \emph default
4626 manual for the details.
4627 \end_layout
4628
4629 \begin_layout Standard
4630 The remainder of this chapter contains more detailed information on XHTML
4631  output, its limitations, and ways to work around those limitations.
4632 \end_layout
4633
4634 \begin_layout Section
4635 Math Output in XHTML
4636 \end_layout
4637
4638 \begin_layout Standard
4639 LyX offers four choices for how math is rendered.
4640  These have various advantages and disadvantages:
4641 \end_layout
4642
4643 \begin_layout Itemize
4644 MathML
4645 \begin_inset Newline newline
4646 \end_inset
4647
4648 MathML is a dialect of XML designed specifically for mathematics on the
4649  web, and it typically renders very well in browsers that support it.
4650  The disadvantage is that not all browsers support MathML, and support is
4651  not complete even in the Gecko-based browsers, such as Firefox.
4652 \begin_inset Newline newline
4653 \end_inset
4654
4655 If LyX is unable to render a formula as MathML---for example, if the formula
4656  uses the 
4657 \begin_inset Flex Code
4658 status collapsed
4659
4660 \begin_layout Plain Layout
4661 xymatrix
4662 \end_layout
4663
4664 \end_inset
4665
4666  package or ERT---then it will instead output the formula as an image.
4667  
4668 \end_layout
4669
4670 \begin_layout Itemize
4671 HTML
4672 \begin_inset Newline newline
4673 \end_inset
4674
4675 As mentioned above, 
4676 \begin_inset Flex Code
4677 status collapsed
4678
4679 \begin_layout Plain Layout
4680 elyxer
4681 \end_layout
4682
4683 \end_inset
4684
4685  outputs math as HTML, styled by CSS.
4686 \begin_inset Foot
4687 status collapsed
4688
4689 \begin_layout Plain Layout
4690 LyX has borrowed some of the CSS for its HTML output from 
4691 \begin_inset Flex Code
4692 status collapsed
4693
4694 \begin_layout Plain Layout
4695 elyxer
4696 \end_layout
4697
4698 \end_inset
4699
4700 .
4701 \end_layout
4702
4703 \end_inset
4704
4705  For simple formulae, this can work quite well, though with more complicated
4706  formulae it tends to break down.
4707  Still, this method has the advantage that it is very widely supported and
4708  so it may be appropriate for documents that contain only a little, fairly
4709  simple math.
4710 \begin_inset Newline newline
4711 \end_inset
4712
4713 If Lyx is unable to render a formula as HTML---for example, if the formula
4714  uses the 
4715 \begin_inset Flex Code
4716 status collapsed
4717
4718 \begin_layout Plain Layout
4719 xymatrix
4720 \end_layout
4721
4722 \end_inset
4723
4724  package or ERT---then it will instead output the formula as an image.
4725  
4726 \end_layout
4727
4728 \begin_layout Itemize
4729 Images
4730 \begin_inset Newline newline
4731 \end_inset
4732
4733 Like 
4734 \begin_inset Flex Code
4735 status collapsed
4736
4737 \begin_layout Plain Layout
4738 htlatex
4739 \end_layout
4740
4741 \end_inset
4742
4743 , LyX will output formulae as images, the very same images, in fact, that
4744  are used for instant preview.
4745 \begin_inset Foot
4746 status collapsed
4747
4748 \begin_layout Plain Layout
4749 Instant preview does 
4750 \emph on
4751 not 
4752 \emph default
4753 have to be on for images to be output, however.
4754 \end_layout
4755
4756 \end_inset
4757
4758  The advantage to this method is that the images are simply generated by
4759  LaTeX, so they are very accurate.
4760  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4761  so they do not scale terribly well, and one cannot copy them, etc.
4762  (As of this writing, there are also problems about equation numbering.
4763  See 
4764 \begin_inset CommandInset href
4765 LatexCommand href
4766 name "bug 6894"
4767 target "http://www.lyx.org/trac/ticket/6894"
4768
4769 \end_inset
4770
4771 .)
4772 \begin_inset Newline newline
4773 \end_inset
4774
4775 The size of the images can be controlled by setting the 
4776 \begin_inset Quotes eld
4777 \end_inset
4778
4779 Math Images Scaling
4780 \begin_inset Quotes erd
4781 \end_inset
4782
4783  parameter under 
4784 \begin_inset Flex MenuItem
4785 status collapsed
4786
4787 \begin_layout Plain Layout
4788 Document\SpecialChar \menuseparator
4789 Settings\SpecialChar \menuseparator
4790 Output
4791 \end_layout
4792
4793 \end_inset
4794
4795 .
4796 \begin_inset Foot
4797 status collapsed
4798
4799 \begin_layout Plain Layout
4800 For those who want to know, this controls the resolution of the image in
4801  dots per inch and is based upon a default of 75 dpi.
4802 \end_layout
4803
4804 \end_inset
4805
4806
4807 \begin_inset Newline newline
4808 \end_inset
4809
4810 If LyX for some reason fails to create an image for a formula (e.g., if a
4811  required LaTeX package is not installed), then it will fall back to outputing
4812  the raw LaTeX.
4813 \end_layout
4814
4815 \begin_layout Itemize
4816 LaTeX
4817 \begin_inset Newline newline
4818 \end_inset
4819
4820 Finally, LyX will happily output math as LaTeX.
4821  As well as being the output of last resort, this method can be used with
4822  such tools as 
4823 \begin_inset CommandInset href
4824 LatexCommand href
4825 name "jsMath"
4826 target "http://www.math.union.edu/~dpvc/jsMath/"
4827
4828 \end_inset
4829
4830 , which uses JavaScript to render LaTeX embedded in HTML documents.
4831  LyX wraps the LaTeX in either a 
4832 \begin_inset Flex Code
4833 status collapsed
4834
4835 \begin_layout Plain Layout
4836 span
4837 \end_layout
4838
4839 \end_inset
4840
4841  (for inline formulas) or 
4842 \begin_inset Flex Code
4843 status collapsed
4844
4845 \begin_layout Plain Layout
4846 div
4847 \end_layout
4848
4849 \end_inset
4850
4851  (for displayed formulas) with 
4852 \begin_inset Flex Code
4853 status collapsed
4854
4855 \begin_layout Plain Layout
4856 class='math'
4857 \end_layout
4858
4859 \end_inset
4860
4861 , as is required for jsMath.
4862 \end_layout
4863
4864 \begin_layout Standard
4865 One of these output methods must be selected under 
4866 \begin_inset Flex MenuItem
4867 status collapsed
4868
4869 \begin_layout Plain Layout
4870 Document\SpecialChar \menuseparator
4871 Settings\SpecialChar \menuseparator
4872 Output
4873 \end_layout
4874
4875 \end_inset
4876
4877 .
4878  By default, LyX outputs MathML.
4879  This is a document-wide setting, therefore.
4880 \end_layout
4881
4882 \begin_layout Standard
4883 Eventually, LyX will offer the user the option to select an alternate output
4884  method for a particular inset, say, one that isn't being rendered very
4885  well by MathML.
4886 \begin_inset Foot
4887 status collapsed
4888
4889 \begin_layout Plain Layout
4890 That said, since LyX falls back to images if the inset contains ERT, then
4891  one can force output as an image by putting some harmless ERT into the
4892  math, for example: 
4893 \begin_inset Formula $a=b\relax$
4894 \end_inset
4895
4896 .
4897 \end_layout
4898
4899 \end_inset
4900
4901
4902 \end_layout
4903
4904 \begin_layout Section
4905 Bibliography and Citations
4906 \end_layout
4907
4908 \begin_layout Standard
4909 XHTML output fully supports bibliographies and citations.
4910  
4911 \end_layout
4912
4913 \begin_layout Standard
4914 Citation labels are generated by the same machinery that generates LyX's
4915  on-screen labels, so the labels will look in the output much as they do
4916  in LyX, though better.
4917  If you are using numerical citations, then LyX will output numerical labels,
4918  such as [1] or [17], rather than simply showing the citation key in square
4919  brackets, as it does on-screen.
4920  If you are using author-year citations, then LyX will add lowercase letters
4921  to the years, just as BibTeX does, if it finds more than one citation for
4922  a given author-year combination.
4923  The labels will be printed with the bibliography entries.
4924  Note that there is, at present, no way to customize the appearance of the
4925  labels, for example, to choose between square brackets and parentheses.
4926 \end_layout
4927
4928 \begin_layout Standard
4929 Bibliography output is handled by the same machinery that handles the presentati
4930 on of reference information in the citation dialog, so you will see in the
4931  XHTML output pretty much what you would see if you were to look at a given
4932  entry in the citation dialog.
4933  The formatting can be customized in your layout file or, preferably, in
4934  a module.
4935  See the 
4936 \emph on
4937 Customization
4938 \emph default
4939  manual for the details.
4940 \end_layout
4941
4942 \begin_layout Standard
4943 The main defect at present is that cross-referenced information is printed
4944  with every entry with which it is associated.
4945  So you can see things like this:
4946 \end_layout
4947
4948 \begin_layout Quote
4949 Jason Stanley, 
4950 \begin_inset Quotes eld
4951 \end_inset
4952
4953 Context and Logical Form
4954 \begin_inset Quotes erd
4955 \end_inset
4956
4957 , in 
4958 \emph on
4959 Language in Context: Selected Essays
4960 \emph default
4961  (Oxford: Oxford University Press, 2007), pp.
4962  30--68.
4963 \end_layout
4964
4965 \begin_layout Quote
4966 Jason Stanley, 
4967 \begin_inset Quotes eld
4968 \end_inset
4969
4970 Semantics in Context
4971 \begin_inset Quotes erd
4972 \end_inset
4973
4974 , in 
4975 \emph on
4976 Language in Context: Selected Essays
4977 \emph default
4978  (Oxford: Oxford University Press, 2007), pp.
4979  201--30.
4980 \end_layout
4981
4982 \begin_layout Standard
4983 This should be fixed before long.
4984 \end_layout
4985
4986 \begin_layout Standard
4987 There is no support at present for sectioned bibliographies.
4988  If you have multiple bibliographies, then LyX will print the same bibliography
4989  over and over.
4990 \end_layout
4991
4992 \begin_layout Section
4993 Indexes
4994 \end_layout
4995
4996 \begin_layout Standard
4997 LyX will happily export indexes as XHTML, but with certain limitations at
4998  the moment.
4999 \end_layout
5000
5001 \begin_layout Standard
5002 Index export will be most reliable when you do not attempt to use the fancy
5003  constructs that are described in the section on indexes in the 
5004 \emph on
5005 User's Guide
5006 \emph default
5007 .
5008 \begin_inset Foot
5009 status collapsed
5010
5011 \begin_layout Plain Layout
5012 The main issue here is that LyX itself does not really handle these.
5013  It just lets you enter what you would have to enter in raw LaTeX.
5014 \end_layout
5015
5016 \end_inset
5017
5018  We'll describe how they are handled using the subsection headings from
5019  that section.
5020 \end_layout
5021
5022 \begin_layout Itemize
5023 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5024  these, but the entries must be separated by 
5025 \begin_inset Quotes eld
5026 \end_inset
5027
5028  ! 
5029 \begin_inset Quotes erd
5030 \end_inset
5031
5032 , that is, there must be spaces around the exclamation point.
5033  This is because it is otherwise too difficult to check for escaped exclamation
5034  points, ones in math, and so forth.
5035 \end_layout
5036
5037 \begin_layout Itemize
5038 Page Ranges: There is no support at all for page ranges, since these make
5039  no sense with XHMTL.
5040  Instead, you will just get two index entries, one at either end.
5041 \end_layout
5042
5043 \begin_layout Itemize
5044 Cross-referencing: There is no support for cross-referencing.
5045  If LyX finds an entry containing the 
5046 \begin_inset Quotes eld
5047 \end_inset
5048
5049 |see\SpecialChar \ldots{}
5050
5051 \begin_inset Quotes erd
5052 \end_inset
5053
5054  construct, it is just dropped, and the rest is treated as an ordinary index
5055  entry.
5056 \end_layout
5057
5058 \begin_layout Itemize
5059 Index Entry Order: LyX does support attempts to fix the sorting order.
5060  It will take what is before the first `@' it finds and use that for sorting,
5061  taking what follows the first `@' to be the actual entry.
5062  At present, LyX does not check for escaped `@', so do not try to index
5063  email addresses.
5064 \end_layout
5065
5066 \begin_layout Itemize
5067 Index Entry Layout: You can format entries by using the text style dialog,
5068  or by using any other method available within LyX itself.
5069  There is no support for constructs like: 
5070 \begin_inset Quotes eld
5071 \end_inset
5072
5073 entry|textbf
5074 \begin_inset Quotes erd
5075 \end_inset
5076
5077 .
5078  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5079  and everything that follows it.
5080 \end_layout
5081
5082 \begin_layout Itemize
5083 Multiple Indexes: There is no support for multiple indexes.
5084  Rather, all index entries will be printed as one large index.
5085  To avoid our printing several versions of the index, we print only the
5086  main index, so make sure you have one.
5087 \end_layout
5088
5089 \begin_layout Section
5090 Nomenclature and Glossary
5091 \end_layout
5092
5093 \begin_layout Standard
5094 There is at present no support for glossaries.
5095  Adding it would be fairly trivial, and welcome.
5096 \end_layout
5097
5098 \begin_layout Chapter
5099 The LyX Server
5100 \end_layout
5101
5102 \begin_layout Section
5103 Introduction
5104 \end_layout
5105
5106 \begin_layout Standard
5107 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5108  and retrieve information about the LyX internal state.
5109  This is only intended for advanced users, but they should find it useful.
5110  It is by writing to the LyX server, for example, that bibliography managers,
5111  such as JabRef, are able to 
5112 \begin_inset Quotes eld
5113 \end_inset
5114
5115 push
5116 \begin_inset Quotes erd
5117 \end_inset
5118
5119  citations to LyX.
5120 \end_layout
5121
5122 \begin_layout Section
5123 Starting the LyX Server
5124 \end_layout
5125
5126 \begin_layout Standard
5127 The LyX server works through the use of a pair of named pipes.
5128  These are usually located in 
5129 \begin_inset Flex Code
5130 status collapsed
5131
5132 \begin_layout Plain Layout
5133 UserDir
5134 \end_layout
5135
5136 \end_inset
5137
5138 , (except on Windows, where 
5139 \emph on
5140 local
5141 \emph default
5142  named pipes are special objects located in 
5143 \begin_inset Flex Code
5144 status collapsed
5145
5146 \begin_layout Plain Layout
5147
5148 \backslash
5149
5150 \backslash
5151 .
5152 \backslash
5153 pipe
5154 \end_layout
5155
5156 \end_inset
5157
5158 ) and have the names 
5159 \begin_inset Quotes eld
5160 \end_inset
5161
5162
5163 \begin_inset Flex Code
5164 status collapsed
5165
5166 \begin_layout Plain Layout
5167 lyxpipe.in
5168 \end_layout
5169
5170 \end_inset
5171
5172
5173 \begin_inset Quotes erd
5174 \end_inset
5175
5176  and 
5177 \begin_inset Quotes eld
5178 \end_inset
5179
5180
5181 \begin_inset Flex Code
5182 status collapsed
5183
5184 \begin_layout Plain Layout
5185 lyxpipe.out
5186 \end_layout
5187
5188 \end_inset
5189
5190
5191 \begin_inset Quotes erd
5192 \end_inset
5193
5194 .
5195  External programs write into 
5196 \begin_inset Flex Code
5197 status collapsed
5198
5199 \begin_layout Plain Layout
5200 lyxpipe.in
5201 \end_layout
5202
5203 \end_inset
5204
5205  and read back data from 
5206 \begin_inset Flex Code
5207 status collapsed
5208
5209 \begin_layout Plain Layout
5210 lyxpipe.out
5211 \end_layout
5212
5213 \end_inset
5214
5215 .
5216  The stem of the pipe names can be defined in the 
5217 \begin_inset Flex MenuItem
5218 status collapsed
5219
5220 \begin_layout Plain Layout
5221 Tools\SpecialChar \menuseparator
5222 Preferences
5223 \end_layout
5224
5225 \end_inset
5226
5227  dialog, for example 
5228 \begin_inset Flex Code
5229 status collapsed
5230
5231 \begin_layout Plain Layout
5232 "/home/myhome/lyxpipe"
5233 \end_layout
5234
5235 \end_inset
5236
5237 , or 
5238 \begin_inset Flex Code
5239 status collapsed
5240
5241 \begin_layout Plain Layout
5242 "
5243 \backslash
5244
5245 \backslash
5246 .
5247 \backslash
5248 pipe
5249 \backslash
5250 lyxpipe"
5251 \end_layout
5252
5253 \end_inset
5254
5255  on Windows (but any working path can be used).
5256  You 
5257 \emph on
5258 must
5259 \emph default
5260  configure this manually in order for the server to start.
5261 \end_layout
5262
5263 \begin_layout Standard
5264 LyX will add the '
5265 \begin_inset Flex Code
5266 status collapsed
5267
5268 \begin_layout Plain Layout
5269 .in
5270 \end_layout
5271
5272 \end_inset
5273
5274 ' and '
5275 \begin_inset Flex Code
5276 status collapsed
5277
5278 \begin_layout Plain Layout
5279 .out
5280 \end_layout
5281
5282 \end_inset
5283
5284 ' to create the pipes.
5285  If one of the pipes already exists, LyX will assume that another LyX process
5286  is already running and will not start the server.
5287  On POSIX (Unix like) systems, if for some other reason, an unused 
5288 \begin_inset Quotes eld
5289 \end_inset
5290
5291 stale
5292 \begin_inset Quotes erd
5293 \end_inset
5294
5295  pipe is left in existence when LyX closes, then LyX will try to delete
5296  it.
5297  If this fails for some reason, you will need to delete the pipes manually
5298  and then restart LyX.
5299  On Windows, pipes are deleted by the OS on program termination or crash,
5300  so 
5301 \begin_inset Quotes eld
5302 \end_inset
5303
5304 stale
5305 \begin_inset Quotes erd
5306 \end_inset
5307
5308  pipes should not be possible.
5309 \end_layout
5310
5311 \begin_layout Standard
5312 To have several LyX processes with servers at the same time, you have to
5313  use different configurations, perhaps by using separate user directories,
5314  each with its own 
5315 \begin_inset Flex Code
5316 status collapsed
5317
5318 \begin_layout Plain Layout
5319 preferences
5320 \end_layout
5321
5322 \end_inset
5323
5324  file, for each process.
5325 \end_layout
5326
5327 \begin_layout Standard
5328 If you are developing a client program, you might find it useful to enable
5329  debugging information from the LyX server.
5330  Do this by starting LyX as 
5331 \begin_inset Flex Code
5332 status collapsed
5333
5334 \begin_layout Plain Layout
5335 lyx -dbg lyxserver
5336 \end_layout
5337
5338 \end_inset
5339
5340 .
5341 \end_layout
5342
5343 \begin_layout Standard
5344 You can find a complete example client written in C in the source distribution
5345  as 
5346 \begin_inset Flex Code
5347 status collapsed
5348
5349 \begin_layout Plain Layout
5350 development/lyxserver/server_monitor.c
5351 \end_layout
5352
5353 \end_inset
5354
5355 .
5356 \end_layout
5357
5358 \begin_layout Standard
5359 Another useful tool is the command-line based clientfound in 
5360 \begin_inset Flex Code
5361 status collapsed
5362
5363 \begin_layout Plain Layout
5364 src/client/lyxclient
5365 \end_layout
5366
5367 \end_inset
5368
5369 .
5370 \end_layout
5371
5372 \begin_layout Section
5373 Normal communication
5374 \end_layout
5375
5376 \begin_layout Standard
5377 To issue a LyX call, the client writes a line of ASCII text into the input
5378  pipe.
5379  This line has the following format:
5380 \end_layout
5381
5382 \begin_layout Quote
5383 LYXCMD:
5384 \emph on
5385 clientname
5386 \emph default
5387 :
5388 \emph on
5389 function
5390 \emph default
5391 :
5392 \emph on
5393 argument
5394 \end_layout
5395
5396 \begin_layout Description
5397 clientname is a name that the client can choose arbitrarily.
5398  Its only use is that LyX will echo it if it sends an answer—so a client
5399  can dispatch results from different requesters.
5400 \end_layout
5401
5402 \begin_layout Description
5403 function is the function you want LyX to perform.
5404  It is the same as the commands you'd use in the minibuffer.
5405 \end_layout
5406
5407 \begin_layout Description
5408 argument is an optional argument which is meaningful only to some functions
5409  (for instance, the 
5410 \begin_inset Quotes eld
5411 \end_inset
5412
5413 self-insert
5414 \begin_inset Quotes erd
5415 \end_inset
5416
5417  LFUN will insert the argument as text at the cursor position).
5418 \end_layout
5419
5420 \begin_layout Standard
5421 The answer from LyX will arrive in the output pipe and be of the form
5422 \end_layout
5423
5424 \begin_layout Quote
5425 INFO:
5426 \emph on
5427 clientname
5428 \emph default
5429 :
5430 \emph on
5431 function
5432 \emph default
5433 :
5434 \emph on
5435 data
5436 \end_layout
5437
5438 \begin_layout Standard
5439 where 
5440 \emph on
5441 clientname
5442 \emph default
5443  and 
5444 \emph on
5445 function
5446 \emph default
5447  are just echoed from the command request, while 
5448 \emph on
5449 data
5450 \emph default
5451  is more or less useful information filled according to how the command
5452  execution worked out.
5453  Some commands, such as 
5454 \begin_inset Quotes eld
5455 \end_inset
5456
5457 font-state
5458 \begin_inset Quotes erd
5459 \end_inset
5460
5461 , will return information about the internal state of LyX, while other will
5462  return an empty data-response.
5463  This means that the command execution went fine.
5464 \end_layout
5465
5466 \begin_layout Standard
5467 In case of errors, the response from LyX will have this form
5468 \end_layout
5469
5470 \begin_layout Quote
5471 ERROR:
5472 \emph on
5473 clientname
5474 \emph default
5475 :
5476 \emph on
5477 function
5478 \emph default
5479 :
5480 \emph on
5481 error message
5482 \end_layout
5483
5484 \begin_layout Standard
5485 where the 
5486 \emph on
5487 error message
5488 \emph default
5489  should contain an explanation of why the command failed.
5490 \end_layout
5491
5492 \begin_layout Standard
5493 Examples:
5494 \end_layout
5495
5496 \begin_layout LyX-Code
5497 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5498 \begin_inset Newline newline
5499 \end_inset
5500
5501 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5502 \begin_inset Newline newline
5503 \end_inset
5504
5505 read a <~/.lyxpipe.out
5506 \begin_inset Newline newline
5507 \end_inset
5508
5509 echo $a
5510 \end_layout
5511
5512 \begin_layout Section
5513 Notification
5514 \end_layout
5515
5516 \begin_layout Standard
5517 LyX can notify clients of events going on asynchronously.
5518  Currently it will only do this if the user binds a key sequence with the
5519  function 
5520 \begin_inset Quotes eld
5521 \end_inset
5522
5523 notify
5524 \begin_inset Quotes erd
5525 \end_inset
5526
5527 .
5528  The format of the string LyX sends is as follows:
5529 \end_layout
5530
5531 \begin_layout Quote
5532 \begin_inset Flex Code
5533 status collapsed
5534
5535 \begin_layout Plain Layout
5536 NOTIFY:
5537 \end_layout
5538
5539 \end_inset
5540
5541
5542 \emph on
5543 key-sequence
5544 \end_layout
5545
5546 \begin_layout Standard
5547 where 
5548 \emph on
5549 key-sequence
5550 \emph default
5551  is the printed representation of the key sequence that was actually typed
5552  by the user.
5553 \end_layout
5554
5555 \begin_layout Standard
5556 This mechanism can be used to extend LyX's command set and implement macros.
5557  Bind some key sequence to 
5558 \begin_inset Quotes eld
5559 \end_inset
5560
5561 notify
5562 \begin_inset Quotes erd
5563 \end_inset
5564
5565 .
5566  Then start a client that listens on the output pipe, dispatches the command
5567  according to the sequence, and starts a function that may use LyX calls
5568  and LyX requests to issue a command or a series of commands to LyX.
5569 \end_layout
5570
5571 \begin_layout Section
5572 The simple LyX Server Protocol
5573 \end_layout
5574
5575 \begin_layout Standard
5576 LyX implements a simple protocol that can be used for session management.
5577  All messages are of the form
5578 \end_layout
5579
5580 \begin_layout Quote
5581 LYXSRV:
5582 \emph on
5583 clientname
5584 \emph default
5585 :
5586 \emph on
5587 protocol message
5588 \end_layout
5589
5590 \begin_layout Standard
5591 where 
5592 \emph on
5593 protocol message
5594 \emph default
5595  can be 
5596 \begin_inset Quotes eld
5597 \end_inset
5598
5599 hello
5600 \begin_inset Quotes erd
5601 \end_inset
5602
5603  or 
5604 \begin_inset Quotes eld
5605 \end_inset
5606
5607 bye
5608 \begin_inset Quotes erd
5609 \end_inset
5610
5611 .
5612  If 
5613 \begin_inset Quotes eld
5614 \end_inset
5615
5616 hello
5617 \begin_inset Quotes erd
5618 \end_inset
5619
5620  is received from a client, LyX will report back to inform the client that
5621  it's listening to it's messages, while 
5622 \begin_inset Quotes eld
5623 \end_inset
5624
5625 bye
5626 \begin_inset Quotes erd
5627 \end_inset
5628
5629  sent from LyX will inform clients that LyX is closing.
5630 \end_layout
5631
5632 \begin_layout Section
5633 Reverse DVI/PDF search
5634 \end_layout
5635
5636 \begin_layout Standard
5637 Some DVI/PDF viewers
5638 \begin_inset Foot
5639 status collapsed
5640
5641 \begin_layout Plain Layout
5642 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5643  Skim on Mac OSX and SumatraPDF on Windows.
5644 \end_layout
5645
5646 \end_inset
5647
5648  provide 
5649 \emph on
5650 reverse search
5651 \emph default
5652  facility (also called 
5653 \emph on
5654 inverse search
5655 \emph default
5656 ).
5657  This means that you can tell LyX to put the cursor to a specific line in
5658  the document by clicking at the respective position in the DVI/PDF output.
5659  To achieve this, the viewer must be able to communicate with LyX.
5660  This is done via the LyX server either by using the named pipe (
5661 \emph on
5662 lyxpipe
5663 \emph default
5664 ), or the UNIX domain socket (
5665 \emph on
5666 lyxsocket
5667 \emph default
5668 ) that LyX creates in its temporary directory (this is the way the 
5669 \begin_inset Flex Code
5670 status collapsed
5671
5672 \begin_layout Plain Layout
5673 lyxclient
5674 \end_layout
5675
5676 \end_inset
5677
5678  program communicates with LyX).
5679  In some cases, you need a helper script that mediates between the viewer
5680  and LyX, in others, the viewer can communicate with LyX directly.
5681  This depends on the selected viewer and on your operating system.
5682  The same applies to the way viewers need to be configured and the way the
5683  reverse search is actually performed.
5684  In what follows, we will thus describe how to setup reverse search for
5685  specific viewers.
5686  Before we turn to this, though, we will explain what needs to be done generally
5687  to enable reverse search in the DVI/PDF output.
5688 \end_layout
5689
5690 \begin_layout Subsection
5691 Automatic setup
5692 \begin_inset CommandInset label
5693 LatexCommand label
5694 name "sub:rev-search"
5695
5696 \end_inset
5697
5698
5699 \end_layout
5700
5701 \begin_layout Standard
5702 In most cases LyX will do the work for you by enabling the option 
5703 \begin_inset Flex MenuItem
5704 status collapsed
5705
5706 \begin_layout Plain Layout
5707 Synchronize with Output
5708 \end_layout
5709
5710 \end_inset
5711
5712  in the menu 
5713 \begin_inset Flex MenuItem
5714 status collapsed
5715
5716 \begin_layout Plain Layout
5717 Document\SpecialChar \menuseparator
5718 Settings\SpecialChar \menuseparator
5719 Output
5720 \end_layout
5721
5722 \end_inset
5723
5724 .
5725  In such a case LyX will automatically insert the necessary SyncTeX macro
5726  (for PDF) or load the srcltx package (for DVI) respectively.
5727  This option can be easily reached also on 
5728 \begin_inset Flex Code
5729 status collapsed
5730
5731 \begin_layout Plain Layout
5732 View/Update
5733 \end_layout
5734
5735 \end_inset
5736
5737  Toolbar.
5738 \end_layout
5739
5740 \begin_layout Standard
5741 If you need a different setting, you can select or input a custom macro
5742  from the drop down box just below 
5743 \begin_inset Flex MenuItem
5744 status collapsed
5745
5746 \begin_layout Plain Layout
5747 Document\SpecialChar \menuseparator
5748 Settings\SpecialChar \menuseparator
5749 Output\SpecialChar \menuseparator
5750 Synchronize with Output
5751 \end_layout
5752
5753 \end_inset
5754
5755 .
5756 \end_layout
5757
5758 \begin_layout Standard
5759 Note that the method 
5760 \begin_inset Flex Code
5761 status collapsed
5762
5763 \begin_layout Plain Layout
5764
5765 \backslash
5766 synctex=1
5767 \end_layout
5768
5769 \end_inset
5770
5771  enables gzip compression.
5772  If your viewer does not support it, you should instead use 
5773 \begin_inset Flex Code
5774 status collapsed
5775
5776 \begin_layout Plain Layout
5777
5778 \backslash
5779 synctex=-1
5780 \end_layout
5781
5782 \end_inset
5783
5784 .
5785 \end_layout
5786
5787 \begin_layout Standard
5788 Please aöso note that including the 
5789 \begin_inset Flex Code
5790 status collapsed
5791
5792 \begin_layout Plain Layout
5793 srcltx
5794 \end_layout
5795
5796 \end_inset
5797
5798  package or 
5799 \begin_inset Flex Code
5800 status collapsed
5801
5802 \begin_layout Plain Layout
5803 src-specials
5804 \end_layout
5805
5806 \end_inset
5807
5808  sometimes has an undesired impact on the typesetting.
5809  Thus, you should switch output synchronization off for the final typesetting
5810  if you use the 
5811 \begin_inset Flex Code
5812 status collapsed
5813
5814 \begin_layout Plain Layout
5815 srcltx
5816 \end_layout
5817
5818 \end_inset
5819
5820  package or 
5821 \begin_inset Flex Code
5822 status collapsed
5823
5824 \begin_layout Plain Layout
5825 src-specials
5826 \end_layout
5827
5828 \end_inset
5829
5830 .
5831  
5832 \end_layout
5833
5834 \begin_layout Standard
5835 In case you need some more special settings that are not covered by the
5836  automatic settings, read the next section about how to set up output synchroniz
5837 ation manually.
5838  If the automatic setup suits your needs, you can readily jump to section
5839 \begin_inset space ~
5840 \end_inset
5841
5842
5843 \begin_inset CommandInset ref
5844 LatexCommand ref
5845 reference "sub:configuring-viewers"
5846
5847 \end_inset
5848
5849 , where the necessary configuration steps in your viewer -- needed both
5850  with the automatic and the manual setup -- are described.
5851 \end_layout
5852
5853 \begin_layout Subsection
5854 Manual setup
5855 \end_layout
5856
5857 \begin_layout Standard
5858 LaTeX provides several different methods for reverse search.
5859  Some are built-in in the 
5860 \begin_inset Flex Code
5861 status collapsed
5862
5863 \begin_layout Plain Layout
5864 latex/pdflatex
5865 \end_layout
5866
5867 \end_inset
5868
5869  program, some are provided by external packages.
5870  Your choice depends on whether your LaTeX distribution already provides
5871  a given method (the built-in methods are rather new) and whether your viewer
5872  can cope with it.
5873  The available methods are described in the following.
5874 \end_layout
5875
5876 \begin_layout Subsubsection*
5877 Built-in DVI-search via src-specials (DVI only) 
5878 \end_layout
5879
5880 \begin_layout Standard
5881 This method provides the DVI file with the necessary information for reverse
5882  search.
5883  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5884  distribution should include it), and it works reliably.
5885  To enable it, change the 
5886 \begin_inset Flex MenuItem
5887 status collapsed
5888
5889 \begin_layout Plain Layout
5890 LaT
5891 \begin_inset ERT
5892 status collapsed
5893
5894 \begin_layout Plain Layout
5895
5896 {}
5897 \end_layout
5898
5899 \end_inset
5900
5901 eX (plain)->DVI
5902 \end_layout
5903
5904 \end_inset
5905
5906  or 
5907 \begin_inset Flex MenuItem
5908 status collapsed
5909
5910 \begin_layout Plain Layout
5911 LaT
5912 \begin_inset ERT
5913 status collapsed
5914
5915 \begin_layout Plain Layout
5916
5917 {}
5918 \end_layout
5919
5920 \end_inset
5921
5922 eX (plain)->DraftDVI
5923 \end_layout
5924
5925 \end_inset
5926
5927  converter in 
5928 \begin_inset Flex MenuItem
5929 status collapsed
5930
5931 \begin_layout Plain Layout
5932 Preferences\SpecialChar \menuseparator
5933 File Handling\SpecialChar \menuseparator
5934 Converters
5935 \end_layout
5936
5937 \end_inset
5938
5939  to 
5940 \begin_inset Flex Code
5941 status collapsed
5942
5943 \begin_layout Plain Layout
5944 latex -src-specials $$i
5945 \end_layout
5946
5947 \end_inset
5948
5949 .
5950  If this doesn't work, check if your TeX engine needs different options
5951  (the syntax might differ in some distributions).
5952 \end_layout
5953
5954 \begin_layout Subsubsection*
5955 External Packages (PDFSync and scrltx) 
5956 \end_layout
5957
5958 \begin_layout Standard
5959 The packages 
5960 \emph on
5961 pdfsync
5962 \emph default
5963  and 
5964 \emph on
5965 scrltx
5966 \emph default
5967  provide reverse search facility for PDF output (via pdflatex) and DVI output,
5968  respectively.
5969  In order to enable it, load the packages in the LyX preamble: 
5970 \end_layout
5971
5972 \begin_layout Itemize
5973 \begin_inset Flex Code
5974 status collapsed
5975
5976 \begin_layout Plain Layout
5977
5978 \backslash
5979 usepackage{pdfsync}
5980 \end_layout
5981
5982 \end_inset
5983
5984  for reverse PDF search,
5985 \end_layout
5986
5987 \begin_layout Itemize
5988 \begin_inset Flex Code
5989 status collapsed
5990
5991 \begin_layout Plain Layout
5992
5993 \backslash
5994 usepackage[active]{srcltx}
5995 \end_layout
5996
5997 \end_inset
5998
5999  for reverse DVI search.
6000 \end_layout
6001
6002 \begin_layout Standard
6003 If you want to be able to perform both DVI and PDF reverse searches, you
6004  can also insert in the preamble the following lines
6005 \end_layout
6006
6007 \begin_layout LyX-Code
6008
6009 \backslash
6010 usepackage{ifpdf}
6011 \begin_inset Newline newline
6012 \end_inset
6013
6014
6015 \backslash
6016 ifpdf
6017 \begin_inset Newline newline
6018 \end_inset
6019
6020   
6021 \backslash
6022 usepackage{pdfsync}
6023 \begin_inset Newline newline
6024 \end_inset
6025
6026
6027 \backslash
6028 else
6029 \begin_inset Newline newline
6030 \end_inset
6031
6032   
6033 \backslash
6034 usepackage[active]{srcltx}
6035 \begin_inset Newline newline
6036 \end_inset
6037
6038
6039 \backslash
6040 fi
6041 \end_layout
6042
6043 \begin_layout Standard
6044 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6045  right package will be used.
6046 \end_layout
6047
6048 \begin_layout Standard
6049 Note that PDFSync might affect the output layout of your document.
6050  It is therefore advised to disable PDFsync for final documents.
6051 \end_layout
6052
6053 \begin_layout Subsubsection*
6054 Built-in reverse search via SyncTeX (DVI and PDF) 
6055 \end_layout
6056
6057 \begin_layout Standard
6058 Recent versions of 
6059 \begin_inset Flex Code
6060 status collapsed
6061
6062 \begin_layout Plain Layout
6063 (pdf)latex
6064 \end_layout
6065
6066 \end_inset
6067
6068  have built-in support for both PDF and DVI reverse search.
6069  This so-called 
6070 \emph on
6071 SyncTeX
6072 \emph default
6073  facility is basically the result of the integration of the PDFSync package
6074  to the pdftex program and its merge with the 
6075 \emph on
6076 scr-specials
6077 \emph default
6078  approach.
6079  You need at least TeXLive 2008 or a recent MikTeX distribution in order
6080  to use it.
6081  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6082  already provide SyncTeX support.
6083 \end_layout
6084
6085 \begin_layout Standard
6086 To enable SyncTeX for DVI output, change the 
6087 \begin_inset Flex MenuItem
6088 status collapsed
6089
6090 \begin_layout Plain Layout
6091 LaT
6092 \begin_inset ERT
6093 status collapsed
6094
6095 \begin_layout Plain Layout
6096
6097 {}
6098 \end_layout
6099
6100 \end_inset
6101
6102 eX (plain) -> DVI
6103 \end_layout
6104
6105 \end_inset
6106
6107  or 
6108 \begin_inset Flex MenuItem
6109 status collapsed
6110
6111 \begin_layout Plain Layout
6112 LaT
6113 \begin_inset ERT
6114 status collapsed
6115
6116 \begin_layout Plain Layout
6117
6118 {}
6119 \end_layout
6120
6121 \end_inset
6122
6123 eX (plain) -> DraftDVI
6124 \end_layout
6125
6126 \end_inset
6127
6128  converter in 
6129 \begin_inset Flex MenuItem
6130 status collapsed
6131
6132 \begin_layout Plain Layout
6133 Preferences\SpecialChar \menuseparator
6134 File Handling\SpecialChar \menuseparator
6135 Converters
6136 \end_layout
6137
6138 \end_inset
6139
6140  to 
6141 \begin_inset Flex Code
6142 status collapsed
6143
6144 \begin_layout Plain Layout
6145 latex -synctex=1 $$i
6146 \end_layout
6147
6148 \end_inset
6149
6150 , and for PDF output, change the 
6151 \begin_inset Flex MenuItem
6152 status collapsed
6153
6154 \begin_layout Plain Layout
6155 LaT
6156 \begin_inset ERT
6157 status collapsed
6158
6159 \begin_layout Plain Layout
6160
6161 {}
6162 \end_layout
6163
6164 \end_inset
6165
6166 eX (pdflatex) -> PDF (pdflatex)
6167 \end_layout
6168
6169 \end_inset
6170
6171  or converter to 
6172 \begin_inset Flex Code
6173 status collapsed
6174
6175 \begin_layout Plain Layout
6176 pdflatex -synctex=1 $$i
6177 \end_layout
6178
6179 \end_inset
6180
6181 .
6182  Check the documentation of your viewer whether the viewer needs to be configure
6183 d for the use with SyncTeX.
6184 \begin_inset Foot
6185 status collapsed
6186
6187 \begin_layout Plain Layout
6188 Note that the option 
6189 \begin_inset Flex Code
6190 status collapsed
6191
6192 \begin_layout Plain Layout
6193 -synctex=1
6194 \end_layout
6195
6196 \end_inset
6197
6198  option enables gzip compression.
6199  If your viewer does not support it, you should instead use 
6200 \begin_inset Flex Code
6201 status collapsed
6202
6203 \begin_layout Plain Layout
6204 -synctex=-1
6205 \end_layout
6206
6207 \end_inset
6208
6209 .
6210 \end_layout
6211
6212 \end_inset
6213
6214
6215 \end_layout
6216
6217 \begin_layout Subsection
6218 Configuring and using specific viewers
6219 \begin_inset CommandInset label
6220 LatexCommand label
6221 name "sub:configuring-viewers"
6222
6223 \end_inset
6224
6225
6226 \end_layout
6227
6228 \begin_layout Subsubsection*
6229 Xdvi (all platforms)
6230 \end_layout
6231
6232 \begin_layout Standard
6233 If you use 
6234 \begin_inset Flex Code
6235 status collapsed
6236
6237 \begin_layout Plain Layout
6238 xdvi
6239 \end_layout
6240
6241 \end_inset
6242
6243 , you don't need to do anything else for performing a reverse DVI search,
6244  as LyX already provides the necessary hooks for automatically using the
6245  
6246 \begin_inset Flex Code
6247 status collapsed
6248
6249 \begin_layout Plain Layout
6250 lyxclient
6251 \end_layout
6252
6253 \end_inset
6254
6255  program.
6256  Just setup your document as described above (reverse search is triggered
6257  by Ctrl-click or Alt-click on Mac OSX, respectively).
6258 \end_layout
6259
6260 \begin_layout Standard
6261 However, if for whatever reason you want to use the named pipe instead of
6262  the socket for communicating with LyX, simply change the DVI viewer in
6263  
6264 \begin_inset Flex MenuItem
6265 status collapsed
6266
6267 \begin_layout Plain Layout
6268 Preferences\SpecialChar \menuseparator
6269 File Handling\SpecialChar \menuseparator
6270 File formats
6271 \end_layout
6272
6273 \end_inset
6274
6275  to
6276 \begin_inset Foot
6277 status collapsed
6278
6279 \begin_layout Plain Layout
6280 On Mac OSX you have to use 
6281 \begin_inset Flex Code
6282 status collapsed
6283
6284 \begin_layout Plain Layout
6285 DISPLAY=:0.0 xdvi -editor "lyxeditor.sh %f %l"
6286 \end_layout
6287
6288 \end_inset
6289
6290
6291 \end_layout
6292
6293 \end_inset
6294
6295  
6296 \begin_inset Flex Code
6297 status collapsed
6298
6299 \begin_layout Plain Layout
6300 xdvi -editor "lyxeditor.sh %f %l"
6301 \end_layout
6302
6303 \end_inset
6304
6305 , where 
6306 \begin_inset Flex Code
6307 status collapsed
6308
6309 \begin_layout Plain Layout
6310 lyxeditor.sh
6311 \end_layout
6312
6313 \end_inset
6314
6315  is a suitable script.
6316  For example, a minimal shell script is the following one:
6317 \end_layout
6318
6319 \begin_layout LyX-Code
6320 #!/bin/sh
6321 \begin_inset Newline newline
6322 \end_inset
6323
6324 LYXPIPE="/path/to/lyxpipe"
6325 \begin_inset Newline newline
6326 \end_inset
6327
6328 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6329 \begin_inset Newline newline
6330 \end_inset
6331
6332 echo "$COMMAND" > "${LYXPIPE}".in || exit
6333 \begin_inset Newline newline
6334 \end_inset
6335
6336 read TMP < "${LYXPIPE}".out || exit
6337 \end_layout
6338
6339 \begin_layout Standard
6340 where 
6341 \begin_inset Flex Code
6342 status collapsed
6343
6344 \begin_layout Plain Layout
6345 /path/to/lyxpipe
6346 \end_layout
6347
6348 \end_inset
6349
6350  is the Ly
6351 \begin_inset ERT
6352 status collapsed
6353
6354 \begin_layout Plain Layout
6355
6356 {}
6357 \end_layout
6358
6359 \end_inset
6360
6361 XServer pipe path specified in 
6362 \begin_inset Flex MenuItem
6363 status collapsed
6364
6365 \begin_layout Plain Layout
6366 Preferences\SpecialChar \menuseparator
6367 Paths
6368 \end_layout
6369
6370 \end_inset
6371
6372 .
6373 \begin_inset Foot
6374 status collapsed
6375
6376 \begin_layout Plain Layout
6377 In the 
6378 \begin_inset Flex Code
6379 status collapsed
6380
6381 \begin_layout Plain Layout
6382 development/tools
6383 \end_layout
6384
6385 \end_inset
6386
6387  folder of a source distribution you can find a 
6388 \begin_inset Flex Code
6389 status collapsed
6390
6391 \begin_layout Plain Layout
6392 lyxeditor
6393 \end_layout
6394
6395 \end_inset
6396
6397  script which is able to locate the 
6398 \emph on
6399 lyxpipe
6400 \emph default
6401  based on your preferences.
6402 \end_layout
6403
6404 \end_inset
6405
6406
6407 \end_layout
6408
6409 \begin_layout Subsubsection*
6410 MacDviX (Mac OSX)
6411 \end_layout
6412
6413 \begin_layout Standard
6414 At the end of 
6415 \begin_inset Flex Code
6416 status collapsed
6417
6418 \begin_layout Plain Layout
6419 /Applications/MacDviX_Folder/calleditor.script
6420 \end_layout
6421
6422 \end_inset
6423
6424 , add the following lines:
6425 \end_layout
6426
6427 \begin_layout LyX-Code
6428 /Applications/Ly
6429 \begin_inset ERT
6430 status collapsed
6431
6432 \begin_layout Plain Layout
6433
6434 {}
6435 \end_layout
6436
6437 \end_inset
6438
6439 X.app/Contents/MacOS/lyxeditor "$2" $1
6440 \begin_inset Newline newline
6441 \end_inset
6442
6443 exit 1
6444 \end_layout
6445
6446 \begin_layout Standard
6447 Modify the lines accordingly if you install LyX somewhere else than in the
6448  Applications folder.
6449 \end_layout
6450
6451 \begin_layout Standard
6452 Reverse search is triggered by Alt-click (OPTION-click).
6453 \end_layout
6454
6455 \begin_layout Subsubsection*
6456 Skim (Mac OSX)
6457 \end_layout
6458
6459 \begin_layout Standard
6460 Enter 
6461 \begin_inset Flex Code
6462 status collapsed
6463
6464 \begin_layout Plain Layout
6465 open -a Skim.app $$i
6466 \end_layout
6467
6468 \end_inset
6469
6470  to the viewer setting in 
6471 \begin_inset Flex MenuItem
6472 status collapsed
6473
6474 \begin_layout Plain Layout
6475 Preferences\SpecialChar \menuseparator
6476 File Handling\SpecialChar \menuseparator
6477 File formats\SpecialChar \menuseparator
6478 PDF (pdflatex)
6479 \end_layout
6480
6481 \end_inset
6482
6483 , and then in 
6484 \begin_inset Flex MenuItem
6485 status collapsed
6486
6487 \begin_layout Plain Layout
6488 Skim\SpecialChar \menuseparator
6489 Preferences\SpecialChar \menuseparator
6490 Sync
6491 \end_layout
6492
6493 \end_inset
6494
6495  choose 
6496 \begin_inset Flex MenuItem
6497 status collapsed
6498
6499 \begin_layout Plain Layout
6500 custom
6501 \end_layout
6502
6503 \end_inset
6504
6505  preset and enter command 
6506 \begin_inset Flex MenuItem
6507 status collapsed
6508
6509 \begin_layout Plain Layout
6510 /Applications/LyX.app/Contents/MacOS/lyxeditor
6511 \end_layout
6512
6513 \end_inset
6514
6515 .
6516 \end_layout
6517
6518 \begin_layout Standard
6519 Reverse search is triggered by COMMAND-SHIFT-click
6520 \end_layout
6521
6522 \begin_layout Subsubsection*
6523 Okular (KDE)
6524 \end_layout
6525
6526 \begin_layout Standard
6527 Go to 
6528 \begin_inset Flex MenuItem
6529 status collapsed
6530
6531 \begin_layout Plain Layout
6532 Settings\SpecialChar \menuseparator
6533 Configure Okular\SpecialChar \ldots{}
6534 \SpecialChar \menuseparator
6535 Editor
6536 \end_layout
6537
6538 \end_inset
6539
6540 , select 
6541 \begin_inset Quotes eld
6542 \end_inset
6543
6544 Custom Text Editor
6545 \begin_inset Quotes erd
6546 \end_inset
6547
6548  and add the command 
6549 \begin_inset Flex Code
6550 status collapsed
6551
6552 \begin_layout Plain Layout
6553 lyxclient -g %f %l
6554 \end_layout
6555
6556 \end_inset
6557
6558 .
6559 \end_layout
6560
6561 \begin_layout Standard
6562 Reverse search is triggered by SHIFT-click.
6563 \end_layout
6564
6565 \begin_layout Subsubsection*
6566 YAP (Windows)
6567 \end_layout
6568
6569 \begin_layout Standard
6570 Launch yap, choose its 
6571 \begin_inset Flex MenuItem
6572 status collapsed
6573
6574 \begin_layout Plain Layout
6575 View\SpecialChar \menuseparator
6576 Options
6577 \end_layout
6578
6579 \end_inset
6580
6581  menu and select the 
6582 \begin_inset Quotes eld
6583 \end_inset
6584
6585 Inverse DVI Search
6586 \begin_inset Quotes erd
6587 \end_inset
6588
6589  tab.
6590  Click on the 
6591 \begin_inset Quotes eld
6592 \end_inset
6593
6594 New\SpecialChar \ldots{}
6595
6596 \begin_inset Quotes erd
6597 \end_inset
6598
6599  button and, in the window that opens, enter 
6600 \begin_inset Quotes eld
6601 \end_inset
6602
6603 LyX Editor
6604 \begin_inset Quotes erd
6605 \end_inset
6606
6607  (or any other name you like) in the 
6608 \begin_inset Quotes eld
6609 \end_inset
6610
6611 Name:
6612 \begin_inset Quotes erd
6613 \end_inset
6614
6615  field.
6616  Now click on the button labeled 
6617 \begin_inset Quotes eld
6618 \end_inset
6619
6620 \SpecialChar \ldots{}
6621
6622 \begin_inset Quotes erd
6623 \end_inset
6624
6625  to open a file dialog and navigate to the directory containing the batch
6626  file 
6627 \begin_inset Flex Code
6628 status collapsed
6629
6630 \begin_layout Plain Layout
6631 lyxeditor.bat
6632 \end_layout
6633
6634 \end_inset
6635
6636  (see below).
6637  Select 
6638 \begin_inset Flex Code
6639 status collapsed
6640
6641 \begin_layout Plain Layout
6642 lyxeditor.bat
6643 \end_layout
6644
6645 \end_inset
6646
6647  and then specify the program arguments as 
6648 \begin_inset Flex Code
6649 status collapsed
6650
6651 \begin_layout Plain Layout
6652 %f %l
6653 \end_layout
6654
6655 \end_inset
6656
6657 .
6658  The 
6659 \begin_inset Flex Code
6660 status collapsed
6661
6662 \begin_layout Plain Layout
6663 lyxeditor.bat
6664 \end_layout
6665
6666 \end_inset
6667
6668  wrapper is used for communicating with LyX through the 
6669 \emph on
6670 lyxpipe
6671 \emph default
6672  and is as follows:
6673 \end_layout
6674
6675 \begin_layout LyX-Code
6676 @echo off
6677 \begin_inset Newline newline
6678 \end_inset
6679
6680 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6681 \backslash
6682
6683 \backslash
6684 .
6685 \backslash
6686 pipe
6687 \backslash
6688 lyxpipe.in
6689 \begin_inset Newline newline
6690 \end_inset
6691
6692 type 
6693 \backslash
6694
6695 \backslash
6696 .
6697 \backslash
6698 pipe
6699 \backslash
6700 lyxpipe.out
6701 \end_layout
6702
6703 \begin_layout Standard
6704 Make sure that the LyXServer pipe path you specified in LyX is 
6705 \begin_inset Flex Code
6706 status collapsed
6707
6708 \begin_layout Plain Layout
6709
6710 \backslash
6711
6712 \backslash
6713 .
6714 \backslash
6715 pipe
6716 \backslash
6717 lyxpipe
6718 \end_layout
6719
6720 \end_inset
6721
6722 , otherwise change the 
6723 \begin_inset Flex Code
6724 status collapsed
6725
6726 \begin_layout Plain Layout
6727 lyxeditor.bat
6728 \end_layout
6729
6730 \end_inset
6731
6732  wrapper accordingly.
6733 \end_layout
6734
6735 \begin_layout Standard
6736 In yap, reverse search is triggered by double-click.
6737 \end_layout
6738
6739 \begin_layout Subsubsection*
6740 SumatraPDF (Windows)
6741 \end_layout
6742
6743 \begin_layout Standard
6744 In order to use SumatraPDF for inverse search, enter 
6745 \begin_inset Flex Code
6746 status collapsed
6747
6748 \begin_layout Plain Layout
6749 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6750 \end_layout
6751
6752 \end_inset
6753
6754  in the viewer setting in 
6755 \begin_inset Flex MenuItem
6756 status collapsed
6757
6758 \begin_layout Plain Layout
6759 Preferences\SpecialChar \menuseparator
6760 File Handling\SpecialChar \menuseparator
6761 File formats\SpecialChar \menuseparator
6762 PDF (pdflatex)
6763 \end_layout
6764
6765 \end_inset
6766
6767 , where 
6768 \begin_inset Flex Code
6769 status collapsed
6770
6771 \begin_layout Plain Layout
6772 lyxeditor.bat
6773 \end_layout
6774
6775 \end_inset
6776
6777  is the previous wrapper.
6778  If SumatraPDF.exe is not in your command PATH, use its full file name.
6779 \end_layout
6780
6781 \begin_layout Standard
6782 Reverse search is triggered by double-click.
6783 \end_layout
6784
6785 \begin_layout Subsubsection*
6786 YAP (Cygwin)
6787 \end_layout
6788
6789 \begin_layout Standard
6790 First of all, make sure that yap is your default DVI viewer in the Windows
6791  environment, then launch it, choose its 
6792 \begin_inset Flex MenuItem
6793 status collapsed
6794
6795 \begin_layout Plain Layout
6796 View\SpecialChar \menuseparator
6797 Options
6798 \end_layout
6799
6800 \end_inset
6801
6802  menu and select the 
6803 \begin_inset Quotes eld
6804 \end_inset
6805
6806 Inverse DVI Search
6807 \begin_inset Quotes erd
6808 \end_inset
6809
6810  tab.
6811  Click on the 
6812 \begin_inset Quotes eld
6813 \end_inset
6814
6815 New\SpecialChar \ldots{}
6816
6817 \begin_inset Quotes erd
6818 \end_inset
6819
6820  button and, in the window that opens, enter 
6821 \begin_inset Quotes eld
6822 \end_inset
6823
6824 LyX Editor
6825 \begin_inset Quotes erd
6826 \end_inset
6827
6828  (or any other name you like) in the 
6829 \begin_inset Quotes eld
6830 \end_inset
6831
6832 Name:
6833 \begin_inset Quotes erd
6834 \end_inset
6835
6836  field.
6837  Now click on the button labeled 
6838 \begin_inset Quotes eld
6839 \end_inset
6840
6841 \SpecialChar \ldots{}
6842
6843 \begin_inset Quotes erd
6844 \end_inset
6845
6846  to open a file dialog and navigate to the directory containing the 
6847 \begin_inset Flex Code
6848 status collapsed
6849
6850 \begin_layout Plain Layout
6851 lyxeditor.exe
6852 \end_layout
6853
6854 \end_inset
6855
6856  program (which is installed by default on Cygwin along with the LyX executable).
6857  Select 
6858 \begin_inset Flex Code
6859 status collapsed
6860
6861 \begin_layout Plain Layout
6862 lyxeditor.exe
6863 \end_layout
6864
6865 \end_inset
6866
6867  and then specify the program arguments as 
6868 \begin_inset Flex Code
6869 status collapsed
6870
6871 \begin_layout Plain Layout
6872 -g %f %l
6873 \end_layout
6874
6875 \end_inset
6876
6877 .
6878  In this way, you will be using the 
6879 \emph on
6880 lyxsocket
6881 \emph default
6882  for communicating with LyX.
6883  If, for whatever reason, you want to use the 
6884 \emph on
6885 lyxpipe
6886 \emph default
6887 , omit the 
6888 \begin_inset Flex Code
6889 status collapsed
6890
6891 \begin_layout Plain Layout
6892 -g
6893 \end_layout
6894
6895 \end_inset
6896
6897  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6898 \end_layout
6899
6900 \begin_layout Standard
6901 In yap, reverse search is triggered by double-click.
6902 \end_layout
6903
6904 \begin_layout Subsubsection*
6905 SumatraPDF (Cygwin)
6906 \end_layout
6907
6908 \begin_layout Standard
6909 In order to use SumatraPDF for inverse search, enter 
6910 \begin_inset Flex Code
6911 status collapsed
6912
6913 \begin_layout Plain Layout
6914 SumatraPDF -inverse-search "lyxeditor -g %f %l"
6915 \end_layout
6916
6917 \end_inset
6918
6919  in the viewer setting in 
6920 \begin_inset Flex MenuItem
6921 status collapsed
6922
6923 \begin_layout Plain Layout
6924 Preferences\SpecialChar \menuseparator
6925 File Handling\SpecialChar \menuseparator
6926 File formats\SpecialChar \menuseparator
6927 PDF (pdflatex)
6928 \end_layout
6929
6930 \end_inset
6931
6932 .
6933  If SumatraPDF.exe is not in your command PATH, use its full posix path.
6934  The 
6935 \begin_inset Flex Code
6936 status collapsed
6937
6938 \begin_layout Plain Layout
6939 -g
6940 \end_layout
6941
6942 \end_inset
6943
6944  enables communication via the 
6945 \emph on
6946 lyxsocket
6947 \emph default
6948 .
6949  Again, omit the 
6950 \begin_inset Flex Code
6951 status collapsed
6952
6953 \begin_layout Plain Layout
6954 -g
6955 \end_layout
6956
6957 \end_inset
6958
6959  option if you want to use the 
6960 \emph on
6961 lyxpipe
6962 \emph default
6963 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6964 \end_layout
6965
6966 \begin_layout Standard
6967 Reverse search is triggered by double-click.
6968 \end_layout
6969
6970 \begin_layout Section
6971 Forward search
6972 \end_layout
6973
6974 \begin_layout Standard
6975 Forward search is, as the name implies, in a sense the 
6976 \begin_inset Quotes eld
6977 \end_inset
6978
6979 opposite
6980 \begin_inset Quotes erd
6981 \end_inset
6982
6983  of reverse search.
6984  It allows you to let the viewer jump to a given position from within LyX.
6985  If forward search is set up (as described in what follows), you can put
6986  the cursor anywhere in your LyX document, and hit 
6987 \begin_inset Flex MenuItem
6988 status collapsed
6989
6990 \begin_layout Plain Layout
6991 Navigate\SpecialChar \menuseparator
6992 Forward search
6993 \end_layout
6994
6995 \end_inset
6996
6997  (or select 
6998 \begin_inset Flex MenuItem
6999 status collapsed
7000
7001 \begin_layout Plain Layout
7002 Forward search
7003 \end_layout
7004
7005 \end_inset
7006
7007  in the context menu via right mouse click), and then the viewer will jump
7008  to that position as well.
7009  This implies, of course, that your viewer supports this function.
7010 \end_layout
7011
7012 \begin_layout Standard
7013 To make forward search possible, you first need to provide the generated
7014  output PDF/DVI file with additional information about the TeX sources.
7015  This can be done via the methods described in the section 
7016 \begin_inset CommandInset ref
7017 LatexCommand ref
7018 reference "sub:rev-search"
7019
7020 \end_inset
7021
7022 .
7023 \end_layout
7024
7025 \begin_layout Standard
7026 Additionally, you need to configure LyX for using your viewers in 
7027 \begin_inset Flex MenuItem
7028 status collapsed
7029
7030 \begin_layout Plain Layout
7031 Tools\SpecialChar \menuseparator
7032 Preferences\SpecialChar \menuseparator
7033 Output\SpecialChar \menuseparator
7034 General
7035 \end_layout
7036
7037 \end_inset
7038
7039 .
7040  We provide a range of tested configurations for some viewers, which you
7041  can select from the drop down list.
7042  If none of these configurations suits you, you have to find out and enter
7043  a suitable configuration yourself.
7044  The definition syntax uses the following placeholders:
7045 \end_layout
7046
7047 \begin_layout Itemize
7048 \noindent
7049 \begin_inset Flex Code
7050 status collapsed
7051
7052 \begin_layout Plain Layout
7053 $$n
7054 \end_layout
7055
7056 \end_inset
7057
7058 : row number
7059 \end_layout
7060
7061 \begin_layout Itemize
7062 \noindent
7063 \begin_inset Flex Code
7064 status collapsed
7065
7066 \begin_layout Plain Layout
7067 $$t
7068 \end_layout
7069
7070 \end_inset
7071
7072 : name of the (temporary) exported .tex file (without path)
7073 \end_layout
7074
7075 \begin_layout Itemize
7076 \noindent
7077 \begin_inset Flex Code
7078 status collapsed
7079
7080 \begin_layout Plain Layout
7081 $$f
7082 \end_layout
7083
7084 \end_inset
7085
7086 : name of the (temporary) exported .tex file (including path)
7087 \end_layout
7088
7089 \begin_layout Itemize
7090 \noindent
7091 \begin_inset Flex Code
7092 status collapsed
7093
7094 \begin_layout Plain Layout
7095 $$o
7096 \end_layout
7097
7098 \end_inset
7099
7100 : name of the exported output file (either dvi or pdf, depending on which
7101  one exists in the temporary directory)
7102 \end_layout
7103
7104 \begin_layout Standard
7105 Note that only some of the viewers provide full forward search functionality,
7106  among them yap, xdvi, okular
7107 \begin_inset Foot
7108 status open
7109
7110 \begin_layout Plain Layout
7111 You might want to set 
7112 \begin_inset Flex Code
7113 status collapsed
7114
7115 \begin_layout Plain Layout
7116 okular --unique
7117 \end_layout
7118
7119 \end_inset
7120
7121  in 
7122 \begin_inset Flex MenuItem
7123 status collapsed
7124
7125 \begin_layout Plain Layout
7126 Tools\SpecialChar \menuseparator
7127 Preferences\SpecialChar \menuseparator
7128 File Handling\SpecialChar \menuseparator
7129 File
7130 \begin_inset space ~
7131 \end_inset
7132
7133 Formats
7134 \end_layout
7135
7136 \end_inset
7137
7138
7139 \end_layout
7140
7141 \end_inset
7142
7143  and Sumatra PDF
7144 \begin_inset Foot
7145 status collapsed
7146
7147 \begin_layout Plain Layout
7148 For Sumatra CMCDDE is needed --- downloadable from 
7149 \begin_inset CommandInset href
7150 LatexCommand href
7151 target "http://www.istri.fr/zip/CMCDDE.zip"
7152
7153 \end_inset
7154
7155
7156 \end_layout
7157
7158 \end_inset
7159
7160 .
7161  While many of the widespread PDF viewers (most notably Adobe Reader) do
7162  not support forward search at all, some other viewers -- e.
7163 \begin_inset space \thinspace{}
7164 \end_inset
7165
7166 g.
7167  evince and xpdf -- allow at least to reload the document and jump to a
7168  specific page of the file, so you can at least navigate 
7169 \begin_inset Quotes eld
7170 \end_inset
7171
7172 near
7173 \begin_inset Quotes erd
7174 \end_inset
7175
7176 .
7177  This latter functionality is provided by an external call of synctex (see
7178  the predefined example configurations).
7179  
7180 \end_layout
7181
7182 \begin_layout Standard
7183 Forward search works both with DVI and PDF output.
7184  LyX simply checks which preview format you have used before (i.
7185 \begin_inset space \thinspace{}
7186 \end_inset
7187
7188 e., which format is already there in the temporary directory) and chooses
7189  the appropriate configuration for the respective format.
7190 \end_layout
7191
7192 \begin_layout Chapter
7193 Special Document Classes
7194 \end_layout
7195
7196 \begin_layout Section
7197 A&A Paper
7198 \end_layout
7199
7200 \begin_layout Standard
7201 by 
7202 \noun on
7203 Peter Sütterlin
7204 \end_layout
7205
7206 \begin_layout Subsection
7207 Introduction
7208 \end_layout
7209
7210 \begin_layout Standard
7211 This section describes how LyX can be used to write articles for submission
7212  to the scientific journal 
7213 \emph on
7214 Astronomy and Astrophysics
7215 \emph default
7216  (www.edpsciences.fr/aa/ 
7217 \begin_inset Flex URL
7218 status collapsed
7219
7220 \begin_layout Plain Layout
7221
7222 http://www.edpsciences.fr/aa/
7223 \end_layout
7224
7225 \end_inset
7226
7227 ) using Version 5.01 of the document class 
7228 \family typewriter
7229 aa.cls
7230 \family default
7231 .
7232  This package can be downloaded from the ftp site
7233 \end_layout
7234
7235 \begin_layout Standard
7236 \begin_inset VSpace medskip
7237 \end_inset
7238
7239
7240 \end_layout
7241
7242 \begin_layout Standard
7243 \align center
7244 \begin_inset Flex URL
7245 status collapsed
7246
7247 \begin_layout Plain Layout
7248
7249 ftp://ftp.edpsciences.org/pub/aa/readme.html
7250 \end_layout
7251
7252 \end_inset
7253
7254
7255 \end_layout
7256
7257 \begin_layout Standard
7258 \begin_inset VSpace medskip
7259 \end_inset
7260
7261
7262 \end_layout
7263
7264 \begin_layout Standard
7265 A manual comes together with that package, and this text is not meant to
7266  replace the original manual but is merely a short guide in how to realize
7267  the correct form of your paper.
7268  
7269 \end_layout
7270
7271 \begin_layout Standard
7272 Please note that the publisher of the journal was changed from Springer
7273  to EDP Sciences starting January 1, 2001.
7274  That change involved also some slight changes to the style files, namely
7275  the removal of the thesaurus command.
7276  The LyX class aa supports the newest version of these style files, V 5.01.
7277  If you have an older version installed, please upgrade.
7278  For compatibility, the old (version 4) layout has been kept as 
7279 \family sans
7280 article (A&A V4)
7281 \family default
7282 .
7283  Please refer to the comments in 
7284 \family typewriter
7285 LyXDir/layouts/aapaper.layout
7286 \family default
7287 .
7288 \end_layout
7289
7290 \begin_layout Subsection
7291 Getting started
7292 \end_layout
7293
7294 \begin_layout Standard
7295 It is recommended you start from the example template distributed with LyX.
7296  If you are not using a template, note the following settings:
7297 \end_layout
7298
7299 \begin_layout Itemize
7300 Select 
7301 \family sans
7302 article (A&A)
7303 \family default
7304  in the 
7305 \family sans
7306 Document\SpecialChar \menuseparator
7307 Settings
7308 \family default
7309  dialog (OK, that one was obvious).
7310 \end_layout
7311
7312 \begin_layout Itemize
7313 Don't change the option 
7314 \family sans
7315 Page
7316 \begin_inset space ~
7317 \end_inset
7318
7319 style
7320 \family default
7321 : Leave it set to 
7322 \family sans
7323 default
7324 \family default
7325 .
7326  The whole layout is done by the macros, you shouldn't change anything.
7327 \end_layout
7328
7329 \begin_layout Subsection
7330 The header block
7331 \end_layout
7332
7333 \begin_layout Standard
7334 First thing to enter is the header information.
7335  It consists of seven entries, of which some are optional.
7336  They are
7337 \end_layout
7338
7339 \begin_layout Itemize
7340
7341 \family sans
7342 Title
7343 \family default
7344 : [required] 
7345 \end_layout
7346
7347 \begin_layout Itemize
7348
7349 \family sans
7350 Subtitle
7351 \family default
7352 : [optional] 
7353 \end_layout
7354
7355 \begin_layout Itemize
7356
7357 \family sans
7358 Author
7359 \family default
7360 : [required]
7361 \end_layout
7362
7363 \begin_layout Itemize
7364
7365 \family sans
7366 Address
7367 \family default
7368 : [required]
7369 \end_layout
7370
7371 \begin_layout Itemize
7372
7373 \family sans
7374 Offprints
7375 \family default
7376 : [optional] if more than one author: whom to contact for offprint requests.
7377 \end_layout
7378
7379 \begin_layout Itemize
7380
7381 \family sans
7382 Mail
7383 \family default
7384 : [optional] mail address for contacts.
7385 \end_layout
7386
7387 \begin_layout Itemize
7388
7389 \family sans
7390 Date
7391 \family default
7392 : [required].
7393  Suggested format is 
7394 \family typewriter
7395 Received: <date>; Accepted <date> 
7396 \end_layout
7397
7398 \begin_layout Standard
7399 There is no need to issue the 
7400 \family typewriter
7401
7402 \backslash
7403 maketitle
7404 \family default
7405  command, this is done automatically by LyX when the header is finished.
7406  Although the order of the single header entries doesn't matter it is advised
7407  to keep the above sequence, just to get the best optics and meets the layout
7408  of the real document.
7409 \end_layout
7410
7411 \begin_layout Standard
7412 If you want to place footnotes in the header block, e.
7413 \begin_inset space \thinspace{}
7414 \end_inset
7415
7416 g.
7417 \begin_inset space \space{}
7418 \end_inset
7419
7420 to state your present address, just use the standard footnote via the menu
7421  
7422 \family sans
7423 Insert\SpecialChar \menuseparator
7424 Footnote.
7425
7426 \family default
7427  LyX will automagically use the term 
7428 \family typewriter
7429
7430 \backslash
7431 thanks{}
7432 \family default
7433  in that case.
7434 \end_layout
7435
7436 \begin_layout Standard
7437 In addition to these topics, the macros use three additional LaTeX commands
7438  that have no counterpart in LyX:
7439 \end_layout
7440
7441 \begin_layout Itemize
7442
7443 \family typewriter
7444
7445 \backslash
7446 and
7447 \family default
7448  to separate different names for more than one author and institute, respectivel
7449 y.
7450 \end_layout
7451
7452 \begin_layout Itemize
7453
7454 \family typewriter
7455
7456 \backslash
7457 inst{<nr>}
7458 \family default
7459 to mark corresponding author/institute pairs.
7460  The institutes are numbered sequentially as they appear in the 
7461 \family sans
7462 Address
7463 \family default
7464  field, so you have to put a marker to each author.
7465 \end_layout
7466
7467 \begin_layout Itemize
7468
7469 \family typewriter
7470
7471 \backslash
7472 email{address}
7473 \family default
7474  to supply an email address for fast contact.
7475 \end_layout
7476
7477 \begin_layout Standard
7478 In all cases, the appropriate command has to be entered in LyX and marked
7479  as LaTeX code.
7480  See the examples.
7481  
7482 \end_layout
7483
7484 \begin_layout Subsection
7485 The abstract
7486 \end_layout
7487
7488 \begin_layout Standard
7489 The abstract should immediately follow the header block.
7490  With version 5 the abstract environment was changed to a command, and there
7491  is now a resctriction to only one paragraph.
7492  In addition, it should contain an entry with the keywords.
7493  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7494  command 
7495 \family typewriter
7496
7497 \backslash
7498 keywords{}
7499 \family default
7500  by hand and mark it as LaTeX code.
7501  Refer to the example paper.
7502 \end_layout
7503
7504 \begin_layout Subsection
7505 Supported environments
7506 \end_layout
7507
7508 \begin_layout Standard
7509 The A&A paper layout supports the following environments for structuring
7510  your text:
7511 \end_layout
7512
7513 \begin_layout Itemize
7514
7515 \family sans
7516 Standard
7517 \end_layout
7518
7519 \begin_layout Itemize
7520
7521 \family sans
7522 Section
7523 \end_layout
7524
7525 \begin_layout Itemize
7526
7527 \family sans
7528 Subsection
7529 \end_layout
7530
7531 \begin_layout Itemize
7532
7533 \family sans
7534 Subsubsection
7535 \end_layout
7536
7537 \begin_layout Itemize
7538
7539 \family sans
7540 Itemize
7541 \end_layout
7542
7543 \begin_layout Itemize
7544
7545 \family sans
7546 Enumerate
7547 \end_layout
7548
7549 \begin_layout Itemize
7550
7551 \family sans
7552 Description
7553 \end_layout
7554
7555 \begin_layout Itemize
7556
7557 \family sans
7558 Caption
7559 \end_layout
7560
7561 \begin_layout Itemize
7562
7563 \family sans
7564 Abstract
7565 \end_layout
7566
7567 \begin_layout Itemize
7568
7569 \family sans
7570 Acknowledgment
7571 \end_layout
7572
7573 \begin_layout Itemize
7574
7575 \family sans
7576 Bibliography
7577 \end_layout
7578
7579 \begin_layout Itemize
7580
7581 \family sans
7582 LaTeX
7583 \end_layout
7584
7585 \begin_layout Subsection
7586 Commands not supported by LyX
7587 \end_layout
7588
7589 \begin_layout Standard
7590 Some commands are not yet supported by the 
7591 \family sans
7592 paper (A&A)
7593 \family default
7594  layout for LyX.
7595  Some have already been mentioned.
7596  For the sake of completeness, they are listed all together here:
7597 \end_layout
7598
7599 \begin_layout Itemize
7600
7601 \family typewriter
7602
7603 \backslash
7604 and
7605 \end_layout
7606
7607 \begin_layout Itemize
7608
7609 \family typewriter
7610
7611 \backslash
7612 email
7613 \end_layout
7614
7615 \begin_layout Itemize
7616
7617 \family typewriter
7618
7619 \backslash
7620 appendix
7621 \end_layout
7622
7623 \begin_layout Itemize
7624
7625 \family typewriter
7626
7627 \backslash
7628 authorrunning
7629 \end_layout
7630
7631 \begin_layout Itemize
7632
7633 \family typewriter
7634
7635 \backslash
7636 inst{}
7637 \end_layout
7638
7639 \begin_layout Itemize
7640
7641 \family typewriter
7642
7643 \backslash
7644 keywords{}
7645 \end_layout
7646
7647 \begin_layout Itemize
7648
7649 \family typewriter
7650
7651 \backslash
7652 object{}
7653 \end_layout
7654
7655 \begin_layout Itemize
7656
7657 \family typewriter
7658
7659 \backslash
7660 titlerunning{}
7661 \end_layout
7662
7663 \begin_layout Standard
7664 If you want to use any of these commands, you have to enter them yourself.
7665  
7666 \series bold
7667 Do not forget to mark them as LaTeX code!
7668 \end_layout
7669
7670 \begin_layout Subsection
7671 Figure and Table Floats
7672 \end_layout
7673
7674 \begin_layout Standard
7675 LyX provides support for the necessary float environments 
7676 \family sans
7677 figure, figure*, table
7678 \family default
7679  and 
7680 \family sans
7681 table*
7682 \family default
7683 , therefore we won't tell much about it here.
7684  Refer to the 
7685 \emph on
7686 User's
7687 \begin_inset space ~
7688 \end_inset
7689
7690 Guide
7691 \emph default
7692 .
7693  Just remember that tables should be left-aligned.
7694  For that, select the table and change the alignment in 
7695 \family sans
7696 Edit\SpecialChar \menuseparator
7697 Paragraph
7698 \begin_inset space ~
7699 \end_inset
7700
7701 Settings.
7702 \end_layout
7703
7704 \begin_layout Standard
7705 There is only one special thing: the figures with caption besides the figure.
7706  To create such a figure, you have to do the following:
7707 \end_layout
7708
7709 \begin_layout Enumerate
7710 Create a wide figure float: 
7711 \family sans
7712 Insert\SpecialChar \menuseparator
7713 Float\SpecialChar \menuseparator
7714 Figure
7715 \family default
7716 , then right click in the figure and select 
7717 \family sans
7718 \bar under
7719 S
7720 \bar default
7721 pan
7722 \begin_inset space ~
7723 \end_inset
7724
7725 columns
7726 \family default
7727 .
7728 \end_layout
7729
7730 \begin_layout Enumerate
7731 Enter your caption text.
7732 \end_layout
7733
7734 \begin_layout Enumerate
7735 Press 
7736 \family sans
7737 Return
7738 \family default
7739  to move the cursor above the caption.
7740 \end_layout
7741
7742 \begin_layout Enumerate
7743 Insert your figure
7744 \end_layout
7745
7746 \begin_layout Enumerate
7747 Position the cursor behind the figure and insert a horizontal fill: 
7748 \family sans
7749 Insert\SpecialChar \menuseparator
7750 Special
7751 \begin_inset space ~
7752 \end_inset
7753
7754 Character\SpecialChar \menuseparator
7755 Horizontal
7756 \begin_inset space ~
7757 \end_inset
7758
7759 Fill
7760 \family default
7761 .
7762 \end_layout
7763
7764 \begin_layout Enumerate
7765 Switch to LaTeX mode: 
7766 \family sans
7767 M-c
7768 \begin_inset space ~
7769 \end_inset
7770
7771 t
7772 \family default
7773 .
7774 \end_layout
7775
7776 \begin_layout Enumerate
7777 Enter 
7778 \family typewriter
7779
7780 \backslash
7781 parbox[b]{55mm}{
7782 \family default
7783 .
7784  
7785 \series bold
7786 Do not close the brace!
7787 \end_layout
7788
7789 \begin_layout Enumerate
7790 Position the cursor behind the caption text, switch to LaTeX mode and insert
7791  the closing brace: 
7792 \family sans
7793 M-c
7794 \begin_inset space ~
7795 \end_inset
7796
7797 t
7798 \family default
7799  
7800 \family typewriter
7801 }
7802 \family default
7803 .
7804 \end_layout
7805
7806 \begin_layout Standard
7807 Also, refer to the figures in the example paper.
7808 \end_layout
7809
7810 \begin_layout Subsection
7811 Referee layout
7812 \end_layout
7813
7814 \begin_layout Standard
7815 For submission, the paper has to be formated in a special double-spacing
7816  layout.
7817  For this purpose, you have to give the option 
7818 \family typewriter
7819 referee
7820 \family default
7821  to the documentclass.
7822  This must be done using the extra class options field in the 
7823 \family sans
7824 Document\SpecialChar \menuseparator
7825 Settings
7826 \family default
7827  dialog.
7828  Just enter the string 
7829 \family typewriter
7830 referee
7831 \family default
7832  there.
7833 \end_layout
7834
7835 \begin_layout Subsection
7836 The example paper
7837 \end_layout
7838
7839 \begin_layout Standard
7840 The 
7841 \family sans
7842 Examples
7843 \family default
7844  directory contains an example paper written with LyX.
7845  It is the example paper from the original macro package, translated to
7846  LyX.
7847  Use it for inspiration, and compare the original LaTeX code with LyX way
7848  of writing.
7849 \end_layout
7850
7851 \begin_layout Section
7852 AASTeX
7853 \end_layout
7854
7855 \begin_layout Standard
7856 by 
7857 \noun on
7858 Mike Ressler
7859 \end_layout
7860
7861 \begin_layout Subsection
7862 Introduction
7863 \end_layout
7864
7865 \begin_layout Standard
7866 AASTeX is a set of macros produced by the American Astronomical Society
7867  to facilitate electronic manuscript submission to the three journals they
7868  publish: the Astrophysical Journal (including the Letters and Supplement),
7869  the Astronomical Journal, and the Publications of the Astronomical Society
7870  of the Pacific.
7871  LyX has proven to be an excellent tool for generating these documents,
7872  especially given its equation, citation, and figure handling capabilities.
7873  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7874  is the version described here, or higher.
7875  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7876  incompatible with LyX.
7877  The AASTeX package may be downloaded from the AASTeX Web site
7878 \end_layout
7879
7880 \begin_layout Standard
7881 \begin_inset VSpace medskip
7882 \end_inset
7883
7884
7885 \end_layout
7886
7887 \begin_layout Standard
7888 \align center
7889 \begin_inset Flex URL
7890 status collapsed
7891
7892 \begin_layout Plain Layout
7893
7894 http://www.journals.uchicago.edu/AAS/AASTeX
7895 \end_layout
7896
7897 \end_inset
7898
7899
7900 \end_layout
7901
7902 \begin_layout Standard
7903 \begin_inset VSpace medskip
7904 \end_inset
7905
7906
7907 \end_layout
7908
7909 \begin_layout Standard
7910 A complete user guide is contained in that package and you should familiarize
7911  yourself with it thoroughly before embarking on writing a paper in LyX.
7912  LyX will not reduce the need to figure out all the AASTeX commands, it
7913  will only reduce the drudgery of typing everything in.
7914  It is your responsibility to ensure that the final exported LaTeX document
7915  conforms completely to the requirements of the journal to which you are
7916  submitting your paper.
7917 \end_layout
7918
7919 \begin_layout Subsection
7920 Starting a New Paper
7921 \end_layout
7922
7923 \begin_layout Standard
7924 I strongly suggest that you start with the AASTeX template file.
7925  Click on 
7926 \family sans
7927 File\SpecialChar \menuseparator
7928 New from
7929 \family default
7930  
7931 \family sans
7932 Template
7933 \family default
7934 , enter the new file name, then choose the 
7935 \family typewriter
7936 aastex.lyx
7937 \family default
7938  template.
7939  This will show the most common fields found in a manuscript.
7940  Simply overwrite the existing text (including the brackets, 
7941 \family typewriter
7942 <>
7943 \family default
7944 ) with the correct information.
7945  Many of the AASTeX commands and environments can be implemented directly
7946  in LyX, but some cannot: most noticeably 
7947 \family typewriter
7948
7949 \backslash
7950 altaffilmark
7951 \family default
7952  and 
7953 \family typewriter
7954
7955 \backslash
7956 altaffiltext
7957 \family default
7958 , which should stick out like a sore thumb if you actually just opened the
7959  template file.
7960  For commands such as these, the LaTeX code must be entered directly and
7961  marked as such.
7962  Such commands are referred to as TeX code, or Evil Red Text.
7963  I tried to minimize the amount of TeX code needed in an AASTeX document,
7964  but there is still a bit more required than any of us would like.
7965 \end_layout
7966
7967 \begin_layout Subsection
7968 Finishing Your Paper
7969 \end_layout
7970
7971 \begin_layout Standard
7972 When the paper is finished to your satisfaction and previews/prints correctly,
7973  there are a few 
7974 \begin_inset Quotes eld
7975 \end_inset
7976
7977 postprocessing
7978 \begin_inset Quotes erd
7979 \end_inset
7980
7981  actions which need to be done before you submit it to the journals.
7982  
7983 \end_layout
7984
7985 \begin_layout Enumerate
7986 Export your paper as a LaTeX file (
7987 \family sans
7988 File\SpecialChar \menuseparator
7989 Export\SpecialChar \menuseparator
7990 LaTeX
7991 \family default
7992 ).
7993  
7994 \end_layout
7995
7996 \begin_layout Enumerate
7997 Edit the resulting 
7998 \family typewriter
7999 .tex
8000 \family default
8001  file with your favorite text editor
8002 \end_layout
8003
8004 \begin_deeper
8005 \begin_layout Enumerate
8006 remove the comment lines before the 
8007 \family typewriter
8008
8009 \backslash
8010 documentclass
8011 \family default
8012  command
8013 \end_layout
8014
8015 \begin_layout Enumerate
8016 remove the 
8017 \family typewriter
8018
8019 \backslash
8020 usepackage...{fontenc}
8021 \family default
8022  line if it appears (usually just after 
8023 \family typewriter
8024
8025 \backslash
8026 documentclass
8027 \family default
8028 }; also remove the 
8029 \family typewriter
8030
8031 \backslash
8032 secnumdepth
8033 \family default
8034  line if it appears.
8035 \end_layout
8036
8037 \begin_layout Enumerate
8038 remove everything between (and including) the 
8039 \family typewriter
8040
8041 \backslash
8042 makeatletter
8043 \family default
8044  and 
8045 \family typewriter
8046
8047 \backslash
8048 makeatother
8049 \family default
8050  commands, except for any commands you specifically put into the LaTeX preamble
8051  (which should appear immediately after the 
8052 \begin_inset Quotes eld
8053 \end_inset
8054
8055 User specified LaTeX commands
8056 \begin_inset Quotes erd
8057 \end_inset
8058
8059  comment in the 
8060 \family typewriter
8061 .tex
8062 \family default
8063  file).
8064 \end_layout
8065
8066 \end_deeper
8067 \begin_layout Enumerate
8068 Run the resulting file through LaTeX to make sure it still processes correctly.
8069 \end_layout
8070
8071 \begin_layout Enumerate
8072 Reread the journal requirements to make sure your filenames and formats
8073  are correct.
8074 \end_layout
8075
8076 \begin_layout Enumerate
8077 Submit it.
8078 \end_layout
8079
8080 \begin_layout Subsection
8081 Comments On Specific Commands
8082 \end_layout
8083
8084 \begin_layout Standard
8085 I will not describe the detailed usage of the individual AASTeX commands:
8086  the AASTeX User Guide (
8087 \family typewriter
8088 aasguide.tex
8089 \family default
8090 ) gives a good description of each.
8091  Thus it's probably easiest for me to go down the list as found in the guide
8092  and offer comments where necessary.
8093  So let's begin \SpecialChar \ldots{}
8094
8095 \end_layout
8096
8097 \begin_layout Subsubsection
8098 Things that work as expected
8099 \end_layout
8100
8101 \begin_layout Standard
8102 Because they work as you might expect, I simply list them and the section
8103  they are found in: 
8104 \family typewriter
8105
8106 \backslash
8107 documentclass
8108 \family default
8109  (2.1.1), 
8110 \family typewriter
8111
8112 \backslash
8113 begin{document}
8114 \family default
8115  (2.2), 
8116 \family typewriter
8117
8118 \backslash
8119 title
8120 \family default
8121  (2.3), 
8122 \family typewriter
8123
8124 \backslash
8125 author
8126 \family default
8127  (2.3), 
8128 \family typewriter
8129
8130 \backslash
8131 affil
8132 \family default
8133  (2.3), 
8134 \family typewriter
8135
8136 \backslash
8137 abstract
8138 \family default
8139  (2.4), 
8140 \family typewriter
8141
8142 \backslash
8143 keywords
8144 \family default
8145  (2.5), 
8146 \family typewriter
8147
8148 \backslash
8149 section
8150 \family default
8151  (2.7), 
8152 \family typewriter
8153
8154 \backslash
8155 subsection
8156 \family default
8157  (2.7), 
8158 \family typewriter
8159
8160 \backslash
8161 subsubsection
8162 \family default
8163  (2.7), 
8164 \family typewriter
8165
8166 \backslash
8167 paragraph
8168 \family default
8169  (2.7), 
8170 \family typewriter
8171
8172 \backslash
8173 facility
8174 \family default
8175  (2.10), 
8176 \family typewriter
8177
8178 \backslash
8179 begin{displaymath}
8180 \family default
8181  (2.12), 
8182 \family typewriter
8183
8184 \backslash
8185 begin{equation}
8186 \family default
8187  (2.12), 
8188 \family typewriter
8189
8190 \backslash
8191 begin{eqnarray}
8192 \family default
8193  (2.12), 
8194 \family typewriter
8195
8196 \backslash
8197 begin{mathletters}
8198 \family default
8199  (2.12), 
8200 \family typewriter
8201
8202 \backslash
8203 begin{thebibliography}
8204 \family default
8205  (2.13.1), 
8206 \family typewriter
8207
8208 \backslash
8209 bibitem
8210 \family default
8211  (2.13.2), all the cite commands and their variations (2.13.2), the generic
8212  graphicx figure commands (2.14.1), 
8213 \family typewriter
8214
8215 \backslash
8216 begin{table}
8217 \family default
8218  (2.15.4), 
8219 \family typewriter
8220
8221 \backslash
8222 begin{tabular}
8223 \family default
8224  (2.15.4), 
8225 \family typewriter
8226
8227 \backslash
8228 caption
8229 \family default
8230  (2.15.4), 
8231 \family typewriter
8232
8233 \backslash
8234 label
8235 \family default
8236  (2.15.4, amongst other places), 
8237 \family typewriter
8238
8239 \backslash
8240 tablerefs
8241 \family default
8242  (2.15.5), 
8243 \family typewriter
8244
8245 \backslash
8246 tablecomments
8247 \family default
8248  (2.15.5), 
8249 \family typewriter
8250
8251 \backslash
8252 url
8253 \family default
8254  (2.17.4), 
8255 \family typewriter
8256
8257 \backslash
8258 end{document}
8259 \family default
8260  (2.18).
8261 \end_layout
8262
8263 \begin_layout Standard
8264 The following style options also work correctly: 
8265 \family typewriter
8266 longabstract
8267 \family default
8268  (2.4), 
8269 \family typewriter
8270 preprint
8271 \family default
8272  (3.2.1), 
8273 \family typewriter
8274 preprint2
8275 \family default
8276  (3.2.2), 
8277 \family typewriter
8278 eqsecnum
8279 \family default
8280  (3.3), 
8281 \family typewriter
8282 flushrt
8283 \family default
8284  (3.4).
8285  Simply put them in the 
8286 \family sans
8287 Options
8288 \family default
8289  box in 
8290 \family sans
8291 Layout\SpecialChar \menuseparator
8292 Document
8293 \family default
8294 .
8295 \end_layout
8296
8297 \begin_layout Subsubsection
8298 Things that work, but require more comment
8299 \end_layout
8300
8301 \begin_layout Standard
8302 The following items work, but require a little more discussion:
8303 \end_layout
8304
8305 \begin_layout Itemize
8306 These items are reserved for use by the journal editors, but you can put
8307  them into the LaTeX preamble if you feel compelled to do so: 
8308 \family typewriter
8309
8310 \backslash
8311 received
8312 \family default
8313
8314 \family typewriter
8315
8316 \backslash
8317 revised
8318 \family default
8319
8320 \family typewriter
8321
8322 \backslash
8323 accepted
8324 \family default
8325
8326 \family typewriter
8327
8328 \backslash
8329 ccc
8330 \family default
8331
8332 \family typewriter
8333
8334 \backslash
8335 cpright
8336 \family default
8337  (all from 2.1.3)
8338 \end_layout
8339
8340 \begin_layout Itemize
8341 These items may be placed in the LaTeX preamble, and are included as blanks
8342  in the template file: 
8343 \family typewriter
8344
8345 \backslash
8346 slugcomment
8347 \family default
8348  (2.1.4), 
8349 \family typewriter
8350
8351 \backslash
8352 shorttitle
8353 \family default
8354  (2.1.5), 
8355 \family typewriter
8356
8357 \backslash
8358 shortauthors
8359 \family default
8360  (2.1.5)
8361 \end_layout
8362
8363 \begin_layout Itemize
8364
8365 \family typewriter
8366
8367 \backslash
8368 email
8369 \family default
8370  (2.3) – can only be used 
8371 \begin_inset Quotes eld
8372 \end_inset
8373
8374 standalone
8375 \begin_inset Quotes erd
8376 \end_inset
8377
8378 , not in the middle of a paragraph.
8379  Use TeX code if you need to embed it.
8380 \end_layout
8381
8382 \begin_layout Itemize
8383
8384 \family typewriter
8385
8386 \backslash
8387 and
8388 \family default
8389  (2.3) – will have extra {} after it.
8390  This should not cause an error.
8391 \end_layout
8392
8393 \begin_layout Itemize
8394
8395 \family typewriter
8396
8397 \backslash
8398 notetoeditor
8399 \family default
8400  (2.6) – can only be used 
8401 \begin_inset Quotes eld
8402 \end_inset
8403
8404 standalone
8405 \begin_inset Quotes erd
8406 \end_inset
8407
8408 , not in the middle of a paragraph.
8409  Use TeX code if you need to embed it.
8410 \end_layout
8411
8412 \begin_layout Itemize
8413
8414 \family typewriter
8415
8416 \backslash
8417 placetable
8418 \family default
8419  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8420  hand
8421 \end_layout
8422
8423 \begin_layout Itemize
8424
8425 \family typewriter
8426
8427 \backslash
8428 placefigure
8429 \family default
8430  (2.8) – same as for 
8431 \family typewriter
8432
8433 \backslash
8434 placetable
8435 \end_layout
8436
8437 \begin_layout Itemize
8438
8439 \family typewriter
8440
8441 \backslash
8442 acknowledgements
8443 \family default
8444  (2.9) – will have extra {} after it.
8445  This should not cause an error.
8446 \end_layout
8447
8448 \begin_layout Itemize
8449
8450 \family typewriter
8451
8452 \backslash
8453 appendix
8454 \family default
8455  (2.11) – will have extra {} after it.
8456  This should not cause an error.
8457 \end_layout
8458
8459 \begin_layout Itemize
8460
8461 \family typewriter
8462
8463 \backslash
8464 figcaption
8465 \family default
8466  (2.14.2) – you can insert an optional filename argument by placing the cursor
8467  at the beginning of the text and selecting 
8468 \family sans
8469 Insert\SpecialChar \menuseparator
8470 Short Title
8471 \family default
8472 .
8473  
8474 \begin_inset Quotes eld
8475 \end_inset
8476
8477 Short Title
8478 \begin_inset Quotes erd
8479 \end_inset
8480
8481  inserts an optional argument of the type needed by 
8482 \family typewriter
8483
8484 \backslash
8485 figcaption
8486 \family default
8487 .
8488  Hopefully it will be renamed someday.
8489 \end_layout
8490
8491 \begin_layout Itemize
8492
8493 \family typewriter
8494
8495 \backslash
8496 objectname
8497 \family default
8498  (2.17.1) – same as 
8499 \family typewriter
8500
8501 \backslash
8502 figcaption
8503 \family default
8504  for the catalog ID optional parameter
8505 \end_layout
8506
8507 \begin_layout Itemize
8508
8509 \family typewriter
8510
8511 \backslash
8512 dataset
8513 \family default
8514  (2.17.1) – same as 
8515 \family typewriter
8516
8517 \backslash
8518 figcaption
8519 \family default
8520  for the catalog ID optional parameter
8521 \end_layout
8522
8523 \begin_layout Subsubsection
8524 Things not implemented, use TeX code
8525 \end_layout
8526
8527 \begin_layout Standard
8528
8529 \family typewriter
8530
8531 \backslash
8532 altaffilmark
8533 \family default
8534  (2.3), 
8535 \family typewriter
8536
8537 \backslash
8538 altaffiltext
8539 \family default
8540  (2.3), 
8541 \family typewriter
8542
8543 \backslash
8544 eqnum
8545 \family default
8546  (2.12), 
8547 \family typewriter
8548
8549 \backslash
8550 setcounter{equation}
8551 \family default
8552  (2.12), Journal name abbreviations (2.13.4), 
8553 \family typewriter
8554
8555 \backslash
8556 figurenum
8557 \family default
8558  (2.14.1), 
8559 \family typewriter
8560
8561 \backslash
8562 epsscale
8563 \family default
8564  (2.14.1), 
8565 \family typewriter
8566
8567 \backslash
8568 plotone
8569 \family default
8570  (2.14.1), 
8571 \family typewriter
8572
8573 \backslash
8574 plottwo
8575 \family default
8576  (2.14.1), 
8577 \family typewriter
8578
8579 \backslash
8580 tablenum
8581 \family default
8582  (2.15.4), 
8583 \family typewriter
8584
8585 \backslash
8586 tableline
8587 \family default
8588  (2.15.4, insert it as the first element in the lefthand cell after where
8589  you want it.
8590  Don't use any of LyX's rules in the table), 
8591 \family typewriter
8592
8593 \backslash
8594 tablenotemark
8595 \family default
8596  (2.15.5), 
8597 \family typewriter
8598
8599 \backslash
8600 tablenotetext
8601 \family default
8602  (2.15.5), much of Misc (2.17, except 
8603 \family typewriter
8604
8605 \backslash
8606 objectname
8607 \family default
8608
8609 \family typewriter
8610
8611 \backslash
8612 dataset
8613 \family default
8614
8615 \family typewriter
8616
8617 \backslash
8618 url
8619 \family default
8620 , and 
8621 \family typewriter
8622
8623 \backslash
8624 email
8625 \family default
8626 ; see above), 
8627 \family typewriter
8628
8629 \backslash
8630 singlespace
8631 \family default
8632  (3.1), 
8633 \family typewriter
8634
8635 \backslash
8636 doublespace
8637 \family default
8638  (3.1), 
8639 \family typewriter
8640
8641 \backslash
8642 onecolumn
8643 \family default
8644  (3.2), 
8645 \family typewriter
8646
8647 \backslash
8648 twocolumn
8649 \family default
8650  (3.2)
8651 \end_layout
8652
8653 \begin_layout Subsubsection
8654 Things that cannot be implemented
8655 \end_layout
8656
8657 \begin_layout Standard
8658 \SpecialChar \ldots{}
8659  at least in any meaningful sort of way, so I suggest ignoring them.
8660  They are the references environment (2.13.3), and the deluxetable environment
8661  (2.15).
8662  If you really, really need to use deluxetable, I suggest editing it in
8663  a separate file with a text editor, then using 
8664 \family sans
8665 Insert\SpecialChar \menuseparator
8666 Child
8667 \begin_inset space ~
8668 \end_inset
8669
8670 Document
8671 \family default
8672  to include it in your LyX document.
8673  See the 
8674 \family typewriter
8675 aas_sample.lyx
8676 \family default
8677  file to see an example of this.
8678 \end_layout
8679
8680 \begin_layout Subsection
8681 FAQs, Tips, Tricks, and Other Ruminations
8682 \end_layout
8683
8684 \begin_layout Subsubsection
8685 Getting LyX and AASTeX to cooperate
8686 \end_layout
8687
8688 \begin_layout Standard
8689 It can be a bit tricky to get LyX to recognize a new layout and document
8690  class.
8691  When all else fails, do this:
8692 \end_layout
8693
8694 \begin_layout Enumerate
8695 Make certain that LaTeX can find AASTeX.
8696  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8697  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8698 \family typewriter
8699 sample.tex
8700 \family default
8701 .
8702 \end_layout
8703
8704 \begin_layout Enumerate
8705 Make certain that 
8706 \family typewriter
8707 aastex.layout
8708 \family default
8709  appears in LyX's 
8710 \family typewriter
8711 layouts
8712 \family default
8713  folder
8714 \end_layout
8715
8716 \begin_layout Enumerate
8717 Rerun 
8718 \family sans
8719 Tools\SpecialChar \menuseparator
8720 Reconfigure
8721 \family default
8722  in LyX, then restart LyX.
8723 \end_layout
8724
8725 \begin_layout Enumerate
8726 Open a regular new file, not from a template.
8727  Does AASTeX appear in the class list in 
8728 \family sans
8729 Document\SpecialChar \menuseparator
8730 Settings
8731 \family default
8732 ?
8733 \end_layout
8734
8735 \begin_layout Standard
8736 If you get a warning from an existing AASTeX document about not being able
8737  to find the AASTeX layout or a message about 
8738 \begin_inset Quotes eld
8739 \end_inset
8740
8741 You should not mix title layouts with normal ones
8742 \begin_inset Quotes erd
8743 \end_inset
8744
8745 , things haven't been installed correctly.
8746 \end_layout
8747
8748 \begin_layout Subsubsection
8749 LaTeX error processing a table 
8750 \end_layout
8751
8752 \begin_layout Standard
8753 LyX, by default, attempts to center the table caption/title.
8754  This seems to produce a bad interaction in AASTeX so you should click somewhere
8755  in the caption/title, then select 
8756 \family sans
8757 Edit\SpecialChar \menuseparator
8758 Paragraph
8759 \begin_inset space ~
8760 \end_inset
8761
8762 Settings
8763 \family default
8764 , then set the 
8765 \family sans
8766 Alignment
8767 \family default
8768  to 
8769 \family sans
8770 Block
8771 \family default
8772 .
8773  This took care of it for me.
8774 \end_layout
8775
8776 \begin_layout Subsubsection
8777 References
8778 \end_layout
8779
8780 \begin_layout Standard
8781 A couple of things: 1) I have noticed some funny spacing in the reference
8782  entries in the text.
8783  When you enter the bibliography item data, make sure their is 
8784 \emph on
8785 no
8786 \emph default
8787  space between the last author and the parenthesis setting off the year;
8788  
8789 \emph on
8790 e.
8791 \begin_inset space \thinspace{}
8792 \end_inset
8793
8794 g.
8795 \begin_inset space \space{}
8796 \end_inset
8797
8798
8799 \emph default
8800 type 
8801 \family typewriter
8802 Ressler(1992)
8803 \family default
8804 , not 
8805 \family typewriter
8806 Ressler (1992)
8807 \family default
8808 .
8809  2) Entering the references at all is not obvious.
8810  The easiest thing is to start typing your first reference at the end of
8811  the document, then mark it as type 
8812 \family sans
8813 References
8814 \family default
8815 .
8816  That will put a small gray box in front of what you just typed.
8817  Click on the box to fill in the rest of the information.
8818  For new references, go to the end of an existing reference and press return.
8819  That will create a new line with its own box, etc.
8820 \end_layout
8821
8822 \begin_layout Subsubsection
8823 Including EPS files
8824 \end_layout
8825
8826 \begin_layout Standard
8827 Even though AASTeX provides its own figure commands (
8828 \family typewriter
8829
8830 \backslash
8831 plotone
8832 \family default
8833 , for example), I much prefer LaTeX's standard figure commands (with the
8834  default graphicx).
8835  You can insert the 
8836 \family typewriter
8837
8838 \backslash
8839 plotone
8840 \family default
8841 , etc.
8842 \begin_inset space ~
8843 \end_inset
8844
8845 commands as TeX code into a Figure Float box if you desire, but I never
8846  have much luck getting the layout right.
8847  With the standard graphics, LyX will insert a 
8848 \family typewriter
8849
8850 \backslash
8851 usepackage{graphicx}
8852 \family default
8853  command into the LaTeX preamble and handle the figures in the standard
8854  LaTeX2e way, interspersing the figures in the text.
8855  I believe ApJ accepts figures exactly this way now; AJ might still use
8856  the 
8857 \begin_inset Quotes eld
8858 \end_inset
8859
8860 stack everything at the end
8861 \begin_inset Quotes erd
8862 \end_inset
8863
8864  technique.
8865 \end_layout
8866
8867 \begin_layout Subsubsection
8868 Things I could have done, but didn't
8869 \end_layout
8870
8871 \begin_layout Standard
8872 There are a few 
8873 \begin_inset Quotes eld
8874 \end_inset
8875
8876 pretty
8877 \begin_inset Quotes erd
8878 \end_inset
8879
8880  things I could have implemented, but chose not to.
8881  For instance, I saw no point in double-spacing the text in the LyX window,
8882  even though it is double-spaced in the paper manuscript.
8883  Also, I chose not to make separate layouts for the preprint and preprint2
8884  styles.
8885  Since I assume you will spend most of your time in the plain manuscript
8886  mode anyway, I decided not to chew up more disk space with this.
8887  
8888 \end_layout
8889
8890 \begin_layout Subsection
8891 Final Caveat
8892 \end_layout
8893
8894 \begin_layout Standard
8895 Your mileage may vary.
8896  I've now had papers published by both ApJ and AJ that have had 98% of the
8897  effort done in LyX; the last 2% was the LaTeX post-processing and a few
8898  cleanups.
8899  I have had no trouble with the submission process, and I'm sure the journals
8900  were never aware that there might be a difference.
8901  So, go forth and publish!
8902 \end_layout
8903
8904 \begin_layout Section
8905 AMS LaTeX
8906 \end_layout
8907
8908 \begin_layout Standard
8909 by 
8910 \noun on
8911 David Johnson
8912 \noun default
8913 ; updated by 
8914 \noun on
8915 Richard Heck
8916 \end_layout
8917
8918 \begin_layout Standard
8919 \begin_inset VSpace bigskip
8920 \end_inset
8921
8922
8923 \end_layout
8924
8925 \begin_layout Standard
8926 \noindent
8927 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8928  papers to be submitted to American Mathematical Society publications.
8929  The layouts are not tailored to a specific journal, but easily can be.
8930  You should refer to the AMS documentation for specific instructions for
8931  each journal (usually it will entail only changing a single line in the
8932  TeX output).
8933  That documentation is available on the Web at 
8934 \begin_inset Flex URL
8935 status open
8936
8937 \begin_layout Plain Layout
8938
8939 http://www.ams.org
8940 \end_layout
8941
8942 \end_inset
8943
8944  or by ftp at 
8945 \begin_inset Flex URL
8946 status open
8947
8948 \begin_layout Plain Layout
8949
8950 ftp://ftp.ams.org/pub/tex/amslatex/
8951 \end_layout
8952
8953 \end_inset
8954
8955 .
8956  These layouts are appropriate, and useful, for any mathematical writing.
8957  
8958 \end_layout
8959
8960 \begin_layout Standard
8961 There are two basic AMS LaTeX layouts: 
8962 \end_layout
8963
8964 \begin_layout Itemize
8965 amsart: The standard AMS article format.
8966 \end_layout
8967
8968 \begin_layout Itemize
8969 amsbook: the standard AMS book (really, monograph) format.
8970  
8971 \end_layout
8972
8973 \begin_layout Standard
8974 The layouts themselves contain only the minimum necessary to use the AMS
8975  classes.
8976  They do not, in particular, contain any of the `theorem' environments used
8977  for setting theorems, lemmas, and the like.
8978  These are contained, instead, in the 
8979 \begin_inset Flex Code
8980 status collapsed
8981
8982 \begin_layout Plain Layout
8983 Theorems (AMS)
8984 \end_layout
8985
8986 \end_inset
8987
8988  module, which is loaded by default when you select one of the AMS classes.
8989  (It can also be used with other classes and can be removed, if you would
8990  rather use something else.) Less commonly used environments are in the 
8991 \begin_inset Flex Code
8992 status collapsed
8993
8994 \begin_layout Plain Layout
8995 Theorems (AMS-Extended)
8996 \end_layout
8997
8998 \end_inset
8999
9000  module, which must be loaded manually.
9001 \end_layout
9002
9003 \begin_layout Standard
9004 By default, theorems and the like are numbered consecutively throughout
9005  the document, but this may be modified by loading the module 
9006 \begin_inset Flex Code
9007 status collapsed
9008
9009 \begin_layout Plain Layout
9010 Theorems (Order by Section)
9011 \end_layout
9012
9013 \end_inset
9014
9015  or, if you are using 
9016 \begin_inset Flex Code
9017 status collapsed
9018
9019 \begin_layout Plain Layout
9020 book (AMS)
9021 \end_layout
9022
9023 \end_inset
9024
9025 , the module 
9026 \begin_inset Flex Code
9027 status collapsed
9028
9029 \begin_layout Plain Layout
9030 Theorems (Order by Chapter)
9031 \end_layout
9032
9033 \end_inset
9034
9035 .
9036  These will number the results as 
9037 \begin_inset Formula $n.m$
9038 \end_inset
9039
9040 , where the first number refers to the section (or chapter) and the second
9041  refers to the total number of results so far in that section (or chapter).
9042  Many environments are also available unnumbered.
9043  These are indicated by an asterisk at the end.
9044  If you happen to want 
9045 \emph on
9046 only
9047 \emph default
9048  unnumbered results, the module 
9049 \begin_inset Flex Code
9050 status collapsed
9051
9052 \begin_layout Plain Layout
9053 Theorems (Starred)
9054 \end_layout
9055
9056 \end_inset
9057
9058  provides that option.
9059 \end_layout
9060
9061 \begin_layout Standard
9062 Note that these modules do not 
9063 \emph on
9064 have
9065 \emph default
9066  to be used with the AMS classes.
9067  It is perfectly possible to use the 
9068 \begin_inset Flex Code
9069 status collapsed
9070
9071 \begin_layout Plain Layout
9072 Theorems (AMS)
9073 \end_layout
9074
9075 \end_inset
9076
9077  module, and the others mentioned, with other classes, such as 
9078 \begin_inset Flex Code
9079 status collapsed
9080
9081 \begin_layout Plain Layout
9082 article
9083 \end_layout
9084
9085 \end_inset
9086
9087
9088 \begin_inset Flex Code
9089 status collapsed
9090
9091 \begin_layout Plain Layout
9092 report
9093 \end_layout
9094
9095 \end_inset
9096
9097
9098 \begin_inset Flex Code
9099 status collapsed
9100
9101 \begin_layout Plain Layout
9102 book (KOMA-script)
9103 \end_layout
9104
9105 \end_inset
9106
9107 , and so forth.
9108 \end_layout
9109
9110 \begin_layout Subsection
9111 What these layouts provide
9112 \end_layout
9113
9114 \begin_layout Standard
9115 There is a long list of included environments provided by these layouts.
9116  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9117  variety of `theorem' environments.
9118  However, the AMS recommends the environments that are available in LyX.
9119  
9120 \end_layout
9121
9122 \begin_layout Standard
9123 The following environments—as well as the standard environments, such as
9124  
9125 \begin_inset Flex Noun
9126 status collapsed
9127
9128 \begin_layout Plain Layout
9129 section
9130 \end_layout
9131
9132 \end_inset
9133
9134
9135 \begin_inset Flex Noun
9136 status collapsed
9137
9138 \begin_layout Plain Layout
9139 bibliography
9140 \end_layout
9141
9142 \end_inset
9143
9144
9145 \begin_inset Flex Noun
9146 status collapsed
9147
9148 \begin_layout Plain Layout
9149 title
9150 \end_layout
9151
9152 \end_inset
9153
9154
9155 \begin_inset Flex Noun
9156 status collapsed
9157
9158 \begin_layout Plain Layout
9159 author
9160 \end_layout
9161
9162 \end_inset
9163
9164 , and 
9165 \begin_inset Flex Noun
9166 status collapsed
9167
9168 \begin_layout Plain Layout
9169 date
9170 \end_layout
9171
9172 \end_inset
9173
9174 —are provided by 
9175 \begin_inset Flex Code
9176 status collapsed
9177
9178 \begin_layout Plain Layout
9179 article (AMS)
9180 \end_layout
9181
9182 \end_inset
9183
9184  and 
9185 \begin_inset Flex Code
9186 status collapsed
9187
9188 \begin_layout Plain Layout
9189 book (AMS)
9190 \end_layout
9191
9192 \end_inset
9193
9194 :
9195 \end_layout
9196
9197 \begin_layout Description
9198 Address This should be the author's permanent address.
9199 \end_layout
9200
9201 \begin_layout Description
9202 Current
9203 \begin_inset space ~
9204 \end_inset
9205
9206 Address This should be the author's temporary address at the time of submission,
9207  if different from the Address.
9208 \end_layout
9209
9210 \begin_layout Description
9211 Email Author's e-mail address
9212 \end_layout
9213
9214 \begin_layout Description
9215 URL Author's Web address, if desired.
9216 \end_layout
9217
9218 \begin_layout Description
9219 Keywords Key words or phrases used to identify specific topics discussed
9220  in the paper.
9221 \end_layout
9222
9223 \begin_layout Description
9224 Subjectclass These refer to the AMS Subject Classifications, published and
9225  described in 
9226 \emph on
9227 Mathematical Reviews
9228 \emph default
9229 .
9230  These are also available online at the AMS cites listed above.
9231 \end_layout
9232
9233 \begin_layout Description
9234 Thanks
9235 \end_layout
9236
9237 \begin_layout Description
9238 Dedicatory
9239 \end_layout
9240
9241 \begin_layout Description
9242 Translator
9243 \end_layout
9244
9245 \begin_layout Standard
9246 The following environments are provided by both the 
9247 \begin_inset Flex Code
9248 status collapsed
9249
9250 \begin_layout Plain Layout
9251 Theorems
9252 \end_layout
9253
9254 \end_inset
9255
9256  and 
9257 \begin_inset Flex Code
9258 status collapsed
9259
9260 \begin_layout Plain Layout
9261 Theorems (AMS)
9262 \end_layout
9263
9264 \end_inset
9265
9266  modules, in the latter case in both starred (unnumbered) and unstarred
9267  (numbered) versions.
9268  These same environments are provided only in the starred versions by the
9269  
9270 \begin_inset Flex Code
9271 status collapsed
9272
9273 \begin_layout Plain Layout
9274 Theorems (Starred)
9275 \end_layout
9276
9277 \end_inset
9278
9279  module:
9280 \end_layout
9281
9282 \begin_layout Theorem
9283 This is typically used for the statements of major results.
9284  
9285 \end_layout
9286
9287 \begin_layout Corollary*
9288 This is used for statements which follow fairly directly from previous statement
9289 s.
9290  Again, these can be major results.
9291  
9292 \end_layout
9293
9294 \begin_layout Lemma
9295 These are smaller results needed to prove other statements.
9296 \end_layout
9297
9298 \begin_layout Proposition
9299 These are less major results which (hopefully) add to the general theory
9300  being discussed.
9301 \end_layout
9302
9303 \begin_layout Conjecture
9304 These are statements provided without justification, which the author does
9305  not know how to prove, but which seem to be true (to the author, at least).
9306 \end_layout
9307
9308 \begin_layout Definition*
9309 Guess what this is for.
9310  The font is different for this environment than for the previous ones.
9311  
9312 \end_layout
9313
9314 \begin_layout Example*
9315 Used for examples illustrating proven results.
9316 \end_layout
9317
9318 \begin_layout Problem
9319 It's not really known what this is for.
9320  You should figure it out.
9321 \end_layout
9322
9323 \begin_layout Exercise*
9324 Write a description for this one.
9325 \end_layout
9326
9327 \begin_layout Remark
9328 This environment is also a type of theorem, usually a lesser sort of observation.
9329 \end_layout
9330
9331 \begin_layout Claim*
9332 Often used in the course of giving a proof of a larger result.
9333 \end_layout
9334
9335 \begin_layout Case
9336 Generally, these are used to break up long arguments, using specific instances
9337  of some condition.
9338  
9339 \end_layout
9340
9341 \begin_layout Case
9342 The numbering scheme for cases is on its own, not together with other numbered
9343  statements.
9344  
9345 \end_layout
9346
9347 \begin_layout Proof
9348 At the end of this environment, a QED symbol (usually a square, but it can
9349  vary with different styles) is placed.
9350  If you want to have other environments within this one—for example, Case
9351  environments—and have the QED symbol appear only after them, then the other
9352  environments need to be nested within the proof environment.
9353  See the section 
9354 \emph on
9355 Nesting Environments
9356 \emph default
9357  of the 
9358 \emph on
9359 User's Guide
9360 \emph default
9361  for information on nesting.
9362 \end_layout
9363
9364 \begin_layout Standard
9365 And these environments are provided by 
9366 \begin_inset Flex Code
9367 status collapsed
9368
9369 \begin_layout Plain Layout
9370 Theorems (AMS-Extended)
9371 \end_layout
9372
9373 \end_inset
9374
9375 :
9376 \end_layout
9377
9378 \begin_layout Criterion*
9379 A required condition.
9380 \end_layout
9381
9382 \begin_layout Algorithm*
9383 A general procedure to be used.
9384 \end_layout
9385
9386 \begin_layout Axiom*
9387 This is a property or statement taken as true within the system being discussed.
9388 \end_layout
9389
9390 \begin_layout Condition*
9391 Sometimes used to state a condition assumed within the present context of
9392  discussion.
9393 \end_layout
9394
9395 \begin_layout Note*
9396 Similar to a Remark.
9397 \end_layout
9398
9399 \begin_layout Notation*
9400 Used for the explanation of, yes, notation.
9401 \end_layout
9402
9403 \begin_layout Summary
9404 Do we really need to tell you? 
9405 \end_layout
9406
9407 \begin_layout Acknowledgement*
9408 Acknowledgement.
9409 \end_layout
9410
9411 \begin_layout Conclusion*
9412 Sometimes used at the end of a long train of argument.
9413 \end_layout
9414
9415 \begin_layout Fact
9416 Used in a way similar to Proposition, though perhaps lower on the scale.
9417 \end_layout
9418
9419 \begin_layout Standard
9420 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9421  fonts packages.
9422  They need to be available on your system in order to use these environments.
9423 \end_layout
9424
9425 \begin_layout Section
9426 AGU journals (
9427 \family sans
9428 aguplus
9429 \family default
9430 )
9431 \end_layout
9432
9433 \begin_layout Standard
9434 by 
9435 \shape smallcaps
9436 Martin Vermeer
9437 \end_layout
9438
9439 \begin_layout Subsection
9440 Description
9441 \end_layout
9442
9443 \begin_layout Standard
9444 These are the layout files for some of the journals of the American Geophysical
9445  Society.
9446  It is assumed that you have both the AGU's own class files and AGUplus
9447  installed (everything to be found at
9448 \begin_inset Flex URL
9449 status collapsed
9450
9451 \begin_layout Plain Layout
9452
9453 ftp://ftp.agu.org/journals/latex/journals
9454 \end_layout
9455
9456 \end_inset
9457
9458 ).
9459 \end_layout
9460
9461 \begin_layout Subsection
9462 New styles
9463 \end_layout
9464
9465 \begin_layout Standard
9466 Redefined are 
9467 \family sans
9468 Paragraph
9469 \family default
9470
9471 \family sans
9472 Paragraph*
9473 \family default
9474 .
9475  They are still called this in the LyX GUI, though their LaTeX equivalents
9476  in the AGU classes are 
9477 \family sans
9478 Subsubsubsection
9479 \family default
9480  and 
9481 \family sans
9482 Subsubsubsection*
9483 \family default
9484 .
9485 \end_layout
9486
9487 \begin_layout Standard
9488 Newly defined styles are 
9489 \family sans
9490 Left_Header
9491 \family default
9492
9493 \family sans
9494 Right_Header
9495 \family default
9496
9497 \family sans
9498 Received
9499 \family default
9500
9501 \family sans
9502 Revised
9503 \family default
9504
9505 \family sans
9506 Accepted
9507 \family default
9508
9509 \family sans
9510 CCC
9511 \family default
9512
9513 \family sans
9514 PaperId
9515 \family default
9516
9517 \family sans
9518 AuthorAddr
9519 \family default
9520
9521 \family sans
9522 SlugComment
9523 \family default
9524 .
9525  These are mostly manuscript attributes and defined in the AGU class documentati
9526 on.
9527 \end_layout
9528
9529 \begin_layout Standard
9530 I suspect this is still badly incomplete.
9531 \end_layout
9532
9533 \begin_layout Subsection
9534 New floats
9535 \end_layout
9536
9537 \begin_layout Standard
9538
9539 \family sans
9540 Planotable
9541 \family default
9542  and 
9543 \family sans
9544 Plate
9545 \family default
9546 .
9547  We also have a new 
9548 \family sans
9549 Table_Caption
9550 \family default
9551 .
9552 \end_layout
9553
9554 \begin_layout Subsection
9555 Supported journals
9556 \end_layout
9557
9558 \begin_layout Itemize
9559
9560 \emph on
9561 Journal of Geophysical Research
9562 \emph default
9563
9564 \family typewriter
9565 jgrga.layout
9566 \family default
9567  — Martin Vermeer
9568 \end_layout
9569
9570 \begin_layout Standard
9571 Add your own, it isn't so hard! Look at the 
9572 \family typewriter
9573 jgrga.layout
9574 \family default
9575  example and 
9576 \family typewriter
9577 aguplus.inc
9578 \family default
9579 .
9580 \end_layout
9581
9582 \begin_layout Subsection
9583 Bugs and things to remember
9584 \end_layout
9585
9586 \begin_layout Standard
9587 In order to use the new layouts, you must remember to do the following for
9588  a new document:
9589 \end_layout
9590
9591 \begin_layout Enumerate
9592
9593 \emph on
9594 Turn off babel
9595 \emph default
9596 .
9597  This can be done in the 
9598 \family sans
9599 Layout\SpecialChar \menuseparator
9600 Document
9601 \family default
9602  or 
9603 \family sans
9604 Document\SpecialChar \menuseparator
9605 Settings
9606 \family default
9607  menu item.
9608  (AGU articles are always in English, right? So 
9609 \emph on
9610 don't
9611 \emph default
9612  choose a language.)
9613 \end_layout
9614
9615 \begin_layout Enumerate
9616 Enter 
9617 \family typewriter
9618 jgrga
9619 \family default
9620  into the document's 
9621 \family sans
9622 Extra Options
9623 \family default
9624  field.
9625  (Yes, this is a bug.)
9626 \end_layout
9627
9628 \begin_layout Enumerate
9629 Make sure you use the 
9630 \family typewriter
9631 agu.bst
9632 \family default
9633  bibliography style, by entering 
9634 \family sans
9635 agu
9636 \family default
9637  into the second field of the BibTeX inset.
9638  None of the standard styles will do.
9639 \end_layout
9640
9641 \begin_layout Section
9642 Broadway
9643 \end_layout
9644
9645 \begin_layout Standard
9646 by 
9647 \shape smallcaps
9648 Garst Reese
9649 \end_layout
9650
9651 \begin_layout Subsection
9652 Introduction
9653 \end_layout
9654
9655 \begin_layout Standard
9656 Broadway is for writing plays.
9657  The format is more decorative than Hollywood, and much less standardized.
9658  This format should be suitable for workshops.
9659 \end_layout
9660
9661 \begin_layout Subsection
9662 Special problems
9663 \end_layout
9664
9665 \begin_layout Standard
9666 The same as in Hollywood.
9667 \end_layout
9668
9669 \begin_layout Subsection
9670 Special features
9671 \end_layout
9672
9673 \begin_layout Standard
9674 Insert the 
9675 \family sans
9676 Speaker
9677 \family default
9678  names as labels then cross-reference the label to insert the name.
9679  The cross-reference dialog will show the current cast of characters.
9680 \end_layout
9681
9682 \begin_layout Subsection
9683 Paper size and Margins
9684 \end_layout
9685
9686 \begin_layout Standard
9687 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9688 \end_layout
9689
9690 \begin_layout Subsection
9691 Environments
9692 \end_layout
9693
9694 \begin_layout Standard
9695 The following environments are available.
9696  You can use broadway.bind to get the bind keys shown at the right.
9697 \end_layout
9698
9699 \begin_layout Itemize
9700
9701 \family sans
9702 Standard
9703 \begin_inset Newline newline
9704 \end_inset
9705
9706
9707 \family default
9708 You should not have to use this, but it is here for anything that does not
9709  fit otherwise.
9710 \end_layout
9711
9712 \begin_layout Itemize
9713
9714 \family sans
9715 Narrative
9716 \begin_inset space \hfill{}
9717 \end_inset
9718
9719 M-z n
9720 \begin_inset Newline newline
9721 \end_inset
9722
9723
9724 \family default
9725 Used to describe stage setting and the action.
9726  First use of speaker names in all CAPs.
9727 \end_layout
9728
9729 \begin_layout Itemize
9730
9731 \family sans
9732 ACT
9733 \begin_inset space \hfill{}
9734 \end_inset
9735
9736 M-z a
9737 \begin_inset Newline newline
9738 \end_inset
9739
9740
9741 \family default
9742 Automatically numbered.
9743  On screen it will be arabic, but will print as Roman.
9744 \end_layout
9745
9746 \begin_layout Itemize
9747
9748 \family sans
9749 ACT*
9750 \begin_inset space \hfill{}
9751 \end_inset
9752
9753 M-z S at
9754 \begin_inset Newline newline
9755 \end_inset
9756
9757
9758 \family default
9759 Subtitle for 
9760 \family sans
9761 ACT.
9762
9763 \family default
9764  It is just centered text.
9765 \end_layout
9766
9767 \begin_layout Itemize
9768
9769 \family sans
9770 SCENE
9771 \begin_inset space \hfill{}
9772 \end_inset
9773
9774 M-z S-S
9775 \begin_inset Newline newline
9776 \end_inset
9777
9778
9779 \family default
9780 Not automatically numbered.
9781  You supply the number.
9782  This is because I couldn't figure out how.
9783 \end_layout
9784
9785 \begin_layout Itemize
9786
9787 \family sans
9788 AT_RISE:
9789 \begin_inset space \hfill{}
9790 \end_inset
9791
9792 M-z S-R
9793 \begin_inset Newline newline
9794 \end_inset
9795
9796
9797 \family default
9798 A special case of Narrative to describe the setting and action as the curtain
9799  rises.
9800 \end_layout
9801
9802 \begin_layout Itemize
9803
9804 \family sans
9805 Speaker
9806 \begin_inset space \hfill{}
9807 \end_inset
9808
9809 M-z s
9810 \begin_inset Newline newline
9811 \end_inset
9812
9813
9814 \family default
9815 The speaker's (actor's) title, centered in all CAPS.
9816 \end_layout
9817
9818 \begin_layout Itemize
9819
9820 \family sans
9821 Parenthetical
9822 \begin_inset space \hfill{}
9823 \end_inset
9824
9825 M-z p
9826 \begin_inset Newline newline
9827 \end_inset
9828
9829
9830 \family default
9831 Instructions to the speaker.
9832  The parentheses are automatically inserted.
9833  The ( will appear on screen, but both will be in the printed play.
9834  This environment is only used within 
9835 \family sans
9836 Dialogue
9837 \family default
9838 .
9839 \end_layout
9840
9841 \begin_layout Itemize
9842
9843 \family sans
9844 Dialogue
9845 \begin_inset space \hfill{}
9846 \end_inset
9847
9848 M-z d
9849 \begin_inset Newline newline
9850 \end_inset
9851
9852
9853 \family default
9854 What the Speaker says.
9855 \end_layout
9856
9857 \begin_layout Itemize
9858
9859 \family sans
9860 CURTAIN
9861 \begin_inset space \hfill{}
9862 \end_inset
9863
9864 M-z S-C
9865 \begin_inset Newline newline
9866 \end_inset
9867
9868
9869 \family default
9870 The curtain comes down.
9871 \end_layout
9872
9873 \begin_layout Itemize
9874
9875 \family sans
9876 Title
9877 \begin_inset space \hfill{}
9878 \end_inset
9879
9880 M-z S-T
9881 \end_layout
9882
9883 \begin_layout Itemize
9884
9885 \family sans
9886 Author
9887 \begin_inset space \hfill{}
9888 \end_inset
9889
9890 M-z S-A
9891 \end_layout
9892
9893 \begin_layout Itemize
9894
9895 \family sans
9896 Right_Address
9897 \begin_inset space \hfill{}
9898 \end_inset
9899
9900 M-z r
9901 \end_layout
9902
9903 \begin_layout Standard
9904 Hello there.
9905 \end_layout
9906
9907 \begin_layout Section
9908 Dinbrief
9909 \end_layout
9910
9911 \begin_layout Standard
9912 The document class 
9913 \family sans
9914 dinbrief
9915 \family default
9916  can be used to type letters according to German conventions.
9917  A template file is included in 
9918 \family typewriter
9919 .../lyx/share/templates
9920 \family default
9921  for you to use as a starting point.
9922 \end_layout
9923
9924 \begin_layout Section
9925 EGS journals (
9926 \family sans
9927 egs
9928 \family default
9929 )
9930 \end_layout
9931
9932 \begin_layout Standard
9933 by 
9934 \shape smallcaps
9935 Martin Vermeer
9936 \end_layout
9937
9938 \begin_layout Subsection
9939 Description
9940 \end_layout
9941
9942 \begin_layout Standard
9943 This is the layout file for the European Geophysical Society journals.
9944  The needed 
9945 \family typewriter
9946 egs.cls
9947 \family default
9948  can be downloaded from the web site of the EGS under 
9949 \begin_inset Flex URL
9950 status collapsed
9951
9952 \begin_layout Plain Layout
9953
9954 www.copernicus.org
9955 \end_layout
9956
9957 \end_inset
9958
9959 .
9960 \end_layout
9961
9962 \begin_layout Subsection
9963 New styles
9964 \end_layout
9965
9966 \begin_layout Standard
9967
9968 \family sans
9969 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9970  Accepted
9971 \family default
9972
9973 \family sans
9974 Offsets
9975 \family default
9976 .
9977  The current layout file is unfortunately very unmodular and would benefit
9978  from using the various 
9979 \family typewriter
9980 std*.inc
9981 \family default
9982  file inclusions.
9983 \end_layout
9984
9985 \begin_layout Section
9986 Elsevier Journals
9987 \end_layout
9988
9989 \begin_layout Standard
9990 See the LyX template file 
9991 \family typewriter
9992 elsarticle.lyx
9993 \family default
9994 .
9995  It contains all infos you need.
9996 \end_layout
9997
9998 \begin_layout Section
9999 Foils [aka 
10000 \family sans
10001 FoilTeX
10002 \family default
10003 ]
10004 \begin_inset CommandInset label
10005 LatexCommand label
10006 name "sec:foiltex"
10007
10008 \end_inset
10009
10010
10011 \end_layout
10012
10013 \begin_layout Standard
10014 by 
10015 \noun on
10016 Allan Rae
10017 \end_layout
10018
10019 \begin_layout Subsection
10020 Introduction
10021 \end_layout
10022
10023 \begin_layout Standard
10024 This section describes how to use LyX to make slides for overhead projectors.
10025  There are two document classes that can do this: the default slides class
10026  and the 
10027 \family sans
10028 FoilTeX
10029 \family default
10030  slides class.
10031  This section documents the latter.
10032 \end_layout
10033
10034 \begin_layout Standard
10035 I'm going to say this again, nice and clear, so that there's no misunderstanding
10036 :
10037 \end_layout
10038
10039 \begin_layout Standard
10040 \begin_inset VSpace bigskip
10041 \end_inset
10042
10043
10044 \end_layout
10045
10046 \begin_layout Standard
10047 \align center
10048
10049 \size large
10050 This section documents the class 
10051 \begin_inset Quotes eld
10052 \end_inset
10053
10054
10055 \family sans
10056 slides (FoilTeX)
10057 \family default
10058
10059 \begin_inset Quotes erd
10060 \end_inset
10061
10062  
10063 \emph on
10064 only.
10065 \end_layout
10066
10067 \begin_layout Standard
10068 \begin_inset VSpace bigskip
10069 \end_inset
10070
10071
10072 \end_layout
10073
10074 \begin_layout Standard
10075 If you're looking for the documentation for 
10076 \begin_inset Quotes eld
10077 \end_inset
10078
10079
10080 \family sans
10081 slides (default)
10082 \family default
10083
10084 \begin_inset Quotes erd
10085 \end_inset
10086
10087 , check out section
10088 \begin_inset space ~
10089 \end_inset
10090
10091
10092 \begin_inset CommandInset ref
10093 LatexCommand ref
10094 reference "sec:slitex"
10095
10096 \end_inset
10097
10098 .
10099  If your machine doesn't have the 
10100 \family sans
10101 foils
10102 \family default
10103  class [
10104 \begin_inset Quotes eld
10105 \end_inset
10106
10107
10108 \family sans
10109 slides (FoilTeX)
10110 \family default
10111
10112 \begin_inset Quotes erd
10113 \end_inset
10114
10115 ] installed, you'll probably have to use the default 
10116 \family sans
10117 slides
10118 \family default
10119  class, which isn't quite as good as 
10120 \family sans
10121 foils.
10122 \end_layout
10123
10124 \begin_layout Standard
10125 The 
10126 \family sans
10127 foils
10128 \family default
10129  class is designed for use with version 2.1 of the 
10130 \family sans
10131 foils.cls
10132 \family default
10133  LaTeX class file which is now an integral part of LaTeX2e.
10134 \end_layout
10135
10136 \begin_layout Subsection
10137 Getting Started
10138 \end_layout
10139
10140 \begin_layout Standard
10141 Obviously, to use this document class, you need to select 
10142 \begin_inset Quotes eld
10143 \end_inset
10144
10145
10146 \family sans
10147 slides (FoilTeX)
10148 \family default
10149
10150 \begin_inset Quotes erd
10151 \end_inset
10152
10153  from the 
10154 \family sans
10155 Class
10156 \family default
10157  entry in the 
10158 \family sans
10159 Document
10160 \begin_inset space ~
10161 \end_inset
10162
10163 Layout
10164 \family default
10165  dialog.
10166  There are some settings in the 
10167 \family sans
10168 Document
10169 \begin_inset space ~
10170 \end_inset
10171
10172 Layout
10173 \family default
10174  dialog that you should know about that are specific to this class:
10175 \end_layout
10176
10177 \begin_layout Itemize
10178 Don't change the options 
10179 \family sans
10180 Sides
10181 \family default
10182  and 
10183 \family sans
10184 Columns
10185 \family default
10186  on the 
10187 \family sans
10188 Document
10189 \begin_inset space ~
10190 \end_inset
10191
10192 Layout
10193 \family default
10194  dialog.
10195  They're ignored by the 
10196 \family sans
10197 foils
10198 \family default
10199  class.
10200 \end_layout
10201
10202 \begin_layout Itemize
10203 The default font size is 20
10204 \begin_inset space \thinspace{}
10205 \end_inset
10206
10207 pt with the other options being 17
10208 \begin_inset space \thinspace{}
10209 \end_inset
10210
10211 pt, 25
10212 \begin_inset space \thinspace{}
10213 \end_inset
10214
10215 pt and 30
10216 \begin_inset space \thinspace{}
10217 \end_inset
10218
10219 pt.
10220 \end_layout
10221
10222 \begin_layout Itemize
10223 The default font is 
10224 \family sans
10225 sans
10226 \family default
10227  
10228 \family sans
10229 serif
10230 \family default
10231  but all math equations are still typeset in the usual roman font.
10232 \end_layout
10233
10234 \begin_layout Itemize
10235
10236 \family sans
10237 FoilTeX
10238 \family default
10239  supports A4 and Letter paper sizes as well as a special size for working
10240  with 35
10241 \begin_inset space \thinspace{}
10242 \end_inset
10243
10244 mm slides.
10245  It doesn't support A5, B5, legal or executive paper sizes.
10246 \end_layout
10247
10248 \begin_layout Itemize
10249 Don't bother changing the 
10250 \family sans
10251 Float Placement
10252 \family default
10253  settings because they are ignored anyway.
10254  All floats appear where they are defined in the text.
10255 \end_layout
10256
10257 \begin_layout Itemize
10258 The 
10259 \family sans
10260 Pagestyle
10261 \family default
10262  setting behaves a bit differently for this class.
10263  
10264 \family sans
10265 FoilTeX
10266 \family default
10267  provides extensive footer and header capabilities including a user-defined
10268  logo.
10269  See section
10270 \begin_inset space ~
10271 \end_inset
10272
10273
10274 \begin_inset CommandInset ref
10275 LatexCommand ref
10276 reference "sec:foilfoot"
10277
10278 \end_inset
10279
10280  for more details.
10281  The title page is treated differently to all other pages in the document
10282  and is 
10283 \emph on
10284 always
10285 \emph default
10286  unnumbered and 
10287 \emph on
10288 always
10289 \emph default
10290  has the logo centered at the bottom of the page (if one is defined).
10291  The possible page style choices and what they do are as follows:
10292 \end_layout
10293
10294 \begin_deeper
10295 \begin_layout Labeling
10296 \labelwidthstring MMMMMMM
10297
10298 \family sans
10299 \series bold
10300 empty
10301 \family default
10302 \series default
10303  The final output contains no page numbers, or other headers or footers
10304  (except footnotes of course).
10305  
10306 \end_layout
10307
10308 \begin_layout Labeling
10309 \labelwidthstring MMMMMMM
10310
10311 \family sans
10312 \series bold
10313 plain
10314 \family default
10315 \series default
10316  The final output contains page numbers centered at the bottom of the page.
10317  No other headings or footers (other than footnotes).
10318 \end_layout
10319
10320 \begin_layout Labeling
10321 \labelwidthstring MMMMMMM
10322
10323 \series bold
10324 foilheadings
10325 \series default
10326  Page numbers in lower right corner.
10327  Additional headers and footers are also shown.
10328  This is also the default.
10329 \end_layout
10330
10331 \begin_layout Labeling
10332 \labelwidthstring MMMMMMM
10333
10334 \series bold
10335 fancy
10336 \series default
10337  Gives you access to the 
10338 \family sans
10339 fancyheadings
10340 \family default
10341  package although its use with 
10342 \family sans
10343 FoilTeX
10344 \family default
10345  is discouraged by the writer of the 
10346 \family sans
10347 FoilTeX
10348 \family default
10349  package because of some potential page layout clashes.
10350 \end_layout
10351
10352 \end_deeper
10353 \begin_layout Subsubsection
10354 Extra Options
10355 \end_layout
10356
10357 \begin_layout Standard
10358 The following options may be used in the extra class options in the 
10359 \family sans
10360 Document\SpecialChar \menuseparator
10361 Settings
10362 \family default
10363  dialog.
10364 \end_layout
10365
10366 \begin_layout Labeling
10367 \labelwidthstring MMMMMMx
10368
10369 \series bold
10370 35mmSlide
10371 \series default
10372  This sets up the page layout for 7.33
10373 \begin_inset space \thinspace{}
10374 \end_inset
10375
10376 in by 11
10377 \begin_inset space \thinspace{}
10378 \end_inset
10379
10380 in paper, which is about the same aspect ratio as a 35
10381 \begin_inset space \thinspace{}
10382 \end_inset
10383
10384 mm slide, making it a bit easier to work with this medium.
10385 \end_layout
10386
10387 \begin_layout Labeling
10388 \labelwidthstring MMMMMMx
10389
10390 \series bold
10391 headrule
10392 \series default
10393  Places a rule across the page below the header on every page except the
10394  title page.
10395 \end_layout
10396
10397 \begin_layout Labeling
10398 \labelwidthstring MMMMMMx
10399
10400 \series bold
10401 footrule
10402 \series default
10403  Places a rule across the page above the footer on every page except the
10404  title page.
10405 \end_layout
10406
10407 \begin_layout Labeling
10408 \labelwidthstring MMMMMMx
10409
10410 \series bold
10411 dvips
10412 \series default
10413  This is automatically set each time you create a new 
10414 \family sans
10415 foils
10416 \family default
10417  document.
10418  This option tells 
10419 \family sans
10420 FoilTeX
10421 \family default
10422  to use the dvips driver to rotate those pages that are set as landscape
10423  foils.
10424 \end_layout
10425
10426 \begin_layout Labeling
10427 \labelwidthstring MMMMMMx
10428
10429 \series bold
10430 landscape
10431 \series default
10432  Simply changes the page dimensions to those of a landscape page but doesn't
10433  do any rotation.
10434  Thus if you use this option you need to use an external program to rotate
10435  each page or feed your paper through your printer as landscape.
10436  Note that this option effectively reverses the roles of the 
10437 \family sans
10438 Foilhead
10439 \family default
10440  and 
10441 \family sans
10442 Rotatefoilhead
10443 \family default
10444  environments (don't worry these are described in the next section).
10445 \end_layout
10446
10447 \begin_layout Labeling
10448 \labelwidthstring MMMMMMx
10449
10450 \series bold
10451 leqno
10452 \series default
10453  Equation numbers on the left.
10454 \end_layout
10455
10456 \begin_layout Labeling
10457 \labelwidthstring MMMMMMx
10458
10459 \series bold
10460 fleqn
10461 \series default
10462  Flush-left equations.
10463 \end_layout
10464
10465 \begin_layout Subsection
10466 Supported Environments
10467 \end_layout
10468
10469 \begin_layout Standard
10470 Most of the environments commonly supported in other classes are also supported
10471  by the 
10472 \family sans
10473 foils
10474 \family default
10475  class.
10476  There are several additional environments provided by 
10477 \family sans
10478 FoilTeX
10479 \family default
10480  as well as a couple added by LyX.
10481  The following environments are shared with other classes:
10482 \end_layout
10483
10484 \begin_layout Standard
10485 \begin_inset Flex Multiple Columns
10486 status open
10487
10488 \begin_layout Itemize
10489
10490 \family sans
10491 Standard
10492 \end_layout
10493
10494 \begin_layout Itemize
10495
10496 \family sans
10497 Itemize
10498 \end_layout
10499
10500 \begin_layout Itemize
10501
10502 \family sans
10503 Enumerate
10504 \end_layout
10505
10506 \begin_layout Itemize
10507
10508 \family sans
10509 Description
10510 \end_layout
10511
10512 \begin_layout Itemize
10513
10514 \family sans
10515 List
10516 \end_layout
10517
10518 \begin_layout Itemize
10519
10520 \family sans
10521 LyX-Code
10522 \end_layout
10523
10524 \begin_layout Itemize
10525
10526 \family sans
10527 Verse
10528 \end_layout
10529
10530 \begin_layout Itemize
10531
10532 \family sans
10533 Quote
10534 \end_layout
10535
10536 \begin_layout Itemize
10537
10538 \family sans
10539 Quotation
10540 \end_layout
10541
10542 \begin_layout Itemize
10543
10544 \family sans
10545 Title
10546 \end_layout
10547
10548 \begin_layout Itemize
10549
10550 \family sans
10551 Author
10552 \end_layout
10553
10554 \begin_layout Itemize
10555
10556 \family sans
10557 Date
10558 \end_layout
10559
10560 \begin_layout Itemize
10561
10562 \family sans
10563 Abstract
10564 \end_layout
10565
10566 \begin_layout Itemize
10567
10568 \family sans
10569 Bibliography
10570 \end_layout
10571
10572 \begin_layout Itemize
10573
10574 \family sans
10575 Address
10576 \end_layout
10577
10578 \begin_layout Itemize
10579
10580 \family sans
10581 RightAddress
10582 \end_layout
10583
10584 \begin_layout Itemize
10585
10586 \family sans
10587 Caption
10588 \end_layout
10589
10590 \begin_layout Itemize
10591
10592 \family sans
10593 Comment
10594 \end_layout
10595
10596 \end_inset
10597
10598
10599 \end_layout
10600
10601 \begin_layout Standard
10602 That is, all the major environments apart from the sectioning environments.
10603  Since foils are essentially self-contained sections, with a title and body,
10604  
10605 \family sans
10606 FoilTeX
10607 \family default
10608  provides specific commands for starting new foils and these are:
10609 \end_layout
10610
10611 \begin_layout Itemize
10612
10613 \family sans
10614 Foilhead
10615 \end_layout
10616
10617 \begin_layout Itemize
10618
10619 \family sans
10620 Rotatefoilhead
10621 \end_layout
10622
10623 \begin_layout Standard
10624 LyX also provides slightly modified versions of these two environments called:
10625 \end_layout
10626
10627 \begin_layout Itemize
10628
10629 \family sans
10630 ShortFoilhead
10631 \end_layout
10632
10633 \begin_layout Itemize
10634
10635 \family sans
10636 ShortRotatefoilhead
10637 \end_layout
10638
10639 \begin_layout Standard
10640 and the differences will be explained in the next section.
10641 \end_layout
10642
10643 \begin_layout Standard
10644 Since foils are often used in presenting ideas or new theorems and such
10645  
10646 \family sans
10647 FoilTeX
10648 \family default
10649  also provides a comprehensive box of goodies for presenting them:
10650 \end_layout
10651
10652 \begin_layout Standard
10653 \begin_inset Flex Multiple Columns
10654 status open
10655
10656 \begin_layout Itemize
10657
10658 \family sans
10659 Theorem
10660 \end_layout
10661
10662 \begin_layout Itemize
10663
10664 \family sans
10665 Lemma
10666 \end_layout
10667
10668 \begin_layout Itemize
10669
10670 \family sans
10671 Corollary
10672 \end_layout
10673
10674 \begin_layout Itemize
10675
10676 \family sans
10677 Proposition
10678 \end_layout
10679
10680 \begin_layout Itemize
10681
10682 \family sans
10683 Definition
10684 \end_layout
10685
10686 \begin_layout Itemize
10687
10688 \family sans
10689 Proof
10690 \end_layout
10691
10692 \begin_layout Itemize
10693
10694 \family sans
10695 Theorem*
10696 \end_layout
10697
10698 \begin_layout Itemize
10699
10700 \family sans
10701 Lemma*
10702 \end_layout
10703
10704 \begin_layout Itemize
10705
10706 \family sans
10707 Corollary*
10708 \end_layout
10709
10710 \begin_layout Itemize
10711
10712 \family sans
10713 Proposition*
10714 \end_layout
10715
10716 \begin_layout Itemize
10717
10718 \family sans
10719 Definition*
10720 \end_layout
10721
10722 \end_inset
10723
10724
10725 \end_layout
10726
10727 \begin_layout Standard
10728 The starred versions are unnumbered while the unstarred versions are numbered.
10729  There are also two list environments added by LyX and these are:
10730 \end_layout
10731
10732 \begin_layout Itemize
10733
10734 \family sans
10735 TickList
10736 \end_layout
10737
10738 \begin_layout Itemize
10739
10740 \family sans
10741 CrossList
10742 \end_layout
10743
10744 \begin_layout Standard
10745
10746 \family sans
10747 FoilTeX
10748 \family default
10749  provides some powerful header and footer capabilities that are best set
10750  in the preamble although they may be set at any point in a document.
10751  If you want to change these settings in your document the best place to
10752  do so is at the very top of a foil, i.
10753 \begin_inset space \thinspace{}
10754 \end_inset
10755
10756 e.
10757 \emph on
10758
10759 \begin_inset space \space{}
10760 \end_inset
10761
10762
10763 \emph default
10764 straight after the foilhead.
10765 \end_layout
10766
10767 \begin_layout Standard
10768 For this purpose, the following command styles are provided [
10769 \shape smallcaps
10770 Martin Vermeer
10771 \shape default
10772 ]:
10773 \end_layout
10774
10775 \begin_layout Standard
10776 \begin_inset Flex Multiple Columns
10777 status open
10778
10779 \begin_layout Itemize
10780
10781 \family sans
10782 My
10783 \begin_inset space ~
10784 \end_inset
10785
10786 Logo
10787 \end_layout
10788
10789 \begin_layout Itemize
10790
10791 \family sans
10792 Restriction
10793 \end_layout
10794
10795 \begin_layout Itemize
10796
10797 \family sans
10798 Right
10799 \begin_inset space ~
10800 \end_inset
10801
10802 Footer
10803 \end_layout
10804
10805 \begin_layout Itemize
10806
10807 \family sans
10808 Right
10809 \begin_inset space ~
10810 \end_inset
10811
10812 Header
10813 \end_layout
10814
10815 \begin_layout Itemize
10816
10817 \family sans
10818 Left
10819 \begin_inset space ~
10820 \end_inset
10821
10822 Header
10823 \end_layout
10824
10825 \begin_deeper
10826 \begin_layout Plain Layout
10827 \begin_inset space ~
10828 \end_inset
10829
10830
10831 \end_layout
10832
10833 \end_deeper
10834 \end_inset
10835
10836
10837 \end_layout
10838
10839 \begin_layout Standard
10840 There are also a few commands provided by 
10841 \family sans
10842 FoilTeX
10843 \family default
10844  that aren't directly supported by LyX but I'll tell you what they do and
10845  how to use them in section
10846 \begin_inset space ~
10847 \end_inset
10848
10849
10850 \begin_inset CommandInset ref
10851 LatexCommand ref
10852 reference "sec:unsuppfoils"
10853
10854 \end_inset
10855
10856 .
10857 \end_layout
10858
10859 \begin_layout Subsection
10860 Building a Set of Foils
10861 \end_layout
10862
10863 \begin_layout Standard
10864 This section will give a simple introduction to using the different environments
10865  to build a set of foils.
10866  If you want to see an example set of foils, take a look at the 
10867 \family typewriter
10868 Foils.lyx
10869 \family default
10870  file you find in LyX's 
10871 \family typewriter
10872 examples
10873 \family default
10874  folder.
10875 \end_layout
10876
10877 \begin_layout Subsubsection
10878 Give It a Title Page
10879 \end_layout
10880
10881 \begin_layout Standard
10882 Unlike other classes that provide 
10883 \family sans
10884 Title
10885 \family default
10886
10887 \family sans
10888 Author
10889 \family default
10890
10891 \family sans
10892 Date
10893 \family default
10894  and 
10895 \family sans
10896 Abstract
10897 \family default
10898  environments, 
10899 \family sans
10900 foils
10901 \family default
10902  creates the title on a page of its own.
10903  If you leave out the 
10904 \family sans
10905 Date
10906 \family default
10907  environment LaTeX will substitute the current date (every time you regenerate
10908  the output).
10909 \end_layout
10910
10911 \begin_layout Subsubsection
10912 Start a New Foil
10913 \end_layout
10914
10915 \begin_layout Standard
10916 As I mentioned earlier, there are four ways of starting a new foil.
10917  For portrait foils you should use 
10918 \family sans
10919 Foilhead
10920 \family default
10921  or 
10922 \family sans
10923 ShortFoilhead.
10924
10925 \family default
10926  The difference between these two environments is the amount of space between
10927  the title of the foil (the foilhead) and the body of the foil.
10928 \end_layout
10929
10930 \begin_layout Standard
10931 Landscape foils are generated using the 
10932 \family sans
10933 Rotatefoilhead
10934 \family default
10935  and 
10936 \family sans
10937 ShortRotatefoilhead
10938 \family default
10939  environments.
10940  Again the only difference is the spacing between foilhead and body.
10941  Both of the short versions have 0.5
10942 \begin_inset space ~
10943 \end_inset
10944
10945 inches less separation between the foilhead and the body.
10946  
10947 \end_layout
10948
10949 \begin_layout Standard
10950 One problem with the support for landscape foils is the requirement that
10951  you have to use the 
10952 \family typewriter
10953 dvips
10954 \family default
10955  driver to generate the PostScript output otherwise the foils won't be rotated.
10956  It is possible to get landscape foils even if you haven't got the 
10957 \family typewriter
10958 dvips
10959 \family default
10960  driver provided you can feed your foils sideways through your printer ;-)
10961 \end_layout
10962
10963 \begin_layout Subsubsection
10964 Theorems, Lemmas, Proofs and more
10965 \end_layout
10966
10967 \begin_layout Standard
10968 Due to a small bug in LyX you can't have two of the same type of these environme
10969 nts directly following each other.
10970  They must be separated by something.
10971  If you try, you will just be extending the previous environment as if you
10972  had merged the two environments together.
10973  So, how do you get around this problem? The simplest option is to insert
10974  some text between the two environments or add a 
10975 \family sans
10976 LaTeX
10977 \family default
10978  environment between the two with just a 
10979 \begin_inset Quotes eld
10980 \end_inset
10981
10982
10983 \family typewriter
10984 %
10985 \family default
10986
10987 \begin_inset Quotes erd
10988 \end_inset
10989
10990  in it.
10991  This will force LyX to produce two separate environments and hence the
10992  correct LaTeX output.
10993  An example is provided in the example file included with the LyX distribution.
10994  Remember, this problem only occurs if you are trying to place two of the
10995  same type of theorem-like environments one directly after the other.
10996 \end_layout
10997
10998 \begin_layout Subsubsection
10999 Lists
11000 \end_layout
11001
11002 \begin_layout Standard
11003 You get all the commonly supported list styles found in other classes as
11004  well as two new ones.
11005  I'll only describe the new ones here.
11006  If you want to find out more about the other list environments check out
11007  the 
11008 \emph on
11009 User's Guide.
11010
11011 \emph default
11012  If you intend to use itemized lists you might also want to read about the
11013  
11014 \family sans
11015 Itemize
11016 \begin_inset space ~
11017 \end_inset
11018
11019 Bullet
11020 \begin_inset space ~
11021 \end_inset
11022
11023 Selection
11024 \family default
11025  dialog described above in section
11026 \begin_inset space ~
11027 \end_inset
11028
11029
11030 \begin_inset CommandInset ref
11031 LatexCommand ref
11032 reference "sec:bullet"
11033
11034 \end_inset
11035
11036 .
11037 \end_layout
11038
11039 \begin_layout Standard
11040 The two new list styles, 
11041 \family sans
11042 TickList
11043 \family default
11044  and 
11045 \family sans
11046 CrossList
11047 \family default
11048 , are designed to make it easier for you to create lists of do's and don'ts
11049  or right and wrong by providing dedicated environments that use a tick
11050  or a cross as the label of the list.
11051  These lists are in fact dedicated variants of the 
11052 \family sans
11053 Itemize
11054 \family default
11055  environment.
11056  They do however require that you have the 
11057 \family typewriter
11058 psnfss
11059 \family default
11060  packages installed.
11061 \end_layout
11062
11063 \begin_layout Subsubsection
11064 Figures and Tables
11065 \end_layout
11066
11067 \begin_layout Standard
11068
11069 \family sans
11070 FoilTeX
11071 \family default
11072  redefines the floating tables and figures so that they appear exactly where
11073  they are in the text rather than pushing them to the top of the page or
11074  to some user specified location.
11075  In fact if you change the float placement settings they are simply ignored.
11076 \end_layout
11077
11078 \begin_layout Subsubsection
11079 Page Headers and Footers
11080 \begin_inset CommandInset label
11081 LatexCommand label
11082 name "sec:foilfoot"
11083
11084 \end_inset
11085
11086
11087 \end_layout
11088
11089 \begin_layout Standard
11090
11091 \family sans
11092 My
11093 \begin_inset space ~
11094 \end_inset
11095
11096 Logo
11097 \family default
11098  and 
11099 \family sans
11100 Restriction
11101 \family default
11102  are two commands used to control the left-footer text string.
11103  The first is meant to allow you to include a graphic logo on your foils
11104  and defaults to 
11105 \begin_inset Quotes eld
11106 \end_inset
11107
11108 -Typeset by 
11109 \family sans
11110 FoilTeX
11111 \family default
11112 -
11113 \begin_inset Quotes erd
11114 \end_inset
11115
11116 .
11117  While the second is meant to provide a classification for the audience,
11118  
11119 \emph on
11120 e.
11121 \begin_inset space \thinspace{}
11122 \end_inset
11123
11124 g.
11125 \emph default
11126
11127 \begin_inset space \space{}
11128 \end_inset
11129
11130 Confidential.
11131  It is empty by default.
11132 \end_layout
11133
11134 \begin_layout Standard
11135 The remaining page corners can be filled by 
11136 \family sans
11137 Right
11138 \begin_inset space ~
11139 \end_inset
11140
11141 Footer
11142 \family default
11143  (which defaults to page numbers), 
11144 \family sans
11145 Right
11146 \begin_inset space ~
11147 \end_inset
11148
11149 Header
11150 \family default
11151  (top right) and 
11152 \family sans
11153 Left
11154 \begin_inset space ~
11155 \end_inset
11156
11157 Header
11158 \family default
11159  (top left).
11160 \end_layout
11161
11162 \begin_layout Subsection
11163 Unsupported 
11164 \family sans
11165 FoilTeX
11166 \family default
11167  Goodies
11168 \begin_inset CommandInset label
11169 LatexCommand label
11170 name "sec:unsuppfoils"
11171
11172 \end_inset
11173
11174
11175 \end_layout
11176
11177 \begin_layout Standard
11178 All the commands mentioned below need to be set in a 
11179 \family sans
11180 LaTeX
11181 \family default
11182  environment or as 
11183 \family sans
11184 TeX
11185 \family default
11186  within another environment.
11187 \end_layout
11188
11189 \begin_layout Subsubsection
11190 Lengths
11191 \end_layout
11192
11193 \begin_layout Standard
11194 All lengths are adjusted using the 
11195 \family typewriter
11196
11197 \backslash
11198 setlength{
11199 \family default
11200 \emph on
11201 lengthname
11202 \family typewriter
11203 \emph default
11204 }{
11205 \family default
11206 \emph on
11207 newlength
11208 \family typewriter
11209 \emph default
11210 }
11211 \family default
11212  command.
11213  Where 
11214 \emph on
11215 lengthname
11216 \emph default
11217  should be replaced by the name given to the length you want to change and
11218  
11219 \emph on
11220 newlength
11221 \emph default
11222  is the length value.
11223  All lengths should be specified in units of length such as inches (
11224 \family typewriter
11225 in
11226 \family default
11227 ), millimeters (
11228 \family typewriter
11229 mm
11230 \family default
11231 ) or points (
11232 \family typewriter
11233 pt
11234 \family default
11235 ) or relative to some document or font-based length such as 
11236 \family typewriter
11237
11238 \backslash
11239 textwidth
11240 \family default
11241 .
11242  
11243 \end_layout
11244
11245 \begin_layout Standard
11246 It's possible to change the spacing between a foilhead and the body of the
11247  foil by adjusting the length specified by 
11248 \family typewriter
11249
11250 \backslash
11251 foilheadskip
11252 \family default
11253 .
11254  For example, to make 
11255 \emph on
11256 all
11257 \emph default
11258  foilheads 0.5
11259 \begin_inset space \space{}
11260 \end_inset
11261
11262 in closer to their bodies put the following in the preamble: 
11263 \family typewriter
11264
11265 \backslash
11266 setlength{
11267 \backslash
11268 foilheadskip}{-0.5in}
11269 \end_layout
11270
11271 \begin_layout Standard
11272 The spacings around floats can be adjusted by setting these lengths:
11273 \end_layout
11274
11275 \begin_layout Labeling
11276 \labelwidthstring MMMMMMMMMMM
11277
11278 \family typewriter
11279
11280 \backslash
11281 abovefloatskip
11282 \family default
11283  Separation between the text and the top of the float
11284 \end_layout
11285
11286 \begin_layout Labeling
11287 \labelwidthstring MMMMMMMMMMM
11288
11289 \family typewriter
11290
11291 \backslash
11292 abovecaptionskip
11293 \family default
11294  Separation between the float and the caption
11295 \end_layout
11296
11297 \begin_layout Labeling
11298 \labelwidthstring MMMMMMMMMMM
11299
11300 \family typewriter
11301
11302 \backslash
11303 belowcaptionskip
11304 \family default
11305  Separation between the caption and the following text
11306 \end_layout
11307
11308 \begin_layout Labeling
11309 \labelwidthstring MMMMMMMMMMM
11310
11311 \family typewriter
11312
11313 \backslash
11314 captionwidth
11315 \family default
11316  You can make the captions narrower than the surrounding text by adjusting
11317  this length.
11318  Best done relative to 
11319 \family typewriter
11320
11321 \backslash
11322 textwidth
11323 \family default
11324 .
11325 \end_layout
11326
11327 \begin_layout Standard
11328 There are also several title page related lengths that you may find useful
11329  if you have a long title or several authors:
11330 \end_layout
11331
11332 \begin_layout Labeling
11333 \labelwidthstring MMMMMMMMMMM
11334
11335 \family typewriter
11336
11337 \backslash
11338 abovetitleskip
11339 \family default
11340  Separation from headers to 
11341 \family sans
11342 Title
11343 \end_layout
11344
11345 \begin_layout Labeling
11346 \labelwidthstring MMMMMMMMMMM
11347
11348 \family typewriter
11349
11350 \backslash
11351 titleauthorskip
11352 \family default
11353  between 
11354 \family sans
11355 Title
11356 \family default
11357  and 
11358 \family sans
11359 Author
11360 \family default
11361  environments
11362 \end_layout
11363
11364 \begin_layout Labeling
11365 \labelwidthstring MMMMMMMMMMM
11366
11367 \family typewriter
11368
11369 \backslash
11370 authorauthorskip
11371 \family default
11372  between multiple 
11373 \family sans
11374 Author
11375 \family default
11376  lines
11377 \end_layout
11378
11379 \begin_layout Labeling
11380 \labelwidthstring MMMMMMMMMMM
11381
11382 \family typewriter
11383
11384 \backslash
11385 authordateskip
11386 \family default
11387  between the 
11388 \family sans
11389 Author
11390 \family default
11391  and the 
11392 \family sans
11393 Date
11394 \end_layout
11395
11396 \begin_layout Labeling
11397 \labelwidthstring MMMMMMMMMMM
11398
11399 \family typewriter
11400
11401 \backslash
11402 dateabstractskip
11403 \family default
11404  between the 
11405 \family sans
11406 Date
11407 \family default
11408  and the 
11409 \family sans
11410 Abstract
11411 \end_layout
11412
11413 \begin_layout Standard
11414 The last length related command affects all the list environments.
11415  If you place 
11416 \family typewriter
11417
11418 \backslash
11419 zerolistvertdimens
11420 \family default
11421  
11422 \emph on
11423 inside
11424 \emph default
11425  a list environment then all the vertical spacing between the list items
11426  is removed.
11427  Note that this is a command not a length so it doesn't require 
11428 \family typewriter
11429
11430 \backslash
11431 setlength
11432 \family default
11433  like the stuff mentioned above.
11434 \end_layout
11435
11436 \begin_layout Subsubsection
11437 Headers and Footers
11438 \end_layout
11439
11440 \begin_layout Standard
11441 The 
11442 \family typewriter
11443
11444 \backslash
11445 LogoOn
11446 \family default
11447  and 
11448 \family typewriter
11449
11450 \backslash
11451 LogoOff
11452 \family default
11453  commands control whether the logo in the 
11454 \family sans
11455 MyLogo
11456 \family default
11457  definition appear on a given page.
11458  If you put 
11459 \family typewriter
11460
11461 \backslash
11462 LogoOff
11463 \family default
11464  in the preamble then none of the foils will have the logo on them.
11465  If you don't want the logo on a particular page place the 
11466 \family typewriter
11467
11468 \backslash
11469 LogoOff
11470 \family default
11471  directly after the foilhead of that page and the 
11472 \family typewriter
11473
11474 \backslash
11475 LogoOn
11476 \family default
11477  directly after the next foilhead.
11478 \end_layout
11479
11480 \begin_layout Standard
11481 If you decide to use the 
11482 \family sans
11483 fancy
11484 \family default
11485  page style setting in the 
11486 \family sans
11487 Document
11488 \begin_inset space ~
11489 \end_inset
11490
11491 Layout
11492 \family default
11493  dialog you should probably add 
11494 \family typewriter
11495
11496 \backslash
11497 let
11498 \backslash
11499 headwidth
11500 \backslash
11501 textwidth
11502 \family default
11503  to your preamble so headers and footers on landscape pages are correctly
11504  placed when rotated.
11505  This is due to some clashes between the page layouts provided by the 
11506 \family sans
11507 fancyheadings
11508 \family default
11509  package and the 
11510 \family sans
11511 foils
11512 \family default
11513  class.
11514 \end_layout
11515
11516 \begin_layout Section
11517 Hollywood (Hollywood spec scripts)
11518 \end_layout
11519
11520 \begin_layout Standard
11521 by 
11522 \shape smallcaps
11523 Garst Reese
11524 \end_layout
11525
11526 \begin_layout Subsection
11527 Introduction
11528 \end_layout
11529
11530 \begin_layout Standard
11531 Getting the format of a Hollywood script right is a 
11532 \begin_inset Quotes eld
11533 \end_inset
11534
11535 rite of passage.
11536 \begin_inset Quotes erd
11537 \end_inset
11538
11539  It is designed to make the readers focus on content and to be easy and
11540  familiar for the actors to read.
11541  Each page of a script should be one minute of film.
11542  Nothing goes in a script that you cannot see or hear on screen.
11543  The courier 12 pt font should be used throughout.
11544  No italics.
11545 \end_layout
11546
11547 \begin_layout Subsection
11548 Special problems
11549 \end_layout
11550
11551 \begin_layout Standard
11552 Speakers' lines should NEVER break in mid-sentence.
11553  If a speaker's lines continue over a page break, repeat the 
11554 \family sans
11555 Speaker
11556 \family default
11557  title followed by (Cont'd).
11558 \end_layout
11559
11560 \begin_layout Subsection
11561 Special features
11562 \end_layout
11563
11564 \begin_layout Standard
11565 Insert the 
11566 \family sans
11567 Speaker
11568 \family default
11569  names as labels then cross-reference the label to insert the name.
11570  The cross-reference dialog will show the current cast of characters.
11571  You can use this to insert the speaker name in narratives also.
11572 \end_layout
11573
11574 \begin_layout Subsection
11575 Paper size and Margins
11576 \end_layout
11577
11578 \begin_layout Standard
11579 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11580 \end_layout
11581
11582 \begin_layout Subsection
11583 Environments
11584 \end_layout
11585
11586 \begin_layout Standard
11587 The following environments are available.
11588  You can use hollywood.bind to get the bind keys shown at the right.
11589 \end_layout
11590
11591 \begin_layout Itemize
11592
11593 \family sans
11594 Standard
11595 \begin_inset Newline newline
11596 \end_inset
11597
11598
11599 \family default
11600 Used where nothing else works.
11601  Try to avoid it.
11602 \end_layout
11603
11604 \begin_layout Itemize
11605
11606 \family sans
11607 FADE_IN
11608 \family default
11609 :
11610 \begin_inset space \hfill{}
11611 \end_inset
11612
11613
11614 \family sans
11615 M-z S-I
11616 \family default
11617
11618 \begin_inset Newline newline
11619 \end_inset
11620
11621 Usually followed by something like 
11622 \begin_inset Quotes eld
11623 \end_inset
11624
11625 on Sally waking up.
11626 \begin_inset Quotes erd
11627 \end_inset
11628
11629
11630 \end_layout
11631
11632 \begin_layout Itemize
11633
11634 \family sans
11635 INT:
11636 \begin_inset space \hfill{}
11637 \end_inset
11638
11639 M-z i
11640 \begin_inset Newline newline
11641 \end_inset
11642
11643
11644 \family default
11645 Introduces a new INTERIOR camera set-up.
11646  Always followed by DAY or NIGHT, or something similar to define the lighting
11647  required.
11648  Everthing on this line in CAPS.
11649 \end_layout
11650
11651 \begin_layout Itemize
11652
11653 \family sans
11654 EXT:
11655 \begin_inset space \hfill{}
11656 \end_inset
11657
11658 M-z e
11659 \begin_inset Newline newline
11660 \end_inset
11661
11662
11663 \family default
11664 Introduces a new EXTERIOR camera set-up.
11665  Everthing on this line in CAPS.
11666 \end_layout
11667
11668 \begin_layout Itemize
11669
11670 \family sans
11671 Speaker
11672 \begin_inset space \hfill{}
11673 \end_inset
11674
11675 M-z s
11676 \begin_inset Newline newline
11677 \end_inset
11678
11679
11680 \family default
11681 The character speaking.
11682 \end_layout
11683
11684 \begin_layout Itemize
11685
11686 \family sans
11687 Parenthetical
11688 \begin_inset space \hfill{}
11689 \end_inset
11690
11691 M-z p
11692 \begin_inset Newline newline
11693 \end_inset
11694
11695
11696 \family default
11697 Instructions to the speaker.
11698  The () are automatically inserted, but only the ( will show in LyX.
11699  Both will be printed.
11700 \end_layout
11701
11702 \begin_layout Itemize
11703
11704 \family sans
11705 Dialogue
11706 \begin_inset space \hfill{}
11707 \end_inset
11708
11709 M-z d
11710 \begin_inset Newline newline
11711 \end_inset
11712
11713
11714 \family default
11715 What the 
11716 \family sans
11717 Speaker
11718 \family default
11719  says.
11720 \end_layout
11721
11722 \begin_layout Itemize
11723
11724 \family sans
11725 Transition
11726 \begin_inset space \hfill{}
11727 \end_inset
11728
11729 M-z t
11730 \begin_inset Newline newline
11731 \end_inset
11732
11733
11734 \family default
11735 Camera movement instruction.
11736  e.
11737 \begin_inset space \thinspace{}
11738 \end_inset
11739
11740 g.
11741 \begin_inset space \space{}
11742 \end_inset
11743
11744 CUT TO:
11745 \end_layout
11746
11747 \begin_layout Itemize
11748
11749 \family sans
11750 FADE OUT:
11751 \begin_inset space \hfill{}
11752 \end_inset
11753
11754 M-z S-I
11755 \end_layout
11756
11757 \begin_layout Itemize
11758
11759 \family sans
11760 Author
11761 \begin_inset space \hfill{}
11762 \end_inset
11763
11764 M-z S-A
11765 \end_layout
11766
11767 \begin_layout Itemize
11768
11769 \family sans
11770 Title
11771 \begin_inset space \hfill{}
11772 \end_inset
11773
11774 M-z S-T
11775 \end_layout
11776
11777 \begin_layout Itemize
11778
11779 \family sans
11780 Right_Address
11781 \begin_inset space \hfill{}
11782 \end_inset
11783
11784 M-z r
11785 \end_layout
11786
11787 \begin_layout Subsection
11788 Script jargon
11789 \end_layout
11790
11791 \begin_layout Itemize
11792 (O.S) — off screen
11793 \end_layout
11794
11795 \begin_layout Itemize
11796 (V.0) — voice over
11797 \end_layout
11798
11799 \begin_layout Itemize
11800 b.
11801 \begin_inset space \thinspace{}
11802 \end_inset
11803
11804 g.
11805  — background
11806 \end_layout
11807
11808 \begin_layout Itemize
11809 C.U.
11810  — close-up
11811 \end_layout
11812
11813 \begin_layout Itemize
11814 PAN — camera movement
11815 \end_layout
11816
11817 \begin_layout Itemize
11818 INSERT — cut to close-up of
11819 \end_layout
11820
11821 \begin_layout Section
11822 ijmpc and ijmpd
11823 \end_layout
11824
11825 \begin_layout Standard
11826 by 
11827 \noun on
11828 Panayotis Papasotiriou
11829 \end_layout
11830
11831 \begin_layout Subsection
11832 Overview
11833 \end_layout
11834
11835 \begin_layout Standard
11836 The ijmpc package is a set of macros that facilitates electronic manuscript
11837  submission to the 
11838 \emph on
11839 International Journal of Modern Physics C
11840 \emph default
11841 .
11842  Similarly, the ijmpd package is for creating manuscripts to be submitted
11843  to the 
11844 \emph on
11845 International Journal of Modern Physics D
11846 \emph default
11847 .
11848  Both journals are published by World Scientific.
11849  The corresponding document classes are named 
11850 \family typewriter
11851 ws-ijmpc.cls
11852 \family default
11853  and 
11854 \family typewriter
11855 ws-ijmpd.cls
11856 \family default
11857 , respectively.
11858  These files, together with instructions for the authors, can be downloaded
11859  from the sites 
11860 \begin_inset Flex URL
11861 status collapsed
11862
11863 \begin_layout Plain Layout
11864
11865 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11866 \end_layout
11867
11868 \end_inset
11869
11870  and 
11871 \begin_inset Flex URL
11872 status collapsed
11873
11874 \begin_layout Plain Layout
11875
11876 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11877 \end_layout
11878
11879 \end_inset
11880
11881 .
11882  Both packages are modified versions of the standard 
11883 \begin_inset Quotes eld
11884 \end_inset
11885
11886 article
11887 \begin_inset Quotes erd
11888 \end_inset
11889
11890  package, and they are almost (but not exactly) identical.
11891  Most of their features are supported by LyX.
11892  I have used LyX successfully to write articles submitted to both journals
11893  without any problem.
11894 \end_layout
11895
11896 \begin_layout Subsection
11897 Writing a paper
11898 \end_layout
11899
11900 \begin_layout Standard
11901 As usual, the easiest way to write a paper is to start with a template.
11902  Click on 
11903 \family sans
11904 File\SpecialChar \menuseparator
11905 New from
11906 \family default
11907  
11908 \family sans
11909 \bar under
11910 T
11911 \bar default
11912 emplate
11913 \family default
11914 , then choose the 
11915 \family typewriter
11916 ijmpc.lyx
11917 \family default
11918  or 
11919 \family typewriter
11920 ijmpd.lyx
11921 \family default
11922  template.
11923  This will give an (almost) empty document that includes the most common
11924  fields found in a manuscript.
11925  Simply overwrite the existing text (including the brackets, 
11926 \family typewriter
11927 <>
11928 \family default
11929 ) with your text.
11930  You should keep in mind the following remarks.
11931 \end_layout
11932
11933 \begin_layout Enumerate
11934 LyX won't let you change the font size and the page style of the document,
11935  because such modifications are not allowed by both packages.
11936 \end_layout
11937
11938 \begin_layout Enumerate
11939 The language of the document should not be changed.
11940  Before previewing your paper, be sure that the babel package is not used.
11941  To do this, click on 
11942 \family sans
11943 Tools\SpecialChar \menuseparator
11944 Preferences
11945 \family default
11946 , select the 
11947 \family sans
11948 Lang Opts
11949 \family default
11950  tab, deselect the 
11951 \family sans
11952 Use babel
11953 \family default
11954  checkbox in the language settings, and click on 
11955 \family sans
11956 Apply
11957 \family default
11958  (or 
11959 \family sans
11960 Save
11961 \family default
11962 , if you wish to make this change permanent).
11963 \end_layout
11964
11965 \begin_layout Enumerate
11966 The 
11967 \begin_inset Quotes eld
11968 \end_inset
11969
11970 Keywords
11971 \begin_inset Quotes erd
11972 \end_inset
11973
11974  style must be used to define keywords.
11975 \end_layout
11976
11977 \begin_layout Enumerate
11978 The ijmpc package provides a style named 
11979 \begin_inset Quotes eld
11980 \end_inset
11981
11982 Classification Codes
11983 \begin_inset Quotes erd
11984 \end_inset
11985
11986 , which can be used to define classification codes, such as PACS numbers.
11987  Note that this facility is not supported by the ijmpd package.
11988 \end_layout
11989
11990 \begin_layout Enumerate
11991 Several new environments are available: 
11992 \begin_inset Quotes eld
11993 \end_inset
11994
11995 Definition
11996 \begin_inset Quotes erd
11997 \end_inset
11998
11999
12000 \begin_inset Quotes eld
12001 \end_inset
12002
12003 Step
12004 \begin_inset Quotes erd
12005 \end_inset
12006
12007
12008 \begin_inset Quotes eld
12009 \end_inset
12010
12011 Example
12012 \begin_inset Quotes erd
12013 \end_inset
12014
12015
12016 \begin_inset Quotes eld
12017 \end_inset
12018
12019 Remark
12020 \begin_inset Quotes erd
12021 \end_inset
12022
12023
12024 \begin_inset Quotes eld
12025 \end_inset
12026
12027 Notation
12028 \begin_inset Quotes erd
12029 \end_inset
12030
12031
12032 \begin_inset Quotes eld
12033 \end_inset
12034
12035 Theorem
12036 \begin_inset Quotes erd
12037 \end_inset
12038
12039
12040 \begin_inset Quotes eld
12041 \end_inset
12042
12043 Proof
12044 \begin_inset Quotes erd
12045 \end_inset
12046
12047
12048 \begin_inset Quotes eld
12049 \end_inset
12050
12051 Corollary
12052 \begin_inset Quotes erd
12053 \end_inset
12054
12055
12056 \begin_inset Quotes eld
12057 \end_inset
12058
12059 Lemma
12060 \begin_inset Quotes erd
12061 \end_inset
12062
12063
12064 \begin_inset Quotes eld
12065 \end_inset
12066
12067 Proposition
12068 \begin_inset Quotes erd
12069 \end_inset
12070
12071
12072 \begin_inset Quotes eld
12073 \end_inset
12074
12075 Prop
12076 \begin_inset Quotes erd
12077 \end_inset
12078
12079
12080 \begin_inset Quotes eld
12081 \end_inset
12082
12083 Question
12084 \begin_inset Quotes erd
12085 \end_inset
12086
12087
12088 \begin_inset Quotes eld
12089 \end_inset
12090
12091 Claim
12092 \begin_inset Quotes erd
12093 \end_inset
12094
12095 , and 
12096 \begin_inset Quotes eld
12097 \end_inset
12098
12099 Conjecture
12100 \begin_inset Quotes erd
12101 \end_inset
12102
12103 .
12104  Their use is more or less obvious.
12105  LyX supports all these environments; it will use the proper label, text
12106  style, and numbering scheme for each of them.
12107 \end_layout
12108
12109 \begin_layout Enumerate
12110 Both packages use basic citations; the natbib package should not be used.
12111  In LyX, citation references are shown as usual; in the output, citations
12112  are shown as superscripts.
12113  If you want to use a citation as normal text, you should use the 
12114 \family typewriter
12115 refcite
12116 \family default
12117  command, e.
12118 \begin_inset space \thinspace{}
12119 \end_inset
12120
12121 g.
12122 \begin_inset space \space{}
12123 \end_inset
12124
12125
12126 \begin_inset Quotes eld
12127 \end_inset
12128
12129 See Ref.
12130 \begin_inset space \space{}
12131 \end_inset
12132
12133
12134 \family typewriter
12135
12136 \backslash
12137 refcite{key}
12138 \family default
12139
12140 \begin_inset Quotes erd
12141 \end_inset
12142
12143 .
12144 \end_layout
12145
12146 \begin_layout Enumerate
12147 There is no 
12148 \begin_inset Quotes eld
12149 \end_inset
12150
12151 Acknowledgments
12152 \begin_inset Quotes erd
12153 \end_inset
12154
12155  section in both packages.
12156  To put acknowledgments, just use the 
12157 \begin_inset Quotes eld
12158 \end_inset
12159
12160 Section*
12161 \begin_inset Quotes erd
12162 \end_inset
12163
12164  environment.
12165 \end_layout
12166
12167 \begin_layout Enumerate
12168 Appendices may be added to the paper, 
12169 \emph on
12170 after
12171 \emph default
12172  the Acknowledgments and 
12173 \shape italic
12174 before
12175 \shape default
12176  the References.
12177  LyX provides a special environment, called 
12178 \begin_inset Quotes eld
12179 \end_inset
12180
12181 Appendices Section
12182 \begin_inset Quotes erd
12183 \end_inset
12184
12185  which marks the beginning of the appendices.
12186  This environment should be left blank; it just sends a LaTeX command, but
12187  nothing is really printed.
12188  In LyX, the word 
12189 \begin_inset Quotes eld
12190 \end_inset
12191
12192 Appendix
12193 \begin_inset Quotes erd
12194 \end_inset
12195
12196  is printed with blue letters, as a signal that all sections after that
12197  point are appendices.
12198  To write an appendix, use the 
12199 \begin_inset Quotes eld
12200 \end_inset
12201
12202 Appendix
12203 \begin_inset Quotes erd
12204 \end_inset
12205
12206  environment.
12207  LyX will number each appendix with capital letters, as required by both
12208  journals.
12209  Note that 
12210 \begin_inset Quotes eld
12211 \end_inset
12212
12213 Appendices Section
12214 \begin_inset Quotes erd
12215 \end_inset
12216
12217  
12218 \emph on
12219 must
12220 \emph default
12221  be present before the first appendix; if not, all appendices will be numbered
12222  as normal sections in the output.
12223 \end_layout
12224
12225 \begin_layout Enumerate
12226 The ijmpc and the ijmpd packages use the 
12227 \family typewriter
12228 tbl
12229 \family default
12230  command to implement table captions.
12231  As a result, a table created by LyX is printed correctly, but its caption
12232  is ignored.
12233  However, you can use some TeX code to overcome this problem, so that captions
12234  are printed as expected.
12235  To do so, create a float table as usual, remove the caption, and replace
12236  it with the TeX code 
12237 \family typewriter
12238
12239 \backslash
12240 tbl{
12241 \emph on
12242 your table caption
12243 \emph default
12244 }{
12245 \family default
12246  (sic); you must also the TeX code 
12247 \family typewriter
12248 }
12249 \family default
12250  immediately after the tabular material.
12251  Study the example table included in the template files to see how this
12252  trick is implemented.
12253  Alternatively, If you need table captions, you should implement the whole
12254  table float in a 
12255 \family typewriter
12256 .tex
12257 \family default
12258  file, then include this file to the LyX document (
12259 \family sans
12260 Insert\SpecialChar \menuseparator
12261 File\SpecialChar \menuseparator
12262 Child
12263 \begin_inset space ~
12264 \end_inset
12265
12266 Document
12267 \family default
12268 ).
12269  Details on how to create a table float can be found in the files 
12270 \family typewriter
12271 ws-ijmpc.tex
12272 \family default
12273  and 
12274 \family typewriter
12275 ws-ijmpd.tex
12276 \family default
12277 , included in the corresponding packages.
12278 \end_layout
12279
12280 \begin_layout Subsection
12281 Preparing a paper for submission
12282 \end_layout
12283
12284 \begin_layout Standard
12285 Before you submit your paper you must export the LyX document as a LaTeX
12286  file (
12287 \family sans
12288 File\SpecialChar \menuseparator
12289 Export\SpecialChar \menuseparator
12290 LaTeX
12291 \family default
12292 )
12293 \begin_inset Foot
12294 status open
12295
12296 \begin_layout Plain Layout
12297 Actually you have the choice between LaTeX (plain) and pdflatex.
12298  If you intend to use pdflatex to prepare the paper, you should use the
12299  pdflatex option so that included graphics are converted to PDF format,
12300  ready for use by pdflatex.
12301 \end_layout
12302
12303 \end_inset
12304
12305 , then make the following changes to the resulting 
12306 \family typewriter
12307 .tex
12308 \family default
12309  file.
12310 \end_layout
12311
12312 \begin_layout Enumerate
12313 Remove the comment lines before the 
12314 \family typewriter
12315
12316 \backslash
12317 documentclass
12318 \family default
12319  command.
12320 \end_layout
12321
12322 \begin_layout Enumerate
12323 Remove everything between (and including) the 
12324 \family typewriter
12325
12326 \backslash
12327 makeatletter
12328 \family default
12329  and 
12330 \family typewriter
12331
12332 \backslash
12333 makeatother
12334 \family default
12335  commands, except for any commands you specifically put into the LaTeX preamble.
12336 \end_layout
12337
12338 \begin_layout Standard
12339 The modified 
12340 \family typewriter
12341 .tex
12342 \family default
12343  file should be saved and processed through LaTeX as many times as necessary.
12344  You may also want to check the resulting 
12345 \family typewriter
12346 .dvi
12347 \family default
12348  document.
12349 \end_layout
12350
12351 \begin_layout Subsection
12352 Use of TeX code
12353 \end_layout
12354
12355 \begin_layout Standard
12356 The use of TeX code is reduced to two commands, which must be placed at
12357  the top of the document.
12358  If you started writing your paper by using the 
12359 \family typewriter
12360 ijmpc.lyx
12361 \family default
12362  or the 
12363 \family typewriter
12364 ijmpd.lyx
12365 \family default
12366  template, the TeX code needed is already in its place; you usually don't
12367  need to delete it.
12368  You may only modify the first TeX code to specify the information printed
12369  to the top of odd and even pages (authors' names and short paper's title,
12370  respectively).
12371  This TeX code must have the form 
12372 \family typewriter
12373
12374 \backslash
12375 markboth{Authors' Names}{Short Paper's Title}
12376 \family default
12377 .
12378 \end_layout
12379
12380 \begin_layout Section
12381 iopart
12382 \end_layout
12383
12384 \begin_layout Standard
12385 by 
12386 \noun on
12387 Uwe Stöhr
12388 \end_layout
12389
12390 \begin_layout Subsection
12391 Overview
12392 \end_layout
12393
12394 \begin_layout Standard
12395 The iopart package provides a document class to create electronic manuscript
12396  submission to the journals published by the Institute of Physics.
12397  Instructions for the authors how to create a paper using the iopart class
12398  can be downloaded together with the iopart package from the site 
12399 \begin_inset Flex URL
12400 status collapsed
12401
12402 \begin_layout Plain Layout
12403
12404 ftp://ftp.iop.org/pub/journals/latex2e
12405 \end_layout
12406
12407 \end_inset
12408
12409 .
12410 \end_layout
12411
12412 \begin_layout Subsection
12413 Writing a paper
12414 \end_layout
12415
12416 \begin_layout Standard
12417 The easiest way to write a paper is to start with the file 
12418 \emph on
12419 IOP-article.lyx
12420 \emph default
12421  that is available in LyX's examples files folder.
12422  Open this file, save it under a new name, and start writing.
12423  The example file explains how to use the special text environments.
12424  Here are the most important advices:
12425 \end_layout
12426
12427 \begin_layout Itemize
12428 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12429  two options 
12430 \family sans
12431 Use AMS math package
12432 \family default
12433  in the document settings under 
12434 \family sans
12435 Math Options
12436 \family default
12437  are not used!
12438 \end_layout
12439
12440 \begin_layout Itemize
12441
12442 \size normal
12443 The title environment defines the kind of your paper.
12444  So use one of the following environments for the title:
12445 \end_layout
12446
12447 \begin_deeper
12448 \begin_layout Itemize
12449
12450 \family sans
12451 \size normal
12452 Title
12453 \family default
12454  for a Paper
12455 \end_layout
12456
12457 \begin_layout Itemize
12458
12459 \family sans
12460 \size normal
12461 Review
12462 \family default
12463  for a Review
12464 \end_layout
12465
12466 \begin_layout Itemize
12467
12468 \family sans
12469 \size normal
12470 Topical
12471 \family default
12472  for a Topical review
12473 \end_layout
12474
12475 \begin_layout Itemize
12476
12477 \family sans
12478 \size normal
12479 Comment
12480 \family default
12481  for a Comment
12482 \end_layout
12483
12484 \begin_layout Itemize
12485
12486 \family sans
12487 \size normal
12488 Note
12489 \family default
12490  for a Note
12491 \end_layout
12492
12493 \begin_layout Itemize
12494
12495 \family sans
12496 \size normal
12497 Paper
12498 \family default
12499  for a Paper (same as Title)
12500 \end_layout
12501
12502 \begin_layout Itemize
12503
12504 \family sans
12505 \size normal
12506 Prelim
12507 \family default
12508  for a Preliminary communication
12509 \end_layout
12510
12511 \begin_layout Itemize
12512
12513 \family sans
12514 \size normal
12515 Rapid
12516 \family default
12517  for a Rapid communication
12518 \end_layout
12519
12520 \begin_layout Itemize
12521
12522 \family sans
12523 \size normal
12524 Letter
12525 \family default
12526  for a Letter to the editor
12527 \end_layout
12528
12529 \end_deeper
12530 \begin_layout Itemize
12531
12532 \size normal
12533 All title environments except of 
12534 \family sans
12535 Letter
12536 \family default
12537  can have an optional short title.
12538 \end_layout
12539
12540 \begin_layout Itemize
12541 There is a general title environment 
12542 \family sans
12543 Article
12544 \family default
12545  which is not directly supported by the LyX.
12546  This can be used as TeX code when your document doesn't fit into one of
12547  the other title types.
12548 \end_layout
12549
12550 \begin_layout Standard
12551 For more informations like hints for special table and formula formatting,
12552  look at the IOP author guidelines.
12553 \end_layout
12554
12555 \begin_layout Section
12556 Kluwer
12557 \end_layout
12558
12559 \begin_layout Standard
12560 by 
12561 \noun on
12562 Panayotis Papasotiriou
12563 \end_layout
12564
12565 \begin_layout Subsection
12566 Overview
12567 \end_layout
12568
12569 \begin_layout Standard
12570 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12571  that facilitates electronic manuscript submission to the journals they
12572  publish.
12573  Most known of them (at least in my domain of interest) are 
12574 \emph on
12575 Astrophysics and Space Science
12576 \emph default
12577  and 
12578 \emph on
12579 Solar Physics
12580 \emph default
12581 , but there are many others (see a complete list at 
12582 \begin_inset Flex URL
12583 status open
12584
12585 \begin_layout Plain Layout
12586
12587 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12588 \end_layout
12589
12590 \end_inset
12591
12592 ).
12593  The Kluwer package may be downloaded from the site 
12594 \begin_inset Flex URL
12595 status collapsed
12596
12597 \begin_layout Plain Layout
12598
12599 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12600 \end_layout
12601
12602 \end_inset
12603
12604 .
12605  A complete user guide is contained in that package (but it can also be
12606  downloaded separately).
12607 \end_layout
12608
12609 \begin_layout Standard
12610 LyX supports many features of the package but not everything.
12611  However, the TeX code needed is reduced to some 
12612 \begin_inset Quotes eld
12613 \end_inset
12614
12615 peculiar
12616 \begin_inset Quotes erd
12617 \end_inset
12618
12619  commands of the package (see
12620 \begin_inset space ~
12621 \end_inset
12622
12623
12624 \begin_inset CommandInset ref
12625 LatexCommand ref
12626 reference "subsec:kluwer_peculiarities"
12627
12628 \end_inset
12629
12630 ).
12631  I have recently used LyX to write an article submitted to the 
12632 \emph on
12633 Astrophysics and Space Science
12634 \emph default
12635  without any problem.
12636 \end_layout
12637
12638 \begin_layout Subsection
12639 Writing a paper
12640 \end_layout
12641
12642 \begin_layout Standard
12643 The easiest way to write a paper is to start with the Kluwer template file.
12644  Click on 
12645 \family sans
12646 File\SpecialChar \menuseparator
12647 New from
12648 \family default
12649  
12650 \family sans
12651 Template
12652 \family default
12653 , then choose the 
12654 \family typewriter
12655 kluwer.lyx
12656 \family default
12657  template.
12658  This will give an (almost) empty document that includes the most common
12659  fields found in a manuscript and a short description of their use.
12660  As in most templates, simply overwrite the existing text (including the
12661  brackets, 
12662 \family typewriter
12663 <>
12664 \family default
12665 ) with the correct information.
12666 \end_layout
12667
12668 \begin_layout Subsection
12669 Preparing a paper for submission
12670 \end_layout
12671
12672 \begin_layout Standard
12673 As in the AASTeX package, before you submit your paper to a journal you
12674  must 
12675 \begin_inset Quotes eld
12676 \end_inset
12677
12678 postprocess
12679 \begin_inset Quotes erd
12680 \end_inset
12681
12682  it as follows.
12683 \end_layout
12684
12685 \begin_layout Enumerate
12686 Export your paper as a LaTeX file.
12687  To do this, click on 
12688 \family sans
12689 File\SpecialChar \menuseparator
12690 Export\SpecialChar \menuseparator
12691 LaTeX
12692 \family default
12693 .
12694  
12695 \end_layout
12696
12697 \begin_layout Enumerate
12698 Edit the resulting 
12699 \family typewriter
12700 .tex
12701 \family default
12702  file with a text editor and make the following changes
12703 \end_layout
12704
12705 \begin_deeper
12706 \begin_layout Enumerate
12707 remove the comment lines before the 
12708 \family typewriter
12709
12710 \backslash
12711 documentclass
12712 \family default
12713  command,
12714 \end_layout
12715
12716 \begin_layout Enumerate
12717 remove everything between (and including) the 
12718 \family typewriter
12719
12720 \backslash
12721 makeatletter
12722 \family default
12723  and 
12724 \family typewriter
12725
12726 \backslash
12727 makeatother
12728 \family default
12729  commands, except for any commands you specifically put into the LaTeX preamble.
12730 \end_layout
12731
12732 \begin_layout Standard
12733 Save the resulting 
12734 \family typewriter
12735 .tex
12736 \family default
12737  file.
12738 \end_layout
12739
12740 \end_deeper
12741 \begin_layout Enumerate
12742 Run the 
12743 \family typewriter
12744 .tex
12745 \family default
12746  file through LaTeX as many times as necessary (usually up to three).
12747 \end_layout
12748
12749 \begin_layout Enumerate
12750 View the resulting 
12751 \family typewriter
12752 .dvi
12753 \family default
12754  document using, e.
12755 \begin_inset space \thinspace{}
12756 \end_inset
12757
12758 g.
12759 \begin_inset space \space{}
12760 \end_inset
12761
12762
12763 \family sans
12764 xdvi
12765 \family default
12766 , and check if everything is OK (it should, if you didn't make any mistake).
12767 \end_layout
12768
12769 \begin_layout Subsection
12770 \begin_inset Quotes eld
12771 \end_inset
12772
12773 Peculiarities
12774 \begin_inset Quotes erd
12775 \end_inset
12776
12777  of the Kluwer package
12778 \begin_inset CommandInset label
12779 LatexCommand label
12780 name "subsec:kluwer_peculiarities"
12781
12782 \end_inset
12783
12784
12785 \end_layout
12786
12787 \begin_layout Standard
12788 The Kluwer package has the following 
12789 \begin_inset Quotes eld
12790 \end_inset
12791
12792 peculiarities
12793 \begin_inset Quotes erd
12794 \end_inset
12795
12796 .
12797 \end_layout
12798
12799 \begin_layout Enumerate
12800 It is possible to write multiple articles in the same LaTeX file
12801 \begin_inset Foot
12802 status collapsed
12803
12804 \begin_layout Plain Layout
12805 I can't imagine any good reason to do this.
12806 \end_layout
12807
12808 \end_inset
12809
12810 .
12811  Each article must be included in the environment 
12812 \begin_inset Quotes eld
12813 \end_inset
12814
12815 article
12816 \begin_inset Quotes erd
12817 \end_inset
12818
12819 .
12820  Unfortunately, this environment cannot be omitted, even if you write just
12821  one article.
12822  Therefore, each article starts with the command 
12823 \family typewriter
12824
12825 \backslash
12826 begin{article}
12827 \family default
12828  and, obviously, ends with the command 
12829 \family typewriter
12830
12831 \backslash
12832 end{article}
12833 \family default
12834 .
12835  Although this can be implemented in LyX, I didn't included it, since it
12836  looks ugly and can confuse the novice user.
12837  Therefore, you need to enter them directly and mark them as LaTeX code
12838  (the well-known 
12839 \begin_inset Quotes eld
12840 \end_inset
12841
12842 TeX code
12843 \begin_inset Quotes erd
12844 \end_inset
12845
12846 ).
12847 \end_layout
12848
12849 \begin_layout Enumerate
12850 Information given at the beginning of the article (i.
12851 \begin_inset space \thinspace{}
12852 \end_inset
12853
12854 e.
12855 \begin_inset space \space{}
12856 \end_inset
12857
12858 title, subtitle, author, institution, running title, running author, abstract
12859  and keywords) must be included in an environment called 
12860 \begin_inset Quotes eld
12861 \end_inset
12862
12863 opening
12864 \begin_inset Quotes erd
12865 \end_inset
12866
12867 .
12868  This is not implemented in LyX, so you must enter title, subtitle etc.
12869 \begin_inset space ~
12870 \end_inset
12871
12872 between two TeX code lines (
12873 \family typewriter
12874
12875 \backslash
12876 begin{opening}
12877 \family default
12878  and 
12879 \family typewriter
12880
12881 \backslash
12882 end{opening}
12883 \family default
12884 ).
12885 \end_layout
12886
12887 \begin_layout Enumerate
12888 According to the user manual, the label of each bibliography item must be
12889  written as 
12890 \family typewriter
12891
12892 \backslash
12893 protect
12894 \backslash
12895 citeauthoryear{
12896 \family default
12897 \emph on
12898 author(s)
12899 \family typewriter
12900 \emph default
12901 }{
12902 \family default
12903 \emph on
12904 year
12905 \family typewriter
12906 \emph default
12907 }
12908 \family default
12909 .
12910 \end_layout
12911
12912 \begin_layout Standard
12913 The 
12914 \family typewriter
12915 kluwer.lyx
12916 \family default
12917  template takes care of all these 
12918 \begin_inset Quotes eld
12919 \end_inset
12920
12921 peculiarities
12922 \begin_inset Quotes erd
12923 \end_inset
12924
12925 .
12926  If you start a new paper using this template you don't need to do anything
12927  special.
12928  Just 
12929 \end_layout
12930
12931 \begin_layout Enumerate
12932 don't delete the TeX code included in the template, and
12933 \end_layout
12934
12935 \begin_layout Enumerate
12936 copy the example bibliography item included in the template and modify it
12937  as necessary to enter new bibliography items.
12938 \end_layout
12939
12940 \begin_layout Section
12941 Koma-Script
12942 \end_layout
12943
12944 \begin_layout Standard
12945 by 
12946 \noun on
12947 Bernd Rellermeyer
12948 \end_layout
12949
12950 \begin_layout Subsection
12951 Overview
12952 \end_layout
12953
12954 \begin_layout Standard
12955 The LyX document classes 
12956 \emph on
12957 article (koma-script)
12958 \emph default
12959
12960 \emph on
12961 report (koma-script)
12962 \emph default
12963
12964 \emph on
12965 book
12966 \emph default
12967  
12968 \emph on
12969 (koma-script)
12970 \emph default
12971 , and 
12972 \emph on
12973 letter
12974 \emph default
12975  
12976 \emph on
12977 (koma-script)
12978 \emph default
12979  correspond to the LaTeX document classes 
12980 \family typewriter
12981 scrartcl.cls
12982 \family default
12983
12984 \family typewriter
12985 scrreprt.cls
12986 \family default
12987
12988 \family typewriter
12989 scrbook.cls
12990 \family default
12991 , and 
12992 \family typewriter
12993 scrlettr.cls
12994 \family default
12995 , resp.
12996 \begin_inset space ~
12997 \end_inset
12998
12999 of the Koma-Script family.
13000  They are replacements for the standard document classes 
13001 \family typewriter
13002 article.cls
13003 \family default
13004
13005 \family typewriter
13006 report.cls
13007 \family default
13008
13009 \family typewriter
13010 book.cls
13011 \family default
13012  and 
13013 \family typewriter
13014 letter.cls
13015 \family default
13016 , resp., and fit better to European typography conventions in a number of
13017  points.
13018 \end_layout
13019
13020 \begin_layout Itemize
13021 Standard character size is 11pt in 
13022 \emph on
13023 article (koma-script)
13024 \emph default
13025
13026 \emph on
13027 report (koma-script)
13028 \emph default
13029 , and 
13030 \emph on
13031 book (koma-script)
13032 \emph default
13033 , and 12pt in 
13034 \emph on
13035 letter (koma-script)
13036 \emph default
13037 .
13038 \end_layout
13039
13040 \begin_layout Itemize
13041 Headings, labels of the description environment, and a number of elements
13042  of the 
13043 \emph on
13044 letter (koma-script)
13045 \emph default
13046  document class are set in a bold sans serif font.
13047 \begin_inset Foot
13048 status collapsed
13049
13050 \begin_layout Plain Layout
13051 There is a big difference between the bold sans serif old cm fonts and new
13052  ec fonts, especially in the appearance of headings.
13053  In comparison, the ec bold sans serif fonts look a bit thin.
13054  Here the LaTeX package 
13055 \family typewriter
13056 cmsd.sty by
13057 \family default
13058  
13059 \shape smallcaps
13060 Walter Schmidt
13061 \shape default
13062  helps to produce the 
13063 \begin_inset Quotes eld
13064 \end_inset
13065
13066 usual
13067 \begin_inset Quotes erd
13068 \end_inset
13069
13070  appearance when using the ec fonts.
13071 \end_layout
13072
13073 \end_inset
13074
13075  The numbering of chapter headings is made in the same way as the numbering
13076  of section headings, that is without the extra line 
13077 \begin_inset Quotes eld
13078 \end_inset
13079
13080 Chapter\SpecialChar \ldots{}
13081
13082 \begin_inset Quotes erd
13083 \end_inset
13084
13085 .
13086  In addition, the appearance of the headings can be modified by using a
13087  number of options (in LyX to be entered in the field 
13088 \family sans
13089 Extra
13090 \begin_inset space ~
13091 \end_inset
13092
13093 Options
13094 \family default
13095  of the dialog 
13096 \family sans
13097 Layout\SpecialChar \menuseparator
13098 Document
13099 \family default
13100 ).
13101  
13102 \end_layout
13103
13104 \begin_layout Itemize
13105 The main means in the Koma-Script document classes to design the type area
13106  are the options 
13107 \family sans
13108 BCOR
13109 \family default
13110  and 
13111 \family sans
13112 DIV
13113 \family default
13114  (in LyX to be entered in the extra class options field in the dialog 
13115 \family sans
13116 Document\SpecialChar \menuseparator
13117 Settings
13118 \family default
13119 ).
13120  They make a clearer modification of page margins possible as do the options
13121  of the dialog 
13122 \family sans
13123 Document\SpecialChar \menuseparator
13124 Settings
13125 \family default
13126 .
13127  
13128 \end_layout
13129
13130 \begin_layout Itemize
13131 The LaTeX document classes of the Koma-Script family define a number of
13132  additional commands.
13133  Those part of it which makes sense in LyX is implemented in corresponding
13134  paragraph types.
13135 \end_layout
13136
13137 \begin_layout Standard
13138 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13139  can be found in the Koma-Script documentation 
13140 \emph on
13141 scrguide
13142 \emph default
13143  (German) and 
13144 \emph on
13145 scrguien
13146 \emph default
13147  (English).
13148 \end_layout
13149
13150 \begin_layout Subsection
13151 article (koma-script), report (koma-script), and book (koma-script)
13152 \end_layout
13153
13154 \begin_layout Standard
13155 The document classes 
13156 \emph on
13157 article (koma-script)
13158 \emph default
13159
13160 \emph on
13161 report (koma-script)
13162 \emph default
13163 , and 
13164 \emph on
13165 book
13166 \emph default
13167  
13168 \emph on
13169 (koma-script)
13170 \emph default
13171  are implemented in the layout files 
13172 \family typewriter
13173 scrartcl.layout
13174 \family default
13175
13176 \family typewriter
13177 scrreprt.layout
13178 \family default
13179 , and 
13180 \family typewriter
13181 scrbook.layout
13182 \family default
13183 , resp.
13184  They contain all the paragraph types of the corresponding standard document
13185  classes 
13186 \emph on
13187 article
13188 \emph default
13189
13190 \emph on
13191 report
13192 \emph default
13193 , and 
13194 \emph on
13195 book
13196 \emph default
13197 , resp., partly modified, with the exception of the LyX specific 
13198 \family sans
13199 List
13200 \family default
13201 -type, which is replaced by the new 
13202 \family sans
13203 Labeling
13204 \family default
13205 -type having the same functionality.
13206  Beside the 
13207 \family sans
13208 Labeling
13209 \family default
13210 -Type there is a number of new paragraph types added.
13211  They are 
13212 \emph on
13213 not
13214 \emph default
13215  part of 
13216 \emph on
13217 letter (koma-script)
13218 \emph default
13219 .
13220 \end_layout
13221
13222 \begin_layout Itemize
13223
13224 \family sans
13225 Addpart, Addchap
13226 \family default
13227
13228 \family sans
13229 Addsec
13230 \family default
13231 : are equivalents to 
13232 \family sans
13233 Part*, Chapter*
13234 \family default
13235  and 
13236 \family sans
13237 Section*
13238 \family default
13239 , resp., additionally inserting an entry in the table of contents.
13240  
13241 \family sans
13242 Addpart
13243 \family default
13244  and 
13245 \family sans
13246 Addchap
13247 \family default
13248  are not contained in 
13249 \emph on
13250 article (koma-script)
13251 \emph default
13252 .
13253 \end_layout
13254
13255 \begin_layout Itemize
13256
13257 \family sans
13258 Addchap*
13259 \family default
13260
13261 \family sans
13262 Addsec*
13263 \family default
13264 : behave exactly as 
13265 \family sans
13266 Addchap
13267 \family default
13268  and 
13269 \family sans
13270 Addsec
13271 \family default
13272 , resp., additionally clearing running heads.
13273  
13274 \family sans
13275 Addchap*
13276 \family default
13277  is not contained in 
13278 \emph on
13279 article (koma-script)
13280 \emph default
13281 .
13282 \begin_inset Foot
13283 status collapsed
13284
13285 \begin_layout Plain Layout
13286 There is also an 
13287 \family typewriter
13288
13289 \backslash
13290 addpart*
13291 \family default
13292  command in 
13293 \emph on
13294 book (koma-script)
13295 \emph default
13296  and in 
13297 \emph on
13298 report (koma-script)
13299 \emph default
13300 , but since this is identical to 
13301 \family sans
13302 Part*
13303 \family default
13304 , is has not been implemented in LyX.
13305 \end_layout
13306
13307 \end_inset
13308
13309
13310 \end_layout
13311
13312 \begin_layout Itemize
13313
13314 \family sans
13315 Minisec
13316 \family default
13317 : generates a heading directly above the following paragraph in the standard
13318  character size without affecting the structure of the document.
13319 \end_layout
13320
13321 \begin_layout Itemize
13322
13323 \family sans
13324 Captionabove
13325 \family default
13326  and 
13327 \family sans
13328 Captionbelow
13329 \family default
13330  are special captions which respect the different space settings needed
13331  for captions placed above or below an element (if you follow strict typographic
13332  rules, you might want to place table captions always above the table).
13333  You can also use the class option 
13334 \family typewriter
13335 tablecaptionsabove
13336 \family default
13337 , which will switch 
13338 \family sans
13339 caption
13340 \family default
13341  to 
13342 \family sans
13343 captionabove
13344 \family default
13345  for tables and 
13346 \family sans
13347 captionbelow
13348 \family default
13349  for figures.
13350  You need at least Koma-Script version 2.8q to use this.
13351 \end_layout
13352
13353 \begin_layout Itemize
13354
13355 \family sans
13356 Dictum
13357 \family default
13358 : can be used to set a bonmot, e.
13359 \begin_inset space \thinspace{}
13360 \end_inset
13361
13362 g.
13363 \begin_inset space \space{}
13364 \end_inset
13365
13366 at the beginning of a chapter.
13367  If you use the optional argument (
13368 \family sans
13369 Insert\SpecialChar \menuseparator
13370 Short
13371 \begin_inset space ~
13372 \end_inset
13373
13374 Title
13375 \family default
13376 ), you can insert the dictum's author there.
13377  Dictum and author are separated by a line.
13378  You need at least Koma-Script version 2.8q to use this.
13379  
13380 \family sans
13381 Dictum
13382 \family default
13383  is not contained in 
13384 \emph on
13385 article (koma-script)
13386 \emph default
13387 .
13388 \end_layout
13389
13390 \begin_layout Standard
13391 The following types, together with the standard types 
13392 \family sans
13393 Title
13394 \family default
13395
13396 \family sans
13397 Author
13398 \family default
13399 , and 
13400 \family sans
13401 Date
13402 \family default
13403 , form the title area of the document.
13404  They must be entered ahead of the first 
13405 \begin_inset Quotes eld
13406 \end_inset
13407
13408 ordinary
13409 \begin_inset Quotes erd
13410 \end_inset
13411
13412  paragraph.
13413 \begin_inset Foot
13414 status collapsed
13415
13416 \begin_layout Plain Layout
13417 The corresponding LaTeX commands must appear before the 
13418 \family typewriter
13419
13420 \backslash
13421 maketitle
13422 \family default
13423  command.
13424 \end_layout
13425
13426 \end_inset
13427
13428  When such a type is used more than once, the latter usage overwrites the
13429  former one, that means, for every type only the latest usage is valid.
13430  The order of the different types however has, like 
13431 \family sans
13432 Title
13433 \family default
13434
13435 \family sans
13436 Author
13437 \family default
13438 , and 
13439 \family sans
13440 Date
13441 \family default
13442 , no effect on the appearance of the produced document.
13443 \end_layout
13444
13445 \begin_layout Itemize
13446
13447 \family sans
13448 Subject
13449 \family default
13450 : produces a centered paragraph above the ordinary title (
13451 \family sans
13452 Title
13453 \family default
13454
13455 \family sans
13456 Author
13457 \family default
13458
13459 \family sans
13460 Date
13461 \family default
13462 ) for the subject of the document.
13463 \end_layout
13464
13465 \begin_layout Itemize
13466
13467 \family sans
13468 Publishers
13469 \family default
13470 : produces a centered paragraph below the ordinary title (
13471 \family sans
13472 Title
13473 \family default
13474
13475 \family sans
13476 Author
13477 \family default
13478
13479 \family sans
13480 Date
13481 \family default
13482 ) for the publishers' name.
13483 \end_layout
13484
13485 \begin_layout Itemize
13486
13487 \family sans
13488 Dedication
13489 \family default
13490 : in 
13491 \emph on
13492 report (koma-script)
13493 \emph default
13494  and 
13495 \emph on
13496 book (koma-script)
13497 \emph default
13498  produces a centered paragraph on its own page behind the title page, or
13499  in 
13500 \emph on
13501 article (koma-script)
13502 \emph default
13503  produces a centered paragraph below the ordinary title (
13504 \family sans
13505 Title
13506 \family default
13507
13508 \family sans
13509 Author
13510 \family default
13511
13512 \family sans
13513 Date
13514 \family default
13515
13516 \family sans
13517 Publishers
13518 \family default
13519 ) for a dedication.
13520 \end_layout
13521
13522 \begin_layout Itemize
13523
13524 \family sans
13525 Titlehead
13526 \family default
13527 : produces a left aligned paragraph above the ordinary title (
13528 \family sans
13529 Title
13530 \family default
13531
13532 \family sans
13533 Author
13534 \family default
13535
13536 \family sans
13537 Date
13538 \family default
13539
13540 \family sans
13541 Subject
13542 \family default
13543 ) for a document`s head.
13544 \end_layout
13545
13546 \begin_layout Itemize
13547
13548 \family sans
13549 Uppertitleback
13550 \family default
13551 : produces in a double-sided print in 
13552 \emph on
13553 report (koma-script)
13554 \emph default
13555  and 
13556 \emph on
13557 book (koma-script)
13558 \emph default
13559  a left-aligned paragraph at the top of the title page`s back or has no
13560  effect in a single-sided print or in 
13561 \emph on
13562 article (koma-script)
13563 \emph default
13564 .
13565 \end_layout
13566
13567 \begin_layout Itemize
13568
13569 \family sans
13570 Lowertitleback
13571 \family default
13572 : produces in a double-sided print in 
13573 \emph on
13574 report (koma-script)
13575 \emph default
13576  and 
13577 \emph on
13578 book (koma-script)
13579 \emph default
13580  a left-aligned paragraph at the bottom of the title page`s back or has
13581  no effect in a single-sided print or in 
13582 \emph on
13583 article (koma-script)
13584 \emph default
13585 .
13586 \end_layout
13587
13588 \begin_layout Itemize
13589
13590 \family sans
13591 Extratitle
13592 \family default
13593 : produces a special 
13594 \begin_inset Quotes eld
13595 \end_inset
13596
13597 dirty
13598 \begin_inset Quotes erd
13599 \end_inset
13600
13601  page ahead of the actual document containing a paragraph without special
13602  formatting.
13603 \end_layout
13604
13605 \begin_layout Standard
13606 The layout files for the document classes 
13607 \emph on
13608 article (koma-script)
13609 \emph default
13610
13611 \emph on
13612 report (koma-script)
13613 \emph default
13614 , and 
13615 \emph on
13616 book (koma-script)
13617 \emph default
13618  do include the file 
13619 \family typewriter
13620 scrmacros.inc
13621 \family default
13622 .
13623  This is thought of as a place to define your own types.
13624  Copy scrmacros
13625 \family typewriter
13626 .inc
13627 \family default
13628  in your personal layout directory and edit the file!
13629 \end_layout
13630
13631 \begin_layout Subsection
13632 letter (koma-script)
13633 \end_layout
13634
13635 \begin_layout Standard
13636 \noindent
13637 The document class 
13638 \emph on
13639 letter (koma-script)
13640 \emph default
13641  is implemented in the layout file 
13642 \family typewriter
13643 scrlettr.layout
13644 \family default
13645 .
13646  It contains all the paragraph types of the corresponding standard document
13647  class 
13648 \emph on
13649 letter
13650 \emph default
13651 , partly modified, with the exception of the LyX specific types 
13652 \family sans
13653 LyX-Code
13654 \family default
13655  and 
13656 \family sans
13657 Comment
13658 \family default
13659  and the 
13660 \family sans
13661 List
13662 \family default
13663  type, which is replaced by the new 
13664 \family sans
13665 Labeling
13666 \family default
13667  type.
13668  In addition, it contains, in contrast to the standard document class, the
13669  standard types 
13670 \family sans
13671 LaTeX
13672 \family default
13673
13674 \family sans
13675 Quotation
13676 \family default
13677
13678 \family sans
13679 Quote
13680 \family default
13681 , and 
13682 \family sans
13683 Verse
13684 \family default
13685 .
13686  Furthermore, there are a number of new letter specific types.
13687 \end_layout
13688
13689 \begin_layout Standard
13690 The appearance of the letter produced by this document class can be controlled
13691  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13692 \begin_inset Foot
13693 status collapsed
13694
13695 \begin_layout Plain Layout
13696 For example, the standard appearance of the letter`s heading, consisting
13697  of name and address, is quite self-willed.
13698  An 
13699 \begin_inset Quotes eld
13700 \end_inset
13701
13702 ordinary
13703 \begin_inset Quotes erd
13704 \end_inset
13705
13706  heading is produced by the following LaTeX commands in the preamble:
13707 \end_layout
13708
13709 \begin_layout LyX-Code
13710
13711 \backslash
13712 firsthead{
13713 \backslash
13714 parbox[b]{
13715 \backslash
13716 textwidth}
13717 \end_layout
13718
13719 \begin_layout LyX-Code
13720   {
13721 \backslash
13722 ignorespaces 
13723 \backslash
13724 fromname
13725 \backslash
13726
13727 \backslash
13728  
13729 \backslash
13730 ignorespaces 
13731 \backslash
13732 fromaddress}} 
13733 \end_layout
13734
13735 \begin_layout LyX-Code
13736
13737 \backslash
13738 nexthead{
13739 \backslash
13740 parbox[b]{
13741 \backslash
13742 textwidth}
13743 \end_layout
13744
13745 \begin_layout LyX-Code
13746   {
13747 \backslash
13748 ignorespaces 
13749 \backslash
13750 fromname 
13751 \backslash
13752 hfill 
13753 \backslash
13754 ignorespaces 
13755 \backslash
13756 pagename
13757 \backslash
13758  
13759 \backslash
13760 thepage}}
13761 \end_layout
13762
13763 \end_inset
13764
13765  A detailed German description of such LaTeX commands can be found in the
13766  Koma-Script documentation 
13767 \emph on
13768 scrguide
13769 \emph default
13770 .
13771  With it, the letter's author can produce his personal letter layout.
13772 \end_layout
13773
13774 \begin_layout Standard
13775 The types 
13776 \family sans
13777 Letter
13778 \family default
13779  and 
13780 \family sans
13781 Opening
13782 \family default
13783  define the beginning of the letter and must be used in every letter.
13784  To emphasize them in the LyX document class, they are marked with the letter
13785  
13786 \shape italic
13787 L
13788 \shape default
13789  or 
13790 \shape italic
13791 O
13792 \shape default
13793 , resp.
13794 \begin_inset space ~
13795 \end_inset
13796
13797 in the left margin.
13798  It is possible to write any number of letters in one file.
13799  An 
13800 \family sans
13801 Opening
13802 \family default
13803  type produces a new letter using the same addressee and a 
13804 \family sans
13805 Letter
13806 \family default
13807  type produces a new addressee.
13808  The types 
13809 \family sans
13810 Closing
13811 \family default
13812
13813 \family sans
13814 PS
13815 \family default
13816
13817 \family sans
13818 CC
13819 \family default
13820 , and 
13821 \family sans
13822 Encl
13823 \family default
13824  are ordinary paragraph types and can also be used several times in one
13825  and the same letter.
13826 \end_layout
13827
13828 \begin_layout Itemize
13829
13830 \family sans
13831 Letter
13832 \family default
13833 : produces a paragraph for the addressee and implicitly defines the beginning
13834  of the letter.
13835 \end_layout
13836
13837 \begin_layout Itemize
13838
13839 \family sans
13840 Opening
13841 \family default
13842 : produces a paragraph for the form of address and implicitly produces a
13843  new letter.
13844 \end_layout
13845
13846 \begin_layout Itemize
13847
13848 \family sans
13849 Closing
13850 \family default
13851 : produces a paragraph for a close.
13852 \end_layout
13853
13854 \begin_layout Itemize
13855
13856 \family sans
13857 PS
13858 \family default
13859 : produces a paragraph for a postscript.
13860 \end_layout
13861
13862 \begin_layout Itemize
13863
13864 \family sans
13865 CC
13866 \family default
13867 : produces a paragraph for a distribution list.
13868 \end_layout
13869
13870 \begin_layout Itemize
13871
13872 \family sans
13873 Encl
13874 \family default
13875 : produces a paragraph for enclosures.
13876 \end_layout
13877
13878 \begin_layout Standard
13879 The types 
13880 \family sans
13881 Name
13882 \family default
13883
13884 \family sans
13885 Signature
13886 \family default
13887
13888 \family sans
13889 Address
13890 \family default
13891
13892 \family sans
13893 Telephone
13894 \family default
13895
13896 \family sans
13897 Place
13898 \family default
13899
13900 \family sans
13901 Backaddress
13902 \family default
13903
13904 \family sans
13905 Specialmail
13906 \family default
13907
13908 \family sans
13909 Location
13910 \family default
13911
13912 \family sans
13913 Title
13914 \family default
13915 , and 
13916 \family sans
13917 Subject
13918 \family default
13919  are input types provided with a label to enter information, which will
13920  be processed by the document class.
13921 \begin_inset Foot
13922 status open
13923
13924 \begin_layout Plain Layout
13925 It could be seen as a matter of inconsequence, that the types 
13926 \family sans
13927 Letter
13928 \family default
13929  and 
13930 \family sans
13931 Opening
13932 \family default
13933  described above are not such input types as well.
13934  Because of the special meaning of those types, however, I have implemented
13935  them as ordinary paragraph types with a one letter mark in the left margin.
13936  Moreover, it would affect my feeling of symmetry, if the 
13937 \family sans
13938 Opening
13939 \family default
13940  type and the 
13941 \family sans
13942 Closing
13943 \family default
13944  type had such a serious different appearance.
13945 \end_layout
13946
13947 \end_inset
13948
13949  The types must be used ahead of the corresponding 
13950 \family sans
13951 Opening
13952 \family default
13953  type.
13954 \end_layout
13955
13956 \begin_layout Standard
13957 An implementation of these types in a WYSIWYG fashion does not seem to make
13958  sense, because the real appearance of the produced letter does not only
13959  depend on the usage of the particular type, but also on other factors.
13960  For example, a signature entered in the 
13961 \family sans
13962 Signature
13963 \family default
13964  type will in the standard behavior appear in the produced letter only,
13965  when in the same letter also a 
13966 \family sans
13967 Closing
13968 \family default
13969  type is used.
13970  The entered value of the 
13971 \family sans
13972 Telephone
13973 \family default
13974  type will in the standard behavior not appear in the produced letter at
13975  all.
13976  The possibility to design the letter`s heading freely is already indicated
13977  in a footnote above.
13978 \end_layout
13979
13980 \begin_layout Standard
13981 The input types can also be used as empty paragraphs.
13982  This makes sense e.
13983 \begin_inset space \thinspace{}
13984 \end_inset
13985
13986 g.
13987 \begin_inset space \space{}
13988 \end_inset
13989
13990 for the 
13991 \family sans
13992 Signature
13993 \family default
13994  type.
13995  If the 
13996 \family sans
13997 Signature
13998 \family default
13999  type is not used at all, in the standard behavior the value of the 
14000 \family sans
14001 Name
14002 \family default
14003  type is used as signature, whereas if an empty 
14004 \family sans
14005 Signature
14006 \family default
14007  type is used, no signature value is defined.
14008 \end_layout
14009
14010 \begin_layout Standard
14011 By using the input types it is possible to write a letter template, containing
14012  filled input types with your personal dates (name, address, etc.) and empty
14013  input types for other dates you want to enter.
14014 \end_layout
14015
14016 \begin_layout Itemize
14017
14018 \family sans
14019 Name
14020 \family default
14021 : sender's name, in the standard behavior appears as a centered paragraph
14022  in small caps in the letter`s heading.
14023 \end_layout
14024
14025 \begin_layout Itemize
14026
14027 \family sans
14028 Signature
14029 \family default
14030 : sender's signature, in the standard behavior appears below the 
14031 \family sans
14032 Closing
14033 \family default
14034  type.
14035  If no 
14036 \family sans
14037 Signature
14038 \family default
14039  type is used, the value of the 
14040 \family sans
14041 Name
14042 \family default
14043  type appears instead.
14044 \end_layout
14045
14046 \begin_layout Itemize
14047
14048 \family sans
14049 Address
14050 \family default
14051 : sender's address, in the standard behavior appears in a centered paragraph
14052  in the letter`s heading below the sender's name.
14053 \end_layout
14054
14055 \begin_layout Itemize
14056
14057 \family sans
14058 Telephone
14059 \family default
14060 : sender's telephone number, in the standard behavior only sets the LaTeX
14061  variable 
14062 \family typewriter
14063
14064 \backslash
14065 telephonenum
14066 \family default
14067 .
14068 \end_layout
14069
14070 \begin_layout Itemize
14071
14072 \family sans
14073 Place
14074 \family default
14075 : place of the letter`s making.
14076 \end_layout
14077
14078 \begin_layout Itemize
14079
14080 \family sans
14081 Date
14082 \family default
14083 : date of the letter`s making.
14084  
14085 \family sans
14086 Place
14087 \family default
14088  and 
14089 \family sans
14090 Date
14091 \family default
14092 , in the standard behavior, produce the place and the date in a right-aligned
14093  line below the addressee's field.
14094  If an empty 
14095 \family sans
14096 Date
14097 \family default
14098  type is used, neither place nor date appear, independent of the value of
14099  the 
14100 \family sans
14101 Place
14102 \family default
14103  type.
14104  If no 
14105 \family sans
14106 Date
14107 \family default
14108  type is used, the date of the letter `s production is used.
14109 \end_layout
14110
14111 \begin_layout Itemize
14112
14113 \family sans
14114 Backaddress
14115 \family default
14116 : sender`s back address, in the standard behavior appears above the addressee's
14117  field in a small sans serif font.
14118 \end_layout
14119
14120 \begin_layout Itemize
14121
14122 \family sans
14123 Specialmail
14124 \family default
14125 : special mail information, in the standard behavior appears underlined
14126  above the addressee's field below the back address.
14127 \end_layout
14128
14129 \begin_layout Itemize
14130
14131 \family sans
14132 Location
14133 \family default
14134 : additional information, in the standard behavior appears on right side
14135  below the addressee`s field.
14136 \end_layout
14137
14138 \begin_layout Itemize
14139
14140 \family sans
14141 Title
14142 \family default
14143 : the letter's title, in the standard behavior appears in a big, bold, sans
14144  serif font above the subject.
14145 \end_layout
14146
14147 \begin_layout Itemize
14148
14149 \family sans
14150 Subject
14151 \family default
14152 : the letter's subject, in the standard behavior appears in a bold font
14153  above the 
14154 \family sans
14155 Opening
14156 \family default
14157  paragraph.
14158 \end_layout
14159
14160 \begin_layout Standard
14161 The types 
14162 \family sans
14163 Yourref
14164 \family default
14165
14166 \family sans
14167 Yourmail
14168 \family default
14169
14170 \family sans
14171 Myref
14172 \family default
14173
14174 \family sans
14175 Customer
14176 \family default
14177 , and 
14178 \family sans
14179 Invoice
14180 \family default
14181  produce a business letter like line above the 
14182 \family sans
14183 Title
14184 \family default
14185  line containing the fields 
14186 \begin_inset Quotes eld
14187 \end_inset
14188
14189 Your ref.
14190 \begin_inset Quotes erd
14191 \end_inset
14192
14193
14194 \begin_inset Quotes eld
14195 \end_inset
14196
14197 Your letter of
14198 \begin_inset Quotes erd
14199 \end_inset
14200
14201
14202 \begin_inset Quotes eld
14203 \end_inset
14204
14205 Our ref.
14206 \begin_inset Quotes erd
14207 \end_inset
14208
14209
14210 \begin_inset Quotes eld
14211 \end_inset
14212
14213 Customer no.
14214 \begin_inset Quotes erd
14215 \end_inset
14216
14217
14218 \begin_inset Quotes eld
14219 \end_inset
14220
14221 Invoice no.
14222 \begin_inset Quotes erd
14223 \end_inset
14224
14225 , and 
14226 \begin_inset Quotes eld
14227 \end_inset
14228
14229 Date
14230 \begin_inset Quotes erd
14231 \end_inset
14232
14233 .
14234  For the date field, the value of the 
14235 \family sans
14236 Date
14237 \family default
14238  type is used.
14239  If one of these 
14240 \begin_inset Quotes eld
14241 \end_inset
14242
14243 business letter types
14244 \begin_inset Quotes erd
14245 \end_inset
14246
14247  is used, the value of the 
14248 \family sans
14249 Place
14250 \family default
14251  type however does not appear, but only the LaTeX variable 
14252 \family typewriter
14253
14254 \backslash
14255 fromplace
14256 \family default
14257  is set.
14258  The ordinary output of place and date in a right-aligned line below the
14259  addressee`s field is suppressed.
14260  The types are implemented as input types provided with a label and must
14261  be used ahead of the corresponding 
14262 \family sans
14263 Opening
14264 \family default
14265  type.
14266 \end_layout
14267
14268 \begin_layout Itemize
14269
14270 \family sans
14271 Yourref
14272 \family default
14273 : Your ref.
14274 \end_layout
14275
14276 \begin_layout Itemize
14277
14278 \family sans
14279 Yourmail
14280 \family default
14281 : Your letter of.
14282 \end_layout
14283
14284 \begin_layout Itemize
14285
14286 \family sans
14287 Myref
14288 \family default
14289 : Our ref.
14290 \end_layout
14291
14292 \begin_layout Itemize
14293
14294 \family sans
14295 Customer
14296 \family default
14297 : Customer no.
14298 \end_layout
14299
14300 \begin_layout Itemize
14301
14302 \family sans
14303 Invoice
14304 \family default
14305 : Invoice no.
14306 \end_layout
14307
14308 \begin_layout Subsection
14309 The new letter class: letter (koma-script v.2)
14310 \end_layout
14311
14312 \begin_layout Standard
14313 by 
14314 \noun on
14315 Jürgen Spitzmüller
14316 \end_layout
14317
14318 \begin_layout Standard
14319 \begin_inset VSpace medskip
14320 \end_inset
14321
14322
14323 \end_layout
14324
14325 \begin_layout Standard
14326 \noindent
14327 Koma-Script version 2.8 has introduced a new letter class 
14328 \family typewriter
14329 scrlttr2
14330 \family default
14331  which supersedes the now unsupported 
14332 \family typewriter
14333 scrlettr
14334 \family default
14335 .
14336  It has — on the LaTeX side — a completely new interface and is not compatible
14337  with the old class.
14338  Therefore, LyX supports both, though it is recommended you use the new
14339  class.
14340 \end_layout
14341
14342 \begin_layout Standard
14343 This class covers the same functionality as 
14344 \emph on
14345 letter (koma-script),
14346 \emph default
14347  and a few more.
14348  The basic items are 
14349 \family sans
14350 Address
14351 \family default
14352  (receiver's address, same as 
14353 \family sans
14354 Letter
14355 \family default
14356  in the old layout), 
14357 \family sans
14358 Opening
14359 \family default
14360 , and 
14361 \family sans
14362 Closing
14363 \family default
14364 .
14365  
14366 \family sans
14367 NextAddress
14368 \family default
14369  will start a new letter (i.
14370 \begin_inset space \thinspace{}
14371 \end_inset
14372
14373 e.
14374 \begin_inset space \space{}
14375 \end_inset
14376
14377 you can write several letters per document).
14378  New elements are sender's 
14379 \family sans
14380 E-Mail
14381 \family default
14382
14383 \family sans
14384 URL
14385 \family default
14386
14387 \family sans
14388 Fax
14389 \family default
14390
14391 \family sans
14392 Bank
14393 \family default
14394  and the possibility to use a 
14395 \family sans
14396 Logo
14397 \family default
14398  (via 
14399 \family sans
14400 Insert\SpecialChar \menuseparator
14401 Graphics
14402 \family default
14403 ) in the header.
14404 \end_layout
14405
14406 \begin_layout Standard
14407 The biggest improvement is, though, that the letter's layout is configurable
14408  to meet almost any needs.
14409  This can be done via the preamble or with a special style file (Letter
14410  Class Option, extension 
14411 \family typewriter
14412 *.lco
14413 \family default
14414 ), that will be read in as a class option.
14415 \begin_inset Foot
14416 status collapsed
14417
14418 \begin_layout Plain Layout
14419 The KOMA package comes with some default 
14420 \family typewriter
14421 *.lco
14422 \family default
14423  files.
14424  There is, for instance, a 
14425 \family typewriter
14426 DIN.lco
14427 \family default
14428  file that follows german typesetting rules, or a 
14429 \family typewriter
14430 KOMAold.lco
14431 \family default
14432  that provides the default layout of the old 
14433 \family typewriter
14434 scrlettr
14435 \family default
14436  class.
14437  The latter can be loaded with the class option 
14438 \family typewriter
14439 KOMAold
14440 \family default
14441 , inserted via the 
14442 \family sans
14443 \bar under
14444 L
14445 \bar default
14446 ayout\SpecialChar \menuseparator
14447
14448 \bar under
14449 D
14450 \bar default
14451 ocument\SpecialChar \menuseparator
14452 Extra Options
14453 \family default
14454  field.
14455 \end_layout
14456
14457 \end_inset
14458
14459  Have a look at the 
14460 \emph on
14461 koma-letter2
14462 \emph default
14463  template that is included in LyX for examples.
14464  A detailed description is to be found in the Koma-Script documentation
14465  (
14466 \emph on
14467 scrguide
14468 \emph default
14469 ).
14470 \end_layout
14471
14472 \begin_layout Subsection
14473 Problems
14474 \end_layout
14475
14476 \begin_layout Standard
14477 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14478  some problems.
14479 \end_layout
14480
14481 \begin_layout Itemize
14482 The chapter number of a 
14483 \family sans
14484 Chapter
14485 \family default
14486  type appears on a line of its own above the chapter heading instead of
14487  appearing in the same line ahead of it.
14488  The cause for that is the LyX internal behavior for the labeltype 
14489 \family sans
14490 Counter_Chapter
14491 \family default
14492  in the layout file.
14493 \end_layout
14494
14495 \begin_layout Itemize
14496 The headings of the types 
14497 \family sans
14498 Addchap
14499 \family default
14500  and 
14501 \family sans
14502 Addsec
14503 \family default
14504  are only put in the 
14505 \begin_inset Quotes eld
14506 \end_inset
14507
14508 true
14509 \begin_inset Quotes erd
14510 \end_inset
14511
14512  LaTeX table of contents, but not in the LyX table of contents (
14513 \family sans
14514 Document\SpecialChar \menuseparator
14515 Table
14516 \begin_inset space ~
14517 \end_inset
14518
14519 of
14520 \begin_inset space ~
14521 \end_inset
14522
14523 Contents
14524 \family default
14525 ).
14526 \end_layout
14527
14528 \begin_layout Itemize
14529 The paragraphs in a 
14530 \emph on
14531 letter
14532 \emph default
14533  document class appear in a skip separation mode, not indented.
14534  This is the standard behavior, no special LaTeX commands are needed for
14535  that.
14536  But in the 
14537 \family sans
14538 Document\SpecialChar \menuseparator
14539 Settings
14540 \family default
14541  dialog the corresponding radio button indicates 
14542 \family sans
14543 Indent
14544 \family default
14545 .
14546  A 
14547 \family sans
14548 Skip
14549 \family default
14550  value always has the effect that extra LaTeX commands are inserted in the
14551  document to produce the gap, which is not what is wanted in this case.
14552 \end_layout
14553
14554 \begin_layout Section
14555 Memoir
14556 \end_layout
14557
14558 \begin_layout Standard
14559 By 
14560 \noun on
14561 Jürgen Spitzmüller
14562 \end_layout
14563
14564 \begin_layout Subsection
14565 Overview
14566 \end_layout
14567
14568 \begin_layout Standard
14569 Memoir is a very powerful and constantly evolving class.
14570  It has been designed with regard to fictional and non-fictional literature.
14571  Its aim is to let the user have maximum control over the typesetting of
14572  his document.
14573  Memoir is based on the standard book class, but it can also emulate the
14574  article class (see below).
14575 \end_layout
14576
14577 \begin_layout Standard
14578 Peter Wilson, the developer of Memoir, is known as the author of lots of
14579  useful packages in the LaTeX world.
14580  Most of them have been merged with Memoir.
14581  Therefore, it is much easier to layout the table of contents, appendices,
14582  chapter designs and such.
14583  LyX, though, does not support all of these goodies natively.
14584  Some of them might be added to forthcoming releases
14585 \begin_inset Foot
14586 status collapsed
14587
14588 \begin_layout Plain Layout
14589 You are invited to send suggestions to 
14590 \begin_inset Flex URL
14591 status collapsed
14592
14593 \begin_layout Plain Layout
14594
14595 lyx-devel@lists.lyx.org
14596 \end_layout
14597
14598 \end_inset
14599
14600 .
14601 \end_layout
14602
14603 \end_inset
14604
14605 , lots will probably never be supported, due to the limitations of LyX's
14606  framework.
14607  Of course you can still use all features with the help of some native LaTeX
14608  commands (TeX code
14609 \begin_inset Foot
14610 status collapsed
14611
14612 \begin_layout Plain Layout
14613 Cf.
14614 \begin_inset ERT
14615 status collapsed
14616
14617 \begin_layout Plain Layout
14618
14619
14620 \backslash
14621  
14622 \end_layout
14623
14624 \end_inset
14625
14626 section
14627 \begin_inset space ~
14628 \end_inset
14629
14630
14631 \begin_inset CommandInset ref
14632 LatexCommand ref
14633 reference "sec:Inserting-TeX-Code"
14634
14635 \end_inset
14636
14637  for details.
14638 \end_layout
14639
14640 \end_inset
14641
14642 ).
14643  In this section, we can only list those features that are natively supported
14644  by LyX.
14645  For detailed descriptions (and for the rest of features) we recommend you
14646  have a look at the detailed manual of the Memoir class
14647 \begin_inset Foot
14648 status collapsed
14649
14650 \begin_layout Plain Layout
14651 Cf.
14652 \begin_inset ERT
14653 status collapsed
14654
14655 \begin_layout Plain Layout
14656
14657
14658 \backslash
14659  
14660 \end_layout
14661
14662 \end_inset
14663
14664
14665 \begin_inset Flex URL
14666 status collapsed
14667
14668 \begin_layout Plain Layout
14669
14670 CTAN:/macros/latex/memoir/memman.pdf
14671 \end_layout
14672
14673 \end_inset
14674
14675 .
14676 \end_layout
14677
14678 \end_inset
14679
14680 , which is not only a user guide for the class, but also both a comprehensive
14681  description on good typesetting and a superb example for good typesetting
14682  itself.
14683 \end_layout
14684
14685 \begin_layout Subsection
14686 Basic features and restrictions
14687 \end_layout
14688
14689 \begin_layout Standard
14690 Memoir supports basically all features of the standard book classes.
14691  There are, however, some differences, as follows:
14692 \end_layout
14693
14694 \begin_layout Description
14695 Font
14696 \begin_inset space ~
14697 \end_inset
14698
14699 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14700 \end_layout
14701
14702 \begin_layout Description
14703 Page
14704 \begin_inset space ~
14705 \end_inset
14706
14707 style: The fancy page style is not supported, due to a command clash between
14708  Memoir and the fancyhdr package (they both define a command with the same
14709  name, which confuses LaTeX).
14710  Instead, Memoir comes with a number of its own page styles (see 
14711 \family sans
14712 Layout\SpecialChar \menuseparator
14713 Document\SpecialChar \menuseparator
14714 Page
14715 \begin_inset space ~
14716 \end_inset
14717
14718 Style
14719 \family default
14720 ).
14721  If you want to use these for the chapter pages, you have to use the command
14722  
14723 \family typewriter
14724
14725 \backslash
14726 chapterstyle
14727 \family default
14728  in the main text or in preamble (e.
14729 \begin_inset space \thinspace{}
14730 \end_inset
14731
14732 g.
14733 \begin_inset space \space{}
14734 \end_inset
14735
14736
14737 \family typewriter
14738
14739 \backslash
14740 chapterstyle{companion}
14741 \family default
14742 ).
14743 \end_layout
14744
14745 \begin_layout Description
14746 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14747  optional argument in the standard classes.
14748  With this, you can specify an alternative version of the title for the
14749  table of contents and the headers (for instance, if the title is too long).
14750  In LyX, you can do this via 
14751 \family sans
14752 Insert\SpecialChar \menuseparator
14753 Short
14754 \begin_inset space ~
14755 \end_inset
14756
14757 Title
14758 \family default
14759  at the beginning of a chapter/section.
14760  Memoir features a second optional argument and thus separates the table
14761  of contents from the header.
14762  You can define three variants of a title with this: one for the main text,
14763  one for the table of contents, and one for the headers.
14764  Simply insert two optional arguments if you need this feature, the first
14765  one containing the short title for the Table of Contents, the second one
14766  containing an alternative short title for the headers.
14767 \end_layout
14768
14769 \begin_layout Description
14770 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14771  of contents, the list of figures and the list of table start a new page
14772  automatically.
14773  Memoir does not follow this route.
14774  You have to insert a page break yourself, if you want to have one.
14775 \end_layout
14776
14777 \begin_layout Description
14778 Titlepage: For some unknown reason, Memoir uses pagination on the title
14779  page (in the standard classes, title pages are 
14780 \begin_inset Quotes eld
14781 \end_inset
14782
14783 empty
14784 \begin_inset Quotes erd
14785 \end_inset
14786
14787 ).
14788  If you want an empty title page, type 
14789 \family typewriter
14790
14791 \backslash
14792 aliaspagestyle{title}{empty}
14793 \family default
14794  in the preamble.
14795 \end_layout
14796
14797 \begin_layout Description
14798 Article: With the class option 
14799 \emph on
14800 article
14801 \emph default
14802  (to be inserted in 
14803 \family sans
14804 Layout\SpecialChar \menuseparator
14805 Document\SpecialChar \menuseparator
14806 Extra
14807 \begin_inset space ~
14808 \end_inset
14809
14810 Options
14811 \family default
14812 ), you can emulate article style.
14813  That is, counters (footnotes, figures, tables etc.) will not be reset on
14814  new chapters, chapters don't start a new page (but are—in contrary to 
14815 \begin_inset Quotes eld
14816 \end_inset
14817
14818 real
14819 \begin_inset Quotes erd
14820 \end_inset
14821
14822  article classes—still allowed), parts, though, use their own page, as in
14823  book.
14824 \end_layout
14825
14826 \begin_layout Description
14827 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14828  font commands, which have been used in the old LaTeX version 2.09 (e.
14829 \begin_inset space \thinspace{}
14830 \end_inset
14831
14832 g.
14833 \begin_inset space \space{}
14834 \end_inset
14835
14836
14837 \family typewriter
14838
14839 \backslash
14840 rm
14841 \family default
14842
14843 \family typewriter
14844
14845 \backslash
14846 it
14847 \family default
14848 ).
14849  It produces an error and stops LaTeX whenever such a command appears.
14850  The class option 
14851 \emph on
14852 oldfontcommands
14853 \emph default
14854  reallows the commands and spits out warnings instead (which does at least
14855  not stop LaTeX).
14856  Since a lot of packages and particularly BibTeX style files are still using
14857  those commands, we have decided to use this option by default.
14858 \end_layout
14859
14860 \begin_layout Subsection
14861 Extra features
14862 \end_layout
14863
14864 \begin_layout Standard
14865 We will only describe the features supported by LyX (which is not much currently
14866 ).
14867  Please consult the Memoir manual
14868 \begin_inset Foot
14869 status collapsed
14870
14871 \begin_layout Plain Layout
14872 Cf.
14873 \begin_inset ERT
14874 status collapsed
14875
14876 \begin_layout Plain Layout
14877
14878
14879 \backslash
14880  
14881 \end_layout
14882
14883 \end_inset
14884
14885
14886 \begin_inset Flex URL
14887 status collapsed
14888
14889 \begin_layout Plain Layout
14890
14891 CTAN:/macros/latex/memoir/memman.pdf
14892 \end_layout
14893
14894 \end_inset
14895
14896 .
14897 \end_layout
14898
14899 \end_inset
14900
14901  for details.
14902 \end_layout
14903
14904 \begin_layout Description
14905 Abstract: You may wonder why an abstract is an extra feature.
14906  Well, it is in book class.
14907  Usually books don't have abstracts.
14908  Memoir, however, has.
14909  You can use it wherever and how often you like.
14910 \end_layout
14911
14912 \begin_layout Description
14913 Chapterprecis: You may know this older typesetting style: The contents of
14914  a chapter are summarized below the title and also in the table of contents
14915  (e.
14916 \begin_inset space \thinspace{}
14917 \end_inset
14918
14919 g.
14920 \begin_inset space \space{}
14921 \end_inset
14922
14923
14924 \emph on
14925 Our hero arrives in Troia; he loses some friends; he finds others
14926 \emph default
14927 ).
14928  Chapterprecis does exactly this.
14929  It is therefore only sensible below a chapter.
14930 \end_layout
14931
14932 \begin_layout Description
14933 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14934  The epigraph environment provides an elegant way of typesetting such a
14935  motto.
14936  The motto itself (text) and its author (source) are divided by a short
14937  line.
14938  Unfortunately, we have to fool LyX a bit here again, since the environment
14939  needs two arguments (text and source).
14940  In this case, we have to use curly brackets (in TeX mode) between the two
14941  arguments: 
14942 \emph on
14943 <smart slogan>
14944 \emph default
14945  
14946 \family typewriter
14947 }{
14948 \family default
14949  
14950 \emph on
14951 <author of the slogan>.
14952 \end_layout
14953
14954 \begin_layout Description
14955 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14956  complex figurative poems).
14957  LyX can only support a few of them.
14958  One is poemtitle, which is a centered title for poems, which will also
14959  be added to the table of contents (verse is the standard environment for
14960  poems.
14961  Memoir has some enhanced versions of verse, but you need to use TeX code,
14962  because they have to be nested inside regular verse environments, which
14963  is not possible with LyX).
14964 \end_layout
14965
14966 \begin_layout Description
14967 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14968 \end_layout
14969
14970 \begin_layout Section
14971 Article (mwart), book (mwbk) and report (mwrep)
14972 \begin_inset Argument status
14973 status collapsed
14974
14975 \begin_layout Plain Layout
14976 The 
14977 \family typewriter
14978 mw
14979 \family default
14980  Classes
14981 \end_layout
14982
14983 \end_inset
14984
14985
14986 \end_layout
14987
14988 \begin_layout Standard
14989 by 
14990 \noun on
14991 Tomasz Luczak
14992 \end_layout
14993
14994 \begin_layout Standard
14995 The LyX document classes 
14996 \emph on
14997 article (mwart)
14998 \emph default
14999
15000 \emph on
15001 report (mwrep)
15002 \emph default
15003  and 
15004 \emph on
15005 book
15006 \emph default
15007  
15008 \emph on
15009 (mwbk)
15010 \emph default
15011  correspond to the LaTeX document classes 
15012 \family typewriter
15013 mwart.cls
15014 \family default
15015
15016 \family typewriter
15017 mwrep.cls
15018 \family default
15019  and 
15020 \family typewriter
15021 mwbk.cls
15022 \family default
15023 , resp.
15024  They are replacements for the standard document classes 
15025 \family typewriter
15026 article.cls
15027 \family default
15028
15029 \family typewriter
15030 report.cls
15031 \family default
15032  and 
15033 \family typewriter
15034 book.cls
15035 \family default
15036 , resp., and fit better to Polish typography conventions in a number of points.
15037  
15038 \end_layout
15039
15040 \begin_layout Standard
15041 Basic differences:
15042 \end_layout
15043
15044 \begin_layout Itemize
15045 Unnumbered titles (with star, e.
15046 \begin_inset space \thinspace{}
15047 \end_inset
15048
15049 g.
15050 \begin_inset space \space{}
15051 \end_inset
15052
15053
15054 \family sans
15055 Section*
15056 \family default
15057 ) are added into table of contents,
15058 \end_layout
15059
15060 \begin_layout Itemize
15061 Additional page styles:
15062 \end_layout
15063
15064 \begin_deeper
15065 \begin_layout Description
15066 uheadings header with separated lines,
15067 \end_layout
15068
15069 \begin_layout Description
15070 myheadings custom header, contents headers via commands: 
15071 \family typewriter
15072
15073 \backslash
15074 markright
15075 \family default
15076  and 
15077 \family typewriter
15078
15079 \backslash
15080 markboth
15081 \family default
15082 ,
15083 \end_layout
15084
15085 \begin_layout Description
15086 myuheadings custom header with separated lines,
15087 \end_layout
15088
15089 \begin_layout Description
15090 outer page number is placed on outer side of page
15091 \end_layout
15092
15093 \end_deeper
15094 \begin_layout Itemize
15095 Options 
15096 \end_layout
15097
15098 \begin_deeper
15099 \begin_layout Description
15100 rmheadings serif titles — default,
15101 \end_layout
15102
15103 \begin_layout Description
15104 sfheadings sansserif titles,
15105 \end_layout
15106
15107 \begin_layout Description
15108 authortitle on title page first placed is author next title — default,
15109 \end_layout
15110
15111 \begin_layout Description
15112 titleauthor on title page first placed is title next author,
15113 \end_layout
15114
15115 \begin_layout Description
15116 withmarginpar reserve place on page for margins.
15117 \end_layout
15118
15119 \end_deeper
15120 \begin_layout Section
15121 Paper
15122 \end_layout
15123
15124 \begin_layout Standard
15125 The document class 
15126 \family sans
15127 paper
15128 \family default
15129  provides an alternative to the standard 
15130 \family sans
15131 article
15132 \family default
15133  class.
15134  It provides similar functionality, but you might prefer this layout with
15135  sans serif sections, headings, and more.
15136 \end_layout
15137
15138 \begin_layout Section
15139 RevTeX4
15140 \end_layout
15141
15142 \begin_layout Standard
15143 by 
15144 \noun on
15145 Amir Karger
15146 \end_layout
15147
15148 \begin_layout Standard
15149 \begin_inset VSpace bigskip
15150 \end_inset
15151
15152
15153 \end_layout
15154
15155 \begin_layout Standard
15156 \noindent
15157 The 
15158 \family sans
15159 Revtex
15160 \begin_inset space ~
15161 \end_inset
15162
15163 4
15164 \family default
15165  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15166 \begin_inset Formula $\beta$
15167 \end_inset
15168
15169  release of May, 1999) class.
15170 \end_layout
15171
15172 \begin_layout Standard
15173 LyX has a 
15174 \family sans
15175 Revtex
15176 \family default
15177  textclass, which works with RevTeX 3.1.
15178  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15179  That means that it doesn't interact very well with LyX, which requires
15180  LaTeX2e, although it has been kludged to work.
15181  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15182  LyX with the 
15183 \family sans
15184 RevTeX
15185 \begin_inset space ~
15186 \end_inset
15187
15188 4
15189 \family default
15190  textclass should also be pretty easy to use.
15191 \end_layout
15192
15193 \begin_layout Standard
15194 These documents are supposed to be used in 
15195 \emph on
15196 addition
15197 \emph default
15198  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15199  macros, and assume you'll know what to put in the preamble if necessary.
15200 \end_layout
15201
15202 \begin_layout Subsection
15203 Installation
15204 \end_layout
15205
15206 \begin_layout Standard
15207 All you need to do is install RevTeX 4, as described in the package's README
15208  file.
15209  The package can be found at The RevTeX 4 Web Site 
15210 \begin_inset Flex URL
15211 status collapsed
15212
15213 \begin_layout Plain Layout
15214
15215 http://publish.aps.org/revtex4/
15216 \end_layout
15217
15218 \end_inset
15219
15220 .
15221  Install it somewhere that LaTeX can see it.
15222  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15223  (i.
15224 \begin_inset space \thinspace{}
15225 \end_inset
15226
15227 e.
15228 \begin_inset space \space{}
15229 \end_inset
15230
15231 not the directory where you installed the class file.) Then, if you reconfigure
15232  LyX, it will find the class file and let you use the RevTeX4 textclass.
15233 \end_layout
15234
15235 \begin_layout Standard
15236 Probably the easiest way to get started is either to import a RevTeX 4 document
15237  using 
15238 \family typewriter
15239 tex2lyx
15240 \family default
15241 , or to use the 
15242 \family sans
15243 Revtex
15244 \begin_inset space ~
15245 \end_inset
15246
15247 4
15248 \family default
15249  template, found in the templates directory.
15250 \end_layout
15251
15252 \begin_layout Subsection
15253 Preamble Matter
15254 \end_layout
15255
15256 \begin_layout Standard
15257 Optional arguments to 
15258 \family typewriter
15259
15260 \backslash
15261 documentclass
15262 \family default
15263 , like 
15264 \begin_inset Quotes eld
15265 \end_inset
15266
15267 preprint
15268 \begin_inset Quotes erd
15269 \end_inset
15270
15271  and 
15272 \begin_inset Quotes eld
15273 \end_inset
15274
15275 aps
15276 \begin_inset Quotes erd
15277 \end_inset
15278
15279 , go in the 
15280 \family sans
15281 E
15282 \bar under
15283 x
15284 \bar default
15285 tra
15286 \begin_inset space ~
15287 \end_inset
15288
15289 Options
15290 \family default
15291  field in the 
15292 \family sans
15293 Document
15294 \begin_inset space ~
15295 \end_inset
15296
15297 Layout
15298 \family default
15299  dialog, as usual.
15300  Remember that in RevTeX, at least one optional argument is required! 
15301 \end_layout
15302
15303 \begin_layout Standard
15304 Other preamble matter, like 
15305 \family typewriter
15306
15307 \backslash
15308 draft
15309 \family default
15310  etc.
15311 \begin_inset space ~
15312 \end_inset
15313
15314 goes in the 
15315 \family sans
15316 LaTeX
15317 \begin_inset space ~
15318 \end_inset
15319
15320 Preamble
15321 \family default
15322  dialog, also as usual.
15323 \end_layout
15324
15325 \begin_layout Subsection
15326 Layouts
15327 \end_layout
15328
15329 \begin_layout Standard
15330 The layouts basically correspond to the commands in RevTeX4.0.
15331  For example, the Email layout corresponds to 
15332 \family typewriter
15333
15334 \backslash
15335 email{}
15336 \family default
15337 .
15338  Note that (at least as of RevTeX 4.0 Beta), the 
15339 \family sans
15340 Address
15341 \family default
15342  and 
15343 \family sans
15344 Affiliation
15345 \family default
15346  layouts are exactly equivalent, so you shouldn't need to use both.
15347 \begin_inset Foot
15348 status collapsed
15349
15350 \begin_layout Plain Layout
15351 In case you're curious, both were included so that 
15352 \family typewriter
15353 tex2lyx
15354 \family default
15355  would be able to translate both 
15356 \family typewriter
15357
15358 \backslash
15359 address
15360 \family default
15361  and 
15362 \family typewriter
15363
15364 \backslash
15365 affiliation
15366 \family default
15367 .
15368 \end_layout
15369
15370 \end_inset
15371
15372
15373 \end_layout
15374
15375 \begin_layout Subsection
15376 Important Notes
15377 \end_layout
15378
15379 \begin_layout Standard
15380 There are a couple of important unique aspects of RevTeX 4 which might cause
15381  bugs that will be even more confusing in LyX.
15382 \end_layout
15383
15384 \begin_layout Standard
15385 In RevTeX, the 
15386 \family typewriter
15387
15388 \backslash
15389 thanks
15390 \family default
15391  command goes 
15392 \emph on
15393 outside
15394 \emph default
15395  the 
15396 \family typewriter
15397
15398 \backslash
15399 author
15400 \family default
15401  command.
15402  The LyX equivalent is that there is a separate Thanks layout.
15403  Do 
15404 \emph on
15405 not
15406 \emph default
15407  write footnotes in the 
15408 \family sans
15409 Author
15410 \family default
15411  layout, or weird things may happen.
15412  See the RevTeX 4 documentation for more details.
15413 \end_layout
15414
15415 \begin_layout Standard
15416 Also, the 
15417 \family sans
15418 Author
15419 \begin_inset space ~
15420 \end_inset
15421
15422 Email
15423 \family default
15424
15425 \family sans
15426 Author
15427 \begin_inset space ~
15428 \end_inset
15429
15430 URL
15431 \family default
15432 , and 
15433 \family sans
15434 Thanks
15435 \family default
15436  layouts must be placed 
15437 \emph on
15438 in between
15439 \emph default
15440  the 
15441 \family sans
15442 Author
15443 \family default
15444  layout and the corresponding 
15445 \family sans
15446 Address
15447 \family default
15448  (or equivalent 
15449 \family sans
15450 Affiliation
15451 \family default
15452 ) layout.
15453  If you put the 
15454 \family sans
15455 Thanks
15456 \family default
15457  after the 
15458 \family sans
15459 Address
15460 \family default
15461 , the LaTeX won't compile.
15462 \end_layout
15463
15464 \begin_layout Subsection
15465 Drawbacks
15466 \end_layout
15467
15468 \begin_layout Standard
15469 The main problem with this layout is that you can't use the optional arguments
15470  to layouts like Email and Title.
15471  (The problem is not unique to this layout; you can't use optional arguments
15472  to the Section layouts either.) This means that after you export that file
15473  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15474  need to edit the LaTeX file with a text editor to add the optional arguments
15475  to set, e.
15476 \begin_inset space \thinspace{}
15477 \end_inset
15478
15479 g.
15480 \begin_inset space \space{}
15481 \end_inset
15482
15483 the running title for the page headers.
15484  Lacking these layouts makes the 
15485 \family typewriter
15486
15487 \backslash
15488 altaffiliation
15489 \family default
15490  (and the equivalent 
15491 \family typewriter
15492
15493 \backslash
15494 altaddress
15495 \family default
15496 ) useless, so the corresponding layouts don't exist, and will have to be
15497  added by hand.
15498 \begin_inset Foot
15499 status collapsed
15500
15501 \begin_layout Plain Layout
15502
15503 \emph on
15504 Note from JMarc:
15505 \emph default
15506  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15507  has not been updated yet to take advantage of it.
15508 \end_layout
15509
15510 \end_inset
15511
15512  
15513 \end_layout
15514
15515 \begin_layout Section
15516 Springer Journals (
15517 \family sans
15518 svjour
15519 \family default
15520 )
15521 \end_layout
15522
15523 \begin_layout Standard
15524 by 
15525 \noun on
15526 Martin Vermeer
15527 \end_layout
15528
15529 \begin_layout Subsection
15530 Description
15531 \end_layout
15532
15533 \begin_layout Standard
15534 These are the layout files for some of the journal formats used by Springer
15535  Verlag and listed on 
15536 \begin_inset Flex URL
15537 status collapsed
15538
15539 \begin_layout Plain Layout
15540
15541 http://www.springer.de/author/tex/help-journals.html
15542 \end_layout
15543
15544 \end_inset
15545
15546 , where you should also go to fetch the class files (yes, these are LaTeX2e
15547  now!).
15548  It is a modular system: the things common to all journals are implemented
15549  in 
15550 \family typewriter
15551 svjour.inc
15552 \family default
15553 , which journal-specific layout files (such as, e.
15554 \begin_inset space \thinspace{}
15555 \end_inset
15556
15557 g.
15558 \begin_inset space \space{}
15559 \end_inset
15560
15561
15562 \family typewriter
15563 svjog.layout
15564 \family default
15565  for Journal of Geodesy) can include.
15566 \end_layout
15567
15568 \begin_layout Standard
15569 This means that implementing support for any other Springer journal on this
15570  list is as simple as writing your own 
15571 \family typewriter
15572 sv
15573 \family default
15574 <myjournal>
15575 \family typewriter
15576 .layout
15577 \family default
15578  file following the outline given in 
15579 \family typewriter
15580 svjog.layout
15581 \family default
15582 .
15583  
15584 \end_layout
15585
15586 \begin_layout Standard
15587 It is reasonably well tested only for the Journal of Geodesy.
15588  
15589 \family typewriter
15590 svjour
15591 \family default
15592  and 
15593 \family typewriter
15594 svjog
15595 \family default
15596  come with the standard LyX distribution.
15597  Install the relevant class file (downloaded from Springer) in a proper
15598  directory, reconfigure LaTeX (in the teTeX case by running 
15599 \family typewriter
15600 texhash
15601 \family default
15602 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15603  and it should work.
15604 \end_layout
15605
15606 \begin_layout Subsection
15607 New styles
15608 \end_layout
15609
15610 \begin_layout Standard
15611 A large number of theorem-like styles — 
15612 \family sans
15613 Claim, Conjecture,
15614 \family default
15615  
15616 \family sans
15617 \SpecialChar \ldots{}
15618 Theorem
15619 \family default
15620 .
15621 \end_layout
15622
15623 \begin_layout Standard
15624
15625 \family sans
15626 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15627  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15628 \family default
15629 .
15630  See the Springer class file documentation for details.
15631 \end_layout
15632
15633 \begin_layout Subsection
15634 Supported journals
15635 \end_layout
15636
15637 \begin_layout Itemize
15638
15639 \emph on
15640 Journal of Geodesy
15641 \emph default
15642
15643 \family typewriter
15644 svjog.layout
15645 \family default
15646  — Martin Vermeer
15647 \end_layout
15648
15649 \begin_layout Itemize
15650
15651 \emph on
15652 Probability Theory and Related Fields
15653 \emph default
15654
15655 \family typewriter
15656 svprobth.layout
15657 \family default
15658  — Jean-Marc Lasgouttes
15659 \end_layout
15660
15661 \begin_layout Standard
15662 Add your own, it isn't so hard!
15663 \end_layout
15664
15665 \begin_layout Subsection
15666 Credits
15667 \end_layout
15668
15669 \begin_layout Standard
15670 These files are partly based on the older 
15671 \family typewriter
15672 ejour2.layout
15673 \family default
15674 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15675  file from Springer.
15676  All this, and the 
15677 \family typewriter
15678 ejour2
15679 \family default
15680  layout, are now defunct.
15681  Jean-Marc Lasgouttes helped out big in making me find my way around the
15682  LyX layout file mechanism.
15683 \end_layout
15684
15685 \begin_layout Subsection
15686 Bugs
15687 \end_layout
15688
15689 \begin_layout Standard
15690 Probably.
15691  But probably less than in the old hacked-LaTeX 
15692 \family typewriter
15693 ejour2
15694 \family default
15695 .
15696 \end_layout
15697
15698 \begin_layout Standard
15699 Limitations e.
15700 \begin_inset space \thinspace{}
15701 \end_inset
15702
15703 g.: does not display the number for theorem-like layouts, just #.
15704 \end_layout
15705
15706 \begin_layout Section
15707 Slides [aka 
15708 \noun on
15709 SliTeX
15710 \noun default
15711 ]
15712 \begin_inset CommandInset label
15713 LatexCommand label
15714 name "sec:slitex"
15715
15716 \end_inset
15717
15718
15719 \end_layout
15720
15721 \begin_layout Standard
15722 by 
15723 \noun on
15724 John Weiss
15725 \noun default
15726  
15727 \end_layout
15728
15729 \begin_layout Subsection
15730 Introduction
15731 \end_layout
15732
15733 \begin_layout Standard
15734 This section describes how to use LyX to make slides for overhead projectors.
15735  There are two document classes that can do this: the default slides class
15736  and the 
15737 \family sans
15738 FoilTeX
15739 \family default
15740  slides class.
15741  This section documents the former.
15742 \end_layout
15743
15744 \begin_layout Standard
15745 I'm going to say this again, nice and clear, so that there's no misunderstanding
15746 :
15747 \end_layout
15748
15749 \begin_layout Standard
15750 \begin_inset VSpace bigskip
15751 \end_inset
15752
15753
15754 \end_layout
15755
15756 \begin_layout Standard
15757 \align center
15758
15759 \size large
15760 This section documents the class 
15761 \begin_inset Quotes eld
15762 \end_inset
15763
15764
15765 \family sans
15766 slides (default)
15767 \family default
15768
15769 \begin_inset Quotes erd
15770 \end_inset
15771
15772  
15773 \emph on
15774 only.
15775 \end_layout
15776
15777 \begin_layout Standard
15778 \begin_inset VSpace bigskip
15779 \end_inset
15780
15781
15782 \end_layout
15783
15784 \begin_layout Standard
15785 If you're looking for the documentation for 
15786 \begin_inset Quotes eld
15787 \end_inset
15788
15789
15790 \family sans
15791 slides (FoilTeX)
15792 \family default
15793
15794 \begin_inset Quotes erd
15795 \end_inset
15796
15797 , check out section
15798 \begin_inset space ~
15799 \end_inset
15800
15801
15802 \begin_inset CommandInset ref
15803 LatexCommand ref
15804 reference "sec:foiltex"
15805
15806 \end_inset
15807
15808 .
15809  The 
15810 \family sans
15811 foils
15812 \family default
15813  class [
15814 \begin_inset Quotes eld
15815 \end_inset
15816
15817
15818 \family sans
15819 slides (FoilTeX)
15820 \family default
15821
15822 \begin_inset Quotes erd
15823 \end_inset
15824
15825 ] is actually somewhat better than the default 
15826 \family sans
15827 slides
15828 \family default
15829  class,
15830 \begin_inset Foot
15831 status collapsed
15832
15833 \begin_layout Plain Layout
15834 \SpecialChar \ldots{}
15835 or so I've been told repeatedly by its advocates.
15836  Having never used it, I have no idea if this claim is true or not.
15837 \end_layout
15838
15839 \end_inset
15840
15841  which this section documents.
15842 \end_layout
15843
15844 \begin_layout Standard
15845 This class is the LaTeX2e improvement of the old 
15846 \noun on
15847 SliTeX
15848 \noun default
15849  package.
15850  Every LaTeX2e distribution includes this class [which I'll just refer to
15851  as 
15852 \begin_inset Quotes eld
15853 \end_inset
15854
15855
15856 \family sans
15857 slides
15858 \family default
15859
15860 \begin_inset Quotes erd
15861 \end_inset
15862
15863  from now on], so you're bound to have it.
15864  As I noted earlier, there are other classes, such as 
15865 \family sans
15866 foils
15867 \family default
15868 , which also produce slides for overhead projectors and do a better job
15869  at it.
15870  However, there are some things which 
15871 \family sans
15872 slides
15873 \family default
15874  can do which the others can't, such as generate overlays.
15875  Read on to learn more!
15876 \end_layout
15877
15878 \begin_layout Subsection
15879 Getting Started
15880 \begin_inset CommandInset label
15881 LatexCommand label
15882 name "sec:slidesetup"
15883
15884 \end_inset
15885
15886
15887 \end_layout
15888
15889 \begin_layout Standard
15890 Obviously, to use this document class, you need to select 
15891 \begin_inset Quotes eld
15892 \end_inset
15893
15894
15895 \family sans
15896 slides (default)
15897 \family default
15898
15899 \begin_inset Quotes erd
15900 \end_inset
15901
15902  from the class list in the 
15903 \family sans
15904 Document\SpecialChar \menuseparator
15905 Settings
15906 \family default
15907  dialog.
15908  There are some other special things you should know about this class:
15909 \end_layout
15910
15911 \begin_layout Itemize
15912 Don't bother changing the options 
15913 \family sans
15914 Sides and Columns
15915 \family default
15916 .
15917  They're not supported by the 
15918 \family sans
15919 slides
15920 \family default
15921  class, anyways.
15922 \end_layout
15923
15924 \begin_layout Itemize
15925 The option 
15926 \family sans
15927 Page
15928 \begin_inset space ~
15929 \end_inset
15930
15931 style
15932 \family default
15933  behaves a bit differently for this class.
15934  The possible choices and what they do are as follows:
15935 \end_layout
15936
15937 \begin_deeper
15938 \begin_layout Description
15939
15940 \family sans
15941 plain
15942 \family default
15943  The final output contains page numbers in the lower right corner.
15944 \end_layout
15945
15946 \begin_layout Description
15947
15948 \family sans
15949 headings
15950 \family default
15951  Like 
15952 \family sans
15953 plain
15954 \family default
15955 , but also prints out any time markers you've put in.
15956  This is the default.
15957 \end_layout
15958
15959 \begin_layout Description
15960
15961 \family sans
15962 empty
15963 \family default
15964  The final output contains no page numbers, time markers, or alignment markers.
15965 \end_layout
15966
15967 \end_deeper
15968 \begin_layout Itemize
15969 The 
15970 \family sans
15971 slides
15972 \family default
15973  class has an extra option: 
15974 \family typewriter
15975 clock
15976 \family default
15977 .
15978  To use it, put 
15979 \begin_inset Quotes eld
15980 \end_inset
15981
15982
15983 \family typewriter
15984 clock
15985 \family default
15986
15987 \begin_inset Quotes erd
15988 \end_inset
15989
15990  in the extra class options.
15991 \end_layout
15992
15993 \begin_deeper
15994 \begin_layout Standard
15995 Using this options allows you to add time markers to 
15996 \family sans
15997 Note
15998 \family default
15999 s.
16000  See section
16001 \begin_inset space ~
16002 \end_inset
16003
16004
16005 \begin_inset CommandInset ref
16006 LatexCommand ref
16007 reference "sec:slideNote"
16008
16009 \end_inset
16010
16011  for more details.
16012 \end_layout
16013
16014 \end_deeper
16015 \begin_layout Standard
16016 You can also use the template file 
16017 \begin_inset Quotes eld
16018 \end_inset
16019
16020
16021 \family typewriter
16022 slides.lyx
16023 \family default
16024
16025 \begin_inset Quotes erd
16026 \end_inset
16027
16028  to automatically set up a document to use the 
16029 \family sans
16030 slides
16031 \family default
16032  class [using 
16033 \family sans
16034 File\SpecialChar \menuseparator
16035 New
16036 \begin_inset space ~
16037 \end_inset
16038
16039 from
16040 \begin_inset space ~
16041 \end_inset
16042
16043 Template
16044 \family default
16045  to open your new document].
16046  The template file also contains some examples of the special paragraph
16047  environments used by this class.
16048  I'll describe those next.
16049 \end_layout
16050
16051 \begin_layout Subsection
16052 Paragraph Environments
16053 \end_layout
16054
16055 \begin_layout Subsubsection
16056 Supported Environments
16057 \end_layout
16058
16059 \begin_layout Standard
16060 The first thing you'll notice when you start up a new 
16061 \family sans
16062 slides
16063 \family default
16064  document is the font size and type: it's the equivalent of the size 
16065 \begin_inset Quotes eld
16066 \end_inset
16067
16068
16069 \family sans
16070 Largest
16071 \family default
16072
16073 \begin_inset Quotes erd
16074 \end_inset
16075
16076  in the 
16077 \family sans
16078 Sans
16079 \begin_inset space ~
16080 \end_inset
16081
16082 Serif
16083 \family default
16084  font.
16085  This is also what's used in the output.
16086  Think of this as a 
16087 \begin_inset Quotes eld
16088 \end_inset
16089
16090 visual cue
16091 \begin_inset Quotes erd
16092 \end_inset
16093
16094  to remind you that this is a slide.
16095  Your final slides will use a larger font; ergo, you'll have less space.
16096  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16097 \end_layout
16098
16099 \begin_layout Standard
16100 The next thing that becomes obvious is the changes to the paragraph environment
16101  pull-down box [at the far-left end of the toolbar].
16102  Most of the paragraph environments you're used to seeing are missing.
16103  There are also five new ones.
16104  That's because the 
16105 \family sans
16106 slides
16107 \family default
16108  class itself only supports certain paragraph environments:
16109 \end_layout
16110
16111 \begin_layout Itemize
16112
16113 \family sans
16114 Standard
16115 \end_layout
16116
16117 \begin_layout Itemize
16118
16119 \family sans
16120 Itemize
16121 \end_layout
16122
16123 \begin_layout Itemize
16124
16125 \family sans
16126 Enumerate
16127 \end_layout
16128
16129 \begin_layout Itemize
16130
16131 \family sans
16132 Description
16133 \end_layout
16134
16135 \begin_layout Itemize
16136
16137 \family sans
16138 List
16139 \end_layout
16140
16141 \begin_layout Itemize
16142
16143 \family sans
16144 Quotation
16145 \end_layout
16146
16147 \begin_layout Itemize
16148
16149 \family sans
16150 Quote
16151 \end_layout
16152
16153 \begin_layout Itemize
16154
16155 \family sans
16156 Verse
16157 \end_layout
16158
16159 \begin_layout Itemize
16160
16161 \family sans
16162 Caption
16163 \end_layout
16164
16165 \begin_layout Itemize
16166
16167 \family sans
16168 LyX-Code
16169 \end_layout
16170
16171 \begin_layout Itemize
16172
16173 \family sans
16174 Comment
16175 \end_layout
16176
16177 \begin_layout Standard
16178 All of the other standard environments, including the section-heading environmen
16179 ts, aren't used in the 
16180 \family sans
16181 slides
16182 \family default
16183  class.
16184 \end_layout
16185
16186 \begin_layout Standard
16187 On the other hand, you'll notice the following new environments:
16188 \end_layout
16189
16190 \begin_layout Itemize
16191
16192 \family sans
16193 Slide
16194 \end_layout
16195
16196 \begin_layout Itemize
16197
16198 \family sans
16199 Overlay
16200 \end_layout
16201
16202 \begin_layout Itemize
16203
16204 \family sans
16205 Note
16206 \end_layout
16207
16208 \begin_layout Itemize
16209
16210 \family sans
16211 InvisibleText
16212 \end_layout
16213
16214 \begin_layout Itemize
16215
16216 \family sans
16217 VisibleText
16218 \end_layout
16219
16220 \begin_layout Standard
16221 These five are kind of quirky, due to a 
16222 \begin_inset Quotes eld
16223 \end_inset
16224
16225 feature
16226 \begin_inset Quotes erd
16227 \end_inset
16228
16229  in LyX.
16230  You see, LyX doesn't permit you to nest any other paragraph environment
16231  into an empty environment.
16232  Now, that's fine and dandy, but it means that you wouldn't be able to start
16233  a slide with anything except plain text.
16234  To deal with this, I've performed a little 
16235 \begin_inset Quotes eld
16236 \end_inset
16237
16238 LaTeX magic.
16239 \begin_inset Quotes erd
16240 \end_inset
16241
16242  
16243 \end_layout
16244
16245 \begin_layout Subsubsection
16246 Quirks of the New Environments
16247 \begin_inset CommandInset label
16248 LatexCommand label
16249 name "sec:slideQuirk"
16250
16251 \end_inset
16252
16253
16254 \end_layout
16255
16256 \begin_layout Standard
16257 All five of the new paragraph environments are somewhat quirky due to inherent
16258  limitiations in the current version of LyX.
16259  As I just mentioned, LyX forbids environments that begin with another environme
16260 nt.
16261  To get around this, the 
16262 \family sans
16263 Slide
16264 \family default
16265  environment isn't a paragraph environment as described in the 
16266 \emph on
16267 User's Guide
16268 \emph default
16269 .
16270  
16271 \end_layout
16272
16273 \begin_layout Standard
16274 You should consider 
16275 \family sans
16276 Slide
16277 \family default
16278
16279 \family sans
16280 Overlay
16281 \family default
16282 , and 
16283 \family sans
16284 Note
16285 \family default
16286  to be 
16287 \begin_inset Quotes eld
16288 \end_inset
16289
16290 pseudo-environments.
16291 \begin_inset Quotes erd
16292 \end_inset
16293
16294  They look like a section heading or a 
16295 \begin_inset Quotes eld
16296 \end_inset
16297
16298
16299 \family sans
16300 Caption
16301 \family default
16302 ,
16303 \begin_inset Quotes erd
16304 \end_inset
16305
16306  but really begin a [and, if necessary, end the previous] paragraph environment.
16307  Likewise, treat 
16308 \family sans
16309 InvisibleText
16310 \family default
16311  and 
16312 \family sans
16313 VisibleText
16314 \family default
16315  as 
16316 \begin_inset Quotes eld
16317 \end_inset
16318
16319 pseudo-commands.
16320 \begin_inset Quotes erd
16321 \end_inset
16322
16323  These two perform some action.
16324 \end_layout
16325
16326 \begin_layout Standard
16327 A common feature of all five environments, 
16328 \family sans
16329 Slide
16330 \family default
16331
16332 \family sans
16333 Overlay
16334 \family default
16335
16336 \family sans
16337 Note
16338 \family default
16339
16340 \family sans
16341 InvisibleText
16342 \family default
16343  and 
16344 \family sans
16345 VisibleText
16346 \family default
16347 , is a rather long-ish label.
16348  The text following this label — ordinarily the contents of the paragraph
16349  environment — is utterly irrelevant for 
16350 \family sans
16351 Slide
16352 \family default
16353
16354 \family sans
16355 Overlay
16356 \family default
16357
16358 \family sans
16359 Note
16360 \family default
16361
16362 \family sans
16363 InvisibleText
16364 \family default
16365  and 
16366 \family sans
16367 VisibleText
16368 \family default
16369 .
16370  LyX completely ignores it.
16371  In fact, you can leave these five environments completely empty.
16372  
16373 \end_layout
16374
16375 \begin_layout Standard
16376 While you don't 
16377 \emph on
16378 have
16379 \emph default
16380  to put any text after the rather long-ish label, you might want to.
16381  This could be a short description of the contents of the 
16382 \family sans
16383 Slide
16384 \family default
16385 , for example.
16386  In that case, enter your descriptive comment and hit 
16387 \family sans
16388 Return
16389 \family default
16390  as you normally would.
16391 \end_layout
16392
16393 \begin_layout Standard
16394 If, on the other hand, you don't want to enter any descriptive text, you'll
16395  hit another LyX quirk.
16396  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16397  environment until you put something in the old one.
16398  So, do this:
16399 \end_layout
16400
16401 \begin_layout Itemize
16402 Start entering the text that will 
16403 \emph on
16404 follow
16405 \emph default
16406  the new 
16407 \family sans
16408 Slide
16409 \family default
16410
16411 \family sans
16412 Overlay
16413 \family default
16414
16415 \family sans
16416 Note
16417 \family default
16418
16419 \family sans
16420 InvisibleText
16421 \family default
16422  or 
16423 \family sans
16424 VisibleText
16425 \family default
16426 .
16427  
16428 \end_layout
16429
16430 \begin_layout Itemize
16431 Now move to the beginning of that paragraph.
16432  
16433 \end_layout
16434
16435 \begin_layout Itemize
16436 Next, hit 
16437 \family sans
16438 Return
16439 \family default
16440 .
16441  
16442 \end_layout
16443
16444 \begin_layout Itemize
16445 Finally, change this new, empty paragraph to a 
16446 \family sans
16447 Slide
16448 \family default
16449
16450 \family sans
16451 Overlay
16452 \family default
16453
16454 \family sans
16455 Note
16456 \family default
16457
16458 \family sans
16459 InvisibleText
16460 \family default
16461  or 
16462 \family sans
16463 VisibleText
16464 \family default
16465 .
16466  
16467 \end_layout
16468
16469 \begin_layout Standard
16470 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16471
16472 \end_layout
16473
16474 \begin_layout Subsection
16475 Making a Presentation with 
16476 \family sans
16477 Slide
16478 \family default
16479
16480 \family sans
16481 Overlay
16482 \family default
16483  and 
16484 \family sans
16485 Note
16486 \end_layout
16487
16488 \begin_layout Subsubsection
16489 Using the 
16490 \family sans
16491 Slide
16492 \family default
16493  Environment
16494 \end_layout
16495
16496 \begin_layout Standard
16497 If you're expecting this section to teach you how to actually make a presentatio
16498 n, you'll be sorely disappointed.
16499  Naturally, I'll describe all of the ways the 
16500 \family sans
16501 slides
16502 \family default
16503  class can assist you in preparing the materials for a presentation.
16504  Filling in the contents, however, is up to you.
16505  [Then again, that 
16506 \emph on
16507 is
16508 \emph default
16509  the LyX philosophy.]
16510 \end_layout
16511
16512 \begin_layout Standard
16513 Choosing the 
16514 \family sans
16515 Slide
16516 \family default
16517  environment [in the manner described in section
16518 \begin_inset space ~
16519 \end_inset
16520
16521
16522 \begin_inset CommandInset ref
16523 LatexCommand ref
16524 reference "sec:slideQuirk"
16525
16526 \end_inset
16527
16528 ] tells LyX to begin a new slide [duh].
16529  The label for this environment/
16530 \begin_inset Quotes erd
16531 \end_inset
16532
16533 pseudo-command
16534 \begin_inset Quotes erd
16535 \end_inset
16536
16537  is an 
16538 \begin_inset Quotes eld
16539 \end_inset
16540
16541 ASCII line,
16542 \begin_inset Quotes erd
16543 \end_inset
16544
16545  in cool blue, followed by the label, 
16546 \begin_inset Quotes eld
16547 \end_inset
16548
16549 NewSlide:
16550 \begin_inset Quotes erd
16551 \end_inset
16552
16553 .
16554  Any text or paragraph environments that follow this one go on the new slide.
16555  It's that simple.
16556 \end_layout
16557
16558 \begin_layout Standard
16559 Slides are probably the only time you'll need to forcibly end pages in LyX
16560  (this can be specified in the 
16561 \family sans
16562 Paragraph Layout
16563 \family default
16564  dialog).
16565  In fact, you'll want to, once you finish entering the contents of one slide.
16566  If you've entered more text than can physically fit on a slide, the extra
16567  overflows onto a new slide.
16568  I don't recommend doing this, however, since the overflow slide won't have
16569  any page number on it.
16570  Furthermore, it may interfere with any 
16571 \family sans
16572 Overlay
16573 \family default
16574  you've made to accompany the oversized 
16575 \family sans
16576 Slide
16577 \family default
16578 .
16579 \end_layout
16580
16581 \begin_layout Standard
16582 The 
16583 \family sans
16584 Overlay
16585 \family default
16586  and 
16587 \family sans
16588 Note
16589 \family default
16590  environments work the same way as the 
16591 \family sans
16592 Slide
16593 \family default
16594  environment.
16595  They both create an 
16596 \begin_inset Quotes eld
16597 \end_inset
16598
16599 ASCII line
16600 \begin_inset Quotes erd
16601 \end_inset
16602
16603  followed by a label [
16604 \begin_inset Quotes eld
16605 \end_inset
16606
16607 NewOverlay:
16608 \begin_inset Quotes erd
16609 \end_inset
16610
16611  and 
16612 \begin_inset Quotes eld
16613 \end_inset
16614
16615 NewNote:
16616 \begin_inset Quotes erd
16617 \end_inset
16618
16619 , respectively].
16620  The color is a stunning magenta instead of blue, and the 
16621 \begin_inset Quotes eld
16622 \end_inset
16623
16624 ASCII line
16625 \begin_inset Quotes erd
16626 \end_inset
16627
16628  will look different, in style and in length.
16629  The label fonts of all three also differ from one another.
16630 \end_layout
16631
16632 \begin_layout Standard
16633 As with a 
16634 \family sans
16635 Slide
16636 \family default
16637 , if the contents of a 
16638 \family sans
16639 Note
16640 \family default
16641  or 
16642 \family sans
16643 Overlay
16644 \family default
16645  exceed the physical size of a slide or sheet of paper, the extra will overflow
16646  onto a new sheet.
16647  Again, you should avoid this.
16648  It defeats the whole purpose of 
16649 \family sans
16650 Note
16651 \family default
16652 s and 
16653 \family sans
16654 Overlay
16655 \family default
16656 s.
16657 \end_layout
16658
16659 \begin_layout Subsubsection
16660 Using 
16661 \family sans
16662 Overlay
16663 \family default
16664  with 
16665 \family sans
16666 Slide
16667 \end_layout
16668
16669 \begin_layout Standard
16670 The idea behind an 
16671 \family sans
16672 Overlay
16673 \family default
16674  is a slide that sits atop another slide.
16675  Perhaps you wish to discuss a figure on the main 
16676 \family sans
16677 Slide
16678 \family default
16679  before displaying the text associated with it.
16680  One way to accomplish this is tape a flap of dark paper over the part of
16681  the 
16682 \family sans
16683 Slide
16684 \family default
16685  you want to display later.
16686  This method fails, however, if you wish to overlap one graph with another,
16687  for example.
16688  You would then have to fumble while speaking to align the two separate,
16689  overlapping 
16690 \family sans
16691 Slide
16692 \family default
16693 s to align the two graphs.
16694  The use of an 
16695 \family sans
16696 Overlay
16697 \family default
16698  environment in both cases makes life much easier.
16699 \end_layout
16700
16701 \begin_layout Standard
16702 Each 
16703 \family sans
16704 Overlay
16705 \family default
16706  receives the page number of its 
16707 \begin_inset Quotes eld
16708 \end_inset
16709
16710 parent
16711 \begin_inset Quotes erd
16712 \end_inset
16713
16714  
16715 \family sans
16716 Slide
16717 \family default
16718 , appended by 
16719 \begin_inset Quotes eld
16720 \end_inset
16721
16722
16723 \family typewriter
16724 -a
16725 \family default
16726
16727 \begin_inset Quotes erd
16728 \end_inset
16729
16730 .
16731 \begin_inset Foot
16732 status collapsed
16733
16734 \begin_layout Plain Layout
16735 Presumably, mutliple 
16736 \family sans
16737 Overlay
16738 \family default
16739 s would have 
16740 \begin_inset Quotes eld
16741 \end_inset
16742
16743
16744 \family typewriter
16745 -a
16746 \family default
16747
16748 \begin_inset Quotes erd
16749 \end_inset
16750
16751
16752 \begin_inset Quotes eld
16753 \end_inset
16754
16755
16756 \family typewriter
16757 -b
16758 \family default
16759
16760 \begin_inset Quotes erd
16761 \end_inset
16762
16763
16764 \begin_inset Quotes eld
16765 \end_inset
16766
16767
16768 \family typewriter
16769 -c
16770 \family default
16771
16772 \begin_inset Quotes erd
16773 \end_inset
16774
16775 , etc.
16776 \begin_inset space ~
16777 \end_inset
16778
16779 appended to the page number of the parent 
16780 \family sans
16781 Slide
16782 \family default
16783 .
16784  
16785 \end_layout
16786
16787 \end_inset
16788
16789  Clearly, you want the contents of both the 
16790 \family sans
16791 Slide
16792 \family default
16793  and the 
16794 \family sans
16795 Overlay
16796 \family default
16797  to each fit on a single physical slide! You should probably consider an
16798  
16799 \family sans
16800 Overlay
16801 \family default
16802  as 
16803 \begin_inset Quotes eld
16804 \end_inset
16805
16806 part of
16807 \begin_inset Quotes erd
16808 \end_inset
16809
16810  a 
16811 \family sans
16812 Slide
16813 \family default
16814 .
16815  Indeed, the LyX 
16816 \family sans
16817 slides
16818 \family default
16819  class provides a visual cue for this: the label at the start of an 
16820 \family sans
16821 Overlay
16822 \family default
16823  is shorter than that at the start of a 
16824 \family sans
16825 Slide
16826 \family default
16827 .
16828  Lastly, when you generate printable output, you'll find alignment markers
16829  in all four corners of both the 
16830 \family sans
16831 Overlay
16832 \family default
16833  page and its parent 
16834 \family sans
16835 Slide
16836 \family default
16837 .
16838  These will assist you in lining up the two physical slides.
16839 \end_layout
16840
16841 \begin_layout Standard
16842 The major problem in overlaying two slides is aligning the contents of the
16843  two transparencies.
16844  How much space should you leave for that graph on the second slide? Worse
16845  still, what if you want a graph and a sentence on second slide, but there
16846  is text on the main transparency that goes in between them? You could try
16847  and insert vertical space of the right size.
16848  The better way is to use 
16849 \family sans
16850 InvisibleText
16851 \family default
16852  and 
16853 \family sans
16854 VisibleText
16855 \family default
16856 .
16857 \end_layout
16858
16859 \begin_layout Standard
16860 As their names imply, 
16861 \family sans
16862 InvisibleText
16863 \family default
16864  and 
16865 \family sans
16866 VisibleText
16867 \family default
16868  are two command-like paragraph environments that make all subsequent text
16869  invisible and visible, respectively.
16870  Note from section
16871 \begin_inset space ~
16872 \end_inset
16873
16874
16875 \begin_inset CommandInset ref
16876 LatexCommand ref
16877 reference "sec:slideQuirk"
16878
16879 \end_inset
16880
16881  that you don't place anything 
16882 \emph on
16883 into
16884 \emph default
16885  these two environments, however.
16886  When you create an 
16887 \family sans
16888 InvisibleText
16889 \family default
16890 , it inserts a centered, sky-blue label into the page reading 
16891 \begin_inset Quotes eld
16892 \end_inset
16893
16894 <Invisible Text Follows>
16895 \begin_inset Quotes erd
16896 \end_inset
16897
16898 .
16899  For paragraphs following this label, the parts of the 
16900 \family sans
16901 Slide
16902 \family default
16903  [or 
16904 \family sans
16905 Overlay
16906 \family default
16907 ; it doesn't matter which] where they would be contain instead blank space.
16908  
16909 \end_layout
16910
16911 \begin_layout Standard
16912 For 
16913 \family sans
16914 VisibleText
16915 \family default
16916 , the corresponding centered label is 
16917 \begin_inset Quotes eld
16918 \end_inset
16919
16920 <Visible Text Follows>
16921 \begin_inset Quotes erd
16922 \end_inset
16923
16924  in blazing green.
16925  Paragraphs following this label behave normally.
16926  Note that the beginning of a new 
16927 \family sans
16928 Slide
16929 \family default
16930
16931 \family sans
16932 Overlay
16933 \family default
16934 , or 
16935 \family sans
16936 Note
16937 \family default
16938  automatically shuts off an 
16939 \family sans
16940 InvisibleText
16941 \family default
16942 .
16943  It's therefore not necessary to use 
16944 \family sans
16945 VisibleText
16946 \family default
16947  at the end of a 
16948 \family sans
16949 Slide
16950 \family default
16951 .
16952 \end_layout
16953
16954 \begin_layout Standard
16955 By now, it should be obvious how to create overlay transparencies using
16956  the proper combination of 
16957 \family sans
16958 InvisibleText
16959 \family default
16960  and 
16961 \family sans
16962 VisibleText
16963 \family default
16964  on a 
16965 \family sans
16966 Slide
16967 \family default
16968  and 
16969 \family sans
16970 Overlay
16971 \family default
16972 :
16973 \end_layout
16974
16975 \begin_layout Enumerate
16976 Create a 
16977 \family sans
16978 Slide
16979 \family default
16980 , including everything that will appear on it, whether on the main slide
16981  or on the 
16982 \family sans
16983 Overlay
16984 \family default
16985 .
16986 \end_layout
16987
16988 \begin_layout Enumerate
16989 Before each figure or paragraph that will appear only on the 
16990 \family sans
16991 Overlay
16992 \family default
16993 , insert an 
16994 \family sans
16995 InvisibleText
16996 \family default
16997  environment.
16998  If necessary, insert a 
16999 \family sans
17000 VisibleText
17001 \family default
17002  environment after the 
17003 \family sans
17004 Overlay
17005 \family default
17006 -only text.
17007 \end_layout
17008
17009 \begin_layout Enumerate
17010 Start an 
17011 \family sans
17012 Overlay
17013 \family default
17014  immediately following the 
17015 \family sans
17016 Slide
17017 \family default
17018 .
17019 \end_layout
17020
17021 \begin_layout Enumerate
17022 Copy the contents of this 
17023 \family sans
17024 Slide
17025 \family default
17026  into the 
17027 \family sans
17028 Overlay
17029 \family default
17030 .
17031 \end_layout
17032
17033 \begin_layout Enumerate
17034 Within the 
17035 \family sans
17036 Overlay
17037 \family default
17038 , change all of the 
17039 \family sans
17040 InvisibleText
17041 \family default
17042  lines to 
17043 \family sans
17044 VisibleText
17045 \family default
17046  and vice-versa.
17047 \end_layout
17048
17049 \begin_layout Standard
17050 That's it.
17051  You've just made an 
17052 \family sans
17053 Overlay
17054 \family default
17055 .
17056 \end_layout
17057
17058 \begin_layout Standard
17059 There's one problem with the way I've designed the LyX 
17060 \family sans
17061 slides
17062 \family default
17063  class: you can't make text in the middle of a paragraph invisible, nor
17064  make text in the middle of an invisible paragraph visible again.
17065  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17066 \begin_inset Foot
17067 status collapsed
17068
17069 \begin_layout Plain Layout
17070 The commands of interest are: 
17071 \end_layout
17072
17073 \begin_layout Itemize
17074
17075 \family typewriter
17076 {
17077 \backslash
17078 invisible \SpecialChar \ldots{}
17079  }
17080 \end_layout
17081
17082 \begin_layout Itemize
17083
17084 \family typewriter
17085 {
17086 \backslash
17087 visible \SpecialChar \ldots{}
17088  }
17089 \end_layout
17090
17091 \begin_layout Plain Layout
17092 \SpecialChar \ldots{}
17093 and need to be marked as TeX.
17094  The text whose 
17095 \begin_inset Quotes eld
17096 \end_inset
17097
17098 visibility
17099 \begin_inset Quotes erd
17100 \end_inset
17101
17102  you wish to change goes in between the brackets [and after the 
17103 \family typewriter
17104
17105 \backslash
17106 invisible
17107 \family default
17108  or 
17109 \family typewriter
17110
17111 \backslash
17112 visible
17113 \family default
17114  command].
17115  If you don't know how to mark text as TeX, see the appropriate section
17116  of the 
17117 \emph on
17118 User's Guide
17119 \emph default
17120 .
17121 \end_layout
17122
17123 \end_inset
17124
17125
17126 \end_layout
17127
17128 \begin_layout Subsubsection
17129 Using 
17130 \family sans
17131 Note
17132 \family default
17133  with 
17134 \family sans
17135 Slide
17136 \family default
17137
17138 \begin_inset CommandInset label
17139 LatexCommand label
17140 name "sec:slideNote"
17141
17142 \end_inset
17143
17144
17145 \end_layout
17146
17147 \begin_layout Standard
17148 Like an 
17149 \family sans
17150 Overlay
17151 \family default
17152 , a 
17153 \family sans
17154 Note
17155 \family default
17156  is associated with a 
17157 \begin_inset Quotes eld
17158 \end_inset
17159
17160 parent
17161 \begin_inset Quotes erd
17162 \end_inset
17163
17164  
17165 \family sans
17166 Slide
17167 \family default
17168 .
17169  Here, too, the LyX 
17170 \family sans
17171 slides
17172 \family default
17173  class provides visual cues.
17174  The label for a 
17175 \family sans
17176 Note
17177 \family default
17178  is shorter than that of a 
17179 \family sans
17180 Slide
17181 \family default
17182  [yet longer than that of an 
17183 \family sans
17184 Overlay
17185 \family default
17186 ] and, like the label of an 
17187 \family sans
17188 Overlay
17189 \family default
17190  is shockingly magenta.
17191  Additionally, the printed 
17192 \family sans
17193 Note
17194 \family default
17195  has the page number of its 
17196 \begin_inset Quotes eld
17197 \end_inset
17198
17199 parent
17200 \begin_inset Quotes erd
17201 \end_inset
17202
17203  
17204 \family sans
17205 Slide
17206 \family default
17207 , appended by 
17208 \begin_inset Quotes eld
17209 \end_inset
17210
17211
17212 \family typewriter
17213 -
17214 \family default
17215 1
17216 \begin_inset Quotes erd
17217 \end_inset
17218
17219
17220 \begin_inset Quotes eld
17221 \end_inset
17222
17223
17224 \family typewriter
17225 -
17226 \family default
17227 2
17228 \begin_inset Quotes erd
17229 \end_inset
17230
17231
17232 \begin_inset Quotes eld
17233 \end_inset
17234
17235
17236 \family typewriter
17237 -
17238 \family default
17239 3
17240 \begin_inset Quotes erd
17241 \end_inset
17242
17243 , etc.
17244  You can have multiple 
17245 \family sans
17246 Note
17247 \family default
17248 s associated with a single 
17249 \family sans
17250 Slide
17251 \family default
17252 , and, as with 
17253 \family sans
17254 Slide
17255 \family default
17256  and 
17257 \family sans
17258 Overlay
17259 \family default
17260 , you'll probably want to break up long 
17261 \family sans
17262 Note
17263 \family default
17264 s so that they fit on a single sheet of paper.
17265 \end_layout
17266
17267 \begin_layout Standard
17268 The purpose of a 
17269 \family sans
17270 Note
17271 \family default
17272  is obvious: it contains anything additional you might want to say about
17273  a 
17274 \family sans
17275 Slide
17276 \family default
17277 .
17278  It could also be used as a sheet of reminders for a particular 
17279 \family sans
17280 Slide
17281 \family default
17282 .
17283  In the case of the latter, you might want to make use of time markers.
17284  Currently, the LyX 
17285 \family sans
17286 slides
17287 \family default
17288  class has no 
17289 \begin_inset Quotes eld
17290 \end_inset
17291
17292 native
17293 \begin_inset Quotes erd
17294 \end_inset
17295
17296  support for time markers, a 
17297 \noun on
17298 SliTeX
17299 \noun default
17300  feature.
17301  So, you'll have to resort to using the LaTeX codes.
17302 \end_layout
17303
17304 \begin_layout Standard
17305 To use time markers, you'll need to specify the extra class option 
17306 \begin_inset Quotes eld
17307 \end_inset
17308
17309
17310 \family typewriter
17311 clock
17312 \family default
17313
17314 \begin_inset Quotes erd
17315 \end_inset
17316
17317  [see section
17318 \begin_inset space ~
17319 \end_inset
17320
17321
17322 \begin_inset CommandInset ref
17323 LatexCommand ref
17324 reference "sec:slidesetup"
17325
17326 \end_inset
17327
17328 ].
17329  This option turns on timing marks, which will appear in the lower-left-hand
17330  corner of every 
17331 \family sans
17332 Note
17333 \family default
17334  you generate.
17335  To set what appears in the time marker, you use the LaTeX commands 
17336 \begin_inset Quotes eld
17337 \end_inset
17338
17339
17340 \family typewriter
17341
17342 \backslash
17343 settime{}
17344 \family default
17345
17346 \begin_inset Quotes erd
17347 \end_inset
17348
17349  and 
17350 \begin_inset Quotes eld
17351 \end_inset
17352
17353
17354 \family typewriter
17355
17356 \backslash
17357 addtime{}
17358 \family default
17359
17360 \begin_inset Quotes erd
17361 \end_inset
17362
17363 .
17364  The arguments of both commands are time measured in seconds.
17365  
17366 \begin_inset Quotes eld
17367 \end_inset
17368
17369
17370 \family typewriter
17371
17372 \backslash
17373 settime{}
17374 \family default
17375
17376 \begin_inset Quotes erd
17377 \end_inset
17378
17379  sets the time marker to a given time.
17380  
17381 \begin_inset Quotes eld
17382 \end_inset
17383
17384
17385 \family typewriter
17386
17387 \backslash
17388 addtime{}
17389 \family default
17390
17391 \begin_inset Quotes erd
17392 \end_inset
17393
17394  increments the time marker by the specified amount.
17395  Using time markers and 
17396 \family sans
17397 Note
17398 \family default
17399 s in this fashion, you can remind yourself how much time to spend on a particula
17400
17401 \family sans
17402 Slide
17403 \family default
17404 .
17405 \end_layout
17406
17407 \begin_layout Standard
17408 There's one last feature to describe.
17409  Clearly, you'd like to print out all of your 
17410 \family sans
17411 Slide
17412 \family default
17413 s and 
17414 \family sans
17415 Overlay
17416 \family default
17417 s on transparencies while printing all of your 
17418 \family sans
17419 Note
17420 \family default
17421 s on plain paper.
17422  However, a 
17423 \family sans
17424 Note
17425 \family default
17426  
17427 \emph on
17428 must
17429 \emph default
17430  follow the 
17431 \family sans
17432 Slide
17433 \family default
17434  with which it is associated.
17435  What's a person to do?
17436 \end_layout
17437
17438 \begin_layout Standard
17439 Luckily, there are two LaTeX commands that allow you to select what to print
17440  out.
17441  Both must be placed into the preamble of your document.
17442  The command 
17443 \begin_inset Quotes eld
17444 \end_inset
17445
17446
17447 \family typewriter
17448
17449 \backslash
17450 onlyslides{
17451 \backslash
17452 slides}
17453 \family default
17454
17455 \begin_inset Quotes erd
17456 \end_inset
17457
17458  will cause the output to contain only the 
17459 \family sans
17460 Slide
17461 \family default
17462 s and 
17463 \family sans
17464 Overlay
17465 \family default
17466 s.
17467  Correspondingly, the command 
17468 \begin_inset Quotes eld
17469 \end_inset
17470
17471
17472 \family typewriter
17473
17474 \backslash
17475 onlynotes{
17476 \backslash
17477 notes}
17478 \family default
17479
17480 \begin_inset Quotes erd
17481 \end_inset
17482
17483  prevents the output of anything but 
17484 \family sans
17485 Note
17486 \family default
17487 s.
17488  I'd advise placing both commands in the preamble and initially comment
17489  both out.
17490  You can then preview your entire presentation as you write.
17491  When you're done writing, you can then uncomment one of the two to select
17492  what you want to print.
17493  I like to uncomment 
17494 \begin_inset Quotes eld
17495 \end_inset
17496
17497
17498 \family typewriter
17499
17500 \backslash
17501 onlyslides{
17502 \backslash
17503 slides}
17504 \family default
17505
17506 \begin_inset Quotes erd
17507 \end_inset
17508
17509  , print to a file with 
17510 \begin_inset Quotes eld
17511 \end_inset
17512
17513
17514 \family typewriter
17515 -slides
17516 \family default
17517
17518 \begin_inset Quotes erd
17519 \end_inset
17520
17521  in its name, comment it back out, then uncomment 
17522 \begin_inset Quotes eld
17523 \end_inset
17524
17525
17526 \family typewriter
17527
17528 \backslash
17529 onlynotes{
17530 \backslash
17531 notes}
17532 \family default
17533
17534 \begin_inset Quotes erd
17535 \end_inset
17536
17537  and print to a 
17538 \begin_inset Quotes eld
17539 \end_inset
17540
17541
17542 \family typewriter
17543 *-notes.ps
17544 \family default
17545
17546 \begin_inset Quotes erd
17547 \end_inset
17548
17549  file.
17550  I can then send either file to a printer, loading transparencies or plain
17551  paper as appropriate.
17552 \end_layout
17553
17554 \begin_layout Standard
17555 You can also provide other arguments to the 
17556 \begin_inset Quotes eld
17557 \end_inset
17558
17559
17560 \family typewriter
17561
17562 \backslash
17563 onlyslides{}
17564 \family default
17565
17566 \begin_inset Quotes erd
17567 \end_inset
17568
17569  and 
17570 \begin_inset Quotes eld
17571 \end_inset
17572
17573
17574 \family typewriter
17575
17576 \backslash
17577 onlynotes{}
17578 \family default
17579
17580 \begin_inset Quotes erd
17581 \end_inset
17582
17583  commands.
17584  See a good LaTeX book for details.
17585 \end_layout
17586
17587 \begin_layout Subsection
17588 The 
17589 \family sans
17590 slides
17591 \family default
17592  Class Template File
17593 \end_layout
17594
17595 \begin_layout Standard
17596 I have also provided a template file, 
17597 \begin_inset Quotes eld
17598 \end_inset
17599
17600
17601 \family typewriter
17602 slides.lyx
17603 \family default
17604
17605 \begin_inset Quotes erd
17606 \end_inset
17607
17608 , with the 
17609 \family sans
17610 slides
17611 \family default
17612  class.
17613  To use it, begin your new presentation with 
17614 \family sans
17615 \bar under
17616 F
17617 \bar default
17618 ile\SpecialChar \menuseparator
17619 New
17620 \begin_inset space ~
17621 \end_inset
17622
17623 from
17624 \begin_inset space ~
17625 \end_inset
17626
17627
17628 \bar under
17629 T
17630 \bar default
17631 emplate
17632 \family default
17633 .
17634  Your new LyX presentation file will contain an example 
17635 \family sans
17636 Slide
17637 \family default
17638  – 
17639 \family sans
17640 Overlay
17641 \family default
17642  – 
17643 \family sans
17644 Note
17645 \family default
17646  triplet.
17647  The 
17648 \family sans
17649 Slide
17650 \family default
17651  and 
17652 \family sans
17653 Overlay
17654 \family default
17655  additionally contain an example of the use of 
17656 \family sans
17657 InvisibleText
17658 \family default
17659  and 
17660 \family sans
17661 VisibleText
17662 \family default
17663 .
17664  Lastly, the preamble will contain:
17665 \end_layout
17666
17667 \begin_layout LyX-Code
17668 % Uncomment to print out only slides and overlays
17669 \end_layout
17670
17671 \begin_layout LyX-Code
17672 %
17673 \end_layout
17674
17675 \begin_layout LyX-Code
17676 %
17677 \backslash
17678 onlyslides{
17679 \backslash
17680 slides}
17681 \begin_inset Newline newline
17682 \end_inset
17683
17684  
17685 \end_layout
17686
17687 \begin_layout LyX-Code
17688 % Uncomment to print out only notes
17689 \end_layout
17690
17691 \begin_layout LyX-Code
17692 %
17693 \end_layout
17694
17695 \begin_layout LyX-Code
17696 %
17697 \backslash
17698 onlynotes{
17699 \backslash
17700 notes}
17701 \end_layout
17702
17703 \begin_layout Standard
17704 One final thing: I created this class to support the LaTeX2e 
17705 \begin_inset Quotes eld
17706 \end_inset
17707
17708
17709 \noun on
17710 SliTeX
17711 \noun default
17712  emulation
17713 \begin_inset Quotes erd
17714 \end_inset
17715
17716  class, one of the built-in LaTeX2e classes.
17717  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17718  built-in slide class.
17719  It's here if you want it or need it.
17720  There exist other LaTeX2e classes for creating presentations, such as the
17721  
17722 \family sans
17723 Foils
17724 \family default
17725  class [see section
17726 \begin_inset space ~
17727 \end_inset
17728
17729
17730 \begin_inset CommandInset ref
17731 LatexCommand ref
17732 reference "sec:foiltex"
17733
17734 \end_inset
17735
17736 ] or the 
17737 \begin_inset Quotes eld
17738 \end_inset
17739
17740
17741 \family typewriter
17742 seminar
17743 \family default
17744
17745 \begin_inset Quotes erd
17746 \end_inset
17747
17748  package [present on some TeX distributions].
17749  The latter is not yet supported under LyX.
17750 \begin_inset Foot
17751 status collapsed
17752
17753 \begin_layout Plain Layout
17754 Perhaps you can take on the task\SpecialChar \ldots{}
17755
17756 \end_layout
17757
17758 \end_inset
17759
17760  I know nothing about these other classes.
17761  Try them out to see what sort of alternative they provide.
17762 \end_layout
17763
17764 \begin_layout Chapter
17765 LyX Features needing Extra Software
17766 \end_layout
17767
17768 \begin_layout Section
17769 Checking TeX
17770 \end_layout
17771
17772 \begin_layout Standard
17773 by 
17774 \noun on
17775 Asger Alstrup
17776 \end_layout
17777
17778 \begin_layout Subsection
17779 Introduction
17780 \end_layout
17781
17782 \begin_layout Standard
17783 If you have the 
17784 \family typewriter
17785 chktex
17786 \family default
17787  program installed
17788 \begin_inset Foot
17789 status collapsed
17790
17791 \begin_layout Plain Layout
17792
17793 \family typewriter
17794 chktex
17795 \family default
17796  is not yet available when you are using the LaTeX distribution MiKTeX.
17797 \end_layout
17798
17799 \end_inset
17800
17801 , you'll find in the 
17802 \family sans
17803 Tools
17804 \family default
17805  menu the entry: 
17806 \family sans
17807 Check
17808 \begin_inset space ~
17809 \end_inset
17810
17811 TeX
17812 \family default
17813 .
17814  You can get 
17815 \family typewriter
17816 chktex
17817 \family default
17818  from CTAN,
17819 \begin_inset Newline newline
17820 \end_inset
17821
17822
17823 \begin_inset CommandInset href
17824 LatexCommand href
17825 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17826
17827 \end_inset
17828
17829 .
17830 \end_layout
17831
17832 \begin_layout Standard
17833 The 
17834 \family sans
17835 ChkTeX
17836 \family default
17837  package is a program that was written by 
17838 \begin_inset Flex Noun
17839 status collapsed
17840
17841 \begin_layout Plain Layout
17842 Jens T.
17843 \begin_inset space ~
17844 \end_inset
17845
17846 Berger Thielemann
17847 \end_layout
17848
17849 \end_inset
17850
17851  in frustration because some constructs in LaTeX are sometimes non-intuitive,
17852  and easy to forget.
17853  The program runs over your LaTeX file, checks the integrity of the file,
17854  and flags some common errors.
17855  In other technical words, it is 
17856 \family typewriter
17857 lint
17858 \family default
17859  for LaTeX.
17860 \end_layout
17861
17862 \begin_layout Standard
17863 Well, what is a syntax checker doing in LyX which is supposed to produce
17864  correct LaTeX anyways? The answer is simple: Just as 
17865 \family typewriter
17866 Lint
17867 \family default
17868  not only checks the 
17869 \emph on
17870 syntax
17871 \emph default
17872  of C programs, but also does 
17873 \emph on
17874 semantic
17875 \emph default
17876  checks for type-errors, 
17877 \family sans
17878 ChkTeX
17879 \family default
17880  catches some common 
17881 \emph on
17882 typographic
17883 \emph default
17884  errors, in addition to the syntactical ones.
17885  Specifically, 
17886 \family sans
17887 ChkTeX
17888 \family default
17889  is capable of detecting several common errors, such as
17890 \end_layout
17891
17892 \begin_layout Itemize
17893 Ellipsis detection:
17894 \begin_inset Newline newline
17895 \end_inset
17896
17897 Use \SpecialChar \ldots{}
17898  instead of ...
17899 \end_layout
17900
17901 \begin_layout Itemize
17902 No space in front of/after parenthesis:
17903 \begin_inset Newline newline
17904 \end_inset
17905
17906 ( wrong spacing )
17907 \end_layout
17908
17909 \begin_layout Itemize
17910 Enforcement of normal space after common abbreviations:
17911 \begin_inset Newline newline
17912 \end_inset
17913
17914 e.
17915 \begin_inset space \thinspace{}
17916 \end_inset
17917
17918 g.
17919 \begin_inset space \space{}
17920 \end_inset
17921
17922 is too wide spacing.
17923 \end_layout
17924
17925 \begin_layout Itemize
17926 Enforcement of end-of-sentence space when the last sentence ends with a
17927  capital letter:
17928 \begin_inset Newline newline
17929 \end_inset
17930
17931 This is a TEST.
17932  And this is wrong spacing.
17933 \end_layout
17934
17935 \begin_layout Itemize
17936 Space in front of labels and similar commands:
17937 \begin_inset Newline newline
17938 \end_inset
17939
17940 The label should stick right up to the text to avoid falling to a wrong
17941  page.
17942  
17943 \begin_inset CommandInset label
17944 LatexCommand label
17945 name "sec:chktex"
17946
17947 \end_inset
17948
17949  
17950 \begin_inset Foot
17951 status collapsed
17952
17953 \begin_layout Plain Layout
17954 This footnote is in danger of falling off to a wrong page
17955 \end_layout
17956
17957 \end_inset
17958
17959  The label is separated too much.
17960 \end_layout
17961
17962 \begin_layout Itemize
17963 Space in front of references, instead of hard spaces:
17964 \begin_inset Newline newline
17965 \end_inset
17966
17967 If you have bad luck, the text will break right between the referenced text
17968  and reference number, and that's a pity.
17969  See section 
17970 \begin_inset CommandInset ref
17971 LatexCommand ref
17972 reference "sec:chktex"
17973
17974 \end_inset
17975
17976 .
17977 \end_layout
17978
17979 \begin_layout Itemize
17980 Use of 
17981 \begin_inset Quotes eld
17982 \end_inset
17983
17984 x
17985 \begin_inset Quotes erd
17986 \end_inset
17987
17988  instead of 
17989 \begin_inset Formula $\times$
17990 \end_inset
17991
17992  between numbers:
17993 \begin_inset Newline newline
17994 \end_inset
17995
17996 2x2 looks cheap compared to 
17997 \begin_inset Formula $2\times2$
17998 \end_inset
17999
18000 .
18001 \end_layout
18002
18003 \begin_layout Standard
18004 and more \SpecialChar \ldots{}
18005  It is an invaluable tool when you are 
18006 \begin_inset Quotes eld
18007 \end_inset
18008
18009 finishing up
18010 \begin_inset Quotes erd
18011 \end_inset
18012
18013  your document before printing, and you should run it right after the obligatory
18014  spelling check, and before you go fine tuning the typesetting.
18015 \end_layout
18016
18017 \begin_layout Subsection
18018 How to use it
18019 \end_layout
18020
18021 \begin_layout Standard
18022 If you have the program installed, usage is as simple as choosing 
18023 \family sans
18024 Tools\SpecialChar \menuseparator
18025 Check
18026 \begin_inset space ~
18027 \end_inset
18028
18029 TeX
18030 \family default
18031 .
18032  This will make LyX generate a LaTeX file of your document, start 
18033 \family sans
18034 ChkTeX
18035 \family default
18036  to check it, and then make LyX insert 
18037 \begin_inset Quotes eld
18038 \end_inset
18039
18040 error boxes
18041 \begin_inset Quotes erd
18042 \end_inset
18043
18044  with the warnings from 
18045 \family sans
18046 ChkTeX
18047 \family default
18048 , if there were any.
18049  The warnings will be placed close to the point of the mistake, and you
18050  can quickly find them by using the 
18051 \family sans
18052 Navigate\SpecialChar \menuseparator
18053 Error
18054 \family default
18055  menu item, or the shortcut key 
18056 \family sans
18057 C-g
18058 \family default
18059  from the default 
18060 \family typewriter
18061 cua
18062 \family default
18063  bind file.
18064  Open the error boxes by clicking on them with the mouse, or use the shortcut
18065  key 
18066 \family sans
18067 C-i
18068 \family default
18069  from 
18070 \family typewriter
18071 cua
18072 \family default
18073  bindings, or the corresponding 
18074 \family sans
18075 C-o
18076 \family default
18077  for the alternate 
18078 \family typewriter
18079 emacs
18080 \family default
18081  bind file.
18082  Read the warning and correct the mistake, if it is a mistake.
18083  If you have trouble understanding what the warning is about, you can safely
18084  ignore it.
18085  Remember that there is a hidden layer between the document on screen and
18086  the technical details in invoking 
18087 \family sans
18088 ChkTeX
18089 \family default
18090 , and this gap can make some warnings seem arcane or just plain silly.
18091 \end_layout
18092
18093 \begin_layout Standard
18094 This document is an excellent testing bed for the feature, and it should
18095  provide quite a few warnings for you to fiddle with.
18096  Since computers are only so smart, expect most of the warnings to be false
18097  alarms, though.
18098 \end_layout
18099
18100 \begin_layout Subsection
18101 How to fine tune it
18102 \end_layout
18103
18104 \begin_layout Standard
18105 Sometimes, you'll find that 
18106 \family sans
18107 ChkTeX
18108 \family default
18109  makes more noise than suits your mood.
18110  Then you can choose not to use it, wait until your mood changes, or try
18111  to customize 
18112 \family sans
18113 ChkTeX
18114 \family default
18115  to get better along with you.
18116 \end_layout
18117
18118 \begin_layout Standard
18119 Although 
18120 \family sans
18121 ChkTeX
18122 \family default
18123  
18124 \emph on
18125 is
18126 \emph default
18127  very configurable and extensible, you should not expect to solve all problems
18128  with 
18129 \family sans
18130 ChkTeX
18131 \family default
18132  in LyX this way.
18133  Since LyX has to generate a somewhat special LaTeX file to be able to match
18134  the line numbers from the 
18135 \family sans
18136 ChkTeX
18137 \family default
18138  output
18139 \begin_inset Foot
18140 status collapsed
18141
18142 \begin_layout Plain Layout
18143 You can inspect the specific output from 
18144 \family sans
18145 chktex
18146 \family default
18147  by using 
18148 \family sans
18149 Document\SpecialChar \menuseparator
18150 LaTeX
18151 \begin_inset space ~
18152 \end_inset
18153
18154 Log
18155 \family default
18156  right after a 
18157 \family sans
18158 chktex
18159 \family default
18160  run.
18161 \end_layout
18162
18163 \end_inset
18164
18165  to the internal document structure, some of the warnings will not appear
18166  correctly.
18167  There are two things you can do about this:
18168 \end_layout
18169
18170 \begin_layout Itemize
18171 Fine tune the 
18172 \family sans
18173 ChkTeX
18174 \family default
18175  invocation command line in 
18176 \begin_inset Flex MenuItem
18177 status collapsed
18178
18179 \begin_layout Plain Layout
18180 Tools\SpecialChar \menuseparator
18181 Preferences\SpecialChar \menuseparator
18182 Output\SpecialChar \menuseparator
18183 LaTeX\SpecialChar \menuseparator
18184 CheckTeX command
18185 \end_layout
18186
18187 \end_inset
18188
18189 , or the global 
18190 \family sans
18191 ChkTeX
18192 \family default
18193  installation configuration file (usually with the file 
18194 \family typewriter
18195 chktexrc
18196 \family default
18197 ).
18198  See below to learn what warnings can be enabled and disabled on the command
18199  line.
18200 \end_layout
18201
18202 \begin_layout Itemize
18203 Export your document as a raw LaTeX file using 
18204 \family sans
18205 File\SpecialChar \menuseparator
18206 Export\SpecialChar \menuseparator
18207 LaTeX
18208 \family default
18209  and run 
18210 \family typewriter
18211 chktex
18212 \family default
18213  manually on that.
18214  Invoked in this way, it can be a hassle to find the corresponding place
18215  in the document inside LyX, but with a little patience, you should be able
18216  to do it.
18217 \end_layout
18218
18219 \begin_layout Standard
18220 Here follows the warning messages that can be enabled and disabled in 
18221 \family sans
18222 Preferences
18223 \family default
18224 .
18225  Use 
18226 \family typewriter
18227 -n#
18228 \family default
18229  to disable a warning, and 
18230 \family typewriter
18231 -w#
18232 \family default
18233  to enable a warning.
18234  The emphasized entries are disabled by default, because the default is
18235  "
18236 \family typewriter
18237 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18238 \family default
18239 ".
18240 \end_layout
18241
18242 \begin_layout Standard
18243 Notice that you should only use the options that enable and disable warnings,
18244  because LyX relies on some of the other command line parameters to be set
18245  in a specific way to have a chance to communicate with 
18246 \family typewriter
18247 chktex
18248 \family default
18249 .
18250 \end_layout
18251
18252 \begin_layout Enumerate
18253
18254 \size small
18255 \emph on
18256 Command terminated with space.
18257 \end_layout
18258
18259 \begin_layout Enumerate
18260
18261 \size small
18262 Non-breaking space (
18263 \begin_inset Quotes eld
18264 \end_inset
18265
18266
18267 \family typewriter
18268 ~
18269 \family default
18270
18271 \begin_inset Quotes erd
18272 \end_inset
18273
18274 ) should have been used.
18275 \end_layout
18276
18277 \begin_layout Enumerate
18278
18279 \size small
18280 \emph on
18281 You should enclose the previous parenthesis with 
18282 \begin_inset Quotes eld
18283 \end_inset
18284
18285
18286 \family typewriter
18287 {}
18288 \family default
18289
18290 \begin_inset Quotes erd
18291 \end_inset
18292
18293 .
18294 \end_layout
18295
18296 \begin_layout Enumerate
18297
18298 \size small
18299 Italic correction (
18300 \begin_inset Quotes eld
18301 \end_inset
18302
18303
18304 \family typewriter
18305
18306 \backslash
18307 /
18308 \family default
18309
18310 \begin_inset Quotes erd
18311 \end_inset
18312
18313 ) found in non-italic buffer.
18314 \end_layout
18315
18316 \begin_layout Enumerate
18317
18318 \size small
18319 Italic correction (
18320 \begin_inset Quotes eld
18321 \end_inset
18322
18323
18324 \family typewriter
18325
18326 \backslash
18327 /
18328 \family default
18329
18330 \begin_inset Quotes erd
18331 \end_inset
18332
18333 ) found more than once.
18334 \end_layout
18335
18336 \begin_layout Enumerate
18337
18338 \size small
18339 \emph on
18340 No italic correction (
18341 \begin_inset Quotes eld
18342 \end_inset
18343
18344
18345 \family typewriter
18346
18347 \backslash
18348 /
18349 \family default
18350
18351 \begin_inset Quotes erd
18352 \end_inset
18353
18354 ) found.
18355 \end_layout
18356
18357 \begin_layout Enumerate
18358
18359 \size small
18360 Accent command 
18361 \begin_inset Quotes eld
18362 \end_inset
18363
18364
18365 \family typewriter
18366 cmd
18367 \family default
18368
18369 \begin_inset Quotes erd
18370 \end_inset
18371
18372  needs use of 
18373 \begin_inset Quotes eld
18374 \end_inset
18375
18376
18377 \family typewriter
18378 cmd
18379 \family default
18380
18381 \begin_inset Quotes erd
18382 \end_inset
18383
18384 .
18385 \end_layout
18386
18387 \begin_layout Enumerate
18388
18389 \size small
18390 Wrong length of dash may have been used.
18391 \end_layout
18392
18393 \begin_layout Enumerate
18394
18395 \size small
18396 \emph on
18397 \begin_inset Quotes eld
18398 \end_inset
18399
18400
18401 \family typewriter
18402 %s
18403 \family default
18404
18405 \begin_inset Quotes erd
18406 \end_inset
18407
18408  expected, found 
18409 \begin_inset Quotes eld
18410 \end_inset
18411
18412
18413 \family typewriter
18414 %s
18415 \family default
18416
18417 \begin_inset Quotes erd
18418 \end_inset
18419
18420 .
18421 \end_layout
18422
18423 \begin_layout Enumerate
18424
18425 \size small
18426 Solo 
18427 \begin_inset Quotes eld
18428 \end_inset
18429
18430
18431 \family typewriter
18432 %s
18433 \family default
18434
18435 \begin_inset Quotes erd
18436 \end_inset
18437
18438  found.
18439 \end_layout
18440
18441 \begin_layout Enumerate
18442
18443 \size small
18444 You should use 
18445 \begin_inset Quotes eld
18446 \end_inset
18447
18448
18449 \family typewriter
18450 %s
18451 \family default
18452
18453 \begin_inset Quotes erd
18454 \end_inset
18455
18456  to achieve an ellipsis.
18457 \end_layout
18458
18459 \begin_layout Enumerate
18460
18461 \size small
18462 Inter-word spacing (
18463 \begin_inset Quotes eld
18464 \end_inset
18465
18466
18467 \family typewriter
18468
18469 \backslash
18470
18471 \family default
18472  
18473 \begin_inset Quotes eld
18474 \end_inset
18475
18476 ) should perhaps be used.
18477 \end_layout
18478
18479 \begin_layout Enumerate
18480
18481 \size small
18482 Inter-sentence spacing (
18483 \begin_inset Quotes eld
18484 \end_inset
18485
18486
18487 \family typewriter
18488
18489 \backslash
18490 @
18491 \family default
18492
18493 \begin_inset Quotes erd
18494 \end_inset
18495
18496 ) should perhaps be used.
18497 \end_layout
18498
18499 \begin_layout Enumerate
18500
18501 \size small
18502 Could not find argument for command.
18503 \end_layout
18504
18505 \begin_layout Enumerate
18506
18507 \size small
18508 No match found for 
18509 \begin_inset Quotes eld
18510 \end_inset
18511
18512
18513 \family typewriter
18514 %s
18515 \family default
18516
18517 \begin_inset Quotes erd
18518 \end_inset
18519
18520 .
18521 \end_layout
18522
18523 \begin_layout Enumerate
18524
18525 \size small
18526 Math mode still on at end of LaTeX file.
18527 \end_layout
18528
18529 \begin_layout Enumerate
18530
18531 \size small
18532 Number of 
18533 \begin_inset Quotes eld
18534 \end_inset
18535
18536
18537 \family typewriter
18538 char
18539 \family default
18540
18541 \begin_inset Quotes erd
18542 \end_inset
18543
18544  doesn't match the number of 
18545 \begin_inset Quotes eld
18546 \end_inset
18547
18548
18549 \family typewriter
18550 char
18551 \family default
18552
18553 \begin_inset Quotes erd
18554 \end_inset
18555
18556 .
18557 \end_layout
18558
18559 \begin_layout Enumerate
18560
18561 \size small
18562 You should use either 
18563 \family typewriter
18564
18565 \begin_inset Quotes eld
18566 \end_inset
18567
18568
18569 \family default
18570  or 
18571 \family typewriter
18572
18573 \begin_inset Quotes erd
18574 \end_inset
18575
18576
18577 \family default
18578  as an alternative to 
18579 \begin_inset Quotes eld
18580 \end_inset
18581
18582
18583 \family typewriter
18584 "
18585 \family default
18586
18587 \begin_inset Quotes erd
18588 \end_inset
18589
18590 .
18591 \end_layout
18592
18593 \begin_layout Enumerate
18594
18595 \size small
18596 You should use "
18597 \family typewriter
18598 '
18599 \family default
18600 " (ASCII 39) instead of "
18601 \family typewriter
18602 ´
18603 \family default
18604 " (ASCII 180).
18605 \end_layout
18606
18607 \begin_layout Enumerate
18608
18609 \size small
18610 User-specified pattern found.
18611 \end_layout
18612
18613 \begin_layout Enumerate
18614
18615 \size small
18616 This command might not be intended.
18617 \end_layout
18618
18619 \begin_layout Enumerate
18620
18621 \size small
18622 \emph on
18623 Comment displayed.
18624 \end_layout
18625
18626 \begin_layout Enumerate
18627
18628 \size small
18629 Either 
18630 \family typewriter
18631 ''
18632 \backslash
18633 ,'
18634 \family default
18635  or 
18636 \family typewriter
18637 '
18638 \backslash
18639 ,''
18640 \family default
18641  will look better.
18642 \end_layout
18643
18644 \begin_layout Enumerate
18645
18646 \size small
18647 Delete this space to maintain correct page references.
18648 \end_layout
18649
18650 \begin_layout Enumerate
18651
18652 \size small
18653 \emph on
18654 You might wish to put this between a pair of 
18655 \begin_inset Quotes eld
18656 \end_inset
18657
18658
18659 \family typewriter
18660 {}
18661 \family default
18662
18663 \begin_inset Quotes erd
18664 \end_inset
18665
18666 .
18667 \end_layout
18668
18669 \begin_layout Enumerate
18670
18671 \size small
18672 You ought to remove spaces in front of punctuation.
18673 \end_layout
18674
18675 \begin_layout Enumerate
18676
18677 \size small
18678 Could not execute LaTeX command.
18679 \end_layout
18680
18681 \begin_layout Enumerate
18682
18683 \size small
18684 Don't use 
18685 \family typewriter
18686
18687 \backslash
18688 /
18689 \family default
18690  in front of small punctuation.
18691 \end_layout
18692
18693 \begin_layout Enumerate
18694
18695 \family typewriter
18696 \size small
18697 $
18698 \backslash
18699 times$
18700 \family default
18701  may look prettier here.
18702 \end_layout
18703
18704 \begin_layout Enumerate
18705
18706 \size small
18707 \emph on
18708 Multiple spaces detected in output.
18709 \end_layout
18710
18711 \begin_layout Enumerate
18712
18713 \size small
18714 This text may be ignored.
18715 \end_layout
18716
18717 \begin_layout Enumerate
18718
18719 \size small
18720 Use 
18721 \family typewriter
18722
18723 \begin_inset Quotes eld
18724 \end_inset
18725
18726
18727 \family default
18728  to begin quotation, not 
18729 \family typewriter
18730 '
18731 \family default
18732 .
18733 \end_layout
18734
18735 \begin_layout Enumerate
18736
18737 \size small
18738 Use 
18739 \family typewriter
18740 '
18741 \family default
18742  to end quotation, not 
18743 \family typewriter
18744
18745 \begin_inset Quotes eld
18746 \end_inset
18747
18748
18749 \family default
18750 .
18751 \end_layout
18752
18753 \begin_layout Enumerate
18754
18755 \size small
18756 Don't mix quotes.
18757 \end_layout
18758
18759 \begin_layout Enumerate
18760
18761 \size small
18762 You should perhaps use 
18763 \begin_inset Quotes eld
18764 \end_inset
18765
18766
18767 \family typewriter
18768 cmd
18769 \family default
18770
18771 \begin_inset Quotes erd
18772 \end_inset
18773
18774  instead.
18775 \end_layout
18776
18777 \begin_layout Enumerate
18778
18779 \size small
18780 You should put a space in front of/after parenthesis.
18781 \end_layout
18782
18783 \begin_layout Enumerate
18784
18785 \size small
18786 You should avoid spaces in front of/after parenthesis.
18787 \end_layout
18788
18789 \begin_layout Enumerate
18790
18791 \size small
18792 \emph on
18793 You should not use punctuation in front of/after quotes.
18794 \end_layout
18795
18796 \begin_layout Enumerate
18797
18798 \size small
18799 Double space found.
18800 \end_layout
18801
18802 \begin_layout Enumerate
18803
18804 \size small
18805 You should put punctuation outside inner/inside display math mode.
18806 \end_layout
18807
18808 \begin_layout Enumerate
18809
18810 \size small
18811 You ought to not use primitive TeX in LaTeX code.
18812 \end_layout
18813
18814 \begin_layout Enumerate
18815
18816 \size small
18817 You should remove spaces in front of 
18818 \begin_inset Quotes eld
18819 \end_inset
18820
18821
18822 \family typewriter
18823 %s
18824 \family default
18825
18826 \begin_inset Quotes erd
18827 \end_inset
18828
18829
18830 \end_layout
18831
18832 \begin_layout Enumerate
18833
18834 \size small
18835 \begin_inset Quotes eld
18836 \end_inset
18837
18838
18839 \family typewriter
18840 %s
18841 \family default
18842
18843 \begin_inset Quotes erd
18844 \end_inset
18845
18846  is normally not followed by 
18847 \begin_inset Quotes eld
18848 \end_inset
18849
18850
18851 \family typewriter
18852 %c
18853 \family default
18854
18855 \begin_inset Quotes erd
18856 \end_inset
18857
18858 .
18859 \end_layout
18860
18861 \begin_layout Standard
18862 In later versions of LyX, we hope to provide a more complete interface to
18863  this tool (and it's smaller cousin 
18864 \family typewriter
18865 lacheck
18866 \family default
18867 ) to exploit the full power of it.
18868  But it's not exactly useless as it is now: go try it on one of your existing
18869  documents of a certain length and be surprised.
18870 \end_layout
18871
18872 \begin_layout Section
18873 Version Control in LyX
18874 \end_layout
18875
18876 \begin_layout Standard
18877 by
18878 \noun on
18879  Lars Gullik Bjønnes 
18880 \noun default
18881 and 
18882 \noun on
18883 Pavel Sanda
18884 \end_layout
18885
18886 \begin_layout Subsection
18887 Introduction
18888 \end_layout
18889
18890 \begin_layout Standard
18891 LyX supports some of the most basic RCS/CVS/SVN/GIT commands.
18892  If you need something a bit more sophisticated you will have to do that
18893  manually in a terminal.
18894 \end_layout
18895
18896 \begin_layout Standard
18897 Also note that CVS support is not as good as subversion support so we advise
18898  using SVN instead.
18899  A good place to start learning Subversion is SVN Book
18900 \begin_inset Foot
18901 status open
18902
18903 \begin_layout Plain Layout
18904 \begin_inset CommandInset href
18905 LatexCommand href
18906 target "http://svnbook.red-bean.com/"
18907
18908 \end_inset
18909
18910
18911 \end_layout
18912
18913 \end_inset
18914
18915 .
18916  In the case of RCS you should read 
18917 \begin_inset Quotes eld
18918 \end_inset
18919
18920 rcsintro
18921 \begin_inset Quotes erd
18922 \end_inset
18923
18924  (a man file, read it with 
18925 \family typewriter
18926 man rcsintro
18927 \family default
18928 ).
18929  This file describes all the basic features of RCS.
18930  You should especially notice the comment about a RCS directory, and the
18931  notion of a master RCS file (the file ending in 
18932 \family typewriter
18933 ,v
18934 \family default
18935 ).
18936 \end_layout
18937
18938 \begin_layout Standard
18939 Before you begin to use the version control features in LyX, you should
18940  be familiar with RCS/CVS/SVN/GIT usage.
18941  The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18942  package — no guarantees are made for older versions.
18943  Most of the log messages are not currently displayed after operations —
18944  you can check them in the Messages pane if unsure.
18945  Regular users of version control will appreciate VC toolbar, which can
18946  be enabled via 
18947 \family sans
18948 View\SpecialChar \menuseparator
18949 Toolbars\SpecialChar \menuseparator
18950 Version
18951 \begin_inset space ~
18952 \end_inset
18953
18954 Control
18955 \family default
18956 .
18957 \end_layout
18958
18959 \begin_layout Standard
18960 For introducing your own external commands consult vc-command in the manual
18961  of LyX functions.
18962 \end_layout
18963
18964 \begin_layout Subsection
18965 RCS commands in LyX
18966 \end_layout
18967
18968 \begin_layout Standard
18969 The following sections describe the RCS commands supported by LyX.
18970  You can find them in the 
18971 \family sans
18972 File\SpecialChar \menuseparator
18973 Version
18974 \begin_inset space ~
18975 \end_inset
18976
18977 Control
18978 \family default
18979  submenu.
18980  LyX was tested against RCS 5.7/5.8
18981 \begin_inset Foot
18982 status open
18983
18984 \begin_layout Plain Layout
18985 Note that old DOS / MS Windows builds (5.7) need to setup environment variables
18986  in order to work properly with LyX.
18987  In particular time zone (TZ) should be set and more importantly RCSINIT
18988  in order to change default archive location ("SET RCSINIT=-x,v/") --- LyX
18989  expects archive to be found in file.lyx,v within the original document directory.
18990  See also README shipped with Windows RCS binaries.
18991 \end_layout
18992
18993 \end_inset
18994
18995 .
18996 \end_layout
18997
18998 \begin_layout Subsubsection
18999
19000 \family sans
19001 Register
19002 \end_layout
19003
19004 \begin_layout Standard
19005 If your document is not under revision control, this is the only item shown
19006  in the menu.
19007  And if it is under revision control, the 
19008 \family sans
19009 Register
19010 \family default
19011  item is not visible.
19012  
19013 \end_layout
19014
19015 \begin_layout Standard
19016 This command registers your document with RCS (unless you are under the
19017  directory managed by CVS)\SpecialChar \@.
19018  You are asked interactively to supply an initial
19019  description of the document.
19020  The document is now set in Read-Only mode and you have to 
19021 \family sans
19022 Check
19023 \begin_inset space ~
19024 \end_inset
19025
19026 Out
19027 \begin_inset space ~
19028 \end_inset
19029
19030 For
19031 \begin_inset space ~
19032 \end_inset
19033
19034 Edit
19035 \family default
19036 , before making any changes to it.
19037  A document under revision control has a 
19038 \begin_inset Quotes eld
19039 \end_inset
19040
19041 [RCS:<version> <locker>]
19042 \begin_inset Quotes erd
19043 \end_inset
19044
19045  item tagged to the filename in the minibuffer.
19046 \end_layout
19047
19048 \begin_layout Standard
19049 RCS command that is run: 
19050 \family typewriter
19051 ci -q -u -i -t-"<initial description>" <file-name>
19052 \end_layout
19053
19054 \begin_layout Standard
19055 Read 
19056 \family typewriter
19057 man ci
19058 \family default
19059  to understand the switches.
19060  
19061 \end_layout
19062
19063 \begin_layout Subsubsection
19064
19065 \family sans
19066 Check In Changes
19067 \end_layout
19068
19069 \begin_layout Standard
19070 When you are finished editing a file, you check in your changes.
19071  When you do this, you are asked for a description of the changes.
19072  This is stored in the history log.
19073  The version number is bumped, your changes are applied to the master RCS
19074  file, the document is unlocked and set to Read-Only mode.
19075 \end_layout
19076
19077 \begin_layout Standard
19078 RCS command: 
19079 \family typewriter
19080 ci -q -u -m"<description>" <file-name>
19081 \end_layout
19082
19083 \begin_layout Subsubsection
19084
19085 \family sans
19086 Check Out For Edit
19087 \end_layout
19088
19089 \begin_layout Standard
19090 By doing this you lock the document so that only you can edit it.
19091  This will also make the document Read-Write only for you.
19092  You will usually continue editing for a while and when you are finished
19093  you check in your changes.
19094  The status line is changed to reflect that you have locked the file.
19095 \end_layout
19096
19097 \begin_layout Standard
19098 RCS command: 
19099 \family typewriter
19100 co -q -l <file-name>
19101 \end_layout
19102
19103 \begin_layout Subsubsection
19104
19105 \family sans
19106 Revert To Repository Version
19107 \end_layout
19108
19109 \begin_layout Standard
19110 This will discard all changes made to the document since the last check
19111  in.
19112  You get a warning before changes are discarded.
19113 \end_layout
19114
19115 \begin_layout Standard
19116 RCS command: 
19117 \family typewriter
19118 co -f -u<version> <file-name>
19119 \end_layout
19120
19121 \begin_layout Subsubsection
19122
19123 \family sans
19124 Copy
19125 \end_layout
19126
19127 \begin_layout Standard
19128 This will create a copy of the current document.
19129  Since RCS does not support copy operations natively, the version history
19130  is not preserved, and the copy is added as a new file.
19131  It requires a clean document without any changes since the last checkin.
19132  You are asked for a file name and a description of the copy operation.
19133  After that the copy is created, both locally and in the repository.
19134  If the parent directories of the copied and original document differ, all
19135  relative paths of included files of the copy are adjusted (like in 
19136 \family sans
19137 File\SpecialChar \menuseparator
19138 Save As
19139 \family default
19140 \SpecialChar \ldots{}
19141 ).
19142  Finally, the copy is loaded instead of the original document.
19143 \end_layout
19144
19145 \begin_layout Labeling
19146 \labelwidthstring 00.00.0000
19147 RCS
19148 \begin_inset space ~
19149 \end_inset
19150
19151 commands: 
19152 \begin_inset space ~
19153 \end_inset
19154
19155
19156 \begin_inset Newline newline
19157 \end_inset
19158
19159 Copy 
19160 \begin_inset Flex Code
19161 status collapsed
19162
19163 \begin_layout Plain Layout
19164
19165 \family typewriter
19166 \begin_inset Quotes eld
19167 \end_inset
19168
19169 <file-name>
19170 \begin_inset Quotes erd
19171 \end_inset
19172
19173
19174 \end_layout
19175
19176 \end_inset
19177
19178  to 
19179 \begin_inset Flex Code
19180 status collapsed
19181
19182 \begin_layout Plain Layout
19183
19184 \family typewriter
19185 \begin_inset Quotes eld
19186 \end_inset
19187
19188 <new-file-name>
19189 \begin_inset Quotes erd
19190 \end_inset
19191
19192
19193 \end_layout
19194
19195 \end_inset
19196
19197
19198 \begin_inset Newline newline
19199 \end_inset
19200
19201
19202 \begin_inset Flex Code
19203 status collapsed
19204
19205 \begin_layout Plain Layout
19206 ci -q -u 
19207 \family typewriter
19208 -i 
19209 \begin_inset Quotes eld
19210 \end_inset
19211
19212 <new-file-name>
19213 \begin_inset Quotes erd
19214 \end_inset
19215
19216
19217 \end_layout
19218
19219 \end_inset
19220
19221
19222 \end_layout
19223
19224 \begin_layout Subsubsection
19225
19226 \family sans
19227 Undo Last Checkin
19228 \end_layout
19229
19230 \begin_layout Standard
19231 This makes as if the last check in never happened.
19232  No changes are made to the document loaded into LyX, but the last version
19233  is removed from the master RCS file.
19234 \end_layout
19235
19236 \begin_layout Standard
19237 RCS command: 
19238 \family typewriter
19239 rcs -o<version> <file-name>
19240 \end_layout
19241
19242 \begin_layout Subsubsection
19243
19244 \family sans
19245 Show History
19246 \end_layout
19247
19248 \begin_layout Standard
19249 This shows the complete history of the RCS document.
19250  The output of 
19251 \family typewriter
19252 rlog <file-name>
19253 \family default
19254  is shown in a browser.
19255  See 
19256 \family typewriter
19257 man rlog
19258 \family default
19259  for more info.
19260 \end_layout
19261
19262 \begin_layout Subsubsection
19263 Revision info
19264 \end_layout
19265
19266 \begin_layout Standard
19267 LyX supports RCS version number, author name, date and time of last commit.
19268  All those are extracted from 
19269 \family typewriter
19270 rlog -r <file-name>
19271 \family default
19272 .
19273  See 
19274 \begin_inset CommandInset ref
19275 LatexCommand ref
19276 reference "sub:VCS-Revision-Information"
19277
19278 \end_inset
19279
19280  for details.
19281 \end_layout
19282
19283 \begin_layout Subsection
19284 CVS commands in LyX
19285 \end_layout
19286
19287 \begin_layout Standard
19288 A subset of CVS operations is supported by LyX.
19289  You can find the commands in the 
19290 \family sans
19291 File\SpecialChar \menuseparator
19292 Version
19293 \begin_inset space ~
19294 \end_inset
19295
19296 Control
19297 \family default
19298  submenu.
19299  The version control system SVN is more powerful, so please use it instead
19300  of CVS if possible.
19301 \end_layout
19302
19303 \begin_layout Subsubsection
19304
19305 \family sans
19306 General CVS usage
19307 \end_layout
19308
19309 \begin_layout Standard
19310 If you start from scratch with CVS you have to create your repository and
19311  checkout the working copy with external tools.
19312  If you're using a client-server setup you may need to login before doing
19313  the first repository checkout.
19314 \end_layout
19315
19316 \begin_layout Standard
19317 If your documents are under revision control and others are using the same
19318  repository problems arise when different changes to the same document at
19319  the same location happen.
19320  Standard CVS repositories don't operate with a file locking mechanism.
19321  This may be surprising, but conflicts only occur if people disagree on
19322  the proper content of the same part of a document.
19323  So, if co-workers are used to communicate regularly, these conflicts occur
19324  rarely.
19325  If they don't communicate they have a fundamental problem anyway.
19326  Nevertheless some people like to work with so called 
19327 \begin_inset Quotes eld
19328 \end_inset
19329
19330 reserved checkouts
19331 \begin_inset Quotes erd
19332 \end_inset
19333
19334 .
19335  If they do so the working copy of all files is readonly when checked out
19336  first and the user starts editing after using a special command to make
19337  the working copy writable.
19338  When the changes are checked in the working copy returns to readonly state.
19339  With LyX one has to edit the 
19340 \begin_inset Flex Code
19341 status collapsed
19342
19343 \begin_layout Plain Layout
19344 .cvsrc
19345 \end_layout
19346
19347 \end_inset
19348
19349  file and add the line 
19350 \begin_inset Flex Code
19351 status collapsed
19352
19353 \begin_layout Plain Layout
19354 cvs -r
19355 \end_layout
19356
19357 \end_inset
19358
19359  to work with reserved checkouts.
19360  The benefit is the possibility to see who is using a writable copy of some
19361  document.
19362  It's not guaranteed only one user makes a copy writable.
19363 \end_layout
19364
19365 \begin_layout Standard
19366 LyX tries to guess if you're using reserved or non-reserved checkouts.
19367  If your working copy is readonly or it is writable and an additional copy
19368  of your document exists in the CVS/Base sub-directory a reserved otherwise
19369  a non-reserved checkout is assumed.
19370  When a reserved checkout is detected you have to use 
19371 \begin_inset Flex MenuItem
19372 status collapsed
19373
19374 \begin_layout Plain Layout
19375 Check Out
19376 \end_layout
19377
19378 \end_inset
19379
19380  to make your working copy writable if it's readonly.
19381  After doing so the 
19382 \begin_inset Flex MenuItem
19383 status collapsed
19384
19385 \begin_layout Plain Layout
19386 Check In
19387 \end_layout
19388
19389 \end_inset
19390
19391  operation is possible and that makes your working copy readonly again after
19392  transferring your changes to the repository.
19393 \end_layout
19394
19395 \begin_layout Standard
19396 More information about CVS can be found here 
19397 \begin_inset Flex URL
19398 status collapsed
19399
19400 \begin_layout Plain Layout
19401
19402 http://www.nongnu.org/cvs
19403 \end_layout
19404
19405 \end_inset
19406
19407  and here 
19408 \begin_inset Flex URL
19409 status collapsed
19410
19411 \begin_layout Plain Layout
19412
19413 http://ximbiot.com/cvs
19414 \end_layout
19415
19416 \end_inset
19417
19418 .
19419 \end_layout
19420
19421 \begin_layout Standard
19422 Read 
19423 \family typewriter
19424 man cvs
19425 \family default
19426  to understand the sub-commands and the switches mentioned below.
19427 \end_layout
19428
19429 \begin_layout Subsubsection
19430
19431 \family sans
19432 Register
19433 \end_layout
19434
19435 \begin_layout Standard
19436 If your document is not under revision control, this is the only item shown
19437  in the menu.
19438  And if it is under revision control, the 
19439 \family sans
19440 \bar under
19441 R
19442 \bar default
19443 egister
19444 \family default
19445  item is not visible.
19446  
19447 \end_layout
19448
19449 \begin_layout Standard
19450 This command registers in CVS your document 
19451 \begin_inset Flex Strong
19452 status collapsed
19453
19454 \begin_layout Plain Layout
19455
19456 \emph on
19457 only
19458 \end_layout
19459
19460 \end_inset
19461
19462  in the case you have already the documents directory under CVS control
19463  (in particular 
19464 \family typewriter
19465 CVS/Entries
19466 \family default
19467  file exists).
19468  This means you have to create or checkout the archive by yourself using
19469  external tools.
19470  (In case you forget that step LyX registers the document with RCS.)
19471 \end_layout
19472
19473 \begin_layout Standard
19474 Then you are asked interactively to supply an initial description of the
19475  document.
19476  Don't forget that registered file is not yet checked in.
19477 \end_layout
19478
19479 \begin_layout Standard
19480 CVS command that is run: 
19481 \family typewriter
19482 cvs -q add -m"<entered message>" "<file-name>"
19483 \end_layout
19484
19485 \begin_layout Standard
19486 The term 
19487 \family typewriter
19488 "<file-name>"
19489 \family default
19490  above and for all other CVS commands is an abbreviation for 
19491 \begin_inset Quotes eld
19492 \end_inset
19493
19494 change the current working directory to file location and use the file name
19495  without path component as argument
19496 \begin_inset Quotes erd
19497 \end_inset
19498
19499 .
19500 \end_layout
19501
19502 \begin_layout Subsubsection
19503
19504 \family sans
19505 Check In Changes
19506 \end_layout
19507
19508 \begin_layout Standard
19509 When you are finished editing a file, you commit your changes.
19510  When you do this and you had changed the document, you are asked for a
19511  description of the changes.
19512  After that changes are written to the repository.
19513  In case you didn't change the document and a reserved checkout is detected
19514  the reservation made on 
19515 \begin_inset Flex MenuItem
19516 status collapsed
19517
19518 \begin_layout Plain Layout
19519 Check Out
19520 \end_layout
19521
19522 \end_inset
19523
19524  is undone.
19525 \end_layout
19526
19527 \begin_layout Labeling
19528 \labelwidthstring 00.00.0000
19529 CVS
19530 \begin_inset space ~
19531 \end_inset
19532
19533 command: 
19534 \begin_inset space ~
19535 \end_inset
19536
19537
19538 \begin_inset Newline newline
19539 \end_inset
19540
19541
19542 \begin_inset Flex Code
19543 status collapsed
19544
19545 \begin_layout Plain Layout
19546 cvs 
19547 \family typewriter
19548 -q commit -m"<description>" "<file-name>"
19549 \end_layout
19550
19551 \end_inset
19552
19553  or
19554 \begin_inset Newline newline
19555 \end_inset
19556
19557
19558 \begin_inset Flex Code
19559 status collapsed
19560
19561 \begin_layout Plain Layout
19562 cvs -q unedit 
19563 \family typewriter
19564 "<file-name>"
19565 \end_layout
19566
19567 \end_inset
19568
19569
19570 \end_layout
19571
19572 \begin_layout Subsubsection
19573
19574 \family sans
19575 Check Out Changes
19576 \end_layout
19577
19578 \begin_layout Standard
19579 When you are sharing a repository with others, you may have to incorporate
19580  their changes into your working copy.
19581 \end_layout
19582
19583 \begin_layout Standard
19584 CVS command: 
19585 \family typewriter
19586 cvs -q update "<file-name>"
19587 \end_layout
19588
19589 \begin_layout Standard
19590 If a readonly checkout is detected the working copy is made writable and
19591  reserved.
19592 \end_layout
19593
19594 \begin_layout Standard
19595 CVS command: 
19596 \family typewriter
19597 cvs -q edit "<file-name>"
19598 \end_layout
19599
19600 \begin_layout Subsubsection
19601
19602 \family sans
19603 Revert To Repository Version
19604 \end_layout
19605
19606 \begin_layout Standard
19607 This will discard all changes made to the document since the last check
19608  in.
19609  You get a warning before changes are discarded.
19610  Firstly the file is deleted, secondly CVS update command is run.
19611 \end_layout
19612
19613 \begin_layout Standard
19614 CVS command: 
19615 \family typewriter
19616 cvs -q update "<file-name>"
19617 \end_layout
19618
19619 \begin_layout Standard
19620 If a reserved checkout is detected and the working copy has no changes only
19621  the reservation is undone.
19622 \end_layout
19623
19624 \begin_layout Standard
19625 CVS command: 
19626 \family typewriter
19627 cvs -q unedit "<file-name>"
19628 \end_layout
19629
19630 \begin_layout Subsubsection
19631
19632 \family sans
19633 Copy
19634 \end_layout
19635
19636 \begin_layout Standard
19637 This will create a copy of the current document.
19638  Since CVS does not support copy operations natively, the version history
19639  is not preserved, and the copy is added as a new file.
19640  It requires a clean document without any changes since the last checkin.
19641  You are asked for a file name and a description of the copy operation.
19642  After that the copy is created, both locally and in the repository.
19643  If the parent directories of the copied and original document differ, all
19644  relative paths of included files of the copy are adjusted (like in 
19645 \family sans
19646 File\SpecialChar \menuseparator
19647 Save As
19648 \family default
19649 \SpecialChar \ldots{}
19650 ).
19651  Finally, the copy is loaded instead of the original document.
19652 \end_layout
19653
19654 \begin_layout Labeling
19655 \labelwidthstring 00.00.0000
19656 CVS
19657 \begin_inset space ~
19658 \end_inset
19659
19660 commands: 
19661 \begin_inset space ~
19662 \end_inset
19663
19664
19665 \begin_inset Newline newline
19666 \end_inset
19667
19668 Copy 
19669 \begin_inset Flex Code
19670 status collapsed
19671
19672 \begin_layout Plain Layout
19673
19674 \family typewriter
19675 \begin_inset Quotes eld
19676 \end_inset
19677
19678 <file-name>
19679 \begin_inset Quotes erd
19680 \end_inset
19681
19682
19683 \end_layout
19684
19685 \end_inset
19686
19687  to 
19688 \begin_inset Flex Code
19689 status collapsed
19690
19691 \begin_layout Plain Layout
19692
19693 \family typewriter
19694 \begin_inset Quotes eld
19695 \end_inset
19696
19697 <new-file-name>
19698 \begin_inset Quotes erd
19699 \end_inset
19700
19701
19702 \end_layout
19703
19704 \end_inset
19705
19706
19707 \begin_inset Newline newline
19708 \end_inset
19709
19710
19711 \begin_inset Flex Code
19712 status collapsed
19713
19714 \begin_layout Plain Layout
19715 cvs -q add 
19716 \family typewriter
19717
19718 \begin_inset Quotes eld
19719 \end_inset
19720
19721 <new-file-name>
19722 \begin_inset Quotes erd
19723 \end_inset
19724
19725
19726 \end_layout
19727
19728 \end_inset
19729
19730
19731 \end_layout
19732
19733 \begin_layout Subsubsection
19734
19735 \family sans
19736 Rename
19737 \end_layout
19738
19739 \begin_layout Standard
19740 This will rename the current document.
19741  Since CVS does not support rename operations natively, the version history
19742  is not preserved, the renamed document is added as a new file, and the
19743  original document is deleted.
19744  It requires a clean document without any changes since the last checkin.
19745  You are asked for a file name and a description of the rename operation.
19746  After that the document is renamed, both locally and in the repository.
19747  If the parent directories of the new and old file names differ, all relative
19748  paths of included files are adjusted (like in 
19749 \family sans
19750 File\SpecialChar \menuseparator
19751 Save As
19752 \family default
19753 \SpecialChar \ldots{}
19754 ).
19755  Finally, the document is reloaded using the new name.
19756 \end_layout
19757
19758 \begin_layout Labeling
19759 \labelwidthstring 00.00.0000
19760 CVS
19761 \begin_inset space ~
19762 \end_inset
19763
19764 commands: 
19765 \begin_inset space ~
19766 \end_inset
19767
19768
19769 \begin_inset Newline newline
19770 \end_inset
19771
19772 Rename 
19773 \begin_inset Flex Code
19774 status collapsed
19775
19776 \begin_layout Plain Layout
19777
19778 \family typewriter
19779 \begin_inset Quotes eld
19780 \end_inset
19781
19782 <file-name>
19783 \begin_inset Quotes erd
19784 \end_inset
19785
19786
19787 \end_layout
19788
19789 \end_inset
19790
19791  to 
19792 \begin_inset Flex Code
19793 status collapsed
19794
19795 \begin_layout Plain Layout
19796
19797 \family typewriter
19798 \begin_inset Quotes eld
19799 \end_inset
19800
19801 <new-file-name>
19802 \begin_inset Quotes erd
19803 \end_inset
19804
19805
19806 \end_layout
19807
19808 \end_inset
19809
19810
19811 \begin_inset Newline newline
19812 \end_inset
19813
19814
19815 \begin_inset Flex Code
19816 status collapsed
19817
19818 \begin_layout Plain Layout
19819 cvs -q add 
19820 \family typewriter
19821
19822 \begin_inset Quotes eld
19823 \end_inset
19824
19825 <new-file-name>
19826 \begin_inset Quotes erd
19827 \end_inset
19828
19829
19830 \end_layout
19831
19832 \end_inset
19833
19834
19835 \begin_inset Newline newline
19836 \end_inset
19837
19838
19839 \begin_inset Flex Code
19840 status collapsed
19841
19842 \begin_layout Plain Layout
19843 cvs -q remove 
19844 \family typewriter
19845
19846 \begin_inset Quotes eld
19847 \end_inset
19848
19849 <file-name>
19850 \begin_inset Quotes erd
19851 \end_inset
19852
19853
19854 \end_layout
19855
19856 \end_inset
19857
19858
19859 \end_layout
19860
19861 \begin_layout Subsubsection
19862 Update of the local directory checkout from repository
19863 \end_layout
19864
19865 \begin_layout Standard
19866 Once your documents gets more complex, containing sub-documents and pictures,
19867  including external 
19868 \begin_inset Flex Code
19869 status collapsed
19870
19871 \begin_layout Plain Layout
19872 .tex
19873 \end_layout
19874
19875 \end_inset
19876
19877  files and so on using version control becomes more complicated.
19878  LyX supports updating the whole tree in which resides the document.
19879  This become especially useful once you cooperate with people which neither
19880  have detailed knowledge about CVS usage nor they have ambition to commit
19881  additional material to the repository.
19882  You have to organize the files structure so that all external files are
19883  in the same directory or subdirectories of the document.
19884  It's good practice anyway to store multipart documents in an extra directory.
19885 \end_layout
19886
19887 \begin_layout Standard
19888 The 
19889 \begin_inset Flex Code
19890 status collapsed
19891
19892 \begin_layout Plain Layout
19893 Update local directory from repository
19894 \end_layout
19895
19896 \end_inset
19897
19898  command updates the whole directory.
19899  If local changes are detected user is warned before update starts.
19900  In case of merge conflicts both versions of the conflicting document parts
19901  are placed in the final document.
19902  You have to review and correct the result of the merge.
19903  You'll find the conflicts enclosed in pairs of 
19904 \begin_inset Flex Code
19905 status collapsed
19906
19907 \begin_layout Plain Layout
19908 <<<<<<<
19909 \end_layout
19910
19911 \end_inset
19912
19913  and 
19914 \begin_inset Flex Code
19915 status collapsed
19916
19917 \begin_layout Plain Layout
19918 >>>>>>>
19919 \end_layout
19920
19921 \end_inset
19922
19923  separated by 
19924 \begin_inset Flex Code
19925 status collapsed
19926
19927 \begin_layout Plain Layout
19928 =======
19929 \end_layout
19930
19931 \end_inset
19932
19933 .
19934  The first part is your version as before the update operation with the
19935  document name prepended.
19936  The second one is the repository version with the version number after
19937  the sequence of 
19938 \begin_inset Flex Code
19939 status collapsed
19940
19941 \begin_layout Plain Layout
19942 >
19943 \end_layout
19944
19945 \end_inset
19946
19947  signs.
19948 \end_layout
19949
19950 \begin_layout Labeling
19951 \labelwidthstring 00.00.0000
19952 CVS
19953 \begin_inset space ~
19954 \end_inset
19955
19956 commands: 
19957 \begin_inset space ~
19958 \end_inset
19959
19960
19961 \begin_inset Newline newline
19962 \end_inset
19963
19964
19965 \begin_inset Flex Code
19966 status collapsed
19967
19968 \begin_layout Plain Layout
19969 cd $path; cvs diff 
19970 \family typewriter
19971 "."
19972 \end_layout
19973
19974 \end_inset
19975
19976  (Ask if changes are detected.)
19977 \begin_inset Newline newline
19978 \end_inset
19979
19980
19981 \begin_inset Flex Code
19982 status collapsed
19983
19984 \begin_layout Plain Layout
19985 cd $path; cvs -q update 
19986 \family typewriter
19987 "."
19988 \end_layout
19989
19990 \end_inset
19991
19992
19993 \end_layout
19994
19995 \begin_layout Standard
19996 where 
19997 \begin_inset Flex Code
19998 status collapsed
19999
20000 \begin_layout Plain Layout
20001 $path
20002 \end_layout
20003
20004 \end_inset
20005
20006  stands for the path to the document.
20007 \end_layout
20008
20009 \begin_layout Subsubsection
20010
20011 \family sans
20012 Show History
20013 \end_layout
20014
20015 \begin_layout Standard
20016 This shows the complete history of the CVS document.
20017  The output of 
20018 \family typewriter
20019 cvs log "<file-name>"
20020 \family default
20021  is shown in a browser.
20022 \end_layout
20023
20024 \begin_layout Subsubsection
20025 Revision info
20026 \end_layout
20027
20028 \begin_layout Standard
20029 LyX supports CVS version number, author name, date and time of last commit.
20030  All those are extracted from 
20031 \family typewriter
20032 cvs log -r <file-name>
20033 \family default
20034 .
20035  See 
20036 \begin_inset CommandInset ref
20037 LatexCommand ref
20038 reference "sub:VCS-Revision-Information"
20039
20040 \end_inset
20041
20042  for details.
20043 \end_layout
20044
20045 \begin_layout Subsection
20046 SVN commands in LyX
20047 \end_layout
20048
20049 \begin_layout Standard
20050 SVN is now partially supported by LyX.
20051  You can find the commands in the 
20052 \family sans
20053 File\SpecialChar \menuseparator
20054 Version
20055 \begin_inset space ~
20056 \end_inset
20057
20058 Control
20059 \family default
20060  submenu.
20061  Please note that if you use password protected access to repository via
20062  ssh, you will be asked in terminal window.
20063  LyX was tested against SVN 1.5, 1.6, 1.7 and 1.8
20064 \begin_inset Foot
20065 status open
20066
20067 \begin_layout Plain Layout
20068 Most of the commands will work with 1.4 too, see 
20069 \begin_inset CommandInset ref
20070 LatexCommand ref
20071 reference "sub:SVN-Repo-Update"
20072
20073 \end_inset
20074
20075 .
20076  There seems to be currently unresolved permissions problem under SVN 1.8
20077  with reverting changes when file is locked.
20078 \end_layout
20079
20080 \end_inset
20081
20082
20083 \end_layout
20084
20085 \begin_layout Subsubsection
20086
20087 \family sans
20088 Register
20089 \end_layout
20090
20091 \begin_layout Standard
20092 If your document is not under revision control, this is the only item shown
20093  in the menu.
20094  And if it is under revision control, the 
20095 \family sans
20096 \bar under
20097 R
20098 \bar default
20099 egister
20100 \family default
20101  item is not visible.
20102 \end_layout
20103
20104 \begin_layout Standard
20105 This command registers in SVN your document ONLY in case you have already
20106  the documents directory under SVN control (in particular 
20107 \family typewriter
20108 .svn/entries
20109 \family default
20110  file exists).
20111  This means you have to checkout the archive by yourself.
20112 \end_layout
20113
20114 \begin_layout Standard
20115 Then you are asked interactively to supply an initial description of the
20116  document.
20117  Don't forget that registered file is not yet commited.
20118 \end_layout
20119
20120 \begin_layout Standard
20121 SVN command that is run: 
20122 \family typewriter
20123 svn add -q 
20124 \begin_inset Quotes eld
20125 \end_inset
20126
20127 <file-name>
20128 \begin_inset Quotes erd
20129 \end_inset
20130
20131
20132 \end_layout
20133
20134 \begin_layout Standard
20135 Read 
20136 \family typewriter
20137 man svn
20138 \family default
20139  to understand the switches.
20140 \end_layout
20141
20142 \begin_layout Subsubsection
20143
20144 \family sans
20145 Check In Changes
20146 \end_layout
20147
20148 \begin_layout Standard
20149 When you are finished editing a file, you commit your changes.
20150  When you do this, you are asked for a description of the changes.
20151  After that changes are commited.
20152 \end_layout
20153
20154 \begin_layout Standard
20155 SVN command:
20156 \begin_inset Foot
20157 status collapsed
20158
20159 \begin_layout Plain Layout
20160 In case locking is not enabled.
20161  See Section 
20162 \begin_inset CommandInset ref
20163 LatexCommand ref
20164 reference "subsec:SVN-File-Locking"
20165
20166 \end_inset
20167
20168 .
20169 \end_layout
20170
20171 \end_inset
20172
20173  
20174 \family typewriter
20175 svn commit -q -m"<description>" <file-name>
20176 \end_layout
20177
20178 \begin_layout Subsubsection
20179
20180 \family sans
20181 Check Out For Edit
20182 \end_layout
20183
20184 \begin_layout Standard
20185 Updates the changes of this file from the repository.
20186  Be sure you understand SVN merging and conflicts resolving before using
20187  this function, because all conflicts has to be resolved manually by you!
20188 \end_layout
20189
20190 \begin_layout Standard
20191 SVN command:
20192 \begin_inset Foot
20193 status collapsed
20194
20195 \begin_layout Plain Layout
20196 Ditto.
20197 \end_layout
20198
20199 \end_inset
20200
20201  
20202 \family typewriter
20203 svn update --non-interactive 
20204 \begin_inset Quotes eld
20205 \end_inset
20206
20207 <file-name>
20208 \begin_inset Quotes erd
20209 \end_inset
20210
20211
20212 \end_layout
20213
20214 \begin_layout Subsubsection
20215
20216 \family sans
20217 Revert To Repository Version
20218 \end_layout
20219
20220 \begin_layout Standard
20221 This will discard all changes made to the document since the last check
20222  in.
20223  You get a warning before changes are discarded.
20224 \end_layout
20225
20226 \begin_layout Standard
20227 SVN command: 
20228 \family typewriter
20229 svn revert -q 
20230 \begin_inset Quotes eld
20231 \end_inset
20232
20233 <file-name>
20234 \begin_inset Quotes erd
20235 \end_inset
20236
20237
20238 \end_layout
20239
20240 \begin_layout Subsubsection
20241
20242 \family sans
20243 Copy
20244 \end_layout
20245
20246 \begin_layout Standard
20247 This will create a copy of the current document including the version history.
20248  It requires a clean document without any changes since the last checkin.
20249  You are asked for a file name and a description of the copy operation.
20250  After that the copy is created, both locally and in the repository.
20251  If the parent directories of the copied and original document differ, all
20252  relative paths of included files of the copy are adjusted (like in 
20253 \family sans
20254 File\SpecialChar \menuseparator
20255 Save As
20256 \family default
20257 \SpecialChar \ldots{}
20258 ).
20259  Finally, the copy is loaded instead of the original document.
20260 \end_layout
20261
20262 \begin_layout Labeling
20263 \labelwidthstring 00.00.0000
20264 SVN
20265 \begin_inset space ~
20266 \end_inset
20267
20268 commands: 
20269 \begin_inset space ~
20270 \end_inset
20271
20272
20273 \begin_inset Newline newline
20274 \end_inset
20275
20276
20277 \begin_inset Flex Code
20278 status collapsed
20279
20280 \begin_layout Plain Layout
20281 svn copy -q 
20282 \family typewriter
20283
20284 \begin_inset Quotes eld
20285 \end_inset
20286
20287 <file-name>
20288 \begin_inset Quotes erd
20289 \end_inset
20290
20291  
20292 \begin_inset Quotes eld
20293 \end_inset
20294
20295 <new-file-name>
20296 \begin_inset Quotes erd
20297 \end_inset
20298
20299
20300 \end_layout
20301
20302 \end_inset
20303
20304
20305 \begin_inset Newline newline
20306 \end_inset
20307
20308
20309 \begin_inset Flex Code
20310 status collapsed
20311
20312 \begin_layout Plain Layout
20313 svn commit
20314 \end_layout
20315
20316 \end_inset
20317
20318
20319 \end_layout
20320
20321 \begin_layout Subsubsection
20322
20323 \family sans
20324 Rename
20325 \end_layout
20326
20327 \begin_layout Standard
20328 This will rename the current document including the version history.
20329  It requires a clean document without any changes since the last checkin.
20330  You are asked for a file name and a description of the rename operation.
20331  After that the document is renamed, both locally and in the repository.
20332  If the parent directories of the new and old file names differ, all relative
20333  paths of included files are adjusted (like in 
20334 \family sans
20335 File\SpecialChar \menuseparator
20336 Save As
20337 \family default
20338 \SpecialChar \ldots{}
20339 ).
20340  Finally, the document is reloaded using the new name.
20341 \end_layout
20342
20343 \begin_layout Labeling
20344 \labelwidthstring 00.00.0000
20345 SVN
20346 \begin_inset space ~
20347 \end_inset
20348
20349 commands: 
20350 \begin_inset space ~
20351 \end_inset
20352
20353
20354 \begin_inset Newline newline
20355 \end_inset
20356
20357
20358 \begin_inset Flex Code
20359 status collapsed
20360
20361 \begin_layout Plain Layout
20362 svn move -q 
20363 \family typewriter
20364
20365 \begin_inset Quotes eld
20366 \end_inset
20367
20368 <file-name>
20369 \begin_inset Quotes erd
20370 \end_inset
20371
20372  
20373 \begin_inset Quotes eld
20374 \end_inset
20375
20376 <new-file-name>
20377 \begin_inset Quotes erd
20378 \end_inset
20379
20380
20381 \end_layout
20382
20383 \end_inset
20384
20385
20386 \begin_inset Newline newline
20387 \end_inset
20388
20389
20390 \begin_inset Flex Code
20391 status collapsed
20392
20393 \begin_layout Plain Layout
20394 svn commit
20395 \end_layout
20396
20397 \end_inset
20398
20399
20400 \end_layout
20401
20402 \begin_layout Subsubsection
20403 \begin_inset CommandInset label
20404 LatexCommand label
20405 name "sub:SVN-Repo-Update"
20406
20407 \end_inset
20408
20409 Update of the local directory checkout from repository
20410 \begin_inset Foot
20411 status collapsed
20412
20413 \begin_layout Plain Layout
20414 Note that this command will work only with subversion 
20415 \begin_inset Formula $\geqq1.5$
20416 \end_inset
20417
20418
20419 \end_layout
20420
20421 \end_inset
20422
20423
20424 \end_layout
20425
20426 \begin_layout Standard
20427 All the commands above have one shortcomming - they deal with the current
20428  document only.
20429  Once your document contains pictures, includes external 
20430 \begin_inset Flex Code
20431 status collapsed
20432
20433 \begin_layout Plain Layout
20434 .tex
20435 \end_layout
20436
20437 \end_inset
20438
20439  files and so on administration becomes more complicated.
20440  LyX now supports updating the whole tree in which resides the document
20441 \begin_inset Foot
20442 status collapsed
20443
20444 \begin_layout Plain Layout
20445 One need to organize the files structure so that all external files are
20446  in the same directory or subdirectories of the document.
20447  
20448 \end_layout
20449
20450 \end_inset
20451
20452 .
20453  This become especially useful once you cooperate with people which neither
20454  know about subversion management nor they have ambition to commit additional
20455  material to the repository.
20456  
20457 \end_layout
20458
20459 \begin_layout Standard
20460 \begin_inset Flex Code
20461 status collapsed
20462
20463 \begin_layout Plain Layout
20464 Update local directory from repository
20465 \end_layout
20466
20467 \end_inset
20468
20469  command updates the whole directory and in case of merge conflicts local
20470  version of the files are left, so no unintended data loss occurs.
20471  If local changes are detected user is warned before update starts.
20472 \end_layout
20473
20474 \begin_layout Labeling
20475 \labelwidthstring 00.00.0000
20476 SVN
20477 \begin_inset space ~
20478 \end_inset
20479
20480 commands: 
20481 \begin_inset space ~
20482 \end_inset
20483
20484
20485 \begin_inset Newline newline
20486 \end_inset
20487
20488
20489 \begin_inset Flex Code
20490 status collapsed
20491
20492 \begin_layout Plain Layout
20493 svn diff $path
20494 \end_layout
20495
20496 \end_inset
20497
20498  (Ask if changes are detected.)
20499 \begin_inset Newline newline
20500 \end_inset
20501
20502
20503 \begin_inset Flex Code
20504 status collapsed
20505
20506 \begin_layout Plain Layout
20507 svn update --accept mine-full $path
20508 \end_layout
20509
20510 \end_inset
20511
20512
20513 \end_layout
20514
20515 \begin_layout Standard
20516 where 
20517 \begin_inset Flex Code
20518 status collapsed
20519
20520 \begin_layout Plain Layout
20521 $path
20522 \end_layout
20523
20524 \end_inset
20525
20526  stands for the path to the document.
20527 \end_layout
20528
20529 \begin_layout Subsubsection
20530
20531 \family sans
20532 Show History
20533 \end_layout
20534
20535 \begin_layout Standard
20536 This shows the complete history of the SVN document.
20537  The output of 
20538 \family typewriter
20539 svn log 
20540 \begin_inset Quotes eld
20541 \end_inset
20542
20543 <file-name>
20544 \begin_inset Quotes erd
20545 \end_inset
20546
20547
20548 \family default
20549  is shown in a browser.
20550 \end_layout
20551
20552 \begin_layout Subsubsection
20553 File Locking
20554 \begin_inset CommandInset label
20555 LatexCommand label
20556 name "subsec:SVN-File-Locking"
20557
20558 \end_inset
20559
20560
20561 \end_layout
20562
20563 \begin_layout Standard
20564 The file exchange through various revision control systems brings the problem
20565  of merge conflicts in case two different users try to edit the same (parts
20566  of) document.
20567  When such a conflict happens it needs manual resolving and one reasonable
20568  alternative is to provide some kind of locking mechanism, which guarantees
20569  that only one user is allowed to edit file at the given time.
20570 \end_layout
20571
20572 \begin_layout Standard
20573 SVN has two such mechanisms to provide mutual exclusivity for file access
20574  - locks and automatic setting of write permissions (see sec.
20575  
20576 \begin_inset CommandInset ref
20577 LatexCommand ref
20578 reference "subsec:Automatical-Locking-Property"
20579
20580 \end_inset
20581
20582 ) based on 
20583 \begin_inset Flex Code
20584 status collapsed
20585
20586 \begin_layout Plain Layout
20587 svn:needs-lock
20588 \end_layout
20589
20590 \end_inset
20591
20592  file svn property
20593 \begin_inset Foot
20594 status open
20595
20596 \begin_layout Plain Layout
20597 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20598 \end_layout
20599
20600 \end_inset
20601
20602 .
20603  If this property is detected for a given document LyX starts to use SVN
20604  locks for document editing automatically and the whole check-in/out mechanism
20605  switches to the same regimen as for RCS.
20606  This in particular means there are two different modes of file use in LyX:
20607 \end_layout
20608
20609 \begin_layout Itemize
20610 Unlocked state.
20611  The loaded file is in the read-only mode.
20612  For editing on needs to check-out.
20613  
20614 \emph on
20615 Check-out
20616 \emph default
20617  consists of updating from the repository and gaining write lock.
20618  If the lock is not possible to obtain, we remain in unlocked state.
20619 \end_layout
20620
20621 \begin_layout Itemize
20622 Locked state.
20623  The loaded file is in the 'normal' edit mode.
20624  No other user is allowed to edit the file.
20625  
20626 \emph on
20627 Check-in
20628 \emph default
20629  consists of commiting changes and releasing write-lock.
20630  If no changes have been made to the document, no commit will be produced
20631 \begin_inset Foot
20632 status collapsed
20633
20634 \begin_layout Plain Layout
20635 Don't be puzzled by the fact that you will be asked for commit message anyway.
20636 \end_layout
20637
20638 \end_inset
20639
20640  and only the write-lock will be released.
20641 \end_layout
20642
20643 \begin_layout Standard
20644 SVN commands:
20645 \end_layout
20646
20647 \begin_layout Labeling
20648 \labelwidthstring 00.00.0000
20649 Check-in:
20650 \family typewriter
20651  svn commit -q -m"<description>" "<file-name>"
20652 \begin_inset Newline newline
20653 \end_inset
20654
20655 svn unlock "<file-name>"
20656 \end_layout
20657
20658 \begin_layout Labeling
20659 \labelwidthstring 00.00.0000
20660 Check-out: 
20661 \family typewriter
20662 svn update "<file-name>"
20663 \begin_inset Newline newline
20664 \end_inset
20665
20666 svn lock "<file-name>"
20667 \end_layout
20668
20669 \begin_layout Subsubsection
20670
20671 \family typewriter
20672 \begin_inset CommandInset label
20673 LatexCommand label
20674 name "subsec:Automatical-Locking-Property"
20675
20676 \end_inset
20677
20678
20679 \family default
20680 Automatic Locking Property
20681 \end_layout
20682
20683 \begin_layout Standard
20684 The above mentioned automatic setting of write permissions of the .lyx file
20685  can be set through
20686 \family sans
20687 \bar under
20688  F
20689 \bar default
20690 ile\SpecialChar \menuseparator
20691
20692 \bar under
20693 V
20694 \bar default
20695 ersion
20696 \begin_inset space ~
20697 \end_inset
20698
20699 Control\SpecialChar \menuseparator
20700
20701 \bar under
20702 T
20703 \bar default
20704 oggle locking property
20705 \family default
20706 .
20707  This command is active only when the file is not locked on the svn server
20708  (i.e.
20709  you need to check-out before proceeding).
20710 \end_layout
20711
20712 \begin_layout Labeling
20713 \labelwidthstring 00.00.0000
20714 SVN
20715 \begin_inset space ~
20716 \end_inset
20717
20718 commands:
20719 \end_layout
20720
20721 \begin_layout Labeling
20722 \labelwidthstring 00.00.0000
20723 Set:
20724 \family typewriter
20725  svn propset svn:needs-lock ON "<file-name>"
20726 \end_layout
20727
20728 \begin_layout Labeling
20729 \labelwidthstring 00.00.0000
20730 Unset: 
20731 \family typewriter
20732 svn propdel svn:needs-lock "<file-name>"
20733 \end_layout
20734
20735 \begin_layout Subsubsection
20736 \begin_inset CommandInset label
20737 LatexCommand label
20738 name "sub:VCS-Revision-Information"
20739
20740 \end_inset
20741
20742 Revision Information in Documents
20743 \end_layout
20744
20745 \begin_layout Standard
20746 There are more possibilities how to activate revision information in our
20747  document.
20748 \end_layout
20749
20750 \begin_layout Itemize
20751 LyX supports directly:
20752 \end_layout
20753
20754 \begin_deeper
20755 \begin_layout Itemize
20756 tree revision information (
20757 \begin_inset Flex Code
20758 status collapsed
20759
20760 \begin_layout Plain Layout
20761 vcs-tree-revision
20762 \end_layout
20763
20764 \end_inset
20765
20766 ).
20767  The result is the output of the 
20768 \begin_inset Flex Code
20769 status collapsed
20770
20771 \begin_layout Plain Layout
20772 svnversion
20773 \end_layout
20774
20775 \end_inset
20776
20777  command, the following table gives you an idea, how to read the results.
20778 \end_layout
20779
20780 \begin_layout Standard
20781 \align center
20782 \begin_inset Tabular
20783 <lyxtabular version="3" rows="6" columns="2">
20784 <features rotate="0" tabularvalignment="middle">
20785 <column alignment="center" valignment="top">
20786 <column alignment="center" valignment="top">
20787 <row>
20788 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20789 \begin_inset Text
20790
20791 \begin_layout Plain Layout
20792 Output
20793 \end_layout
20794
20795 \end_inset
20796 </cell>
20797 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20798 \begin_inset Text
20799
20800 \begin_layout Plain Layout
20801 Meaning
20802 \end_layout
20803
20804 \end_inset
20805 </cell>
20806 </row>
20807 <row>
20808 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20809 \begin_inset Text
20810
20811 \begin_layout Plain Layout
20812 4123:4168
20813 \end_layout
20814
20815 \end_inset
20816 </cell>
20817 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20818 \begin_inset Text
20819
20820 \begin_layout Plain Layout
20821 mixed revision working copy
20822 \end_layout
20823
20824 \end_inset
20825 </cell>
20826 </row>
20827 <row>
20828 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20829 \begin_inset Text
20830
20831 \begin_layout Plain Layout
20832 4168M
20833 \end_layout
20834
20835 \end_inset
20836 </cell>
20837 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20838 \begin_inset Text
20839
20840 \begin_layout Plain Layout
20841 modified working copy
20842 \end_layout
20843
20844 \end_inset
20845 </cell>
20846 </row>
20847 <row>
20848 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20849 \begin_inset Text
20850
20851 \begin_layout Plain Layout
20852 4123S
20853 \end_layout
20854
20855 \end_inset
20856 </cell>
20857 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20858 \begin_inset Text
20859
20860 \begin_layout Plain Layout
20861 switched working copy
20862 \end_layout
20863
20864 \end_inset
20865 </cell>
20866 </row>
20867 <row>
20868 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20869 \begin_inset Text
20870
20871 \begin_layout Plain Layout
20872 4123P
20873 \end_layout
20874
20875 \end_inset
20876 </cell>
20877 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20878 \begin_inset Text
20879
20880 \begin_layout Plain Layout
20881 partial working copy, from a sparse checkout
20882 \end_layout
20883
20884 \end_inset
20885 </cell>
20886 </row>
20887 <row>
20888 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20889 \begin_inset Text
20890
20891 \begin_layout Plain Layout
20892 4123:4168MS
20893 \end_layout
20894
20895 \end_inset
20896 </cell>
20897 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20898 \begin_inset Text
20899
20900 \begin_layout Plain Layout
20901 mixed revision, modified, switched working copy
20902 \end_layout
20903
20904 \end_inset
20905 </cell>
20906 </row>
20907 </lyxtabular>
20908
20909 \end_inset
20910
20911
20912 \end_layout
20913
20914 \begin_layout Itemize
20915 file revision information.
20916  The result comes from parsing the output of 
20917 \begin_inset Flex Code
20918 status collapsed
20919
20920 \begin_layout Plain Layout
20921 svn
20922 \begin_inset space ~
20923 \end_inset
20924
20925 info
20926 \begin_inset space ~
20927 \end_inset
20928
20929 --xml
20930 \begin_inset space ~
20931 \end_inset
20932
20933 file.lyx
20934 \end_layout
20935
20936 \end_inset
20937
20938 .
20939  Supported flags are:
20940 \end_layout
20941
20942 \begin_deeper
20943 \begin_layout Itemize
20944 version number of the last commit (
20945 \begin_inset Flex Code
20946 status collapsed
20947
20948 \begin_layout Plain Layout
20949 vcs-revision
20950 \end_layout
20951
20952 \end_inset
20953
20954 )
20955 \end_layout
20956
20957 \begin_layout Itemize
20958 author of the last commit (
20959 \begin_inset Flex Code
20960 status collapsed
20961
20962 \begin_layout Plain Layout
20963 vcs-author
20964 \end_layout
20965
20966 \end_inset
20967
20968 )
20969 \end_layout
20970
20971 \begin_layout Itemize
20972 date of the last commit (
20973 \begin_inset Flex Code
20974 status collapsed
20975
20976 \begin_layout Plain Layout
20977 vcs-date
20978 \end_layout
20979
20980 \end_inset
20981
20982 )
20983 \end_layout
20984
20985 \begin_layout Itemize
20986 time of the last commit (
20987 \begin_inset Flex Code
20988 status collapsed
20989
20990 \begin_layout Plain Layout
20991 vcs-time
20992 \end_layout
20993
20994 \end_inset
20995
20996 )
20997 \end_layout
20998
20999 \end_deeper
21000 \begin_layout Standard
21001 You can obtain this info via InsetInfo (e.g.
21002  
21003 \begin_inset Flex Code
21004 status collapsed
21005
21006 \begin_layout Plain Layout
21007 info-insert buffer vcs-date
21008 \end_layout
21009
21010 \end_inset
21011
21012 ).
21013  The information will be available only when you have the file stored under
21014  svn managment (i.e.
21015  the 
21016 \begin_inset Flex Code
21017 status collapsed
21018
21019 \begin_layout Plain Layout
21020 .svn
21021 \end_layout
21022
21023 \end_inset
21024
21025  directory is available with your document).
21026 \end_layout
21027
21028 \end_deeper
21029 \begin_layout Itemize
21030 Another---a hacking one---possibility is to use svn keywords
21031 \begin_inset Foot
21032 status collapsed
21033
21034 \begin_layout Plain Layout
21035 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
21036 \end_layout
21037
21038 \end_inset
21039
21040 .
21041  In short -- you set file keywords property (e.g.
21042  
21043 \family sans
21044 svn propset svn:keywords 'Rev' file.lyx
21045 \family default
21046 ) and then paste keyword TeX code
21047 \begin_inset Foot
21048 status collapsed
21049
21050 \begin_layout Plain Layout
21051 This is an easy way how to ensure that LyX won't break the line in the middle
21052  of keyword tag.
21053 \end_layout
21054
21055 \end_inset
21056
21057  tag in your document (e.g.
21058  
21059 \begin_inset ERT
21060 status open
21061
21062 \begin_layout Plain Layout
21063
21064 $Rev$
21065 \end_layout
21066
21067 \end_inset
21068
21069 ).
21070  This way svn client will automatically substitute revision number (e.g.
21071  
21072 \begin_inset ERT
21073 status open
21074
21075 \begin_layout Plain Layout
21076
21077 $Rev: 59 $
21078 \end_layout
21079
21080 \end_inset
21081
21082 ) after each update and commit.
21083  There are more problems with this approach.
21084  Firstly, the '$' character is used in TeX world for math equations, so
21085  any occurence of math formula 
21086 \begin_inset Formula $Rev$
21087 \end_inset
21088
21089  become 
21090 \begin_inset Formula $Rev:59$
21091 \end_inset
21092
21093  in your LyX document.
21094  Similarly for other keywords like Id, Date, Author, etc.
21095  Secondly svn output is dependent on your locales, so its very easy that
21096  svn would produce some problematic strings once Date is used.
21097  Thirdly you get the whole 'Rev: 59' string in your document instead of
21098  the plain number.
21099  Until subversion implements user's custom keywords it will be hard to use
21100  this approach reliably or let LyX to support it directly.
21101 \end_layout
21102
21103 \begin_layout Subsection
21104 SVN and Windows Environment
21105 \end_layout
21106
21107 \begin_layout Quote
21108 My inclination is to say that if the user cannot figure out the command
21109  line operations on their own fairly quickly, they would be well advised
21110  to use TortoiseSVN.
21111  ---P.
21112  A.
21113  Rubin
21114 \end_layout
21115
21116 \begin_layout Subsubsection
21117 Preparation
21118 \end_layout
21119
21120 \begin_layout Standard
21121 In addition to installing LyX, and having access to a Subversion repository,
21122  the user will need to install the Subversion client program.
21123  A Windows installer for the client program is available from 
21124 \begin_inset CommandInset href
21125 LatexCommand href
21126 name "CollabNet"
21127 target "http://www.collab.net/nonav/downloads/subversion/"
21128
21129 \end_inset
21130
21131 .
21132  The user may also want to install 
21133 \begin_inset CommandInset href
21134 LatexCommand href
21135 name "TortoiseSVN"
21136 target "http://tortoisesvn.tigris.org/"
21137
21138 \end_inset
21139
21140 , which integrates Subversion operations into the context (rightclick) menu
21141  of Windows Explorer.
21142  Operations done outside LyX will typically be more convenient using the
21143  Explorer context menu.
21144  Note that TortoiseSVN is not a replacement for the client program, which
21145  is what LyX itself will use.
21146 \end_layout
21147
21148 \begin_layout Subsubsection
21149 Bringing a document under Subversion control
21150 \end_layout
21151
21152 \begin_layout Standard
21153 Before a LyX document can be brought under version control in Subversion,
21154  its parent directory needs to be under version control.
21155  If the document is being added to a project already in the repository,
21156  this is accomplished by checking the project out to the directory where
21157  the new document will be placed.
21158  If the project itself is not yet under version control (for instance, if
21159  this document starts a new project), the directory must be imported into
21160  the repository.
21161  This is done outside LyX.
21162  Both import and checkout are easily accomplished from the Explorer context
21163  menu using TortoiseSVN, or alternatively can be done using the command
21164  line client at a DOS prompt.
21165  The procedure for importing the project using TortoiseSVN is described
21166  below, assuming an existing repository and a new project being started
21167  in 
21168 \family typewriter
21169 C:
21170 \backslash
21171 new project
21172 \family default
21173 .
21174  For information on using the Subversion client program, run 
21175 \family typewriter
21176 svn --help 
21177 \family default
21178 in a DOS shell.
21179 \end_layout
21180
21181 \begin_layout Enumerate
21182 Locate 
21183 \family typewriter
21184 C:
21185 \backslash
21186 new project 
21187 \family default
21188 in Windows Explorer, right click it, and select 
21189 \family sans
21190 TortoiseSVN\SpecialChar \menuseparator
21191 Repo-browser
21192 \family default
21193 .
21194  If necessary, adjust the URL for the repository, then click OK.
21195 \end_layout
21196
21197 \begin_layout Enumerate
21198 Right click the level of the repository under which you want to place the
21199  new project folder (typically the top level) and click 
21200 \family sans
21201 Create folder
21202 \family default
21203  Supply a name for the project folder and click OK.
21204  Add a message for the log file if desired, then click OK again.
21205  The new project folder should appear in the repository.
21206  Finally, click OK again to exit the repository browser.
21207 \end_layout
21208
21209 \begin_layout Enumerate
21210 Once again right click 
21211 \family typewriter
21212 C:
21213 \backslash
21214 new project
21215 \family default
21216 , this time selecting SVN Checkout\SpecialChar \ldots{}
21217  Select the URL of the project folder
21218  you just created in the repository, and set the checkout directory to 
21219 \family typewriter
21220 C:
21221 \backslash
21222 new project.
21223
21224 \family default
21225  Click OK.
21226  You will be warned about a non-empty folder; click OK to proceed.
21227  You should now have a 
21228 \family typewriter
21229 .svn
21230 \family default
21231  directory under 
21232 \family typewriter
21233 C:
21234 \backslash
21235 new project.
21236 \end_layout
21237
21238 \begin_layout Enumerate
21239 Create or open your document in LyX and click 
21240 \family sans
21241 File\SpecialChar \menuseparator
21242 Version
21243 \begin_inset space ~
21244 \end_inset
21245
21246 Control\SpecialChar \menuseparator
21247 Register.
21248  
21249 \family default
21250 Add a log message and click OK to commit the document to version control.
21251 \end_layout
21252
21253 \begin_layout Standard
21254 From this point onward, you should have full functionality in the 
21255 \family sans
21256 File\SpecialChar \menuseparator
21257 Version
21258 \begin_inset space ~
21259 \end_inset
21260
21261 Control
21262 \family default
21263  menu.
21264  You also have the option of checking the document in and out, viewing its
21265  history, etc.
21266  using the TortoiseSVN context menu in Windows Explorer or the Subversion
21267  client program from a command prompt.
21268 \end_layout
21269
21270 \begin_layout Subsubsection
21271 SSH tunnel used with SVN under Windows
21272 \end_layout
21273
21274 \begin_layout Standard
21275 Compared with Linux setting up an svn client to communicate over ssh under
21276  Windows is a rather troublesome task.
21277  We will at least offer some hints how to setup the client side but prior
21278  knowledge about ssh and the Windows command line is needed, also be prepared
21279  for a great deal of frustration\SpecialChar \ldots{}
21280
21281 \end_layout
21282
21283 \begin_layout Enumerate
21284 Get an svn client for windows, as described in the previous sections.
21285  When it is a fresh install run some svn command (e.g.
21286  
21287 \begin_inset Flex Code
21288 status collapsed
21289
21290 \begin_layout Plain Layout
21291 svn --version
21292 \end_layout
21293
21294 \end_inset
21295
21296 ) to create config files, which you will need to change later on.
21297 \end_layout
21298
21299 \begin_layout Enumerate
21300 Choose an ssh client for Windows.
21301  There are several possibilities, we will use the one from Putty tools
21302 \begin_inset Foot
21303 status collapsed
21304
21305 \begin_layout Plain Layout
21306 \begin_inset Flex URL
21307 status collapsed
21308
21309 \begin_layout Plain Layout
21310
21311 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21312 \end_layout
21313
21314 \end_inset
21315
21316
21317 \end_layout
21318
21319 \end_inset
21320
21321 .
21322  You will need to set the connection up so that the client doesn't ask for
21323  any password from you.
21324  To keep things easy we will use only keys without any additional password
21325  protection etc.
21326 \end_layout
21327
21328 \begin_deeper
21329 \begin_layout Enumerate
21330 Generate keys by 
21331 \begin_inset Flex Code
21332 status collapsed
21333
21334 \begin_layout Plain Layout
21335 puttygen
21336 \end_layout
21337
21338 \end_inset
21339
21340 .
21341  Save your private .ppk key file and put the public one on the server side.
21342  If the SVN server runs on Linux, note that the format of the public key
21343  is not compatible with Linux openssh and you will need to direcly copy-paste
21344  the key from the “
21345 \emph on
21346 Public key for pasting into OpenSSH authorized_keys file
21347 \emph default
21348 :” edit field into the server's 
21349 \begin_inset Flex Code
21350 status collapsed
21351
21352 \begin_layout Plain Layout
21353 ~/.ssh/authorized_keys
21354 \end_layout
21355
21356 \end_inset
21357
21358  / 
21359 \begin_inset Flex Code
21360 status collapsed
21361
21362 \begin_layout Plain Layout
21363 authorized_keys2
21364 \end_layout
21365
21366 \end_inset
21367
21368  file.
21369 \end_layout
21370
21371 \begin_layout Enumerate
21372 Get the Putty's 
21373 \begin_inset Flex Code
21374 status collapsed
21375
21376 \begin_layout Plain Layout
21377 plink
21378 \end_layout
21379
21380 \end_inset
21381
21382 .
21383  In the SVN config file
21384 \begin_inset Foot
21385 status collapsed
21386
21387 \begin_layout Plain Layout
21388 Exact path depends on Windows version, usually somewhere around 
21389 \begin_inset Flex Code
21390 status collapsed
21391
21392 \begin_layout Plain Layout
21393 c:
21394 \backslash
21395 Documents and Settings
21396 \backslash
21397 user
21398 \backslash
21399 Application Data
21400 \backslash
21401 Subversion
21402 \backslash
21403 config
21404 \end_layout
21405
21406 \end_inset
21407
21408  / 
21409 \begin_inset Flex Code
21410 status collapsed
21411
21412 \begin_layout Plain Layout
21413 AppData
21414 \backslash
21415 Roaming
21416 \backslash
21417 Subversion
21418 \end_layout
21419
21420 \end_inset
21421
21422 .
21423 \end_layout
21424
21425 \end_inset
21426
21427 , section [tunnels], setup ssh command, e.g.
21428  
21429 \begin_inset Flex Code
21430 status collapsed
21431
21432 \begin_layout Plain Layout
21433 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21434 \end_layout
21435
21436 \end_inset
21437
21438 .
21439 \begin_inset Foot
21440 status collapsed
21441
21442 \begin_layout Plain Layout
21443 It will usually take a lot of time to get exact command right and it depends
21444  on many things.
21445  For example do not have some remote server saved as a default session in
21446  Putty etc.
21447  If things fail, try to connect via plink without SVN first.
21448 \end_layout
21449
21450 \end_inset
21451
21452
21453 \end_layout
21454
21455 \end_deeper
21456 \begin_layout Enumerate
21457 Checkout the SVN archive, e.
21458 \begin_inset space \thinspace{}
21459 \end_inset
21460
21461 g.
21462 \begin_inset Newline newline
21463 \end_inset
21464
21465
21466 \begin_inset Flex Code
21467 status collapsed
21468
21469 \begin_layout Plain Layout
21470 svn co svn+ssh://user@server/repository_path
21471 \end_layout
21472
21473 \end_inset
21474
21475 .
21476 \end_layout
21477
21478 \begin_layout Subsubsection
21479 End-of-Line Conversions
21480 \end_layout
21481
21482 \begin_layout Standard
21483 When the collaborators are mixing Linux and Windows environments, LyX will
21484  use different line endings inside the .lyx files.
21485  This is not a problem as far as LyX functionality is concerned, but the
21486  commit diffs will be huge and merge-conflicts prone.
21487  Fortunately SVN itself knows
21488 \begin_inset Foot
21489 status collapsed
21490
21491 \begin_layout Plain Layout
21492 \begin_inset Flex URL
21493 status collapsed
21494
21495 \begin_layout Plain Layout
21496
21497 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21498 \end_layout
21499
21500 \end_inset
21501
21502
21503 \end_layout
21504
21505 \end_inset
21506
21507  how to deal with CR/LF problems when switching .lyx files to the 
21508 \begin_inset Flex Code
21509 status collapsed
21510
21511 \begin_layout Plain Layout
21512 native
21513 \end_layout
21514
21515 \end_inset
21516
21517  mode.
21518 \begin_inset Foot
21519 status collapsed
21520
21521 \begin_layout Plain Layout
21522 For the lazy guys: 
21523 \begin_inset Flex Code
21524 status collapsed
21525
21526 \begin_layout Plain Layout
21527 svn propset svn:eol-style native FILE_NAME
21528 \end_layout
21529
21530 \end_inset
21531
21532
21533 \end_layout
21534
21535 \end_inset
21536
21537
21538 \end_layout
21539
21540 \begin_layout Subsection
21541 GIT commands in LyX
21542 \end_layout
21543
21544 \begin_layout Standard
21545 A minimal subset of GIT commands is now supported by LyX.
21546  You can find the commands in the 
21547 \family sans
21548 File\SpecialChar \menuseparator
21549 Version
21550 \begin_inset space ~
21551 \end_inset
21552
21553 Control
21554 \family default
21555  submenu.
21556  Please note that if you use password protected access to repository via
21557  ssh, you will be asked in terminal window.
21558  LyX was tested against GIT 1.7.
21559 \end_layout
21560
21561 \begin_layout Standard
21562 One big difference of GIT and the other supported version control systems
21563  is the distributed nature of GIT: With traditional version control systems
21564  there is one central server which hosts the repository.
21565  Users commit their changes to the server, and get updates made by other
21566  users from it.
21567  With GIT, users commit to a local repository.
21568  The local repository can be synchronized with one or more remote repositories
21569  using the 
21570 \begin_inset Flex Code
21571 status collapsed
21572
21573 \begin_layout Plain Layout
21574 pull
21575 \end_layout
21576
21577 \end_inset
21578
21579  and 
21580 \begin_inset Flex Code
21581 status collapsed
21582
21583 \begin_layout Plain Layout
21584 push
21585 \end_layout
21586
21587 \end_inset
21588
21589  GIT commands.
21590  LyX does not interact in any way with remote GIT repositories.
21591  It works exclusively with the local repository in a very similar way as
21592  with a central CVS or SVN repository.
21593  If you use remote GIT repositories you need to do the 
21594 \begin_inset Flex Code
21595 status collapsed
21596
21597 \begin_layout Plain Layout
21598 pull
21599 \end_layout
21600
21601 \end_inset
21602
21603  and 
21604 \begin_inset Flex Code
21605 status collapsed
21606
21607 \begin_layout Plain Layout
21608 push
21609 \end_layout
21610
21611 \end_inset
21612
21613  operations with your favourite GIT client.
21614 \end_layout
21615
21616 \begin_layout Subsubsection
21617
21618 \family sans
21619 Register
21620 \end_layout
21621
21622 \begin_layout Standard
21623 If your document is not under revision control, this is the only item shown
21624  in the menu.
21625  And if it is under revision control, the 
21626 \family sans
21627 \bar under
21628 R
21629 \bar default
21630 egister
21631 \family default
21632  item is not visible.
21633 \end_layout
21634
21635 \begin_layout Standard
21636 This command registers in GIT your document ONLY in case you have already
21637  the documents directory under GIT control (in particular 
21638 \family typewriter
21639 .git/index
21640 \family default
21641  file exists).
21642  This means you have to checkout the archive by yourself.
21643 \end_layout
21644
21645 \begin_layout Standard
21646 Then you are asked interactively to supply an initial description of the
21647  document.
21648  Don't forget that registered file is not yet commited.
21649 \end_layout
21650
21651 \begin_layout Standard
21652 GIT command that is run: 
21653 \family typewriter
21654 git add 
21655 \begin_inset Quotes eld
21656 \end_inset
21657
21658 <file-name>
21659 \begin_inset Quotes erd
21660 \end_inset
21661
21662
21663 \end_layout
21664
21665 \begin_layout Standard
21666 Read 
21667 \family typewriter
21668 man git
21669 \family default
21670  to understand the switches.
21671 \end_layout
21672
21673 \begin_layout Subsubsection
21674
21675 \family sans
21676 Check In Changes
21677 \end_layout
21678
21679 \begin_layout Standard
21680 When you are finished editing a file, you commit your changes.
21681  When you do this, you are asked for a description of the changes.
21682  After that changes are commited.
21683 \end_layout
21684
21685 \begin_layout Standard
21686 GIT command: 
21687 \family typewriter
21688 git commit -q -m"<description>" <file-name>
21689 \end_layout
21690
21691 \begin_layout Subsubsection
21692
21693 \family sans
21694 Revert To Repository Version
21695 \end_layout
21696
21697 \begin_layout Standard
21698 This will discard all changes made to the document since the last check
21699  in.
21700  You get a warning before changes are discarded.
21701 \end_layout
21702
21703 \begin_layout Standard
21704 GIT command: 
21705 \family typewriter
21706 git checkout -q 
21707 \begin_inset Quotes eld
21708 \end_inset
21709
21710 <file-name>
21711 \begin_inset Quotes erd
21712 \end_inset
21713
21714
21715 \end_layout
21716
21717 \begin_layout Subsubsection
21718
21719 \family sans
21720 Rename
21721 \end_layout
21722
21723 \begin_layout Standard
21724 This will rename the current document including the version history.
21725  It requires a clean document without any changes since the last checkin.
21726  You are asked for a file name and a description of the rename operation.
21727  After that the document is renamed, both locally and in the repository.
21728  If the parent directories of the new and old file names differ, all relative
21729  paths of included files are adjusted (like in 
21730 \family sans
21731 File\SpecialChar \menuseparator
21732 Save As
21733 \family default
21734 \SpecialChar \ldots{}
21735 ).
21736  Finally, the document is reloaded using the new name.
21737 \end_layout
21738
21739 \begin_layout Labeling
21740 \labelwidthstring 00.00.0000
21741 GIT
21742 \begin_inset space ~
21743 \end_inset
21744
21745 commands: 
21746 \begin_inset space ~
21747 \end_inset
21748
21749
21750 \begin_inset Newline newline
21751 \end_inset
21752
21753
21754 \begin_inset Flex Code
21755 status collapsed
21756
21757 \begin_layout Plain Layout
21758 git mv 
21759 \family typewriter
21760
21761 \begin_inset Quotes eld
21762 \end_inset
21763
21764 <file-name>
21765 \begin_inset Quotes erd
21766 \end_inset
21767
21768  
21769 \begin_inset Quotes eld
21770 \end_inset
21771
21772 <new-file-name>
21773 \begin_inset Quotes erd
21774 \end_inset
21775
21776
21777 \end_layout
21778
21779 \end_inset
21780
21781
21782 \begin_inset Newline newline
21783 \end_inset
21784
21785
21786 \begin_inset Flex Code
21787 status collapsed
21788
21789 \begin_layout Plain Layout
21790 git commit
21791 \end_layout
21792
21793 \end_inset
21794
21795
21796 \end_layout
21797
21798 \begin_layout Subsubsection
21799
21800 \family sans
21801 Show History
21802 \end_layout
21803
21804 \begin_layout Standard
21805 This shows the complete history of the GIT document.
21806  The output of 
21807 \family typewriter
21808 git log 
21809 \begin_inset Quotes eld
21810 \end_inset
21811
21812 <file-name>
21813 \begin_inset Quotes erd
21814 \end_inset
21815
21816
21817 \family default
21818  is shown in a browser.
21819 \end_layout
21820
21821 \begin_layout Subsubsection
21822 Version Info
21823 \end_layout
21824
21825 \begin_layout Standard
21826 LyX supports GIT hash number of the last commit to the file, author name,
21827  date and time of last commit.
21828  All those are extracted from 
21829 \family typewriter
21830 git log -n 1 --pretty=format:%H%n%an%n%ai
21831 \family default
21832 .
21833  Tree version information is obtained via 
21834 \family typewriter
21835 git describe --abbrev --dirty --long
21836 \family default
21837 .
21838  See 
21839 \begin_inset CommandInset ref
21840 LatexCommand ref
21841 reference "sub:VCS-Revision-Information"
21842
21843 \end_inset
21844
21845  for other details.
21846 \end_layout
21847
21848 \begin_layout Subsection
21849 Further tuning
21850 \end_layout
21851
21852 \begin_layout Standard
21853 With the recent addition of the vc-command function LyX power users are
21854  allowed to create their own commands for revision control.
21855 \end_layout
21856
21857 \begin_layout Standard
21858 As an example you can see how two TortoiseSVN commands could be integrated
21859  directly:
21860 \end_layout
21861
21862 \begin_layout Description
21863 Commit: 
21864 \begin_inset Flex Code
21865 status collapsed
21866
21867 \begin_layout Plain Layout
21868 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21869 \end_layout
21870
21871 \end_inset
21872
21873
21874 \end_layout
21875
21876 \begin_layout Description
21877 Revert: 
21878 \begin_inset Flex Code
21879 status collapsed
21880
21881 \begin_layout Plain Layout
21882 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21883 \end_layout
21884
21885 \end_inset
21886
21887
21888 \end_layout
21889
21890 \begin_layout Subsection
21891 Version control and Document comparison
21892 \end_layout
21893
21894 \begin_layout Standard
21895 One of the typical uses of version control is to inspect the changes between
21896  revisions, usually by creating 
21897 \begin_inset Flex Code
21898 status collapsed
21899
21900 \begin_layout Plain Layout
21901 diff
21902 \end_layout
21903
21904 \end_inset
21905
21906  dumps.
21907  While this is useful for plain text files, it is much less useful in the
21908  case of LyX files, which have more a complicated structure.
21909  Hence we provide binding to the Document comparison feature.
21910  There are two ways of calling this feature - either by direct call of 
21911 \begin_inset Flex Code
21912 status collapsed
21913
21914 \begin_layout Plain Layout
21915 VC_COMPARE
21916 \end_layout
21917
21918 \end_inset
21919
21920  LyX function (for details see LyX functions manual) or by icon/menu item
21921  
21922 \begin_inset Flex MenuItem
21923 status collapsed
21924
21925 \begin_layout Plain Layout
21926 Compare with older revision...
21927 \end_layout
21928
21929 \end_inset
21930
21931 .
21932  One can either compare two chosen revisions of the document or he can simply
21933  compare the current version of edited text with older revisions (where
21934  '
21935 \begin_inset Flex MenuItem
21936 status collapsed
21937
21938 \begin_layout Plain Layout
21939 0
21940 \end_layout
21941
21942 \end_inset
21943
21944 ' revisions back means comparison of the edited file with last commited
21945  revision).
21946  
21947 \end_layout
21948
21949 \begin_layout Standard
21950 This feature is supported for SVN and RCS though due to the more complicated
21951  versioning scheme of RCS there is a constraint -- when addressing the revisions
21952  in dialog, numbers always point to the last number in RCS revision number,
21953  i.e.
21954  '35' in '1.2.35'.
21955  We don't currently support GIT addressing of revisions, one can just compare
21956  edited document with its revision X steps backs, where X is addressed as
21957  HEAD~X.
21958 \end_layout
21959
21960 \begin_layout Section
21961 Literate Programming
21962 \end_layout
21963
21964 \begin_layout Standard
21965 Updated by 
21966 \noun on
21967 Kayvan Sylvan 
21968 \noun default
21969 (kayvan@sylvan.com)
21970 \noun on
21971
21972 \noun default
21973 original documentation written by 
21974 \noun on
21975 Edmar Wienskoski Jr.
21976
21977 \noun default
21978  (edmar-w-jr@technologist.com)
21979 \end_layout
21980
21981 \begin_layout Subsection
21982 Introduction
21983 \end_layout
21984
21985 \begin_layout Standard
21986 The main purpose of this documentation is to show you how to use LyX for
21987  literate programming, where it is assumed that you are familiar with this
21988  programming technique, and know what 
21989 \begin_inset Quotes eld
21990 \end_inset
21991
21992 tangling
21993 \begin_inset Quotes erd
21994 \end_inset
21995
21996  and 
21997 \begin_inset Quotes eld
21998 \end_inset
21999
22000 weaving
22001 \begin_inset Quotes erd
22002 \end_inset
22003
22004  means.
22005  If that is not the case, please follow the web links provided in the following
22006  sections.
22007  There is a lot of good documentation out there covering old development
22008  history to the latest tools tips.
22009 \end_layout
22010
22011 \begin_layout Standard
22012 It is also assumed that you are familiar with LyX itself to a point that
22013  you are comfortable changing your LyX preferences, and X resources file.
22014  If that is not the case please refer to other LyX documentation to cover
22015  your specific needs.
22016 \end_layout
22017
22018 \begin_layout Subsection
22019 Literate Programming
22020 \end_layout
22021
22022 \begin_layout Standard
22023 From the Literate Programming FAQ: 
22024 \end_layout
22025
22026 \begin_layout Quotation
22027 Literate programming is the combination of documentation and source together
22028  in a fashion suited for reading by human beings.
22029  In fact, literate programs should be enjoyable reading, even inviting!
22030  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
22031  and documentation in a single file.
22032  Literate programming tools then parse the file to produce either readable
22033  documentation or compilable source.
22034  The WEB style of literate programming was created by D.
22035 \begin_inset space \thinspace{}
22036 \end_inset
22037
22038 E.
22039  Knuth during the development of his TeX typesetting software.
22040  
22041 \end_layout
22042
22043 \begin_layout Standard
22044 Another excerpt says:
22045 \end_layout
22046
22047 \begin_layout Quotation
22048
22049 \emph on
22050 How is literate programming different from verbose commenting?
22051 \end_layout
22052
22053 \begin_layout Quotation
22054 There are three distinguishing characteristics.
22055  In order of importance, they are: 
22056 \end_layout
22057
22058 \begin_deeper
22059 \begin_layout Itemize
22060 flexible order of elaboration 
22061 \end_layout
22062
22063 \begin_layout Itemize
22064 automatic support for browsing 
22065 \end_layout
22066
22067 \begin_layout Itemize
22068 typeset documentation, especially diagrams and mathematics 
22069 \end_layout
22070
22071 \end_deeper
22072 \begin_layout Standard
22073 Now that I sparked your curiosity, take a look in the references.
22074 \end_layout
22075
22076 \begin_layout Subsubsection
22077 References
22078 \end_layout
22079
22080 \begin_layout Standard
22081 The complete Literate Programming FAQ can be found at:
22082 \end_layout
22083
22084 \begin_layout Quote
22085 Literate Programming FAQ 
22086 \begin_inset Flex URL
22087 status collapsed
22088
22089 \begin_layout Plain Layout
22090
22091 http://www.literateprogramming.com/lpfaq.pdf
22092 \end_layout
22093
22094 \end_inset
22095
22096
22097 \end_layout
22098
22099 \begin_layout Standard
22100 The FAQ lists 23 (twenty three!) different literate programming tools.
22101  Where some are specialized or 
22102 \begin_inset Quotes eld
22103 \end_inset
22104
22105 tailored
22106 \begin_inset Quotes erd
22107 \end_inset
22108
22109  for particular programming languages, while other have general scope.
22110  I selected 
22111 \noun on
22112 Noweb
22113 \noun default
22114  for my own use for several reasons:
22115 \end_layout
22116
22117 \begin_layout Itemize
22118 It can generate the documentation either in LaTeX or HTML.
22119 \end_layout
22120
22121 \begin_layout Itemize
22122 It has a open architecture, i.
22123 \begin_inset space \thinspace{}
22124 \end_inset
22125
22126 e.
22127 \begin_inset space \space{}
22128 \end_inset
22129
22130 it is easy to plug in new filters and to perform special processing that
22131  you may need.
22132  
22133 \end_layout
22134
22135 \begin_layout Itemize
22136 There is a good selection of filters available already (the HTML is one
22137  of them).
22138 \end_layout
22139
22140 \begin_layout Itemize
22141 It is free.
22142 \end_layout
22143
22144 \begin_layout Standard
22145 The Noweb web page can be found at: 
22146 \end_layout
22147
22148 \begin_layout Quote
22149 Noweb home page 
22150 \begin_inset Flex URL
22151 status collapsed
22152
22153 \begin_layout Plain Layout
22154
22155 http://www.cs.virginia.edu/~nr/noweb/
22156 \end_layout
22157
22158 \end_inset
22159
22160
22161 \end_layout
22162
22163 \begin_layout Standard
22164 Starting from there you can reach many other interesting links and even
22165  some literate program examples.
22166 \end_layout
22167
22168 \begin_layout Subsection
22169 LyX and Literate Programming with Noweb
22170 \end_layout
22171
22172 \begin_layout Standard
22173 The LyX support for Literate Programming is provided by using the generic
22174  LyX converters mechanism.
22175  This support is provided in a 
22176 \begin_inset Quotes eld
22177 \end_inset
22178
22179 Noweb independent
22180 \begin_inset Quotes erd
22181 \end_inset
22182
22183  way, i.
22184 \begin_inset space \thinspace{}
22185 \end_inset
22186
22187 e.
22188 \begin_inset space \space{}
22189 \end_inset
22190
22191 you will be able to use this new LyX feature with some other literate programmin
22192 g tool of your choice by just changing your LyX preferences.
22193 \end_layout
22194
22195 \begin_layout Subsubsection
22196 Generating documents and code (weaving and tangling)
22197 \end_layout
22198
22199 \begin_layout Paragraph
22200 Using the noweb module
22201 \end_layout
22202
22203 \begin_layout Standard
22204 If you have installed Noweb and LyX successfully, whenever you open a new
22205  document, after you have chosen its document class, use the Document->Settings
22206  menu to add the 
22207 \begin_inset Quotes eld
22208 \end_inset
22209
22210 noweb
22211 \begin_inset Quotes erd
22212 \end_inset
22213
22214  module.
22215  If Noweb is correctly installed, when you click on the 
22216 \begin_inset Quotes eld
22217 \end_inset
22218
22219 Modules
22220 \begin_inset Quotes erd
22221 \end_inset
22222
22223  link, you will see the 
22224 \begin_inset Quotes eld
22225 \end_inset
22226
22227 noweb
22228 \begin_inset Quotes erd
22229 \end_inset
22230
22231  module in the available list and you can add it to your document.
22232 \end_layout
22233
22234 \begin_layout Paragraph
22235 Typing code in
22236 \end_layout
22237
22238 \begin_layout Standard
22239 LyX enables you to write code with a layout named 
22240 \begin_inset Flex Noun
22241 status collapsed
22242
22243 \begin_layout Plain Layout
22244 Chunk
22245 \end_layout
22246
22247 \end_inset
22248
22249 .
22250  Noweb delimits chunks like this:
22251 \end_layout
22252
22253 \begin_layout LyX-Code
22254 <<My code>>=
22255 \end_layout
22256
22257 \begin_layout LyX-Code
22258   code
22259 \end_layout
22260
22261 \begin_layout LyX-Code
22262   more code
22263 \end_layout
22264
22265 \begin_layout LyX-Code
22266   even more code
22267 \end_layout
22268
22269 \begin_layout LyX-Code
22270   @
22271 \end_layout
22272
22273 \begin_layout Standard
22274 The problem is that whatever is written in between the << and the 
22275 \family typewriter
22276 @
22277 \family default
22278  must be taken literally, i.
22279 \begin_inset space \thinspace{}
22280 \end_inset
22281
22282 e.
22283 \begin_inset space \space{}
22284 \end_inset
22285
22286 LyX should be prevented from making any special interpretation of what has
22287  been written.
22288  This is also handled by 
22289 \begin_inset Flex Noun
22290 status collapsed
22291
22292 \begin_layout Plain Layout
22293 Chunk
22294 \end_layout
22295
22296 \end_inset
22297
22298 , that works like a normal paragraph but has a free spacing capability.
22299 \end_layout
22300
22301 \begin_layout Standard
22302 As a special note, you can also use the 
22303 \begin_inset Quotes eld
22304 \end_inset
22305
22306 %def
22307 \begin_inset Quotes erd
22308 \end_inset
22309
22310  construct of Noweb in your chunks to add items to Noweb's identifier cross-refe
22311 rence:
22312 \end_layout
22313
22314 \begin_layout LyX-Code
22315 <<My chunk>>=
22316 \end_layout
22317
22318 \begin_layout LyX-Code
22319 def some_function(args):
22320 \end_layout
22321
22322 \begin_layout LyX-Code
22323    "This is the doc string for this function."
22324 \end_layout
22325
22326 \begin_layout LyX-Code
22327    print "My args: ", args
22328 \end_layout
22329
22330 \begin_layout LyX-Code
22331 @ %def some_function
22332 \end_layout
22333
22334 \begin_layout Standard
22335 For an example of this usage and the resulting cross-reference output, look
22336  at the Literate python program in 
22337 \emph on
22338 LIBDIR/examples/listerrors.lyx
22339 \emph default
22340  which should make this all clear.
22341 \end_layout
22342
22343 \begin_layout Paragraph
22344 Generating the documentation
22345 \end_layout
22346
22347 \begin_layout Standard
22348 At this point you already have a new document file with a proper document
22349  class, and with some code and text on it.
22350  How do I print it? The answer is simple, you select 
22351 \family sans
22352 View\SpecialChar \menuseparator
22353 DVI,
22354 \family default
22355  etc.
22356  Just like you would do for a plain document.
22357  No special procedure is required.
22358 \end_layout
22359
22360 \begin_layout Standard
22361 To help orientate you, I will now explain what happens inside LyX:
22362 \end_layout
22363
22364 \begin_layout Enumerate
22365 When the 
22366 \family sans
22367 Update\SpecialChar \menuseparator
22368 DVI
22369 \family default
22370  menu option is chosen, a LaTeX file is generated.
22371  
22372 \end_layout
22373
22374 \begin_deeper
22375 \begin_layout Standard
22376 If the document is of any literate class the generated file will be named
22377  with an extension name defined by the 
22378 \begin_inset Quotes eld
22379 \end_inset
22380
22381 literate
22382 \begin_inset Quotes erd
22383 \end_inset
22384
22385  format (defined in the Preferences panel), otherwise the file will have
22386  the usual 
22387 \family typewriter
22388 .tex
22389 \family default
22390  extension.
22391 \end_layout
22392
22393 \end_deeper
22394 \begin_layout Enumerate
22395 Note that the only difference so far is in the name of the file, no special
22396  processing is required by LyX.
22397  Given that you formatted the code using the 
22398 \begin_inset Flex Noun
22399 status collapsed
22400
22401 \begin_layout Plain Layout
22402 Chunk
22403 \end_layout
22404
22405 \end_inset
22406
22407  layout that, by itself, takes care of the business.
22408 \end_layout
22409
22410 \begin_layout Enumerate
22411 If the document is of any literate class LyX will then use the internal
22412  LyX to Noweb converter, followed by the Noweb to LaTeX converter
22413 \begin_inset Foot
22414 status collapsed
22415
22416 \begin_layout Plain Layout
22417 The converters are defined in the 
22418 \family sans
22419 Tools\SpecialChar \menuseparator
22420 Preferences
22421 \family default
22422  panel, under the 
22423 \begin_inset Quotes eld
22424 \end_inset
22425
22426 Conversion
22427 \begin_inset Quotes erd
22428 \end_inset
22429
22430  tab.
22431  See section 
22432 \emph on
22433 Converters
22434 \emph default
22435  of the 
22436 \emph on
22437 Customization
22438 \emph default
22439  manual for general information about converters.
22440 \end_layout
22441
22442 \end_inset
22443
22444  to generate the LaTeX file.
22445 \end_layout
22446
22447 \begin_deeper
22448 \begin_layout Standard
22449 Otherwise it will just skip this step.
22450 \end_layout
22451
22452 \end_deeper
22453 \begin_layout Enumerate
22454 Finally, LaTeX is invoked and the regular post processing continues as in
22455  a plain document.
22456 \end_layout
22457
22458 \begin_layout Standard
22459 Independence from a particular 
22460 \begin_inset Quotes eld
22461 \end_inset
22462
22463 literate tool
22464 \begin_inset Quotes erd
22465 \end_inset
22466
22467  is easily achieved by changing the commands that are run by the various
22468  converters.
22469 \end_layout
22470
22471 \begin_layout Paragraph
22472 Generating the code
22473 \end_layout
22474
22475 \begin_layout Standard
22476 When the build menu option is chosen or the corresponding button in the
22477  toolbar is pressed, a LaTeX file is generated just like step 1 above.
22478  Next, LyX invokes the 
22479 \family typewriter
22480 Noweb->Program
22481 \family default
22482  converter.
22483  This converter needs to be defined by the user and is not installed by
22484  default, though the Program format is.
22485  This converter (like any other converter) will have two parts:
22486 \end_layout
22487
22488 \begin_layout Enumerate
22489 The converter program itself.
22490  This program performs the conversion from the one format to the other (in
22491  this case, from the Noweb format to the Program pseudo-format).
22492 \end_layout
22493
22494 \begin_layout Enumerate
22495 The error log parser.
22496  This is a program whose sole purpose is to rewrite error messages in a
22497  format that LyX understands.
22498  This makes it possible for LyX to place error boxes in the right places
22499  in the file buffer.
22500 \end_layout
22501
22502 \begin_layout Standard
22503 The first part, the 
22504 \begin_inset Quotes eld
22505 \end_inset
22506
22507 Converter
22508 \begin_inset Quotes erd
22509 \end_inset
22510
22511  setting, should be set to
22512 \begin_inset Newline newline
22513 \end_inset
22514
22515
22516 \begin_inset Quotes eld
22517 \end_inset
22518
22519
22520 \family typewriter
22521 build-script $$i
22522 \family default
22523  $$r
22524 \begin_inset Quotes erd
22525 \end_inset
22526
22527 .
22528 \begin_inset Newline newline
22529 \end_inset
22530
22531 This basically means that LyX will call 
22532 \begin_inset Quotes eld
22533 \end_inset
22534
22535 build-script
22536 \begin_inset Quotes erd
22537 \end_inset
22538
22539  (a program or script) with the name of the Noweb file (normally a file
22540  in the LyX temp directory) and the directory path of the original LyX file.
22541  
22542 \end_layout
22543
22544 \begin_layout Standard
22545 This is an implementation of 
22546 \begin_inset Quotes eld
22547 \end_inset
22548
22549 build-script
22550 \begin_inset Quotes erd
22551 \end_inset
22552
22553  that you can place in a directory on your path:
22554 \end_layout
22555
22556 \begin_layout Standard
22557 \begin_inset VSpace defskip
22558 \end_inset
22559
22560
22561 \end_layout
22562
22563 \begin_layout Standard
22564 \begin_inset Newpage pagebreak
22565 \end_inset
22566
22567
22568 \end_layout
22569
22570 \begin_layout Standard
22571
22572 \family sans
22573 #!/bin/sh
22574 \end_layout
22575
22576 \begin_layout Standard
22577
22578 \family sans
22579 #
22580 \end_layout
22581
22582 \begin_layout Standard
22583
22584 \family sans
22585 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
22586 \end_layout
22587
22588 \begin_layout Standard
22589 \begin_inset VSpace defskip
22590 \end_inset
22591
22592
22593 \end_layout
22594
22595 \begin_layout Standard
22596 The next part of the converter setting is the 
22597 \begin_inset Quotes eld
22598 \end_inset
22599
22600 Flags
22601 \begin_inset Quotes erd
22602 \end_inset
22603
22604  which is to be set to
22605 \begin_inset Newline newline
22606 \end_inset
22607
22608
22609 \begin_inset Quotes eld
22610 \end_inset
22611
22612
22613 \family typewriter
22614 parselog=$$s/scripts/listerrors
22615 \family default
22616
22617 \begin_inset Quotes erd
22618 \end_inset
22619
22620 .
22621 \begin_inset Newline newline
22622 \end_inset
22623
22624 This will run any errors that are generated by the 
22625 \begin_inset Quotes eld
22626 \end_inset
22627
22628 build-script
22629 \begin_inset Quotes erd
22630 \end_inset
22631
22632  process through the 
22633 \begin_inset Quotes eld
22634 \end_inset
22635
22636 listerrors
22637 \begin_inset Quotes erd
22638 \end_inset
22639
22640  program.
22641 \end_layout
22642
22643 \begin_layout Standard
22644 The build will normally take place in LyX's temporary directory, so the
22645  files produced by the conversion will be in that directory.
22646  LyX will copy out what it regards as the `main' file, but the 
22647 \family typewriter
22648 Noweb->Program
22649 \family default
22650  conversion may produce several files, and so most of these would then be
22651  deleted when LyX was closed.
22652  This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
22653  the build-script chunk can place the generated files in that location.
22654 \end_layout
22655
22656 \begin_layout Paragraph
22657 Build instructions in the document
22658 \end_layout
22659
22660 \begin_layout Standard
22661 The last piece of the integration between LyX and noweb is the 
22662 \begin_inset Quotes eld
22663 \end_inset
22664
22665 build-script
22666 \begin_inset Quotes erd
22667 \end_inset
22668
22669  chunk.
22670  Generally, the instructions for building your program should be embedded
22671  in a chunk of its own.
22672  The noweb-specific 
22673 \begin_inset Quotes eld
22674 \end_inset
22675
22676 build-script
22677 \begin_inset Quotes erd
22678 \end_inset
22679
22680  above uses the notangle command to look for this chunk (called 
22681 \begin_inset Quotes eld
22682 \end_inset
22683
22684 build-script
22685 \begin_inset Quotes erd
22686 \end_inset
22687
22688 ) and runs its contents through 
22689 \begin_inset Quotes eld
22690 \end_inset
22691
22692 sh
22693 \begin_inset Quotes erd
22694 \end_inset
22695
22696 .
22697 \end_layout
22698
22699 \begin_layout Standard
22700 Typically, such a chunk would look something like this:
22701 \end_layout
22702
22703 \begin_layout LyX-Code
22704 <<build-script>>=
22705 \end_layout
22706
22707 \begin_layout LyX-Code
22708 #!/bin/sh
22709 \begin_inset Newline newline
22710 \end_inset
22711
22712 if [ -z "${NOWEB_SOURCE}" ]
22713 \begin_inset Newline newline
22714 \end_inset
22715
22716 then
22717 \end_layout
22718
22719 \begin_layout LyX-Code
22720 NOWEB_SOURCE=myfile.nw
22721 \begin_inset Newline newline
22722 \end_inset
22723
22724 fi
22725 \begin_inset Newline newline
22726 \end_inset
22727
22728 [...
22729  code to extract files ...
22730  use NOWEB_OUTPUT_DIR here ...]
22731 \begin_inset Newline newline
22732 \end_inset
22733
22734 [...
22735  code to compile files ...]
22736 \begin_inset Newline newline
22737 \end_inset
22738
22739 @
22740 \end_layout
22741
22742 \begin_layout Standard
22743 Look in 
22744 \emph on
22745 LIBDIR/examples/listerrors.lyx
22746 \emph default
22747  or in 
22748 \emph on
22749 LIBDIR/examples/Literate.lyx
22750 \emph default
22751  which implement two versions of the 
22752 \begin_inset Quotes eld
22753 \end_inset
22754
22755 listerrors
22756 \begin_inset Quotes erd
22757 \end_inset
22758
22759  program for some illustrations of how all of these pieces go together or
22760  in 
22761 \emph on
22762 LIBDIR/examples/noweb2lyx.lyx.
22763
22764 \emph default
22765  Interestingly, these three files show off the language-indepence of the
22766  LyX literate programming support since they are written in Python, C and
22767  Perl respectively.
22768 \end_layout
22769
22770 \begin_layout Subsubsection
22771 Configuring LyX
22772 \end_layout
22773
22774 \begin_layout Standard
22775 All the Literate Programming support is configured by the 
22776 \family sans
22777 Tools\SpecialChar \menuseparator
22778 Preferences
22779 \family default
22780  panel in the 
22781 \begin_inset Quotes eld
22782 \end_inset
22783
22784 File Handling
22785 \begin_inset Quotes erd
22786 \end_inset
22787
22788  tab.
22789  The important parts are:
22790 \end_layout
22791
22792 \begin_layout Description
22793 the
22794 \begin_inset space ~
22795 \end_inset
22796
22797
22798 \begin_inset Quotes eld
22799 \end_inset
22800
22801 NoWeb
22802 \begin_inset Quotes erd
22803 \end_inset
22804
22805
22806 \begin_inset space ~
22807 \end_inset
22808
22809 format Set up via the File Formats tab, this is where the Noweb-specific
22810  pieces are set up.
22811  The 
22812 \family sans
22813 GUI Name
22814 \family default
22815  is set to 
22816 \family typewriter
22817 NoWeb
22818 \family default
22819 , the file extension is set to 
22820 \family typewriter
22821 .nw
22822 \family default
22823 .
22824  This tells LyX to create a file with a 
22825 \family typewriter
22826 .nw
22827 \family default
22828  extension in the first step of the conversion process.
22829 \end_layout
22830
22831 \begin_layout Description
22832 the
22833 \begin_inset space ~
22834 \end_inset
22835
22836
22837 \family sans
22838 Program
22839 \family default
22840
22841 \begin_inset space ~
22842 \end_inset
22843
22844 format This is an empty format whose sole purpose is to be the endpoint
22845  of a conversion (which then allows us to set up a converter for it).
22846 \end_layout
22847
22848 \begin_layout Description
22849
22850 \family sans
22851 NoWeb
22852 \family default
22853 ->
22854 \family sans
22855 LaTeX
22856 \family default
22857  This converter performs the 
22858 \begin_inset Quotes eld
22859 \end_inset
22860
22861 weaving
22862 \begin_inset Quotes erd
22863 \end_inset
22864
22865  of the literate document.
22866  For Noweb, it is set to 
22867 \begin_inset Quotes eld
22868 \end_inset
22869
22870
22871 \family typewriter
22872 noweave -delay -index $$i > $$o
22873 \family default
22874
22875 \begin_inset Quotes erd
22876 \end_inset
22877
22878
22879 \end_layout
22880
22881 \begin_layout Description
22882
22883 \family sans
22884 NoWeb
22885 \family default
22886 ->
22887 \family sans
22888 Program
22889 \family default
22890  This performs the 
22891 \begin_inset Quotes eld
22892 \end_inset
22893
22894 tangling step
22895 \begin_inset Quotes erd
22896 \end_inset
22897
22898 .
22899  As stated above, the Converter is set to 
22900 \begin_inset Quotes eld
22901 \end_inset
22902
22903
22904 \family typewriter
22905 build-script $$i
22906 \family default
22907  $$r
22908 \begin_inset Quotes erd
22909 \end_inset
22910
22911 , with Flags set to
22912 \begin_inset Newline newline
22913 \end_inset
22914
22915
22916 \begin_inset Quotes eld
22917 \end_inset
22918
22919
22920 \family typewriter
22921 parselog=$$s/scripts/listerrors
22922 \family default
22923
22924 \begin_inset Quotes erd
22925 \end_inset
22926
22927 .
22928 \end_layout
22929
22930 \begin_layout Subsubsection
22931 Debug extensions
22932 \end_layout
22933
22934 \begin_layout Standard
22935 There is also a new function implemented in the LyX server, the 
22936 \begin_inset Quotes eld
22937 \end_inset
22938
22939 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22940  
22941 \end_layout
22942
22943 \begin_layout Standard
22944 When debugging code with ddd/gdb, it is possible to invoke a text editor
22945  at the current execution position with a single key stroke.
22946  The default ddd configuration for that is shift-ctrl-V.
22947  It happens that you can define the editor command line invocation in ddd
22948  by accessing the 
22949 \family sans
22950 Edit\SpecialChar \menuseparator
22951 Preferences\SpecialChar \menuseparator
22952 Helpers
22953 \family default
22954  dialog and changing the "Edit Sources" entry.
22955 \end_layout
22956
22957 \begin_layout Standard
22958 I take advantage of the newly created LyX server function and this ddd feature,
22959  and set 
22960 \begin_inset Quotes eld
22961 \end_inset
22962
22963 Edit Sources
22964 \begin_inset Quotes erd
22965 \end_inset
22966
22967  to:
22968 \end_layout
22969
22970 \begin_layout Standard
22971 \begin_inset VSpace defskip
22972 \end_inset
22973
22974
22975 \end_layout
22976
22977 \begin_layout Standard
22978
22979 \family sans
22980 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22981 \end_layout
22982
22983 \begin_layout Standard
22984 \begin_inset VSpace defskip
22985 \end_inset
22986
22987
22988 \end_layout
22989
22990 \begin_layout Standard
22991 With this, whenever you are using ddd and find a point in the program that
22992  you want to edit, you just press shift-ctrl-V (in the ddd window), and
22993  ddd will forward this information to LyX through the LyX server and then
22994  the LyX window will show the same file with the cursor at the same position
22995  ddd was pointing to.
22996  No more guessing or long scrolling to locate a point in the program back
22997  from debugging !
22998 \end_layout
22999
23000 \begin_layout Standard
23001 Note however that you must enable the LyX server to get this feature working
23002  (it is disabled by default).
23003  You can enable it in 
23004 \family sans
23005 Preferences
23006 \family default
23007  (tabs 
23008 \family sans
23009 Inputs
23010 \family default
23011
23012 \family sans
23013 Paths
23014 \family default
23015 ) by entering in the 
23016 \family sans
23017 LyXserver pipe
23018 \family default
23019  a path like 
23020 \begin_inset Quotes eld
23021 \end_inset
23022
23023
23024 \family typewriter
23025 /home/<your-home-directory>/.lyx/lyxpipe
23026 \family default
23027
23028 \begin_inset Quotes erd
23029 \end_inset
23030
23031
23032 \end_layout
23033
23034 \begin_layout Standard
23035 Read the LyX server documentation in the 
23036 \emph on
23037 Customization Manual
23038 \emph default
23039  for further information.
23040 \end_layout
23041
23042 \begin_layout Subsubsection
23043 Toolbar extensions
23044 \end_layout
23045
23046 \begin_layout Standard
23047 There are six new buttons that can be added to your LyX toolbar.
23048  Five of these buttons are short cuts to layout styles: 
23049 \family sans
23050 Standard
23051 \family default
23052
23053 \family sans
23054 Section
23055 \family default
23056
23057 \family sans
23058 LaTeX
23059 \family default
23060
23061 \family sans
23062 LyX-Code
23063 \family default
23064 , and 
23065 \family sans
23066 Chunk
23067 \family default
23068 .
23069  The last one is a short cut to the 
23070 \begin_inset Quotes eld
23071 \end_inset
23072
23073 Build Program
23074 \begin_inset Quotes erd
23075 \end_inset
23076
23077  File menu entry.
23078  
23079 \end_layout
23080
23081 \begin_layout Standard
23082 LyX has a range of buttons that are available for tool bar customization.
23083  In my toolbar I like to combine the six short cuts above with two more:
23084  One for 
23085 \family sans
23086 Document
23087 \family default
23088 \SpecialChar \menuseparator
23089
23090 \family sans
23091 Update
23092 \family default
23093 \SpecialChar \menuseparator
23094
23095 \family sans
23096 DVI
23097 \family default
23098  and the other for 
23099 \family sans
23100 Document\SpecialChar \menuseparator
23101 View\SpecialChar \menuseparator
23102 DVI
23103 \family default
23104  File menu entries.
23105  Here is how it looks like:
23106 \end_layout
23107
23108 \begin_layout LyX-Code
23109 Toolbar
23110 \end_layout
23111
23112 \begin_layout LyX-Code
23113   Layouts
23114 \end_layout
23115
23116 \begin_layout LyX-Code
23117   Icon "layout Standard"
23118 \end_layout
23119
23120 \begin_layout LyX-Code
23121   Icon "layout Section"
23122 \end_layout
23123
23124 \begin_layout LyX-Code
23125   Icon "layout LaTeX"
23126 \end_layout
23127
23128 \begin_layout LyX-Code
23129   Icon "layout LyX-Code"
23130 \end_layout
23131
23132 \begin_layout LyX-Code
23133   Icon "layout Chunk"
23134 \end_layout
23135
23136 \begin_layout LyX-Code
23137   Separator
23138 \end_layout
23139
23140 \begin_layout LyX-Code
23141   Icon "buffer-view"
23142 \end_layout
23143
23144 \begin_layout LyX-Code
23145   Icon "buffer-typeset"
23146 \end_layout
23147
23148 \begin_layout LyX-Code
23149   Icon "build-program"
23150 \end_layout
23151
23152 \begin_layout LyX-Code
23153   Separator
23154 \end_layout
23155
23156 \begin_layout LyX-Code
23157 .
23158 \end_layout
23159
23160 \begin_layout LyX-Code
23161 .
23162 \end_layout
23163
23164 \begin_layout LyX-Code
23165 .
23166 \end_layout
23167
23168 \begin_layout LyX-Code
23169 End
23170 \end_layout
23171
23172 \begin_layout Subsubsection
23173 Colors customization
23174 \end_layout
23175
23176 \begin_layout Standard
23177 There are a number of colors in LyX that can be customized in 
23178 \family sans
23179 Preferences
23180 \family default
23181 .
23182  One of the things that bothers people is the LaTeX font color.
23183  The default color is red, since the chunks uses LaTeX font, and there is
23184  a lot of chunks in literate documents, you may get tired of seeing everything
23185  in red.
23186  You can change it by going to the tabs 
23187 \family sans
23188 Look&Feel
23189 \family default
23190
23191 \family sans
23192 Colors.
23193 \end_layout
23194
23195 \begin_layout Standard
23196 The next thing is the visible presence of the newline character in the screen.
23197  You can choose the color of this particular character and make it blend
23198  in the background.
23199  I recommend you choosing a color that is close to the background but not
23200  equal, that way you still can see it is there, but it is not bothering
23201  you anymore.
23202 \end_layout
23203
23204 \begin_layout Subsection
23205 LyX and knitr/Sweave
23206 \end_layout
23207
23208 \begin_layout Standard
23209 Support for 
23210 \family sans
23211 knitr
23212 \family default
23213  and 
23214 \family sans
23215 Sweave
23216 \family default
23217  is documented in the 
23218 \emph on
23219 knitr.lyx
23220 \emph default
23221  example file and in the Sweave manual (menu 
23222 \family sans
23223 Help\SpecialChar \menuseparator
23224 Specific Manuals
23225 \family default
23226 ).
23227 \end_layout
23228
23229 \begin_layout Chapter
23230 Special features
23231 \end_layout
23232
23233 \begin_layout Standard
23234 You can do everything with LyX that you can do with LaTeX.
23235  However, LyX cannot support every LaTeX feature directly.
23236  But you can always use TeX Code.
23237  This chapter shows you some more special things you might want to use.
23238  For other special things you can do with figures, tables, floats, boxes
23239  and notes, have a look at the 
23240 \emph on
23241 Embedded
23242 \begin_inset space ~
23243 \end_inset
23244
23245 Objects
23246 \emph default
23247  manual.
23248 \end_layout
23249
23250 \begin_layout Section
23251 Multiple Text Columns
23252 \end_layout
23253
23254 \begin_layout Standard
23255 This feature is independent of the option 
23256 \family sans
23257 Two-column document
23258 \family default
23259  in the document settings under 
23260 \family sans
23261 Text Layout
23262 \family default
23263 .
23264  If you want to have 2
23265 \begin_inset space ~
23266 \end_inset
23267
23268 columns for the whole document, it is recommended to use the 
23269 \family sans
23270 Two-column document
23271 \family default
23272  option.
23273  For all other cases use this feature.
23274 \end_layout
23275
23276 \begin_layout Standard
23277 To use multiple text columns in your document, you have to load the module
23278  
23279 \family sans
23280 Multiple Columns
23281 \family default
23282  (menu 
23283 \family sans
23284 Document\SpecialChar \menuseparator
23285 Settings\SpecialChar \menuseparator
23286 Modules
23287 \family default
23288 ) and must have the LaTeX-package 
23289 \series bold
23290 multicol
23291 \series default
23292  installed.
23293 \end_layout
23294
23295 \begin_layout Standard
23296 Footnotes within multiple columns will be placed at the bottom of the page
23297  and not under each column.
23298  Within the different columns you can use everything, with the limitation
23299  that for floats you need to use the float option 
23300 \family sans
23301 Span columns
23302 \family default
23303 .
23304 \end_layout
23305
23306 \begin_layout Subsection
23307 Basics
23308 \end_layout
23309
23310 \begin_layout Standard
23311 If you want to have 2
23312 \begin_inset space ~
23313 \end_inset
23314
23315 columns in your text, insert a multicolumn inset via the menu 
23316 \family sans
23317 Insert\SpecialChar \menuseparator
23318 Custom
23319 \begin_inset space ~
23320 \end_inset
23321
23322 Insets\SpecialChar \menuseparator
23323 Multiple
23324 \begin_inset space ~
23325 \end_inset
23326
23327 Columns
23328 \family default
23329  where the columns should start.
23330  Write all text that should be printed in 2
23331 \begin_inset space ~
23332 \end_inset
23333
23334 columns into this inset.
23335 \end_layout
23336
23337 \begin_layout Standard
23338 Here is an example:
23339 \end_layout
23340
23341 \begin_layout Standard
23342 \noindent
23343 \begin_inset Flex Multiple Columns
23344 status open
23345
23346 \begin_layout Plain Layout
23347 \noindent
23348
23349 \series bold
23350 \size small
23351 The Adventure of the Empty House
23352 \series default
23353
23354 \begin_inset Newline newline
23355 \end_inset
23356
23357 by Sir Arthur Conan Doyle
23358 \end_layout
23359
23360 \begin_layout Plain Layout
23361
23362 \size small
23363 It was in the spring of the year 1894 that all London was interested, and
23364  the fashionable world dismayed, by the murder of the Honourable Ronald
23365  Adair under most unusual and inexplicable circumstances.
23366  The public has already learned those particulars of the crime which came
23367  out in the police investigation, but a good deal was suppressed upon that
23368  occasion, since the case for the prosecution was so overwhelmingly strong
23369  that it was not necessary to bring forward all the facts.
23370  Only now, at the end of nearly ten years, am I allowed to supply those
23371  missing links which make up the whole of that remarkable chain.
23372  The crime was of interest in itself, but that interest was as nothing to
23373  me compared to the inconceivable sequel, which afforded me the greatest
23374  shock and surprise of any event in my adventurous life.
23375  Even now, after this long interval, I find myself thrilling as I think
23376  of it, and feeling once more that sudden flood of joy, amazement, and increduli
23377 ty which utterly submerged my mind.
23378  Let me say to that public, which has shown some interest in those glimpses
23379  which I have occasionally given them of the thoughts and actions of a very
23380  remarkable man, that they are not to blame me if I have not shared my knowledge
23381  with them, for I should have considered it my first duty to do so, had
23382  I not been barred by a positive prohibition from his own lips, which was
23383  only withdrawn upon the third of last month.
23384 \end_layout
23385
23386 \end_inset
23387
23388
23389 \end_layout
23390
23391 \begin_layout Standard
23392 To get 3 or more columns, set the cursor into the multicolumn inset and
23393  use the menu 
23394 \family sans
23395 Insert\SpecialChar \menuseparator
23396 Number
23397 \begin_inset space ~
23398 \end_inset
23399
23400 of
23401 \begin_inset space ~
23402 \end_inset
23403
23404 Columns
23405 \family default
23406 .
23407  The number of the desired columns is written into that inset (for 3
23408 \begin_inset space ~
23409 \end_inset
23410
23411 columns write 
23412 \begin_inset Quotes eld
23413 \end_inset
23414
23415 3
23416 \begin_inset Quotes erd
23417 \end_inset
23418
23419 ).
23420 \begin_inset Newline newline
23421 \end_inset
23422
23423 Here is an example with 3
23424 \begin_inset space ~
23425 \end_inset
23426
23427 columns:
23428 \end_layout
23429
23430 \begin_layout Standard
23431 \begin_inset Flex Multiple Columns
23432 status open
23433
23434 \begin_layout Plain Layout
23435
23436 \size footnotesize
23437 \begin_inset Argument 1
23438 status open
23439
23440 \begin_layout Plain Layout
23441 3
23442 \end_layout
23443
23444 \end_inset
23445
23446 It can be imagined that my close intimacy with Sherlock Holmes had interested
23447  me deeply in crime, and that after his disappearance I never failed to
23448  read with care the various problems which came before the public.
23449  And I even attempted, more than once, for my own private satisfaction,
23450  to employ his methods in their solution, though with indifferent success.
23451  There was none, however, which appealed to me like this tragedy of Ronald
23452  Adair.
23453  As I read the evidence at the inquest, which led up to a verdict of willful
23454  murder against some person or persons unknown, I realized more clearly
23455  than I had ever done the loss which the community had sustained by the
23456  death of Sherlock Holmes.
23457  There were points about this strange business which would, I was sure,
23458  have specially appealed to him, and the efforts of the police would have
23459  been supplemented, or more probably anticipated, by the trained observation
23460  and the alert mind of the first criminal agent in Europe.
23461  All day, as I drove upon my round, I turned over the case in my mind and
23462  found no explanation which appeared to me to be adequate.
23463  At the risk of telling a twice-told tale, I will recapitulate the facts
23464  as they were known to the public at the conclusion of the inquest.
23465 \end_layout
23466
23467 \end_inset
23468
23469
23470 \end_layout
23471
23472 \begin_layout Standard
23473 You can have up to 10
23474 \begin_inset space ~
23475 \end_inset
23476
23477 columns if you want to, but that might not be very pleasant for the readers
23478  of your document.
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 Subsection
23489 Columns inside Columns
23490 \end_layout
23491
23492 \begin_layout Standard
23493 You can also have columns inside columns:
23494 \end_layout
23495
23496 \begin_layout Standard
23497 \begin_inset Flex Multiple Columns
23498 status open
23499
23500 \begin_layout Plain Layout
23501
23502 \size footnotesize
23503 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
23504  at that time governor of one of the Australian colonies.
23505  Adair's mother had returned from Australia to undergo the operation for
23506  cataract, and she, her son Ronald, and her daughter Hilda were living together
23507  at 427 Park Lane.
23508 \end_layout
23509
23510 \begin_layout Plain Layout
23511 \begin_inset Flex Multiple Columns
23512 status open
23513
23514 \begin_layout Plain Layout
23515
23516 \size footnotesize
23517 The youth moved in the best society–had, so far as was known, no enemies
23518  and no particular vices.
23519  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
23520  had been broken off by mutual consent some months before, and there was
23521  no sign that it had left any very profound feeling behind it.
23522  For the rest {sic} the man's life moved in a narrow and conventional circle,
23523  for his habits were quiet and his nature unemotional.
23524  Yet it was upon this easy-going young aristocrat that death came, in most
23525  strange and unexpected form, between the hours of ten and eleven-twenty
23526  on the night of March 30, 1894.
23527 \end_layout
23528
23529 \end_inset
23530
23531
23532 \end_layout
23533
23534 \begin_layout Plain Layout
23535
23536 \size footnotesize
23537 Ronald Adair was fond of cards–playing continually, but never for such stakes
23538  as would hurt him.
23539  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
23540  It was shown that, after dinner on the day of his death, he had played
23541  a rubber of whist at the latter club.
23542  He had also played there in the afternoon.
23543
23544 \size default
23545  
23546 \size footnotesize
23547 The evidence of those who had played with him– Mr.
23548  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
23549  and that there was a fairly equal fall of the cards.
23550  Adair might have lost five pounds, but not more.
23551  His fortune was a considerable one, and such a loss could not in any way
23552  affect him.
23553  He had played nearly every day at one club or other, but he was a cautious
23554  player, and usually rose a winner.
23555  It came out in evidence that, in partnership with Colonel Moran, he had
23556  actually won as much as four hundred and twenty pounds in a sitting, some
23557  weeks before, from Godfrey Milner and Lord Balmoral.
23558  So much for his recent history as it came out at the inquest.
23559 \end_layout
23560
23561 \end_inset
23562
23563
23564 \end_layout
23565
23566 \begin_layout Subsection
23567 Advanced Examples
23568 \end_layout
23569
23570 \begin_layout Standard
23571 The examples in this section show some more special features of multiple
23572  columns.
23573 \end_layout
23574
23575 \begin_layout Standard
23576 For more features of multiple columns, have a look at the documentation
23577  of the LaTeX-package 
23578 \series bold
23579 multicol
23580 \series default
23581
23582 \begin_inset CommandInset citation
23583 LatexCommand cite
23584 key "multicol"
23585
23586 \end_inset
23587
23588 .
23589 \end_layout
23590
23591 \begin_layout Subsubsection
23592 Preface
23593 \end_layout
23594
23595 \begin_layout Standard
23596 To add a preface text for multiple columns, set the cursor into the multicolumn
23597  inset and use the menu 
23598 \family sans
23599 Insert\SpecialChar \menuseparator
23600 Preface
23601 \family default
23602 .
23603  Write your preface text into that inset.
23604 \begin_inset Newline newline
23605 \end_inset
23606
23607 This is an example with some preface text:
23608 \end_layout
23609
23610 \begin_layout Standard
23611 \begin_inset VSpace bigskip
23612 \end_inset
23613
23614
23615 \end_layout
23616
23617 \begin_layout Standard
23618 \begin_inset Flex Multiple Columns
23619 status open
23620
23621 \begin_layout Plain Layout
23622 \begin_inset Argument 2
23623 status open
23624
23625 \begin_layout Plain Layout
23626 And the story continues and continues and continues and continues\SpecialChar \ldots{}
23627
23628 \end_layout
23629
23630 \end_inset
23631
23632
23633 \size small
23634 On the evening of the crime, he returned from the club exactly at ten.
23635  His mother and sister were out spending the evening with a relation.
23636  The servant deposed that she heard him enter the front room on the second
23637  floor, generally used as his sitting-room.
23638  She had lit a fire there, and as it smoked she had opened the window.
23639  No sound was heard from the room until eleven-twenty, the hour of the return
23640  of Lady Maynooth and her daughter.
23641  Desiring to say good-night, she attempted to enter her son's room.
23642  The door was locked on the inside, and no answer could be got to their
23643  cries and knocking.
23644  Help was obtained, and the door forced.
23645  The unfortunate young man was found lying near the table.
23646  His head had been horribly mutilated by an expanding revolver bullet, but
23647  no weapon of any sort was to be found in the room.
23648 \end_layout
23649
23650 \end_inset
23651
23652
23653 \end_layout
23654
23655 \begin_layout Standard
23656 You can also use a section heading as the preface if you use a section command
23657  as TeX Code.
23658  For example the command
23659 \end_layout
23660
23661 \begin_layout Standard
23662
23663 \series bold
23664
23665 \backslash
23666 subsection{subsection title}
23667 \end_layout
23668
23669 \begin_layout Standard
23670 creates a subsection.
23671  In this example the preface is a subsubsection:
23672 \end_layout
23673
23674 \begin_layout Standard
23675 \begin_inset Flex Multiple Columns
23676 status open
23677
23678 \begin_layout Plain Layout
23679 \begin_inset Argument 2
23680 status open
23681
23682 \begin_layout Plain Layout
23683 \begin_inset ERT
23684 status collapsed
23685
23686 \begin_layout Plain Layout
23687
23688
23689 \backslash
23690 subsubsection{
23691 \end_layout
23692
23693 \end_inset
23694
23695 This is a subsubsection heading as a preface
23696 \begin_inset ERT
23697 status collapsed
23698
23699 \begin_layout Plain Layout
23700
23701 }
23702 \end_layout
23703
23704 \end_inset
23705
23706
23707 \end_layout
23708
23709 \end_inset
23710
23711
23712 \size small
23713 A minute examination of the circumstances served only to make the case more
23714  complex.
23715  In the first place, no reason could be given why the young man should have
23716  fastened the door upon the inside.
23717  There was the possibility that the murderer had done this, and had afterwards
23718  escaped by the window.
23719  The drop was at least twenty feet, however, and a bed of crocuses in full
23720  bloom lay beneath.
23721  Neither the flowers nor the earth showed any sign of having been disturbed,
23722  nor were there any marks upon the narrow strip of grass which separated
23723  the house from the road.
23724  Apparently, therefore, it was the young man himself who had fastened the
23725  door.
23726  But how did he come by his death? No one could have climbed up to the window
23727  without leaving traces.
23728  Suppose a man had fired through the window, he would indeed be a remarkable
23729  shot who could with a revolver inflict so deadly a wound.
23730  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
23731  a hundred yards of the house.
23732  No one had heard a shot.
23733 \end_layout
23734
23735 \end_inset
23736
23737
23738 \end_layout
23739
23740 \begin_layout Standard
23741 If there is less vertical space than 6
23742 \begin_inset space ~
23743 \end_inset
23744
23745 text lines is left on the page at the beginning of the multiple columns,
23746  a page break will be inserted before the multiple columns.
23747  Depending on the number of lines of the preface text, you might want to
23748  change this space.
23749  This is done by setting the cursor into the mulitcolumn inset behind the
23750  preface (if there is any) and using the menu 
23751 \family sans
23752 Insert\SpecialChar \menuseparator
23753 Space
23754 \begin_inset space ~
23755 \end_inset
23756
23757 Before
23758 \begin_inset space ~
23759 \end_inset
23760
23761 Page
23762 \begin_inset space ~
23763 \end_inset
23764
23765 Break
23766 \family default
23767 .
23768  Insert into that inset the amount of space like e.
23769 \begin_inset space \thinspace{}
23770 \end_inset
23771
23772 g.
23773 \begin_inset space \space{}
23774 \end_inset
23775
23776
23777 \begin_inset Quotes eld
23778 \end_inset
23779
23780 5cm
23781 \begin_inset Quotes erd
23782 \end_inset
23783
23784 .
23785 \begin_inset Newline newline
23786 \end_inset
23787
23788 In this example the space is set to 7
23789 \begin_inset space ~
23790 \end_inset
23791
23792 text lines by using 
23793 \begin_inset Quotes eld
23794 \end_inset
23795
23796 7
23797 \backslash
23798 baselineskip
23799 \begin_inset Quotes erd
23800 \end_inset
23801
23802  (where the command 
23803 \series bold
23804
23805 \backslash
23806 baselineskip
23807 \series default
23808  needs to be inserted as TeX code):
23809 \end_layout
23810
23811 \begin_layout Standard
23812 \begin_inset Flex Multiple Columns
23813 status open
23814
23815 \begin_layout Plain Layout
23816 \begin_inset Argument 3
23817 status open
23818
23819 \begin_layout Plain Layout
23820 7
23821 \begin_inset ERT
23822 status collapsed
23823
23824 \begin_layout Plain Layout
23825
23826
23827 \backslash
23828 baselineskip
23829 \end_layout
23830
23831 \end_inset
23832
23833
23834 \end_layout
23835
23836 \end_inset
23837
23838
23839 \size small
23840 On the evening of the crime, he returned from the club exactly at ten.
23841  His mother and sister were out spending the evening with a relation.
23842  The servant deposed that she heard him enter the front room on the second
23843  floor, generally used as his sitting-room.
23844  She had lit a fire there, and as it smoked she had opened the window.
23845  No sound was heard from the room until eleven-twenty, the hour of the return
23846  of Lady Maynooth and her daughter.
23847  Desiring to say good-night, she attempted to enter her son's room.
23848  The door was locked on the inside, and no answer could be got to their
23849  cries and knocking.
23850  Help was obtained, and the door forced.
23851  The unfortunate young man was found lying near the table.
23852  His head had been horribly mutilated by an expanding revolver bullet, but
23853  no weapon of any sort was to be found in the room.
23854 \end_layout
23855
23856 \end_inset
23857
23858
23859 \end_layout
23860
23861 \begin_layout Subsubsection
23862 Surrounding Space
23863 \end_layout
23864
23865 \begin_layout Standard
23866 The amount of space before and after multiple columns can be changed by
23867  changing the length 
23868 \series bold
23869
23870 \backslash
23871 multicolsep
23872 \series default
23873 .
23874  For example the command
23875 \end_layout
23876
23877 \begin_layout Standard
23878
23879 \series bold
23880
23881 \backslash
23882 setlength{
23883 \backslash
23884 multicolsep}{3cm}
23885 \end_layout
23886
23887 \begin_layout Standard
23888 in TeX Code changes its value to 3
23889 \begin_inset space \thinspace{}
23890 \end_inset
23891
23892 cm.
23893  The change must be made before the multiple columns' start.
23894  The predefined value is 13
23895 \begin_inset space \thinspace{}
23896 \end_inset
23897
23898 pt.
23899 \end_layout
23900
23901 \begin_layout Standard
23902 For this example 
23903 \series bold
23904
23905 \backslash
23906 multicolsep
23907 \series default
23908  was set to 2.5
23909 \begin_inset space \thinspace{}
23910 \end_inset
23911
23912 cm:
23913 \end_layout
23914
23915 \begin_layout Standard
23916 \begin_inset ERT
23917 status open
23918
23919 \begin_layout Plain Layout
23920
23921
23922 \backslash
23923 setlength{
23924 \backslash
23925 multicolsep}{2.5cm}
23926 \end_layout
23927
23928 \end_inset
23929
23930
23931 \end_layout
23932
23933 \begin_layout Standard
23934 \begin_inset Flex Multiple Columns
23935 status open
23936
23937 \begin_layout Plain Layout
23938
23939 \size small
23940 All day I turned these facts over in my mind, endeavouring to hit upon some
23941  theory which could reconcile them all, and to find that line of least resistanc
23942 e which my poor friend had declared to be the starting-point of every investigat
23943 ion.
23944  I confess that I made little progress.
23945  In the evening I strolled across the Park, and found myself about six o'clock
23946  at the Oxford Street end of Park Lane.
23947  A group of loafers upon the pavements, all staring up at a particular window,
23948  directed me to the house which I had come to see.
23949  A tall, thin man with coloured glasses, whom I strongly suspected of being
23950  a plain-clothes detective, was pointing out some theory of his own, while
23951  the others crowded round to listen to what he said.
23952  I got as near him as I could, but his observations seemed to me to be absurd,
23953  so I withdrew again in some disgust.
23954  As I did so I struck against an elderly, deformed man, who had been behind
23955  me, and I knocked down several books which he was carrying.
23956 \end_layout
23957
23958 \end_inset
23959
23960
23961 \end_layout
23962
23963 \begin_layout Standard
23964 \begin_inset Note Greyedout
23965 status open
23966
23967 \begin_layout Plain Layout
23968
23969 \series bold
23970 Note:
23971 \series default
23972  The values you set with 
23973 \series bold
23974
23975 \backslash
23976 setlength
23977 \series default
23978  will be used for all following multiple columns until you change them again.
23979 \end_layout
23980
23981 \end_inset
23982
23983
23984 \end_layout
23985
23986 \begin_layout Standard
23987 \begin_inset ERT
23988 status collapsed
23989
23990 \begin_layout Plain Layout
23991
23992
23993 \backslash
23994 setlength{
23995 \backslash
23996 multicolsep}{13pt}
23997 \end_layout
23998
23999 \end_inset
24000
24001
24002 \begin_inset Note Note
24003 status collapsed
24004
24005 \begin_layout Plain Layout
24006 go back to the default
24007 \end_layout
24008
24009 \end_inset
24010
24011
24012 \end_layout
24013
24014 \begin_layout Standard
24015 \begin_inset Newpage newpage
24016 \end_inset
24017
24018
24019 \end_layout
24020
24021 \begin_layout Subsubsection
24022 Column Breaks
24023 \end_layout
24024
24025 \begin_layout Standard
24026 A column break can be forced by inserting the command 
24027 \series bold
24028
24029 \backslash
24030 columnbreak{}
24031 \series default
24032  as TeX-Code to that position in the text where the column should be broken.
24033  Note that this leads in most cases to whitespace in the text.
24034 \begin_inset Newline newline
24035 \end_inset
24036
24037 Here is an example:
24038 \end_layout
24039
24040 \begin_layout Standard
24041 \begin_inset Flex Multiple Columns
24042 status open
24043
24044 \begin_layout Plain Layout
24045
24046 \size small
24047 \begin_inset Quotes eld
24048 \end_inset
24049
24050 You're surprised to see me, sir,
24051 \begin_inset Quotes erd
24052 \end_inset
24053
24054  said he, in a strange, croaking voice.
24055 \end_layout
24056
24057 \begin_layout Plain Layout
24058
24059 \size small
24060 I acknowledged that I was.
24061 \end_layout
24062
24063 \begin_layout Plain Layout
24064
24065 \size small
24066 \begin_inset Quotes eld
24067 \end_inset
24068
24069 Well, I've a conscience, sir, and when I chanced to see you go into this
24070  house, as I came hobbling after you, I thought to myself, I'll just step
24071  in and see that kind gentleman, and tell him that if I was a bit gruff
24072  in my manner there was not any harm meant, and that I am much obliged to
24073  him for picking up my books.
24074 \begin_inset Quotes erd
24075 \end_inset
24076
24077
24078 \end_layout
24079
24080 \begin_layout Plain Layout
24081
24082 \size small
24083 \begin_inset Quotes eld
24084 \end_inset
24085
24086 You make too much of a trifle,
24087 \begin_inset Quotes erd
24088 \end_inset
24089
24090  said I.
24091  
24092 \begin_inset Quotes eld
24093 \end_inset
24094
24095 May I ask how you knew who I was?
24096 \begin_inset Quotes erd
24097 \end_inset
24098
24099  AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED.
24100 \begin_inset ERT
24101 status collapsed
24102
24103 \begin_layout Plain Layout
24104
24105
24106 \backslash
24107 columnbreak{}
24108 \end_layout
24109
24110 \end_inset
24111
24112
24113 \end_layout
24114
24115 \begin_layout Plain Layout
24116
24117 \size small
24118 \begin_inset Quotes eld
24119 \end_inset
24120
24121 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24122  you'll find my little bookshop at the corner of Church Street, and very
24123  happy to see you, I am sure.
24124  Maybe you collect yourself, sir.
24125  Here's 
24126 \noun on
24127 British
24128 \begin_inset space ~
24129 \end_inset
24130
24131 Birds
24132 \noun default
24133 , and 
24134 \noun on
24135 Catullus
24136 \noun default
24137 , and 
24138 \noun on
24139 The Holy War
24140 \noun default
24141 --a bargain, every one of them.
24142  With five volumes you could just fill that gap on that second shelf.
24143  It looks untidy, does it not, sir?
24144 \begin_inset Quotes erd
24145 \end_inset
24146
24147
24148 \end_layout
24149
24150 \end_inset
24151
24152
24153 \end_layout
24154
24155 \begin_layout Subsubsection
24156 Column Separation
24157 \end_layout
24158
24159 \begin_layout Standard
24160 The width of the columns is automatically calculated, but you can modify
24161  the space between the columns.
24162  This is done by changing the length 
24163 \series bold
24164
24165 \backslash
24166 columnsep
24167 \series default
24168 .
24169  Its predefined value is 10
24170 \begin_inset space \thinspace{}
24171 \end_inset
24172
24173 pt.
24174  Here is an example where 
24175 \series bold
24176
24177 \backslash
24178 columnsep
24179 \series default
24180  is set to 3
24181 \begin_inset space \thinspace{}
24182 \end_inset
24183
24184 cm:
24185 \end_layout
24186
24187 \begin_layout Standard
24188 \begin_inset ERT
24189 status open
24190
24191 \begin_layout Plain Layout
24192
24193
24194 \backslash
24195 setlength{
24196 \backslash
24197 columnsep}{3cm}
24198 \end_layout
24199
24200 \end_inset
24201
24202
24203 \end_layout
24204
24205 \begin_layout Standard
24206 \begin_inset Flex Multiple Columns
24207 status open
24208
24209 \begin_layout Plain Layout
24210
24211 \size small
24212 My observations of No.
24213 \begin_inset space \space{}
24214 \end_inset
24215
24216 427 Park Lane did little to clear up the problem in which I was interested.
24217  The house was separated from the street by a low wall and railing, the
24218  whole not more than five feet high.
24219  It was perfectly easy, therefore, for anyone to get into the garden, but
24220  the window was entirely inaccessible, since there was no water pipe or
24221  anything which could help the most active man to climb it.
24222  More puzzled than ever, I retraced my steps to Kensington.
24223  I had not been in my study five minutes when the maid entered to say that
24224  a person desired to see me.
24225  To my astonishment it was none other than my strange old book collector,
24226  his sharp, wizened face peering out from a frame of white hair, and his
24227  precious volumes, a dozen of them at least, wedged under his right arm.
24228 \end_layout
24229
24230 \end_inset
24231
24232
24233 \end_layout
24234
24235 \begin_layout Standard
24236 \begin_inset ERT
24237 status collapsed
24238
24239 \begin_layout Plain Layout
24240
24241
24242 \backslash
24243 setlength{
24244 \backslash
24245 columnsep}{10pt}
24246 \end_layout
24247
24248 \end_inset
24249
24250
24251 \begin_inset Note Note
24252 status collapsed
24253
24254 \begin_layout Plain Layout
24255 go back to the default
24256 \end_layout
24257
24258 \end_inset
24259
24260
24261 \end_layout
24262
24263 \begin_layout Subsubsection
24264 Vertical Lines
24265 \end_layout
24266
24267 \begin_layout Standard
24268 Between the columns a rule with a width of the length 
24269 \series bold
24270
24271 \backslash
24272 columnseprule
24273 \series default
24274  is placed.
24275  If this rule width is set to 0
24276 \begin_inset space \thinspace{}
24277 \end_inset
24278
24279 pt (this is the default), the rule is suppressed.
24280  In the following example the rule is 2
24281 \begin_inset space \thinspace{}
24282 \end_inset
24283
24284 pt wide:
24285 \end_layout
24286
24287 \begin_layout Standard
24288 \begin_inset ERT
24289 status open
24290
24291 \begin_layout Plain Layout
24292
24293
24294 \backslash
24295 setlength{
24296 \backslash
24297 columnseprule}{2pt}
24298 \end_layout
24299
24300 \end_inset
24301
24302
24303 \end_layout
24304
24305 \begin_layout Standard
24306 \begin_inset Flex Multiple Columns
24307 status open
24308
24309 \begin_layout Plain Layout
24310
24311 \size small
24312 \begin_inset Quotes eld
24313 \end_inset
24314
24315 You're surprised to see me, sir,
24316 \begin_inset Quotes erd
24317 \end_inset
24318
24319  said he, in a strange, croaking voice.
24320 \end_layout
24321
24322 \begin_layout Plain Layout
24323
24324 \size small
24325 I acknowledged that I was.
24326 \end_layout
24327
24328 \begin_layout Plain Layout
24329
24330 \size small
24331 \begin_inset Quotes eld
24332 \end_inset
24333
24334 Well, I've a conscience, sir, and when I chanced to see you go into this
24335  house, as I came hobbling after you, I thought to myself, I'll just step
24336  in and see that kind gentleman, and tell him that if I was a bit gruff
24337  in my manner there was not any harm meant, and that I am much obliged to
24338  him for picking up my books.
24339 \begin_inset Quotes erd
24340 \end_inset
24341
24342
24343 \end_layout
24344
24345 \begin_layout Plain Layout
24346
24347 \size small
24348 \begin_inset Quotes eld
24349 \end_inset
24350
24351 You make too much of a trifle,
24352 \begin_inset Quotes erd
24353 \end_inset
24354
24355  said I.
24356  
24357 \begin_inset Quotes eld
24358 \end_inset
24359
24360 May I ask how you knew who I was?
24361 \begin_inset Quotes erd
24362 \end_inset
24363
24364
24365 \end_layout
24366
24367 \begin_layout Plain Layout
24368
24369 \size small
24370 \begin_inset Quotes eld
24371 \end_inset
24372
24373 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24374  you'll find my little bookshop at the corner of Church Street, and very
24375  happy to see you, I am sure.
24376  Maybe you collect yourself, sir.
24377  Here's 
24378 \noun on
24379 British
24380 \begin_inset space ~
24381 \end_inset
24382
24383 Birds
24384 \noun default
24385 , and 
24386 \noun on
24387 Catullus
24388 \noun default
24389 , and 
24390 \noun on
24391 The Holy War
24392 \noun default
24393 --a bargain, every one of them.
24394  With five volumes you could just fill that gap on that second shelf.
24395  It looks untidy, does it not, sir?
24396 \begin_inset Quotes erd
24397 \end_inset
24398
24399
24400 \end_layout
24401
24402 \end_inset
24403
24404
24405 \end_layout
24406
24407 \begin_layout Standard
24408 \begin_inset VSpace defskip
24409 \end_inset
24410
24411
24412 \end_layout
24413
24414 \begin_layout Standard
24415 The rule can be colored by redefining the command 
24416 \series bold
24417
24418 \backslash
24419 columnseprulecolor
24420 \series default
24421 .
24422  This is done by inserting the command
24423 \begin_inset Newline newline
24424 \end_inset
24425
24426
24427 \series bold
24428
24429 \backslash
24430 renewcommand{
24431 \backslash
24432 columnseprulecolor}{
24433 \backslash
24434 color{red}}
24435 \series default
24436
24437 \begin_inset Newline newline
24438 \end_inset
24439
24440 as TeX-Code before the multicolumn inset.
24441  Replace 
24442 \series bold
24443 red
24444 \series default
24445  in this command by a color of your choice.
24446  You can use all pre- and self-defined colors.
24447  See the 
24448 \emph on
24449 EmbeddedObjects
24450 \emph default
24451  manual, section 
24452 \emph on
24453 Colored
24454 \begin_inset space ~
24455 \end_inset
24456
24457 Tables
24458 \emph default
24459  for more information about pre- and self-defined colors.
24460  To go back to the default color insert the command
24461 \begin_inset Newline newline
24462 \end_inset
24463
24464
24465 \series bold
24466
24467 \backslash
24468 renewcommand{
24469 \backslash
24470 columnseprulecolor}{
24471 \backslash
24472 normalcolor}
24473 \series default
24474
24475 \begin_inset Newline newline
24476 \end_inset
24477
24478 Here is the example with a cyan rule and 1
24479 \begin_inset space \thinspace{}
24480 \end_inset
24481
24482 cm column separation:
24483 \end_layout
24484
24485 \begin_layout Standard
24486 \begin_inset ERT
24487 status open
24488
24489 \begin_layout Plain Layout
24490
24491
24492 \backslash
24493 setlength{
24494 \backslash
24495 columnsep}{1cm}
24496 \end_layout
24497
24498 \begin_layout Plain Layout
24499
24500
24501 \backslash
24502 renewcommand{
24503 \backslash
24504 columnseprulecolor}{
24505 \backslash
24506 color{cyan}}
24507 \end_layout
24508
24509 \end_inset
24510
24511
24512 \end_layout
24513
24514 \begin_layout Standard
24515 \begin_inset Flex Multiple Columns
24516 status open
24517
24518 \begin_layout Plain Layout
24519
24520 \size small
24521 \begin_inset Quotes eld
24522 \end_inset
24523
24524 You're surprised to see me, sir,
24525 \begin_inset Quotes erd
24526 \end_inset
24527
24528  said he, in a strange, croaking voice.
24529 \end_layout
24530
24531 \begin_layout Plain Layout
24532
24533 \size small
24534 I acknowledged that I was.
24535 \end_layout
24536
24537 \begin_layout Plain Layout
24538
24539 \size small
24540 \begin_inset Quotes eld
24541 \end_inset
24542
24543 Well, I've a conscience, sir, and when I chanced to see you go into this
24544  house, as I came hobbling after you, I thought to myself, I'll just step
24545  in and see that kind gentleman, and tell him that if I was a bit gruff
24546  in my manner there was not any harm meant, and that I am much obliged to
24547  him for picking up my books.
24548 \begin_inset Quotes erd
24549 \end_inset
24550
24551
24552 \end_layout
24553
24554 \begin_layout Plain Layout
24555
24556 \size small
24557 \begin_inset Quotes eld
24558 \end_inset
24559
24560 You make too much of a trifle,
24561 \begin_inset Quotes erd
24562 \end_inset
24563
24564  said I.
24565  
24566 \begin_inset Quotes eld
24567 \end_inset
24568
24569 May I ask how you knew who I was?
24570 \begin_inset Quotes erd
24571 \end_inset
24572
24573
24574 \end_layout
24575
24576 \begin_layout Plain Layout
24577
24578 \size small
24579 \begin_inset Quotes eld
24580 \end_inset
24581
24582 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24583  you'll find my little bookshop at the corner of Church Street, and very
24584  happy to see you, I am sure.
24585  Maybe you collect yourself, sir.
24586  Here's 
24587 \noun on
24588 British
24589 \begin_inset space ~
24590 \end_inset
24591
24592 Birds
24593 \noun default
24594 , and 
24595 \noun on
24596 Catullus
24597 \noun default
24598 , and 
24599 \noun on
24600 The Holy War
24601 \noun default
24602 --a bargain, every one of them.
24603  With five volumes you could just fill that gap on that second shelf.
24604  It looks untidy, does it not, sir?
24605 \begin_inset Quotes erd
24606 \end_inset
24607
24608
24609 \end_layout
24610
24611 \end_inset
24612
24613
24614 \end_layout
24615
24616 \begin_layout Standard
24617 \begin_inset ERT
24618 status collapsed
24619
24620 \begin_layout Plain Layout
24621
24622
24623 \backslash
24624 setlength{
24625 \backslash
24626 columnseprule}{0pt}
24627 \end_layout
24628
24629 \begin_layout Plain Layout
24630
24631
24632 \backslash
24633 renewcommand{
24634 \backslash
24635 columnseprulecolor}{
24636 \backslash
24637 normalcolor}
24638 \end_layout
24639
24640 \end_inset
24641
24642
24643 \begin_inset Note Note
24644 status collapsed
24645
24646 \begin_layout Plain Layout
24647 go back to the default
24648 \end_layout
24649
24650 \end_inset
24651
24652
24653 \end_layout
24654
24655 \begin_layout Section
24656 Non-standard Paragraph Shapes
24657 \end_layout
24658
24659 \begin_layout Standard
24660 \noindent
24661 LaTeX as well as any other text processor uses by default rectangular paragraphs.
24662  For special cases like for example posters, invitation cards or poems you
24663  can modify the paragraph shape to one of your choice.
24664  This can be done by using the LaTeX-package 
24665 \series bold
24666 shapepar
24667 \series default
24668  which is loaded by using in the document settings the module 
24669 \family sans
24670 Custom paragraph shapes
24671 \family default
24672 .
24673 \end_layout
24674
24675 \begin_layout Subsection
24676 Predefined shapes
24677 \end_layout
24678
24679 \begin_layout Standard
24680
24681 \series bold
24682 shapepar
24683 \series default
24684  provides the following shapes:
24685 \end_layout
24686
24687 \begin_layout Standard
24688 \begin_inset Tabular
24689 <lyxtabular version="3" rows="13" columns="3">
24690 <features rotate="0" booktabs="true" islongtable="true" longtabularalignment="center">
24691 <column alignment="center" valignment="middle" width="16col%">
24692 <column alignment="center" valignment="middle" width="40col%">
24693 <column alignment="center" valignment="middle" width="35col%">
24694 <row endhead="true">
24695 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24696 \begin_inset Text
24697
24698 \begin_layout Plain Layout
24699 Name
24700 \end_layout
24701
24702 \end_inset
24703 </cell>
24704 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24705 \begin_inset Text
24706
24707 \begin_layout Plain Layout
24708 Description
24709 \end_layout
24710
24711 \end_inset
24712 </cell>
24713 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
24714 \begin_inset Text
24715
24716 \begin_layout Plain Layout
24717 Annotation
24718 \end_layout
24719
24720 \end_inset
24721 </cell>
24722 </row>
24723 <row>
24724 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24725 \begin_inset Text
24726
24727 \begin_layout Plain Layout
24728 CDlabel
24729 \end_layout
24730
24731 \end_inset
24732 </cell>
24733 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24734 \begin_inset Text
24735
24736 \begin_layout Plain Layout
24737 Circle with circular hole (in the size of a CD/DVD)
24738 \end_layout
24739
24740 \end_inset
24741 </cell>
24742 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24743 \begin_inset Text
24744
24745 \begin_layout Plain Layout
24746 Cannot be scaled, take care there is not too much text
24747 \end_layout
24748
24749 \end_inset
24750 </cell>
24751 </row>
24752 <row>
24753 <cell alignment="center" valignment="top" topline="true" usebox="none">
24754 \begin_inset Text
24755
24756 \begin_layout Plain Layout
24757 Circle
24758 \end_layout
24759
24760 \end_inset
24761 </cell>
24762 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24763 \begin_inset Text
24764
24765 \begin_layout Plain Layout
24766 Circle
24767 \end_layout
24768
24769 \end_inset
24770 </cell>
24771 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24772 \begin_inset Text
24773
24774 \begin_layout Plain Layout
24775 Fragile, calculation might fail
24776 \end_layout
24777
24778 \end_inset
24779 </cell>
24780 </row>
24781 <row>
24782 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24783 \begin_inset Text
24784
24785 \begin_layout Plain Layout
24786 Diamond
24787 \end_layout
24788
24789 \end_inset
24790 </cell>
24791 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24792 \begin_inset Text
24793
24794 \begin_layout Plain Layout
24795 Rhomboid (symbolizing a 
24796 \begin_inset Quotes eld
24797 \end_inset
24798
24799 diamond
24800 \begin_inset Quotes erd
24801 \end_inset
24802
24803 )
24804 \end_layout
24805
24806 \end_inset
24807 </cell>
24808 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24809 \begin_inset Text
24810
24811 \begin_layout Plain Layout
24812 -
24813 \end_layout
24814
24815 \end_inset
24816 </cell>
24817 </row>
24818 <row>
24819 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24820 \begin_inset Text
24821
24822 \begin_layout Plain Layout
24823 Heart
24824 \end_layout
24825
24826 \end_inset
24827 </cell>
24828 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24829 \begin_inset Text
24830
24831 \begin_layout Plain Layout
24832 Heart-like shape
24833 \end_layout
24834
24835 \end_inset
24836 </cell>
24837 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24838 \begin_inset Text
24839
24840 \begin_layout Plain Layout
24841 -
24842 \end_layout
24843
24844 \end_inset
24845 </cell>
24846 </row>
24847 <row>
24848 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24849 \begin_inset Text
24850
24851 \begin_layout Plain Layout
24852 Hexagon
24853 \end_layout
24854
24855 \end_inset
24856 </cell>
24857 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24858 \begin_inset Text
24859
24860 \begin_layout Plain Layout
24861 Hexagon
24862 \end_layout
24863
24864 \end_inset
24865 </cell>
24866 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24867 \begin_inset Text
24868
24869 \begin_layout Plain Layout
24870 -
24871 \end_layout
24872
24873 \end_inset
24874 </cell>
24875 </row>
24876 <row>
24877 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24878 \begin_inset Text
24879
24880 \begin_layout Plain Layout
24881 Nut
24882 \end_layout
24883
24884 \end_inset
24885 </cell>
24886 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24887 \begin_inset Text
24888
24889 \begin_layout Plain Layout
24890 Nut for bolt (hexagon with circular hole)
24891 \end_layout
24892
24893 \end_inset
24894 </cell>
24895 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24896 \begin_inset Text
24897
24898 \begin_layout Plain Layout
24899 -
24900 \end_layout
24901
24902 \end_inset
24903 </cell>
24904 </row>
24905 <row>
24906 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24907 \begin_inset Text
24908
24909 \begin_layout Plain Layout
24910 Square
24911 \end_layout
24912
24913 \end_inset
24914 </cell>
24915 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24916 \begin_inset Text
24917
24918 \begin_layout Plain Layout
24919 Square
24920 \end_layout
24921
24922 \end_inset
24923 </cell>
24924 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24925 \begin_inset Text
24926
24927 \begin_layout Plain Layout
24928 -
24929 \end_layout
24930
24931 \end_inset
24932 </cell>
24933 </row>
24934 <row>
24935 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24936 \begin_inset Text
24937
24938 \begin_layout Plain Layout
24939 Star
24940 \end_layout
24941
24942 \end_inset
24943 </cell>
24944 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24945 \begin_inset Text
24946
24947 \begin_layout Plain Layout
24948 Five-point star
24949 \end_layout
24950
24951 \end_inset
24952 </cell>
24953 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
24954 \begin_inset Text
24955
24956 \begin_layout Plain Layout
24957 -
24958 \end_layout
24959
24960 \end_inset
24961 </cell>
24962 </row>
24963 <row>
24964 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24965 \begin_inset Text
24966
24967 \begin_layout Plain Layout
24968 Candle
24969 \end_layout
24970
24971 \end_inset
24972 </cell>
24973 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24974 \begin_inset Text
24975
24976 \begin_layout Plain Layout
24977 Burning candle
24978 \end_layout
24979
24980 \end_inset
24981 </cell>
24982 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24983 \begin_inset Text
24984
24985 \begin_layout Plain Layout
24986 -
24987 \end_layout
24988
24989 \end_inset
24990 </cell>
24991 </row>
24992 <row>
24993 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24994 \begin_inset Text
24995
24996 \begin_layout Plain Layout
24997 Drop down/up
24998 \end_layout
24999
25000 \end_inset
25001 </cell>
25002 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25003 \begin_inset Text
25004
25005 \begin_layout Plain Layout
25006 Normal/reversed rain drop
25007 \end_layout
25008
25009 \end_inset
25010 </cell>
25011 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25012 \begin_inset Text
25013
25014 \begin_layout Plain Layout
25015 Fragile, calculation might fail
25016 \end_layout
25017
25018 \end_inset
25019 </cell>
25020 </row>
25021 <row>
25022 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25023 \begin_inset Text
25024
25025 \begin_layout Plain Layout
25026 TeX
25027 \end_layout
25028
25029 \end_inset
25030 </cell>
25031 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25032 \begin_inset Text
25033
25034 \begin_layout Plain Layout
25035 The TeX logo
25036 \end_layout
25037
25038 \end_inset
25039 </cell>
25040 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25041 \begin_inset Text
25042
25043 \begin_layout Plain Layout
25044 -
25045 \end_layout
25046
25047 \end_inset
25048 </cell>
25049 </row>
25050 <row>
25051 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25052 \begin_inset Text
25053
25054 \begin_layout Plain Layout
25055 Triangle up/down/
25056 \begin_inset Newline newline
25057 \end_inset
25058
25059 left/right
25060 \end_layout
25061
25062 \end_inset
25063 </cell>
25064 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25065 \begin_inset Text
25066
25067 \begin_layout Plain Layout
25068 Triangles in different orientations
25069 \end_layout
25070
25071 \end_inset
25072 </cell>
25073 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
25074 \begin_inset Text
25075
25076 \begin_layout Plain Layout
25077 -
25078 \end_layout
25079
25080 \end_inset
25081 </cell>
25082 </row>
25083 </lyxtabular>
25084
25085 \end_inset
25086
25087
25088 \end_layout
25089
25090 \begin_layout Standard
25091 To use a shape for your paragraph, simply select it in LyX's pull-down box
25092  for environments in the toolbar.
25093 \end_layout
25094
25095 \begin_layout Standard
25096 \begin_inset Newpage newpage
25097 \end_inset
25098
25099
25100 \end_layout
25101
25102 \begin_layout Standard
25103 Here is an example paragraph in the shape of a nut:
25104 \end_layout
25105
25106 \begin_layout Standard
25107 \begin_inset VSpace bigskip
25108 \end_inset
25109
25110
25111 \end_layout
25112
25113 \begin_layout Nut
25114
25115 \lang latin
25116 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25117  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25118  voluptua.
25119  At vero eos et accusam et justo duo dolores et ea rebum.
25120  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25121  sit amet.
25122  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25123  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25124  voluptua.
25125 \end_layout
25126
25127 \begin_layout Standard
25128 \begin_inset VSpace bigskip
25129 \end_inset
25130
25131
25132 \end_layout
25133
25134 \begin_layout Standard
25135 \begin_inset Note Greyedout
25136 status open
25137
25138 \begin_layout Plain Layout
25139
25140 \series bold
25141 Note
25142 \series default
25143 : shapepar paragraphs cannot run over a page break.
25144 \end_layout
25145
25146 \end_inset
25147
25148
25149 \end_layout
25150
25151 \begin_layout Standard
25152 \begin_inset VSpace bigskip
25153 \end_inset
25154
25155
25156 \end_layout
25157
25158 \begin_layout Standard
25159
25160 \series bold
25161 shapepar
25162 \series default
25163  takes care that the shape will always be preserved, no matter how much
25164  text is in the paragraph.
25165  Therefore the paragraph size changes with the amount of contained text.
25166  This can lead to paragraph sizes exceeding the page margins.
25167  To demonstrate the size scaling, here is the same example paragraph but
25168  with twice as much text:
25169 \end_layout
25170
25171 \begin_layout Standard
25172 \begin_inset Newpage newpage
25173 \end_inset
25174
25175
25176 \end_layout
25177
25178 \begin_layout Nut
25179
25180 \lang latin
25181 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25182  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25183  voluptua.
25184  At vero eos et accusam et justo duo dolores et ea rebum.
25185  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25186  sit amet.
25187  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25188  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25189  voluptua.
25190  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25191  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25192  voluptua.
25193  At vero eos et accusam et justo duo dolores et ea rebum.
25194  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25195  sit amet.
25196  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25197  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25198  voluptua.
25199 \end_layout
25200
25201 \begin_layout Standard
25202 \begin_inset VSpace bigskip
25203 \end_inset
25204
25205
25206 \end_layout
25207
25208 \begin_layout Standard
25209 An exception is the shape 
25210 \family sans
25211 CDlabel
25212 \family default
25213 .
25214  It cannot be scaled because it must fit the size of a CD/DVD.
25215  Therefore the amount of text that fits into the shape is limited.
25216 \begin_inset Newline newline
25217 \end_inset
25218
25219 The 
25220 \family sans
25221 drop
25222 \family default
25223  shapes and the 
25224 \family sans
25225 circle
25226 \family default
25227  shape are fragile, meaning that the calculation of their size can fail,
25228  depending on the amount of text.
25229  You will then get the LaTeX error 
25230 \begin_inset Quotes eld
25231 \end_inset
25232
25233 Arithmetic overflow
25234 \begin_inset Quotes erd
25235 \end_inset
25236
25237 .
25238  In this case one can try to remove or add some text; if nothing works one
25239  has to use another shape.
25240 \end_layout
25241
25242 \begin_layout Standard
25243 \begin_inset VSpace bigskip
25244 \end_inset
25245
25246
25247 \end_layout
25248
25249 \begin_layout Standard
25250 For shapes with tips you will maybe see that LaTeX's hyphenation routine
25251  fails for text in the tips.
25252  Therefore it is often necessary to add hyphenation points 
25253 \family sans
25254 (
25255 \begin_inset Info
25256 type  "shortcut"
25257 arg   "specialchar-insert hyphenation"
25258 \end_inset
25259
25260
25261 \family default
25262 ) to the corresponding text parts.
25263 \end_layout
25264
25265 \begin_layout Standard
25266 \begin_inset VSpace bigskip
25267 \end_inset
25268
25269
25270 \end_layout
25271
25272 \begin_layout Standard
25273 Shapepar paragraphs are either always centered or placed on the page so
25274  that their left border touches the left page margin.
25275  You can therefore not use the paragraph dialog to align such paragraphs.
25276  A solution is to put the paragraph into a minipage or parbox and align
25277  the box.
25278  The problem is hereby to find the right width for the box.
25279  Because if it is too wide and you center the box, the paragraph is not
25280  centered too because it sticks at the left side of the box.
25281  So you might have to play a bit with the width until it fits.
25282  Here are two heart-shaped paragraphs, the first one is not aligned, the
25283  second one is right-aligned:
25284 \end_layout
25285
25286 \begin_layout Standard
25287 \begin_inset Newpage newpage
25288 \end_inset
25289
25290
25291 \end_layout
25292
25293 \begin_layout Heart
25294 \noindent
25295
25296 \lang latin
25297 Lo\SpecialChar \-
25298 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25299  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25300  voluptua.
25301  At vero eos et accusam et justo duo dolores et ea rebum.
25302  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25303  sit amet.
25304 \end_layout
25305
25306 \begin_layout Standard
25307 \begin_inset VSpace bigskip
25308 \end_inset
25309
25310
25311 \end_layout
25312
25313 \begin_layout Standard
25314 \noindent
25315 \align right
25316 \begin_inset Box Frameless
25317 position "t"
25318 hor_pos "c"
25319 has_inner_box 1
25320 inner_pos "t"
25321 use_parbox 1
25322 use_makebox 0
25323 width "42col%"
25324 special "none"
25325 height "1in"
25326 height_special "totalheight"
25327 status open
25328
25329 \begin_layout Heart
25330 \noindent
25331
25332 \lang latin
25333 Lo\SpecialChar \-
25334 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25335  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25336  voluptua.
25337  At vero eos et accusam et justo duo dolores et ea rebum.
25338  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25339  sit amet.
25340 \end_layout
25341
25342 \end_inset
25343
25344
25345 \end_layout
25346
25347 \begin_layout Subsection
25348 Custom shapes
25349 \end_layout
25350
25351 \begin_layout Standard
25352 You can define any shape you want.
25353  Doing this manually is a lot of work because every coordinate must be specified.
25354  But there is a way to let the computer calculate the coordinates:
25355 \end_layout
25356
25357 \begin_layout Enumerate
25358 Install the program 
25359 \begin_inset CommandInset href
25360 LatexCommand href
25361 name "Jpgfdraw"
25362 target "http://www.ctan.org/tex-archive/graphics/jpgfdraw"
25363
25364 \end_inset
25365
25366 .
25367 \end_layout
25368
25369 \begin_layout Enumerate
25370 In 
25371 \family sans
25372 Jpgfdraw
25373 \family default
25374  go to the menu 
25375 \family sans
25376 Te
25377 \begin_inset ERT
25378 status collapsed
25379
25380 \begin_layout Plain Layout
25381
25382 {}
25383 \end_layout
25384
25385 \end_inset
25386
25387 X/LaT
25388 \begin_inset ERT
25389 status collapsed
25390
25391 \begin_layout Plain Layout
25392
25393 {}
25394 \end_layout
25395
25396 \end_inset
25397
25398 eX\SpecialChar \menuseparator
25399 Settings\SpecialChar \menuseparator
25400 Set Normal Size
25401 \family default
25402  and select the font size you are using in your document.
25403  For example this document uses the size 12
25404 \begin_inset space \thinspace{}
25405 \end_inset
25406
25407 pt.
25408 \end_layout
25409
25410 \begin_layout Enumerate
25411 Draw a shape.
25412 \end_layout
25413
25414 \begin_layout Enumerate
25415 Use the menu 
25416 \family sans
25417 Te
25418 \begin_inset ERT
25419 status collapsed
25420
25421 \begin_layout Plain Layout
25422
25423 {}
25424 \end_layout
25425
25426 \end_inset
25427
25428 X/LaT
25429 \begin_inset ERT
25430 status collapsed
25431
25432 \begin_layout Plain Layout
25433
25434 {}
25435 \end_layout
25436
25437 \end_inset
25438
25439 eX\SpecialChar \menuseparator
25440 Shapepar
25441 \family default
25442  to export the shape to coordinates.
25443  In the appearing dialog use either the outline of your shape for the coordinate
25444 s or the path itself.
25445 \begin_inset Foot
25446 status collapsed
25447
25448 \begin_layout Plain Layout
25449 For more information see 
25450 \begin_inset CommandInset href
25451 LatexCommand href
25452 target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html"
25453
25454 \end_inset
25455
25456
25457 \end_layout
25458
25459 \end_inset
25460
25461
25462 \end_layout
25463
25464 \begin_layout Standard
25465 The coordinates are written into a TeX-file.
25466  To use it for your LyX document
25467 \end_layout
25468
25469 \begin_layout Enumerate
25470 Place the cursor before the first character of your paragraph (or into a
25471  new empty one).
25472 \end_layout
25473
25474 \begin_layout Enumerate
25475 Open in LyX the menu 
25476 \family sans
25477 Insert\SpecialChar \menuseparator
25478 File\SpecialChar \menuseparator
25479 Child
25480 \begin_inset space ~
25481 \end_inset
25482
25483 Document
25484 \family default
25485 , select the file and use 
25486 \family sans
25487 Input
25488 \family default
25489  as 
25490 \family sans
25491 Include Type.
25492 \end_layout
25493
25494 \begin_layout Standard
25495 \begin_inset VSpace defskip
25496 \end_inset
25497
25498
25499 \end_layout
25500
25501 \begin_layout Standard
25502 \begin_inset Note Greyedout
25503 status open
25504
25505 \begin_layout Plain Layout
25506
25507 \series bold
25508 Note
25509 \series default
25510 : The changed shape only applies to the current paragraph; everything is
25511  reset to normal for the next paragraph.
25512  Therefore the shape definition file must be input into every paragraph
25513  with the desired shape.
25514 \end_layout
25515
25516 \end_inset
25517
25518
25519 \end_layout
25520
25521 \begin_layout Standard
25522 \begin_inset VSpace bigskip
25523 \end_inset
25524
25525
25526 \end_layout
25527
25528 \begin_layout Standard
25529 Here is an example:
25530 \end_layout
25531
25532 \begin_layout Standard
25533 \begin_inset VSpace bigskip
25534 \end_inset
25535
25536
25537 \end_layout
25538
25539 \begin_layout Standard
25540 \begin_inset CommandInset include
25541 LatexCommand input
25542 filename "SpecialParagraphShape.tex"
25543
25544 \end_inset
25545
25546
25547 \lang latin
25548 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25549  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25550  voluptua.
25551  At vero eos et accusam et justo duo dolores et ea rebum.
25552  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25553  sit amet.
25554  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25555  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25556  voluptua.
25557 \end_layout
25558
25559 \begin_layout Standard
25560 \begin_inset VSpace bigskip
25561 \end_inset
25562
25563
25564 \end_layout
25565
25566 \begin_layout Standard
25567
25568 \series bold
25569 A tip:
25570 \series default
25571  to draw complexer shapes in 
25572 \family sans
25573 Jpgfdraw
25574 \family default
25575  you can draw the shape in a program of your choice and import the resulting
25576  image to 
25577 \family sans
25578 Jpgfdraw
25579 \family default
25580 .
25581  Then you only need to draw a line or spline along the outline of the image.
25582 \end_layout
25583
25584 \begin_layout Standard
25585 \begin_inset VSpace bigskip
25586 \end_inset
25587
25588
25589 \end_layout
25590
25591 \begin_layout Standard
25592 The module 
25593 \family sans
25594 Custom paragraph shapes
25595 \family default
25596  also provides the two commands 
25597 \family sans
25598 shapepar
25599 \family default
25600  and 
25601 \family sans
25602 Shapepar
25603 \family default
25604  which can be used to define custom shapes coordinate by coordinate.
25605 \begin_inset Foot
25606 status collapsed
25607
25608 \begin_layout Plain Layout
25609 These commands are internally used for all shapes described here.
25610 \end_layout
25611
25612 \end_inset
25613
25614  For information how these styles are used and about further customization
25615  possibilities, have a look at the documentation of the package 
25616 \series bold
25617 shapepar
25618 \series default
25619
25620 \begin_inset CommandInset citation
25621 LatexCommand cite
25622 key "shapepar"
25623
25624 \end_inset
25625
25626 .
25627 \end_layout
25628
25629 \begin_layout Bibliography
25630 \begin_inset CommandInset bibitem
25631 LatexCommand bibitem
25632 key "multicol"
25633
25634 \end_inset
25635
25636 Documentation of the LaTeX-package 
25637 \begin_inset CommandInset href
25638 LatexCommand href
25639 name "multicol"
25640 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
25641
25642 \end_inset
25643
25644
25645 \end_layout
25646
25647 \begin_layout Bibliography
25648 \begin_inset CommandInset bibitem
25649 LatexCommand bibitem
25650 key "shapepar"
25651
25652 \end_inset
25653
25654 Documentation of the LaTeX-package 
25655 \begin_inset CommandInset href
25656 LatexCommand href
25657 name "shapepar"
25658 target "http://mirrors.ctan.org/macros/latex/contrib/shapepar/shapepar.pdf"
25659
25660 \end_inset
25661
25662
25663 \end_layout
25664
25665 \end_body
25666 \end_document