]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
lyx2lyx: Set conversion table for LyX 2.1
[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 true
135 \output_changes false
136 \html_math_output 0
137 \html_css_as_file 0
138 \html_be_strict true
139 \author -1762856967 "Benjamin Piwowarski" 
140 \end_header
141
142 \begin_body
143
144 \begin_layout Title
145 Additional LyX Features
146 \end_layout
147
148 \begin_layout Subtitle
149 Version 2.1.x
150 \end_layout
151
152 \begin_layout Author
153 by the LyX Team
154 \begin_inset Foot
155 status collapsed
156
157 \begin_layout Plain Layout
158 \noindent
159 Principal maintainer of this file is
160 \noun on
161  Richard Heck
162 \noun default
163 .
164  If you have comments or error corrections, please send them to the LyX
165  Documentation mailing list, 
166 \begin_inset Flex Code
167 status collapsed
168
169 \begin_layout Plain Layout
170 \noindent
171 <lyx-docs@lists.lyx.org>
172 \end_layout
173
174 \end_inset
175
176 .
177 \end_layout
178
179 \end_inset
180
181
182 \end_layout
183
184 \begin_layout Standard
185 \begin_inset CommandInset toc
186 LatexCommand tableofcontents
187
188 \end_inset
189
190
191 \end_layout
192
193 \begin_layout Chapter
194 Introduction
195 \end_layout
196
197 \begin_layout Standard
198 This manual is essentially Part II of the 
199 \emph on
200 User's Guide\SpecialChar \@.
201
202 \emph default
203  The reason for separating the two documents is simple: the 
204 \emph on
205 User's Guide
206 \emph default
207  is already quite lengthy, and it contains information on all of the basic
208  features one needs to know in order to prepare most documents.
209  However, the LyX Team has worked to make LyX extensible through various
210  configuration files and external packages.
211  That means that if you want to support the Fizzwizzle LaTeX package, you
212  can create a layout file (or module) for it without having to alter LyX
213  itself.
214  We've already had contributions of several new features this way, and some
215  of them are documented here.
216  There are also some more `advanced' features, such as how to control the
217  presentation of bibliographies and how to work with multi-part documents,
218  that are not covered in the 
219 \emph on
220 User's Guide
221 \emph default
222  and are discussed here.
223 \end_layout
224
225 \begin_layout Standard
226 This manual also documents some special features, like fax support, version
227  control, and SGML support, which require additional software to work properly.
228  There is also a chapter on LyX's support for HTML.
229  And lastly, there's a chapter of LaTeX tools and tips, things you can use
230  to spruce up your documents by directly using the powerful features of
231  LaTeX.
232  After all, LyX 
233 \emph on
234 is
235 \emph default
236  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
237 \end_layout
238
239 \begin_layout Standard
240 If you haven't read the 
241 \emph on
242 Introduction
243 \emph default
244  yet, you are definitely in the wrong manual.
245  The 
246 \emph on
247 Introduction
248 \emph default
249  is the first place to go, since it describes the notation and format of
250  all of the manuals.
251  You should also be thoroughly familiar with the 
252 \emph on
253 User's Guide
254 \emph default
255  and all of the basic features of LyX before attempting to read this one.
256 \end_layout
257
258 \begin_layout Standard
259 Since many of the topics in this manual depend heavily on LyX's interaction
260  with LaTeX, this first chapter covers the inner workings of LyX and how
261  to direct LyX to generate exactly the LaTeX code you want.
262  It is obviously for more seasoned LyX users.
263 \end_layout
264
265 \begin_layout Chapter
266 LyX and LaTeX
267 \end_layout
268
269 \begin_layout Section
270 How LyX Uses LaTeX
271 \end_layout
272
273 \begin_layout Standard
274 This chapter is for both TeX-nicians and the LaTeX-curious.
275  In it, we'll explain how LyX and LaTeX work together to produce printable
276  output.
277  This is the only place in any of the manuals where we assume you know something
278  about LaTeX.
279 \end_layout
280
281 \begin_layout Standard
282 At one time, LyX was called a 
283 \begin_inset Quotes eld
284 \end_inset
285
286 WYSIWYM frontend to LaTeX,
287 \begin_inset Quotes erd
288 \end_inset
289
290  but that's no longer true.
291  There are frontends to LaTeX out there.
292 \begin_inset Foot
293 status collapsed
294
295 \begin_layout Plain Layout
296 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
297  There are also the LaTeX modes for vi and emacs, of course.
298 \end_layout
299
300 \end_inset
301
302  These are basically text editors with the ability to run LaTeX and mark
303  any errors in the file you're editing.
304  Although LyX 
305 \emph on
306 is
307 \emph default
308  an editor, and it 
309 \emph on
310 does
311 \emph default
312  run LaTeX, and it also indicates errors in the file, it also does much,
313  much more.
314  For one thing, you don't need to know LaTeX to use LyX effectively.
315  And LyX has added its own extensions to LaTeX.
316  Try the following sometime: select 
317 \begin_inset Flex MenuItem
318 status collapsed
319
320 \begin_layout Plain Layout
321 Export\SpecialChar \menuseparator
322 LaTeX
323 \end_layout
324
325 \end_inset
326
327  from the 
328 \begin_inset Flex MenuItem
329 status collapsed
330
331 \begin_layout Plain Layout
332 File
333 \end_layout
334
335 \end_inset
336
337  menu (or 
338 \begin_inset Flex MenuItem
339 status collapsed
340
341 \begin_layout Plain Layout
342 View\SpecialChar \menuseparator
343 Source
344 \begin_inset space ~
345 \end_inset
346
347 Pane
348 \end_layout
349
350 \end_inset
351
352 ), then look at the preamble of the resulting 
353 \begin_inset Flex Code
354 status collapsed
355
356 \begin_layout Plain Layout
357 .tex
358 \end_layout
359
360 \end_inset
361
362  file.
363  You'll notice a variety of new macros defined specifically by LyX.
364  These macros are defined automatically, according to the features you use
365  in the document.
366 \end_layout
367
368 \begin_layout Standard
369 There are several commands that automatically invoke LaTeX.
370  They are:
371 \end_layout
372
373 \begin_layout Itemize
374 \begin_inset Flex MenuItem
375 status collapsed
376
377 \begin_layout Plain Layout
378 Document\SpecialChar \menuseparator
379 View
380 \end_layout
381
382 \end_inset
383
384
385 \end_layout
386
387 \begin_layout Itemize
388 \begin_inset Flex MenuItem
389 status collapsed
390
391 \begin_layout Plain Layout
392 Document\SpecialChar \menuseparator
393 Update
394 \end_layout
395
396 \end_inset
397
398
399 \end_layout
400
401 \begin_layout Itemize
402 \begin_inset Flex MenuItem
403 status collapsed
404
405 \begin_layout Plain Layout
406 File\SpecialChar \menuseparator
407 Print
408 \end_layout
409
410 \end_inset
411
412
413 \end_layout
414
415 \begin_layout Itemize
416 \begin_inset Flex MenuItem
417 status collapsed
418
419 \begin_layout Plain Layout
420 File\SpecialChar \menuseparator
421 Fax
422 \end_layout
423
424 \end_inset
425
426
427 \end_layout
428
429 \begin_layout Standard
430 They will only invoke LaTeX if the file has changed since the last time
431  LaTeX was run.
432  
433 \end_layout
434
435 \begin_layout Standard
436 When LyX runs LaTeX on the file you're editing, it performs these steps:
437 \end_layout
438
439 \begin_layout Enumerate
440 Convert the document to LaTeX and save to a file with the extension 
441 \begin_inset Flex Code
442 status collapsed
443
444 \begin_layout Plain Layout
445 .tex
446 \end_layout
447
448 \end_inset
449
450  in place of 
451 \begin_inset Flex Code
452 status collapsed
453
454 \begin_layout Plain Layout
455 .lyx
456 \end_layout
457
458 \end_inset
459
460 .
461 \end_layout
462
463 \begin_layout Enumerate
464 Run LaTeX on the 
465 \begin_inset Flex Code
466 status collapsed
467
468 \begin_layout Plain Layout
469 .tex
470 \end_layout
471
472 \end_inset
473
474  file (maybe several times), and run any other commands (such as 
475 \begin_inset Flex Code
476 status collapsed
477
478 \begin_layout Plain Layout
479 bibtex
480 \end_layout
481
482 \end_inset
483
484  or 
485 \begin_inset Flex Code
486 status collapsed
487
488 \begin_layout Plain Layout
489 makeindex
490 \end_layout
491
492 \end_inset
493
494 ) needed to compile the LaTeX file.
495 \end_layout
496
497 \begin_layout Enumerate
498 If there are any errors, show the error log.
499 \end_layout
500
501 \begin_layout Standard
502 If you have run LaTeX using 
503 \begin_inset Flex MenuItem
504 status collapsed
505
506 \begin_layout Plain Layout
507 View
508 \bar under
509 \SpecialChar \menuseparator
510
511 \bar default
512 DVI
513 \end_layout
514
515 \end_inset
516
517 , LyX then runs a DVI viewer to display the DVI-file.
518  If you have used 
519 \begin_inset Flex MenuItem
520 status collapsed
521
522 \begin_layout Plain Layout
523 View
524 \bar under
525 \SpecialChar \menuseparator
526
527 \bar default
528 PostScript
529 \end_layout
530
531 \end_inset
532
533 , LyX performs further steps:
534 \end_layout
535
536 \begin_layout Itemize
537 Run 
538 \begin_inset Flex Code
539 status collapsed
540
541 \begin_layout Plain Layout
542 dvips
543 \end_layout
544
545 \end_inset
546
547  to convert the DVI file to PostScript.
548 \end_layout
549
550 \begin_layout Itemize
551 Run a PostScript viewer, such as 
552 \begin_inset Flex Code
553 status collapsed
554
555 \begin_layout Plain Layout
556 ghostview
557 \end_layout
558
559 \end_inset
560
561 , to display the PostScript file.
562 \end_layout
563
564 \begin_layout Standard
565 LyX does similar things when viewing, or exporting, other formats.
566 \end_layout
567
568 \begin_layout Section
569 Translating LaTeX files into LyX
570 \end_layout
571
572 \begin_layout Standard
573 You can import a LaTeX file into LyX by using the 
574 \begin_inset Flex MenuItem
575 status collapsed
576
577 \begin_layout Plain Layout
578 File\SpecialChar \menuseparator
579 Import\SpecialChar \menuseparator
580 LaTeX
581 \end_layout
582
583 \end_inset
584
585  command in LyX.
586  This will call a program named 
587 \begin_inset Flex Code
588 status collapsed
589
590 \begin_layout Plain Layout
591 tex2lyx
592 \end_layout
593
594 \end_inset
595
596  which will create a file 
597 \begin_inset Flex Code
598 status collapsed
599
600 \begin_layout Plain Layout
601 foo.lyx
602 \end_layout
603
604 \end_inset
605
606  from the file 
607 \begin_inset Flex Code
608 status collapsed
609
610 \begin_layout Plain Layout
611 foo.tex
612 \end_layout
613
614 \end_inset
615
616 .
617  LyX will then open that file.
618 \begin_inset Foot
619 status collapsed
620
621 \begin_layout Plain Layout
622 \begin_inset Flex Code
623 status collapsed
624
625 \begin_layout Plain Layout
626 tex2lyx
627 \end_layout
628
629 \end_inset
630
631  can also be run from the command line, of course.
632 \end_layout
633
634 \end_inset
635
636
637 \end_layout
638
639 \begin_layout Standard
640 \begin_inset Flex Code
641 status collapsed
642
643 \begin_layout Plain Layout
644 tex2lyx
645 \end_layout
646
647 \end_inset
648
649  will translate most legal LaTeX, but not everything.
650  It will put things it doesn't understand into TeX code, so after translating
651  a file with 
652 \begin_inset Flex Code
653 status collapsed
654
655 \begin_layout Plain Layout
656 tex2lyx
657 \end_layout
658
659 \end_inset
660
661 , you can look for TeX code and hand-edit it until it looks right.
662 \end_layout
663
664 \begin_layout Standard
665 If you don't know what TeX code is, read the next section.
666 \end_layout
667
668 \begin_layout Section
669 \begin_inset CommandInset label
670 LatexCommand label
671 name "sec:Inserting-TeX-Code"
672
673 \end_inset
674
675 Inserting TeX Code into LyX Documents 
676 \end_layout
677
678 \begin_layout Standard
679 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
680  You can always insert TeX code into any LyX document.
681  LyX cannot, and will never be able to, display every possible LaTeX construct.
682  If ever you need to insert LaTeX commands into your LyX document, you can
683  use the 
684 \begin_inset Flex Code
685 status collapsed
686
687 \begin_layout Plain Layout
688 TeX Code
689 \end_layout
690
691 \end_inset
692
693  box, which you can insert into your document with 
694 \begin_inset Flex MenuItem
695 status collapsed
696
697 \begin_layout Plain Layout
698 Insert\SpecialChar \menuseparator
699 TeX Code
700 \end_layout
701
702 \end_inset
703
704  or the keyboard shortcut 
705 \begin_inset Info
706 type  "shortcut"
707 arg   "ert-insert"
708 \end_inset
709
710 .
711 \end_layout
712
713 \begin_layout Standard
714 Here's an example of inserting LaTeX commands in a LyX document.
715  The code looks like this:
716 \end_layout
717
718 \begin_layout LyX-Code
719
720 \backslash
721 begin{tabular}{ll}
722 \begin_inset Newline newline
723 \end_inset
724
725
726 \backslash
727 begin{minipage}{5cm}
728 \begin_inset Newline newline
729 \end_inset
730
731 This is an example of a minipage environment.
732  You 
733 \begin_inset Newline newline
734 \end_inset
735
736 can put nearly everything in it, even (non-floating) 
737 \begin_inset Newline newline
738 \end_inset
739
740 figures and tables.
741  
742 \begin_inset Newline newline
743 \end_inset
744
745
746 \backslash
747 end{minipage}
748 \begin_inset Newline newline
749 \end_inset
750
751 &
752 \begin_inset Newline newline
753 \end_inset
754
755
756 \backslash
757 begin{minipage}{5cm}
758 \begin_inset Newline newline
759 \end_inset
760
761
762 \backslash
763 begin{verbatim}
764 \begin_inset Newline newline
765 \end_inset
766
767
768 \backslash
769 begin{minipage}{5cm}
770 \begin_inset Newline newline
771 \end_inset
772
773 This ...
774  
775 \begin_inset Newline newline
776 \end_inset
777
778
779 \backslash
780 end{minipage}
781 \begin_inset Newline newline
782 \end_inset
783
784
785 \backslash
786 end{verbatim}
787 \begin_inset Newline newline
788 \end_inset
789
790
791 \backslash
792 end{minipage}
793 \begin_inset Newline newline
794 \end_inset
795
796
797 \backslash
798 end{tabular}
799 \end_layout
800
801 \begin_layout LyX-Code
802
803 \end_layout
804
805 \begin_layout Standard
806 The 
807 \begin_inset Flex Code
808 status collapsed
809
810 \begin_layout Plain Layout
811 TeX Code
812 \end_layout
813
814 \end_inset
815
816  box containing this text is directly after this paragraph.
817  Those of you reading the manual in LyX will only see the TeX code inset.
818  Those reading a printed version of the manuals will see the actual results:
819 \begin_inset VSpace bigskip
820 \end_inset
821
822
823 \end_layout
824
825 \begin_layout Standard
826 \begin_inset ERT
827 status open
828
829 \begin_layout Plain Layout
830
831
832 \backslash
833 begin{tabular}{ll}
834 \end_layout
835
836 \begin_layout Plain Layout
837
838
839 \backslash
840 begin{minipage}{5cm}
841 \end_layout
842
843 \begin_layout Plain Layout
844
845 This is an example of a minipage environment.
846  You can put nearly everything in it, even (non-floating) figures and tables.
847  
848 \end_layout
849
850 \begin_layout Plain Layout
851
852
853 \backslash
854 end{minipage}
855 \end_layout
856
857 \begin_layout Plain Layout
858
859 &
860 \end_layout
861
862 \begin_layout Plain Layout
863
864
865 \backslash
866 begin{minipage}{5cm}
867 \end_layout
868
869 \begin_layout Plain Layout
870
871
872 \backslash
873 begin{verbatim}
874 \end_layout
875
876 \begin_layout Plain Layout
877
878
879 \backslash
880 begin{minipage}{5cm}
881 \end_layout
882
883 \begin_layout Plain Layout
884
885 This ...
886  
887 \end_layout
888
889 \begin_layout Plain Layout
890
891
892 \backslash
893 end{minipage}
894 \end_layout
895
896 \begin_layout Plain Layout
897
898
899 \backslash
900 end{verbatim}
901 \end_layout
902
903 \begin_layout Plain Layout
904
905
906 \backslash
907 end{minipage}
908 \end_layout
909
910 \begin_layout Plain Layout
911
912
913 \backslash
914 end{tabular}
915 \end_layout
916
917 \end_inset
918
919
920 \begin_inset VSpace bigskip
921 \end_inset
922
923
924 \end_layout
925
926 \begin_layout Standard
927 In addition to using TeX code, you can also create a separate file containing
928  some complex LaTeX structure and then use 
929 \begin_inset Flex MenuItem
930 status collapsed
931
932 \begin_layout Plain Layout
933 Insert\SpecialChar \menuseparator
934 Child
935 \begin_inset space ~
936 \end_inset
937
938 Document
939 \end_layout
940
941 \end_inset
942
943  to include your file (you should select the type 
944 \begin_inset Flex Code
945 status collapsed
946
947 \begin_layout Plain Layout
948 Input
949 \end_layout
950
951 \end_inset
952
953 ).
954  We recommend that you only do this if you have a 
955 \begin_inset Flex Code
956 status collapsed
957
958 \begin_layout Plain Layout
959 .tex
960 \end_layout
961
962 \end_inset
963
964  file which you 
965 \emph on
966 know
967 \emph default
968  works already.
969  Otherwise, you'll have a big job tracking down LaTeX errors.
970 \end_layout
971
972 \begin_layout Standard
973 There are a few last points to emphasize:
974 \end_layout
975
976 \begin_layout Itemize
977 LyX 
978 \emph on
979 does not
980 \emph default
981  check if your LaTeX code is correct.
982 \end_layout
983
984 \begin_layout Itemize
985 Beware of reinventing the wheel.
986 \end_layout
987
988 \begin_layout Standard
989 On that last point, LyX does have quite a few features tucked into it, and
990  more are coming.
991  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
992  feature before you decide you have to do it by hand.
993  Moreover, there are numerous LaTeX packages out there to do all sorts of
994  things, from labels to envelopes to fancy multipage tables.
995  Check out 
996 \begin_inset CommandInset href
997 LatexCommand href
998 name "CTAN"
999 target "http://www.ctan.org/"
1000
1001 \end_inset
1002
1003  for details.
1004 \end_layout
1005
1006 \begin_layout Standard
1007 If you do need to do some wild and fancy things within your document, be
1008  sure to check out a good LaTeX book for assistance.
1009  There are a number of them listed in the bibliography of the 
1010 \emph on
1011 User's Guide
1012 \emph default
1013 .
1014 \end_layout
1015
1016 \begin_layout Section
1017 LyX and the LaTeX Preamble
1018 \end_layout
1019
1020 \begin_layout Subsection
1021 About the LaTeX Preamble
1022 \end_layout
1023
1024 \begin_layout Standard
1025 If you already know LaTeX, there is no need to explain here what the preamble
1026  is good for.
1027  If you don't, the following will give you some ideas—we recommend again
1028  that you consult a LaTeX book for further information.
1029  In any case, you should read the points below, because they explain what
1030  you can do and what you don't need to do in the LaTeX preamble of a LyX
1031  document.
1032 \end_layout
1033
1034 \begin_layout Standard
1035 The LaTeX preamble comes at the very beginning of a document, 
1036 \emph on
1037 before
1038 \emph default
1039  the text.
1040  It serves to:
1041 \end_layout
1042
1043 \begin_layout Itemize
1044 Declare the document class.
1045  
1046 \begin_inset Newline newline
1047 \end_inset
1048
1049 LyX already does this for you.
1050  If you're a seasoned LaTeX-nician, and you have a custom document class
1051  you want to use, check out the 
1052 \emph on
1053 Customization Manual
1054 \emph default
1055  for information on how to make LyX interface to it.
1056 \end_layout
1057
1058 \begin_layout Itemize
1059 Declare the usage of packages.
1060  
1061 \begin_inset Newline newline
1062 \end_inset
1063
1064 LaTeX packages provide special commands, which are only available within
1065  a document when the package has been declared in the preamble.
1066  In addition to providing special commands, the inclusion of a package can
1067  change the document.
1068  For example, the package 
1069 \begin_inset Flex Code
1070 status collapsed
1071
1072 \begin_layout Plain Layout
1073 indentfirst
1074 \end_layout
1075
1076 \end_inset
1077
1078  forces all paragraphs to be indented.
1079  There are other packages for labels, envelopes, margins, etc.
1080  
1081 \end_layout
1082
1083 \begin_layout Itemize
1084 Set counters, variables, lengths and widths.
1085  
1086 \begin_inset Newline newline
1087 \end_inset
1088
1089 There are several LaTeX counters and variables that 
1090 \emph on
1091 must
1092 \emph default
1093  be set globally from within the preamble in order to have the desired effect.
1094  (There are variables that you can set and reset inside the document, too.)
1095  Margins are a good example of something that must be set in the preamble.
1096  Another example is the label format for lists.
1097  You can actually set these just about anywhere, but it's best to do it
1098  just once, inside the preamble.
1099 \end_layout
1100
1101 \begin_layout Itemize
1102 Declare user defined commands (with 
1103 \begin_inset Flex Code
1104 status collapsed
1105
1106 \begin_layout Plain Layout
1107
1108 \backslash
1109 newcommand
1110 \end_layout
1111
1112 \end_inset
1113
1114  or 
1115 \begin_inset Flex Code
1116 status collapsed
1117
1118 \begin_layout Plain Layout
1119
1120 \backslash
1121 renewcommand
1122 \end_layout
1123
1124 \end_inset
1125
1126 ).
1127 \begin_inset Newline newline
1128 \end_inset
1129
1130 These are abbreviations for LaTeX commands which appear very often inside
1131  a document.
1132  Although the preamble is a good place to declare such commands, they 
1133 \emph on
1134 can
1135 \emph default
1136  be declared anywhere (before they are used for the first time, of course).
1137  This can be useful if there is a lot of raw LaTeX code in your document,
1138  which normally should not be the case.
1139 \end_layout
1140
1141 \begin_layout Standard
1142 LyX adds its own set of definitions to the preamble of the 
1143 \begin_inset Flex Code
1144 status collapsed
1145
1146 \begin_layout Plain Layout
1147 .tex
1148 \end_layout
1149
1150 \end_inset
1151
1152  file it produces.
1153  This makes LaTeX files generated by LyX portable.
1154 \end_layout
1155
1156 \begin_layout Subsection
1157 Changing the Preamble
1158 \end_layout
1159
1160 \begin_layout Standard
1161 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1162  can't change them without patching LyX itself.
1163  You can, however, add your own stuff to the preamble by selecting 
1164 \begin_inset Flex MenuItem
1165 status collapsed
1166
1167 \begin_layout Plain Layout
1168 LaTeX
1169 \begin_inset space ~
1170 \end_inset
1171
1172 Preamble
1173 \end_layout
1174
1175 \end_inset
1176
1177  in the 
1178 \begin_inset Flex MenuItem
1179 status collapsed
1180
1181 \begin_layout Plain Layout
1182 Document\SpecialChar \menuseparator
1183 Settings
1184 \end_layout
1185
1186 \end_inset
1187
1188  dialog.
1189  LyX adds anything in the 
1190 \begin_inset Flex MenuItem
1191 status collapsed
1192
1193 \begin_layout Plain Layout
1194 Preamble
1195 \end_layout
1196
1197 \end_inset
1198
1199  dialog to its own built-in preamble.
1200  Before adding your own declarations in the preamble, you should make sure
1201  that LyX doesn't already support what you want to do.
1202  (Remember what we said about reinventing the wheel?) Also, 
1203 \emph on
1204 make sure your preamble code is correct
1205 \emph default
1206 .
1207  LyX doesn't check it for you.
1208  If there is an error, you're likely to get an error like 
1209 \begin_inset Quotes eld
1210 \end_inset
1211
1212
1213 \begin_inset Flex Code
1214 status collapsed
1215
1216 \begin_layout Plain Layout
1217 Missing 
1218 \backslash
1219 begin{document}
1220 \end_layout
1221
1222 \end_inset
1223
1224
1225 \begin_inset Quotes erd
1226 \end_inset
1227
1228 .
1229  If you see this error, check your preamble.
1230 \end_layout
1231
1232 \begin_layout Subsection
1233 Examples
1234 \end_layout
1235
1236 \begin_layout Standard
1237 Here are some examples of what you can add to a preamble, and what they
1238  do.
1239 \end_layout
1240
1241 \begin_layout Subsubsection
1242 Example #1: Offsets
1243 \end_layout
1244
1245 \begin_layout Standard
1246 There are two variables under LaTeX that control page position: 
1247 \begin_inset Flex Code
1248 status collapsed
1249
1250 \begin_layout Plain Layout
1251
1252 \backslash
1253 hoffset
1254 \end_layout
1255
1256 \end_inset
1257
1258  and 
1259 \begin_inset Flex Code
1260 status collapsed
1261
1262 \begin_layout Plain Layout
1263
1264 \backslash
1265 voffset
1266 \end_layout
1267
1268 \end_inset
1269
1270 .
1271  Their names should be self-explanatory.
1272  These variables are useful if you think for a moment about computer labels.
1273  Sometimes, the size of a print medium and the area of the medium that you
1274  can actually print on aren't the same.
1275  This is where 
1276 \begin_inset Flex Code
1277 status collapsed
1278
1279 \begin_layout Plain Layout
1280
1281 \backslash
1282 hoffset
1283 \end_layout
1284
1285 \end_inset
1286
1287  and 
1288 \begin_inset Flex Code
1289 status collapsed
1290
1291 \begin_layout Plain Layout
1292
1293 \backslash
1294 voffset
1295 \end_layout
1296
1297 \end_inset
1298
1299  come in.
1300 \end_layout
1301
1302 \begin_layout Standard
1303 The default values for 
1304 \begin_inset Flex Code
1305 status collapsed
1306
1307 \begin_layout Plain Layout
1308
1309 \backslash
1310 hoffset
1311 \end_layout
1312
1313 \end_inset
1314
1315  and 
1316 \begin_inset Flex Code
1317 status collapsed
1318
1319 \begin_layout Plain Layout
1320
1321 \backslash
1322 voffset
1323 \end_layout
1324
1325 \end_inset
1326
1327  are both 0
1328 \begin_inset space \thinspace{}
1329 \end_inset
1330
1331 points, i.
1332 \begin_inset space \thinspace{}
1333 \end_inset
1334
1335 e.
1336 \begin_inset space \space{}
1337 \end_inset
1338
1339 the page isn't shifted.
1340  Unfortunately, some DVI drivers always seem to shift the page.
1341  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1342  If you're using LyX on a system that you don't personally maintain, and
1343  your sysadmin is a doofus, 
1344 \begin_inset Flex Code
1345 status collapsed
1346
1347 \begin_layout Plain Layout
1348
1349 \backslash
1350 hoffset
1351 \end_layout
1352
1353 \end_inset
1354
1355  and 
1356 \begin_inset Flex Code
1357 status collapsed
1358
1359 \begin_layout Plain Layout
1360
1361 \backslash
1362 voffset
1363 \end_layout
1364
1365 \end_inset
1366
1367  can save the day.
1368  Suppose your left and top margins are always 0.5
1369 \begin_inset space \thinspace{}
1370 \end_inset
1371
1372 inches too big.
1373  You can add this to the preamble:
1374 \end_layout
1375
1376 \begin_layout LyX-Code
1377
1378 \backslash
1379 setlength{
1380 \backslash
1381 hoffset}{-0.5 in}
1382 \end_layout
1383
1384 \begin_layout LyX-Code
1385
1386 \backslash
1387 setlength{
1388 \backslash
1389 voffset}{-0.5 in}
1390 \end_layout
1391
1392 \begin_layout Standard
1393 and your margins should now be correct.
1394 \end_layout
1395
1396 \begin_layout Subsubsection
1397 Example #2: Labels
1398 \end_layout
1399
1400 \begin_layout Standard
1401 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1402  There's a rather nice package, available at your nearest CTAN archive,
1403  for printing sheets of labels: 
1404 \begin_inset Flex Code
1405 status collapsed
1406
1407 \begin_layout Plain Layout
1408 labels.sty
1409 \end_layout
1410
1411 \end_inset
1412
1413 .
1414  Now, your system may not have this package installed by default.
1415  We leave that up to you to check.
1416  You'll also want to read the documentation for it; we're not going to do
1417  that for you.
1418  Since this is an example, however, we'll give you an example of how you
1419  use this package.
1420 \end_layout
1421
1422 \begin_layout Standard
1423 First, make sure you're using the 
1424 \begin_inset Flex Code
1425 status collapsed
1426
1427 \begin_layout Plain Layout
1428 article
1429 \end_layout
1430
1431 \end_inset
1432
1433  document class.
1434  Next, you need to put the following in your preamble:
1435 \end_layout
1436
1437 \begin_layout LyX-Code
1438
1439 \backslash
1440 usepackage{labels}
1441 \end_layout
1442
1443 \begin_layout LyX-Code
1444
1445 \backslash
1446 LabelCols=3
1447 \end_layout
1448
1449 \begin_layout LyX-Code
1450
1451 \backslash
1452 LabelRows=7
1453 \end_layout
1454
1455 \begin_layout LyX-Code
1456
1457 \backslash
1458 LeftBorder=8mm
1459 \end_layout
1460
1461 \begin_layout LyX-Code
1462
1463 \backslash
1464 RightBorder=8mm
1465 \end_layout
1466
1467 \begin_layout LyX-Code
1468
1469 \backslash
1470 TopBorder=9mm
1471 \end_layout
1472
1473 \begin_layout LyX-Code
1474
1475 \backslash
1476 BottomBorder=2mm
1477 \end_layout
1478
1479 \begin_layout Standard
1480 This sets things up for Avery label sheets, stock #5360.
1481  You're now ready to print labels, but you'll need to insert LaTeX code,
1482  placing the commands 
1483 \begin_inset Flex Code
1484 status collapsed
1485
1486 \begin_layout Plain Layout
1487
1488 \backslash
1489 begin{labels}
1490 \end_layout
1491
1492 \end_inset
1493
1494  and 
1495 \begin_inset Flex Code
1496 status collapsed
1497
1498 \begin_layout Plain Layout
1499
1500 \backslash
1501 end{labels}
1502 \end_layout
1503
1504 \end_inset
1505
1506  around each label text.
1507  This and other special features of 
1508 \begin_inset Flex Code
1509 status collapsed
1510
1511 \begin_layout Plain Layout
1512 labels.sty
1513 \end_layout
1514
1515 \end_inset
1516
1517  are explained in its documentation.
1518 \end_layout
1519
1520 \begin_layout Standard
1521 Someday, someone may write a LyX layout file to support this package directly.
1522  Maybe that someone is you.
1523 \end_layout
1524
1525 \begin_layout Subsubsection
1526 Example #3: Paragraph Indentation
1527 \end_layout
1528
1529 \begin_layout Standard
1530 Americans are trained to indent the first line of 
1531 \emph on
1532 every
1533 \emph default
1534  paragraph.
1535  As with all of their other weird quirks, most Americans will whine and
1536  moan until they can have their way and indent the first line of all paragraphs.
1537  (Yes, we're joking.
1538  (We are?) 
1539 \emph on
1540 Yeah
1541 \emph default
1542 , we are.)
1543 \end_layout
1544
1545 \begin_layout Standard
1546 Of course, this behavior isn't standard typography.
1547  In books, you typically only indent the first line of a paragraph 
1548 \emph on
1549 if
1550 \emph default
1551  it follows another one.
1552  The idea behind indenting the first line of a paragraph is to distinguish
1553  neighboring paragraphs from one another.
1554  If there is no previous paragraph—for example, if it follows a figure or
1555  is the first paragraph in a section—then there is no need for indentation.
1556  
1557 \end_layout
1558
1559 \begin_layout Standard
1560 If you're a typical American (we're still joking!), though, you don't care
1561  about such esoteric things; you want your indentation! Add this to the
1562  preamble:
1563 \end_layout
1564
1565 \begin_layout LyX-Code
1566
1567 \backslash
1568 usepackage{indentfirst}
1569 \end_layout
1570
1571 \begin_layout Standard
1572 If your TeX distribution isn't braindead, you'll have this package, and
1573  all of your paragraphs will get the indentation the Founding Fathers intended
1574  they should have.
1575 \end_layout
1576
1577 \begin_layout Subsubsection
1578 Example #4: This Document
1579 \end_layout
1580
1581 \begin_layout Standard
1582 You can also check out the preamble of this document to get an idea of some
1583  of the advanced things you can do.
1584 \end_layout
1585
1586 \begin_layout Section
1587 LyX and LaTeX Errors
1588 \end_layout
1589
1590 \begin_layout Standard
1591 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1592  going.
1593  It then uses the logfile from the LaTeX run to do a post-mortem.
1594  After analyzing the logfile, LyX displays a dialog listing the errors.
1595  Clicking on any one of them will take you to the position in your LyX file
1596  where the error occurred.
1597 \begin_inset Foot
1598 status collapsed
1599
1600 \begin_layout Plain Layout
1601 Well, usually.
1602  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1603  right line.
1604  There are also cases where LaTeX reports the error on one line, but the
1605  actual error is earlier.
1606  This is not unlike forgetting a closing brace in a program: You'll get
1607  an error, but only later.
1608 \end_layout
1609
1610 \end_inset
1611
1612
1613 \end_layout
1614
1615 \begin_layout Standard
1616 Some folks also like to look at the log file directly: It is available from
1617  
1618 \begin_inset Flex MenuItem
1619 status collapsed
1620
1621 \begin_layout Plain Layout
1622 Document
1623 \bar under
1624 \SpecialChar \menuseparator
1625
1626 \bar default
1627 Latex
1628 \begin_inset space ~
1629 \end_inset
1630
1631 Log
1632 \end_layout
1633
1634 \end_inset
1635
1636 .
1637  There are some fairly common error messages and warnings.
1638  We'll cover those here.
1639  You should look at a good LaTeX book for a complete listing.
1640 \end_layout
1641
1642 \begin_layout Itemize
1643 \begin_inset Flex Code
1644 status collapsed
1645
1646 \begin_layout Plain Layout
1647 LaTeX Warning
1648 \end_layout
1649
1650 \end_inset
1651
1652
1653 \begin_inset Newline newline
1654 \end_inset
1655
1656 Anything beginning with these words is a warning message for the purpose
1657  of 
1658 \begin_inset Quotes eld
1659 \end_inset
1660
1661 debugging
1662 \begin_inset Quotes erd
1663 \end_inset
1664
1665  the LaTeX code itself.
1666  You'll get messages like this if you added or changed cross-references
1667  or bibliography entries, in which case, LaTeX is trying to tell you that
1668  you need to make another run.
1669  You can by-and-large ignore these.
1670 \end_layout
1671
1672 \begin_layout Itemize
1673 \begin_inset Flex Code
1674 status collapsed
1675
1676 \begin_layout Plain Layout
1677 LaTeX Font Warning
1678 \end_layout
1679
1680 \end_inset
1681
1682
1683 \begin_inset Newline newline
1684 \end_inset
1685
1686 Another warning message, this time about fonts which LaTeX couldn't find.
1687  The rest of the message will often say something about a replacement font
1688  that LaTeX used.
1689  You can safely ignore these, too.
1690 \end_layout
1691
1692 \begin_layout Itemize
1693 \begin_inset Flex Code
1694 status collapsed
1695
1696 \begin_layout Plain Layout
1697 Overfull 
1698 \backslash
1699 hbox
1700 \end_layout
1701
1702 \end_inset
1703
1704
1705 \begin_inset Newline newline
1706 \end_inset
1707
1708 LaTeX absolutely 
1709 \emph on
1710 loves
1711 \emph default
1712  to spew these out.
1713  They are warnings about lines that were too long and run past the right
1714  margin.
1715  Almost always, this is unnoticeable in the final output.
1716  (It can be just a point or two.) Or, only one or two characters extend past
1717  the margin.
1718  LaTeX seems to generate at least one of these messages for just about any
1719  document you write.
1720 \begin_inset Newline newline
1721 \end_inset
1722
1723 You can ignore these messages.
1724  Your eyes will tell you if there's a problem with something that's too
1725  wide; just look at the output.
1726 \begin_inset Foot
1727 status collapsed
1728
1729 \begin_layout Plain Layout
1730 You can also enable the `draft' option in 
1731 \begin_inset Flex MenuItem
1732 status collapsed
1733
1734 \begin_layout Plain Layout
1735 Document
1736 \bar under
1737 \SpecialChar \menuseparator
1738
1739 \bar default
1740 Settings
1741 \end_layout
1742
1743 \end_inset
1744
1745 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1746 \end_layout
1747
1748 \end_inset
1749
1750
1751 \end_layout
1752
1753 \begin_layout Itemize
1754 \begin_inset Flex Code
1755 status collapsed
1756
1757 \begin_layout Plain Layout
1758 Underfull 
1759 \backslash
1760 hbox
1761 \end_layout
1762
1763 \end_inset
1764
1765
1766 \begin_inset Newline newline
1767 \end_inset
1768
1769 Not quite as common as its cousin.
1770  LaTeX seems to like to print lines that are a bit too wide as opposed to
1771  ones that are a bit too narrow.
1772  We have no idea why.
1773 \end_layout
1774
1775 \begin_layout Itemize
1776 \begin_inset Flex Code
1777 status collapsed
1778
1779 \begin_layout Plain Layout
1780 Overfull 
1781 \backslash
1782 vbox
1783 \end_layout
1784
1785 \end_inset
1786
1787  and 
1788 \begin_inset Flex Code
1789 status collapsed
1790
1791 \begin_layout Plain Layout
1792 Underfull 
1793 \backslash
1794 vbox
1795 \end_layout
1796
1797 \end_inset
1798
1799
1800 \begin_inset Newline newline
1801 \end_inset
1802
1803 Warnings about troubles breaking the page.
1804  Once again, just look at the output.
1805  Your eyes will tell you where something has gone wrong.
1806 \end_layout
1807
1808 \begin_layout Itemize
1809 \begin_inset Flex Code
1810 status collapsed
1811
1812 \begin_layout Plain Layout
1813 LaTeX Error: File 
1814 \begin_inset Quotes els
1815 \end_inset
1816
1817 Xxxx
1818 \begin_inset Quotes ers
1819 \end_inset
1820
1821  not found
1822 \end_layout
1823
1824 \end_inset
1825
1826
1827 \begin_inset Newline newline
1828 \end_inset
1829
1830 The file 
1831 \begin_inset Quotes eld
1832 \end_inset
1833
1834 Xxxx
1835 \begin_inset Quotes erd
1836 \end_inset
1837
1838  isn't installed on this system.
1839  This usually appears because some package your document needs isn't installed.
1840  If you didn't touch the preamble or didn't use the 
1841 \begin_inset Flex Code
1842 status collapsed
1843
1844 \begin_layout Plain Layout
1845
1846 \backslash
1847 usepackage{}
1848 \end_layout
1849
1850 \end_inset
1851
1852  command, then one of the packages LyX tried to load is missing.
1853  Use 
1854 \begin_inset Flex MenuItem
1855 status collapsed
1856
1857 \begin_layout Plain Layout
1858 Help\SpecialChar \menuseparator
1859 LaTeX Configuration
1860 \end_layout
1861
1862 \end_inset
1863
1864  to get a list of packages that LyX knows about.
1865  This file is updated whenever you reconfigure LyX (using 
1866 \begin_inset Flex MenuItem
1867 status collapsed
1868
1869 \begin_layout Plain Layout
1870 Tools\SpecialChar \menuseparator
1871 Reconfigure
1872 \end_layout
1873
1874 \end_inset
1875
1876 ) and tells you which packages have been detected and what they do.
1877 \begin_inset Newline newline
1878 \end_inset
1879
1880 If you did use the 
1881 \begin_inset Flex Code
1882 status collapsed
1883
1884 \begin_layout Plain Layout
1885
1886 \backslash
1887 usepackage{}
1888 \end_layout
1889
1890 \end_inset
1891
1892  command and the package in question isn't installed, then you'll need to
1893  install it yourself.
1894 \end_layout
1895
1896 \begin_layout Itemize
1897 \begin_inset Flex Code
1898 status collapsed
1899
1900 \begin_layout Plain Layout
1901 LaTeX Error: Unknown option
1902 \end_layout
1903
1904 \end_inset
1905
1906
1907 \begin_inset Newline newline
1908 \end_inset
1909
1910 Error messages beginning with this are trying to tell you that you specified
1911  a bad or undefined option to a package.
1912  Check the package's documentation.
1913 \end_layout
1914
1915 \begin_layout Itemize
1916 \begin_inset Flex Code
1917 status collapsed
1918
1919 \begin_layout Plain Layout
1920 Undefined control sequence
1921 \end_layout
1922
1923 \end_inset
1924
1925
1926 \begin_inset Newline newline
1927 \end_inset
1928
1929 If you've inserted LaTeX code into your document, but made a typo, you'll
1930  get one of these.
1931  You may have forgotten to load a package.
1932  In any case, this error message usually means that you used an undefined
1933  command.
1934  
1935 \end_layout
1936
1937 \begin_layout Standard
1938 There are other error and warning messages.
1939  Some are self-explanatory.
1940  These are usually LaTeX messages.
1941  Others are downright cryptic.
1942  These are usually TeX error messages, and we really have 
1943 \emph on
1944 no clue
1945 \emph default
1946  what they mean or how to decipher them.
1947  No-one does.
1948 \end_layout
1949
1950 \begin_layout Standard
1951 There's a general sequence you should follow if you get error messages:
1952 \end_layout
1953
1954 \begin_layout Enumerate
1955 Look at the LaTeX code you inserted for typos.
1956 \end_layout
1957
1958 \begin_layout Enumerate
1959 If there are no typos, check that you used the command(s) correctly.
1960 \end_layout
1961
1962 \begin_layout Enumerate
1963 If you get a bunch of error boxes piled up at the very top of the document—and
1964  especially if you see a 
1965 \begin_inset Quotes eld
1966 \end_inset
1967
1968
1969 \begin_inset Flex Code
1970 status collapsed
1971
1972 \begin_layout Plain Layout
1973 Missing 
1974 \backslash
1975 begin{document}
1976 \end_layout
1977
1978 \end_inset
1979
1980
1981 \begin_inset Quotes erd
1982 \end_inset
1983
1984  error—it means that there are errors in the preamble.
1985  Start debugging your preamble.
1986 \end_layout
1987
1988 \begin_layout Enumerate
1989 If you didn't add anything to the preamble and didn't add any LaTeX code
1990  to the document, the first suspect is your LaTeX distribution itself.
1991  Check for missing packages and install them.
1992 \end_layout
1993
1994 \begin_layout Enumerate
1995 Okay, so there are no missing packages.
1996  Did you use any of the fine-tuning options in LyX? Specifically, did you
1997  
1998 \emph on
1999 misuse
2000 \emph default
2001  any of them, like trying to manually insert lots of 
2002 \begin_inset Flex Code
2003 status collapsed
2004
2005 \begin_layout Plain Layout
2006 Protected
2007 \begin_inset space ~
2008 \end_inset
2009
2010 Blanks
2011 \end_layout
2012
2013 \end_inset
2014
2015
2016 \begin_inset Flex Code
2017 status collapsed
2018
2019 \begin_layout Plain Layout
2020 Linebreaks
2021 \end_layout
2022
2023 \end_inset
2024
2025 , or 
2026 \begin_inset Flex Code
2027 status collapsed
2028
2029 \begin_layout Plain Layout
2030 Pagebreaks
2031 \end_layout
2032
2033 \end_inset
2034
2035 ? Did you try to kludge something together with these instead of using the
2036  appropriate paragraph environment?
2037 \end_layout
2038
2039 \begin_layout Enumerate
2040 All right, you didn't use any of the fine-tuning options, you played by
2041  the rules.
2042  Did you try to pull a fancy maneuver? Did you do something funky inside
2043  a table or an equation, like inserting a graphic into a table cell?
2044 \end_layout
2045
2046 \begin_layout Enumerate
2047 Do you have long sections of text where LaTeX cannot find a place to break
2048  a line? By default, LaTeX is rather strict about how much extra inter-word
2049  spacing it will add in order to break a line.
2050  Preferably, you should rework the paragraph to avoid the problem.
2051  If this isn't an option, you can wrap your text in 
2052 \begin_inset Flex Code
2053 status collapsed
2054
2055 \begin_layout Plain Layout
2056
2057 \backslash
2058 sloppypar
2059 \end_layout
2060
2061 \end_inset
2062
2063  to make LaTeX's line breaking more, well, sloppy.
2064 \end_layout
2065
2066 \begin_layout Enumerate
2067 Did you go overboard with the nesting? LyX (currently) doesn't check to
2068  make sure you're in the limits for nesting environments.
2069  If you nested a bunch of environments to the 
2070 \begin_inset Formula $17^{\mathrm{th}}$
2071 \end_inset
2072
2073  level, that's the problem.
2074  (The limit in LaTeX is five.)
2075 \end_layout
2076
2077 \begin_layout Enumerate
2078 Okay, you didn't get any error messages, but your output looks awful.
2079  If you have a table or figure that's too wide or long for the page, you
2080  need to:
2081 \end_layout
2082
2083 \begin_deeper
2084 \begin_layout Enumerate
2085 rescale the figure so it fits.
2086 \end_layout
2087
2088 \begin_layout Enumerate
2089 trim down the table so it fits.
2090 \end_layout
2091
2092 \end_deeper
2093 \begin_layout Enumerate
2094 If something else is wrong with the output, and you didn't try to pull anything
2095  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2096 \end_layout
2097
2098 \begin_layout Standard
2099 If all this doesn't help—well, then 
2100 \emph on
2101 perhaps
2102 \emph default
2103  you might have found a bug in LyX\SpecialChar \ldots{}
2104 .
2105 \end_layout
2106
2107 \begin_layout Chapter
2108 Supplemental Tools
2109 \end_layout
2110
2111 \begin_layout Section
2112 Customizing Bibliographies with BibTeX
2113 \end_layout
2114
2115 \begin_layout Standard
2116 The most basic information about how to use BibTeX with LyX is contained
2117  in the section 
2118 \emph on
2119 Bibliography databases (BibTeX)
2120 \emph default
2121  of the 
2122 \emph on
2123 User's Guide
2124 \emph default
2125 .
2126  The following subsections explain special bibliography features supported
2127  by LyX.
2128 \end_layout
2129
2130 \begin_layout Subsection
2131 Alternative Citation Styles
2132 \end_layout
2133
2134 \begin_layout Standard
2135 Standard BibTeX uses numbers (e.
2136 \begin_inset space \thinspace{}
2137 \end_inset
2138
2139 g.
2140 \begin_inset space \space{}
2141 \end_inset
2142
2143
2144 \begin_inset Quotes eld
2145 \end_inset
2146
2147 [12]
2148 \begin_inset Quotes erd
2149 \end_inset
2150
2151 ) to refer to a cited work.
2152  However, in many scientific disciplines, other citation styles are in use.
2153  The most common one is the author-year style (e.
2154 \begin_inset space \thinspace{}
2155 \end_inset
2156
2157 g.
2158 \begin_inset space \space{}
2159 \end_inset
2160
2161
2162 \begin_inset Quotes eld
2163 \end_inset
2164
2165 Knuth 1984a
2166 \begin_inset Quotes erd
2167 \end_inset
2168
2169 ).
2170  LyX supports two packages that provide this style, 
2171 \begin_inset Flex Code
2172 status collapsed
2173
2174 \begin_layout Plain Layout
2175 natbib
2176 \end_layout
2177
2178 \end_inset
2179
2180  and 
2181 \begin_inset Flex Code
2182 status collapsed
2183
2184 \begin_layout Plain Layout
2185 jurabib
2186 \end_layout
2187
2188 \end_inset
2189
2190 .
2191  Both packages have their pros and cons, which cannot be listed in detail.
2192  If you only want to have simple author-year (or author-numerical) style,
2193  or if you want to use one of the countless style files for 
2194 \begin_inset Flex Code
2195 status collapsed
2196
2197 \begin_layout Plain Layout
2198 natbib
2199 \end_layout
2200
2201 \end_inset
2202
2203 , then the established 
2204 \begin_inset Flex Code
2205 status collapsed
2206
2207 \begin_layout Plain Layout
2208 natbib
2209 \end_layout
2210
2211 \end_inset
2212
2213  package is probably your choice.
2214  If you need special features like short title references, ibidem etc., you
2215  might consider the 
2216 \begin_inset Flex Code
2217 status collapsed
2218
2219 \begin_layout Plain Layout
2220 jurabib
2221 \end_layout
2222
2223 \end_inset
2224
2225  package.
2226 \end_layout
2227
2228 \begin_layout Standard
2229 The handling of both packages in LyX is basically the same.
2230  Go to 
2231 \begin_inset Flex MenuItem
2232 status collapsed
2233
2234 \begin_layout Plain Layout
2235 Document\SpecialChar \menuseparator
2236 Settings
2237 \end_layout
2238
2239 \end_inset
2240
2241  and select under 
2242 \begin_inset Flex MenuItem
2243 status collapsed
2244
2245 \begin_layout Plain Layout
2246 Bibliography
2247 \end_layout
2248
2249 \end_inset
2250
2251  the option 
2252 \begin_inset Flex MenuItem
2253 status collapsed
2254
2255 \begin_layout Plain Layout
2256 Natbib
2257 \end_layout
2258
2259 \end_inset
2260
2261  or 
2262 \begin_inset Flex MenuItem
2263 status collapsed
2264
2265 \begin_layout Plain Layout
2266 Jurabib
2267 \end_layout
2268
2269 \end_inset
2270
2271 .
2272  With both packages, you will get some extra features in the citation dialog
2273  and you can select the style of the reference (
2274 \begin_inset Quotes eld
2275 \end_inset
2276
2277 Knuth 1984
2278 \begin_inset Quotes erd
2279 \end_inset
2280
2281
2282 \begin_inset Quotes eld
2283 \end_inset
2284
2285 Knuth (1984)
2286 \begin_inset Quotes erd
2287 \end_inset
2288
2289
2290 \begin_inset Quotes eld
2291 \end_inset
2292
2293 Knuth, 1984
2294 \begin_inset Quotes erd
2295 \end_inset
2296
2297
2298 \begin_inset Quotes eld
2299 \end_inset
2300
2301 1984
2302 \begin_inset Quotes erd
2303 \end_inset
2304
2305  etc.).
2306  Note that both packages need specifically designed style files.
2307  They both ship their own, but there are lots of additional style files,
2308  and there is even an interactive style file builder
2309 \begin_inset Foot
2310 status collapsed
2311
2312 \begin_layout Plain Layout
2313 See 
2314 \begin_inset Flex URL
2315 status open
2316
2317 \begin_layout Plain Layout
2318
2319 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2320 \end_layout
2321
2322 \end_inset
2323
2324
2325 \end_layout
2326
2327 \end_inset
2328
2329  for 
2330 \begin_inset Flex Code
2331 status collapsed
2332
2333 \begin_layout Plain Layout
2334 natbib
2335 \end_layout
2336
2337 \end_inset
2338
2339 .
2340 \end_layout
2341
2342 \begin_layout Subsection
2343 Sectioned Bibliographies
2344 \end_layout
2345
2346 \begin_layout Standard
2347 Sometimes you might need to divide your bibliography into several sections.
2348  If you are for instance a historian, the possibility to separate sources
2349  and scientific works is most likely a 
2350 \begin_inset Quotes eld
2351 \end_inset
2352
2353 must have
2354 \begin_inset Quotes erd
2355 \end_inset
2356
2357 .
2358  Unfortunately, BibTeX itself does not allow you to do this.
2359  But with the help of some LaTeX packages, BibTeX can be extended to fit
2360  your needs.
2361 \end_layout
2362
2363 \begin_layout Standard
2364 LyX provides native support for one of these packages, 
2365 \family typewriter
2366 bibtopic
2367 \family default
2368 .
2369 \begin_inset Foot
2370 status collapsed
2371
2372 \begin_layout Plain Layout
2373 Available from 
2374 \begin_inset Flex URL
2375 status open
2376
2377 \begin_layout Plain Layout
2378
2379 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2380 \end_layout
2381
2382 \end_inset
2383
2384
2385 \end_layout
2386
2387 \end_inset
2388
2389  The advantage of this package (compared to other packages like 
2390 \family typewriter
2391 multibib
2392 \family default
2393 ) is that you don't need to define new citation commands.
2394  Instead, you need to prepare different bibliographic databases which include
2395  the entries for the different sections of the bibliography.
2396  For example: If you want to divide your bibliography into the sections
2397  
2398 \begin_inset Quotes eld
2399 \end_inset
2400
2401 Sources
2402 \begin_inset Quotes erd
2403 \end_inset
2404
2405  and 
2406 \begin_inset Quotes eld
2407 \end_inset
2408
2409 Scientific works
2410 \begin_inset Quotes erd
2411 \end_inset
2412
2413 , you first need to create two bibliographic databases, e.
2414 \begin_inset space \thinspace{}
2415 \end_inset
2416
2417 g.
2418 \begin_inset space \space{}
2419 \end_inset
2420
2421
2422 \begin_inset Flex Code
2423 status collapsed
2424
2425 \begin_layout Plain Layout
2426 sources.bib
2427 \end_layout
2428
2429 \end_inset
2430
2431  and 
2432 \begin_inset Flex Code
2433 status collapsed
2434
2435 \begin_layout Plain Layout
2436 scientific.bib
2437 \end_layout
2438
2439 \end_inset
2440
2441 .
2442  
2443 \end_layout
2444
2445 \begin_layout Standard
2446 Go to 
2447 \begin_inset Flex MenuItem
2448 status collapsed
2449
2450 \begin_layout Plain Layout
2451 Document\SpecialChar \menuseparator
2452 Settings
2453 \end_layout
2454
2455 \end_inset
2456
2457  and check under 
2458 \begin_inset Flex MenuItem
2459 status collapsed
2460
2461 \begin_layout Plain Layout
2462 Bibliography
2463 \end_layout
2464
2465 \end_inset
2466
2467  the option 
2468 \begin_inset Flex MenuItem
2469 status collapsed
2470
2471 \begin_layout Plain Layout
2472 Sectioned bibliography
2473 \end_layout
2474
2475 \end_inset
2476
2477 .
2478  Now you can insert multiple BibTeX bibliographies, one for each section
2479  of your bibliography.
2480  Returning to our example: Insert the BibTeX bibliography 
2481 \begin_inset Flex Code
2482 status collapsed
2483
2484 \begin_layout Plain Layout
2485 sources.bib
2486 \end_layout
2487
2488 \end_inset
2489
2490  and a second one for the database 
2491 \begin_inset Flex Code
2492 status collapsed
2493
2494 \begin_layout Plain Layout
2495 scientific.bib
2496 \end_layout
2497
2498 \end_inset
2499
2500 .
2501  You are free to use the same or different styles for each section.
2502  Additionally, you can choose if the bibliography section should contain
2503  
2504 \begin_inset Quotes eld
2505 \end_inset
2506
2507 all cited references
2508 \begin_inset Quotes erd
2509 \end_inset
2510
2511  of the specified database(s) (which is the default), 
2512 \begin_inset Quotes eld
2513 \end_inset
2514
2515 all uncited references
2516 \begin_inset Quotes erd
2517 \end_inset
2518
2519  or even 
2520 \begin_inset Quotes eld
2521 \end_inset
2522
2523 all references
2524 \begin_inset Quotes erd
2525 \end_inset
2526
2527 .
2528  This might be useful if you would like to separate your bibliography into
2529  three sections: 
2530 \begin_inset Quotes eld
2531 \end_inset
2532
2533 Cited sources
2534 \begin_inset Quotes erd
2535 \end_inset
2536
2537
2538 \begin_inset Quotes eld
2539 \end_inset
2540
2541 Uncited sources
2542 \begin_inset Quotes erd
2543 \end_inset
2544
2545 , and 
2546 \begin_inset Quotes eld
2547 \end_inset
2548
2549 Scientific works
2550 \begin_inset Quotes erd
2551 \end_inset
2552
2553 .
2554  The titles for the sections can be added as ordinary sections or subsections.
2555  Since 
2556 \begin_inset Flex Code
2557 status collapsed
2558
2559 \begin_layout Plain Layout
2560 bibtopic
2561 \end_layout
2562
2563 \end_inset
2564
2565  removes the bibliography title, you have to manually re-add that, too (as
2566  a chapter* or section*, for instance).
2567 \end_layout
2568
2569 \begin_layout Subsection
2570 Multiple Bibliographies
2571 \end_layout
2572
2573 \begin_layout Standard
2574 Multiple bibliographies, e.
2575 \begin_inset space \thinspace{}
2576 \end_inset
2577
2578 g.
2579 \begin_inset space \space{}
2580 \end_inset
2581
2582 a bibliography for each section or chapter of the document, are not supported
2583  by BibTeX itself.
2584  But the 
2585 \begin_inset Flex Code
2586 status collapsed
2587
2588 \begin_layout Plain Layout
2589 bibtopic
2590 \end_layout
2591
2592 \end_inset
2593
2594  package, which is used for the creation of sectioned bibliographies in
2595  LyX (see the previous section), provides an easy way to solve this task,
2596  if you are willing to use some 
2597 \begin_inset Flex MenuItem
2598 status collapsed
2599
2600 \begin_layout Plain Layout
2601 TeX Code
2602 \end_layout
2603
2604 \end_inset
2605
2606  (see section
2607 \begin_inset space ~
2608 \end_inset
2609
2610
2611 \begin_inset CommandInset ref
2612 LatexCommand ref
2613 reference "sec:Inserting-TeX-Code"
2614
2615 \end_inset
2616
2617 ).
2618 \begin_inset Foot
2619 status collapsed
2620
2621 \begin_layout Plain Layout
2622 An alternative approach is to use the 
2623 \begin_inset Flex Code
2624 status collapsed
2625
2626 \begin_layout Plain Layout
2627 chapterbib
2628 \end_layout
2629
2630 \end_inset
2631
2632  or 
2633 \begin_inset Flex Code
2634 status collapsed
2635
2636 \begin_layout Plain Layout
2637 bibunits
2638 \end_layout
2639
2640 \end_inset
2641
2642  package, respectively.
2643 \end_layout
2644
2645 \end_inset
2646
2647
2648 \end_layout
2649
2650 \begin_layout Standard
2651 First go to 
2652 \begin_inset Flex MenuItem
2653 status collapsed
2654
2655 \begin_layout Plain Layout
2656 Document\SpecialChar \menuseparator
2657 Settings
2658 \end_layout
2659
2660 \end_inset
2661
2662  and under 
2663 \begin_inset Flex MenuItem
2664 status collapsed
2665
2666 \begin_layout Plain Layout
2667 Bibliography
2668 \end_layout
2669
2670 \end_inset
2671
2672  check 
2673 \begin_inset Flex MenuItem
2674 status collapsed
2675
2676 \begin_layout Plain Layout
2677 Sectioned bibliography
2678 \end_layout
2679
2680 \end_inset
2681
2682 .
2683  In the document, you have to enclose the sections, which shall contain
2684  their own bibliography (including the BibTeX bibliography itself), between
2685  
2686 \begin_inset Flex Code
2687 status collapsed
2688
2689 \begin_layout Plain Layout
2690
2691 \backslash
2692 begin{btUnit}
2693 \end_layout
2694
2695 \end_inset
2696
2697  and 
2698 \begin_inset Flex Code
2699 status collapsed
2700
2701 \begin_layout Plain Layout
2702
2703 \backslash
2704 end{btUnit}
2705 \end_layout
2706
2707 \end_inset
2708
2709  (those commands have to be inserted as TeX code).
2710  The bibliography will contain all references that have been cited in the
2711  current 
2712 \begin_inset Flex Code
2713 status collapsed
2714
2715 \begin_layout Plain Layout
2716 btUnit
2717 \end_layout
2718
2719 \end_inset
2720
2721 .
2722  
2723 \series bold
2724 Note:
2725 \series default
2726  If you are using this approach, then every citation reference has to be
2727  inside some 
2728 \begin_inset Flex Code
2729 status collapsed
2730
2731 \begin_layout Plain Layout
2732 btUnit
2733 \end_layout
2734
2735 \end_inset
2736
2737 .
2738  Also, the 
2739 \begin_inset Flex Code
2740 status collapsed
2741
2742 \begin_layout Plain Layout
2743 btUnit
2744 \end_layout
2745
2746 \end_inset
2747
2748 s cannot be nested.
2749 \end_layout
2750
2751 \begin_layout Section
2752 Multipart Documents
2753 \end_layout
2754
2755 \begin_layout Subsection
2756 General Operation
2757 \end_layout
2758
2759 \begin_layout Standard
2760 When you are working on a large file with many sections, it is often convenient
2761  to break up the document into several files, or perhaps you have something
2762  where a table may change from time to time, but the preceding text does
2763  not.
2764  In these cases, you should seriously consider using multipart documents.
2765  For example, scientific papers often have five major sections: the introduction
2766 , observations, results, discussion, and conclusion.
2767  Each of these could be its own separate LyX file, with one 
2768 \begin_inset Quotes eld
2769 \end_inset
2770
2771 master
2772 \begin_inset Quotes erd
2773 \end_inset
2774
2775  file which contains the title, authors, abstract, references, etc., plus
2776  the five included files.
2777  It is important to note that each of these files is a full LyX file which
2778  can be formatted and printed on its own, as well as included in a master
2779  file.
2780  Each of these files must have the same document class, however—don't attempt
2781  to mix book classes with article classes.
2782  You may also include LaTeX files; however, these files must not have their
2783  own preamble (i.
2784 \begin_inset space \thinspace{}
2785 \end_inset
2786
2787 e.
2788 \begin_inset space \space{}
2789 \end_inset
2790
2791 everything up to and including the 
2792 \begin_inset Flex Code
2793 status collapsed
2794
2795 \begin_layout Plain Layout
2796
2797 \backslash
2798 begin{document}
2799 \end_layout
2800
2801 \end_inset
2802
2803  line as well as the 
2804 \begin_inset Flex Code
2805 status collapsed
2806
2807 \begin_layout Plain Layout
2808
2809 \backslash
2810 end{document}
2811 \end_layout
2812
2813 \end_inset
2814
2815  line must be deleted) or else errors will be generated when you try to
2816  make a DVI file.
2817 \end_layout
2818
2819 \begin_layout Standard
2820 LyX allows you to include files quite easily with 
2821 \begin_inset Flex MenuItem
2822 status collapsed
2823
2824 \begin_layout Plain Layout
2825 Insert\SpecialChar \menuseparator
2826 ChiId
2827 \begin_inset space ~
2828 \end_inset
2829
2830 Document
2831 \end_layout
2832
2833 \end_inset
2834
2835 .
2836  When you click on this selection a small box is inserted into the file
2837  at the current cursor location.
2838  Clicking on the box raises a dialog which allows you to select the file
2839  to be included, and the method of its inclusion.
2840  
2841 \end_layout
2842
2843 \begin_layout Standard
2844 The file selection box should by now be obvious.
2845  The three inclusion methods are 
2846 \begin_inset Quotes eld
2847 \end_inset
2848
2849 include
2850 \begin_inset Quotes erd
2851 \end_inset
2852
2853
2854 \begin_inset Quotes eld
2855 \end_inset
2856
2857 input
2858 \begin_inset Quotes erd
2859 \end_inset
2860
2861 , and 
2862 \begin_inset Quotes eld
2863 \end_inset
2864
2865 verbatim
2866 \begin_inset Quotes erd
2867 \end_inset
2868
2869 .
2870  The difference between 
2871 \begin_inset Quotes eld
2872 \end_inset
2873
2874 include
2875 \begin_inset Quotes erd
2876 \end_inset
2877
2878  and 
2879 \begin_inset Quotes eld
2880 \end_inset
2881
2882 input
2883 \begin_inset Quotes erd
2884 \end_inset
2885
2886  is really only meaningful to LaTeXperts, but the practical difference is
2887  that files that are 
2888 \begin_inset Quotes eld
2889 \end_inset
2890
2891 included
2892 \begin_inset Quotes erd
2893 \end_inset
2894
2895  are typeset beginning on a new page, while files that are 
2896 \begin_inset Quotes eld
2897 \end_inset
2898
2899 inputted
2900 \begin_inset Quotes erd
2901 \end_inset
2902
2903  are typeset starting on the current page.
2904 \end_layout
2905
2906 \begin_layout Standard
2907 Generally, the master file is converted into a full LaTeX file before typesettin
2908 g, while the included files are converted to LaTeX files that do not have
2909  all the preamble information.
2910 \end_layout
2911
2912 \begin_layout Standard
2913
2914 \begin_inset Quotes eld
2915 \end_inset
2916
2917 verbatim
2918 \begin_inset Quotes erd
2919 \end_inset
2920
2921  included file allows you to include a file typeset exactly as it appears
2922  in the file, i.
2923 \begin_inset space \thinspace{}
2924 \end_inset
2925
2926 e.
2927 \begin_inset space \space{}
2928 \end_inset
2929
2930 in 
2931 \begin_inset Flex Code
2932 status collapsed
2933
2934 \begin_layout Plain Layout
2935 verbatim
2936 \end_layout
2937
2938 \end_inset
2939
2940  mode, with the characters set in a fixed-width typewriter font.
2941  Normally, spaces in this file are invisible, though two consecutive spaces
2942  are conserved, unlike LyX's normal treatment of spaces.
2943  However, setting the 
2944 \begin_inset Flex MenuItem
2945 status collapsed
2946
2947 \begin_layout Plain Layout
2948 Mark
2949 \begin_inset space ~
2950 \end_inset
2951
2952 spaces
2953 \begin_inset space ~
2954 \end_inset
2955
2956 in
2957 \begin_inset space ~
2958 \end_inset
2959
2960 output
2961 \end_layout
2962
2963 \end_inset
2964
2965  checkbox typesets a mark to unambiguously define the presence of a space.
2966  
2967 \end_layout
2968
2969 \begin_layout Subsection
2970 Cross-References Between Files
2971 \end_layout
2972
2973 \begin_layout Standard
2974 \begin_inset Box Shadowbox
2975 position "t"
2976 hor_pos "c"
2977 has_inner_box 1
2978 inner_pos "t"
2979 use_parbox 0
2980 use_makebox 0
2981 width "100col%"
2982 special "none"
2983 height "1in"
2984 height_special "totalheight"
2985 status open
2986
2987 \begin_layout Plain Layout
2988 This section is somewhat out of date.
2989  Need to describe default master documents and how children are opened when
2990  the master is.
2991  [[FIXME]]
2992 \end_layout
2993
2994 \end_inset
2995
2996
2997 \end_layout
2998
2999 \begin_layout Standard
3000 It is possible to set up cross-references between the different files.
3001  First, open all the files in question: let's call them A and B in a two
3002  file example, where B is included in A.
3003  Let's say you insert a label in A, then want to reference it in B.
3004  Open the cross-reference dialog whilst in document B, and you can select
3005  the 
3006 \begin_inset Quotes eld
3007 \end_inset
3008
3009 buffer
3010 \begin_inset Quotes erd
3011 \end_inset
3012
3013  to use.
3014 \end_layout
3015
3016 \begin_layout Subsection
3017 Bibliography Lists in all Subdocuments
3018 \end_layout
3019
3020 \begin_layout Standard
3021 \begin_inset Box Frameless
3022 position "t"
3023 hor_pos "c"
3024 has_inner_box 1
3025 inner_pos "t"
3026 use_parbox 0
3027 use_makebox 0
3028 width "100col%"
3029 special "none"
3030 height "1in"
3031 height_special "totalheight"
3032 status open
3033
3034 \begin_layout Plain Layout
3035 This section also needs updating.
3036  There is now material about this on the wiki, and it could be copied here.
3037 \end_layout
3038
3039 \end_inset
3040
3041
3042 \end_layout
3043
3044 \begin_layout Standard
3045 Copy the bibliography list with all entries to all subdocuments and transform
3046  them to a comment.
3047  This way LyX will find the 
3048 \begin_inset Flex Code
3049 status collapsed
3050
3051 \begin_layout Plain Layout
3052 .bib
3053 \end_layout
3054
3055 \end_inset
3056
3057 -files and you can easily insert references without making the bibliography
3058  list visible.
3059 \end_layout
3060
3061 \begin_layout Standard
3062 As the bibliography list is in a comment, LaTeX won't use it and the references
3063  will look like this: [?], instead of like this: [1].
3064  One solution is to use the LaTeX-package 
3065 \begin_inset Flex Code
3066 status collapsed
3067
3068 \begin_layout Plain Layout
3069 comment
3070 \end_layout
3071
3072 \end_inset
3073
3074  that will only include comments by processing the files separately.
3075  To do this, add in the LaTeX preamble of every subdocument the following:
3076 \end_layout
3077
3078 \begin_layout LyX-Code
3079
3080 \backslash
3081 usepackage{comment}
3082 \end_layout
3083
3084 \begin_layout LyX-Code
3085
3086 \backslash
3087 includecomment{comment}
3088 \end_layout
3089
3090 \begin_layout Standard
3091 See also 
3092 \begin_inset Flex URL
3093 status collapsed
3094
3095 \begin_layout Plain Layout
3096
3097 http://wiki.lyx.org/FAQ/Unsorted#toc31
3098 \end_layout
3099
3100 \end_inset
3101
3102 .
3103 \end_layout
3104
3105 \begin_layout Section
3106 LyX Archives
3107 \end_layout
3108
3109 \begin_layout Standard
3110 Users sometimes need to be able to 
3111 \begin_inset Quotes eld
3112 \end_inset
3113
3114 bundle
3115 \begin_inset Quotes erd
3116 \end_inset
3117
3118  a LyX file together with all the images (and other files) on which it depends,
3119  either for sending to a publisher or for sharing with a co-author.
3120  LyX 2.0 includes a Python script (
3121 \begin_inset Flex Code
3122 status collapsed
3123
3124 \begin_layout Plain Layout
3125 lyxpak.py
3126 \end_layout
3127
3128 \end_inset
3129
3130 ) that automates this process.
3131  To use it, you must have either the 
3132 \begin_inset Flex Code
3133 status collapsed
3134
3135 \begin_layout Plain Layout
3136 zipfile
3137 \end_layout
3138
3139 \end_inset
3140
3141  or 
3142 \begin_inset Flex Code
3143 status collapsed
3144
3145 \begin_layout Plain Layout
3146 tarfile
3147 \end_layout
3148
3149 \end_inset
3150
3151  python modules installed on your system.
3152  By default, the script prefers the 
3153 \begin_inset Flex Code
3154 status collapsed
3155
3156 \begin_layout Plain Layout
3157 gzip
3158 \end_layout
3159
3160 \end_inset
3161
3162 -compressed 
3163 \begin_inset Flex Code
3164 status collapsed
3165
3166 \begin_layout Plain Layout
3167 tar
3168 \end_layout
3169
3170 \end_inset
3171
3172  format on Unix-like systems and the 
3173 \begin_inset Flex Code
3174 status collapsed
3175
3176 \begin_layout Plain Layout
3177 zip
3178 \end_layout
3179
3180 \end_inset
3181
3182  format on Windows.
3183 \end_layout
3184
3185 \begin_layout Standard
3186 LyX's configuration process will set the script up to export a `LyX Archive',
3187  and this format will then be available under 
3188 \begin_inset Flex Code
3189 status collapsed
3190
3191 \begin_layout Plain Layout
3192 File\SpecialChar \menuseparator
3193 Export
3194 \end_layout
3195
3196 \end_inset
3197
3198 .
3199 \end_layout
3200
3201 \begin_layout Standard
3202 Independently of the platform, the generation of a particular archive format
3203  can be forced by adding either the 
3204 \begin_inset Flex Code
3205 status collapsed
3206
3207 \begin_layout Plain Layout
3208 -t
3209 \end_layout
3210
3211 \end_inset
3212
3213  (for the 
3214 \begin_inset Flex Code
3215 status collapsed
3216
3217 \begin_layout Plain Layout
3218 tar
3219 \end_layout
3220
3221 \end_inset
3222
3223  format) or 
3224 \begin_inset Flex Code
3225 status collapsed
3226
3227 \begin_layout Plain Layout
3228 -z
3229 \end_layout
3230
3231 \end_inset
3232
3233  (for the 
3234 \begin_inset Flex Code
3235 status collapsed
3236
3237 \begin_layout Plain Layout
3238 zip
3239 \end_layout
3240
3241 \end_inset
3242
3243  format) switch to the 
3244 \begin_inset Flex Code
3245 status collapsed
3246
3247 \begin_layout Plain Layout
3248 LyX\SpecialChar \menuseparator
3249 LyX Archive
3250 \end_layout
3251
3252 \end_inset
3253
3254  converter in 
3255 \begin_inset Flex Code
3256 status collapsed
3257
3258 \begin_layout Plain Layout
3259 Tools\SpecialChar \menuseparator
3260 Preferences\SpecialChar \menuseparator
3261 File Handling\SpecialChar \menuseparator
3262 Converters
3263 \end_layout
3264
3265 \end_inset
3266
3267 .
3268  (Make sure you add the switch after the script name, not before it.)
3269 \end_layout
3270
3271 \begin_layout Section
3272 Fancy Headers and Footers
3273 \end_layout
3274
3275 \begin_layout Standard
3276 The default page layout is rather plain; for an 
3277 \begin_inset Flex Code
3278 status collapsed
3279
3280 \begin_layout Plain Layout
3281 article
3282 \end_layout
3283
3284 \end_inset
3285
3286  document class, all you get is a centered page number at the bottom of
3287  the page.
3288  This document uses KOMA-script's book class, so it appears to be a bit
3289  fancier.
3290  But to really put on a show, you need to set the document page style to
3291  
3292 \begin_inset Quotes eld
3293 \end_inset
3294
3295 fancy
3296 \begin_inset Quotes erd
3297 \end_inset
3298
3299 , as mentioned in the 
3300 \emph on
3301 User Guide
3302 \emph default
3303 .
3304  This section describes the LaTeX code you need to insert in your LaTeX
3305  preamble in order to get the desired effects.
3306 \end_layout
3307
3308 \begin_layout Standard
3309 For more information on fancy headers, see the 
3310 \begin_inset Flex Code
3311 status collapsed
3312
3313 \begin_layout Plain Layout
3314 fancyhdr
3315 \end_layout
3316
3317 \end_inset
3318
3319  package documentation.
3320  (
3321 \begin_inset Flex URL
3322 status collapsed
3323
3324 \begin_layout Plain Layout
3325
3326 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3327 \end_layout
3328
3329 \end_inset
3330
3331 )
3332 \end_layout
3333
3334 \begin_layout Standard
3335 The page header is divided into three fields, not surprisingly labeled 
3336 \begin_inset Quotes eld
3337 \end_inset
3338
3339 left
3340 \begin_inset Quotes erd
3341 \end_inset
3342
3343
3344 \begin_inset Quotes eld
3345 \end_inset
3346
3347 center
3348 \begin_inset Quotes erd
3349 \end_inset
3350
3351 , and 
3352 \begin_inset Quotes eld
3353 \end_inset
3354
3355 right
3356 \begin_inset Quotes erd
3357 \end_inset
3358
3359 .
3360  The footer is also divided into these three fields.
3361  The LaTeX commands to set these fields in the simplest manner are 
3362 \begin_inset Flex Code
3363 status collapsed
3364
3365 \begin_layout Plain Layout
3366
3367 \backslash
3368 lhead
3369 \end_layout
3370
3371 \end_inset
3372
3373
3374 \begin_inset Flex Code
3375 status collapsed
3376
3377 \begin_layout Plain Layout
3378
3379 \backslash
3380 chead
3381 \end_layout
3382
3383 \end_inset
3384
3385
3386 \begin_inset Flex Code
3387 status collapsed
3388
3389 \begin_layout Plain Layout
3390
3391 \backslash
3392 rhead
3393 \end_layout
3394
3395 \end_inset
3396
3397
3398 \begin_inset Flex Code
3399 status collapsed
3400
3401 \begin_layout Plain Layout
3402
3403 \backslash
3404 lfoot
3405 \end_layout
3406
3407 \end_inset
3408
3409 , etc.
3410  Suppose you wish to put your name in the upper left hand corner of each
3411  page.
3412  Simply insert the following command in the preamble: 
3413 \end_layout
3414
3415 \begin_layout Standard
3416
3417 \family typewriter
3418
3419 \backslash
3420 lhead{John Q.
3421  DocWriter}
3422 \end_layout
3423
3424 \begin_layout Standard
3425 You will now see your name in the upper left.
3426  If a field has a default entry that you would like to get rid of (often
3427  the page number appears in the central footer) simply include a command
3428  with a blank argument, e.
3429 \begin_inset space \thinspace{}
3430 \end_inset
3431
3432 g.:
3433 \end_layout
3434
3435 \begin_layout Standard
3436
3437 \family typewriter
3438
3439 \backslash
3440 cfoot{}
3441 \end_layout
3442
3443 \begin_layout Standard
3444 Let's get really fancy: lets put the section number with the word 
3445 \begin_inset Quotes eld
3446 \end_inset
3447
3448 Section
3449 \begin_inset Quotes erd
3450 \end_inset
3451
3452  (e.
3453 \begin_inset space \thinspace{}
3454 \end_inset
3455
3456 g.
3457 \begin_inset space \space{}
3458 \end_inset
3459
3460 Section 3) in the upper left, the page number (e.
3461 \begin_inset space \thinspace{}
3462 \end_inset
3463
3464 g.
3465 \begin_inset space \space{}
3466 \end_inset
3467
3468 Page 4) in the upper right, your name in the lower left, and the date in
3469  the lower right.
3470  The following commands should now appear in the preamble:
3471 \end_layout
3472
3473 \begin_layout Standard
3474
3475 \family typewriter
3476
3477 \backslash
3478 lhead{Section 
3479 \backslash
3480 thesection}
3481 \end_layout
3482
3483 \begin_layout Standard
3484
3485 \family typewriter
3486
3487 \backslash
3488 chead{}
3489 \end_layout
3490
3491 \begin_layout Standard
3492
3493 \family typewriter
3494
3495 \backslash
3496 rhead{Page 
3497 \backslash
3498 thepage}
3499 \end_layout
3500
3501 \begin_layout Standard
3502
3503 \family typewriter
3504
3505 \backslash
3506 lfoot{John Q.
3507  DocWriter}
3508 \end_layout
3509
3510 \begin_layout Standard
3511
3512 \family typewriter
3513
3514 \backslash
3515 cfoot{}
3516 \end_layout
3517
3518 \begin_layout Standard
3519
3520 \family typewriter
3521
3522 \backslash
3523 rfoot{
3524 \backslash
3525 today}
3526 \end_layout
3527
3528 \begin_layout Standard
3529 The commands 
3530 \begin_inset Flex Code
3531 status collapsed
3532
3533 \begin_layout Plain Layout
3534
3535 \backslash
3536 thesection
3537 \end_layout
3538
3539 \end_inset
3540
3541  and 
3542 \begin_inset Flex Code
3543 status collapsed
3544
3545 \begin_layout Plain Layout
3546
3547 \backslash
3548 thepage
3549 \end_layout
3550
3551 \end_inset
3552
3553  access LaTeX's section and page counters, and so print out the current
3554  section and page numbers.
3555  
3556 \begin_inset Flex Code
3557 status collapsed
3558
3559 \begin_layout Plain Layout
3560
3561 \backslash
3562 today
3563 \end_layout
3564
3565 \end_inset
3566
3567  simply prints out today's date.
3568 \end_layout
3569
3570 \begin_layout Standard
3571 The thicknesses of the horizontal rules drawn beneath the header and above
3572  the footer can also be modified.
3573  If you don't want one of the rules, set its thickness to 0.
3574  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3575  Use commands
3576 \family typewriter
3577  
3578 \family default
3579 like 
3580 \begin_inset Flex Code
3581 status collapsed
3582
3583 \begin_layout Plain Layout
3584
3585 \backslash
3586 renewcommand{
3587 \backslash
3588 headrulewidth}{0.4pt}
3589 \end_layout
3590
3591 \end_inset
3592
3593  and 
3594 \begin_inset Flex Code
3595 status collapsed
3596
3597 \begin_layout Plain Layout
3598
3599 \backslash
3600 renewcommand{
3601 \backslash
3602 footrulewidth}{0.4pt}
3603 \end_layout
3604
3605 \end_inset
3606
3607  to set the thicknesses.
3608 \end_layout
3609
3610 \begin_layout Standard
3611 You can switch the header/footer settings on and off for individual pages
3612  using commands like 
3613 \begin_inset Flex Code
3614 status collapsed
3615
3616 \begin_layout Plain Layout
3617
3618 \backslash
3619 thispagestyle{empty}
3620 \end_layout
3621
3622 \end_inset
3623
3624
3625 \begin_inset Flex Code
3626 status collapsed
3627
3628 \begin_layout Plain Layout
3629
3630 \backslash
3631 thispagestyle{plain}
3632 \end_layout
3633
3634 \end_inset
3635
3636 , and 
3637 \begin_inset Flex Code
3638 status collapsed
3639
3640 \begin_layout Plain Layout
3641
3642 \backslash
3643 thispagestyle{fancy}
3644 \end_layout
3645
3646 \end_inset
3647
3648 .
3649  Simply insert them in the text on the page you want changed and mark them
3650  as TeX code.
3651  In fact, title pages are marked as plain by default, while following pages
3652  are marked fancy when using the global fancy setting.
3653 \end_layout
3654
3655 \begin_layout Standard
3656 As a final example, it is possible to include an image in the header or
3657  footer.
3658  Suppose you want to put a company logo in the upper lefthand corner.
3659  You might try something like
3660 \end_layout
3661
3662 \begin_layout Standard
3663
3664 \family typewriter
3665
3666 \backslash
3667 lhead{
3668 \backslash
3669 resizebox{1in}{!}{
3670 \backslash
3671 includegraphics{logo.eps}}}
3672 \end_layout
3673
3674 \begin_layout Standard
3675 \noindent
3676 (you may need to preface this with 
3677 \begin_inset Flex Code
3678 status collapsed
3679
3680 \begin_layout Plain Layout
3681 \noindent
3682
3683 \backslash
3684 usepackage{graphics}
3685 \end_layout
3686
3687 \end_inset
3688
3689  if you don't include graphics elsewhere in your document).
3690 \end_layout
3691
3692 \begin_layout Section
3693 Itemize Bullet Selection
3694 \begin_inset CommandInset label
3695 LatexCommand label
3696 name "sec:bullet"
3697
3698 \end_inset
3699
3700
3701 \end_layout
3702
3703 \begin_layout Standard
3704 by
3705 \noun on
3706  Allan Rae
3707 \end_layout
3708
3709 \begin_layout Subsection
3710 Introduction
3711 \end_layout
3712
3713 \begin_layout Standard
3714 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3715  Using this dialog you can easily specify what bullet shape to use at each
3716  level of an itemized list.
3717  These settings are document-wide so you won't be able to specify different
3718  sets of bullets for different paragraphs.
3719 \begin_inset Foot
3720 status collapsed
3721
3722 \begin_layout Plain Layout
3723 Well, actually you can but you'll have to do it by hand.
3724 \end_layout
3725
3726 \end_inset
3727
3728
3729 \end_layout
3730
3731 \begin_layout Subsection
3732 How it looks
3733 \end_layout
3734
3735 \begin_layout Standard
3736 Open the dialog by selecting the 
3737 \begin_inset Flex MenuItem
3738 status collapsed
3739
3740 \begin_layout Plain Layout
3741 Document\SpecialChar \menuseparator
3742 Settings
3743 \end_layout
3744
3745 \end_inset
3746
3747  menu item and then select the 
3748 \begin_inset Flex MenuItem
3749 status collapsed
3750
3751 \begin_layout Plain Layout
3752 Bullets
3753 \end_layout
3754
3755 \end_inset
3756
3757  tab.
3758 \end_layout
3759
3760 \begin_layout Standard
3761 The dialog provides you with a table of bullet shapes.
3762  A column of buttons on the left of the table provides access to the six
3763  different panels of bullet shapes.
3764  The row of buttons across the top is used to select which bullet depth
3765  you are changing.
3766  A text entry under the table shows the currently selected bullet shape's
3767  LaTeX equivalent and this can be edited if desired.
3768  If you do modify the text you will also need to specify any needed packages
3769  in the LaTeX preamble.
3770 \end_layout
3771
3772 \begin_layout Standard
3773 The six panels are divided up by the packages they require.
3774  The following table shows the mappings from button name to LaTeX package.
3775 \end_layout
3776
3777 \begin_layout Standard
3778 \align center
3779 \begin_inset Tabular
3780 <lyxtabular version="3" rows="7" columns="2">
3781 <features rotate="0" tabularvalignment="middle">
3782 <column alignment="center" valignment="top" width="0pt">
3783 <column alignment="center" valignment="top" width="0pt">
3784 <row>
3785 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3786 \begin_inset Text
3787
3788 \begin_layout Plain Layout
3789
3790 \family roman
3791 \series medium
3792 \shape up
3793 \size normal
3794 \emph off
3795 \bar no
3796 \noun off
3797 \color none
3798 Button
3799 \end_layout
3800
3801 \end_inset
3802 </cell>
3803 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3804 \begin_inset Text
3805
3806 \begin_layout Plain Layout
3807
3808 \family roman
3809 \series medium
3810 \shape up
3811 \size normal
3812 \emph off
3813 \bar no
3814 \noun off
3815 \color none
3816 Packages Required
3817 \end_layout
3818
3819 \end_inset
3820 </cell>
3821 </row>
3822 <row>
3823 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3824 \begin_inset Text
3825
3826 \begin_layout Plain Layout
3827
3828 \family sans
3829 \series medium
3830 \shape up
3831 \size normal
3832 \emph off
3833 \bar no
3834 \noun off
3835 \color none
3836 Standard
3837 \end_layout
3838
3839 \end_inset
3840 </cell>
3841 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3842 \begin_inset Text
3843
3844 \begin_layout Plain Layout
3845
3846 \series medium
3847 \shape up
3848 \size normal
3849 \emph off
3850 \bar no
3851 \noun off
3852 \color none
3853 base LaTeX
3854 \end_layout
3855
3856 \end_inset
3857 </cell>
3858 </row>
3859 <row>
3860 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3861 \begin_inset Text
3862
3863 \begin_layout Plain Layout
3864
3865 \family sans
3866 \series medium
3867 \shape up
3868 \size normal
3869 \emph off
3870 \bar no
3871 \noun off
3872 \color none
3873 Maths
3874 \end_layout
3875
3876 \end_inset
3877 </cell>
3878 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3879 \begin_inset Text
3880
3881 \begin_layout Plain Layout
3882
3883 \family typewriter
3884 \series medium
3885 \shape up
3886 \size normal
3887 \emph off
3888 \bar no
3889 \noun off
3890 \color none
3891 amssymb.sty
3892 \end_layout
3893
3894 \end_inset
3895 </cell>
3896 </row>
3897 <row>
3898 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3899 \begin_inset Text
3900
3901 \begin_layout Plain Layout
3902
3903 \family sans
3904 \series medium
3905 \shape up
3906 \size normal
3907 \emph off
3908 \bar no
3909 \noun off
3910 \color none
3911 Ding1
3912 \end_layout
3913
3914 \end_inset
3915 </cell>
3916 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3917 \begin_inset Text
3918
3919 \begin_layout Plain Layout
3920
3921 \family typewriter
3922 \series medium
3923 \shape up
3924 \size normal
3925 \emph off
3926 \bar no
3927 \noun off
3928 \color none
3929 pifont.sty
3930 \end_layout
3931
3932 \end_inset
3933 </cell>
3934 </row>
3935 <row>
3936 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3937 \begin_inset Text
3938
3939 \begin_layout Plain Layout
3940
3941 \family sans
3942 \series medium
3943 \shape up
3944 \size normal
3945 \emph off
3946 \bar no
3947 \noun off
3948 \color none
3949 Ding2
3950 \end_layout
3951
3952 \end_inset
3953 </cell>
3954 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3955 \begin_inset Text
3956
3957 \begin_layout Plain Layout
3958
3959 \family typewriter
3960 \series medium
3961 \shape up
3962 \size normal
3963 \emph off
3964 \bar no
3965 \noun off
3966 \color none
3967 pifont.sty
3968 \end_layout
3969
3970 \end_inset
3971 </cell>
3972 </row>
3973 <row>
3974 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3975 \begin_inset Text
3976
3977 \begin_layout Plain Layout
3978
3979 \family sans
3980 \series medium
3981 \shape up
3982 \size normal
3983 \emph off
3984 \bar no
3985 \noun off
3986 \color none
3987 Ding3
3988 \end_layout
3989
3990 \end_inset
3991 </cell>
3992 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3993 \begin_inset Text
3994
3995 \begin_layout Plain Layout
3996
3997 \family typewriter
3998 \series medium
3999 \shape up
4000 \size normal
4001 \emph off
4002 \bar no
4003 \noun off
4004 \color none
4005 pifont.sty
4006 \end_layout
4007
4008 \end_inset
4009 </cell>
4010 </row>
4011 <row>
4012 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4013 \begin_inset Text
4014
4015 \begin_layout Plain Layout
4016
4017 \family sans
4018 \series medium
4019 \shape up
4020 \size normal
4021 \emph off
4022 \bar no
4023 \noun off
4024 \color none
4025 Ding4
4026 \end_layout
4027
4028 \end_inset
4029 </cell>
4030 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4031 \begin_inset Text
4032
4033 \begin_layout Plain Layout
4034
4035 \family typewriter
4036 \series medium
4037 \shape up
4038 \size normal
4039 \emph off
4040 \bar no
4041 \noun off
4042 \color none
4043 pifont.sty
4044 \end_layout
4045
4046 \end_inset
4047 </cell>
4048 </row>
4049 </lyxtabular>
4050
4051 \end_inset
4052
4053
4054 \end_layout
4055
4056 \begin_layout Standard
4057 LyX doesn't stop you using bullets from packages you don't have.
4058  If you get errors from LaTeX when you try to view or print the file, then
4059  it is likely you are missing a package.
4060 \begin_inset Foot
4061 status collapsed
4062
4063 \begin_layout Plain Layout
4064 LyX doesn't restrict your use since you may be editing locally and exporting
4065  elsewhere.
4066 \end_layout
4067
4068 \end_inset
4069
4070
4071 \end_layout
4072
4073 \begin_layout Subsection
4074 How to use it
4075 \end_layout
4076
4077 \begin_layout Standard
4078 Select which bullet depth you want to change then select the bullet shape
4079  and size.
4080  Any changes will not be visible in LyX, but are visible when viewing the
4081  document.
4082 \end_layout
4083
4084 \begin_layout Standard
4085 You can reset a bullet shape to the default simply by clicking your right
4086  mouse button on the appropriate bullet depth button.
4087 \begin_inset Foot
4088 status collapsed
4089
4090 \begin_layout Plain Layout
4091 If you 
4092 \emph on
4093 really
4094 \emph default
4095  want to have multiple sets of paragraphs with different sets of bullets
4096  in each, then you're going to have to get your hands dirty with TeX code.
4097  The bullet selection dialog can help though because it provides you with
4098  the LaTeX code for a wide range of bullet shapes.
4099  To make your own custom paragraphs you have the following options:
4100 \end_layout
4101
4102 \begin_layout Plain Layout
4103 \begin_inset ERT
4104 status open
4105
4106 \begin_layout Plain Layout
4107
4108
4109 \backslash
4110 let
4111 \backslash
4112 savelabelitemi=
4113 \backslash
4114 labelitemi
4115 \end_layout
4116
4117 \end_inset
4118
4119
4120 \end_layout
4121
4122 \begin_layout Plain Layout
4123 \begin_inset ERT
4124 status open
4125
4126 \begin_layout Plain Layout
4127
4128
4129 \backslash
4130 renewcommand
4131 \backslash
4132 labelitemi[0]{
4133 \backslash
4134 small
4135 \backslash
4136 (
4137 \backslash
4138 sharp
4139 \backslash
4140 )}
4141 \end_layout
4142
4143 \end_inset
4144
4145
4146 \end_layout
4147
4148 \begin_layout Itemize
4149 Use the LaTeX command 
4150 \begin_inset Flex Code
4151 status collapsed
4152
4153 \begin_layout Plain Layout
4154
4155 \backslash
4156 renewcommand{}{}
4157 \end_layout
4158
4159 \end_inset
4160
4161  to specify a new bullet shape for a given depth.
4162  You'll also need to save the current bullet shape so you can restore it
4163  again afterwards.
4164  In this itemized list the following LaTeX code was used to change the bullet
4165  used for the first depth.
4166 \end_layout
4167
4168 \begin_deeper
4169 \begin_layout LyX-Code
4170
4171 \backslash
4172 let
4173 \backslash
4174 savelabelitemi=
4175 \backslash
4176 labelitemi 
4177 \end_layout
4178
4179 \begin_layout LyX-Code
4180
4181 \backslash
4182 renewcommand
4183 \backslash
4184 labelitemi[0]{
4185 \backslash
4186 small
4187 \backslash
4188 (
4189 \backslash
4190 sharp
4191 \backslash
4192 )}
4193 \end_layout
4194
4195 \end_deeper
4196 \begin_layout Itemize
4197 Note that the itemize depth is specified in Roman numerals as part of the
4198  
4199 \family typewriter
4200
4201 \backslash
4202 labelitem
4203 \family default
4204  command.
4205 \end_layout
4206
4207 \begin_layout Itemize
4208 \begin_inset ERT
4209 status open
4210
4211 \begin_layout Plain Layout
4212
4213 [
4214 \backslash
4215 (
4216 \backslash
4217 star
4218 \backslash
4219 )]
4220 \end_layout
4221
4222 \end_inset
4223
4224  Specify each individual entry by starting each item with the bullet shape
4225  enclosed in square brackets and set as 
4226 \begin_inset Flex MenuItem
4227 status collapsed
4228
4229 \begin_layout Plain Layout
4230 TeX Code
4231 \end_layout
4232
4233 \end_inset
4234
4235 .
4236  For example, this item was started with 
4237 \begin_inset Flex Code
4238 status collapsed
4239
4240 \begin_layout Plain Layout
4241 [
4242 \backslash
4243 (
4244 \backslash
4245 star
4246 \backslash
4247 )]
4248 \end_layout
4249
4250 \end_inset
4251
4252 .
4253 \end_layout
4254
4255 \begin_layout Plain Layout
4256 \begin_inset ERT
4257 status open
4258
4259 \begin_layout Plain Layout
4260
4261
4262 \backslash
4263 renewcommand
4264 \backslash
4265 labelitemi[0]{
4266 \backslash
4267 savelabelitemi}
4268 \end_layout
4269
4270 \end_inset
4271
4272
4273 \end_layout
4274
4275 \begin_layout Plain Layout
4276 You'll also need to revert the labelitem back to its previous setting for
4277  the global bullet shape settings to remain in effect.
4278  The way used here was:
4279 \end_layout
4280
4281 \begin_layout LyX-Code
4282
4283 \backslash
4284 renewcommand
4285 \backslash
4286 labelitemi[0]{
4287 \backslash
4288 savelabelitemi}
4289 \end_layout
4290
4291 \end_inset
4292
4293
4294 \end_layout
4295
4296 \begin_layout Chapter
4297 LyX and the World Wide Web
4298 \end_layout
4299
4300 \begin_layout Standard
4301 LyX has long supported the export of documents to various web-friendly formats,
4302  such as HTML.
4303  Before verson 2.0, however, HTML export was always accomplished by the use
4304  of external converters.
4305 \begin_inset Foot
4306 status collapsed
4307
4308 \begin_layout Plain Layout
4309 For details on the use of external converters with LyX, see the 
4310 \emph on
4311 Converters
4312 \emph default
4313  section of the Customization manual.
4314 \end_layout
4315
4316 \end_inset
4317
4318  These fall into two large groups: there are converters that use LaTeX as
4319  an intermediate format, such as 
4320 \begin_inset Flex Code
4321 status collapsed
4322
4323 \begin_layout Plain Layout
4324 htlatex
4325 \end_layout
4326
4327 \end_inset
4328
4329
4330 \begin_inset Flex Code
4331 status collapsed
4332
4333 \begin_layout Plain Layout
4334 html2latex
4335 \end_layout
4336
4337 \end_inset
4338
4339 , and 
4340 \begin_inset Flex Code
4341 status collapsed
4342
4343 \begin_layout Plain Layout
4344 plastex
4345 \end_layout
4346
4347 \end_inset
4348
4349 , relying upon LyX to produce the LaTeX; and there is a converter that works
4350  directly on LyX files, 
4351 \begin_inset Flex Code
4352 status collapsed
4353
4354 \begin_layout Plain Layout
4355 eLyXer
4356 \end_layout
4357
4358 \end_inset
4359
4360 .
4361  All of these have different advantages and disadvantages.
4362  
4363 \end_layout
4364
4365 \begin_layout Standard
4366 The LaTeX-based converters have the advantage that, in principle, they know
4367  everything about the exported document that LaTeX does.
4368  Such converters do not care, for example, if a certain block of code was
4369  produced by LyX or was Evil Red Text.
4370  These converters know about 
4371 \begin_inset Flex Code
4372 status collapsed
4373
4374 \begin_layout Plain Layout
4375 aux
4376 \end_layout
4377
4378 \end_inset
4379
4380  files, counters, and references, and can often make use of the 
4381 \begin_inset Flex Code
4382 status collapsed
4383
4384 \begin_layout Plain Layout
4385 bbl
4386 \end_layout
4387
4388 \end_inset
4389
4390  files generated by BibTeX.
4391  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4392  said that only TeX itself understands TeX---and LaTeX-based converters
4393  will often choke on what seem to be quite simple constructs; complex ones
4394  can throw them completely, and as of this writing, for example, the 
4395 \emph on
4396 Embedded Objects
4397 \emph default
4398  manual will not export with 
4399 \begin_inset Flex Code
4400 status collapsed
4401
4402 \begin_layout Plain Layout
4403 htlatex
4404 \end_layout
4405
4406 \end_inset
4407
4408 , though the others will.
4409  The other issue concerns how math is handled.
4410  These converters typically convert the formulae into little pictures that
4411  are then linked from the HTML document.
4412  Since these are actually generated by LaTeX, they are accurate.
4413  But they do not scale well, and just getting them to look as if they are
4414  actually meant to be in your document---so that the font sizes seem to
4415  be roughly the same---can be a challenge.
4416 \end_layout
4417
4418 \begin_layout Standard
4419 Alex Fernandez's 
4420 \begin_inset Flex Code
4421 status collapsed
4422
4423 \begin_layout Plain Layout
4424 eLyXer
4425 \end_layout
4426
4427 \end_inset
4428
4429  (
4430 \begin_inset CommandInset href
4431 LatexCommand href
4432 name "http://elyxer.nongnu.org/"
4433 target "http://elyxer.nongnu.org/"
4434
4435 \end_inset
4436
4437 ) solves some of these problems.
4438  In particular, the formulae it produces scale perfectly, since it renders
4439  math using a combination of HTML and CSS rather than converting the formulae
4440  to images.
4441  But even moderately complex formula are rendered less well than with 
4442 \begin_inset Flex Code
4443 status collapsed
4444
4445 \begin_layout Plain Layout
4446 htlatex
4447 \end_layout
4448
4449 \end_inset
4450
4451 ; this reflects the limitations of HTML.
4452 \begin_inset Foot
4453 status collapsed
4454
4455 \begin_layout Plain Layout
4456 That said, 
4457 \begin_inset Flex Code
4458 status collapsed
4459
4460 \begin_layout Plain Layout
4461 eLyXer
4462 \end_layout
4463
4464 \end_inset
4465
4466  can also use jsMath and MathJax for equations, but this setting is only
4467  available globally and requires one to have access to a server that runs
4468  the backend.
4469 \end_layout
4470
4471 \end_inset
4472
4473  More importantly (as of version 1.1.1, at least), 
4474 \begin_inset Flex Code
4475 status collapsed
4476
4477 \begin_layout Plain Layout
4478 eLyXer
4479 \end_layout
4480
4481 \end_inset
4482
4483  has limited support for math macros and no support for user-defined paragraph
4484  or character styles.
4485  These limitations make 
4486 \begin_inset Flex Code
4487 status collapsed
4488
4489 \begin_layout Plain Layout
4490 eLyXer
4491 \end_layout
4492
4493 \end_inset
4494
4495  unsuitable for many of the documents LyX users produce.
4496  In principle, of course, these problems could be solved, but the LyX developers
4497  have decided to follow a different path and have made LyX itself capable
4498  of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4499  plaintext.
4500 \end_layout
4501
4502 \begin_layout Standard
4503 As of this writing, XHTML output remains under development and should probably
4504  be regarded as 
4505 \begin_inset Quotes eld
4506 \end_inset
4507
4508 experimental
4509 \begin_inset Quotes erd
4510 \end_inset
4511
4512 .
4513 \begin_inset Foot
4514 status collapsed
4515
4516 \begin_layout Plain Layout
4517 The file 
4518 \begin_inset Flex Code
4519 status collapsed
4520
4521 \begin_layout Plain Layout
4522 development/HTML.notes
4523 \end_layout
4524
4525 \end_inset
4526
4527 , which can be found in the LyX source tree or 
4528 \begin_inset CommandInset href
4529 LatexCommand href
4530 name "accessed online"
4531 target "http://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
4532
4533 \end_inset
4534
4535 , usually contains up-to-date information about the state of XHTML output.
4536  See also the list of XHTML bugs on 
4537 \begin_inset CommandInset href
4538 LatexCommand href
4539 name "the bug tracker"
4540 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"
4541
4542 \end_inset
4543
4544 .
4545 \end_layout
4546
4547 \end_inset
4548
4549  Still, the developers have chosen this approach because it has several
4550  potential advantages over the other two.
4551 \end_layout
4552
4553 \begin_layout Standard
4554 These advantages are primarily due to the fact that the XHTML output routines,
4555  since they are part of LyX, know everything LyX knows about the document
4556  being exported.
4557 \begin_inset Foot
4558 status collapsed
4559
4560 \begin_layout Plain Layout
4561 Another advantage is that, since these routines are internal to LyX, they
4562  are immune to changes in LyX's file format, or to changes in the semantics
4563  of existing insets.
4564 \end_layout
4565
4566 \end_inset
4567
4568  So they know about the table of contents (as displayed in the outline),
4569  about the counters associated with different paragraph styles, and about
4570  user-defined styles.
4571  The XHTML output routines know what LyX knows about internationalization,
4572  too, so they will output 
4573 \begin_inset Quotes eld
4574 \end_inset
4575
4576 Chapter 1
4577 \begin_inset Quotes erd
4578 \end_inset
4579
4580  or 
4581 \begin_inset Quotes eld
4582 \end_inset
4583
4584
4585 \lang ngerman
4586 Kapitel
4587 \lang english
4588  1
4589 \begin_inset Quotes erd
4590 \end_inset
4591
4592 , depending upon the language in effect at the time.
4593  
4594 \end_layout
4595
4596 \begin_layout Standard
4597 Quite generally, the output routines know what LyX knows about document
4598  layout, that is, about how the document is to be rendered on screen.
4599  We use this information when we output the document as XHTML.
4600  In particular, LyX 
4601 \emph on
4602 automatically
4603 \emph default
4604  generates CSS style information corresponding to the layout information
4605  it uses to render the document on screen: if section headings are supposed
4606  to be sans-serif and bold as seen in LyX, then (by default) they will be
4607  sans-serif and bold when viewed in a web browser, too.
4608  And this is true not just for pre-defined styles, like Section, but for
4609  any style, including user-defined styles.
4610  Indeed, the XHTML output routines make no distinction between user-defined
4611  paragraph and character styles and LyX's own pre-defined styles: in each
4612  case, everything LyX knows about the styles is contained in the layout
4613  files.
4614  And much the same is true as regards pre-defined textual insets, such as
4615  footnotes, and various custom insets.
4616  
4617 \end_layout
4618
4619 \begin_layout Standard
4620 The result is that XHTML output can be customized and extended in exactly
4621  the same way LaTeX output can be customized and extended: through layout
4622  files and modules.
4623  See chapter five of the 
4624 \emph on
4625 Customization 
4626 \emph default
4627 manual for the details.
4628 \end_layout
4629
4630 \begin_layout Standard
4631 The remainder of this chapter contains more detailed information on XHTML
4632  output, its limitations, and ways to work around those limitations.
4633 \end_layout
4634
4635 \begin_layout Section
4636 Math Output in XHTML
4637 \end_layout
4638
4639 \begin_layout Standard
4640 LyX offers four choices for how math is rendered.
4641  These have various advantages and disadvantages:
4642 \end_layout
4643
4644 \begin_layout Itemize
4645 MathML
4646 \begin_inset Newline newline
4647 \end_inset
4648
4649 MathML is a dialect of XML designed specifically for mathematics on the
4650  web, and it typically renders very well in browsers that support it.
4651  The disadvantage is that not all browsers support MathML, and support is
4652  not complete even in the Gecko-based browsers, such as Firefox.
4653 \begin_inset Newline newline
4654 \end_inset
4655
4656 If LyX is unable to render a formula as MathML---for example, if the formula
4657  uses the 
4658 \begin_inset Flex Code
4659 status collapsed
4660
4661 \begin_layout Plain Layout
4662 xymatrix
4663 \end_layout
4664
4665 \end_inset
4666
4667  package or ERT---then it will instead output the formula as an image.
4668  
4669 \end_layout
4670
4671 \begin_layout Itemize
4672 HTML
4673 \begin_inset Newline newline
4674 \end_inset
4675
4676 As mentioned above, 
4677 \begin_inset Flex Code
4678 status collapsed
4679
4680 \begin_layout Plain Layout
4681 elyxer
4682 \end_layout
4683
4684 \end_inset
4685
4686  outputs math as HTML, styled by CSS.
4687 \begin_inset Foot
4688 status collapsed
4689
4690 \begin_layout Plain Layout
4691 LyX has borrowed some of the CSS for its HTML output from 
4692 \begin_inset Flex Code
4693 status collapsed
4694
4695 \begin_layout Plain Layout
4696 elyxer
4697 \end_layout
4698
4699 \end_inset
4700
4701 .
4702 \end_layout
4703
4704 \end_inset
4705
4706  For simple formulae, this can work quite well, though with more complicated
4707  formulae it tends to break down.
4708  Still, this method has the advantage that it is very widely supported and
4709  so it may be appropriate for documents that contain only a little, fairly
4710  simple math.
4711 \begin_inset Newline newline
4712 \end_inset
4713
4714 If Lyx is unable to render a formula as HTML---for example, if the formula
4715  uses the 
4716 \begin_inset Flex Code
4717 status collapsed
4718
4719 \begin_layout Plain Layout
4720 xymatrix
4721 \end_layout
4722
4723 \end_inset
4724
4725  package or ERT---then it will instead output the formula as an image.
4726  
4727 \end_layout
4728
4729 \begin_layout Itemize
4730 Images
4731 \begin_inset Newline newline
4732 \end_inset
4733
4734 Like 
4735 \begin_inset Flex Code
4736 status collapsed
4737
4738 \begin_layout Plain Layout
4739 htlatex
4740 \end_layout
4741
4742 \end_inset
4743
4744 , LyX will output formulae as images, the very same images, in fact, that
4745  are used for instant preview.
4746 \begin_inset Foot
4747 status collapsed
4748
4749 \begin_layout Plain Layout
4750 Instant preview does 
4751 \emph on
4752 not 
4753 \emph default
4754 have to be on for images to be output, however.
4755 \end_layout
4756
4757 \end_inset
4758
4759  The advantage to this method is that the images are simply generated by
4760  LaTeX, so they are very accurate.
4761  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4762  so they do not scale terribly well, and one cannot copy them, etc.
4763  (As of this writing, there are also problems about equation numbering.
4764  See 
4765 \begin_inset CommandInset href
4766 LatexCommand href
4767 name "bug 6894"
4768 target "http://www.lyx.org/trac/ticket/6894"
4769
4770 \end_inset
4771
4772 .)
4773 \begin_inset Newline newline
4774 \end_inset
4775
4776 The size of the images can be controlled by setting the 
4777 \begin_inset Quotes eld
4778 \end_inset
4779
4780 Math Images Scaling
4781 \begin_inset Quotes erd
4782 \end_inset
4783
4784  parameter under 
4785 \begin_inset Flex MenuItem
4786 status collapsed
4787
4788 \begin_layout Plain Layout
4789 Document\SpecialChar \menuseparator
4790 Settings\SpecialChar \menuseparator
4791 Output
4792 \end_layout
4793
4794 \end_inset
4795
4796 .
4797 \begin_inset Foot
4798 status collapsed
4799
4800 \begin_layout Plain Layout
4801 For those who want to know, this controls the resolution of the image in
4802  dots per inch and is based upon a default of 75 dpi.
4803 \end_layout
4804
4805 \end_inset
4806
4807
4808 \begin_inset Newline newline
4809 \end_inset
4810
4811 If LyX for some reason fails to create an image for a formula (e.g., if a
4812  required LaTeX package is not installed), then it will fall back to outputing
4813  the raw LaTeX.
4814 \end_layout
4815
4816 \begin_layout Itemize
4817 LaTeX
4818 \begin_inset Newline newline
4819 \end_inset
4820
4821 Finally, LyX will happily output math as LaTeX.
4822  As well as being the output of last resort, this method can be used with
4823  such tools as 
4824 \begin_inset CommandInset href
4825 LatexCommand href
4826 name "jsMath"
4827 target "http://www.math.union.edu/~dpvc/jsMath/"
4828
4829 \end_inset
4830
4831 , which uses JavaScript to render LaTeX embedded in HTML documents.
4832  LyX wraps the LaTeX in either a 
4833 \begin_inset Flex Code
4834 status collapsed
4835
4836 \begin_layout Plain Layout
4837 span
4838 \end_layout
4839
4840 \end_inset
4841
4842  (for inline formulas) or 
4843 \begin_inset Flex Code
4844 status collapsed
4845
4846 \begin_layout Plain Layout
4847 div
4848 \end_layout
4849
4850 \end_inset
4851
4852  (for displayed formulas) with 
4853 \begin_inset Flex Code
4854 status collapsed
4855
4856 \begin_layout Plain Layout
4857 class='math'
4858 \end_layout
4859
4860 \end_inset
4861
4862 , as is required for jsMath.
4863 \end_layout
4864
4865 \begin_layout Standard
4866 One of these output methods must be selected under 
4867 \begin_inset Flex MenuItem
4868 status collapsed
4869
4870 \begin_layout Plain Layout
4871 Document\SpecialChar \menuseparator
4872 Settings\SpecialChar \menuseparator
4873 Output
4874 \end_layout
4875
4876 \end_inset
4877
4878 .
4879  By default, LyX outputs MathML.
4880  This is a document-wide setting, therefore.
4881 \end_layout
4882
4883 \begin_layout Standard
4884 Eventually, LyX will offer the user the option to select an alternate output
4885  method for a particular inset, say, one that isn't being rendered very
4886  well by MathML.
4887 \begin_inset Foot
4888 status collapsed
4889
4890 \begin_layout Plain Layout
4891 That said, since LyX falls back to images if the inset contains ERT, then
4892  one can force output as an image by putting some harmless ERT into the
4893  math, for example: 
4894 \begin_inset Formula $a=b\relax$
4895 \end_inset
4896
4897 .
4898 \end_layout
4899
4900 \end_inset
4901
4902
4903 \end_layout
4904
4905 \begin_layout Section
4906 Bibliography and Citations
4907 \end_layout
4908
4909 \begin_layout Standard
4910 XHTML output fully supports bibliographies and citations.
4911  
4912 \end_layout
4913
4914 \begin_layout Standard
4915 Citation labels are generated by the same machinery that generates LyX's
4916  on-screen labels, so the labels will look in the output much as they do
4917  in LyX, though better.
4918  If you are using numerical citations, then LyX will output numerical labels,
4919  such as [1] or [17], rather than simply showing the citation key in square
4920  brackets, as it does on-screen.
4921  If you are using author-year citations, then LyX will add lowercase letters
4922  to the years, just as BibTeX does, if it finds more than one citation for
4923  a given author-year combination.
4924  The labels will be printed with the bibliography entries.
4925  Note that there is, at present, no way to customize the appearance of the
4926  labels, for example, to choose between square brackets and parentheses.
4927 \end_layout
4928
4929 \begin_layout Standard
4930 Bibliography output is handled by the same machinery that handles the presentati
4931 on of reference information in the citation dialog, so you will see in the
4932  XHTML output pretty much what you would see if you were to look at a given
4933  entry in the citation dialog.
4934  The formatting can be customized in your layout file or, preferably, in
4935  a module.
4936  See the 
4937 \emph on
4938 Customization
4939 \emph default
4940  manual for the details.
4941 \end_layout
4942
4943 \begin_layout Standard
4944 The main defect at present is that cross-referenced information is printed
4945  with every entry with which it is associated.
4946  So you can see things like this:
4947 \end_layout
4948
4949 \begin_layout Quote
4950 Jason Stanley, 
4951 \begin_inset Quotes eld
4952 \end_inset
4953
4954 Context and Logical Form
4955 \begin_inset Quotes erd
4956 \end_inset
4957
4958 , in 
4959 \emph on
4960 Language in Context: Selected Essays
4961 \emph default
4962  (Oxford: Oxford University Press, 2007), pp.
4963  30--68.
4964 \end_layout
4965
4966 \begin_layout Quote
4967 Jason Stanley, 
4968 \begin_inset Quotes eld
4969 \end_inset
4970
4971 Semantics in Context
4972 \begin_inset Quotes erd
4973 \end_inset
4974
4975 , in 
4976 \emph on
4977 Language in Context: Selected Essays
4978 \emph default
4979  (Oxford: Oxford University Press, 2007), pp.
4980  201--30.
4981 \end_layout
4982
4983 \begin_layout Standard
4984 This should be fixed before long.
4985 \end_layout
4986
4987 \begin_layout Standard
4988 There is no support at present for sectioned bibliographies.
4989  If you have multiple bibliographies, then LyX will print the same bibliography
4990  over and over.
4991 \end_layout
4992
4993 \begin_layout Section
4994 Indexes
4995 \end_layout
4996
4997 \begin_layout Standard
4998 LyX will happily export indexes as XHTML, but with certain limitations at
4999  the moment.
5000 \end_layout
5001
5002 \begin_layout Standard
5003 Index export will be most reliable when you do not attempt to use the fancy
5004  constructs that are described in the section on indexes in the 
5005 \emph on
5006 User's Guide
5007 \emph default
5008 .
5009 \begin_inset Foot
5010 status collapsed
5011
5012 \begin_layout Plain Layout
5013 The main issue here is that LyX itself does not really handle these.
5014  It just lets you enter what you would have to enter in raw LaTeX.
5015 \end_layout
5016
5017 \end_inset
5018
5019  We'll describe how they are handled using the subsection headings from
5020  that section.
5021 \end_layout
5022
5023 \begin_layout Itemize
5024 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5025  these, but the entries must be separated by 
5026 \begin_inset Quotes eld
5027 \end_inset
5028
5029  ! 
5030 \begin_inset Quotes erd
5031 \end_inset
5032
5033 , that is, there must be spaces around the exclamation point.
5034  This is because it is otherwise too difficult to check for escaped exclamation
5035  points, ones in math, and so forth.
5036 \end_layout
5037
5038 \begin_layout Itemize
5039 Page Ranges: There is no support at all for page ranges, since these make
5040  no sense with XHMTL.
5041  Instead, you will just get two index entries, one at either end.
5042 \end_layout
5043
5044 \begin_layout Itemize
5045 Cross-referencing: There is no support for cross-referencing.
5046  If LyX finds an entry containing the 
5047 \begin_inset Quotes eld
5048 \end_inset
5049
5050 |see\SpecialChar \ldots{}
5051
5052 \begin_inset Quotes erd
5053 \end_inset
5054
5055  construct, it is just dropped, and the rest is treated as an ordinary index
5056  entry.
5057 \end_layout
5058
5059 \begin_layout Itemize
5060 Index Entry Order: LyX does support attempts to fix the sorting order.
5061  It will take what is before the first `@' it finds and use that for sorting,
5062  taking what follows the first `@' to be the actual entry.
5063  At present, LyX does not check for escaped `@', so do not try to index
5064  email addresses.
5065 \end_layout
5066
5067 \begin_layout Itemize
5068 Index Entry Layout: You can format entries by using the text style dialog,
5069  or by using any other method available within LyX itself.
5070  There is no support for constructs like: 
5071 \begin_inset Quotes eld
5072 \end_inset
5073
5074 entry|textbf
5075 \begin_inset Quotes erd
5076 \end_inset
5077
5078 .
5079  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5080  and everything that follows it.
5081 \end_layout
5082
5083 \begin_layout Itemize
5084 Multiple Indexes: There is no support for multiple indexes.
5085  Rather, all index entries will be printed as one large index.
5086  To avoid our printing several versions of the index, we print only the
5087  main index, so make sure you have one.
5088 \end_layout
5089
5090 \begin_layout Section
5091 Nomenclature and Glossary
5092 \end_layout
5093
5094 \begin_layout Standard
5095 There is at present no support for glossaries.
5096  Adding it would be fairly trivial, and welcome.
5097 \end_layout
5098
5099 \begin_layout Chapter
5100 The LyX Server
5101 \end_layout
5102
5103 \begin_layout Section
5104 Introduction
5105 \end_layout
5106
5107 \begin_layout Standard
5108 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5109  and retrieve information about the LyX internal state.
5110  This is only intended for advanced users, but they should find it useful.
5111  It is by writing to the LyX server, for example, that bibliography managers,
5112  such as JabRef, are able to 
5113 \begin_inset Quotes eld
5114 \end_inset
5115
5116 push
5117 \begin_inset Quotes erd
5118 \end_inset
5119
5120  citations to LyX.
5121 \end_layout
5122
5123 \begin_layout Section
5124 Starting the LyX Server
5125 \end_layout
5126
5127 \begin_layout Standard
5128 The LyX server works through the use of a pair of named pipes.
5129  These are usually located in 
5130 \begin_inset Flex Code
5131 status collapsed
5132
5133 \begin_layout Plain Layout
5134 UserDir
5135 \end_layout
5136
5137 \end_inset
5138
5139 , (except on Windows, where 
5140 \emph on
5141 local
5142 \emph default
5143  named pipes are special objects located in 
5144 \begin_inset Flex Code
5145 status collapsed
5146
5147 \begin_layout Plain Layout
5148
5149 \backslash
5150
5151 \backslash
5152 .
5153 \backslash
5154 pipe
5155 \end_layout
5156
5157 \end_inset
5158
5159 ) and have the names 
5160 \begin_inset Quotes eld
5161 \end_inset
5162
5163
5164 \begin_inset Flex Code
5165 status collapsed
5166
5167 \begin_layout Plain Layout
5168 lyxpipe.in
5169 \end_layout
5170
5171 \end_inset
5172
5173
5174 \begin_inset Quotes erd
5175 \end_inset
5176
5177  and 
5178 \begin_inset Quotes eld
5179 \end_inset
5180
5181
5182 \begin_inset Flex Code
5183 status collapsed
5184
5185 \begin_layout Plain Layout
5186 lyxpipe.out
5187 \end_layout
5188
5189 \end_inset
5190
5191
5192 \begin_inset Quotes erd
5193 \end_inset
5194
5195 .
5196  External programs write into 
5197 \begin_inset Flex Code
5198 status collapsed
5199
5200 \begin_layout Plain Layout
5201 lyxpipe.in
5202 \end_layout
5203
5204 \end_inset
5205
5206  and read back data from 
5207 \begin_inset Flex Code
5208 status collapsed
5209
5210 \begin_layout Plain Layout
5211 lyxpipe.out
5212 \end_layout
5213
5214 \end_inset
5215
5216 .
5217  The stem of the pipe names can be defined in the 
5218 \begin_inset Flex MenuItem
5219 status collapsed
5220
5221 \begin_layout Plain Layout
5222 Tools\SpecialChar \menuseparator
5223 Preferences
5224 \end_layout
5225
5226 \end_inset
5227
5228  dialog, for example 
5229 \begin_inset Flex Code
5230 status collapsed
5231
5232 \begin_layout Plain Layout
5233 "/home/myhome/lyxpipe"
5234 \end_layout
5235
5236 \end_inset
5237
5238 , or 
5239 \begin_inset Flex Code
5240 status collapsed
5241
5242 \begin_layout Plain Layout
5243 "
5244 \backslash
5245
5246 \backslash
5247 .
5248 \backslash
5249 pipe
5250 \backslash
5251 lyxpipe"
5252 \end_layout
5253
5254 \end_inset
5255
5256  on Windows (but any working path can be used).
5257  You 
5258 \emph on
5259 must
5260 \emph default
5261  configure this manually in order for the server to start.
5262 \end_layout
5263
5264 \begin_layout Standard
5265 LyX will add the '
5266 \begin_inset Flex Code
5267 status collapsed
5268
5269 \begin_layout Plain Layout
5270 .in
5271 \end_layout
5272
5273 \end_inset
5274
5275 ' and '
5276 \begin_inset Flex Code
5277 status collapsed
5278
5279 \begin_layout Plain Layout
5280 .out
5281 \end_layout
5282
5283 \end_inset
5284
5285 ' to create the pipes.
5286  If one of the pipes already exists, LyX will assume that another LyX process
5287  is already running and will not start the server.
5288  On POSIX (Unix like) systems, if for some other reason, an unused 
5289 \begin_inset Quotes eld
5290 \end_inset
5291
5292 stale
5293 \begin_inset Quotes erd
5294 \end_inset
5295
5296  pipe is left in existence when LyX closes, then LyX will try to delete
5297  it.
5298  If this fails for some reason, you will need to delete the pipes manually
5299  and then restart LyX.
5300  On Windows, pipes are deleted by the OS on program termination or crash,
5301  so 
5302 \begin_inset Quotes eld
5303 \end_inset
5304
5305 stale
5306 \begin_inset Quotes erd
5307 \end_inset
5308
5309  pipes should not be possible.
5310 \end_layout
5311
5312 \begin_layout Standard
5313 To have several LyX processes with servers at the same time, you have to
5314  use different configurations, perhaps by using separate user directories,
5315  each with its own 
5316 \begin_inset Flex Code
5317 status collapsed
5318
5319 \begin_layout Plain Layout
5320 preferences
5321 \end_layout
5322
5323 \end_inset
5324
5325  file, for each process.
5326 \end_layout
5327
5328 \begin_layout Standard
5329 If you are developing a client program, you might find it useful to enable
5330  debugging information from the LyX server.
5331  Do this by starting LyX as 
5332 \begin_inset Flex Code
5333 status collapsed
5334
5335 \begin_layout Plain Layout
5336 lyx -dbg lyxserver
5337 \end_layout
5338
5339 \end_inset
5340
5341 .
5342 \end_layout
5343
5344 \begin_layout Standard
5345 You can find a complete example client written in C in the source distribution
5346  as 
5347 \begin_inset Flex Code
5348 status collapsed
5349
5350 \begin_layout Plain Layout
5351 development/lyxserver/server_monitor.c
5352 \end_layout
5353
5354 \end_inset
5355
5356 .
5357 \end_layout
5358
5359 \begin_layout Standard
5360 Another useful tool is the command-line based clientfound in 
5361 \begin_inset Flex Code
5362 status collapsed
5363
5364 \begin_layout Plain Layout
5365 src/client/lyxclient
5366 \end_layout
5367
5368 \end_inset
5369
5370 .
5371 \end_layout
5372
5373 \begin_layout Section
5374 Normal communication
5375 \end_layout
5376
5377 \begin_layout Standard
5378 To issue a LyX call, the client writes a line of ASCII text into the input
5379  pipe.
5380  This line has the following format:
5381 \end_layout
5382
5383 \begin_layout Quote
5384 LYXCMD:
5385 \emph on
5386 clientname
5387 \emph default
5388 :
5389 \emph on
5390 function
5391 \emph default
5392 :
5393 \emph on
5394 argument
5395 \end_layout
5396
5397 \begin_layout Description
5398 clientname is a name that the client can choose arbitrarily.
5399  Its only use is that LyX will echo it if it sends an answer—so a client
5400  can dispatch results from different requesters.
5401 \end_layout
5402
5403 \begin_layout Description
5404 function is the function you want LyX to perform.
5405  It is the same as the commands you'd use in the minibuffer.
5406 \end_layout
5407
5408 \begin_layout Description
5409 argument is an optional argument which is meaningful only to some functions
5410  (for instance, the 
5411 \begin_inset Quotes eld
5412 \end_inset
5413
5414 self-insert
5415 \begin_inset Quotes erd
5416 \end_inset
5417
5418  LFUN will insert the argument as text at the cursor position).
5419 \end_layout
5420
5421 \begin_layout Standard
5422 The answer from LyX will arrive in the output pipe and be of the form
5423 \end_layout
5424
5425 \begin_layout Quote
5426 INFO:
5427 \emph on
5428 clientname
5429 \emph default
5430 :
5431 \emph on
5432 function
5433 \emph default
5434 :
5435 \emph on
5436 data
5437 \end_layout
5438
5439 \begin_layout Standard
5440 where 
5441 \emph on
5442 clientname
5443 \emph default
5444  and 
5445 \emph on
5446 function
5447 \emph default
5448  are just echoed from the command request, while 
5449 \emph on
5450 data
5451 \emph default
5452  is more or less useful information filled according to how the command
5453  execution worked out.
5454  Some commands, such as 
5455 \begin_inset Quotes eld
5456 \end_inset
5457
5458 font-state
5459 \begin_inset Quotes erd
5460 \end_inset
5461
5462 , will return information about the internal state of LyX, while other will
5463  return an empty data-response.
5464  This means that the command execution went fine.
5465 \end_layout
5466
5467 \begin_layout Standard
5468 In case of errors, the response from LyX will have this form
5469 \end_layout
5470
5471 \begin_layout Quote
5472 ERROR:
5473 \emph on
5474 clientname
5475 \emph default
5476 :
5477 \emph on
5478 function
5479 \emph default
5480 :
5481 \emph on
5482 error message
5483 \end_layout
5484
5485 \begin_layout Standard
5486 where the 
5487 \emph on
5488 error message
5489 \emph default
5490  should contain an explanation of why the command failed.
5491 \end_layout
5492
5493 \begin_layout Standard
5494 Examples:
5495 \end_layout
5496
5497 \begin_layout LyX-Code
5498 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5499 \begin_inset Newline newline
5500 \end_inset
5501
5502 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5503 \begin_inset Newline newline
5504 \end_inset
5505
5506 read a <~/.lyxpipe.out
5507 \begin_inset Newline newline
5508 \end_inset
5509
5510 echo $a
5511 \change_inserted -1762856967 1393941760
5512
5513 \end_layout
5514
5515 \begin_layout Subsection
5516
5517 \change_inserted -1762856967 1393941776
5518 AppleScript (Mac OS X)
5519 \end_layout
5520
5521 \begin_layout Standard
5522
5523 \change_inserted -1762856967 1393941776
5524 Since LyX 2.1, LyX supports basic interactions with AppleScript for normal
5525  communication through the command run.
5526  This command takes a direct argument (the 
5527 \series bold
5528 function
5529 \series default
5530  to perform) and an optional argument.
5531  It either returns the output of the function or triggers an error with
5532  the error message and code.
5533 \end_layout
5534
5535 \begin_layout Standard
5536
5537 \change_inserted -1762856967 1393941776
5538 Example:
5539 \end_layout
5540
5541 \begin_layout LyX-Code
5542
5543 \change_inserted -1762856967 1393941776
5544 tell application "LyX"
5545 \end_layout
5546
5547 \begin_layout LyX-Code
5548
5549 \change_inserted -1762856967 1393941776
5550   try
5551 \end_layout
5552
5553 \begin_layout LyX-Code
5554
5555 \change_inserted -1762856967 1393941776
5556     -- Stores the current file name into f
5557 \end_layout
5558
5559 \begin_layout LyX-Code
5560
5561 \change_inserted -1762856967 1393941776
5562     set f to (run "server-get-filename" with argument "")
5563 \end_layout
5564
5565 \begin_layout LyX-Code
5566
5567 \change_inserted -1762856967 1393941776
5568     on error the error_message number the error_number
5569 \end_layout
5570
5571 \begin_layout LyX-Code
5572
5573 \change_inserted -1762856967 1393941776
5574       display dialog "Error: " & the error_number & ".
5575  " ¬
5576 \end_layout
5577
5578 \begin_layout LyX-Code
5579
5580 \change_inserted -1762856967 1393941776
5581               & the error_message buttons {"OK"} default button 1
5582 \end_layout
5583
5584 \begin_layout LyX-Code
5585
5586 \change_inserted -1762856967 1393941776
5587   end try
5588 \end_layout
5589
5590 \begin_layout LyX-Code
5591
5592 \change_inserted -1762856967 1393941776
5593 end tell
5594 \change_unchanged
5595
5596 \end_layout
5597
5598 \begin_layout Section
5599 Notification
5600 \end_layout
5601
5602 \begin_layout Standard
5603 LyX can notify clients of events going on asynchronously.
5604  Currently it will only do this if the user binds a key sequence with the
5605  function 
5606 \begin_inset Quotes eld
5607 \end_inset
5608
5609 notify
5610 \begin_inset Quotes erd
5611 \end_inset
5612
5613 .
5614  The format of the string LyX sends is as follows:
5615 \end_layout
5616
5617 \begin_layout Quote
5618 \begin_inset Flex Code
5619 status collapsed
5620
5621 \begin_layout Plain Layout
5622 NOTIFY:
5623 \end_layout
5624
5625 \end_inset
5626
5627
5628 \emph on
5629 key-sequence
5630 \end_layout
5631
5632 \begin_layout Standard
5633 where 
5634 \emph on
5635 key-sequence
5636 \emph default
5637  is the printed representation of the key sequence that was actually typed
5638  by the user.
5639 \end_layout
5640
5641 \begin_layout Standard
5642 This mechanism can be used to extend LyX's command set and implement macros.
5643  Bind some key sequence to 
5644 \begin_inset Quotes eld
5645 \end_inset
5646
5647 notify
5648 \begin_inset Quotes erd
5649 \end_inset
5650
5651 .
5652  Then start a client that listens on the output pipe, dispatches the command
5653  according to the sequence, and starts a function that may use LyX calls
5654  and LyX requests to issue a command or a series of commands to LyX.
5655 \end_layout
5656
5657 \begin_layout Section
5658 The simple LyX Server Protocol
5659 \end_layout
5660
5661 \begin_layout Standard
5662 LyX implements a simple protocol that can be used for session management.
5663  All messages are of the form
5664 \end_layout
5665
5666 \begin_layout Quote
5667 LYXSRV:
5668 \emph on
5669 clientname
5670 \emph default
5671 :
5672 \emph on
5673 protocol message
5674 \end_layout
5675
5676 \begin_layout Standard
5677 where 
5678 \emph on
5679 protocol message
5680 \emph default
5681  can be 
5682 \begin_inset Quotes eld
5683 \end_inset
5684
5685 hello
5686 \begin_inset Quotes erd
5687 \end_inset
5688
5689  or 
5690 \begin_inset Quotes eld
5691 \end_inset
5692
5693 bye
5694 \begin_inset Quotes erd
5695 \end_inset
5696
5697 .
5698  If 
5699 \begin_inset Quotes eld
5700 \end_inset
5701
5702 hello
5703 \begin_inset Quotes erd
5704 \end_inset
5705
5706  is received from a client, LyX will report back to inform the client that
5707  it's listening to it's messages, while 
5708 \begin_inset Quotes eld
5709 \end_inset
5710
5711 bye
5712 \begin_inset Quotes erd
5713 \end_inset
5714
5715  sent from LyX will inform clients that LyX is closing.
5716 \end_layout
5717
5718 \begin_layout Section
5719 Reverse DVI/PDF search
5720 \end_layout
5721
5722 \begin_layout Standard
5723 Some DVI/PDF viewers
5724 \begin_inset Foot
5725 status collapsed
5726
5727 \begin_layout Plain Layout
5728 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5729  Skim on Mac OSX and SumatraPDF on Windows.
5730 \end_layout
5731
5732 \end_inset
5733
5734  provide 
5735 \emph on
5736 reverse search
5737 \emph default
5738  facility (also called 
5739 \emph on
5740 inverse search
5741 \emph default
5742 ).
5743  This means that you can tell LyX to put the cursor to a specific line in
5744  the document by clicking at the respective position in the DVI/PDF output.
5745  To achieve this, the viewer must be able to communicate with LyX.
5746  This is done via the LyX server either by using the named pipe (
5747 \emph on
5748 lyxpipe
5749 \emph default
5750 ), or the UNIX domain socket (
5751 \emph on
5752 lyxsocket
5753 \emph default
5754 ) that LyX creates in its temporary directory (this is the way the 
5755 \begin_inset Flex Code
5756 status collapsed
5757
5758 \begin_layout Plain Layout
5759 lyxclient
5760 \end_layout
5761
5762 \end_inset
5763
5764  program communicates with LyX).
5765  In some cases, you need a helper script that mediates between the viewer
5766  and LyX, in others, the viewer can communicate with LyX directly.
5767  This depends on the selected viewer and on your operating system.
5768  The same applies to the way viewers need to be configured and the way the
5769  reverse search is actually performed.
5770  In what follows, we will thus describe how to setup reverse search for
5771  specific viewers.
5772  Before we turn to this, though, we will explain what needs to be done generally
5773  to enable reverse search in the DVI/PDF output.
5774 \end_layout
5775
5776 \begin_layout Subsection
5777 Automatic setup
5778 \begin_inset CommandInset label
5779 LatexCommand label
5780 name "sub:rev-search"
5781
5782 \end_inset
5783
5784
5785 \end_layout
5786
5787 \begin_layout Standard
5788 In most cases LyX will do the work for you by enabling the option 
5789 \begin_inset Flex MenuItem
5790 status collapsed
5791
5792 \begin_layout Plain Layout
5793 Synchronize with Output
5794 \end_layout
5795
5796 \end_inset
5797
5798  in the menu 
5799 \begin_inset Flex MenuItem
5800 status collapsed
5801
5802 \begin_layout Plain Layout
5803 Document\SpecialChar \menuseparator
5804 Settings\SpecialChar \menuseparator
5805 Output
5806 \end_layout
5807
5808 \end_inset
5809
5810 .
5811  In such a case LyX will automatically insert the necessary SyncTeX macro
5812  (for PDF) or load the srcltx package (for DVI) respectively.
5813  This option can be easily reached also on 
5814 \begin_inset Flex Code
5815 status collapsed
5816
5817 \begin_layout Plain Layout
5818 View/Update
5819 \end_layout
5820
5821 \end_inset
5822
5823  Toolbar.
5824 \end_layout
5825
5826 \begin_layout Standard
5827 If you need a different setting, you can select or input a custom macro
5828  from the drop down box just below 
5829 \begin_inset Flex MenuItem
5830 status collapsed
5831
5832 \begin_layout Plain Layout
5833 Document\SpecialChar \menuseparator
5834 Settings\SpecialChar \menuseparator
5835 Output\SpecialChar \menuseparator
5836 Synchronize with Output
5837 \end_layout
5838
5839 \end_inset
5840
5841 .
5842 \end_layout
5843
5844 \begin_layout Standard
5845 Note that the method 
5846 \begin_inset Flex Code
5847 status collapsed
5848
5849 \begin_layout Plain Layout
5850
5851 \backslash
5852 synctex=1
5853 \end_layout
5854
5855 \end_inset
5856
5857  enables gzip compression.
5858  If your viewer does not support it, you should instead use 
5859 \begin_inset Flex Code
5860 status collapsed
5861
5862 \begin_layout Plain Layout
5863
5864 \backslash
5865 synctex=-1
5866 \end_layout
5867
5868 \end_inset
5869
5870 .
5871 \end_layout
5872
5873 \begin_layout Standard
5874 Please aöso note that including the 
5875 \begin_inset Flex Code
5876 status collapsed
5877
5878 \begin_layout Plain Layout
5879 srcltx
5880 \end_layout
5881
5882 \end_inset
5883
5884  package or 
5885 \begin_inset Flex Code
5886 status collapsed
5887
5888 \begin_layout Plain Layout
5889 src-specials
5890 \end_layout
5891
5892 \end_inset
5893
5894  sometimes has an undesired impact on the typesetting.
5895  Thus, you should switch output synchronization off for the final typesetting
5896  if you use the 
5897 \begin_inset Flex Code
5898 status collapsed
5899
5900 \begin_layout Plain Layout
5901 srcltx
5902 \end_layout
5903
5904 \end_inset
5905
5906  package or 
5907 \begin_inset Flex Code
5908 status collapsed
5909
5910 \begin_layout Plain Layout
5911 src-specials
5912 \end_layout
5913
5914 \end_inset
5915
5916 .
5917  
5918 \end_layout
5919
5920 \begin_layout Standard
5921 In case you need some more special settings that are not covered by the
5922  automatic settings, read the next section about how to set up output synchroniz
5923 ation manually.
5924  If the automatic setup suits your needs, you can readily jump to section
5925 \begin_inset space ~
5926 \end_inset
5927
5928
5929 \begin_inset CommandInset ref
5930 LatexCommand ref
5931 reference "sub:configuring-viewers"
5932
5933 \end_inset
5934
5935 , where the necessary configuration steps in your viewer -- needed both
5936  with the automatic and the manual setup -- are described.
5937 \end_layout
5938
5939 \begin_layout Subsection
5940 Manual setup
5941 \end_layout
5942
5943 \begin_layout Standard
5944 LaTeX provides several different methods for reverse search.
5945  Some are built-in in the 
5946 \begin_inset Flex Code
5947 status collapsed
5948
5949 \begin_layout Plain Layout
5950 latex/pdflatex
5951 \end_layout
5952
5953 \end_inset
5954
5955  program, some are provided by external packages.
5956  Your choice depends on whether your LaTeX distribution already provides
5957  a given method (the built-in methods are rather new) and whether your viewer
5958  can cope with it.
5959  The available methods are described in the following.
5960 \end_layout
5961
5962 \begin_layout Subsubsection*
5963 Built-in DVI-search via src-specials (DVI only) 
5964 \end_layout
5965
5966 \begin_layout Standard
5967 This method provides the DVI file with the necessary information for reverse
5968  search.
5969  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5970  distribution should include it), and it works reliably.
5971  To enable it, change the 
5972 \begin_inset Flex MenuItem
5973 status collapsed
5974
5975 \begin_layout Plain Layout
5976 LaT
5977 \begin_inset ERT
5978 status collapsed
5979
5980 \begin_layout Plain Layout
5981
5982 {}
5983 \end_layout
5984
5985 \end_inset
5986
5987 eX (plain)->DVI
5988 \end_layout
5989
5990 \end_inset
5991
5992  or 
5993 \begin_inset Flex MenuItem
5994 status collapsed
5995
5996 \begin_layout Plain Layout
5997 LaT
5998 \begin_inset ERT
5999 status collapsed
6000
6001 \begin_layout Plain Layout
6002
6003 {}
6004 \end_layout
6005
6006 \end_inset
6007
6008 eX (plain)->DraftDVI
6009 \end_layout
6010
6011 \end_inset
6012
6013  converter in 
6014 \begin_inset Flex MenuItem
6015 status collapsed
6016
6017 \begin_layout Plain Layout
6018 Preferences\SpecialChar \menuseparator
6019 File Handling\SpecialChar \menuseparator
6020 Converters
6021 \end_layout
6022
6023 \end_inset
6024
6025  to 
6026 \begin_inset Flex Code
6027 status collapsed
6028
6029 \begin_layout Plain Layout
6030 latex -src-specials $$i
6031 \end_layout
6032
6033 \end_inset
6034
6035 .
6036  If this doesn't work, check if your TeX engine needs different options
6037  (the syntax might differ in some distributions).
6038 \end_layout
6039
6040 \begin_layout Subsubsection*
6041 External Packages (PDFSync and scrltx) 
6042 \end_layout
6043
6044 \begin_layout Standard
6045 The packages 
6046 \emph on
6047 pdfsync
6048 \emph default
6049  and 
6050 \emph on
6051 scrltx
6052 \emph default
6053  provide reverse search facility for PDF output (via pdflatex) and DVI output,
6054  respectively.
6055  In order to enable it, load the packages in the LyX preamble: 
6056 \end_layout
6057
6058 \begin_layout Itemize
6059 \begin_inset Flex Code
6060 status collapsed
6061
6062 \begin_layout Plain Layout
6063
6064 \backslash
6065 usepackage{pdfsync}
6066 \end_layout
6067
6068 \end_inset
6069
6070  for reverse PDF search,
6071 \end_layout
6072
6073 \begin_layout Itemize
6074 \begin_inset Flex Code
6075 status collapsed
6076
6077 \begin_layout Plain Layout
6078
6079 \backslash
6080 usepackage[active]{srcltx}
6081 \end_layout
6082
6083 \end_inset
6084
6085  for reverse DVI search.
6086 \end_layout
6087
6088 \begin_layout Standard
6089 If you want to be able to perform both DVI and PDF reverse searches, you
6090  can also insert in the preamble the following lines
6091 \end_layout
6092
6093 \begin_layout LyX-Code
6094
6095 \backslash
6096 usepackage{ifpdf}
6097 \begin_inset Newline newline
6098 \end_inset
6099
6100
6101 \backslash
6102 ifpdf
6103 \begin_inset Newline newline
6104 \end_inset
6105
6106   
6107 \backslash
6108 usepackage{pdfsync}
6109 \begin_inset Newline newline
6110 \end_inset
6111
6112
6113 \backslash
6114 else
6115 \begin_inset Newline newline
6116 \end_inset
6117
6118   
6119 \backslash
6120 usepackage[active]{srcltx}
6121 \begin_inset Newline newline
6122 \end_inset
6123
6124
6125 \backslash
6126 fi
6127 \end_layout
6128
6129 \begin_layout Standard
6130 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6131  right package will be used.
6132 \end_layout
6133
6134 \begin_layout Standard
6135 Note that PDFSync might affect the output layout of your document.
6136  It is therefore advised to disable PDFsync for final documents.
6137 \end_layout
6138
6139 \begin_layout Subsubsection*
6140 Built-in reverse search via SyncTeX (DVI and PDF) 
6141 \end_layout
6142
6143 \begin_layout Standard
6144 Recent versions of 
6145 \begin_inset Flex Code
6146 status collapsed
6147
6148 \begin_layout Plain Layout
6149 (pdf)latex
6150 \end_layout
6151
6152 \end_inset
6153
6154  have built-in support for both PDF and DVI reverse search.
6155  This so-called 
6156 \emph on
6157 SyncTeX
6158 \emph default
6159  facility is basically the result of the integration of the PDFSync package
6160  to the pdftex program and its merge with the 
6161 \emph on
6162 scr-specials
6163 \emph default
6164  approach.
6165  You need at least TeXLive 2008 or a recent MikTeX distribution in order
6166  to use it
6167 \begin_inset Foot
6168 status collapsed
6169
6170 \begin_layout Plain Layout
6171 For some reason, MikTeX does not understand/obey the command LyX inserts
6172  into the preamble when you check the "Enable Forward/Reverse Search" button
6173  in the toolbar and does not generate the necessary info.
6174 \end_layout
6175
6176 \begin_layout Plain Layout
6177 The generation of the required info can be forced by changing the converter
6178  "LaTeX (pdflatex) -> PDF (pdflatex)" in Preferences->File handling->Converters
6179  from the default "pdflatex $$i" to "pdflatex -synctex=1 $$i" (i.e., by adding
6180  the -synctex=1 switch).
6181 \end_layout
6182
6183 \end_inset
6184
6185 .
6186  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6187  already provide SyncTeX support.
6188 \end_layout
6189
6190 \begin_layout Standard
6191 To enable SyncTeX for DVI output, change the 
6192 \begin_inset Flex MenuItem
6193 status collapsed
6194
6195 \begin_layout Plain Layout
6196 LaT
6197 \begin_inset ERT
6198 status collapsed
6199
6200 \begin_layout Plain Layout
6201
6202 {}
6203 \end_layout
6204
6205 \end_inset
6206
6207 eX (plain) -> DVI
6208 \end_layout
6209
6210 \end_inset
6211
6212  or 
6213 \begin_inset Flex MenuItem
6214 status collapsed
6215
6216 \begin_layout Plain Layout
6217 LaT
6218 \begin_inset ERT
6219 status collapsed
6220
6221 \begin_layout Plain Layout
6222
6223 {}
6224 \end_layout
6225
6226 \end_inset
6227
6228 eX (plain) -> DraftDVI
6229 \end_layout
6230
6231 \end_inset
6232
6233  converter in 
6234 \begin_inset Flex MenuItem
6235 status collapsed
6236
6237 \begin_layout Plain Layout
6238 Preferences\SpecialChar \menuseparator
6239 File Handling\SpecialChar \menuseparator
6240 Converters
6241 \end_layout
6242
6243 \end_inset
6244
6245  to 
6246 \begin_inset Flex Code
6247 status collapsed
6248
6249 \begin_layout Plain Layout
6250 latex -synctex=1 $$i
6251 \end_layout
6252
6253 \end_inset
6254
6255 , and for PDF output, change the 
6256 \begin_inset Flex MenuItem
6257 status collapsed
6258
6259 \begin_layout Plain Layout
6260 LaT
6261 \begin_inset ERT
6262 status collapsed
6263
6264 \begin_layout Plain Layout
6265
6266 {}
6267 \end_layout
6268
6269 \end_inset
6270
6271 eX (pdflatex) -> PDF (pdflatex)
6272 \end_layout
6273
6274 \end_inset
6275
6276  or converter to 
6277 \begin_inset Flex Code
6278 status collapsed
6279
6280 \begin_layout Plain Layout
6281 pdflatex -synctex=1 $$i
6282 \end_layout
6283
6284 \end_inset
6285
6286 .
6287  Check the documentation of your viewer whether the viewer needs to be configure
6288 d for the use with SyncTeX.
6289 \begin_inset Foot
6290 status collapsed
6291
6292 \begin_layout Plain Layout
6293 Note that the option 
6294 \begin_inset Flex Code
6295 status collapsed
6296
6297 \begin_layout Plain Layout
6298 -synctex=1
6299 \end_layout
6300
6301 \end_inset
6302
6303  option enables gzip compression.
6304  If your viewer does not support it, you should instead use 
6305 \begin_inset Flex Code
6306 status collapsed
6307
6308 \begin_layout Plain Layout
6309 -synctex=-1
6310 \end_layout
6311
6312 \end_inset
6313
6314 .
6315 \end_layout
6316
6317 \end_inset
6318
6319
6320 \end_layout
6321
6322 \begin_layout Subsection
6323 Configuring and using specific viewers
6324 \begin_inset CommandInset label
6325 LatexCommand label
6326 name "sub:configuring-viewers"
6327
6328 \end_inset
6329
6330
6331 \end_layout
6332
6333 \begin_layout Subsubsection*
6334 Xdvi (all platforms)
6335 \end_layout
6336
6337 \begin_layout Standard
6338 If you use 
6339 \begin_inset Flex Code
6340 status collapsed
6341
6342 \begin_layout Plain Layout
6343 xdvi
6344 \end_layout
6345
6346 \end_inset
6347
6348 , you don't need to do anything else for performing a reverse DVI search,
6349  as LyX already provides the necessary hooks for automatically using the
6350  
6351 \begin_inset Flex Code
6352 status collapsed
6353
6354 \begin_layout Plain Layout
6355 lyxclient
6356 \end_layout
6357
6358 \end_inset
6359
6360  program.
6361  Just setup your document as described above (reverse search is triggered
6362  by Ctrl-click or Alt-click on Mac OSX, respectively).
6363 \end_layout
6364
6365 \begin_layout Standard
6366 However, if for whatever reason you want to use the named pipe instead of
6367  the socket for communicating with LyX, simply change the DVI viewer in
6368  
6369 \begin_inset Flex MenuItem
6370 status collapsed
6371
6372 \begin_layout Plain Layout
6373 Preferences\SpecialChar \menuseparator
6374 File Handling\SpecialChar \menuseparator
6375 File formats
6376 \end_layout
6377
6378 \end_inset
6379
6380  to
6381 \begin_inset Foot
6382 status collapsed
6383
6384 \begin_layout Plain Layout
6385 On Mac OSX you have to use 
6386 \begin_inset Flex Code
6387 status collapsed
6388
6389 \begin_layout Plain Layout
6390 DISPLAY=:0.0 xdvi -editor "lyxeditor.sh %f %l"
6391 \end_layout
6392
6393 \end_inset
6394
6395
6396 \end_layout
6397
6398 \end_inset
6399
6400  
6401 \begin_inset Flex Code
6402 status collapsed
6403
6404 \begin_layout Plain Layout
6405 xdvi -editor "lyxeditor.sh %f %l"
6406 \end_layout
6407
6408 \end_inset
6409
6410 , where 
6411 \begin_inset Flex Code
6412 status collapsed
6413
6414 \begin_layout Plain Layout
6415 lyxeditor.sh
6416 \end_layout
6417
6418 \end_inset
6419
6420  is a suitable script.
6421  For example, a minimal shell script is the following one:
6422 \end_layout
6423
6424 \begin_layout LyX-Code
6425 #!/bin/sh
6426 \begin_inset Newline newline
6427 \end_inset
6428
6429 LYXPIPE="/path/to/lyxpipe"
6430 \begin_inset Newline newline
6431 \end_inset
6432
6433 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6434 \begin_inset Newline newline
6435 \end_inset
6436
6437 echo "$COMMAND" > "${LYXPIPE}".in || exit
6438 \begin_inset Newline newline
6439 \end_inset
6440
6441 read TMP < "${LYXPIPE}".out || exit
6442 \end_layout
6443
6444 \begin_layout Standard
6445 where 
6446 \begin_inset Flex Code
6447 status collapsed
6448
6449 \begin_layout Plain Layout
6450 /path/to/lyxpipe
6451 \end_layout
6452
6453 \end_inset
6454
6455  is the Ly
6456 \begin_inset ERT
6457 status collapsed
6458
6459 \begin_layout Plain Layout
6460
6461 {}
6462 \end_layout
6463
6464 \end_inset
6465
6466 XServer pipe path specified in 
6467 \begin_inset Flex MenuItem
6468 status collapsed
6469
6470 \begin_layout Plain Layout
6471 Preferences\SpecialChar \menuseparator
6472 Paths
6473 \end_layout
6474
6475 \end_inset
6476
6477 .
6478 \begin_inset Foot
6479 status collapsed
6480
6481 \begin_layout Plain Layout
6482 In the 
6483 \begin_inset Flex Code
6484 status collapsed
6485
6486 \begin_layout Plain Layout
6487 development/tools
6488 \end_layout
6489
6490 \end_inset
6491
6492  folder of a source distribution you can find a 
6493 \begin_inset Flex Code
6494 status collapsed
6495
6496 \begin_layout Plain Layout
6497 lyxeditor
6498 \end_layout
6499
6500 \end_inset
6501
6502  script which is able to locate the 
6503 \emph on
6504 lyxpipe
6505 \emph default
6506  based on your preferences.
6507 \end_layout
6508
6509 \end_inset
6510
6511
6512 \end_layout
6513
6514 \begin_layout Subsubsection*
6515 MacDviX (Mac OSX)
6516 \end_layout
6517
6518 \begin_layout Standard
6519 At the end of 
6520 \begin_inset Flex Code
6521 status collapsed
6522
6523 \begin_layout Plain Layout
6524 /Applications/MacDviX_Folder/calleditor.script
6525 \end_layout
6526
6527 \end_inset
6528
6529 , add the following lines:
6530 \end_layout
6531
6532 \begin_layout LyX-Code
6533 /Applications/Ly
6534 \begin_inset ERT
6535 status collapsed
6536
6537 \begin_layout Plain Layout
6538
6539 {}
6540 \end_layout
6541
6542 \end_inset
6543
6544 X.app/Contents/MacOS/lyxeditor "$2" $1
6545 \begin_inset Newline newline
6546 \end_inset
6547
6548 exit 1
6549 \end_layout
6550
6551 \begin_layout Standard
6552 Modify the lines accordingly if you install LyX somewhere else than in the
6553  Applications folder.
6554 \end_layout
6555
6556 \begin_layout Standard
6557 Reverse search is triggered by Alt-click (OPTION-click).
6558 \end_layout
6559
6560 \begin_layout Subsubsection*
6561 Skim (Mac OSX)
6562 \end_layout
6563
6564 \begin_layout Standard
6565 Enter 
6566 \begin_inset Flex Code
6567 status collapsed
6568
6569 \begin_layout Plain Layout
6570 open -a Skim.app $$i
6571 \end_layout
6572
6573 \end_inset
6574
6575  to the viewer setting in 
6576 \begin_inset Flex MenuItem
6577 status collapsed
6578
6579 \begin_layout Plain Layout
6580 Preferences\SpecialChar \menuseparator
6581 File Handling\SpecialChar \menuseparator
6582 File formats\SpecialChar \menuseparator
6583 PDF (pdflatex)
6584 \end_layout
6585
6586 \end_inset
6587
6588 , and then in 
6589 \begin_inset Flex MenuItem
6590 status collapsed
6591
6592 \begin_layout Plain Layout
6593 Skim\SpecialChar \menuseparator
6594 Preferences\SpecialChar \menuseparator
6595 Sync
6596 \end_layout
6597
6598 \end_inset
6599
6600  choose 
6601 \begin_inset Flex MenuItem
6602 status collapsed
6603
6604 \begin_layout Plain Layout
6605 custom
6606 \end_layout
6607
6608 \end_inset
6609
6610  preset and enter command 
6611 \begin_inset Flex MenuItem
6612 status collapsed
6613
6614 \begin_layout Plain Layout
6615 /Applications/LyX.app/Contents/MacOS/lyxeditor
6616 \end_layout
6617
6618 \end_inset
6619
6620 .
6621 \end_layout
6622
6623 \begin_layout Standard
6624 Reverse search is triggered by COMMAND-SHIFT-click
6625 \end_layout
6626
6627 \begin_layout Subsubsection*
6628 Okular (KDE)
6629 \end_layout
6630
6631 \begin_layout Standard
6632 Go to 
6633 \begin_inset Flex MenuItem
6634 status collapsed
6635
6636 \begin_layout Plain Layout
6637 Settings\SpecialChar \menuseparator
6638 Configure Okular\SpecialChar \ldots{}
6639 \SpecialChar \menuseparator
6640 Editor
6641 \end_layout
6642
6643 \end_inset
6644
6645 , select 
6646 \begin_inset Quotes eld
6647 \end_inset
6648
6649 Custom Text Editor
6650 \begin_inset Quotes erd
6651 \end_inset
6652
6653  and add the command 
6654 \begin_inset Flex Code
6655 status collapsed
6656
6657 \begin_layout Plain Layout
6658 lyxclient -g %f %l
6659 \end_layout
6660
6661 \end_inset
6662
6663 .
6664 \end_layout
6665
6666 \begin_layout Standard
6667 Reverse search is triggered by SHIFT-click.
6668 \end_layout
6669
6670 \begin_layout Subsubsection*
6671 YAP (Windows)
6672 \end_layout
6673
6674 \begin_layout Standard
6675 Launch yap, choose its 
6676 \begin_inset Flex MenuItem
6677 status collapsed
6678
6679 \begin_layout Plain Layout
6680 View\SpecialChar \menuseparator
6681 Options
6682 \end_layout
6683
6684 \end_inset
6685
6686  menu and select the 
6687 \begin_inset Quotes eld
6688 \end_inset
6689
6690 Inverse DVI Search
6691 \begin_inset Quotes erd
6692 \end_inset
6693
6694  tab.
6695  Click on the 
6696 \begin_inset Quotes eld
6697 \end_inset
6698
6699 New\SpecialChar \ldots{}
6700
6701 \begin_inset Quotes erd
6702 \end_inset
6703
6704  button and, in the window that opens, enter 
6705 \begin_inset Quotes eld
6706 \end_inset
6707
6708 LyX Editor
6709 \begin_inset Quotes erd
6710 \end_inset
6711
6712  (or any other name you like) in the 
6713 \begin_inset Quotes eld
6714 \end_inset
6715
6716 Name:
6717 \begin_inset Quotes erd
6718 \end_inset
6719
6720  field.
6721  Now click on the button labeled 
6722 \begin_inset Quotes eld
6723 \end_inset
6724
6725 \SpecialChar \ldots{}
6726
6727 \begin_inset Quotes erd
6728 \end_inset
6729
6730  to open a file dialog and navigate to the directory containing the batch
6731  file 
6732 \begin_inset Flex Code
6733 status collapsed
6734
6735 \begin_layout Plain Layout
6736 lyxeditor.bat
6737 \end_layout
6738
6739 \end_inset
6740
6741  (see below).
6742  Select 
6743 \begin_inset Flex Code
6744 status collapsed
6745
6746 \begin_layout Plain Layout
6747 lyxeditor.bat
6748 \end_layout
6749
6750 \end_inset
6751
6752  and then specify the program arguments as 
6753 \begin_inset Flex Code
6754 status collapsed
6755
6756 \begin_layout Plain Layout
6757 %f %l
6758 \end_layout
6759
6760 \end_inset
6761
6762 .
6763  The 
6764 \begin_inset Flex Code
6765 status collapsed
6766
6767 \begin_layout Plain Layout
6768 lyxeditor.bat
6769 \end_layout
6770
6771 \end_inset
6772
6773  wrapper is used for communicating with LyX through the 
6774 \emph on
6775 lyxpipe
6776 \emph default
6777  and is as follows:
6778 \end_layout
6779
6780 \begin_layout LyX-Code
6781 @echo off
6782 \begin_inset Newline newline
6783 \end_inset
6784
6785 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6786 \backslash
6787
6788 \backslash
6789 .
6790 \backslash
6791 pipe
6792 \backslash
6793 lyxpipe.in
6794 \begin_inset Newline newline
6795 \end_inset
6796
6797 type 
6798 \backslash
6799
6800 \backslash
6801 .
6802 \backslash
6803 pipe
6804 \backslash
6805 lyxpipe.out
6806 \end_layout
6807
6808 \begin_layout Standard
6809 Make sure that the LyXServer pipe path you specified in LyX is 
6810 \begin_inset Flex Code
6811 status collapsed
6812
6813 \begin_layout Plain Layout
6814
6815 \backslash
6816
6817 \backslash
6818 .
6819 \backslash
6820 pipe
6821 \backslash
6822 lyxpipe
6823 \end_layout
6824
6825 \end_inset
6826
6827 , otherwise change the 
6828 \begin_inset Flex Code
6829 status collapsed
6830
6831 \begin_layout Plain Layout
6832 lyxeditor.bat
6833 \end_layout
6834
6835 \end_inset
6836
6837  wrapper accordingly.
6838 \end_layout
6839
6840 \begin_layout Standard
6841 In yap, reverse search is triggered by double-click.
6842 \end_layout
6843
6844 \begin_layout Subsubsection*
6845 SumatraPDF (Windows)
6846 \end_layout
6847
6848 \begin_layout Standard
6849 In order to use SumatraPDF for inverse search, enter 
6850 \begin_inset Flex Code
6851 status collapsed
6852
6853 \begin_layout Plain Layout
6854 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6855 \end_layout
6856
6857 \end_inset
6858
6859  in the viewer setting in 
6860 \begin_inset Flex MenuItem
6861 status collapsed
6862
6863 \begin_layout Plain Layout
6864 Preferences\SpecialChar \menuseparator
6865 File Handling\SpecialChar \menuseparator
6866 File formats\SpecialChar \menuseparator
6867 PDF (pdflatex)
6868 \end_layout
6869
6870 \end_inset
6871
6872 , where 
6873 \begin_inset Flex Code
6874 status collapsed
6875
6876 \begin_layout Plain Layout
6877 lyxeditor.bat
6878 \end_layout
6879
6880 \end_inset
6881
6882  is the previous wrapper.
6883  If SumatraPDF.exe is not in your command PATH, use its full file name.
6884 \end_layout
6885
6886 \begin_layout Standard
6887 Reverse search is triggered by double-click.
6888 \end_layout
6889
6890 \begin_layout Subsubsection*
6891 YAP (Cygwin)
6892 \end_layout
6893
6894 \begin_layout Standard
6895 First of all, make sure that yap is your default DVI viewer in the Windows
6896  environment, then launch it, choose its 
6897 \begin_inset Flex MenuItem
6898 status collapsed
6899
6900 \begin_layout Plain Layout
6901 View\SpecialChar \menuseparator
6902 Options
6903 \end_layout
6904
6905 \end_inset
6906
6907  menu and select the 
6908 \begin_inset Quotes eld
6909 \end_inset
6910
6911 Inverse DVI Search
6912 \begin_inset Quotes erd
6913 \end_inset
6914
6915  tab.
6916  Click on the 
6917 \begin_inset Quotes eld
6918 \end_inset
6919
6920 New\SpecialChar \ldots{}
6921
6922 \begin_inset Quotes erd
6923 \end_inset
6924
6925  button and, in the window that opens, enter 
6926 \begin_inset Quotes eld
6927 \end_inset
6928
6929 LyX Editor
6930 \begin_inset Quotes erd
6931 \end_inset
6932
6933  (or any other name you like) in the 
6934 \begin_inset Quotes eld
6935 \end_inset
6936
6937 Name:
6938 \begin_inset Quotes erd
6939 \end_inset
6940
6941  field.
6942  Now click on the button labeled 
6943 \begin_inset Quotes eld
6944 \end_inset
6945
6946 \SpecialChar \ldots{}
6947
6948 \begin_inset Quotes erd
6949 \end_inset
6950
6951  to open a file dialog and navigate to the directory containing the 
6952 \begin_inset Flex Code
6953 status collapsed
6954
6955 \begin_layout Plain Layout
6956 lyxeditor.exe
6957 \end_layout
6958
6959 \end_inset
6960
6961  program (which is installed by default on Cygwin along with the LyX executable).
6962  Select 
6963 \begin_inset Flex Code
6964 status collapsed
6965
6966 \begin_layout Plain Layout
6967 lyxeditor.exe
6968 \end_layout
6969
6970 \end_inset
6971
6972  and then specify the program arguments as 
6973 \begin_inset Flex Code
6974 status collapsed
6975
6976 \begin_layout Plain Layout
6977 -g %f %l
6978 \end_layout
6979
6980 \end_inset
6981
6982 .
6983  In this way, you will be using the 
6984 \emph on
6985 lyxsocket
6986 \emph default
6987  for communicating with LyX.
6988  If, for whatever reason, you want to use the 
6989 \emph on
6990 lyxpipe
6991 \emph default
6992 , omit the 
6993 \begin_inset Flex Code
6994 status collapsed
6995
6996 \begin_layout Plain Layout
6997 -g
6998 \end_layout
6999
7000 \end_inset
7001
7002  option and be sure to specify the LyXServer pipe path in the LyX preferences.
7003 \end_layout
7004
7005 \begin_layout Standard
7006 In yap, reverse search is triggered by double-click.
7007 \end_layout
7008
7009 \begin_layout Subsubsection*
7010 SumatraPDF (Cygwin)
7011 \end_layout
7012
7013 \begin_layout Standard
7014 In order to use SumatraPDF for inverse search, enter 
7015 \begin_inset Flex Code
7016 status collapsed
7017
7018 \begin_layout Plain Layout
7019 SumatraPDF -inverse-search "lyxeditor -g %f %l"
7020 \end_layout
7021
7022 \end_inset
7023
7024  in the viewer setting in 
7025 \begin_inset Flex MenuItem
7026 status collapsed
7027
7028 \begin_layout Plain Layout
7029 Preferences\SpecialChar \menuseparator
7030 File Handling\SpecialChar \menuseparator
7031 File formats\SpecialChar \menuseparator
7032 PDF (pdflatex)
7033 \end_layout
7034
7035 \end_inset
7036
7037 .
7038  If SumatraPDF.exe is not in your command PATH, use its full posix path.
7039  The 
7040 \begin_inset Flex Code
7041 status collapsed
7042
7043 \begin_layout Plain Layout
7044 -g
7045 \end_layout
7046
7047 \end_inset
7048
7049  enables communication via the 
7050 \emph on
7051 lyxsocket
7052 \emph default
7053 .
7054  Again, omit the 
7055 \begin_inset Flex Code
7056 status collapsed
7057
7058 \begin_layout Plain Layout
7059 -g
7060 \end_layout
7061
7062 \end_inset
7063
7064  option if you want to use the 
7065 \emph on
7066 lyxpipe
7067 \emph default
7068 , and be sure to specify the LyXServer pipe path in the LyX preferences.
7069 \end_layout
7070
7071 \begin_layout Standard
7072 Reverse search is triggered by double-click.
7073 \end_layout
7074
7075 \begin_layout Section
7076 Forward search
7077 \end_layout
7078
7079 \begin_layout Standard
7080 Forward search is, as the name implies, in a sense the 
7081 \begin_inset Quotes eld
7082 \end_inset
7083
7084 opposite
7085 \begin_inset Quotes erd
7086 \end_inset
7087
7088  of reverse search.
7089  It allows you to let the viewer jump to a given position from within LyX.
7090  If forward search is set up (as described in what follows), you can put
7091  the cursor anywhere in your LyX document, and hit 
7092 \begin_inset Flex MenuItem
7093 status collapsed
7094
7095 \begin_layout Plain Layout
7096 Navigate\SpecialChar \menuseparator
7097 Forward search
7098 \end_layout
7099
7100 \end_inset
7101
7102  (or select 
7103 \begin_inset Flex MenuItem
7104 status collapsed
7105
7106 \begin_layout Plain Layout
7107 Forward search
7108 \end_layout
7109
7110 \end_inset
7111
7112  in the context menu via right mouse click), and then the viewer will jump
7113  to that position as well.
7114  This implies, of course, that your viewer supports this function.
7115 \end_layout
7116
7117 \begin_layout Standard
7118 To make forward search possible, you first need to provide the generated
7119  output PDF/DVI file with additional information about the TeX sources.
7120  This can be done via the methods described in the section 
7121 \begin_inset CommandInset ref
7122 LatexCommand ref
7123 reference "sub:rev-search"
7124
7125 \end_inset
7126
7127 .
7128 \end_layout
7129
7130 \begin_layout Standard
7131 Additionally, you need to configure LyX for using your viewers in 
7132 \begin_inset Flex MenuItem
7133 status collapsed
7134
7135 \begin_layout Plain Layout
7136 Tools\SpecialChar \menuseparator
7137 Preferences\SpecialChar \menuseparator
7138 Output\SpecialChar \menuseparator
7139 General
7140 \end_layout
7141
7142 \end_inset
7143
7144 .
7145  We provide a range of tested configurations for some viewers, which you
7146  can select from the drop down list.
7147  If none of these configurations suits you, you have to find out and enter
7148  a suitable configuration yourself.
7149  The definition syntax uses the following placeholders:
7150 \end_layout
7151
7152 \begin_layout Itemize
7153 \noindent
7154 \begin_inset Flex Code
7155 status collapsed
7156
7157 \begin_layout Plain Layout
7158 $$n
7159 \end_layout
7160
7161 \end_inset
7162
7163 : row number
7164 \end_layout
7165
7166 \begin_layout Itemize
7167 \noindent
7168 \begin_inset Flex Code
7169 status collapsed
7170
7171 \begin_layout Plain Layout
7172 $$t
7173 \end_layout
7174
7175 \end_inset
7176
7177 : name of the (temporary) exported .tex file (without path)
7178 \end_layout
7179
7180 \begin_layout Itemize
7181 \noindent
7182 \begin_inset Flex Code
7183 status collapsed
7184
7185 \begin_layout Plain Layout
7186 $$f
7187 \end_layout
7188
7189 \end_inset
7190
7191 : name of the (temporary) exported .tex file (including path)
7192 \end_layout
7193
7194 \begin_layout Itemize
7195 \noindent
7196 \begin_inset Flex Code
7197 status collapsed
7198
7199 \begin_layout Plain Layout
7200 $$o
7201 \end_layout
7202
7203 \end_inset
7204
7205 : name of the exported output file (either dvi or pdf, depending on which
7206  one exists in the temporary directory)
7207 \end_layout
7208
7209 \begin_layout Standard
7210 Note that only some of the viewers provide full forward search functionality,
7211  among them yap, xdvi, okular
7212 \begin_inset Foot
7213 status open
7214
7215 \begin_layout Plain Layout
7216 You might want to set 
7217 \begin_inset Flex Code
7218 status collapsed
7219
7220 \begin_layout Plain Layout
7221 okular --unique
7222 \end_layout
7223
7224 \end_inset
7225
7226  in 
7227 \begin_inset Flex MenuItem
7228 status collapsed
7229
7230 \begin_layout Plain Layout
7231 Tools\SpecialChar \menuseparator
7232 Preferences\SpecialChar \menuseparator
7233 File Handling\SpecialChar \menuseparator
7234 File
7235 \begin_inset space ~
7236 \end_inset
7237
7238 Formats
7239 \end_layout
7240
7241 \end_inset
7242
7243
7244 \end_layout
7245
7246 \end_inset
7247
7248  and Sumatra PDF
7249 \begin_inset Foot
7250 status collapsed
7251
7252 \begin_layout Plain Layout
7253 For Sumatra CMCDDE is needed --- downloadable from 
7254 \begin_inset CommandInset href
7255 LatexCommand href
7256 target "http://www.istri.fr/zip/CMCDDE.zip"
7257
7258 \end_inset
7259
7260
7261 \end_layout
7262
7263 \end_inset
7264
7265 .
7266  While many of the widespread PDF viewers (most notably Adobe Reader) do
7267  not support forward search at all, some other viewers -- e.
7268 \begin_inset space \thinspace{}
7269 \end_inset
7270
7271 g.
7272  evince and xpdf -- allow at least to reload the document and jump to a
7273  specific page of the file, so you can at least navigate 
7274 \begin_inset Quotes eld
7275 \end_inset
7276
7277 near
7278 \begin_inset Quotes erd
7279 \end_inset
7280
7281 .
7282  This latter functionality is provided by an external call of synctex (see
7283  the predefined example configurations).
7284  
7285 \end_layout
7286
7287 \begin_layout Standard
7288 Forward search works both with DVI and PDF output.
7289  LyX simply checks which preview format you have used before (i.
7290 \begin_inset space \thinspace{}
7291 \end_inset
7292
7293 e., which format is already there in the temporary directory) and chooses
7294  the appropriate configuration for the respective format.
7295 \end_layout
7296
7297 \begin_layout Chapter
7298 Special Document Classes
7299 \end_layout
7300
7301 \begin_layout Section
7302 A&A Paper
7303 \end_layout
7304
7305 \begin_layout Standard
7306 by 
7307 \noun on
7308 Peter Sütterlin
7309 \end_layout
7310
7311 \begin_layout Subsection
7312 Introduction
7313 \end_layout
7314
7315 \begin_layout Standard
7316 This section describes how LyX can be used to write articles for submission
7317  to the scientific journal 
7318 \emph on
7319 Astronomy and Astrophysics
7320 \emph default
7321  (www.edpsciences.fr/aa/ 
7322 \begin_inset Flex URL
7323 status collapsed
7324
7325 \begin_layout Plain Layout
7326
7327 http://www.edpsciences.fr/aa/
7328 \end_layout
7329
7330 \end_inset
7331
7332 ) using Version 5.01 of the document class 
7333 \family typewriter
7334 aa.cls
7335 \family default
7336 .
7337  This package can be downloaded from the ftp site
7338 \end_layout
7339
7340 \begin_layout Standard
7341 \begin_inset VSpace medskip
7342 \end_inset
7343
7344
7345 \end_layout
7346
7347 \begin_layout Standard
7348 \align center
7349 \begin_inset Flex URL
7350 status collapsed
7351
7352 \begin_layout Plain Layout
7353
7354 ftp://ftp.edpsciences.org/pub/aa/readme.html
7355 \end_layout
7356
7357 \end_inset
7358
7359
7360 \end_layout
7361
7362 \begin_layout Standard
7363 \begin_inset VSpace medskip
7364 \end_inset
7365
7366
7367 \end_layout
7368
7369 \begin_layout Standard
7370 A manual comes together with that package, and this text is not meant to
7371  replace the original manual but is merely a short guide in how to realize
7372  the correct form of your paper.
7373  
7374 \end_layout
7375
7376 \begin_layout Standard
7377 Please note that the publisher of the journal was changed from Springer
7378  to EDP Sciences starting January 1, 2001.
7379  That change involved also some slight changes to the style files, namely
7380  the removal of the thesaurus command.
7381  The LyX class aa supports the newest version of these style files, V 5.01.
7382  If you have an older version installed, please upgrade.
7383  For compatibility, the old (version 4) layout has been kept as 
7384 \family sans
7385 article (A&A V4)
7386 \family default
7387 .
7388  Please refer to the comments in 
7389 \family typewriter
7390 LyXDir/layouts/aapaper.layout
7391 \family default
7392 .
7393 \end_layout
7394
7395 \begin_layout Subsection
7396 Getting started
7397 \end_layout
7398
7399 \begin_layout Standard
7400 It is recommended you start from the example template distributed with LyX.
7401  If you are not using a template, note the following settings:
7402 \end_layout
7403
7404 \begin_layout Itemize
7405 Select 
7406 \family sans
7407 article (A&A)
7408 \family default
7409  in the 
7410 \family sans
7411 Document\SpecialChar \menuseparator
7412 Settings
7413 \family default
7414  dialog (OK, that one was obvious).
7415 \end_layout
7416
7417 \begin_layout Itemize
7418 Don't change the option 
7419 \family sans
7420 Page
7421 \begin_inset space ~
7422 \end_inset
7423
7424 style
7425 \family default
7426 : Leave it set to 
7427 \family sans
7428 default
7429 \family default
7430 .
7431  The whole layout is done by the macros, you shouldn't change anything.
7432 \end_layout
7433
7434 \begin_layout Subsection
7435 The header block
7436 \end_layout
7437
7438 \begin_layout Standard
7439 First thing to enter is the header information.
7440  It consists of seven entries, of which some are optional.
7441  They are
7442 \end_layout
7443
7444 \begin_layout Itemize
7445
7446 \family sans
7447 Title
7448 \family default
7449 : [required] 
7450 \end_layout
7451
7452 \begin_layout Itemize
7453
7454 \family sans
7455 Subtitle
7456 \family default
7457 : [optional] 
7458 \end_layout
7459
7460 \begin_layout Itemize
7461
7462 \family sans
7463 Author
7464 \family default
7465 : [required]
7466 \end_layout
7467
7468 \begin_layout Itemize
7469
7470 \family sans
7471 Address
7472 \family default
7473 : [required]
7474 \end_layout
7475
7476 \begin_layout Itemize
7477
7478 \family sans
7479 Offprints
7480 \family default
7481 : [optional] if more than one author: whom to contact for offprint requests.
7482 \end_layout
7483
7484 \begin_layout Itemize
7485
7486 \family sans
7487 Mail
7488 \family default
7489 : [optional] mail address for contacts.
7490 \end_layout
7491
7492 \begin_layout Itemize
7493
7494 \family sans
7495 Date
7496 \family default
7497 : [required].
7498  Suggested format is 
7499 \family typewriter
7500 Received: <date>; Accepted <date> 
7501 \end_layout
7502
7503 \begin_layout Standard
7504 There is no need to issue the 
7505 \family typewriter
7506
7507 \backslash
7508 maketitle
7509 \family default
7510  command, this is done automatically by LyX when the header is finished.
7511  Although the order of the single header entries doesn't matter it is advised
7512  to keep the above sequence, just to get the best optics and meets the layout
7513  of the real document.
7514 \end_layout
7515
7516 \begin_layout Standard
7517 If you want to place footnotes in the header block, e.
7518 \begin_inset space \thinspace{}
7519 \end_inset
7520
7521 g.
7522 \begin_inset space \space{}
7523 \end_inset
7524
7525 to state your present address, just use the standard footnote via the menu
7526  
7527 \family sans
7528 Insert\SpecialChar \menuseparator
7529 Footnote.
7530
7531 \family default
7532  LyX will automagically use the term 
7533 \family typewriter
7534
7535 \backslash
7536 thanks{}
7537 \family default
7538  in that case.
7539 \end_layout
7540
7541 \begin_layout Standard
7542 In addition to these topics, the macros use three additional LaTeX commands
7543  that have no counterpart in LyX:
7544 \end_layout
7545
7546 \begin_layout Itemize
7547
7548 \family typewriter
7549
7550 \backslash
7551 and
7552 \family default
7553  to separate different names for more than one author and institute, respectivel
7554 y.
7555 \end_layout
7556
7557 \begin_layout Itemize
7558
7559 \family typewriter
7560
7561 \backslash
7562 inst{<nr>}
7563 \family default
7564 to mark corresponding author/institute pairs.
7565  The institutes are numbered sequentially as they appear in the 
7566 \family sans
7567 Address
7568 \family default
7569  field, so you have to put a marker to each author.
7570 \end_layout
7571
7572 \begin_layout Itemize
7573
7574 \family typewriter
7575
7576 \backslash
7577 email{address}
7578 \family default
7579  to supply an email address for fast contact.
7580 \end_layout
7581
7582 \begin_layout Standard
7583 In all cases, the appropriate command has to be entered in LyX and marked
7584  as LaTeX code.
7585  See the examples.
7586  
7587 \end_layout
7588
7589 \begin_layout Subsection
7590 The abstract
7591 \end_layout
7592
7593 \begin_layout Standard
7594 The abstract should immediately follow the header block.
7595  With version 5 the abstract environment was changed to a command, and there
7596  is now a resctriction to only one paragraph.
7597  In addition, it should contain an entry with the keywords.
7598  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7599  command 
7600 \family typewriter
7601
7602 \backslash
7603 keywords{}
7604 \family default
7605  by hand and mark it as LaTeX code.
7606  Refer to the example paper.
7607 \end_layout
7608
7609 \begin_layout Subsection
7610 Supported environments
7611 \end_layout
7612
7613 \begin_layout Standard
7614 The A&A paper layout supports the following environments for structuring
7615  your text:
7616 \end_layout
7617
7618 \begin_layout Itemize
7619
7620 \family sans
7621 Standard
7622 \end_layout
7623
7624 \begin_layout Itemize
7625
7626 \family sans
7627 Section
7628 \end_layout
7629
7630 \begin_layout Itemize
7631
7632 \family sans
7633 Subsection
7634 \end_layout
7635
7636 \begin_layout Itemize
7637
7638 \family sans
7639 Subsubsection
7640 \end_layout
7641
7642 \begin_layout Itemize
7643
7644 \family sans
7645 Itemize
7646 \end_layout
7647
7648 \begin_layout Itemize
7649
7650 \family sans
7651 Enumerate
7652 \end_layout
7653
7654 \begin_layout Itemize
7655
7656 \family sans
7657 Description
7658 \end_layout
7659
7660 \begin_layout Itemize
7661
7662 \family sans
7663 Caption
7664 \end_layout
7665
7666 \begin_layout Itemize
7667
7668 \family sans
7669 Abstract
7670 \end_layout
7671
7672 \begin_layout Itemize
7673
7674 \family sans
7675 Acknowledgment
7676 \end_layout
7677
7678 \begin_layout Itemize
7679
7680 \family sans
7681 Bibliography
7682 \end_layout
7683
7684 \begin_layout Itemize
7685
7686 \family sans
7687 LaTeX
7688 \end_layout
7689
7690 \begin_layout Subsection
7691 Commands not supported by LyX
7692 \end_layout
7693
7694 \begin_layout Standard
7695 Some commands are not yet supported by the 
7696 \family sans
7697 paper (A&A)
7698 \family default
7699  layout for LyX.
7700  Some have already been mentioned.
7701  For the sake of completeness, they are listed all together here:
7702 \end_layout
7703
7704 \begin_layout Itemize
7705
7706 \family typewriter
7707
7708 \backslash
7709 and
7710 \end_layout
7711
7712 \begin_layout Itemize
7713
7714 \family typewriter
7715
7716 \backslash
7717 email
7718 \end_layout
7719
7720 \begin_layout Itemize
7721
7722 \family typewriter
7723
7724 \backslash
7725 appendix
7726 \end_layout
7727
7728 \begin_layout Itemize
7729
7730 \family typewriter
7731
7732 \backslash
7733 authorrunning
7734 \end_layout
7735
7736 \begin_layout Itemize
7737
7738 \family typewriter
7739
7740 \backslash
7741 inst{}
7742 \end_layout
7743
7744 \begin_layout Itemize
7745
7746 \family typewriter
7747
7748 \backslash
7749 keywords{}
7750 \end_layout
7751
7752 \begin_layout Itemize
7753
7754 \family typewriter
7755
7756 \backslash
7757 object{}
7758 \end_layout
7759
7760 \begin_layout Itemize
7761
7762 \family typewriter
7763
7764 \backslash
7765 titlerunning{}
7766 \end_layout
7767
7768 \begin_layout Standard
7769 If you want to use any of these commands, you have to enter them yourself.
7770  
7771 \series bold
7772 Do not forget to mark them as LaTeX code!
7773 \end_layout
7774
7775 \begin_layout Subsection
7776 Figure and Table Floats
7777 \end_layout
7778
7779 \begin_layout Standard
7780 LyX provides support for the necessary float environments 
7781 \family sans
7782 figure, figure*, table
7783 \family default
7784  and 
7785 \family sans
7786 table*
7787 \family default
7788 , therefore we won't tell much about it here.
7789  Refer to the 
7790 \emph on
7791 User's
7792 \begin_inset space ~
7793 \end_inset
7794
7795 Guide
7796 \emph default
7797 .
7798  Just remember that tables should be left-aligned.
7799  For that, select the table and change the alignment in 
7800 \family sans
7801 Edit\SpecialChar \menuseparator
7802 Paragraph
7803 \begin_inset space ~
7804 \end_inset
7805
7806 Settings.
7807 \end_layout
7808
7809 \begin_layout Standard
7810 There is only one special thing: the figures with caption besides the figure.
7811  To create such a figure, you have to do the following:
7812 \end_layout
7813
7814 \begin_layout Enumerate
7815 Create a wide figure float: 
7816 \family sans
7817 Insert\SpecialChar \menuseparator
7818 Float\SpecialChar \menuseparator
7819 Figure
7820 \family default
7821 , then right click in the figure and select 
7822 \family sans
7823 \bar under
7824 S
7825 \bar default
7826 pan
7827 \begin_inset space ~
7828 \end_inset
7829
7830 columns
7831 \family default
7832 .
7833 \end_layout
7834
7835 \begin_layout Enumerate
7836 Enter your caption text.
7837 \end_layout
7838
7839 \begin_layout Enumerate
7840 Press 
7841 \family sans
7842 Return
7843 \family default
7844  to move the cursor above the caption.
7845 \end_layout
7846
7847 \begin_layout Enumerate
7848 Insert your figure
7849 \end_layout
7850
7851 \begin_layout Enumerate
7852 Position the cursor behind the figure and insert a horizontal fill: 
7853 \family sans
7854 Insert\SpecialChar \menuseparator
7855 Special
7856 \begin_inset space ~
7857 \end_inset
7858
7859 Character\SpecialChar \menuseparator
7860 Horizontal
7861 \begin_inset space ~
7862 \end_inset
7863
7864 Fill
7865 \family default
7866 .
7867 \end_layout
7868
7869 \begin_layout Enumerate
7870 Switch to LaTeX mode: 
7871 \family sans
7872 M-c
7873 \begin_inset space ~
7874 \end_inset
7875
7876 t
7877 \family default
7878 .
7879 \end_layout
7880
7881 \begin_layout Enumerate
7882 Enter 
7883 \family typewriter
7884
7885 \backslash
7886 parbox[b]{55mm}{
7887 \family default
7888 .
7889  
7890 \series bold
7891 Do not close the brace!
7892 \end_layout
7893
7894 \begin_layout Enumerate
7895 Position the cursor behind the caption text, switch to LaTeX mode and insert
7896  the closing brace: 
7897 \family sans
7898 M-c
7899 \begin_inset space ~
7900 \end_inset
7901
7902 t
7903 \family default
7904  
7905 \family typewriter
7906 }
7907 \family default
7908 .
7909 \end_layout
7910
7911 \begin_layout Standard
7912 Also, refer to the figures in the example paper.
7913 \end_layout
7914
7915 \begin_layout Subsection
7916 Referee layout
7917 \end_layout
7918
7919 \begin_layout Standard
7920 For submission, the paper has to be formated in a special double-spacing
7921  layout.
7922  For this purpose, you have to give the option 
7923 \family typewriter
7924 referee
7925 \family default
7926  to the documentclass.
7927  This must be done using the extra class options field in the 
7928 \family sans
7929 Document\SpecialChar \menuseparator
7930 Settings
7931 \family default
7932  dialog.
7933  Just enter the string 
7934 \family typewriter
7935 referee
7936 \family default
7937  there.
7938 \end_layout
7939
7940 \begin_layout Subsection
7941 The example paper
7942 \end_layout
7943
7944 \begin_layout Standard
7945 The 
7946 \family sans
7947 Examples
7948 \family default
7949  directory contains an example paper written with LyX.
7950  It is the example paper from the original macro package, translated to
7951  LyX.
7952  Use it for inspiration, and compare the original LaTeX code with LyX way
7953  of writing.
7954 \end_layout
7955
7956 \begin_layout Section
7957 AASTeX
7958 \end_layout
7959
7960 \begin_layout Standard
7961 by 
7962 \noun on
7963 Mike Ressler
7964 \end_layout
7965
7966 \begin_layout Subsection
7967 Introduction
7968 \end_layout
7969
7970 \begin_layout Standard
7971 AASTeX is a set of macros produced by the American Astronomical Society
7972  to facilitate electronic manuscript submission to the three journals they
7973  publish: the Astrophysical Journal (including the Letters and Supplement),
7974  the Astronomical Journal, and the Publications of the Astronomical Society
7975  of the Pacific.
7976  LyX has proven to be an excellent tool for generating these documents,
7977  especially given its equation, citation, and figure handling capabilities.
7978  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7979  is the version described here, or higher.
7980  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7981  incompatible with LyX.
7982  The AASTeX package may be downloaded from the AASTeX Web site
7983 \end_layout
7984
7985 \begin_layout Standard
7986 \begin_inset VSpace medskip
7987 \end_inset
7988
7989
7990 \end_layout
7991
7992 \begin_layout Standard
7993 \align center
7994 \begin_inset Flex URL
7995 status collapsed
7996
7997 \begin_layout Plain Layout
7998
7999 http://www.journals.uchicago.edu/AAS/AASTeX
8000 \end_layout
8001
8002 \end_inset
8003
8004
8005 \end_layout
8006
8007 \begin_layout Standard
8008 \begin_inset VSpace medskip
8009 \end_inset
8010
8011
8012 \end_layout
8013
8014 \begin_layout Standard
8015 A complete user guide is contained in that package and you should familiarize
8016  yourself with it thoroughly before embarking on writing a paper in LyX.
8017  LyX will not reduce the need to figure out all the AASTeX commands, it
8018  will only reduce the drudgery of typing everything in.
8019  It is your responsibility to ensure that the final exported LaTeX document
8020  conforms completely to the requirements of the journal to which you are
8021  submitting your paper.
8022 \end_layout
8023
8024 \begin_layout Subsection
8025 Starting a New Paper
8026 \end_layout
8027
8028 \begin_layout Standard
8029 I strongly suggest that you start with the AASTeX template file.
8030  Click on 
8031 \family sans
8032 File\SpecialChar \menuseparator
8033 New from
8034 \family default
8035  
8036 \family sans
8037 Template
8038 \family default
8039 , enter the new file name, then choose the 
8040 \family typewriter
8041 aastex.lyx
8042 \family default
8043  template.
8044  This will show the most common fields found in a manuscript.
8045  Simply overwrite the existing text (including the brackets, 
8046 \family typewriter
8047 <>
8048 \family default
8049 ) with the correct information.
8050  Many of the AASTeX commands and environments can be implemented directly
8051  in LyX, but some cannot: most noticeably 
8052 \family typewriter
8053
8054 \backslash
8055 altaffilmark
8056 \family default
8057  and 
8058 \family typewriter
8059
8060 \backslash
8061 altaffiltext
8062 \family default
8063 , which should stick out like a sore thumb if you actually just opened the
8064  template file.
8065  For commands such as these, the LaTeX code must be entered directly and
8066  marked as such.
8067  Such commands are referred to as TeX code, or Evil Red Text.
8068  I tried to minimize the amount of TeX code needed in an AASTeX document,
8069  but there is still a bit more required than any of us would like.
8070 \end_layout
8071
8072 \begin_layout Subsection
8073 Finishing Your Paper
8074 \end_layout
8075
8076 \begin_layout Standard
8077 When the paper is finished to your satisfaction and previews/prints correctly,
8078  there are a few 
8079 \begin_inset Quotes eld
8080 \end_inset
8081
8082 postprocessing
8083 \begin_inset Quotes erd
8084 \end_inset
8085
8086  actions which need to be done before you submit it to the journals.
8087  
8088 \end_layout
8089
8090 \begin_layout Enumerate
8091 Export your paper as a LaTeX file (
8092 \family sans
8093 File\SpecialChar \menuseparator
8094 Export\SpecialChar \menuseparator
8095 LaTeX
8096 \family default
8097 ).
8098  
8099 \end_layout
8100
8101 \begin_layout Enumerate
8102 Edit the resulting 
8103 \family typewriter
8104 .tex
8105 \family default
8106  file with your favorite text editor
8107 \end_layout
8108
8109 \begin_deeper
8110 \begin_layout Enumerate
8111 remove the comment lines before the 
8112 \family typewriter
8113
8114 \backslash
8115 documentclass
8116 \family default
8117  command
8118 \end_layout
8119
8120 \begin_layout Enumerate
8121 remove the 
8122 \family typewriter
8123
8124 \backslash
8125 usepackage...{fontenc}
8126 \family default
8127  line if it appears (usually just after 
8128 \family typewriter
8129
8130 \backslash
8131 documentclass
8132 \family default
8133 }; also remove the 
8134 \family typewriter
8135
8136 \backslash
8137 secnumdepth
8138 \family default
8139  line if it appears.
8140 \end_layout
8141
8142 \begin_layout Enumerate
8143 remove everything between (and including) the 
8144 \family typewriter
8145
8146 \backslash
8147 makeatletter
8148 \family default
8149  and 
8150 \family typewriter
8151
8152 \backslash
8153 makeatother
8154 \family default
8155  commands, except for any commands you specifically put into the LaTeX preamble
8156  (which should appear immediately after the 
8157 \begin_inset Quotes eld
8158 \end_inset
8159
8160 User specified LaTeX commands
8161 \begin_inset Quotes erd
8162 \end_inset
8163
8164  comment in the 
8165 \family typewriter
8166 .tex
8167 \family default
8168  file).
8169 \end_layout
8170
8171 \end_deeper
8172 \begin_layout Enumerate
8173 Run the resulting file through LaTeX to make sure it still processes correctly.
8174 \end_layout
8175
8176 \begin_layout Enumerate
8177 Reread the journal requirements to make sure your filenames and formats
8178  are correct.
8179 \end_layout
8180
8181 \begin_layout Enumerate
8182 Submit it.
8183 \end_layout
8184
8185 \begin_layout Subsection
8186 Comments On Specific Commands
8187 \end_layout
8188
8189 \begin_layout Standard
8190 I will not describe the detailed usage of the individual AASTeX commands:
8191  the AASTeX User Guide (
8192 \family typewriter
8193 aasguide.tex
8194 \family default
8195 ) gives a good description of each.
8196  Thus it's probably easiest for me to go down the list as found in the guide
8197  and offer comments where necessary.
8198  So let's begin \SpecialChar \ldots{}
8199
8200 \end_layout
8201
8202 \begin_layout Subsubsection
8203 Things that work as expected
8204 \end_layout
8205
8206 \begin_layout Standard
8207 Because they work as you might expect, I simply list them and the section
8208  they are found in: 
8209 \family typewriter
8210
8211 \backslash
8212 documentclass
8213 \family default
8214  (2.1.1), 
8215 \family typewriter
8216
8217 \backslash
8218 begin{document}
8219 \family default
8220  (2.2), 
8221 \family typewriter
8222
8223 \backslash
8224 title
8225 \family default
8226  (2.3), 
8227 \family typewriter
8228
8229 \backslash
8230 author
8231 \family default
8232  (2.3), 
8233 \family typewriter
8234
8235 \backslash
8236 affil
8237 \family default
8238  (2.3), 
8239 \family typewriter
8240
8241 \backslash
8242 abstract
8243 \family default
8244  (2.4), 
8245 \family typewriter
8246
8247 \backslash
8248 keywords
8249 \family default
8250  (2.5), 
8251 \family typewriter
8252
8253 \backslash
8254 section
8255 \family default
8256  (2.7), 
8257 \family typewriter
8258
8259 \backslash
8260 subsection
8261 \family default
8262  (2.7), 
8263 \family typewriter
8264
8265 \backslash
8266 subsubsection
8267 \family default
8268  (2.7), 
8269 \family typewriter
8270
8271 \backslash
8272 paragraph
8273 \family default
8274  (2.7), 
8275 \family typewriter
8276
8277 \backslash
8278 facility
8279 \family default
8280  (2.10), 
8281 \family typewriter
8282
8283 \backslash
8284 begin{displaymath}
8285 \family default
8286  (2.12), 
8287 \family typewriter
8288
8289 \backslash
8290 begin{equation}
8291 \family default
8292  (2.12), 
8293 \family typewriter
8294
8295 \backslash
8296 begin{eqnarray}
8297 \family default
8298  (2.12), 
8299 \family typewriter
8300
8301 \backslash
8302 begin{mathletters}
8303 \family default
8304  (2.12), 
8305 \family typewriter
8306
8307 \backslash
8308 begin{thebibliography}
8309 \family default
8310  (2.13.1), 
8311 \family typewriter
8312
8313 \backslash
8314 bibitem
8315 \family default
8316  (2.13.2), all the cite commands and their variations (2.13.2), the generic
8317  graphicx figure commands (2.14.1), 
8318 \family typewriter
8319
8320 \backslash
8321 begin{table}
8322 \family default
8323  (2.15.4), 
8324 \family typewriter
8325
8326 \backslash
8327 begin{tabular}
8328 \family default
8329  (2.15.4), 
8330 \family typewriter
8331
8332 \backslash
8333 caption
8334 \family default
8335  (2.15.4), 
8336 \family typewriter
8337
8338 \backslash
8339 label
8340 \family default
8341  (2.15.4, amongst other places), 
8342 \family typewriter
8343
8344 \backslash
8345 tablerefs
8346 \family default
8347  (2.15.5), 
8348 \family typewriter
8349
8350 \backslash
8351 tablecomments
8352 \family default
8353  (2.15.5), 
8354 \family typewriter
8355
8356 \backslash
8357 url
8358 \family default
8359  (2.17.4), 
8360 \family typewriter
8361
8362 \backslash
8363 end{document}
8364 \family default
8365  (2.18).
8366 \end_layout
8367
8368 \begin_layout Standard
8369 The following style options also work correctly: 
8370 \family typewriter
8371 longabstract
8372 \family default
8373  (2.4), 
8374 \family typewriter
8375 preprint
8376 \family default
8377  (3.2.1), 
8378 \family typewriter
8379 preprint2
8380 \family default
8381  (3.2.2), 
8382 \family typewriter
8383 eqsecnum
8384 \family default
8385  (3.3), 
8386 \family typewriter
8387 flushrt
8388 \family default
8389  (3.4).
8390  Simply put them in the 
8391 \family sans
8392 Options
8393 \family default
8394  box in 
8395 \family sans
8396 Layout\SpecialChar \menuseparator
8397 Document
8398 \family default
8399 .
8400 \end_layout
8401
8402 \begin_layout Subsubsection
8403 Things that work, but require more comment
8404 \end_layout
8405
8406 \begin_layout Standard
8407 The following items work, but require a little more discussion:
8408 \end_layout
8409
8410 \begin_layout Itemize
8411 These items are reserved for use by the journal editors, but you can put
8412  them into the LaTeX preamble if you feel compelled to do so: 
8413 \family typewriter
8414
8415 \backslash
8416 received
8417 \family default
8418
8419 \family typewriter
8420
8421 \backslash
8422 revised
8423 \family default
8424
8425 \family typewriter
8426
8427 \backslash
8428 accepted
8429 \family default
8430
8431 \family typewriter
8432
8433 \backslash
8434 ccc
8435 \family default
8436
8437 \family typewriter
8438
8439 \backslash
8440 cpright
8441 \family default
8442  (all from 2.1.3)
8443 \end_layout
8444
8445 \begin_layout Itemize
8446 These items may be placed in the LaTeX preamble, and are included as blanks
8447  in the template file: 
8448 \family typewriter
8449
8450 \backslash
8451 slugcomment
8452 \family default
8453  (2.1.4), 
8454 \family typewriter
8455
8456 \backslash
8457 shorttitle
8458 \family default
8459  (2.1.5), 
8460 \family typewriter
8461
8462 \backslash
8463 shortauthors
8464 \family default
8465  (2.1.5)
8466 \end_layout
8467
8468 \begin_layout Itemize
8469
8470 \family typewriter
8471
8472 \backslash
8473 email
8474 \family default
8475  (2.3) – can only be used 
8476 \begin_inset Quotes eld
8477 \end_inset
8478
8479 standalone
8480 \begin_inset Quotes erd
8481 \end_inset
8482
8483 , not in the middle of a paragraph.
8484  Use TeX code if you need to embed it.
8485 \end_layout
8486
8487 \begin_layout Itemize
8488
8489 \family typewriter
8490
8491 \backslash
8492 and
8493 \family default
8494  (2.3) – will have extra {} after it.
8495  This should not cause an error.
8496 \end_layout
8497
8498 \begin_layout Itemize
8499
8500 \family typewriter
8501
8502 \backslash
8503 notetoeditor
8504 \family default
8505  (2.6) – can only be used 
8506 \begin_inset Quotes eld
8507 \end_inset
8508
8509 standalone
8510 \begin_inset Quotes erd
8511 \end_inset
8512
8513 , not in the middle of a paragraph.
8514  Use TeX code if you need to embed it.
8515 \end_layout
8516
8517 \begin_layout Itemize
8518
8519 \family typewriter
8520
8521 \backslash
8522 placetable
8523 \family default
8524  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8525  hand
8526 \end_layout
8527
8528 \begin_layout Itemize
8529
8530 \family typewriter
8531
8532 \backslash
8533 placefigure
8534 \family default
8535  (2.8) – same as for 
8536 \family typewriter
8537
8538 \backslash
8539 placetable
8540 \end_layout
8541
8542 \begin_layout Itemize
8543
8544 \family typewriter
8545
8546 \backslash
8547 acknowledgements
8548 \family default
8549  (2.9) – will have extra {} after it.
8550  This should not cause an error.
8551 \end_layout
8552
8553 \begin_layout Itemize
8554
8555 \family typewriter
8556
8557 \backslash
8558 appendix
8559 \family default
8560  (2.11) – will have extra {} after it.
8561  This should not cause an error.
8562 \end_layout
8563
8564 \begin_layout Itemize
8565
8566 \family typewriter
8567
8568 \backslash
8569 figcaption
8570 \family default
8571  (2.14.2) – you can insert an optional filename argument by placing the cursor
8572  at the beginning of the text and selecting 
8573 \family sans
8574 Insert\SpecialChar \menuseparator
8575 Short Title
8576 \family default
8577 .
8578  
8579 \begin_inset Quotes eld
8580 \end_inset
8581
8582 Short Title
8583 \begin_inset Quotes erd
8584 \end_inset
8585
8586  inserts an optional argument of the type needed by 
8587 \family typewriter
8588
8589 \backslash
8590 figcaption
8591 \family default
8592 .
8593  Hopefully it will be renamed someday.
8594 \end_layout
8595
8596 \begin_layout Itemize
8597
8598 \family typewriter
8599
8600 \backslash
8601 objectname
8602 \family default
8603  (2.17.1) – same as 
8604 \family typewriter
8605
8606 \backslash
8607 figcaption
8608 \family default
8609  for the catalog ID optional parameter
8610 \end_layout
8611
8612 \begin_layout Itemize
8613
8614 \family typewriter
8615
8616 \backslash
8617 dataset
8618 \family default
8619  (2.17.1) – same as 
8620 \family typewriter
8621
8622 \backslash
8623 figcaption
8624 \family default
8625  for the catalog ID optional parameter
8626 \end_layout
8627
8628 \begin_layout Subsubsection
8629 Things not implemented, use TeX code
8630 \end_layout
8631
8632 \begin_layout Standard
8633
8634 \family typewriter
8635
8636 \backslash
8637 altaffilmark
8638 \family default
8639  (2.3), 
8640 \family typewriter
8641
8642 \backslash
8643 altaffiltext
8644 \family default
8645  (2.3), 
8646 \family typewriter
8647
8648 \backslash
8649 eqnum
8650 \family default
8651  (2.12), 
8652 \family typewriter
8653
8654 \backslash
8655 setcounter{equation}
8656 \family default
8657  (2.12), Journal name abbreviations (2.13.4), 
8658 \family typewriter
8659
8660 \backslash
8661 figurenum
8662 \family default
8663  (2.14.1), 
8664 \family typewriter
8665
8666 \backslash
8667 epsscale
8668 \family default
8669  (2.14.1), 
8670 \family typewriter
8671
8672 \backslash
8673 plotone
8674 \family default
8675  (2.14.1), 
8676 \family typewriter
8677
8678 \backslash
8679 plottwo
8680 \family default
8681  (2.14.1), 
8682 \family typewriter
8683
8684 \backslash
8685 tablenum
8686 \family default
8687  (2.15.4), 
8688 \family typewriter
8689
8690 \backslash
8691 tableline
8692 \family default
8693  (2.15.4, insert it as the first element in the lefthand cell after where
8694  you want it.
8695  Don't use any of LyX's rules in the table), 
8696 \family typewriter
8697
8698 \backslash
8699 tablenotemark
8700 \family default
8701  (2.15.5), 
8702 \family typewriter
8703
8704 \backslash
8705 tablenotetext
8706 \family default
8707  (2.15.5), much of Misc (2.17, except 
8708 \family typewriter
8709
8710 \backslash
8711 objectname
8712 \family default
8713
8714 \family typewriter
8715
8716 \backslash
8717 dataset
8718 \family default
8719
8720 \family typewriter
8721
8722 \backslash
8723 url
8724 \family default
8725 , and 
8726 \family typewriter
8727
8728 \backslash
8729 email
8730 \family default
8731 ; see above), 
8732 \family typewriter
8733
8734 \backslash
8735 singlespace
8736 \family default
8737  (3.1), 
8738 \family typewriter
8739
8740 \backslash
8741 doublespace
8742 \family default
8743  (3.1), 
8744 \family typewriter
8745
8746 \backslash
8747 onecolumn
8748 \family default
8749  (3.2), 
8750 \family typewriter
8751
8752 \backslash
8753 twocolumn
8754 \family default
8755  (3.2)
8756 \end_layout
8757
8758 \begin_layout Subsubsection
8759 Things that cannot be implemented
8760 \end_layout
8761
8762 \begin_layout Standard
8763 \SpecialChar \ldots{}
8764  at least in any meaningful sort of way, so I suggest ignoring them.
8765  They are the references environment (2.13.3), and the deluxetable environment
8766  (2.15).
8767  If you really, really need to use deluxetable, I suggest editing it in
8768  a separate file with a text editor, then using 
8769 \family sans
8770 Insert\SpecialChar \menuseparator
8771 Child
8772 \begin_inset space ~
8773 \end_inset
8774
8775 Document
8776 \family default
8777  to include it in your LyX document.
8778  See the 
8779 \family typewriter
8780 aas_sample.lyx
8781 \family default
8782  file to see an example of this.
8783 \end_layout
8784
8785 \begin_layout Subsection
8786 FAQs, Tips, Tricks, and Other Ruminations
8787 \end_layout
8788
8789 \begin_layout Subsubsection
8790 Getting LyX and AASTeX to cooperate
8791 \end_layout
8792
8793 \begin_layout Standard
8794 It can be a bit tricky to get LyX to recognize a new layout and document
8795  class.
8796  When all else fails, do this:
8797 \end_layout
8798
8799 \begin_layout Enumerate
8800 Make certain that LaTeX can find AASTeX.
8801  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8802  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8803 \family typewriter
8804 sample.tex
8805 \family default
8806 .
8807 \end_layout
8808
8809 \begin_layout Enumerate
8810 Make certain that 
8811 \family typewriter
8812 aastex.layout
8813 \family default
8814  appears in LyX's 
8815 \family typewriter
8816 layouts
8817 \family default
8818  folder
8819 \end_layout
8820
8821 \begin_layout Enumerate
8822 Rerun 
8823 \family sans
8824 Tools\SpecialChar \menuseparator
8825 Reconfigure
8826 \family default
8827  in LyX, then restart LyX.
8828 \end_layout
8829
8830 \begin_layout Enumerate
8831 Open a regular new file, not from a template.
8832  Does AASTeX appear in the class list in 
8833 \family sans
8834 Document\SpecialChar \menuseparator
8835 Settings
8836 \family default
8837 ?
8838 \end_layout
8839
8840 \begin_layout Standard
8841 If you get a warning from an existing AASTeX document about not being able
8842  to find the AASTeX layout or a message about 
8843 \begin_inset Quotes eld
8844 \end_inset
8845
8846 You should not mix title layouts with normal ones
8847 \begin_inset Quotes erd
8848 \end_inset
8849
8850 , things haven't been installed correctly.
8851 \end_layout
8852
8853 \begin_layout Subsubsection
8854 LaTeX error processing a table 
8855 \end_layout
8856
8857 \begin_layout Standard
8858 LyX, by default, attempts to center the table caption/title.
8859  This seems to produce a bad interaction in AASTeX so you should click somewhere
8860  in the caption/title, then select 
8861 \family sans
8862 Edit\SpecialChar \menuseparator
8863 Paragraph
8864 \begin_inset space ~
8865 \end_inset
8866
8867 Settings
8868 \family default
8869 , then set the 
8870 \family sans
8871 Alignment
8872 \family default
8873  to 
8874 \family sans
8875 Block
8876 \family default
8877 .
8878  This took care of it for me.
8879 \end_layout
8880
8881 \begin_layout Subsubsection
8882 References
8883 \end_layout
8884
8885 \begin_layout Standard
8886 A couple of things: 1) I have noticed some funny spacing in the reference
8887  entries in the text.
8888  When you enter the bibliography item data, make sure their is 
8889 \emph on
8890 no
8891 \emph default
8892  space between the last author and the parenthesis setting off the year;
8893  
8894 \emph on
8895 e.
8896 \begin_inset space \thinspace{}
8897 \end_inset
8898
8899 g.
8900 \begin_inset space \space{}
8901 \end_inset
8902
8903
8904 \emph default
8905 type 
8906 \family typewriter
8907 Ressler(1992)
8908 \family default
8909 , not 
8910 \family typewriter
8911 Ressler (1992)
8912 \family default
8913 .
8914  2) Entering the references at all is not obvious.
8915  The easiest thing is to start typing your first reference at the end of
8916  the document, then mark it as type 
8917 \family sans
8918 References
8919 \family default
8920 .
8921  That will put a small gray box in front of what you just typed.
8922  Click on the box to fill in the rest of the information.
8923  For new references, go to the end of an existing reference and press return.
8924  That will create a new line with its own box, etc.
8925 \end_layout
8926
8927 \begin_layout Subsubsection
8928 Including EPS files
8929 \end_layout
8930
8931 \begin_layout Standard
8932 Even though AASTeX provides its own figure commands (
8933 \family typewriter
8934
8935 \backslash
8936 plotone
8937 \family default
8938 , for example), I much prefer LaTeX's standard figure commands (with the
8939  default graphicx).
8940  You can insert the 
8941 \family typewriter
8942
8943 \backslash
8944 plotone
8945 \family default
8946 , etc.
8947 \begin_inset space ~
8948 \end_inset
8949
8950 commands as TeX code into a Figure Float box if you desire, but I never
8951  have much luck getting the layout right.
8952  With the standard graphics, LyX will insert a 
8953 \family typewriter
8954
8955 \backslash
8956 usepackage{graphicx}
8957 \family default
8958  command into the LaTeX preamble and handle the figures in the standard
8959  LaTeX2e way, interspersing the figures in the text.
8960  I believe ApJ accepts figures exactly this way now; AJ might still use
8961  the 
8962 \begin_inset Quotes eld
8963 \end_inset
8964
8965 stack everything at the end
8966 \begin_inset Quotes erd
8967 \end_inset
8968
8969  technique.
8970 \end_layout
8971
8972 \begin_layout Subsubsection
8973 Things I could have done, but didn't
8974 \end_layout
8975
8976 \begin_layout Standard
8977 There are a few 
8978 \begin_inset Quotes eld
8979 \end_inset
8980
8981 pretty
8982 \begin_inset Quotes erd
8983 \end_inset
8984
8985  things I could have implemented, but chose not to.
8986  For instance, I saw no point in double-spacing the text in the LyX window,
8987  even though it is double-spaced in the paper manuscript.
8988  Also, I chose not to make separate layouts for the preprint and preprint2
8989  styles.
8990  Since I assume you will spend most of your time in the plain manuscript
8991  mode anyway, I decided not to chew up more disk space with this.
8992  
8993 \end_layout
8994
8995 \begin_layout Subsection
8996 Final Caveat
8997 \end_layout
8998
8999 \begin_layout Standard
9000 Your mileage may vary.
9001  I've now had papers published by both ApJ and AJ that have had 98% of the
9002  effort done in LyX; the last 2% was the LaTeX post-processing and a few
9003  cleanups.
9004  I have had no trouble with the submission process, and I'm sure the journals
9005  were never aware that there might be a difference.
9006  So, go forth and publish!
9007 \end_layout
9008
9009 \begin_layout Section
9010 AMS LaTeX
9011 \end_layout
9012
9013 \begin_layout Standard
9014 by 
9015 \noun on
9016 David Johnson
9017 \noun default
9018 ; updated by 
9019 \noun on
9020 Richard Heck
9021 \end_layout
9022
9023 \begin_layout Standard
9024 \begin_inset VSpace bigskip
9025 \end_inset
9026
9027
9028 \end_layout
9029
9030 \begin_layout Standard
9031 \noindent
9032 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
9033  papers to be submitted to American Mathematical Society publications.
9034  The layouts are not tailored to a specific journal, but easily can be.
9035  You should refer to the AMS documentation for specific instructions for
9036  each journal (usually it will entail only changing a single line in the
9037  TeX output).
9038  That documentation is available on the Web at 
9039 \begin_inset Flex URL
9040 status open
9041
9042 \begin_layout Plain Layout
9043
9044 http://www.ams.org
9045 \end_layout
9046
9047 \end_inset
9048
9049  or by ftp at 
9050 \begin_inset Flex URL
9051 status open
9052
9053 \begin_layout Plain Layout
9054
9055 ftp://ftp.ams.org/pub/tex/amslatex/
9056 \end_layout
9057
9058 \end_inset
9059
9060 .
9061  These layouts are appropriate, and useful, for any mathematical writing.
9062  
9063 \end_layout
9064
9065 \begin_layout Standard
9066 There are two basic AMS LaTeX layouts: 
9067 \end_layout
9068
9069 \begin_layout Itemize
9070 amsart: The standard AMS article format.
9071 \end_layout
9072
9073 \begin_layout Itemize
9074 amsbook: the standard AMS book (really, monograph) format.
9075  
9076 \end_layout
9077
9078 \begin_layout Standard
9079 The layouts themselves contain only the minimum necessary to use the AMS
9080  classes.
9081  They do not, in particular, contain any of the `theorem' environments used
9082  for setting theorems, lemmas, and the like.
9083  These are contained, instead, in the 
9084 \begin_inset Flex Code
9085 status collapsed
9086
9087 \begin_layout Plain Layout
9088 Theorems (AMS)
9089 \end_layout
9090
9091 \end_inset
9092
9093  module, which is loaded by default when you select one of the AMS classes.
9094  (It can also be used with other classes and can be removed, if you would
9095  rather use something else.) Less commonly used environments are in the 
9096 \begin_inset Flex Code
9097 status collapsed
9098
9099 \begin_layout Plain Layout
9100 Theorems (AMS-Extended)
9101 \end_layout
9102
9103 \end_inset
9104
9105  module, which must be loaded manually.
9106 \end_layout
9107
9108 \begin_layout Standard
9109 By default, theorems and the like are numbered consecutively throughout
9110  the document, but this may be modified by loading the module 
9111 \begin_inset Flex Code
9112 status collapsed
9113
9114 \begin_layout Plain Layout
9115 Theorems (Order by Section)
9116 \end_layout
9117
9118 \end_inset
9119
9120  or, if you are using 
9121 \begin_inset Flex Code
9122 status collapsed
9123
9124 \begin_layout Plain Layout
9125 book (AMS)
9126 \end_layout
9127
9128 \end_inset
9129
9130 , the module 
9131 \begin_inset Flex Code
9132 status collapsed
9133
9134 \begin_layout Plain Layout
9135 Theorems (Order by Chapter)
9136 \end_layout
9137
9138 \end_inset
9139
9140 .
9141  These will number the results as 
9142 \begin_inset Formula $n.m$
9143 \end_inset
9144
9145 , where the first number refers to the section (or chapter) and the second
9146  refers to the total number of results so far in that section (or chapter).
9147  Many environments are also available unnumbered.
9148  These are indicated by an asterisk at the end.
9149  If you happen to want 
9150 \emph on
9151 only
9152 \emph default
9153  unnumbered results, the module 
9154 \begin_inset Flex Code
9155 status collapsed
9156
9157 \begin_layout Plain Layout
9158 Theorems (Starred)
9159 \end_layout
9160
9161 \end_inset
9162
9163  provides that option.
9164 \end_layout
9165
9166 \begin_layout Standard
9167 Note that these modules do not 
9168 \emph on
9169 have
9170 \emph default
9171  to be used with the AMS classes.
9172  It is perfectly possible to use the 
9173 \begin_inset Flex Code
9174 status collapsed
9175
9176 \begin_layout Plain Layout
9177 Theorems (AMS)
9178 \end_layout
9179
9180 \end_inset
9181
9182  module, and the others mentioned, with other classes, such as 
9183 \begin_inset Flex Code
9184 status collapsed
9185
9186 \begin_layout Plain Layout
9187 article
9188 \end_layout
9189
9190 \end_inset
9191
9192
9193 \begin_inset Flex Code
9194 status collapsed
9195
9196 \begin_layout Plain Layout
9197 report
9198 \end_layout
9199
9200 \end_inset
9201
9202
9203 \begin_inset Flex Code
9204 status collapsed
9205
9206 \begin_layout Plain Layout
9207 book (KOMA-script)
9208 \end_layout
9209
9210 \end_inset
9211
9212 , and so forth.
9213 \end_layout
9214
9215 \begin_layout Subsection
9216 What these layouts provide
9217 \end_layout
9218
9219 \begin_layout Standard
9220 There is a long list of included environments provided by these layouts.
9221  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9222  variety of `theorem' environments.
9223  However, the AMS recommends the environments that are available in LyX.
9224  
9225 \end_layout
9226
9227 \begin_layout Standard
9228 The following environments—as well as the standard environments, such as
9229  
9230 \begin_inset Flex Noun
9231 status collapsed
9232
9233 \begin_layout Plain Layout
9234 section
9235 \end_layout
9236
9237 \end_inset
9238
9239
9240 \begin_inset Flex Noun
9241 status collapsed
9242
9243 \begin_layout Plain Layout
9244 bibliography
9245 \end_layout
9246
9247 \end_inset
9248
9249
9250 \begin_inset Flex Noun
9251 status collapsed
9252
9253 \begin_layout Plain Layout
9254 title
9255 \end_layout
9256
9257 \end_inset
9258
9259
9260 \begin_inset Flex Noun
9261 status collapsed
9262
9263 \begin_layout Plain Layout
9264 author
9265 \end_layout
9266
9267 \end_inset
9268
9269 , and 
9270 \begin_inset Flex Noun
9271 status collapsed
9272
9273 \begin_layout Plain Layout
9274 date
9275 \end_layout
9276
9277 \end_inset
9278
9279 —are provided by 
9280 \begin_inset Flex Code
9281 status collapsed
9282
9283 \begin_layout Plain Layout
9284 article (AMS)
9285 \end_layout
9286
9287 \end_inset
9288
9289  and 
9290 \begin_inset Flex Code
9291 status collapsed
9292
9293 \begin_layout Plain Layout
9294 book (AMS)
9295 \end_layout
9296
9297 \end_inset
9298
9299 :
9300 \end_layout
9301
9302 \begin_layout Description
9303 Address This should be the author's permanent address.
9304 \end_layout
9305
9306 \begin_layout Description
9307 Current
9308 \begin_inset space ~
9309 \end_inset
9310
9311 Address This should be the author's temporary address at the time of submission,
9312  if different from the Address.
9313 \end_layout
9314
9315 \begin_layout Description
9316 Email Author's e-mail address
9317 \end_layout
9318
9319 \begin_layout Description
9320 URL Author's Web address, if desired.
9321 \end_layout
9322
9323 \begin_layout Description
9324 Keywords Key words or phrases used to identify specific topics discussed
9325  in the paper.
9326 \end_layout
9327
9328 \begin_layout Description
9329 Subjectclass These refer to the AMS Subject Classifications, published and
9330  described in 
9331 \emph on
9332 Mathematical Reviews
9333 \emph default
9334 .
9335  These are also available online at the AMS cites listed above.
9336 \end_layout
9337
9338 \begin_layout Description
9339 Thanks
9340 \end_layout
9341
9342 \begin_layout Description
9343 Dedicatory
9344 \end_layout
9345
9346 \begin_layout Description
9347 Translator
9348 \end_layout
9349
9350 \begin_layout Standard
9351 The following environments are provided by both the 
9352 \begin_inset Flex Code
9353 status collapsed
9354
9355 \begin_layout Plain Layout
9356 Theorems
9357 \end_layout
9358
9359 \end_inset
9360
9361  and 
9362 \begin_inset Flex Code
9363 status collapsed
9364
9365 \begin_layout Plain Layout
9366 Theorems (AMS)
9367 \end_layout
9368
9369 \end_inset
9370
9371  modules, in the latter case in both starred (unnumbered) and unstarred
9372  (numbered) versions.
9373  These same environments are provided only in the starred versions by the
9374  
9375 \begin_inset Flex Code
9376 status collapsed
9377
9378 \begin_layout Plain Layout
9379 Theorems (Starred)
9380 \end_layout
9381
9382 \end_inset
9383
9384  module:
9385 \end_layout
9386
9387 \begin_layout Theorem
9388 This is typically used for the statements of major results.
9389  
9390 \end_layout
9391
9392 \begin_layout Corollary*
9393 This is used for statements which follow fairly directly from previous statement
9394 s.
9395  Again, these can be major results.
9396  
9397 \end_layout
9398
9399 \begin_layout Lemma
9400 These are smaller results needed to prove other statements.
9401 \end_layout
9402
9403 \begin_layout Proposition
9404 These are less major results which (hopefully) add to the general theory
9405  being discussed.
9406 \end_layout
9407
9408 \begin_layout Conjecture
9409 These are statements provided without justification, which the author does
9410  not know how to prove, but which seem to be true (to the author, at least).
9411 \end_layout
9412
9413 \begin_layout Definition*
9414 Guess what this is for.
9415  The font is different for this environment than for the previous ones.
9416  
9417 \end_layout
9418
9419 \begin_layout Example*
9420 Used for examples illustrating proven results.
9421 \end_layout
9422
9423 \begin_layout Problem
9424 It's not really known what this is for.
9425  You should figure it out.
9426 \end_layout
9427
9428 \begin_layout Exercise*
9429 Write a description for this one.
9430 \end_layout
9431
9432 \begin_layout Remark
9433 This environment is also a type of theorem, usually a lesser sort of observation.
9434 \end_layout
9435
9436 \begin_layout Claim*
9437 Often used in the course of giving a proof of a larger result.
9438 \end_layout
9439
9440 \begin_layout Case
9441 Generally, these are used to break up long arguments, using specific instances
9442  of some condition.
9443  
9444 \end_layout
9445
9446 \begin_layout Case
9447 The numbering scheme for cases is on its own, not together with other numbered
9448  statements.
9449  
9450 \end_layout
9451
9452 \begin_layout Proof
9453 At the end of this environment, a QED symbol (usually a square, but it can
9454  vary with different styles) is placed.
9455  If you want to have other environments within this one—for example, Case
9456  environments—and have the QED symbol appear only after them, then the other
9457  environments need to be nested within the proof environment.
9458  See the section 
9459 \emph on
9460 Nesting Environments
9461 \emph default
9462  of the 
9463 \emph on
9464 User's Guide
9465 \emph default
9466  for information on nesting.
9467 \end_layout
9468
9469 \begin_layout Standard
9470 And these environments are provided by 
9471 \begin_inset Flex Code
9472 status collapsed
9473
9474 \begin_layout Plain Layout
9475 Theorems (AMS-Extended)
9476 \end_layout
9477
9478 \end_inset
9479
9480 :
9481 \end_layout
9482
9483 \begin_layout Criterion*
9484 A required condition.
9485 \end_layout
9486
9487 \begin_layout Algorithm*
9488 A general procedure to be used.
9489 \end_layout
9490
9491 \begin_layout Axiom*
9492 This is a property or statement taken as true within the system being discussed.
9493 \end_layout
9494
9495 \begin_layout Condition*
9496 Sometimes used to state a condition assumed within the present context of
9497  discussion.
9498 \end_layout
9499
9500 \begin_layout Note*
9501 Similar to a Remark.
9502 \end_layout
9503
9504 \begin_layout Notation*
9505 Used for the explanation of, yes, notation.
9506 \end_layout
9507
9508 \begin_layout Summary
9509 Do we really need to tell you? 
9510 \end_layout
9511
9512 \begin_layout Acknowledgement*
9513 Acknowledgement.
9514 \end_layout
9515
9516 \begin_layout Conclusion*
9517 Sometimes used at the end of a long train of argument.
9518 \end_layout
9519
9520 \begin_layout Fact
9521 Used in a way similar to Proposition, though perhaps lower on the scale.
9522 \end_layout
9523
9524 \begin_layout Standard
9525 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9526  fonts packages.
9527  They need to be available on your system in order to use these environments.
9528 \end_layout
9529
9530 \begin_layout Section
9531 AGU journals (
9532 \family sans
9533 aguplus
9534 \family default
9535 )
9536 \end_layout
9537
9538 \begin_layout Standard
9539 by 
9540 \shape smallcaps
9541 Martin Vermeer
9542 \end_layout
9543
9544 \begin_layout Subsection
9545 Description
9546 \end_layout
9547
9548 \begin_layout Standard
9549 These are the layout files for some of the journals of the American Geophysical
9550  Society.
9551  It is assumed that you have both the AGU's own class files and AGUplus
9552  installed (everything to be found at
9553 \begin_inset Flex URL
9554 status collapsed
9555
9556 \begin_layout Plain Layout
9557
9558 ftp://ftp.agu.org/journals/latex/journals
9559 \end_layout
9560
9561 \end_inset
9562
9563 ).
9564 \end_layout
9565
9566 \begin_layout Subsection
9567 New styles
9568 \end_layout
9569
9570 \begin_layout Standard
9571 Redefined are 
9572 \family sans
9573 Paragraph
9574 \family default
9575
9576 \family sans
9577 Paragraph*
9578 \family default
9579 .
9580  They are still called this in the LyX GUI, though their LaTeX equivalents
9581  in the AGU classes are 
9582 \family sans
9583 Subsubsubsection
9584 \family default
9585  and 
9586 \family sans
9587 Subsubsubsection*
9588 \family default
9589 .
9590 \end_layout
9591
9592 \begin_layout Standard
9593 Newly defined styles are 
9594 \family sans
9595 Left_Header
9596 \family default
9597
9598 \family sans
9599 Right_Header
9600 \family default
9601
9602 \family sans
9603 Received
9604 \family default
9605
9606 \family sans
9607 Revised
9608 \family default
9609
9610 \family sans
9611 Accepted
9612 \family default
9613
9614 \family sans
9615 CCC
9616 \family default
9617
9618 \family sans
9619 PaperId
9620 \family default
9621
9622 \family sans
9623 AuthorAddr
9624 \family default
9625
9626 \family sans
9627 SlugComment
9628 \family default
9629 .
9630  These are mostly manuscript attributes and defined in the AGU class documentati
9631 on.
9632 \end_layout
9633
9634 \begin_layout Standard
9635 I suspect this is still badly incomplete.
9636 \end_layout
9637
9638 \begin_layout Subsection
9639 New floats
9640 \end_layout
9641
9642 \begin_layout Standard
9643
9644 \family sans
9645 Planotable
9646 \family default
9647  and 
9648 \family sans
9649 Plate
9650 \family default
9651 .
9652  We also have a new 
9653 \family sans
9654 Table_Caption
9655 \family default
9656 .
9657 \end_layout
9658
9659 \begin_layout Subsection
9660 Supported journals
9661 \end_layout
9662
9663 \begin_layout Itemize
9664
9665 \emph on
9666 Journal of Geophysical Research
9667 \emph default
9668
9669 \family typewriter
9670 jgrga.layout
9671 \family default
9672  — Martin Vermeer
9673 \end_layout
9674
9675 \begin_layout Standard
9676 Add your own, it isn't so hard! Look at the 
9677 \family typewriter
9678 jgrga.layout
9679 \family default
9680  example and 
9681 \family typewriter
9682 aguplus.inc
9683 \family default
9684 .
9685 \end_layout
9686
9687 \begin_layout Subsection
9688 Bugs and things to remember
9689 \end_layout
9690
9691 \begin_layout Standard
9692 In order to use the new layouts, you must remember to do the following for
9693  a new document:
9694 \end_layout
9695
9696 \begin_layout Enumerate
9697
9698 \emph on
9699 Turn off babel
9700 \emph default
9701 .
9702  This can be done in the 
9703 \family sans
9704 Layout\SpecialChar \menuseparator
9705 Document
9706 \family default
9707  or 
9708 \family sans
9709 Document\SpecialChar \menuseparator
9710 Settings
9711 \family default
9712  menu item.
9713  (AGU articles are always in English, right? So 
9714 \emph on
9715 don't
9716 \emph default
9717  choose a language.)
9718 \end_layout
9719
9720 \begin_layout Enumerate
9721 Enter 
9722 \family typewriter
9723 jgrga
9724 \family default
9725  into the document's 
9726 \family sans
9727 Extra Options
9728 \family default
9729  field.
9730  (Yes, this is a bug.)
9731 \end_layout
9732
9733 \begin_layout Enumerate
9734 Make sure you use the 
9735 \family typewriter
9736 agu.bst
9737 \family default
9738  bibliography style, by entering 
9739 \family sans
9740 agu
9741 \family default
9742  into the second field of the BibTeX inset.
9743  None of the standard styles will do.
9744 \end_layout
9745
9746 \begin_layout Section
9747 Broadway
9748 \end_layout
9749
9750 \begin_layout Standard
9751 by 
9752 \shape smallcaps
9753 Garst Reese
9754 \end_layout
9755
9756 \begin_layout Subsection
9757 Introduction
9758 \end_layout
9759
9760 \begin_layout Standard
9761 Broadway is for writing plays.
9762  The format is more decorative than Hollywood, and much less standardized.
9763  This format should be suitable for workshops.
9764 \end_layout
9765
9766 \begin_layout Subsection
9767 Special problems
9768 \end_layout
9769
9770 \begin_layout Standard
9771 The same as in Hollywood.
9772 \end_layout
9773
9774 \begin_layout Subsection
9775 Special features
9776 \end_layout
9777
9778 \begin_layout Standard
9779 Insert the 
9780 \family sans
9781 Speaker
9782 \family default
9783  names as labels then cross-reference the label to insert the name.
9784  The cross-reference dialog will show the current cast of characters.
9785 \end_layout
9786
9787 \begin_layout Subsection
9788 Paper size and Margins
9789 \end_layout
9790
9791 \begin_layout Standard
9792 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9793 \end_layout
9794
9795 \begin_layout Subsection
9796 Environments
9797 \end_layout
9798
9799 \begin_layout Standard
9800 The following environments are available.
9801  You can use broadway.bind to get the bind keys shown at the right.
9802 \end_layout
9803
9804 \begin_layout Itemize
9805
9806 \family sans
9807 Standard
9808 \begin_inset Newline newline
9809 \end_inset
9810
9811
9812 \family default
9813 You should not have to use this, but it is here for anything that does not
9814  fit otherwise.
9815 \end_layout
9816
9817 \begin_layout Itemize
9818
9819 \family sans
9820 Narrative
9821 \begin_inset space \hfill{}
9822 \end_inset
9823
9824 M-z n
9825 \begin_inset Newline newline
9826 \end_inset
9827
9828
9829 \family default
9830 Used to describe stage setting and the action.
9831  First use of speaker names in all CAPs.
9832 \end_layout
9833
9834 \begin_layout Itemize
9835
9836 \family sans
9837 ACT
9838 \begin_inset space \hfill{}
9839 \end_inset
9840
9841 M-z a
9842 \begin_inset Newline newline
9843 \end_inset
9844
9845
9846 \family default
9847 Automatically numbered.
9848  On screen it will be arabic, but will print as Roman.
9849 \end_layout
9850
9851 \begin_layout Itemize
9852
9853 \family sans
9854 ACT*
9855 \begin_inset space \hfill{}
9856 \end_inset
9857
9858 M-z S at
9859 \begin_inset Newline newline
9860 \end_inset
9861
9862
9863 \family default
9864 Subtitle for 
9865 \family sans
9866 ACT.
9867
9868 \family default
9869  It is just centered text.
9870 \end_layout
9871
9872 \begin_layout Itemize
9873
9874 \family sans
9875 SCENE
9876 \begin_inset space \hfill{}
9877 \end_inset
9878
9879 M-z S-S
9880 \begin_inset Newline newline
9881 \end_inset
9882
9883
9884 \family default
9885 Not automatically numbered.
9886  You supply the number.
9887  This is because I couldn't figure out how.
9888 \end_layout
9889
9890 \begin_layout Itemize
9891
9892 \family sans
9893 AT_RISE:
9894 \begin_inset space \hfill{}
9895 \end_inset
9896
9897 M-z S-R
9898 \begin_inset Newline newline
9899 \end_inset
9900
9901
9902 \family default
9903 A special case of Narrative to describe the setting and action as the curtain
9904  rises.
9905 \end_layout
9906
9907 \begin_layout Itemize
9908
9909 \family sans
9910 Speaker
9911 \begin_inset space \hfill{}
9912 \end_inset
9913
9914 M-z s
9915 \begin_inset Newline newline
9916 \end_inset
9917
9918
9919 \family default
9920 The speaker's (actor's) title, centered in all CAPS.
9921 \end_layout
9922
9923 \begin_layout Itemize
9924
9925 \family sans
9926 Parenthetical
9927 \begin_inset space \hfill{}
9928 \end_inset
9929
9930 M-z p
9931 \begin_inset Newline newline
9932 \end_inset
9933
9934
9935 \family default
9936 Instructions to the speaker.
9937  The parentheses are automatically inserted.
9938  The ( will appear on screen, but both will be in the printed play.
9939  This environment is only used within 
9940 \family sans
9941 Dialogue
9942 \family default
9943 .
9944 \end_layout
9945
9946 \begin_layout Itemize
9947
9948 \family sans
9949 Dialogue
9950 \begin_inset space \hfill{}
9951 \end_inset
9952
9953 M-z d
9954 \begin_inset Newline newline
9955 \end_inset
9956
9957
9958 \family default
9959 What the Speaker says.
9960 \end_layout
9961
9962 \begin_layout Itemize
9963
9964 \family sans
9965 CURTAIN
9966 \begin_inset space \hfill{}
9967 \end_inset
9968
9969 M-z S-C
9970 \begin_inset Newline newline
9971 \end_inset
9972
9973
9974 \family default
9975 The curtain comes down.
9976 \end_layout
9977
9978 \begin_layout Itemize
9979
9980 \family sans
9981 Title
9982 \begin_inset space \hfill{}
9983 \end_inset
9984
9985 M-z S-T
9986 \end_layout
9987
9988 \begin_layout Itemize
9989
9990 \family sans
9991 Author
9992 \begin_inset space \hfill{}
9993 \end_inset
9994
9995 M-z S-A
9996 \end_layout
9997
9998 \begin_layout Itemize
9999
10000 \family sans
10001 Right_Address
10002 \begin_inset space \hfill{}
10003 \end_inset
10004
10005 M-z r
10006 \end_layout
10007
10008 \begin_layout Standard
10009 Hello there.
10010 \end_layout
10011
10012 \begin_layout Section
10013 Dinbrief
10014 \end_layout
10015
10016 \begin_layout Standard
10017 The document class 
10018 \family sans
10019 dinbrief
10020 \family default
10021  can be used to type letters according to German conventions.
10022  A template file is included in 
10023 \family typewriter
10024 .../lyx/share/templates
10025 \family default
10026  for you to use as a starting point.
10027 \end_layout
10028
10029 \begin_layout Section
10030 EGS journals (
10031 \family sans
10032 egs
10033 \family default
10034 )
10035 \end_layout
10036
10037 \begin_layout Standard
10038 by 
10039 \shape smallcaps
10040 Martin Vermeer
10041 \end_layout
10042
10043 \begin_layout Subsection
10044 Description
10045 \end_layout
10046
10047 \begin_layout Standard
10048 This is the layout file for the European Geophysical Society journals.
10049  The needed 
10050 \family typewriter
10051 egs.cls
10052 \family default
10053  can be downloaded from the web site of the EGS under 
10054 \begin_inset Flex URL
10055 status collapsed
10056
10057 \begin_layout Plain Layout
10058
10059 www.copernicus.org
10060 \end_layout
10061
10062 \end_inset
10063
10064 .
10065 \end_layout
10066
10067 \begin_layout Subsection
10068 New styles
10069 \end_layout
10070
10071 \begin_layout Standard
10072
10073 \family sans
10074 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
10075  Accepted
10076 \family default
10077
10078 \family sans
10079 Offsets
10080 \family default
10081 .
10082  The current layout file is unfortunately very unmodular and would benefit
10083  from using the various 
10084 \family typewriter
10085 std*.inc
10086 \family default
10087  file inclusions.
10088 \end_layout
10089
10090 \begin_layout Section
10091 Elsevier Journals
10092 \end_layout
10093
10094 \begin_layout Standard
10095 See the LyX template file 
10096 \family typewriter
10097 elsarticle.lyx
10098 \family default
10099 .
10100  It contains all infos you need.
10101 \end_layout
10102
10103 \begin_layout Section
10104 Foils [aka 
10105 \family sans
10106 FoilTeX
10107 \family default
10108 ]
10109 \begin_inset CommandInset label
10110 LatexCommand label
10111 name "sec:foiltex"
10112
10113 \end_inset
10114
10115
10116 \end_layout
10117
10118 \begin_layout Standard
10119 by 
10120 \noun on
10121 Allan Rae
10122 \end_layout
10123
10124 \begin_layout Subsection
10125 Introduction
10126 \end_layout
10127
10128 \begin_layout Standard
10129 This section describes how to use LyX to make slides for overhead projectors.
10130  There are two document classes that can do this: the default slides class
10131  and the 
10132 \family sans
10133 FoilTeX
10134 \family default
10135  slides class.
10136  This section documents the latter.
10137 \end_layout
10138
10139 \begin_layout Standard
10140 I'm going to say this again, nice and clear, so that there's no misunderstanding
10141 :
10142 \end_layout
10143
10144 \begin_layout Standard
10145 \begin_inset VSpace bigskip
10146 \end_inset
10147
10148
10149 \end_layout
10150
10151 \begin_layout Standard
10152 \align center
10153
10154 \size large
10155 This section documents the class 
10156 \begin_inset Quotes eld
10157 \end_inset
10158
10159
10160 \family sans
10161 slides (FoilTeX)
10162 \family default
10163
10164 \begin_inset Quotes erd
10165 \end_inset
10166
10167  
10168 \emph on
10169 only.
10170 \end_layout
10171
10172 \begin_layout Standard
10173 \begin_inset VSpace bigskip
10174 \end_inset
10175
10176
10177 \end_layout
10178
10179 \begin_layout Standard
10180 If you're looking for the documentation for 
10181 \begin_inset Quotes eld
10182 \end_inset
10183
10184
10185 \family sans
10186 slides (default)
10187 \family default
10188
10189 \begin_inset Quotes erd
10190 \end_inset
10191
10192 , check out section
10193 \begin_inset space ~
10194 \end_inset
10195
10196
10197 \begin_inset CommandInset ref
10198 LatexCommand ref
10199 reference "sec:slitex"
10200
10201 \end_inset
10202
10203 .
10204  If your machine doesn't have the 
10205 \family sans
10206 foils
10207 \family default
10208  class [
10209 \begin_inset Quotes eld
10210 \end_inset
10211
10212
10213 \family sans
10214 slides (FoilTeX)
10215 \family default
10216
10217 \begin_inset Quotes erd
10218 \end_inset
10219
10220 ] installed, you'll probably have to use the default 
10221 \family sans
10222 slides
10223 \family default
10224  class, which isn't quite as good as 
10225 \family sans
10226 foils.
10227 \end_layout
10228
10229 \begin_layout Standard
10230 The 
10231 \family sans
10232 foils
10233 \family default
10234  class is designed for use with version 2.1 of the 
10235 \family sans
10236 foils.cls
10237 \family default
10238  LaTeX class file which is now an integral part of LaTeX2e.
10239 \end_layout
10240
10241 \begin_layout Subsection
10242 Getting Started
10243 \end_layout
10244
10245 \begin_layout Standard
10246 Obviously, to use this document class, you need to select 
10247 \begin_inset Quotes eld
10248 \end_inset
10249
10250
10251 \family sans
10252 slides (FoilTeX)
10253 \family default
10254
10255 \begin_inset Quotes erd
10256 \end_inset
10257
10258  from the 
10259 \family sans
10260 Class
10261 \family default
10262  entry in the 
10263 \family sans
10264 Document
10265 \begin_inset space ~
10266 \end_inset
10267
10268 Layout
10269 \family default
10270  dialog.
10271  There are some settings in the 
10272 \family sans
10273 Document
10274 \begin_inset space ~
10275 \end_inset
10276
10277 Layout
10278 \family default
10279  dialog that you should know about that are specific to this class:
10280 \end_layout
10281
10282 \begin_layout Itemize
10283 Don't change the options 
10284 \family sans
10285 Sides
10286 \family default
10287  and 
10288 \family sans
10289 Columns
10290 \family default
10291  on the 
10292 \family sans
10293 Document
10294 \begin_inset space ~
10295 \end_inset
10296
10297 Layout
10298 \family default
10299  dialog.
10300  They're ignored by the 
10301 \family sans
10302 foils
10303 \family default
10304  class.
10305 \end_layout
10306
10307 \begin_layout Itemize
10308 The default font size is 20
10309 \begin_inset space \thinspace{}
10310 \end_inset
10311
10312 pt with the other options being 17
10313 \begin_inset space \thinspace{}
10314 \end_inset
10315
10316 pt, 25
10317 \begin_inset space \thinspace{}
10318 \end_inset
10319
10320 pt and 30
10321 \begin_inset space \thinspace{}
10322 \end_inset
10323
10324 pt.
10325 \end_layout
10326
10327 \begin_layout Itemize
10328 The default font is 
10329 \family sans
10330 sans
10331 \family default
10332  
10333 \family sans
10334 serif
10335 \family default
10336  but all math equations are still typeset in the usual roman font.
10337 \end_layout
10338
10339 \begin_layout Itemize
10340
10341 \family sans
10342 FoilTeX
10343 \family default
10344  supports A4 and Letter paper sizes as well as a special size for working
10345  with 35
10346 \begin_inset space \thinspace{}
10347 \end_inset
10348
10349 mm slides.
10350  It doesn't support A5, B5, legal or executive paper sizes.
10351 \end_layout
10352
10353 \begin_layout Itemize
10354 Don't bother changing the 
10355 \family sans
10356 Float Placement
10357 \family default
10358  settings because they are ignored anyway.
10359  All floats appear where they are defined in the text.
10360 \end_layout
10361
10362 \begin_layout Itemize
10363 The 
10364 \family sans
10365 Pagestyle
10366 \family default
10367  setting behaves a bit differently for this class.
10368  
10369 \family sans
10370 FoilTeX
10371 \family default
10372  provides extensive footer and header capabilities including a user-defined
10373  logo.
10374  See section
10375 \begin_inset space ~
10376 \end_inset
10377
10378
10379 \begin_inset CommandInset ref
10380 LatexCommand ref
10381 reference "sec:foilfoot"
10382
10383 \end_inset
10384
10385  for more details.
10386  The title page is treated differently to all other pages in the document
10387  and is 
10388 \emph on
10389 always
10390 \emph default
10391  unnumbered and 
10392 \emph on
10393 always
10394 \emph default
10395  has the logo centered at the bottom of the page (if one is defined).
10396  The possible page style choices and what they do are as follows:
10397 \end_layout
10398
10399 \begin_deeper
10400 \begin_layout Labeling
10401 \labelwidthstring MMMMMMM
10402
10403 \family sans
10404 \series bold
10405 empty
10406 \family default
10407 \series default
10408  The final output contains no page numbers, or other headers or footers
10409  (except footnotes of course).
10410  
10411 \end_layout
10412
10413 \begin_layout Labeling
10414 \labelwidthstring MMMMMMM
10415
10416 \family sans
10417 \series bold
10418 plain
10419 \family default
10420 \series default
10421  The final output contains page numbers centered at the bottom of the page.
10422  No other headings or footers (other than footnotes).
10423 \end_layout
10424
10425 \begin_layout Labeling
10426 \labelwidthstring MMMMMMM
10427
10428 \series bold
10429 foilheadings
10430 \series default
10431  Page numbers in lower right corner.
10432  Additional headers and footers are also shown.
10433  This is also the default.
10434 \end_layout
10435
10436 \begin_layout Labeling
10437 \labelwidthstring MMMMMMM
10438
10439 \series bold
10440 fancy
10441 \series default
10442  Gives you access to the 
10443 \family sans
10444 fancyheadings
10445 \family default
10446  package although its use with 
10447 \family sans
10448 FoilTeX
10449 \family default
10450  is discouraged by the writer of the 
10451 \family sans
10452 FoilTeX
10453 \family default
10454  package because of some potential page layout clashes.
10455 \end_layout
10456
10457 \end_deeper
10458 \begin_layout Subsubsection
10459 Extra Options
10460 \end_layout
10461
10462 \begin_layout Standard
10463 The following options may be used in the extra class options in the 
10464 \family sans
10465 Document\SpecialChar \menuseparator
10466 Settings
10467 \family default
10468  dialog.
10469 \end_layout
10470
10471 \begin_layout Labeling
10472 \labelwidthstring MMMMMMx
10473
10474 \series bold
10475 35mmSlide
10476 \series default
10477  This sets up the page layout for 7.33
10478 \begin_inset space \thinspace{}
10479 \end_inset
10480
10481 in by 11
10482 \begin_inset space \thinspace{}
10483 \end_inset
10484
10485 in paper, which is about the same aspect ratio as a 35
10486 \begin_inset space \thinspace{}
10487 \end_inset
10488
10489 mm slide, making it a bit easier to work with this medium.
10490 \end_layout
10491
10492 \begin_layout Labeling
10493 \labelwidthstring MMMMMMx
10494
10495 \series bold
10496 headrule
10497 \series default
10498  Places a rule across the page below the header on every page except the
10499  title page.
10500 \end_layout
10501
10502 \begin_layout Labeling
10503 \labelwidthstring MMMMMMx
10504
10505 \series bold
10506 footrule
10507 \series default
10508  Places a rule across the page above the footer on every page except the
10509  title page.
10510 \end_layout
10511
10512 \begin_layout Labeling
10513 \labelwidthstring MMMMMMx
10514
10515 \series bold
10516 dvips
10517 \series default
10518  This is automatically set each time you create a new 
10519 \family sans
10520 foils
10521 \family default
10522  document.
10523  This option tells 
10524 \family sans
10525 FoilTeX
10526 \family default
10527  to use the dvips driver to rotate those pages that are set as landscape
10528  foils.
10529 \end_layout
10530
10531 \begin_layout Labeling
10532 \labelwidthstring MMMMMMx
10533
10534 \series bold
10535 landscape
10536 \series default
10537  Simply changes the page dimensions to those of a landscape page but doesn't
10538  do any rotation.
10539  Thus if you use this option you need to use an external program to rotate
10540  each page or feed your paper through your printer as landscape.
10541  Note that this option effectively reverses the roles of the 
10542 \family sans
10543 Foilhead
10544 \family default
10545  and 
10546 \family sans
10547 Rotatefoilhead
10548 \family default
10549  environments (don't worry these are described in the next section).
10550 \end_layout
10551
10552 \begin_layout Labeling
10553 \labelwidthstring MMMMMMx
10554
10555 \series bold
10556 leqno
10557 \series default
10558  Equation numbers on the left.
10559 \end_layout
10560
10561 \begin_layout Labeling
10562 \labelwidthstring MMMMMMx
10563
10564 \series bold
10565 fleqn
10566 \series default
10567  Flush-left equations.
10568 \end_layout
10569
10570 \begin_layout Subsection
10571 Supported Environments
10572 \end_layout
10573
10574 \begin_layout Standard
10575 Most of the environments commonly supported in other classes are also supported
10576  by the 
10577 \family sans
10578 foils
10579 \family default
10580  class.
10581  There are several additional environments provided by 
10582 \family sans
10583 FoilTeX
10584 \family default
10585  as well as a couple added by LyX.
10586  The following environments are shared with other classes:
10587 \end_layout
10588
10589 \begin_layout Standard
10590 \begin_inset Flex Multiple Columns
10591 status open
10592
10593 \begin_layout Itemize
10594
10595 \family sans
10596 Standard
10597 \end_layout
10598
10599 \begin_layout Itemize
10600
10601 \family sans
10602 Itemize
10603 \end_layout
10604
10605 \begin_layout Itemize
10606
10607 \family sans
10608 Enumerate
10609 \end_layout
10610
10611 \begin_layout Itemize
10612
10613 \family sans
10614 Description
10615 \end_layout
10616
10617 \begin_layout Itemize
10618
10619 \family sans
10620 List
10621 \end_layout
10622
10623 \begin_layout Itemize
10624
10625 \family sans
10626 LyX-Code
10627 \end_layout
10628
10629 \begin_layout Itemize
10630
10631 \family sans
10632 Verse
10633 \end_layout
10634
10635 \begin_layout Itemize
10636
10637 \family sans
10638 Quote
10639 \end_layout
10640
10641 \begin_layout Itemize
10642
10643 \family sans
10644 Quotation
10645 \end_layout
10646
10647 \begin_layout Itemize
10648
10649 \family sans
10650 Title
10651 \end_layout
10652
10653 \begin_layout Itemize
10654
10655 \family sans
10656 Author
10657 \end_layout
10658
10659 \begin_layout Itemize
10660
10661 \family sans
10662 Date
10663 \end_layout
10664
10665 \begin_layout Itemize
10666
10667 \family sans
10668 Abstract
10669 \end_layout
10670
10671 \begin_layout Itemize
10672
10673 \family sans
10674 Bibliography
10675 \end_layout
10676
10677 \begin_layout Itemize
10678
10679 \family sans
10680 Address
10681 \end_layout
10682
10683 \begin_layout Itemize
10684
10685 \family sans
10686 RightAddress
10687 \end_layout
10688
10689 \begin_layout Itemize
10690
10691 \family sans
10692 Caption
10693 \end_layout
10694
10695 \begin_layout Itemize
10696
10697 \family sans
10698 Comment
10699 \end_layout
10700
10701 \end_inset
10702
10703
10704 \end_layout
10705
10706 \begin_layout Standard
10707 That is, all the major environments apart from the sectioning environments.
10708  Since foils are essentially self-contained sections, with a title and body,
10709  
10710 \family sans
10711 FoilTeX
10712 \family default
10713  provides specific commands for starting new foils and these are:
10714 \end_layout
10715
10716 \begin_layout Itemize
10717
10718 \family sans
10719 Foilhead
10720 \end_layout
10721
10722 \begin_layout Itemize
10723
10724 \family sans
10725 Rotatefoilhead
10726 \end_layout
10727
10728 \begin_layout Standard
10729 LyX also provides slightly modified versions of these two environments called:
10730 \end_layout
10731
10732 \begin_layout Itemize
10733
10734 \family sans
10735 ShortFoilhead
10736 \end_layout
10737
10738 \begin_layout Itemize
10739
10740 \family sans
10741 ShortRotatefoilhead
10742 \end_layout
10743
10744 \begin_layout Standard
10745 and the differences will be explained in the next section.
10746 \end_layout
10747
10748 \begin_layout Standard
10749 Since foils are often used in presenting ideas or new theorems and such
10750  
10751 \family sans
10752 FoilTeX
10753 \family default
10754  also provides a comprehensive box of goodies for presenting them:
10755 \end_layout
10756
10757 \begin_layout Standard
10758 \begin_inset Flex Multiple Columns
10759 status open
10760
10761 \begin_layout Itemize
10762
10763 \family sans
10764 Theorem
10765 \end_layout
10766
10767 \begin_layout Itemize
10768
10769 \family sans
10770 Lemma
10771 \end_layout
10772
10773 \begin_layout Itemize
10774
10775 \family sans
10776 Corollary
10777 \end_layout
10778
10779 \begin_layout Itemize
10780
10781 \family sans
10782 Proposition
10783 \end_layout
10784
10785 \begin_layout Itemize
10786
10787 \family sans
10788 Definition
10789 \end_layout
10790
10791 \begin_layout Itemize
10792
10793 \family sans
10794 Proof
10795 \end_layout
10796
10797 \begin_layout Itemize
10798
10799 \family sans
10800 Theorem*
10801 \end_layout
10802
10803 \begin_layout Itemize
10804
10805 \family sans
10806 Lemma*
10807 \end_layout
10808
10809 \begin_layout Itemize
10810
10811 \family sans
10812 Corollary*
10813 \end_layout
10814
10815 \begin_layout Itemize
10816
10817 \family sans
10818 Proposition*
10819 \end_layout
10820
10821 \begin_layout Itemize
10822
10823 \family sans
10824 Definition*
10825 \end_layout
10826
10827 \end_inset
10828
10829
10830 \end_layout
10831
10832 \begin_layout Standard
10833 The starred versions are unnumbered while the unstarred versions are numbered.
10834  There are also two list environments added by LyX and these are:
10835 \end_layout
10836
10837 \begin_layout Itemize
10838
10839 \family sans
10840 TickList
10841 \end_layout
10842
10843 \begin_layout Itemize
10844
10845 \family sans
10846 CrossList
10847 \end_layout
10848
10849 \begin_layout Standard
10850
10851 \family sans
10852 FoilTeX
10853 \family default
10854  provides some powerful header and footer capabilities that are best set
10855  in the preamble although they may be set at any point in a document.
10856  If you want to change these settings in your document the best place to
10857  do so is at the very top of a foil, i.
10858 \begin_inset space \thinspace{}
10859 \end_inset
10860
10861 e.
10862 \emph on
10863
10864 \begin_inset space \space{}
10865 \end_inset
10866
10867
10868 \emph default
10869 straight after the foilhead.
10870 \end_layout
10871
10872 \begin_layout Standard
10873 For this purpose, the following command styles are provided [
10874 \shape smallcaps
10875 Martin Vermeer
10876 \shape default
10877 ]:
10878 \end_layout
10879
10880 \begin_layout Standard
10881 \begin_inset Flex Multiple Columns
10882 status open
10883
10884 \begin_layout Itemize
10885
10886 \family sans
10887 My
10888 \begin_inset space ~
10889 \end_inset
10890
10891 Logo
10892 \end_layout
10893
10894 \begin_layout Itemize
10895
10896 \family sans
10897 Restriction
10898 \end_layout
10899
10900 \begin_layout Itemize
10901
10902 \family sans
10903 Right
10904 \begin_inset space ~
10905 \end_inset
10906
10907 Footer
10908 \end_layout
10909
10910 \begin_layout Itemize
10911
10912 \family sans
10913 Right
10914 \begin_inset space ~
10915 \end_inset
10916
10917 Header
10918 \end_layout
10919
10920 \begin_layout Itemize
10921
10922 \family sans
10923 Left
10924 \begin_inset space ~
10925 \end_inset
10926
10927 Header
10928 \end_layout
10929
10930 \begin_deeper
10931 \begin_layout Plain Layout
10932 \begin_inset space ~
10933 \end_inset
10934
10935
10936 \end_layout
10937
10938 \end_deeper
10939 \end_inset
10940
10941
10942 \end_layout
10943
10944 \begin_layout Standard
10945 There are also a few commands provided by 
10946 \family sans
10947 FoilTeX
10948 \family default
10949  that aren't directly supported by LyX but I'll tell you what they do and
10950  how to use them in section
10951 \begin_inset space ~
10952 \end_inset
10953
10954
10955 \begin_inset CommandInset ref
10956 LatexCommand ref
10957 reference "sec:unsuppfoils"
10958
10959 \end_inset
10960
10961 .
10962 \end_layout
10963
10964 \begin_layout Subsection
10965 Building a Set of Foils
10966 \end_layout
10967
10968 \begin_layout Standard
10969 This section will give a simple introduction to using the different environments
10970  to build a set of foils.
10971  If you want to see an example set of foils, take a look at the 
10972 \family typewriter
10973 Foils.lyx
10974 \family default
10975  file you find in LyX's 
10976 \family typewriter
10977 examples
10978 \family default
10979  folder.
10980 \end_layout
10981
10982 \begin_layout Subsubsection
10983 Give It a Title Page
10984 \end_layout
10985
10986 \begin_layout Standard
10987 Unlike other classes that provide 
10988 \family sans
10989 Title
10990 \family default
10991
10992 \family sans
10993 Author
10994 \family default
10995
10996 \family sans
10997 Date
10998 \family default
10999  and 
11000 \family sans
11001 Abstract
11002 \family default
11003  environments, 
11004 \family sans
11005 foils
11006 \family default
11007  creates the title on a page of its own.
11008  If you leave out the 
11009 \family sans
11010 Date
11011 \family default
11012  environment LaTeX will substitute the current date (every time you regenerate
11013  the output).
11014 \end_layout
11015
11016 \begin_layout Subsubsection
11017 Start a New Foil
11018 \end_layout
11019
11020 \begin_layout Standard
11021 As I mentioned earlier, there are four ways of starting a new foil.
11022  For portrait foils you should use 
11023 \family sans
11024 Foilhead
11025 \family default
11026  or 
11027 \family sans
11028 ShortFoilhead.
11029
11030 \family default
11031  The difference between these two environments is the amount of space between
11032  the title of the foil (the foilhead) and the body of the foil.
11033 \end_layout
11034
11035 \begin_layout Standard
11036 Landscape foils are generated using the 
11037 \family sans
11038 Rotatefoilhead
11039 \family default
11040  and 
11041 \family sans
11042 ShortRotatefoilhead
11043 \family default
11044  environments.
11045  Again the only difference is the spacing between foilhead and body.
11046  Both of the short versions have 0.5
11047 \begin_inset space ~
11048 \end_inset
11049
11050 inches less separation between the foilhead and the body.
11051  
11052 \end_layout
11053
11054 \begin_layout Standard
11055 One problem with the support for landscape foils is the requirement that
11056  you have to use the 
11057 \family typewriter
11058 dvips
11059 \family default
11060  driver to generate the PostScript output otherwise the foils won't be rotated.
11061  It is possible to get landscape foils even if you haven't got the 
11062 \family typewriter
11063 dvips
11064 \family default
11065  driver provided you can feed your foils sideways through your printer ;-)
11066 \end_layout
11067
11068 \begin_layout Subsubsection
11069 Theorems, Lemmas, Proofs and more
11070 \end_layout
11071
11072 \begin_layout Standard
11073 Due to a small bug in LyX you can't have two of the same type of these environme
11074 nts directly following each other.
11075  They must be separated by something.
11076  If you try, you will just be extending the previous environment as if you
11077  had merged the two environments together.
11078  So, how do you get around this problem? The simplest option is to insert
11079  some text between the two environments or add a 
11080 \family sans
11081 LaTeX
11082 \family default
11083  environment between the two with just a 
11084 \begin_inset Quotes eld
11085 \end_inset
11086
11087
11088 \family typewriter
11089 %
11090 \family default
11091
11092 \begin_inset Quotes erd
11093 \end_inset
11094
11095  in it.
11096  This will force LyX to produce two separate environments and hence the
11097  correct LaTeX output.
11098  An example is provided in the example file included with the LyX distribution.
11099  Remember, this problem only occurs if you are trying to place two of the
11100  same type of theorem-like environments one directly after the other.
11101 \end_layout
11102
11103 \begin_layout Subsubsection
11104 Lists
11105 \end_layout
11106
11107 \begin_layout Standard
11108 You get all the commonly supported list styles found in other classes as
11109  well as two new ones.
11110  I'll only describe the new ones here.
11111  If you want to find out more about the other list environments check out
11112  the 
11113 \emph on
11114 User's Guide.
11115
11116 \emph default
11117  If you intend to use itemized lists you might also want to read about the
11118  
11119 \family sans
11120 Itemize
11121 \begin_inset space ~
11122 \end_inset
11123
11124 Bullet
11125 \begin_inset space ~
11126 \end_inset
11127
11128 Selection
11129 \family default
11130  dialog described above in section
11131 \begin_inset space ~
11132 \end_inset
11133
11134
11135 \begin_inset CommandInset ref
11136 LatexCommand ref
11137 reference "sec:bullet"
11138
11139 \end_inset
11140
11141 .
11142 \end_layout
11143
11144 \begin_layout Standard
11145 The two new list styles, 
11146 \family sans
11147 TickList
11148 \family default
11149  and 
11150 \family sans
11151 CrossList
11152 \family default
11153 , are designed to make it easier for you to create lists of do's and don'ts
11154  or right and wrong by providing dedicated environments that use a tick
11155  or a cross as the label of the list.
11156  These lists are in fact dedicated variants of the 
11157 \family sans
11158 Itemize
11159 \family default
11160  environment.
11161  They do however require that you have the 
11162 \family typewriter
11163 psnfss
11164 \family default
11165  packages installed.
11166 \end_layout
11167
11168 \begin_layout Subsubsection
11169 Figures and Tables
11170 \end_layout
11171
11172 \begin_layout Standard
11173
11174 \family sans
11175 FoilTeX
11176 \family default
11177  redefines the floating tables and figures so that they appear exactly where
11178  they are in the text rather than pushing them to the top of the page or
11179  to some user specified location.
11180  In fact if you change the float placement settings they are simply ignored.
11181 \end_layout
11182
11183 \begin_layout Subsubsection
11184 Page Headers and Footers
11185 \begin_inset CommandInset label
11186 LatexCommand label
11187 name "sec:foilfoot"
11188
11189 \end_inset
11190
11191
11192 \end_layout
11193
11194 \begin_layout Standard
11195
11196 \family sans
11197 My
11198 \begin_inset space ~
11199 \end_inset
11200
11201 Logo
11202 \family default
11203  and 
11204 \family sans
11205 Restriction
11206 \family default
11207  are two commands used to control the left-footer text string.
11208  The first is meant to allow you to include a graphic logo on your foils
11209  and defaults to 
11210 \begin_inset Quotes eld
11211 \end_inset
11212
11213 -Typeset by 
11214 \family sans
11215 FoilTeX
11216 \family default
11217 -
11218 \begin_inset Quotes erd
11219 \end_inset
11220
11221 .
11222  While the second is meant to provide a classification for the audience,
11223  
11224 \emph on
11225 e.
11226 \begin_inset space \thinspace{}
11227 \end_inset
11228
11229 g.
11230 \emph default
11231
11232 \begin_inset space \space{}
11233 \end_inset
11234
11235 Confidential.
11236  It is empty by default.
11237 \end_layout
11238
11239 \begin_layout Standard
11240 The remaining page corners can be filled by 
11241 \family sans
11242 Right
11243 \begin_inset space ~
11244 \end_inset
11245
11246 Footer
11247 \family default
11248  (which defaults to page numbers), 
11249 \family sans
11250 Right
11251 \begin_inset space ~
11252 \end_inset
11253
11254 Header
11255 \family default
11256  (top right) and 
11257 \family sans
11258 Left
11259 \begin_inset space ~
11260 \end_inset
11261
11262 Header
11263 \family default
11264  (top left).
11265 \end_layout
11266
11267 \begin_layout Subsection
11268 Unsupported 
11269 \family sans
11270 FoilTeX
11271 \family default
11272  Goodies
11273 \begin_inset CommandInset label
11274 LatexCommand label
11275 name "sec:unsuppfoils"
11276
11277 \end_inset
11278
11279
11280 \end_layout
11281
11282 \begin_layout Standard
11283 All the commands mentioned below need to be set in a 
11284 \family sans
11285 LaTeX
11286 \family default
11287  environment or as 
11288 \family sans
11289 TeX
11290 \family default
11291  within another environment.
11292 \end_layout
11293
11294 \begin_layout Subsubsection
11295 Lengths
11296 \end_layout
11297
11298 \begin_layout Standard
11299 All lengths are adjusted using the 
11300 \family typewriter
11301
11302 \backslash
11303 setlength{
11304 \family default
11305 \emph on
11306 lengthname
11307 \family typewriter
11308 \emph default
11309 }{
11310 \family default
11311 \emph on
11312 newlength
11313 \family typewriter
11314 \emph default
11315 }
11316 \family default
11317  command.
11318  Where 
11319 \emph on
11320 lengthname
11321 \emph default
11322  should be replaced by the name given to the length you want to change and
11323  
11324 \emph on
11325 newlength
11326 \emph default
11327  is the length value.
11328  All lengths should be specified in units of length such as inches (
11329 \family typewriter
11330 in
11331 \family default
11332 ), millimeters (
11333 \family typewriter
11334 mm
11335 \family default
11336 ) or points (
11337 \family typewriter
11338 pt
11339 \family default
11340 ) or relative to some document or font-based length such as 
11341 \family typewriter
11342
11343 \backslash
11344 textwidth
11345 \family default
11346 .
11347  
11348 \end_layout
11349
11350 \begin_layout Standard
11351 It's possible to change the spacing between a foilhead and the body of the
11352  foil by adjusting the length specified by 
11353 \family typewriter
11354
11355 \backslash
11356 foilheadskip
11357 \family default
11358 .
11359  For example, to make 
11360 \emph on
11361 all
11362 \emph default
11363  foilheads 0.5
11364 \begin_inset space \space{}
11365 \end_inset
11366
11367 in closer to their bodies put the following in the preamble: 
11368 \family typewriter
11369
11370 \backslash
11371 setlength{
11372 \backslash
11373 foilheadskip}{-0.5in}
11374 \end_layout
11375
11376 \begin_layout Standard
11377 The spacings around floats can be adjusted by setting these lengths:
11378 \end_layout
11379
11380 \begin_layout Labeling
11381 \labelwidthstring MMMMMMMMMMM
11382
11383 \family typewriter
11384
11385 \backslash
11386 abovefloatskip
11387 \family default
11388  Separation between the text and the top of the float
11389 \end_layout
11390
11391 \begin_layout Labeling
11392 \labelwidthstring MMMMMMMMMMM
11393
11394 \family typewriter
11395
11396 \backslash
11397 abovecaptionskip
11398 \family default
11399  Separation between the float and the caption
11400 \end_layout
11401
11402 \begin_layout Labeling
11403 \labelwidthstring MMMMMMMMMMM
11404
11405 \family typewriter
11406
11407 \backslash
11408 belowcaptionskip
11409 \family default
11410  Separation between the caption and the following text
11411 \end_layout
11412
11413 \begin_layout Labeling
11414 \labelwidthstring MMMMMMMMMMM
11415
11416 \family typewriter
11417
11418 \backslash
11419 captionwidth
11420 \family default
11421  You can make the captions narrower than the surrounding text by adjusting
11422  this length.
11423  Best done relative to 
11424 \family typewriter
11425
11426 \backslash
11427 textwidth
11428 \family default
11429 .
11430 \end_layout
11431
11432 \begin_layout Standard
11433 There are also several title page related lengths that you may find useful
11434  if you have a long title or several authors:
11435 \end_layout
11436
11437 \begin_layout Labeling
11438 \labelwidthstring MMMMMMMMMMM
11439
11440 \family typewriter
11441
11442 \backslash
11443 abovetitleskip
11444 \family default
11445  Separation from headers to 
11446 \family sans
11447 Title
11448 \end_layout
11449
11450 \begin_layout Labeling
11451 \labelwidthstring MMMMMMMMMMM
11452
11453 \family typewriter
11454
11455 \backslash
11456 titleauthorskip
11457 \family default
11458  between 
11459 \family sans
11460 Title
11461 \family default
11462  and 
11463 \family sans
11464 Author
11465 \family default
11466  environments
11467 \end_layout
11468
11469 \begin_layout Labeling
11470 \labelwidthstring MMMMMMMMMMM
11471
11472 \family typewriter
11473
11474 \backslash
11475 authorauthorskip
11476 \family default
11477  between multiple 
11478 \family sans
11479 Author
11480 \family default
11481  lines
11482 \end_layout
11483
11484 \begin_layout Labeling
11485 \labelwidthstring MMMMMMMMMMM
11486
11487 \family typewriter
11488
11489 \backslash
11490 authordateskip
11491 \family default
11492  between the 
11493 \family sans
11494 Author
11495 \family default
11496  and the 
11497 \family sans
11498 Date
11499 \end_layout
11500
11501 \begin_layout Labeling
11502 \labelwidthstring MMMMMMMMMMM
11503
11504 \family typewriter
11505
11506 \backslash
11507 dateabstractskip
11508 \family default
11509  between the 
11510 \family sans
11511 Date
11512 \family default
11513  and the 
11514 \family sans
11515 Abstract
11516 \end_layout
11517
11518 \begin_layout Standard
11519 The last length related command affects all the list environments.
11520  If you place 
11521 \family typewriter
11522
11523 \backslash
11524 zerolistvertdimens
11525 \family default
11526  
11527 \emph on
11528 inside
11529 \emph default
11530  a list environment then all the vertical spacing between the list items
11531  is removed.
11532  Note that this is a command not a length so it doesn't require 
11533 \family typewriter
11534
11535 \backslash
11536 setlength
11537 \family default
11538  like the stuff mentioned above.
11539 \end_layout
11540
11541 \begin_layout Subsubsection
11542 Headers and Footers
11543 \end_layout
11544
11545 \begin_layout Standard
11546 The 
11547 \family typewriter
11548
11549 \backslash
11550 LogoOn
11551 \family default
11552  and 
11553 \family typewriter
11554
11555 \backslash
11556 LogoOff
11557 \family default
11558  commands control whether the logo in the 
11559 \family sans
11560 MyLogo
11561 \family default
11562  definition appear on a given page.
11563  If you put 
11564 \family typewriter
11565
11566 \backslash
11567 LogoOff
11568 \family default
11569  in the preamble then none of the foils will have the logo on them.
11570  If you don't want the logo on a particular page place the 
11571 \family typewriter
11572
11573 \backslash
11574 LogoOff
11575 \family default
11576  directly after the foilhead of that page and the 
11577 \family typewriter
11578
11579 \backslash
11580 LogoOn
11581 \family default
11582  directly after the next foilhead.
11583 \end_layout
11584
11585 \begin_layout Standard
11586 If you decide to use the 
11587 \family sans
11588 fancy
11589 \family default
11590  page style setting in the 
11591 \family sans
11592 Document
11593 \begin_inset space ~
11594 \end_inset
11595
11596 Layout
11597 \family default
11598  dialog you should probably add 
11599 \family typewriter
11600
11601 \backslash
11602 let
11603 \backslash
11604 headwidth
11605 \backslash
11606 textwidth
11607 \family default
11608  to your preamble so headers and footers on landscape pages are correctly
11609  placed when rotated.
11610  This is due to some clashes between the page layouts provided by the 
11611 \family sans
11612 fancyheadings
11613 \family default
11614  package and the 
11615 \family sans
11616 foils
11617 \family default
11618  class.
11619 \end_layout
11620
11621 \begin_layout Section
11622 Hollywood (Hollywood spec scripts)
11623 \end_layout
11624
11625 \begin_layout Standard
11626 by 
11627 \shape smallcaps
11628 Garst Reese
11629 \end_layout
11630
11631 \begin_layout Subsection
11632 Introduction
11633 \end_layout
11634
11635 \begin_layout Standard
11636 Getting the format of a Hollywood script right is a 
11637 \begin_inset Quotes eld
11638 \end_inset
11639
11640 rite of passage.
11641 \begin_inset Quotes erd
11642 \end_inset
11643
11644  It is designed to make the readers focus on content and to be easy and
11645  familiar for the actors to read.
11646  Each page of a script should be one minute of film.
11647  Nothing goes in a script that you cannot see or hear on screen.
11648  The courier 12 pt font should be used throughout.
11649  No italics.
11650 \end_layout
11651
11652 \begin_layout Subsection
11653 Special problems
11654 \end_layout
11655
11656 \begin_layout Standard
11657 Speakers' lines should NEVER break in mid-sentence.
11658  If a speaker's lines continue over a page break, repeat the 
11659 \family sans
11660 Speaker
11661 \family default
11662  title followed by (Cont'd).
11663 \end_layout
11664
11665 \begin_layout Subsection
11666 Special features
11667 \end_layout
11668
11669 \begin_layout Standard
11670 Insert the 
11671 \family sans
11672 Speaker
11673 \family default
11674  names as labels then cross-reference the label to insert the name.
11675  The cross-reference dialog will show the current cast of characters.
11676  You can use this to insert the speaker name in narratives also.
11677 \end_layout
11678
11679 \begin_layout Subsection
11680 Paper size and Margins
11681 \end_layout
11682
11683 \begin_layout Standard
11684 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11685 \end_layout
11686
11687 \begin_layout Subsection
11688 Environments
11689 \end_layout
11690
11691 \begin_layout Standard
11692 The following environments are available.
11693  You can use hollywood.bind to get the bind keys shown at the right.
11694 \end_layout
11695
11696 \begin_layout Itemize
11697
11698 \family sans
11699 Standard
11700 \begin_inset Newline newline
11701 \end_inset
11702
11703
11704 \family default
11705 Used where nothing else works.
11706  Try to avoid it.
11707 \end_layout
11708
11709 \begin_layout Itemize
11710
11711 \family sans
11712 FADE_IN
11713 \family default
11714 :
11715 \begin_inset space \hfill{}
11716 \end_inset
11717
11718
11719 \family sans
11720 M-z S-I
11721 \family default
11722
11723 \begin_inset Newline newline
11724 \end_inset
11725
11726 Usually followed by something like 
11727 \begin_inset Quotes eld
11728 \end_inset
11729
11730 on Sally waking up.
11731 \begin_inset Quotes erd
11732 \end_inset
11733
11734
11735 \end_layout
11736
11737 \begin_layout Itemize
11738
11739 \family sans
11740 INT:
11741 \begin_inset space \hfill{}
11742 \end_inset
11743
11744 M-z i
11745 \begin_inset Newline newline
11746 \end_inset
11747
11748
11749 \family default
11750 Introduces a new INTERIOR camera set-up.
11751  Always followed by DAY or NIGHT, or something similar to define the lighting
11752  required.
11753  Everthing on this line in CAPS.
11754 \end_layout
11755
11756 \begin_layout Itemize
11757
11758 \family sans
11759 EXT:
11760 \begin_inset space \hfill{}
11761 \end_inset
11762
11763 M-z e
11764 \begin_inset Newline newline
11765 \end_inset
11766
11767
11768 \family default
11769 Introduces a new EXTERIOR camera set-up.
11770  Everthing on this line in CAPS.
11771 \end_layout
11772
11773 \begin_layout Itemize
11774
11775 \family sans
11776 Speaker
11777 \begin_inset space \hfill{}
11778 \end_inset
11779
11780 M-z s
11781 \begin_inset Newline newline
11782 \end_inset
11783
11784
11785 \family default
11786 The character speaking.
11787 \end_layout
11788
11789 \begin_layout Itemize
11790
11791 \family sans
11792 Parenthetical
11793 \begin_inset space \hfill{}
11794 \end_inset
11795
11796 M-z p
11797 \begin_inset Newline newline
11798 \end_inset
11799
11800
11801 \family default
11802 Instructions to the speaker.
11803  The () are automatically inserted, but only the ( will show in LyX.
11804  Both will be printed.
11805 \end_layout
11806
11807 \begin_layout Itemize
11808
11809 \family sans
11810 Dialogue
11811 \begin_inset space \hfill{}
11812 \end_inset
11813
11814 M-z d
11815 \begin_inset Newline newline
11816 \end_inset
11817
11818
11819 \family default
11820 What the 
11821 \family sans
11822 Speaker
11823 \family default
11824  says.
11825 \end_layout
11826
11827 \begin_layout Itemize
11828
11829 \family sans
11830 Transition
11831 \begin_inset space \hfill{}
11832 \end_inset
11833
11834 M-z t
11835 \begin_inset Newline newline
11836 \end_inset
11837
11838
11839 \family default
11840 Camera movement instruction.
11841  e.
11842 \begin_inset space \thinspace{}
11843 \end_inset
11844
11845 g.
11846 \begin_inset space \space{}
11847 \end_inset
11848
11849 CUT TO:
11850 \end_layout
11851
11852 \begin_layout Itemize
11853
11854 \family sans
11855 FADE OUT:
11856 \begin_inset space \hfill{}
11857 \end_inset
11858
11859 M-z S-I
11860 \end_layout
11861
11862 \begin_layout Itemize
11863
11864 \family sans
11865 Author
11866 \begin_inset space \hfill{}
11867 \end_inset
11868
11869 M-z S-A
11870 \end_layout
11871
11872 \begin_layout Itemize
11873
11874 \family sans
11875 Title
11876 \begin_inset space \hfill{}
11877 \end_inset
11878
11879 M-z S-T
11880 \end_layout
11881
11882 \begin_layout Itemize
11883
11884 \family sans
11885 Right_Address
11886 \begin_inset space \hfill{}
11887 \end_inset
11888
11889 M-z r
11890 \end_layout
11891
11892 \begin_layout Subsection
11893 Script jargon
11894 \end_layout
11895
11896 \begin_layout Itemize
11897 (O.S) — off screen
11898 \end_layout
11899
11900 \begin_layout Itemize
11901 (V.0) — voice over
11902 \end_layout
11903
11904 \begin_layout Itemize
11905 b.
11906 \begin_inset space \thinspace{}
11907 \end_inset
11908
11909 g.
11910  — background
11911 \end_layout
11912
11913 \begin_layout Itemize
11914 C.U.
11915  — close-up
11916 \end_layout
11917
11918 \begin_layout Itemize
11919 PAN — camera movement
11920 \end_layout
11921
11922 \begin_layout Itemize
11923 INSERT — cut to close-up of
11924 \end_layout
11925
11926 \begin_layout Section
11927 ijmpc and ijmpd
11928 \end_layout
11929
11930 \begin_layout Standard
11931 by 
11932 \noun on
11933 Panayotis Papasotiriou
11934 \end_layout
11935
11936 \begin_layout Subsection
11937 Overview
11938 \end_layout
11939
11940 \begin_layout Standard
11941 The ijmpc package is a set of macros that facilitates electronic manuscript
11942  submission to the 
11943 \emph on
11944 International Journal of Modern Physics C
11945 \emph default
11946 .
11947  Similarly, the ijmpd package is for creating manuscripts to be submitted
11948  to the 
11949 \emph on
11950 International Journal of Modern Physics D
11951 \emph default
11952 .
11953  Both journals are published by World Scientific.
11954  The corresponding document classes are named 
11955 \family typewriter
11956 ws-ijmpc.cls
11957 \family default
11958  and 
11959 \family typewriter
11960 ws-ijmpd.cls
11961 \family default
11962 , respectively.
11963  These files, together with instructions for the authors, can be downloaded
11964  from the sites 
11965 \begin_inset Flex URL
11966 status collapsed
11967
11968 \begin_layout Plain Layout
11969
11970 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11971 \end_layout
11972
11973 \end_inset
11974
11975  and 
11976 \begin_inset Flex URL
11977 status collapsed
11978
11979 \begin_layout Plain Layout
11980
11981 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11982 \end_layout
11983
11984 \end_inset
11985
11986 .
11987  Both packages are modified versions of the standard 
11988 \begin_inset Quotes eld
11989 \end_inset
11990
11991 article
11992 \begin_inset Quotes erd
11993 \end_inset
11994
11995  package, and they are almost (but not exactly) identical.
11996  Most of their features are supported by LyX.
11997  I have used LyX successfully to write articles submitted to both journals
11998  without any problem.
11999 \end_layout
12000
12001 \begin_layout Subsection
12002 Writing a paper
12003 \end_layout
12004
12005 \begin_layout Standard
12006 As usual, the easiest way to write a paper is to start with a template.
12007  Click on 
12008 \family sans
12009 File\SpecialChar \menuseparator
12010 New from
12011 \family default
12012  
12013 \family sans
12014 \bar under
12015 T
12016 \bar default
12017 emplate
12018 \family default
12019 , then choose the 
12020 \family typewriter
12021 ijmpc.lyx
12022 \family default
12023  or 
12024 \family typewriter
12025 ijmpd.lyx
12026 \family default
12027  template.
12028  This will give an (almost) empty document that includes the most common
12029  fields found in a manuscript.
12030  Simply overwrite the existing text (including the brackets, 
12031 \family typewriter
12032 <>
12033 \family default
12034 ) with your text.
12035  You should keep in mind the following remarks.
12036 \end_layout
12037
12038 \begin_layout Enumerate
12039 LyX won't let you change the font size and the page style of the document,
12040  because such modifications are not allowed by both packages.
12041 \end_layout
12042
12043 \begin_layout Enumerate
12044 The language of the document should not be changed.
12045  Before previewing your paper, be sure that the babel package is not used.
12046  To do this, click on 
12047 \family sans
12048 Tools\SpecialChar \menuseparator
12049 Preferences
12050 \family default
12051 , select the 
12052 \family sans
12053 Lang Opts
12054 \family default
12055  tab, deselect the 
12056 \family sans
12057 Use babel
12058 \family default
12059  checkbox in the language settings, and click on 
12060 \family sans
12061 Apply
12062 \family default
12063  (or 
12064 \family sans
12065 Save
12066 \family default
12067 , if you wish to make this change permanent).
12068 \end_layout
12069
12070 \begin_layout Enumerate
12071 The 
12072 \begin_inset Quotes eld
12073 \end_inset
12074
12075 Keywords
12076 \begin_inset Quotes erd
12077 \end_inset
12078
12079  style must be used to define keywords.
12080 \end_layout
12081
12082 \begin_layout Enumerate
12083 The ijmpc package provides a style named 
12084 \begin_inset Quotes eld
12085 \end_inset
12086
12087 Classification Codes
12088 \begin_inset Quotes erd
12089 \end_inset
12090
12091 , which can be used to define classification codes, such as PACS numbers.
12092  Note that this facility is not supported by the ijmpd package.
12093 \end_layout
12094
12095 \begin_layout Enumerate
12096 Several new environments are available: 
12097 \begin_inset Quotes eld
12098 \end_inset
12099
12100 Definition
12101 \begin_inset Quotes erd
12102 \end_inset
12103
12104
12105 \begin_inset Quotes eld
12106 \end_inset
12107
12108 Step
12109 \begin_inset Quotes erd
12110 \end_inset
12111
12112
12113 \begin_inset Quotes eld
12114 \end_inset
12115
12116 Example
12117 \begin_inset Quotes erd
12118 \end_inset
12119
12120
12121 \begin_inset Quotes eld
12122 \end_inset
12123
12124 Remark
12125 \begin_inset Quotes erd
12126 \end_inset
12127
12128
12129 \begin_inset Quotes eld
12130 \end_inset
12131
12132 Notation
12133 \begin_inset Quotes erd
12134 \end_inset
12135
12136
12137 \begin_inset Quotes eld
12138 \end_inset
12139
12140 Theorem
12141 \begin_inset Quotes erd
12142 \end_inset
12143
12144
12145 \begin_inset Quotes eld
12146 \end_inset
12147
12148 Proof
12149 \begin_inset Quotes erd
12150 \end_inset
12151
12152
12153 \begin_inset Quotes eld
12154 \end_inset
12155
12156 Corollary
12157 \begin_inset Quotes erd
12158 \end_inset
12159
12160
12161 \begin_inset Quotes eld
12162 \end_inset
12163
12164 Lemma
12165 \begin_inset Quotes erd
12166 \end_inset
12167
12168
12169 \begin_inset Quotes eld
12170 \end_inset
12171
12172 Proposition
12173 \begin_inset Quotes erd
12174 \end_inset
12175
12176
12177 \begin_inset Quotes eld
12178 \end_inset
12179
12180 Prop
12181 \begin_inset Quotes erd
12182 \end_inset
12183
12184
12185 \begin_inset Quotes eld
12186 \end_inset
12187
12188 Question
12189 \begin_inset Quotes erd
12190 \end_inset
12191
12192
12193 \begin_inset Quotes eld
12194 \end_inset
12195
12196 Claim
12197 \begin_inset Quotes erd
12198 \end_inset
12199
12200 , and 
12201 \begin_inset Quotes eld
12202 \end_inset
12203
12204 Conjecture
12205 \begin_inset Quotes erd
12206 \end_inset
12207
12208 .
12209  Their use is more or less obvious.
12210  LyX supports all these environments; it will use the proper label, text
12211  style, and numbering scheme for each of them.
12212 \end_layout
12213
12214 \begin_layout Enumerate
12215 Both packages use basic citations; the natbib package should not be used.
12216  In LyX, citation references are shown as usual; in the output, citations
12217  are shown as superscripts.
12218  If you want to use a citation as normal text, you should use the 
12219 \family typewriter
12220 refcite
12221 \family default
12222  command, e.
12223 \begin_inset space \thinspace{}
12224 \end_inset
12225
12226 g.
12227 \begin_inset space \space{}
12228 \end_inset
12229
12230
12231 \begin_inset Quotes eld
12232 \end_inset
12233
12234 See Ref.
12235 \begin_inset space \space{}
12236 \end_inset
12237
12238
12239 \family typewriter
12240
12241 \backslash
12242 refcite{key}
12243 \family default
12244
12245 \begin_inset Quotes erd
12246 \end_inset
12247
12248 .
12249 \end_layout
12250
12251 \begin_layout Enumerate
12252 There is no 
12253 \begin_inset Quotes eld
12254 \end_inset
12255
12256 Acknowledgments
12257 \begin_inset Quotes erd
12258 \end_inset
12259
12260  section in both packages.
12261  To put acknowledgments, just use the 
12262 \begin_inset Quotes eld
12263 \end_inset
12264
12265 Section*
12266 \begin_inset Quotes erd
12267 \end_inset
12268
12269  environment.
12270 \end_layout
12271
12272 \begin_layout Enumerate
12273 Appendices may be added to the paper, 
12274 \emph on
12275 after
12276 \emph default
12277  the Acknowledgments and 
12278 \shape italic
12279 before
12280 \shape default
12281  the References.
12282  LyX provides a special environment, called 
12283 \begin_inset Quotes eld
12284 \end_inset
12285
12286 Appendices Section
12287 \begin_inset Quotes erd
12288 \end_inset
12289
12290  which marks the beginning of the appendices.
12291  This environment should be left blank; it just sends a LaTeX command, but
12292  nothing is really printed.
12293  In LyX, the word 
12294 \begin_inset Quotes eld
12295 \end_inset
12296
12297 Appendix
12298 \begin_inset Quotes erd
12299 \end_inset
12300
12301  is printed with blue letters, as a signal that all sections after that
12302  point are appendices.
12303  To write an appendix, use the 
12304 \begin_inset Quotes eld
12305 \end_inset
12306
12307 Appendix
12308 \begin_inset Quotes erd
12309 \end_inset
12310
12311  environment.
12312  LyX will number each appendix with capital letters, as required by both
12313  journals.
12314  Note that 
12315 \begin_inset Quotes eld
12316 \end_inset
12317
12318 Appendices Section
12319 \begin_inset Quotes erd
12320 \end_inset
12321
12322  
12323 \emph on
12324 must
12325 \emph default
12326  be present before the first appendix; if not, all appendices will be numbered
12327  as normal sections in the output.
12328 \end_layout
12329
12330 \begin_layout Enumerate
12331 The ijmpc and the ijmpd packages use the 
12332 \family typewriter
12333 tbl
12334 \family default
12335  command to implement table captions.
12336  As a result, a table created by LyX is printed correctly, but its caption
12337  is ignored.
12338  However, you can use some TeX code to overcome this problem, so that captions
12339  are printed as expected.
12340  To do so, create a float table as usual, remove the caption, and replace
12341  it with the TeX code 
12342 \family typewriter
12343
12344 \backslash
12345 tbl{
12346 \emph on
12347 your table caption
12348 \emph default
12349 }{
12350 \family default
12351  (sic); you must also the TeX code 
12352 \family typewriter
12353 }
12354 \family default
12355  immediately after the tabular material.
12356  Study the example table included in the template files to see how this
12357  trick is implemented.
12358  Alternatively, If you need table captions, you should implement the whole
12359  table float in a 
12360 \family typewriter
12361 .tex
12362 \family default
12363  file, then include this file to the LyX document (
12364 \family sans
12365 Insert\SpecialChar \menuseparator
12366 File\SpecialChar \menuseparator
12367 Child
12368 \begin_inset space ~
12369 \end_inset
12370
12371 Document
12372 \family default
12373 ).
12374  Details on how to create a table float can be found in the files 
12375 \family typewriter
12376 ws-ijmpc.tex
12377 \family default
12378  and 
12379 \family typewriter
12380 ws-ijmpd.tex
12381 \family default
12382 , included in the corresponding packages.
12383 \end_layout
12384
12385 \begin_layout Subsection
12386 Preparing a paper for submission
12387 \end_layout
12388
12389 \begin_layout Standard
12390 Before you submit your paper you must export the LyX document as a LaTeX
12391  file (
12392 \family sans
12393 File\SpecialChar \menuseparator
12394 Export\SpecialChar \menuseparator
12395 LaTeX
12396 \family default
12397 )
12398 \begin_inset Foot
12399 status open
12400
12401 \begin_layout Plain Layout
12402 Actually you have the choice between LaTeX (plain) and pdflatex.
12403  If you intend to use pdflatex to prepare the paper, you should use the
12404  pdflatex option so that included graphics are converted to PDF format,
12405  ready for use by pdflatex.
12406 \end_layout
12407
12408 \end_inset
12409
12410 , then make the following changes to the resulting 
12411 \family typewriter
12412 .tex
12413 \family default
12414  file.
12415 \end_layout
12416
12417 \begin_layout Enumerate
12418 Remove the comment lines before the 
12419 \family typewriter
12420
12421 \backslash
12422 documentclass
12423 \family default
12424  command.
12425 \end_layout
12426
12427 \begin_layout Enumerate
12428 Remove everything between (and including) the 
12429 \family typewriter
12430
12431 \backslash
12432 makeatletter
12433 \family default
12434  and 
12435 \family typewriter
12436
12437 \backslash
12438 makeatother
12439 \family default
12440  commands, except for any commands you specifically put into the LaTeX preamble.
12441 \end_layout
12442
12443 \begin_layout Standard
12444 The modified 
12445 \family typewriter
12446 .tex
12447 \family default
12448  file should be saved and processed through LaTeX as many times as necessary.
12449  You may also want to check the resulting 
12450 \family typewriter
12451 .dvi
12452 \family default
12453  document.
12454 \end_layout
12455
12456 \begin_layout Subsection
12457 Use of TeX code
12458 \end_layout
12459
12460 \begin_layout Standard
12461 The use of TeX code is reduced to two commands, which must be placed at
12462  the top of the document.
12463  If you started writing your paper by using the 
12464 \family typewriter
12465 ijmpc.lyx
12466 \family default
12467  or the 
12468 \family typewriter
12469 ijmpd.lyx
12470 \family default
12471  template, the TeX code needed is already in its place; you usually don't
12472  need to delete it.
12473  You may only modify the first TeX code to specify the information printed
12474  to the top of odd and even pages (authors' names and short paper's title,
12475  respectively).
12476  This TeX code must have the form 
12477 \family typewriter
12478
12479 \backslash
12480 markboth{Authors' Names}{Short Paper's Title}
12481 \family default
12482 .
12483 \end_layout
12484
12485 \begin_layout Section
12486 iopart
12487 \end_layout
12488
12489 \begin_layout Standard
12490 by 
12491 \noun on
12492 Uwe Stöhr
12493 \end_layout
12494
12495 \begin_layout Subsection
12496 Overview
12497 \end_layout
12498
12499 \begin_layout Standard
12500 The iopart package provides a document class to create electronic manuscript
12501  submission to the journals published by the Institute of Physics.
12502  Instructions for the authors how to create a paper using the iopart class
12503  can be downloaded together with the iopart package from the site 
12504 \begin_inset Flex URL
12505 status collapsed
12506
12507 \begin_layout Plain Layout
12508
12509 ftp://ftp.iop.org/pub/journals/latex2e
12510 \end_layout
12511
12512 \end_inset
12513
12514 .
12515 \end_layout
12516
12517 \begin_layout Subsection
12518 Writing a paper
12519 \end_layout
12520
12521 \begin_layout Standard
12522 The easiest way to write a paper is to start with the file 
12523 \emph on
12524 IOP-article.lyx
12525 \emph default
12526  that is available in LyX's examples files folder.
12527  Open this file, save it under a new name, and start writing.
12528  The example file explains how to use the special text environments.
12529  Here are the most important advices:
12530 \end_layout
12531
12532 \begin_layout Itemize
12533 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12534  two options 
12535 \family sans
12536 Use AMS math package
12537 \family default
12538  in the document settings under 
12539 \family sans
12540 Math Options
12541 \family default
12542  are not used!
12543 \end_layout
12544
12545 \begin_layout Itemize
12546
12547 \size normal
12548 The title environment defines the kind of your paper.
12549  So use one of the following environments for the title:
12550 \end_layout
12551
12552 \begin_deeper
12553 \begin_layout Itemize
12554
12555 \family sans
12556 \size normal
12557 Title
12558 \family default
12559  for a Paper
12560 \end_layout
12561
12562 \begin_layout Itemize
12563
12564 \family sans
12565 \size normal
12566 Review
12567 \family default
12568  for a Review
12569 \end_layout
12570
12571 \begin_layout Itemize
12572
12573 \family sans
12574 \size normal
12575 Topical
12576 \family default
12577  for a Topical review
12578 \end_layout
12579
12580 \begin_layout Itemize
12581
12582 \family sans
12583 \size normal
12584 Comment
12585 \family default
12586  for a Comment
12587 \end_layout
12588
12589 \begin_layout Itemize
12590
12591 \family sans
12592 \size normal
12593 Note
12594 \family default
12595  for a Note
12596 \end_layout
12597
12598 \begin_layout Itemize
12599
12600 \family sans
12601 \size normal
12602 Paper
12603 \family default
12604  for a Paper (same as Title)
12605 \end_layout
12606
12607 \begin_layout Itemize
12608
12609 \family sans
12610 \size normal
12611 Prelim
12612 \family default
12613  for a Preliminary communication
12614 \end_layout
12615
12616 \begin_layout Itemize
12617
12618 \family sans
12619 \size normal
12620 Rapid
12621 \family default
12622  for a Rapid communication
12623 \end_layout
12624
12625 \begin_layout Itemize
12626
12627 \family sans
12628 \size normal
12629 Letter
12630 \family default
12631  for a Letter to the editor
12632 \end_layout
12633
12634 \end_deeper
12635 \begin_layout Itemize
12636
12637 \size normal
12638 All title environments except of 
12639 \family sans
12640 Letter
12641 \family default
12642  can have an optional short title.
12643 \end_layout
12644
12645 \begin_layout Itemize
12646 There is a general title environment 
12647 \family sans
12648 Article
12649 \family default
12650  which is not directly supported by the LyX.
12651  This can be used as TeX code when your document doesn't fit into one of
12652  the other title types.
12653 \end_layout
12654
12655 \begin_layout Standard
12656 For more informations like hints for special table and formula formatting,
12657  look at the IOP author guidelines.
12658 \end_layout
12659
12660 \begin_layout Section
12661 Kluwer
12662 \end_layout
12663
12664 \begin_layout Standard
12665 by 
12666 \noun on
12667 Panayotis Papasotiriou
12668 \end_layout
12669
12670 \begin_layout Subsection
12671 Overview
12672 \end_layout
12673
12674 \begin_layout Standard
12675 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12676  that facilitates electronic manuscript submission to the journals they
12677  publish.
12678  Most known of them (at least in my domain of interest) are 
12679 \emph on
12680 Astrophysics and Space Science
12681 \emph default
12682  and 
12683 \emph on
12684 Solar Physics
12685 \emph default
12686 , but there are many others (see a complete list at 
12687 \begin_inset Flex URL
12688 status open
12689
12690 \begin_layout Plain Layout
12691
12692 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12693 \end_layout
12694
12695 \end_inset
12696
12697 ).
12698  The Kluwer package may be downloaded from the site 
12699 \begin_inset Flex URL
12700 status collapsed
12701
12702 \begin_layout Plain Layout
12703
12704 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12705 \end_layout
12706
12707 \end_inset
12708
12709 .
12710  A complete user guide is contained in that package (but it can also be
12711  downloaded separately).
12712 \end_layout
12713
12714 \begin_layout Standard
12715 LyX supports many features of the package but not everything.
12716  However, the TeX code needed is reduced to some 
12717 \begin_inset Quotes eld
12718 \end_inset
12719
12720 peculiar
12721 \begin_inset Quotes erd
12722 \end_inset
12723
12724  commands of the package (see
12725 \begin_inset space ~
12726 \end_inset
12727
12728
12729 \begin_inset CommandInset ref
12730 LatexCommand ref
12731 reference "subsec:kluwer_peculiarities"
12732
12733 \end_inset
12734
12735 ).
12736  I have recently used LyX to write an article submitted to the 
12737 \emph on
12738 Astrophysics and Space Science
12739 \emph default
12740  without any problem.
12741 \end_layout
12742
12743 \begin_layout Subsection
12744 Writing a paper
12745 \end_layout
12746
12747 \begin_layout Standard
12748 The easiest way to write a paper is to start with the Kluwer template file.
12749  Click on 
12750 \family sans
12751 File\SpecialChar \menuseparator
12752 New from
12753 \family default
12754  
12755 \family sans
12756 Template
12757 \family default
12758 , then choose the 
12759 \family typewriter
12760 kluwer.lyx
12761 \family default
12762  template.
12763  This will give an (almost) empty document that includes the most common
12764  fields found in a manuscript and a short description of their use.
12765  As in most templates, simply overwrite the existing text (including the
12766  brackets, 
12767 \family typewriter
12768 <>
12769 \family default
12770 ) with the correct information.
12771 \end_layout
12772
12773 \begin_layout Subsection
12774 Preparing a paper for submission
12775 \end_layout
12776
12777 \begin_layout Standard
12778 As in the AASTeX package, before you submit your paper to a journal you
12779  must 
12780 \begin_inset Quotes eld
12781 \end_inset
12782
12783 postprocess
12784 \begin_inset Quotes erd
12785 \end_inset
12786
12787  it as follows.
12788 \end_layout
12789
12790 \begin_layout Enumerate
12791 Export your paper as a LaTeX file.
12792  To do this, click on 
12793 \family sans
12794 File\SpecialChar \menuseparator
12795 Export\SpecialChar \menuseparator
12796 LaTeX
12797 \family default
12798 .
12799  
12800 \end_layout
12801
12802 \begin_layout Enumerate
12803 Edit the resulting 
12804 \family typewriter
12805 .tex
12806 \family default
12807  file with a text editor and make the following changes
12808 \end_layout
12809
12810 \begin_deeper
12811 \begin_layout Enumerate
12812 remove the comment lines before the 
12813 \family typewriter
12814
12815 \backslash
12816 documentclass
12817 \family default
12818  command,
12819 \end_layout
12820
12821 \begin_layout Enumerate
12822 remove everything between (and including) the 
12823 \family typewriter
12824
12825 \backslash
12826 makeatletter
12827 \family default
12828  and 
12829 \family typewriter
12830
12831 \backslash
12832 makeatother
12833 \family default
12834  commands, except for any commands you specifically put into the LaTeX preamble.
12835 \end_layout
12836
12837 \begin_layout Standard
12838 Save the resulting 
12839 \family typewriter
12840 .tex
12841 \family default
12842  file.
12843 \end_layout
12844
12845 \end_deeper
12846 \begin_layout Enumerate
12847 Run the 
12848 \family typewriter
12849 .tex
12850 \family default
12851  file through LaTeX as many times as necessary (usually up to three).
12852 \end_layout
12853
12854 \begin_layout Enumerate
12855 View the resulting 
12856 \family typewriter
12857 .dvi
12858 \family default
12859  document using, e.
12860 \begin_inset space \thinspace{}
12861 \end_inset
12862
12863 g.
12864 \begin_inset space \space{}
12865 \end_inset
12866
12867
12868 \family sans
12869 xdvi
12870 \family default
12871 , and check if everything is OK (it should, if you didn't make any mistake).
12872 \end_layout
12873
12874 \begin_layout Subsection
12875 \begin_inset Quotes eld
12876 \end_inset
12877
12878 Peculiarities
12879 \begin_inset Quotes erd
12880 \end_inset
12881
12882  of the Kluwer package
12883 \begin_inset CommandInset label
12884 LatexCommand label
12885 name "subsec:kluwer_peculiarities"
12886
12887 \end_inset
12888
12889
12890 \end_layout
12891
12892 \begin_layout Standard
12893 The Kluwer package has the following 
12894 \begin_inset Quotes eld
12895 \end_inset
12896
12897 peculiarities
12898 \begin_inset Quotes erd
12899 \end_inset
12900
12901 .
12902 \end_layout
12903
12904 \begin_layout Enumerate
12905 It is possible to write multiple articles in the same LaTeX file
12906 \begin_inset Foot
12907 status collapsed
12908
12909 \begin_layout Plain Layout
12910 I can't imagine any good reason to do this.
12911 \end_layout
12912
12913 \end_inset
12914
12915 .
12916  Each article must be included in the environment 
12917 \begin_inset Quotes eld
12918 \end_inset
12919
12920 article
12921 \begin_inset Quotes erd
12922 \end_inset
12923
12924 .
12925  Unfortunately, this environment cannot be omitted, even if you write just
12926  one article.
12927  Therefore, each article starts with the command 
12928 \family typewriter
12929
12930 \backslash
12931 begin{article}
12932 \family default
12933  and, obviously, ends with the command 
12934 \family typewriter
12935
12936 \backslash
12937 end{article}
12938 \family default
12939 .
12940  Although this can be implemented in LyX, I didn't included it, since it
12941  looks ugly and can confuse the novice user.
12942  Therefore, you need to enter them directly and mark them as LaTeX code
12943  (the well-known 
12944 \begin_inset Quotes eld
12945 \end_inset
12946
12947 TeX code
12948 \begin_inset Quotes erd
12949 \end_inset
12950
12951 ).
12952 \end_layout
12953
12954 \begin_layout Enumerate
12955 Information given at the beginning of the article (i.
12956 \begin_inset space \thinspace{}
12957 \end_inset
12958
12959 e.
12960 \begin_inset space \space{}
12961 \end_inset
12962
12963 title, subtitle, author, institution, running title, running author, abstract
12964  and keywords) must be included in an environment called 
12965 \begin_inset Quotes eld
12966 \end_inset
12967
12968 opening
12969 \begin_inset Quotes erd
12970 \end_inset
12971
12972 .
12973  This is not implemented in LyX, so you must enter title, subtitle etc.
12974 \begin_inset space ~
12975 \end_inset
12976
12977 between two TeX code lines (
12978 \family typewriter
12979
12980 \backslash
12981 begin{opening}
12982 \family default
12983  and 
12984 \family typewriter
12985
12986 \backslash
12987 end{opening}
12988 \family default
12989 ).
12990 \end_layout
12991
12992 \begin_layout Enumerate
12993 According to the user manual, the label of each bibliography item must be
12994  written as 
12995 \family typewriter
12996
12997 \backslash
12998 protect
12999 \backslash
13000 citeauthoryear{
13001 \family default
13002 \emph on
13003 author(s)
13004 \family typewriter
13005 \emph default
13006 }{
13007 \family default
13008 \emph on
13009 year
13010 \family typewriter
13011 \emph default
13012 }
13013 \family default
13014 .
13015 \end_layout
13016
13017 \begin_layout Standard
13018 The 
13019 \family typewriter
13020 kluwer.lyx
13021 \family default
13022  template takes care of all these 
13023 \begin_inset Quotes eld
13024 \end_inset
13025
13026 peculiarities
13027 \begin_inset Quotes erd
13028 \end_inset
13029
13030 .
13031  If you start a new paper using this template you don't need to do anything
13032  special.
13033  Just 
13034 \end_layout
13035
13036 \begin_layout Enumerate
13037 don't delete the TeX code included in the template, and
13038 \end_layout
13039
13040 \begin_layout Enumerate
13041 copy the example bibliography item included in the template and modify it
13042  as necessary to enter new bibliography items.
13043 \end_layout
13044
13045 \begin_layout Section
13046 Koma-Script
13047 \end_layout
13048
13049 \begin_layout Standard
13050 by 
13051 \noun on
13052 Bernd Rellermeyer
13053 \end_layout
13054
13055 \begin_layout Subsection
13056 Overview
13057 \end_layout
13058
13059 \begin_layout Standard
13060 The LyX document classes 
13061 \emph on
13062 article (koma-script)
13063 \emph default
13064
13065 \emph on
13066 report (koma-script)
13067 \emph default
13068
13069 \emph on
13070 book
13071 \emph default
13072  
13073 \emph on
13074 (koma-script)
13075 \emph default
13076 , and 
13077 \emph on
13078 letter
13079 \emph default
13080  
13081 \emph on
13082 (koma-script)
13083 \emph default
13084  correspond to the LaTeX document classes 
13085 \family typewriter
13086 scrartcl.cls
13087 \family default
13088
13089 \family typewriter
13090 scrreprt.cls
13091 \family default
13092
13093 \family typewriter
13094 scrbook.cls
13095 \family default
13096 , and 
13097 \family typewriter
13098 scrlettr.cls
13099 \family default
13100 , resp.
13101 \begin_inset space ~
13102 \end_inset
13103
13104 of the Koma-Script family.
13105  They are replacements for the standard document classes 
13106 \family typewriter
13107 article.cls
13108 \family default
13109
13110 \family typewriter
13111 report.cls
13112 \family default
13113
13114 \family typewriter
13115 book.cls
13116 \family default
13117  and 
13118 \family typewriter
13119 letter.cls
13120 \family default
13121 , resp., and fit better to European typography conventions in a number of
13122  points.
13123 \end_layout
13124
13125 \begin_layout Itemize
13126 Standard character size is 11pt in 
13127 \emph on
13128 article (koma-script)
13129 \emph default
13130
13131 \emph on
13132 report (koma-script)
13133 \emph default
13134 , and 
13135 \emph on
13136 book (koma-script)
13137 \emph default
13138 , and 12pt in 
13139 \emph on
13140 letter (koma-script)
13141 \emph default
13142 .
13143 \end_layout
13144
13145 \begin_layout Itemize
13146 Headings, labels of the description environment, and a number of elements
13147  of the 
13148 \emph on
13149 letter (koma-script)
13150 \emph default
13151  document class are set in a bold sans serif font.
13152 \begin_inset Foot
13153 status collapsed
13154
13155 \begin_layout Plain Layout
13156 There is a big difference between the bold sans serif old cm fonts and new
13157  ec fonts, especially in the appearance of headings.
13158  In comparison, the ec bold sans serif fonts look a bit thin.
13159  Here the LaTeX package 
13160 \family typewriter
13161 cmsd.sty by
13162 \family default
13163  
13164 \shape smallcaps
13165 Walter Schmidt
13166 \shape default
13167  helps to produce the 
13168 \begin_inset Quotes eld
13169 \end_inset
13170
13171 usual
13172 \begin_inset Quotes erd
13173 \end_inset
13174
13175  appearance when using the ec fonts.
13176 \end_layout
13177
13178 \end_inset
13179
13180  The numbering of chapter headings is made in the same way as the numbering
13181  of section headings, that is without the extra line 
13182 \begin_inset Quotes eld
13183 \end_inset
13184
13185 Chapter\SpecialChar \ldots{}
13186
13187 \begin_inset Quotes erd
13188 \end_inset
13189
13190 .
13191  In addition, the appearance of the headings can be modified by using a
13192  number of options (in LyX to be entered in the field 
13193 \family sans
13194 Extra
13195 \begin_inset space ~
13196 \end_inset
13197
13198 Options
13199 \family default
13200  of the dialog 
13201 \family sans
13202 Layout\SpecialChar \menuseparator
13203 Document
13204 \family default
13205 ).
13206  
13207 \end_layout
13208
13209 \begin_layout Itemize
13210 The main means in the Koma-Script document classes to design the type area
13211  are the options 
13212 \family sans
13213 BCOR
13214 \family default
13215  and 
13216 \family sans
13217 DIV
13218 \family default
13219  (in LyX to be entered in the extra class options field in the dialog 
13220 \family sans
13221 Document\SpecialChar \menuseparator
13222 Settings
13223 \family default
13224 ).
13225  They make a clearer modification of page margins possible as do the options
13226  of the dialog 
13227 \family sans
13228 Document\SpecialChar \menuseparator
13229 Settings
13230 \family default
13231 .
13232  
13233 \end_layout
13234
13235 \begin_layout Itemize
13236 The LaTeX document classes of the Koma-Script family define a number of
13237  additional commands.
13238  Those part of it which makes sense in LyX is implemented in corresponding
13239  paragraph types.
13240 \end_layout
13241
13242 \begin_layout Standard
13243 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13244  can be found in the Koma-Script documentation 
13245 \emph on
13246 scrguide
13247 \emph default
13248  (German) and 
13249 \emph on
13250 scrguien
13251 \emph default
13252  (English).
13253 \end_layout
13254
13255 \begin_layout Subsection
13256 article (koma-script), report (koma-script), and book (koma-script)
13257 \end_layout
13258
13259 \begin_layout Standard
13260 The document classes 
13261 \emph on
13262 article (koma-script)
13263 \emph default
13264
13265 \emph on
13266 report (koma-script)
13267 \emph default
13268 , and 
13269 \emph on
13270 book
13271 \emph default
13272  
13273 \emph on
13274 (koma-script)
13275 \emph default
13276  are implemented in the layout files 
13277 \family typewriter
13278 scrartcl.layout
13279 \family default
13280
13281 \family typewriter
13282 scrreprt.layout
13283 \family default
13284 , and 
13285 \family typewriter
13286 scrbook.layout
13287 \family default
13288 , resp.
13289  They contain all the paragraph types of the corresponding standard document
13290  classes 
13291 \emph on
13292 article
13293 \emph default
13294
13295 \emph on
13296 report
13297 \emph default
13298 , and 
13299 \emph on
13300 book
13301 \emph default
13302 , resp., partly modified, with the exception of the LyX specific 
13303 \family sans
13304 List
13305 \family default
13306 -type, which is replaced by the new 
13307 \family sans
13308 Labeling
13309 \family default
13310 -type having the same functionality.
13311  Beside the 
13312 \family sans
13313 Labeling
13314 \family default
13315 -Type there is a number of new paragraph types added.
13316  They are 
13317 \emph on
13318 not
13319 \emph default
13320  part of 
13321 \emph on
13322 letter (koma-script)
13323 \emph default
13324 .
13325 \end_layout
13326
13327 \begin_layout Itemize
13328
13329 \family sans
13330 Addpart, Addchap
13331 \family default
13332
13333 \family sans
13334 Addsec
13335 \family default
13336 : are equivalents to 
13337 \family sans
13338 Part*, Chapter*
13339 \family default
13340  and 
13341 \family sans
13342 Section*
13343 \family default
13344 , resp., additionally inserting an entry in the table of contents.
13345  
13346 \family sans
13347 Addpart
13348 \family default
13349  and 
13350 \family sans
13351 Addchap
13352 \family default
13353  are not contained in 
13354 \emph on
13355 article (koma-script)
13356 \emph default
13357 .
13358 \end_layout
13359
13360 \begin_layout Itemize
13361
13362 \family sans
13363 Addchap*
13364 \family default
13365
13366 \family sans
13367 Addsec*
13368 \family default
13369 : behave exactly as 
13370 \family sans
13371 Addchap
13372 \family default
13373  and 
13374 \family sans
13375 Addsec
13376 \family default
13377 , resp., additionally clearing running heads.
13378  
13379 \family sans
13380 Addchap*
13381 \family default
13382  is not contained in 
13383 \emph on
13384 article (koma-script)
13385 \emph default
13386 .
13387 \begin_inset Foot
13388 status collapsed
13389
13390 \begin_layout Plain Layout
13391 There is also an 
13392 \family typewriter
13393
13394 \backslash
13395 addpart*
13396 \family default
13397  command in 
13398 \emph on
13399 book (koma-script)
13400 \emph default
13401  and in 
13402 \emph on
13403 report (koma-script)
13404 \emph default
13405 , but since this is identical to 
13406 \family sans
13407 Part*
13408 \family default
13409 , is has not been implemented in LyX.
13410 \end_layout
13411
13412 \end_inset
13413
13414
13415 \end_layout
13416
13417 \begin_layout Itemize
13418
13419 \family sans
13420 Minisec
13421 \family default
13422 : generates a heading directly above the following paragraph in the standard
13423  character size without affecting the structure of the document.
13424 \end_layout
13425
13426 \begin_layout Itemize
13427
13428 \family sans
13429 Captionabove
13430 \family default
13431  and 
13432 \family sans
13433 Captionbelow
13434 \family default
13435  are special captions which respect the different space settings needed
13436  for captions placed above or below an element (if you follow strict typographic
13437  rules, you might want to place table captions always above the table).
13438  You can also use the class option 
13439 \family typewriter
13440 tablecaptionsabove
13441 \family default
13442 , which will switch 
13443 \family sans
13444 caption
13445 \family default
13446  to 
13447 \family sans
13448 captionabove
13449 \family default
13450  for tables and 
13451 \family sans
13452 captionbelow
13453 \family default
13454  for figures.
13455  You need at least Koma-Script version 2.8q to use this.
13456 \end_layout
13457
13458 \begin_layout Itemize
13459
13460 \family sans
13461 Dictum
13462 \family default
13463 : can be used to set a bonmot, e.
13464 \begin_inset space \thinspace{}
13465 \end_inset
13466
13467 g.
13468 \begin_inset space \space{}
13469 \end_inset
13470
13471 at the beginning of a chapter.
13472  If you use the optional argument (
13473 \family sans
13474 Insert\SpecialChar \menuseparator
13475 Short
13476 \begin_inset space ~
13477 \end_inset
13478
13479 Title
13480 \family default
13481 ), you can insert the dictum's author there.
13482  Dictum and author are separated by a line.
13483  You need at least Koma-Script version 2.8q to use this.
13484  
13485 \family sans
13486 Dictum
13487 \family default
13488  is not contained in 
13489 \emph on
13490 article (koma-script)
13491 \emph default
13492 .
13493 \end_layout
13494
13495 \begin_layout Standard
13496 The following types, together with the standard types 
13497 \family sans
13498 Title
13499 \family default
13500
13501 \family sans
13502 Author
13503 \family default
13504 , and 
13505 \family sans
13506 Date
13507 \family default
13508 , form the title area of the document.
13509  They must be entered ahead of the first 
13510 \begin_inset Quotes eld
13511 \end_inset
13512
13513 ordinary
13514 \begin_inset Quotes erd
13515 \end_inset
13516
13517  paragraph.
13518 \begin_inset Foot
13519 status collapsed
13520
13521 \begin_layout Plain Layout
13522 The corresponding LaTeX commands must appear before the 
13523 \family typewriter
13524
13525 \backslash
13526 maketitle
13527 \family default
13528  command.
13529 \end_layout
13530
13531 \end_inset
13532
13533  When such a type is used more than once, the latter usage overwrites the
13534  former one, that means, for every type only the latest usage is valid.
13535  The order of the different types however has, like 
13536 \family sans
13537 Title
13538 \family default
13539
13540 \family sans
13541 Author
13542 \family default
13543 , and 
13544 \family sans
13545 Date
13546 \family default
13547 , no effect on the appearance of the produced document.
13548 \end_layout
13549
13550 \begin_layout Itemize
13551
13552 \family sans
13553 Subject
13554 \family default
13555 : produces a centered paragraph above the ordinary title (
13556 \family sans
13557 Title
13558 \family default
13559
13560 \family sans
13561 Author
13562 \family default
13563
13564 \family sans
13565 Date
13566 \family default
13567 ) for the subject of the document.
13568 \end_layout
13569
13570 \begin_layout Itemize
13571
13572 \family sans
13573 Publishers
13574 \family default
13575 : produces a centered paragraph below the ordinary title (
13576 \family sans
13577 Title
13578 \family default
13579
13580 \family sans
13581 Author
13582 \family default
13583
13584 \family sans
13585 Date
13586 \family default
13587 ) for the publishers' name.
13588 \end_layout
13589
13590 \begin_layout Itemize
13591
13592 \family sans
13593 Dedication
13594 \family default
13595 : in 
13596 \emph on
13597 report (koma-script)
13598 \emph default
13599  and 
13600 \emph on
13601 book (koma-script)
13602 \emph default
13603  produces a centered paragraph on its own page behind the title page, or
13604  in 
13605 \emph on
13606 article (koma-script)
13607 \emph default
13608  produces a centered paragraph below the ordinary title (
13609 \family sans
13610 Title
13611 \family default
13612
13613 \family sans
13614 Author
13615 \family default
13616
13617 \family sans
13618 Date
13619 \family default
13620
13621 \family sans
13622 Publishers
13623 \family default
13624 ) for a dedication.
13625 \end_layout
13626
13627 \begin_layout Itemize
13628
13629 \family sans
13630 Titlehead
13631 \family default
13632 : produces a left aligned paragraph above the ordinary title (
13633 \family sans
13634 Title
13635 \family default
13636
13637 \family sans
13638 Author
13639 \family default
13640
13641 \family sans
13642 Date
13643 \family default
13644
13645 \family sans
13646 Subject
13647 \family default
13648 ) for a document`s head.
13649 \end_layout
13650
13651 \begin_layout Itemize
13652
13653 \family sans
13654 Uppertitleback
13655 \family default
13656 : produces in a double-sided print in 
13657 \emph on
13658 report (koma-script)
13659 \emph default
13660  and 
13661 \emph on
13662 book (koma-script)
13663 \emph default
13664  a left-aligned paragraph at the top of the title page`s back or has no
13665  effect in a single-sided print or in 
13666 \emph on
13667 article (koma-script)
13668 \emph default
13669 .
13670 \end_layout
13671
13672 \begin_layout Itemize
13673
13674 \family sans
13675 Lowertitleback
13676 \family default
13677 : produces in a double-sided print in 
13678 \emph on
13679 report (koma-script)
13680 \emph default
13681  and 
13682 \emph on
13683 book (koma-script)
13684 \emph default
13685  a left-aligned paragraph at the bottom of the title page`s back or has
13686  no effect in a single-sided print or in 
13687 \emph on
13688 article (koma-script)
13689 \emph default
13690 .
13691 \end_layout
13692
13693 \begin_layout Itemize
13694
13695 \family sans
13696 Extratitle
13697 \family default
13698 : produces a special 
13699 \begin_inset Quotes eld
13700 \end_inset
13701
13702 dirty
13703 \begin_inset Quotes erd
13704 \end_inset
13705
13706  page ahead of the actual document containing a paragraph without special
13707  formatting.
13708 \end_layout
13709
13710 \begin_layout Standard
13711 The layout files for the document classes 
13712 \emph on
13713 article (koma-script)
13714 \emph default
13715
13716 \emph on
13717 report (koma-script)
13718 \emph default
13719 , and 
13720 \emph on
13721 book (koma-script)
13722 \emph default
13723  do include the file 
13724 \family typewriter
13725 scrmacros.inc
13726 \family default
13727 .
13728  This is thought of as a place to define your own types.
13729  Copy scrmacros
13730 \family typewriter
13731 .inc
13732 \family default
13733  in your personal layout directory and edit the file!
13734 \end_layout
13735
13736 \begin_layout Subsection
13737 letter (koma-script)
13738 \end_layout
13739
13740 \begin_layout Standard
13741 \noindent
13742 The document class 
13743 \emph on
13744 letter (koma-script)
13745 \emph default
13746  is implemented in the layout file 
13747 \family typewriter
13748 scrlettr.layout
13749 \family default
13750 .
13751  It contains all the paragraph types of the corresponding standard document
13752  class 
13753 \emph on
13754 letter
13755 \emph default
13756 , partly modified, with the exception of the LyX specific types 
13757 \family sans
13758 LyX-Code
13759 \family default
13760  and 
13761 \family sans
13762 Comment
13763 \family default
13764  and the 
13765 \family sans
13766 List
13767 \family default
13768  type, which is replaced by the new 
13769 \family sans
13770 Labeling
13771 \family default
13772  type.
13773  In addition, it contains, in contrast to the standard document class, the
13774  standard types 
13775 \family sans
13776 LaTeX
13777 \family default
13778
13779 \family sans
13780 Quotation
13781 \family default
13782
13783 \family sans
13784 Quote
13785 \family default
13786 , and 
13787 \family sans
13788 Verse
13789 \family default
13790 .
13791  Furthermore, there are a number of new letter specific types.
13792 \end_layout
13793
13794 \begin_layout Standard
13795 The appearance of the letter produced by this document class can be controlled
13796  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13797 \begin_inset Foot
13798 status collapsed
13799
13800 \begin_layout Plain Layout
13801 For example, the standard appearance of the letter`s heading, consisting
13802  of name and address, is quite self-willed.
13803  An 
13804 \begin_inset Quotes eld
13805 \end_inset
13806
13807 ordinary
13808 \begin_inset Quotes erd
13809 \end_inset
13810
13811  heading is produced by the following LaTeX commands in the preamble:
13812 \end_layout
13813
13814 \begin_layout LyX-Code
13815
13816 \backslash
13817 firsthead{
13818 \backslash
13819 parbox[b]{
13820 \backslash
13821 textwidth}
13822 \end_layout
13823
13824 \begin_layout LyX-Code
13825   {
13826 \backslash
13827 ignorespaces 
13828 \backslash
13829 fromname
13830 \backslash
13831
13832 \backslash
13833  
13834 \backslash
13835 ignorespaces 
13836 \backslash
13837 fromaddress}} 
13838 \end_layout
13839
13840 \begin_layout LyX-Code
13841
13842 \backslash
13843 nexthead{
13844 \backslash
13845 parbox[b]{
13846 \backslash
13847 textwidth}
13848 \end_layout
13849
13850 \begin_layout LyX-Code
13851   {
13852 \backslash
13853 ignorespaces 
13854 \backslash
13855 fromname 
13856 \backslash
13857 hfill 
13858 \backslash
13859 ignorespaces 
13860 \backslash
13861 pagename
13862 \backslash
13863  
13864 \backslash
13865 thepage}}
13866 \end_layout
13867
13868 \end_inset
13869
13870  A detailed German description of such LaTeX commands can be found in the
13871  Koma-Script documentation 
13872 \emph on
13873 scrguide
13874 \emph default
13875 .
13876  With it, the letter's author can produce his personal letter layout.
13877 \end_layout
13878
13879 \begin_layout Standard
13880 The types 
13881 \family sans
13882 Letter
13883 \family default
13884  and 
13885 \family sans
13886 Opening
13887 \family default
13888  define the beginning of the letter and must be used in every letter.
13889  To emphasize them in the LyX document class, they are marked with the letter
13890  
13891 \shape italic
13892 L
13893 \shape default
13894  or 
13895 \shape italic
13896 O
13897 \shape default
13898 , resp.
13899 \begin_inset space ~
13900 \end_inset
13901
13902 in the left margin.
13903  It is possible to write any number of letters in one file.
13904  An 
13905 \family sans
13906 Opening
13907 \family default
13908  type produces a new letter using the same addressee and a 
13909 \family sans
13910 Letter
13911 \family default
13912  type produces a new addressee.
13913  The types 
13914 \family sans
13915 Closing
13916 \family default
13917
13918 \family sans
13919 PS
13920 \family default
13921
13922 \family sans
13923 CC
13924 \family default
13925 , and 
13926 \family sans
13927 Encl
13928 \family default
13929  are ordinary paragraph types and can also be used several times in one
13930  and the same letter.
13931 \end_layout
13932
13933 \begin_layout Itemize
13934
13935 \family sans
13936 Letter
13937 \family default
13938 : produces a paragraph for the addressee and implicitly defines the beginning
13939  of the letter.
13940 \end_layout
13941
13942 \begin_layout Itemize
13943
13944 \family sans
13945 Opening
13946 \family default
13947 : produces a paragraph for the form of address and implicitly produces a
13948  new letter.
13949 \end_layout
13950
13951 \begin_layout Itemize
13952
13953 \family sans
13954 Closing
13955 \family default
13956 : produces a paragraph for a close.
13957 \end_layout
13958
13959 \begin_layout Itemize
13960
13961 \family sans
13962 PS
13963 \family default
13964 : produces a paragraph for a postscript.
13965 \end_layout
13966
13967 \begin_layout Itemize
13968
13969 \family sans
13970 CC
13971 \family default
13972 : produces a paragraph for a distribution list.
13973 \end_layout
13974
13975 \begin_layout Itemize
13976
13977 \family sans
13978 Encl
13979 \family default
13980 : produces a paragraph for enclosures.
13981 \end_layout
13982
13983 \begin_layout Standard
13984 The types 
13985 \family sans
13986 Name
13987 \family default
13988
13989 \family sans
13990 Signature
13991 \family default
13992
13993 \family sans
13994 Address
13995 \family default
13996
13997 \family sans
13998 Telephone
13999 \family default
14000
14001 \family sans
14002 Place
14003 \family default
14004
14005 \family sans
14006 Backaddress
14007 \family default
14008
14009 \family sans
14010 Specialmail
14011 \family default
14012
14013 \family sans
14014 Location
14015 \family default
14016
14017 \family sans
14018 Title
14019 \family default
14020 , and 
14021 \family sans
14022 Subject
14023 \family default
14024  are input types provided with a label to enter information, which will
14025  be processed by the document class.
14026 \begin_inset Foot
14027 status open
14028
14029 \begin_layout Plain Layout
14030 It could be seen as a matter of inconsequence, that the types 
14031 \family sans
14032 Letter
14033 \family default
14034  and 
14035 \family sans
14036 Opening
14037 \family default
14038  described above are not such input types as well.
14039  Because of the special meaning of those types, however, I have implemented
14040  them as ordinary paragraph types with a one letter mark in the left margin.
14041  Moreover, it would affect my feeling of symmetry, if the 
14042 \family sans
14043 Opening
14044 \family default
14045  type and the 
14046 \family sans
14047 Closing
14048 \family default
14049  type had such a serious different appearance.
14050 \end_layout
14051
14052 \end_inset
14053
14054  The types must be used ahead of the corresponding 
14055 \family sans
14056 Opening
14057 \family default
14058  type.
14059 \end_layout
14060
14061 \begin_layout Standard
14062 An implementation of these types in a WYSIWYG fashion does not seem to make
14063  sense, because the real appearance of the produced letter does not only
14064  depend on the usage of the particular type, but also on other factors.
14065  For example, a signature entered in the 
14066 \family sans
14067 Signature
14068 \family default
14069  type will in the standard behavior appear in the produced letter only,
14070  when in the same letter also a 
14071 \family sans
14072 Closing
14073 \family default
14074  type is used.
14075  The entered value of the 
14076 \family sans
14077 Telephone
14078 \family default
14079  type will in the standard behavior not appear in the produced letter at
14080  all.
14081  The possibility to design the letter`s heading freely is already indicated
14082  in a footnote above.
14083 \end_layout
14084
14085 \begin_layout Standard
14086 The input types can also be used as empty paragraphs.
14087  This makes sense e.
14088 \begin_inset space \thinspace{}
14089 \end_inset
14090
14091 g.
14092 \begin_inset space \space{}
14093 \end_inset
14094
14095 for the 
14096 \family sans
14097 Signature
14098 \family default
14099  type.
14100  If the 
14101 \family sans
14102 Signature
14103 \family default
14104  type is not used at all, in the standard behavior the value of the 
14105 \family sans
14106 Name
14107 \family default
14108  type is used as signature, whereas if an empty 
14109 \family sans
14110 Signature
14111 \family default
14112  type is used, no signature value is defined.
14113 \end_layout
14114
14115 \begin_layout Standard
14116 By using the input types it is possible to write a letter template, containing
14117  filled input types with your personal dates (name, address, etc.) and empty
14118  input types for other dates you want to enter.
14119 \end_layout
14120
14121 \begin_layout Itemize
14122
14123 \family sans
14124 Name
14125 \family default
14126 : sender's name, in the standard behavior appears as a centered paragraph
14127  in small caps in the letter`s heading.
14128 \end_layout
14129
14130 \begin_layout Itemize
14131
14132 \family sans
14133 Signature
14134 \family default
14135 : sender's signature, in the standard behavior appears below the 
14136 \family sans
14137 Closing
14138 \family default
14139  type.
14140  If no 
14141 \family sans
14142 Signature
14143 \family default
14144  type is used, the value of the 
14145 \family sans
14146 Name
14147 \family default
14148  type appears instead.
14149 \end_layout
14150
14151 \begin_layout Itemize
14152
14153 \family sans
14154 Address
14155 \family default
14156 : sender's address, in the standard behavior appears in a centered paragraph
14157  in the letter`s heading below the sender's name.
14158 \end_layout
14159
14160 \begin_layout Itemize
14161
14162 \family sans
14163 Telephone
14164 \family default
14165 : sender's telephone number, in the standard behavior only sets the LaTeX
14166  variable 
14167 \family typewriter
14168
14169 \backslash
14170 telephonenum
14171 \family default
14172 .
14173 \end_layout
14174
14175 \begin_layout Itemize
14176
14177 \family sans
14178 Place
14179 \family default
14180 : place of the letter`s making.
14181 \end_layout
14182
14183 \begin_layout Itemize
14184
14185 \family sans
14186 Date
14187 \family default
14188 : date of the letter`s making.
14189  
14190 \family sans
14191 Place
14192 \family default
14193  and 
14194 \family sans
14195 Date
14196 \family default
14197 , in the standard behavior, produce the place and the date in a right-aligned
14198  line below the addressee's field.
14199  If an empty 
14200 \family sans
14201 Date
14202 \family default
14203  type is used, neither place nor date appear, independent of the value of
14204  the 
14205 \family sans
14206 Place
14207 \family default
14208  type.
14209  If no 
14210 \family sans
14211 Date
14212 \family default
14213  type is used, the date of the letter `s production is used.
14214 \end_layout
14215
14216 \begin_layout Itemize
14217
14218 \family sans
14219 Backaddress
14220 \family default
14221 : sender`s back address, in the standard behavior appears above the addressee's
14222  field in a small sans serif font.
14223 \end_layout
14224
14225 \begin_layout Itemize
14226
14227 \family sans
14228 Specialmail
14229 \family default
14230 : special mail information, in the standard behavior appears underlined
14231  above the addressee's field below the back address.
14232 \end_layout
14233
14234 \begin_layout Itemize
14235
14236 \family sans
14237 Location
14238 \family default
14239 : additional information, in the standard behavior appears on right side
14240  below the addressee`s field.
14241 \end_layout
14242
14243 \begin_layout Itemize
14244
14245 \family sans
14246 Title
14247 \family default
14248 : the letter's title, in the standard behavior appears in a big, bold, sans
14249  serif font above the subject.
14250 \end_layout
14251
14252 \begin_layout Itemize
14253
14254 \family sans
14255 Subject
14256 \family default
14257 : the letter's subject, in the standard behavior appears in a bold font
14258  above the 
14259 \family sans
14260 Opening
14261 \family default
14262  paragraph.
14263 \end_layout
14264
14265 \begin_layout Standard
14266 The types 
14267 \family sans
14268 Yourref
14269 \family default
14270
14271 \family sans
14272 Yourmail
14273 \family default
14274
14275 \family sans
14276 Myref
14277 \family default
14278
14279 \family sans
14280 Customer
14281 \family default
14282 , and 
14283 \family sans
14284 Invoice
14285 \family default
14286  produce a business letter like line above the 
14287 \family sans
14288 Title
14289 \family default
14290  line containing the fields 
14291 \begin_inset Quotes eld
14292 \end_inset
14293
14294 Your ref.
14295 \begin_inset Quotes erd
14296 \end_inset
14297
14298
14299 \begin_inset Quotes eld
14300 \end_inset
14301
14302 Your letter of
14303 \begin_inset Quotes erd
14304 \end_inset
14305
14306
14307 \begin_inset Quotes eld
14308 \end_inset
14309
14310 Our ref.
14311 \begin_inset Quotes erd
14312 \end_inset
14313
14314
14315 \begin_inset Quotes eld
14316 \end_inset
14317
14318 Customer no.
14319 \begin_inset Quotes erd
14320 \end_inset
14321
14322
14323 \begin_inset Quotes eld
14324 \end_inset
14325
14326 Invoice no.
14327 \begin_inset Quotes erd
14328 \end_inset
14329
14330 , and 
14331 \begin_inset Quotes eld
14332 \end_inset
14333
14334 Date
14335 \begin_inset Quotes erd
14336 \end_inset
14337
14338 .
14339  For the date field, the value of the 
14340 \family sans
14341 Date
14342 \family default
14343  type is used.
14344  If one of these 
14345 \begin_inset Quotes eld
14346 \end_inset
14347
14348 business letter types
14349 \begin_inset Quotes erd
14350 \end_inset
14351
14352  is used, the value of the 
14353 \family sans
14354 Place
14355 \family default
14356  type however does not appear, but only the LaTeX variable 
14357 \family typewriter
14358
14359 \backslash
14360 fromplace
14361 \family default
14362  is set.
14363  The ordinary output of place and date in a right-aligned line below the
14364  addressee`s field is suppressed.
14365  The types are implemented as input types provided with a label and must
14366  be used ahead of the corresponding 
14367 \family sans
14368 Opening
14369 \family default
14370  type.
14371 \end_layout
14372
14373 \begin_layout Itemize
14374
14375 \family sans
14376 Yourref
14377 \family default
14378 : Your ref.
14379 \end_layout
14380
14381 \begin_layout Itemize
14382
14383 \family sans
14384 Yourmail
14385 \family default
14386 : Your letter of.
14387 \end_layout
14388
14389 \begin_layout Itemize
14390
14391 \family sans
14392 Myref
14393 \family default
14394 : Our ref.
14395 \end_layout
14396
14397 \begin_layout Itemize
14398
14399 \family sans
14400 Customer
14401 \family default
14402 : Customer no.
14403 \end_layout
14404
14405 \begin_layout Itemize
14406
14407 \family sans
14408 Invoice
14409 \family default
14410 : Invoice no.
14411 \end_layout
14412
14413 \begin_layout Subsection
14414 The new letter class: letter (koma-script v.2)
14415 \end_layout
14416
14417 \begin_layout Standard
14418 by 
14419 \noun on
14420 Jürgen Spitzmüller
14421 \end_layout
14422
14423 \begin_layout Standard
14424 \begin_inset VSpace medskip
14425 \end_inset
14426
14427
14428 \end_layout
14429
14430 \begin_layout Standard
14431 \noindent
14432 Koma-Script version 2.8 has introduced a new letter class 
14433 \family typewriter
14434 scrlttr2
14435 \family default
14436  which supersedes the now unsupported 
14437 \family typewriter
14438 scrlettr
14439 \family default
14440 .
14441  It has — on the LaTeX side — a completely new interface and is not compatible
14442  with the old class.
14443  Therefore, LyX supports both, though it is recommended you use the new
14444  class.
14445 \end_layout
14446
14447 \begin_layout Standard
14448 This class covers the same functionality as 
14449 \emph on
14450 letter (koma-script),
14451 \emph default
14452  and a few more.
14453  The basic items are 
14454 \family sans
14455 Address
14456 \family default
14457  (receiver's address, same as 
14458 \family sans
14459 Letter
14460 \family default
14461  in the old layout), 
14462 \family sans
14463 Opening
14464 \family default
14465 , and 
14466 \family sans
14467 Closing
14468 \family default
14469 .
14470  
14471 \family sans
14472 NextAddress
14473 \family default
14474  will start a new letter (i.
14475 \begin_inset space \thinspace{}
14476 \end_inset
14477
14478 e.
14479 \begin_inset space \space{}
14480 \end_inset
14481
14482 you can write several letters per document).
14483  New elements are sender's 
14484 \family sans
14485 E-Mail
14486 \family default
14487
14488 \family sans
14489 URL
14490 \family default
14491
14492 \family sans
14493 Fax
14494 \family default
14495
14496 \family sans
14497 Bank
14498 \family default
14499  and the possibility to use a 
14500 \family sans
14501 Logo
14502 \family default
14503  (via 
14504 \family sans
14505 Insert\SpecialChar \menuseparator
14506 Graphics
14507 \family default
14508 ) in the header.
14509 \end_layout
14510
14511 \begin_layout Standard
14512 The biggest improvement is, though, that the letter's layout is configurable
14513  to meet almost any needs.
14514  This can be done via the preamble or with a special style file (Letter
14515  Class Option, extension 
14516 \family typewriter
14517 *.lco
14518 \family default
14519 ), that will be read in as a class option.
14520 \begin_inset Foot
14521 status collapsed
14522
14523 \begin_layout Plain Layout
14524 The KOMA package comes with some default 
14525 \family typewriter
14526 *.lco
14527 \family default
14528  files.
14529  There is, for instance, a 
14530 \family typewriter
14531 DIN.lco
14532 \family default
14533  file that follows german typesetting rules, or a 
14534 \family typewriter
14535 KOMAold.lco
14536 \family default
14537  that provides the default layout of the old 
14538 \family typewriter
14539 scrlettr
14540 \family default
14541  class.
14542  The latter can be loaded with the class option 
14543 \family typewriter
14544 KOMAold
14545 \family default
14546 , inserted via the 
14547 \family sans
14548 \bar under
14549 L
14550 \bar default
14551 ayout\SpecialChar \menuseparator
14552
14553 \bar under
14554 D
14555 \bar default
14556 ocument\SpecialChar \menuseparator
14557 Extra Options
14558 \family default
14559  field.
14560 \end_layout
14561
14562 \end_inset
14563
14564  Have a look at the 
14565 \emph on
14566 koma-letter2
14567 \emph default
14568  template that is included in LyX for examples.
14569  A detailed description is to be found in the Koma-Script documentation
14570  (
14571 \emph on
14572 scrguide
14573 \emph default
14574 ).
14575 \end_layout
14576
14577 \begin_layout Subsection
14578 Problems
14579 \end_layout
14580
14581 \begin_layout Standard
14582 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14583  some problems.
14584 \end_layout
14585
14586 \begin_layout Itemize
14587 The chapter number of a 
14588 \family sans
14589 Chapter
14590 \family default
14591  type appears on a line of its own above the chapter heading instead of
14592  appearing in the same line ahead of it.
14593  The cause for that is the LyX internal behavior for the labeltype 
14594 \family sans
14595 Counter_Chapter
14596 \family default
14597  in the layout file.
14598 \end_layout
14599
14600 \begin_layout Itemize
14601 The headings of the types 
14602 \family sans
14603 Addchap
14604 \family default
14605  and 
14606 \family sans
14607 Addsec
14608 \family default
14609  are only put in the 
14610 \begin_inset Quotes eld
14611 \end_inset
14612
14613 true
14614 \begin_inset Quotes erd
14615 \end_inset
14616
14617  LaTeX table of contents, but not in the LyX table of contents (
14618 \family sans
14619 Document\SpecialChar \menuseparator
14620 Table
14621 \begin_inset space ~
14622 \end_inset
14623
14624 of
14625 \begin_inset space ~
14626 \end_inset
14627
14628 Contents
14629 \family default
14630 ).
14631 \end_layout
14632
14633 \begin_layout Itemize
14634 The paragraphs in a 
14635 \emph on
14636 letter
14637 \emph default
14638  document class appear in a skip separation mode, not indented.
14639  This is the standard behavior, no special LaTeX commands are needed for
14640  that.
14641  But in the 
14642 \family sans
14643 Document\SpecialChar \menuseparator
14644 Settings
14645 \family default
14646  dialog the corresponding radio button indicates 
14647 \family sans
14648 Indent
14649 \family default
14650 .
14651  A 
14652 \family sans
14653 Skip
14654 \family default
14655  value always has the effect that extra LaTeX commands are inserted in the
14656  document to produce the gap, which is not what is wanted in this case.
14657 \end_layout
14658
14659 \begin_layout Section
14660 Memoir
14661 \end_layout
14662
14663 \begin_layout Standard
14664 By 
14665 \noun on
14666 Jürgen Spitzmüller
14667 \end_layout
14668
14669 \begin_layout Subsection
14670 Overview
14671 \end_layout
14672
14673 \begin_layout Standard
14674 Memoir is a very powerful and constantly evolving class.
14675  It has been designed with regard to fictional and non-fictional literature.
14676  Its aim is to let the user have maximum control over the typesetting of
14677  his document.
14678  Memoir is based on the standard book class, but it can also emulate the
14679  article class (see below).
14680 \end_layout
14681
14682 \begin_layout Standard
14683 Peter Wilson, the developer of Memoir, is known as the author of lots of
14684  useful packages in the LaTeX world.
14685  Most of them have been merged with Memoir.
14686  Therefore, it is much easier to layout the table of contents, appendices,
14687  chapter designs and such.
14688  LyX, though, does not support all of these goodies natively.
14689  Some of them might be added to forthcoming releases
14690 \begin_inset Foot
14691 status collapsed
14692
14693 \begin_layout Plain Layout
14694 You are invited to send suggestions to 
14695 \begin_inset Flex URL
14696 status collapsed
14697
14698 \begin_layout Plain Layout
14699
14700 lyx-devel@lists.lyx.org
14701 \end_layout
14702
14703 \end_inset
14704
14705 .
14706 \end_layout
14707
14708 \end_inset
14709
14710 , lots will probably never be supported, due to the limitations of LyX's
14711  framework.
14712  Of course you can still use all features with the help of some native LaTeX
14713  commands (TeX code
14714 \begin_inset Foot
14715 status collapsed
14716
14717 \begin_layout Plain Layout
14718 Cf.
14719 \begin_inset ERT
14720 status collapsed
14721
14722 \begin_layout Plain Layout
14723
14724
14725 \backslash
14726  
14727 \end_layout
14728
14729 \end_inset
14730
14731 section
14732 \begin_inset space ~
14733 \end_inset
14734
14735
14736 \begin_inset CommandInset ref
14737 LatexCommand ref
14738 reference "sec:Inserting-TeX-Code"
14739
14740 \end_inset
14741
14742  for details.
14743 \end_layout
14744
14745 \end_inset
14746
14747 ).
14748  In this section, we can only list those features that are natively supported
14749  by LyX.
14750  For detailed descriptions (and for the rest of features) we recommend you
14751  have a look at the detailed manual of the Memoir class
14752 \begin_inset Foot
14753 status collapsed
14754
14755 \begin_layout Plain Layout
14756 Cf.
14757 \begin_inset ERT
14758 status collapsed
14759
14760 \begin_layout Plain Layout
14761
14762
14763 \backslash
14764  
14765 \end_layout
14766
14767 \end_inset
14768
14769
14770 \begin_inset Flex URL
14771 status collapsed
14772
14773 \begin_layout Plain Layout
14774
14775 CTAN:/macros/latex/memoir/memman.pdf
14776 \end_layout
14777
14778 \end_inset
14779
14780 .
14781 \end_layout
14782
14783 \end_inset
14784
14785 , which is not only a user guide for the class, but also both a comprehensive
14786  description on good typesetting and a superb example for good typesetting
14787  itself.
14788 \end_layout
14789
14790 \begin_layout Subsection
14791 Basic features and restrictions
14792 \end_layout
14793
14794 \begin_layout Standard
14795 Memoir supports basically all features of the standard book classes.
14796  There are, however, some differences, as follows:
14797 \end_layout
14798
14799 \begin_layout Description
14800 Font
14801 \begin_inset space ~
14802 \end_inset
14803
14804 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14805 \end_layout
14806
14807 \begin_layout Description
14808 Page
14809 \begin_inset space ~
14810 \end_inset
14811
14812 style: The fancy page style is not supported, due to a command clash between
14813  Memoir and the fancyhdr package (they both define a command with the same
14814  name, which confuses LaTeX).
14815  Instead, Memoir comes with a number of its own page styles (see 
14816 \family sans
14817 Layout\SpecialChar \menuseparator
14818 Document\SpecialChar \menuseparator
14819 Page
14820 \begin_inset space ~
14821 \end_inset
14822
14823 Style
14824 \family default
14825 ).
14826  If you want to use these for the chapter pages, you have to use the command
14827  
14828 \family typewriter
14829
14830 \backslash
14831 chapterstyle
14832 \family default
14833  in the main text or in preamble (e.
14834 \begin_inset space \thinspace{}
14835 \end_inset
14836
14837 g.
14838 \begin_inset space \space{}
14839 \end_inset
14840
14841
14842 \family typewriter
14843
14844 \backslash
14845 chapterstyle{companion}
14846 \family default
14847 ).
14848 \end_layout
14849
14850 \begin_layout Description
14851 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14852  optional argument in the standard classes.
14853  With this, you can specify an alternative version of the title for the
14854  table of contents and the headers (for instance, if the title is too long).
14855  In LyX, you can do this via 
14856 \family sans
14857 Insert\SpecialChar \menuseparator
14858 Short
14859 \begin_inset space ~
14860 \end_inset
14861
14862 Title
14863 \family default
14864  at the beginning of a chapter/section.
14865  Memoir features a second optional argument and thus separates the table
14866  of contents from the header.
14867  You can define three variants of a title with this: one for the main text,
14868  one for the table of contents, and one for the headers.
14869  Simply insert two optional arguments if you need this feature, the first
14870  one containing the short title for the Table of Contents, the second one
14871  containing an alternative short title for the headers.
14872 \end_layout
14873
14874 \begin_layout Description
14875 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14876  of contents, the list of figures and the list of table start a new page
14877  automatically.
14878  Memoir does not follow this route.
14879  You have to insert a page break yourself, if you want to have one.
14880 \end_layout
14881
14882 \begin_layout Description
14883 Titlepage: For some unknown reason, Memoir uses pagination on the title
14884  page (in the standard classes, title pages are 
14885 \begin_inset Quotes eld
14886 \end_inset
14887
14888 empty
14889 \begin_inset Quotes erd
14890 \end_inset
14891
14892 ).
14893  If you want an empty title page, type 
14894 \family typewriter
14895
14896 \backslash
14897 aliaspagestyle{title}{empty}
14898 \family default
14899  in the preamble.
14900 \end_layout
14901
14902 \begin_layout Description
14903 Article: With the class option 
14904 \emph on
14905 article
14906 \emph default
14907  (to be inserted in 
14908 \family sans
14909 Layout\SpecialChar \menuseparator
14910 Document\SpecialChar \menuseparator
14911 Extra
14912 \begin_inset space ~
14913 \end_inset
14914
14915 Options
14916 \family default
14917 ), you can emulate article style.
14918  That is, counters (footnotes, figures, tables etc.) will not be reset on
14919  new chapters, chapters don't start a new page (but are—in contrary to 
14920 \begin_inset Quotes eld
14921 \end_inset
14922
14923 real
14924 \begin_inset Quotes erd
14925 \end_inset
14926
14927  article classes—still allowed), parts, though, use their own page, as in
14928  book.
14929 \end_layout
14930
14931 \begin_layout Description
14932 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14933  font commands, which have been used in the old LaTeX version 2.09 (e.
14934 \begin_inset space \thinspace{}
14935 \end_inset
14936
14937 g.
14938 \begin_inset space \space{}
14939 \end_inset
14940
14941
14942 \family typewriter
14943
14944 \backslash
14945 rm
14946 \family default
14947
14948 \family typewriter
14949
14950 \backslash
14951 it
14952 \family default
14953 ).
14954  It produces an error and stops LaTeX whenever such a command appears.
14955  The class option 
14956 \emph on
14957 oldfontcommands
14958 \emph default
14959  reallows the commands and spits out warnings instead (which does at least
14960  not stop LaTeX).
14961  Since a lot of packages and particularly BibTeX style files are still using
14962  those commands, we have decided to use this option by default.
14963 \end_layout
14964
14965 \begin_layout Subsection
14966 Extra features
14967 \end_layout
14968
14969 \begin_layout Standard
14970 We will only describe the features supported by LyX (which is not much currently
14971 ).
14972  Please consult the Memoir manual
14973 \begin_inset Foot
14974 status collapsed
14975
14976 \begin_layout Plain Layout
14977 Cf.
14978 \begin_inset ERT
14979 status collapsed
14980
14981 \begin_layout Plain Layout
14982
14983
14984 \backslash
14985  
14986 \end_layout
14987
14988 \end_inset
14989
14990
14991 \begin_inset Flex URL
14992 status collapsed
14993
14994 \begin_layout Plain Layout
14995
14996 CTAN:/macros/latex/memoir/memman.pdf
14997 \end_layout
14998
14999 \end_inset
15000
15001 .
15002 \end_layout
15003
15004 \end_inset
15005
15006  for details.
15007 \end_layout
15008
15009 \begin_layout Description
15010 Abstract: You may wonder why an abstract is an extra feature.
15011  Well, it is in book class.
15012  Usually books don't have abstracts.
15013  Memoir, however, has.
15014  You can use it wherever and how often you like.
15015 \end_layout
15016
15017 \begin_layout Description
15018 Chapterprecis: You may know this older typesetting style: The contents of
15019  a chapter are summarized below the title and also in the table of contents
15020  (e.
15021 \begin_inset space \thinspace{}
15022 \end_inset
15023
15024 g.
15025 \begin_inset space \space{}
15026 \end_inset
15027
15028
15029 \emph on
15030 Our hero arrives in Troia; he loses some friends; he finds others
15031 \emph default
15032 ).
15033  Chapterprecis does exactly this.
15034  It is therefore only sensible below a chapter.
15035 \end_layout
15036
15037 \begin_layout Description
15038 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
15039  The epigraph environment provides an elegant way of typesetting such a
15040  motto.
15041  The motto itself (text) and its author (source) are divided by a short
15042  line.
15043  Unfortunately, we have to fool LyX a bit here again, since the environment
15044  needs two arguments (text and source).
15045  In this case, we have to use curly brackets (in TeX mode) between the two
15046  arguments: 
15047 \emph on
15048 <smart slogan>
15049 \emph default
15050  
15051 \family typewriter
15052 }{
15053 \family default
15054  
15055 \emph on
15056 <author of the slogan>.
15057 \end_layout
15058
15059 \begin_layout Description
15060 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
15061  complex figurative poems).
15062  LyX can only support a few of them.
15063  One is poemtitle, which is a centered title for poems, which will also
15064  be added to the table of contents (verse is the standard environment for
15065  poems.
15066  Memoir has some enhanced versions of verse, but you need to use TeX code,
15067  because they have to be nested inside regular verse environments, which
15068  is not possible with LyX).
15069 \end_layout
15070
15071 \begin_layout Description
15072 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
15073 \end_layout
15074
15075 \begin_layout Section
15076 Article (mwart), book (mwbk) and report (mwrep)
15077 \begin_inset Argument status
15078 status collapsed
15079
15080 \begin_layout Plain Layout
15081 The 
15082 \family typewriter
15083 mw
15084 \family default
15085  Classes
15086 \end_layout
15087
15088 \end_inset
15089
15090
15091 \end_layout
15092
15093 \begin_layout Standard
15094 by 
15095 \noun on
15096 Tomasz Luczak
15097 \end_layout
15098
15099 \begin_layout Standard
15100 The LyX document classes 
15101 \emph on
15102 article (mwart)
15103 \emph default
15104
15105 \emph on
15106 report (mwrep)
15107 \emph default
15108  and 
15109 \emph on
15110 book
15111 \emph default
15112  
15113 \emph on
15114 (mwbk)
15115 \emph default
15116  correspond to the LaTeX document classes 
15117 \family typewriter
15118 mwart.cls
15119 \family default
15120
15121 \family typewriter
15122 mwrep.cls
15123 \family default
15124  and 
15125 \family typewriter
15126 mwbk.cls
15127 \family default
15128 , resp.
15129  They are replacements for the standard document classes 
15130 \family typewriter
15131 article.cls
15132 \family default
15133
15134 \family typewriter
15135 report.cls
15136 \family default
15137  and 
15138 \family typewriter
15139 book.cls
15140 \family default
15141 , resp., and fit better to Polish typography conventions in a number of points.
15142  
15143 \end_layout
15144
15145 \begin_layout Standard
15146 Basic differences:
15147 \end_layout
15148
15149 \begin_layout Itemize
15150 Unnumbered titles (with star, e.
15151 \begin_inset space \thinspace{}
15152 \end_inset
15153
15154 g.
15155 \begin_inset space \space{}
15156 \end_inset
15157
15158
15159 \family sans
15160 Section*
15161 \family default
15162 ) are added into table of contents,
15163 \end_layout
15164
15165 \begin_layout Itemize
15166 Additional page styles:
15167 \end_layout
15168
15169 \begin_deeper
15170 \begin_layout Description
15171 uheadings header with separated lines,
15172 \end_layout
15173
15174 \begin_layout Description
15175 myheadings custom header, contents headers via commands: 
15176 \family typewriter
15177
15178 \backslash
15179 markright
15180 \family default
15181  and 
15182 \family typewriter
15183
15184 \backslash
15185 markboth
15186 \family default
15187 ,
15188 \end_layout
15189
15190 \begin_layout Description
15191 myuheadings custom header with separated lines,
15192 \end_layout
15193
15194 \begin_layout Description
15195 outer page number is placed on outer side of page
15196 \end_layout
15197
15198 \end_deeper
15199 \begin_layout Itemize
15200 Options 
15201 \end_layout
15202
15203 \begin_deeper
15204 \begin_layout Description
15205 rmheadings serif titles — default,
15206 \end_layout
15207
15208 \begin_layout Description
15209 sfheadings sansserif titles,
15210 \end_layout
15211
15212 \begin_layout Description
15213 authortitle on title page first placed is author next title — default,
15214 \end_layout
15215
15216 \begin_layout Description
15217 titleauthor on title page first placed is title next author,
15218 \end_layout
15219
15220 \begin_layout Description
15221 withmarginpar reserve place on page for margins.
15222 \end_layout
15223
15224 \end_deeper
15225 \begin_layout Section
15226 Paper
15227 \end_layout
15228
15229 \begin_layout Standard
15230 The document class 
15231 \family sans
15232 paper
15233 \family default
15234  provides an alternative to the standard 
15235 \family sans
15236 article
15237 \family default
15238  class.
15239  It provides similar functionality, but you might prefer this layout with
15240  sans serif sections, headings, and more.
15241 \end_layout
15242
15243 \begin_layout Section
15244 RevTeX4
15245 \end_layout
15246
15247 \begin_layout Standard
15248 by 
15249 \noun on
15250 Amir Karger
15251 \end_layout
15252
15253 \begin_layout Standard
15254 \begin_inset VSpace bigskip
15255 \end_inset
15256
15257
15258 \end_layout
15259
15260 \begin_layout Standard
15261 \noindent
15262 The 
15263 \family sans
15264 Revtex
15265 \begin_inset space ~
15266 \end_inset
15267
15268 4
15269 \family default
15270  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15271 \begin_inset Formula $\beta$
15272 \end_inset
15273
15274  release of May, 1999) class.
15275 \end_layout
15276
15277 \begin_layout Standard
15278 LyX has a 
15279 \family sans
15280 Revtex
15281 \family default
15282  textclass, which works with RevTeX 3.1.
15283  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15284  That means that it doesn't interact very well with LyX, which requires
15285  LaTeX2e, although it has been kludged to work.
15286  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15287  LyX with the 
15288 \family sans
15289 RevTeX
15290 \begin_inset space ~
15291 \end_inset
15292
15293 4
15294 \family default
15295  textclass should also be pretty easy to use.
15296 \end_layout
15297
15298 \begin_layout Standard
15299 These documents are supposed to be used in 
15300 \emph on
15301 addition
15302 \emph default
15303  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15304  macros, and assume you'll know what to put in the preamble if necessary.
15305 \end_layout
15306
15307 \begin_layout Subsection
15308 Installation
15309 \end_layout
15310
15311 \begin_layout Standard
15312 All you need to do is install RevTeX 4, as described in the package's README
15313  file.
15314  The package can be found at The RevTeX 4 Web Site 
15315 \begin_inset Flex URL
15316 status collapsed
15317
15318 \begin_layout Plain Layout
15319
15320 http://publish.aps.org/revtex4/
15321 \end_layout
15322
15323 \end_inset
15324
15325 .
15326  Install it somewhere that LaTeX can see it.
15327  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15328  (i.
15329 \begin_inset space \thinspace{}
15330 \end_inset
15331
15332 e.
15333 \begin_inset space \space{}
15334 \end_inset
15335
15336 not the directory where you installed the class file.) Then, if you reconfigure
15337  LyX, it will find the class file and let you use the RevTeX4 textclass.
15338 \end_layout
15339
15340 \begin_layout Standard
15341 Probably the easiest way to get started is either to import a RevTeX 4 document
15342  using 
15343 \family typewriter
15344 tex2lyx
15345 \family default
15346 , or to use the 
15347 \family sans
15348 Revtex
15349 \begin_inset space ~
15350 \end_inset
15351
15352 4
15353 \family default
15354  template, found in the templates directory.
15355 \end_layout
15356
15357 \begin_layout Subsection
15358 Preamble Matter
15359 \end_layout
15360
15361 \begin_layout Standard
15362 Optional arguments to 
15363 \family typewriter
15364
15365 \backslash
15366 documentclass
15367 \family default
15368 , like 
15369 \begin_inset Quotes eld
15370 \end_inset
15371
15372 preprint
15373 \begin_inset Quotes erd
15374 \end_inset
15375
15376  and 
15377 \begin_inset Quotes eld
15378 \end_inset
15379
15380 aps
15381 \begin_inset Quotes erd
15382 \end_inset
15383
15384 , go in the 
15385 \family sans
15386 E
15387 \bar under
15388 x
15389 \bar default
15390 tra
15391 \begin_inset space ~
15392 \end_inset
15393
15394 Options
15395 \family default
15396  field in the 
15397 \family sans
15398 Document
15399 \begin_inset space ~
15400 \end_inset
15401
15402 Layout
15403 \family default
15404  dialog, as usual.
15405  Remember that in RevTeX, at least one optional argument is required! 
15406 \end_layout
15407
15408 \begin_layout Standard
15409 Other preamble matter, like 
15410 \family typewriter
15411
15412 \backslash
15413 draft
15414 \family default
15415  etc.
15416 \begin_inset space ~
15417 \end_inset
15418
15419 goes in the 
15420 \family sans
15421 LaTeX
15422 \begin_inset space ~
15423 \end_inset
15424
15425 Preamble
15426 \family default
15427  dialog, also as usual.
15428 \end_layout
15429
15430 \begin_layout Subsection
15431 Layouts
15432 \end_layout
15433
15434 \begin_layout Standard
15435 The layouts basically correspond to the commands in RevTeX4.0.
15436  For example, the Email layout corresponds to 
15437 \family typewriter
15438
15439 \backslash
15440 email{}
15441 \family default
15442 .
15443  Note that (at least as of RevTeX 4.0 Beta), the 
15444 \family sans
15445 Address
15446 \family default
15447  and 
15448 \family sans
15449 Affiliation
15450 \family default
15451  layouts are exactly equivalent, so you shouldn't need to use both.
15452 \begin_inset Foot
15453 status collapsed
15454
15455 \begin_layout Plain Layout
15456 In case you're curious, both were included so that 
15457 \family typewriter
15458 tex2lyx
15459 \family default
15460  would be able to translate both 
15461 \family typewriter
15462
15463 \backslash
15464 address
15465 \family default
15466  and 
15467 \family typewriter
15468
15469 \backslash
15470 affiliation
15471 \family default
15472 .
15473 \end_layout
15474
15475 \end_inset
15476
15477
15478 \end_layout
15479
15480 \begin_layout Subsection
15481 Important Notes
15482 \end_layout
15483
15484 \begin_layout Standard
15485 There are a couple of important unique aspects of RevTeX 4 which might cause
15486  bugs that will be even more confusing in LyX.
15487 \end_layout
15488
15489 \begin_layout Standard
15490 In RevTeX, the 
15491 \family typewriter
15492
15493 \backslash
15494 thanks
15495 \family default
15496  command goes 
15497 \emph on
15498 outside
15499 \emph default
15500  the 
15501 \family typewriter
15502
15503 \backslash
15504 author
15505 \family default
15506  command.
15507  The LyX equivalent is that there is a separate Thanks layout.
15508  Do 
15509 \emph on
15510 not
15511 \emph default
15512  write footnotes in the 
15513 \family sans
15514 Author
15515 \family default
15516  layout, or weird things may happen.
15517  See the RevTeX 4 documentation for more details.
15518 \end_layout
15519
15520 \begin_layout Standard
15521 Also, the 
15522 \family sans
15523 Author
15524 \begin_inset space ~
15525 \end_inset
15526
15527 Email
15528 \family default
15529
15530 \family sans
15531 Author
15532 \begin_inset space ~
15533 \end_inset
15534
15535 URL
15536 \family default
15537 , and 
15538 \family sans
15539 Thanks
15540 \family default
15541  layouts must be placed 
15542 \emph on
15543 in between
15544 \emph default
15545  the 
15546 \family sans
15547 Author
15548 \family default
15549  layout and the corresponding 
15550 \family sans
15551 Address
15552 \family default
15553  (or equivalent 
15554 \family sans
15555 Affiliation
15556 \family default
15557 ) layout.
15558  If you put the 
15559 \family sans
15560 Thanks
15561 \family default
15562  after the 
15563 \family sans
15564 Address
15565 \family default
15566 , the LaTeX won't compile.
15567 \end_layout
15568
15569 \begin_layout Subsection
15570 Drawbacks
15571 \end_layout
15572
15573 \begin_layout Standard
15574 The main problem with this layout is that you can't use the optional arguments
15575  to layouts like Email and Title.
15576  (The problem is not unique to this layout; you can't use optional arguments
15577  to the Section layouts either.) This means that after you export that file
15578  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15579  need to edit the LaTeX file with a text editor to add the optional arguments
15580  to set, e.
15581 \begin_inset space \thinspace{}
15582 \end_inset
15583
15584 g.
15585 \begin_inset space \space{}
15586 \end_inset
15587
15588 the running title for the page headers.
15589  Lacking these layouts makes the 
15590 \family typewriter
15591
15592 \backslash
15593 altaffiliation
15594 \family default
15595  (and the equivalent 
15596 \family typewriter
15597
15598 \backslash
15599 altaddress
15600 \family default
15601 ) useless, so the corresponding layouts don't exist, and will have to be
15602  added by hand.
15603 \begin_inset Foot
15604 status collapsed
15605
15606 \begin_layout Plain Layout
15607
15608 \emph on
15609 Note from JMarc:
15610 \emph default
15611  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15612  has not been updated yet to take advantage of it.
15613 \end_layout
15614
15615 \end_inset
15616
15617  
15618 \end_layout
15619
15620 \begin_layout Section
15621 Springer Journals (
15622 \family sans
15623 svjour
15624 \family default
15625 )
15626 \end_layout
15627
15628 \begin_layout Standard
15629 by 
15630 \noun on
15631 Martin Vermeer
15632 \end_layout
15633
15634 \begin_layout Subsection
15635 Description
15636 \end_layout
15637
15638 \begin_layout Standard
15639 These are the layout files for some of the journal formats used by Springer
15640  Verlag and listed on 
15641 \begin_inset Flex URL
15642 status collapsed
15643
15644 \begin_layout Plain Layout
15645
15646 http://www.springer.de/author/tex/help-journals.html
15647 \end_layout
15648
15649 \end_inset
15650
15651 , where you should also go to fetch the class files (yes, these are LaTeX2e
15652  now!).
15653  It is a modular system: the things common to all journals are implemented
15654  in 
15655 \family typewriter
15656 svjour.inc
15657 \family default
15658 , which journal-specific layout files (such as, e.
15659 \begin_inset space \thinspace{}
15660 \end_inset
15661
15662 g.
15663 \begin_inset space \space{}
15664 \end_inset
15665
15666
15667 \family typewriter
15668 svjog.layout
15669 \family default
15670  for Journal of Geodesy) can include.
15671 \end_layout
15672
15673 \begin_layout Standard
15674 This means that implementing support for any other Springer journal on this
15675  list is as simple as writing your own 
15676 \family typewriter
15677 sv
15678 \family default
15679 <myjournal>
15680 \family typewriter
15681 .layout
15682 \family default
15683  file following the outline given in 
15684 \family typewriter
15685 svjog.layout
15686 \family default
15687 .
15688  
15689 \end_layout
15690
15691 \begin_layout Standard
15692 It is reasonably well tested only for the Journal of Geodesy.
15693  
15694 \family typewriter
15695 svjour
15696 \family default
15697  and 
15698 \family typewriter
15699 svjog
15700 \family default
15701  come with the standard LyX distribution.
15702  Install the relevant class file (downloaded from Springer) in a proper
15703  directory, reconfigure LaTeX (in the teTeX case by running 
15704 \family typewriter
15705 texhash
15706 \family default
15707 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15708  and it should work.
15709 \end_layout
15710
15711 \begin_layout Subsection
15712 New styles
15713 \end_layout
15714
15715 \begin_layout Standard
15716 A large number of theorem-like styles — 
15717 \family sans
15718 Claim, Conjecture,
15719 \family default
15720  
15721 \family sans
15722 \SpecialChar \ldots{}
15723 Theorem
15724 \family default
15725 .
15726 \end_layout
15727
15728 \begin_layout Standard
15729
15730 \family sans
15731 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15732  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15733 \family default
15734 .
15735  See the Springer class file documentation for details.
15736 \end_layout
15737
15738 \begin_layout Subsection
15739 Supported journals
15740 \end_layout
15741
15742 \begin_layout Itemize
15743
15744 \emph on
15745 Journal of Geodesy
15746 \emph default
15747
15748 \family typewriter
15749 svjog.layout
15750 \family default
15751  — Martin Vermeer
15752 \end_layout
15753
15754 \begin_layout Itemize
15755
15756 \emph on
15757 Probability Theory and Related Fields
15758 \emph default
15759
15760 \family typewriter
15761 svprobth.layout
15762 \family default
15763  — Jean-Marc Lasgouttes
15764 \end_layout
15765
15766 \begin_layout Standard
15767 Add your own, it isn't so hard!
15768 \end_layout
15769
15770 \begin_layout Subsection
15771 Credits
15772 \end_layout
15773
15774 \begin_layout Standard
15775 These files are partly based on the older 
15776 \family typewriter
15777 ejour2.layout
15778 \family default
15779 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15780  file from Springer.
15781  All this, and the 
15782 \family typewriter
15783 ejour2
15784 \family default
15785  layout, are now defunct.
15786  Jean-Marc Lasgouttes helped out big in making me find my way around the
15787  LyX layout file mechanism.
15788 \end_layout
15789
15790 \begin_layout Subsection
15791 Bugs
15792 \end_layout
15793
15794 \begin_layout Standard
15795 Probably.
15796  But probably less than in the old hacked-LaTeX 
15797 \family typewriter
15798 ejour2
15799 \family default
15800 .
15801 \end_layout
15802
15803 \begin_layout Standard
15804 Limitations e.
15805 \begin_inset space \thinspace{}
15806 \end_inset
15807
15808 g.: does not display the number for theorem-like layouts, just #.
15809 \end_layout
15810
15811 \begin_layout Section
15812 Slides [aka 
15813 \noun on
15814 SliTeX
15815 \noun default
15816 ]
15817 \begin_inset CommandInset label
15818 LatexCommand label
15819 name "sec:slitex"
15820
15821 \end_inset
15822
15823
15824 \end_layout
15825
15826 \begin_layout Standard
15827 by 
15828 \noun on
15829 John Weiss
15830 \noun default
15831  
15832 \end_layout
15833
15834 \begin_layout Subsection
15835 Introduction
15836 \end_layout
15837
15838 \begin_layout Standard
15839 This section describes how to use LyX to make slides for overhead projectors.
15840  There are two document classes that can do this: the default slides class
15841  and the 
15842 \family sans
15843 FoilTeX
15844 \family default
15845  slides class.
15846  This section documents the former.
15847 \end_layout
15848
15849 \begin_layout Standard
15850 I'm going to say this again, nice and clear, so that there's no misunderstanding
15851 :
15852 \end_layout
15853
15854 \begin_layout Standard
15855 \begin_inset VSpace bigskip
15856 \end_inset
15857
15858
15859 \end_layout
15860
15861 \begin_layout Standard
15862 \align center
15863
15864 \size large
15865 This section documents the class 
15866 \begin_inset Quotes eld
15867 \end_inset
15868
15869
15870 \family sans
15871 slides (default)
15872 \family default
15873
15874 \begin_inset Quotes erd
15875 \end_inset
15876
15877  
15878 \emph on
15879 only.
15880 \end_layout
15881
15882 \begin_layout Standard
15883 \begin_inset VSpace bigskip
15884 \end_inset
15885
15886
15887 \end_layout
15888
15889 \begin_layout Standard
15890 If you're looking for the documentation for 
15891 \begin_inset Quotes eld
15892 \end_inset
15893
15894
15895 \family sans
15896 slides (FoilTeX)
15897 \family default
15898
15899 \begin_inset Quotes erd
15900 \end_inset
15901
15902 , check out section
15903 \begin_inset space ~
15904 \end_inset
15905
15906
15907 \begin_inset CommandInset ref
15908 LatexCommand ref
15909 reference "sec:foiltex"
15910
15911 \end_inset
15912
15913 .
15914  The 
15915 \family sans
15916 foils
15917 \family default
15918  class [
15919 \begin_inset Quotes eld
15920 \end_inset
15921
15922
15923 \family sans
15924 slides (FoilTeX)
15925 \family default
15926
15927 \begin_inset Quotes erd
15928 \end_inset
15929
15930 ] is actually somewhat better than the default 
15931 \family sans
15932 slides
15933 \family default
15934  class,
15935 \begin_inset Foot
15936 status collapsed
15937
15938 \begin_layout Plain Layout
15939 \SpecialChar \ldots{}
15940 or so I've been told repeatedly by its advocates.
15941  Having never used it, I have no idea if this claim is true or not.
15942 \end_layout
15943
15944 \end_inset
15945
15946  which this section documents.
15947 \end_layout
15948
15949 \begin_layout Standard
15950 This class is the LaTeX2e improvement of the old 
15951 \noun on
15952 SliTeX
15953 \noun default
15954  package.
15955  Every LaTeX2e distribution includes this class [which I'll just refer to
15956  as 
15957 \begin_inset Quotes eld
15958 \end_inset
15959
15960
15961 \family sans
15962 slides
15963 \family default
15964
15965 \begin_inset Quotes erd
15966 \end_inset
15967
15968  from now on], so you're bound to have it.
15969  As I noted earlier, there are other classes, such as 
15970 \family sans
15971 foils
15972 \family default
15973 , which also produce slides for overhead projectors and do a better job
15974  at it.
15975  However, there are some things which 
15976 \family sans
15977 slides
15978 \family default
15979  can do which the others can't, such as generate overlays.
15980  Read on to learn more!
15981 \end_layout
15982
15983 \begin_layout Subsection
15984 Getting Started
15985 \begin_inset CommandInset label
15986 LatexCommand label
15987 name "sec:slidesetup"
15988
15989 \end_inset
15990
15991
15992 \end_layout
15993
15994 \begin_layout Standard
15995 Obviously, to use this document class, you need to select 
15996 \begin_inset Quotes eld
15997 \end_inset
15998
15999
16000 \family sans
16001 slides (default)
16002 \family default
16003
16004 \begin_inset Quotes erd
16005 \end_inset
16006
16007  from the class list in the 
16008 \family sans
16009 Document\SpecialChar \menuseparator
16010 Settings
16011 \family default
16012  dialog.
16013  There are some other special things you should know about this class:
16014 \end_layout
16015
16016 \begin_layout Itemize
16017 Don't bother changing the options 
16018 \family sans
16019 Sides and Columns
16020 \family default
16021 .
16022  They're not supported by the 
16023 \family sans
16024 slides
16025 \family default
16026  class, anyways.
16027 \end_layout
16028
16029 \begin_layout Itemize
16030 The option 
16031 \family sans
16032 Page
16033 \begin_inset space ~
16034 \end_inset
16035
16036 style
16037 \family default
16038  behaves a bit differently for this class.
16039  The possible choices and what they do are as follows:
16040 \end_layout
16041
16042 \begin_deeper
16043 \begin_layout Description
16044
16045 \family sans
16046 plain
16047 \family default
16048  The final output contains page numbers in the lower right corner.
16049 \end_layout
16050
16051 \begin_layout Description
16052
16053 \family sans
16054 headings
16055 \family default
16056  Like 
16057 \family sans
16058 plain
16059 \family default
16060 , but also prints out any time markers you've put in.
16061  This is the default.
16062 \end_layout
16063
16064 \begin_layout Description
16065
16066 \family sans
16067 empty
16068 \family default
16069  The final output contains no page numbers, time markers, or alignment markers.
16070 \end_layout
16071
16072 \end_deeper
16073 \begin_layout Itemize
16074 The 
16075 \family sans
16076 slides
16077 \family default
16078  class has an extra option: 
16079 \family typewriter
16080 clock
16081 \family default
16082 .
16083  To use it, put 
16084 \begin_inset Quotes eld
16085 \end_inset
16086
16087
16088 \family typewriter
16089 clock
16090 \family default
16091
16092 \begin_inset Quotes erd
16093 \end_inset
16094
16095  in the extra class options.
16096 \end_layout
16097
16098 \begin_deeper
16099 \begin_layout Standard
16100 Using this options allows you to add time markers to 
16101 \family sans
16102 Note
16103 \family default
16104 s.
16105  See section
16106 \begin_inset space ~
16107 \end_inset
16108
16109
16110 \begin_inset CommandInset ref
16111 LatexCommand ref
16112 reference "sec:slideNote"
16113
16114 \end_inset
16115
16116  for more details.
16117 \end_layout
16118
16119 \end_deeper
16120 \begin_layout Standard
16121 You can also use the template file 
16122 \begin_inset Quotes eld
16123 \end_inset
16124
16125
16126 \family typewriter
16127 slides.lyx
16128 \family default
16129
16130 \begin_inset Quotes erd
16131 \end_inset
16132
16133  to automatically set up a document to use the 
16134 \family sans
16135 slides
16136 \family default
16137  class [using 
16138 \family sans
16139 File\SpecialChar \menuseparator
16140 New
16141 \begin_inset space ~
16142 \end_inset
16143
16144 from
16145 \begin_inset space ~
16146 \end_inset
16147
16148 Template
16149 \family default
16150  to open your new document].
16151  The template file also contains some examples of the special paragraph
16152  environments used by this class.
16153  I'll describe those next.
16154 \end_layout
16155
16156 \begin_layout Subsection
16157 Paragraph Environments
16158 \end_layout
16159
16160 \begin_layout Subsubsection
16161 Supported Environments
16162 \end_layout
16163
16164 \begin_layout Standard
16165 The first thing you'll notice when you start up a new 
16166 \family sans
16167 slides
16168 \family default
16169  document is the font size and type: it's the equivalent of the size 
16170 \begin_inset Quotes eld
16171 \end_inset
16172
16173
16174 \family sans
16175 Largest
16176 \family default
16177
16178 \begin_inset Quotes erd
16179 \end_inset
16180
16181  in the 
16182 \family sans
16183 Sans
16184 \begin_inset space ~
16185 \end_inset
16186
16187 Serif
16188 \family default
16189  font.
16190  This is also what's used in the output.
16191  Think of this as a 
16192 \begin_inset Quotes eld
16193 \end_inset
16194
16195 visual cue
16196 \begin_inset Quotes erd
16197 \end_inset
16198
16199  to remind you that this is a slide.
16200  Your final slides will use a larger font; ergo, you'll have less space.
16201  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16202 \end_layout
16203
16204 \begin_layout Standard
16205 The next thing that becomes obvious is the changes to the paragraph environment
16206  pull-down box [at the far-left end of the toolbar].
16207  Most of the paragraph environments you're used to seeing are missing.
16208  There are also five new ones.
16209  That's because the 
16210 \family sans
16211 slides
16212 \family default
16213  class itself only supports certain paragraph environments:
16214 \end_layout
16215
16216 \begin_layout Itemize
16217
16218 \family sans
16219 Standard
16220 \end_layout
16221
16222 \begin_layout Itemize
16223
16224 \family sans
16225 Itemize
16226 \end_layout
16227
16228 \begin_layout Itemize
16229
16230 \family sans
16231 Enumerate
16232 \end_layout
16233
16234 \begin_layout Itemize
16235
16236 \family sans
16237 Description
16238 \end_layout
16239
16240 \begin_layout Itemize
16241
16242 \family sans
16243 List
16244 \end_layout
16245
16246 \begin_layout Itemize
16247
16248 \family sans
16249 Quotation
16250 \end_layout
16251
16252 \begin_layout Itemize
16253
16254 \family sans
16255 Quote
16256 \end_layout
16257
16258 \begin_layout Itemize
16259
16260 \family sans
16261 Verse
16262 \end_layout
16263
16264 \begin_layout Itemize
16265
16266 \family sans
16267 Caption
16268 \end_layout
16269
16270 \begin_layout Itemize
16271
16272 \family sans
16273 LyX-Code
16274 \end_layout
16275
16276 \begin_layout Itemize
16277
16278 \family sans
16279 Comment
16280 \end_layout
16281
16282 \begin_layout Standard
16283 All of the other standard environments, including the section-heading environmen
16284 ts, aren't used in the 
16285 \family sans
16286 slides
16287 \family default
16288  class.
16289 \end_layout
16290
16291 \begin_layout Standard
16292 On the other hand, you'll notice the following new environments:
16293 \end_layout
16294
16295 \begin_layout Itemize
16296
16297 \family sans
16298 Slide
16299 \end_layout
16300
16301 \begin_layout Itemize
16302
16303 \family sans
16304 Overlay
16305 \end_layout
16306
16307 \begin_layout Itemize
16308
16309 \family sans
16310 Note
16311 \end_layout
16312
16313 \begin_layout Itemize
16314
16315 \family sans
16316 InvisibleText
16317 \end_layout
16318
16319 \begin_layout Itemize
16320
16321 \family sans
16322 VisibleText
16323 \end_layout
16324
16325 \begin_layout Standard
16326 These five are kind of quirky, due to a 
16327 \begin_inset Quotes eld
16328 \end_inset
16329
16330 feature
16331 \begin_inset Quotes erd
16332 \end_inset
16333
16334  in LyX.
16335  You see, LyX doesn't permit you to nest any other paragraph environment
16336  into an empty environment.
16337  Now, that's fine and dandy, but it means that you wouldn't be able to start
16338  a slide with anything except plain text.
16339  To deal with this, I've performed a little 
16340 \begin_inset Quotes eld
16341 \end_inset
16342
16343 LaTeX magic.
16344 \begin_inset Quotes erd
16345 \end_inset
16346
16347  
16348 \end_layout
16349
16350 \begin_layout Subsubsection
16351 Quirks of the New Environments
16352 \begin_inset CommandInset label
16353 LatexCommand label
16354 name "sec:slideQuirk"
16355
16356 \end_inset
16357
16358
16359 \end_layout
16360
16361 \begin_layout Standard
16362 All five of the new paragraph environments are somewhat quirky due to inherent
16363  limitiations in the current version of LyX.
16364  As I just mentioned, LyX forbids environments that begin with another environme
16365 nt.
16366  To get around this, the 
16367 \family sans
16368 Slide
16369 \family default
16370  environment isn't a paragraph environment as described in the 
16371 \emph on
16372 User's Guide
16373 \emph default
16374 .
16375  
16376 \end_layout
16377
16378 \begin_layout Standard
16379 You should consider 
16380 \family sans
16381 Slide
16382 \family default
16383
16384 \family sans
16385 Overlay
16386 \family default
16387 , and 
16388 \family sans
16389 Note
16390 \family default
16391  to be 
16392 \begin_inset Quotes eld
16393 \end_inset
16394
16395 pseudo-environments.
16396 \begin_inset Quotes erd
16397 \end_inset
16398
16399  They look like a section heading or a 
16400 \begin_inset Quotes eld
16401 \end_inset
16402
16403
16404 \family sans
16405 Caption
16406 \family default
16407 ,
16408 \begin_inset Quotes erd
16409 \end_inset
16410
16411  but really begin a [and, if necessary, end the previous] paragraph environment.
16412  Likewise, treat 
16413 \family sans
16414 InvisibleText
16415 \family default
16416  and 
16417 \family sans
16418 VisibleText
16419 \family default
16420  as 
16421 \begin_inset Quotes eld
16422 \end_inset
16423
16424 pseudo-commands.
16425 \begin_inset Quotes erd
16426 \end_inset
16427
16428  These two perform some action.
16429 \end_layout
16430
16431 \begin_layout Standard
16432 A common feature of all five environments, 
16433 \family sans
16434 Slide
16435 \family default
16436
16437 \family sans
16438 Overlay
16439 \family default
16440
16441 \family sans
16442 Note
16443 \family default
16444
16445 \family sans
16446 InvisibleText
16447 \family default
16448  and 
16449 \family sans
16450 VisibleText
16451 \family default
16452 , is a rather long-ish label.
16453  The text following this label — ordinarily the contents of the paragraph
16454  environment — is utterly irrelevant for 
16455 \family sans
16456 Slide
16457 \family default
16458
16459 \family sans
16460 Overlay
16461 \family default
16462
16463 \family sans
16464 Note
16465 \family default
16466
16467 \family sans
16468 InvisibleText
16469 \family default
16470  and 
16471 \family sans
16472 VisibleText
16473 \family default
16474 .
16475  LyX completely ignores it.
16476  In fact, you can leave these five environments completely empty.
16477  
16478 \end_layout
16479
16480 \begin_layout Standard
16481 While you don't 
16482 \emph on
16483 have
16484 \emph default
16485  to put any text after the rather long-ish label, you might want to.
16486  This could be a short description of the contents of the 
16487 \family sans
16488 Slide
16489 \family default
16490 , for example.
16491  In that case, enter your descriptive comment and hit 
16492 \family sans
16493 Return
16494 \family default
16495  as you normally would.
16496 \end_layout
16497
16498 \begin_layout Standard
16499 If, on the other hand, you don't want to enter any descriptive text, you'll
16500  hit another LyX quirk.
16501  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16502  environment until you put something in the old one.
16503  So, do this:
16504 \end_layout
16505
16506 \begin_layout Itemize
16507 Start entering the text that will 
16508 \emph on
16509 follow
16510 \emph default
16511  the new 
16512 \family sans
16513 Slide
16514 \family default
16515
16516 \family sans
16517 Overlay
16518 \family default
16519
16520 \family sans
16521 Note
16522 \family default
16523
16524 \family sans
16525 InvisibleText
16526 \family default
16527  or 
16528 \family sans
16529 VisibleText
16530 \family default
16531 .
16532  
16533 \end_layout
16534
16535 \begin_layout Itemize
16536 Now move to the beginning of that paragraph.
16537  
16538 \end_layout
16539
16540 \begin_layout Itemize
16541 Next, hit 
16542 \family sans
16543 Return
16544 \family default
16545 .
16546  
16547 \end_layout
16548
16549 \begin_layout Itemize
16550 Finally, change this new, empty paragraph to a 
16551 \family sans
16552 Slide
16553 \family default
16554
16555 \family sans
16556 Overlay
16557 \family default
16558
16559 \family sans
16560 Note
16561 \family default
16562
16563 \family sans
16564 InvisibleText
16565 \family default
16566  or 
16567 \family sans
16568 VisibleText
16569 \family default
16570 .
16571  
16572 \end_layout
16573
16574 \begin_layout Standard
16575 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16576
16577 \end_layout
16578
16579 \begin_layout Subsection
16580 Making a Presentation with 
16581 \family sans
16582 Slide
16583 \family default
16584
16585 \family sans
16586 Overlay
16587 \family default
16588  and 
16589 \family sans
16590 Note
16591 \end_layout
16592
16593 \begin_layout Subsubsection
16594 Using the 
16595 \family sans
16596 Slide
16597 \family default
16598  Environment
16599 \end_layout
16600
16601 \begin_layout Standard
16602 If you're expecting this section to teach you how to actually make a presentatio
16603 n, you'll be sorely disappointed.
16604  Naturally, I'll describe all of the ways the 
16605 \family sans
16606 slides
16607 \family default
16608  class can assist you in preparing the materials for a presentation.
16609  Filling in the contents, however, is up to you.
16610  [Then again, that 
16611 \emph on
16612 is
16613 \emph default
16614  the LyX philosophy.]
16615 \end_layout
16616
16617 \begin_layout Standard
16618 Choosing the 
16619 \family sans
16620 Slide
16621 \family default
16622  environment [in the manner described in section
16623 \begin_inset space ~
16624 \end_inset
16625
16626
16627 \begin_inset CommandInset ref
16628 LatexCommand ref
16629 reference "sec:slideQuirk"
16630
16631 \end_inset
16632
16633 ] tells LyX to begin a new slide [duh].
16634  The label for this environment/
16635 \begin_inset Quotes erd
16636 \end_inset
16637
16638 pseudo-command
16639 \begin_inset Quotes erd
16640 \end_inset
16641
16642  is an 
16643 \begin_inset Quotes eld
16644 \end_inset
16645
16646 ASCII line,
16647 \begin_inset Quotes erd
16648 \end_inset
16649
16650  in cool blue, followed by the label, 
16651 \begin_inset Quotes eld
16652 \end_inset
16653
16654 NewSlide:
16655 \begin_inset Quotes erd
16656 \end_inset
16657
16658 .
16659  Any text or paragraph environments that follow this one go on the new slide.
16660  It's that simple.
16661 \end_layout
16662
16663 \begin_layout Standard
16664 Slides are probably the only time you'll need to forcibly end pages in LyX
16665  (this can be specified in the 
16666 \family sans
16667 Paragraph Layout
16668 \family default
16669  dialog).
16670  In fact, you'll want to, once you finish entering the contents of one slide.
16671  If you've entered more text than can physically fit on a slide, the extra
16672  overflows onto a new slide.
16673  I don't recommend doing this, however, since the overflow slide won't have
16674  any page number on it.
16675  Furthermore, it may interfere with any 
16676 \family sans
16677 Overlay
16678 \family default
16679  you've made to accompany the oversized 
16680 \family sans
16681 Slide
16682 \family default
16683 .
16684 \end_layout
16685
16686 \begin_layout Standard
16687 The 
16688 \family sans
16689 Overlay
16690 \family default
16691  and 
16692 \family sans
16693 Note
16694 \family default
16695  environments work the same way as the 
16696 \family sans
16697 Slide
16698 \family default
16699  environment.
16700  They both create an 
16701 \begin_inset Quotes eld
16702 \end_inset
16703
16704 ASCII line
16705 \begin_inset Quotes erd
16706 \end_inset
16707
16708  followed by a label [
16709 \begin_inset Quotes eld
16710 \end_inset
16711
16712 NewOverlay:
16713 \begin_inset Quotes erd
16714 \end_inset
16715
16716  and 
16717 \begin_inset Quotes eld
16718 \end_inset
16719
16720 NewNote:
16721 \begin_inset Quotes erd
16722 \end_inset
16723
16724 , respectively].
16725  The color is a stunning magenta instead of blue, and the 
16726 \begin_inset Quotes eld
16727 \end_inset
16728
16729 ASCII line
16730 \begin_inset Quotes erd
16731 \end_inset
16732
16733  will look different, in style and in length.
16734  The label fonts of all three also differ from one another.
16735 \end_layout
16736
16737 \begin_layout Standard
16738 As with a 
16739 \family sans
16740 Slide
16741 \family default
16742 , if the contents of a 
16743 \family sans
16744 Note
16745 \family default
16746  or 
16747 \family sans
16748 Overlay
16749 \family default
16750  exceed the physical size of a slide or sheet of paper, the extra will overflow
16751  onto a new sheet.
16752  Again, you should avoid this.
16753  It defeats the whole purpose of 
16754 \family sans
16755 Note
16756 \family default
16757 s and 
16758 \family sans
16759 Overlay
16760 \family default
16761 s.
16762 \end_layout
16763
16764 \begin_layout Subsubsection
16765 Using 
16766 \family sans
16767 Overlay
16768 \family default
16769  with 
16770 \family sans
16771 Slide
16772 \end_layout
16773
16774 \begin_layout Standard
16775 The idea behind an 
16776 \family sans
16777 Overlay
16778 \family default
16779  is a slide that sits atop another slide.
16780  Perhaps you wish to discuss a figure on the main 
16781 \family sans
16782 Slide
16783 \family default
16784  before displaying the text associated with it.
16785  One way to accomplish this is tape a flap of dark paper over the part of
16786  the 
16787 \family sans
16788 Slide
16789 \family default
16790  you want to display later.
16791  This method fails, however, if you wish to overlap one graph with another,
16792  for example.
16793  You would then have to fumble while speaking to align the two separate,
16794  overlapping 
16795 \family sans
16796 Slide
16797 \family default
16798 s to align the two graphs.
16799  The use of an 
16800 \family sans
16801 Overlay
16802 \family default
16803  environment in both cases makes life much easier.
16804 \end_layout
16805
16806 \begin_layout Standard
16807 Each 
16808 \family sans
16809 Overlay
16810 \family default
16811  receives the page number of its 
16812 \begin_inset Quotes eld
16813 \end_inset
16814
16815 parent
16816 \begin_inset Quotes erd
16817 \end_inset
16818
16819  
16820 \family sans
16821 Slide
16822 \family default
16823 , appended by 
16824 \begin_inset Quotes eld
16825 \end_inset
16826
16827
16828 \family typewriter
16829 -a
16830 \family default
16831
16832 \begin_inset Quotes erd
16833 \end_inset
16834
16835 .
16836 \begin_inset Foot
16837 status collapsed
16838
16839 \begin_layout Plain Layout
16840 Presumably, mutliple 
16841 \family sans
16842 Overlay
16843 \family default
16844 s would have 
16845 \begin_inset Quotes eld
16846 \end_inset
16847
16848
16849 \family typewriter
16850 -a
16851 \family default
16852
16853 \begin_inset Quotes erd
16854 \end_inset
16855
16856
16857 \begin_inset Quotes eld
16858 \end_inset
16859
16860
16861 \family typewriter
16862 -b
16863 \family default
16864
16865 \begin_inset Quotes erd
16866 \end_inset
16867
16868
16869 \begin_inset Quotes eld
16870 \end_inset
16871
16872
16873 \family typewriter
16874 -c
16875 \family default
16876
16877 \begin_inset Quotes erd
16878 \end_inset
16879
16880 , etc.
16881 \begin_inset space ~
16882 \end_inset
16883
16884 appended to the page number of the parent 
16885 \family sans
16886 Slide
16887 \family default
16888 .
16889  
16890 \end_layout
16891
16892 \end_inset
16893
16894  Clearly, you want the contents of both the 
16895 \family sans
16896 Slide
16897 \family default
16898  and the 
16899 \family sans
16900 Overlay
16901 \family default
16902  to each fit on a single physical slide! You should probably consider an
16903  
16904 \family sans
16905 Overlay
16906 \family default
16907  as 
16908 \begin_inset Quotes eld
16909 \end_inset
16910
16911 part of
16912 \begin_inset Quotes erd
16913 \end_inset
16914
16915  a 
16916 \family sans
16917 Slide
16918 \family default
16919 .
16920  Indeed, the LyX 
16921 \family sans
16922 slides
16923 \family default
16924  class provides a visual cue for this: the label at the start of an 
16925 \family sans
16926 Overlay
16927 \family default
16928  is shorter than that at the start of a 
16929 \family sans
16930 Slide
16931 \family default
16932 .
16933  Lastly, when you generate printable output, you'll find alignment markers
16934  in all four corners of both the 
16935 \family sans
16936 Overlay
16937 \family default
16938  page and its parent 
16939 \family sans
16940 Slide
16941 \family default
16942 .
16943  These will assist you in lining up the two physical slides.
16944 \end_layout
16945
16946 \begin_layout Standard
16947 The major problem in overlaying two slides is aligning the contents of the
16948  two transparencies.
16949  How much space should you leave for that graph on the second slide? Worse
16950  still, what if you want a graph and a sentence on second slide, but there
16951  is text on the main transparency that goes in between them? You could try
16952  and insert vertical space of the right size.
16953  The better way is to use 
16954 \family sans
16955 InvisibleText
16956 \family default
16957  and 
16958 \family sans
16959 VisibleText
16960 \family default
16961 .
16962 \end_layout
16963
16964 \begin_layout Standard
16965 As their names imply, 
16966 \family sans
16967 InvisibleText
16968 \family default
16969  and 
16970 \family sans
16971 VisibleText
16972 \family default
16973  are two command-like paragraph environments that make all subsequent text
16974  invisible and visible, respectively.
16975  Note from section
16976 \begin_inset space ~
16977 \end_inset
16978
16979
16980 \begin_inset CommandInset ref
16981 LatexCommand ref
16982 reference "sec:slideQuirk"
16983
16984 \end_inset
16985
16986  that you don't place anything 
16987 \emph on
16988 into
16989 \emph default
16990  these two environments, however.
16991  When you create an 
16992 \family sans
16993 InvisibleText
16994 \family default
16995 , it inserts a centered, sky-blue label into the page reading 
16996 \begin_inset Quotes eld
16997 \end_inset
16998
16999 <Invisible Text Follows>
17000 \begin_inset Quotes erd
17001 \end_inset
17002
17003 .
17004  For paragraphs following this label, the parts of the 
17005 \family sans
17006 Slide
17007 \family default
17008  [or 
17009 \family sans
17010 Overlay
17011 \family default
17012 ; it doesn't matter which] where they would be contain instead blank space.
17013  
17014 \end_layout
17015
17016 \begin_layout Standard
17017 For 
17018 \family sans
17019 VisibleText
17020 \family default
17021 , the corresponding centered label is 
17022 \begin_inset Quotes eld
17023 \end_inset
17024
17025 <Visible Text Follows>
17026 \begin_inset Quotes erd
17027 \end_inset
17028
17029  in blazing green.
17030  Paragraphs following this label behave normally.
17031  Note that the beginning of a new 
17032 \family sans
17033 Slide
17034 \family default
17035
17036 \family sans
17037 Overlay
17038 \family default
17039 , or 
17040 \family sans
17041 Note
17042 \family default
17043  automatically shuts off an 
17044 \family sans
17045 InvisibleText
17046 \family default
17047 .
17048  It's therefore not necessary to use 
17049 \family sans
17050 VisibleText
17051 \family default
17052  at the end of a 
17053 \family sans
17054 Slide
17055 \family default
17056 .
17057 \end_layout
17058
17059 \begin_layout Standard
17060 By now, it should be obvious how to create overlay transparencies using
17061  the proper combination of 
17062 \family sans
17063 InvisibleText
17064 \family default
17065  and 
17066 \family sans
17067 VisibleText
17068 \family default
17069  on a 
17070 \family sans
17071 Slide
17072 \family default
17073  and 
17074 \family sans
17075 Overlay
17076 \family default
17077 :
17078 \end_layout
17079
17080 \begin_layout Enumerate
17081 Create a 
17082 \family sans
17083 Slide
17084 \family default
17085 , including everything that will appear on it, whether on the main slide
17086  or on the 
17087 \family sans
17088 Overlay
17089 \family default
17090 .
17091 \end_layout
17092
17093 \begin_layout Enumerate
17094 Before each figure or paragraph that will appear only on the 
17095 \family sans
17096 Overlay
17097 \family default
17098 , insert an 
17099 \family sans
17100 InvisibleText
17101 \family default
17102  environment.
17103  If necessary, insert a 
17104 \family sans
17105 VisibleText
17106 \family default
17107  environment after the 
17108 \family sans
17109 Overlay
17110 \family default
17111 -only text.
17112 \end_layout
17113
17114 \begin_layout Enumerate
17115 Start an 
17116 \family sans
17117 Overlay
17118 \family default
17119  immediately following the 
17120 \family sans
17121 Slide
17122 \family default
17123 .
17124 \end_layout
17125
17126 \begin_layout Enumerate
17127 Copy the contents of this 
17128 \family sans
17129 Slide
17130 \family default
17131  into the 
17132 \family sans
17133 Overlay
17134 \family default
17135 .
17136 \end_layout
17137
17138 \begin_layout Enumerate
17139 Within the 
17140 \family sans
17141 Overlay
17142 \family default
17143 , change all of the 
17144 \family sans
17145 InvisibleText
17146 \family default
17147  lines to 
17148 \family sans
17149 VisibleText
17150 \family default
17151  and vice-versa.
17152 \end_layout
17153
17154 \begin_layout Standard
17155 That's it.
17156  You've just made an 
17157 \family sans
17158 Overlay
17159 \family default
17160 .
17161 \end_layout
17162
17163 \begin_layout Standard
17164 There's one problem with the way I've designed the LyX 
17165 \family sans
17166 slides
17167 \family default
17168  class: you can't make text in the middle of a paragraph invisible, nor
17169  make text in the middle of an invisible paragraph visible again.
17170  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17171 \begin_inset Foot
17172 status collapsed
17173
17174 \begin_layout Plain Layout
17175 The commands of interest are: 
17176 \end_layout
17177
17178 \begin_layout Itemize
17179
17180 \family typewriter
17181 {
17182 \backslash
17183 invisible \SpecialChar \ldots{}
17184  }
17185 \end_layout
17186
17187 \begin_layout Itemize
17188
17189 \family typewriter
17190 {
17191 \backslash
17192 visible \SpecialChar \ldots{}
17193  }
17194 \end_layout
17195
17196 \begin_layout Plain Layout
17197 \SpecialChar \ldots{}
17198 and need to be marked as TeX.
17199  The text whose 
17200 \begin_inset Quotes eld
17201 \end_inset
17202
17203 visibility
17204 \begin_inset Quotes erd
17205 \end_inset
17206
17207  you wish to change goes in between the brackets [and after the 
17208 \family typewriter
17209
17210 \backslash
17211 invisible
17212 \family default
17213  or 
17214 \family typewriter
17215
17216 \backslash
17217 visible
17218 \family default
17219  command].
17220  If you don't know how to mark text as TeX, see the appropriate section
17221  of the 
17222 \emph on
17223 User's Guide
17224 \emph default
17225 .
17226 \end_layout
17227
17228 \end_inset
17229
17230
17231 \end_layout
17232
17233 \begin_layout Subsubsection
17234 Using 
17235 \family sans
17236 Note
17237 \family default
17238  with 
17239 \family sans
17240 Slide
17241 \family default
17242
17243 \begin_inset CommandInset label
17244 LatexCommand label
17245 name "sec:slideNote"
17246
17247 \end_inset
17248
17249
17250 \end_layout
17251
17252 \begin_layout Standard
17253 Like an 
17254 \family sans
17255 Overlay
17256 \family default
17257 , a 
17258 \family sans
17259 Note
17260 \family default
17261  is associated with a 
17262 \begin_inset Quotes eld
17263 \end_inset
17264
17265 parent
17266 \begin_inset Quotes erd
17267 \end_inset
17268
17269  
17270 \family sans
17271 Slide
17272 \family default
17273 .
17274  Here, too, the LyX 
17275 \family sans
17276 slides
17277 \family default
17278  class provides visual cues.
17279  The label for a 
17280 \family sans
17281 Note
17282 \family default
17283  is shorter than that of a 
17284 \family sans
17285 Slide
17286 \family default
17287  [yet longer than that of an 
17288 \family sans
17289 Overlay
17290 \family default
17291 ] and, like the label of an 
17292 \family sans
17293 Overlay
17294 \family default
17295  is shockingly magenta.
17296  Additionally, the printed 
17297 \family sans
17298 Note
17299 \family default
17300  has the page number of its 
17301 \begin_inset Quotes eld
17302 \end_inset
17303
17304 parent
17305 \begin_inset Quotes erd
17306 \end_inset
17307
17308  
17309 \family sans
17310 Slide
17311 \family default
17312 , appended by 
17313 \begin_inset Quotes eld
17314 \end_inset
17315
17316
17317 \family typewriter
17318 -
17319 \family default
17320 1
17321 \begin_inset Quotes erd
17322 \end_inset
17323
17324
17325 \begin_inset Quotes eld
17326 \end_inset
17327
17328
17329 \family typewriter
17330 -
17331 \family default
17332 2
17333 \begin_inset Quotes erd
17334 \end_inset
17335
17336
17337 \begin_inset Quotes eld
17338 \end_inset
17339
17340
17341 \family typewriter
17342 -
17343 \family default
17344 3
17345 \begin_inset Quotes erd
17346 \end_inset
17347
17348 , etc.
17349  You can have multiple 
17350 \family sans
17351 Note
17352 \family default
17353 s associated with a single 
17354 \family sans
17355 Slide
17356 \family default
17357 , and, as with 
17358 \family sans
17359 Slide
17360 \family default
17361  and 
17362 \family sans
17363 Overlay
17364 \family default
17365 , you'll probably want to break up long 
17366 \family sans
17367 Note
17368 \family default
17369 s so that they fit on a single sheet of paper.
17370 \end_layout
17371
17372 \begin_layout Standard
17373 The purpose of a 
17374 \family sans
17375 Note
17376 \family default
17377  is obvious: it contains anything additional you might want to say about
17378  a 
17379 \family sans
17380 Slide
17381 \family default
17382 .
17383  It could also be used as a sheet of reminders for a particular 
17384 \family sans
17385 Slide
17386 \family default
17387 .
17388  In the case of the latter, you might want to make use of time markers.
17389  Currently, the LyX 
17390 \family sans
17391 slides
17392 \family default
17393  class has no 
17394 \begin_inset Quotes eld
17395 \end_inset
17396
17397 native
17398 \begin_inset Quotes erd
17399 \end_inset
17400
17401  support for time markers, a 
17402 \noun on
17403 SliTeX
17404 \noun default
17405  feature.
17406  So, you'll have to resort to using the LaTeX codes.
17407 \end_layout
17408
17409 \begin_layout Standard
17410 To use time markers, you'll need to specify the extra class option 
17411 \begin_inset Quotes eld
17412 \end_inset
17413
17414
17415 \family typewriter
17416 clock
17417 \family default
17418
17419 \begin_inset Quotes erd
17420 \end_inset
17421
17422  [see section
17423 \begin_inset space ~
17424 \end_inset
17425
17426
17427 \begin_inset CommandInset ref
17428 LatexCommand ref
17429 reference "sec:slidesetup"
17430
17431 \end_inset
17432
17433 ].
17434  This option turns on timing marks, which will appear in the lower-left-hand
17435  corner of every 
17436 \family sans
17437 Note
17438 \family default
17439  you generate.
17440  To set what appears in the time marker, you use the LaTeX commands 
17441 \begin_inset Quotes eld
17442 \end_inset
17443
17444
17445 \family typewriter
17446
17447 \backslash
17448 settime{}
17449 \family default
17450
17451 \begin_inset Quotes erd
17452 \end_inset
17453
17454  and 
17455 \begin_inset Quotes eld
17456 \end_inset
17457
17458
17459 \family typewriter
17460
17461 \backslash
17462 addtime{}
17463 \family default
17464
17465 \begin_inset Quotes erd
17466 \end_inset
17467
17468 .
17469  The arguments of both commands are time measured in seconds.
17470  
17471 \begin_inset Quotes eld
17472 \end_inset
17473
17474
17475 \family typewriter
17476
17477 \backslash
17478 settime{}
17479 \family default
17480
17481 \begin_inset Quotes erd
17482 \end_inset
17483
17484  sets the time marker to a given time.
17485  
17486 \begin_inset Quotes eld
17487 \end_inset
17488
17489
17490 \family typewriter
17491
17492 \backslash
17493 addtime{}
17494 \family default
17495
17496 \begin_inset Quotes erd
17497 \end_inset
17498
17499  increments the time marker by the specified amount.
17500  Using time markers and 
17501 \family sans
17502 Note
17503 \family default
17504 s in this fashion, you can remind yourself how much time to spend on a particula
17505
17506 \family sans
17507 Slide
17508 \family default
17509 .
17510 \end_layout
17511
17512 \begin_layout Standard
17513 There's one last feature to describe.
17514  Clearly, you'd like to print out all of your 
17515 \family sans
17516 Slide
17517 \family default
17518 s and 
17519 \family sans
17520 Overlay
17521 \family default
17522 s on transparencies while printing all of your 
17523 \family sans
17524 Note
17525 \family default
17526 s on plain paper.
17527  However, a 
17528 \family sans
17529 Note
17530 \family default
17531  
17532 \emph on
17533 must
17534 \emph default
17535  follow the 
17536 \family sans
17537 Slide
17538 \family default
17539  with which it is associated.
17540  What's a person to do?
17541 \end_layout
17542
17543 \begin_layout Standard
17544 Luckily, there are two LaTeX commands that allow you to select what to print
17545  out.
17546  Both must be placed into the preamble of your document.
17547  The command 
17548 \begin_inset Quotes eld
17549 \end_inset
17550
17551
17552 \family typewriter
17553
17554 \backslash
17555 onlyslides{
17556 \backslash
17557 slides}
17558 \family default
17559
17560 \begin_inset Quotes erd
17561 \end_inset
17562
17563  will cause the output to contain only the 
17564 \family sans
17565 Slide
17566 \family default
17567 s and 
17568 \family sans
17569 Overlay
17570 \family default
17571 s.
17572  Correspondingly, the command 
17573 \begin_inset Quotes eld
17574 \end_inset
17575
17576
17577 \family typewriter
17578
17579 \backslash
17580 onlynotes{
17581 \backslash
17582 notes}
17583 \family default
17584
17585 \begin_inset Quotes erd
17586 \end_inset
17587
17588  prevents the output of anything but 
17589 \family sans
17590 Note
17591 \family default
17592 s.
17593  I'd advise placing both commands in the preamble and initially comment
17594  both out.
17595  You can then preview your entire presentation as you write.
17596  When you're done writing, you can then uncomment one of the two to select
17597  what you want to print.
17598  I like to uncomment 
17599 \begin_inset Quotes eld
17600 \end_inset
17601
17602
17603 \family typewriter
17604
17605 \backslash
17606 onlyslides{
17607 \backslash
17608 slides}
17609 \family default
17610
17611 \begin_inset Quotes erd
17612 \end_inset
17613
17614  , print to a file with 
17615 \begin_inset Quotes eld
17616 \end_inset
17617
17618
17619 \family typewriter
17620 -slides
17621 \family default
17622
17623 \begin_inset Quotes erd
17624 \end_inset
17625
17626  in its name, comment it back out, then uncomment 
17627 \begin_inset Quotes eld
17628 \end_inset
17629
17630
17631 \family typewriter
17632
17633 \backslash
17634 onlynotes{
17635 \backslash
17636 notes}
17637 \family default
17638
17639 \begin_inset Quotes erd
17640 \end_inset
17641
17642  and print to a 
17643 \begin_inset Quotes eld
17644 \end_inset
17645
17646
17647 \family typewriter
17648 *-notes.ps
17649 \family default
17650
17651 \begin_inset Quotes erd
17652 \end_inset
17653
17654  file.
17655  I can then send either file to a printer, loading transparencies or plain
17656  paper as appropriate.
17657 \end_layout
17658
17659 \begin_layout Standard
17660 You can also provide other arguments to the 
17661 \begin_inset Quotes eld
17662 \end_inset
17663
17664
17665 \family typewriter
17666
17667 \backslash
17668 onlyslides{}
17669 \family default
17670
17671 \begin_inset Quotes erd
17672 \end_inset
17673
17674  and 
17675 \begin_inset Quotes eld
17676 \end_inset
17677
17678
17679 \family typewriter
17680
17681 \backslash
17682 onlynotes{}
17683 \family default
17684
17685 \begin_inset Quotes erd
17686 \end_inset
17687
17688  commands.
17689  See a good LaTeX book for details.
17690 \end_layout
17691
17692 \begin_layout Subsection
17693 The 
17694 \family sans
17695 slides
17696 \family default
17697  Class Template File
17698 \end_layout
17699
17700 \begin_layout Standard
17701 I have also provided a template file, 
17702 \begin_inset Quotes eld
17703 \end_inset
17704
17705
17706 \family typewriter
17707 slides.lyx
17708 \family default
17709
17710 \begin_inset Quotes erd
17711 \end_inset
17712
17713 , with the 
17714 \family sans
17715 slides
17716 \family default
17717  class.
17718  To use it, begin your new presentation with 
17719 \family sans
17720 \bar under
17721 F
17722 \bar default
17723 ile\SpecialChar \menuseparator
17724 New
17725 \begin_inset space ~
17726 \end_inset
17727
17728 from
17729 \begin_inset space ~
17730 \end_inset
17731
17732
17733 \bar under
17734 T
17735 \bar default
17736 emplate
17737 \family default
17738 .
17739  Your new LyX presentation file will contain an example 
17740 \family sans
17741 Slide
17742 \family default
17743  – 
17744 \family sans
17745 Overlay
17746 \family default
17747  – 
17748 \family sans
17749 Note
17750 \family default
17751  triplet.
17752  The 
17753 \family sans
17754 Slide
17755 \family default
17756  and 
17757 \family sans
17758 Overlay
17759 \family default
17760  additionally contain an example of the use of 
17761 \family sans
17762 InvisibleText
17763 \family default
17764  and 
17765 \family sans
17766 VisibleText
17767 \family default
17768 .
17769  Lastly, the preamble will contain:
17770 \end_layout
17771
17772 \begin_layout LyX-Code
17773 % Uncomment to print out only slides and overlays
17774 \end_layout
17775
17776 \begin_layout LyX-Code
17777 %
17778 \end_layout
17779
17780 \begin_layout LyX-Code
17781 %
17782 \backslash
17783 onlyslides{
17784 \backslash
17785 slides}
17786 \begin_inset Newline newline
17787 \end_inset
17788
17789  
17790 \end_layout
17791
17792 \begin_layout LyX-Code
17793 % Uncomment to print out only notes
17794 \end_layout
17795
17796 \begin_layout LyX-Code
17797 %
17798 \end_layout
17799
17800 \begin_layout LyX-Code
17801 %
17802 \backslash
17803 onlynotes{
17804 \backslash
17805 notes}
17806 \end_layout
17807
17808 \begin_layout Standard
17809 One final thing: I created this class to support the LaTeX2e 
17810 \begin_inset Quotes eld
17811 \end_inset
17812
17813
17814 \noun on
17815 SliTeX
17816 \noun default
17817  emulation
17818 \begin_inset Quotes erd
17819 \end_inset
17820
17821  class, one of the built-in LaTeX2e classes.
17822  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17823  built-in slide class.
17824  It's here if you want it or need it.
17825  There exist other LaTeX2e classes for creating presentations, such as the
17826  
17827 \family sans
17828 Foils
17829 \family default
17830  class [see section
17831 \begin_inset space ~
17832 \end_inset
17833
17834
17835 \begin_inset CommandInset ref
17836 LatexCommand ref
17837 reference "sec:foiltex"
17838
17839 \end_inset
17840
17841 ] or the 
17842 \begin_inset Quotes eld
17843 \end_inset
17844
17845
17846 \family typewriter
17847 seminar
17848 \family default
17849
17850 \begin_inset Quotes erd
17851 \end_inset
17852
17853  package [present on some TeX distributions].
17854  The latter is not yet supported under LyX.
17855 \begin_inset Foot
17856 status collapsed
17857
17858 \begin_layout Plain Layout
17859 Perhaps you can take on the task\SpecialChar \ldots{}
17860
17861 \end_layout
17862
17863 \end_inset
17864
17865  I know nothing about these other classes.
17866  Try them out to see what sort of alternative they provide.
17867 \end_layout
17868
17869 \begin_layout Chapter
17870 LyX Features needing Extra Software
17871 \end_layout
17872
17873 \begin_layout Section
17874 Checking TeX
17875 \end_layout
17876
17877 \begin_layout Standard
17878 by 
17879 \noun on
17880 Asger Alstrup
17881 \end_layout
17882
17883 \begin_layout Subsection
17884 Introduction
17885 \end_layout
17886
17887 \begin_layout Standard
17888 If you have the 
17889 \family typewriter
17890 chktex
17891 \family default
17892  program installed
17893 \begin_inset Foot
17894 status collapsed
17895
17896 \begin_layout Plain Layout
17897
17898 \family typewriter
17899 chktex
17900 \family default
17901  is not yet available when you are using the LaTeX distribution MiKTeX.
17902 \end_layout
17903
17904 \end_inset
17905
17906 , you'll find in the 
17907 \family sans
17908 Tools
17909 \family default
17910  menu the entry: 
17911 \family sans
17912 Check
17913 \begin_inset space ~
17914 \end_inset
17915
17916 TeX
17917 \family default
17918 .
17919  You can get 
17920 \family typewriter
17921 chktex
17922 \family default
17923  from CTAN,
17924 \begin_inset Newline newline
17925 \end_inset
17926
17927
17928 \begin_inset CommandInset href
17929 LatexCommand href
17930 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17931
17932 \end_inset
17933
17934 .
17935 \end_layout
17936
17937 \begin_layout Standard
17938 The 
17939 \family sans
17940 ChkTeX
17941 \family default
17942  package is a program that was written by 
17943 \begin_inset Flex Noun
17944 status collapsed
17945
17946 \begin_layout Plain Layout
17947 Jens T.
17948 \begin_inset space ~
17949 \end_inset
17950
17951 Berger Thielemann
17952 \end_layout
17953
17954 \end_inset
17955
17956  in frustration because some constructs in LaTeX are sometimes non-intuitive,
17957  and easy to forget.
17958  The program runs over your LaTeX file, checks the integrity of the file,
17959  and flags some common errors.
17960  In other technical words, it is 
17961 \family typewriter
17962 lint
17963 \family default
17964  for LaTeX.
17965 \end_layout
17966
17967 \begin_layout Standard
17968 Well, what is a syntax checker doing in LyX which is supposed to produce
17969  correct LaTeX anyways? The answer is simple: Just as 
17970 \family typewriter
17971 Lint
17972 \family default
17973  not only checks the 
17974 \emph on
17975 syntax
17976 \emph default
17977  of C programs, but also does 
17978 \emph on
17979 semantic
17980 \emph default
17981  checks for type-errors, 
17982 \family sans
17983 ChkTeX
17984 \family default
17985  catches some common 
17986 \emph on
17987 typographic
17988 \emph default
17989  errors, in addition to the syntactical ones.
17990  Specifically, 
17991 \family sans
17992 ChkTeX
17993 \family default
17994  is capable of detecting several common errors, such as
17995 \end_layout
17996
17997 \begin_layout Itemize
17998 Ellipsis detection:
17999 \begin_inset Newline newline
18000 \end_inset
18001
18002 Use \SpecialChar \ldots{}
18003  instead of ...
18004 \end_layout
18005
18006 \begin_layout Itemize
18007 No space in front of/after parenthesis:
18008 \begin_inset Newline newline
18009 \end_inset
18010
18011 ( wrong spacing )
18012 \end_layout
18013
18014 \begin_layout Itemize
18015 Enforcement of normal space after common abbreviations:
18016 \begin_inset Newline newline
18017 \end_inset
18018
18019 e.
18020 \begin_inset space \thinspace{}
18021 \end_inset
18022
18023 g.
18024 \begin_inset space \space{}
18025 \end_inset
18026
18027 is too wide spacing.
18028 \end_layout
18029
18030 \begin_layout Itemize
18031 Enforcement of end-of-sentence space when the last sentence ends with a
18032  capital letter:
18033 \begin_inset Newline newline
18034 \end_inset
18035
18036 This is a TEST.
18037  And this is wrong spacing.
18038 \end_layout
18039
18040 \begin_layout Itemize
18041 Space in front of labels and similar commands:
18042 \begin_inset Newline newline
18043 \end_inset
18044
18045 The label should stick right up to the text to avoid falling to a wrong
18046  page.
18047  
18048 \begin_inset CommandInset label
18049 LatexCommand label
18050 name "sec:chktex"
18051
18052 \end_inset
18053
18054  
18055 \begin_inset Foot
18056 status collapsed
18057
18058 \begin_layout Plain Layout
18059 This footnote is in danger of falling off to a wrong page
18060 \end_layout
18061
18062 \end_inset
18063
18064  The label is separated too much.
18065 \end_layout
18066
18067 \begin_layout Itemize
18068 Space in front of references, instead of hard spaces:
18069 \begin_inset Newline newline
18070 \end_inset
18071
18072 If you have bad luck, the text will break right between the referenced text
18073  and reference number, and that's a pity.
18074  See section 
18075 \begin_inset CommandInset ref
18076 LatexCommand ref
18077 reference "sec:chktex"
18078
18079 \end_inset
18080
18081 .
18082 \end_layout
18083
18084 \begin_layout Itemize
18085 Use of 
18086 \begin_inset Quotes eld
18087 \end_inset
18088
18089 x
18090 \begin_inset Quotes erd
18091 \end_inset
18092
18093  instead of 
18094 \begin_inset Formula $\times$
18095 \end_inset
18096
18097  between numbers:
18098 \begin_inset Newline newline
18099 \end_inset
18100
18101 2x2 looks cheap compared to 
18102 \begin_inset Formula $2\times2$
18103 \end_inset
18104
18105 .
18106 \end_layout
18107
18108 \begin_layout Standard
18109 and more \SpecialChar \ldots{}
18110  It is an invaluable tool when you are 
18111 \begin_inset Quotes eld
18112 \end_inset
18113
18114 finishing up
18115 \begin_inset Quotes erd
18116 \end_inset
18117
18118  your document before printing, and you should run it right after the obligatory
18119  spelling check, and before you go fine tuning the typesetting.
18120 \end_layout
18121
18122 \begin_layout Subsection
18123 How to use it
18124 \end_layout
18125
18126 \begin_layout Standard
18127 If you have the program installed, usage is as simple as choosing 
18128 \family sans
18129 Tools\SpecialChar \menuseparator
18130 Check
18131 \begin_inset space ~
18132 \end_inset
18133
18134 TeX
18135 \family default
18136 .
18137  This will make LyX generate a LaTeX file of your document, start 
18138 \family sans
18139 ChkTeX
18140 \family default
18141  to check it, and then make LyX insert 
18142 \begin_inset Quotes eld
18143 \end_inset
18144
18145 error boxes
18146 \begin_inset Quotes erd
18147 \end_inset
18148
18149  with the warnings from 
18150 \family sans
18151 ChkTeX
18152 \family default
18153 , if there were any.
18154  The warnings will be placed close to the point of the mistake, and you
18155  can quickly find them by using the 
18156 \family sans
18157 Navigate\SpecialChar \menuseparator
18158 Error
18159 \family default
18160  menu item, or the shortcut key 
18161 \family sans
18162 C-g
18163 \family default
18164  from the default 
18165 \family typewriter
18166 cua
18167 \family default
18168  bind file.
18169  Open the error boxes by clicking on them with the mouse, or use the shortcut
18170  key 
18171 \family sans
18172 C-i
18173 \family default
18174  from 
18175 \family typewriter
18176 cua
18177 \family default
18178  bindings, or the corresponding 
18179 \family sans
18180 C-o
18181 \family default
18182  for the alternate 
18183 \family typewriter
18184 emacs
18185 \family default
18186  bind file.
18187  Read the warning and correct the mistake, if it is a mistake.
18188  If you have trouble understanding what the warning is about, you can safely
18189  ignore it.
18190  Remember that there is a hidden layer between the document on screen and
18191  the technical details in invoking 
18192 \family sans
18193 ChkTeX
18194 \family default
18195 , and this gap can make some warnings seem arcane or just plain silly.
18196 \end_layout
18197
18198 \begin_layout Standard
18199 This document is an excellent testing bed for the feature, and it should
18200  provide quite a few warnings for you to fiddle with.
18201  Since computers are only so smart, expect most of the warnings to be false
18202  alarms, though.
18203 \end_layout
18204
18205 \begin_layout Subsection
18206 How to fine tune it
18207 \end_layout
18208
18209 \begin_layout Standard
18210 Sometimes, you'll find that 
18211 \family sans
18212 ChkTeX
18213 \family default
18214  makes more noise than suits your mood.
18215  Then you can choose not to use it, wait until your mood changes, or try
18216  to customize 
18217 \family sans
18218 ChkTeX
18219 \family default
18220  to get better along with you.
18221 \end_layout
18222
18223 \begin_layout Standard
18224 Although 
18225 \family sans
18226 ChkTeX
18227 \family default
18228  
18229 \emph on
18230 is
18231 \emph default
18232  very configurable and extensible, you should not expect to solve all problems
18233  with 
18234 \family sans
18235 ChkTeX
18236 \family default
18237  in LyX this way.
18238  Since LyX has to generate a somewhat special LaTeX file to be able to match
18239  the line numbers from the 
18240 \family sans
18241 ChkTeX
18242 \family default
18243  output
18244 \begin_inset Foot
18245 status collapsed
18246
18247 \begin_layout Plain Layout
18248 You can inspect the specific output from 
18249 \family sans
18250 chktex
18251 \family default
18252  by using 
18253 \family sans
18254 Document\SpecialChar \menuseparator
18255 LaTeX
18256 \begin_inset space ~
18257 \end_inset
18258
18259 Log
18260 \family default
18261  right after a 
18262 \family sans
18263 chktex
18264 \family default
18265  run.
18266 \end_layout
18267
18268 \end_inset
18269
18270  to the internal document structure, some of the warnings will not appear
18271  correctly.
18272  There are two things you can do about this:
18273 \end_layout
18274
18275 \begin_layout Itemize
18276 Fine tune the 
18277 \family sans
18278 ChkTeX
18279 \family default
18280  invocation command line in 
18281 \begin_inset Flex MenuItem
18282 status collapsed
18283
18284 \begin_layout Plain Layout
18285 Tools\SpecialChar \menuseparator
18286 Preferences\SpecialChar \menuseparator
18287 Output\SpecialChar \menuseparator
18288 LaTeX\SpecialChar \menuseparator
18289 CheckTeX command
18290 \end_layout
18291
18292 \end_inset
18293
18294 , or the global 
18295 \family sans
18296 ChkTeX
18297 \family default
18298  installation configuration file (usually with the file 
18299 \family typewriter
18300 chktexrc
18301 \family default
18302 ).
18303  See below to learn what warnings can be enabled and disabled on the command
18304  line.
18305 \end_layout
18306
18307 \begin_layout Itemize
18308 Export your document as a raw LaTeX file using 
18309 \family sans
18310 File\SpecialChar \menuseparator
18311 Export\SpecialChar \menuseparator
18312 LaTeX
18313 \family default
18314  and run 
18315 \family typewriter
18316 chktex
18317 \family default
18318  manually on that.
18319  Invoked in this way, it can be a hassle to find the corresponding place
18320  in the document inside LyX, but with a little patience, you should be able
18321  to do it.
18322 \end_layout
18323
18324 \begin_layout Standard
18325 Here follows the warning messages that can be enabled and disabled in 
18326 \family sans
18327 Preferences
18328 \family default
18329 .
18330  Use 
18331 \family typewriter
18332 -n#
18333 \family default
18334  to disable a warning, and 
18335 \family typewriter
18336 -w#
18337 \family default
18338  to enable a warning.
18339  The emphasized entries are disabled by default, because the default is
18340  "
18341 \family typewriter
18342 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18343 \family default
18344 ".
18345 \end_layout
18346
18347 \begin_layout Standard
18348 Notice that you should only use the options that enable and disable warnings,
18349  because LyX relies on some of the other command line parameters to be set
18350  in a specific way to have a chance to communicate with 
18351 \family typewriter
18352 chktex
18353 \family default
18354 .
18355 \end_layout
18356
18357 \begin_layout Enumerate
18358
18359 \size small
18360 \emph on
18361 Command terminated with space.
18362 \end_layout
18363
18364 \begin_layout Enumerate
18365
18366 \size small
18367 Non-breaking space (
18368 \begin_inset Quotes eld
18369 \end_inset
18370
18371
18372 \family typewriter
18373 ~
18374 \family default
18375
18376 \begin_inset Quotes erd
18377 \end_inset
18378
18379 ) should have been used.
18380 \end_layout
18381
18382 \begin_layout Enumerate
18383
18384 \size small
18385 \emph on
18386 You should enclose the previous parenthesis with 
18387 \begin_inset Quotes eld
18388 \end_inset
18389
18390
18391 \family typewriter
18392 {}
18393 \family default
18394
18395 \begin_inset Quotes erd
18396 \end_inset
18397
18398 .
18399 \end_layout
18400
18401 \begin_layout Enumerate
18402
18403 \size small
18404 Italic correction (
18405 \begin_inset Quotes eld
18406 \end_inset
18407
18408
18409 \family typewriter
18410
18411 \backslash
18412 /
18413 \family default
18414
18415 \begin_inset Quotes erd
18416 \end_inset
18417
18418 ) found in non-italic buffer.
18419 \end_layout
18420
18421 \begin_layout Enumerate
18422
18423 \size small
18424 Italic correction (
18425 \begin_inset Quotes eld
18426 \end_inset
18427
18428
18429 \family typewriter
18430
18431 \backslash
18432 /
18433 \family default
18434
18435 \begin_inset Quotes erd
18436 \end_inset
18437
18438 ) found more than once.
18439 \end_layout
18440
18441 \begin_layout Enumerate
18442
18443 \size small
18444 \emph on
18445 No italic correction (
18446 \begin_inset Quotes eld
18447 \end_inset
18448
18449
18450 \family typewriter
18451
18452 \backslash
18453 /
18454 \family default
18455
18456 \begin_inset Quotes erd
18457 \end_inset
18458
18459 ) found.
18460 \end_layout
18461
18462 \begin_layout Enumerate
18463
18464 \size small
18465 Accent command 
18466 \begin_inset Quotes eld
18467 \end_inset
18468
18469
18470 \family typewriter
18471 cmd
18472 \family default
18473
18474 \begin_inset Quotes erd
18475 \end_inset
18476
18477  needs use of 
18478 \begin_inset Quotes eld
18479 \end_inset
18480
18481
18482 \family typewriter
18483 cmd
18484 \family default
18485
18486 \begin_inset Quotes erd
18487 \end_inset
18488
18489 .
18490 \end_layout
18491
18492 \begin_layout Enumerate
18493
18494 \size small
18495 Wrong length of dash may have been used.
18496 \end_layout
18497
18498 \begin_layout Enumerate
18499
18500 \size small
18501 \emph on
18502 \begin_inset Quotes eld
18503 \end_inset
18504
18505
18506 \family typewriter
18507 %s
18508 \family default
18509
18510 \begin_inset Quotes erd
18511 \end_inset
18512
18513  expected, found 
18514 \begin_inset Quotes eld
18515 \end_inset
18516
18517
18518 \family typewriter
18519 %s
18520 \family default
18521
18522 \begin_inset Quotes erd
18523 \end_inset
18524
18525 .
18526 \end_layout
18527
18528 \begin_layout Enumerate
18529
18530 \size small
18531 Solo 
18532 \begin_inset Quotes eld
18533 \end_inset
18534
18535
18536 \family typewriter
18537 %s
18538 \family default
18539
18540 \begin_inset Quotes erd
18541 \end_inset
18542
18543  found.
18544 \end_layout
18545
18546 \begin_layout Enumerate
18547
18548 \size small
18549 You should use 
18550 \begin_inset Quotes eld
18551 \end_inset
18552
18553
18554 \family typewriter
18555 %s
18556 \family default
18557
18558 \begin_inset Quotes erd
18559 \end_inset
18560
18561  to achieve an ellipsis.
18562 \end_layout
18563
18564 \begin_layout Enumerate
18565
18566 \size small
18567 Inter-word spacing (
18568 \begin_inset Quotes eld
18569 \end_inset
18570
18571
18572 \family typewriter
18573
18574 \backslash
18575
18576 \family default
18577  
18578 \begin_inset Quotes eld
18579 \end_inset
18580
18581 ) should perhaps be used.
18582 \end_layout
18583
18584 \begin_layout Enumerate
18585
18586 \size small
18587 Inter-sentence spacing (
18588 \begin_inset Quotes eld
18589 \end_inset
18590
18591
18592 \family typewriter
18593
18594 \backslash
18595 @
18596 \family default
18597
18598 \begin_inset Quotes erd
18599 \end_inset
18600
18601 ) should perhaps be used.
18602 \end_layout
18603
18604 \begin_layout Enumerate
18605
18606 \size small
18607 Could not find argument for command.
18608 \end_layout
18609
18610 \begin_layout Enumerate
18611
18612 \size small
18613 No match found for 
18614 \begin_inset Quotes eld
18615 \end_inset
18616
18617
18618 \family typewriter
18619 %s
18620 \family default
18621
18622 \begin_inset Quotes erd
18623 \end_inset
18624
18625 .
18626 \end_layout
18627
18628 \begin_layout Enumerate
18629
18630 \size small
18631 Math mode still on at end of LaTeX file.
18632 \end_layout
18633
18634 \begin_layout Enumerate
18635
18636 \size small
18637 Number of 
18638 \begin_inset Quotes eld
18639 \end_inset
18640
18641
18642 \family typewriter
18643 char
18644 \family default
18645
18646 \begin_inset Quotes erd
18647 \end_inset
18648
18649  doesn't match the number of 
18650 \begin_inset Quotes eld
18651 \end_inset
18652
18653
18654 \family typewriter
18655 char
18656 \family default
18657
18658 \begin_inset Quotes erd
18659 \end_inset
18660
18661 .
18662 \end_layout
18663
18664 \begin_layout Enumerate
18665
18666 \size small
18667 You should use either 
18668 \family typewriter
18669
18670 \begin_inset Quotes eld
18671 \end_inset
18672
18673
18674 \family default
18675  or 
18676 \family typewriter
18677
18678 \begin_inset Quotes erd
18679 \end_inset
18680
18681
18682 \family default
18683  as an alternative to 
18684 \begin_inset Quotes eld
18685 \end_inset
18686
18687
18688 \family typewriter
18689 "
18690 \family default
18691
18692 \begin_inset Quotes erd
18693 \end_inset
18694
18695 .
18696 \end_layout
18697
18698 \begin_layout Enumerate
18699
18700 \size small
18701 You should use "
18702 \family typewriter
18703 '
18704 \family default
18705 " (ASCII 39) instead of "
18706 \family typewriter
18707 ´
18708 \family default
18709 " (ASCII 180).
18710 \end_layout
18711
18712 \begin_layout Enumerate
18713
18714 \size small
18715 User-specified pattern found.
18716 \end_layout
18717
18718 \begin_layout Enumerate
18719
18720 \size small
18721 This command might not be intended.
18722 \end_layout
18723
18724 \begin_layout Enumerate
18725
18726 \size small
18727 \emph on
18728 Comment displayed.
18729 \end_layout
18730
18731 \begin_layout Enumerate
18732
18733 \size small
18734 Either 
18735 \family typewriter
18736 ''
18737 \backslash
18738 ,'
18739 \family default
18740  or 
18741 \family typewriter
18742 '
18743 \backslash
18744 ,''
18745 \family default
18746  will look better.
18747 \end_layout
18748
18749 \begin_layout Enumerate
18750
18751 \size small
18752 Delete this space to maintain correct page references.
18753 \end_layout
18754
18755 \begin_layout Enumerate
18756
18757 \size small
18758 \emph on
18759 You might wish to put this between a pair of 
18760 \begin_inset Quotes eld
18761 \end_inset
18762
18763
18764 \family typewriter
18765 {}
18766 \family default
18767
18768 \begin_inset Quotes erd
18769 \end_inset
18770
18771 .
18772 \end_layout
18773
18774 \begin_layout Enumerate
18775
18776 \size small
18777 You ought to remove spaces in front of punctuation.
18778 \end_layout
18779
18780 \begin_layout Enumerate
18781
18782 \size small
18783 Could not execute LaTeX command.
18784 \end_layout
18785
18786 \begin_layout Enumerate
18787
18788 \size small
18789 Don't use 
18790 \family typewriter
18791
18792 \backslash
18793 /
18794 \family default
18795  in front of small punctuation.
18796 \end_layout
18797
18798 \begin_layout Enumerate
18799
18800 \family typewriter
18801 \size small
18802 $
18803 \backslash
18804 times$
18805 \family default
18806  may look prettier here.
18807 \end_layout
18808
18809 \begin_layout Enumerate
18810
18811 \size small
18812 \emph on
18813 Multiple spaces detected in output.
18814 \end_layout
18815
18816 \begin_layout Enumerate
18817
18818 \size small
18819 This text may be ignored.
18820 \end_layout
18821
18822 \begin_layout Enumerate
18823
18824 \size small
18825 Use 
18826 \family typewriter
18827
18828 \begin_inset Quotes eld
18829 \end_inset
18830
18831
18832 \family default
18833  to begin quotation, not 
18834 \family typewriter
18835 '
18836 \family default
18837 .
18838 \end_layout
18839
18840 \begin_layout Enumerate
18841
18842 \size small
18843 Use 
18844 \family typewriter
18845 '
18846 \family default
18847  to end quotation, not 
18848 \family typewriter
18849
18850 \begin_inset Quotes eld
18851 \end_inset
18852
18853
18854 \family default
18855 .
18856 \end_layout
18857
18858 \begin_layout Enumerate
18859
18860 \size small
18861 Don't mix quotes.
18862 \end_layout
18863
18864 \begin_layout Enumerate
18865
18866 \size small
18867 You should perhaps use 
18868 \begin_inset Quotes eld
18869 \end_inset
18870
18871
18872 \family typewriter
18873 cmd
18874 \family default
18875
18876 \begin_inset Quotes erd
18877 \end_inset
18878
18879  instead.
18880 \end_layout
18881
18882 \begin_layout Enumerate
18883
18884 \size small
18885 You should put a space in front of/after parenthesis.
18886 \end_layout
18887
18888 \begin_layout Enumerate
18889
18890 \size small
18891 You should avoid spaces in front of/after parenthesis.
18892 \end_layout
18893
18894 \begin_layout Enumerate
18895
18896 \size small
18897 \emph on
18898 You should not use punctuation in front of/after quotes.
18899 \end_layout
18900
18901 \begin_layout Enumerate
18902
18903 \size small
18904 Double space found.
18905 \end_layout
18906
18907 \begin_layout Enumerate
18908
18909 \size small
18910 You should put punctuation outside inner/inside display math mode.
18911 \end_layout
18912
18913 \begin_layout Enumerate
18914
18915 \size small
18916 You ought to not use primitive TeX in LaTeX code.
18917 \end_layout
18918
18919 \begin_layout Enumerate
18920
18921 \size small
18922 You should remove spaces in front of 
18923 \begin_inset Quotes eld
18924 \end_inset
18925
18926
18927 \family typewriter
18928 %s
18929 \family default
18930
18931 \begin_inset Quotes erd
18932 \end_inset
18933
18934
18935 \end_layout
18936
18937 \begin_layout Enumerate
18938
18939 \size small
18940 \begin_inset Quotes eld
18941 \end_inset
18942
18943
18944 \family typewriter
18945 %s
18946 \family default
18947
18948 \begin_inset Quotes erd
18949 \end_inset
18950
18951  is normally not followed by 
18952 \begin_inset Quotes eld
18953 \end_inset
18954
18955
18956 \family typewriter
18957 %c
18958 \family default
18959
18960 \begin_inset Quotes erd
18961 \end_inset
18962
18963 .
18964 \end_layout
18965
18966 \begin_layout Standard
18967 In later versions of LyX, we hope to provide a more complete interface to
18968  this tool (and it's smaller cousin 
18969 \family typewriter
18970 lacheck
18971 \family default
18972 ) to exploit the full power of it.
18973  But it's not exactly useless as it is now: go try it on one of your existing
18974  documents of a certain length and be surprised.
18975 \end_layout
18976
18977 \begin_layout Section
18978 Version Control in LyX
18979 \end_layout
18980
18981 \begin_layout Standard
18982 by
18983 \noun on
18984  Lars Gullik Bjønnes 
18985 \noun default
18986 and 
18987 \noun on
18988 Pavel Sanda
18989 \end_layout
18990
18991 \begin_layout Subsection
18992 Introduction
18993 \end_layout
18994
18995 \begin_layout Standard
18996 LyX supports some of the most basic RCS/CVS/SVN/GIT commands.
18997  If you need something a bit more sophisticated you will have to do that
18998  manually in a terminal.
18999 \end_layout
19000
19001 \begin_layout Standard
19002 Also note that CVS support is not as good as subversion support so we advise
19003  using SVN instead.
19004  A good place to start learning Subversion is SVN Book
19005 \begin_inset Foot
19006 status open
19007
19008 \begin_layout Plain Layout
19009 \begin_inset CommandInset href
19010 LatexCommand href
19011 target "http://svnbook.red-bean.com/"
19012
19013 \end_inset
19014
19015
19016 \end_layout
19017
19018 \end_inset
19019
19020 .
19021  In the case of RCS you should read 
19022 \begin_inset Quotes eld
19023 \end_inset
19024
19025 rcsintro
19026 \begin_inset Quotes erd
19027 \end_inset
19028
19029  (a man file, read it with 
19030 \family typewriter
19031 man rcsintro
19032 \family default
19033 ).
19034  This file describes all the basic features of RCS.
19035  You should especially notice the comment about a RCS directory, and the
19036  notion of a master RCS file (the file ending in 
19037 \family typewriter
19038 ,v
19039 \family default
19040 ).
19041 \end_layout
19042
19043 \begin_layout Standard
19044 Before you begin to use the version control features in LyX, you should
19045  be familiar with RCS/CVS/SVN/GIT usage.
19046  The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
19047  package — no guarantees are made for older versions.
19048  Most of the log messages are not currently displayed after operations —
19049  you can check them in the Messages pane if unsure.
19050  Regular users of version control will appreciate VC toolbar, which can
19051  be enabled via 
19052 \family sans
19053 View\SpecialChar \menuseparator
19054 Toolbars\SpecialChar \menuseparator
19055 Version
19056 \begin_inset space ~
19057 \end_inset
19058
19059 Control
19060 \family default
19061 .
19062 \end_layout
19063
19064 \begin_layout Standard
19065 For introducing your own external commands consult vc-command in the manual
19066  of LyX functions.
19067 \end_layout
19068
19069 \begin_layout Subsection
19070 RCS commands in LyX
19071 \end_layout
19072
19073 \begin_layout Standard
19074 The following sections describe the RCS commands supported by LyX.
19075  You can find them in the 
19076 \family sans
19077 File\SpecialChar \menuseparator
19078 Version
19079 \begin_inset space ~
19080 \end_inset
19081
19082 Control
19083 \family default
19084  submenu.
19085  LyX was tested against RCS 5.7/5.8
19086 \begin_inset Foot
19087 status open
19088
19089 \begin_layout Plain Layout
19090 Note that old DOS / MS Windows builds (5.7) need to setup environment variables
19091  in order to work properly with LyX.
19092  In particular time zone (TZ) should be set and more importantly RCSINIT
19093  in order to change default archive location ("SET RCSINIT=-x,v/") --- LyX
19094  expects archive to be found in file.lyx,v within the original document directory.
19095  See also README shipped with Windows RCS binaries.
19096 \end_layout
19097
19098 \end_inset
19099
19100 .
19101 \end_layout
19102
19103 \begin_layout Subsubsection
19104
19105 \family sans
19106 Register
19107 \end_layout
19108
19109 \begin_layout Standard
19110 If your document is not under revision control, this is the only item shown
19111  in the menu.
19112  And if it is under revision control, the 
19113 \family sans
19114 Register
19115 \family default
19116  item is not visible.
19117  
19118 \end_layout
19119
19120 \begin_layout Standard
19121 This command registers your document with RCS (unless you are under the
19122  directory managed by CVS)\SpecialChar \@.
19123  You are asked interactively to supply an initial
19124  description of the document.
19125  The document is now set in Read-Only mode and you have to 
19126 \family sans
19127 Check
19128 \begin_inset space ~
19129 \end_inset
19130
19131 Out
19132 \begin_inset space ~
19133 \end_inset
19134
19135 For
19136 \begin_inset space ~
19137 \end_inset
19138
19139 Edit
19140 \family default
19141 , before making any changes to it.
19142  A document under revision control has a 
19143 \begin_inset Quotes eld
19144 \end_inset
19145
19146 [RCS:<version> <locker>]
19147 \begin_inset Quotes erd
19148 \end_inset
19149
19150  item tagged to the filename in the minibuffer.
19151 \end_layout
19152
19153 \begin_layout Standard
19154 RCS command that is run: 
19155 \family typewriter
19156 ci -q -u -i -t-"<initial description>" <file-name>
19157 \end_layout
19158
19159 \begin_layout Standard
19160 Read 
19161 \family typewriter
19162 man ci
19163 \family default
19164  to understand the switches.
19165  
19166 \end_layout
19167
19168 \begin_layout Subsubsection
19169
19170 \family sans
19171 Check In Changes
19172 \end_layout
19173
19174 \begin_layout Standard
19175 When you are finished editing a file, you check in your changes.
19176  When you do this, you are asked for a description of the changes.
19177  This is stored in the history log.
19178  The version number is bumped, your changes are applied to the master RCS
19179  file, the document is unlocked and set to Read-Only mode.
19180 \end_layout
19181
19182 \begin_layout Standard
19183 RCS command: 
19184 \family typewriter
19185 ci -q -u -m"<description>" <file-name>
19186 \end_layout
19187
19188 \begin_layout Subsubsection
19189
19190 \family sans
19191 Check Out For Edit
19192 \end_layout
19193
19194 \begin_layout Standard
19195 By doing this you lock the document so that only you can edit it.
19196  This will also make the document Read-Write only for you.
19197  You will usually continue editing for a while and when you are finished
19198  you check in your changes.
19199  The status line is changed to reflect that you have locked the file.
19200 \end_layout
19201
19202 \begin_layout Standard
19203 RCS command: 
19204 \family typewriter
19205 co -q -l <file-name>
19206 \end_layout
19207
19208 \begin_layout Subsubsection
19209
19210 \family sans
19211 Revert To Repository Version
19212 \end_layout
19213
19214 \begin_layout Standard
19215 This will discard all changes made to the document since the last check
19216  in.
19217  You get a warning before changes are discarded.
19218 \end_layout
19219
19220 \begin_layout Standard
19221 RCS command: 
19222 \family typewriter
19223 co -f -u<version> <file-name>
19224 \end_layout
19225
19226 \begin_layout Subsubsection
19227
19228 \family sans
19229 Copy
19230 \end_layout
19231
19232 \begin_layout Standard
19233 This will create a copy of the current document.
19234  Since RCS does not support copy operations natively, the version history
19235  is not preserved, and the copy is added as a new file.
19236  It requires a clean document without any changes since the last checkin.
19237  You are asked for a file name and a description of the copy operation.
19238  After that the copy is created, both locally and in the repository.
19239  If the parent directories of the copied and original document differ, all
19240  relative paths of included files of the copy are adjusted (like in 
19241 \family sans
19242 File\SpecialChar \menuseparator
19243 Save As
19244 \family default
19245 \SpecialChar \ldots{}
19246 ).
19247  Finally, the copy is loaded instead of the original document.
19248 \end_layout
19249
19250 \begin_layout Labeling
19251 \labelwidthstring 00.00.0000
19252 RCS
19253 \begin_inset space ~
19254 \end_inset
19255
19256 commands: 
19257 \begin_inset space ~
19258 \end_inset
19259
19260
19261 \begin_inset Newline newline
19262 \end_inset
19263
19264 Copy 
19265 \begin_inset Flex Code
19266 status collapsed
19267
19268 \begin_layout Plain Layout
19269
19270 \family typewriter
19271 \begin_inset Quotes eld
19272 \end_inset
19273
19274 <file-name>
19275 \begin_inset Quotes erd
19276 \end_inset
19277
19278
19279 \end_layout
19280
19281 \end_inset
19282
19283  to 
19284 \begin_inset Flex Code
19285 status collapsed
19286
19287 \begin_layout Plain Layout
19288
19289 \family typewriter
19290 \begin_inset Quotes eld
19291 \end_inset
19292
19293 <new-file-name>
19294 \begin_inset Quotes erd
19295 \end_inset
19296
19297
19298 \end_layout
19299
19300 \end_inset
19301
19302
19303 \begin_inset Newline newline
19304 \end_inset
19305
19306
19307 \begin_inset Flex Code
19308 status collapsed
19309
19310 \begin_layout Plain Layout
19311 ci -q -u 
19312 \family typewriter
19313 -i 
19314 \begin_inset Quotes eld
19315 \end_inset
19316
19317 <new-file-name>
19318 \begin_inset Quotes erd
19319 \end_inset
19320
19321
19322 \end_layout
19323
19324 \end_inset
19325
19326
19327 \end_layout
19328
19329 \begin_layout Subsubsection
19330
19331 \family sans
19332 Undo Last Checkin
19333 \end_layout
19334
19335 \begin_layout Standard
19336 This makes as if the last check in never happened.
19337  No changes are made to the document loaded into LyX, but the last version
19338  is removed from the master RCS file.
19339 \end_layout
19340
19341 \begin_layout Standard
19342 RCS command: 
19343 \family typewriter
19344 rcs -o<version> <file-name>
19345 \end_layout
19346
19347 \begin_layout Subsubsection
19348
19349 \family sans
19350 Show History
19351 \end_layout
19352
19353 \begin_layout Standard
19354 This shows the complete history of the RCS document.
19355  The output of 
19356 \family typewriter
19357 rlog <file-name>
19358 \family default
19359  is shown in a browser.
19360  See 
19361 \family typewriter
19362 man rlog
19363 \family default
19364  for more info.
19365 \end_layout
19366
19367 \begin_layout Subsubsection
19368 Revision info
19369 \end_layout
19370
19371 \begin_layout Standard
19372 LyX supports RCS version number, author name, date and time of last commit.
19373  All those are extracted from 
19374 \family typewriter
19375 rlog -r <file-name>
19376 \family default
19377 .
19378  See 
19379 \begin_inset CommandInset ref
19380 LatexCommand ref
19381 reference "sub:VCS-Revision-Information"
19382
19383 \end_inset
19384
19385  for details.
19386 \end_layout
19387
19388 \begin_layout Subsection
19389 CVS commands in LyX
19390 \end_layout
19391
19392 \begin_layout Standard
19393 A subset of CVS operations is supported by LyX.
19394  You can find the commands in the 
19395 \family sans
19396 File\SpecialChar \menuseparator
19397 Version
19398 \begin_inset space ~
19399 \end_inset
19400
19401 Control
19402 \family default
19403  submenu.
19404  The version control system SVN is more powerful, so please use it instead
19405  of CVS if possible.
19406 \end_layout
19407
19408 \begin_layout Subsubsection
19409
19410 \family sans
19411 General CVS usage
19412 \end_layout
19413
19414 \begin_layout Standard
19415 If you start from scratch with CVS you have to create your repository and
19416  checkout the working copy with external tools.
19417  If you're using a client-server setup you may need to login before doing
19418  the first repository checkout.
19419 \end_layout
19420
19421 \begin_layout Standard
19422 If your documents are under revision control and others are using the same
19423  repository problems arise when different changes to the same document at
19424  the same location happen.
19425  Standard CVS repositories don't operate with a file locking mechanism.
19426  This may be surprising, but conflicts only occur if people disagree on
19427  the proper content of the same part of a document.
19428  So, if co-workers are used to communicate regularly, these conflicts occur
19429  rarely.
19430  If they don't communicate they have a fundamental problem anyway.
19431  Nevertheless some people like to work with so called 
19432 \begin_inset Quotes eld
19433 \end_inset
19434
19435 reserved checkouts
19436 \begin_inset Quotes erd
19437 \end_inset
19438
19439 .
19440  If they do so the working copy of all files is readonly when checked out
19441  first and the user starts editing after using a special command to make
19442  the working copy writable.
19443  When the changes are checked in the working copy returns to readonly state.
19444  With LyX one has to edit the 
19445 \begin_inset Flex Code
19446 status collapsed
19447
19448 \begin_layout Plain Layout
19449 .cvsrc
19450 \end_layout
19451
19452 \end_inset
19453
19454  file and add the line 
19455 \begin_inset Flex Code
19456 status collapsed
19457
19458 \begin_layout Plain Layout
19459 cvs -r
19460 \end_layout
19461
19462 \end_inset
19463
19464  to work with reserved checkouts.
19465  The benefit is the possibility to see who is using a writable copy of some
19466  document.
19467  It's not guaranteed only one user makes a copy writable.
19468 \end_layout
19469
19470 \begin_layout Standard
19471 LyX tries to guess if you're using reserved or non-reserved checkouts.
19472  If your working copy is readonly or it is writable and an additional copy
19473  of your document exists in the CVS/Base sub-directory a reserved otherwise
19474  a non-reserved checkout is assumed.
19475  When a reserved checkout is detected you have to use 
19476 \begin_inset Flex MenuItem
19477 status collapsed
19478
19479 \begin_layout Plain Layout
19480 Check Out
19481 \end_layout
19482
19483 \end_inset
19484
19485  to make your working copy writable if it's readonly.
19486  After doing so the 
19487 \begin_inset Flex MenuItem
19488 status collapsed
19489
19490 \begin_layout Plain Layout
19491 Check In
19492 \end_layout
19493
19494 \end_inset
19495
19496  operation is possible and that makes your working copy readonly again after
19497  transferring your changes to the repository.
19498 \end_layout
19499
19500 \begin_layout Standard
19501 More information about CVS can be found here 
19502 \begin_inset Flex URL
19503 status collapsed
19504
19505 \begin_layout Plain Layout
19506
19507 http://www.nongnu.org/cvs
19508 \end_layout
19509
19510 \end_inset
19511
19512  and here 
19513 \begin_inset Flex URL
19514 status collapsed
19515
19516 \begin_layout Plain Layout
19517
19518 http://ximbiot.com/cvs
19519 \end_layout
19520
19521 \end_inset
19522
19523 .
19524 \end_layout
19525
19526 \begin_layout Standard
19527 Read 
19528 \family typewriter
19529 man cvs
19530 \family default
19531  to understand the sub-commands and the switches mentioned below.
19532 \end_layout
19533
19534 \begin_layout Subsubsection
19535
19536 \family sans
19537 Register
19538 \end_layout
19539
19540 \begin_layout Standard
19541 If your document is not under revision control, this is the only item shown
19542  in the menu.
19543  And if it is under revision control, the 
19544 \family sans
19545 \bar under
19546 R
19547 \bar default
19548 egister
19549 \family default
19550  item is not visible.
19551  
19552 \end_layout
19553
19554 \begin_layout Standard
19555 This command registers in CVS your document 
19556 \begin_inset Flex Strong
19557 status collapsed
19558
19559 \begin_layout Plain Layout
19560
19561 \emph on
19562 only
19563 \end_layout
19564
19565 \end_inset
19566
19567  in the case you have already the documents directory under CVS control
19568  (in particular 
19569 \family typewriter
19570 CVS/Entries
19571 \family default
19572  file exists).
19573  This means you have to create or checkout the archive by yourself using
19574  external tools.
19575  (In case you forget that step LyX registers the document with RCS.)
19576 \end_layout
19577
19578 \begin_layout Standard
19579 Then you are asked interactively to supply an initial description of the
19580  document.
19581  Don't forget that registered file is not yet checked in.
19582 \end_layout
19583
19584 \begin_layout Standard
19585 CVS command that is run: 
19586 \family typewriter
19587 cvs -q add -m"<entered message>" "<file-name>"
19588 \end_layout
19589
19590 \begin_layout Standard
19591 The term 
19592 \family typewriter
19593 "<file-name>"
19594 \family default
19595  above and for all other CVS commands is an abbreviation for 
19596 \begin_inset Quotes eld
19597 \end_inset
19598
19599 change the current working directory to file location and use the file name
19600  without path component as argument
19601 \begin_inset Quotes erd
19602 \end_inset
19603
19604 .
19605 \end_layout
19606
19607 \begin_layout Subsubsection
19608
19609 \family sans
19610 Check In Changes
19611 \end_layout
19612
19613 \begin_layout Standard
19614 When you are finished editing a file, you commit your changes.
19615  When you do this and you had changed the document, you are asked for a
19616  description of the changes.
19617  After that changes are written to the repository.
19618  In case you didn't change the document and a reserved checkout is detected
19619  the reservation made on 
19620 \begin_inset Flex MenuItem
19621 status collapsed
19622
19623 \begin_layout Plain Layout
19624 Check Out
19625 \end_layout
19626
19627 \end_inset
19628
19629  is undone.
19630 \end_layout
19631
19632 \begin_layout Labeling
19633 \labelwidthstring 00.00.0000
19634 CVS
19635 \begin_inset space ~
19636 \end_inset
19637
19638 command: 
19639 \begin_inset space ~
19640 \end_inset
19641
19642
19643 \begin_inset Newline newline
19644 \end_inset
19645
19646
19647 \begin_inset Flex Code
19648 status collapsed
19649
19650 \begin_layout Plain Layout
19651 cvs 
19652 \family typewriter
19653 -q commit -m"<description>" "<file-name>"
19654 \end_layout
19655
19656 \end_inset
19657
19658  or
19659 \begin_inset Newline newline
19660 \end_inset
19661
19662
19663 \begin_inset Flex Code
19664 status collapsed
19665
19666 \begin_layout Plain Layout
19667 cvs -q unedit 
19668 \family typewriter
19669 "<file-name>"
19670 \end_layout
19671
19672 \end_inset
19673
19674
19675 \end_layout
19676
19677 \begin_layout Subsubsection
19678
19679 \family sans
19680 Check Out Changes
19681 \end_layout
19682
19683 \begin_layout Standard
19684 When you are sharing a repository with others, you may have to incorporate
19685  their changes into your working copy.
19686 \end_layout
19687
19688 \begin_layout Standard
19689 CVS command: 
19690 \family typewriter
19691 cvs -q update "<file-name>"
19692 \end_layout
19693
19694 \begin_layout Standard
19695 If a readonly checkout is detected the working copy is made writable and
19696  reserved.
19697 \end_layout
19698
19699 \begin_layout Standard
19700 CVS command: 
19701 \family typewriter
19702 cvs -q edit "<file-name>"
19703 \end_layout
19704
19705 \begin_layout Subsubsection
19706
19707 \family sans
19708 Revert To Repository Version
19709 \end_layout
19710
19711 \begin_layout Standard
19712 This will discard all changes made to the document since the last check
19713  in.
19714  You get a warning before changes are discarded.
19715  Firstly the file is deleted, secondly CVS update command is run.
19716 \end_layout
19717
19718 \begin_layout Standard
19719 CVS command: 
19720 \family typewriter
19721 cvs -q update "<file-name>"
19722 \end_layout
19723
19724 \begin_layout Standard
19725 If a reserved checkout is detected and the working copy has no changes only
19726  the reservation is undone.
19727 \end_layout
19728
19729 \begin_layout Standard
19730 CVS command: 
19731 \family typewriter
19732 cvs -q unedit "<file-name>"
19733 \end_layout
19734
19735 \begin_layout Subsubsection
19736
19737 \family sans
19738 Copy
19739 \end_layout
19740
19741 \begin_layout Standard
19742 This will create a copy of the current document.
19743  Since CVS does not support copy operations natively, the version history
19744  is not preserved, and the copy is added as a new file.
19745  It requires a clean document without any changes since the last checkin.
19746  You are asked for a file name and a description of the copy operation.
19747  After that the copy is created, both locally and in the repository.
19748  If the parent directories of the copied and original document differ, all
19749  relative paths of included files of the copy are adjusted (like in 
19750 \family sans
19751 File\SpecialChar \menuseparator
19752 Save As
19753 \family default
19754 \SpecialChar \ldots{}
19755 ).
19756  Finally, the copy is loaded instead of the original document.
19757 \end_layout
19758
19759 \begin_layout Labeling
19760 \labelwidthstring 00.00.0000
19761 CVS
19762 \begin_inset space ~
19763 \end_inset
19764
19765 commands: 
19766 \begin_inset space ~
19767 \end_inset
19768
19769
19770 \begin_inset Newline newline
19771 \end_inset
19772
19773 Copy 
19774 \begin_inset Flex Code
19775 status collapsed
19776
19777 \begin_layout Plain Layout
19778
19779 \family typewriter
19780 \begin_inset Quotes eld
19781 \end_inset
19782
19783 <file-name>
19784 \begin_inset Quotes erd
19785 \end_inset
19786
19787
19788 \end_layout
19789
19790 \end_inset
19791
19792  to 
19793 \begin_inset Flex Code
19794 status collapsed
19795
19796 \begin_layout Plain Layout
19797
19798 \family typewriter
19799 \begin_inset Quotes eld
19800 \end_inset
19801
19802 <new-file-name>
19803 \begin_inset Quotes erd
19804 \end_inset
19805
19806
19807 \end_layout
19808
19809 \end_inset
19810
19811
19812 \begin_inset Newline newline
19813 \end_inset
19814
19815
19816 \begin_inset Flex Code
19817 status collapsed
19818
19819 \begin_layout Plain Layout
19820 cvs -q add 
19821 \family typewriter
19822
19823 \begin_inset Quotes eld
19824 \end_inset
19825
19826 <new-file-name>
19827 \begin_inset Quotes erd
19828 \end_inset
19829
19830
19831 \end_layout
19832
19833 \end_inset
19834
19835
19836 \end_layout
19837
19838 \begin_layout Subsubsection
19839
19840 \family sans
19841 Rename
19842 \end_layout
19843
19844 \begin_layout Standard
19845 This will rename the current document.
19846  Since CVS does not support rename operations natively, the version history
19847  is not preserved, the renamed document is added as a new file, and the
19848  original document is deleted.
19849  It requires a clean document without any changes since the last checkin.
19850  You are asked for a file name and a description of the rename operation.
19851  After that the document is renamed, both locally and in the repository.
19852  If the parent directories of the new and old file names differ, all relative
19853  paths of included files are adjusted (like in 
19854 \family sans
19855 File\SpecialChar \menuseparator
19856 Save As
19857 \family default
19858 \SpecialChar \ldots{}
19859 ).
19860  Finally, the document is reloaded using the new name.
19861 \end_layout
19862
19863 \begin_layout Labeling
19864 \labelwidthstring 00.00.0000
19865 CVS
19866 \begin_inset space ~
19867 \end_inset
19868
19869 commands: 
19870 \begin_inset space ~
19871 \end_inset
19872
19873
19874 \begin_inset Newline newline
19875 \end_inset
19876
19877 Rename 
19878 \begin_inset Flex Code
19879 status collapsed
19880
19881 \begin_layout Plain Layout
19882
19883 \family typewriter
19884 \begin_inset Quotes eld
19885 \end_inset
19886
19887 <file-name>
19888 \begin_inset Quotes erd
19889 \end_inset
19890
19891
19892 \end_layout
19893
19894 \end_inset
19895
19896  to 
19897 \begin_inset Flex Code
19898 status collapsed
19899
19900 \begin_layout Plain Layout
19901
19902 \family typewriter
19903 \begin_inset Quotes eld
19904 \end_inset
19905
19906 <new-file-name>
19907 \begin_inset Quotes erd
19908 \end_inset
19909
19910
19911 \end_layout
19912
19913 \end_inset
19914
19915
19916 \begin_inset Newline newline
19917 \end_inset
19918
19919
19920 \begin_inset Flex Code
19921 status collapsed
19922
19923 \begin_layout Plain Layout
19924 cvs -q add 
19925 \family typewriter
19926
19927 \begin_inset Quotes eld
19928 \end_inset
19929
19930 <new-file-name>
19931 \begin_inset Quotes erd
19932 \end_inset
19933
19934
19935 \end_layout
19936
19937 \end_inset
19938
19939
19940 \begin_inset Newline newline
19941 \end_inset
19942
19943
19944 \begin_inset Flex Code
19945 status collapsed
19946
19947 \begin_layout Plain Layout
19948 cvs -q remove 
19949 \family typewriter
19950
19951 \begin_inset Quotes eld
19952 \end_inset
19953
19954 <file-name>
19955 \begin_inset Quotes erd
19956 \end_inset
19957
19958
19959 \end_layout
19960
19961 \end_inset
19962
19963
19964 \end_layout
19965
19966 \begin_layout Subsubsection
19967 Update of the local directory checkout from repository
19968 \end_layout
19969
19970 \begin_layout Standard
19971 Once your documents gets more complex, containing sub-documents and pictures,
19972  including external 
19973 \begin_inset Flex Code
19974 status collapsed
19975
19976 \begin_layout Plain Layout
19977 .tex
19978 \end_layout
19979
19980 \end_inset
19981
19982  files and so on using version control becomes more complicated.
19983  LyX supports updating the whole tree in which resides the document.
19984  This become especially useful once you cooperate with people which neither
19985  have detailed knowledge about CVS usage nor they have ambition to commit
19986  additional material to the repository.
19987  You have to organize the files structure so that all external files are
19988  in the same directory or subdirectories of the document.
19989  It's good practice anyway to store multipart documents in an extra directory.
19990 \end_layout
19991
19992 \begin_layout Standard
19993 The 
19994 \begin_inset Flex Code
19995 status collapsed
19996
19997 \begin_layout Plain Layout
19998 Update local directory from repository
19999 \end_layout
20000
20001 \end_inset
20002
20003  command updates the whole directory.
20004  If local changes are detected user is warned before update starts.
20005  In case of merge conflicts both versions of the conflicting document parts
20006  are placed in the final document.
20007  You have to review and correct the result of the merge.
20008  You'll find the conflicts enclosed in pairs of 
20009 \begin_inset Flex Code
20010 status collapsed
20011
20012 \begin_layout Plain Layout
20013 <<<<<<<
20014 \end_layout
20015
20016 \end_inset
20017
20018  and 
20019 \begin_inset Flex Code
20020 status collapsed
20021
20022 \begin_layout Plain Layout
20023 >>>>>>>
20024 \end_layout
20025
20026 \end_inset
20027
20028  separated by 
20029 \begin_inset Flex Code
20030 status collapsed
20031
20032 \begin_layout Plain Layout
20033 =======
20034 \end_layout
20035
20036 \end_inset
20037
20038 .
20039  The first part is your version as before the update operation with the
20040  document name prepended.
20041  The second one is the repository version with the version number after
20042  the sequence of 
20043 \begin_inset Flex Code
20044 status collapsed
20045
20046 \begin_layout Plain Layout
20047 >
20048 \end_layout
20049
20050 \end_inset
20051
20052  signs.
20053 \end_layout
20054
20055 \begin_layout Labeling
20056 \labelwidthstring 00.00.0000
20057 CVS
20058 \begin_inset space ~
20059 \end_inset
20060
20061 commands: 
20062 \begin_inset space ~
20063 \end_inset
20064
20065
20066 \begin_inset Newline newline
20067 \end_inset
20068
20069
20070 \begin_inset Flex Code
20071 status collapsed
20072
20073 \begin_layout Plain Layout
20074 cd $path; cvs diff 
20075 \family typewriter
20076 "."
20077 \end_layout
20078
20079 \end_inset
20080
20081  (Ask if changes are detected.)
20082 \begin_inset Newline newline
20083 \end_inset
20084
20085
20086 \begin_inset Flex Code
20087 status collapsed
20088
20089 \begin_layout Plain Layout
20090 cd $path; cvs -q update 
20091 \family typewriter
20092 "."
20093 \end_layout
20094
20095 \end_inset
20096
20097
20098 \end_layout
20099
20100 \begin_layout Standard
20101 where 
20102 \begin_inset Flex Code
20103 status collapsed
20104
20105 \begin_layout Plain Layout
20106 $path
20107 \end_layout
20108
20109 \end_inset
20110
20111  stands for the path to the document.
20112 \end_layout
20113
20114 \begin_layout Subsubsection
20115
20116 \family sans
20117 Show History
20118 \end_layout
20119
20120 \begin_layout Standard
20121 This shows the complete history of the CVS document.
20122  The output of 
20123 \family typewriter
20124 cvs log "<file-name>"
20125 \family default
20126  is shown in a browser.
20127 \end_layout
20128
20129 \begin_layout Subsubsection
20130 Revision info
20131 \end_layout
20132
20133 \begin_layout Standard
20134 LyX supports CVS version number, author name, date and time of last commit.
20135  All those are extracted from 
20136 \family typewriter
20137 cvs log -r <file-name>
20138 \family default
20139 .
20140  See 
20141 \begin_inset CommandInset ref
20142 LatexCommand ref
20143 reference "sub:VCS-Revision-Information"
20144
20145 \end_inset
20146
20147  for details.
20148 \end_layout
20149
20150 \begin_layout Subsection
20151 SVN commands in LyX
20152 \end_layout
20153
20154 \begin_layout Standard
20155 SVN is now partially supported by LyX.
20156  You can find the commands in the 
20157 \family sans
20158 File\SpecialChar \menuseparator
20159 Version
20160 \begin_inset space ~
20161 \end_inset
20162
20163 Control
20164 \family default
20165  submenu.
20166  Please note that if you use password protected access to repository via
20167  ssh, you will be asked in terminal window.
20168  LyX was tested against SVN 1.5, 1.6, 1.7 and 1.8
20169 \begin_inset Foot
20170 status open
20171
20172 \begin_layout Plain Layout
20173 Most of the commands will work with 1.4 too, see 
20174 \begin_inset CommandInset ref
20175 LatexCommand ref
20176 reference "sub:SVN-Repo-Update"
20177
20178 \end_inset
20179
20180 .
20181  There seems to be currently unresolved permissions problem under SVN 1.8
20182  with reverting changes when file is locked.
20183 \end_layout
20184
20185 \end_inset
20186
20187
20188 \end_layout
20189
20190 \begin_layout Subsubsection
20191
20192 \family sans
20193 Register
20194 \end_layout
20195
20196 \begin_layout Standard
20197 If your document is not under revision control, this is the only item shown
20198  in the menu.
20199  And if it is under revision control, the 
20200 \family sans
20201 \bar under
20202 R
20203 \bar default
20204 egister
20205 \family default
20206  item is not visible.
20207 \end_layout
20208
20209 \begin_layout Standard
20210 This command registers in SVN your document ONLY in case you have already
20211  the documents directory under SVN control (in particular 
20212 \family typewriter
20213 .svn/entries
20214 \family default
20215  file exists).
20216  This means you have to checkout the archive by yourself.
20217 \end_layout
20218
20219 \begin_layout Standard
20220 Then you are asked interactively to supply an initial description of the
20221  document.
20222  Don't forget that registered file is not yet commited.
20223 \end_layout
20224
20225 \begin_layout Standard
20226 SVN command that is run: 
20227 \family typewriter
20228 svn add -q 
20229 \begin_inset Quotes eld
20230 \end_inset
20231
20232 <file-name>
20233 \begin_inset Quotes erd
20234 \end_inset
20235
20236
20237 \end_layout
20238
20239 \begin_layout Standard
20240 Read 
20241 \family typewriter
20242 man svn
20243 \family default
20244  to understand the switches.
20245 \end_layout
20246
20247 \begin_layout Subsubsection
20248
20249 \family sans
20250 Check In Changes
20251 \end_layout
20252
20253 \begin_layout Standard
20254 When you are finished editing a file, you commit your changes.
20255  When you do this, you are asked for a description of the changes.
20256  After that changes are commited.
20257 \end_layout
20258
20259 \begin_layout Standard
20260 SVN command:
20261 \begin_inset Foot
20262 status collapsed
20263
20264 \begin_layout Plain Layout
20265 In case locking is not enabled.
20266  See Section 
20267 \begin_inset CommandInset ref
20268 LatexCommand ref
20269 reference "subsec:SVN-File-Locking"
20270
20271 \end_inset
20272
20273 .
20274 \end_layout
20275
20276 \end_inset
20277
20278  
20279 \family typewriter
20280 svn commit -q -m"<description>" <file-name>
20281 \end_layout
20282
20283 \begin_layout Subsubsection
20284
20285 \family sans
20286 Check Out For Edit
20287 \end_layout
20288
20289 \begin_layout Standard
20290 Updates the changes of this file from the repository.
20291  Be sure you understand SVN merging and conflicts resolving before using
20292  this function, because all conflicts has to be resolved manually by you!
20293 \end_layout
20294
20295 \begin_layout Standard
20296 SVN command:
20297 \begin_inset Foot
20298 status collapsed
20299
20300 \begin_layout Plain Layout
20301 Ditto.
20302 \end_layout
20303
20304 \end_inset
20305
20306  
20307 \family typewriter
20308 svn update --non-interactive 
20309 \begin_inset Quotes eld
20310 \end_inset
20311
20312 <file-name>
20313 \begin_inset Quotes erd
20314 \end_inset
20315
20316
20317 \end_layout
20318
20319 \begin_layout Subsubsection
20320
20321 \family sans
20322 Revert To Repository Version
20323 \end_layout
20324
20325 \begin_layout Standard
20326 This will discard all changes made to the document since the last check
20327  in.
20328  You get a warning before changes are discarded.
20329 \end_layout
20330
20331 \begin_layout Standard
20332 SVN command: 
20333 \family typewriter
20334 svn revert -q 
20335 \begin_inset Quotes eld
20336 \end_inset
20337
20338 <file-name>
20339 \begin_inset Quotes erd
20340 \end_inset
20341
20342
20343 \end_layout
20344
20345 \begin_layout Subsubsection
20346
20347 \family sans
20348 Copy
20349 \end_layout
20350
20351 \begin_layout Standard
20352 This will create a copy of the current document including the version history.
20353  It requires a clean document without any changes since the last checkin.
20354  You are asked for a file name and a description of the copy operation.
20355  After that the copy is created, both locally and in the repository.
20356  If the parent directories of the copied and original document differ, all
20357  relative paths of included files of the copy are adjusted (like in 
20358 \family sans
20359 File\SpecialChar \menuseparator
20360 Save As
20361 \family default
20362 \SpecialChar \ldots{}
20363 ).
20364  Finally, the copy is loaded instead of the original document.
20365 \end_layout
20366
20367 \begin_layout Labeling
20368 \labelwidthstring 00.00.0000
20369 SVN
20370 \begin_inset space ~
20371 \end_inset
20372
20373 commands: 
20374 \begin_inset space ~
20375 \end_inset
20376
20377
20378 \begin_inset Newline newline
20379 \end_inset
20380
20381
20382 \begin_inset Flex Code
20383 status collapsed
20384
20385 \begin_layout Plain Layout
20386 svn copy -q 
20387 \family typewriter
20388
20389 \begin_inset Quotes eld
20390 \end_inset
20391
20392 <file-name>
20393 \begin_inset Quotes erd
20394 \end_inset
20395
20396  
20397 \begin_inset Quotes eld
20398 \end_inset
20399
20400 <new-file-name>
20401 \begin_inset Quotes erd
20402 \end_inset
20403
20404
20405 \end_layout
20406
20407 \end_inset
20408
20409
20410 \begin_inset Newline newline
20411 \end_inset
20412
20413
20414 \begin_inset Flex Code
20415 status collapsed
20416
20417 \begin_layout Plain Layout
20418 svn commit
20419 \end_layout
20420
20421 \end_inset
20422
20423
20424 \end_layout
20425
20426 \begin_layout Subsubsection
20427
20428 \family sans
20429 Rename
20430 \end_layout
20431
20432 \begin_layout Standard
20433 This will rename the current document including the version history.
20434  It requires a clean document without any changes since the last checkin.
20435  You are asked for a file name and a description of the rename operation.
20436  After that the document is renamed, both locally and in the repository.
20437  If the parent directories of the new and old file names differ, all relative
20438  paths of included files are adjusted (like in 
20439 \family sans
20440 File\SpecialChar \menuseparator
20441 Save As
20442 \family default
20443 \SpecialChar \ldots{}
20444 ).
20445  Finally, the document is reloaded using the new name.
20446 \end_layout
20447
20448 \begin_layout Labeling
20449 \labelwidthstring 00.00.0000
20450 SVN
20451 \begin_inset space ~
20452 \end_inset
20453
20454 commands: 
20455 \begin_inset space ~
20456 \end_inset
20457
20458
20459 \begin_inset Newline newline
20460 \end_inset
20461
20462
20463 \begin_inset Flex Code
20464 status collapsed
20465
20466 \begin_layout Plain Layout
20467 svn move -q 
20468 \family typewriter
20469
20470 \begin_inset Quotes eld
20471 \end_inset
20472
20473 <file-name>
20474 \begin_inset Quotes erd
20475 \end_inset
20476
20477  
20478 \begin_inset Quotes eld
20479 \end_inset
20480
20481 <new-file-name>
20482 \begin_inset Quotes erd
20483 \end_inset
20484
20485
20486 \end_layout
20487
20488 \end_inset
20489
20490
20491 \begin_inset Newline newline
20492 \end_inset
20493
20494
20495 \begin_inset Flex Code
20496 status collapsed
20497
20498 \begin_layout Plain Layout
20499 svn commit
20500 \end_layout
20501
20502 \end_inset
20503
20504
20505 \end_layout
20506
20507 \begin_layout Subsubsection
20508 \begin_inset CommandInset label
20509 LatexCommand label
20510 name "sub:SVN-Repo-Update"
20511
20512 \end_inset
20513
20514 Update of the local directory checkout from repository
20515 \begin_inset Foot
20516 status collapsed
20517
20518 \begin_layout Plain Layout
20519 Note that this command will work only with subversion 
20520 \begin_inset Formula $\geqq1.5$
20521 \end_inset
20522
20523
20524 \end_layout
20525
20526 \end_inset
20527
20528
20529 \end_layout
20530
20531 \begin_layout Standard
20532 All the commands above have one shortcomming - they deal with the current
20533  document only.
20534  Once your document contains pictures, includes external 
20535 \begin_inset Flex Code
20536 status collapsed
20537
20538 \begin_layout Plain Layout
20539 .tex
20540 \end_layout
20541
20542 \end_inset
20543
20544  files and so on administration becomes more complicated.
20545  LyX now supports updating the whole tree in which resides the document
20546 \begin_inset Foot
20547 status collapsed
20548
20549 \begin_layout Plain Layout
20550 One need to organize the files structure so that all external files are
20551  in the same directory or subdirectories of the document.
20552  
20553 \end_layout
20554
20555 \end_inset
20556
20557 .
20558  This become especially useful once you cooperate with people which neither
20559  know about subversion management nor they have ambition to commit additional
20560  material to the repository.
20561  
20562 \end_layout
20563
20564 \begin_layout Standard
20565 \begin_inset Flex Code
20566 status collapsed
20567
20568 \begin_layout Plain Layout
20569 Update local directory from repository
20570 \end_layout
20571
20572 \end_inset
20573
20574  command updates the whole directory and in case of merge conflicts local
20575  version of the files are left, so no unintended data loss occurs.
20576  If local changes are detected user is warned before update starts.
20577 \end_layout
20578
20579 \begin_layout Labeling
20580 \labelwidthstring 00.00.0000
20581 SVN
20582 \begin_inset space ~
20583 \end_inset
20584
20585 commands: 
20586 \begin_inset space ~
20587 \end_inset
20588
20589
20590 \begin_inset Newline newline
20591 \end_inset
20592
20593
20594 \begin_inset Flex Code
20595 status collapsed
20596
20597 \begin_layout Plain Layout
20598 svn diff $path
20599 \end_layout
20600
20601 \end_inset
20602
20603  (Ask if changes are detected.)
20604 \begin_inset Newline newline
20605 \end_inset
20606
20607
20608 \begin_inset Flex Code
20609 status collapsed
20610
20611 \begin_layout Plain Layout
20612 svn update --accept mine-full $path
20613 \end_layout
20614
20615 \end_inset
20616
20617
20618 \end_layout
20619
20620 \begin_layout Standard
20621 where 
20622 \begin_inset Flex Code
20623 status collapsed
20624
20625 \begin_layout Plain Layout
20626 $path
20627 \end_layout
20628
20629 \end_inset
20630
20631  stands for the path to the document.
20632 \end_layout
20633
20634 \begin_layout Subsubsection
20635
20636 \family sans
20637 Show History
20638 \end_layout
20639
20640 \begin_layout Standard
20641 This shows the complete history of the SVN document.
20642  The output of 
20643 \family typewriter
20644 svn log 
20645 \begin_inset Quotes eld
20646 \end_inset
20647
20648 <file-name>
20649 \begin_inset Quotes erd
20650 \end_inset
20651
20652
20653 \family default
20654  is shown in a browser.
20655 \end_layout
20656
20657 \begin_layout Subsubsection
20658 File Locking
20659 \begin_inset CommandInset label
20660 LatexCommand label
20661 name "subsec:SVN-File-Locking"
20662
20663 \end_inset
20664
20665
20666 \end_layout
20667
20668 \begin_layout Standard
20669 The file exchange through various revision control systems brings the problem
20670  of merge conflicts in case two different users try to edit the same (parts
20671  of) document.
20672  When such a conflict happens it needs manual resolving and one reasonable
20673  alternative is to provide some kind of locking mechanism, which guarantees
20674  that only one user is allowed to edit file at the given time.
20675 \end_layout
20676
20677 \begin_layout Standard
20678 SVN has two such mechanisms to provide mutual exclusivity for file access
20679  - locks and automatic setting of write permissions (see sec.
20680  
20681 \begin_inset CommandInset ref
20682 LatexCommand ref
20683 reference "subsec:Automatical-Locking-Property"
20684
20685 \end_inset
20686
20687 ) based on 
20688 \begin_inset Flex Code
20689 status collapsed
20690
20691 \begin_layout Plain Layout
20692 svn:needs-lock
20693 \end_layout
20694
20695 \end_inset
20696
20697  file svn property
20698 \begin_inset Foot
20699 status open
20700
20701 \begin_layout Plain Layout
20702 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20703 \end_layout
20704
20705 \end_inset
20706
20707 .
20708  If this property is detected for a given document LyX starts to use SVN
20709  locks for document editing automatically and the whole check-in/out mechanism
20710  switches to the same regimen as for RCS.
20711  This in particular means there are two different modes of file use in LyX:
20712 \end_layout
20713
20714 \begin_layout Itemize
20715 Unlocked state.
20716  The loaded file is in the read-only mode.
20717  For editing on needs to check-out.
20718  
20719 \emph on
20720 Check-out
20721 \emph default
20722  consists of updating from the repository and gaining write lock.
20723  If the lock is not possible to obtain, we remain in unlocked state.
20724 \end_layout
20725
20726 \begin_layout Itemize
20727 Locked state.
20728  The loaded file is in the 'normal' edit mode.
20729  No other user is allowed to edit the file.
20730  
20731 \emph on
20732 Check-in
20733 \emph default
20734  consists of commiting changes and releasing write-lock.
20735  If no changes have been made to the document, no commit will be produced
20736 \begin_inset Foot
20737 status collapsed
20738
20739 \begin_layout Plain Layout
20740 Don't be puzzled by the fact that you will be asked for commit message anyway.
20741 \end_layout
20742
20743 \end_inset
20744
20745  and only the write-lock will be released.
20746 \end_layout
20747
20748 \begin_layout Standard
20749 SVN commands:
20750 \end_layout
20751
20752 \begin_layout Labeling
20753 \labelwidthstring 00.00.0000
20754 Check-in:
20755 \family typewriter
20756  svn commit -q -m"<description>" "<file-name>"
20757 \begin_inset Newline newline
20758 \end_inset
20759
20760 svn unlock "<file-name>"
20761 \end_layout
20762
20763 \begin_layout Labeling
20764 \labelwidthstring 00.00.0000
20765 Check-out: 
20766 \family typewriter
20767 svn update "<file-name>"
20768 \begin_inset Newline newline
20769 \end_inset
20770
20771 svn lock "<file-name>"
20772 \end_layout
20773
20774 \begin_layout Subsubsection
20775
20776 \family typewriter
20777 \begin_inset CommandInset label
20778 LatexCommand label
20779 name "subsec:Automatical-Locking-Property"
20780
20781 \end_inset
20782
20783
20784 \family default
20785 Automatic Locking Property
20786 \end_layout
20787
20788 \begin_layout Standard
20789 The above mentioned automatic setting of write permissions of the .lyx file
20790  can be set through
20791 \family sans
20792 \bar under
20793  F
20794 \bar default
20795 ile\SpecialChar \menuseparator
20796
20797 \bar under
20798 V
20799 \bar default
20800 ersion
20801 \begin_inset space ~
20802 \end_inset
20803
20804 Control\SpecialChar \menuseparator
20805
20806 \bar under
20807 T
20808 \bar default
20809 oggle locking property
20810 \family default
20811 .
20812  This command is active only when the file is not locked on the svn server
20813  (i.e.
20814  you need to check-out before proceeding).
20815 \end_layout
20816
20817 \begin_layout Labeling
20818 \labelwidthstring 00.00.0000
20819 SVN
20820 \begin_inset space ~
20821 \end_inset
20822
20823 commands:
20824 \end_layout
20825
20826 \begin_layout Labeling
20827 \labelwidthstring 00.00.0000
20828 Set:
20829 \family typewriter
20830  svn propset svn:needs-lock ON "<file-name>"
20831 \end_layout
20832
20833 \begin_layout Labeling
20834 \labelwidthstring 00.00.0000
20835 Unset: 
20836 \family typewriter
20837 svn propdel svn:needs-lock "<file-name>"
20838 \end_layout
20839
20840 \begin_layout Subsubsection
20841 \begin_inset CommandInset label
20842 LatexCommand label
20843 name "sub:VCS-Revision-Information"
20844
20845 \end_inset
20846
20847 Revision Information in Documents
20848 \end_layout
20849
20850 \begin_layout Standard
20851 There are more possibilities how to activate revision information in our
20852  document.
20853 \end_layout
20854
20855 \begin_layout Itemize
20856 LyX supports directly:
20857 \end_layout
20858
20859 \begin_deeper
20860 \begin_layout Itemize
20861 tree revision information (
20862 \begin_inset Flex Code
20863 status collapsed
20864
20865 \begin_layout Plain Layout
20866 vcs-tree-revision
20867 \end_layout
20868
20869 \end_inset
20870
20871 ).
20872  The result is the output of the 
20873 \begin_inset Flex Code
20874 status collapsed
20875
20876 \begin_layout Plain Layout
20877 svnversion
20878 \end_layout
20879
20880 \end_inset
20881
20882  command, the following table gives you an idea, how to read the results.
20883 \end_layout
20884
20885 \begin_layout Standard
20886 \align center
20887 \begin_inset Tabular
20888 <lyxtabular version="3" rows="6" columns="2">
20889 <features rotate="0" tabularvalignment="middle">
20890 <column alignment="center" valignment="top">
20891 <column alignment="center" valignment="top">
20892 <row>
20893 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20894 \begin_inset Text
20895
20896 \begin_layout Plain Layout
20897 Output
20898 \end_layout
20899
20900 \end_inset
20901 </cell>
20902 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20903 \begin_inset Text
20904
20905 \begin_layout Plain Layout
20906 Meaning
20907 \end_layout
20908
20909 \end_inset
20910 </cell>
20911 </row>
20912 <row>
20913 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20914 \begin_inset Text
20915
20916 \begin_layout Plain Layout
20917 4123:4168
20918 \end_layout
20919
20920 \end_inset
20921 </cell>
20922 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20923 \begin_inset Text
20924
20925 \begin_layout Plain Layout
20926 mixed revision working copy
20927 \end_layout
20928
20929 \end_inset
20930 </cell>
20931 </row>
20932 <row>
20933 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20934 \begin_inset Text
20935
20936 \begin_layout Plain Layout
20937 4168M
20938 \end_layout
20939
20940 \end_inset
20941 </cell>
20942 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20943 \begin_inset Text
20944
20945 \begin_layout Plain Layout
20946 modified working copy
20947 \end_layout
20948
20949 \end_inset
20950 </cell>
20951 </row>
20952 <row>
20953 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20954 \begin_inset Text
20955
20956 \begin_layout Plain Layout
20957 4123S
20958 \end_layout
20959
20960 \end_inset
20961 </cell>
20962 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20963 \begin_inset Text
20964
20965 \begin_layout Plain Layout
20966 switched working copy
20967 \end_layout
20968
20969 \end_inset
20970 </cell>
20971 </row>
20972 <row>
20973 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20974 \begin_inset Text
20975
20976 \begin_layout Plain Layout
20977 4123P
20978 \end_layout
20979
20980 \end_inset
20981 </cell>
20982 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20983 \begin_inset Text
20984
20985 \begin_layout Plain Layout
20986 partial working copy, from a sparse checkout
20987 \end_layout
20988
20989 \end_inset
20990 </cell>
20991 </row>
20992 <row>
20993 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20994 \begin_inset Text
20995
20996 \begin_layout Plain Layout
20997 4123:4168MS
20998 \end_layout
20999
21000 \end_inset
21001 </cell>
21002 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
21003 \begin_inset Text
21004
21005 \begin_layout Plain Layout
21006 mixed revision, modified, switched working copy
21007 \end_layout
21008
21009 \end_inset
21010 </cell>
21011 </row>
21012 </lyxtabular>
21013
21014 \end_inset
21015
21016
21017 \end_layout
21018
21019 \begin_layout Itemize
21020 file revision information.
21021  The result comes from parsing the output of 
21022 \begin_inset Flex Code
21023 status collapsed
21024
21025 \begin_layout Plain Layout
21026 svn
21027 \begin_inset space ~
21028 \end_inset
21029
21030 info
21031 \begin_inset space ~
21032 \end_inset
21033
21034 --xml
21035 \begin_inset space ~
21036 \end_inset
21037
21038 file.lyx
21039 \end_layout
21040
21041 \end_inset
21042
21043 .
21044  Supported flags are:
21045 \end_layout
21046
21047 \begin_deeper
21048 \begin_layout Itemize
21049 version number of the last commit (
21050 \begin_inset Flex Code
21051 status collapsed
21052
21053 \begin_layout Plain Layout
21054 vcs-revision
21055 \end_layout
21056
21057 \end_inset
21058
21059 )
21060 \end_layout
21061
21062 \begin_layout Itemize
21063 author of the last commit (
21064 \begin_inset Flex Code
21065 status collapsed
21066
21067 \begin_layout Plain Layout
21068 vcs-author
21069 \end_layout
21070
21071 \end_inset
21072
21073 )
21074 \end_layout
21075
21076 \begin_layout Itemize
21077 date of the last commit (
21078 \begin_inset Flex Code
21079 status collapsed
21080
21081 \begin_layout Plain Layout
21082 vcs-date
21083 \end_layout
21084
21085 \end_inset
21086
21087 )
21088 \end_layout
21089
21090 \begin_layout Itemize
21091 time of the last commit (
21092 \begin_inset Flex Code
21093 status collapsed
21094
21095 \begin_layout Plain Layout
21096 vcs-time
21097 \end_layout
21098
21099 \end_inset
21100
21101 )
21102 \end_layout
21103
21104 \end_deeper
21105 \begin_layout Standard
21106 You can obtain this info via InsetInfo (e.g.
21107  
21108 \begin_inset Flex Code
21109 status collapsed
21110
21111 \begin_layout Plain Layout
21112 info-insert buffer vcs-date
21113 \end_layout
21114
21115 \end_inset
21116
21117 ).
21118  The information will be available only when you have the file stored under
21119  svn managment (i.e.
21120  the 
21121 \begin_inset Flex Code
21122 status collapsed
21123
21124 \begin_layout Plain Layout
21125 .svn
21126 \end_layout
21127
21128 \end_inset
21129
21130  directory is available with your document).
21131 \end_layout
21132
21133 \end_deeper
21134 \begin_layout Itemize
21135 Another---a hacking one---possibility is to use svn keywords
21136 \begin_inset Foot
21137 status collapsed
21138
21139 \begin_layout Plain Layout
21140 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
21141 \end_layout
21142
21143 \end_inset
21144
21145 .
21146  In short -- you set file keywords property (e.g.
21147  
21148 \family sans
21149 svn propset svn:keywords 'Rev' file.lyx
21150 \family default
21151 ) and then paste keyword TeX code
21152 \begin_inset Foot
21153 status collapsed
21154
21155 \begin_layout Plain Layout
21156 This is an easy way how to ensure that LyX won't break the line in the middle
21157  of keyword tag.
21158 \end_layout
21159
21160 \end_inset
21161
21162  tag in your document (e.g.
21163  
21164 \begin_inset ERT
21165 status open
21166
21167 \begin_layout Plain Layout
21168
21169 $Rev$
21170 \end_layout
21171
21172 \end_inset
21173
21174 ).
21175  This way svn client will automatically substitute revision number (e.g.
21176  
21177 \begin_inset ERT
21178 status open
21179
21180 \begin_layout Plain Layout
21181
21182 $Rev: 59 $
21183 \end_layout
21184
21185 \end_inset
21186
21187 ) after each update and commit.
21188  There are more problems with this approach.
21189  Firstly, the '$' character is used in TeX world for math equations, so
21190  any occurence of math formula 
21191 \begin_inset Formula $Rev$
21192 \end_inset
21193
21194  become 
21195 \begin_inset Formula $Rev:59$
21196 \end_inset
21197
21198  in your LyX document.
21199  Similarly for other keywords like Id, Date, Author, etc.
21200  Secondly svn output is dependent on your locales, so its very easy that
21201  svn would produce some problematic strings once Date is used.
21202  Thirdly you get the whole 'Rev: 59' string in your document instead of
21203  the plain number.
21204  Until subversion implements user's custom keywords it will be hard to use
21205  this approach reliably or let LyX to support it directly.
21206 \end_layout
21207
21208 \begin_layout Subsection
21209 SVN and Windows Environment
21210 \end_layout
21211
21212 \begin_layout Quote
21213 My inclination is to say that if the user cannot figure out the command
21214  line operations on their own fairly quickly, they would be well advised
21215  to use TortoiseSVN.
21216  ---P.
21217  A.
21218  Rubin
21219 \end_layout
21220
21221 \begin_layout Subsubsection
21222 Preparation
21223 \end_layout
21224
21225 \begin_layout Standard
21226 In addition to installing LyX, and having access to a Subversion repository,
21227  the user will need to install the Subversion client program.
21228  A Windows installer for the client program is available from 
21229 \begin_inset CommandInset href
21230 LatexCommand href
21231 name "CollabNet"
21232 target "http://www.collab.net/nonav/downloads/subversion/"
21233
21234 \end_inset
21235
21236 .
21237  The user may also want to install 
21238 \begin_inset CommandInset href
21239 LatexCommand href
21240 name "TortoiseSVN"
21241 target "http://tortoisesvn.tigris.org/"
21242
21243 \end_inset
21244
21245 , which integrates Subversion operations into the context (rightclick) menu
21246  of Windows Explorer.
21247  Operations done outside LyX will typically be more convenient using the
21248  Explorer context menu.
21249  Note that TortoiseSVN is not a replacement for the client program, which
21250  is what LyX itself will use.
21251 \end_layout
21252
21253 \begin_layout Subsubsection
21254 Bringing a document under Subversion control
21255 \end_layout
21256
21257 \begin_layout Standard
21258 Before a LyX document can be brought under version control in Subversion,
21259  its parent directory needs to be under version control.
21260  If the document is being added to a project already in the repository,
21261  this is accomplished by checking the project out to the directory where
21262  the new document will be placed.
21263  If the project itself is not yet under version control (for instance, if
21264  this document starts a new project), the directory must be imported into
21265  the repository.
21266  This is done outside LyX.
21267  Both import and checkout are easily accomplished from the Explorer context
21268  menu using TortoiseSVN, or alternatively can be done using the command
21269  line client at a DOS prompt.
21270  The procedure for importing the project using TortoiseSVN is described
21271  below, assuming an existing repository and a new project being started
21272  in 
21273 \family typewriter
21274 C:
21275 \backslash
21276 new project
21277 \family default
21278 .
21279  For information on using the Subversion client program, run 
21280 \family typewriter
21281 svn --help 
21282 \family default
21283 in a DOS shell.
21284 \end_layout
21285
21286 \begin_layout Enumerate
21287 Locate 
21288 \family typewriter
21289 C:
21290 \backslash
21291 new project 
21292 \family default
21293 in Windows Explorer, right click it, and select 
21294 \family sans
21295 TortoiseSVN\SpecialChar \menuseparator
21296 Repo-browser
21297 \family default
21298 .
21299  If necessary, adjust the URL for the repository, then click OK.
21300 \end_layout
21301
21302 \begin_layout Enumerate
21303 Right click the level of the repository under which you want to place the
21304  new project folder (typically the top level) and click 
21305 \family sans
21306 Create folder
21307 \family default
21308  Supply a name for the project folder and click OK.
21309  Add a message for the log file if desired, then click OK again.
21310  The new project folder should appear in the repository.
21311  Finally, click OK again to exit the repository browser.
21312 \end_layout
21313
21314 \begin_layout Enumerate
21315 Once again right click 
21316 \family typewriter
21317 C:
21318 \backslash
21319 new project
21320 \family default
21321 , this time selecting SVN Checkout\SpecialChar \ldots{}
21322  Select the URL of the project folder
21323  you just created in the repository, and set the checkout directory to 
21324 \family typewriter
21325 C:
21326 \backslash
21327 new project.
21328
21329 \family default
21330  Click OK.
21331  You will be warned about a non-empty folder; click OK to proceed.
21332  You should now have a 
21333 \family typewriter
21334 .svn
21335 \family default
21336  directory under 
21337 \family typewriter
21338 C:
21339 \backslash
21340 new project.
21341 \end_layout
21342
21343 \begin_layout Enumerate
21344 Create or open your document in LyX and click 
21345 \family sans
21346 File\SpecialChar \menuseparator
21347 Version
21348 \begin_inset space ~
21349 \end_inset
21350
21351 Control\SpecialChar \menuseparator
21352 Register.
21353  
21354 \family default
21355 Add a log message and click OK to commit the document to version control.
21356 \end_layout
21357
21358 \begin_layout Standard
21359 From this point onward, you should have full functionality in the 
21360 \family sans
21361 File\SpecialChar \menuseparator
21362 Version
21363 \begin_inset space ~
21364 \end_inset
21365
21366 Control
21367 \family default
21368  menu.
21369  You also have the option of checking the document in and out, viewing its
21370  history, etc.
21371  using the TortoiseSVN context menu in Windows Explorer or the Subversion
21372  client program from a command prompt.
21373 \end_layout
21374
21375 \begin_layout Subsubsection
21376 SSH tunnel used with SVN under Windows
21377 \end_layout
21378
21379 \begin_layout Standard
21380 Compared with Linux setting up an svn client to communicate over ssh under
21381  Windows is a rather troublesome task.
21382  We will at least offer some hints how to setup the client side but prior
21383  knowledge about ssh and the Windows command line is needed, also be prepared
21384  for a great deal of frustration\SpecialChar \ldots{}
21385
21386 \end_layout
21387
21388 \begin_layout Enumerate
21389 Get an svn client for windows, as described in the previous sections.
21390  When it is a fresh install run some svn command (e.g.
21391  
21392 \begin_inset Flex Code
21393 status collapsed
21394
21395 \begin_layout Plain Layout
21396 svn --version
21397 \end_layout
21398
21399 \end_inset
21400
21401 ) to create config files, which you will need to change later on.
21402 \end_layout
21403
21404 \begin_layout Enumerate
21405 Choose an ssh client for Windows.
21406  There are several possibilities, we will use the one from Putty tools
21407 \begin_inset Foot
21408 status collapsed
21409
21410 \begin_layout Plain Layout
21411 \begin_inset Flex URL
21412 status collapsed
21413
21414 \begin_layout Plain Layout
21415
21416 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21417 \end_layout
21418
21419 \end_inset
21420
21421
21422 \end_layout
21423
21424 \end_inset
21425
21426 .
21427  You will need to set the connection up so that the client doesn't ask for
21428  any password from you.
21429  To keep things easy we will use only keys without any additional password
21430  protection etc.
21431 \end_layout
21432
21433 \begin_deeper
21434 \begin_layout Enumerate
21435 Generate keys by 
21436 \begin_inset Flex Code
21437 status collapsed
21438
21439 \begin_layout Plain Layout
21440 puttygen
21441 \end_layout
21442
21443 \end_inset
21444
21445 .
21446  Save your private .ppk key file and put the public one on the server side.
21447  If the SVN server runs on Linux, note that the format of the public key
21448  is not compatible with Linux openssh and you will need to direcly copy-paste
21449  the key from the “
21450 \emph on
21451 Public key for pasting into OpenSSH authorized_keys file
21452 \emph default
21453 :” edit field into the server's 
21454 \begin_inset Flex Code
21455 status collapsed
21456
21457 \begin_layout Plain Layout
21458 ~/.ssh/authorized_keys
21459 \end_layout
21460
21461 \end_inset
21462
21463  / 
21464 \begin_inset Flex Code
21465 status collapsed
21466
21467 \begin_layout Plain Layout
21468 authorized_keys2
21469 \end_layout
21470
21471 \end_inset
21472
21473  file.
21474 \end_layout
21475
21476 \begin_layout Enumerate
21477 Get the Putty's 
21478 \begin_inset Flex Code
21479 status collapsed
21480
21481 \begin_layout Plain Layout
21482 plink
21483 \end_layout
21484
21485 \end_inset
21486
21487 .
21488  In the SVN config file
21489 \begin_inset Foot
21490 status collapsed
21491
21492 \begin_layout Plain Layout
21493 Exact path depends on Windows version, usually somewhere around 
21494 \begin_inset Flex Code
21495 status collapsed
21496
21497 \begin_layout Plain Layout
21498 c:
21499 \backslash
21500 Documents and Settings
21501 \backslash
21502 user
21503 \backslash
21504 Application Data
21505 \backslash
21506 Subversion
21507 \backslash
21508 config
21509 \end_layout
21510
21511 \end_inset
21512
21513  / 
21514 \begin_inset Flex Code
21515 status collapsed
21516
21517 \begin_layout Plain Layout
21518 AppData
21519 \backslash
21520 Roaming
21521 \backslash
21522 Subversion
21523 \end_layout
21524
21525 \end_inset
21526
21527 .
21528 \end_layout
21529
21530 \end_inset
21531
21532 , section [tunnels], setup ssh command, e.g.
21533  
21534 \begin_inset Flex Code
21535 status collapsed
21536
21537 \begin_layout Plain Layout
21538 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21539 \end_layout
21540
21541 \end_inset
21542
21543 .
21544 \begin_inset Foot
21545 status collapsed
21546
21547 \begin_layout Plain Layout
21548 It will usually take a lot of time to get exact command right and it depends
21549  on many things.
21550  For example do not have some remote server saved as a default session in
21551  Putty etc.
21552  If things fail, try to connect via plink without SVN first.
21553 \end_layout
21554
21555 \end_inset
21556
21557
21558 \end_layout
21559
21560 \end_deeper
21561 \begin_layout Enumerate
21562 Checkout the SVN archive, e.
21563 \begin_inset space \thinspace{}
21564 \end_inset
21565
21566 g.
21567 \begin_inset Newline newline
21568 \end_inset
21569
21570
21571 \begin_inset Flex Code
21572 status collapsed
21573
21574 \begin_layout Plain Layout
21575 svn co svn+ssh://user@server/repository_path
21576 \end_layout
21577
21578 \end_inset
21579
21580 .
21581 \end_layout
21582
21583 \begin_layout Subsubsection
21584 End-of-Line Conversions
21585 \end_layout
21586
21587 \begin_layout Standard
21588 When the collaborators are mixing Linux and Windows environments, LyX will
21589  use different line endings inside the .lyx files.
21590  This is not a problem as far as LyX functionality is concerned, but the
21591  commit diffs will be huge and merge-conflicts prone.
21592  Fortunately SVN itself knows
21593 \begin_inset Foot
21594 status collapsed
21595
21596 \begin_layout Plain Layout
21597 \begin_inset Flex URL
21598 status collapsed
21599
21600 \begin_layout Plain Layout
21601
21602 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21603 \end_layout
21604
21605 \end_inset
21606
21607
21608 \end_layout
21609
21610 \end_inset
21611
21612  how to deal with CR/LF problems when switching .lyx files to the 
21613 \begin_inset Flex Code
21614 status collapsed
21615
21616 \begin_layout Plain Layout
21617 native
21618 \end_layout
21619
21620 \end_inset
21621
21622  mode.
21623 \begin_inset Foot
21624 status collapsed
21625
21626 \begin_layout Plain Layout
21627 For the lazy guys: 
21628 \begin_inset Flex Code
21629 status collapsed
21630
21631 \begin_layout Plain Layout
21632 svn propset svn:eol-style native FILE_NAME
21633 \end_layout
21634
21635 \end_inset
21636
21637
21638 \end_layout
21639
21640 \end_inset
21641
21642
21643 \end_layout
21644
21645 \begin_layout Subsection
21646 GIT commands in LyX
21647 \end_layout
21648
21649 \begin_layout Standard
21650 A minimal subset of GIT commands is now supported by LyX.
21651  You can find the commands in the 
21652 \family sans
21653 File\SpecialChar \menuseparator
21654 Version
21655 \begin_inset space ~
21656 \end_inset
21657
21658 Control
21659 \family default
21660  submenu.
21661  Please note that if you use password protected access to repository via
21662  ssh, you will be asked in terminal window.
21663  LyX was tested against GIT 1.7.
21664 \end_layout
21665
21666 \begin_layout Standard
21667 One big difference of GIT and the other supported version control systems
21668  is the distributed nature of GIT: With traditional version control systems
21669  there is one central server which hosts the repository.
21670  Users commit their changes to the server, and get updates made by other
21671  users from it.
21672  With GIT, users commit to a local repository.
21673  The local repository can be synchronized with one or more remote repositories
21674  using the 
21675 \begin_inset Flex Code
21676 status collapsed
21677
21678 \begin_layout Plain Layout
21679 pull
21680 \end_layout
21681
21682 \end_inset
21683
21684  and 
21685 \begin_inset Flex Code
21686 status collapsed
21687
21688 \begin_layout Plain Layout
21689 push
21690 \end_layout
21691
21692 \end_inset
21693
21694  GIT commands.
21695  LyX does not interact in any way with remote GIT repositories.
21696  It works exclusively with the local repository in a very similar way as
21697  with a central CVS or SVN repository.
21698  If you use remote GIT repositories you need to do the 
21699 \begin_inset Flex Code
21700 status collapsed
21701
21702 \begin_layout Plain Layout
21703 pull
21704 \end_layout
21705
21706 \end_inset
21707
21708  and 
21709 \begin_inset Flex Code
21710 status collapsed
21711
21712 \begin_layout Plain Layout
21713 push
21714 \end_layout
21715
21716 \end_inset
21717
21718  operations with your favourite GIT client.
21719 \end_layout
21720
21721 \begin_layout Subsubsection
21722
21723 \family sans
21724 Register
21725 \end_layout
21726
21727 \begin_layout Standard
21728 If your document is not under revision control, this is the only item shown
21729  in the menu.
21730  And if it is under revision control, the 
21731 \family sans
21732 \bar under
21733 R
21734 \bar default
21735 egister
21736 \family default
21737  item is not visible.
21738 \end_layout
21739
21740 \begin_layout Standard
21741 This command registers in GIT your document ONLY in case you have already
21742  the documents directory under GIT control (in particular 
21743 \family typewriter
21744 .git/index
21745 \family default
21746  file exists).
21747  This means you have to checkout the archive by yourself.
21748 \end_layout
21749
21750 \begin_layout Standard
21751 Then you are asked interactively to supply an initial description of the
21752  document.
21753  Don't forget that registered file is not yet commited.
21754 \end_layout
21755
21756 \begin_layout Standard
21757 GIT command that is run: 
21758 \family typewriter
21759 git add 
21760 \begin_inset Quotes eld
21761 \end_inset
21762
21763 <file-name>
21764 \begin_inset Quotes erd
21765 \end_inset
21766
21767
21768 \end_layout
21769
21770 \begin_layout Standard
21771 Read 
21772 \family typewriter
21773 man git
21774 \family default
21775  to understand the switches.
21776 \end_layout
21777
21778 \begin_layout Subsubsection
21779
21780 \family sans
21781 Check In Changes
21782 \end_layout
21783
21784 \begin_layout Standard
21785 When you are finished editing a file, you commit your changes.
21786  When you do this, you are asked for a description of the changes.
21787  After that changes are commited.
21788 \end_layout
21789
21790 \begin_layout Standard
21791 GIT command: 
21792 \family typewriter
21793 git commit -q -m"<description>" <file-name>
21794 \end_layout
21795
21796 \begin_layout Subsubsection
21797
21798 \family sans
21799 Revert To Repository Version
21800 \end_layout
21801
21802 \begin_layout Standard
21803 This will discard all changes made to the document since the last check
21804  in.
21805  You get a warning before changes are discarded.
21806 \end_layout
21807
21808 \begin_layout Standard
21809 GIT command: 
21810 \family typewriter
21811 git checkout -q 
21812 \begin_inset Quotes eld
21813 \end_inset
21814
21815 <file-name>
21816 \begin_inset Quotes erd
21817 \end_inset
21818
21819
21820 \end_layout
21821
21822 \begin_layout Subsubsection
21823
21824 \family sans
21825 Rename
21826 \end_layout
21827
21828 \begin_layout Standard
21829 This will rename the current document including the version history.
21830  It requires a clean document without any changes since the last checkin.
21831  You are asked for a file name and a description of the rename operation.
21832  After that the document is renamed, both locally and in the repository.
21833  If the parent directories of the new and old file names differ, all relative
21834  paths of included files are adjusted (like in 
21835 \family sans
21836 File\SpecialChar \menuseparator
21837 Save As
21838 \family default
21839 \SpecialChar \ldots{}
21840 ).
21841  Finally, the document is reloaded using the new name.
21842 \end_layout
21843
21844 \begin_layout Labeling
21845 \labelwidthstring 00.00.0000
21846 GIT
21847 \begin_inset space ~
21848 \end_inset
21849
21850 commands: 
21851 \begin_inset space ~
21852 \end_inset
21853
21854
21855 \begin_inset Newline newline
21856 \end_inset
21857
21858
21859 \begin_inset Flex Code
21860 status collapsed
21861
21862 \begin_layout Plain Layout
21863 git mv 
21864 \family typewriter
21865
21866 \begin_inset Quotes eld
21867 \end_inset
21868
21869 <file-name>
21870 \begin_inset Quotes erd
21871 \end_inset
21872
21873  
21874 \begin_inset Quotes eld
21875 \end_inset
21876
21877 <new-file-name>
21878 \begin_inset Quotes erd
21879 \end_inset
21880
21881
21882 \end_layout
21883
21884 \end_inset
21885
21886
21887 \begin_inset Newline newline
21888 \end_inset
21889
21890
21891 \begin_inset Flex Code
21892 status collapsed
21893
21894 \begin_layout Plain Layout
21895 git commit
21896 \end_layout
21897
21898 \end_inset
21899
21900
21901 \end_layout
21902
21903 \begin_layout Subsubsection
21904
21905 \family sans
21906 Show History
21907 \end_layout
21908
21909 \begin_layout Standard
21910 This shows the complete history of the GIT document.
21911  The output of 
21912 \family typewriter
21913 git log 
21914 \begin_inset Quotes eld
21915 \end_inset
21916
21917 <file-name>
21918 \begin_inset Quotes erd
21919 \end_inset
21920
21921
21922 \family default
21923  is shown in a browser.
21924 \end_layout
21925
21926 \begin_layout Subsubsection
21927 Version Info
21928 \end_layout
21929
21930 \begin_layout Standard
21931 LyX supports GIT hash number of the last commit to the file, author name,
21932  date and time of last commit.
21933  All those are extracted from 
21934 \family typewriter
21935 git log -n 1 --pretty=format:%H%n%an%n%ai
21936 \family default
21937 .
21938  Tree version information is obtained via 
21939 \family typewriter
21940 git describe --abbrev --dirty --long
21941 \family default
21942 .
21943  See 
21944 \begin_inset CommandInset ref
21945 LatexCommand ref
21946 reference "sub:VCS-Revision-Information"
21947
21948 \end_inset
21949
21950  for other details.
21951 \end_layout
21952
21953 \begin_layout Subsection
21954 Further tuning
21955 \end_layout
21956
21957 \begin_layout Standard
21958 With the recent addition of the vc-command function LyX power users are
21959  allowed to create their own commands for revision control.
21960 \end_layout
21961
21962 \begin_layout Standard
21963 As an example you can see how two TortoiseSVN commands could be integrated
21964  directly:
21965 \end_layout
21966
21967 \begin_layout Description
21968 Commit: 
21969 \begin_inset Flex Code
21970 status collapsed
21971
21972 \begin_layout Plain Layout
21973 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21974 \end_layout
21975
21976 \end_inset
21977
21978
21979 \end_layout
21980
21981 \begin_layout Description
21982 Revert: 
21983 \begin_inset Flex Code
21984 status collapsed
21985
21986 \begin_layout Plain Layout
21987 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21988 \end_layout
21989
21990 \end_inset
21991
21992
21993 \end_layout
21994
21995 \begin_layout Subsection
21996 Version control and Document comparison
21997 \end_layout
21998
21999 \begin_layout Standard
22000 One of the typical uses of version control is to inspect the changes between
22001  revisions, usually by creating 
22002 \begin_inset Flex Code
22003 status collapsed
22004
22005 \begin_layout Plain Layout
22006 diff
22007 \end_layout
22008
22009 \end_inset
22010
22011  dumps.
22012  While this is useful for plain text files, it is much less useful in the
22013  case of LyX files, which have more a complicated structure.
22014  Hence we provide binding to the Document comparison feature.
22015  There are two ways of calling this feature - either by direct call of 
22016 \begin_inset Flex Code
22017 status collapsed
22018
22019 \begin_layout Plain Layout
22020 VC_COMPARE
22021 \end_layout
22022
22023 \end_inset
22024
22025  LyX function (for details see LyX functions manual) or by icon/menu item
22026  
22027 \begin_inset Flex MenuItem
22028 status collapsed
22029
22030 \begin_layout Plain Layout
22031 Compare with older revision...
22032 \end_layout
22033
22034 \end_inset
22035
22036 .
22037  One can either compare two chosen revisions of the document or he can simply
22038  compare the current version of edited text with older revisions (where
22039  '
22040 \begin_inset Flex MenuItem
22041 status collapsed
22042
22043 \begin_layout Plain Layout
22044 0
22045 \end_layout
22046
22047 \end_inset
22048
22049 ' revisions back means comparison of the edited file with last commited
22050  revision).
22051  
22052 \end_layout
22053
22054 \begin_layout Standard
22055 This feature is supported for SVN and RCS though due to the more complicated
22056  versioning scheme of RCS there is a constraint -- when addressing the revisions
22057  in dialog, numbers always point to the last number in RCS revision number,
22058  i.e.
22059  '35' in '1.2.35'.
22060  We don't currently support GIT addressing of revisions, one can just compare
22061  edited document with its revision X steps backs, where X is addressed as
22062  HEAD~X.
22063 \end_layout
22064
22065 \begin_layout Section
22066 Literate Programming
22067 \end_layout
22068
22069 \begin_layout Standard
22070 Updated by 
22071 \noun on
22072 Kayvan Sylvan 
22073 \noun default
22074 (kayvan@sylvan.com)
22075 \noun on
22076
22077 \noun default
22078 original documentation written by 
22079 \noun on
22080 Edmar Wienskoski Jr.
22081
22082 \noun default
22083  (edmar-w-jr@technologist.com)
22084 \end_layout
22085
22086 \begin_layout Subsection
22087 Introduction
22088 \end_layout
22089
22090 \begin_layout Standard
22091 The main purpose of this documentation is to show you how to use LyX for
22092  literate programming, where it is assumed that you are familiar with this
22093  programming technique, and know what 
22094 \begin_inset Quotes eld
22095 \end_inset
22096
22097 tangling
22098 \begin_inset Quotes erd
22099 \end_inset
22100
22101  and 
22102 \begin_inset Quotes eld
22103 \end_inset
22104
22105 weaving
22106 \begin_inset Quotes erd
22107 \end_inset
22108
22109  means.
22110  If that is not the case, please follow the web links provided in the following
22111  sections.
22112  There is a lot of good documentation out there covering old development
22113  history to the latest tools tips.
22114 \end_layout
22115
22116 \begin_layout Standard
22117 It is also assumed that you are familiar with LyX itself to a point that
22118  you are comfortable changing your LyX preferences, and X resources file.
22119  If that is not the case please refer to other LyX documentation to cover
22120  your specific needs.
22121 \end_layout
22122
22123 \begin_layout Subsection
22124 Literate Programming
22125 \end_layout
22126
22127 \begin_layout Standard
22128 From the Literate Programming FAQ: 
22129 \end_layout
22130
22131 \begin_layout Quotation
22132 Literate programming is the combination of documentation and source together
22133  in a fashion suited for reading by human beings.
22134  In fact, literate programs should be enjoyable reading, even inviting!
22135  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
22136  and documentation in a single file.
22137  Literate programming tools then parse the file to produce either readable
22138  documentation or compilable source.
22139  The WEB style of literate programming was created by D.
22140 \begin_inset space \thinspace{}
22141 \end_inset
22142
22143 E.
22144  Knuth during the development of his TeX typesetting software.
22145  
22146 \end_layout
22147
22148 \begin_layout Standard
22149 Another excerpt says:
22150 \end_layout
22151
22152 \begin_layout Quotation
22153
22154 \emph on
22155 How is literate programming different from verbose commenting?
22156 \end_layout
22157
22158 \begin_layout Quotation
22159 There are three distinguishing characteristics.
22160  In order of importance, they are: 
22161 \end_layout
22162
22163 \begin_deeper
22164 \begin_layout Itemize
22165 flexible order of elaboration 
22166 \end_layout
22167
22168 \begin_layout Itemize
22169 automatic support for browsing 
22170 \end_layout
22171
22172 \begin_layout Itemize
22173 typeset documentation, especially diagrams and mathematics 
22174 \end_layout
22175
22176 \end_deeper
22177 \begin_layout Standard
22178 Now that I sparked your curiosity, take a look in the references.
22179 \end_layout
22180
22181 \begin_layout Subsubsection
22182 References
22183 \end_layout
22184
22185 \begin_layout Standard
22186 The complete Literate Programming FAQ can be found at:
22187 \end_layout
22188
22189 \begin_layout Quote
22190 Literate Programming FAQ 
22191 \begin_inset Flex URL
22192 status collapsed
22193
22194 \begin_layout Plain Layout
22195
22196 http://www.literateprogramming.com/lpfaq.pdf
22197 \end_layout
22198
22199 \end_inset
22200
22201
22202 \end_layout
22203
22204 \begin_layout Standard
22205 The FAQ lists 23 (twenty three!) different literate programming tools.
22206  Where some are specialized or 
22207 \begin_inset Quotes eld
22208 \end_inset
22209
22210 tailored
22211 \begin_inset Quotes erd
22212 \end_inset
22213
22214  for particular programming languages, while other have general scope.
22215  I selected 
22216 \noun on
22217 Noweb
22218 \noun default
22219  for my own use for several reasons:
22220 \end_layout
22221
22222 \begin_layout Itemize
22223 It can generate the documentation either in LaTeX or HTML.
22224 \end_layout
22225
22226 \begin_layout Itemize
22227 It has a open architecture, i.
22228 \begin_inset space \thinspace{}
22229 \end_inset
22230
22231 e.
22232 \begin_inset space \space{}
22233 \end_inset
22234
22235 it is easy to plug in new filters and to perform special processing that
22236  you may need.
22237  
22238 \end_layout
22239
22240 \begin_layout Itemize
22241 There is a good selection of filters available already (the HTML is one
22242  of them).
22243 \end_layout
22244
22245 \begin_layout Itemize
22246 It is free.
22247 \end_layout
22248
22249 \begin_layout Standard
22250 The Noweb web page can be found at: 
22251 \end_layout
22252
22253 \begin_layout Quote
22254 Noweb home page 
22255 \begin_inset Flex URL
22256 status collapsed
22257
22258 \begin_layout Plain Layout
22259
22260 http://www.cs.virginia.edu/~nr/noweb/
22261 \end_layout
22262
22263 \end_inset
22264
22265
22266 \end_layout
22267
22268 \begin_layout Standard
22269 Starting from there you can reach many other interesting links and even
22270  some literate program examples.
22271 \end_layout
22272
22273 \begin_layout Subsection
22274 LyX and Literate Programming with Noweb
22275 \end_layout
22276
22277 \begin_layout Standard
22278 The LyX support for Literate Programming is provided by using the generic
22279  LyX converters mechanism.
22280  This support is provided in a 
22281 \begin_inset Quotes eld
22282 \end_inset
22283
22284 Noweb independent
22285 \begin_inset Quotes erd
22286 \end_inset
22287
22288  way, i.
22289 \begin_inset space \thinspace{}
22290 \end_inset
22291
22292 e.
22293 \begin_inset space \space{}
22294 \end_inset
22295
22296 you will be able to use this new LyX feature with some other literate programmin
22297 g tool of your choice by just changing your LyX preferences.
22298 \end_layout
22299
22300 \begin_layout Subsubsection
22301 Generating documents and code (weaving and tangling)
22302 \end_layout
22303
22304 \begin_layout Paragraph
22305 Using the noweb module
22306 \end_layout
22307
22308 \begin_layout Standard
22309 If you have installed Noweb and LyX successfully, whenever you open a new
22310  document, after you have chosen its document class, use the Document->Settings
22311  menu to add the 
22312 \begin_inset Quotes eld
22313 \end_inset
22314
22315 noweb
22316 \begin_inset Quotes erd
22317 \end_inset
22318
22319  module.
22320  If Noweb is correctly installed, when you click on the 
22321 \begin_inset Quotes eld
22322 \end_inset
22323
22324 Modules
22325 \begin_inset Quotes erd
22326 \end_inset
22327
22328  link, you will see the 
22329 \begin_inset Quotes eld
22330 \end_inset
22331
22332 noweb
22333 \begin_inset Quotes erd
22334 \end_inset
22335
22336  module in the available list and you can add it to your document.
22337 \end_layout
22338
22339 \begin_layout Paragraph
22340 Typing code in
22341 \end_layout
22342
22343 \begin_layout Standard
22344 LyX enables you to write code with a layout named 
22345 \begin_inset Flex Noun
22346 status collapsed
22347
22348 \begin_layout Plain Layout
22349 Chunk
22350 \end_layout
22351
22352 \end_inset
22353
22354 .
22355  Noweb delimits chunks like this:
22356 \end_layout
22357
22358 \begin_layout LyX-Code
22359 <<My code>>=
22360 \end_layout
22361
22362 \begin_layout LyX-Code
22363   code
22364 \end_layout
22365
22366 \begin_layout LyX-Code
22367   more code
22368 \end_layout
22369
22370 \begin_layout LyX-Code
22371   even more code
22372 \end_layout
22373
22374 \begin_layout LyX-Code
22375   @
22376 \end_layout
22377
22378 \begin_layout Standard
22379 The problem is that whatever is written in between the << and the 
22380 \family typewriter
22381 @
22382 \family default
22383  must be taken literally, i.
22384 \begin_inset space \thinspace{}
22385 \end_inset
22386
22387 e.
22388 \begin_inset space \space{}
22389 \end_inset
22390
22391 LyX should be prevented from making any special interpretation of what has
22392  been written.
22393  This is also handled by 
22394 \begin_inset Flex Noun
22395 status collapsed
22396
22397 \begin_layout Plain Layout
22398 Chunk
22399 \end_layout
22400
22401 \end_inset
22402
22403 , that works like a normal paragraph but has a free spacing capability.
22404 \end_layout
22405
22406 \begin_layout Standard
22407 As a special note, you can also use the 
22408 \begin_inset Quotes eld
22409 \end_inset
22410
22411 %def
22412 \begin_inset Quotes erd
22413 \end_inset
22414
22415  construct of Noweb in your chunks to add items to Noweb's identifier cross-refe
22416 rence:
22417 \end_layout
22418
22419 \begin_layout LyX-Code
22420 <<My chunk>>=
22421 \end_layout
22422
22423 \begin_layout LyX-Code
22424 def some_function(args):
22425 \end_layout
22426
22427 \begin_layout LyX-Code
22428    "This is the doc string for this function."
22429 \end_layout
22430
22431 \begin_layout LyX-Code
22432    print "My args: ", args
22433 \end_layout
22434
22435 \begin_layout LyX-Code
22436 @ %def some_function
22437 \end_layout
22438
22439 \begin_layout Standard
22440 For an example of this usage and the resulting cross-reference output, look
22441  at the Literate python program in 
22442 \emph on
22443 LIBDIR/examples/listerrors.lyx
22444 \emph default
22445  which should make this all clear.
22446 \end_layout
22447
22448 \begin_layout Paragraph
22449 Generating the documentation
22450 \end_layout
22451
22452 \begin_layout Standard
22453 At this point you already have a new document file with a proper document
22454  class, and with some code and text on it.
22455  How do I print it? The answer is simple, you select 
22456 \family sans
22457 View\SpecialChar \menuseparator
22458 DVI,
22459 \family default
22460  etc.
22461  Just like you would do for a plain document.
22462  No special procedure is required.
22463 \end_layout
22464
22465 \begin_layout Standard
22466 To help orientate you, I will now explain what happens inside LyX:
22467 \end_layout
22468
22469 \begin_layout Enumerate
22470 When the 
22471 \family sans
22472 Update\SpecialChar \menuseparator
22473 DVI
22474 \family default
22475  menu option is chosen, a LaTeX file is generated.
22476  
22477 \end_layout
22478
22479 \begin_deeper
22480 \begin_layout Standard
22481 If the document is of any literate class the generated file will be named
22482  with an extension name defined by the 
22483 \begin_inset Quotes eld
22484 \end_inset
22485
22486 literate
22487 \begin_inset Quotes erd
22488 \end_inset
22489
22490  format (defined in the Preferences panel), otherwise the file will have
22491  the usual 
22492 \family typewriter
22493 .tex
22494 \family default
22495  extension.
22496 \end_layout
22497
22498 \end_deeper
22499 \begin_layout Enumerate
22500 Note that the only difference so far is in the name of the file, no special
22501  processing is required by LyX.
22502  Given that you formatted the code using the 
22503 \begin_inset Flex Noun
22504 status collapsed
22505
22506 \begin_layout Plain Layout
22507 Chunk
22508 \end_layout
22509
22510 \end_inset
22511
22512  layout that, by itself, takes care of the business.
22513 \end_layout
22514
22515 \begin_layout Enumerate
22516 If the document is of any literate class LyX will then use the internal
22517  LyX to Noweb converter, followed by the Noweb to LaTeX converter
22518 \begin_inset Foot
22519 status collapsed
22520
22521 \begin_layout Plain Layout
22522 The converters are defined in the 
22523 \family sans
22524 Tools\SpecialChar \menuseparator
22525 Preferences
22526 \family default
22527  panel, under the 
22528 \begin_inset Quotes eld
22529 \end_inset
22530
22531 Conversion
22532 \begin_inset Quotes erd
22533 \end_inset
22534
22535  tab.
22536  See section 
22537 \emph on
22538 Converters
22539 \emph default
22540  of the 
22541 \emph on
22542 Customization
22543 \emph default
22544  manual for general information about converters.
22545 \end_layout
22546
22547 \end_inset
22548
22549  to generate the LaTeX file.
22550 \end_layout
22551
22552 \begin_deeper
22553 \begin_layout Standard
22554 Otherwise it will just skip this step.
22555 \end_layout
22556
22557 \end_deeper
22558 \begin_layout Enumerate
22559 Finally, LaTeX is invoked and the regular post processing continues as in
22560  a plain document.
22561 \end_layout
22562
22563 \begin_layout Standard
22564 Independence from a particular 
22565 \begin_inset Quotes eld
22566 \end_inset
22567
22568 literate tool
22569 \begin_inset Quotes erd
22570 \end_inset
22571
22572  is easily achieved by changing the commands that are run by the various
22573  converters.
22574 \end_layout
22575
22576 \begin_layout Paragraph
22577 Generating the code
22578 \end_layout
22579
22580 \begin_layout Standard
22581 When the build menu option is chosen or the corresponding button in the
22582  toolbar is pressed, a LaTeX file is generated just like step 1 above.
22583  Next, LyX invokes the 
22584 \family typewriter
22585 Noweb->Program
22586 \family default
22587  converter.
22588  This converter needs to be defined by the user and is not installed by
22589  default, though the Program format is.
22590  This converter (like any other converter) will have two parts:
22591 \end_layout
22592
22593 \begin_layout Enumerate
22594 The converter program itself.
22595  This program performs the conversion from the one format to the other (in
22596  this case, from the Noweb format to the Program pseudo-format).
22597 \end_layout
22598
22599 \begin_layout Enumerate
22600 The error log parser.
22601  This is a program whose sole purpose is to rewrite error messages in a
22602  format that LyX understands.
22603  This makes it possible for LyX to place error boxes in the right places
22604  in the file buffer.
22605 \end_layout
22606
22607 \begin_layout Standard
22608 The first part, the 
22609 \begin_inset Quotes eld
22610 \end_inset
22611
22612 Converter
22613 \begin_inset Quotes erd
22614 \end_inset
22615
22616  setting, should be set to
22617 \begin_inset Newline newline
22618 \end_inset
22619
22620
22621 \begin_inset Quotes eld
22622 \end_inset
22623
22624
22625 \family typewriter
22626 build-script $$i
22627 \family default
22628  $$r
22629 \begin_inset Quotes erd
22630 \end_inset
22631
22632 .
22633 \begin_inset Newline newline
22634 \end_inset
22635
22636 This basically means that LyX will call 
22637 \begin_inset Quotes eld
22638 \end_inset
22639
22640 build-script
22641 \begin_inset Quotes erd
22642 \end_inset
22643
22644  (a program or script) with the name of the Noweb file (normally a file
22645  in the LyX temp directory) and the directory path of the original LyX file.
22646  
22647 \end_layout
22648
22649 \begin_layout Standard
22650 This is an implementation of 
22651 \begin_inset Quotes eld
22652 \end_inset
22653
22654 build-script
22655 \begin_inset Quotes erd
22656 \end_inset
22657
22658  that you can place in a directory on your path:
22659 \end_layout
22660
22661 \begin_layout Standard
22662 \begin_inset VSpace defskip
22663 \end_inset
22664
22665
22666 \end_layout
22667
22668 \begin_layout Standard
22669 \begin_inset Newpage pagebreak
22670 \end_inset
22671
22672
22673 \end_layout
22674
22675 \begin_layout Standard
22676
22677 \family sans
22678 #!/bin/sh
22679 \end_layout
22680
22681 \begin_layout Standard
22682
22683 \family sans
22684 #
22685 \end_layout
22686
22687 \begin_layout Standard
22688
22689 \family sans
22690 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
22691 \end_layout
22692
22693 \begin_layout Standard
22694 \begin_inset VSpace defskip
22695 \end_inset
22696
22697
22698 \end_layout
22699
22700 \begin_layout Standard
22701 The next part of the converter setting is the 
22702 \begin_inset Quotes eld
22703 \end_inset
22704
22705 Flags
22706 \begin_inset Quotes erd
22707 \end_inset
22708
22709  which is to be set to
22710 \begin_inset Newline newline
22711 \end_inset
22712
22713
22714 \begin_inset Quotes eld
22715 \end_inset
22716
22717
22718 \family typewriter
22719 parselog=$$s/scripts/listerrors
22720 \family default
22721
22722 \begin_inset Quotes erd
22723 \end_inset
22724
22725 .
22726 \begin_inset Newline newline
22727 \end_inset
22728
22729 This will run any errors that are generated by the 
22730 \begin_inset Quotes eld
22731 \end_inset
22732
22733 build-script
22734 \begin_inset Quotes erd
22735 \end_inset
22736
22737  process through the 
22738 \begin_inset Quotes eld
22739 \end_inset
22740
22741 listerrors
22742 \begin_inset Quotes erd
22743 \end_inset
22744
22745  program.
22746 \end_layout
22747
22748 \begin_layout Standard
22749 The build will normally take place in LyX's temporary directory, so the
22750  files produced by the conversion will be in that directory.
22751  LyX will copy out what it regards as the `main' file, but the 
22752 \family typewriter
22753 Noweb->Program
22754 \family default
22755  conversion may produce several files, and so most of these would then be
22756  deleted when LyX was closed.
22757  This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
22758  the build-script chunk can place the generated files in that location.
22759 \end_layout
22760
22761 \begin_layout Paragraph
22762 Build instructions in the document
22763 \end_layout
22764
22765 \begin_layout Standard
22766 The last piece of the integration between LyX and noweb is the 
22767 \begin_inset Quotes eld
22768 \end_inset
22769
22770 build-script
22771 \begin_inset Quotes erd
22772 \end_inset
22773
22774  chunk.
22775  Generally, the instructions for building your program should be embedded
22776  in a chunk of its own.
22777  The noweb-specific 
22778 \begin_inset Quotes eld
22779 \end_inset
22780
22781 build-script
22782 \begin_inset Quotes erd
22783 \end_inset
22784
22785  above uses the notangle command to look for this chunk (called 
22786 \begin_inset Quotes eld
22787 \end_inset
22788
22789 build-script
22790 \begin_inset Quotes erd
22791 \end_inset
22792
22793 ) and runs its contents through 
22794 \begin_inset Quotes eld
22795 \end_inset
22796
22797 sh
22798 \begin_inset Quotes erd
22799 \end_inset
22800
22801 .
22802 \end_layout
22803
22804 \begin_layout Standard
22805 Typically, such a chunk would look something like this:
22806 \end_layout
22807
22808 \begin_layout LyX-Code
22809 <<build-script>>=
22810 \end_layout
22811
22812 \begin_layout LyX-Code
22813 #!/bin/sh
22814 \begin_inset Newline newline
22815 \end_inset
22816
22817 if [ -z "${NOWEB_SOURCE}" ]
22818 \begin_inset Newline newline
22819 \end_inset
22820
22821 then
22822 \end_layout
22823
22824 \begin_layout LyX-Code
22825 NOWEB_SOURCE=myfile.nw
22826 \begin_inset Newline newline
22827 \end_inset
22828
22829 fi
22830 \begin_inset Newline newline
22831 \end_inset
22832
22833 [...
22834  code to extract files ...
22835  use NOWEB_OUTPUT_DIR here ...]
22836 \begin_inset Newline newline
22837 \end_inset
22838
22839 [...
22840  code to compile files ...]
22841 \begin_inset Newline newline
22842 \end_inset
22843
22844 @
22845 \end_layout
22846
22847 \begin_layout Standard
22848 Look in 
22849 \emph on
22850 LIBDIR/examples/listerrors.lyx
22851 \emph default
22852  or in 
22853 \emph on
22854 LIBDIR/examples/Literate.lyx
22855 \emph default
22856  which implement two versions of the 
22857 \begin_inset Quotes eld
22858 \end_inset
22859
22860 listerrors
22861 \begin_inset Quotes erd
22862 \end_inset
22863
22864  program for some illustrations of how all of these pieces go together or
22865  in 
22866 \emph on
22867 LIBDIR/examples/noweb2lyx.lyx.
22868
22869 \emph default
22870  Interestingly, these three files show off the language-indepence of the
22871  LyX literate programming support since they are written in Python, C and
22872  Perl respectively.
22873 \end_layout
22874
22875 \begin_layout Subsubsection
22876 Configuring LyX
22877 \end_layout
22878
22879 \begin_layout Standard
22880 All the Literate Programming support is configured by the 
22881 \family sans
22882 Tools\SpecialChar \menuseparator
22883 Preferences
22884 \family default
22885  panel in the 
22886 \begin_inset Quotes eld
22887 \end_inset
22888
22889 File Handling
22890 \begin_inset Quotes erd
22891 \end_inset
22892
22893  tab.
22894  The important parts are:
22895 \end_layout
22896
22897 \begin_layout Description
22898 the
22899 \begin_inset space ~
22900 \end_inset
22901
22902
22903 \begin_inset Quotes eld
22904 \end_inset
22905
22906 NoWeb
22907 \begin_inset Quotes erd
22908 \end_inset
22909
22910
22911 \begin_inset space ~
22912 \end_inset
22913
22914 format Set up via the File Formats tab, this is where the Noweb-specific
22915  pieces are set up.
22916  The 
22917 \family sans
22918 GUI Name
22919 \family default
22920  is set to 
22921 \family typewriter
22922 NoWeb
22923 \family default
22924 , the file extension is set to 
22925 \family typewriter
22926 .nw
22927 \family default
22928 .
22929  This tells LyX to create a file with a 
22930 \family typewriter
22931 .nw
22932 \family default
22933  extension in the first step of the conversion process.
22934 \end_layout
22935
22936 \begin_layout Description
22937 the
22938 \begin_inset space ~
22939 \end_inset
22940
22941
22942 \family sans
22943 Program
22944 \family default
22945
22946 \begin_inset space ~
22947 \end_inset
22948
22949 format This is an empty format whose sole purpose is to be the endpoint
22950  of a conversion (which then allows us to set up a converter for it).
22951 \end_layout
22952
22953 \begin_layout Description
22954
22955 \family sans
22956 NoWeb
22957 \family default
22958 ->
22959 \family sans
22960 LaTeX
22961 \family default
22962  This converter performs the 
22963 \begin_inset Quotes eld
22964 \end_inset
22965
22966 weaving
22967 \begin_inset Quotes erd
22968 \end_inset
22969
22970  of the literate document.
22971  For Noweb, it is set to 
22972 \begin_inset Quotes eld
22973 \end_inset
22974
22975
22976 \family typewriter
22977 noweave -delay -index $$i > $$o
22978 \family default
22979
22980 \begin_inset Quotes erd
22981 \end_inset
22982
22983
22984 \end_layout
22985
22986 \begin_layout Description
22987
22988 \family sans
22989 NoWeb
22990 \family default
22991 ->
22992 \family sans
22993 Program
22994 \family default
22995  This performs the 
22996 \begin_inset Quotes eld
22997 \end_inset
22998
22999 tangling step
23000 \begin_inset Quotes erd
23001 \end_inset
23002
23003 .
23004  As stated above, the Converter is set to 
23005 \begin_inset Quotes eld
23006 \end_inset
23007
23008
23009 \family typewriter
23010 build-script $$i
23011 \family default
23012  $$r
23013 \begin_inset Quotes erd
23014 \end_inset
23015
23016 , with Flags set to
23017 \begin_inset Newline newline
23018 \end_inset
23019
23020
23021 \begin_inset Quotes eld
23022 \end_inset
23023
23024
23025 \family typewriter
23026 parselog=$$s/scripts/listerrors
23027 \family default
23028
23029 \begin_inset Quotes erd
23030 \end_inset
23031
23032 .
23033 \end_layout
23034
23035 \begin_layout Subsubsection
23036 Debug extensions
23037 \end_layout
23038
23039 \begin_layout Standard
23040 There is also a new function implemented in the LyX server, the 
23041 \begin_inset Quotes eld
23042 \end_inset
23043
23044 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
23045  
23046 \end_layout
23047
23048 \begin_layout Standard
23049 When debugging code with ddd/gdb, it is possible to invoke a text editor
23050  at the current execution position with a single key stroke.
23051  The default ddd configuration for that is shift-ctrl-V.
23052  It happens that you can define the editor command line invocation in ddd
23053  by accessing the 
23054 \family sans
23055 Edit\SpecialChar \menuseparator
23056 Preferences\SpecialChar \menuseparator
23057 Helpers
23058 \family default
23059  dialog and changing the "Edit Sources" entry.
23060 \end_layout
23061
23062 \begin_layout Standard
23063 I take advantage of the newly created LyX server function and this ddd feature,
23064  and set 
23065 \begin_inset Quotes eld
23066 \end_inset
23067
23068 Edit Sources
23069 \begin_inset Quotes erd
23070 \end_inset
23071
23072  to:
23073 \end_layout
23074
23075 \begin_layout Standard
23076 \begin_inset VSpace defskip
23077 \end_inset
23078
23079
23080 \end_layout
23081
23082 \begin_layout Standard
23083
23084 \family sans
23085 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
23086 \end_layout
23087
23088 \begin_layout Standard
23089 \begin_inset VSpace defskip
23090 \end_inset
23091
23092
23093 \end_layout
23094
23095 \begin_layout Standard
23096 With this, whenever you are using ddd and find a point in the program that
23097  you want to edit, you just press shift-ctrl-V (in the ddd window), and
23098  ddd will forward this information to LyX through the LyX server and then
23099  the LyX window will show the same file with the cursor at the same position
23100  ddd was pointing to.
23101  No more guessing or long scrolling to locate a point in the program back
23102  from debugging !
23103 \end_layout
23104
23105 \begin_layout Standard
23106 Note however that you must enable the LyX server to get this feature working
23107  (it is disabled by default).
23108  You can enable it in 
23109 \family sans
23110 Preferences
23111 \family default
23112  (tabs 
23113 \family sans
23114 Inputs
23115 \family default
23116
23117 \family sans
23118 Paths
23119 \family default
23120 ) by entering in the 
23121 \family sans
23122 LyXserver pipe
23123 \family default
23124  a path like 
23125 \begin_inset Quotes eld
23126 \end_inset
23127
23128
23129 \family typewriter
23130 /home/<your-home-directory>/.lyx/lyxpipe
23131 \family default
23132
23133 \begin_inset Quotes erd
23134 \end_inset
23135
23136
23137 \end_layout
23138
23139 \begin_layout Standard
23140 Read the LyX server documentation in the 
23141 \emph on
23142 Customization Manual
23143 \emph default
23144  for further information.
23145 \end_layout
23146
23147 \begin_layout Subsubsection
23148 Toolbar extensions
23149 \end_layout
23150
23151 \begin_layout Standard
23152 There are six new buttons that can be added to your LyX toolbar.
23153  Five of these buttons are short cuts to layout styles: 
23154 \family sans
23155 Standard
23156 \family default
23157
23158 \family sans
23159 Section
23160 \family default
23161
23162 \family sans
23163 LaTeX
23164 \family default
23165
23166 \family sans
23167 LyX-Code
23168 \family default
23169 , and 
23170 \family sans
23171 Chunk
23172 \family default
23173 .
23174  The last one is a short cut to the 
23175 \begin_inset Quotes eld
23176 \end_inset
23177
23178 Build Program
23179 \begin_inset Quotes erd
23180 \end_inset
23181
23182  File menu entry.
23183  
23184 \end_layout
23185
23186 \begin_layout Standard
23187 LyX has a range of buttons that are available for tool bar customization.
23188  In my toolbar I like to combine the six short cuts above with two more:
23189  One for 
23190 \family sans
23191 Document
23192 \family default
23193 \SpecialChar \menuseparator
23194
23195 \family sans
23196 Update
23197 \family default
23198 \SpecialChar \menuseparator
23199
23200 \family sans
23201 DVI
23202 \family default
23203  and the other for 
23204 \family sans
23205 Document\SpecialChar \menuseparator
23206 View\SpecialChar \menuseparator
23207 DVI
23208 \family default
23209  File menu entries.
23210  Here is how it looks like:
23211 \end_layout
23212
23213 \begin_layout LyX-Code
23214 Toolbar
23215 \end_layout
23216
23217 \begin_layout LyX-Code
23218   Layouts
23219 \end_layout
23220
23221 \begin_layout LyX-Code
23222   Icon "layout Standard"
23223 \end_layout
23224
23225 \begin_layout LyX-Code
23226   Icon "layout Section"
23227 \end_layout
23228
23229 \begin_layout LyX-Code
23230   Icon "layout LaTeX"
23231 \end_layout
23232
23233 \begin_layout LyX-Code
23234   Icon "layout LyX-Code"
23235 \end_layout
23236
23237 \begin_layout LyX-Code
23238   Icon "layout Chunk"
23239 \end_layout
23240
23241 \begin_layout LyX-Code
23242   Separator
23243 \end_layout
23244
23245 \begin_layout LyX-Code
23246   Icon "buffer-view"
23247 \end_layout
23248
23249 \begin_layout LyX-Code
23250   Icon "buffer-typeset"
23251 \end_layout
23252
23253 \begin_layout LyX-Code
23254   Icon "build-program"
23255 \end_layout
23256
23257 \begin_layout LyX-Code
23258   Separator
23259 \end_layout
23260
23261 \begin_layout LyX-Code
23262 .
23263 \end_layout
23264
23265 \begin_layout LyX-Code
23266 .
23267 \end_layout
23268
23269 \begin_layout LyX-Code
23270 .
23271 \end_layout
23272
23273 \begin_layout LyX-Code
23274 End
23275 \end_layout
23276
23277 \begin_layout Subsubsection
23278 Colors customization
23279 \end_layout
23280
23281 \begin_layout Standard
23282 There are a number of colors in LyX that can be customized in 
23283 \family sans
23284 Preferences
23285 \family default
23286 .
23287  One of the things that bothers people is the LaTeX font color.
23288  The default color is red, since the chunks uses LaTeX font, and there is
23289  a lot of chunks in literate documents, you may get tired of seeing everything
23290  in red.
23291  You can change it by going to the tabs 
23292 \family sans
23293 Look&Feel
23294 \family default
23295
23296 \family sans
23297 Colors.
23298 \end_layout
23299
23300 \begin_layout Standard
23301 The next thing is the visible presence of the newline character in the screen.
23302  You can choose the color of this particular character and make it blend
23303  in the background.
23304  I recommend you choosing a color that is close to the background but not
23305  equal, that way you still can see it is there, but it is not bothering
23306  you anymore.
23307 \end_layout
23308
23309 \begin_layout Subsection
23310 LyX and knitr/Sweave
23311 \end_layout
23312
23313 \begin_layout Standard
23314 Support for 
23315 \family sans
23316 knitr
23317 \family default
23318  and 
23319 \family sans
23320 Sweave
23321 \family default
23322  is documented in the 
23323 \emph on
23324 knitr.lyx
23325 \emph default
23326  example file and in the Sweave manual (menu 
23327 \family sans
23328 Help\SpecialChar \menuseparator
23329 Specific Manuals
23330 \family default
23331 ).
23332 \end_layout
23333
23334 \begin_layout Chapter
23335 Special features
23336 \end_layout
23337
23338 \begin_layout Standard
23339 You can do everything with LyX that you can do with LaTeX.
23340  However, LyX cannot support every LaTeX feature directly.
23341  But you can always use TeX Code.
23342  This chapter shows you some more special things you might want to use.
23343  For other special things you can do with figures, tables, floats, boxes
23344  and notes, have a look at the 
23345 \emph on
23346 Embedded
23347 \begin_inset space ~
23348 \end_inset
23349
23350 Objects
23351 \emph default
23352  manual.
23353 \end_layout
23354
23355 \begin_layout Section
23356 Multiple Text Columns
23357 \end_layout
23358
23359 \begin_layout Standard
23360 This feature is independent of the option 
23361 \family sans
23362 Two-column document
23363 \family default
23364  in the document settings under 
23365 \family sans
23366 Text Layout
23367 \family default
23368 .
23369  If you want to have 2
23370 \begin_inset space ~
23371 \end_inset
23372
23373 columns for the whole document, it is recommended to use the 
23374 \family sans
23375 Two-column document
23376 \family default
23377  option.
23378  For all other cases use this feature.
23379 \end_layout
23380
23381 \begin_layout Standard
23382 To use multiple text columns in your document, you have to load the module
23383  
23384 \family sans
23385 Multiple Columns
23386 \family default
23387  (menu 
23388 \family sans
23389 Document\SpecialChar \menuseparator
23390 Settings\SpecialChar \menuseparator
23391 Modules
23392 \family default
23393 ) and must have the LaTeX-package 
23394 \series bold
23395 multicol
23396 \series default
23397  installed.
23398 \end_layout
23399
23400 \begin_layout Standard
23401 Footnotes within multiple columns will be placed at the bottom of the page
23402  and not under each column.
23403  Within the different columns you can use everything, with the limitation
23404  that for floats you need to use the float option 
23405 \family sans
23406 Span columns
23407 \family default
23408 .
23409 \end_layout
23410
23411 \begin_layout Subsection
23412 Basics
23413 \end_layout
23414
23415 \begin_layout Standard
23416 If you want to have 2
23417 \begin_inset space ~
23418 \end_inset
23419
23420 columns in your text, insert a multicolumn inset via the menu 
23421 \family sans
23422 Insert\SpecialChar \menuseparator
23423 Custom
23424 \begin_inset space ~
23425 \end_inset
23426
23427 Insets\SpecialChar \menuseparator
23428 Multiple
23429 \begin_inset space ~
23430 \end_inset
23431
23432 Columns
23433 \family default
23434  where the columns should start.
23435  Write all text that should be printed in 2
23436 \begin_inset space ~
23437 \end_inset
23438
23439 columns into this inset.
23440 \end_layout
23441
23442 \begin_layout Standard
23443 Here is an example:
23444 \end_layout
23445
23446 \begin_layout Standard
23447 \noindent
23448 \begin_inset Flex Multiple Columns
23449 status open
23450
23451 \begin_layout Plain Layout
23452 \noindent
23453
23454 \series bold
23455 \size small
23456 The Adventure of the Empty House
23457 \series default
23458
23459 \begin_inset Newline newline
23460 \end_inset
23461
23462 by Sir Arthur Conan Doyle
23463 \end_layout
23464
23465 \begin_layout Plain Layout
23466
23467 \size small
23468 It was in the spring of the year 1894 that all London was interested, and
23469  the fashionable world dismayed, by the murder of the Honourable Ronald
23470  Adair under most unusual and inexplicable circumstances.
23471  The public has already learned those particulars of the crime which came
23472  out in the police investigation, but a good deal was suppressed upon that
23473  occasion, since the case for the prosecution was so overwhelmingly strong
23474  that it was not necessary to bring forward all the facts.
23475  Only now, at the end of nearly ten years, am I allowed to supply those
23476  missing links which make up the whole of that remarkable chain.
23477  The crime was of interest in itself, but that interest was as nothing to
23478  me compared to the inconceivable sequel, which afforded me the greatest
23479  shock and surprise of any event in my adventurous life.
23480  Even now, after this long interval, I find myself thrilling as I think
23481  of it, and feeling once more that sudden flood of joy, amazement, and increduli
23482 ty which utterly submerged my mind.
23483  Let me say to that public, which has shown some interest in those glimpses
23484  which I have occasionally given them of the thoughts and actions of a very
23485  remarkable man, that they are not to blame me if I have not shared my knowledge
23486  with them, for I should have considered it my first duty to do so, had
23487  I not been barred by a positive prohibition from his own lips, which was
23488  only withdrawn upon the third of last month.
23489 \end_layout
23490
23491 \end_inset
23492
23493
23494 \end_layout
23495
23496 \begin_layout Standard
23497 To get 3 or more columns, set the cursor into the multicolumn inset and
23498  use the menu 
23499 \family sans
23500 Insert\SpecialChar \menuseparator
23501 Number
23502 \begin_inset space ~
23503 \end_inset
23504
23505 of
23506 \begin_inset space ~
23507 \end_inset
23508
23509 Columns
23510 \family default
23511 .
23512  The number of the desired columns is written into that inset (for 3
23513 \begin_inset space ~
23514 \end_inset
23515
23516 columns write 
23517 \begin_inset Quotes eld
23518 \end_inset
23519
23520 3
23521 \begin_inset Quotes erd
23522 \end_inset
23523
23524 ).
23525 \begin_inset Newline newline
23526 \end_inset
23527
23528 Here is an example with 3
23529 \begin_inset space ~
23530 \end_inset
23531
23532 columns:
23533 \end_layout
23534
23535 \begin_layout Standard
23536 \begin_inset Flex Multiple Columns
23537 status open
23538
23539 \begin_layout Plain Layout
23540
23541 \size footnotesize
23542 \begin_inset Argument 1
23543 status open
23544
23545 \begin_layout Plain Layout
23546 3
23547 \end_layout
23548
23549 \end_inset
23550
23551 It can be imagined that my close intimacy with Sherlock Holmes had interested
23552  me deeply in crime, and that after his disappearance I never failed to
23553  read with care the various problems which came before the public.
23554  And I even attempted, more than once, for my own private satisfaction,
23555  to employ his methods in their solution, though with indifferent success.
23556  There was none, however, which appealed to me like this tragedy of Ronald
23557  Adair.
23558  As I read the evidence at the inquest, which led up to a verdict of willful
23559  murder against some person or persons unknown, I realized more clearly
23560  than I had ever done the loss which the community had sustained by the
23561  death of Sherlock Holmes.
23562  There were points about this strange business which would, I was sure,
23563  have specially appealed to him, and the efforts of the police would have
23564  been supplemented, or more probably anticipated, by the trained observation
23565  and the alert mind of the first criminal agent in Europe.
23566  All day, as I drove upon my round, I turned over the case in my mind and
23567  found no explanation which appeared to me to be adequate.
23568  At the risk of telling a twice-told tale, I will recapitulate the facts
23569  as they were known to the public at the conclusion of the inquest.
23570 \end_layout
23571
23572 \end_inset
23573
23574
23575 \end_layout
23576
23577 \begin_layout Standard
23578 You can have up to 10
23579 \begin_inset space ~
23580 \end_inset
23581
23582 columns if you want to, but that might not be very pleasant for the readers
23583  of your document.
23584 \end_layout
23585
23586 \begin_layout Standard
23587 \begin_inset Newpage newpage
23588 \end_inset
23589
23590
23591 \end_layout
23592
23593 \begin_layout Subsection
23594 Columns inside Columns
23595 \end_layout
23596
23597 \begin_layout Standard
23598 You can also have columns inside columns:
23599 \end_layout
23600
23601 \begin_layout Standard
23602 \begin_inset Flex Multiple Columns
23603 status open
23604
23605 \begin_layout Plain Layout
23606
23607 \size footnotesize
23608 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
23609  at that time governor of one of the Australian colonies.
23610  Adair's mother had returned from Australia to undergo the operation for
23611  cataract, and she, her son Ronald, and her daughter Hilda were living together
23612  at 427 Park Lane.
23613 \end_layout
23614
23615 \begin_layout Plain Layout
23616 \begin_inset Flex Multiple Columns
23617 status open
23618
23619 \begin_layout Plain Layout
23620
23621 \size footnotesize
23622 The youth moved in the best society–had, so far as was known, no enemies
23623  and no particular vices.
23624  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
23625  had been broken off by mutual consent some months before, and there was
23626  no sign that it had left any very profound feeling behind it.
23627  For the rest {sic} the man's life moved in a narrow and conventional circle,
23628  for his habits were quiet and his nature unemotional.
23629  Yet it was upon this easy-going young aristocrat that death came, in most
23630  strange and unexpected form, between the hours of ten and eleven-twenty
23631  on the night of March 30, 1894.
23632 \end_layout
23633
23634 \end_inset
23635
23636
23637 \end_layout
23638
23639 \begin_layout Plain Layout
23640
23641 \size footnotesize
23642 Ronald Adair was fond of cards–playing continually, but never for such stakes
23643  as would hurt him.
23644  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
23645  It was shown that, after dinner on the day of his death, he had played
23646  a rubber of whist at the latter club.
23647  He had also played there in the afternoon.
23648
23649 \size default
23650  
23651 \size footnotesize
23652 The evidence of those who had played with him– Mr.
23653  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
23654  and that there was a fairly equal fall of the cards.
23655  Adair might have lost five pounds, but not more.
23656  His fortune was a considerable one, and such a loss could not in any way
23657  affect him.
23658  He had played nearly every day at one club or other, but he was a cautious
23659  player, and usually rose a winner.
23660  It came out in evidence that, in partnership with Colonel Moran, he had
23661  actually won as much as four hundred and twenty pounds in a sitting, some
23662  weeks before, from Godfrey Milner and Lord Balmoral.
23663  So much for his recent history as it came out at the inquest.
23664 \end_layout
23665
23666 \end_inset
23667
23668
23669 \end_layout
23670
23671 \begin_layout Subsection
23672 Advanced Examples
23673 \end_layout
23674
23675 \begin_layout Standard
23676 The examples in this section show some more special features of multiple
23677  columns.
23678 \end_layout
23679
23680 \begin_layout Standard
23681 For more features of multiple columns, have a look at the documentation
23682  of the LaTeX-package 
23683 \series bold
23684 multicol
23685 \series default
23686
23687 \begin_inset CommandInset citation
23688 LatexCommand cite
23689 key "multicol"
23690
23691 \end_inset
23692
23693 .
23694 \end_layout
23695
23696 \begin_layout Subsubsection
23697 Preface
23698 \end_layout
23699
23700 \begin_layout Standard
23701 To add a preface text for multiple columns, set the cursor into the multicolumn
23702  inset and use the menu 
23703 \family sans
23704 Insert\SpecialChar \menuseparator
23705 Preface
23706 \family default
23707 .
23708  Write your preface text into that inset.
23709 \begin_inset Newline newline
23710 \end_inset
23711
23712 This is an example with some preface text:
23713 \end_layout
23714
23715 \begin_layout Standard
23716 \begin_inset VSpace bigskip
23717 \end_inset
23718
23719
23720 \end_layout
23721
23722 \begin_layout Standard
23723 \begin_inset Flex Multiple Columns
23724 status open
23725
23726 \begin_layout Plain Layout
23727 \begin_inset Argument 2
23728 status open
23729
23730 \begin_layout Plain Layout
23731 And the story continues and continues and continues and continues\SpecialChar \ldots{}
23732
23733 \end_layout
23734
23735 \end_inset
23736
23737
23738 \size small
23739 On the evening of the crime, he returned from the club exactly at ten.
23740  His mother and sister were out spending the evening with a relation.
23741  The servant deposed that she heard him enter the front room on the second
23742  floor, generally used as his sitting-room.
23743  She had lit a fire there, and as it smoked she had opened the window.
23744  No sound was heard from the room until eleven-twenty, the hour of the return
23745  of Lady Maynooth and her daughter.
23746  Desiring to say good-night, she attempted to enter her son's room.
23747  The door was locked on the inside, and no answer could be got to their
23748  cries and knocking.
23749  Help was obtained, and the door forced.
23750  The unfortunate young man was found lying near the table.
23751  His head had been horribly mutilated by an expanding revolver bullet, but
23752  no weapon of any sort was to be found in the room.
23753 \end_layout
23754
23755 \end_inset
23756
23757
23758 \end_layout
23759
23760 \begin_layout Standard
23761 You can also use a section heading as the preface if you use a section command
23762  as TeX Code.
23763  For example the command
23764 \end_layout
23765
23766 \begin_layout Standard
23767
23768 \series bold
23769
23770 \backslash
23771 subsection{subsection title}
23772 \end_layout
23773
23774 \begin_layout Standard
23775 creates a subsection.
23776  In this example the preface is a subsubsection:
23777 \end_layout
23778
23779 \begin_layout Standard
23780 \begin_inset Flex Multiple Columns
23781 status open
23782
23783 \begin_layout Plain Layout
23784 \begin_inset Argument 2
23785 status open
23786
23787 \begin_layout Plain Layout
23788 \begin_inset ERT
23789 status collapsed
23790
23791 \begin_layout Plain Layout
23792
23793
23794 \backslash
23795 subsubsection{
23796 \end_layout
23797
23798 \end_inset
23799
23800 This is a subsubsection heading as a preface
23801 \begin_inset ERT
23802 status collapsed
23803
23804 \begin_layout Plain Layout
23805
23806 }
23807 \end_layout
23808
23809 \end_inset
23810
23811
23812 \end_layout
23813
23814 \end_inset
23815
23816
23817 \size small
23818 A minute examination of the circumstances served only to make the case more
23819  complex.
23820  In the first place, no reason could be given why the young man should have
23821  fastened the door upon the inside.
23822  There was the possibility that the murderer had done this, and had afterwards
23823  escaped by the window.
23824  The drop was at least twenty feet, however, and a bed of crocuses in full
23825  bloom lay beneath.
23826  Neither the flowers nor the earth showed any sign of having been disturbed,
23827  nor were there any marks upon the narrow strip of grass which separated
23828  the house from the road.
23829  Apparently, therefore, it was the young man himself who had fastened the
23830  door.
23831  But how did he come by his death? No one could have climbed up to the window
23832  without leaving traces.
23833  Suppose a man had fired through the window, he would indeed be a remarkable
23834  shot who could with a revolver inflict so deadly a wound.
23835  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
23836  a hundred yards of the house.
23837  No one had heard a shot.
23838 \end_layout
23839
23840 \end_inset
23841
23842
23843 \end_layout
23844
23845 \begin_layout Standard
23846 If there is less vertical space than 6
23847 \begin_inset space ~
23848 \end_inset
23849
23850 text lines is left on the page at the beginning of the multiple columns,
23851  a page break will be inserted before the multiple columns.
23852  Depending on the number of lines of the preface text, you might want to
23853  change this space.
23854  This is done by setting the cursor into the mulitcolumn inset behind the
23855  preface (if there is any) and using the menu 
23856 \family sans
23857 Insert\SpecialChar \menuseparator
23858 Space
23859 \begin_inset space ~
23860 \end_inset
23861
23862 Before
23863 \begin_inset space ~
23864 \end_inset
23865
23866 Page
23867 \begin_inset space ~
23868 \end_inset
23869
23870 Break
23871 \family default
23872 .
23873  Insert into that inset the amount of space like e.
23874 \begin_inset space \thinspace{}
23875 \end_inset
23876
23877 g.
23878 \begin_inset space \space{}
23879 \end_inset
23880
23881
23882 \begin_inset Quotes eld
23883 \end_inset
23884
23885 5cm
23886 \begin_inset Quotes erd
23887 \end_inset
23888
23889 .
23890 \begin_inset Newline newline
23891 \end_inset
23892
23893 In this example the space is set to 7
23894 \begin_inset space ~
23895 \end_inset
23896
23897 text lines by using 
23898 \begin_inset Quotes eld
23899 \end_inset
23900
23901 7
23902 \backslash
23903 baselineskip
23904 \begin_inset Quotes erd
23905 \end_inset
23906
23907  (where the command 
23908 \series bold
23909
23910 \backslash
23911 baselineskip
23912 \series default
23913  needs to be inserted as TeX code):
23914 \end_layout
23915
23916 \begin_layout Standard
23917 \begin_inset Flex Multiple Columns
23918 status open
23919
23920 \begin_layout Plain Layout
23921 \begin_inset Argument 3
23922 status open
23923
23924 \begin_layout Plain Layout
23925 7
23926 \begin_inset ERT
23927 status collapsed
23928
23929 \begin_layout Plain Layout
23930
23931
23932 \backslash
23933 baselineskip
23934 \end_layout
23935
23936 \end_inset
23937
23938
23939 \end_layout
23940
23941 \end_inset
23942
23943
23944 \size small
23945 On the evening of the crime, he returned from the club exactly at ten.
23946  His mother and sister were out spending the evening with a relation.
23947  The servant deposed that she heard him enter the front room on the second
23948  floor, generally used as his sitting-room.
23949  She had lit a fire there, and as it smoked she had opened the window.
23950  No sound was heard from the room until eleven-twenty, the hour of the return
23951  of Lady Maynooth and her daughter.
23952  Desiring to say good-night, she attempted to enter her son's room.
23953  The door was locked on the inside, and no answer could be got to their
23954  cries and knocking.
23955  Help was obtained, and the door forced.
23956  The unfortunate young man was found lying near the table.
23957  His head had been horribly mutilated by an expanding revolver bullet, but
23958  no weapon of any sort was to be found in the room.
23959 \end_layout
23960
23961 \end_inset
23962
23963
23964 \end_layout
23965
23966 \begin_layout Subsubsection
23967 Surrounding Space
23968 \end_layout
23969
23970 \begin_layout Standard
23971 The amount of space before and after multiple columns can be changed by
23972  changing the length 
23973 \series bold
23974
23975 \backslash
23976 multicolsep
23977 \series default
23978 .
23979  For example the command
23980 \end_layout
23981
23982 \begin_layout Standard
23983
23984 \series bold
23985
23986 \backslash
23987 setlength{
23988 \backslash
23989 multicolsep}{3cm}
23990 \end_layout
23991
23992 \begin_layout Standard
23993 in TeX Code changes its value to 3
23994 \begin_inset space \thinspace{}
23995 \end_inset
23996
23997 cm.
23998  The change must be made before the multiple columns' start.
23999  The predefined value is 13
24000 \begin_inset space \thinspace{}
24001 \end_inset
24002
24003 pt.
24004 \end_layout
24005
24006 \begin_layout Standard
24007 For this example 
24008 \series bold
24009
24010 \backslash
24011 multicolsep
24012 \series default
24013  was set to 2.5
24014 \begin_inset space \thinspace{}
24015 \end_inset
24016
24017 cm:
24018 \end_layout
24019
24020 \begin_layout Standard
24021 \begin_inset ERT
24022 status open
24023
24024 \begin_layout Plain Layout
24025
24026
24027 \backslash
24028 setlength{
24029 \backslash
24030 multicolsep}{2.5cm}
24031 \end_layout
24032
24033 \end_inset
24034
24035
24036 \end_layout
24037
24038 \begin_layout Standard
24039 \begin_inset Flex Multiple Columns
24040 status open
24041
24042 \begin_layout Plain Layout
24043
24044 \size small
24045 All day I turned these facts over in my mind, endeavouring to hit upon some
24046  theory which could reconcile them all, and to find that line of least resistanc
24047 e which my poor friend had declared to be the starting-point of every investigat
24048 ion.
24049  I confess that I made little progress.
24050  In the evening I strolled across the Park, and found myself about six o'clock
24051  at the Oxford Street end of Park Lane.
24052  A group of loafers upon the pavements, all staring up at a particular window,
24053  directed me to the house which I had come to see.
24054  A tall, thin man with coloured glasses, whom I strongly suspected of being
24055  a plain-clothes detective, was pointing out some theory of his own, while
24056  the others crowded round to listen to what he said.
24057  I got as near him as I could, but his observations seemed to me to be absurd,
24058  so I withdrew again in some disgust.
24059  As I did so I struck against an elderly, deformed man, who had been behind
24060  me, and I knocked down several books which he was carrying.
24061 \end_layout
24062
24063 \end_inset
24064
24065
24066 \end_layout
24067
24068 \begin_layout Standard
24069 \begin_inset Note Greyedout
24070 status open
24071
24072 \begin_layout Plain Layout
24073
24074 \series bold
24075 Note:
24076 \series default
24077  The values you set with 
24078 \series bold
24079
24080 \backslash
24081 setlength
24082 \series default
24083  will be used for all following multiple columns until you change them again.
24084 \end_layout
24085
24086 \end_inset
24087
24088
24089 \end_layout
24090
24091 \begin_layout Standard
24092 \begin_inset ERT
24093 status collapsed
24094
24095 \begin_layout Plain Layout
24096
24097
24098 \backslash
24099 setlength{
24100 \backslash
24101 multicolsep}{13pt}
24102 \end_layout
24103
24104 \end_inset
24105
24106
24107 \begin_inset Note Note
24108 status collapsed
24109
24110 \begin_layout Plain Layout
24111 go back to the default
24112 \end_layout
24113
24114 \end_inset
24115
24116
24117 \end_layout
24118
24119 \begin_layout Standard
24120 \begin_inset Newpage newpage
24121 \end_inset
24122
24123
24124 \end_layout
24125
24126 \begin_layout Subsubsection
24127 Column Breaks
24128 \end_layout
24129
24130 \begin_layout Standard
24131 A column break can be forced by inserting the command 
24132 \series bold
24133
24134 \backslash
24135 columnbreak{}
24136 \series default
24137  as TeX-Code to that position in the text where the column should be broken.
24138  Note that this leads in most cases to whitespace in the text.
24139 \begin_inset Newline newline
24140 \end_inset
24141
24142 Here is an example:
24143 \end_layout
24144
24145 \begin_layout Standard
24146 \begin_inset Flex Multiple Columns
24147 status open
24148
24149 \begin_layout Plain Layout
24150
24151 \size small
24152 \begin_inset Quotes eld
24153 \end_inset
24154
24155 You're surprised to see me, sir,
24156 \begin_inset Quotes erd
24157 \end_inset
24158
24159  said he, in a strange, croaking voice.
24160 \end_layout
24161
24162 \begin_layout Plain Layout
24163
24164 \size small
24165 I acknowledged that I was.
24166 \end_layout
24167
24168 \begin_layout Plain Layout
24169
24170 \size small
24171 \begin_inset Quotes eld
24172 \end_inset
24173
24174 Well, I've a conscience, sir, and when I chanced to see you go into this
24175  house, as I came hobbling after you, I thought to myself, I'll just step
24176  in and see that kind gentleman, and tell him that if I was a bit gruff
24177  in my manner there was not any harm meant, and that I am much obliged to
24178  him for picking up my books.
24179 \begin_inset Quotes erd
24180 \end_inset
24181
24182
24183 \end_layout
24184
24185 \begin_layout Plain Layout
24186
24187 \size small
24188 \begin_inset Quotes eld
24189 \end_inset
24190
24191 You make too much of a trifle,
24192 \begin_inset Quotes erd
24193 \end_inset
24194
24195  said I.
24196  
24197 \begin_inset Quotes eld
24198 \end_inset
24199
24200 May I ask how you knew who I was?
24201 \begin_inset Quotes erd
24202 \end_inset
24203
24204  AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED.
24205 \begin_inset ERT
24206 status collapsed
24207
24208 \begin_layout Plain Layout
24209
24210
24211 \backslash
24212 columnbreak{}
24213 \end_layout
24214
24215 \end_inset
24216
24217
24218 \end_layout
24219
24220 \begin_layout Plain Layout
24221
24222 \size small
24223 \begin_inset Quotes eld
24224 \end_inset
24225
24226 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24227  you'll find my little bookshop at the corner of Church Street, and very
24228  happy to see you, I am sure.
24229  Maybe you collect yourself, sir.
24230  Here's 
24231 \noun on
24232 British
24233 \begin_inset space ~
24234 \end_inset
24235
24236 Birds
24237 \noun default
24238 , and 
24239 \noun on
24240 Catullus
24241 \noun default
24242 , and 
24243 \noun on
24244 The Holy War
24245 \noun default
24246 --a bargain, every one of them.
24247  With five volumes you could just fill that gap on that second shelf.
24248  It looks untidy, does it not, sir?
24249 \begin_inset Quotes erd
24250 \end_inset
24251
24252
24253 \end_layout
24254
24255 \end_inset
24256
24257
24258 \end_layout
24259
24260 \begin_layout Subsubsection
24261 Column Separation
24262 \end_layout
24263
24264 \begin_layout Standard
24265 The width of the columns is automatically calculated, but you can modify
24266  the space between the columns.
24267  This is done by changing the length 
24268 \series bold
24269
24270 \backslash
24271 columnsep
24272 \series default
24273 .
24274  Its predefined value is 10
24275 \begin_inset space \thinspace{}
24276 \end_inset
24277
24278 pt.
24279  Here is an example where 
24280 \series bold
24281
24282 \backslash
24283 columnsep
24284 \series default
24285  is set to 3
24286 \begin_inset space \thinspace{}
24287 \end_inset
24288
24289 cm:
24290 \end_layout
24291
24292 \begin_layout Standard
24293 \begin_inset ERT
24294 status open
24295
24296 \begin_layout Plain Layout
24297
24298
24299 \backslash
24300 setlength{
24301 \backslash
24302 columnsep}{3cm}
24303 \end_layout
24304
24305 \end_inset
24306
24307
24308 \end_layout
24309
24310 \begin_layout Standard
24311 \begin_inset Flex Multiple Columns
24312 status open
24313
24314 \begin_layout Plain Layout
24315
24316 \size small
24317 My observations of No.
24318 \begin_inset space \space{}
24319 \end_inset
24320
24321 427 Park Lane did little to clear up the problem in which I was interested.
24322  The house was separated from the street by a low wall and railing, the
24323  whole not more than five feet high.
24324  It was perfectly easy, therefore, for anyone to get into the garden, but
24325  the window was entirely inaccessible, since there was no water pipe or
24326  anything which could help the most active man to climb it.
24327  More puzzled than ever, I retraced my steps to Kensington.
24328  I had not been in my study five minutes when the maid entered to say that
24329  a person desired to see me.
24330  To my astonishment it was none other than my strange old book collector,
24331  his sharp, wizened face peering out from a frame of white hair, and his
24332  precious volumes, a dozen of them at least, wedged under his right arm.
24333 \end_layout
24334
24335 \end_inset
24336
24337
24338 \end_layout
24339
24340 \begin_layout Standard
24341 \begin_inset ERT
24342 status collapsed
24343
24344 \begin_layout Plain Layout
24345
24346
24347 \backslash
24348 setlength{
24349 \backslash
24350 columnsep}{10pt}
24351 \end_layout
24352
24353 \end_inset
24354
24355
24356 \begin_inset Note Note
24357 status collapsed
24358
24359 \begin_layout Plain Layout
24360 go back to the default
24361 \end_layout
24362
24363 \end_inset
24364
24365
24366 \end_layout
24367
24368 \begin_layout Subsubsection
24369 Vertical Lines
24370 \end_layout
24371
24372 \begin_layout Standard
24373 Between the columns a rule with a width of the length 
24374 \series bold
24375
24376 \backslash
24377 columnseprule
24378 \series default
24379  is placed.
24380  If this rule width is set to 0
24381 \begin_inset space \thinspace{}
24382 \end_inset
24383
24384 pt (this is the default), the rule is suppressed.
24385  In the following example the rule is 2
24386 \begin_inset space \thinspace{}
24387 \end_inset
24388
24389 pt wide:
24390 \end_layout
24391
24392 \begin_layout Standard
24393 \begin_inset ERT
24394 status open
24395
24396 \begin_layout Plain Layout
24397
24398
24399 \backslash
24400 setlength{
24401 \backslash
24402 columnseprule}{2pt}
24403 \end_layout
24404
24405 \end_inset
24406
24407
24408 \end_layout
24409
24410 \begin_layout Standard
24411 \begin_inset Flex Multiple Columns
24412 status open
24413
24414 \begin_layout Plain Layout
24415
24416 \size small
24417 \begin_inset Quotes eld
24418 \end_inset
24419
24420 You're surprised to see me, sir,
24421 \begin_inset Quotes erd
24422 \end_inset
24423
24424  said he, in a strange, croaking voice.
24425 \end_layout
24426
24427 \begin_layout Plain Layout
24428
24429 \size small
24430 I acknowledged that I was.
24431 \end_layout
24432
24433 \begin_layout Plain Layout
24434
24435 \size small
24436 \begin_inset Quotes eld
24437 \end_inset
24438
24439 Well, I've a conscience, sir, and when I chanced to see you go into this
24440  house, as I came hobbling after you, I thought to myself, I'll just step
24441  in and see that kind gentleman, and tell him that if I was a bit gruff
24442  in my manner there was not any harm meant, and that I am much obliged to
24443  him for picking up my books.
24444 \begin_inset Quotes erd
24445 \end_inset
24446
24447
24448 \end_layout
24449
24450 \begin_layout Plain Layout
24451
24452 \size small
24453 \begin_inset Quotes eld
24454 \end_inset
24455
24456 You make too much of a trifle,
24457 \begin_inset Quotes erd
24458 \end_inset
24459
24460  said I.
24461  
24462 \begin_inset Quotes eld
24463 \end_inset
24464
24465 May I ask how you knew who I was?
24466 \begin_inset Quotes erd
24467 \end_inset
24468
24469
24470 \end_layout
24471
24472 \begin_layout Plain Layout
24473
24474 \size small
24475 \begin_inset Quotes eld
24476 \end_inset
24477
24478 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24479  you'll find my little bookshop at the corner of Church Street, and very
24480  happy to see you, I am sure.
24481  Maybe you collect yourself, sir.
24482  Here's 
24483 \noun on
24484 British
24485 \begin_inset space ~
24486 \end_inset
24487
24488 Birds
24489 \noun default
24490 , and 
24491 \noun on
24492 Catullus
24493 \noun default
24494 , and 
24495 \noun on
24496 The Holy War
24497 \noun default
24498 --a bargain, every one of them.
24499  With five volumes you could just fill that gap on that second shelf.
24500  It looks untidy, does it not, sir?
24501 \begin_inset Quotes erd
24502 \end_inset
24503
24504
24505 \end_layout
24506
24507 \end_inset
24508
24509
24510 \end_layout
24511
24512 \begin_layout Standard
24513 \begin_inset VSpace defskip
24514 \end_inset
24515
24516
24517 \end_layout
24518
24519 \begin_layout Standard
24520 The rule can be colored by redefining the command 
24521 \series bold
24522
24523 \backslash
24524 columnseprulecolor
24525 \series default
24526 .
24527  This is done by inserting the command
24528 \begin_inset Newline newline
24529 \end_inset
24530
24531
24532 \series bold
24533
24534 \backslash
24535 renewcommand{
24536 \backslash
24537 columnseprulecolor}{
24538 \backslash
24539 color{red}}
24540 \series default
24541
24542 \begin_inset Newline newline
24543 \end_inset
24544
24545 as TeX-Code before the multicolumn inset.
24546  Replace 
24547 \series bold
24548 red
24549 \series default
24550  in this command by a color of your choice.
24551  You can use all pre- and self-defined colors.
24552  See the 
24553 \emph on
24554 EmbeddedObjects
24555 \emph default
24556  manual, section 
24557 \emph on
24558 Colored
24559 \begin_inset space ~
24560 \end_inset
24561
24562 Tables
24563 \emph default
24564  for more information about pre- and self-defined colors.
24565  To go back to the default color insert the command
24566 \begin_inset Newline newline
24567 \end_inset
24568
24569
24570 \series bold
24571
24572 \backslash
24573 renewcommand{
24574 \backslash
24575 columnseprulecolor}{
24576 \backslash
24577 normalcolor}
24578 \series default
24579
24580 \begin_inset Newline newline
24581 \end_inset
24582
24583 Here is the example with a cyan rule and 1
24584 \begin_inset space \thinspace{}
24585 \end_inset
24586
24587 cm column separation:
24588 \end_layout
24589
24590 \begin_layout Standard
24591 \begin_inset ERT
24592 status open
24593
24594 \begin_layout Plain Layout
24595
24596
24597 \backslash
24598 setlength{
24599 \backslash
24600 columnsep}{1cm}
24601 \end_layout
24602
24603 \begin_layout Plain Layout
24604
24605
24606 \backslash
24607 renewcommand{
24608 \backslash
24609 columnseprulecolor}{
24610 \backslash
24611 color{cyan}}
24612 \end_layout
24613
24614 \end_inset
24615
24616
24617 \end_layout
24618
24619 \begin_layout Standard
24620 \begin_inset Flex Multiple Columns
24621 status open
24622
24623 \begin_layout Plain Layout
24624
24625 \size small
24626 \begin_inset Quotes eld
24627 \end_inset
24628
24629 You're surprised to see me, sir,
24630 \begin_inset Quotes erd
24631 \end_inset
24632
24633  said he, in a strange, croaking voice.
24634 \end_layout
24635
24636 \begin_layout Plain Layout
24637
24638 \size small
24639 I acknowledged that I was.
24640 \end_layout
24641
24642 \begin_layout Plain Layout
24643
24644 \size small
24645 \begin_inset Quotes eld
24646 \end_inset
24647
24648 Well, I've a conscience, sir, and when I chanced to see you go into this
24649  house, as I came hobbling after you, I thought to myself, I'll just step
24650  in and see that kind gentleman, and tell him that if I was a bit gruff
24651  in my manner there was not any harm meant, and that I am much obliged to
24652  him for picking up my books.
24653 \begin_inset Quotes erd
24654 \end_inset
24655
24656
24657 \end_layout
24658
24659 \begin_layout Plain Layout
24660
24661 \size small
24662 \begin_inset Quotes eld
24663 \end_inset
24664
24665 You make too much of a trifle,
24666 \begin_inset Quotes erd
24667 \end_inset
24668
24669  said I.
24670  
24671 \begin_inset Quotes eld
24672 \end_inset
24673
24674 May I ask how you knew who I was?
24675 \begin_inset Quotes erd
24676 \end_inset
24677
24678
24679 \end_layout
24680
24681 \begin_layout Plain Layout
24682
24683 \size small
24684 \begin_inset Quotes eld
24685 \end_inset
24686
24687 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24688  you'll find my little bookshop at the corner of Church Street, and very
24689  happy to see you, I am sure.
24690  Maybe you collect yourself, sir.
24691  Here's 
24692 \noun on
24693 British
24694 \begin_inset space ~
24695 \end_inset
24696
24697 Birds
24698 \noun default
24699 , and 
24700 \noun on
24701 Catullus
24702 \noun default
24703 , and 
24704 \noun on
24705 The Holy War
24706 \noun default
24707 --a bargain, every one of them.
24708  With five volumes you could just fill that gap on that second shelf.
24709  It looks untidy, does it not, sir?
24710 \begin_inset Quotes erd
24711 \end_inset
24712
24713
24714 \end_layout
24715
24716 \end_inset
24717
24718
24719 \end_layout
24720
24721 \begin_layout Standard
24722 \begin_inset ERT
24723 status collapsed
24724
24725 \begin_layout Plain Layout
24726
24727
24728 \backslash
24729 setlength{
24730 \backslash
24731 columnseprule}{0pt}
24732 \end_layout
24733
24734 \begin_layout Plain Layout
24735
24736
24737 \backslash
24738 renewcommand{
24739 \backslash
24740 columnseprulecolor}{
24741 \backslash
24742 normalcolor}
24743 \end_layout
24744
24745 \end_inset
24746
24747
24748 \begin_inset Note Note
24749 status collapsed
24750
24751 \begin_layout Plain Layout
24752 go back to the default
24753 \end_layout
24754
24755 \end_inset
24756
24757
24758 \end_layout
24759
24760 \begin_layout Section
24761 Non-standard Paragraph Shapes
24762 \end_layout
24763
24764 \begin_layout Standard
24765 \noindent
24766 LaTeX as well as any other text processor uses by default rectangular paragraphs.
24767  For special cases like for example posters, invitation cards or poems you
24768  can modify the paragraph shape to one of your choice.
24769  This can be done by using the LaTeX-package 
24770 \series bold
24771 shapepar
24772 \series default
24773  which is loaded by using in the document settings the module 
24774 \family sans
24775 Custom paragraph shapes
24776 \family default
24777 .
24778 \end_layout
24779
24780 \begin_layout Subsection
24781 Predefined shapes
24782 \end_layout
24783
24784 \begin_layout Standard
24785
24786 \series bold
24787 shapepar
24788 \series default
24789  provides the following shapes:
24790 \end_layout
24791
24792 \begin_layout Standard
24793 \begin_inset Tabular
24794 <lyxtabular version="3" rows="13" columns="3">
24795 <features rotate="0" booktabs="true" islongtable="true" longtabularalignment="center">
24796 <column alignment="center" valignment="middle" width="16col%">
24797 <column alignment="center" valignment="middle" width="40col%">
24798 <column alignment="center" valignment="middle" width="35col%">
24799 <row endhead="true">
24800 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24801 \begin_inset Text
24802
24803 \begin_layout Plain Layout
24804 Name
24805 \end_layout
24806
24807 \end_inset
24808 </cell>
24809 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24810 \begin_inset Text
24811
24812 \begin_layout Plain Layout
24813 Description
24814 \end_layout
24815
24816 \end_inset
24817 </cell>
24818 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
24819 \begin_inset Text
24820
24821 \begin_layout Plain Layout
24822 Annotation
24823 \end_layout
24824
24825 \end_inset
24826 </cell>
24827 </row>
24828 <row>
24829 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24830 \begin_inset Text
24831
24832 \begin_layout Plain Layout
24833 CDlabel
24834 \end_layout
24835
24836 \end_inset
24837 </cell>
24838 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24839 \begin_inset Text
24840
24841 \begin_layout Plain Layout
24842 Circle with circular hole (in the size of a CD/DVD)
24843 \end_layout
24844
24845 \end_inset
24846 </cell>
24847 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24848 \begin_inset Text
24849
24850 \begin_layout Plain Layout
24851 Cannot be scaled, take care there is not too much text
24852 \end_layout
24853
24854 \end_inset
24855 </cell>
24856 </row>
24857 <row>
24858 <cell alignment="center" valignment="top" topline="true" usebox="none">
24859 \begin_inset Text
24860
24861 \begin_layout Plain Layout
24862 Circle
24863 \end_layout
24864
24865 \end_inset
24866 </cell>
24867 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24868 \begin_inset Text
24869
24870 \begin_layout Plain Layout
24871 Circle
24872 \end_layout
24873
24874 \end_inset
24875 </cell>
24876 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24877 \begin_inset Text
24878
24879 \begin_layout Plain Layout
24880 Fragile, calculation might fail
24881 \end_layout
24882
24883 \end_inset
24884 </cell>
24885 </row>
24886 <row>
24887 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24888 \begin_inset Text
24889
24890 \begin_layout Plain Layout
24891 Diamond
24892 \end_layout
24893
24894 \end_inset
24895 </cell>
24896 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24897 \begin_inset Text
24898
24899 \begin_layout Plain Layout
24900 Rhomboid (symbolizing a 
24901 \begin_inset Quotes eld
24902 \end_inset
24903
24904 diamond
24905 \begin_inset Quotes erd
24906 \end_inset
24907
24908 )
24909 \end_layout
24910
24911 \end_inset
24912 </cell>
24913 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24914 \begin_inset Text
24915
24916 \begin_layout Plain Layout
24917 -
24918 \end_layout
24919
24920 \end_inset
24921 </cell>
24922 </row>
24923 <row>
24924 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24925 \begin_inset Text
24926
24927 \begin_layout Plain Layout
24928 Heart
24929 \end_layout
24930
24931 \end_inset
24932 </cell>
24933 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24934 \begin_inset Text
24935
24936 \begin_layout Plain Layout
24937 Heart-like shape
24938 \end_layout
24939
24940 \end_inset
24941 </cell>
24942 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24943 \begin_inset Text
24944
24945 \begin_layout Plain Layout
24946 -
24947 \end_layout
24948
24949 \end_inset
24950 </cell>
24951 </row>
24952 <row>
24953 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24954 \begin_inset Text
24955
24956 \begin_layout Plain Layout
24957 Hexagon
24958 \end_layout
24959
24960 \end_inset
24961 </cell>
24962 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24963 \begin_inset Text
24964
24965 \begin_layout Plain Layout
24966 Hexagon
24967 \end_layout
24968
24969 \end_inset
24970 </cell>
24971 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24972 \begin_inset Text
24973
24974 \begin_layout Plain Layout
24975 -
24976 \end_layout
24977
24978 \end_inset
24979 </cell>
24980 </row>
24981 <row>
24982 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24983 \begin_inset Text
24984
24985 \begin_layout Plain Layout
24986 Nut
24987 \end_layout
24988
24989 \end_inset
24990 </cell>
24991 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24992 \begin_inset Text
24993
24994 \begin_layout Plain Layout
24995 Nut for bolt (hexagon with circular hole)
24996 \end_layout
24997
24998 \end_inset
24999 </cell>
25000 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25001 \begin_inset Text
25002
25003 \begin_layout Plain Layout
25004 -
25005 \end_layout
25006
25007 \end_inset
25008 </cell>
25009 </row>
25010 <row>
25011 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25012 \begin_inset Text
25013
25014 \begin_layout Plain Layout
25015 Square
25016 \end_layout
25017
25018 \end_inset
25019 </cell>
25020 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25021 \begin_inset Text
25022
25023 \begin_layout Plain Layout
25024 Square
25025 \end_layout
25026
25027 \end_inset
25028 </cell>
25029 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25030 \begin_inset Text
25031
25032 \begin_layout Plain Layout
25033 -
25034 \end_layout
25035
25036 \end_inset
25037 </cell>
25038 </row>
25039 <row>
25040 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25041 \begin_inset Text
25042
25043 \begin_layout Plain Layout
25044 Star
25045 \end_layout
25046
25047 \end_inset
25048 </cell>
25049 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25050 \begin_inset Text
25051
25052 \begin_layout Plain Layout
25053 Five-point star
25054 \end_layout
25055
25056 \end_inset
25057 </cell>
25058 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
25059 \begin_inset Text
25060
25061 \begin_layout Plain Layout
25062 -
25063 \end_layout
25064
25065 \end_inset
25066 </cell>
25067 </row>
25068 <row>
25069 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25070 \begin_inset Text
25071
25072 \begin_layout Plain Layout
25073 Candle
25074 \end_layout
25075
25076 \end_inset
25077 </cell>
25078 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25079 \begin_inset Text
25080
25081 \begin_layout Plain Layout
25082 Burning candle
25083 \end_layout
25084
25085 \end_inset
25086 </cell>
25087 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25088 \begin_inset Text
25089
25090 \begin_layout Plain Layout
25091 -
25092 \end_layout
25093
25094 \end_inset
25095 </cell>
25096 </row>
25097 <row>
25098 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25099 \begin_inset Text
25100
25101 \begin_layout Plain Layout
25102 Drop down/up
25103 \end_layout
25104
25105 \end_inset
25106 </cell>
25107 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25108 \begin_inset Text
25109
25110 \begin_layout Plain Layout
25111 Normal/reversed rain drop
25112 \end_layout
25113
25114 \end_inset
25115 </cell>
25116 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25117 \begin_inset Text
25118
25119 \begin_layout Plain Layout
25120 Fragile, calculation might fail
25121 \end_layout
25122
25123 \end_inset
25124 </cell>
25125 </row>
25126 <row>
25127 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25128 \begin_inset Text
25129
25130 \begin_layout Plain Layout
25131 TeX
25132 \end_layout
25133
25134 \end_inset
25135 </cell>
25136 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25137 \begin_inset Text
25138
25139 \begin_layout Plain Layout
25140 The TeX logo
25141 \end_layout
25142
25143 \end_inset
25144 </cell>
25145 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25146 \begin_inset Text
25147
25148 \begin_layout Plain Layout
25149 -
25150 \end_layout
25151
25152 \end_inset
25153 </cell>
25154 </row>
25155 <row>
25156 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25157 \begin_inset Text
25158
25159 \begin_layout Plain Layout
25160 Triangle up/down/
25161 \begin_inset Newline newline
25162 \end_inset
25163
25164 left/right
25165 \end_layout
25166
25167 \end_inset
25168 </cell>
25169 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25170 \begin_inset Text
25171
25172 \begin_layout Plain Layout
25173 Triangles in different orientations
25174 \end_layout
25175
25176 \end_inset
25177 </cell>
25178 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
25179 \begin_inset Text
25180
25181 \begin_layout Plain Layout
25182 -
25183 \end_layout
25184
25185 \end_inset
25186 </cell>
25187 </row>
25188 </lyxtabular>
25189
25190 \end_inset
25191
25192
25193 \end_layout
25194
25195 \begin_layout Standard
25196 To use a shape for your paragraph, simply select it in LyX's pull-down box
25197  for environments in the toolbar.
25198 \end_layout
25199
25200 \begin_layout Standard
25201 \begin_inset Newpage newpage
25202 \end_inset
25203
25204
25205 \end_layout
25206
25207 \begin_layout Standard
25208 Here is an example paragraph in the shape of a nut:
25209 \end_layout
25210
25211 \begin_layout Standard
25212 \begin_inset VSpace bigskip
25213 \end_inset
25214
25215
25216 \end_layout
25217
25218 \begin_layout Nut
25219
25220 \lang latin
25221 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25222  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25223  voluptua.
25224  At vero eos et accusam et justo duo dolores et ea rebum.
25225  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25226  sit amet.
25227  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25228  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25229  voluptua.
25230 \end_layout
25231
25232 \begin_layout Standard
25233 \begin_inset VSpace bigskip
25234 \end_inset
25235
25236
25237 \end_layout
25238
25239 \begin_layout Standard
25240 \begin_inset Note Greyedout
25241 status open
25242
25243 \begin_layout Plain Layout
25244
25245 \series bold
25246 Note
25247 \series default
25248 : shapepar paragraphs cannot run over a page break.
25249 \end_layout
25250
25251 \end_inset
25252
25253
25254 \end_layout
25255
25256 \begin_layout Standard
25257 \begin_inset VSpace bigskip
25258 \end_inset
25259
25260
25261 \end_layout
25262
25263 \begin_layout Standard
25264
25265 \series bold
25266 shapepar
25267 \series default
25268  takes care that the shape will always be preserved, no matter how much
25269  text is in the paragraph.
25270  Therefore the paragraph size changes with the amount of contained text.
25271  This can lead to paragraph sizes exceeding the page margins.
25272  To demonstrate the size scaling, here is the same example paragraph but
25273  with twice as much text:
25274 \end_layout
25275
25276 \begin_layout Standard
25277 \begin_inset Newpage newpage
25278 \end_inset
25279
25280
25281 \end_layout
25282
25283 \begin_layout Nut
25284
25285 \lang latin
25286 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25287  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25288  voluptua.
25289  At vero eos et accusam et justo duo dolores et ea rebum.
25290  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25291  sit amet.
25292  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25293  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25294  voluptua.
25295  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25296  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25297  voluptua.
25298  At vero eos et accusam et justo duo dolores et ea rebum.
25299  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25300  sit amet.
25301  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25302  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25303  voluptua.
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 An exception is the shape 
25315 \family sans
25316 CDlabel
25317 \family default
25318 .
25319  It cannot be scaled because it must fit the size of a CD/DVD.
25320  Therefore the amount of text that fits into the shape is limited.
25321 \begin_inset Newline newline
25322 \end_inset
25323
25324 The 
25325 \family sans
25326 drop
25327 \family default
25328  shapes and the 
25329 \family sans
25330 circle
25331 \family default
25332  shape are fragile, meaning that the calculation of their size can fail,
25333  depending on the amount of text.
25334  You will then get the LaTeX error 
25335 \begin_inset Quotes eld
25336 \end_inset
25337
25338 Arithmetic overflow
25339 \begin_inset Quotes erd
25340 \end_inset
25341
25342 .
25343  In this case one can try to remove or add some text; if nothing works one
25344  has to use another shape.
25345 \end_layout
25346
25347 \begin_layout Standard
25348 \begin_inset VSpace bigskip
25349 \end_inset
25350
25351
25352 \end_layout
25353
25354 \begin_layout Standard
25355 For shapes with tips you will maybe see that LaTeX's hyphenation routine
25356  fails for text in the tips.
25357  Therefore it is often necessary to add hyphenation points 
25358 \family sans
25359 (
25360 \begin_inset Info
25361 type  "shortcut"
25362 arg   "specialchar-insert hyphenation"
25363 \end_inset
25364
25365
25366 \family default
25367 ) to the corresponding text parts.
25368 \end_layout
25369
25370 \begin_layout Standard
25371 \begin_inset VSpace bigskip
25372 \end_inset
25373
25374
25375 \end_layout
25376
25377 \begin_layout Standard
25378 Shapepar paragraphs are either always centered or placed on the page so
25379  that their left border touches the left page margin.
25380  You can therefore not use the paragraph dialog to align such paragraphs.
25381  A solution is to put the paragraph into a minipage or parbox and align
25382  the box.
25383  The problem is hereby to find the right width for the box.
25384  Because if it is too wide and you center the box, the paragraph is not
25385  centered too because it sticks at the left side of the box.
25386  So you might have to play a bit with the width until it fits.
25387  Here are two heart-shaped paragraphs, the first one is not aligned, the
25388  second one is right-aligned:
25389 \end_layout
25390
25391 \begin_layout Standard
25392 \begin_inset Newpage newpage
25393 \end_inset
25394
25395
25396 \end_layout
25397
25398 \begin_layout Heart
25399 \noindent
25400
25401 \lang latin
25402 Lo\SpecialChar \-
25403 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25404  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25405  voluptua.
25406  At vero eos et accusam et justo duo dolores et ea rebum.
25407  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25408  sit amet.
25409 \end_layout
25410
25411 \begin_layout Standard
25412 \begin_inset VSpace bigskip
25413 \end_inset
25414
25415
25416 \end_layout
25417
25418 \begin_layout Standard
25419 \noindent
25420 \align right
25421 \begin_inset Box Frameless
25422 position "t"
25423 hor_pos "c"
25424 has_inner_box 1
25425 inner_pos "t"
25426 use_parbox 1
25427 use_makebox 0
25428 width "42col%"
25429 special "none"
25430 height "1in"
25431 height_special "totalheight"
25432 status open
25433
25434 \begin_layout Heart
25435 \noindent
25436
25437 \lang latin
25438 Lo\SpecialChar \-
25439 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25440  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25441  voluptua.
25442  At vero eos et accusam et justo duo dolores et ea rebum.
25443  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25444  sit amet.
25445 \end_layout
25446
25447 \end_inset
25448
25449
25450 \end_layout
25451
25452 \begin_layout Subsection
25453 Custom shapes
25454 \end_layout
25455
25456 \begin_layout Standard
25457 You can define any shape you want.
25458  Doing this manually is a lot of work because every coordinate must be specified.
25459  But there is a way to let the computer calculate the coordinates:
25460 \end_layout
25461
25462 \begin_layout Enumerate
25463 Install the program 
25464 \begin_inset CommandInset href
25465 LatexCommand href
25466 name "Jpgfdraw"
25467 target "http://www.ctan.org/tex-archive/graphics/jpgfdraw"
25468
25469 \end_inset
25470
25471 .
25472 \end_layout
25473
25474 \begin_layout Enumerate
25475 In 
25476 \family sans
25477 Jpgfdraw
25478 \family default
25479  go to the menu 
25480 \family sans
25481 Te
25482 \begin_inset ERT
25483 status collapsed
25484
25485 \begin_layout Plain Layout
25486
25487 {}
25488 \end_layout
25489
25490 \end_inset
25491
25492 X/LaT
25493 \begin_inset ERT
25494 status collapsed
25495
25496 \begin_layout Plain Layout
25497
25498 {}
25499 \end_layout
25500
25501 \end_inset
25502
25503 eX\SpecialChar \menuseparator
25504 Settings\SpecialChar \menuseparator
25505 Set Normal Size
25506 \family default
25507  and select the font size you are using in your document.
25508  For example this document uses the size 12
25509 \begin_inset space \thinspace{}
25510 \end_inset
25511
25512 pt.
25513 \end_layout
25514
25515 \begin_layout Enumerate
25516 Draw a shape.
25517 \end_layout
25518
25519 \begin_layout Enumerate
25520 Use the menu 
25521 \family sans
25522 Te
25523 \begin_inset ERT
25524 status collapsed
25525
25526 \begin_layout Plain Layout
25527
25528 {}
25529 \end_layout
25530
25531 \end_inset
25532
25533 X/LaT
25534 \begin_inset ERT
25535 status collapsed
25536
25537 \begin_layout Plain Layout
25538
25539 {}
25540 \end_layout
25541
25542 \end_inset
25543
25544 eX\SpecialChar \menuseparator
25545 Shapepar
25546 \family default
25547  to export the shape to coordinates.
25548  In the appearing dialog use either the outline of your shape for the coordinate
25549 s or the path itself.
25550 \begin_inset Foot
25551 status collapsed
25552
25553 \begin_layout Plain Layout
25554 For more information see 
25555 \begin_inset CommandInset href
25556 LatexCommand href
25557 target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html"
25558
25559 \end_inset
25560
25561
25562 \end_layout
25563
25564 \end_inset
25565
25566
25567 \end_layout
25568
25569 \begin_layout Standard
25570 The coordinates are written into a TeX-file.
25571  To use it for your LyX document
25572 \end_layout
25573
25574 \begin_layout Enumerate
25575 Place the cursor before the first character of your paragraph (or into a
25576  new empty one).
25577 \end_layout
25578
25579 \begin_layout Enumerate
25580 Open in LyX the menu 
25581 \family sans
25582 Insert\SpecialChar \menuseparator
25583 File\SpecialChar \menuseparator
25584 Child
25585 \begin_inset space ~
25586 \end_inset
25587
25588 Document
25589 \family default
25590 , select the file and use 
25591 \family sans
25592 Input
25593 \family default
25594  as 
25595 \family sans
25596 Include Type.
25597 \end_layout
25598
25599 \begin_layout Standard
25600 \begin_inset VSpace defskip
25601 \end_inset
25602
25603
25604 \end_layout
25605
25606 \begin_layout Standard
25607 \begin_inset Note Greyedout
25608 status open
25609
25610 \begin_layout Plain Layout
25611
25612 \series bold
25613 Note
25614 \series default
25615 : The changed shape only applies to the current paragraph; everything is
25616  reset to normal for the next paragraph.
25617  Therefore the shape definition file must be input into every paragraph
25618  with the desired shape.
25619 \end_layout
25620
25621 \end_inset
25622
25623
25624 \end_layout
25625
25626 \begin_layout Standard
25627 \begin_inset VSpace bigskip
25628 \end_inset
25629
25630
25631 \end_layout
25632
25633 \begin_layout Standard
25634 Here is an example:
25635 \end_layout
25636
25637 \begin_layout Standard
25638 \begin_inset VSpace bigskip
25639 \end_inset
25640
25641
25642 \end_layout
25643
25644 \begin_layout Standard
25645 \begin_inset CommandInset include
25646 LatexCommand input
25647 filename "SpecialParagraphShape.tex"
25648
25649 \end_inset
25650
25651
25652 \lang latin
25653 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25654  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25655  voluptua.
25656  At vero eos et accusam et justo duo dolores et ea rebum.
25657  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25658  sit amet.
25659  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25660  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25661  voluptua.
25662 \end_layout
25663
25664 \begin_layout Standard
25665 \begin_inset VSpace bigskip
25666 \end_inset
25667
25668
25669 \end_layout
25670
25671 \begin_layout Standard
25672
25673 \series bold
25674 A tip:
25675 \series default
25676  to draw complexer shapes in 
25677 \family sans
25678 Jpgfdraw
25679 \family default
25680  you can draw the shape in a program of your choice and import the resulting
25681  image to 
25682 \family sans
25683 Jpgfdraw
25684 \family default
25685 .
25686  Then you only need to draw a line or spline along the outline of the image.
25687 \end_layout
25688
25689 \begin_layout Standard
25690 \begin_inset VSpace bigskip
25691 \end_inset
25692
25693
25694 \end_layout
25695
25696 \begin_layout Standard
25697 The module 
25698 \family sans
25699 Custom paragraph shapes
25700 \family default
25701  also provides the two commands 
25702 \family sans
25703 shapepar
25704 \family default
25705  and 
25706 \family sans
25707 Shapepar
25708 \family default
25709  which can be used to define custom shapes coordinate by coordinate.
25710 \begin_inset Foot
25711 status collapsed
25712
25713 \begin_layout Plain Layout
25714 These commands are internally used for all shapes described here.
25715 \end_layout
25716
25717 \end_inset
25718
25719  For information how these styles are used and about further customization
25720  possibilities, have a look at the documentation of the package 
25721 \series bold
25722 shapepar
25723 \series default
25724
25725 \begin_inset CommandInset citation
25726 LatexCommand cite
25727 key "shapepar"
25728
25729 \end_inset
25730
25731 .
25732 \end_layout
25733
25734 \begin_layout Bibliography
25735 \begin_inset CommandInset bibitem
25736 LatexCommand bibitem
25737 key "multicol"
25738
25739 \end_inset
25740
25741 Documentation of the LaTeX-package 
25742 \begin_inset CommandInset href
25743 LatexCommand href
25744 name "multicol"
25745 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
25746
25747 \end_inset
25748
25749
25750 \end_layout
25751
25752 \begin_layout Bibliography
25753 \begin_inset CommandInset bibitem
25754 LatexCommand bibitem
25755 key "shapepar"
25756
25757 \end_inset
25758
25759 Documentation of the LaTeX-package 
25760 \begin_inset CommandInset href
25761 LatexCommand href
25762 name "shapepar"
25763 target "http://mirrors.ctan.org/macros/latex/contrib/shapepar/shapepar.pdf"
25764
25765 \end_inset
25766
25767
25768 \end_layout
25769
25770 \end_body
25771 \end_document