]> git.lyx.org Git - features.git/blob - lib/doc/Additional.lyx
* Additional.lyx
[features.git] / lib / doc / Additional.lyx
1 #LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
2 \lyxformat 407
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 % redefine the \LyX macro for PDF bookmarks
37 \def\LyX{\texorpdfstring{%
38   L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
39   {LyX}}
40
41 % used for multi-column text
42 \usepackage{multicol}
43
44 % extra space for tables
45 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
46 \end_preamble
47 \options fleqn,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage,tablecaptionabove
48 \use_default_options false
49 \begin_modules
50 logicalmkup
51 theorems-ams
52 theorems-ams-extended
53 \end_modules
54 \maintain_unincluded_children false
55 \begin_local_layout
56 Format 7
57 InsetLayout CharStyle:MenuItem
58 LyxType               charstyle
59 LabelString           menu
60 LatexType             command
61 LatexName             menuitem
62 Font
63 Family              Sans
64 EndFont
65 Preamble
66 \newcommand*{\menuitem}[1]{{\sffamily #1}}
67 EndPreamble
68 End
69 \end_local_layout
70 \language english
71 \inputencoding latin1
72 \fontencoding global
73 \font_roman default
74 \font_sans default
75 \font_typewriter default
76 \font_default_family default
77 \use_xetex false
78 \font_sc false
79 \font_osf false
80 \font_sf_scale 100
81 \font_tt_scale 100
82
83 \graphics default
84 \default_output_format default
85 \output_sync 0
86 \bibtex_command default
87 \index_command default
88 \paperfontsize 12
89 \spacing single
90 \use_hyperref true
91 \pdf_title "LyX's Additional Features manual"
92 \pdf_author "LyX Team"
93 \pdf_subject "LyX's additional features documentation"
94 \pdf_keywords "LyX, Documentation, Additional"
95 \pdf_bookmarks true
96 \pdf_bookmarksnumbered true
97 \pdf_bookmarksopen false
98 \pdf_bookmarksopenlevel 1
99 \pdf_breaklinks false
100 \pdf_pdfborder false
101 \pdf_colorlinks true
102 \pdf_backref false
103 \pdf_pdfusetitle false
104 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,  pdfpagelayout=OneColumn, pdfnewwindow=true,  pdfstartview=XYZ, plainpages=false, pdfpagelabels"
105 \papersize default
106 \use_geometry false
107 \use_amsmath 0
108 \use_esint 0
109 \use_mhchem 1
110 \use_mathdots 1
111 \cite_engine basic
112 \use_bibtopic false
113 \use_indices false
114 \paperorientation portrait
115 \suppress_date false
116 \use_refstyle 0
117 \index Index
118 \shortcut idx
119 \color #008000
120 \end_index
121 \secnumdepth 3
122 \tocdepth 3
123 \paragraph_separation indent
124 \paragraph_indentation default
125 \quotes_language english
126 \papercolumns 1
127 \papersides 2
128 \paperpagestyle headings
129 \tracking_changes true
130 \output_changes false
131 \html_math_output 0
132 \html_be_strict true
133 \author 1 "ab" 
134 \author 2 "bbb" 
135 \author 3 "Stephan Witt" 
136 \end_header
137
138 \begin_body
139
140 \begin_layout Title
141 Additional LyX Features
142 \end_layout
143
144 \begin_layout Author
145 by the LyX Team
146 \begin_inset Foot
147 status collapsed
148
149 \begin_layout Plain Layout
150 \noindent
151 Principal maintainer of this file is
152 \noun on
153  Richard Heck
154 \noun default
155 .
156  If you have comments or error corrections, please send them to the LyX
157  Documentation mailing list, 
158 \begin_inset Flex Code
159 status collapsed
160
161 \begin_layout Plain Layout
162 \noindent
163 <lyx-docs@lists.lyx.org>
164 \end_layout
165
166 \end_inset
167
168 .
169 \end_layout
170
171 \end_inset
172
173  
174 \end_layout
175
176 \begin_layout Standard
177 \begin_inset CommandInset toc
178 LatexCommand tableofcontents
179
180 \end_inset
181
182
183 \end_layout
184
185 \begin_layout Chapter
186 Introduction
187 \end_layout
188
189 \begin_layout Standard
190 This manual is essentially Part II of the 
191 \emph on
192 User's Guide\SpecialChar \@.
193
194 \emph default
195  The reason for separating this document out is simple: the 
196 \emph on
197 User's Guide
198 \emph default
199  is already quite lengthy, and it contains information on all of the basic
200  features one needs to know in order to prepare most documents.
201  However, the LyX Team has worked to make LyX extensible through various
202  configuration files and external packages.
203  That means that if you want to support the Fizzwizzle LaTeX package, you
204  can create a layout file (or module) for it without having to alter LyX
205  itself.
206  We've already had contributions of several new features this way, and some
207  of them are documented here.
208  There are also some more `advanced' features, such as how to control the
209  presentation of bibliographies and how to work with multi-part documents,
210  that are not covered in the 
211 \emph on
212 User's Guide
213 \emph default
214  and are discussed here.
215 \end_layout
216
217 \begin_layout Standard
218 This manual also documents some special features, like fax support, version
219  control, and SGML support, which require additional software to work properly.
220  There is also a chapter on LyX's support for HTML.
221  And lastly, there's a chapter of LaTeX tools and tips, things you can use
222  to spruce up your documents by directly using the powerful features of
223  LaTeX.
224  After all, LyX 
225 \emph on
226 is
227 \emph default
228  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
229 \end_layout
230
231 \begin_layout Standard
232 If you haven't read the 
233 \emph on
234 Introduction
235 \emph default
236  yet, you are definitely in the wrong manual.
237  The 
238 \emph on
239 Introduction
240 \emph default
241  is the first place to go, since it describes the notation and format of
242  all of the manuals.
243  You should also be thoroughly familiar with the 
244 \emph on
245 User's Guide
246 \emph default
247  and all of the basic features of LyX before attempting to read this one.
248 \end_layout
249
250 \begin_layout Standard
251 Since many of the topics in this manual depend heavily on LyX's interaction
252  with LaTeX, this first chapter covers the inner workings of LyX and how
253  to direct LyX to generate exactly the LaTeX code you want.
254  It is obviously for more seasoned LyX users.
255 \end_layout
256
257 \begin_layout Chapter
258 LyX and LaTeX
259 \end_layout
260
261 \begin_layout Section
262 How LyX Uses LaTeX
263 \end_layout
264
265 \begin_layout Standard
266 This chapter is for both TeX-nicians and the LaTeX-curious.
267  In it, we'll explain how LyX and LaTeX work together to produce printable
268  output.
269  This is the only place in any of the manuals where we assume you know something
270  about LaTeX.
271 \end_layout
272
273 \begin_layout Standard
274 At one time, LyX was called a 
275 \begin_inset Quotes eld
276 \end_inset
277
278 WYSIWYM frontend to LaTeX,
279 \begin_inset Quotes erd
280 \end_inset
281
282  but that's no longer true.
283  There are frontends to LaTeX out there.
284 \begin_inset Foot
285 status collapsed
286
287 \begin_layout Plain Layout
288 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
289  There are also the LaTeX modes for vi and emacs, of course.
290 \end_layout
291
292 \end_inset
293
294  These are basically text editors with the ability to run LaTeX and mark
295  any errors in the file you're editing.
296  Although LyX 
297 \emph on
298 is
299 \emph default
300  an editor, and it 
301 \emph on
302 does
303 \emph default
304  run LaTeX, and it also indicates errors in the file, it also does much,
305  much more.
306  For one thing, you don't need to know LaTeX to use LyX effectively.
307  And LyX has added its own extensions to LaTeX.
308  Try the following sometime: select 
309 \begin_inset Flex MenuItem
310 status collapsed
311
312 \begin_layout Plain Layout
313 Export\SpecialChar \menuseparator
314 LaTeX
315 \end_layout
316
317 \end_inset
318
319  from the 
320 \begin_inset Flex MenuItem
321 status collapsed
322
323 \begin_layout Plain Layout
324 File
325 \end_layout
326
327 \end_inset
328
329  menu (or 
330 \begin_inset Flex MenuItem
331 status collapsed
332
333 \begin_layout Plain Layout
334 View\SpecialChar \menuseparator
335 Source
336 \end_layout
337
338 \end_inset
339
340 ), then look at the preamble of the resulting 
341 \begin_inset Flex Code
342 status collapsed
343
344 \begin_layout Plain Layout
345 .tex
346 \end_layout
347
348 \end_inset
349
350  file.
351  You'll notice a variety of new macros defined specifically by LyX.
352  These macros are defined automatically, according to the features you use
353  in the document.
354 \end_layout
355
356 \begin_layout Standard
357 There are several commands that automatically invoke LaTeX.
358  They are:
359 \end_layout
360
361 \begin_layout Itemize
362 \begin_inset Flex MenuItem
363 status collapsed
364
365 \begin_layout Plain Layout
366 View\SpecialChar \menuseparator
367 Format
368 \end_layout
369
370 \end_inset
371
372
373 \end_layout
374
375 \begin_layout Itemize
376 \begin_inset Flex MenuItem
377 status collapsed
378
379 \begin_layout Plain Layout
380 View\SpecialChar \menuseparator
381 Update\SpecialChar \menuseparator
382 Format
383 \end_layout
384
385 \end_inset
386
387
388 \end_layout
389
390 \begin_layout Itemize
391 \begin_inset Flex MenuItem
392 status collapsed
393
394 \begin_layout Plain Layout
395 File\SpecialChar \menuseparator
396 Print
397 \end_layout
398
399 \end_inset
400
401
402 \end_layout
403
404 \begin_layout Itemize
405 \begin_inset Flex MenuItem
406 status collapsed
407
408 \begin_layout Plain Layout
409 File\SpecialChar \menuseparator
410 Fax
411 \end_layout
412
413 \end_inset
414
415
416 \end_layout
417
418 \begin_layout Standard
419 They will only invoke LaTeX if the file has changed since the last time
420  LaTeX was run.
421  
422 \end_layout
423
424 \begin_layout Standard
425 When LyX runs LaTeX on the file you're editing, it performs these steps:
426 \end_layout
427
428 \begin_layout Enumerate
429 Convert the document to LaTeX and save to a file with the extension 
430 \begin_inset Flex Code
431 status collapsed
432
433 \begin_layout Plain Layout
434 .tex
435 \end_layout
436
437 \end_inset
438
439  in place of 
440 \begin_inset Flex Code
441 status collapsed
442
443 \begin_layout Plain Layout
444 .lyx
445 \end_layout
446
447 \end_inset
448
449 .
450 \end_layout
451
452 \begin_layout Enumerate
453 Run LaTeX on the 
454 \begin_inset Flex Code
455 status collapsed
456
457 \begin_layout Plain Layout
458 .tex
459 \end_layout
460
461 \end_inset
462
463  file (maybe several times), and run any other commands (such as 
464 \begin_inset Flex Code
465 status collapsed
466
467 \begin_layout Plain Layout
468 bibtex
469 \end_layout
470
471 \end_inset
472
473  or 
474 \begin_inset Flex Code
475 status collapsed
476
477 \begin_layout Plain Layout
478 makeindex
479 \end_layout
480
481 \end_inset
482
483 ) needed to compile the LaTeX file.
484 \end_layout
485
486 \begin_layout Enumerate
487 If there are any errors, show the error log.
488 \end_layout
489
490 \begin_layout Standard
491 If you've run LaTeX using 
492 \begin_inset Flex MenuItem
493 status collapsed
494
495 \begin_layout Plain Layout
496 View
497 \bar under
498 \SpecialChar \menuseparator
499
500 \bar default
501 DVI
502 \end_layout
503
504 \end_inset
505
506 , LyX then runs a DVI viewer to display the DVI-file.
507  If you've used 
508 \begin_inset Flex MenuItem
509 status collapsed
510
511 \begin_layout Plain Layout
512 View
513 \bar under
514 \SpecialChar \menuseparator
515
516 \bar default
517 PostScript
518 \end_layout
519
520 \end_inset
521
522 , LyX performs further steps:
523 \end_layout
524
525 \begin_layout Itemize
526 Run 
527 \begin_inset Flex Code
528 status collapsed
529
530 \begin_layout Plain Layout
531 dvips
532 \end_layout
533
534 \end_inset
535
536  to convert the DVI file to PostScript.
537 \end_layout
538
539 \begin_layout Itemize
540 Run a PostScript viewer, such as 
541 \begin_inset Flex Code
542 status collapsed
543
544 \begin_layout Plain Layout
545 ghostview
546 \end_layout
547
548 \end_inset
549
550 , to display the PostScript file.
551 \end_layout
552
553 \begin_layout Standard
554 LyX does similar things when viewing, or exporting, other formats.
555 \end_layout
556
557 \begin_layout Section
558 Translating LaTeX files into LyX
559 \end_layout
560
561 \begin_layout Standard
562 You can import a LaTeX file into LyX by using the 
563 \begin_inset Flex MenuItem
564 status collapsed
565
566 \begin_layout Plain Layout
567 File\SpecialChar \menuseparator
568 Import\SpecialChar \menuseparator
569 LaTeX
570 \end_layout
571
572 \end_inset
573
574  command in LyX.
575  This will call a program named 
576 \begin_inset Flex Code
577 status collapsed
578
579 \begin_layout Plain Layout
580 tex2lyx
581 \end_layout
582
583 \end_inset
584
585  which will create a file 
586 \begin_inset Flex Code
587 status collapsed
588
589 \begin_layout Plain Layout
590 foo.lyx
591 \end_layout
592
593 \end_inset
594
595  from the file 
596 \begin_inset Flex Code
597 status collapsed
598
599 \begin_layout Plain Layout
600 foo.tex
601 \end_layout
602
603 \end_inset
604
605 .
606  LyX will then open that file.
607 \begin_inset Foot
608 status collapsed
609
610 \begin_layout Plain Layout
611 \begin_inset Flex Code
612 status collapsed
613
614 \begin_layout Plain Layout
615 tex2lyx
616 \end_layout
617
618 \end_inset
619
620  can also be run from the command line, of course.
621 \end_layout
622
623 \end_inset
624
625
626 \end_layout
627
628 \begin_layout Standard
629 \begin_inset Flex Code
630 status collapsed
631
632 \begin_layout Plain Layout
633 tex2lyx
634 \end_layout
635
636 \end_inset
637
638  will translate most legal LaTeX, but not everything.
639  It will put things it doesn't understand into TeX code, so after translating
640  a file with 
641 \begin_inset Flex Code
642 status collapsed
643
644 \begin_layout Plain Layout
645 tex2lyx
646 \end_layout
647
648 \end_inset
649
650 , you can look for TeX code and hand-edit it until it looks right.
651 \end_layout
652
653 \begin_layout Standard
654 If you don't know what TeX code is, read the next section.
655 \end_layout
656
657 \begin_layout Section
658 \begin_inset CommandInset label
659 LatexCommand label
660 name "sec:Inserting-TeX-Code"
661
662 \end_inset
663
664 Inserting TeX Code into LyX Documents 
665 \end_layout
666
667 \begin_layout Standard
668 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
669  You can always insert TeX code into any LyX document.
670  LyX cannot, and will never be able to, display every possible LaTeX construct.
671  If ever you need to insert LaTeX commands into your LyX document, you can
672  use the 
673 \begin_inset Flex Code
674 status collapsed
675
676 \begin_layout Plain Layout
677 TeX Code
678 \end_layout
679
680 \end_inset
681
682  box, which you can insert into your document with 
683 \begin_inset Flex MenuItem
684 status collapsed
685
686 \begin_layout Plain Layout
687 Insert\SpecialChar \menuseparator
688 TeX Code
689 \end_layout
690
691 \end_inset
692
693 .
694 \end_layout
695
696 \begin_layout Standard
697 Here's an example of inserting LaTeX commands in a LyX document.
698  The code looks like this:
699 \end_layout
700
701 \begin_layout LyX-Code
702
703 \backslash
704 begin{tabular}{ll}
705 \begin_inset Newline newline
706 \end_inset
707
708
709 \backslash
710 begin{minipage}{5cm}
711 \begin_inset Newline newline
712 \end_inset
713
714 This is an example for a minipage environment.
715  You 
716 \begin_inset Newline newline
717 \end_inset
718
719 can put nearly everything in it, even (non-floating) 
720 \begin_inset Newline newline
721 \end_inset
722
723 figures and tables.
724  
725 \begin_inset Newline newline
726 \end_inset
727
728
729 \backslash
730 end{minipage}
731 \begin_inset Newline newline
732 \end_inset
733
734 &
735 \begin_inset Newline newline
736 \end_inset
737
738
739 \backslash
740 begin{minipage}{5cm}
741 \begin_inset Newline newline
742 \end_inset
743
744
745 \backslash
746 begin{verbatim}
747 \begin_inset Newline newline
748 \end_inset
749
750
751 \backslash
752 begin{minipage}{5cm}
753 \begin_inset Newline newline
754 \end_inset
755
756 This ...
757  
758 \begin_inset Newline newline
759 \end_inset
760
761
762 \backslash
763 end{minipage}
764 \begin_inset Newline newline
765 \end_inset
766
767
768 \backslash
769 end{verbatim}
770 \begin_inset Newline newline
771 \end_inset
772
773
774 \backslash
775 end{minipage}
776 \begin_inset Newline newline
777 \end_inset
778
779
780 \backslash
781 end{tabular}
782 \end_layout
783
784 \begin_layout LyX-Code
785
786 \end_layout
787
788 \begin_layout Standard
789 The 
790 \begin_inset Flex Code
791 status collapsed
792
793 \begin_layout Plain Layout
794 TeX Code
795 \end_layout
796
797 \end_inset
798
799  box containing this text is directly after this paragraph.
800  Those of you reading the manual in LyX will only see the TeX code inset.
801  Those reading a printed version of the manuals will see the actual results:
802 \end_layout
803
804 \begin_layout Standard
805 \begin_inset ERT
806 status collapsed
807
808 \begin_layout Plain Layout
809
810
811 \backslash
812 begin{tabular}{ll}
813 \end_layout
814
815 \begin_layout Plain Layout
816
817
818 \backslash
819 begin{minipage}{5cm}
820 \end_layout
821
822 \begin_layout Plain Layout
823
824 This is an example for a minipage environment.
825  You can put nearly everything in it, even (non-floating) figures and tables.
826  
827 \end_layout
828
829 \begin_layout Plain Layout
830
831
832 \backslash
833 end{minipage}
834 \end_layout
835
836 \begin_layout Plain Layout
837
838 &
839 \end_layout
840
841 \begin_layout Plain Layout
842
843
844 \backslash
845 begin{minipage}{5cm}
846 \end_layout
847
848 \begin_layout Plain Layout
849
850
851 \backslash
852 begin{verbatim}
853 \end_layout
854
855 \begin_layout Plain Layout
856
857
858 \backslash
859 begin{minipage}{5cm}
860 \end_layout
861
862 \begin_layout Plain Layout
863
864 This ...
865  
866 \end_layout
867
868 \begin_layout Plain Layout
869
870
871 \backslash
872 end{minipage}
873 \end_layout
874
875 \begin_layout Plain Layout
876
877
878 \backslash
879 end{verbatim}
880 \end_layout
881
882 \begin_layout Plain Layout
883
884
885 \backslash
886 end{minipage}
887 \end_layout
888
889 \begin_layout Plain Layout
890
891
892 \backslash
893 end{tabular}
894 \end_layout
895
896 \end_inset
897
898
899 \end_layout
900
901 \begin_layout Standard
902 In addition to using TeX code, you can also create a separate file containing
903  some complex LaTeX structure and then use 
904 \begin_inset Flex MenuItem
905 status collapsed
906
907 \begin_layout Plain Layout
908 Insert\SpecialChar \menuseparator
909 Child
910 \begin_inset space ~
911 \end_inset
912
913 Document
914 \end_layout
915
916 \end_inset
917
918  to include your file (you should select the type 
919 \begin_inset Flex Code
920 status collapsed
921
922 \begin_layout Plain Layout
923 Input
924 \end_layout
925
926 \end_inset
927
928 ).
929  We recommend that you only do this if you have a 
930 \begin_inset Flex Code
931 status collapsed
932
933 \begin_layout Plain Layout
934 .tex
935 \end_layout
936
937 \end_inset
938
939  file which you 
940 \emph on
941 know
942 \emph default
943  works already.
944  Otherwise, you'll have a big job tracking down LaTeX errors.
945 \end_layout
946
947 \begin_layout Standard
948 There are a few last points to emphasize:
949 \end_layout
950
951 \begin_layout Itemize
952 LyX 
953 \emph on
954 does not
955 \emph default
956  check if your LaTeX code is correct.
957 \end_layout
958
959 \begin_layout Itemize
960 Beware reinventing the wheel.
961 \end_layout
962
963 \begin_layout Standard
964 On that last point, LyX does have quite a few features tucked into it, and
965  more are coming.
966  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
967  feature before you decide you have to do it by hand.
968  Moreover, there are numerous LaTeX packages out there to do all sorts of
969  things, from labels to envelopes to fancy multipage tables.
970  Check out 
971 \begin_inset CommandInset href
972 LatexCommand href
973 name "CTAN"
974 target "http://www.ctan.org/"
975
976 \end_inset
977
978  for details, and see chapter 
979 \begin_inset CommandInset ref
980 LatexCommand ref
981 reference "cha:secrets"
982
983 \end_inset
984
985 .
986 \end_layout
987
988 \begin_layout Standard
989 If you do need to do some wild and fancy things within your document, be
990  sure to check out a good LaTeX book for assistance.
991  There are a number of them listed in the bibliography of the 
992 \emph on
993 User's Guide
994 \emph default
995 .
996 \end_layout
997
998 \begin_layout Section
999 LyX and the LaTeX Preamble
1000 \end_layout
1001
1002 \begin_layout Subsection
1003 About the LaTeX Preamble
1004 \end_layout
1005
1006 \begin_layout Standard
1007 If you already know LaTeX, there is no need to explain here what the preamble
1008  is good for.
1009  If you don't, the following will give you some ideas—we recommend again
1010  that you consult a LaTeX book for further information.
1011  In any case, you should read the points below, because they explain what
1012  you can do and what you don't need to do in the LaTeX preamble of a LyX
1013  document.
1014 \end_layout
1015
1016 \begin_layout Standard
1017 The LaTeX preamble comes at the very beginning of a document, 
1018 \emph on
1019 before
1020 \emph default
1021  the text.
1022  It serves to:
1023 \end_layout
1024
1025 \begin_layout Itemize
1026 Declare the document class.
1027  
1028 \begin_inset Newline newline
1029 \end_inset
1030
1031 LyX already does this for you.
1032  If you're a seasoned LaTeX-nician, and you have a custom document class
1033  you want to use, check out the 
1034 \emph on
1035 Customization Manual
1036 \emph default
1037  for information on how to make LyX interface to it.
1038 \end_layout
1039
1040 \begin_layout Itemize
1041 Declare the usage of packages.
1042  
1043 \begin_inset Newline newline
1044 \end_inset
1045
1046 LaTeX packages provide special commands, which are only available within
1047  a document when the package has been declared in the preamble.
1048  For example, the package 
1049 \begin_inset Flex Code
1050 status collapsed
1051
1052 \begin_layout Plain Layout
1053 indentfirst
1054 \end_layout
1055
1056 \end_inset
1057
1058  forces all paragraphs to be indented.
1059  There are other packages for labels, envelopes, margins, etc.
1060  
1061 \end_layout
1062
1063 \begin_layout Itemize
1064 Set counters, variables, lengths and widths.
1065  
1066 \begin_inset Newline newline
1067 \end_inset
1068
1069 There are several LaTeX counters and variables which 
1070 \emph on
1071 must
1072 \emph default
1073  be set globally from within the preamble in order to have the desired effect.
1074  (There are variables which you can set and reset inside the document, too.)
1075  Margins are a good example of something which must be set in the preamble.
1076  Another example is the label format for lists.
1077  You can actually set these just about anywhere, but it's best to do it
1078  just once, inside the preamble.
1079 \end_layout
1080
1081 \begin_layout Itemize
1082 Declare user defined commands (with 
1083 \begin_inset Flex Code
1084 status collapsed
1085
1086 \begin_layout Plain Layout
1087
1088 \backslash
1089 newcommand
1090 \end_layout
1091
1092 \end_inset
1093
1094  or 
1095 \begin_inset Flex Code
1096 status collapsed
1097
1098 \begin_layout Plain Layout
1099
1100 \backslash
1101 renewcommand
1102 \end_layout
1103
1104 \end_inset
1105
1106 ).
1107 \begin_inset Newline newline
1108 \end_inset
1109
1110 These are abbreviations for LaTeX commands which appear very often inside
1111  a document.
1112  Although the preamble is a good place to declare such commands, they 
1113 \emph on
1114 can
1115 \emph default
1116  be declared anywhere (before they are used for the first time, of course).
1117  This can be useful if there is a lot of raw LaTeX code in your document,
1118  which normally should not be the case.
1119 \end_layout
1120
1121 \begin_layout Standard
1122 LyX adds its own set of definitions to the preamble of the 
1123 \begin_inset Flex Code
1124 status collapsed
1125
1126 \begin_layout Plain Layout
1127 .tex
1128 \end_layout
1129
1130 \end_inset
1131
1132  file it produces.
1133  This makes LaTeX files generated by LyX portable.
1134 \end_layout
1135
1136 \begin_layout Subsection
1137 Changing the Preamble
1138 \end_layout
1139
1140 \begin_layout Standard
1141 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1142  can't change them without patching LyX itself.
1143  You can, however, add your own stuff to the preamble by selecting 
1144 \begin_inset Flex MenuItem
1145 status collapsed
1146
1147 \begin_layout Plain Layout
1148 LaTeX
1149 \begin_inset space ~
1150 \end_inset
1151
1152 Preamble
1153 \end_layout
1154
1155 \end_inset
1156
1157  in the 
1158 \begin_inset Flex MenuItem
1159 status collapsed
1160
1161 \begin_layout Plain Layout
1162 Document\SpecialChar \menuseparator
1163 Settings
1164 \end_layout
1165
1166 \end_inset
1167
1168  dialog.
1169  LyX adds anything in the 
1170 \begin_inset Flex MenuItem
1171 status collapsed
1172
1173 \begin_layout Plain Layout
1174 Preamble
1175 \end_layout
1176
1177 \end_inset
1178
1179  dialog to its own built-in preamble.
1180  Before adding your own declarations in the preamble, you should make sure
1181  that LyX doesn't already support what you want to do.
1182  (Remember what we said about reinventing the wheel?) Also, 
1183 \emph on
1184 make sure your preamble code is correct
1185 \emph default
1186 .
1187  LyX doesn't check it for you.
1188  If there is an error, you're likely to get an error like 
1189 \begin_inset Quotes eld
1190 \end_inset
1191
1192
1193 \begin_inset Flex Code
1194 status collapsed
1195
1196 \begin_layout Plain Layout
1197 Missing 
1198 \backslash
1199 begin{document}
1200 \end_layout
1201
1202 \end_inset
1203
1204
1205 \begin_inset Quotes erd
1206 \end_inset
1207
1208 .
1209  If you see this error, check your preamble.
1210 \end_layout
1211
1212 \begin_layout Subsection
1213 Examples
1214 \end_layout
1215
1216 \begin_layout Standard
1217 Here are some examples of what you can add to a preamble, and what they
1218  do.
1219 \end_layout
1220
1221 \begin_layout Subsubsection
1222 Example #1: Offsets
1223 \end_layout
1224
1225 \begin_layout Standard
1226 There are two variables under LaTeX that control page position: 
1227 \begin_inset Flex Code
1228 status collapsed
1229
1230 \begin_layout Plain Layout
1231
1232 \backslash
1233 hoffset
1234 \end_layout
1235
1236 \end_inset
1237
1238  and 
1239 \begin_inset Flex Code
1240 status collapsed
1241
1242 \begin_layout Plain Layout
1243
1244 \backslash
1245 voffset
1246 \end_layout
1247
1248 \end_inset
1249
1250 .
1251  Their names should be self-explanatory.
1252  These variables are useful if you think for a moment about computer labels.
1253  Sometimes, the size of a print medium and the area of the medium that you
1254  can actually print on aren't the same.
1255  This is where 
1256 \begin_inset Flex Code
1257 status collapsed
1258
1259 \begin_layout Plain Layout
1260
1261 \backslash
1262 hoffset
1263 \end_layout
1264
1265 \end_inset
1266
1267  and 
1268 \begin_inset Flex Code
1269 status collapsed
1270
1271 \begin_layout Plain Layout
1272
1273 \backslash
1274 voffset
1275 \end_layout
1276
1277 \end_inset
1278
1279  come in.
1280 \end_layout
1281
1282 \begin_layout Standard
1283 The default values for 
1284 \begin_inset Flex Code
1285 status collapsed
1286
1287 \begin_layout Plain Layout
1288
1289 \backslash
1290 hoffset
1291 \end_layout
1292
1293 \end_inset
1294
1295  and 
1296 \begin_inset Flex Code
1297 status collapsed
1298
1299 \begin_layout Plain Layout
1300
1301 \backslash
1302 voffset
1303 \end_layout
1304
1305 \end_inset
1306
1307  are both 0
1308 \begin_inset space \thinspace{}
1309 \end_inset
1310
1311 points, i.
1312 \begin_inset space \thinspace{}
1313 \end_inset
1314
1315 e.
1316 \begin_inset space \space{}
1317 \end_inset
1318
1319 the page isn't shifted.
1320  Unfortunately, some DVI drivers always seem to shift the page.
1321  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1322  If you're using LyX on a system that you don't personally maintain, and
1323  your sysadmin is a doofus, 
1324 \begin_inset Flex Code
1325 status collapsed
1326
1327 \begin_layout Plain Layout
1328
1329 \backslash
1330 hoffset
1331 \end_layout
1332
1333 \end_inset
1334
1335  and 
1336 \begin_inset Flex Code
1337 status collapsed
1338
1339 \begin_layout Plain Layout
1340
1341 \backslash
1342 voffset
1343 \end_layout
1344
1345 \end_inset
1346
1347  can save the day.
1348  Suppose your left and top margins are always 0.5
1349 \begin_inset space \thinspace{}
1350 \end_inset
1351
1352 inches too big.
1353  You can add this to the preamble:
1354 \end_layout
1355
1356 \begin_layout LyX-Code
1357
1358 \backslash
1359 setlength{
1360 \backslash
1361 hoffset}{-0.5 in}
1362 \end_layout
1363
1364 \begin_layout LyX-Code
1365
1366 \backslash
1367 setlength{
1368 \backslash
1369 voffset}{-0.5 in}
1370 \end_layout
1371
1372 \begin_layout Standard
1373 and your margins should now be correct.
1374 \end_layout
1375
1376 \begin_layout Subsubsection
1377 Example #2: Labels
1378 \end_layout
1379
1380 \begin_layout Standard
1381 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1382  There's a rather nice package, available at your nearest CTAN archive,
1383  for printing sheets of labels: 
1384 \begin_inset Flex Code
1385 status collapsed
1386
1387 \begin_layout Plain Layout
1388 labels.sty
1389 \end_layout
1390
1391 \end_inset
1392
1393 .
1394  Now, your system may not have this package installed by default.
1395  We leave that up to you to check.
1396  You'll also want to read the documentation for it; we're not going to do
1397  that for you.
1398  Since this is an example, however, we'll give you an example of how you
1399  use this package.
1400 \end_layout
1401
1402 \begin_layout Standard
1403 First, make sure you're using the 
1404 \begin_inset Flex Code
1405 status collapsed
1406
1407 \begin_layout Plain Layout
1408 article
1409 \end_layout
1410
1411 \end_inset
1412
1413  document class.
1414  Next, you need to put the following in your preamble:
1415 \end_layout
1416
1417 \begin_layout LyX-Code
1418
1419 \backslash
1420 usepackage{labels}
1421 \end_layout
1422
1423 \begin_layout LyX-Code
1424
1425 \backslash
1426 LabelCols=3
1427 \end_layout
1428
1429 \begin_layout LyX-Code
1430
1431 \backslash
1432 LabelRows=7
1433 \end_layout
1434
1435 \begin_layout LyX-Code
1436
1437 \backslash
1438 LeftBorder=8mm
1439 \end_layout
1440
1441 \begin_layout LyX-Code
1442
1443 \backslash
1444 RightBorder=8mm
1445 \end_layout
1446
1447 \begin_layout LyX-Code
1448
1449 \backslash
1450 TopBorder=9mm
1451 \end_layout
1452
1453 \begin_layout LyX-Code
1454
1455 \backslash
1456 BottomBorder=2mm
1457 \end_layout
1458
1459 \begin_layout Standard
1460 This sets things up for Avery label sheets, stock #5360.
1461  You're now ready to print labels, but you'll need to insert LaTeX code,
1462  placing the commands 
1463 \begin_inset Flex Code
1464 status collapsed
1465
1466 \begin_layout Plain Layout
1467
1468 \backslash
1469 begin{labels}
1470 \end_layout
1471
1472 \end_inset
1473
1474  and 
1475 \begin_inset Flex Code
1476 status collapsed
1477
1478 \begin_layout Plain Layout
1479
1480 \backslash
1481 end{labels}
1482 \end_layout
1483
1484 \end_inset
1485
1486  around each label text.
1487  This and other special features of 
1488 \begin_inset Flex Code
1489 status collapsed
1490
1491 \begin_layout Plain Layout
1492 labels.sty
1493 \end_layout
1494
1495 \end_inset
1496
1497  are explained in its documentation.
1498 \end_layout
1499
1500 \begin_layout Standard
1501 Someday, someone may write a LyX layout file to support this package directly.
1502  Maybe that someone is you.
1503 \end_layout
1504
1505 \begin_layout Subsubsection
1506 Example #3: Paragraph Indentation
1507 \end_layout
1508
1509 \begin_layout Standard
1510 Americans are trained to indent the first line of 
1511 \emph on
1512 every
1513 \emph default
1514  paragraph.
1515  As with all of their other weird quirks, most Americans will whine and
1516  moan until they can have their way and indent the first line of all paragraphs.
1517  (Yes, we're joking.
1518  (We are?) 
1519 \emph on
1520 Yeah
1521 \emph default
1522 , we are.)
1523 \end_layout
1524
1525 \begin_layout Standard
1526 Of course, this behavior isn't standard typography.
1527  In books, you typically only indent the first line of a paragraph 
1528 \emph on
1529 if
1530 \emph default
1531  it follows another one.
1532  The idea behind indenting the first line of a paragraph is to distinguish
1533  neighboring paragraphs from one another.
1534  If there is no previous paragraph—for example, if it follows a figure or
1535  is the first paragraph in a section—then there is no need for indentation.
1536  
1537 \end_layout
1538
1539 \begin_layout Standard
1540 If you're a typical American (we're still joking!), though, you don't care
1541  about such esoteric things; you want your indentation! Add this to the
1542  preamble:
1543 \end_layout
1544
1545 \begin_layout LyX-Code
1546
1547 \backslash
1548 usepackage{indentfirst}
1549 \end_layout
1550
1551 \begin_layout Standard
1552 If your TeX distribution isn't braindead, you'll have this package, and
1553  all of your paragraphs will get the indentation the Founding Fathers intended
1554  they should have.
1555 \end_layout
1556
1557 \begin_layout Subsubsection
1558 Example #4: This Document
1559 \end_layout
1560
1561 \begin_layout Standard
1562 You can also check out the preamble of this document to get an idea of some
1563  of the advanced things you can do.
1564  Also, there are more examples and an assortment of LaTeX 
1565 \begin_inset Quotes eld
1566 \end_inset
1567
1568 dirty tricks
1569 \begin_inset Quotes erd
1570 \end_inset
1571
1572  given in Chapter
1573 \begin_inset space ~
1574 \end_inset
1575
1576
1577 \begin_inset CommandInset ref
1578 LatexCommand ref
1579 reference "cha:secrets"
1580
1581 \end_inset
1582
1583 .
1584  
1585 \end_layout
1586
1587 \begin_layout Section
1588 LyX and LaTeX Errors
1589 \end_layout
1590
1591 \begin_layout Standard
1592 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1593  going.
1594  It then uses the logfile from the LaTeX run to do a post-mortem.
1595  After analyzing the logfile,LyX displays a dialog listing the errors.
1596  Clicking on any one of them will take you to the position in your LyX file
1597  where the error occurred.
1598 \begin_inset Foot
1599 status collapsed
1600
1601 \begin_layout Plain Layout
1602 Well, usually.
1603  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1604  right line.
1605  There are also cases where LaTeX reports the error on one line, but the
1606  actual error is earlier.
1607  This is not unlike forgetting a closing brace in a program: You'll get
1608  an error, but only later.
1609 \end_layout
1610
1611 \end_inset
1612
1613
1614 \end_layout
1615
1616 \begin_layout Standard
1617 Some folks also like to look at the log file directly: It is available from
1618  
1619 \begin_inset Flex MenuItem
1620 status collapsed
1621
1622 \begin_layout Plain Layout
1623 Document
1624 \bar under
1625 \SpecialChar \menuseparator
1626
1627 \bar default
1628 Latex
1629 \begin_inset space ~
1630 \end_inset
1631
1632 Log
1633 \end_layout
1634
1635 \end_inset
1636
1637 .
1638  There are some fairly common error messages and warnings.
1639  We'll cover those here.
1640  You should look at a good LaTeX book for a complete listing.
1641 \end_layout
1642
1643 \begin_layout Itemize
1644 \begin_inset Flex Code
1645 status collapsed
1646
1647 \begin_layout Plain Layout
1648 LaTeX Warning
1649 \end_layout
1650
1651 \end_inset
1652
1653
1654 \begin_inset Newline newline
1655 \end_inset
1656
1657 Anything beginning with these words is a warning message for the purpose
1658  of 
1659 \begin_inset Quotes eld
1660 \end_inset
1661
1662 debugging
1663 \begin_inset Quotes erd
1664 \end_inset
1665
1666  the LaTeX code itself.
1667  You'll get messages like this if you added or changed cross-references
1668  or bibliography entries, in which case, LaTeX is trying to tell you that
1669  you need to make another run.
1670  You can by-and-large ignore these.
1671 \end_layout
1672
1673 \begin_layout Itemize
1674 \begin_inset Flex Code
1675 status collapsed
1676
1677 \begin_layout Plain Layout
1678 LaTeX Font Warning
1679 \end_layout
1680
1681 \end_inset
1682
1683
1684 \begin_inset Newline newline
1685 \end_inset
1686
1687 Another warning message, this time about fonts which LaTeX couldn't find.
1688  The rest of the message will often say something about a replacement font
1689  that LaTeX used.
1690  You can safely ignore these, too.
1691 \end_layout
1692
1693 \begin_layout Itemize
1694 \begin_inset Flex Code
1695 status collapsed
1696
1697 \begin_layout Plain Layout
1698 Overfull 
1699 \backslash
1700 hbox
1701 \end_layout
1702
1703 \end_inset
1704
1705
1706 \begin_inset Newline newline
1707 \end_inset
1708
1709 LaTeX absolutely 
1710 \emph on
1711 loves
1712 \emph default
1713  to spew these out.
1714  They are warnings about lines that were too long and run past the right
1715  margin.
1716  Almost always, this is unnoticeable in the final output.
1717  (It can be just a point or two.) Or, only one or two characters extend past
1718  the margin.
1719  LaTeX seems to generate at least one of these messages for just about any
1720  document you write.
1721 \begin_inset Newline newline
1722 \end_inset
1723
1724 You can ignore these messages.
1725  Your eyes will tell you if there's a problem with something that's too
1726  wide; just look at the output.
1727 \begin_inset Foot
1728 status collapsed
1729
1730 \begin_layout Plain Layout
1731 You can also enable the `draft' option in 
1732 \begin_inset Flex MenuItem
1733 status collapsed
1734
1735 \begin_layout Plain Layout
1736 Document
1737 \bar under
1738 \SpecialChar \menuseparator
1739
1740 \bar default
1741 Settings
1742 \end_layout
1743
1744 \end_inset
1745
1746 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1747 \end_layout
1748
1749 \end_inset
1750
1751
1752 \end_layout
1753
1754 \begin_layout Itemize
1755 \begin_inset Flex Code
1756 status collapsed
1757
1758 \begin_layout Plain Layout
1759 Underfull 
1760 \backslash
1761 hbox
1762 \end_layout
1763
1764 \end_inset
1765
1766
1767 \begin_inset Newline newline
1768 \end_inset
1769
1770 Not quite as common as its cousin.
1771  LaTeX seems to like to print lines that are a bit too wide as opposed to
1772  ones that are a bit too narrow.
1773  We have no idea why.
1774 \end_layout
1775
1776 \begin_layout Itemize
1777 \begin_inset Flex Code
1778 status collapsed
1779
1780 \begin_layout Plain Layout
1781 Overfull 
1782 \backslash
1783 vbox
1784 \end_layout
1785
1786 \end_inset
1787
1788  and 
1789 \begin_inset Flex Code
1790 status collapsed
1791
1792 \begin_layout Plain Layout
1793 Underfull 
1794 \backslash
1795 vbox
1796 \end_layout
1797
1798 \end_inset
1799
1800
1801 \begin_inset Newline newline
1802 \end_inset
1803
1804 Warnings about troubles breaking the page.
1805  Once again, just look at the output.
1806  Your eyes will tell you where something has gone wrong.
1807 \end_layout
1808
1809 \begin_layout Itemize
1810 \begin_inset Flex Code
1811 status collapsed
1812
1813 \begin_layout Plain Layout
1814  LaTeX Error: File 
1815 \begin_inset Quotes els
1816 \end_inset
1817
1818 Xxxx
1819 \begin_inset Quotes ers
1820 \end_inset
1821
1822  not found
1823 \end_layout
1824
1825 \end_inset
1826
1827
1828 \begin_inset Newline newline
1829 \end_inset
1830
1831 The file 
1832 \begin_inset Quotes eld
1833 \end_inset
1834
1835 Xxxx
1836 \begin_inset Quotes erd
1837 \end_inset
1838
1839  isn't installed on this system.
1840  This usually appears because some package your document needs isn't installed.
1841  If you didn't touch the preamble or didn't use the 
1842 \begin_inset Flex Code
1843 status collapsed
1844
1845 \begin_layout Plain Layout
1846
1847 \backslash
1848 usepackage{}
1849 \end_layout
1850
1851 \end_inset
1852
1853  command, then one of the packages LyX tried to load is missing.
1854  Use 
1855 \begin_inset Flex MenuItem
1856 status collapsed
1857
1858 \begin_layout Plain Layout
1859 Help\SpecialChar \menuseparator
1860 LaTeX Configuration
1861 \end_layout
1862
1863 \end_inset
1864
1865  to get a list of packages that LyX knows about.
1866  This file is updated whenever you reconfigure LyX (using 
1867 \begin_inset Flex MenuItem
1868 status collapsed
1869
1870 \begin_layout Plain Layout
1871 Tools\SpecialChar \menuseparator
1872 Reconfigure
1873 \end_layout
1874
1875 \end_inset
1876
1877 ) and tells you which packages have been detected and what they do.
1878 \begin_inset Newline newline
1879 \end_inset
1880
1881 If you did use the 
1882 \begin_inset Flex Code
1883 status collapsed
1884
1885 \begin_layout Plain Layout
1886
1887 \backslash
1888 usepackage{}
1889 \end_layout
1890
1891 \end_inset
1892
1893  command and the package in question isn't installed, then you'll need to
1894  install it yourself.
1895 \end_layout
1896
1897 \begin_layout Itemize
1898 \begin_inset Flex Code
1899 status collapsed
1900
1901 \begin_layout Plain Layout
1902 LaTeX Error: Unknown option
1903 \end_layout
1904
1905 \end_inset
1906
1907
1908 \begin_inset Newline newline
1909 \end_inset
1910
1911 Error messages beginning with this are trying to tell you that you specified
1912  a bad or undefined option to a package.
1913  Check the package's documentation.
1914 \end_layout
1915
1916 \begin_layout Itemize
1917 \begin_inset Flex Code
1918 status collapsed
1919
1920 \begin_layout Plain Layout
1921 Undefined control sequence
1922 \end_layout
1923
1924 \end_inset
1925
1926
1927 \begin_inset Newline newline
1928 \end_inset
1929
1930 If you've inserted LaTeX code into your document, but made a typo, you'll
1931  get one of these.
1932  You may have forgotten to load a package.
1933  In any case, this error message usually means that you used an undefined
1934  command.
1935  
1936 \end_layout
1937
1938 \begin_layout Standard
1939 There are other error and warning messages.
1940  Some are self-explanatory.
1941  These are usually LaTeX messages.
1942  Others are downright cryptic.
1943  These are usually TeX error messages, and we really have 
1944 \emph on
1945 no clue
1946 \emph default
1947  what they mean or how to decipher them.
1948  No-one does.
1949 \end_layout
1950
1951 \begin_layout Standard
1952 There's a general sequence you should follow if you get error messages:
1953 \end_layout
1954
1955 \begin_layout Enumerate
1956 Look at the LaTeX code you inserted for typos.
1957 \end_layout
1958
1959 \begin_layout Enumerate
1960 If there are no typos, check that you used the command(s) correctly.
1961 \end_layout
1962
1963 \begin_layout Enumerate
1964 If you get a bunch of error boxes piled up at the very top of the document—and
1965  especially if you see a 
1966 \begin_inset Quotes eld
1967 \end_inset
1968
1969
1970 \begin_inset Flex Code
1971 status collapsed
1972
1973 \begin_layout Plain Layout
1974 Missing 
1975 \backslash
1976 begin{document}
1977 \end_layout
1978
1979 \end_inset
1980
1981
1982 \begin_inset Quotes erd
1983 \end_inset
1984
1985  error—it means that there are errors in the preamble.
1986  Start debugging your preamble.
1987 \end_layout
1988
1989 \begin_layout Enumerate
1990 If you didn't add anything to the preamble and didn't add any LaTeX code
1991  to the document, the first suspect is your LaTeX distribution itself.
1992  Check for missing packages and install them.
1993 \end_layout
1994
1995 \begin_layout Enumerate
1996 Okay, so there are no missing packages.
1997  Did you use any of the fine-tuning options in LyX? Specifically, did you
1998  
1999 \emph on
2000 misuse
2001 \emph default
2002  any of them, like trying to manually insert lots of 
2003 \begin_inset Flex Code
2004 status collapsed
2005
2006 \begin_layout Plain Layout
2007 Protected
2008 \begin_inset space ~
2009 \end_inset
2010
2011 Blanks
2012 \end_layout
2013
2014 \end_inset
2015
2016
2017 \begin_inset Flex Code
2018 status collapsed
2019
2020 \begin_layout Plain Layout
2021 Linebreaks
2022 \end_layout
2023
2024 \end_inset
2025
2026 , or 
2027 \begin_inset Flex Code
2028 status collapsed
2029
2030 \begin_layout Plain Layout
2031 Pagebreaks
2032 \end_layout
2033
2034 \end_inset
2035
2036 ? Did you try to kludge something together with these instead of using the
2037  appropriate paragraph environment?
2038 \end_layout
2039
2040 \begin_layout Enumerate
2041 All right, you didn't use any of the fine-tuning options, you played by
2042  the rules.
2043  Did you try to pull a fancy maneuver? Did you do something funky inside
2044  a table or an equation, like inserting a graphic into a table cell?
2045 \end_layout
2046
2047 \begin_layout Enumerate
2048 Do you have long sections of text where LaTeX cannot find a place to break
2049  a line? By default, LaTeX is rather strict about how much extra inter-word
2050  spacing it will add in order to break a line.
2051  Preferably, you should rework the paragraph to avoid the problem.
2052  If this isn't an option, you can wrap your text in 
2053 \begin_inset Flex Code
2054 status collapsed
2055
2056 \begin_layout Plain Layout
2057
2058 \backslash
2059 sloppypar
2060 \end_layout
2061
2062 \end_inset
2063
2064  to make LaTeX's line breaking more, well, sloppy.
2065 \end_layout
2066
2067 \begin_layout Enumerate
2068 Did you go overboard with the nesting? LyX (currently) doesn't check to
2069  make sure you're in the limits for nesting environments.
2070  If you nested a bunch of environments to the 
2071 \begin_inset Formula $17^{\mathrm{th}}$
2072 \end_inset
2073
2074  level, that's the problem.
2075  (The limit in LaTeX is five.)
2076 \end_layout
2077
2078 \begin_layout Enumerate
2079 Okay, you didn't get any error messages, but your output looks awful.
2080  If you have a table or figure that's too wide or long for the page, you
2081  need to:
2082 \end_layout
2083
2084 \begin_deeper
2085 \begin_layout Enumerate
2086 rescale the figure so it fits.
2087 \end_layout
2088
2089 \begin_layout Enumerate
2090 trim down the table so it fits.
2091 \end_layout
2092
2093 \end_deeper
2094 \begin_layout Enumerate
2095 If something else is wrong with the output, and you didn't try to pull anything
2096  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2097 \end_layout
2098
2099 \begin_layout Standard
2100 If all this doesn't help—well, then 
2101 \emph on
2102 perhaps
2103 \emph default
2104  you might have found a bug in LyX\SpecialChar \ldots{}
2105 .
2106 \end_layout
2107
2108 \begin_layout Chapter
2109 Supplemental Tools
2110 \end_layout
2111
2112 \begin_layout Section
2113 Customizing Bibliographies with BibTeX
2114 \end_layout
2115
2116 \begin_layout Standard
2117 The most basic information about how to use BibTeX with LyX is contained
2118  in the section 
2119 \emph on
2120 Bibliography databases (BibTeX)
2121 \emph default
2122  of the 
2123 \emph on
2124 User's Guide
2125 \emph default
2126 .
2127  The following subsections explain special bibliography features supported
2128  by LyX.
2129 \end_layout
2130
2131 \begin_layout Subsection
2132 Alternative Citation Styles
2133 \end_layout
2134
2135 \begin_layout Standard
2136 Standard BibTeX uses numbers (e.
2137 \begin_inset space \thinspace{}
2138 \end_inset
2139
2140 g.
2141 \begin_inset space \space{}
2142 \end_inset
2143
2144
2145 \begin_inset Quotes eld
2146 \end_inset
2147
2148 [12]
2149 \begin_inset Quotes erd
2150 \end_inset
2151
2152 ) to refer to a cited work.
2153  However, in many scientific disciplines, other citation styles are in use.
2154  The most common one is the author-year style (e.
2155 \begin_inset space \thinspace{}
2156 \end_inset
2157
2158 g.
2159 \begin_inset space \space{}
2160 \end_inset
2161
2162
2163 \begin_inset Quotes eld
2164 \end_inset
2165
2166 Knuth 1984a
2167 \begin_inset Quotes erd
2168 \end_inset
2169
2170 ).
2171  LyX supports two packages that provide this style, 
2172 \begin_inset Flex Code
2173 status collapsed
2174
2175 \begin_layout Plain Layout
2176 natbib
2177 \end_layout
2178
2179 \end_inset
2180
2181  and 
2182 \begin_inset Flex Code
2183 status collapsed
2184
2185 \begin_layout Plain Layout
2186 jurabib
2187 \end_layout
2188
2189 \end_inset
2190
2191 .
2192  Both packages have their pros and cons, which cannot be listed in detail.
2193  If you only want to have simple author-year (or author-numerical) style,
2194  or if you want to use one of the countless style files for 
2195 \begin_inset Flex Code
2196 status collapsed
2197
2198 \begin_layout Plain Layout
2199 natbib
2200 \end_layout
2201
2202 \end_inset
2203
2204 , than the established 
2205 \begin_inset Flex Code
2206 status collapsed
2207
2208 \begin_layout Plain Layout
2209 natbib
2210 \end_layout
2211
2212 \end_inset
2213
2214  package is probably your choice.
2215  If you need special features like short title references, ibidem etc., you
2216  might consider the 
2217 \begin_inset Flex Code
2218 status collapsed
2219
2220 \begin_layout Plain Layout
2221 jurabib
2222 \end_layout
2223
2224 \end_inset
2225
2226  package.
2227 \end_layout
2228
2229 \begin_layout Standard
2230 The handling of both packages in LyX is basically the same.
2231  Go to 
2232 \begin_inset Flex MenuItem
2233 status collapsed
2234
2235 \begin_layout Plain Layout
2236 Document\SpecialChar \menuseparator
2237 Settings
2238 \end_layout
2239
2240 \end_inset
2241
2242  and select under 
2243 \begin_inset Flex MenuItem
2244 status collapsed
2245
2246 \begin_layout Plain Layout
2247 Bibliography
2248 \end_layout
2249
2250 \end_inset
2251
2252  the option 
2253 \begin_inset Flex MenuItem
2254 status collapsed
2255
2256 \begin_layout Plain Layout
2257 Natbib
2258 \end_layout
2259
2260 \end_inset
2261
2262  or 
2263 \begin_inset Flex MenuItem
2264 status collapsed
2265
2266 \begin_layout Plain Layout
2267 Jurabib
2268 \end_layout
2269
2270 \end_inset
2271
2272 .
2273  With both packages, you will get some extra features in the citation dialog
2274  and you can select the style of the reference (
2275 \begin_inset Quotes eld
2276 \end_inset
2277
2278 Knuth 1984
2279 \begin_inset Quotes erd
2280 \end_inset
2281
2282
2283 \begin_inset Quotes eld
2284 \end_inset
2285
2286 Knuth (1984)
2287 \begin_inset Quotes erd
2288 \end_inset
2289
2290
2291 \begin_inset Quotes eld
2292 \end_inset
2293
2294 Knuth, 1984
2295 \begin_inset Quotes erd
2296 \end_inset
2297
2298
2299 \begin_inset Quotes eld
2300 \end_inset
2301
2302 1984
2303 \begin_inset Quotes erd
2304 \end_inset
2305
2306  etc.).
2307  Note that both packages need specifically designed style files.
2308  They both ship their own, but there are lots of additional style files,
2309  and there is even an interactive style file builder
2310 \begin_inset Foot
2311 status collapsed
2312
2313 \begin_layout Plain Layout
2314 See 
2315 \begin_inset Flex URL
2316 status open
2317
2318 \begin_layout Plain Layout
2319
2320 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2321 \end_layout
2322
2323 \end_inset
2324
2325
2326 \end_layout
2327
2328 \end_inset
2329
2330  for 
2331 \begin_inset Flex Code
2332 status collapsed
2333
2334 \begin_layout Plain Layout
2335 natbib
2336 \end_layout
2337
2338 \end_inset
2339
2340 .
2341 \end_layout
2342
2343 \begin_layout Subsection
2344 Sectioned Bibliographies
2345 \end_layout
2346
2347 \begin_layout Standard
2348 Sometimes you might need to divide your bibliography into several sections.
2349  If you are for instance a historian, the possibility to separate sources
2350  and scientific works is most likely a 
2351 \begin_inset Quotes eld
2352 \end_inset
2353
2354 must have
2355 \begin_inset Quotes erd
2356 \end_inset
2357
2358 .
2359  Unfortunately, BibTeX itself does not allow you to do this.
2360  But with the help of some LaTeX packages, BibTeX can be extended to fit
2361  your needs.
2362 \end_layout
2363
2364 \begin_layout Standard
2365 LyX provides native support for one of these packages, 
2366 \family typewriter
2367 bibtopic
2368 \family default
2369 .
2370 \begin_inset Foot
2371 status collapsed
2372
2373 \begin_layout Plain Layout
2374 Available from 
2375 \begin_inset Flex URL
2376 status open
2377
2378 \begin_layout Plain Layout
2379
2380 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2381 \end_layout
2382
2383 \end_inset
2384
2385
2386 \end_layout
2387
2388 \end_inset
2389
2390  The advantage of this package (compared to other packages like 
2391 \family typewriter
2392 multibib
2393 \family default
2394 ) is that you don't need to define new citation commands.
2395  Instead, you need to prepare different bibliographic databases which include
2396  the entries for the different sections of the bibliography.
2397  For example: If you want to divide your bibliography into the sections
2398  
2399 \begin_inset Quotes eld
2400 \end_inset
2401
2402 Sources
2403 \begin_inset Quotes erd
2404 \end_inset
2405
2406  and 
2407 \begin_inset Quotes eld
2408 \end_inset
2409
2410 Scientific works
2411 \begin_inset Quotes erd
2412 \end_inset
2413
2414 , you first need to create two bibliographic databases, e.
2415 \begin_inset space \thinspace{}
2416 \end_inset
2417
2418 g.
2419 \begin_inset space \space{}
2420 \end_inset
2421
2422
2423 \begin_inset Flex Code
2424 status collapsed
2425
2426 \begin_layout Plain Layout
2427 sources.bib
2428 \end_layout
2429
2430 \end_inset
2431
2432  and 
2433 \begin_inset Flex Code
2434 status collapsed
2435
2436 \begin_layout Plain Layout
2437 scientific.bib
2438 \end_layout
2439
2440 \end_inset
2441
2442 .
2443  
2444 \end_layout
2445
2446 \begin_layout Standard
2447 Go to 
2448 \begin_inset Flex MenuItem
2449 status collapsed
2450
2451 \begin_layout Plain Layout
2452 Document\SpecialChar \menuseparator
2453 Settings
2454 \end_layout
2455
2456 \end_inset
2457
2458  and check under 
2459 \begin_inset Flex MenuItem
2460 status collapsed
2461
2462 \begin_layout Plain Layout
2463 Bibliography
2464 \end_layout
2465
2466 \end_inset
2467
2468  the option 
2469 \begin_inset Flex MenuItem
2470 status collapsed
2471
2472 \begin_layout Plain Layout
2473 Sectioned bibliography
2474 \end_layout
2475
2476 \end_inset
2477
2478 .
2479  Now you can insert multiple BibTeX bibliographies, one for each section
2480  of your bibliography.
2481  Returning to our example: Insert the BibTeX bibliography 
2482 \begin_inset Flex Code
2483 status collapsed
2484
2485 \begin_layout Plain Layout
2486 sources.bib
2487 \end_layout
2488
2489 \end_inset
2490
2491  and a second one for the database 
2492 \begin_inset Flex Code
2493 status collapsed
2494
2495 \begin_layout Plain Layout
2496 scientific.bib
2497 \end_layout
2498
2499 \end_inset
2500
2501 .
2502  You are free to use the same or different styles for each section.
2503  Additionally, you can chose if the bibliography section should contain
2504  
2505 \begin_inset Quotes eld
2506 \end_inset
2507
2508 all cited references
2509 \begin_inset Quotes erd
2510 \end_inset
2511
2512  of the specified database(s) (which is the default), 
2513 \begin_inset Quotes eld
2514 \end_inset
2515
2516 all uncited references
2517 \begin_inset Quotes erd
2518 \end_inset
2519
2520  or even 
2521 \begin_inset Quotes eld
2522 \end_inset
2523
2524 all references
2525 \begin_inset Quotes erd
2526 \end_inset
2527
2528 .
2529  This might be useful if you would like to separate your bibliography into
2530  three sections: 
2531 \begin_inset Quotes eld
2532 \end_inset
2533
2534 Cited sources
2535 \begin_inset Quotes erd
2536 \end_inset
2537
2538
2539 \begin_inset Quotes eld
2540 \end_inset
2541
2542 Uncited sources
2543 \begin_inset Quotes erd
2544 \end_inset
2545
2546 , and 
2547 \begin_inset Quotes eld
2548 \end_inset
2549
2550 Scientific works
2551 \begin_inset Quotes erd
2552 \end_inset
2553
2554 .
2555  The titles for the sections can be added as ordinary sections or subsections.
2556  Since 
2557 \begin_inset Flex Code
2558 status collapsed
2559
2560 \begin_layout Plain Layout
2561 bibtopic
2562 \end_layout
2563
2564 \end_inset
2565
2566  removes the bibliography title, you have manually re-add that, too (as
2567  a chapter* or section*, for instance).
2568 \end_layout
2569
2570 \begin_layout Subsection
2571 Multiple Bibliographies
2572 \end_layout
2573
2574 \begin_layout Standard
2575 Multiple bibliographies, e.
2576 \begin_inset space \thinspace{}
2577 \end_inset
2578
2579 g.
2580 \begin_inset space \space{}
2581 \end_inset
2582
2583 a bibliography for each section or chapter of the document, are not supported
2584  by BibTeX itself.
2585  But the 
2586 \begin_inset Flex Code
2587 status collapsed
2588
2589 \begin_layout Plain Layout
2590 bibtopic
2591 \end_layout
2592
2593 \end_inset
2594
2595  package, which is used for the creation of sectioned bibliographies in
2596  LyX (see the previous section), provides an easy way to solve this task,
2597  if you are willing to use some 
2598 \begin_inset Flex MenuItem
2599 status collapsed
2600
2601 \begin_layout Plain Layout
2602 TeX Code
2603 \end_layout
2604
2605 \end_inset
2606
2607  (see section
2608 \begin_inset space ~
2609 \end_inset
2610
2611
2612 \begin_inset CommandInset ref
2613 LatexCommand ref
2614 reference "sec:Inserting-TeX-Code"
2615
2616 \end_inset
2617
2618 ).
2619 \begin_inset Foot
2620 status collapsed
2621
2622 \begin_layout Plain Layout
2623 An alternative approach is to use the 
2624 \begin_inset Flex Code
2625 status collapsed
2626
2627 \begin_layout Plain Layout
2628 chapterbib
2629 \end_layout
2630
2631 \end_inset
2632
2633  or 
2634 \begin_inset Flex Code
2635 status collapsed
2636
2637 \begin_layout Plain Layout
2638 bibunits
2639 \end_layout
2640
2641 \end_inset
2642
2643  package, respectively.
2644 \end_layout
2645
2646 \end_inset
2647
2648
2649 \end_layout
2650
2651 \begin_layout Standard
2652 First go to 
2653 \begin_inset Flex MenuItem
2654 status collapsed
2655
2656 \begin_layout Plain Layout
2657 Document\SpecialChar \menuseparator
2658 Settings
2659 \end_layout
2660
2661 \end_inset
2662
2663  and under 
2664 \begin_inset Flex MenuItem
2665 status collapsed
2666
2667 \begin_layout Plain Layout
2668 Bibliography
2669 \end_layout
2670
2671 \end_inset
2672
2673  check 
2674 \begin_inset Flex MenuItem
2675 status collapsed
2676
2677 \begin_layout Plain Layout
2678 Sectioned bibliography
2679 \end_layout
2680
2681 \end_inset
2682
2683 .
2684  In the document, you have to enclose the sections, which shall contain
2685  their own bibliography (including the BibTeX bibliography itself), between
2686  
2687 \begin_inset Flex Code
2688 status collapsed
2689
2690 \begin_layout Plain Layout
2691
2692 \backslash
2693 begin{btUnit}
2694 \end_layout
2695
2696 \end_inset
2697
2698  and 
2699 \begin_inset Flex Code
2700 status collapsed
2701
2702 \begin_layout Plain Layout
2703
2704 \backslash
2705 end{btUnit}
2706 \end_layout
2707
2708 \end_inset
2709
2710  (those commands have to be inserted as TeX code).
2711  The bibliography will contain all references which have been cited in the
2712  current 
2713 \begin_inset Flex Code
2714 status collapsed
2715
2716 \begin_layout Plain Layout
2717 btUnit
2718 \end_layout
2719
2720 \end_inset
2721
2722 .
2723  
2724 \series bold
2725 Note:
2726 \series default
2727  If you are using this approach, then every citation reference has to be
2728  inside some 
2729 \begin_inset Flex Code
2730 status collapsed
2731
2732 \begin_layout Plain Layout
2733 btUnit
2734 \end_layout
2735
2736 \end_inset
2737
2738 .
2739  Also, the 
2740 \begin_inset Flex Code
2741 status collapsed
2742
2743 \begin_layout Plain Layout
2744 btUnit
2745 \end_layout
2746
2747 \end_inset
2748
2749 s cannot be nested.
2750 \end_layout
2751
2752 \begin_layout Section
2753 Multipart Documents
2754 \end_layout
2755
2756 \begin_layout Subsection
2757 General Operation
2758 \end_layout
2759
2760 \begin_layout Standard
2761 When you are working on a large file with many sections, it is often convenient
2762  to break up the document into several files, or perhaps you have something
2763  where a table may change from time to time, but the preceding text does
2764  not.
2765  In these cases, you should seriously consider using multipart documents.
2766  For example, scientific papers often have five major sections: the introduction
2767 , observations, results, discussion, and conclusion.
2768  Each of these could be its own separate LyX file, with one 
2769 \begin_inset Quotes eld
2770 \end_inset
2771
2772 master
2773 \begin_inset Quotes erd
2774 \end_inset
2775
2776  file which contains the title, authors, abstract, references, etc., plus
2777  the five included files.
2778  It is important to note that each of these files is a full LyX file which
2779  can be formatted and printed on its own, as well as included in a master
2780  file.
2781  Each of these files must have the same document class, however—don't attempt
2782  to mix book classes with article classes.
2783  You may also include LaTeX files; however, these files must not have their
2784  own preamble (i.
2785 \begin_inset space \thinspace{}
2786 \end_inset
2787
2788 g.
2789 \begin_inset space \space{}
2790 \end_inset
2791
2792 everything up to and including the 
2793 \begin_inset Flex Code
2794 status collapsed
2795
2796 \begin_layout Plain Layout
2797
2798 \backslash
2799 begin{document}
2800 \end_layout
2801
2802 \end_inset
2803
2804  line as well as the 
2805 \begin_inset Flex Code
2806 status collapsed
2807
2808 \begin_layout Plain Layout
2809
2810 \backslash
2811 end{document}
2812 \end_layout
2813
2814 \end_inset
2815
2816  line must be deleted) or else errors will be generated when you try to
2817  make a DVI file.
2818 \end_layout
2819
2820 \begin_layout Standard
2821 LyX allows you to include files quite easily with 
2822 \begin_inset Flex MenuItem
2823 status collapsed
2824
2825 \begin_layout Plain Layout
2826 Insert\SpecialChar \menuseparator
2827 ChiId
2828 \begin_inset space ~
2829 \end_inset
2830
2831 Document
2832 \end_layout
2833
2834 \end_inset
2835
2836 .
2837  When you click on this selection a small box is inserted into the file
2838  at the current cursor location.
2839  Clicking on the box raises a dialog which allows you to select the file
2840  to be included, and the method of its inclusion.
2841  
2842 \end_layout
2843
2844 \begin_layout Standard
2845 The file selection box should by now be obvious.
2846  The three inclusion methods are 
2847 \begin_inset Quotes eld
2848 \end_inset
2849
2850 include
2851 \begin_inset Quotes erd
2852 \end_inset
2853
2854
2855 \begin_inset Quotes eld
2856 \end_inset
2857
2858 input
2859 \begin_inset Quotes erd
2860 \end_inset
2861
2862 , and 
2863 \begin_inset Quotes eld
2864 \end_inset
2865
2866 verbatim
2867 \begin_inset Quotes erd
2868 \end_inset
2869
2870 .
2871  The difference between 
2872 \begin_inset Quotes eld
2873 \end_inset
2874
2875 include
2876 \begin_inset Quotes erd
2877 \end_inset
2878
2879  and 
2880 \begin_inset Quotes eld
2881 \end_inset
2882
2883 input
2884 \begin_inset Quotes erd
2885 \end_inset
2886
2887  is really only meaningful to LaTeXperts, but the practical difference is
2888  that files which are 
2889 \begin_inset Quotes eld
2890 \end_inset
2891
2892 included
2893 \begin_inset Quotes erd
2894 \end_inset
2895
2896  are typeset beginning on a new page, while files which are 
2897 \begin_inset Quotes eld
2898 \end_inset
2899
2900 inputted
2901 \begin_inset Quotes erd
2902 \end_inset
2903
2904  are typeset starting on the current page.
2905 \end_layout
2906
2907 \begin_layout Standard
2908 Generally, the master file is converted into a full LaTeX file before typesettin
2909 g, while the included files are converted to LaTeX files which do not have
2910  all the preamble information.
2911 \end_layout
2912
2913 \begin_layout Standard
2914
2915 \begin_inset Quotes eld
2916 \end_inset
2917
2918 verbatim
2919 \begin_inset Quotes erd
2920 \end_inset
2921
2922  included file allows you to include a file typeset exactly as it appears
2923  in the file, i.
2924 \begin_inset space \thinspace{}
2925 \end_inset
2926
2927 g.
2928 \begin_inset space \space{}
2929 \end_inset
2930
2931 in 
2932 \begin_inset Flex Code
2933 status collapsed
2934
2935 \begin_layout Plain Layout
2936 verbatim
2937 \end_layout
2938
2939 \end_inset
2940
2941  mode, with the characters set in a fixed-width typewriter font.
2942  Normally, spaces in this file are invisible, though two consecutive spaces
2943  are conserved, unlike LyX's normal treatment of spaces.
2944  However, setting the 
2945 \begin_inset Flex MenuItem
2946 status collapsed
2947
2948 \begin_layout Plain Layout
2949 Mark
2950 \begin_inset space ~
2951 \end_inset
2952
2953 spaces
2954 \begin_inset space ~
2955 \end_inset
2956
2957 in
2958 \begin_inset space ~
2959 \end_inset
2960
2961 output
2962 \end_layout
2963
2964 \end_inset
2965
2966  checkbox typesets a mark to unambiguously define the presence of a space.
2967  
2968 \end_layout
2969
2970 \begin_layout Subsection
2971 Cross-References Between Files
2972 \end_layout
2973
2974 \begin_layout Standard
2975 \begin_inset Box Shadowbox
2976 position "t"
2977 hor_pos "c"
2978 has_inner_box 1
2979 inner_pos "t"
2980 use_parbox 0
2981 use_makebox 0
2982 width "100col%"
2983 special "none"
2984 height "1in"
2985 height_special "totalheight"
2986 status open
2987
2988 \begin_layout Plain Layout
2989 This section is somewhat out of date.
2990  Need to describe default master documents and how children are opened when
2991  the master is.
2992  [[FIXME]]
2993 \end_layout
2994
2995 \end_inset
2996
2997
2998 \end_layout
2999
3000 \begin_layout Standard
3001 It is possible to set up cross-references between the different files.
3002  First, open all the files in question: let's call them A and B in a two
3003  file example, where B is included in A.
3004  Let's say you insert a label in A, then want to reference it in B.
3005  Open the cross-reference dialog in whilst in document B, and you can select
3006  the 
3007 \begin_inset Quotes eld
3008 \end_inset
3009
3010 buffer
3011 \begin_inset Quotes erd
3012 \end_inset
3013
3014  to use.
3015 \end_layout
3016
3017 \begin_layout Subsection
3018 Bibliography Lists in all Subdocuments
3019 \end_layout
3020
3021 \begin_layout Standard
3022 \begin_inset Box Frameless
3023 position "t"
3024 hor_pos "c"
3025 has_inner_box 1
3026 inner_pos "t"
3027 use_parbox 0
3028 use_makebox 0
3029 width "100col%"
3030 special "none"
3031 height "1in"
3032 height_special "totalheight"
3033 status open
3034
3035 \begin_layout Plain Layout
3036 This section also needs updating.
3037  There is now material about this on the wiki, and it could be copied here.
3038 \end_layout
3039
3040 \end_inset
3041
3042
3043 \end_layout
3044
3045 \begin_layout Standard
3046 Copy the bibliography list with all entries to all subdocuments and transform
3047  them to a comment.
3048  This way LyX will find the 
3049 \begin_inset Flex Code
3050 status collapsed
3051
3052 \begin_layout Plain Layout
3053 .bib
3054 \end_layout
3055
3056 \end_inset
3057
3058 -files and you can easily insert references without making the bibliography
3059  list visible.
3060 \end_layout
3061
3062 \begin_layout Standard
3063 As the bibliography list is in a comment, LaTeX won't use use it and the
3064  references will look like this: [?], instead of like this: [1].
3065  One solution is to use the LaTeX-package 
3066 \begin_inset Flex Code
3067 status collapsed
3068
3069 \begin_layout Plain Layout
3070 comment
3071 \end_layout
3072
3073 \end_inset
3074
3075  that will only include comments by processing the files separately.
3076  To do this, add in the LaTeX preamble of every subdocument the following:
3077 \end_layout
3078
3079 \begin_layout LyX-Code
3080
3081 \backslash
3082 usepackage{comment}
3083 \end_layout
3084
3085 \begin_layout LyX-Code
3086
3087 \backslash
3088 includecomment{comment}
3089 \end_layout
3090
3091 \begin_layout Standard
3092 See also 
3093 \begin_inset Flex URL
3094 status collapsed
3095
3096 \begin_layout Plain Layout
3097
3098 http://wiki.lyx.org/FAQ/Unsorted#toc31
3099 \end_layout
3100
3101 \end_inset
3102
3103 .
3104 \end_layout
3105
3106 \begin_layout Section
3107 Fancy Headers and Footers
3108 \end_layout
3109
3110 \begin_layout Standard
3111 The default page layout is rather plain; for an 
3112 \begin_inset Flex Code
3113 status collapsed
3114
3115 \begin_layout Plain Layout
3116 article
3117 \end_layout
3118
3119 \end_inset
3120
3121  document class, all you get is a centered page number at the bottom of
3122  the page.
3123  This document uses KOMA-script's book class, so it appears to be a bit
3124  fancier.
3125  But to really put on a show, you need to set the document page style to
3126  
3127 \begin_inset Quotes eld
3128 \end_inset
3129
3130 fancy
3131 \begin_inset Quotes erd
3132 \end_inset
3133
3134 , as mentioned in the 
3135 \emph on
3136 User Guide
3137 \emph default
3138 .
3139  This section describes the LaTeX code you need to insert in your LaTeX
3140  preamble in order to get the desired effects.
3141 \end_layout
3142
3143 \begin_layout Standard
3144 For more information on fancy headers, see the 
3145 \begin_inset Flex Code
3146 status collapsed
3147
3148 \begin_layout Plain Layout
3149 fancyhdr
3150 \end_layout
3151
3152 \end_inset
3153
3154  package documentation.
3155  (
3156 \begin_inset Flex URL
3157 status collapsed
3158
3159 \begin_layout Plain Layout
3160
3161 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3162 \end_layout
3163
3164 \end_inset
3165
3166 )
3167 \end_layout
3168
3169 \begin_layout Standard
3170 The page header is divided into three fields, not surprisingly labeled 
3171 \begin_inset Quotes eld
3172 \end_inset
3173
3174 left
3175 \begin_inset Quotes erd
3176 \end_inset
3177
3178
3179 \begin_inset Quotes eld
3180 \end_inset
3181
3182 center
3183 \begin_inset Quotes erd
3184 \end_inset
3185
3186 , and 
3187 \begin_inset Quotes eld
3188 \end_inset
3189
3190 right
3191 \begin_inset Quotes erd
3192 \end_inset
3193
3194 .
3195  The footer is also divided into these three fields.
3196  The LaTeX commands to set these fields in the simplest manner are 
3197 \begin_inset Flex Code
3198 status collapsed
3199
3200 \begin_layout Plain Layout
3201
3202 \backslash
3203 lhead
3204 \end_layout
3205
3206 \end_inset
3207
3208
3209 \begin_inset Flex Code
3210 status collapsed
3211
3212 \begin_layout Plain Layout
3213
3214 \backslash
3215 chead
3216 \end_layout
3217
3218 \end_inset
3219
3220
3221 \begin_inset Flex Code
3222 status collapsed
3223
3224 \begin_layout Plain Layout
3225
3226 \backslash
3227 rhead
3228 \end_layout
3229
3230 \end_inset
3231
3232
3233 \begin_inset Flex Code
3234 status collapsed
3235
3236 \begin_layout Plain Layout
3237
3238 \backslash
3239 lfoot
3240 \end_layout
3241
3242 \end_inset
3243
3244 , etc.
3245  Suppose you wish to put your name in the upper left hand corner of each
3246  page.
3247  Simply insert the following command in the preamble: 
3248 \end_layout
3249
3250 \begin_layout Standard
3251
3252 \family typewriter
3253
3254 \backslash
3255 lhead{John Q.
3256  DocWriter}
3257 \end_layout
3258
3259 \begin_layout Standard
3260 You will now see your name in the upper left.
3261  If a field has a default entry that you would like to get rid of (often
3262  the page number appears in the central footer, simply include a command
3263  with a blank argument, e.
3264 \begin_inset space \thinspace{}
3265 \end_inset
3266
3267 g.:
3268 \end_layout
3269
3270 \begin_layout Standard
3271
3272 \family typewriter
3273
3274 \backslash
3275 cfoot{}
3276 \end_layout
3277
3278 \begin_layout Standard
3279 Let's get really fancy: lets put the section number with the word 
3280 \begin_inset Quotes eld
3281 \end_inset
3282
3283 Section
3284 \begin_inset Quotes erd
3285 \end_inset
3286
3287  (e.
3288 \begin_inset space \thinspace{}
3289 \end_inset
3290
3291 g.
3292 \begin_inset space \space{}
3293 \end_inset
3294
3295 Section 3) in the upper left, the page number (e.
3296 \begin_inset space \thinspace{}
3297 \end_inset
3298
3299 g.
3300 \begin_inset space \space{}
3301 \end_inset
3302
3303 Page 4) in the upper right, your name in the lower left, and the date in
3304  the lower right.
3305  The following commands should now appear in the preamble:
3306 \end_layout
3307
3308 \begin_layout Standard
3309
3310 \family typewriter
3311
3312 \backslash
3313 lhead{Section 
3314 \backslash
3315 thesection}
3316 \end_layout
3317
3318 \begin_layout Standard
3319
3320 \family typewriter
3321
3322 \backslash
3323 chead{}
3324 \end_layout
3325
3326 \begin_layout Standard
3327
3328 \family typewriter
3329
3330 \backslash
3331 rhead{Page 
3332 \backslash
3333 thepage}
3334 \end_layout
3335
3336 \begin_layout Standard
3337
3338 \family typewriter
3339
3340 \backslash
3341 lfoot{John Q.
3342  DocWriter}
3343 \end_layout
3344
3345 \begin_layout Standard
3346
3347 \family typewriter
3348
3349 \backslash
3350 cfoot{}
3351 \end_layout
3352
3353 \begin_layout Standard
3354
3355 \family typewriter
3356
3357 \backslash
3358 rfoot{
3359 \backslash
3360 today}
3361 \end_layout
3362
3363 \begin_layout Standard
3364 The commands 
3365 \begin_inset Flex Code
3366 status collapsed
3367
3368 \begin_layout Plain Layout
3369
3370 \backslash
3371 thesection
3372 \end_layout
3373
3374 \end_inset
3375
3376  and 
3377 \begin_inset Flex Code
3378 status collapsed
3379
3380 \begin_layout Plain Layout
3381
3382 \backslash
3383 thepage
3384 \end_layout
3385
3386 \end_inset
3387
3388  access LaTeX's section and page counters, and so print out the current
3389  section and page numbers.
3390  
3391 \begin_inset Flex Code
3392 status collapsed
3393
3394 \begin_layout Plain Layout
3395
3396 \backslash
3397 today
3398 \end_layout
3399
3400 \end_inset
3401
3402  simply prints out today's date.
3403 \end_layout
3404
3405 \begin_layout Standard
3406 The thicknesses of the horizontal rules drawn beneath the header and above
3407  the footer can also be modified.
3408  If you don't want one of the rules, set its thickness to 0.
3409  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3410  Use commands
3411 \family typewriter
3412  
3413 \family default
3414 like 
3415 \begin_inset Flex Code
3416 status collapsed
3417
3418 \begin_layout Plain Layout
3419
3420 \backslash
3421 renewcommand{
3422 \backslash
3423 headrulewidth}{0.4pt}
3424 \end_layout
3425
3426 \end_inset
3427
3428  and 
3429 \begin_inset Flex Code
3430 status collapsed
3431
3432 \begin_layout Plain Layout
3433
3434 \backslash
3435 renewcommand{
3436 \backslash
3437 footrulewidth}{0.4pt}
3438 \end_layout
3439
3440 \end_inset
3441
3442  to set the thicknesses.
3443 \end_layout
3444
3445 \begin_layout Standard
3446 You can switch the header/footer settings on and off for individual pages
3447  using commands like 
3448 \begin_inset Flex Code
3449 status collapsed
3450
3451 \begin_layout Plain Layout
3452
3453 \backslash
3454 thispagestyle{empty}
3455 \end_layout
3456
3457 \end_inset
3458
3459
3460 \begin_inset Flex Code
3461 status collapsed
3462
3463 \begin_layout Plain Layout
3464
3465 \backslash
3466 thispagestyle{plain}
3467 \end_layout
3468
3469 \end_inset
3470
3471 , and 
3472 \begin_inset Flex Code
3473 status collapsed
3474
3475 \begin_layout Plain Layout
3476
3477 \backslash
3478 thispagestyle{fancy}
3479 \end_layout
3480
3481 \end_inset
3482
3483 .
3484  Simply insert them in the text on the page you want changed and mark them
3485  as TeX code.
3486  In fact, title pages are marked as plain by default, while following pages
3487  are marked fancy when using the global fancy setting.
3488 \end_layout
3489
3490 \begin_layout Standard
3491 As a final example, it is possible to include an image in the header or
3492  footer.
3493  Suppose you want to put a company logo in the upper lefthand corner.
3494  You might try something like
3495 \end_layout
3496
3497 \begin_layout Standard
3498
3499 \family typewriter
3500
3501 \backslash
3502 lhead{
3503 \backslash
3504 resizebox{1in}{!}{
3505 \backslash
3506 includegraphics{logo.eps}}}
3507 \end_layout
3508
3509 \begin_layout Standard
3510 \noindent
3511 (you may need to preface this with 
3512 \begin_inset Flex Code
3513 status collapsed
3514
3515 \begin_layout Plain Layout
3516 \noindent
3517
3518 \backslash
3519 usepackage{graphics}
3520 \end_layout
3521
3522 \end_inset
3523
3524  if you don't include graphics elsewhere in your document).
3525 \end_layout
3526
3527 \begin_layout Section
3528 Itemize Bullet Selection
3529 \begin_inset CommandInset label
3530 LatexCommand label
3531 name "sec:bullet"
3532
3533 \end_inset
3534
3535
3536 \end_layout
3537
3538 \begin_layout Standard
3539 by
3540 \noun on
3541  Allan Rae
3542 \end_layout
3543
3544 \begin_layout Subsection
3545 Introduction
3546 \end_layout
3547
3548 \begin_layout Standard
3549 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3550  Using this dialog you can easily specify what bullet shape to use at each
3551  level of an itemized list.
3552  These settings are document-wide so you won't be able to specify different
3553  sets of bullets for different paragraphs.
3554 \begin_inset Foot
3555 status collapsed
3556
3557 \begin_layout Plain Layout
3558 Well, actually you can but you'll have to do it by hand.
3559 \end_layout
3560
3561 \end_inset
3562
3563
3564 \end_layout
3565
3566 \begin_layout Subsection
3567 How it looks
3568 \end_layout
3569
3570 \begin_layout Standard
3571 Open the dialog by selecting the 
3572 \begin_inset Flex MenuItem
3573 status collapsed
3574
3575 \begin_layout Plain Layout
3576 Document\SpecialChar \menuseparator
3577 Settings
3578 \end_layout
3579
3580 \end_inset
3581
3582  menu item and then select the 
3583 \begin_inset Flex MenuItem
3584 status collapsed
3585
3586 \begin_layout Plain Layout
3587 Bullets
3588 \end_layout
3589
3590 \end_inset
3591
3592  tab.
3593 \end_layout
3594
3595 \begin_layout Standard
3596 The dialog provides you with a table of bullet shapes.
3597  A column of buttons on the left of the table provides access to the six
3598  different panels of bullet shapes.
3599  The row of buttons across the top is used to select which bullet depth
3600  you are changing.
3601  A text entry under the table shows the currently selected bullet shape's
3602  LaTeX equivalent and this can be edited if desired.
3603  If you do modify the text you will also need to specify any needed packages
3604  in the LaTeX preamble.
3605 \end_layout
3606
3607 \begin_layout Standard
3608 The six panels are divided up by the packages they require.
3609  The following table shows the mappings from button name to LaTeX packages.
3610 \end_layout
3611
3612 \begin_layout Standard
3613 \align center
3614 \begin_inset Tabular
3615 <lyxtabular version="3" rows="7" columns="2">
3616 <features tabularvalignment="middle">
3617 <column alignment="center" valignment="top" width="0pt">
3618 <column alignment="center" valignment="top" width="0pt">
3619 <row>
3620 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3621 \begin_inset Text
3622
3623 \begin_layout Plain Layout
3624
3625 \family roman
3626 \series medium
3627 \shape up
3628 \size normal
3629 \emph off
3630 \bar no
3631 \noun off
3632 \color none
3633 Button
3634 \end_layout
3635
3636 \end_inset
3637 </cell>
3638 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3639 \begin_inset Text
3640
3641 \begin_layout Plain Layout
3642
3643 \family roman
3644 \series medium
3645 \shape up
3646 \size normal
3647 \emph off
3648 \bar no
3649 \noun off
3650 \color none
3651 Packages Required
3652 \end_layout
3653
3654 \end_inset
3655 </cell>
3656 </row>
3657 <row>
3658 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3659 \begin_inset Text
3660
3661 \begin_layout Plain Layout
3662
3663 \family sans
3664 \series medium
3665 \shape up
3666 \size normal
3667 \emph off
3668 \bar no
3669 \noun off
3670 \color none
3671 Standard
3672 \end_layout
3673
3674 \end_inset
3675 </cell>
3676 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3677 \begin_inset Text
3678
3679 \begin_layout Plain Layout
3680
3681 \series medium
3682 \shape up
3683 \size normal
3684 \emph off
3685 \bar no
3686 \noun off
3687 \color none
3688 base LaTeX
3689 \end_layout
3690
3691 \end_inset
3692 </cell>
3693 </row>
3694 <row>
3695 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3696 \begin_inset Text
3697
3698 \begin_layout Plain Layout
3699
3700 \family sans
3701 \series medium
3702 \shape up
3703 \size normal
3704 \emph off
3705 \bar no
3706 \noun off
3707 \color none
3708 Maths
3709 \end_layout
3710
3711 \end_inset
3712 </cell>
3713 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3714 \begin_inset Text
3715
3716 \begin_layout Plain Layout
3717
3718 \family typewriter
3719 \series medium
3720 \shape up
3721 \size normal
3722 \emph off
3723 \bar no
3724 \noun off
3725 \color none
3726 amssymb.sty
3727 \end_layout
3728
3729 \end_inset
3730 </cell>
3731 </row>
3732 <row>
3733 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3734 \begin_inset Text
3735
3736 \begin_layout Plain Layout
3737
3738 \family sans
3739 \series medium
3740 \shape up
3741 \size normal
3742 \emph off
3743 \bar no
3744 \noun off
3745 \color none
3746 Ding1
3747 \end_layout
3748
3749 \end_inset
3750 </cell>
3751 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3752 \begin_inset Text
3753
3754 \begin_layout Plain Layout
3755
3756 \family typewriter
3757 \series medium
3758 \shape up
3759 \size normal
3760 \emph off
3761 \bar no
3762 \noun off
3763 \color none
3764 pifont.sty
3765 \end_layout
3766
3767 \end_inset
3768 </cell>
3769 </row>
3770 <row>
3771 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3772 \begin_inset Text
3773
3774 \begin_layout Plain Layout
3775
3776 \family sans
3777 \series medium
3778 \shape up
3779 \size normal
3780 \emph off
3781 \bar no
3782 \noun off
3783 \color none
3784 Ding2
3785 \end_layout
3786
3787 \end_inset
3788 </cell>
3789 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3790 \begin_inset Text
3791
3792 \begin_layout Plain Layout
3793
3794 \family typewriter
3795 \series medium
3796 \shape up
3797 \size normal
3798 \emph off
3799 \bar no
3800 \noun off
3801 \color none
3802 pifont.sty
3803 \end_layout
3804
3805 \end_inset
3806 </cell>
3807 </row>
3808 <row>
3809 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3810 \begin_inset Text
3811
3812 \begin_layout Plain Layout
3813
3814 \family sans
3815 \series medium
3816 \shape up
3817 \size normal
3818 \emph off
3819 \bar no
3820 \noun off
3821 \color none
3822 Ding3
3823 \end_layout
3824
3825 \end_inset
3826 </cell>
3827 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3828 \begin_inset Text
3829
3830 \begin_layout Plain Layout
3831
3832 \family typewriter
3833 \series medium
3834 \shape up
3835 \size normal
3836 \emph off
3837 \bar no
3838 \noun off
3839 \color none
3840 pifont.sty
3841 \end_layout
3842
3843 \end_inset
3844 </cell>
3845 </row>
3846 <row>
3847 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3848 \begin_inset Text
3849
3850 \begin_layout Plain Layout
3851
3852 \family sans
3853 \series medium
3854 \shape up
3855 \size normal
3856 \emph off
3857 \bar no
3858 \noun off
3859 \color none
3860 Ding4
3861 \end_layout
3862
3863 \end_inset
3864 </cell>
3865 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3866 \begin_inset Text
3867
3868 \begin_layout Plain Layout
3869
3870 \family typewriter
3871 \series medium
3872 \shape up
3873 \size normal
3874 \emph off
3875 \bar no
3876 \noun off
3877 \color none
3878 pifont.sty
3879 \end_layout
3880
3881 \end_inset
3882 </cell>
3883 </row>
3884 </lyxtabular>
3885
3886 \end_inset
3887
3888
3889 \end_layout
3890
3891 \begin_layout Standard
3892 LyX doesn't stop you using bullets from packages you don't have.
3893  If you get errors from LaTeX when you try to view or print the file, then
3894  it is likely you are missing a package.
3895 \begin_inset Foot
3896 status collapsed
3897
3898 \begin_layout Plain Layout
3899 LyX doesn't restrict your use since you may be editing locally and exporting
3900  elsewhere.
3901 \end_layout
3902
3903 \end_inset
3904
3905
3906 \end_layout
3907
3908 \begin_layout Subsection
3909 How to use it
3910 \end_layout
3911
3912 \begin_layout Standard
3913 Select which bullet depth you want to change then select the bullet shape
3914  and size.
3915  Any changes will not be visible in LyX, but are visible when viewing the
3916  document.
3917 \end_layout
3918
3919 \begin_layout Standard
3920 You can reset a bullet shape to the default simply by clicking your right
3921  mouse button on the appropriate bullet depth button.
3922 \begin_inset Foot
3923 status collapsed
3924
3925 \begin_layout Plain Layout
3926 If you 
3927 \emph on
3928 really
3929 \emph default
3930  want to have multiple sets of paragraphs with different sets of bullets
3931  in each, then you're going to have to get your hands dirty with TeX code.
3932  The bullet selection dialog can help though because it provides you with
3933  the LaTeX code for a wide range of bullet shapes.
3934  To make your own custom paragraphs you have the following options:
3935 \end_layout
3936
3937 \begin_layout Plain Layout
3938 \begin_inset ERT
3939 status open
3940
3941 \begin_layout Plain Layout
3942
3943
3944 \backslash
3945 let
3946 \backslash
3947 savelabelitemi=
3948 \backslash
3949 labelitemi
3950 \end_layout
3951
3952 \end_inset
3953
3954
3955 \end_layout
3956
3957 \begin_layout Plain Layout
3958 \begin_inset ERT
3959 status open
3960
3961 \begin_layout Plain Layout
3962
3963
3964 \backslash
3965 renewcommand
3966 \backslash
3967 labelitemi[0]{
3968 \backslash
3969 small
3970 \backslash
3971 (
3972 \backslash
3973 sharp
3974 \backslash
3975 )}
3976 \end_layout
3977
3978 \end_inset
3979
3980
3981 \end_layout
3982
3983 \begin_layout Itemize
3984 Use the LaTeX command 
3985 \begin_inset Flex Code
3986 status collapsed
3987
3988 \begin_layout Plain Layout
3989
3990 \backslash
3991 renewcommand{}{}
3992 \end_layout
3993
3994 \end_inset
3995
3996  to specify a new bullet shape for a given depth.
3997  You'll also need to save the current bullet shape so you can restore it
3998  again afterwards.
3999  In this itemized list the following LaTeX code was used to change the bullet
4000  used for the first depth.
4001 \end_layout
4002
4003 \begin_deeper
4004 \begin_layout LyX-Code
4005
4006 \backslash
4007 let
4008 \backslash
4009 savelabelitemi=
4010 \backslash
4011 labelitemi 
4012 \end_layout
4013
4014 \begin_layout LyX-Code
4015
4016 \backslash
4017 renewcommand
4018 \backslash
4019 labelitemi[0]{
4020 \backslash
4021 small
4022 \backslash
4023 (
4024 \backslash
4025 sharp
4026 \backslash
4027 )}
4028 \end_layout
4029
4030 \end_deeper
4031 \begin_layout Itemize
4032 Note that the itemize depth is specified in Roman numerals as part of the
4033  
4034 \family typewriter
4035
4036 \backslash
4037 labelitem
4038 \family default
4039  command.
4040 \end_layout
4041
4042 \begin_layout Itemize
4043 \begin_inset ERT
4044 status open
4045
4046 \begin_layout Plain Layout
4047
4048 [
4049 \backslash
4050 (
4051 \backslash
4052 star
4053 \backslash
4054 )]
4055 \end_layout
4056
4057 \end_inset
4058
4059  Specify each individual entry by starting each item with the bullet shape
4060  enclosed in square brackets and set as 
4061 \begin_inset Flex MenuItem
4062 status collapsed
4063
4064 \begin_layout Plain Layout
4065 TeX Code
4066 \end_layout
4067
4068 \end_inset
4069
4070 .
4071  For example, this item was started with 
4072 \begin_inset Flex Code
4073 status collapsed
4074
4075 \begin_layout Plain Layout
4076 [
4077 \backslash
4078 (
4079 \backslash
4080 star
4081 \backslash
4082 )]
4083 \end_layout
4084
4085 \end_inset
4086
4087 .
4088 \end_layout
4089
4090 \begin_layout Plain Layout
4091 \begin_inset ERT
4092 status open
4093
4094 \begin_layout Plain Layout
4095
4096
4097 \backslash
4098 renewcommand
4099 \backslash
4100 labelitemi[0]{
4101 \backslash
4102 savelabelitemi}
4103 \end_layout
4104
4105 \end_inset
4106
4107
4108 \end_layout
4109
4110 \begin_layout Plain Layout
4111 You'll also need to revert the labelitem back to its previous setting for
4112  the global bullet shape settings to remain in effect.
4113  The way used here was:
4114 \end_layout
4115
4116 \begin_layout LyX-Code
4117
4118 \backslash
4119 renewcommand
4120 \backslash
4121 labelitemi[0]{
4122 \backslash
4123 savelabelitemi}
4124 \end_layout
4125
4126 \end_inset
4127
4128
4129 \end_layout
4130
4131 \begin_layout Chapter
4132 LyX and the World Wide Web
4133 \end_layout
4134
4135 \begin_layout Standard
4136 LyX has long supported the export of documents to various web-friendly formats,
4137  such as HTML.
4138  Before verson 2.0, however, HTML export was always accomplished by the use
4139  of external converters.
4140 \begin_inset Foot
4141 status collapsed
4142
4143 \begin_layout Plain Layout
4144 For details on the use of external converters with LyX, see the 
4145 \emph on
4146 Converters
4147 \emph default
4148  section of the Customization manual.
4149 \end_layout
4150
4151 \end_inset
4152
4153  These fall into two large groups: there are converters that use LaTeX as
4154  an intermediate format, such as 
4155 \begin_inset Flex Code
4156 status collapsed
4157
4158 \begin_layout Plain Layout
4159 htlatex
4160 \end_layout
4161
4162 \end_inset
4163
4164
4165 \begin_inset Flex Code
4166 status collapsed
4167
4168 \begin_layout Plain Layout
4169 html2latex
4170 \end_layout
4171
4172 \end_inset
4173
4174 , and 
4175 \begin_inset Flex Code
4176 status collapsed
4177
4178 \begin_layout Plain Layout
4179 plastex
4180 \end_layout
4181
4182 \end_inset
4183
4184 , relying upon LyX to produce the LaTeX; and there is a converter that works
4185  directly on LyX files, 
4186 \begin_inset Flex Code
4187 status collapsed
4188
4189 \begin_layout Plain Layout
4190 eLyXer
4191 \end_layout
4192
4193 \end_inset
4194
4195 .
4196  All of these have different advantages and disadvantages.
4197  
4198 \end_layout
4199
4200 \begin_layout Standard
4201 The LaTeX-based converters have the advantage that, in principle, they know
4202  everything about the exported document that LaTeX does.
4203  Such converters do not care, for example, if a certain block of code was
4204  produced by LyX or was Evil Red Text.
4205  These converters know about 
4206 \begin_inset Flex Code
4207 status collapsed
4208
4209 \begin_layout Plain Layout
4210 aux
4211 \end_layout
4212
4213 \end_inset
4214
4215  files, counters, and references, and can often make use of the 
4216 \begin_inset Flex Code
4217 status collapsed
4218
4219 \begin_layout Plain Layout
4220 bbl
4221 \end_layout
4222
4223 \end_inset
4224
4225  files generated by BibTeX.
4226  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4227  said that only TeX itself understands TeX---and LaTeX-based converters
4228  will often choke on what seem to be quite simple constructs; complex ones
4229  can throw them completely, and as of this writing, for example, the 
4230 \emph on
4231 Embedded Objects
4232 \emph default
4233  manual will not export with 
4234 \begin_inset Flex Code
4235 status collapsed
4236
4237 \begin_layout Plain Layout
4238 htlatex
4239 \end_layout
4240
4241 \end_inset
4242
4243 , though the others will.
4244  The other issue concerns how math is handled.
4245  These converters typically convert the formulae into little pictures that
4246  are then linked from the HTML document.
4247  Since these are actually generated by LaTeX, they are accurate.
4248  But they do not scale well, and just getting them to look as if they are
4249  actually meant to be in your document---so that the font sizes seem to
4250  be roughly the same---can be a challenge.
4251 \end_layout
4252
4253 \begin_layout Standard
4254 Alex Fernandez's 
4255 \begin_inset Flex Code
4256 status collapsed
4257
4258 \begin_layout Plain Layout
4259 eLyXer
4260 \end_layout
4261
4262 \end_inset
4263
4264  solves some of these problems.
4265  In particular, its rendering of math tends to look better than 
4266 \begin_inset Flex Code
4267 status collapsed
4268
4269 \begin_layout Plain Layout
4270 htlatex
4271 \end_layout
4272
4273 \end_inset
4274
4275 's, at least in simpler cases, since it renders math using a combination
4276  of HTML and CSS rather than converting the formulae to images.
4277  But more complex formula tend to be rendered less well than with 
4278 \begin_inset Flex Code
4279 status collapsed
4280
4281 \begin_layout Plain Layout
4282 htlatex
4283 \end_layout
4284
4285 \end_inset
4286
4287 , since there is no reasonable way of scaling parentheses in HTML, for example.
4288  More importantly (as of version 0.39, at least), 
4289 \begin_inset Flex Code
4290 status collapsed
4291
4292 \begin_layout Plain Layout
4293 eLyXer
4294 \end_layout
4295
4296 \end_inset
4297
4298  has no support for math macros, for user-defined paragraph or character
4299  styles, or for tables of contents and figures, and its treatment of cross-refer
4300 ences is minimal.
4301  These limitations make 
4302 \begin_inset Flex Code
4303 status collapsed
4304
4305 \begin_layout Plain Layout
4306 eLyXer
4307 \end_layout
4308
4309 \end_inset
4310
4311  unsuitable for many of the documents more advanced LyX users would produce.
4312  In principle, of course, all of these problems could be solved, but the
4313  LyX developers have decided to follow a different path and have made LyX
4314  itself capable of writing XHTML, just as it is capable of writing LaTeX,
4315  DocBook, and plaintext.
4316 \end_layout
4317
4318 \begin_layout Standard
4319 As of this writing, XHTML output remains under development and should probably
4320  be regarded as 
4321 \begin_inset Quotes eld
4322 \end_inset
4323
4324 experimental
4325 \begin_inset Quotes erd
4326 \end_inset
4327
4328 .
4329 \begin_inset Foot
4330 status collapsed
4331
4332 \begin_layout Plain Layout
4333 The file 
4334 \begin_inset Flex Code
4335 status collapsed
4336
4337 \begin_layout Plain Layout
4338 development/HTML.notes
4339 \end_layout
4340
4341 \end_inset
4342
4343 , which can be found in the LyX source tree or 
4344 \begin_inset CommandInset href
4345 LatexCommand href
4346 name "accessed online"
4347 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4348
4349 \end_inset
4350
4351 , usually contains up-to-date information about the state of XHTML output.
4352 \end_layout
4353
4354 \end_inset
4355
4356  Still, the developers have chosen this approach because it has several
4357  potential advantages over the other two.
4358 \end_layout
4359
4360 \begin_layout Standard
4361 These advantages are primarily due to the fact that the XHTML output routines,
4362  since they are part of LyX, know everything LyX knows about the document
4363  being exported.
4364 \begin_inset Foot
4365 status collapsed
4366
4367 \begin_layout Plain Layout
4368 Another advantege is that, since these routines are internal to LyX, they
4369  are immune to changes in LyX's file format, or to changes in the semantics
4370  of existing insets.
4371 \end_layout
4372
4373 \end_inset
4374
4375  So they know about the table of contents (as displayed in the outline),
4376  about the counters associated with different paragraph styles, and about
4377  user-defined styles.
4378  The XHTML output routines know what LyX knows about internationalization,
4379  too, so they will output 
4380 \begin_inset Quotes eld
4381 \end_inset
4382
4383 Chapter 1
4384 \begin_inset Quotes erd
4385 \end_inset
4386
4387  or 
4388 \begin_inset Quotes eld
4389 \end_inset
4390
4391
4392 \lang ngerman
4393 Kapitel
4394 \lang english
4395  1
4396 \begin_inset Quotes erd
4397 \end_inset
4398
4399 , depending upon the language in effect at the time.
4400  
4401 \end_layout
4402
4403 \begin_layout Standard
4404 Quite generally, the output routines know everything LyX knows about document
4405  layout, that is, about how the document is to be rendered on screen.
4406  We use this information when we output the document as XHTML.
4407  In particular, LyX 
4408 \emph on
4409 automatically
4410 \emph default
4411  generates CSS style information corresponding to the layout information
4412  it uses to render the document on screen: if section headings are supposed
4413  to be sans-serif and bold as seen in LyX, then (by default) they will be
4414  sans-serif and bold when viewed in a web browser, too.
4415  And this is true not just for pre-defined styles, like Section, but for
4416  any style, including user-defined styles.
4417  Indeed, the XHTML output routines make no distinction between user-defined
4418  paragraph and character styles and LyX's own pre-defined styles: in each
4419  case, everything LyX knows about the styles is contained in the layout
4420  files.
4421  And much the same is true as regards pre-defined textual insets, such as
4422  footnotes, and various custom insets.
4423  
4424 \end_layout
4425
4426 \begin_layout Standard
4427 The result is that XHTML output can be customized and extended in 
4428 \emph on
4429 exactly
4430 \emph default
4431  the same way LaTeX output can be customized and extended: through layout
4432  files and modules.
4433  See chapter five of the 
4434 \emph on
4435 Customization 
4436 \emph default
4437 manual for the details.
4438 \end_layout
4439
4440 \begin_layout Standard
4441 The remainder of this chapter contains more detailed information on XHTML
4442  output, its limitations, and ways to work around those limitations.
4443 \end_layout
4444
4445 \begin_layout Section
4446 Math Output in XHTML
4447 \end_layout
4448
4449 \begin_layout Standard
4450 LyX offers four choices for how math is rendered.
4451  These have various advantages and disadvantages:
4452 \end_layout
4453
4454 \begin_layout Itemize
4455 MathML
4456 \begin_inset Newline newline
4457 \end_inset
4458
4459 MathML is a dialect of XML designed specifically for mathematics on the
4460  web, and it typically renders very well in browsers that support it.
4461  The disadvantage is that not all browsers support MathML, and support is
4462  not complete even in the Gecko-based browsers, such as Firefox.
4463 \begin_inset Newline newline
4464 \end_inset
4465
4466 If LyX is unable to render a formula as MathML---for example, if the formula
4467  uses the 
4468 \begin_inset Flex Code
4469 status collapsed
4470
4471 \begin_layout Plain Layout
4472 xymatrix
4473 \end_layout
4474
4475 \end_inset
4476
4477  package or 
4478 \change_deleted 1 1289155717
4479 ERT
4480 \change_inserted 1 1289155720
4481 TeX code
4482 \change_unchanged
4483 ---then it will instead output the formula as an image.
4484  
4485 \end_layout
4486
4487 \begin_layout Itemize
4488 HTML
4489 \begin_inset Newline newline
4490 \end_inset
4491
4492 As mentioned above, 
4493 \begin_inset Flex Code
4494 status collapsed
4495
4496 \begin_layout Plain Layout
4497 elyxer
4498 \end_layout
4499
4500 \end_inset
4501
4502  outputs math as HTML, styled by CSS.
4503 \begin_inset Foot
4504 status collapsed
4505
4506 \begin_layout Plain Layout
4507 LyX has borrowed some of the CSS for its HTML output from 
4508 \begin_inset Flex Code
4509 status collapsed
4510
4511 \begin_layout Plain Layout
4512 elyxer
4513 \end_layout
4514
4515 \end_inset
4516
4517 .
4518 \end_layout
4519
4520 \end_inset
4521
4522  For simple formulae, this can work quite well, though with more complicated
4523  formulae it tends to break down.
4524  Still, this method has the advantage that it is very widely supported and
4525  so it may be appropriate for documents that contain only a little, fairly
4526  simple math.
4527 \begin_inset Newline newline
4528 \end_inset
4529
4530 If Lyx is unable to render a formula as MathML---for example, if the formula
4531  uses the 
4532 \begin_inset Flex Code
4533 status collapsed
4534
4535 \begin_layout Plain Layout
4536 xymatrix
4537 \end_layout
4538
4539 \end_inset
4540
4541  package or 
4542 \change_deleted 1 1289155751
4543 ERT
4544 \change_inserted 1 1289155754
4545 Tex code
4546 \change_unchanged
4547 ---then it will instead output the formula as an image.
4548  
4549 \end_layout
4550
4551 \begin_layout Itemize
4552 Images
4553 \begin_inset Newline newline
4554 \end_inset
4555
4556 Like 
4557 \begin_inset Flex Code
4558 status collapsed
4559
4560 \begin_layout Plain Layout
4561 htlatex
4562 \end_layout
4563
4564 \end_inset
4565
4566 , LyX will output formulae as images, the very same images, in fact, that
4567  are used for instant preview.
4568 \begin_inset Foot
4569 status collapsed
4570
4571 \begin_layout Plain Layout
4572 Instant preview does 
4573 \emph on
4574 not 
4575 \emph default
4576 have to be on for images to be output, however.
4577 \end_layout
4578
4579 \end_inset
4580
4581  The advantage to this method is that the images are simply generated by
4582  LaTeX, so they are very accurate.
4583  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4584  so they do not scale terribly well, and one cannot copy them, etc.
4585 \begin_inset Newline newline
4586 \end_inset
4587
4588 The size of the images can be controlled by setting the 
4589 \begin_inset Quotes eld
4590 \end_inset
4591
4592 Math Images Scaling
4593 \begin_inset Quotes erd
4594 \end_inset
4595
4596  parameter under 
4597 \begin_inset Flex MenuItem
4598 status collapsed
4599
4600 \begin_layout Plain Layout
4601 Document\SpecialChar \menuseparator
4602 Settings\SpecialChar \menuseparator
4603 Output
4604 \end_layout
4605
4606 \end_inset
4607
4608 .
4609 \begin_inset Foot
4610 status collapsed
4611
4612 \begin_layout Plain Layout
4613 For those who want to know, this controls the resolution of the image in
4614  dots per inch and is based upon a default of 75 dpi.
4615 \end_layout
4616
4617 \end_inset
4618
4619
4620 \begin_inset Newline newline
4621 \end_inset
4622
4623 If LyX for some reason fails to create an image for a formula (e.g., if a
4624  required LaTeX package is not installed), then it will fall back to outputing
4625  the raw LaTeX.
4626 \end_layout
4627
4628 \begin_layout Itemize
4629 LaTeX
4630 \begin_inset Newline newline
4631 \end_inset
4632
4633 Finally, LyX will happily output math as LaTeX.
4634  As well as being the output of last resort, this method can be used with
4635  such tools as 
4636 \begin_inset CommandInset href
4637 LatexCommand href
4638 name "jsMath"
4639 target "http://www.math.union.edu/~dpvc/jsMath/"
4640
4641 \end_inset
4642
4643 , which uses JavaScript to render LaTeX embedded in HTML documents.
4644  LyX wraps the LaTeX in either a 
4645 \begin_inset Flex Code
4646 status collapsed
4647
4648 \begin_layout Plain Layout
4649 span
4650 \end_layout
4651
4652 \end_inset
4653
4654  (for inline formulas) or 
4655 \begin_inset Flex Code
4656 status collapsed
4657
4658 \begin_layout Plain Layout
4659 div
4660 \end_layout
4661
4662 \end_inset
4663
4664  (for displayed formulas) with 
4665 \begin_inset Flex Code
4666 status collapsed
4667
4668 \begin_layout Plain Layout
4669 class='math'
4670 \end_layout
4671
4672 \end_inset
4673
4674 , as is required for jsMath.
4675 \end_layout
4676
4677 \begin_layout Standard
4678 One of these output methods must be selected under 
4679 \begin_inset Flex MenuItem
4680 status collapsed
4681
4682 \begin_layout Plain Layout
4683 Document\SpecialChar \menuseparator
4684 Settings\SpecialChar \menuseparator
4685 Output
4686 \end_layout
4687
4688 \end_inset
4689
4690 .
4691  By default, LyX outputs MathML.
4692  This is a document-wide setting, therefore.
4693 \end_layout
4694
4695 \begin_layout Standard
4696 Eventually, LyX will offer the user the option to select an alternate output
4697  method for a particular inset, say, one that isn't being rendered very
4698  well by MathML.
4699 \begin_inset Foot
4700 status collapsed
4701
4702 \begin_layout Plain Layout
4703 That said, since LyX falls back to images if the inset contains 
4704 \change_deleted 1 1289155760
4705 ERT
4706 \change_inserted 1 1289155765
4707 TeX code
4708 \change_unchanged
4709 , then one can force output as an image by putting some harmless 
4710 \change_deleted 1 1289155770
4711 ERT
4712 \change_inserted 1 1289155774
4713 TeX code
4714 \change_unchanged
4715  into the math, for example: 
4716 \begin_inset Formula $a=b\relax$
4717 \end_inset
4718
4719 .
4720 \end_layout
4721
4722 \end_inset
4723
4724
4725 \end_layout
4726
4727 \begin_layout Section
4728 Bibliography and Citations
4729 \end_layout
4730
4731 \begin_layout Standard
4732 XHTML output fully supports bibliographies and citations.
4733  
4734 \end_layout
4735
4736 \begin_layout Standard
4737 Citation labels are generated by the same machinery that generates LyX's
4738  on-screen labels, so the labels will look in the output much as they do
4739  in LyX, though better.
4740  If you are using numerical citations, then LyX will output numerical labels,
4741  such as [1] or [17], rather than simply showing the citation key in square
4742  brackets, as it does on-screen.
4743  If you are using author-year citations, then LyX will add lowercase letters
4744  to the years, just as BibTeX does, if it finds more than one citation for
4745  a given author-year combination.
4746  The labels will be printed with the bibliography entries.
4747  Note that there is, at present, no way to customize the appearance of the
4748  labels, for example, to choose between square brackets and parentheses.
4749 \end_layout
4750
4751 \begin_layout Standard
4752 Bibliography output is handled by the same machinery that handles the presentati
4753 on of reference information in the citation dialog, so you will see in the
4754  XHTML output pretty much what you would see if you were to look at a given
4755  entry in the citation dialog.
4756  The formatting can be customized in your layout file or, preferably, in
4757  a module.
4758  See the 
4759 \emph on
4760 Customization
4761 \emph default
4762  manual for the details.
4763 \end_layout
4764
4765 \begin_layout Standard
4766 The main defect at present is that cross-referenced information is printed
4767  with every entry with which it is associated.
4768  So you can see things like this:
4769 \end_layout
4770
4771 \begin_layout Quote
4772 Jason Stanley, 
4773 \begin_inset Quotes eld
4774 \end_inset
4775
4776 Context and Logical Form
4777 \begin_inset Quotes erd
4778 \end_inset
4779
4780 , in 
4781 \emph on
4782 Language in Context: Selected Essays
4783 \emph default
4784  (Oxford: Oxford University Press, 2007), pp.
4785  30--68.
4786 \end_layout
4787
4788 \begin_layout Quote
4789 Jason Stanley, 
4790 \begin_inset Quotes eld
4791 \end_inset
4792
4793 Semantics in Context
4794 \begin_inset Quotes erd
4795 \end_inset
4796
4797 , in 
4798 \emph on
4799 Language in Context: Selected Essays
4800 \emph default
4801  (Oxford: Oxford University Press, 2007), pp.
4802  201--30.
4803 \end_layout
4804
4805 \begin_layout Standard
4806 This should be fixed before long.
4807 \end_layout
4808
4809 \begin_layout Standard
4810 There is no support at present for sectioned bibliographies.
4811  If you have multiple bibliographies, then LyX will print the same bibliography
4812  over and over.
4813 \end_layout
4814
4815 \begin_layout Section
4816 Indexes
4817 \end_layout
4818
4819 \begin_layout Standard
4820 LyX will happily export indexes as XHTML, but with certain limitations at
4821  the moment.
4822 \end_layout
4823
4824 \begin_layout Standard
4825 Index export will be most reliable when you do not attempt to use the fancy
4826  constructs that are described in the section on indexes in the 
4827 \emph on
4828 User's Guide
4829 \emph default
4830 .
4831 \begin_inset Foot
4832 status collapsed
4833
4834 \begin_layout Plain Layout
4835 The main issue here is that LyX itself does not really handle these.
4836  It just lets you enter what you would have to enter in raw LaTeX.
4837 \end_layout
4838
4839 \end_inset
4840
4841  We'll describe how they are handled using the subsection headings from
4842  that section.
4843 \end_layout
4844
4845 \begin_layout Itemize
4846 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4847  these, but the entries must be separated by 
4848 \begin_inset Quotes eld
4849 \end_inset
4850
4851  ! 
4852 \begin_inset Quotes erd
4853 \end_inset
4854
4855 , that is, there must be spaces around the exclamation point.
4856  This is because it is otherwise too difficult to check for escaped exclamation
4857  points, ones in math, and so forth.
4858 \end_layout
4859
4860 \begin_layout Itemize
4861 Page Ranges: There is no support at all for page ranges, since these make
4862  no sense with XHMTL.
4863  Instead, you will just get two index entries, one at either end.
4864 \end_layout
4865
4866 \begin_layout Itemize
4867 Cross-referencing: There is no support for cross-referencing.
4868  If LyX finds an entry containing the 
4869 \begin_inset Quotes eld
4870 \end_inset
4871
4872 |see\SpecialChar \ldots{}
4873
4874 \begin_inset Quotes erd
4875 \end_inset
4876
4877  construct, it is just dropped, and the rest is treated as an ordinary index
4878  entry.
4879 \end_layout
4880
4881 \begin_layout Itemize
4882 Index Entry Order: LyX does support attempts to fix the sorting order.
4883  It will take what is before the first `@' it finds and use that for sorting,
4884  taking what follows the first `@' to be the actual entry.
4885  At present, LyX does not check for escaped `@', so do not try to index
4886  email addresses.
4887 \end_layout
4888
4889 \begin_layout Itemize
4890 Index Entry Layout: You can format entries by using the text style dialog,
4891  or by using any other method available within LyX itself.
4892  There is no support for constructs like: 
4893 \begin_inset Quotes eld
4894 \end_inset
4895
4896 entry|textbf
4897 \begin_inset Quotes erd
4898 \end_inset
4899
4900 .
4901  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
4902  and everything that follows it.
4903 \end_layout
4904
4905 \begin_layout Itemize
4906 Multiple Indexes: There is no support for multiple indexes.
4907  Rather, all index entries will be printed as one large index.
4908  To avoid our printing several versions of the index, we print only the
4909  main index, so make sure you have one.
4910 \end_layout
4911
4912 \begin_layout Section
4913 Nomenclature and Glossary
4914 \end_layout
4915
4916 \begin_layout Standard
4917 There is at present no support for glossaries.
4918 \end_layout
4919
4920 \begin_layout Chapter
4921 The LyX Server
4922 \end_layout
4923
4924 \begin_layout Section
4925 Introduction
4926 \end_layout
4927
4928 \begin_layout Standard
4929 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4930  and retrieve information about the LyX internal state.
4931  This is only intended for advanced users, but they should find it useful.
4932  It is by writing to the LyX server, for example, that bibliography managers,
4933  such as JabRef, are able to 
4934 \begin_inset Quotes eld
4935 \end_inset
4936
4937 push
4938 \begin_inset Quotes erd
4939 \end_inset
4940
4941  citations to LyX.
4942 \end_layout
4943
4944 \begin_layout Section
4945 Starting the LyX Server
4946 \end_layout
4947
4948 \begin_layout Standard
4949 The LyX server works through the use of a pair of named pipes.
4950  These are usually located in 
4951 \begin_inset Flex Code
4952 status collapsed
4953
4954 \begin_layout Plain Layout
4955 UserDir
4956 \end_layout
4957
4958 \end_inset
4959
4960 , (except on Windows, where 
4961 \emph on
4962 local
4963 \emph default
4964  named pipes are special objects located in 
4965 \begin_inset Flex Code
4966 status collapsed
4967
4968 \begin_layout Plain Layout
4969
4970 \backslash
4971
4972 \backslash
4973 .
4974 \backslash
4975 pipe
4976 \end_layout
4977
4978 \end_inset
4979
4980 ) and have the names 
4981 \begin_inset Quotes eld
4982 \end_inset
4983
4984
4985 \begin_inset Flex Code
4986 status collapsed
4987
4988 \begin_layout Plain Layout
4989 lyxpipe.in
4990 \end_layout
4991
4992 \end_inset
4993
4994
4995 \begin_inset Quotes erd
4996 \end_inset
4997
4998  and 
4999 \begin_inset Quotes eld
5000 \end_inset
5001
5002
5003 \begin_inset Flex Code
5004 status collapsed
5005
5006 \begin_layout Plain Layout
5007 lyxpipe.out
5008 \end_layout
5009
5010 \end_inset
5011
5012
5013 \begin_inset Quotes erd
5014 \end_inset
5015
5016 .
5017  External programs write into 
5018 \begin_inset Flex Code
5019 status collapsed
5020
5021 \begin_layout Plain Layout
5022 lyxpipe.in
5023 \end_layout
5024
5025 \end_inset
5026
5027  and read back data from 
5028 \begin_inset Flex Code
5029 status collapsed
5030
5031 \begin_layout Plain Layout
5032 lyxpipe.out
5033 \end_layout
5034
5035 \end_inset
5036
5037 .
5038  The stem of the pipe names can be defined in the 
5039 \begin_inset Flex MenuItem
5040 status collapsed
5041
5042 \begin_layout Plain Layout
5043 Tools\SpecialChar \menuseparator
5044 Preferences
5045 \end_layout
5046
5047 \end_inset
5048
5049  dialog, for example 
5050 \begin_inset Flex Code
5051 status collapsed
5052
5053 \begin_layout Plain Layout
5054 "/home/myhome/lyxpipe"
5055 \end_layout
5056
5057 \end_inset
5058
5059 , or 
5060 \begin_inset Flex Code
5061 status collapsed
5062
5063 \begin_layout Plain Layout
5064 "
5065 \backslash
5066
5067 \backslash
5068 .
5069 \backslash
5070 pipe
5071 \backslash
5072 lyxpipe"
5073 \end_layout
5074
5075 \end_inset
5076
5077  on Windows.
5078  You 
5079 \emph on
5080 must
5081 \emph default
5082  configure this manually in order for the server to start.
5083 \end_layout
5084
5085 \begin_layout Standard
5086 LyX will add the '
5087 \begin_inset Flex Code
5088 status collapsed
5089
5090 \begin_layout Plain Layout
5091 .in
5092 \end_layout
5093
5094 \end_inset
5095
5096 ' and '
5097 \begin_inset Flex Code
5098 status collapsed
5099
5100 \begin_layout Plain Layout
5101 .out
5102 \end_layout
5103
5104 \end_inset
5105
5106 ' to create the pipes.
5107  If one of the pipes already exists, LyX will assume that another LyX process
5108  is already running and will not start the server.
5109  On POSIX (Unix like) systems, if for some other reason, an unused 
5110 \begin_inset Quotes eld
5111 \end_inset
5112
5113 stale
5114 \begin_inset Quotes erd
5115 \end_inset
5116
5117  pipe is left in existence when LyX closes, then LyX will try to delete
5118  it.
5119  If this fails for some reason, you will need to delete the pipes manually
5120  and then restart LyX.
5121  On Windows, pipes are deleted by the OS on program termination or crash,
5122  so 
5123 \begin_inset Quotes eld
5124 \end_inset
5125
5126 stale
5127 \begin_inset Quotes erd
5128 \end_inset
5129
5130  pipes should not be possible.
5131 \end_layout
5132
5133 \begin_layout Standard
5134 To have several LyX processes with servers at the same time, you have to
5135  use different configurations, perhaps by using separate user directories,
5136  each with its own 
5137 \begin_inset Flex Code
5138 status collapsed
5139
5140 \begin_layout Plain Layout
5141 preferences
5142 \end_layout
5143
5144 \end_inset
5145
5146  file, for each process.
5147 \end_layout
5148
5149 \begin_layout Standard
5150 If you are developing a client program, you might find it useful to enable
5151  debugging information from the LyX server.
5152  Do this by starting LyX as 
5153 \begin_inset Flex Code
5154 status collapsed
5155
5156 \begin_layout Plain Layout
5157 lyx -dbg lyxserver
5158 \end_layout
5159
5160 \end_inset
5161
5162 .
5163 \end_layout
5164
5165 \begin_layout Standard
5166 You can find a complete example client written in C in the source distribution
5167  as 
5168 \begin_inset Flex Code
5169 status collapsed
5170
5171 \begin_layout Plain Layout
5172 development/lyxserver/server_monitor.c
5173 \end_layout
5174
5175 \end_inset
5176
5177 .
5178 \end_layout
5179
5180 \begin_layout Standard
5181 Another useful tool is command-line based client you will find in 
5182 \begin_inset Flex Code
5183 status collapsed
5184
5185 \begin_layout Plain Layout
5186 src/client/lyxclient
5187 \end_layout
5188
5189 \end_inset
5190
5191 .
5192 \end_layout
5193
5194 \begin_layout Section
5195 Normal communication
5196 \end_layout
5197
5198 \begin_layout Standard
5199 To issue a LyX call, the client writes a line of ASCII text into the input
5200  pipe.
5201  This line has the following format:
5202 \end_layout
5203
5204 \begin_layout Quote
5205 LYXCMD:
5206 \emph on
5207 clientname
5208 \emph default
5209 :
5210 \emph on
5211 function
5212 \emph default
5213 :
5214 \emph on
5215 argument
5216 \end_layout
5217
5218 \begin_layout Description
5219 clientname is a name that the client can choose arbitrarily.
5220  Its only use is that LyX will echo it if it sends an answer—so a client
5221  can dispatch results from different requesters.
5222 \end_layout
5223
5224 \begin_layout Description
5225 function is the function you want LyX to perform.
5226  It is the same as the commands you'd use in the minibuffer.
5227 \end_layout
5228
5229 \begin_layout Description
5230 argument is an optional argument which is meaningful only to some functions
5231  (for instance, the 
5232 \begin_inset Quotes eld
5233 \end_inset
5234
5235 self-insert
5236 \begin_inset Quotes erd
5237 \end_inset
5238
5239  LFUN will insert the argument as text at the cursor position).
5240 \end_layout
5241
5242 \begin_layout Standard
5243 The answer from LyX will arrive in the output pipe and be of the form
5244 \end_layout
5245
5246 \begin_layout Quote
5247 INFO:
5248 \emph on
5249 clientname
5250 \emph default
5251 :
5252 \emph on
5253 function
5254 \emph default
5255 :
5256 \emph on
5257 data
5258 \end_layout
5259
5260 \begin_layout Standard
5261 where 
5262 \emph on
5263 clientname
5264 \emph default
5265  and 
5266 \emph on
5267 function
5268 \emph default
5269  are just echoed from the command request, while 
5270 \emph on
5271 data
5272 \emph default
5273  is more or less useful information filled according to how the command
5274  execution worked out.
5275  Some commands, such as 
5276 \begin_inset Quotes eld
5277 \end_inset
5278
5279 font-state
5280 \begin_inset Quotes erd
5281 \end_inset
5282
5283 , will return information about the internal state of LyX, while other will
5284  return an empty data-response.
5285  This means that the command execution went fine.
5286 \end_layout
5287
5288 \begin_layout Standard
5289 In case of errors, the response from LyX will have this form
5290 \end_layout
5291
5292 \begin_layout Quote
5293 ERROR:
5294 \emph on
5295 clientname
5296 \emph default
5297 :
5298 \emph on
5299 function
5300 \emph default
5301 :
5302 \emph on
5303 error message
5304 \end_layout
5305
5306 \begin_layout Standard
5307 where the 
5308 \emph on
5309 error message
5310 \emph default
5311  should contain an explanation of why the command failed.
5312 \end_layout
5313
5314 \begin_layout Standard
5315 Examples:
5316 \end_layout
5317
5318 \begin_layout LyX-Code
5319 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5320 \begin_inset Newline newline
5321 \end_inset
5322
5323 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5324 \begin_inset Newline newline
5325 \end_inset
5326
5327 read a <~/.lyxpipe.out
5328 \begin_inset Newline newline
5329 \end_inset
5330
5331 echo $a
5332 \end_layout
5333
5334 \begin_layout Section
5335 Notification
5336 \end_layout
5337
5338 \begin_layout Standard
5339 LyX can notify clients of events going on asynchronously.
5340  Currently it will only do this if the user binds a key sequence with the
5341  function 
5342 \begin_inset Quotes eld
5343 \end_inset
5344
5345 notify
5346 \begin_inset Quotes erd
5347 \end_inset
5348
5349 .
5350  The format of the string LyX sends is as follows:
5351 \end_layout
5352
5353 \begin_layout Quote
5354 \begin_inset Flex Code
5355 status collapsed
5356
5357 \begin_layout Plain Layout
5358 NOTIFY:
5359 \end_layout
5360
5361 \end_inset
5362
5363
5364 \emph on
5365 key-sequence
5366 \end_layout
5367
5368 \begin_layout Standard
5369 where 
5370 \emph on
5371 key-sequence
5372 \emph default
5373  is the printed representation of the key sequence that was actually typed
5374  by the user.
5375 \end_layout
5376
5377 \begin_layout Standard
5378 This mechanism can be used to extend LyX's command set and implement macros.
5379  Bind some key sequence to 
5380 \begin_inset Quotes eld
5381 \end_inset
5382
5383 notify
5384 \begin_inset Quotes erd
5385 \end_inset
5386
5387 .
5388  Then start a client that listens on the output pipe, dispatches the command
5389  according to the sequence, and starts a function that may use LyX calls
5390  and LyX requests to issue a command or a series of commands to LyX.
5391 \end_layout
5392
5393 \begin_layout Section
5394 The simple LyX Server Protocol
5395 \end_layout
5396
5397 \begin_layout Standard
5398 LyX implements a simple protocol that can be used for session management.
5399  All messages are of the form
5400 \end_layout
5401
5402 \begin_layout Quote
5403 LYXSRV:
5404 \emph on
5405 clientname
5406 \emph default
5407 :
5408 \emph on
5409 protocol message
5410 \end_layout
5411
5412 \begin_layout Standard
5413 where 
5414 \emph on
5415 protocol message
5416 \emph default
5417  can be 
5418 \begin_inset Quotes eld
5419 \end_inset
5420
5421 hello
5422 \begin_inset Quotes erd
5423 \end_inset
5424
5425  or 
5426 \begin_inset Quotes eld
5427 \end_inset
5428
5429 bye
5430 \begin_inset Quotes erd
5431 \end_inset
5432
5433 .
5434  If 
5435 \begin_inset Quotes eld
5436 \end_inset
5437
5438 hello
5439 \begin_inset Quotes erd
5440 \end_inset
5441
5442  is received from a client, LyX will report back to inform the client that
5443  it's listening to it's messages, while 
5444 \begin_inset Quotes eld
5445 \end_inset
5446
5447 bye
5448 \begin_inset Quotes erd
5449 \end_inset
5450
5451  sent from LyX will inform clients that LyX is closing.
5452 \end_layout
5453
5454 \begin_layout Section
5455 Reverse DVI/PDF search
5456 \end_layout
5457
5458 \begin_layout Standard
5459 Some DVI/PDF viewers
5460 \begin_inset Foot
5461 status collapsed
5462
5463 \begin_layout Plain Layout
5464 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5465  Skim on Mac OSX and SumatraPDF on Windows.
5466 \end_layout
5467
5468 \end_inset
5469
5470  provide 
5471 \emph on
5472 reverse search
5473 \emph default
5474  facility (also called 
5475 \emph on
5476 inverse search
5477 \emph default
5478 ).
5479  This means that you can tell LyX to put the cursor to a specific line in
5480  the document by clicking at the respective position in the DVI/PDF output.
5481  To achieve this, the viewer must be able to communicate with LyX.
5482  This is done via the LyX server either by using the named pipe (
5483 \emph on
5484 lyxpipe
5485 \emph default
5486 ), or the UNIX domain socket (
5487 \emph on
5488 lyxsocket
5489 \emph default
5490 ) that LyX creates in its temporary directory (this is the way the 
5491 \begin_inset Flex Code
5492 status collapsed
5493
5494 \begin_layout Plain Layout
5495 lyxclient
5496 \end_layout
5497
5498 \end_inset
5499
5500  program communicates with LyX).
5501  In some cases, you need a helper script that mediates between the viewer
5502  and LyX, in others, the viewer can communicate with LyX directly.
5503  This depends on the selected viewer and on your operating system.
5504  The same applies to the way viewers need to be configured and the way the
5505  reverse search is actually performed.
5506  In what follows, we will thus describe how to setup reverse search for
5507  specific viewers.
5508  Before we turn to this, though, we will explain what needs to be done generally
5509  to enable reverse search in the DVI/PDF output.
5510 \end_layout
5511
5512 \begin_layout Subsection
5513
5514 \change_inserted 2 1274788899
5515 \begin_inset CommandInset label
5516 LatexCommand label
5517 name "sub:rev-search"
5518
5519 \end_inset
5520
5521 Automatical enabling
5522 \end_layout
5523
5524 \begin_layout Standard
5525
5526 \change_inserted 2 1274789582
5527 In most cases LyX will do the work for you by enabling 
5528 \begin_inset Flex MenuItem
5529 status collapsed
5530
5531 \begin_layout Plain Layout
5532
5533 \change_inserted 2 1274789026
5534 Document\SpecialChar \menuseparator
5535 Output\SpecialChar \menuseparator
5536 Output Sync
5537 \end_layout
5538
5539 \end_inset
5540
5541 .
5542  In such a case LyX will automatically insert SyncTeX macro (for PDF) or
5543  srcltx package (for DVI) respectively.
5544  This option can be easily reached also on 
5545 \begin_inset Flex Code
5546 status collapsed
5547
5548 \begin_layout Plain Layout
5549
5550 \change_inserted 2 1274789582
5551 View/update
5552 \change_unchanged
5553
5554 \end_layout
5555
5556 \end_inset
5557
5558  Toolbar.
5559 \end_layout
5560
5561 \begin_layout Standard
5562
5563 \change_inserted 2 1274789534
5564 Plase note that including 
5565 \begin_inset Flex Code
5566 status collapsed
5567
5568 \begin_layout Plain Layout
5569
5570 \change_inserted 2 1274789498
5571 srcltx
5572 \change_unchanged
5573
5574 \end_layout
5575
5576 \end_inset
5577
5578  package or 
5579 \begin_inset Flex Code
5580 status collapsed
5581
5582 \begin_layout Plain Layout
5583
5584 \change_inserted 2 1274789484
5585 src-specials
5586 \change_unchanged
5587
5588 \end_layout
5589
5590 \end_inset
5591
5592  sometimes have an impact on the typeset and you should switch them off
5593  for the final typesets.
5594 \change_unchanged
5595
5596 \end_layout
5597
5598 \begin_layout Standard
5599
5600 \change_inserted 2 1274789340
5601 You can also define custom macro in preferences and in case you need some
5602  special tweaks read the next section about manual enabling.
5603  
5604 \change_unchanged
5605
5606 \end_layout
5607
5608 \begin_layout Subsection
5609
5610 \change_inserted 2 1274788680
5611 Manual enabling
5612 \change_unchanged
5613
5614 \end_layout
5615
5616 \begin_layout Standard
5617 LaTeX provides several different methods for reverse search.
5618  Some are built-in in the 
5619 \begin_inset Flex Code
5620 status collapsed
5621
5622 \begin_layout Plain Layout
5623 latex/pdflatex
5624 \end_layout
5625
5626 \end_inset
5627
5628  program, some are provided by external packages.
5629  Your choice depends on whether your LaTeX distribution already provides
5630  a given method (the built-in methods are rather new) and whether your viewer
5631  can cope with it.
5632  The available methods are described in the following.
5633 \change_inserted 2 1274788557
5634
5635 \end_layout
5636
5637 \begin_layout Subsubsection*
5638 Built-in DVI-search via src-specials (DVI only) 
5639 \end_layout
5640
5641 \begin_layout Standard
5642 This method provides the DVI file with the necessary information for reverse
5643  search.
5644  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5645  distribution should include it), and it works reliably.
5646  To enable it, change the 
5647 \begin_inset Flex MenuItem
5648 status collapsed
5649
5650 \begin_layout Plain Layout
5651 LaT
5652 \begin_inset ERT
5653 status collapsed
5654
5655 \begin_layout Plain Layout
5656
5657 {}
5658 \end_layout
5659
5660 \end_inset
5661
5662 eX (plain)->DVI
5663 \end_layout
5664
5665 \end_inset
5666
5667  or 
5668 \begin_inset Flex MenuItem
5669 status collapsed
5670
5671 \begin_layout Plain Layout
5672 LaT
5673 \begin_inset ERT
5674 status collapsed
5675
5676 \begin_layout Plain Layout
5677
5678 {}
5679 \end_layout
5680
5681 \end_inset
5682
5683 eX (plain)->DraftDVI
5684 \end_layout
5685
5686 \end_inset
5687
5688  converter in 
5689 \begin_inset Flex MenuItem
5690 status collapsed
5691
5692 \begin_layout Plain Layout
5693 Preferences\SpecialChar \menuseparator
5694 File Handling\SpecialChar \menuseparator
5695 Converters
5696 \end_layout
5697
5698 \end_inset
5699
5700  to 
5701 \begin_inset Flex Code
5702 status collapsed
5703
5704 \begin_layout Plain Layout
5705 latex -src-specials $$i
5706 \end_layout
5707
5708 \end_inset
5709
5710 .
5711  If this doesn't work, check if your TeX engine needs different options
5712  (the syntax might differ in some distributions).
5713 \end_layout
5714
5715 \begin_layout Subsubsection*
5716 External Packages (PDFSync and scrltx) 
5717 \end_layout
5718
5719 \begin_layout Standard
5720 The packages 
5721 \emph on
5722 pdfsync
5723 \emph default
5724  and 
5725 \emph on
5726 scrltx
5727 \emph default
5728  provide reverse search facility for PDF output (via pdflatex) and DVI output,
5729  respectively.
5730  In order to enable it, load the packages in the LyX preamble: 
5731 \end_layout
5732
5733 \begin_layout Itemize
5734 \begin_inset Flex Code
5735 status collapsed
5736
5737 \begin_layout Plain Layout
5738
5739 \backslash
5740 usepackage{pdfsync}
5741 \end_layout
5742
5743 \end_inset
5744
5745  for reverse PDF search,
5746 \end_layout
5747
5748 \begin_layout Itemize
5749  
5750 \begin_inset Flex Code
5751 status collapsed
5752
5753 \begin_layout Plain Layout
5754
5755 \backslash
5756 usepackage[active]{srcltx}
5757 \end_layout
5758
5759 \end_inset
5760
5761  for reverse DVI search.
5762 \end_layout
5763
5764 \begin_layout Standard
5765 If you want to be able to perform both DVI and PDF reverse searches, you
5766  can also insert in the preamble the following lines
5767 \end_layout
5768
5769 \begin_layout LyX-Code
5770
5771 \backslash
5772 usepackage{ifpdf}
5773 \begin_inset Newline newline
5774 \end_inset
5775
5776
5777 \backslash
5778 ifpdf
5779 \begin_inset Newline newline
5780 \end_inset
5781
5782   
5783 \backslash
5784 usepackage{pdfsync}
5785 \begin_inset Newline newline
5786 \end_inset
5787
5788
5789 \backslash
5790 else
5791 \begin_inset Newline newline
5792 \end_inset
5793
5794   
5795 \backslash
5796 usepackage[active]{srcltx}
5797 \begin_inset Newline newline
5798 \end_inset
5799
5800
5801 \backslash
5802 fi
5803 \end_layout
5804
5805 \begin_layout Standard
5806 This way, you can preview the file as either DVI or PDF (pdflatex) and the
5807  right package will be used.
5808 \end_layout
5809
5810 \begin_layout Standard
5811 Note that PDFSync might affect the output layout of your document.
5812  It is therefore advised to disable PDFsync for final documents.
5813 \end_layout
5814
5815 \begin_layout Subsubsection*
5816 Built-in reverse search via SyncTeX (DVI and PDF) 
5817 \end_layout
5818
5819 \begin_layout Standard
5820 Recent versions of 
5821 \begin_inset Flex Code
5822 status collapsed
5823
5824 \begin_layout Plain Layout
5825 (pdf)latex
5826 \end_layout
5827
5828 \end_inset
5829
5830  have built-in support for both PDF and DVI reverse search.
5831  This so-called 
5832 \emph on
5833 SyncTeX
5834 \emph default
5835  facility is basically the result of the integration of the PDFSync package
5836  to the pdftex program and its merge with the 
5837 \emph on
5838 scr-specials
5839 \emph default
5840  approach.
5841  You need at least TeXLive 2008 or a recent MikTeX distribution in order
5842  to use it.
5843  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
5844  already provide SyncTeX support.
5845 \end_layout
5846
5847 \begin_layout Standard
5848 To enable SyncTeX for DVI output, change the 
5849 \begin_inset Flex MenuItem
5850 status collapsed
5851
5852 \begin_layout Plain Layout
5853 LaT
5854 \begin_inset ERT
5855 status collapsed
5856
5857 \begin_layout Plain Layout
5858
5859 {}
5860 \end_layout
5861
5862 \end_inset
5863
5864 eX (plain) -> DVI
5865 \end_layout
5866
5867 \end_inset
5868
5869  or 
5870 \begin_inset Flex MenuItem
5871 status collapsed
5872
5873 \begin_layout Plain Layout
5874 LaT
5875 \begin_inset ERT
5876 status collapsed
5877
5878 \begin_layout Plain Layout
5879
5880 {}
5881 \end_layout
5882
5883 \end_inset
5884
5885 eX (plain) -> DraftDVI
5886 \end_layout
5887
5888 \end_inset
5889
5890  converter in 
5891 \begin_inset Flex MenuItem
5892 status collapsed
5893
5894 \begin_layout Plain Layout
5895 Preferences\SpecialChar \menuseparator
5896 File Handling\SpecialChar \menuseparator
5897 Converters
5898 \end_layout
5899
5900 \end_inset
5901
5902  to 
5903 \begin_inset Flex Code
5904 status collapsed
5905
5906 \begin_layout Plain Layout
5907 latex -synctex=1 $$i
5908 \end_layout
5909
5910 \end_inset
5911
5912 , and for PDF output, change the 
5913 \begin_inset Flex MenuItem
5914 status collapsed
5915
5916 \begin_layout Plain Layout
5917 LaT
5918 \begin_inset ERT
5919 status collapsed
5920
5921 \begin_layout Plain Layout
5922
5923 {}
5924 \end_layout
5925
5926 \end_inset
5927
5928 eX (pdflatex) -> PDF (pdflatex)
5929 \end_layout
5930
5931 \end_inset
5932
5933  or converter to 
5934 \begin_inset Flex Code
5935 status collapsed
5936
5937 \begin_layout Plain Layout
5938 pdflatex -synctex=1 $$i
5939 \end_layout
5940
5941 \end_inset
5942
5943 .
5944  Check the documentation of your viewer whether the viewer needs to be configure
5945 d for the use with SyncTeX.
5946 \begin_inset Foot
5947 status collapsed
5948
5949 \begin_layout Plain Layout
5950 The 
5951 \begin_inset Flex Code
5952 status collapsed
5953
5954 \begin_layout Plain Layout
5955 -synctex=1
5956 \end_layout
5957
5958 \end_inset
5959
5960  option enables gzip compression.
5961  If your viewer does not support it, you should instead use 
5962 \begin_inset Flex Code
5963 status collapsed
5964
5965 \begin_layout Plain Layout
5966 -synctex=-1
5967 \end_layout
5968
5969 \end_inset
5970
5971 .
5972 \end_layout
5973
5974 \end_inset
5975
5976
5977 \end_layout
5978
5979 \begin_layout Subsection
5980 Configuring and using specific viewers
5981 \end_layout
5982
5983 \begin_layout Subsubsection*
5984 Xdvi (all platforms)
5985 \end_layout
5986
5987 \begin_layout Standard
5988 If you use 
5989 \begin_inset Flex Code
5990 status collapsed
5991
5992 \begin_layout Plain Layout
5993 xdvi
5994 \end_layout
5995
5996 \end_inset
5997
5998 , you don't need to do anything else for performing a reverse DVI search,
5999  as LyX already provides the necessary hooks for automatically using the
6000  
6001 \begin_inset Flex Code
6002 status collapsed
6003
6004 \begin_layout Plain Layout
6005 lyxclient
6006 \end_layout
6007
6008 \end_inset
6009
6010  program.
6011  Just setup your document as described above (reverse search is triggered
6012  by Ctrl-click or Alt-click on Mac OSX, respectively).
6013 \end_layout
6014
6015 \begin_layout Standard
6016 However, if for whatever reason you want to use the named pipe instead of
6017  the socket for communicating with LyX, simply change the DVI viewer in
6018  
6019 \begin_inset Flex MenuItem
6020 status collapsed
6021
6022 \begin_layout Plain Layout
6023 Preferences\SpecialChar \menuseparator
6024 File Handling\SpecialChar \menuseparator
6025 File formats
6026 \end_layout
6027
6028 \end_inset
6029
6030  to
6031 \begin_inset Foot
6032 status collapsed
6033
6034 \begin_layout Plain Layout
6035 On Mac OSX you have to use 
6036 \begin_inset Flex Code
6037 status collapsed
6038
6039 \begin_layout Plain Layout
6040 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6041 \end_layout
6042
6043 \end_inset
6044
6045
6046 \end_layout
6047
6048 \end_inset
6049
6050  
6051 \begin_inset Flex Code
6052 status collapsed
6053
6054 \begin_layout Plain Layout
6055 xdvi -editor 'lyxeditor.sh %f %l'
6056 \end_layout
6057
6058 \end_inset
6059
6060 , where 
6061 \begin_inset Flex Code
6062 status collapsed
6063
6064 \begin_layout Plain Layout
6065 lyxeditor.sh
6066 \end_layout
6067
6068 \end_inset
6069
6070  is a suitable script.
6071  For example, a minimal shell script is the following one:
6072 \end_layout
6073
6074 \begin_layout LyX-Code
6075 #!/bin/sh
6076 \begin_inset Newline newline
6077 \end_inset
6078
6079 LYXPIPE="/path/to/lyxpipe"
6080 \begin_inset Newline newline
6081 \end_inset
6082
6083 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6084 \begin_inset Newline newline
6085 \end_inset
6086
6087 echo "$COMMAND" > "${LYXPIPE}".in || exit
6088 \begin_inset Newline newline
6089 \end_inset
6090
6091 read < "${LYXPIPE}".out || exit
6092 \end_layout
6093
6094 \begin_layout Standard
6095 where 
6096 \begin_inset Flex Code
6097 status collapsed
6098
6099 \begin_layout Plain Layout
6100 /path/to/lyxpipe
6101 \end_layout
6102
6103 \end_inset
6104
6105  is the Ly
6106 \begin_inset ERT
6107 status collapsed
6108
6109 \begin_layout Plain Layout
6110
6111 {}
6112 \end_layout
6113
6114 \end_inset
6115
6116 XServer pipe path specified in 
6117 \begin_inset Flex MenuItem
6118 status collapsed
6119
6120 \begin_layout Plain Layout
6121 Preferences\SpecialChar \menuseparator
6122 Paths
6123 \end_layout
6124
6125 \end_inset
6126
6127 .
6128 \begin_inset Foot
6129 status collapsed
6130
6131 \begin_layout Plain Layout
6132 In the 
6133 \begin_inset Flex Code
6134 status collapsed
6135
6136 \begin_layout Plain Layout
6137 development/tools
6138 \end_layout
6139
6140 \end_inset
6141
6142  folder of a source distribution you can find a 
6143 \begin_inset Flex Code
6144 status collapsed
6145
6146 \begin_layout Plain Layout
6147 lyxeditor
6148 \end_layout
6149
6150 \end_inset
6151
6152  script which is able to locate the 
6153 \emph on
6154 lyxpipe
6155 \emph default
6156  based on your preferences.
6157 \end_layout
6158
6159 \end_inset
6160
6161
6162 \end_layout
6163
6164 \begin_layout Subsubsection*
6165 MacDviX (Mac OSX)
6166 \end_layout
6167
6168 \begin_layout Standard
6169 At the end of 
6170 \begin_inset Flex Code
6171 status collapsed
6172
6173 \begin_layout Plain Layout
6174 /Applications/MacDviX_Folder/calleditor.script
6175 \end_layout
6176
6177 \end_inset
6178
6179 , add the following lines:
6180 \end_layout
6181
6182 \begin_layout LyX-Code
6183 /Applications/Ly
6184 \begin_inset ERT
6185 status collapsed
6186
6187 \begin_layout Plain Layout
6188
6189 {}
6190 \end_layout
6191
6192 \end_inset
6193
6194 X.app/Contents/MacOS/lyxeditor "$2" $1
6195 \begin_inset Newline newline
6196 \end_inset
6197
6198 exit 1
6199 \end_layout
6200
6201 \begin_layout Standard
6202 Modify the lines accordingly if you install LyX somewhere else than in the
6203  Applications folder.
6204 \end_layout
6205
6206 \begin_layout Standard
6207 Reverse search is triggered by Alt-click (OPTION-click).
6208 \end_layout
6209
6210 \begin_layout Subsubsection*
6211 Skim (Mac OSX)
6212 \end_layout
6213
6214 \begin_layout Standard
6215 Enter 
6216 \begin_inset Flex Code
6217 status collapsed
6218
6219 \begin_layout Plain Layout
6220 open -a Skim.app $$i
6221 \end_layout
6222
6223 \end_inset
6224
6225  to the viewer setting in 
6226 \begin_inset Flex MenuItem
6227 status collapsed
6228
6229 \begin_layout Plain Layout
6230 Preferences\SpecialChar \menuseparator
6231 File Handling\SpecialChar \menuseparator
6232 File formats\SpecialChar \menuseparator
6233 PDF (pdflatex)
6234 \end_layout
6235
6236 \end_inset
6237
6238 , and then in 
6239 \begin_inset Flex MenuItem
6240 status collapsed
6241
6242 \begin_layout Plain Layout
6243 Skim\SpecialChar \menuseparator
6244 Preferences\SpecialChar \menuseparator
6245 Sync
6246 \end_layout
6247
6248 \end_inset
6249
6250  select Ly
6251 \begin_inset ERT
6252 status collapsed
6253
6254 \begin_layout Plain Layout
6255
6256 {}
6257 \end_layout
6258
6259 \end_inset
6260
6261 X.
6262 \end_layout
6263
6264 \begin_layout Standard
6265 Reverse search is triggered by COMMAND-SHIFT-click
6266 \end_layout
6267
6268 \begin_layout Subsubsection*
6269 Okular (KDE)
6270 \end_layout
6271
6272 \begin_layout Standard
6273 Go to 
6274 \begin_inset Flex MenuItem
6275 status collapsed
6276
6277 \begin_layout Plain Layout
6278 Settings\SpecialChar \menuseparator
6279 Configure Okular\SpecialChar \ldots{}
6280 \SpecialChar \menuseparator
6281 Editor
6282 \end_layout
6283
6284 \end_inset
6285
6286 , select 
6287 \begin_inset Quotes eld
6288 \end_inset
6289
6290 Custom Text Editor
6291 \begin_inset Quotes erd
6292 \end_inset
6293
6294  and add the command 
6295 \begin_inset Flex Code
6296 status collapsed
6297
6298 \begin_layout Plain Layout
6299 lyxclient -g %f %l
6300 \end_layout
6301
6302 \end_inset
6303
6304 .
6305 \end_layout
6306
6307 \begin_layout Standard
6308 Reverse search is triggered by SHIFT-click.
6309 \end_layout
6310
6311 \begin_layout Subsubsection*
6312 YAP (Windows)
6313 \end_layout
6314
6315 \begin_layout Standard
6316 Launch yap, choose its 
6317 \begin_inset Flex MenuItem
6318 status collapsed
6319
6320 \begin_layout Plain Layout
6321 View\SpecialChar \menuseparator
6322 Options
6323 \end_layout
6324
6325 \end_inset
6326
6327  menu and select the 
6328 \begin_inset Quotes eld
6329 \end_inset
6330
6331 Inverse DVI Search
6332 \begin_inset Quotes erd
6333 \end_inset
6334
6335  tab.
6336  Click on the 
6337 \begin_inset Quotes eld
6338 \end_inset
6339
6340 New\SpecialChar \ldots{}
6341
6342 \begin_inset Quotes erd
6343 \end_inset
6344
6345  button and, in the window that opens, enter 
6346 \begin_inset Quotes eld
6347 \end_inset
6348
6349 LyX Editor
6350 \begin_inset Quotes erd
6351 \end_inset
6352
6353  (or any other name you like) in the 
6354 \begin_inset Quotes eld
6355 \end_inset
6356
6357 Name:
6358 \begin_inset Quotes erd
6359 \end_inset
6360
6361  field.
6362  Now click on the button labeled 
6363 \begin_inset Quotes eld
6364 \end_inset
6365
6366 \SpecialChar \ldots{}
6367
6368 \begin_inset Quotes erd
6369 \end_inset
6370
6371  to open a file dialog and navigate to the directory containing the batch
6372  file 
6373 \begin_inset Flex Code
6374 status collapsed
6375
6376 \begin_layout Plain Layout
6377 lyxeditor.bat
6378 \end_layout
6379
6380 \end_inset
6381
6382  (see below).
6383  Select 
6384 \begin_inset Flex Code
6385 status collapsed
6386
6387 \begin_layout Plain Layout
6388 lyxeditor.bat
6389 \end_layout
6390
6391 \end_inset
6392
6393  and then specify the program arguments as 
6394 \begin_inset Flex Code
6395 status collapsed
6396
6397 \begin_layout Plain Layout
6398 %f %l
6399 \end_layout
6400
6401 \end_inset
6402
6403 .
6404  The 
6405 \begin_inset Flex Code
6406 status collapsed
6407
6408 \begin_layout Plain Layout
6409 lyxeditor.bat
6410 \end_layout
6411
6412 \end_inset
6413
6414  wrapper is used for communicating with LyX through the 
6415 \emph on
6416 lyxpipe
6417 \emph default
6418  and is as follows:
6419 \end_layout
6420
6421 \begin_layout LyX-Code
6422 @echo off
6423 \begin_inset Newline newline
6424 \end_inset
6425
6426 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6427 \backslash
6428
6429 \backslash
6430 .
6431 \backslash
6432 pipe
6433 \backslash
6434 lyxpipe.in
6435 \begin_inset Newline newline
6436 \end_inset
6437
6438 type 
6439 \backslash
6440
6441 \backslash
6442 .
6443 \backslash
6444 pipe
6445 \backslash
6446 lyxpipe.out
6447 \end_layout
6448
6449 \begin_layout Standard
6450 Make sure that the LyXServer pipe path you specified in LyX is 
6451 \begin_inset Flex Code
6452 status collapsed
6453
6454 \begin_layout Plain Layout
6455
6456 \backslash
6457
6458 \backslash
6459 .
6460 \backslash
6461 pipe
6462 \backslash
6463 lyxpipe
6464 \end_layout
6465
6466 \end_inset
6467
6468 , otherwise change the 
6469 \begin_inset Flex Code
6470 status collapsed
6471
6472 \begin_layout Plain Layout
6473 lyxeditor.bat
6474 \end_layout
6475
6476 \end_inset
6477
6478  wrapper accordingly.
6479 \end_layout
6480
6481 \begin_layout Standard
6482 In yap, reverse search is triggered by double-click.
6483 \end_layout
6484
6485 \begin_layout Subsubsection*
6486 SumatraPDF (Windows)
6487 \end_layout
6488
6489 \begin_layout Standard
6490 In order to use SumatraPDF for inverse search, enter 
6491 \begin_inset Flex Code
6492 status collapsed
6493
6494 \begin_layout Plain Layout
6495 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6496 \end_layout
6497
6498 \end_inset
6499
6500  in the viewer setting in 
6501 \begin_inset Flex MenuItem
6502 status collapsed
6503
6504 \begin_layout Plain Layout
6505 Preferences\SpecialChar \menuseparator
6506 File Handling\SpecialChar \menuseparator
6507 File formats\SpecialChar \menuseparator
6508 PDF (pdflatex)
6509 \end_layout
6510
6511 \end_inset
6512
6513 , where 
6514 \begin_inset Flex Code
6515 status collapsed
6516
6517 \begin_layout Plain Layout
6518 lyxeditor.bat
6519 \end_layout
6520
6521 \end_inset
6522
6523  is the previous wrapper.
6524  If SumatraPDF.exe is not in your command PATH, use its full file name.
6525 \end_layout
6526
6527 \begin_layout Standard
6528 Reverse search is triggered by double-click.
6529 \end_layout
6530
6531 \begin_layout Subsubsection*
6532 YAP (Cygwin)
6533 \end_layout
6534
6535 \begin_layout Standard
6536 First of all, make sure that yap is your default DVI viewer in the Windows
6537  environment, then launch it, choose its 
6538 \begin_inset Flex MenuItem
6539 status collapsed
6540
6541 \begin_layout Plain Layout
6542 View\SpecialChar \menuseparator
6543 Options
6544 \end_layout
6545
6546 \end_inset
6547
6548  menu and select the 
6549 \begin_inset Quotes eld
6550 \end_inset
6551
6552 Inverse DVI Search
6553 \begin_inset Quotes erd
6554 \end_inset
6555
6556  tab.
6557  Click on the 
6558 \begin_inset Quotes eld
6559 \end_inset
6560
6561 New\SpecialChar \ldots{}
6562
6563 \begin_inset Quotes erd
6564 \end_inset
6565
6566  button and, in the window that opens, enter 
6567 \begin_inset Quotes eld
6568 \end_inset
6569
6570 LyX Editor
6571 \begin_inset Quotes erd
6572 \end_inset
6573
6574  (or any other name you like) in the 
6575 \begin_inset Quotes eld
6576 \end_inset
6577
6578 Name:
6579 \begin_inset Quotes erd
6580 \end_inset
6581
6582  field.
6583  Now click on the button labeled 
6584 \begin_inset Quotes eld
6585 \end_inset
6586
6587 \SpecialChar \ldots{}
6588
6589 \begin_inset Quotes erd
6590 \end_inset
6591
6592  to open a file dialog and navigate to the directory containing the 
6593 \begin_inset Flex Code
6594 status collapsed
6595
6596 \begin_layout Plain Layout
6597 lyxeditor.exe
6598 \end_layout
6599
6600 \end_inset
6601
6602  program (which is installed by default on Cygwin along with the LyX executable).
6603  Select 
6604 \begin_inset Flex Code
6605 status collapsed
6606
6607 \begin_layout Plain Layout
6608 lyxeditor.exe
6609 \end_layout
6610
6611 \end_inset
6612
6613  and then specify the program arguments as 
6614 \begin_inset Flex Code
6615 status collapsed
6616
6617 \begin_layout Plain Layout
6618 -g %f %l
6619 \end_layout
6620
6621 \end_inset
6622
6623 .
6624  In this way, you will be using the 
6625 \emph on
6626 lyxsocket
6627 \emph default
6628  for communicating with LyX.
6629  If, for whatever reason, you want to use the 
6630 \emph on
6631 lyxpipe
6632 \emph default
6633 , omit the 
6634 \begin_inset Flex Code
6635 status collapsed
6636
6637 \begin_layout Plain Layout
6638 -g
6639 \end_layout
6640
6641 \end_inset
6642
6643  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6644 \end_layout
6645
6646 \begin_layout Standard
6647 In yap, reverse search is triggered by double-click.
6648 \end_layout
6649
6650 \begin_layout Subsubsection*
6651 SumatraPDF (Cygwin)
6652 \end_layout
6653
6654 \begin_layout Standard
6655 In order to use SumatraPDF for inverse search, enter 
6656 \begin_inset Flex Code
6657 status collapsed
6658
6659 \begin_layout Plain Layout
6660 SumatraPDF.sh
6661 \end_layout
6662
6663 \end_inset
6664
6665  in the viewer setting in 
6666 \begin_inset Flex MenuItem
6667 status collapsed
6668
6669 \begin_layout Plain Layout
6670 Preferences\SpecialChar \menuseparator
6671 File Handling\SpecialChar \menuseparator
6672 File formats\SpecialChar \menuseparator
6673 PDF (pdflatex)
6674 \end_layout
6675
6676 \end_inset
6677
6678 , where 
6679 \begin_inset Flex Code
6680 status collapsed
6681
6682 \begin_layout Plain Layout
6683 SumatraPDF.sh
6684 \end_layout
6685
6686 \end_inset
6687
6688  is the following script (to be placed in your command PATH, 
6689 \begin_inset Flex Code
6690 status collapsed
6691
6692 \begin_layout Plain Layout
6693 /usr/local/bin
6694 \end_layout
6695
6696 \end_inset
6697
6698  being the best choice):
6699 \end_layout
6700
6701 \begin_layout LyX-Code
6702 #!/bin/bash
6703 \begin_inset Newline newline
6704 \end_inset
6705
6706 cd $(dirname $1)
6707 \begin_inset Newline newline
6708 \end_inset
6709
6710 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6711 \end_layout
6712
6713 \begin_layout Standard
6714 This wrapper script is needed because SumatraPDF is a native Windows application
6715  and does not understand the posix paths used by the Cygwin version of LyX.
6716  If SumatraPDF.exe is not in your command PATH, use its full posix path in
6717  the script above.
6718  The 
6719 \begin_inset Flex Code
6720 status collapsed
6721
6722 \begin_layout Plain Layout
6723 -g
6724 \end_layout
6725
6726 \end_inset
6727
6728  enables communication via the 
6729 \emph on
6730 lyxsocket
6731 \emph default
6732 .
6733  Again, omit the 
6734 \begin_inset Flex Code
6735 status collapsed
6736
6737 \begin_layout Plain Layout
6738 -g
6739 \end_layout
6740
6741 \end_inset
6742
6743  option if you want to use the 
6744 \emph on
6745 lyxpipe
6746 \emph default
6747 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6748 \end_layout
6749
6750 \begin_layout Standard
6751 Reverse search is triggered by double-click.
6752 \change_inserted 1 1271453423
6753
6754 \end_layout
6755
6756 \begin_layout Section
6757
6758 \change_inserted 1 1271453442
6759 Forward search
6760 \end_layout
6761
6762 \begin_layout Standard
6763
6764 \change_inserted 1 1271454338
6765 To make forward search possible you need to provide generated output PDF/DVI
6766  file with additional information about TeX sources.
6767  This can be done via the methods described in the section 
6768 \begin_inset CommandInset ref
6769 LatexCommand ref
6770 reference "sub:rev-search"
6771
6772 \end_inset
6773
6774 .
6775 \end_layout
6776
6777 \begin_layout Standard
6778
6779 \change_inserted 1 1271454479
6780 Secondly you need to configure LyX for using your viewers in 
6781 \begin_inset Flex MenuItem
6782 status collapsed
6783
6784 \begin_layout Plain Layout
6785
6786 \change_inserted 1 1271453866
6787 Preferences\SpecialChar \menuseparator
6788 Output\SpecialChar \menuseparator
6789 General
6790 \end_layout
6791
6792 \end_inset
6793
6794 .
6795  Only some of the viewers allows this operation --- yap, xdvi, okular, Sumatra
6796  PDF
6797 \begin_inset Foot
6798 status collapsed
6799
6800 \begin_layout Plain Layout
6801
6802 \change_inserted 1 1271454273
6803 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
6804 ip
6805 \change_unchanged
6806
6807 \end_layout
6808
6809 \end_inset
6810
6811 .
6812  Some other viewers allow at least reloading and positioning to particular
6813  page of the file --- Evince or xpdf --- for these cases you can use external
6814  call of synctex.
6815  Please study the prepared examples in the Preferences dialog.
6816 \change_unchanged
6817
6818 \end_layout
6819
6820 \begin_layout Chapter
6821 Special Document Classes
6822 \end_layout
6823
6824 \begin_layout Section
6825 A&A Paper
6826 \end_layout
6827
6828 \begin_layout Standard
6829 by 
6830 \noun on
6831 Peter Sütterlin
6832 \end_layout
6833
6834 \begin_layout Subsection
6835 Introduction
6836 \end_layout
6837
6838 \begin_layout Standard
6839 This section describes how LyX can be used to write articles for submission
6840  to the scientific journal 
6841 \emph on
6842 Astronomy and Astrophysics
6843 \emph default
6844  (www.edpsciences.fr/aa/ 
6845 \begin_inset Flex URL
6846 status collapsed
6847
6848 \begin_layout Plain Layout
6849
6850 http://www.edpsciences.fr/aa/
6851 \end_layout
6852
6853 \end_inset
6854
6855 ) using Version 5.01 of the document class 
6856 \family typewriter
6857 aa.cls
6858 \family default
6859 .
6860  This package can be downloaded from the ftp site
6861 \end_layout
6862
6863 \begin_layout Standard
6864 \begin_inset VSpace medskip
6865 \end_inset
6866
6867
6868 \end_layout
6869
6870 \begin_layout Standard
6871 \align center
6872 \begin_inset Flex URL
6873 status collapsed
6874
6875 \begin_layout Plain Layout
6876
6877 ftp://ftp.edpsciences.org/pub/aa/readme.html
6878 \end_layout
6879
6880 \end_inset
6881
6882
6883 \end_layout
6884
6885 \begin_layout Standard
6886 \begin_inset VSpace medskip
6887 \end_inset
6888
6889
6890 \end_layout
6891
6892 \begin_layout Standard
6893 A manual comes together with that package, and this text is not meant to
6894  replace the original manual but is merely a short guide in how to realize
6895  the correct form of your paper.
6896  
6897 \end_layout
6898
6899 \begin_layout Standard
6900 Please note that the publisher of the journal was changed from Springer
6901  to EDP Sciences starting January 1, 2001.
6902  That change involved also some slight changes to the style files, namely
6903  the removal of the thesaurus command.
6904  The LyX class aa supports the newest version of these style files, V 5.01.
6905  If you have an older version installed, please upgrade.
6906  For compatibility, the old (version 4) layout has been kept as 
6907 \family sans
6908 article (A&A V4)
6909 \family default
6910 .
6911  Please refer to the comments in 
6912 \family typewriter
6913 LyXDir/layouts/aapaper.layout
6914 \family default
6915 .
6916 \end_layout
6917
6918 \begin_layout Subsection
6919 Getting started
6920 \end_layout
6921
6922 \begin_layout Standard
6923 It is recommended you start from the example template distributed with LyX.
6924  If you are not using a template, note the following settings:
6925 \end_layout
6926
6927 \begin_layout Itemize
6928 Select 
6929 \family sans
6930 article (A&A)
6931 \family default
6932  in the 
6933 \family sans
6934 Document\SpecialChar \menuseparator
6935 Settings
6936 \family default
6937  dialog (OK, that one was obvious).
6938 \end_layout
6939
6940 \begin_layout Itemize
6941 Don't change the option 
6942 \family sans
6943 Page
6944 \begin_inset space ~
6945 \end_inset
6946
6947 style
6948 \family default
6949 : Leave it set to 
6950 \family sans
6951 default
6952 \family default
6953 .
6954  The whole layout is done by the macros, you shouldn't change anything.
6955 \end_layout
6956
6957 \begin_layout Subsection
6958 The header block
6959 \end_layout
6960
6961 \begin_layout Standard
6962 First thing to enter is the header information.
6963  It consists of seven entries, of which some are optional.
6964  They are
6965 \end_layout
6966
6967 \begin_layout Itemize
6968
6969 \family sans
6970 Title
6971 \family default
6972 : [required] 
6973 \end_layout
6974
6975 \begin_layout Itemize
6976
6977 \family sans
6978 Subtitle
6979 \family default
6980 : [optional] 
6981 \end_layout
6982
6983 \begin_layout Itemize
6984
6985 \family sans
6986 Author
6987 \family default
6988 : [required]
6989 \end_layout
6990
6991 \begin_layout Itemize
6992
6993 \family sans
6994 Address
6995 \family default
6996 : [required]
6997 \end_layout
6998
6999 \begin_layout Itemize
7000
7001 \family sans
7002 Offprints
7003 \family default
7004 : [optional] if more than one author: whom to contact for offprint requests.
7005 \end_layout
7006
7007 \begin_layout Itemize
7008
7009 \family sans
7010 Mail
7011 \family default
7012 : [optional] mail address for contacts.
7013 \end_layout
7014
7015 \begin_layout Itemize
7016
7017 \family sans
7018 Date
7019 \family default
7020 : [required].
7021  Suggested format is 
7022 \family typewriter
7023 Received: <date>; Accepted <date> 
7024 \end_layout
7025
7026 \begin_layout Standard
7027 There is no need to issue the 
7028 \family typewriter
7029
7030 \backslash
7031 maketitle
7032 \family default
7033  command, this is done automatically by LyX when the header is finished.
7034  Although the order of the single header entries doesn't matter it is advised
7035  to keep the above sequence, just to get the best optics and meets the layout
7036  of the real document.
7037 \end_layout
7038
7039 \begin_layout Standard
7040 If you want to place footnotes in the header block, e.
7041 \begin_inset space \thinspace{}
7042 \end_inset
7043
7044 g.
7045 \begin_inset space \space{}
7046 \end_inset
7047
7048 to state your present address, just use the standard footnote via the menu
7049  
7050 \family sans
7051 Insert\SpecialChar \menuseparator
7052 Footnote.
7053
7054 \family default
7055  LyX will automagically use the term 
7056 \family typewriter
7057
7058 \backslash
7059 thanks{}
7060 \family default
7061  in that case.
7062 \end_layout
7063
7064 \begin_layout Standard
7065 In addition to these topics, the macros use three additional LaTeX commands
7066  that have no counterpart in LyX:
7067 \end_layout
7068
7069 \begin_layout Itemize
7070
7071 \family typewriter
7072
7073 \backslash
7074 and
7075 \family default
7076  to separate different names for more than one author and institute, respectivel
7077 y.
7078 \end_layout
7079
7080 \begin_layout Itemize
7081
7082 \family typewriter
7083
7084 \backslash
7085 inst{<nr>}
7086 \family default
7087 to mark corresponding author/institute pairs.
7088  The institutes are numbered sequentially as they appear in the 
7089 \family sans
7090 Address
7091 \family default
7092  field, so you have to put a marker to each author.
7093 \end_layout
7094
7095 \begin_layout Itemize
7096
7097 \family typewriter
7098
7099 \backslash
7100 email{address}
7101 \family default
7102  to supply an email address for fast contact.
7103 \end_layout
7104
7105 \begin_layout Standard
7106 In all cases, the appropriate command has to be entered in LyX and marked
7107  as LaTeX code.
7108  See the examples.
7109  
7110 \end_layout
7111
7112 \begin_layout Subsection
7113 The abstract
7114 \end_layout
7115
7116 \begin_layout Standard
7117 The abstract should immediately follow the header block.
7118  With version 5 the abstract environment was changed to a command, and there
7119  is now a resctriction to only one paragraph.
7120  In addition, it should contain an entry with the keywords.
7121  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7122  command 
7123 \family typewriter
7124
7125 \backslash
7126 keywords{}
7127 \family default
7128  by hand and mark it as LaTeX code.
7129  Refer to the example paper.
7130 \end_layout
7131
7132 \begin_layout Subsection
7133 Supported environments
7134 \end_layout
7135
7136 \begin_layout Standard
7137 The A&A paper layout supports the following environments for structuring
7138  your text:
7139 \end_layout
7140
7141 \begin_layout Itemize
7142
7143 \family sans
7144 Standard
7145 \end_layout
7146
7147 \begin_layout Itemize
7148
7149 \family sans
7150 Section
7151 \end_layout
7152
7153 \begin_layout Itemize
7154
7155 \family sans
7156 Subsection
7157 \end_layout
7158
7159 \begin_layout Itemize
7160
7161 \family sans
7162 Subsubsection
7163 \end_layout
7164
7165 \begin_layout Itemize
7166
7167 \family sans
7168 Itemize
7169 \end_layout
7170
7171 \begin_layout Itemize
7172
7173 \family sans
7174 Enumerate
7175 \end_layout
7176
7177 \begin_layout Itemize
7178
7179 \family sans
7180 Description
7181 \end_layout
7182
7183 \begin_layout Itemize
7184
7185 \family sans
7186 Caption
7187 \end_layout
7188
7189 \begin_layout Itemize
7190
7191 \family sans
7192 Abstract
7193 \end_layout
7194
7195 \begin_layout Itemize
7196
7197 \family sans
7198 Acknowledgment
7199 \end_layout
7200
7201 \begin_layout Itemize
7202
7203 \family sans
7204 Bibliography
7205 \end_layout
7206
7207 \begin_layout Itemize
7208
7209 \family sans
7210 LaTeX
7211 \end_layout
7212
7213 \begin_layout Subsection
7214 Commands not supported by LyX
7215 \end_layout
7216
7217 \begin_layout Standard
7218 Some commands are not yet supported by the 
7219 \family sans
7220 paper (A&A)
7221 \family default
7222  layout for LyX.
7223  Some have already been mentioned.
7224  For the sake of completeness, they are listed all together here:
7225 \end_layout
7226
7227 \begin_layout Itemize
7228
7229 \family typewriter
7230
7231 \backslash
7232 and
7233 \end_layout
7234
7235 \begin_layout Itemize
7236
7237 \family typewriter
7238
7239 \backslash
7240 email
7241 \end_layout
7242
7243 \begin_layout Itemize
7244
7245 \family typewriter
7246
7247 \backslash
7248 appendix
7249 \end_layout
7250
7251 \begin_layout Itemize
7252
7253 \family typewriter
7254
7255 \backslash
7256 authorrunning
7257 \end_layout
7258
7259 \begin_layout Itemize
7260
7261 \family typewriter
7262
7263 \backslash
7264 inst{}
7265 \end_layout
7266
7267 \begin_layout Itemize
7268
7269 \family typewriter
7270
7271 \backslash
7272 keywords{}
7273 \end_layout
7274
7275 \begin_layout Itemize
7276
7277 \family typewriter
7278
7279 \backslash
7280 object{}
7281 \end_layout
7282
7283 \begin_layout Itemize
7284
7285 \family typewriter
7286
7287 \backslash
7288 titlerunning{}
7289 \end_layout
7290
7291 \begin_layout Standard
7292 If you want to use any of these commands, you have to enter them yourself.
7293  
7294 \series bold
7295 Do not forget to mark them as LaTeX code!
7296 \end_layout
7297
7298 \begin_layout Subsection
7299 Figure and Table Floats
7300 \end_layout
7301
7302 \begin_layout Standard
7303 LyX provides support for the necessary float environments 
7304 \family sans
7305 figure, figure*, table
7306 \family default
7307  and 
7308 \family sans
7309 table*
7310 \family default
7311 , therefore we won't tell much about it here.
7312  Refer to the 
7313 \emph on
7314 User's
7315 \begin_inset space ~
7316 \end_inset
7317
7318 Guide
7319 \emph default
7320 .
7321  Just remember that tables should be left-aligned.
7322  For that, select the table and change the alignment in 
7323 \family sans
7324 Edit\SpecialChar \menuseparator
7325 Paragraph
7326 \begin_inset space ~
7327 \end_inset
7328
7329 Settings.
7330 \end_layout
7331
7332 \begin_layout Standard
7333 There is only one special thing: the figures with caption besides the figure.
7334  To create such a figure, you have to do the following:
7335 \end_layout
7336
7337 \begin_layout Enumerate
7338 Create a wide figure float: 
7339 \family sans
7340 Insert\SpecialChar \menuseparator
7341 Float\SpecialChar \menuseparator
7342 Figure
7343 \family default
7344 , then right click in the figure and select 
7345 \family sans
7346 \bar under
7347 S
7348 \bar default
7349 pan
7350 \begin_inset space ~
7351 \end_inset
7352
7353 columns
7354 \family default
7355 .
7356 \end_layout
7357
7358 \begin_layout Enumerate
7359 Enter your caption text.
7360 \end_layout
7361
7362 \begin_layout Enumerate
7363 Press 
7364 \family sans
7365 Return
7366 \family default
7367  to move the cursor above the caption.
7368 \end_layout
7369
7370 \begin_layout Enumerate
7371 Insert your figure
7372 \end_layout
7373
7374 \begin_layout Enumerate
7375 Position the cursor behind the figure and insert a horizontal fill: 
7376 \family sans
7377 Insert\SpecialChar \menuseparator
7378 Special
7379 \begin_inset space ~
7380 \end_inset
7381
7382 Character\SpecialChar \menuseparator
7383 Horizontal
7384 \begin_inset space ~
7385 \end_inset
7386
7387 Fill
7388 \family default
7389 .
7390 \end_layout
7391
7392 \begin_layout Enumerate
7393 Switch to LaTeX mode: 
7394 \family sans
7395 M-c
7396 \begin_inset space ~
7397 \end_inset
7398
7399 t
7400 \family default
7401 .
7402 \end_layout
7403
7404 \begin_layout Enumerate
7405 Enter 
7406 \family typewriter
7407
7408 \backslash
7409 parbox[b]{55mm}{
7410 \family default
7411 .
7412  
7413 \series bold
7414 Do not close the brace!
7415 \end_layout
7416
7417 \begin_layout Enumerate
7418 Position the cursor behind the caption text, switch to LaTeX mode and insert
7419  the closing brace: 
7420 \family sans
7421 M-c
7422 \begin_inset space ~
7423 \end_inset
7424
7425 t
7426 \family default
7427  
7428 \family typewriter
7429 }
7430 \family default
7431 .
7432 \end_layout
7433
7434 \begin_layout Standard
7435 Also, refer to the figures in the example paper.
7436 \end_layout
7437
7438 \begin_layout Subsection
7439 Referee layout
7440 \end_layout
7441
7442 \begin_layout Standard
7443 For submission, the paper has to be formated in a special double-spacing
7444  layout.
7445  For this purpose, you have to give the option 
7446 \family typewriter
7447 referee
7448 \family default
7449  to the documentclass.
7450  This must be done using the extra class options field in the 
7451 \family sans
7452 Document\SpecialChar \menuseparator
7453 Settings
7454 \family default
7455  dialog.
7456  Just enter the string 
7457 \family typewriter
7458 referee
7459 \family default
7460  there.
7461 \end_layout
7462
7463 \begin_layout Subsection
7464 The example paper
7465 \end_layout
7466
7467 \begin_layout Standard
7468 The 
7469 \family sans
7470 Examples
7471 \family default
7472  directory contains an example paper written with LyX.
7473  It is the example paper from the original macro package, translated to
7474  LyX.
7475  Use it for inspiration, and compare the original LaTeX code with LyX way
7476  of writing.
7477 \end_layout
7478
7479 \begin_layout Section
7480 AASTeX
7481 \end_layout
7482
7483 \begin_layout Standard
7484 by 
7485 \noun on
7486 Mike Ressler
7487 \end_layout
7488
7489 \begin_layout Subsection
7490 Introduction
7491 \end_layout
7492
7493 \begin_layout Standard
7494 AASTeX is a set of macros produced by the American Astronomical Society
7495  to facilitate electronic manuscript submission to the three journals they
7496  publish: the Astrophysical Journal (including the Letters and Supplement),
7497  the Astronomical Journal, and the Publications of the Astronomical Society
7498  of the Pacific.
7499  LyX has proven to be an excellent tool for generating these documents,
7500  especially given its equation, citation, and figure handling capabilities.
7501  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7502  is the version described here, or higher.
7503  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7504  incompatible with LyX.
7505  The AASTeX package may be downloaded from the AASTeX Web site
7506 \end_layout
7507
7508 \begin_layout Standard
7509 \begin_inset VSpace medskip
7510 \end_inset
7511
7512
7513 \end_layout
7514
7515 \begin_layout Standard
7516 \align center
7517 \begin_inset Flex URL
7518 status collapsed
7519
7520 \begin_layout Plain Layout
7521
7522 http://www.journals.uchicago.edu/AAS/AASTeX
7523 \end_layout
7524
7525 \end_inset
7526
7527
7528 \end_layout
7529
7530 \begin_layout Standard
7531 \begin_inset VSpace medskip
7532 \end_inset
7533
7534
7535 \end_layout
7536
7537 \begin_layout Standard
7538 A complete user guide is contained in that package and you should familiarize
7539  yourself with it thoroughly before embarking on writing a paper in LyX.
7540  LyX will not reduce the need to figure out all the AASTeX commands, it
7541  will only reduce the drudgery of typing everything in.
7542  It is your responsibility to ensure that the final exported LaTeX document
7543  conforms completely to the requirements of the journal to which you are
7544  submitting your paper.
7545 \end_layout
7546
7547 \begin_layout Subsection
7548 Starting a New Paper
7549 \end_layout
7550
7551 \begin_layout Standard
7552 I strongly suggest that you start with the AASTeX template file.
7553  Click on 
7554 \family sans
7555 File\SpecialChar \menuseparator
7556 New from
7557 \family default
7558  
7559 \family sans
7560 Template
7561 \family default
7562 , enter the new file name, then choose the 
7563 \family typewriter
7564 aastex.lyx
7565 \family default
7566  template.
7567  This will show the most common fields found in a manuscript.
7568  Simply overwrite the existing text (including the brackets, 
7569 \family typewriter
7570 <>
7571 \family default
7572 ) with the correct information.
7573  Many of the AASTeX commands and environments can be implemented directly
7574  in LyX, but some cannot: most noticeably 
7575 \family typewriter
7576
7577 \backslash
7578 altaffilmark
7579 \family default
7580  and 
7581 \family typewriter
7582
7583 \backslash
7584 altaffiltext
7585 \family default
7586 , which should stick out like a sore thumb if you actually just opened the
7587  template file.
7588  For commands such as these, the LaTeX code must be entered directly and
7589  marked as such.
7590  Such commands are referred to as TeX code, or Evil Red Text.
7591  I tried to minimize the amount of TeX code needed in an AASTeX document,
7592  but there is still a bit more required than any of us would like.
7593 \end_layout
7594
7595 \begin_layout Subsection
7596 Finishing Your Paper
7597 \end_layout
7598
7599 \begin_layout Standard
7600 When the paper is finished to your satisfaction and previews/prints correctly,
7601  there are a few 
7602 \begin_inset Quotes eld
7603 \end_inset
7604
7605 postprocessing
7606 \begin_inset Quotes erd
7607 \end_inset
7608
7609  actions which need to be done before you submit it to the journals.
7610  
7611 \end_layout
7612
7613 \begin_layout Enumerate
7614 Export your paper as a LaTeX file (
7615 \family sans
7616 File\SpecialChar \menuseparator
7617 Export\SpecialChar \menuseparator
7618 LaTeX
7619 \family default
7620 ).
7621  
7622 \end_layout
7623
7624 \begin_layout Enumerate
7625 Edit the resulting 
7626 \family typewriter
7627 .tex
7628 \family default
7629  file with your favorite text editor
7630 \end_layout
7631
7632 \begin_deeper
7633 \begin_layout Enumerate
7634 remove the comment lines before the 
7635 \family typewriter
7636
7637 \backslash
7638 documentclass
7639 \family default
7640  command
7641 \end_layout
7642
7643 \begin_layout Enumerate
7644 remove the 
7645 \family typewriter
7646
7647 \backslash
7648 usepackage...{fontenc}
7649 \family default
7650  line if it appears (usually just after 
7651 \family typewriter
7652
7653 \backslash
7654 documentclass
7655 \family default
7656 }; also remove the 
7657 \family typewriter
7658
7659 \backslash
7660 secnumdepth
7661 \family default
7662  line if it appears.
7663 \end_layout
7664
7665 \begin_layout Enumerate
7666 remove everything between (and including) the 
7667 \family typewriter
7668
7669 \backslash
7670 makeatletter
7671 \family default
7672  and 
7673 \family typewriter
7674
7675 \backslash
7676 makeatother
7677 \family default
7678  commands, except for any commands you specifically put into the LaTeX preamble
7679  (which should appear immediately after the 
7680 \begin_inset Quotes eld
7681 \end_inset
7682
7683 User specified LaTeX commands
7684 \begin_inset Quotes erd
7685 \end_inset
7686
7687  comment in the 
7688 \family typewriter
7689 .tex
7690 \family default
7691  file).
7692 \end_layout
7693
7694 \end_deeper
7695 \begin_layout Enumerate
7696 Run the resulting file through LaTeX to make sure it still processes correctly.
7697 \end_layout
7698
7699 \begin_layout Enumerate
7700 Reread the journal requirements to make sure your filenames and formats
7701  are correct.
7702 \end_layout
7703
7704 \begin_layout Enumerate
7705 Submit it.
7706 \end_layout
7707
7708 \begin_layout Subsection
7709 Comments On Specific Commands
7710 \end_layout
7711
7712 \begin_layout Standard
7713 I will not describe the detailed usage of the individual AASTeX commands:
7714  the AASTeX User Guide (
7715 \family typewriter
7716 aasguide.tex
7717 \family default
7718 ) gives a good description of each.
7719  Thus it's probably easiest for me to go down the list as found in the guide
7720  and offer comments where necessary.
7721  So let's begin \SpecialChar \ldots{}
7722
7723 \end_layout
7724
7725 \begin_layout Subsubsection
7726 Things that work as expected
7727 \end_layout
7728
7729 \begin_layout Standard
7730 \begin_inset ERT
7731 status open
7732
7733 \begin_layout Plain Layout
7734
7735
7736 \backslash
7737 begin{sloppypar}
7738 \end_layout
7739
7740 \end_inset
7741
7742
7743 \end_layout
7744
7745 \begin_layout Standard
7746 Because they work as you might expect, I simply list them and the section
7747  they are found in: 
7748 \family typewriter
7749
7750 \backslash
7751 documentclass
7752 \family default
7753  (2.1.1), 
7754 \family typewriter
7755
7756 \backslash
7757 begin{document}
7758 \family default
7759  (2.2), 
7760 \family typewriter
7761
7762 \backslash
7763 title
7764 \family default
7765  (2.3), 
7766 \family typewriter
7767
7768 \backslash
7769 author
7770 \family default
7771  (2.3), 
7772 \family typewriter
7773
7774 \backslash
7775 affil
7776 \family default
7777  (2.3), 
7778 \family typewriter
7779
7780 \backslash
7781 abstract
7782 \family default
7783  (2.4), 
7784 \family typewriter
7785
7786 \backslash
7787 keywords
7788 \family default
7789  (2.5), 
7790 \family typewriter
7791
7792 \backslash
7793 section
7794 \family default
7795  (2.7), 
7796 \family typewriter
7797
7798 \backslash
7799 subsection
7800 \family default
7801  (2.7), 
7802 \family typewriter
7803
7804 \backslash
7805 subsubsection
7806 \family default
7807  (2.7), 
7808 \family typewriter
7809
7810 \backslash
7811 paragraph
7812 \family default
7813  (2.7), 
7814 \family typewriter
7815
7816 \backslash
7817 facility
7818 \family default
7819  (2.10), 
7820 \family typewriter
7821
7822 \backslash
7823 begin{displaymath}
7824 \family default
7825  (2.12), 
7826 \family typewriter
7827
7828 \backslash
7829 begin{equation}
7830 \family default
7831  (2.12), 
7832 \family typewriter
7833
7834 \backslash
7835 begin{eqnarray}
7836 \family default
7837  (2.12), 
7838 \family typewriter
7839
7840 \backslash
7841 begin{mathletters}
7842 \family default
7843  (2.12), 
7844 \family typewriter
7845
7846 \backslash
7847 begin{thebibliography}
7848 \family default
7849  (2.13.1), 
7850 \family typewriter
7851
7852 \backslash
7853 bibitem
7854 \family default
7855  (2.13.2), all the cite commands and their variations (2.13.2), the generic
7856  graphicx figure commands (2.14.1), 
7857 \family typewriter
7858
7859 \backslash
7860 begin{table}
7861 \family default
7862  (2.15.4), 
7863 \family typewriter
7864
7865 \backslash
7866 begin{tabular}
7867 \family default
7868  (2.15.4), 
7869 \family typewriter
7870
7871 \backslash
7872 caption
7873 \family default
7874  (2.15.4), 
7875 \family typewriter
7876
7877 \backslash
7878 label
7879 \family default
7880  (2.15.4, amongst other places), 
7881 \family typewriter
7882
7883 \backslash
7884 tablerefs
7885 \family default
7886  (2.15.5), 
7887 \family typewriter
7888
7889 \backslash
7890 tablecomments
7891 \family default
7892  (2.15.5), 
7893 \family typewriter
7894
7895 \backslash
7896 url
7897 \family default
7898  (2.17.4), 
7899 \family typewriter
7900
7901 \backslash
7902 end{document}
7903 \family default
7904  (2.18).
7905 \end_layout
7906
7907 \begin_layout Standard
7908 The following style options also work correctly: 
7909 \family typewriter
7910 longabstract
7911 \family default
7912  (2.4), 
7913 \family typewriter
7914 preprint
7915 \family default
7916  (3.2.1), 
7917 \family typewriter
7918 preprint2
7919 \family default
7920  (3.2.2), 
7921 \family typewriter
7922 eqsecnum
7923 \family default
7924  (3.3), 
7925 \family typewriter
7926 flushrt
7927 \family default
7928  (3.4).
7929  Simply put them in the 
7930 \family sans
7931 Options
7932 \family default
7933  box in 
7934 \family sans
7935 Layout\SpecialChar \menuseparator
7936 Document
7937 \family default
7938 .
7939 \end_layout
7940
7941 \begin_layout Standard
7942 \begin_inset ERT
7943 status open
7944
7945 \begin_layout Plain Layout
7946
7947
7948 \backslash
7949 end{sloppypar}
7950 \end_layout
7951
7952 \end_inset
7953
7954
7955 \end_layout
7956
7957 \begin_layout Subsubsection
7958 Things that work, but require more comment
7959 \end_layout
7960
7961 \begin_layout Standard
7962 The following items work, but require a little more discussion:
7963 \end_layout
7964
7965 \begin_layout Itemize
7966 These items are reserved for use by the journal editors, but you can put
7967  them into the LaTeX preamble if you feel compelled to do so: 
7968 \family typewriter
7969
7970 \backslash
7971 received
7972 \family default
7973
7974 \family typewriter
7975
7976 \backslash
7977 revised
7978 \family default
7979
7980 \family typewriter
7981
7982 \backslash
7983 accepted
7984 \family default
7985
7986 \family typewriter
7987
7988 \backslash
7989 ccc
7990 \family default
7991
7992 \family typewriter
7993
7994 \backslash
7995 cpright
7996 \family default
7997  (all from 2.1.3)
7998 \end_layout
7999
8000 \begin_layout Itemize
8001 These items may be placed in the LaTeX preamble, and are included as blanks
8002  in the template file: 
8003 \family typewriter
8004
8005 \backslash
8006 slugcomment
8007 \family default
8008  (2.1.4), 
8009 \family typewriter
8010
8011 \backslash
8012 shorttitle
8013 \family default
8014  (2.1.5), 
8015 \family typewriter
8016
8017 \backslash
8018 shortauthors
8019 \family default
8020  (2.1.5)
8021 \end_layout
8022
8023 \begin_layout Itemize
8024
8025 \family typewriter
8026
8027 \backslash
8028 email
8029 \family default
8030  (2.3) – can only be used 
8031 \begin_inset Quotes eld
8032 \end_inset
8033
8034 standalone
8035 \begin_inset Quotes erd
8036 \end_inset
8037
8038 , not in the middle of a paragraph.
8039  Use TeX code if you need to embed it.
8040 \end_layout
8041
8042 \begin_layout Itemize
8043
8044 \family typewriter
8045
8046 \backslash
8047 and
8048 \family default
8049  (2.3) – will have extra {} after it.
8050  This should not cause an error.
8051 \end_layout
8052
8053 \begin_layout Itemize
8054
8055 \family typewriter
8056
8057 \backslash
8058 notetoeditor
8059 \family default
8060  (2.6) – can only be used 
8061 \begin_inset Quotes eld
8062 \end_inset
8063
8064 standalone
8065 \begin_inset Quotes erd
8066 \end_inset
8067
8068 , not in the middle of a paragraph.
8069  Use TeX code if you need to embed it.
8070 \end_layout
8071
8072 \begin_layout Itemize
8073
8074 \family typewriter
8075
8076 \backslash
8077 placetable
8078 \family default
8079  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8080  hand
8081 \end_layout
8082
8083 \begin_layout Itemize
8084
8085 \family typewriter
8086
8087 \backslash
8088 placefigure
8089 \family default
8090  (2.8) – same as for 
8091 \family typewriter
8092
8093 \backslash
8094 placetable
8095 \end_layout
8096
8097 \begin_layout Itemize
8098
8099 \family typewriter
8100
8101 \backslash
8102 acknowledgements
8103 \family default
8104  (2.9) – will have extra {} after it.
8105  This should not cause an error.
8106 \end_layout
8107
8108 \begin_layout Itemize
8109
8110 \family typewriter
8111
8112 \backslash
8113 appendix
8114 \family default
8115  (2.11) – will have extra {} after it.
8116  This should not cause an error.
8117 \end_layout
8118
8119 \begin_layout Itemize
8120
8121 \family typewriter
8122
8123 \backslash
8124 figcaption
8125 \family default
8126  (2.14.2) – you can insert an optional filename argument by placing the cursor
8127  at the beginning of the text and selecting 
8128 \family sans
8129 Insert\SpecialChar \menuseparator
8130 Short Title
8131 \family default
8132 .
8133  
8134 \begin_inset Quotes eld
8135 \end_inset
8136
8137 Short Title
8138 \begin_inset Quotes erd
8139 \end_inset
8140
8141  inserts an optional argument of the type needed by 
8142 \family typewriter
8143
8144 \backslash
8145 figcaption
8146 \family default
8147 .
8148  Hopefully it will be renamed someday.
8149 \end_layout
8150
8151 \begin_layout Itemize
8152
8153 \family typewriter
8154
8155 \backslash
8156 objectname
8157 \family default
8158  (2.17.1) – same as 
8159 \family typewriter
8160
8161 \backslash
8162 figcaption
8163 \family default
8164  for the catalog ID optional parameter
8165 \end_layout
8166
8167 \begin_layout Itemize
8168
8169 \family typewriter
8170
8171 \backslash
8172 dataset
8173 \family default
8174  (2.17.1) – same as 
8175 \family typewriter
8176
8177 \backslash
8178 figcaption
8179 \family default
8180  for the catalog ID optional parameter
8181 \end_layout
8182
8183 \begin_layout Subsubsection
8184 Things not implemented, use TeX code
8185 \end_layout
8186
8187 \begin_layout Standard
8188 \begin_inset ERT
8189 status open
8190
8191 \begin_layout Plain Layout
8192
8193
8194 \backslash
8195 begin{sloppypar}
8196 \end_layout
8197
8198 \end_inset
8199
8200
8201 \end_layout
8202
8203 \begin_layout Standard
8204
8205 \family typewriter
8206
8207 \backslash
8208 altaffilmark
8209 \family default
8210  (2.3), 
8211 \family typewriter
8212
8213 \backslash
8214 altaffiltext
8215 \family default
8216  (2.3), 
8217 \family typewriter
8218
8219 \backslash
8220 eqnum
8221 \family default
8222  (2.12), 
8223 \family typewriter
8224
8225 \backslash
8226 setcounter{equation}
8227 \family default
8228  (2.12), Journal name abbreviations (2.13.4), 
8229 \family typewriter
8230
8231 \backslash
8232 figurenum
8233 \family default
8234  (2.14.1), 
8235 \family typewriter
8236
8237 \backslash
8238 epsscale
8239 \family default
8240  (2.14.1), 
8241 \family typewriter
8242
8243 \backslash
8244 plotone
8245 \family default
8246  (2.14.1), 
8247 \family typewriter
8248
8249 \backslash
8250 plottwo
8251 \family default
8252  (2.14.1), 
8253 \family typewriter
8254
8255 \backslash
8256 tablenum
8257 \family default
8258  (2.15.4), 
8259 \family typewriter
8260
8261 \backslash
8262 tableline
8263 \family default
8264  (2.15.4, insert it as the first element in the lefthand cell after where
8265  you want it.
8266  Don't use any of LyX's rules in the table), 
8267 \family typewriter
8268
8269 \backslash
8270 tablenotemark
8271 \family default
8272  (2.15.5), 
8273 \family typewriter
8274
8275 \backslash
8276 tablenotetext
8277 \family default
8278  (2.15.5), much of Misc (2.17, except 
8279 \family typewriter
8280
8281 \backslash
8282 objectname
8283 \family default
8284
8285 \family typewriter
8286
8287 \backslash
8288 dataset
8289 \family default
8290
8291 \family typewriter
8292
8293 \backslash
8294 url
8295 \family default
8296 , and 
8297 \family typewriter
8298
8299 \backslash
8300 email
8301 \family default
8302 ; see above), 
8303 \family typewriter
8304
8305 \backslash
8306 singlespace
8307 \family default
8308  (3.1), 
8309 \family typewriter
8310
8311 \backslash
8312 doublespace
8313 \family default
8314  (3.1), 
8315 \family typewriter
8316
8317 \backslash
8318 onecolumn
8319 \family default
8320  (3.2), 
8321 \family typewriter
8322
8323 \backslash
8324 twocolumn
8325 \family default
8326  (3.2)
8327 \end_layout
8328
8329 \begin_layout Standard
8330 \begin_inset ERT
8331 status open
8332
8333 \begin_layout Plain Layout
8334
8335
8336 \backslash
8337 end{sloppypar}
8338 \end_layout
8339
8340 \end_inset
8341
8342
8343 \end_layout
8344
8345 \begin_layout Subsubsection
8346 Things that cannot be implemented
8347 \end_layout
8348
8349 \begin_layout Standard
8350 \SpecialChar \ldots{}
8351  at least in any meaningful sort of way, so I suggest ignoring them.
8352  They are the references environment (2.13.3), and the deluxetable environment
8353  (2.15).
8354  If you really, really need to use deluxetable, I suggest editing it in
8355  a separate file with a text editor, then using 
8356 \family sans
8357 Insert\SpecialChar \menuseparator
8358 Child
8359 \begin_inset space ~
8360 \end_inset
8361
8362 Document
8363 \family default
8364  to include it in your LyX document.
8365  See the 
8366 \family typewriter
8367 aas_sample.lyx
8368 \family default
8369  file to see an example of this.
8370 \end_layout
8371
8372 \begin_layout Subsection
8373 FAQs, Tips, Tricks, and Other Ruminations
8374 \end_layout
8375
8376 \begin_layout Subsubsection
8377 Getting LyX and AASTeX to cooperate
8378 \end_layout
8379
8380 \begin_layout Standard
8381 It can be a bit tricky to get LyX to recognize a new layout and document
8382  class.
8383  When all else fails, do this:
8384 \end_layout
8385
8386 \begin_layout Enumerate
8387 Make certain that LaTeX can find AASTeX.
8388  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8389  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8390 \family typewriter
8391 sample.tex
8392 \family default
8393 .
8394 \end_layout
8395
8396 \begin_layout Enumerate
8397 Make certain that 
8398 \family typewriter
8399 aastex.layout
8400 \family default
8401  appears in LyX's 
8402 \family typewriter
8403 layouts
8404 \family default
8405  folder
8406 \end_layout
8407
8408 \begin_layout Enumerate
8409 Rerun 
8410 \family sans
8411 Tools\SpecialChar \menuseparator
8412 Reconfigure
8413 \family default
8414  in LyX, then restart LyX.
8415 \end_layout
8416
8417 \begin_layout Enumerate
8418 Open a regular new file, not from a template.
8419  Does AASTeX appear in the class list in 
8420 \family sans
8421 Document\SpecialChar \menuseparator
8422 Settings
8423 \family default
8424 ?
8425 \end_layout
8426
8427 \begin_layout Standard
8428 If you get a warning from an existing AASTeX document about not being able
8429  to find the AASTeX layout or a message about 
8430 \begin_inset Quotes eld
8431 \end_inset
8432
8433 You should not mix title layouts with normal ones
8434 \begin_inset Quotes erd
8435 \end_inset
8436
8437 , things haven't been installed correctly.
8438 \end_layout
8439
8440 \begin_layout Subsubsection
8441 LaTeX error processing a table 
8442 \end_layout
8443
8444 \begin_layout Standard
8445 LyX, by default, attempts to center the table caption/title.
8446  This seems to produce a bad interaction in AASTeX so you should click somewhere
8447  in the caption/title, then select 
8448 \family sans
8449 Edit\SpecialChar \menuseparator
8450 Paragraph
8451 \begin_inset space ~
8452 \end_inset
8453
8454 Settings
8455 \family default
8456 , then set the 
8457 \family sans
8458 Alignment
8459 \family default
8460  to 
8461 \family sans
8462 Block
8463 \family default
8464 .
8465  This took care of it for me.
8466 \end_layout
8467
8468 \begin_layout Subsubsection
8469 References
8470 \end_layout
8471
8472 \begin_layout Standard
8473 A couple of things: 1) I have noticed some funny spacing in the reference
8474  entries in the text.
8475  When you enter the bibliography item data, make sure their is 
8476 \emph on
8477 no
8478 \emph default
8479  space between the last author and the parenthesis setting off the year;
8480  
8481 \emph on
8482 e.
8483 \begin_inset space \thinspace{}
8484 \end_inset
8485
8486 g.
8487 \begin_inset space \space{}
8488 \end_inset
8489
8490
8491 \emph default
8492 type 
8493 \family typewriter
8494 Ressler(1992)
8495 \family default
8496 , not 
8497 \family typewriter
8498 Ressler (1992)
8499 \family default
8500 .
8501  2) Entering the references at all is not obvious.
8502  The easiest thing is to start typing your first reference at the end of
8503  the document, then mark it as type 
8504 \family sans
8505 References
8506 \family default
8507 .
8508  That will put a small gray box in front of what you just typed.
8509  Click on the box to fill in the rest of the information.
8510  For new references, go to the end of an existing reference and press return.
8511  That will create a new line with its own box, etc.
8512 \end_layout
8513
8514 \begin_layout Subsubsection
8515 Including EPS files
8516 \end_layout
8517
8518 \begin_layout Standard
8519 Even though AASTeX provides its own figure commands (
8520 \family typewriter
8521
8522 \backslash
8523 plotone
8524 \family default
8525 , for example), I much prefer LaTeX's standard figure commands (with the
8526  default graphicx).
8527  You can insert the 
8528 \family typewriter
8529
8530 \backslash
8531 plotone
8532 \family default
8533 , etc.
8534 \begin_inset space ~
8535 \end_inset
8536
8537 commands as TeX code into a Figure Float box if you desire, but I never
8538  have much luck getting the layout right.
8539  With the standard graphics, LyX will insert a 
8540 \family typewriter
8541
8542 \backslash
8543 usepackage{graphicx}
8544 \family default
8545  command into the LaTeX preamble and handle the figures in the standard
8546  LaTeX2e way, interspersing the figures in the text.
8547  I believe ApJ accepts figures exactly this way now; AJ might still use
8548  the 
8549 \begin_inset Quotes eld
8550 \end_inset
8551
8552 stack everything at the end
8553 \begin_inset Quotes erd
8554 \end_inset
8555
8556  technique.
8557 \end_layout
8558
8559 \begin_layout Subsubsection
8560 Things I could have done, but didn't
8561 \end_layout
8562
8563 \begin_layout Standard
8564 There are a few 
8565 \begin_inset Quotes eld
8566 \end_inset
8567
8568 pretty
8569 \begin_inset Quotes erd
8570 \end_inset
8571
8572  things I could have implemented, but chose not to.
8573  For instance, I saw no point in double-spacing the text in the LyX window,
8574  even though it is double-spaced in the paper manuscript.
8575  Also, I chose not to make separate layouts for the preprint and preprint2
8576  styles.
8577  Since I assume you will spend most of your time in the plain manuscript
8578  mode anyway, I decided not to chew up more disk space with this.
8579  
8580 \end_layout
8581
8582 \begin_layout Subsection
8583 Final Caveat
8584 \end_layout
8585
8586 \begin_layout Standard
8587 Your mileage may vary.
8588  I've now had papers published by both ApJ and AJ that have had 98% of the
8589  effort done in LyX; the last 2% was the LaTeX post-processing and a few
8590  cleanups.
8591  I have had no trouble with the submission process, and I'm sure the journals
8592  were never aware that there might be a difference.
8593  So, go forth and publish!
8594 \end_layout
8595
8596 \begin_layout Section
8597 AMS LaTeX
8598 \end_layout
8599
8600 \begin_layout Standard
8601 by 
8602 \noun on
8603 David Johnson; updated by Richard Heck
8604 \end_layout
8605
8606 \begin_layout Standard
8607 \begin_inset VSpace bigskip
8608 \end_inset
8609
8610
8611 \end_layout
8612
8613 \begin_layout Standard
8614 \noindent
8615 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8616  papers to be submitted to American Mathematical Society publications.
8617  The layouts are not tailored to a specific journal, but easily can be.
8618  You should refer to the AMS documentation for specific instructions for
8619  each journal (usually it will entail only changing a single line in the
8620  TeX output).
8621  That documentation is available on the Web at 
8622 \begin_inset Flex URL
8623 status open
8624
8625 \begin_layout Plain Layout
8626
8627 http://www.ams.org
8628 \end_layout
8629
8630 \end_inset
8631
8632  or by ftp at 
8633 \begin_inset Flex URL
8634 status open
8635
8636 \begin_layout Plain Layout
8637
8638 ftp://ftp.ams.org/pub/tex/amslatex/
8639 \end_layout
8640
8641 \end_inset
8642
8643 .
8644  These layouts are appropriate, and useful, for any mathematical writing.
8645  
8646 \end_layout
8647
8648 \begin_layout Standard
8649 There are two basic AMS LaTeX layouts: 
8650 \end_layout
8651
8652 \begin_layout Itemize
8653 amsart: The standard AMS article format.
8654 \end_layout
8655
8656 \begin_layout Itemize
8657 amsbook: the standard AMS book (really, monograph) format.
8658  
8659 \end_layout
8660
8661 \begin_layout Standard
8662 The layouts themselves contain only the minimum necessary to use the AMS
8663  classes.
8664  They do not, in particular, contain any of the `theorem' environments used
8665  for setting theorems, lemmas, and the like.
8666  These are contained, instead, in the 
8667 \begin_inset Flex Code
8668 status collapsed
8669
8670 \begin_layout Plain Layout
8671 Theorems (AMS)
8672 \end_layout
8673
8674 \end_inset
8675
8676  module, which is loaded by default when when you select one of the AMS
8677  classes.
8678  (It can also be used with other classes and can be removed, if you would
8679  rather use something else.) Less commonly used environments are in the 
8680 \begin_inset Flex Code
8681 status collapsed
8682
8683 \begin_layout Plain Layout
8684 Theorems (AMS-Extended)
8685 \end_layout
8686
8687 \end_inset
8688
8689  module, which must be loaded manually.
8690 \end_layout
8691
8692 \begin_layout Standard
8693 By default, theorems and the like are numbered consecutively throughout
8694  the document, but this may be modified by loading the module 
8695 \begin_inset Flex Code
8696 status collapsed
8697
8698 \begin_layout Plain Layout
8699 Theorems (Order by Section)
8700 \end_layout
8701
8702 \end_inset
8703
8704  or, if you are using 
8705 \begin_inset Flex Code
8706 status collapsed
8707
8708 \begin_layout Plain Layout
8709 book (AMS)
8710 \end_layout
8711
8712 \end_inset
8713
8714 , the module 
8715 \begin_inset Flex Code
8716 status collapsed
8717
8718 \begin_layout Plain Layout
8719 Theorems (Order by Chapter)
8720 \end_layout
8721
8722 \end_inset
8723
8724 .
8725  These will number the results as 
8726 \begin_inset Formula $n.m$
8727 \end_inset
8728
8729 , where the first number refers to the section (or chapter) and the second
8730  refers to the total number of results so far in that section (or chapter).
8731  Many environments are also available unnumbered.
8732  These are indicated by an asterisk at the end.
8733  If you happen to want 
8734 \emph on
8735 only
8736 \emph default
8737  unnumbered results, the module 
8738 \begin_inset Flex Code
8739 status collapsed
8740
8741 \begin_layout Plain Layout
8742 Theorems (Starred)
8743 \end_layout
8744
8745 \end_inset
8746
8747  provides that option.
8748 \end_layout
8749
8750 \begin_layout Standard
8751 Note that these modules do not 
8752 \emph on
8753 have
8754 \emph default
8755  to be used with the AMS classes.
8756  It is perfectly possible to use the 
8757 \begin_inset Flex Code
8758 status collapsed
8759
8760 \begin_layout Plain Layout
8761 Theorems (AMS)
8762 \end_layout
8763
8764 \end_inset
8765
8766  module, and the others mentioned, with other classes, such as 
8767 \begin_inset Flex Code
8768 status collapsed
8769
8770 \begin_layout Plain Layout
8771 article
8772 \end_layout
8773
8774 \end_inset
8775
8776
8777 \begin_inset Flex Code
8778 status collapsed
8779
8780 \begin_layout Plain Layout
8781 report
8782 \end_layout
8783
8784 \end_inset
8785
8786
8787 \begin_inset Flex Code
8788 status collapsed
8789
8790 \begin_layout Plain Layout
8791 book (KOMA-script)
8792 \end_layout
8793
8794 \end_inset
8795
8796 , and so forth.
8797 \end_layout
8798
8799 \begin_layout Subsection
8800 What these layouts provide
8801 \end_layout
8802
8803 \begin_layout Standard
8804 There is a long list of included environments provided by these layouts.
8805  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
8806  variety of `theorem' environments.
8807  However, the AMS recommends the environments that are available in LyX.
8808  
8809 \end_layout
8810
8811 \begin_layout Standard
8812 The following environments—as well as the standard environments, such as
8813  
8814 \begin_inset Flex Noun
8815 status collapsed
8816
8817 \begin_layout Plain Layout
8818 section
8819 \end_layout
8820
8821 \end_inset
8822
8823
8824 \begin_inset Flex Noun
8825 status collapsed
8826
8827 \begin_layout Plain Layout
8828 bibliography
8829 \end_layout
8830
8831 \end_inset
8832
8833
8834 \begin_inset Flex Noun
8835 status collapsed
8836
8837 \begin_layout Plain Layout
8838 title
8839 \end_layout
8840
8841 \end_inset
8842
8843
8844 \begin_inset Flex Noun
8845 status collapsed
8846
8847 \begin_layout Plain Layout
8848 author
8849 \end_layout
8850
8851 \end_inset
8852
8853 , and 
8854 \begin_inset Flex Noun
8855 status collapsed
8856
8857 \begin_layout Plain Layout
8858 date
8859 \end_layout
8860
8861 \end_inset
8862
8863 —are provided by 
8864 \begin_inset Flex Code
8865 status collapsed
8866
8867 \begin_layout Plain Layout
8868 article (AMS)
8869 \end_layout
8870
8871 \end_inset
8872
8873  and 
8874 \begin_inset Flex Code
8875 status collapsed
8876
8877 \begin_layout Plain Layout
8878 book (AMS)
8879 \end_layout
8880
8881 \end_inset
8882
8883 :
8884 \end_layout
8885
8886 \begin_layout Description
8887 Address This should be the author's permanent address.
8888 \end_layout
8889
8890 \begin_layout Description
8891 Current
8892 \begin_inset space ~
8893 \end_inset
8894
8895 Address This should be the author's temporary address at the time of submission,
8896  if different from the Address.
8897 \end_layout
8898
8899 \begin_layout Description
8900 Email Author's e-mail address
8901 \end_layout
8902
8903 \begin_layout Description
8904 URL Author's Web address, if desired.
8905 \end_layout
8906
8907 \begin_layout Description
8908 Keywords Key words or phrases used to identify specific topics discussed
8909  in the paper.
8910 \end_layout
8911
8912 \begin_layout Description
8913 Subjectclass These refer to the AMS Subject Classifications, published and
8914  described in 
8915 \emph on
8916 Mathematical Reviews
8917 \emph default
8918 .
8919  These are also available online at the AMS cites listed above.
8920 \end_layout
8921
8922 \begin_layout Description
8923 Thanks
8924 \end_layout
8925
8926 \begin_layout Description
8927 Dedicatory
8928 \end_layout
8929
8930 \begin_layout Description
8931 Translator
8932 \end_layout
8933
8934 \begin_layout Standard
8935 The following environments are provided by both the 
8936 \begin_inset Flex Code
8937 status collapsed
8938
8939 \begin_layout Plain Layout
8940 Theorems
8941 \end_layout
8942
8943 \end_inset
8944
8945  and 
8946 \begin_inset Flex Code
8947 status collapsed
8948
8949 \begin_layout Plain Layout
8950 Theorems (AMS)
8951 \end_layout
8952
8953 \end_inset
8954
8955  modules, in the latter case in both starred (unnumbered) and unstarred
8956  (numbered) versions.
8957  These same environments are provided only in the starred versions by the
8958  
8959 \begin_inset Flex Code
8960 status collapsed
8961
8962 \begin_layout Plain Layout
8963 Theorems (Starred)
8964 \end_layout
8965
8966 \end_inset
8967
8968  module:
8969 \end_layout
8970
8971 \begin_layout Theorem
8972 This is typically used for the statements of major results.
8973  
8974 \end_layout
8975
8976 \begin_layout Corollary*
8977 This is used for statements which follow fairly directly from previous statement
8978 s.
8979  Again, these can be major results.
8980  
8981 \end_layout
8982
8983 \begin_layout Lemma
8984 These are smaller results needed to prove other statements.
8985 \end_layout
8986
8987 \begin_layout Proposition
8988 These are less major results which (hopefully) add to the general theory
8989  being discussed.
8990 \end_layout
8991
8992 \begin_layout Conjecture
8993 These are statements provided without justification, which the author does
8994  not know how to prove, but which seem to be true (to the author, at least).
8995 \end_layout
8996
8997 \begin_layout Definition*
8998 Guess what this is for.
8999  The font is different for this environment than for the previous ones.
9000  
9001 \end_layout
9002
9003 \begin_layout Example*
9004 Used for examples illustrating proven results.
9005 \end_layout
9006
9007 \begin_layout Problem
9008 It's not really known what this is for.
9009  You should figure it out.
9010 \end_layout
9011
9012 \begin_layout Exercise*
9013 Write a description for this one.
9014 \end_layout
9015
9016 \begin_layout Remark
9017 This environment is also a type of theorem, usually a lesser sort of observation.
9018 \end_layout
9019
9020 \begin_layout Claim*
9021 Often used in the course of giving a proof of a larger result.
9022 \end_layout
9023
9024 \begin_layout Case
9025 Generally, these are used to break up long arguments, using specific instances
9026  of some condition.
9027  
9028 \end_layout
9029
9030 \begin_layout Case
9031 The numbering scheme for cases is on its own, not together with other numbered
9032  statements.
9033  
9034 \end_layout
9035
9036 \begin_layout Proof
9037 At the end of this environment, a QED symbol (usually a square, but it can
9038  vary with different styles) is placed.
9039  If you want to have other environments within this one—for example, Case
9040  environments—and have the QED symbol appear only after them, then the other
9041  environments need to be nested within the proof environment.
9042  See the section 
9043 \emph on
9044 Nesting Environments
9045 \emph default
9046  of the 
9047 \emph on
9048 User's Guide
9049 \emph default
9050  for information on nesting.
9051 \end_layout
9052
9053 \begin_layout Standard
9054 And these environments are provided by 
9055 \begin_inset Flex Code
9056 status collapsed
9057
9058 \begin_layout Plain Layout
9059 Theorems (AMS-Extended)
9060 \end_layout
9061
9062 \end_inset
9063
9064 :
9065 \end_layout
9066
9067 \begin_layout Criterion*
9068 A required condition.
9069 \end_layout
9070
9071 \begin_layout Algorithm*
9072 A general procedure to be used.
9073 \end_layout
9074
9075 \begin_layout Axiom*
9076 This is a property or statement taken as true within the system being discussed.
9077 \end_layout
9078
9079 \begin_layout Condition*
9080 Sometimes used to state a condition assumed within the present context of
9081  discussion.
9082 \end_layout
9083
9084 \begin_layout Note*
9085 Similar to a Remark.
9086 \end_layout
9087
9088 \begin_layout Notation*
9089 Used for the explanation of, yes, notation.
9090 \end_layout
9091
9092 \begin_layout Summary
9093 Do we really need to tell you? 
9094 \end_layout
9095
9096 \begin_layout Acknowledgement*
9097 Acknowledgement.
9098 \end_layout
9099
9100 \begin_layout Conclusion*
9101 Sometimes used at the end of a long train of argument.
9102 \end_layout
9103
9104 \begin_layout Fact
9105 Used in a way similar to Proposition, though perhaps lower on the scale.
9106 \end_layout
9107
9108 \begin_layout Standard
9109 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9110  fonts packages.
9111  They need to be available on your system in order to use these environments.
9112 \end_layout
9113
9114 \begin_layout Section
9115 AGU journals (
9116 \family sans
9117 aguplus
9118 \family default
9119 )
9120 \end_layout
9121
9122 \begin_layout Standard
9123 by 
9124 \shape smallcaps
9125 Martin Vermeer
9126 \end_layout
9127
9128 \begin_layout Subsection
9129 Description
9130 \end_layout
9131
9132 \begin_layout Standard
9133 These are the layout files for some of the journals of the American Geophysical
9134  Society.
9135  It is assumed that you have both the AGU's own class files and AGUplus
9136  installed (everything to be found at
9137 \begin_inset Flex URL
9138 status collapsed
9139
9140 \begin_layout Plain Layout
9141
9142 ftp://ftp.agu.org/journals/latex/journals
9143 \end_layout
9144
9145 \end_inset
9146
9147 ).
9148 \end_layout
9149
9150 \begin_layout Subsection
9151 New styles
9152 \end_layout
9153
9154 \begin_layout Standard
9155 Redefined are 
9156 \family sans
9157 Paragraph
9158 \family default
9159
9160 \family sans
9161 Paragraph*
9162 \family default
9163 .
9164  They are still called this in the LyX GUI, though their LaTeX equivalents
9165  in the AGU classes are 
9166 \family sans
9167 Subsubsubsection
9168 \family default
9169  and 
9170 \family sans
9171 Subsubsubsection*
9172 \family default
9173 .
9174 \end_layout
9175
9176 \begin_layout Standard
9177 Newly defined styles are 
9178 \family sans
9179 Left_Header
9180 \family default
9181
9182 \family sans
9183 Right_Header
9184 \family default
9185
9186 \family sans
9187 Received
9188 \family default
9189
9190 \family sans
9191 Revised
9192 \family default
9193
9194 \family sans
9195 Accepted
9196 \family default
9197
9198 \family sans
9199 CCC
9200 \family default
9201
9202 \family sans
9203 PaperId
9204 \family default
9205
9206 \family sans
9207 AuthorAddr
9208 \family default
9209
9210 \family sans
9211 SlugComment
9212 \family default
9213 .
9214  These are mostly manuscript attributes and defined in the AGU class documentati
9215 on.
9216 \end_layout
9217
9218 \begin_layout Standard
9219 I suspect this is still badly incomplete.
9220 \end_layout
9221
9222 \begin_layout Subsection
9223 New floats
9224 \end_layout
9225
9226 \begin_layout Standard
9227
9228 \family sans
9229 Planotable
9230 \family default
9231  and 
9232 \family sans
9233 Plate
9234 \family default
9235 .
9236  We also have a new 
9237 \family sans
9238 Table_Caption
9239 \family default
9240 .
9241 \end_layout
9242
9243 \begin_layout Subsection
9244 Supported journals
9245 \end_layout
9246
9247 \begin_layout Itemize
9248
9249 \emph on
9250 Journal of Geophysical Research
9251 \emph default
9252
9253 \family typewriter
9254 jgrga.layout
9255 \family default
9256  — Martin Vermeer
9257 \end_layout
9258
9259 \begin_layout Standard
9260 Add your own, it isn't so hard! Look at the 
9261 \family typewriter
9262 jgrga.layout
9263 \family default
9264  example and 
9265 \family typewriter
9266 aguplus.inc
9267 \family default
9268 .
9269 \end_layout
9270
9271 \begin_layout Subsection
9272 Bugs and things to remember
9273 \end_layout
9274
9275 \begin_layout Standard
9276 In order to use the new layouts, you must remember to do the following for
9277  a new document:
9278 \end_layout
9279
9280 \begin_layout Enumerate
9281
9282 \emph on
9283 Turn off babel
9284 \emph default
9285 .
9286  This can be done in the 
9287 \family sans
9288 Layout\SpecialChar \menuseparator
9289 Document
9290 \family default
9291  or 
9292 \family sans
9293 Document\SpecialChar \menuseparator
9294 Settings
9295 \family default
9296  menu item.
9297  (AGU articles are always in English, right? So 
9298 \emph on
9299 don't
9300 \emph default
9301  choose a language.)
9302 \end_layout
9303
9304 \begin_layout Enumerate
9305 Enter 
9306 \family typewriter
9307 jgrga
9308 \family default
9309  into the document's 
9310 \family sans
9311 Extra Options
9312 \family default
9313  field.
9314  (Yes, this is a bug.)
9315 \end_layout
9316
9317 \begin_layout Enumerate
9318 Make sure you use the 
9319 \family typewriter
9320 agu.bst
9321 \family default
9322  bibliography style, by entering 
9323 \family sans
9324 agu
9325 \family default
9326  into the second field of the BibTeX inset.
9327  None of the standard styles will do.
9328 \end_layout
9329
9330 \begin_layout Section
9331 Broadway
9332 \end_layout
9333
9334 \begin_layout Standard
9335 by 
9336 \shape smallcaps
9337 Garst Reese
9338 \end_layout
9339
9340 \begin_layout Subsection
9341 Introduction
9342 \end_layout
9343
9344 \begin_layout Standard
9345 Broadway is for writing plays.
9346  The format is more decorative than Hollywood, and much less standardized.
9347  This format should be suitable for workshops.
9348 \end_layout
9349
9350 \begin_layout Subsection
9351 Special problems
9352 \end_layout
9353
9354 \begin_layout Standard
9355 The same as in Hollywood.
9356 \end_layout
9357
9358 \begin_layout Subsection
9359 Special features
9360 \end_layout
9361
9362 \begin_layout Standard
9363 Insert the 
9364 \family sans
9365 Speaker
9366 \family default
9367  names as labels then cross-reference the label to insert the name.
9368  The cross-reference dialog will show the current cast of characters.
9369 \end_layout
9370
9371 \begin_layout Subsection
9372 Paper size and Margins
9373 \end_layout
9374
9375 \begin_layout Standard
9376 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9377 \end_layout
9378
9379 \begin_layout Subsection
9380 Environments
9381 \end_layout
9382
9383 \begin_layout Standard
9384 The following environments are available.
9385  You can use broadway.bind to get the bind keys shown at the right.
9386 \end_layout
9387
9388 \begin_layout Itemize
9389
9390 \family sans
9391 Standard
9392 \begin_inset Newline newline
9393 \end_inset
9394
9395
9396 \family default
9397 You should not have to use this, but it is here for anything that does not
9398  fit otherwise.
9399 \end_layout
9400
9401 \begin_layout Itemize
9402
9403 \family sans
9404 Narrative
9405 \begin_inset space \hfill{}
9406 \end_inset
9407
9408 M-z n
9409 \begin_inset Newline newline
9410 \end_inset
9411
9412
9413 \family default
9414 Used to describe stage setting and the action.
9415  First use of speaker names in all CAPs.
9416 \end_layout
9417
9418 \begin_layout Itemize
9419
9420 \family sans
9421 ACT
9422 \begin_inset space \hfill{}
9423 \end_inset
9424
9425 M-z a
9426 \begin_inset Newline newline
9427 \end_inset
9428
9429
9430 \family default
9431 Automatically numbered.
9432  On screen it will be arabic, but will print as Roman.
9433 \end_layout
9434
9435 \begin_layout Itemize
9436
9437 \family sans
9438 ACT*
9439 \begin_inset space \hfill{}
9440 \end_inset
9441
9442 M-z S at
9443 \begin_inset Newline newline
9444 \end_inset
9445
9446
9447 \family default
9448 Subtitle for 
9449 \family sans
9450 ACT.
9451
9452 \family default
9453  It is just centered text.
9454 \end_layout
9455
9456 \begin_layout Itemize
9457
9458 \family sans
9459 SCENE
9460 \begin_inset space \hfill{}
9461 \end_inset
9462
9463 M-z S-S
9464 \begin_inset Newline newline
9465 \end_inset
9466
9467
9468 \family default
9469 Not automatically numbered.
9470  You supply the number.
9471  This is because I couldn't figure out how.
9472 \end_layout
9473
9474 \begin_layout Itemize
9475
9476 \family sans
9477 AT_RISE:
9478 \begin_inset space \hfill{}
9479 \end_inset
9480
9481 M-z S-R
9482 \begin_inset Newline newline
9483 \end_inset
9484
9485
9486 \family default
9487 A special case of Narrative to describe the setting and action as the curtain
9488  rises.
9489 \end_layout
9490
9491 \begin_layout Itemize
9492
9493 \family sans
9494 Speaker
9495 \begin_inset space \hfill{}
9496 \end_inset
9497
9498 M-z s
9499 \begin_inset Newline newline
9500 \end_inset
9501
9502
9503 \family default
9504 The speaker's (actor's) title, centered in all CAPS.
9505 \end_layout
9506
9507 \begin_layout Itemize
9508
9509 \family sans
9510 Parenthetical
9511 \begin_inset space \hfill{}
9512 \end_inset
9513
9514 M-z p
9515 \begin_inset Newline newline
9516 \end_inset
9517
9518
9519 \family default
9520 Instructions to the speaker.
9521  The parentheses are automatically inserted.
9522  The ( will appear on screen, but both will be in the printed play.
9523  This environment is only used within 
9524 \family sans
9525 Dialogue
9526 \family default
9527 .
9528 \end_layout
9529
9530 \begin_layout Itemize
9531
9532 \family sans
9533 Dialogue
9534 \begin_inset space \hfill{}
9535 \end_inset
9536
9537 M-z d
9538 \begin_inset Newline newline
9539 \end_inset
9540
9541
9542 \family default
9543 What the Speaker says.
9544 \end_layout
9545
9546 \begin_layout Itemize
9547
9548 \family sans
9549 CURTAIN
9550 \begin_inset space \hfill{}
9551 \end_inset
9552
9553 M-z S-C
9554 \begin_inset Newline newline
9555 \end_inset
9556
9557
9558 \family default
9559 The curtain comes down.
9560 \end_layout
9561
9562 \begin_layout Itemize
9563
9564 \family sans
9565 Title
9566 \begin_inset space \hfill{}
9567 \end_inset
9568
9569 M-z S-T
9570 \end_layout
9571
9572 \begin_layout Itemize
9573
9574 \family sans
9575 Author
9576 \begin_inset space \hfill{}
9577 \end_inset
9578
9579 M-z S-A
9580 \end_layout
9581
9582 \begin_layout Itemize
9583
9584 \family sans
9585 Right_Address
9586 \begin_inset space \hfill{}
9587 \end_inset
9588
9589 M-z r
9590 \end_layout
9591
9592 \begin_layout Standard
9593 Hello there.
9594 \end_layout
9595
9596 \begin_layout Section
9597 Dinbrief
9598 \end_layout
9599
9600 \begin_layout Standard
9601 The document class 
9602 \family sans
9603 dinbrief
9604 \family default
9605  can be used to type letters according to German conventions.
9606  A template file is included in 
9607 \family typewriter
9608 .../lyx/share/templates
9609 \family default
9610  for you to use as a starting point.
9611 \end_layout
9612
9613 \begin_layout Section
9614 EGS journals (
9615 \family sans
9616 egs
9617 \family default
9618 )
9619 \end_layout
9620
9621 \begin_layout Standard
9622 by 
9623 \shape smallcaps
9624 Martin Vermeer
9625 \end_layout
9626
9627 \begin_layout Subsection
9628 Description
9629 \end_layout
9630
9631 \begin_layout Standard
9632 This is the layout file for the European Geophysical Society journals.
9633  The needed 
9634 \family typewriter
9635 egs.cls
9636 \family default
9637  can be downloaded from the web site of the EGS under 
9638 \begin_inset Flex URL
9639 status collapsed
9640
9641 \begin_layout Plain Layout
9642
9643 www.copernicus.org
9644 \end_layout
9645
9646 \end_inset
9647
9648 .
9649 \end_layout
9650
9651 \begin_layout Subsection
9652 New styles
9653 \end_layout
9654
9655 \begin_layout Standard
9656
9657 \family sans
9658 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9659  Accepted
9660 \family default
9661
9662 \family sans
9663 Offsets
9664 \family default
9665 .
9666  The current layout file is unfortunately very unmodular and would benefit
9667  from using the various 
9668 \family typewriter
9669 std*.inc
9670 \family default
9671  file inclusions.
9672 \end_layout
9673
9674 \begin_layout Section
9675 Elsevier Journals
9676 \end_layout
9677
9678 \begin_layout Standard
9679 By 
9680 \noun on
9681 Rod Pinna
9682 \end_layout
9683
9684 \begin_layout Standard
9685 Elsevier Science Publishers B.V.
9686  provides a standard LaTeX document class (
9687 \family typewriter
9688 elsart.cls
9689 \family default
9690 ) for submitting articles to their various journals.
9691  The style file can be downloaded directly from their web site: 
9692 \begin_inset Flex URL
9693 status collapsed
9694
9695 \begin_layout Plain Layout
9696
9697 http://www.elsevier.com/wps/find/authorsview.authors/latex
9698 \end_layout
9699
9700 \end_inset
9701
9702 .
9703  Instructions are supplied along with the class file, which details the
9704  requirements of the publishers.
9705  LyX includes a package that allows for the use of this class, by a layout
9706  and a template file.
9707  Installation of the class file is the same as for any other LaTeX package;
9708  instructions are provided in the Elsevier documentation.
9709 \end_layout
9710
9711 \begin_layout Standard
9712 To make use of 
9713 \family typewriter
9714 elsart.cls
9715 \family default
9716 , a file 
9717 \family typewriter
9718 elsart.layout
9719 \family default
9720  is supplied.
9721  As the Elsevier class file is based mainly on the standard article class,
9722  most of the normal functionality is provided.
9723  The Elsevier class defines a number of mathematical environments, which
9724  are similar to the AMS environments.
9725  These commands are all described in the Elsevier documentation, and are
9726  available in LyX.
9727 \end_layout
9728
9729 \begin_layout Standard
9730 The easiest way to use the Elsevier style is to base documents on the included
9731  template file.
9732  It is best not to use options such as fancy headings or the geometry package,
9733  as elements such as these are defined by Elsevier in their style file.
9734  Ideally, no extra packages except those mentioned in the Elsevier documentation
9735  should be used.
9736  Essentially, Elsevier require as 
9737 \begin_inset Quotes eld
9738 \end_inset
9739
9740 clean
9741 \begin_inset Quotes erd
9742 \end_inset
9743
9744  a LaTeX file as possible, as their intention is to take the supplied file
9745  and replace the class file with one for the particular journal to which
9746  the paper has been submitted.
9747  This also means that not too much time should be spent on the formating
9748  of the document.
9749  When it comes to be published, this will change anyway.
9750  The rest of the usage for this layout is substantially the same as for
9751  the normal article class.
9752  For details of what Elsevier do and don't allow, refer to their documentation.
9753 \end_layout
9754
9755 \begin_layout Section
9756 Foils [aka 
9757 \family sans
9758 FoilTeX
9759 \family default
9760 ]
9761 \begin_inset CommandInset label
9762 LatexCommand label
9763 name "sec:foiltex"
9764
9765 \end_inset
9766
9767
9768 \end_layout
9769
9770 \begin_layout Standard
9771 by 
9772 \noun on
9773 Allan Rae
9774 \end_layout
9775
9776 \begin_layout Subsection
9777 Introduction
9778 \end_layout
9779
9780 \begin_layout Standard
9781 This section describes how to use LyX to make slides for overhead projectors.
9782  There are two document classes that can do this: the default slides class
9783  and the 
9784 \family sans
9785 FoilTeX
9786 \family default
9787  slides class.
9788  This section documents the latter.
9789 \end_layout
9790
9791 \begin_layout Standard
9792 I'm going to say this again, nice and clear, so that there's no misunderstanding
9793 :
9794 \end_layout
9795
9796 \begin_layout Standard
9797 \begin_inset VSpace bigskip
9798 \end_inset
9799
9800
9801 \end_layout
9802
9803 \begin_layout Standard
9804 \align center
9805
9806 \size large
9807 This section documents the class 
9808 \begin_inset Quotes eld
9809 \end_inset
9810
9811
9812 \family sans
9813 slides (FoilTeX)
9814 \family default
9815
9816 \begin_inset Quotes erd
9817 \end_inset
9818
9819  
9820 \emph on
9821 only.
9822 \end_layout
9823
9824 \begin_layout Standard
9825 \begin_inset VSpace bigskip
9826 \end_inset
9827
9828
9829 \end_layout
9830
9831 \begin_layout Standard
9832 If you're looking for the documentation for 
9833 \begin_inset Quotes eld
9834 \end_inset
9835
9836
9837 \family sans
9838 slides (default)
9839 \family default
9840
9841 \begin_inset Quotes erd
9842 \end_inset
9843
9844 , check out section
9845 \begin_inset space ~
9846 \end_inset
9847
9848
9849 \begin_inset CommandInset ref
9850 LatexCommand ref
9851 reference "sec:slitex"
9852
9853 \end_inset
9854
9855 .
9856  If your machine doesn't have the 
9857 \family sans
9858 foils
9859 \family default
9860  class [
9861 \begin_inset Quotes eld
9862 \end_inset
9863
9864
9865 \family sans
9866 slides (FoilTeX)
9867 \family default
9868
9869 \begin_inset Quotes erd
9870 \end_inset
9871
9872 ] installed, you'll probably have to use the default 
9873 \family sans
9874 slides
9875 \family default
9876  class, which isn't quite as good as 
9877 \family sans
9878 foils.
9879 \end_layout
9880
9881 \begin_layout Standard
9882 The 
9883 \family sans
9884 foils
9885 \family default
9886  class is designed for use with version 2.1 of the 
9887 \family sans
9888 foils.cls
9889 \family default
9890  LaTeX class file which is now an integral part of LaTeX2e.
9891 \end_layout
9892
9893 \begin_layout Subsection
9894 Getting Started
9895 \end_layout
9896
9897 \begin_layout Standard
9898 Obviously, to use this document class, you need to select 
9899 \begin_inset Quotes eld
9900 \end_inset
9901
9902
9903 \family sans
9904 slides (FoilTeX)
9905 \family default
9906
9907 \begin_inset Quotes erd
9908 \end_inset
9909
9910  from the 
9911 \family sans
9912 Class
9913 \family default
9914  entry in the 
9915 \family sans
9916 Document
9917 \begin_inset space ~
9918 \end_inset
9919
9920 Layout
9921 \family default
9922  dialog.
9923  There are some settings in the 
9924 \family sans
9925 Document
9926 \begin_inset space ~
9927 \end_inset
9928
9929 Layout
9930 \family default
9931  dialog that you should know about that are specific to this class:
9932 \end_layout
9933
9934 \begin_layout Itemize
9935 Don't change the options 
9936 \family sans
9937 Sides
9938 \family default
9939  and 
9940 \family sans
9941 Columns
9942 \family default
9943  on the 
9944 \family sans
9945 Document
9946 \begin_inset space ~
9947 \end_inset
9948
9949 Layout
9950 \family default
9951  dialog.
9952  They're ignored by the 
9953 \family sans
9954 foils
9955 \family default
9956  class.
9957 \end_layout
9958
9959 \begin_layout Itemize
9960 The default font size is 20
9961 \begin_inset space \thinspace{}
9962 \end_inset
9963
9964 pt with the other options being 17
9965 \begin_inset space \thinspace{}
9966 \end_inset
9967
9968 pt, 25
9969 \begin_inset space \thinspace{}
9970 \end_inset
9971
9972 pt and 30
9973 \begin_inset space \thinspace{}
9974 \end_inset
9975
9976 pt.
9977 \end_layout
9978
9979 \begin_layout Itemize
9980 The default font is 
9981 \family sans
9982 sans
9983 \family default
9984  
9985 \family sans
9986 serif
9987 \family default
9988  but all math equations are still typeset in the usual roman font.
9989 \end_layout
9990
9991 \begin_layout Itemize
9992
9993 \family sans
9994 FoilTeX
9995 \family default
9996  supports A4 and Letter paper sizes as well as a special size for working
9997  with 35
9998 \begin_inset space \thinspace{}
9999 \end_inset
10000
10001 mm slides.
10002  It doesn't support A5, B5, legal or executive paper sizes.
10003 \end_layout
10004
10005 \begin_layout Itemize
10006 Don't bother changing the 
10007 \family sans
10008 Float Placement
10009 \family default
10010  settings because they are ignored anyway.
10011  All floats appear where they are defined in the text.
10012 \end_layout
10013
10014 \begin_layout Itemize
10015 The 
10016 \family sans
10017 Pagestyle
10018 \family default
10019  setting behaves a bit differently for this class.
10020  
10021 \family sans
10022 FoilTeX
10023 \family default
10024  provides extensive footer and header capabilities including a user-defined
10025  logo.
10026  See section
10027 \begin_inset space ~
10028 \end_inset
10029
10030
10031 \begin_inset CommandInset ref
10032 LatexCommand ref
10033 reference "sec:foilfoot"
10034
10035 \end_inset
10036
10037  for more details.
10038  The title page is treated differently to all other pages in the document
10039  and is 
10040 \emph on
10041 always
10042 \emph default
10043  unnumbered and 
10044 \emph on
10045 always
10046 \emph default
10047  has the logo centered at the bottom of the page (if one is defined).
10048  The possible page style choices and what they do are as follows:
10049 \end_layout
10050
10051 \begin_deeper
10052 \begin_layout Labeling
10053 \labelwidthstring MMMMMMM
10054
10055 \family sans
10056 \series bold
10057 empty
10058 \family default
10059 \series default
10060  The final output contains no page numbers, or other headers or footers
10061  (except footnotes of course).
10062  
10063 \end_layout
10064
10065 \begin_layout Labeling
10066 \labelwidthstring MMMMMMM
10067
10068 \family sans
10069 \series bold
10070 plain
10071 \family default
10072 \series default
10073  The final output contains page numbers centered at the bottom of the page.
10074  No other headings or footers (other than footnotes).
10075 \end_layout
10076
10077 \begin_layout Labeling
10078 \labelwidthstring MMMMMMM
10079
10080 \series bold
10081 foilheadings
10082 \series default
10083  Page numbers in lower right corner.
10084  Additional headers and footers are also shown.
10085  This is also the default.
10086 \end_layout
10087
10088 \begin_layout Labeling
10089 \labelwidthstring MMMMMMM
10090
10091 \series bold
10092 fancy
10093 \series default
10094  Gives you access to the 
10095 \family sans
10096 fancyheadings
10097 \family default
10098  package although its use with 
10099 \family sans
10100 FoilTeX
10101 \family default
10102  is discouraged by the writer of the 
10103 \family sans
10104 FoilTeX
10105 \family default
10106  package because of some potential page layout clashes.
10107 \end_layout
10108
10109 \end_deeper
10110 \begin_layout Subsubsection
10111 Extra Options
10112 \end_layout
10113
10114 \begin_layout Standard
10115 The following options may be used in the extra class options in the 
10116 \family sans
10117 Document\SpecialChar \menuseparator
10118 Settings
10119 \family default
10120  dialog.
10121 \end_layout
10122
10123 \begin_layout Labeling
10124 \labelwidthstring MMMMMMx
10125
10126 \series bold
10127 35mmSlide
10128 \series default
10129  This sets up the page layout for 7.33
10130 \begin_inset space \thinspace{}
10131 \end_inset
10132
10133 in by 11
10134 \begin_inset space \thinspace{}
10135 \end_inset
10136
10137 in paper, which is about the same aspect ratio as a 35
10138 \begin_inset space \thinspace{}
10139 \end_inset
10140
10141 mm slide, making it a bit easier to work with this medium.
10142 \end_layout
10143
10144 \begin_layout Labeling
10145 \labelwidthstring MMMMMMx
10146
10147 \series bold
10148 headrule
10149 \series default
10150  Places a rule across the page below the header on every page except the
10151  title page.
10152 \end_layout
10153
10154 \begin_layout Labeling
10155 \labelwidthstring MMMMMMx
10156
10157 \series bold
10158 footrule
10159 \series default
10160  Places a rule across the page above the footer on every page except the
10161  title page.
10162 \end_layout
10163
10164 \begin_layout Labeling
10165 \labelwidthstring MMMMMMx
10166
10167 \series bold
10168 dvips
10169 \series default
10170  This is automatically set each time you create a new 
10171 \family sans
10172 foils
10173 \family default
10174  document.
10175  This option tells 
10176 \family sans
10177 FoilTeX
10178 \family default
10179  to use the dvips driver to rotate those pages that are set as landscape
10180  foils.
10181 \end_layout
10182
10183 \begin_layout Labeling
10184 \labelwidthstring MMMMMMx
10185
10186 \series bold
10187 landscape
10188 \series default
10189  Simply changes the page dimensions to those of a landscape page but doesn't
10190  do any rotation.
10191  Thus if you use this option you need to use an external program to rotate
10192  each page or feed your paper through your printer as landscape.
10193  Note that this option effectively reverses the roles of the 
10194 \family sans
10195 Foilhead
10196 \family default
10197  and 
10198 \family sans
10199 Rotatefoilhead
10200 \family default
10201  environments (don't worry these are described in the next section).
10202 \end_layout
10203
10204 \begin_layout Labeling
10205 \labelwidthstring MMMMMMx
10206
10207 \series bold
10208 leqno
10209 \series default
10210  Equation numbers on the left.
10211 \end_layout
10212
10213 \begin_layout Labeling
10214 \labelwidthstring MMMMMMx
10215
10216 \series bold
10217 fleqn
10218 \series default
10219  Flush-left equations.
10220 \end_layout
10221
10222 \begin_layout Subsection
10223 Supported Environments
10224 \end_layout
10225
10226 \begin_layout Standard
10227 Most of the environments commonly supported in other classes are also supported
10228  by the 
10229 \family sans
10230 foils
10231 \family default
10232  class.
10233  There are several additional environments provided by 
10234 \family sans
10235 FoilTeX
10236 \family default
10237  as well as a couple added by LyX.
10238  The following environments are shared with other classes:
10239 \end_layout
10240
10241 \begin_layout Standard
10242 \begin_inset ERT
10243 status open
10244
10245 \begin_layout Plain Layout
10246
10247
10248 \backslash
10249 begin{multicols}{2}
10250 \end_layout
10251
10252 \end_inset
10253
10254
10255 \end_layout
10256
10257 \begin_layout Itemize
10258
10259 \family sans
10260 Standard
10261 \end_layout
10262
10263 \begin_layout Itemize
10264
10265 \family sans
10266 Itemize
10267 \end_layout
10268
10269 \begin_layout Itemize
10270
10271 \family sans
10272 Enumerate
10273 \end_layout
10274
10275 \begin_layout Itemize
10276
10277 \family sans
10278 Description
10279 \end_layout
10280
10281 \begin_layout Itemize
10282
10283 \family sans
10284 List
10285 \end_layout
10286
10287 \begin_layout Itemize
10288
10289 \family sans
10290 LyX-Code
10291 \end_layout
10292
10293 \begin_layout Itemize
10294
10295 \family sans
10296 Verse
10297 \end_layout
10298
10299 \begin_layout Itemize
10300
10301 \family sans
10302 Quote
10303 \end_layout
10304
10305 \begin_layout Itemize
10306
10307 \family sans
10308 Quotation
10309 \end_layout
10310
10311 \begin_layout Itemize
10312
10313 \family sans
10314 Title
10315 \end_layout
10316
10317 \begin_layout Itemize
10318
10319 \family sans
10320 Author
10321 \end_layout
10322
10323 \begin_layout Itemize
10324
10325 \family sans
10326 Date
10327 \end_layout
10328
10329 \begin_layout Itemize
10330
10331 \family sans
10332 Abstract
10333 \end_layout
10334
10335 \begin_layout Itemize
10336
10337 \family sans
10338 Bibliography
10339 \end_layout
10340
10341 \begin_layout Itemize
10342
10343 \family sans
10344 Address
10345 \end_layout
10346
10347 \begin_layout Itemize
10348
10349 \family sans
10350 RightAddress
10351 \end_layout
10352
10353 \begin_layout Itemize
10354
10355 \family sans
10356 Caption
10357 \end_layout
10358
10359 \begin_layout Itemize
10360
10361 \family sans
10362 Comment
10363 \end_layout
10364
10365 \begin_layout Standard
10366 \begin_inset ERT
10367 status open
10368
10369 \begin_layout Plain Layout
10370
10371
10372 \backslash
10373 end{multicols}
10374 \end_layout
10375
10376 \end_inset
10377
10378
10379 \end_layout
10380
10381 \begin_layout Standard
10382 That is, all the major environments apart from the sectioning environments.
10383  Since foils are essentially self-contained sections, with a title and body,
10384  
10385 \family sans
10386 FoilTeX
10387 \family default
10388  provides specific commands for starting new foils and these are:
10389 \end_layout
10390
10391 \begin_layout Itemize
10392
10393 \family sans
10394 Foilhead
10395 \end_layout
10396
10397 \begin_layout Itemize
10398
10399 \family sans
10400 Rotatefoilhead
10401 \end_layout
10402
10403 \begin_layout Standard
10404 LyX also provides slightly modified versions of these two environments called:
10405 \end_layout
10406
10407 \begin_layout Itemize
10408
10409 \family sans
10410 ShortFoilhead
10411 \end_layout
10412
10413 \begin_layout Itemize
10414
10415 \family sans
10416 ShortRotatefoilhead
10417 \end_layout
10418
10419 \begin_layout Standard
10420 and the differences will be explained in the next section.
10421 \end_layout
10422
10423 \begin_layout Standard
10424 Since foils are often used in presenting ideas or new theorems and such
10425  
10426 \family sans
10427 FoilTeX
10428 \family default
10429  also provides a comprehensive box of goodies for presenting them:
10430 \end_layout
10431
10432 \begin_layout Standard
10433 \begin_inset ERT
10434 status open
10435
10436 \begin_layout Plain Layout
10437
10438
10439 \backslash
10440 begin{multicols}{2}
10441 \end_layout
10442
10443 \end_inset
10444
10445
10446 \end_layout
10447
10448 \begin_layout Itemize
10449
10450 \family sans
10451 Theorem
10452 \end_layout
10453
10454 \begin_layout Itemize
10455
10456 \family sans
10457 Lemma
10458 \end_layout
10459
10460 \begin_layout Itemize
10461
10462 \family sans
10463 Corollary
10464 \end_layout
10465
10466 \begin_layout Itemize
10467
10468 \family sans
10469 Proposition
10470 \end_layout
10471
10472 \begin_layout Itemize
10473
10474 \family sans
10475 Definition
10476 \end_layout
10477
10478 \begin_layout Itemize
10479
10480 \family sans
10481 Proof
10482 \end_layout
10483
10484 \begin_layout Itemize
10485
10486 \family sans
10487 Theorem*
10488 \end_layout
10489
10490 \begin_layout Itemize
10491
10492 \family sans
10493 Lemma*
10494 \end_layout
10495
10496 \begin_layout Itemize
10497
10498 \family sans
10499 Corollary*
10500 \end_layout
10501
10502 \begin_layout Itemize
10503
10504 \family sans
10505 Proposition*
10506 \end_layout
10507
10508 \begin_layout Itemize
10509
10510 \family sans
10511 Definition*
10512 \end_layout
10513
10514 \begin_layout Standard
10515 \begin_inset ERT
10516 status open
10517
10518 \begin_layout Plain Layout
10519
10520
10521 \backslash
10522 end{multicols}
10523 \end_layout
10524
10525 \end_inset
10526
10527
10528 \end_layout
10529
10530 \begin_layout Standard
10531 The starred versions are unnumbered while the unstarred versions are numbered.
10532  There are also two list environments added by LyX and these are:
10533 \end_layout
10534
10535 \begin_layout Itemize
10536
10537 \family sans
10538 TickList
10539 \end_layout
10540
10541 \begin_layout Itemize
10542
10543 \family sans
10544 CrossList
10545 \end_layout
10546
10547 \begin_layout Standard
10548
10549 \family sans
10550 FoilTeX
10551 \family default
10552  provides some powerful header and footer capabilities that are best set
10553  in the preamble although they may be set at any point in a document.
10554  If you want to change these settings in your document the best place to
10555  do so is at the very top of a foil, i.
10556 \begin_inset space \thinspace{}
10557 \end_inset
10558
10559 g.
10560 \emph on
10561
10562 \begin_inset space \space{}
10563 \end_inset
10564
10565
10566 \emph default
10567 straight after the foilhead.
10568 \end_layout
10569
10570 \begin_layout Standard
10571 For this purpose, the following command styles are provided [
10572 \shape smallcaps
10573 Martin Vermeer
10574 \shape default
10575 ]:
10576 \end_layout
10577
10578 \begin_layout Standard
10579 \begin_inset ERT
10580 status open
10581
10582 \begin_layout Plain Layout
10583
10584
10585 \backslash
10586 begin{multicols}{2}
10587 \end_layout
10588
10589 \end_inset
10590
10591
10592 \end_layout
10593
10594 \begin_layout Itemize
10595
10596 \family sans
10597 My
10598 \begin_inset space ~
10599 \end_inset
10600
10601 Logo
10602 \end_layout
10603
10604 \begin_layout Itemize
10605
10606 \family sans
10607 Restriction
10608 \end_layout
10609
10610 \begin_layout Itemize
10611
10612 \family sans
10613 Right
10614 \begin_inset space ~
10615 \end_inset
10616
10617 Footer
10618 \end_layout
10619
10620 \begin_layout Itemize
10621
10622 \family sans
10623 Right
10624 \begin_inset space ~
10625 \end_inset
10626
10627 Header
10628 \end_layout
10629
10630 \begin_layout Itemize
10631
10632 \family sans
10633 Left
10634 \begin_inset space ~
10635 \end_inset
10636
10637 Header
10638 \end_layout
10639
10640 \begin_deeper
10641 \begin_layout Standard
10642 \begin_inset space ~
10643 \end_inset
10644
10645
10646 \end_layout
10647
10648 \end_deeper
10649 \begin_layout Standard
10650 \begin_inset ERT
10651 status open
10652
10653 \begin_layout Plain Layout
10654
10655
10656 \backslash
10657 end{multicols}
10658 \end_layout
10659
10660 \end_inset
10661
10662
10663 \end_layout
10664
10665 \begin_layout Standard
10666 There are also a few commands provided by 
10667 \family sans
10668 FoilTeX
10669 \family default
10670  that aren't directly supported by LyX but I'll tell you what they do and
10671  how to use them in section
10672 \begin_inset space ~
10673 \end_inset
10674
10675
10676 \begin_inset CommandInset ref
10677 LatexCommand ref
10678 reference "sec:unsuppfoils"
10679
10680 \end_inset
10681
10682 .
10683 \end_layout
10684
10685 \begin_layout Subsection
10686 Building a Set of Foils
10687 \end_layout
10688
10689 \begin_layout Standard
10690 This section will give a simple introduction to using the different environments
10691  to build a set of foils.
10692  If you want to see an example set of foils, take a look at the 
10693 \family typewriter
10694 Foils.lyx
10695 \family default
10696  file you find in LyX's 
10697 \family typewriter
10698 examples
10699 \family default
10700  folder.
10701 \end_layout
10702
10703 \begin_layout Subsubsection
10704 Give It a Title Page
10705 \end_layout
10706
10707 \begin_layout Standard
10708 Unlike other classes that provide 
10709 \family sans
10710 Title
10711 \family default
10712
10713 \family sans
10714 Author
10715 \family default
10716
10717 \family sans
10718 Date
10719 \family default
10720  and 
10721 \family sans
10722 Abstract
10723 \family default
10724  environments, 
10725 \family sans
10726 foils
10727 \family default
10728  creates the title on a page of its own.
10729  If you leave out the 
10730 \family sans
10731 Date
10732 \family default
10733  environment LaTeX will substitute the current date (every time you regenerate
10734  the output).
10735 \end_layout
10736
10737 \begin_layout Subsubsection
10738 Start a New Foil
10739 \end_layout
10740
10741 \begin_layout Standard
10742 As I mentioned earlier, there are four ways of starting a new foil.
10743  For portrait foils you should use 
10744 \family sans
10745 Foilhead
10746 \family default
10747  or 
10748 \family sans
10749 ShortFoilhead.
10750
10751 \family default
10752  The difference between these two environments is the amount of space between
10753  the title of the foil (the foilhead) and the body of the foil.
10754 \end_layout
10755
10756 \begin_layout Standard
10757 Landscape foils are generated using the 
10758 \family sans
10759 Rotatefoilhead
10760 \family default
10761  and 
10762 \family sans
10763 ShortRotatefoilhead
10764 \family default
10765  environments.
10766  Again the only difference is the spacing between foilhead and body.
10767  Both of the short versions have 0.5 inches less separation between the foilhead
10768  and the body.
10769  
10770 \end_layout
10771
10772 \begin_layout Standard
10773 One problem with the support for landscape foils is the requirement that
10774  you have to use the 
10775 \family typewriter
10776 dvips
10777 \family default
10778  driver to generate the PostScript output otherwise the foils won't be rotated.
10779  It is possible to get landscape foils even if you haven't got the 
10780 \family typewriter
10781 dvips
10782 \family default
10783  driver provided you can feed your foils sideways through your printer ;-)
10784 \end_layout
10785
10786 \begin_layout Subsubsection
10787 Theorems, Lemmas, Proofs and more
10788 \end_layout
10789
10790 \begin_layout Standard
10791 Due to a small bug in LyX you can't have two of the same type of these environme
10792 nts directly following each other.
10793  They must be separated by something.
10794  If you try, you will just be extending the previous environment as if you
10795  had merged the two environments together.
10796  So, how do you get around this problem? The simplest option is to insert
10797  some text between the two environments or add a 
10798 \family sans
10799 LaTeX
10800 \family default
10801  environment between the two with just a 
10802 \begin_inset Quotes eld
10803 \end_inset
10804
10805
10806 \family typewriter
10807 %
10808 \family default
10809
10810 \begin_inset Quotes erd
10811 \end_inset
10812
10813  in it.
10814  This will force LyX to produce two separate environments and hence the
10815  correct LaTeX output.
10816  An example is provided in the example file included with the LyX distribution.
10817  Remember, this problem only occurs if you are trying to place two of the
10818  same type of theorem-like environments one directly after the other.
10819 \end_layout
10820
10821 \begin_layout Subsubsection
10822 Lists
10823 \end_layout
10824
10825 \begin_layout Standard
10826 You get all the commonly supported list styles found in other classes as
10827  well as two new ones.
10828  I'll only describe the new ones here.
10829  If you want to find out more about the other list environments check out
10830  the 
10831 \emph on
10832 User's Guide.
10833
10834 \emph default
10835  If you intend to use itemized lists you might also want to read about the
10836  
10837 \family sans
10838 Itemize
10839 \begin_inset space ~
10840 \end_inset
10841
10842 Bullet
10843 \begin_inset space ~
10844 \end_inset
10845
10846 Selection
10847 \family default
10848  dialog described above in section
10849 \begin_inset space ~
10850 \end_inset
10851
10852
10853 \begin_inset CommandInset ref
10854 LatexCommand ref
10855 reference "sec:bullet"
10856
10857 \end_inset
10858
10859 .
10860 \end_layout
10861
10862 \begin_layout Standard
10863 The two new list styles, 
10864 \family sans
10865 TickList
10866 \family default
10867  and 
10868 \family sans
10869 CrossList
10870 \family default
10871 , are designed to make it easier for you to create lists of do's and don'ts
10872  or right and wrong by providing dedicated environments that use a tick
10873  or a cross as the label of the list.
10874  These lists are in fact dedicated variants of the 
10875 \family sans
10876 Itemize
10877 \family default
10878  environment.
10879  They do however require that you have the 
10880 \family typewriter
10881 psnfss
10882 \family default
10883  packages installed.
10884 \end_layout
10885
10886 \begin_layout Subsubsection
10887 Figures and Tables
10888 \end_layout
10889
10890 \begin_layout Standard
10891
10892 \family sans
10893 FoilTeX
10894 \family default
10895  redefines the floating tables and figures so that they appear exactly where
10896  they are in the text rather than pushing them to the top of the page or
10897  to some user specified location.
10898  In fact if you change the float placement settings they are simply ignored.
10899 \end_layout
10900
10901 \begin_layout Subsubsection
10902 Page Headers and Footers
10903 \begin_inset CommandInset label
10904 LatexCommand label
10905 name "sec:foilfoot"
10906
10907 \end_inset
10908
10909
10910 \end_layout
10911
10912 \begin_layout Standard
10913
10914 \family sans
10915 My
10916 \begin_inset space ~
10917 \end_inset
10918
10919 Logo
10920 \family default
10921  and 
10922 \family sans
10923 Restriction
10924 \family default
10925  are two commands used to control the left-footer text string.
10926  The first is meant to allow you to include a graphic logo on your foils
10927  and defaults to 
10928 \begin_inset Quotes eld
10929 \end_inset
10930
10931 -Typeset by 
10932 \family sans
10933 FoilTeX
10934 \family default
10935 -
10936 \begin_inset Quotes erd
10937 \end_inset
10938
10939 .
10940  While the second is meant to provide a classification for the audience,
10941  
10942 \emph on
10943 e.
10944 \begin_inset space \thinspace{}
10945 \end_inset
10946
10947 g.
10948 \emph default
10949
10950 \begin_inset space \space{}
10951 \end_inset
10952
10953 Confidential.
10954  It is empty by default.
10955 \end_layout
10956
10957 \begin_layout Standard
10958 The remaining page corners can be filled by 
10959 \family sans
10960 Right
10961 \begin_inset space ~
10962 \end_inset
10963
10964 Footer
10965 \family default
10966  (which defaults to page numbers), 
10967 \family sans
10968 Right
10969 \begin_inset space ~
10970 \end_inset
10971
10972 Header
10973 \family default
10974  (top right) and 
10975 \family sans
10976 Left
10977 \begin_inset space ~
10978 \end_inset
10979
10980 Header
10981 \family default
10982  (top left).
10983 \end_layout
10984
10985 \begin_layout Subsection
10986 Unsupported 
10987 \family sans
10988 FoilTeX
10989 \family default
10990  Goodies
10991 \begin_inset CommandInset label
10992 LatexCommand label
10993 name "sec:unsuppfoils"
10994
10995 \end_inset
10996
10997
10998 \end_layout
10999
11000 \begin_layout Standard
11001 All the commands mentioned below need to be set in a 
11002 \family sans
11003 LaTeX
11004 \family default
11005  environment or as 
11006 \family sans
11007 TeX
11008 \family default
11009  within another environment.
11010 \end_layout
11011
11012 \begin_layout Subsubsection
11013 Lengths
11014 \end_layout
11015
11016 \begin_layout Standard
11017 All lengths are adjusted using the 
11018 \family typewriter
11019
11020 \backslash
11021 setlength{
11022 \family default
11023 \emph on
11024 lengthname
11025 \family typewriter
11026 \emph default
11027 }{
11028 \family default
11029 \emph on
11030 newlength
11031 \family typewriter
11032 \emph default
11033 }
11034 \family default
11035  command.
11036  Where 
11037 \emph on
11038 lengthname
11039 \emph default
11040  should be replaced by the name given to the length you want to change and
11041  
11042 \emph on
11043 newlength
11044 \emph default
11045  is the length value.
11046  All lengths should be specified in units of length such as inches (
11047 \family typewriter
11048 in
11049 \family default
11050 ), millimeters (
11051 \family typewriter
11052 mm
11053 \family default
11054 ) or points (
11055 \family typewriter
11056 pt
11057 \family default
11058 ) or relative to some document or font-based length such as 
11059 \family typewriter
11060
11061 \backslash
11062 textwidth
11063 \family default
11064 .
11065  
11066 \end_layout
11067
11068 \begin_layout Standard
11069 It's possible to change the spacing between a foilhead and the body of the
11070  foil by adjusting the length specified by 
11071 \family typewriter
11072
11073 \backslash
11074 foilheadskip
11075 \family default
11076 .
11077  For example, to make 
11078 \emph on
11079 all
11080 \emph default
11081  foilheads 0.5
11082 \begin_inset space \space{}
11083 \end_inset
11084
11085 in closer to their bodies put the following in the preamble: 
11086 \family typewriter
11087
11088 \backslash
11089 setlength{
11090 \backslash
11091 foilheadskip}{-0.5in}
11092 \end_layout
11093
11094 \begin_layout Standard
11095 The spacings around floats can be adjusted by setting these lengths:
11096 \end_layout
11097
11098 \begin_layout Labeling
11099 \labelwidthstring MMMMMMMMMMM
11100
11101 \family typewriter
11102
11103 \backslash
11104 abovefloatskip
11105 \family default
11106  Separation between the text and the top of the float
11107 \end_layout
11108
11109 \begin_layout Labeling
11110 \labelwidthstring MMMMMMMMMMM
11111
11112 \family typewriter
11113
11114 \backslash
11115 abovecaptionskip
11116 \family default
11117  Separation between the float and the caption
11118 \end_layout
11119
11120 \begin_layout Labeling
11121 \labelwidthstring MMMMMMMMMMM
11122
11123 \family typewriter
11124
11125 \backslash
11126 belowcaptionskip
11127 \family default
11128  Separation between the caption and the following text
11129 \end_layout
11130
11131 \begin_layout Labeling
11132 \labelwidthstring MMMMMMMMMMM
11133
11134 \family typewriter
11135
11136 \backslash
11137 captionwidth
11138 \family default
11139  You can make the captions narrower than the surrounding text by adjusting
11140  this length.
11141  Best done relative to 
11142 \family typewriter
11143
11144 \backslash
11145 textwidth
11146 \family default
11147 .
11148 \end_layout
11149
11150 \begin_layout Standard
11151 There are also several title page related lengths that you may find useful
11152  if you have a long title or several authors:
11153 \end_layout
11154
11155 \begin_layout Labeling
11156 \labelwidthstring MMMMMMMMMMM
11157
11158 \family typewriter
11159
11160 \backslash
11161 abovetitleskip
11162 \family default
11163  Separation from headers to 
11164 \family sans
11165 Title
11166 \end_layout
11167
11168 \begin_layout Labeling
11169 \labelwidthstring MMMMMMMMMMM
11170
11171 \family typewriter
11172
11173 \backslash
11174 titleauthorskip
11175 \family default
11176  between 
11177 \family sans
11178 Title
11179 \family default
11180  and 
11181 \family sans
11182 Author
11183 \family default
11184  environments
11185 \end_layout
11186
11187 \begin_layout Labeling
11188 \labelwidthstring MMMMMMMMMMM
11189
11190 \family typewriter
11191
11192 \backslash
11193 authorauthorskip
11194 \family default
11195  between multiple 
11196 \family sans
11197 Author
11198 \family default
11199  lines
11200 \end_layout
11201
11202 \begin_layout Labeling
11203 \labelwidthstring MMMMMMMMMMM
11204
11205 \family typewriter
11206
11207 \backslash
11208 authordateskip
11209 \family default
11210  between the 
11211 \family sans
11212 Author
11213 \family default
11214  and the 
11215 \family sans
11216 Date
11217 \end_layout
11218
11219 \begin_layout Labeling
11220 \labelwidthstring MMMMMMMMMMM
11221
11222 \family typewriter
11223
11224 \backslash
11225 dateabstractskip
11226 \family default
11227  between the 
11228 \family sans
11229 Date
11230 \family default
11231  and the 
11232 \family sans
11233 Abstract
11234 \end_layout
11235
11236 \begin_layout Standard
11237 The last length related command affects all the list environments.
11238  If you place 
11239 \family typewriter
11240
11241 \backslash
11242 zerolistvertdimens
11243 \family default
11244  
11245 \emph on
11246 inside
11247 \emph default
11248  a list environment then all the vertical spacing between the list items
11249  is removed.
11250  Note that this is a command not a length so it doesn't require 
11251 \family typewriter
11252
11253 \backslash
11254 setlength
11255 \family default
11256  like the stuff mentioned above.
11257 \end_layout
11258
11259 \begin_layout Subsubsection
11260 Headers and Footers
11261 \end_layout
11262
11263 \begin_layout Standard
11264 The 
11265 \family typewriter
11266
11267 \backslash
11268 LogoOn
11269 \family default
11270  and 
11271 \family typewriter
11272
11273 \backslash
11274 LogoOff
11275 \family default
11276  commands control whether the logo in the 
11277 \family sans
11278 MyLogo
11279 \family default
11280  definition appear on a given page.
11281  If you put 
11282 \family typewriter
11283
11284 \backslash
11285 LogoOff
11286 \family default
11287  in the preamble then none of the foils will have the logo on them.
11288  If you don't want the logo on a particular page place the 
11289 \family typewriter
11290
11291 \backslash
11292 LogoOff
11293 \family default
11294  directly after the foilhead of that page and the 
11295 \family typewriter
11296
11297 \backslash
11298 LogoOn
11299 \family default
11300  directly after the next foilhead.
11301 \end_layout
11302
11303 \begin_layout Standard
11304 If you decide to use the 
11305 \family sans
11306 fancy
11307 \family default
11308  page style setting in the 
11309 \family sans
11310 Document
11311 \begin_inset space ~
11312 \end_inset
11313
11314 Layout
11315 \family default
11316  dialog you should probably add 
11317 \family typewriter
11318
11319 \backslash
11320 let
11321 \backslash
11322 headwidth
11323 \backslash
11324 textwidth
11325 \family default
11326  to your preamble so headers and footers on landscape pages are correctly
11327  placed when rotated.
11328  This is due to some clashes between the page layouts provided by the 
11329 \family sans
11330 fancyheadings
11331 \family default
11332  package and the 
11333 \family sans
11334 foils
11335 \family default
11336  class.
11337 \end_layout
11338
11339 \begin_layout Section
11340 Hollywood (Hollywood spec scripts)
11341 \end_layout
11342
11343 \begin_layout Standard
11344 by 
11345 \shape smallcaps
11346 Garst Reese
11347 \end_layout
11348
11349 \begin_layout Subsection
11350 Introduction
11351 \end_layout
11352
11353 \begin_layout Standard
11354 Getting the format of a Hollywood script right is a 
11355 \begin_inset Quotes eld
11356 \end_inset
11357
11358 rite of passage.
11359 \begin_inset Quotes erd
11360 \end_inset
11361
11362  It is designed to make the readers focus on content and to be easy and
11363  familiar for the actors to read.
11364  Each page of a script should be one minute of film.
11365  Nothing goes in a script that you cannot see or hear on screen.
11366  The courier 12 pt font should be used throughout.
11367  No italics.
11368 \end_layout
11369
11370 \begin_layout Subsection
11371 Special problems
11372 \end_layout
11373
11374 \begin_layout Standard
11375 Speakers' lines should NEVER break in mid-sentence.
11376  If a speaker's lines continue over a page break, repeat the 
11377 \family sans
11378 Speaker
11379 \family default
11380  title followed by (Cont'd).
11381 \end_layout
11382
11383 \begin_layout Subsection
11384 Special features
11385 \end_layout
11386
11387 \begin_layout Standard
11388 Insert the 
11389 \family sans
11390 Speaker
11391 \family default
11392  names as labels then cross-reference the label to insert the name.
11393  The cross-reference dialog will show the current cast of characters.
11394  You can use this to insert the speaker name in narratives also.
11395 \end_layout
11396
11397 \begin_layout Subsection
11398 Paper size and Margins
11399 \end_layout
11400
11401 \begin_layout Standard
11402 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11403 \end_layout
11404
11405 \begin_layout Subsection
11406 Environments
11407 \end_layout
11408
11409 \begin_layout Standard
11410 The following environments are available.
11411  You can use hollywood.bind to get the bind keys shown at the right.
11412 \end_layout
11413
11414 \begin_layout Itemize
11415
11416 \family sans
11417 Standard
11418 \begin_inset Newline newline
11419 \end_inset
11420
11421
11422 \family default
11423 Used where nothing else works.
11424  Try to avoid it.
11425 \end_layout
11426
11427 \begin_layout Itemize
11428
11429 \family sans
11430 FADE_IN
11431 \family default
11432 :
11433 \begin_inset space \hfill{}
11434 \end_inset
11435
11436
11437 \family sans
11438 M-z S-I
11439 \family default
11440
11441 \begin_inset Newline newline
11442 \end_inset
11443
11444 Usually followed by something like 
11445 \begin_inset Quotes eld
11446 \end_inset
11447
11448 on Sally waking up.
11449 \begin_inset Quotes erd
11450 \end_inset
11451
11452
11453 \end_layout
11454
11455 \begin_layout Itemize
11456
11457 \family sans
11458 INT:
11459 \begin_inset space \hfill{}
11460 \end_inset
11461
11462 M-z i
11463 \begin_inset Newline newline
11464 \end_inset
11465
11466
11467 \family default
11468 Introduces a new INTERIOR camera set-up.
11469  Always followed by DAY or NIGHT, or something similar to define the lighting
11470  required.
11471  Everthing on this line in CAPS.
11472 \end_layout
11473
11474 \begin_layout Itemize
11475
11476 \family sans
11477 EXT:
11478 \begin_inset space \hfill{}
11479 \end_inset
11480
11481 M-z e
11482 \begin_inset Newline newline
11483 \end_inset
11484
11485
11486 \family default
11487 Introduces a new EXTERIOR camera set-up.
11488  Everthing on this line in CAPS.
11489 \end_layout
11490
11491 \begin_layout Itemize
11492
11493 \family sans
11494 Speaker
11495 \begin_inset space \hfill{}
11496 \end_inset
11497
11498 M-z s
11499 \begin_inset Newline newline
11500 \end_inset
11501
11502
11503 \family default
11504 The character speaking.
11505 \end_layout
11506
11507 \begin_layout Itemize
11508
11509 \family sans
11510 Parenthetical
11511 \begin_inset space \hfill{}
11512 \end_inset
11513
11514 M-z p
11515 \begin_inset Newline newline
11516 \end_inset
11517
11518
11519 \family default
11520 Instructions to the speaker.
11521  The () are automatically inserted, but only the ( will show in LyX.
11522  Both will be printed.
11523 \end_layout
11524
11525 \begin_layout Itemize
11526
11527 \family sans
11528 Dialogue
11529 \begin_inset space \hfill{}
11530 \end_inset
11531
11532 M-z d
11533 \begin_inset Newline newline
11534 \end_inset
11535
11536
11537 \family default
11538 What the 
11539 \family sans
11540 Speaker
11541 \family default
11542  says.
11543 \end_layout
11544
11545 \begin_layout Itemize
11546
11547 \family sans
11548 Transition
11549 \begin_inset space \hfill{}
11550 \end_inset
11551
11552 M-z t
11553 \begin_inset Newline newline
11554 \end_inset
11555
11556
11557 \family default
11558 Camera movement instruction.
11559  e.
11560 \begin_inset space \thinspace{}
11561 \end_inset
11562
11563 g.
11564 \begin_inset space \space{}
11565 \end_inset
11566
11567 CUT TO:
11568 \end_layout
11569
11570 \begin_layout Itemize
11571
11572 \family sans
11573 FADE OUT:
11574 \begin_inset space \hfill{}
11575 \end_inset
11576
11577 M-z S-I
11578 \end_layout
11579
11580 \begin_layout Itemize
11581
11582 \family sans
11583 Author
11584 \begin_inset space \hfill{}
11585 \end_inset
11586
11587 M-z S-A
11588 \end_layout
11589
11590 \begin_layout Itemize
11591
11592 \family sans
11593 Title
11594 \begin_inset space \hfill{}
11595 \end_inset
11596
11597 M-z S-T
11598 \end_layout
11599
11600 \begin_layout Itemize
11601
11602 \family sans
11603 Right_Address
11604 \begin_inset space \hfill{}
11605 \end_inset
11606
11607 M-z r
11608 \end_layout
11609
11610 \begin_layout Subsection
11611 Script jargon
11612 \end_layout
11613
11614 \begin_layout Itemize
11615 (O.S) — off screen
11616 \end_layout
11617
11618 \begin_layout Itemize
11619 (V.0) — voice over
11620 \end_layout
11621
11622 \begin_layout Itemize
11623 b.
11624 \begin_inset space \thinspace{}
11625 \end_inset
11626
11627 g.
11628  — background
11629 \end_layout
11630
11631 \begin_layout Itemize
11632 C.U.
11633  — close-up
11634 \end_layout
11635
11636 \begin_layout Itemize
11637 PAN — camera movement
11638 \end_layout
11639
11640 \begin_layout Itemize
11641 INSERT — cut to close-up of
11642 \end_layout
11643
11644 \begin_layout Section
11645 ijmpc and ijmpd
11646 \end_layout
11647
11648 \begin_layout Standard
11649 by 
11650 \noun on
11651 Panayotis Papasotiriou
11652 \end_layout
11653
11654 \begin_layout Subsection
11655 Overview
11656 \end_layout
11657
11658 \begin_layout Standard
11659 The ijmpc package is a set of macros that facilitates electronic manuscript
11660  submission to the 
11661 \emph on
11662 International Journal of Modern Physics C
11663 \emph default
11664 .
11665  Similarly, the ijmpd package is for creating manuscripts to be submitted
11666  to the 
11667 \emph on
11668 International Journal of Modern Physics D
11669 \emph default
11670 .
11671  Both journals are published by World Scientific.
11672  The corresponding document classes are named 
11673 \family typewriter
11674 ws-ijmpc.cls
11675 \family default
11676  and 
11677 \family typewriter
11678 ws-ijmpd.cls
11679 \family default
11680 , respectively.
11681  These files, together with instructions for the authors, can be downloaded
11682  from the sites 
11683 \begin_inset Flex URL
11684 status collapsed
11685
11686 \begin_layout Plain Layout
11687
11688 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11689 \end_layout
11690
11691 \end_inset
11692
11693  and 
11694 \begin_inset Flex URL
11695 status collapsed
11696
11697 \begin_layout Plain Layout
11698
11699 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11700 \end_layout
11701
11702 \end_inset
11703
11704 .
11705  Both packages are modified versions of the standard 
11706 \begin_inset Quotes eld
11707 \end_inset
11708
11709 article
11710 \begin_inset Quotes erd
11711 \end_inset
11712
11713  package, and they are almost (but not exactly) identical.
11714  Most of their features are supported by LyX.
11715  I have used LyX successfully to write articles submitted to both journals
11716  without any problem.
11717 \end_layout
11718
11719 \begin_layout Subsection
11720 Writing a paper
11721 \end_layout
11722
11723 \begin_layout Standard
11724 As usual, the easiest way to write a paper is to start with a template.
11725  Click on 
11726 \family sans
11727 File\SpecialChar \menuseparator
11728 New from
11729 \family default
11730  
11731 \family sans
11732 \bar under
11733 T
11734 \bar default
11735 emplate
11736 \family default
11737 , then choose the 
11738 \family typewriter
11739 ijmpc.lyx
11740 \family default
11741  or 
11742 \family typewriter
11743 ijmpd.lyx
11744 \family default
11745  template.
11746  This will give an (almost) empty document that includes the most common
11747  fields found in a manuscript.
11748  Simply overwrite the existing text (including the brackets, 
11749 \family typewriter
11750 <>
11751 \family default
11752 ) with your text.
11753  You should keep in mind the following remarks.
11754 \end_layout
11755
11756 \begin_layout Enumerate
11757 LyX won't let you change the font size and the page style of the document,
11758  because such modifications are not allowed by both packages.
11759 \end_layout
11760
11761 \begin_layout Enumerate
11762 The language of the document should not be changed.
11763  Before previewing your paper, be sure that the babel package is not used.
11764  To do this, click on 
11765 \family sans
11766 Tools\SpecialChar \menuseparator
11767 Preferences
11768 \family default
11769 , select the 
11770 \family sans
11771 Lang Opts
11772 \family default
11773  tab, deselect the 
11774 \family sans
11775 Use babel
11776 \family default
11777  checkbox in the language settings, and click on 
11778 \family sans
11779 Apply
11780 \family default
11781  (or 
11782 \family sans
11783 Save
11784 \family default
11785 , if you wish to make this change permanent).
11786 \end_layout
11787
11788 \begin_layout Enumerate
11789 The 
11790 \begin_inset Quotes eld
11791 \end_inset
11792
11793 Keywords
11794 \begin_inset Quotes erd
11795 \end_inset
11796
11797  style must be used to define keywords.
11798 \end_layout
11799
11800 \begin_layout Enumerate
11801 The ijmpc package provides a style named 
11802 \begin_inset Quotes eld
11803 \end_inset
11804
11805 Classification Codes
11806 \begin_inset Quotes erd
11807 \end_inset
11808
11809 , which can be used to define classification codes, such as PACS numbers.
11810  Note that this facility is not supported by the ijmpd package.
11811 \end_layout
11812
11813 \begin_layout Enumerate
11814 Several new environments are available: 
11815 \begin_inset Quotes eld
11816 \end_inset
11817
11818 Definition
11819 \begin_inset Quotes erd
11820 \end_inset
11821
11822
11823 \begin_inset Quotes eld
11824 \end_inset
11825
11826 Step
11827 \begin_inset Quotes erd
11828 \end_inset
11829
11830
11831 \begin_inset Quotes eld
11832 \end_inset
11833
11834 Example
11835 \begin_inset Quotes erd
11836 \end_inset
11837
11838
11839 \begin_inset Quotes eld
11840 \end_inset
11841
11842 Remark
11843 \begin_inset Quotes erd
11844 \end_inset
11845
11846
11847 \begin_inset Quotes eld
11848 \end_inset
11849
11850 Notation
11851 \begin_inset Quotes erd
11852 \end_inset
11853
11854
11855 \begin_inset Quotes eld
11856 \end_inset
11857
11858 Theorem
11859 \begin_inset Quotes erd
11860 \end_inset
11861
11862
11863 \begin_inset Quotes eld
11864 \end_inset
11865
11866 Proof
11867 \begin_inset Quotes erd
11868 \end_inset
11869
11870
11871 \begin_inset Quotes eld
11872 \end_inset
11873
11874 Corollary
11875 \begin_inset Quotes erd
11876 \end_inset
11877
11878
11879 \begin_inset Quotes eld
11880 \end_inset
11881
11882 Lemma
11883 \begin_inset Quotes erd
11884 \end_inset
11885
11886
11887 \begin_inset Quotes eld
11888 \end_inset
11889
11890 Proposition
11891 \begin_inset Quotes erd
11892 \end_inset
11893
11894
11895 \begin_inset Quotes eld
11896 \end_inset
11897
11898 Prop
11899 \begin_inset Quotes erd
11900 \end_inset
11901
11902
11903 \begin_inset Quotes eld
11904 \end_inset
11905
11906 Question
11907 \begin_inset Quotes erd
11908 \end_inset
11909
11910
11911 \begin_inset Quotes eld
11912 \end_inset
11913
11914 Claim
11915 \begin_inset Quotes erd
11916 \end_inset
11917
11918 , and 
11919 \begin_inset Quotes eld
11920 \end_inset
11921
11922 Conjecture
11923 \begin_inset Quotes erd
11924 \end_inset
11925
11926 .
11927  Their use is more or less obvious.
11928  LyX supports all these environments; it will use the proper label, text
11929  style, and numbering scheme for each of them.
11930 \end_layout
11931
11932 \begin_layout Enumerate
11933 Both packages use basic citations; the natbib package should not be used.
11934  In LyX, citation references are shown as usual; in the output, citations
11935  are shown as superscripts.
11936  If you want to use a citation as normal text, you should use the 
11937 \family typewriter
11938 refcite
11939 \family default
11940  command, e.
11941 \begin_inset space \thinspace{}
11942 \end_inset
11943
11944 g.
11945 \begin_inset space \space{}
11946 \end_inset
11947
11948
11949 \begin_inset Quotes eld
11950 \end_inset
11951
11952 See Ref.
11953 \begin_inset space \space{}
11954 \end_inset
11955
11956
11957 \family typewriter
11958
11959 \backslash
11960 refcite{key}
11961 \family default
11962
11963 \begin_inset Quotes erd
11964 \end_inset
11965
11966 .
11967 \end_layout
11968
11969 \begin_layout Enumerate
11970 There is no 
11971 \begin_inset Quotes eld
11972 \end_inset
11973
11974 Acknowledgments
11975 \begin_inset Quotes erd
11976 \end_inset
11977
11978  section in both packages.
11979  To put acknowledgments, just use the 
11980 \begin_inset Quotes eld
11981 \end_inset
11982
11983 Section*
11984 \begin_inset Quotes erd
11985 \end_inset
11986
11987  environment.
11988 \end_layout
11989
11990 \begin_layout Enumerate
11991 Appendices may be added to the paper, 
11992 \emph on
11993 after
11994 \emph default
11995  the Acknowledgments and 
11996 \shape italic
11997 before
11998 \shape default
11999  the References.
12000  LyX provides a special environment, called 
12001 \begin_inset Quotes eld
12002 \end_inset
12003
12004 Appendices Section
12005 \begin_inset Quotes erd
12006 \end_inset
12007
12008  which marks the beginning of the appendices.
12009  This environment should be left blank; it just sends a LaTeX command, but
12010  nothing is really printed.
12011  In LyX, the word 
12012 \begin_inset Quotes eld
12013 \end_inset
12014
12015 Appendix
12016 \begin_inset Quotes erd
12017 \end_inset
12018
12019  is printed with blue letters, as a signal that all sections after that
12020  point are appendices.
12021  To write an appendix, use the 
12022 \begin_inset Quotes eld
12023 \end_inset
12024
12025 Appendix
12026 \begin_inset Quotes erd
12027 \end_inset
12028
12029  environment.
12030  LyX will number each appendix with capital letters, as required by both
12031  journals.
12032  Note that 
12033 \begin_inset Quotes eld
12034 \end_inset
12035
12036 Appendices Section
12037 \begin_inset Quotes erd
12038 \end_inset
12039
12040  
12041 \emph on
12042 must
12043 \emph default
12044  be present before the first appendix; if not, all appendices will be numbered
12045  as normal sections in the output.
12046 \end_layout
12047
12048 \begin_layout Enumerate
12049 The ijmpc and the ijmpd packages use the 
12050 \family typewriter
12051 tbl
12052 \family default
12053  command to implement table captions.
12054  As a result, a table created by LyX is printed correctly, but its caption
12055  is ignored.
12056  However, you can use some TeX code to overcome this problem, so that captions
12057  are printed as expected.
12058  To do so, create a float table as usual, remove the caption, and replace
12059  it with the TeX code 
12060 \family typewriter
12061
12062 \backslash
12063 tbl{
12064 \emph on
12065 your table caption
12066 \emph default
12067 }{
12068 \family default
12069  (sic); you must also the TeX code 
12070 \family typewriter
12071 }
12072 \family default
12073  immediately after the tabular material.
12074  Study the example table included in the template files to see how this
12075  trick is implemented.
12076  Alternatively, If you need table captions, you should implement the whole
12077  table float in a 
12078 \family typewriter
12079 .tex
12080 \family default
12081  file, then include this file to the LyX document (
12082 \family sans
12083 Insert\SpecialChar \menuseparator
12084 File\SpecialChar \menuseparator
12085 Child
12086 \begin_inset space ~
12087 \end_inset
12088
12089 Document
12090 \family default
12091 ).
12092  Details on how to create a table float can be found in the files 
12093 \family typewriter
12094 ws-ijmpc.tex
12095 \family default
12096  and 
12097 \family typewriter
12098 ws-ijmpd.tex
12099 \family default
12100 , included in the corresponding packages.
12101 \end_layout
12102
12103 \begin_layout Subsection
12104 Preparing a paper for submission
12105 \end_layout
12106
12107 \begin_layout Standard
12108 Before you submit your paper you must export the LyX document as a LaTeX
12109  file (
12110 \family sans
12111 File\SpecialChar \menuseparator
12112 Export\SpecialChar \menuseparator
12113 LaTeX
12114 \family default
12115 )
12116 \begin_inset Foot
12117 status open
12118
12119 \begin_layout Plain Layout
12120 Actually you have the choice between LaTeX (plain) and pdflatex.
12121  If you intend to use pdflatex to prepare the paper, you should use the
12122  pdflatex option so that included graphics are converted to PDF format,
12123  ready for use by pdflatex.
12124 \end_layout
12125
12126 \end_inset
12127
12128 , then make the following changes to the resulting 
12129 \family typewriter
12130 .tex
12131 \family default
12132  file.
12133 \end_layout
12134
12135 \begin_layout Enumerate
12136 Remove the comment lines before the 
12137 \family typewriter
12138
12139 \backslash
12140 documentclass
12141 \family default
12142  command.
12143 \end_layout
12144
12145 \begin_layout Enumerate
12146 Remove everything between (and including) the 
12147 \family typewriter
12148
12149 \backslash
12150 makeatletter
12151 \family default
12152  and 
12153 \family typewriter
12154
12155 \backslash
12156 makeatother
12157 \family default
12158  commands, except for any commands you specifically put into the LaTeX preamble.
12159 \end_layout
12160
12161 \begin_layout Standard
12162 The modified 
12163 \family typewriter
12164 .tex
12165 \family default
12166  file should be saved and processed through LaTeX as many times as necessary.
12167  You may also want to check the resulting 
12168 \family typewriter
12169 .dvi
12170 \family default
12171  document.
12172 \end_layout
12173
12174 \begin_layout Subsection
12175 Use of TeX code
12176 \end_layout
12177
12178 \begin_layout Standard
12179 The use of TeX code is reduced to two commands, which must be placed at
12180  the top of the document.
12181  If you started writing your paper by using the 
12182 \family typewriter
12183 ijmpc.lyx
12184 \family default
12185  or the 
12186 \family typewriter
12187 ijmpd.lyx
12188 \family default
12189  template, the TeX code needed is already in its place; you usually don't
12190  need to delete it.
12191  You may only modify the first TeX code to specify the information printed
12192  to the top of odd and even pages (authors' names and short paper's title,
12193  respectively).
12194  This TeX code must have the form 
12195 \family typewriter
12196
12197 \backslash
12198 markboth{Authors' Names}{Short Paper's Title}
12199 \family default
12200 .
12201 \end_layout
12202
12203 \begin_layout Section
12204 iopart
12205 \end_layout
12206
12207 \begin_layout Standard
12208 by 
12209 \noun on
12210 Uwe Stöhr
12211 \end_layout
12212
12213 \begin_layout Subsection
12214 Overview
12215 \end_layout
12216
12217 \begin_layout Standard
12218 The iopart package provides a document class to create electronic manuscript
12219  submission to the journals published by the Institute of Physics.
12220  Instructions for the authors how to create a paper using the iopart class
12221  can be downloaded together with the iopart package from the site 
12222 \begin_inset Flex URL
12223 status collapsed
12224
12225 \begin_layout Plain Layout
12226
12227 ftp://ftp.iop.org/pub/journals/latex2e
12228 \end_layout
12229
12230 \end_inset
12231
12232 .
12233 \end_layout
12234
12235 \begin_layout Subsection
12236 Writing a paper
12237 \end_layout
12238
12239 \begin_layout Standard
12240 The easiest way to write a paper is to start with the file 
12241 \emph on
12242 IOP-article.lyx
12243 \emph default
12244  that is available in LyX's examples files folder.
12245  Open this file, save it under a new name, and start writing.
12246  The example file explains how to use the special text environments.
12247  Here are the most important advices:
12248 \end_layout
12249
12250 \begin_layout Itemize
12251 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12252  two options 
12253 \family sans
12254 Use AMS math package
12255 \family default
12256  in the document settings under 
12257 \family sans
12258 Math Options
12259 \family default
12260  are not used!
12261 \end_layout
12262
12263 \begin_layout Itemize
12264
12265 \size normal
12266 The title environment defines the kind of your paper.
12267  So use one of the following environments for the title:
12268 \end_layout
12269
12270 \begin_deeper
12271 \begin_layout Itemize
12272
12273 \family sans
12274 \size normal
12275 Title
12276 \family default
12277  for a Paper
12278 \end_layout
12279
12280 \begin_layout Itemize
12281
12282 \family sans
12283 \size normal
12284 Review
12285 \family default
12286  for a Review
12287 \end_layout
12288
12289 \begin_layout Itemize
12290
12291 \family sans
12292 \size normal
12293 Topical
12294 \family default
12295  for a Topical review
12296 \end_layout
12297
12298 \begin_layout Itemize
12299
12300 \family sans
12301 \size normal
12302 Comment
12303 \family default
12304  for a Comment
12305 \end_layout
12306
12307 \begin_layout Itemize
12308
12309 \family sans
12310 \size normal
12311 Note
12312 \family default
12313  for a Note
12314 \end_layout
12315
12316 \begin_layout Itemize
12317
12318 \family sans
12319 \size normal
12320 Paper
12321 \family default
12322  for a Paper (same as Title)
12323 \end_layout
12324
12325 \begin_layout Itemize
12326
12327 \family sans
12328 \size normal
12329 Prelim
12330 \family default
12331  for a Preliminary communication
12332 \end_layout
12333
12334 \begin_layout Itemize
12335
12336 \family sans
12337 \size normal
12338 Rapid
12339 \family default
12340  for a Rapid communication
12341 \end_layout
12342
12343 \begin_layout Itemize
12344
12345 \family sans
12346 \size normal
12347 Letter
12348 \family default
12349  for a Letter to the editor
12350 \end_layout
12351
12352 \end_deeper
12353 \begin_layout Itemize
12354
12355 \size normal
12356 All title environments except of 
12357 \family sans
12358 Letter
12359 \family default
12360  can have an optional short title.
12361 \end_layout
12362
12363 \begin_layout Itemize
12364 There is a general title environment 
12365 \family sans
12366 Article
12367 \family default
12368  which is not directly supported by the LyX.
12369  This can be used as TeX code when your document doesn't fit into one of
12370  the other title types.
12371 \end_layout
12372
12373 \begin_layout Standard
12374 For more informations like hints for special table and formula formatting,
12375  look at the IOP author guidelines.
12376 \end_layout
12377
12378 \begin_layout Section
12379 Kluwer
12380 \end_layout
12381
12382 \begin_layout Standard
12383 by 
12384 \noun on
12385 Panayotis Papasotiriou
12386 \end_layout
12387
12388 \begin_layout Subsection
12389 Overview
12390 \end_layout
12391
12392 \begin_layout Standard
12393 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12394  that facilitates electronic manuscript submission to the journals they
12395  publish.
12396  Most known of them (at least in my domain of interest) are 
12397 \emph on
12398 Astrophysics and Space Science
12399 \emph default
12400  and 
12401 \emph on
12402 Solar Physics
12403 \emph default
12404 , but there are many others (see a complete list at 
12405 \begin_inset Flex URL
12406 status open
12407
12408 \begin_layout Plain Layout
12409
12410 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12411 \end_layout
12412
12413 \end_inset
12414
12415 ).
12416  The Kluwer package may be downloaded from the site 
12417 \begin_inset Flex URL
12418 status collapsed
12419
12420 \begin_layout Plain Layout
12421
12422 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12423 \end_layout
12424
12425 \end_inset
12426
12427 .
12428  A complete user guide is contained in that package (but it can also be
12429  downloaded separately).
12430 \end_layout
12431
12432 \begin_layout Standard
12433 LyX supports many features of the package but not everything.
12434  However, the TeX code needed is reduced to some 
12435 \begin_inset Quotes eld
12436 \end_inset
12437
12438 peculiar
12439 \begin_inset Quotes erd
12440 \end_inset
12441
12442  commands of the package (see
12443 \begin_inset space ~
12444 \end_inset
12445
12446
12447 \begin_inset CommandInset ref
12448 LatexCommand ref
12449 reference "subsec:kluwer_peculiarities"
12450
12451 \end_inset
12452
12453 ).
12454  I have recently used LyX to write an article submitted to the 
12455 \emph on
12456 Astrophysics and Space Science
12457 \emph default
12458  without any problem.
12459 \end_layout
12460
12461 \begin_layout Subsection
12462 Writing a paper
12463 \end_layout
12464
12465 \begin_layout Standard
12466 The easiest way to write a paper is to start with the Kluwer template file.
12467  Click on 
12468 \family sans
12469 File\SpecialChar \menuseparator
12470 New from
12471 \family default
12472  
12473 \family sans
12474 Template
12475 \family default
12476 , then choose the 
12477 \family typewriter
12478 kluwer.lyx
12479 \family default
12480  template.
12481  This will give an (almost) empty document that includes the most common
12482  fields found in a manuscript and a short description of their use.
12483  As in most templates, simply overwrite the existing text (including the
12484  brackets, 
12485 \family typewriter
12486 <>
12487 \family default
12488 ) with the correct information.
12489 \end_layout
12490
12491 \begin_layout Subsection
12492 Preparing a paper for submission
12493 \end_layout
12494
12495 \begin_layout Standard
12496 As in the AASTeX package, before you submit your paper to a journal you
12497  must 
12498 \begin_inset Quotes eld
12499 \end_inset
12500
12501 postprocess
12502 \begin_inset Quotes erd
12503 \end_inset
12504
12505  it as follows.
12506 \end_layout
12507
12508 \begin_layout Enumerate
12509 Export your paper as a LaTeX file.
12510  To do this, click on 
12511 \family sans
12512 File\SpecialChar \menuseparator
12513 Export\SpecialChar \menuseparator
12514 LaTeX
12515 \family default
12516 .
12517  
12518 \end_layout
12519
12520 \begin_layout Enumerate
12521 Edit the resulting 
12522 \family typewriter
12523 .tex
12524 \family default
12525  file with a text editor and make the following changes
12526 \end_layout
12527
12528 \begin_deeper
12529 \begin_layout Enumerate
12530 remove the comment lines before the 
12531 \family typewriter
12532
12533 \backslash
12534 documentclass
12535 \family default
12536  command,
12537 \end_layout
12538
12539 \begin_layout Enumerate
12540 remove everything between (and including) the 
12541 \family typewriter
12542
12543 \backslash
12544 makeatletter
12545 \family default
12546  and 
12547 \family typewriter
12548
12549 \backslash
12550 makeatother
12551 \family default
12552  commands, except for any commands you specifically put into the LaTeX preamble.
12553 \end_layout
12554
12555 \begin_layout Standard
12556 Save the resulting 
12557 \family typewriter
12558 .tex
12559 \family default
12560  file.
12561 \end_layout
12562
12563 \end_deeper
12564 \begin_layout Enumerate
12565 Run the 
12566 \family typewriter
12567 .tex
12568 \family default
12569  file through LaTeX as many times as necessary (usually up to three).
12570 \end_layout
12571
12572 \begin_layout Enumerate
12573 View the resulting 
12574 \family typewriter
12575 .dvi
12576 \family default
12577  document using, e.
12578 \begin_inset space \thinspace{}
12579 \end_inset
12580
12581 g.
12582 \begin_inset space \space{}
12583 \end_inset
12584
12585
12586 \family sans
12587 xdvi
12588 \family default
12589 , and check if everything is OK (it should, if you didn't make any mistake).
12590 \end_layout
12591
12592 \begin_layout Subsection
12593 \begin_inset Quotes eld
12594 \end_inset
12595
12596 Peculiarities
12597 \begin_inset Quotes erd
12598 \end_inset
12599
12600  of the Kluwer package
12601 \begin_inset CommandInset label
12602 LatexCommand label
12603 name "subsec:kluwer_peculiarities"
12604
12605 \end_inset
12606
12607
12608 \end_layout
12609
12610 \begin_layout Standard
12611 The Kluwer package has the following 
12612 \begin_inset Quotes eld
12613 \end_inset
12614
12615 peculiarities
12616 \begin_inset Quotes erd
12617 \end_inset
12618
12619 .
12620 \end_layout
12621
12622 \begin_layout Enumerate
12623 It is possible to write multiple articles in the same LaTeX file
12624 \begin_inset Foot
12625 status collapsed
12626
12627 \begin_layout Plain Layout
12628 I can't imagine any good reason to do this.
12629 \end_layout
12630
12631 \end_inset
12632
12633 .
12634  Each article must be included in the environment 
12635 \begin_inset Quotes eld
12636 \end_inset
12637
12638 article
12639 \begin_inset Quotes erd
12640 \end_inset
12641
12642 .
12643  Unfortunately, this environment cannot be omitted, even if you write just
12644  one article.
12645  Therefore, each article starts with the command 
12646 \family typewriter
12647
12648 \backslash
12649 begin{article}
12650 \family default
12651  and, obviously, ends with the command 
12652 \family typewriter
12653
12654 \backslash
12655 end{article}
12656 \family default
12657 .
12658  Although this can be implemented in LyX, I didn't included it, since it
12659  looks ugly and can confuse the novice user.
12660  Therefore, you need to enter them directly and mark them as LaTeX code
12661  (the well-known 
12662 \begin_inset Quotes eld
12663 \end_inset
12664
12665 TeX code
12666 \begin_inset Quotes erd
12667 \end_inset
12668
12669 ).
12670 \end_layout
12671
12672 \begin_layout Enumerate
12673 Information given at the beginning of the article (i.
12674 \begin_inset space \thinspace{}
12675 \end_inset
12676
12677 g.
12678 \begin_inset space \space{}
12679 \end_inset
12680
12681 title, subtitle, author, institution, running title, running author, abstract
12682  and keywords) must be included in an environment called 
12683 \begin_inset Quotes eld
12684 \end_inset
12685
12686 opening
12687 \begin_inset Quotes erd
12688 \end_inset
12689
12690 .
12691  This is not implemented in LyX, so you must enter title, subtitle etc.
12692 \begin_inset space ~
12693 \end_inset
12694
12695 between two TeX code lines (
12696 \family typewriter
12697
12698 \backslash
12699 begin{opening}
12700 \family default
12701  and 
12702 \family typewriter
12703
12704 \backslash
12705 end{opening}
12706 \family default
12707 ).
12708 \end_layout
12709
12710 \begin_layout Enumerate
12711 According to the user manual, the label of each bibliography item must be
12712  written as 
12713 \family typewriter
12714
12715 \backslash
12716 protect
12717 \backslash
12718 citeauthoryear{
12719 \family default
12720 \emph on
12721 author(s)
12722 \family typewriter
12723 \emph default
12724 }{
12725 \family default
12726 \emph on
12727 year
12728 \family typewriter
12729 \emph default
12730 }
12731 \family default
12732 .
12733 \end_layout
12734
12735 \begin_layout Standard
12736 The 
12737 \family typewriter
12738 kluwer.lyx
12739 \family default
12740  template takes care of all these 
12741 \begin_inset Quotes eld
12742 \end_inset
12743
12744 peculiarities
12745 \begin_inset Quotes erd
12746 \end_inset
12747
12748 .
12749  If you start a new paper using this template you don't need to do anything
12750  special.
12751  Just 
12752 \end_layout
12753
12754 \begin_layout Enumerate
12755 don't delete the TeX code included in the template, and
12756 \end_layout
12757
12758 \begin_layout Enumerate
12759 copy the example bibliography item included in the template and modify it
12760  as necessary to enter new bibliography items.
12761 \end_layout
12762
12763 \begin_layout Section
12764 Koma-Script
12765 \end_layout
12766
12767 \begin_layout Standard
12768 by 
12769 \noun on
12770 Bernd Rellermeyer
12771 \end_layout
12772
12773 \begin_layout Subsection
12774 Overview
12775 \end_layout
12776
12777 \begin_layout Standard
12778 The LyX document classes 
12779 \emph on
12780 article (koma-script)
12781 \emph default
12782
12783 \emph on
12784 report (koma-script)
12785 \emph default
12786
12787 \emph on
12788 book
12789 \emph default
12790  
12791 \emph on
12792 (koma-script)
12793 \emph default
12794 , and 
12795 \emph on
12796 letter
12797 \emph default
12798  
12799 \emph on
12800 (koma-script)
12801 \emph default
12802  correspond to the LaTeX document classes 
12803 \family typewriter
12804 scrartcl.cls
12805 \family default
12806
12807 \family typewriter
12808 scrreprt.cls
12809 \family default
12810
12811 \family typewriter
12812 scrbook.cls
12813 \family default
12814 , and 
12815 \family typewriter
12816 scrlettr.cls
12817 \family default
12818 , resp.
12819 \begin_inset space ~
12820 \end_inset
12821
12822 of the Koma-Script family.
12823  They are replacements for the standard document classes 
12824 \family typewriter
12825 article.cls
12826 \family default
12827
12828 \family typewriter
12829 report.cls
12830 \family default
12831
12832 \family typewriter
12833 book.cls
12834 \family default
12835  and 
12836 \family typewriter
12837 letter.cls
12838 \family default
12839 , resp., and fit better to European typography conventions in a number of
12840  points.
12841 \end_layout
12842
12843 \begin_layout Itemize
12844 Standard character size is 11pt in 
12845 \emph on
12846 article (koma-script)
12847 \emph default
12848
12849 \emph on
12850 report (koma-script)
12851 \emph default
12852 , and 
12853 \emph on
12854 book (koma-script)
12855 \emph default
12856 , and 12pt in 
12857 \emph on
12858 letter (koma-script)
12859 \emph default
12860 .
12861 \end_layout
12862
12863 \begin_layout Itemize
12864 Headings, labels of the description environment, and a number of elements
12865  of the 
12866 \emph on
12867 letter (koma-script)
12868 \emph default
12869  document class are set in a bold sans serif font.
12870 \begin_inset Foot
12871 status collapsed
12872
12873 \begin_layout Plain Layout
12874 There is a big difference between the bold sans serif old cm fonts and new
12875  ec fonts, especially in the appearance of headings.
12876  In comparison, the ec bold sans serif fonts look a bit thin.
12877  Here the LaTeX package 
12878 \family typewriter
12879 cmsd.sty by
12880 \family default
12881  
12882 \shape smallcaps
12883 Walter Schmidt
12884 \shape default
12885  helps to produce the 
12886 \begin_inset Quotes eld
12887 \end_inset
12888
12889 usual
12890 \begin_inset Quotes erd
12891 \end_inset
12892
12893  appearance when using the ec fonts.
12894 \end_layout
12895
12896 \end_inset
12897
12898  The numbering of chapter headings is made in the same way as the numbering
12899  of section headings, that is without the extra line 
12900 \begin_inset Quotes eld
12901 \end_inset
12902
12903 Chapter\SpecialChar \ldots{}
12904
12905 \begin_inset Quotes erd
12906 \end_inset
12907
12908 .
12909  In addition, the appearance of the headings can be modified by using a
12910  number of options (in LyX to be entered in the field 
12911 \family sans
12912 Extra
12913 \begin_inset space ~
12914 \end_inset
12915
12916 Options
12917 \family default
12918  of the dialog 
12919 \family sans
12920 Layout\SpecialChar \menuseparator
12921 Document
12922 \family default
12923 ).
12924  
12925 \end_layout
12926
12927 \begin_layout Itemize
12928 The main means in the Koma-Script document classes to design the type area
12929  are the options 
12930 \family sans
12931 BCOR
12932 \family default
12933  and 
12934 \family sans
12935 DIV
12936 \family default
12937  (in LyX to be entered in the extra class options field in the dialog 
12938 \family sans
12939 Document\SpecialChar \menuseparator
12940 Settings
12941 \family default
12942 ).
12943  They make a clearer modification of page margins possible as do the options
12944  of the dialog 
12945 \family sans
12946 Document\SpecialChar \menuseparator
12947 Settings
12948 \family default
12949 .
12950  
12951 \end_layout
12952
12953 \begin_layout Itemize
12954 The LaTeX document classes of the Koma-Script family define a number of
12955  additional commands.
12956  Those part of it which makes sense in LyX is implemented in corresponding
12957  paragraph types.
12958 \end_layout
12959
12960 \begin_layout Standard
12961 Detailed descriptions of the LaTeX document classes of the Koma-Script family
12962  can be found in the Koma-Script documentation 
12963 \emph on
12964 scrguide
12965 \emph default
12966  (German) and 
12967 \emph on
12968 scrguien
12969 \emph default
12970  (English).
12971 \end_layout
12972
12973 \begin_layout Subsection
12974 article (koma-script), report (koma-script), and book (koma-script)
12975 \end_layout
12976
12977 \begin_layout Standard
12978 The document classes 
12979 \emph on
12980 article (koma-script)
12981 \emph default
12982
12983 \emph on
12984 report (koma-script)
12985 \emph default
12986 , and 
12987 \emph on
12988 book
12989 \emph default
12990  
12991 \emph on
12992 (koma-script)
12993 \emph default
12994  are implemented in the layout files 
12995 \family typewriter
12996 scrartcl.layout
12997 \family default
12998
12999 \family typewriter
13000 scrreprt.layout
13001 \family default
13002 , and 
13003 \family typewriter
13004 scrbook.layout
13005 \family default
13006 , resp.
13007  They contain all the paragraph types of the corresponding standard document
13008  classes 
13009 \emph on
13010 article
13011 \emph default
13012
13013 \emph on
13014 report
13015 \emph default
13016 , and 
13017 \emph on
13018 book
13019 \emph default
13020 , resp., partly modified, with the exception of the LyX specific 
13021 \family sans
13022 List
13023 \family default
13024 -type, which is replaced by the new 
13025 \family sans
13026 Labeling
13027 \family default
13028 -type having the same functionality.
13029  Beside the 
13030 \family sans
13031 Labeling
13032 \family default
13033 -Type there is a number of new paragraph types added.
13034  They are 
13035 \emph on
13036 not
13037 \emph default
13038  part of 
13039 \emph on
13040 letter (koma-script)
13041 \emph default
13042 .
13043 \end_layout
13044
13045 \begin_layout Itemize
13046
13047 \family sans
13048 Addpart, Addchap
13049 \family default
13050
13051 \family sans
13052 Addsec
13053 \family default
13054 : are equivalents to 
13055 \family sans
13056 Part*, Chapter*
13057 \family default
13058  and 
13059 \family sans
13060 Section*
13061 \family default
13062 , resp., additionally inserting an entry in the table of contents.
13063  
13064 \family sans
13065 Addpart
13066 \family default
13067  and 
13068 \family sans
13069 Addchap
13070 \family default
13071  are not contained in 
13072 \emph on
13073 article (koma-script)
13074 \emph default
13075 .
13076 \end_layout
13077
13078 \begin_layout Itemize
13079
13080 \family sans
13081 Addchap*
13082 \family default
13083
13084 \family sans
13085 Addsec*
13086 \family default
13087 : behave exactly as 
13088 \family sans
13089 Addchap
13090 \family default
13091  and 
13092 \family sans
13093 Addsec
13094 \family default
13095 , resp., additionally clearing running heads.
13096  
13097 \family sans
13098 Addchap*
13099 \family default
13100  is not contained in 
13101 \emph on
13102 article (koma-script)
13103 \emph default
13104 .
13105 \begin_inset Foot
13106 status collapsed
13107
13108 \begin_layout Plain Layout
13109 There is also an 
13110 \family typewriter
13111
13112 \backslash
13113 addpart*
13114 \family default
13115  command in 
13116 \emph on
13117 book (koma-script)
13118 \emph default
13119  and in 
13120 \emph on
13121 report (koma-script)
13122 \emph default
13123 , but since this is identical to 
13124 \family sans
13125 Part*
13126 \family default
13127 , is has not been implemented in LyX.
13128 \end_layout
13129
13130 \end_inset
13131
13132
13133 \end_layout
13134
13135 \begin_layout Itemize
13136
13137 \family sans
13138 Minisec
13139 \family default
13140 : generates a heading directly above the following paragraph in the standard
13141  character size without affecting the structure of the document.
13142 \end_layout
13143
13144 \begin_layout Itemize
13145
13146 \family sans
13147 Captionabove
13148 \family default
13149  and 
13150 \family sans
13151 Captionbelow
13152 \family default
13153  are special captions which respect the different space settings needed
13154  for captions placed above or below an element (if you follow strict typographic
13155  rules, you might want to place table captions always above the table).
13156  You can also use the class option 
13157 \family typewriter
13158 tablecaptionsabove
13159 \family default
13160 , which will switch 
13161 \family sans
13162 caption
13163 \family default
13164  to 
13165 \family sans
13166 captionabove
13167 \family default
13168  for tables and 
13169 \family sans
13170 captionbelow
13171 \family default
13172  for figures.
13173  You need at least Koma-Script version 2.8q to use this.
13174 \end_layout
13175
13176 \begin_layout Itemize
13177
13178 \family sans
13179 Dictum
13180 \family default
13181 : can be used to set a bonmot, e.
13182 \begin_inset space \thinspace{}
13183 \end_inset
13184
13185 g.
13186 \begin_inset space \space{}
13187 \end_inset
13188
13189 at the beginning of a chapter.
13190  If you use the optional argument (
13191 \family sans
13192 Insert\SpecialChar \menuseparator
13193 Short
13194 \begin_inset space ~
13195 \end_inset
13196
13197 Title
13198 \family default
13199 ), you can insert the dictum's author there.
13200  Dictum and author are separated by a line.
13201  You need at least Koma-Script version 2.8q to use this.
13202  
13203 \family sans
13204 Dictum
13205 \family default
13206  is not contained in 
13207 \emph on
13208 article (koma-script)
13209 \emph default
13210 .
13211 \end_layout
13212
13213 \begin_layout Standard
13214 The following types, together with the standard types 
13215 \family sans
13216 Title
13217 \family default
13218
13219 \family sans
13220 Author
13221 \family default
13222 , and 
13223 \family sans
13224 Date
13225 \family default
13226 , form the title area of the document.
13227  They must be entered ahead of the first 
13228 \begin_inset Quotes eld
13229 \end_inset
13230
13231 ordinary
13232 \begin_inset Quotes erd
13233 \end_inset
13234
13235  paragraph.
13236 \begin_inset Foot
13237 status collapsed
13238
13239 \begin_layout Plain Layout
13240 The corresponding LaTeX commands must appear before the 
13241 \family typewriter
13242
13243 \backslash
13244 maketitle
13245 \family default
13246  command.
13247 \end_layout
13248
13249 \end_inset
13250
13251  When such a type is used more than once, the latter usage overwrites the
13252  former one, that means, for every type only the latest usage is valid.
13253  The order of the different types however has, like 
13254 \family sans
13255 Title
13256 \family default
13257
13258 \family sans
13259 Author
13260 \family default
13261 , and 
13262 \family sans
13263 Date
13264 \family default
13265 , no effect on the appearance of the produced document.
13266 \end_layout
13267
13268 \begin_layout Itemize
13269
13270 \family sans
13271 Subject
13272 \family default
13273 : produces a centered paragraph above the ordinary title (
13274 \family sans
13275 Title
13276 \family default
13277
13278 \family sans
13279 Author
13280 \family default
13281
13282 \family sans
13283 Date
13284 \family default
13285 ) for the subject of the document.
13286 \end_layout
13287
13288 \begin_layout Itemize
13289
13290 \family sans
13291 Publishers
13292 \family default
13293 : produces a centered paragraph below the ordinary title (
13294 \family sans
13295 Title
13296 \family default
13297
13298 \family sans
13299 Author
13300 \family default
13301
13302 \family sans
13303 Date
13304 \family default
13305 ) for the publishers' name.
13306 \end_layout
13307
13308 \begin_layout Itemize
13309
13310 \family sans
13311 Dedication
13312 \family default
13313 : in 
13314 \emph on
13315 report (koma-script)
13316 \emph default
13317  and 
13318 \emph on
13319 book (koma-script)
13320 \emph default
13321  produces a centered paragraph on its own page behind the title page, or
13322  in 
13323 \emph on
13324 article (koma-script)
13325 \emph default
13326  produces a centered paragraph below the ordinary title (
13327 \family sans
13328 Title
13329 \family default
13330
13331 \family sans
13332 Author
13333 \family default
13334
13335 \family sans
13336 Date
13337 \family default
13338
13339 \family sans
13340 Publishers
13341 \family default
13342 ) for a dedication.
13343 \end_layout
13344
13345 \begin_layout Itemize
13346
13347 \family sans
13348 Titlehead
13349 \family default
13350 : produces a left aligned paragraph above the ordinary title (
13351 \family sans
13352 Title
13353 \family default
13354
13355 \family sans
13356 Author
13357 \family default
13358
13359 \family sans
13360 Date
13361 \family default
13362
13363 \family sans
13364 Subject
13365 \family default
13366 ) for a document`s head.
13367 \end_layout
13368
13369 \begin_layout Itemize
13370
13371 \family sans
13372 Uppertitleback
13373 \family default
13374 : produces in a double-sided print in 
13375 \emph on
13376 report (koma-script)
13377 \emph default
13378  and 
13379 \emph on
13380 book (koma-script)
13381 \emph default
13382  a left-aligned paragraph at the top of the title page`s back or has no
13383  effect in a single-sided print or in 
13384 \emph on
13385 article (koma-script)
13386 \emph default
13387 .
13388 \end_layout
13389
13390 \begin_layout Itemize
13391
13392 \family sans
13393 Lowertitleback
13394 \family default
13395 : produces in a double-sided print in 
13396 \emph on
13397 report (koma-script)
13398 \emph default
13399  and 
13400 \emph on
13401 book (koma-script)
13402 \emph default
13403  a left-aligned paragraph at the bottom of the title page`s back or has
13404  no effect in a single-sided print or in 
13405 \emph on
13406 article (koma-script)
13407 \emph default
13408 .
13409 \end_layout
13410
13411 \begin_layout Itemize
13412
13413 \family sans
13414 Extratitle
13415 \family default
13416 : produces a special 
13417 \begin_inset Quotes eld
13418 \end_inset
13419
13420 dirty
13421 \begin_inset Quotes erd
13422 \end_inset
13423
13424  page ahead of the actual document containing a paragraph without special
13425  formatting.
13426 \end_layout
13427
13428 \begin_layout Standard
13429 The layout files for the document classes 
13430 \emph on
13431 article (koma-script)
13432 \emph default
13433
13434 \emph on
13435 report (koma-script)
13436 \emph default
13437 , and 
13438 \emph on
13439 book (koma-script)
13440 \emph default
13441  do include the file 
13442 \family typewriter
13443 scrmacros.inc
13444 \family default
13445 .
13446  This is thought of as a place to define your own types.
13447  Copy scrmacros
13448 \family typewriter
13449 .inc
13450 \family default
13451  in your personal layout directory and edit the file!
13452 \end_layout
13453
13454 \begin_layout Subsection
13455 letter (koma-script)
13456 \end_layout
13457
13458 \begin_layout Standard
13459 \begin_inset ERT
13460 status open
13461
13462 \begin_layout Plain Layout
13463
13464
13465 \backslash
13466 begin{sloppypar}
13467 \end_layout
13468
13469 \end_inset
13470
13471
13472 \end_layout
13473
13474 \begin_layout Standard
13475 \noindent
13476 The document class 
13477 \emph on
13478 letter (koma-script)
13479 \emph default
13480  is implemented in the layout file 
13481 \family typewriter
13482 scrlettr.layout
13483 \family default
13484 .
13485  It contains all the paragraph types of the corresponding standard document
13486  class 
13487 \emph on
13488 letter
13489 \emph default
13490 , partly modified, with the exception of the LyX specific types 
13491 \family sans
13492 LyX-Code
13493 \family default
13494  and 
13495 \family sans
13496 Comment
13497 \family default
13498  and the 
13499 \family sans
13500 List
13501 \family default
13502  type, which is replaced by the new 
13503 \family sans
13504 Labeling
13505 \family default
13506  type.
13507  In addition, it contains, in contrast to the standard document class, the
13508  standard types 
13509 \family sans
13510 LaTeX
13511 \family default
13512
13513 \family sans
13514 Quotation
13515 \family default
13516
13517 \family sans
13518 Quote
13519 \family default
13520 , and 
13521 \family sans
13522 Verse
13523 \family default
13524 .
13525  Furthermore, there are a number of new letter specific types.
13526 \end_layout
13527
13528 \begin_layout Standard
13529 \begin_inset ERT
13530 status open
13531
13532 \begin_layout Plain Layout
13533
13534
13535 \backslash
13536 end{sloppypar}
13537 \end_layout
13538
13539 \end_inset
13540
13541
13542 \end_layout
13543
13544 \begin_layout Standard
13545 The appearance of the letter produced by this document class can be controlled
13546  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13547 \begin_inset Foot
13548 status collapsed
13549
13550 \begin_layout Plain Layout
13551 For example, the standard appearance of the letter`s heading, consisting
13552  of name and address, is quite self-willed.
13553  An 
13554 \begin_inset Quotes eld
13555 \end_inset
13556
13557 ordinary
13558 \begin_inset Quotes erd
13559 \end_inset
13560
13561  heading is produced by the following LaTeX commands in the preamble:
13562 \end_layout
13563
13564 \begin_layout LyX-Code
13565
13566 \backslash
13567 firsthead{
13568 \backslash
13569 parbox[b]{
13570 \backslash
13571 textwidth}
13572 \end_layout
13573
13574 \begin_layout LyX-Code
13575   {
13576 \backslash
13577 ignorespaces 
13578 \backslash
13579 fromname
13580 \backslash
13581
13582 \backslash
13583  
13584 \backslash
13585 ignorespaces 
13586 \backslash
13587 fromaddress}} 
13588 \end_layout
13589
13590 \begin_layout LyX-Code
13591
13592 \backslash
13593 nexthead{
13594 \backslash
13595 parbox[b]{
13596 \backslash
13597 textwidth}
13598 \end_layout
13599
13600 \begin_layout LyX-Code
13601   {
13602 \backslash
13603 ignorespaces 
13604 \backslash
13605 fromname 
13606 \backslash
13607 hfill 
13608 \backslash
13609 ignorespaces 
13610 \backslash
13611 pagename
13612 \backslash
13613  
13614 \backslash
13615 thepage}}
13616 \end_layout
13617
13618 \end_inset
13619
13620  A detailed German description of such LaTeX commands can be found in the
13621  Koma-Script documentation 
13622 \emph on
13623 scrguide
13624 \emph default
13625 .
13626  With it, the letter's author can produce his personal letter layout.
13627 \end_layout
13628
13629 \begin_layout Standard
13630 The types 
13631 \family sans
13632 Letter
13633 \family default
13634  and 
13635 \family sans
13636 Opening
13637 \family default
13638  define the beginning of the letter and must be used in every letter.
13639  To emphasize them in the LyX document class, they are marked with the letter
13640  
13641 \shape italic
13642 L
13643 \shape default
13644  or 
13645 \shape italic
13646 O
13647 \shape default
13648 , resp.
13649 \begin_inset space ~
13650 \end_inset
13651
13652 in the left margin.
13653  It is possible to write any number of letters in one file.
13654  An 
13655 \family sans
13656 Opening
13657 \family default
13658  type produces a new letter using the same addressee and a 
13659 \family sans
13660 Letter
13661 \family default
13662  type produces a new addressee.
13663  The types 
13664 \family sans
13665 Closing
13666 \family default
13667
13668 \family sans
13669 PS
13670 \family default
13671
13672 \family sans
13673 CC
13674 \family default
13675 , and 
13676 \family sans
13677 Encl
13678 \family default
13679  are ordinary paragraph types and can also be used several times in one
13680  and the same letter.
13681 \end_layout
13682
13683 \begin_layout Itemize
13684
13685 \family sans
13686 Letter
13687 \family default
13688 : produces a paragraph for the addressee and implicitly defines the beginning
13689  of the letter.
13690 \end_layout
13691
13692 \begin_layout Itemize
13693
13694 \family sans
13695 Opening
13696 \family default
13697 : produces a paragraph for the form of address and implicitly produces a
13698  new letter.
13699 \end_layout
13700
13701 \begin_layout Itemize
13702
13703 \family sans
13704 Closing
13705 \family default
13706 : produces a paragraph for a close.
13707 \end_layout
13708
13709 \begin_layout Itemize
13710
13711 \family sans
13712 PS
13713 \family default
13714 : produces a paragraph for a postscript.
13715 \end_layout
13716
13717 \begin_layout Itemize
13718
13719 \family sans
13720 CC
13721 \family default
13722 : produces a paragraph for a distribution list.
13723 \end_layout
13724
13725 \begin_layout Itemize
13726
13727 \family sans
13728 Encl
13729 \family default
13730 : produces a paragraph for enclosures.
13731 \end_layout
13732
13733 \begin_layout Standard
13734 The types 
13735 \family sans
13736 Name
13737 \family default
13738
13739 \family sans
13740 Signature
13741 \family default
13742
13743 \family sans
13744 Address
13745 \family default
13746
13747 \family sans
13748 Telephone
13749 \family default
13750
13751 \family sans
13752 Place
13753 \family default
13754
13755 \family sans
13756 Backaddress
13757 \family default
13758
13759 \family sans
13760 Specialmail
13761 \family default
13762
13763 \family sans
13764 Location
13765 \family default
13766
13767 \family sans
13768 Title
13769 \family default
13770 , and 
13771 \family sans
13772 Subject
13773 \family default
13774  are input types provided with a label to enter information, which will
13775  be processed by the document class.
13776 \begin_inset Foot
13777 status open
13778
13779 \begin_layout Plain Layout
13780 It could be seen as a matter of inconsequence, that the types 
13781 \family sans
13782 Letter
13783 \family default
13784  and 
13785 \family sans
13786 Opening
13787 \family default
13788  described above are not such input types as well.
13789  Because of the special meaning of those types, however, I have implemented
13790  them as ordinary paragraph types with a one letter mark in the left margin.
13791  Moreover, it would affect my feeling of symmetry, if the 
13792 \family sans
13793 Opening
13794 \family default
13795  type and the 
13796 \family sans
13797 Closing
13798 \family default
13799  type had such a serious different appearance.
13800 \end_layout
13801
13802 \end_inset
13803
13804  The types must be used ahead of the corresponding 
13805 \family sans
13806 Opening
13807 \family default
13808  type.
13809 \end_layout
13810
13811 \begin_layout Standard
13812 An implementation of these types in a WYSIWYG fashion does not seem to make
13813  sense, because the real appearance of the produced letter does not only
13814  depend on the usage of the particular type, but also on other factors.
13815  For example, a signature entered in the 
13816 \family sans
13817 Signature
13818 \family default
13819  type will in the standard behavior appear in the produced letter only,
13820  when in the same letter also a 
13821 \family sans
13822 Closing
13823 \family default
13824  type is used.
13825  The entered value of the 
13826 \family sans
13827 Telephone
13828 \family default
13829  type will in the standard behavior not appear in the produced letter at
13830  all.
13831  The possibility to design the letter`s heading freely is already indicated
13832  in a footnote above.
13833 \end_layout
13834
13835 \begin_layout Standard
13836 The input types can also be used as empty paragraphs.
13837  This makes sense e.
13838 \begin_inset space \thinspace{}
13839 \end_inset
13840
13841 g.
13842 \begin_inset space \space{}
13843 \end_inset
13844
13845 for the 
13846 \family sans
13847 Signature
13848 \family default
13849  type.
13850  If the 
13851 \family sans
13852 Signature
13853 \family default
13854  type is not used at all, in the standard behavior the value of the 
13855 \family sans
13856 Name
13857 \family default
13858  type is used as signature, whereas if an empty 
13859 \family sans
13860 Signature
13861 \family default
13862  type is used, no signature value is defined.
13863 \end_layout
13864
13865 \begin_layout Standard
13866 By using the input types it is possible to write a letter template, containing
13867  filled input types with your personal dates (name, address, etc.) and empty
13868  input types for other dates you want to enter.
13869 \end_layout
13870
13871 \begin_layout Itemize
13872
13873 \family sans
13874 Name
13875 \family default
13876 : sender's name, in the standard behavior appears as a centered paragraph
13877  in small caps in the letter`s heading.
13878 \end_layout
13879
13880 \begin_layout Itemize
13881
13882 \family sans
13883 Signature
13884 \family default
13885 : sender's signature, in the standard behavior appears below the 
13886 \family sans
13887 Closing
13888 \family default
13889  type.
13890  If no 
13891 \family sans
13892 Signature
13893 \family default
13894  type is used, the value of the 
13895 \family sans
13896 Name
13897 \family default
13898  type appears instead.
13899 \end_layout
13900
13901 \begin_layout Itemize
13902
13903 \family sans
13904 Address
13905 \family default
13906 : sender's address, in the standard behavior appears in a centered paragraph
13907  in the letter`s heading below the sender's name.
13908 \end_layout
13909
13910 \begin_layout Itemize
13911
13912 \family sans
13913 Telephone
13914 \family default
13915 : sender's telephone number, in the standard behavior only sets the LaTeX
13916  variable 
13917 \family typewriter
13918
13919 \backslash
13920 telephonenum
13921 \family default
13922 .
13923 \end_layout
13924
13925 \begin_layout Itemize
13926
13927 \family sans
13928 Place
13929 \family default
13930 : place of the letter`s making.
13931 \end_layout
13932
13933 \begin_layout Itemize
13934
13935 \family sans
13936 Date
13937 \family default
13938 : date of the letter`s making.
13939  
13940 \family sans
13941 Place
13942 \family default
13943  and 
13944 \family sans
13945 Date
13946 \family default
13947 , in the standard behavior, produce the place and the date in a right-aligned
13948  line below the addressee's field.
13949  If an empty 
13950 \family sans
13951 Date
13952 \family default
13953  type is used, neither place nor date appear, independent of the value of
13954  the 
13955 \family sans
13956 Place
13957 \family default
13958  type.
13959  If no 
13960 \family sans
13961 Date
13962 \family default
13963  type is used, the date of the letter `s production is used.
13964 \end_layout
13965
13966 \begin_layout Itemize
13967
13968 \family sans
13969 Backaddress
13970 \family default
13971 : sender`s back address, in the standard behavior appears above the addressee's
13972  field in a small sans serif font.
13973 \end_layout
13974
13975 \begin_layout Itemize
13976
13977 \family sans
13978 Specialmail
13979 \family default
13980 : special mail information, in the standard behavior appears underlined
13981  above the addressee's field below the back address.
13982 \end_layout
13983
13984 \begin_layout Itemize
13985
13986 \family sans
13987 Location
13988 \family default
13989 : additional information, in the standard behavior appears on right side
13990  below the addressee`s field.
13991 \end_layout
13992
13993 \begin_layout Itemize
13994
13995 \family sans
13996 Title
13997 \family default
13998 : the letter's title, in the standard behavior appears in a big, bold, sans
13999  serif font above the subject.
14000 \end_layout
14001
14002 \begin_layout Itemize
14003
14004 \family sans
14005 Subject
14006 \family default
14007 : the letter's subject, in the standard behavior appears in a bold font
14008  above the 
14009 \family sans
14010 Opening
14011 \family default
14012  paragraph.
14013 \end_layout
14014
14015 \begin_layout Standard
14016 The types 
14017 \family sans
14018 Yourref
14019 \family default
14020
14021 \family sans
14022 Yourmail
14023 \family default
14024
14025 \family sans
14026 Myref
14027 \family default
14028
14029 \family sans
14030 Customer
14031 \family default
14032 , and 
14033 \family sans
14034 Invoice
14035 \family default
14036  produce a business letter like line above the 
14037 \family sans
14038 Title
14039 \family default
14040  line containing the fields 
14041 \begin_inset Quotes eld
14042 \end_inset
14043
14044 Your ref.
14045 \begin_inset Quotes erd
14046 \end_inset
14047
14048
14049 \begin_inset Quotes eld
14050 \end_inset
14051
14052 Your letter of
14053 \begin_inset Quotes erd
14054 \end_inset
14055
14056
14057 \begin_inset Quotes eld
14058 \end_inset
14059
14060 Our ref.
14061 \begin_inset Quotes erd
14062 \end_inset
14063
14064
14065 \begin_inset Quotes eld
14066 \end_inset
14067
14068 Customer no.
14069 \begin_inset Quotes erd
14070 \end_inset
14071
14072
14073 \begin_inset Quotes eld
14074 \end_inset
14075
14076 Invoice no.
14077 \begin_inset Quotes erd
14078 \end_inset
14079
14080 , and 
14081 \begin_inset Quotes eld
14082 \end_inset
14083
14084 Date
14085 \begin_inset Quotes erd
14086 \end_inset
14087
14088 .
14089  For the date field, the value of the 
14090 \family sans
14091 Date
14092 \family default
14093  type is used.
14094  If one of these 
14095 \begin_inset Quotes eld
14096 \end_inset
14097
14098 business letter types
14099 \begin_inset Quotes erd
14100 \end_inset
14101
14102  is used, the value of the 
14103 \family sans
14104 Place
14105 \family default
14106  type however does not appear, but only the LaTeX variable 
14107 \family typewriter
14108
14109 \backslash
14110 fromplace
14111 \family default
14112  is set.
14113  The ordinary output of place and date in a right-aligned line below the
14114  addressee`s field is suppressed.
14115  The types are implemented as input types provided with a label and must
14116  be used ahead of the corresponding 
14117 \family sans
14118 Opening
14119 \family default
14120  type.
14121 \end_layout
14122
14123 \begin_layout Itemize
14124
14125 \family sans
14126 Yourref
14127 \family default
14128 : Your ref.
14129 \end_layout
14130
14131 \begin_layout Itemize
14132
14133 \family sans
14134 Yourmail
14135 \family default
14136 : Your letter of.
14137 \end_layout
14138
14139 \begin_layout Itemize
14140
14141 \family sans
14142 Myref
14143 \family default
14144 : Our ref.
14145 \end_layout
14146
14147 \begin_layout Itemize
14148
14149 \family sans
14150 Customer
14151 \family default
14152 : Customer no.
14153 \end_layout
14154
14155 \begin_layout Itemize
14156
14157 \family sans
14158 Invoice
14159 \family default
14160 : Invoice no.
14161 \end_layout
14162
14163 \begin_layout Subsection
14164 The new letter class: letter (koma-script v.2)
14165 \end_layout
14166
14167 \begin_layout Standard
14168 by 
14169 \noun on
14170 Jürgen Spitzmüller
14171 \end_layout
14172
14173 \begin_layout Standard
14174 \begin_inset VSpace medskip
14175 \end_inset
14176
14177
14178 \end_layout
14179
14180 \begin_layout Standard
14181 \noindent
14182 Koma-Script version 2.8 has introduced a new letter class 
14183 \family typewriter
14184 scrlttr2
14185 \family default
14186  which supersedes the now unsupported 
14187 \family typewriter
14188 scrlettr
14189 \family default
14190 .
14191  It has — on the LaTeX side — a completely new interface and is not compatible
14192  with the old class.
14193  Therefore, LyX supports both, though it is recommended you use the new
14194  class.
14195 \end_layout
14196
14197 \begin_layout Standard
14198 This class covers the same functionality as 
14199 \emph on
14200 letter (koma-script),
14201 \emph default
14202  and a few more.
14203  The basic items are 
14204 \family sans
14205 Address
14206 \family default
14207  (receiver's address, same as 
14208 \family sans
14209 Letter
14210 \family default
14211  in the old layout), 
14212 \family sans
14213 Opening
14214 \family default
14215 , and 
14216 \family sans
14217 Closing
14218 \family default
14219 .
14220  
14221 \family sans
14222 NextAddress
14223 \family default
14224  will start a new letter (i.
14225 \begin_inset space \thinspace{}
14226 \end_inset
14227
14228 g.
14229 \begin_inset space \space{}
14230 \end_inset
14231
14232 you can write several letters per document).
14233  New elements are sender's 
14234 \family sans
14235 E-Mail
14236 \family default
14237
14238 \family sans
14239 URL
14240 \family default
14241
14242 \family sans
14243 Fax
14244 \family default
14245
14246 \family sans
14247 Bank
14248 \family default
14249  and the possibility to use a 
14250 \family sans
14251 Logo
14252 \family default
14253  (via 
14254 \family sans
14255 Insert\SpecialChar \menuseparator
14256 Graphics
14257 \family default
14258 ) in the header.
14259 \end_layout
14260
14261 \begin_layout Standard
14262 The biggest improvement is, though, that the letter's layout is configurable
14263  to meet almost any needs.
14264  This can be done via the preamble or with a special style file (Letter
14265  Class Option, extension 
14266 \family typewriter
14267 *.lco
14268 \family default
14269 ), that will be read in as a class option.
14270 \begin_inset Foot
14271 status collapsed
14272
14273 \begin_layout Plain Layout
14274 The KOMA package comes with some default 
14275 \family typewriter
14276 *.lco
14277 \family default
14278  files.
14279  There is, for instance, a 
14280 \family typewriter
14281 DIN.lco
14282 \family default
14283  file that follows german typesetting rules, or a 
14284 \family typewriter
14285 KOMAold.lco
14286 \family default
14287  that provides the default layout of the old 
14288 \family typewriter
14289 scrlettr
14290 \family default
14291  class.
14292  The latter can be loaded with the class option 
14293 \family typewriter
14294 KOMAold
14295 \family default
14296 , inserted via the 
14297 \family sans
14298 \bar under
14299 L
14300 \bar default
14301 ayout\SpecialChar \menuseparator
14302
14303 \bar under
14304 D
14305 \bar default
14306 ocument\SpecialChar \menuseparator
14307 Extra Options
14308 \family default
14309  field.
14310 \end_layout
14311
14312 \end_inset
14313
14314  Have a look at the 
14315 \emph on
14316 koma-letter2
14317 \emph default
14318  template that is included in LyX for examples.
14319  A detailed description is to be found in the Koma-Script documentation
14320  (
14321 \emph on
14322 scrguide
14323 \emph default
14324 ).
14325 \end_layout
14326
14327 \begin_layout Subsection
14328 Problems
14329 \end_layout
14330
14331 \begin_layout Standard
14332 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14333  some problems.
14334 \end_layout
14335
14336 \begin_layout Itemize
14337 The chapter number of a 
14338 \family sans
14339 Chapter
14340 \family default
14341  type appears on a line of its own above the chapter heading instead of
14342  appearing in the same line ahead of it.
14343  The cause for that is the LyX internal behavior for the labeltype 
14344 \family sans
14345 Counter_Chapter
14346 \family default
14347  in the layout file.
14348 \end_layout
14349
14350 \begin_layout Itemize
14351 The headings of the types 
14352 \family sans
14353 Addchap
14354 \family default
14355  and 
14356 \family sans
14357 Addsec
14358 \family default
14359  are only put in the 
14360 \begin_inset Quotes eld
14361 \end_inset
14362
14363 true
14364 \begin_inset Quotes erd
14365 \end_inset
14366
14367  LaTeX table of contents, but not in the LyX table of contents (
14368 \family sans
14369 Document\SpecialChar \menuseparator
14370 Table
14371 \begin_inset space ~
14372 \end_inset
14373
14374 of
14375 \begin_inset space ~
14376 \end_inset
14377
14378 Contents
14379 \family default
14380 ).
14381 \end_layout
14382
14383 \begin_layout Itemize
14384 The paragraphs in a 
14385 \emph on
14386 letter
14387 \emph default
14388  document class appear in a skip separation mode, not indented.
14389  This is the standard behavior, no special LaTeX commands are needed for
14390  that.
14391  But in the 
14392 \family sans
14393 Document\SpecialChar \menuseparator
14394 Settings
14395 \family default
14396  dialog the corresponding radio button indicates 
14397 \family sans
14398 Indent
14399 \family default
14400 .
14401  A 
14402 \family sans
14403 Skip
14404 \family default
14405  value always has the effect that extra LaTeX commands are inserted in the
14406  document to produce the gap, which is not what is wanted in this case.
14407 \end_layout
14408
14409 \begin_layout Section
14410 Latex8 (IEEE Conference Papers)
14411 \end_layout
14412
14413 \begin_layout Standard
14414 by 
14415 \noun on
14416 Allan Rae
14417 \end_layout
14418
14419 \begin_layout Subsection
14420 Introduction
14421 \end_layout
14422
14423 \begin_layout Standard
14424 Since this class is specifically for writing submissions to IEEE sponsored
14425  conferences I strongly recommend that you get a copy of their Authors Kit.
14426  The 
14427 \family sans
14428 latex.sty
14429 \family default
14430  package and associated bibliography style file is included in the kit.
14431  The Authors Kit is usually sent out by email once your initial submission
14432  has been accepted.
14433  There is a lot of useful information in the Authors Kit explaining formatting
14434  restrictions and so on and I will assume you have read this since that
14435  means I don't have to repeat it all here.
14436 \end_layout
14437
14438 \begin_layout Subsection
14439 Getting Started
14440 \end_layout
14441
14442 \begin_layout Standard
14443 [AR\SpecialChar \@.
14444  more to come]
14445 \end_layout
14446
14447 \begin_layout Subsection
14448 Supported Environments
14449 \end_layout
14450
14451 \begin_layout Itemize
14452
14453 \family sans
14454 Standard
14455 \end_layout
14456
14457 \begin_layout Itemize
14458
14459 \family sans
14460 Title
14461 \end_layout
14462
14463 \begin_layout Itemize
14464
14465 \family sans
14466 Author
14467 \end_layout
14468
14469 \begin_layout Itemize
14470
14471 \family sans
14472 E-mail
14473 \end_layout
14474
14475 \begin_layout Itemize
14476
14477 \family sans
14478 Affiliation
14479 \end_layout
14480
14481 \begin_layout Itemize
14482
14483 \family sans
14484 Abstract
14485 \end_layout
14486
14487 \begin_layout Itemize
14488
14489 \family sans
14490 Section
14491 \end_layout
14492
14493 \begin_layout Itemize
14494
14495 \family sans
14496 SubSection
14497 \end_layout
14498
14499 \begin_layout Itemize
14500
14501 \family sans
14502 Caption
14503 \end_layout
14504
14505 \begin_layout Subsection
14506 Differences Between Screen and Paper
14507 \end_layout
14508
14509 \begin_layout Standard
14510 There are slight differences in appearance mainly with the presentation
14511  of section counters.
14512  On screen the trailing period of the section counter is missing but it
14513  will appear in the output so don't let this worry you.
14514 \end_layout
14515
14516 \begin_layout Section
14517 Memoir
14518 \end_layout
14519
14520 \begin_layout Standard
14521 By 
14522 \noun on
14523 Jürgen Spitzmüller
14524 \end_layout
14525
14526 \begin_layout Subsection
14527 Overview
14528 \end_layout
14529
14530 \begin_layout Standard
14531 Memoir is a very powerful and constantly evolving class.
14532  It has been designed with regard to fictional and non-fictional literature.
14533  Its aim is to let the user have maximum control over the typesetting of
14534  his document.
14535  Memoir is based on the standard book class, but it can also emulate the
14536  article class (see below).
14537 \end_layout
14538
14539 \begin_layout Standard
14540 Peter Wilson, the developer of Memoir, is known as the author of lots of
14541  useful packages in the LaTeX world.
14542  Most of them have been merged with Memoir.
14543  Therefore, it is much easier to layout the table of contents, appendices,
14544  chapter designs and such.
14545  LyX, though, does not support all of these goodies natively.
14546  Some of them might be added to forthcoming releases
14547 \begin_inset Foot
14548 status collapsed
14549
14550 \begin_layout Plain Layout
14551 You are invited to send suggestions to 
14552 \begin_inset Flex URL
14553 status collapsed
14554
14555 \begin_layout Plain Layout
14556
14557 lyx-devel@lists.lyx.org
14558 \end_layout
14559
14560 \end_inset
14561
14562 .
14563 \end_layout
14564
14565 \end_inset
14566
14567 , lots will probably never, due to the limitations of LyX's framework.
14568  Of course you can still use all features with the help of some native LaTeX
14569  commands (TeX code
14570 \begin_inset Foot
14571 status collapsed
14572
14573 \begin_layout Plain Layout
14574 Cf.
14575 \begin_inset ERT
14576 status collapsed
14577
14578 \begin_layout Plain Layout
14579
14580
14581 \backslash
14582  
14583 \end_layout
14584
14585 \end_inset
14586
14587 section
14588 \begin_inset space ~
14589 \end_inset
14590
14591
14592 \begin_inset CommandInset ref
14593 LatexCommand ref
14594 reference "sec:Inserting-TeX-Code"
14595
14596 \end_inset
14597
14598  for details.
14599 \end_layout
14600
14601 \end_inset
14602
14603 ).
14604  In this section, we can only list those features which are natively supported
14605  by LyX.
14606  For detailed descriptions (and for the rest of features) we recommend you
14607  have a look at the detailed manual of the Memoir class
14608 \begin_inset Foot
14609 status collapsed
14610
14611 \begin_layout Plain Layout
14612 Cf.
14613 \begin_inset ERT
14614 status collapsed
14615
14616 \begin_layout Plain Layout
14617
14618
14619 \backslash
14620  
14621 \end_layout
14622
14623 \end_inset
14624
14625
14626 \begin_inset Flex URL
14627 status collapsed
14628
14629 \begin_layout Plain Layout
14630
14631 CTAN:/macros/latex/memoir/memman.pdf
14632 \end_layout
14633
14634 \end_inset
14635
14636 .
14637 \end_layout
14638
14639 \end_inset
14640
14641 , which is not only a user guide for the class, but also both a comprehensive
14642  description on good typesetting and a superb example for good typesetting
14643  itself.
14644 \end_layout
14645
14646 \begin_layout Subsection
14647 Basic features and restrictions
14648 \end_layout
14649
14650 \begin_layout Standard
14651 Memoir supports basically all features of the standard book classes.
14652  There are, however, some differences, as follows:
14653 \end_layout
14654
14655 \begin_layout Description
14656 Font
14657 \begin_inset space ~
14658 \end_inset
14659
14660 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14661 \end_layout
14662
14663 \begin_layout Description
14664 Page
14665 \begin_inset space ~
14666 \end_inset
14667
14668 style: The fancy page style is not supported, due to a command clash between
14669  Memoir and the fancyhdr package (they both define a command with the same
14670  name, which confuses LaTeX).
14671  Instead, Memoir comes with a number of its own page styles (see 
14672 \family sans
14673 Layout\SpecialChar \menuseparator
14674 Document\SpecialChar \menuseparator
14675 Page
14676 \begin_inset space ~
14677 \end_inset
14678
14679 Style
14680 \family default
14681 ).
14682  If you want to use these for the chapter pages, you have to use the command
14683  
14684 \family typewriter
14685
14686 \backslash
14687 chapterstyle
14688 \family default
14689  in the main text or in preamble (e.
14690 \begin_inset space \thinspace{}
14691 \end_inset
14692
14693 g.
14694 \begin_inset space \space{}
14695 \end_inset
14696
14697
14698 \family typewriter
14699
14700 \backslash
14701 chapterstyle{companion}
14702 \family default
14703 ).
14704 \end_layout
14705
14706 \begin_layout Description
14707 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14708  optional argument in the standard classes.
14709  With this, you can specify an alternative version of the title for the
14710  table of contents and the headers (for instance, if the title is too long).
14711  In LyX, you can do this via 
14712 \family sans
14713 Insert\SpecialChar \menuseparator
14714 Short
14715 \begin_inset space ~
14716 \end_inset
14717
14718 Title
14719 \family default
14720  at the beginning of a chapter/section.
14721  Memoir features a second optional argument and thus separates the table
14722  of contents from the header.
14723  You can define three variants of a title with this: one for the main text,
14724  one for the table of contents, and one for the headers.
14725  Simply insert two optional arguments if you need this feature, the first
14726  one containing the short title for the Table of Contents, the second one
14727  containing an alternative short title for the headers.
14728 \end_layout
14729
14730 \begin_layout Description
14731 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14732  of contents, the list of figures and the list of table start a new page
14733  automatically.
14734  Memoir does not follow this route.
14735  You have to insert a page break yourself, if you want to have one.
14736 \end_layout
14737
14738 \begin_layout Description
14739 Titlepage: For some unknown reason, Memoir uses pagination on the title
14740  page (in the standard classes, title pages are 
14741 \begin_inset Quotes eld
14742 \end_inset
14743
14744 empty
14745 \begin_inset Quotes erd
14746 \end_inset
14747
14748 , i.
14749 \begin_inset space \thinspace{}
14750 \end_inset
14751
14752 g.
14753 \begin_inset space \space{}
14754 \end_inset
14755
14756 without pagina).
14757  If you want an empty title page, type 
14758 \family typewriter
14759
14760 \backslash
14761 aliaspagestyle{title}{empty}
14762 \family default
14763  in the preamble.
14764 \end_layout
14765
14766 \begin_layout Description
14767 Article: With the class option 
14768 \emph on
14769 article
14770 \emph default
14771  (to be inserted in 
14772 \family sans
14773 Layout\SpecialChar \menuseparator
14774 Document\SpecialChar \menuseparator
14775 Extra
14776 \begin_inset space ~
14777 \end_inset
14778
14779 Options
14780 \family default
14781 ), you can emulate article style.
14782  That is, counters (footnotes, figures, tables etc.) will not be reset on
14783  new chapters, chapters don't start a new page (but are—in contrary to 
14784 \begin_inset Quotes eld
14785 \end_inset
14786
14787 real
14788 \begin_inset Quotes erd
14789 \end_inset
14790
14791  article classes—still allowed), parts, though, use their own page, as in
14792  book.
14793 \end_layout
14794
14795 \begin_layout Description
14796 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14797  font commands, which have been used in the old LaTeX version 2.09 (e.
14798 \begin_inset space \thinspace{}
14799 \end_inset
14800
14801 g.
14802 \begin_inset space \space{}
14803 \end_inset
14804
14805
14806 \family typewriter
14807
14808 \backslash
14809 rm
14810 \family default
14811
14812 \family typewriter
14813
14814 \backslash
14815 it
14816 \family default
14817 ).
14818  It produces an error and stops LaTeX whenever such a command appears.
14819  The class option 
14820 \emph on
14821 oldfontcommands
14822 \emph default
14823  reallows the commands and spits out warnings instead (which does at least
14824  not stop LaTeX).
14825  Since a lot of packages and particularly BibTeX style files are still using
14826  those commands, we have decided to use this option by default.
14827 \end_layout
14828
14829 \begin_layout Subsection
14830 Extra features
14831 \end_layout
14832
14833 \begin_layout Standard
14834 We will only describe the features supported by LyX (which is not much currently
14835 ).
14836  Please consult the Memoir manual
14837 \begin_inset Foot
14838 status collapsed
14839
14840 \begin_layout Plain Layout
14841 Cf.
14842 \begin_inset ERT
14843 status collapsed
14844
14845 \begin_layout Plain Layout
14846
14847
14848 \backslash
14849  
14850 \end_layout
14851
14852 \end_inset
14853
14854
14855 \begin_inset Flex URL
14856 status collapsed
14857
14858 \begin_layout Plain Layout
14859
14860 CTAN:/macros/latex/memoir/memman.pdf
14861 \end_layout
14862
14863 \end_inset
14864
14865 .
14866 \end_layout
14867
14868 \end_inset
14869
14870  for details.
14871 \end_layout
14872
14873 \begin_layout Description
14874 Abstract: You may wonder why an abstract is an extra feature.
14875  Well, it is in book class.
14876  Usually books don't have abstracts.
14877  Memoir, however, has.
14878  You can use it wherever and how often you like.
14879 \end_layout
14880
14881 \begin_layout Description
14882 Chapterprecis: You may know this older typesetting style: The contents of
14883  a chapter are summarized below the title and also in the table of contents
14884  (e.
14885 \begin_inset space \thinspace{}
14886 \end_inset
14887
14888 g.
14889 \begin_inset space \space{}
14890 \end_inset
14891
14892
14893 \emph on
14894 Our hero arrives in Troia; he loses some friends; he finds others
14895 \emph default
14896 ).
14897  Chapterprecis does exactly this.
14898  It is therefore only sensible below a chapter.
14899 \end_layout
14900
14901 \begin_layout Description
14902 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14903  The epigraph environment provides an elegant way of typesetting such a
14904  motto.
14905  The motto itself (text) and its author (source) are divided by a short
14906  line.
14907  Unfortunately, we have to fool LyX a bit here again, since the environment
14908  needs two arguments (text and source).
14909  In this case, we have to use curly brackets (in TeX mode) between the two
14910  arguments: 
14911 \emph on
14912 <smart slogan>
14913 \emph default
14914  
14915 \family typewriter
14916 }{
14917 \family default
14918  
14919 \emph on
14920 <author of the slogan>.
14921 \end_layout
14922
14923 \begin_layout Description
14924 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14925  complex figurative poems).
14926  LyX can only support a few of them.
14927  One is poemtitle, which is a centered title for poems, which will also
14928  be added to the table of contents (verse is the standard environment for
14929  poems.
14930  Memoir has some enhanced versions of verse, but you need to use TeX code,
14931  because they have to be nested inside regular verse environments, which
14932  is not possible with LyX).
14933 \end_layout
14934
14935 \begin_layout Description
14936 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14937 \end_layout
14938
14939 \begin_layout Section
14940 Article (mwart), book (mwbk) and report (mwrep)
14941 \begin_inset Argument
14942 status collapsed
14943
14944 \begin_layout Plain Layout
14945 The 
14946 \family typewriter
14947 mw
14948 \family default
14949  Classes
14950 \end_layout
14951
14952 \end_inset
14953
14954
14955 \end_layout
14956
14957 \begin_layout Standard
14958 by 
14959 \noun on
14960 Tomasz Luczak
14961 \end_layout
14962
14963 \begin_layout Standard
14964 The LyX document classes 
14965 \emph on
14966 article (mwart)
14967 \emph default
14968
14969 \emph on
14970 report (mwrep)
14971 \emph default
14972  and 
14973 \emph on
14974 book
14975 \emph default
14976  
14977 \emph on
14978 (mwbk)
14979 \emph default
14980  correspond to the LaTeX document classes 
14981 \family typewriter
14982 mwart.cls
14983 \family default
14984
14985 \family typewriter
14986 mwrep.cls
14987 \family default
14988  and 
14989 \family typewriter
14990 mwbk.cls
14991 \family default
14992 , resp.
14993  They are replacements for the standard document classes 
14994 \family typewriter
14995 article.cls
14996 \family default
14997
14998 \family typewriter
14999 report.cls
15000 \family default
15001  and 
15002 \family typewriter
15003 book.cls
15004 \family default
15005 , resp., and fit better to Polish typography conventions in a number of points.
15006  
15007 \end_layout
15008
15009 \begin_layout Standard
15010 Basic differences:
15011 \end_layout
15012
15013 \begin_layout Itemize
15014 Unnumbered titles (with star, e.
15015 \begin_inset space \thinspace{}
15016 \end_inset
15017
15018 g.
15019 \begin_inset space \space{}
15020 \end_inset
15021
15022
15023 \family sans
15024 Section*
15025 \family default
15026 ) are added into table of contents,
15027 \end_layout
15028
15029 \begin_layout Itemize
15030 Additional page styles:
15031 \end_layout
15032
15033 \begin_deeper
15034 \begin_layout Description
15035 uheadings header with separated lines,
15036 \end_layout
15037
15038 \begin_layout Description
15039 myheadings custom header, contents headers via commands: 
15040 \family typewriter
15041
15042 \backslash
15043 markright
15044 \family default
15045  and 
15046 \family typewriter
15047
15048 \backslash
15049 markboth
15050 \family default
15051 ,
15052 \end_layout
15053
15054 \begin_layout Description
15055 myuheadings custom header with separated lines,
15056 \end_layout
15057
15058 \begin_layout Description
15059 outer page number is placed on outer side of page
15060 \end_layout
15061
15062 \end_deeper
15063 \begin_layout Itemize
15064 Options 
15065 \end_layout
15066
15067 \begin_deeper
15068 \begin_layout Description
15069 rmheadings serif titles — default,
15070 \end_layout
15071
15072 \begin_layout Description
15073 sfheadings sansserif titles,
15074 \end_layout
15075
15076 \begin_layout Description
15077 authortitle on title page first placed is author next title — default,
15078 \end_layout
15079
15080 \begin_layout Description
15081 titleauthor on title page first placed is title next author,
15082 \end_layout
15083
15084 \begin_layout Description
15085 withmarginpar reserve place on page for margins.
15086 \end_layout
15087
15088 \end_deeper
15089 \begin_layout Section
15090 Paper
15091 \end_layout
15092
15093 \begin_layout Standard
15094 The document class 
15095 \family sans
15096 paper
15097 \family default
15098  provides an alternative to the standard 
15099 \family sans
15100 article
15101 \family default
15102  class.
15103  It provides similar functionality, but you might prefer this layout with
15104  sans serif sections, headings, and more.
15105 \end_layout
15106
15107 \begin_layout Section
15108 RevTeX4
15109 \end_layout
15110
15111 \begin_layout Standard
15112 by 
15113 \noun on
15114 Amir Karger
15115 \end_layout
15116
15117 \begin_layout Standard
15118 \begin_inset VSpace bigskip
15119 \end_inset
15120
15121
15122 \end_layout
15123
15124 \begin_layout Standard
15125 \noindent
15126 The 
15127 \family sans
15128 Revtex
15129 \begin_inset space ~
15130 \end_inset
15131
15132 4
15133 \family default
15134  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15135 \begin_inset Formula $\beta$
15136 \end_inset
15137
15138  release of May, 1999) class.
15139 \end_layout
15140
15141 \begin_layout Standard
15142 LyX has a 
15143 \family sans
15144 Revtex
15145 \family default
15146  textclass, which works with RevTeX 3.1.
15147  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15148  That means that it doesn't interact very well with LyX, which requires
15149  LaTeX2e, although it has been kludged to work.
15150  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15151  LyX with the 
15152 \family sans
15153 RevTeX
15154 \begin_inset space ~
15155 \end_inset
15156
15157 4
15158 \family default
15159  textclass should also be pretty easy to use.
15160 \end_layout
15161
15162 \begin_layout Standard
15163 These documents are supposed to be used in 
15164 \emph on
15165 addition
15166 \emph default
15167  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15168  macros, and assume you'll know what to put in the preamble if necessary.
15169 \end_layout
15170
15171 \begin_layout Subsection
15172 Installation
15173 \end_layout
15174
15175 \begin_layout Standard
15176 All you need to do is install RevTeX 4, as described in the package's README
15177  file.
15178  The package can be found at The RevTeX 4 Web Site 
15179 \begin_inset Flex URL
15180 status collapsed
15181
15182 \begin_layout Plain Layout
15183
15184 http://publish.aps.org/revtex4/
15185 \end_layout
15186
15187 \end_inset
15188
15189 .
15190  Install it somewhere that LaTeX can see it.
15191  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15192  (i.
15193 \begin_inset space \thinspace{}
15194 \end_inset
15195
15196 g.
15197 \begin_inset space \space{}
15198 \end_inset
15199
15200 not the directory where you installed the class file.) Then, if you reconfigure
15201  LyX, it will find the class file and let you use the RevTeX4 textclass.
15202 \end_layout
15203
15204 \begin_layout Standard
15205 Probably the easiest way to get started is either to import a RevTeX 4 document
15206  using 
15207 \family typewriter
15208 tex2lyx
15209 \family default
15210 , or to use the 
15211 \family sans
15212 Revtex
15213 \begin_inset space ~
15214 \end_inset
15215
15216 4
15217 \family default
15218  template, found in the templates directory.
15219 \end_layout
15220
15221 \begin_layout Subsection
15222 Preamble Matter
15223 \end_layout
15224
15225 \begin_layout Standard
15226 Optional arguments to 
15227 \family typewriter
15228
15229 \backslash
15230 documentclass
15231 \family default
15232 , like 
15233 \begin_inset Quotes eld
15234 \end_inset
15235
15236 preprint
15237 \begin_inset Quotes erd
15238 \end_inset
15239
15240  and 
15241 \begin_inset Quotes eld
15242 \end_inset
15243
15244 aps
15245 \begin_inset Quotes erd
15246 \end_inset
15247
15248 , go in the 
15249 \family sans
15250 E
15251 \bar under
15252 x
15253 \bar default
15254 tra
15255 \begin_inset space ~
15256 \end_inset
15257
15258 Options
15259 \family default
15260  field in the 
15261 \family sans
15262 Document
15263 \begin_inset space ~
15264 \end_inset
15265
15266 Layout
15267 \family default
15268  dialog, as usual.
15269  Remember that in RevTeX, at least one optional argument is required! 
15270 \end_layout
15271
15272 \begin_layout Standard
15273 Other preamble matter, like 
15274 \family typewriter
15275
15276 \backslash
15277 draft
15278 \family default
15279  etc.
15280 \begin_inset space ~
15281 \end_inset
15282
15283 goes in the 
15284 \family sans
15285 LaTeX
15286 \begin_inset space ~
15287 \end_inset
15288
15289 Preamble
15290 \family default
15291  dialog, also as usual.
15292 \end_layout
15293
15294 \begin_layout Subsection
15295 Layouts
15296 \end_layout
15297
15298 \begin_layout Standard
15299 The layouts basically correspond to the commands in RevTeX4.0.
15300  For example, the Email layout corresponds to 
15301 \family typewriter
15302
15303 \backslash
15304 email{}
15305 \family default
15306 .
15307  Note that (at least as of RevTeX 4.0 Beta), the 
15308 \family sans
15309 Address
15310 \family default
15311  and 
15312 \family sans
15313 Affiliation
15314 \family default
15315  layouts are exactly equivalent, so you shouldn't need to use both.
15316 \begin_inset Foot
15317 status collapsed
15318
15319 \begin_layout Plain Layout
15320 In case you're curious, both were included so that 
15321 \family typewriter
15322 tex2lyx
15323 \family default
15324  would be able to translate both 
15325 \family typewriter
15326
15327 \backslash
15328 address
15329 \family default
15330  and 
15331 \family typewriter
15332
15333 \backslash
15334 affiliation
15335 \family default
15336 .
15337 \end_layout
15338
15339 \end_inset
15340
15341
15342 \end_layout
15343
15344 \begin_layout Subsection
15345 Important Notes
15346 \end_layout
15347
15348 \begin_layout Standard
15349 There are a couple of important unique aspects of RevTeX 4 which might cause
15350  bugs that will be even more confusing in LyX.
15351 \end_layout
15352
15353 \begin_layout Standard
15354 In RevTeX, the 
15355 \family typewriter
15356
15357 \backslash
15358 thanks
15359 \family default
15360  command goes 
15361 \emph on
15362 outside
15363 \emph default
15364  the 
15365 \family typewriter
15366
15367 \backslash
15368 author
15369 \family default
15370  command.
15371  The LyX equivalent is that there is a separate Thanks layout.
15372  Do 
15373 \emph on
15374 not
15375 \emph default
15376  write footnotes in the 
15377 \family sans
15378 Author
15379 \family default
15380  layout, or weird things may happen.
15381  See the RevTeX 4 documentation for more details.
15382 \end_layout
15383
15384 \begin_layout Standard
15385 Also, the 
15386 \family sans
15387 Author
15388 \begin_inset space ~
15389 \end_inset
15390
15391 Email
15392 \family default
15393
15394 \family sans
15395 Author
15396 \begin_inset space ~
15397 \end_inset
15398
15399 URL
15400 \family default
15401 , and 
15402 \family sans
15403 Thanks
15404 \family default
15405  layouts must be placed 
15406 \emph on
15407 in between
15408 \emph default
15409  the 
15410 \family sans
15411 Author
15412 \family default
15413  layout and the corresponding 
15414 \family sans
15415 Address
15416 \family default
15417  (or equivalent 
15418 \family sans
15419 Affiliation
15420 \family default
15421 ) layout.
15422  If you put the 
15423 \family sans
15424 Thanks
15425 \family default
15426  after the 
15427 \family sans
15428 Address
15429 \family default
15430 , the LaTeX won't compile.
15431 \end_layout
15432
15433 \begin_layout Subsection
15434 Drawbacks
15435 \end_layout
15436
15437 \begin_layout Standard
15438 The main problem with this layout is that you can't use the optional arguments
15439  to layouts like Email and Title.
15440  (The problem is not unique to this layout; you can't use optional arguments
15441  to the Section layouts either.) This means that after you export that file
15442  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15443  need to edit the LaTeX file with a text editor to add the optional arguments
15444  to set, e.
15445 \begin_inset space \thinspace{}
15446 \end_inset
15447
15448 g.
15449 \begin_inset space \space{}
15450 \end_inset
15451
15452 the running title for the page headers.
15453  Lacking these layouts makes the 
15454 \family typewriter
15455
15456 \backslash
15457 altaffiliation
15458 \family default
15459  (and the equivalent 
15460 \family typewriter
15461
15462 \backslash
15463 altaddress
15464 \family default
15465 ) useless, so the corresponding layouts don't exist, and will have to be
15466  added by hand.
15467 \begin_inset Foot
15468 status collapsed
15469
15470 \begin_layout Plain Layout
15471
15472 \emph on
15473 Note from JMarc:
15474 \emph default
15475  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15476  has not been updated yet to take advantage of it.
15477 \end_layout
15478
15479 \end_inset
15480
15481  
15482 \end_layout
15483
15484 \begin_layout Section
15485 Springer Journals (
15486 \family sans
15487 svjour
15488 \family default
15489 )
15490 \end_layout
15491
15492 \begin_layout Standard
15493 by 
15494 \noun on
15495 Martin Vermeer
15496 \end_layout
15497
15498 \begin_layout Subsection
15499 Description
15500 \end_layout
15501
15502 \begin_layout Standard
15503 These are the layout files for some of the journal formats used by Springer
15504  Verlag and listed on 
15505 \begin_inset Flex URL
15506 status collapsed
15507
15508 \begin_layout Plain Layout
15509
15510 http://www.springer.de/author/tex/help-journals.html
15511 \end_layout
15512
15513 \end_inset
15514
15515 , where you should also go to fetch the class files (yes, these are LaTeX2e
15516  now!).
15517  It is a modular system: the things common to all journals are implemented
15518  in 
15519 \family typewriter
15520 svjour.inc
15521 \family default
15522 , which journal-specific layout files (such as, e.
15523 \begin_inset space \thinspace{}
15524 \end_inset
15525
15526 g.
15527 \begin_inset space \space{}
15528 \end_inset
15529
15530
15531 \family typewriter
15532 svjog.layout
15533 \family default
15534  for Journal of Geodesy) can include.
15535 \end_layout
15536
15537 \begin_layout Standard
15538 This means that implementing support for any other Springer journal on this
15539  list is as simple as writing your own 
15540 \family typewriter
15541 sv
15542 \family default
15543 <myjournal>
15544 \family typewriter
15545 .layout
15546 \family default
15547  file following the outline given in 
15548 \family typewriter
15549 svjog.layout
15550 \family default
15551 .
15552  
15553 \end_layout
15554
15555 \begin_layout Standard
15556 It is reasonably well tested only for the Journal of Geodesy.
15557  
15558 \family typewriter
15559 svjour
15560 \family default
15561  and 
15562 \family typewriter
15563 svjog
15564 \family default
15565  come with the standard LyX distribution.
15566  Install the relevant class file (downloaded from Springer) in a proper
15567  directory, reconfigure LaTeX (in the teTeX case by running 
15568 \family typewriter
15569 texhash
15570 \family default
15571 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15572  and it should work.
15573 \end_layout
15574
15575 \begin_layout Subsection
15576 New styles
15577 \end_layout
15578
15579 \begin_layout Standard
15580 A large number of theorem-like styles — 
15581 \family sans
15582 Claim, Conjecture,
15583 \family default
15584  
15585 \family sans
15586 \SpecialChar \ldots{}
15587 Theorem
15588 \family default
15589 .
15590 \end_layout
15591
15592 \begin_layout Standard
15593
15594 \family sans
15595 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15596  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15597 \family default
15598 .
15599  See the Springer class file documentation for details.
15600 \end_layout
15601
15602 \begin_layout Subsection
15603 Supported journals
15604 \end_layout
15605
15606 \begin_layout Itemize
15607
15608 \emph on
15609 Journal of Geodesy
15610 \emph default
15611
15612 \family typewriter
15613 svjog.layout
15614 \family default
15615  — Martin Vermeer
15616 \end_layout
15617
15618 \begin_layout Itemize
15619
15620 \emph on
15621 Probability Theory and Related Fields
15622 \emph default
15623
15624 \family typewriter
15625 svprobth.layout
15626 \family default
15627  — Jean-Marc Lasgouttes
15628 \end_layout
15629
15630 \begin_layout Standard
15631 Add your own, it isn't so hard!
15632 \end_layout
15633
15634 \begin_layout Subsection
15635 Credits
15636 \end_layout
15637
15638 \begin_layout Standard
15639 These files are partly based on the older 
15640 \family typewriter
15641 ejour2.layout
15642 \family default
15643 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15644  file from Springer.
15645  All this, and the 
15646 \family typewriter
15647 ejour2
15648 \family default
15649  layout, are now defunct.
15650  Jean-Marc Lasgouttes helped out big in making me find my way around the
15651  LyX layout file mechanism.
15652 \end_layout
15653
15654 \begin_layout Subsection
15655 Bugs
15656 \end_layout
15657
15658 \begin_layout Standard
15659 Probably.
15660  But probably less than in the old hacked-LaTeX 
15661 \family typewriter
15662 ejour2
15663 \family default
15664 .
15665 \end_layout
15666
15667 \begin_layout Standard
15668 Limitations e.
15669 \begin_inset space \thinspace{}
15670 \end_inset
15671
15672 g.: does not display the number for theorem-like layouts, just #.
15673 \end_layout
15674
15675 \begin_layout Section
15676 Slides [aka 
15677 \noun on
15678 SliTeX
15679 \noun default
15680 ]
15681 \begin_inset CommandInset label
15682 LatexCommand label
15683 name "sec:slitex"
15684
15685 \end_inset
15686
15687
15688 \end_layout
15689
15690 \begin_layout Standard
15691 by 
15692 \noun on
15693 John Weiss
15694 \noun default
15695  
15696 \end_layout
15697
15698 \begin_layout Subsection
15699 Introduction
15700 \end_layout
15701
15702 \begin_layout Standard
15703 This section describes how to use LyX to make slides for overhead projectors.
15704  There are two document classes that can do this: the default slides class
15705  and the 
15706 \family sans
15707 FoilTeX
15708 \family default
15709  slides class.
15710  This section documents the former.
15711 \end_layout
15712
15713 \begin_layout Standard
15714 I'm going to say this again, nice and clear, so that there's no misunderstanding
15715 :
15716 \end_layout
15717
15718 \begin_layout Standard
15719 \begin_inset VSpace bigskip
15720 \end_inset
15721
15722
15723 \end_layout
15724
15725 \begin_layout Standard
15726 \align center
15727
15728 \size large
15729 This section documents the class 
15730 \begin_inset Quotes eld
15731 \end_inset
15732
15733
15734 \family sans
15735 slides (default)
15736 \family default
15737
15738 \begin_inset Quotes erd
15739 \end_inset
15740
15741  
15742 \emph on
15743 only.
15744 \end_layout
15745
15746 \begin_layout Standard
15747 \begin_inset VSpace bigskip
15748 \end_inset
15749
15750
15751 \end_layout
15752
15753 \begin_layout Standard
15754 If you're looking for the documentation for 
15755 \begin_inset Quotes eld
15756 \end_inset
15757
15758
15759 \family sans
15760 slides (FoilTeX)
15761 \family default
15762
15763 \begin_inset Quotes erd
15764 \end_inset
15765
15766 , check out section
15767 \begin_inset space ~
15768 \end_inset
15769
15770
15771 \begin_inset CommandInset ref
15772 LatexCommand ref
15773 reference "sec:foiltex"
15774
15775 \end_inset
15776
15777 .
15778  The 
15779 \family sans
15780 foils
15781 \family default
15782  class [
15783 \begin_inset Quotes eld
15784 \end_inset
15785
15786
15787 \family sans
15788 slides (FoilTeX)
15789 \family default
15790
15791 \begin_inset Quotes erd
15792 \end_inset
15793
15794 ] is actually somewhat better than the default 
15795 \family sans
15796 slides
15797 \family default
15798  class,
15799 \begin_inset Foot
15800 status collapsed
15801
15802 \begin_layout Plain Layout
15803 \SpecialChar \ldots{}
15804 or so I've been told repeatedly by its advocates.
15805  Having never used it, I have no idea if this claim is true or not.
15806 \end_layout
15807
15808 \end_inset
15809
15810  which this section documents.
15811 \end_layout
15812
15813 \begin_layout Standard
15814 This class is the LaTeX2e improvement of the old 
15815 \noun on
15816 SliTeX
15817 \noun default
15818  package.
15819  Every LaTeX2e distribution includes this class [which I'll just refer to
15820  as 
15821 \begin_inset Quotes eld
15822 \end_inset
15823
15824
15825 \family sans
15826 slides
15827 \family default
15828
15829 \begin_inset Quotes erd
15830 \end_inset
15831
15832  from now on], so you're bound to have it.
15833  As I noted earlier, there are other classes, such as 
15834 \family sans
15835 foils
15836 \family default
15837 , which also produce slides for overhead projectors and do a better job
15838  at it.
15839  However, there are some things which 
15840 \family sans
15841 slides
15842 \family default
15843  can do which the others can't, such as generate overlays.
15844  Read on to learn more!
15845 \end_layout
15846
15847 \begin_layout Subsection
15848 Getting Started
15849 \begin_inset CommandInset label
15850 LatexCommand label
15851 name "sec:slidesetup"
15852
15853 \end_inset
15854
15855
15856 \end_layout
15857
15858 \begin_layout Standard
15859 Obviously, to use this document class, you need to select 
15860 \begin_inset Quotes eld
15861 \end_inset
15862
15863
15864 \family sans
15865 slides (default)
15866 \family default
15867
15868 \begin_inset Quotes erd
15869 \end_inset
15870
15871  from the class list in the 
15872 \family sans
15873 Document\SpecialChar \menuseparator
15874 Settings
15875 \family default
15876  dialog.
15877  There are some other special things you should know about this class:
15878 \end_layout
15879
15880 \begin_layout Itemize
15881 Don't bother changing the options 
15882 \family sans
15883 Sides and Columns
15884 \family default
15885 .
15886  They're not supported by the 
15887 \family sans
15888 slides
15889 \family default
15890  class, anyways.
15891 \end_layout
15892
15893 \begin_layout Itemize
15894 The option 
15895 \family sans
15896 Page
15897 \begin_inset space ~
15898 \end_inset
15899
15900 style
15901 \family default
15902  behaves a bit differently for this class.
15903  The possible choices and what they do are as follows:
15904 \end_layout
15905
15906 \begin_deeper
15907 \begin_layout Description
15908
15909 \family sans
15910 plain
15911 \family default
15912  The final output contains page numbers in the lower right corner.
15913 \end_layout
15914
15915 \begin_layout Description
15916
15917 \family sans
15918 headings
15919 \family default
15920  Like 
15921 \family sans
15922 plain
15923 \family default
15924 , but also prints out any time markers you've put in.
15925  This is the default.
15926 \end_layout
15927
15928 \begin_layout Description
15929
15930 \family sans
15931 empty
15932 \family default
15933  The final output contains no page numbers, time markers, or alignment markers.
15934 \end_layout
15935
15936 \end_deeper
15937 \begin_layout Itemize
15938 The 
15939 \family sans
15940 slides
15941 \family default
15942  class has an extra option: 
15943 \family typewriter
15944 clock
15945 \family default
15946 .
15947  To use it, put 
15948 \begin_inset Quotes eld
15949 \end_inset
15950
15951
15952 \family typewriter
15953 clock
15954 \family default
15955
15956 \begin_inset Quotes erd
15957 \end_inset
15958
15959  in the extra class options.
15960 \end_layout
15961
15962 \begin_deeper
15963 \begin_layout Standard
15964 Using this options allows you to add time markers to 
15965 \family sans
15966 Note
15967 \family default
15968 s.
15969  See section
15970 \begin_inset space ~
15971 \end_inset
15972
15973
15974 \begin_inset CommandInset ref
15975 LatexCommand ref
15976 reference "sec:slideNote"
15977
15978 \end_inset
15979
15980  for more details.
15981 \end_layout
15982
15983 \end_deeper
15984 \begin_layout Standard
15985 You can also use the template file 
15986 \begin_inset Quotes eld
15987 \end_inset
15988
15989
15990 \family typewriter
15991 slides.lyx
15992 \family default
15993
15994 \begin_inset Quotes erd
15995 \end_inset
15996
15997  to automatically set up a document to use the 
15998 \family sans
15999 slides
16000 \family default
16001  class [using 
16002 \family sans
16003 File\SpecialChar \menuseparator
16004 New
16005 \begin_inset space ~
16006 \end_inset
16007
16008 from
16009 \begin_inset space ~
16010 \end_inset
16011
16012 Template
16013 \family default
16014  to open your new document].
16015  The template file also contains some examples of the special paragraph
16016  environments used by this class.
16017  I'll describe those next.
16018 \end_layout
16019
16020 \begin_layout Subsection
16021 Paragraph Environments
16022 \end_layout
16023
16024 \begin_layout Subsubsection
16025 Supported Environments
16026 \end_layout
16027
16028 \begin_layout Standard
16029 The first thing you'll notice when you start up a new 
16030 \family sans
16031 slides
16032 \family default
16033  document is the font size and type: it's the equivalent of the size 
16034 \begin_inset Quotes eld
16035 \end_inset
16036
16037
16038 \family sans
16039 Largest
16040 \family default
16041
16042 \begin_inset Quotes erd
16043 \end_inset
16044
16045  in the 
16046 \family sans
16047 Sans
16048 \begin_inset space ~
16049 \end_inset
16050
16051 Serif
16052 \family default
16053  font.
16054  This is also what's used in the output.
16055  Think of this as a 
16056 \begin_inset Quotes eld
16057 \end_inset
16058
16059 visual cue
16060 \begin_inset Quotes erd
16061 \end_inset
16062
16063  to remind you that this is a slide.
16064  Your final slides will use a larger font; ergo, you'll have less space.
16065  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16066 \end_layout
16067
16068 \begin_layout Standard
16069 The next thing that becomes obvious is the changes to the paragraph environment
16070  pull-down box [at the far-left end of the toolbar].
16071  Most of the paragraph environments you're used to seeing are missing.
16072  There are also five new ones.
16073  That's because the 
16074 \family sans
16075 slides
16076 \family default
16077  class itself only supports certain paragraph environments:
16078 \end_layout
16079
16080 \begin_layout Itemize
16081
16082 \family sans
16083 Standard
16084 \end_layout
16085
16086 \begin_layout Itemize
16087
16088 \family sans
16089 Itemize
16090 \end_layout
16091
16092 \begin_layout Itemize
16093
16094 \family sans
16095 Enumerate
16096 \end_layout
16097
16098 \begin_layout Itemize
16099
16100 \family sans
16101 Description
16102 \end_layout
16103
16104 \begin_layout Itemize
16105
16106 \family sans
16107 List
16108 \end_layout
16109
16110 \begin_layout Itemize
16111
16112 \family sans
16113 Quotation
16114 \end_layout
16115
16116 \begin_layout Itemize
16117
16118 \family sans
16119 Quote
16120 \end_layout
16121
16122 \begin_layout Itemize
16123
16124 \family sans
16125 Verse
16126 \end_layout
16127
16128 \begin_layout Itemize
16129
16130 \family sans
16131 Caption
16132 \end_layout
16133
16134 \begin_layout Itemize
16135
16136 \family sans
16137 LyX-Code
16138 \end_layout
16139
16140 \begin_layout Itemize
16141
16142 \family sans
16143 Comment
16144 \end_layout
16145
16146 \begin_layout Standard
16147 All of the other standard environments, including the section-heading environmen
16148 ts, aren't used in the 
16149 \family sans
16150 slides
16151 \family default
16152  class.
16153 \end_layout
16154
16155 \begin_layout Standard
16156 On the other hand, you'll notice the following new environments:
16157 \end_layout
16158
16159 \begin_layout Itemize
16160
16161 \family sans
16162 Slide
16163 \end_layout
16164
16165 \begin_layout Itemize
16166
16167 \family sans
16168 Overlay
16169 \end_layout
16170
16171 \begin_layout Itemize
16172
16173 \family sans
16174 Note
16175 \end_layout
16176
16177 \begin_layout Itemize
16178
16179 \family sans
16180 InvisibleText
16181 \end_layout
16182
16183 \begin_layout Itemize
16184
16185 \family sans
16186 VisibleText
16187 \end_layout
16188
16189 \begin_layout Standard
16190 These five are kind of quirky, due to a 
16191 \begin_inset Quotes eld
16192 \end_inset
16193
16194 feature
16195 \begin_inset Quotes erd
16196 \end_inset
16197
16198  in LyX.
16199  You see, LyX doesn't permit you to nest any other paragraph environment
16200  into an empty environment.
16201  Now, that's fine and dandy, but it means that you wouldn't be able to start
16202  a slide with anything except plain text.
16203  To deal with this, I've performed a little 
16204 \begin_inset Quotes eld
16205 \end_inset
16206
16207 LaTeX magic.
16208 \begin_inset Quotes erd
16209 \end_inset
16210
16211  
16212 \end_layout
16213
16214 \begin_layout Subsubsection
16215 Quirks of the New Environments
16216 \begin_inset CommandInset label
16217 LatexCommand label
16218 name "sec:slideQuirk"
16219
16220 \end_inset
16221
16222
16223 \end_layout
16224
16225 \begin_layout Standard
16226 All five of the new paragraph environments are somewhat quirky due to inherent
16227  limitiations in the current version of LyX.
16228  As I just mentioned, LyX forbids environments that begin with another environme
16229 nt.
16230  To get around this, the 
16231 \family sans
16232 Slide
16233 \family default
16234  environment isn't a paragraph environment as described in the 
16235 \emph on
16236 User's Guide
16237 \emph default
16238 .
16239  
16240 \end_layout
16241
16242 \begin_layout Standard
16243 You should consider 
16244 \family sans
16245 Slide
16246 \family default
16247
16248 \family sans
16249 Overlay
16250 \family default
16251 , and 
16252 \family sans
16253 Note
16254 \family default
16255  to be 
16256 \begin_inset Quotes eld
16257 \end_inset
16258
16259 pseudo-environments.
16260 \begin_inset Quotes erd
16261 \end_inset
16262
16263  They look like a section heading or a 
16264 \begin_inset Quotes eld
16265 \end_inset
16266
16267
16268 \family sans
16269 Caption
16270 \family default
16271 ,
16272 \begin_inset Quotes erd
16273 \end_inset
16274
16275  but really begin a [and, if necessary, end the previous] paragraph environment.
16276  Likewise, treat 
16277 \family sans
16278 InvisibleText
16279 \family default
16280  and 
16281 \family sans
16282 VisibleText
16283 \family default
16284  as 
16285 \begin_inset Quotes eld
16286 \end_inset
16287
16288 pseudo-commands.
16289 \begin_inset Quotes erd
16290 \end_inset
16291
16292  These two perform some action.
16293 \end_layout
16294
16295 \begin_layout Standard
16296 A common feature of all five environments, 
16297 \family sans
16298 Slide
16299 \family default
16300
16301 \family sans
16302 Overlay
16303 \family default
16304
16305 \family sans
16306 Note
16307 \family default
16308
16309 \family sans
16310 InvisibleText
16311 \family default
16312  and 
16313 \family sans
16314 VisibleText
16315 \family default
16316 , is a rather long-ish label.
16317  The text following this label — ordinarily the contents of the paragraph
16318  environment — is utterly irrelevant for 
16319 \family sans
16320 Slide
16321 \family default
16322
16323 \family sans
16324 Overlay
16325 \family default
16326
16327 \family sans
16328 Note
16329 \family default
16330
16331 \family sans
16332 InvisibleText
16333 \family default
16334  and 
16335 \family sans
16336 VisibleText
16337 \family default
16338 .
16339  LyX completely ignores it.
16340  In fact, you can leave these five environments completely empty.
16341  
16342 \end_layout
16343
16344 \begin_layout Standard
16345 While you don't 
16346 \emph on
16347 have
16348 \emph default
16349  to put any text after the rather long-ish label, you might want to.
16350  This could be a short description of the contents of the 
16351 \family sans
16352 Slide
16353 \family default
16354 , for example.
16355  In that case, enter your descriptive comment and hit 
16356 \family sans
16357 Return
16358 \family default
16359  as you normally would.
16360 \end_layout
16361
16362 \begin_layout Standard
16363 If, on the other hand, you don't want to enter any descriptive text, you'll
16364  hit another LyX quirk.
16365  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16366  environment until you put something in the old one.
16367  So, do this:
16368 \end_layout
16369
16370 \begin_layout Itemize
16371 Start entering the text that will 
16372 \emph on
16373 follow
16374 \emph default
16375  the new 
16376 \family sans
16377 Slide
16378 \family default
16379
16380 \family sans
16381 Overlay
16382 \family default
16383
16384 \family sans
16385 Note
16386 \family default
16387
16388 \family sans
16389 InvisibleText
16390 \family default
16391  or 
16392 \family sans
16393 VisibleText
16394 \family default
16395 .
16396  
16397 \end_layout
16398
16399 \begin_layout Itemize
16400 Now move to the beginning of that paragraph.
16401  
16402 \end_layout
16403
16404 \begin_layout Itemize
16405 Next, hit 
16406 \family sans
16407 Return
16408 \family default
16409 .
16410  
16411 \end_layout
16412
16413 \begin_layout Itemize
16414 Finally, change this new, empty paragraph to a 
16415 \family sans
16416 Slide
16417 \family default
16418
16419 \family sans
16420 Overlay
16421 \family default
16422
16423 \family sans
16424 Note
16425 \family default
16426
16427 \family sans
16428 InvisibleText
16429 \family default
16430  or 
16431 \family sans
16432 VisibleText
16433 \family default
16434 .
16435  
16436 \end_layout
16437
16438 \begin_layout Standard
16439 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16440
16441 \end_layout
16442
16443 \begin_layout Subsection
16444 Making a Presentation with 
16445 \family sans
16446 Slide
16447 \family default
16448
16449 \family sans
16450 Overlay
16451 \family default
16452  and 
16453 \family sans
16454 Note
16455 \end_layout
16456
16457 \begin_layout Subsubsection
16458 Using the 
16459 \family sans
16460 Slide
16461 \family default
16462  Environment
16463 \end_layout
16464
16465 \begin_layout Standard
16466 If you're expecting this section to teach you how to actually make a presentatio
16467 n, you'll be sorely disappointed.
16468  Naturally, I'll describe all of the ways the 
16469 \family sans
16470 slides
16471 \family default
16472  class can assist you in preparing the materials for a presentation.
16473  Filling in the contents, however, is up to you.
16474  [Then again, that 
16475 \emph on
16476 is
16477 \emph default
16478  the LyX philosophy.]
16479 \end_layout
16480
16481 \begin_layout Standard
16482 Choosing the 
16483 \family sans
16484 Slide
16485 \family default
16486  environment [in the manner described in section
16487 \begin_inset space ~
16488 \end_inset
16489
16490
16491 \begin_inset CommandInset ref
16492 LatexCommand ref
16493 reference "sec:slideQuirk"
16494
16495 \end_inset
16496
16497 ] tells LyX to begin a new slide [duh].
16498  The label for this environment/
16499 \begin_inset Quotes erd
16500 \end_inset
16501
16502 pseudo-command
16503 \begin_inset Quotes erd
16504 \end_inset
16505
16506  is an 
16507 \begin_inset Quotes eld
16508 \end_inset
16509
16510 ASCII line,
16511 \begin_inset Quotes erd
16512 \end_inset
16513
16514  in cool blue, followed by the label, 
16515 \begin_inset Quotes eld
16516 \end_inset
16517
16518 NewSlide:
16519 \begin_inset Quotes erd
16520 \end_inset
16521
16522 .
16523  Any text or paragraph environments that follow this one go on the new slide.
16524  It's that simple.
16525 \end_layout
16526
16527 \begin_layout Standard
16528 Slides are probably the only time you'll need to forcibly end pages in LyX
16529  (this can be specified in the 
16530 \family sans
16531 Paragraph Layout
16532 \family default
16533  dialog).
16534  In fact, you'll want to, once you finish entering the contents of one slide.
16535  If you've entered more text than can physically fit on a slide, the extra
16536  overflows onto a new slide.
16537  I don't recommend doing this, however, since the overflow slide won't have
16538  any page number on it.
16539  Furthermore, it may interfere with any 
16540 \family sans
16541 Overlay
16542 \family default
16543  you've made to accompany the oversized 
16544 \family sans
16545 Slide
16546 \family default
16547 .
16548 \end_layout
16549
16550 \begin_layout Standard
16551 The 
16552 \family sans
16553 Overlay
16554 \family default
16555  and 
16556 \family sans
16557 Note
16558 \family default
16559  environments work the same way as the 
16560 \family sans
16561 Slide
16562 \family default
16563  environment.
16564  They both create an 
16565 \begin_inset Quotes eld
16566 \end_inset
16567
16568 ASCII line
16569 \begin_inset Quotes erd
16570 \end_inset
16571
16572  followed by a label [
16573 \begin_inset Quotes eld
16574 \end_inset
16575
16576 NewOverlay:
16577 \begin_inset Quotes erd
16578 \end_inset
16579
16580  and 
16581 \begin_inset Quotes eld
16582 \end_inset
16583
16584 NewNote:
16585 \begin_inset Quotes erd
16586 \end_inset
16587
16588 , respectively].
16589  The color is a stunning magenta instead of blue, and the 
16590 \begin_inset Quotes eld
16591 \end_inset
16592
16593 ASCII line
16594 \begin_inset Quotes erd
16595 \end_inset
16596
16597  will look different, in style and in length.
16598  The label fonts of all three also differ from one another.
16599 \end_layout
16600
16601 \begin_layout Standard
16602 As with a 
16603 \family sans
16604 Slide
16605 \family default
16606 , if the contents of a 
16607 \family sans
16608 Note
16609 \family default
16610  or 
16611 \family sans
16612 Overlay
16613 \family default
16614  exceed the physical size of a slide or sheet of paper, the extra will overflow
16615  onto a new sheet.
16616  Again, you should avoid this.
16617  It defeats the whole purpose of 
16618 \family sans
16619 Note
16620 \family default
16621 s and 
16622 \family sans
16623 Overlay
16624 \family default
16625 s.
16626 \end_layout
16627
16628 \begin_layout Subsubsection
16629 Using 
16630 \family sans
16631 Overlay
16632 \family default
16633  with 
16634 \family sans
16635 Slide
16636 \end_layout
16637
16638 \begin_layout Standard
16639 The idea behind an 
16640 \family sans
16641 Overlay
16642 \family default
16643  is a slide that sits atop another slide.
16644  Perhaps you wish to discuss a figure on the main 
16645 \family sans
16646 Slide
16647 \family default
16648  before displaying the text associated with it.
16649  One way to accomplish this is tape a flap of dark paper over the part of
16650  the 
16651 \family sans
16652 Slide
16653 \family default
16654  you want to display later.
16655  This method fails, however, if you wish to overlap one graph with another,
16656  for example.
16657  You would then have to fumble while speaking to align the two separate,
16658  overlapping 
16659 \family sans
16660 Slide
16661 \family default
16662 s to align the two graphs.
16663  The use of an 
16664 \family sans
16665 Overlay
16666 \family default
16667  environment in both cases makes life much easier.
16668 \end_layout
16669
16670 \begin_layout Standard
16671 Each 
16672 \family sans
16673 Overlay
16674 \family default
16675  receives the page number of its 
16676 \begin_inset Quotes eld
16677 \end_inset
16678
16679 parent
16680 \begin_inset Quotes erd
16681 \end_inset
16682
16683  
16684 \family sans
16685 Slide
16686 \family default
16687 , appended by 
16688 \begin_inset Quotes eld
16689 \end_inset
16690
16691
16692 \family typewriter
16693 -a
16694 \family default
16695
16696 \begin_inset Quotes erd
16697 \end_inset
16698
16699 .
16700 \begin_inset Foot
16701 status collapsed
16702
16703 \begin_layout Plain Layout
16704 Presumably, mutliple 
16705 \family sans
16706 Overlay
16707 \family default
16708 s would have 
16709 \begin_inset Quotes eld
16710 \end_inset
16711
16712
16713 \family typewriter
16714 -a
16715 \family default
16716
16717 \begin_inset Quotes erd
16718 \end_inset
16719
16720
16721 \begin_inset Quotes eld
16722 \end_inset
16723
16724
16725 \family typewriter
16726 -b
16727 \family default
16728
16729 \begin_inset Quotes erd
16730 \end_inset
16731
16732
16733 \begin_inset Quotes eld
16734 \end_inset
16735
16736
16737 \family typewriter
16738 -c
16739 \family default
16740
16741 \begin_inset Quotes erd
16742 \end_inset
16743
16744 , etc.
16745 \begin_inset space ~
16746 \end_inset
16747
16748 appended to the page number of the parent 
16749 \family sans
16750 Slide
16751 \family default
16752 .
16753  
16754 \end_layout
16755
16756 \end_inset
16757
16758  Clearly, you want the contents of both the 
16759 \family sans
16760 Slide
16761 \family default
16762  and the 
16763 \family sans
16764 Overlay
16765 \family default
16766  to each fit on a single physical slide! You should probably consider an
16767  
16768 \family sans
16769 Overlay
16770 \family default
16771  as 
16772 \begin_inset Quotes eld
16773 \end_inset
16774
16775 part of
16776 \begin_inset Quotes erd
16777 \end_inset
16778
16779  a 
16780 \family sans
16781 Slide
16782 \family default
16783 .
16784  Indeed, the LyX 
16785 \family sans
16786 slides
16787 \family default
16788  class provides a visual cue for this: the label at the start of an 
16789 \family sans
16790 Overlay
16791 \family default
16792  is shorter than that at the start of a 
16793 \family sans
16794 Slide
16795 \family default
16796 .
16797  Lastly, when you generate printable output, you'll find alignment markers
16798  in all four corners of both the 
16799 \family sans
16800 Overlay
16801 \family default
16802  page and its parent 
16803 \family sans
16804 Slide
16805 \family default
16806 .
16807  These will assist you in lining up the two physical slides.
16808 \end_layout
16809
16810 \begin_layout Standard
16811 The major problem in overlaying two slides is aligning the contents of the
16812  two transparencies.
16813  How much space should you leave for that graph on the second slide? Worse
16814  still, what if you want a graph and a sentence on second slide, but there
16815  is text on the main transparency that goes in between them? You could try
16816  and insert vertical space of the right size.
16817  The better way is to use 
16818 \family sans
16819 InvisibleText
16820 \family default
16821  and 
16822 \family sans
16823 VisibleText
16824 \family default
16825 .
16826 \end_layout
16827
16828 \begin_layout Standard
16829 As their names imply, 
16830 \family sans
16831 InvisibleText
16832 \family default
16833  and 
16834 \family sans
16835 VisibleText
16836 \family default
16837  are two command-like paragraph environments that make all subsequent text
16838  invisible and visible, respectively.
16839  Note from section
16840 \begin_inset space ~
16841 \end_inset
16842
16843
16844 \begin_inset CommandInset ref
16845 LatexCommand ref
16846 reference "sec:slideQuirk"
16847
16848 \end_inset
16849
16850  that you don't place anything 
16851 \emph on
16852 into
16853 \emph default
16854  these two environments, however.
16855  When you create an 
16856 \family sans
16857 InvisibleText
16858 \family default
16859 , it inserts a centered, sky-blue label into the page reading 
16860 \begin_inset Quotes eld
16861 \end_inset
16862
16863 <Invisible Text Follows>
16864 \begin_inset Quotes erd
16865 \end_inset
16866
16867 .
16868  For paragraphs following this label, the parts of the 
16869 \family sans
16870 Slide
16871 \family default
16872  [or 
16873 \family sans
16874 Overlay
16875 \family default
16876 ; it doesn't matter which] where they would be contain instead blank space.
16877  
16878 \end_layout
16879
16880 \begin_layout Standard
16881 For 
16882 \family sans
16883 VisibleText
16884 \family default
16885 , the corresponding centered label is 
16886 \begin_inset Quotes eld
16887 \end_inset
16888
16889 <Visible Text Follows>
16890 \begin_inset Quotes erd
16891 \end_inset
16892
16893  in blazing green.
16894  Paragraphs following this label behave normally.
16895  Note that the beginning of a new 
16896 \family sans
16897 Slide
16898 \family default
16899
16900 \family sans
16901 Overlay
16902 \family default
16903 , or 
16904 \family sans
16905 Note
16906 \family default
16907  automatically shuts off an 
16908 \family sans
16909 InvisibleText
16910 \family default
16911 .
16912  It's therefore not necessary to use 
16913 \family sans
16914 VisibleText
16915 \family default
16916  at the end of a 
16917 \family sans
16918 Slide
16919 \family default
16920 .
16921 \end_layout
16922
16923 \begin_layout Standard
16924 By now, it should be obvious how to create overlay transparencies using
16925  the proper combination of 
16926 \family sans
16927 InvisibleText
16928 \family default
16929  and 
16930 \family sans
16931 VisibleText
16932 \family default
16933  on a 
16934 \family sans
16935 Slide
16936 \family default
16937  and 
16938 \family sans
16939 Overlay
16940 \family default
16941 :
16942 \end_layout
16943
16944 \begin_layout Enumerate
16945 Create a 
16946 \family sans
16947 Slide
16948 \family default
16949 , including everything that will appear on it, whether on the main slide
16950  or on the 
16951 \family sans
16952 Overlay
16953 \family default
16954 .
16955 \end_layout
16956
16957 \begin_layout Enumerate
16958 Before each figure or paragraph that will appear only on the 
16959 \family sans
16960 Overlay
16961 \family default
16962 , insert an 
16963 \family sans
16964 InvisibleText
16965 \family default
16966  environment.
16967  If necessary, insert a 
16968 \family sans
16969 VisibleText
16970 \family default
16971  environment after the 
16972 \family sans
16973 Overlay
16974 \family default
16975 -only text.
16976 \end_layout
16977
16978 \begin_layout Enumerate
16979 Start an 
16980 \family sans
16981 Overlay
16982 \family default
16983  immediately following the 
16984 \family sans
16985 Slide
16986 \family default
16987 .
16988 \end_layout
16989
16990 \begin_layout Enumerate
16991 Copy the contents of this 
16992 \family sans
16993 Slide
16994 \family default
16995  into the 
16996 \family sans
16997 Overlay
16998 \family default
16999 .
17000 \end_layout
17001
17002 \begin_layout Enumerate
17003 Within the 
17004 \family sans
17005 Overlay
17006 \family default
17007 , change all of the 
17008 \family sans
17009 InvisibleText
17010 \family default
17011  lines to 
17012 \family sans
17013 VisibleText
17014 \family default
17015  and vice-versa.
17016 \end_layout
17017
17018 \begin_layout Standard
17019 That's it.
17020  You've just made an 
17021 \family sans
17022 Overlay
17023 \family default
17024 .
17025 \end_layout
17026
17027 \begin_layout Standard
17028 There's one problem with the way I've designed the LyX 
17029 \family sans
17030 slides
17031 \family default
17032  class: you can't make text in the middle of a paragraph invisible, nor
17033  make text in the middle of an invisible paragraph visible again.
17034  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17035 \begin_inset Foot
17036 status collapsed
17037
17038 \begin_layout Plain Layout
17039 The commands of interest are: 
17040 \end_layout
17041
17042 \begin_layout Itemize
17043
17044 \family typewriter
17045 {
17046 \backslash
17047 invisible \SpecialChar \ldots{}
17048  }
17049 \end_layout
17050
17051 \begin_layout Itemize
17052
17053 \family typewriter
17054 {
17055 \backslash
17056 visible \SpecialChar \ldots{}
17057  }
17058 \end_layout
17059
17060 \begin_layout Plain Layout
17061 \SpecialChar \ldots{}
17062 and need to be marked as TeX.
17063  The text whose 
17064 \begin_inset Quotes eld
17065 \end_inset
17066
17067 visibility
17068 \begin_inset Quotes erd
17069 \end_inset
17070
17071  you wish to change goes in between the brackets [and after the 
17072 \family typewriter
17073
17074 \backslash
17075 invisible
17076 \family default
17077  or 
17078 \family typewriter
17079
17080 \backslash
17081 visible
17082 \family default
17083  command].
17084  If you don't know how to mark text as TeX, see the appropriate section
17085  of the 
17086 \emph on
17087 User's Guide
17088 \emph default
17089 .
17090 \end_layout
17091
17092 \end_inset
17093
17094
17095 \end_layout
17096
17097 \begin_layout Subsubsection
17098 Using 
17099 \family sans
17100 Note
17101 \family default
17102  with 
17103 \family sans
17104 Slide
17105 \family default
17106
17107 \begin_inset CommandInset label
17108 LatexCommand label
17109 name "sec:slideNote"
17110
17111 \end_inset
17112
17113
17114 \end_layout
17115
17116 \begin_layout Standard
17117 Like an 
17118 \family sans
17119 Overlay
17120 \family default
17121 , a 
17122 \family sans
17123 Note
17124 \family default
17125  is associated with a 
17126 \begin_inset Quotes eld
17127 \end_inset
17128
17129 parent
17130 \begin_inset Quotes erd
17131 \end_inset
17132
17133  
17134 \family sans
17135 Slide
17136 \family default
17137 .
17138  Here, too, the LyX 
17139 \family sans
17140 slides
17141 \family default
17142  class provides visual cues.
17143  The label for a 
17144 \family sans
17145 Note
17146 \family default
17147  is shorter than that of a 
17148 \family sans
17149 Slide
17150 \family default
17151  [yet longer than that of an 
17152 \family sans
17153 Overlay
17154 \family default
17155 ] and, like the label of an 
17156 \family sans
17157 Overlay
17158 \family default
17159  is shockingly magenta.
17160  Additionally, the printed 
17161 \family sans
17162 Note
17163 \family default
17164  has the page number of its 
17165 \begin_inset Quotes eld
17166 \end_inset
17167
17168 parent
17169 \begin_inset Quotes erd
17170 \end_inset
17171
17172  
17173 \family sans
17174 Slide
17175 \family default
17176 , appended by 
17177 \begin_inset Quotes eld
17178 \end_inset
17179
17180
17181 \family typewriter
17182 -
17183 \family default
17184 1
17185 \begin_inset Quotes erd
17186 \end_inset
17187
17188
17189 \begin_inset Quotes eld
17190 \end_inset
17191
17192
17193 \family typewriter
17194 -
17195 \family default
17196 2
17197 \begin_inset Quotes erd
17198 \end_inset
17199
17200
17201 \begin_inset Quotes eld
17202 \end_inset
17203
17204
17205 \family typewriter
17206 -
17207 \family default
17208 3
17209 \begin_inset Quotes erd
17210 \end_inset
17211
17212 , etc.
17213  You can have multiple 
17214 \family sans
17215 Note
17216 \family default
17217 s associated with a single 
17218 \family sans
17219 Slide
17220 \family default
17221 , and, as with 
17222 \family sans
17223 Slide
17224 \family default
17225  and 
17226 \family sans
17227 Overlay
17228 \family default
17229 , you'll probably want to break up long 
17230 \family sans
17231 Note
17232 \family default
17233 s so that they fit on a single sheet of paper.
17234 \end_layout
17235
17236 \begin_layout Standard
17237 The purpose of a 
17238 \family sans
17239 Note
17240 \family default
17241  is obvious: it contains anything additional you might want to say about
17242  a 
17243 \family sans
17244 Slide
17245 \family default
17246 .
17247  It could also be used as a sheet of reminders for a particular 
17248 \family sans
17249 Slide
17250 \family default
17251 .
17252  In the case of the latter, you might want to make use of time markers.
17253  Currently, the LyX 
17254 \family sans
17255 slides
17256 \family default
17257  class has no 
17258 \begin_inset Quotes eld
17259 \end_inset
17260
17261 native
17262 \begin_inset Quotes erd
17263 \end_inset
17264
17265  support for time markers, a 
17266 \noun on
17267 SliTeX
17268 \noun default
17269  feature.
17270  So, you'll have to resort to using the LaTeX codes.
17271 \end_layout
17272
17273 \begin_layout Standard
17274 To use time markers, you'll need to specify the extra class option 
17275 \begin_inset Quotes eld
17276 \end_inset
17277
17278
17279 \family typewriter
17280 clock
17281 \family default
17282
17283 \begin_inset Quotes erd
17284 \end_inset
17285
17286  [see section
17287 \begin_inset space ~
17288 \end_inset
17289
17290
17291 \begin_inset CommandInset ref
17292 LatexCommand ref
17293 reference "sec:slidesetup"
17294
17295 \end_inset
17296
17297 ].
17298  This option turns on timing marks, which will appear in the lower-left-hand
17299  corner of every 
17300 \family sans
17301 Note
17302 \family default
17303  you generate.
17304  To set what appears in the time marker, you use the LaTeX commands 
17305 \begin_inset Quotes eld
17306 \end_inset
17307
17308
17309 \family typewriter
17310
17311 \backslash
17312 settime{}
17313 \family default
17314
17315 \begin_inset Quotes erd
17316 \end_inset
17317
17318  and 
17319 \begin_inset Quotes eld
17320 \end_inset
17321
17322
17323 \family typewriter
17324
17325 \backslash
17326 addtime{}
17327 \family default
17328
17329 \begin_inset Quotes erd
17330 \end_inset
17331
17332 .
17333  The arguments of both commands are time measured in seconds.
17334  
17335 \begin_inset Quotes eld
17336 \end_inset
17337
17338
17339 \family typewriter
17340
17341 \backslash
17342 settime{}
17343 \family default
17344
17345 \begin_inset Quotes erd
17346 \end_inset
17347
17348  sets the time marker to a given time.
17349  
17350 \begin_inset Quotes eld
17351 \end_inset
17352
17353
17354 \family typewriter
17355
17356 \backslash
17357 addtime{}
17358 \family default
17359
17360 \begin_inset Quotes erd
17361 \end_inset
17362
17363  increments the time marker by the specified amount.
17364  Using time markers and 
17365 \family sans
17366 Note
17367 \family default
17368 s in this fashion, you can remind yourself how much time to spend on a particula
17369
17370 \family sans
17371 Slide
17372 \family default
17373 .
17374 \end_layout
17375
17376 \begin_layout Standard
17377 There's one last feature to describe.
17378  Clearly, you'd like to print out all of your 
17379 \family sans
17380 Slide
17381 \family default
17382 s and 
17383 \family sans
17384 Overlay
17385 \family default
17386 s on transparencies while printing all of your 
17387 \family sans
17388 Note
17389 \family default
17390 s on plain paper.
17391  However, a 
17392 \family sans
17393 Note
17394 \family default
17395  
17396 \emph on
17397 must
17398 \emph default
17399  follow the 
17400 \family sans
17401 Slide
17402 \family default
17403  with which it is associated.
17404  What's a person to do?
17405 \end_layout
17406
17407 \begin_layout Standard
17408 Luckily, there are two LaTeX commands that allow you to select what to print
17409  out.
17410  Both must be placed into the preamble of your document.
17411  The command 
17412 \begin_inset Quotes eld
17413 \end_inset
17414
17415
17416 \family typewriter
17417
17418 \backslash
17419 onlyslides{
17420 \backslash
17421 slides}
17422 \family default
17423
17424 \begin_inset Quotes erd
17425 \end_inset
17426
17427  will cause the output to contain only the 
17428 \family sans
17429 Slide
17430 \family default
17431 s and 
17432 \family sans
17433 Overlay
17434 \family default
17435 s.
17436  Correspondingly, the command 
17437 \begin_inset Quotes eld
17438 \end_inset
17439
17440
17441 \family typewriter
17442
17443 \backslash
17444 onlynotes{
17445 \backslash
17446 notes}
17447 \family default
17448
17449 \begin_inset Quotes erd
17450 \end_inset
17451
17452  prevents the output of anything but 
17453 \family sans
17454 Note
17455 \family default
17456 s.
17457  I'd advise placing both commands in the preamble and initially comment
17458  both out.
17459  You can then preview your entire presentation as you write.
17460  When you're done writing, you can then uncomment one of the two to select
17461  what you want to print.
17462  I like to uncomment 
17463 \begin_inset Quotes eld
17464 \end_inset
17465
17466
17467 \family typewriter
17468
17469 \backslash
17470 onlyslides{
17471 \backslash
17472 slides}
17473 \family default
17474
17475 \begin_inset Quotes erd
17476 \end_inset
17477
17478  , print to a file with 
17479 \begin_inset Quotes eld
17480 \end_inset
17481
17482
17483 \family typewriter
17484 -slides
17485 \family default
17486
17487 \begin_inset Quotes erd
17488 \end_inset
17489
17490  in its name, comment it back out, then uncomment 
17491 \begin_inset Quotes eld
17492 \end_inset
17493
17494
17495 \family typewriter
17496
17497 \backslash
17498 onlynotes{
17499 \backslash
17500 notes}
17501 \family default
17502
17503 \begin_inset Quotes erd
17504 \end_inset
17505
17506  and print to a 
17507 \begin_inset Quotes eld
17508 \end_inset
17509
17510
17511 \family typewriter
17512 *-notes.ps
17513 \family default
17514
17515 \begin_inset Quotes erd
17516 \end_inset
17517
17518  file.
17519  I can then send either file to a printer, loading transparencies or plain
17520  paper as appropriate.
17521 \end_layout
17522
17523 \begin_layout Standard
17524 You can also provide other arguments to the 
17525 \begin_inset Quotes eld
17526 \end_inset
17527
17528
17529 \family typewriter
17530
17531 \backslash
17532 onlyslides{}
17533 \family default
17534
17535 \begin_inset Quotes erd
17536 \end_inset
17537
17538  and 
17539 \begin_inset Quotes eld
17540 \end_inset
17541
17542
17543 \family typewriter
17544
17545 \backslash
17546 onlynotes{}
17547 \family default
17548
17549 \begin_inset Quotes erd
17550 \end_inset
17551
17552  commands.
17553  See a good LaTeX book for details.
17554 \end_layout
17555
17556 \begin_layout Subsection
17557 The 
17558 \family sans
17559 slides
17560 \family default
17561  Class Template File
17562 \end_layout
17563
17564 \begin_layout Standard
17565 I have also provided a template file, 
17566 \begin_inset Quotes eld
17567 \end_inset
17568
17569
17570 \family typewriter
17571 slides.lyx
17572 \family default
17573
17574 \begin_inset Quotes erd
17575 \end_inset
17576
17577 , with the 
17578 \family sans
17579 slides
17580 \family default
17581  class.
17582  To use it, begin your new presentation with 
17583 \family sans
17584 \bar under
17585 F
17586 \bar default
17587 ile\SpecialChar \menuseparator
17588 New
17589 \begin_inset space ~
17590 \end_inset
17591
17592 from
17593 \begin_inset space ~
17594 \end_inset
17595
17596
17597 \bar under
17598 T
17599 \bar default
17600 emplate
17601 \family default
17602 .
17603  Your new LyX presentation file will contain an example 
17604 \family sans
17605 Slide
17606 \family default
17607  – 
17608 \family sans
17609 Overlay
17610 \family default
17611  – 
17612 \family sans
17613 Note
17614 \family default
17615  triplet.
17616  The 
17617 \family sans
17618 Slide
17619 \family default
17620  and 
17621 \family sans
17622 Overlay
17623 \family default
17624  additionally contain an example of the use of 
17625 \family sans
17626 InvisibleText
17627 \family default
17628  and 
17629 \family sans
17630 VisibleText
17631 \family default
17632 .
17633  Lastly, the preamble will contain:
17634 \end_layout
17635
17636 \begin_layout LyX-Code
17637 % Uncomment to print out only slides and overlays
17638 \end_layout
17639
17640 \begin_layout LyX-Code
17641 %
17642 \end_layout
17643
17644 \begin_layout LyX-Code
17645 %
17646 \backslash
17647 onlyslides{
17648 \backslash
17649 slides}
17650 \begin_inset Newline newline
17651 \end_inset
17652
17653  
17654 \end_layout
17655
17656 \begin_layout LyX-Code
17657 % Uncomment to print out only notes
17658 \end_layout
17659
17660 \begin_layout LyX-Code
17661 %
17662 \end_layout
17663
17664 \begin_layout LyX-Code
17665 %
17666 \backslash
17667 onlynotes{
17668 \backslash
17669 notes}
17670 \end_layout
17671
17672 \begin_layout Standard
17673 One final thing: I created this class to support the LaTeX2e 
17674 \begin_inset Quotes eld
17675 \end_inset
17676
17677
17678 \noun on
17679 SliTeX
17680 \noun default
17681  emulation
17682 \begin_inset Quotes erd
17683 \end_inset
17684
17685  class, one of the built-in LaTeX2e classes.
17686  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17687  built-in slide class.
17688  It's here if you want it or need it.
17689  There exist other LaTeX2e classes for creating presentations, such as the
17690  
17691 \family sans
17692 Foils
17693 \family default
17694  class [see section
17695 \begin_inset space ~
17696 \end_inset
17697
17698
17699 \begin_inset CommandInset ref
17700 LatexCommand ref
17701 reference "sec:foiltex"
17702
17703 \end_inset
17704
17705 ] or the 
17706 \begin_inset Quotes eld
17707 \end_inset
17708
17709
17710 \family typewriter
17711 seminar
17712 \family default
17713
17714 \begin_inset Quotes erd
17715 \end_inset
17716
17717  package [present on some TeX distributions].
17718  The latter is not yet supported under LyX.
17719 \begin_inset Foot
17720 status collapsed
17721
17722 \begin_layout Plain Layout
17723 Perhaps you can take on the task\SpecialChar \ldots{}
17724
17725 \end_layout
17726
17727 \end_inset
17728
17729  I know nothing about these other classes.
17730  Try them out to see what sort of alternative they provide.
17731 \end_layout
17732
17733 \begin_layout Chapter
17734 LyX Features needing Extra Software
17735 \end_layout
17736
17737 \begin_layout Section
17738 Checking TeX
17739 \end_layout
17740
17741 \begin_layout Standard
17742 by 
17743 \noun on
17744 Asger Alstrup
17745 \end_layout
17746
17747 \begin_layout Subsection
17748 Introduction
17749 \end_layout
17750
17751 \begin_layout Standard
17752 If you have the 
17753 \family typewriter
17754 chktex
17755 \family default
17756  program installed
17757 \begin_inset Foot
17758 status collapsed
17759
17760 \begin_layout Plain Layout
17761
17762 \family typewriter
17763 chktex
17764 \family default
17765  is not yet available when you are using the LaTeX distribution MiKTeX.
17766 \end_layout
17767
17768 \end_inset
17769
17770 , you'll find in the 
17771 \family sans
17772 Tools
17773 \family default
17774  menu the entry: 
17775 \family sans
17776 Check
17777 \begin_inset space ~
17778 \end_inset
17779
17780 TeX
17781 \family default
17782 .
17783  You can get 
17784 \family typewriter
17785 chktex
17786 \family default
17787  it from CTAN, 
17788 \begin_inset CommandInset href
17789 LatexCommand href
17790 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17791
17792 \end_inset
17793
17794 .
17795 \end_layout
17796
17797 \begin_layout Standard
17798 The 
17799 \family sans
17800 ChkTeX
17801 \family default
17802  package is a program that was written by 
17803 \begin_inset Flex Noun
17804 status collapsed
17805
17806 \begin_layout Plain Layout
17807 Jens T.
17808 \begin_inset space ~
17809 \end_inset
17810
17811 Berger Thielemann
17812 \end_layout
17813
17814 \end_inset
17815
17816  in frustration because some constructs in LaTeX are sometimes non-intuitive,
17817  and easy to forget.
17818  The program runs over your LaTeX file, checks the integrity of the file,
17819  and flags some common errors.
17820  In other technical words, it is 
17821 \family typewriter
17822 lint
17823 \family default
17824  for LaTeX.
17825 \end_layout
17826
17827 \begin_layout Standard
17828 Well, what is a syntax checker doing in LyX which is supposed to produce
17829  correct LaTeX anyways? The answer is simple: Just as 
17830 \family typewriter
17831 Lint
17832 \family default
17833  not only checks the 
17834 \emph on
17835 syntax
17836 \emph default
17837  of C programs, but also does 
17838 \emph on
17839 semantic
17840 \emph default
17841  checks for type-errors, 
17842 \family sans
17843 ChkTeX
17844 \family default
17845  catches some common 
17846 \emph on
17847 typographic
17848 \emph default
17849  errors, in addition to the syntactical ones.
17850  Specifically, 
17851 \family sans
17852 ChkTeX
17853 \family default
17854  is capable of detecting several common errors, such as
17855 \end_layout
17856
17857 \begin_layout Itemize
17858 Ellipsis detection:
17859 \begin_inset Newline newline
17860 \end_inset
17861
17862 Use \SpecialChar \ldots{}
17863  instead of ...
17864 \end_layout
17865
17866 \begin_layout Itemize
17867 No space in front of/after parenthesis:
17868 \begin_inset Newline newline
17869 \end_inset
17870
17871 ( wrong spacing )
17872 \end_layout
17873
17874 \begin_layout Itemize
17875 Enforcement of normal space after common abbreviations:
17876 \begin_inset Newline newline
17877 \end_inset
17878
17879 e.
17880 \begin_inset space \thinspace{}
17881 \end_inset
17882
17883 g.
17884 \begin_inset space \space{}
17885 \end_inset
17886
17887 is too wide spacing.
17888 \end_layout
17889
17890 \begin_layout Itemize
17891 Enforcement of end-of-sentence space when the last sentence ends with a
17892  capital letter:
17893 \begin_inset Newline newline
17894 \end_inset
17895
17896 This is a TEST.
17897  And this is wrong spacing.
17898 \end_layout
17899
17900 \begin_layout Itemize
17901 Space in front of labels and similar commands:
17902 \begin_inset Newline newline
17903 \end_inset
17904
17905 The label should stick right up to the text to avoid falling to a wrong
17906  page.
17907  
17908 \begin_inset CommandInset label
17909 LatexCommand label
17910 name "sec:chktex"
17911
17912 \end_inset
17913
17914  
17915 \begin_inset Foot
17916 status collapsed
17917
17918 \begin_layout Plain Layout
17919 This footnote is in danger of falling off to a wrong page
17920 \end_layout
17921
17922 \end_inset
17923
17924  The label is separated too much.
17925 \end_layout
17926
17927 \begin_layout Itemize
17928 Space in front of references, instead of hard spaces:
17929 \begin_inset Newline newline
17930 \end_inset
17931
17932 In you are in bad luck, the text will break right between the referenced
17933  text and reference number, and that's a pity.
17934  See section 
17935 \begin_inset CommandInset ref
17936 LatexCommand ref
17937 reference "sec:chktex"
17938
17939 \end_inset
17940
17941 .
17942 \end_layout
17943
17944 \begin_layout Itemize
17945 Use of 
17946 \begin_inset Quotes eld
17947 \end_inset
17948
17949 x
17950 \begin_inset Quotes erd
17951 \end_inset
17952
17953  instead of 
17954 \begin_inset Formula $\times$
17955 \end_inset
17956
17957  between numbers:
17958 \begin_inset Newline newline
17959 \end_inset
17960
17961 2x2 looks cheap compared to 
17962 \begin_inset Formula $2\times2$
17963 \end_inset
17964
17965 .
17966 \end_layout
17967
17968 \begin_layout Standard
17969 and more \SpecialChar \ldots{}
17970  It is an invaluable tool when you are 
17971 \begin_inset Quotes eld
17972 \end_inset
17973
17974 finishing up
17975 \begin_inset Quotes erd
17976 \end_inset
17977
17978  your document before printing, and you should run it right after the obligatory
17979  spelling check, and before you go fine tuning the typesetting.
17980 \end_layout
17981
17982 \begin_layout Subsection
17983 How to use it
17984 \end_layout
17985
17986 \begin_layout Standard
17987 If you have the program installed, usage is as simple as choosing 
17988 \family sans
17989 Tools\SpecialChar \menuseparator
17990 Check
17991 \begin_inset space ~
17992 \end_inset
17993
17994 TeX
17995 \family default
17996 .
17997  This will make LyX generate a LaTeX file of your document, start 
17998 \family sans
17999 ChkTeX
18000 \family default
18001  to check it, and then make LyX insert 
18002 \begin_inset Quotes eld
18003 \end_inset
18004
18005 error boxes
18006 \begin_inset Quotes erd
18007 \end_inset
18008
18009  with the warnings from 
18010 \family sans
18011 ChkTeX
18012 \family default
18013 , if there were any.
18014  The warnings will be placed close to the point of the mistake, and you
18015  can quickly find them by using the 
18016 \family sans
18017 Navigate\SpecialChar \menuseparator
18018 Error
18019 \family default
18020  menu item, or the shortcut key 
18021 \family sans
18022 C-g
18023 \family default
18024  from the default 
18025 \family typewriter
18026 cua
18027 \family default
18028  bind file.
18029  Open the error boxes by clicking on them with the mouse, or use the shortcut
18030  key 
18031 \family sans
18032 C-i
18033 \family default
18034  from 
18035 \family typewriter
18036 cua
18037 \family default
18038  bindings, or the corresponding 
18039 \family sans
18040 C-o
18041 \family default
18042  for the alternate 
18043 \family typewriter
18044 emacs
18045 \family default
18046  bind file.
18047  Read the warning and correct the mistake, if it is a mistake.
18048  If you have trouble understanding what the warning is about, you can safely
18049  ignore it.
18050  Remember that there is a hidden layer between the document on screen and
18051  the technical details in invoking 
18052 \family sans
18053 ChkTeX
18054 \family default
18055 , and this gap can make some warnings seem arcane or just right down plain
18056  silly.
18057 \end_layout
18058
18059 \begin_layout Standard
18060 This document is an excellent testing bed for the feature, and it should
18061  provide quite a few warnings for you to fiddle with.
18062  Since computers are only so smart, expect most of the warnings to be false
18063  alarms, though.
18064 \end_layout
18065
18066 \begin_layout Subsection
18067 How to fine tune it
18068 \end_layout
18069
18070 \begin_layout Standard
18071 Sometimes, you'll find that 
18072 \family sans
18073 ChkTeX
18074 \family default
18075  makes more noise than suits your mood.
18076  Then you can choose not to use it, wait until your mood changes, or try
18077  to customize 
18078 \family sans
18079 ChkTeX
18080 \family default
18081  to get better along with you.
18082  Another choice in the most desperate situations is to use 
18083 \family sans
18084 View\SpecialChar \menuseparator
18085 Remove
18086 \begin_inset space ~
18087 \end_inset
18088
18089 All
18090 \begin_inset space ~
18091 \end_inset
18092
18093 Error
18094 \begin_inset space ~
18095 \end_inset
18096
18097 Boxes
18098 \family default
18099 , which will get rid of all warnings instantly.
18100 \end_layout
18101
18102 \begin_layout Standard
18103 Although 
18104 \family sans
18105 ChkTeX
18106 \family default
18107  
18108 \emph on
18109 is
18110 \emph default
18111  very configurable and extensible, you shouldn't expect to solve all problems
18112  with 
18113 \family sans
18114 ChkTeX
18115 \family default
18116  in LyX this way.
18117  Since LyX has to generate a somewhat special LaTeX file to be able to match
18118  the line numbers from the 
18119 \family sans
18120 ChkTeX
18121 \family default
18122  output
18123 \begin_inset Foot
18124 status collapsed
18125
18126 \begin_layout Plain Layout
18127 You can inspect the specific output from 
18128 \family sans
18129 chktex
18130 \family default
18131  by using 
18132 \family sans
18133 Edit\SpecialChar \menuseparator
18134 View
18135 \begin_inset space ~
18136 \end_inset
18137
18138 LaTeX
18139 \begin_inset space ~
18140 \end_inset
18141
18142 Log
18143 \family default
18144  right after a 
18145 \family sans
18146 chktex
18147 \family default
18148  run.
18149 \end_layout
18150
18151 \end_inset
18152
18153  to the internal document structure, some of the warnings will not seen
18154  to appear correctly.
18155  There are two things you can do about this:
18156 \end_layout
18157
18158 \begin_layout Itemize
18159 Fine tune the 
18160 \family sans
18161 ChkTeX
18162 \family default
18163  invocation command line in 
18164 \family sans
18165 Preferences
18166 \family default
18167  (tabs 
18168 \family sans
18169 Outputs
18170 \family default
18171
18172 \family sans
18173 Misc
18174 \family default
18175 ), or the global 
18176 \family sans
18177 ChkTeX
18178 \family default
18179  installation configuration file (usually with the file 
18180 \family typewriter
18181 chktexrc
18182 \family default
18183 ).
18184  See below to learn what warnings can be enabled and disabled on the command
18185  line.
18186  
18187 \end_layout
18188
18189 \begin_layout Itemize
18190 Export your document as a raw LaTeX file using 
18191 \family sans
18192 File\SpecialChar \menuseparator
18193 Export\SpecialChar \menuseparator
18194 LaTeX
18195 \family default
18196  and run 
18197 \family typewriter
18198 chktex
18199 \family default
18200  manually on that.
18201  Invoked in this way, it can be a hassle to find the corresponding place
18202  in the document inside LyX, but with a little patience, you should be able
18203  to do it.
18204 \end_layout
18205
18206 \begin_layout Standard
18207 Here follows the warning messages that can be enabled and disabled in 
18208 \family sans
18209 Preferences
18210 \family default
18211 .
18212  Use 
18213 \family typewriter
18214 -n#
18215 \family default
18216  to disable a warning, and 
18217 \family typewriter
18218 -w#
18219 \family default
18220  to enable a warning.
18221  The emphasized entries are disabled by default, because the default is
18222  "
18223 \family typewriter
18224 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18225 \family default
18226 ".
18227 \end_layout
18228
18229 \begin_layout Standard
18230 Notice that you should only use the options that enable and disable warnings,
18231  because LyX relies on some of the other command line parameters to be set
18232  in a specific way to have a chance to communicate with 
18233 \family typewriter
18234 chktex
18235 \family default
18236 .
18237 \end_layout
18238
18239 \begin_layout Enumerate
18240
18241 \size small
18242 \emph on
18243 Command terminated with space.
18244 \end_layout
18245
18246 \begin_layout Enumerate
18247
18248 \size small
18249 Non-breaking space (
18250 \begin_inset Quotes eld
18251 \end_inset
18252
18253
18254 \family typewriter
18255 ~
18256 \family default
18257
18258 \begin_inset Quotes erd
18259 \end_inset
18260
18261 ) should have been used.
18262 \end_layout
18263
18264 \begin_layout Enumerate
18265
18266 \size small
18267 \emph on
18268 You should enclose the previous parenthesis with 
18269 \begin_inset Quotes eld
18270 \end_inset
18271
18272
18273 \family typewriter
18274 {}
18275 \family default
18276
18277 \begin_inset Quotes erd
18278 \end_inset
18279
18280 .
18281 \end_layout
18282
18283 \begin_layout Enumerate
18284
18285 \size small
18286 Italic correction (
18287 \begin_inset Quotes eld
18288 \end_inset
18289
18290
18291 \family typewriter
18292
18293 \backslash
18294 /
18295 \family default
18296
18297 \begin_inset Quotes erd
18298 \end_inset
18299
18300 ) found in non-italic buffer.
18301 \end_layout
18302
18303 \begin_layout Enumerate
18304
18305 \size small
18306 Italic correction (
18307 \begin_inset Quotes eld
18308 \end_inset
18309
18310
18311 \family typewriter
18312
18313 \backslash
18314 /
18315 \family default
18316
18317 \begin_inset Quotes erd
18318 \end_inset
18319
18320 ) found more than once.
18321 \end_layout
18322
18323 \begin_layout Enumerate
18324
18325 \size small
18326 \emph on
18327 No italic correction (
18328 \begin_inset Quotes eld
18329 \end_inset
18330
18331
18332 \family typewriter
18333
18334 \backslash
18335 /
18336 \family default
18337
18338 \begin_inset Quotes erd
18339 \end_inset
18340
18341 ) found.
18342 \end_layout
18343
18344 \begin_layout Enumerate
18345
18346 \size small
18347 Accent command 
18348 \begin_inset Quotes eld
18349 \end_inset
18350
18351
18352 \family typewriter
18353 cmd
18354 \family default
18355
18356 \begin_inset Quotes erd
18357 \end_inset
18358
18359  needs use of 
18360 \begin_inset Quotes eld
18361 \end_inset
18362
18363
18364 \family typewriter
18365 cmd
18366 \family default
18367
18368 \begin_inset Quotes erd
18369 \end_inset
18370
18371 .
18372 \end_layout
18373
18374 \begin_layout Enumerate
18375
18376 \size small
18377 Wrong length of dash may have been used.
18378 \end_layout
18379
18380 \begin_layout Enumerate
18381
18382 \size small
18383 \emph on
18384 \begin_inset Quotes eld
18385 \end_inset
18386
18387
18388 \family typewriter
18389 %s
18390 \family default
18391
18392 \begin_inset Quotes erd
18393 \end_inset
18394
18395  expected, found 
18396 \begin_inset Quotes eld
18397 \end_inset
18398
18399
18400 \family typewriter
18401 %s
18402 \family default
18403
18404 \begin_inset Quotes erd
18405 \end_inset
18406
18407 .
18408 \end_layout
18409
18410 \begin_layout Enumerate
18411
18412 \size small
18413 Solo 
18414 \begin_inset Quotes eld
18415 \end_inset
18416
18417
18418 \family typewriter
18419 %s
18420 \family default
18421
18422 \begin_inset Quotes erd
18423 \end_inset
18424
18425  found.
18426 \end_layout
18427
18428 \begin_layout Enumerate
18429
18430 \size small
18431 You should use 
18432 \begin_inset Quotes eld
18433 \end_inset
18434
18435
18436 \family typewriter
18437 %s
18438 \family default
18439
18440 \begin_inset Quotes erd
18441 \end_inset
18442
18443  to achieve an ellipsis.
18444 \end_layout
18445
18446 \begin_layout Enumerate
18447
18448 \size small
18449 Inter-word spacing (
18450 \begin_inset Quotes eld
18451 \end_inset
18452
18453
18454 \family typewriter
18455
18456 \backslash
18457
18458 \family default
18459  
18460 \begin_inset Quotes eld
18461 \end_inset
18462
18463 ) should perhaps be used.
18464 \end_layout
18465
18466 \begin_layout Enumerate
18467
18468 \size small
18469 Inter-sentence spacing (
18470 \begin_inset Quotes eld
18471 \end_inset
18472
18473
18474 \family typewriter
18475
18476 \backslash
18477 @
18478 \family default
18479
18480 \begin_inset Quotes erd
18481 \end_inset
18482
18483 ) should perhaps be used.
18484 \end_layout
18485
18486 \begin_layout Enumerate
18487
18488 \size small
18489 Could not find argument for command.
18490 \end_layout
18491
18492 \begin_layout Enumerate
18493
18494 \size small
18495 No match found for 
18496 \begin_inset Quotes eld
18497 \end_inset
18498
18499
18500 \family typewriter
18501 %s
18502 \family default
18503
18504 \begin_inset Quotes erd
18505 \end_inset
18506
18507 .
18508 \end_layout
18509
18510 \begin_layout Enumerate
18511
18512 \size small
18513 Math mode still on at end of LaTeX file.
18514 \end_layout
18515
18516 \begin_layout Enumerate
18517
18518 \size small
18519 Number of 
18520 \begin_inset Quotes eld
18521 \end_inset
18522
18523
18524 \family typewriter
18525 char
18526 \family default
18527
18528 \begin_inset Quotes erd
18529 \end_inset
18530
18531  doesn't match the number of 
18532 \begin_inset Quotes eld
18533 \end_inset
18534
18535
18536 \family typewriter
18537 char
18538 \family default
18539
18540 \begin_inset Quotes erd
18541 \end_inset
18542
18543 .
18544 \end_layout
18545
18546 \begin_layout Enumerate
18547
18548 \size small
18549 You should use either 
18550 \family typewriter
18551
18552 \begin_inset Quotes eld
18553 \end_inset
18554
18555
18556 \family default
18557  or 
18558 \family typewriter
18559
18560 \begin_inset Quotes erd
18561 \end_inset
18562
18563
18564 \family default
18565  as an alternative to 
18566 \begin_inset Quotes eld
18567 \end_inset
18568
18569
18570 \family typewriter
18571 "
18572 \family default
18573
18574 \begin_inset Quotes erd
18575 \end_inset
18576
18577 .
18578 \end_layout
18579
18580 \begin_layout Enumerate
18581
18582 \size small
18583 You should use "
18584 \family typewriter
18585 '
18586 \family default
18587 " (ASCII 39) instead of "
18588 \family typewriter
18589 ´
18590 \family default
18591 " (ASCII 180).
18592 \end_layout
18593
18594 \begin_layout Enumerate
18595
18596 \size small
18597 User-specified pattern found.
18598 \end_layout
18599
18600 \begin_layout Enumerate
18601
18602 \size small
18603 This command might not be intended.
18604 \end_layout
18605
18606 \begin_layout Enumerate
18607
18608 \size small
18609 \emph on
18610 Comment displayed.
18611 \end_layout
18612
18613 \begin_layout Enumerate
18614
18615 \size small
18616 Either 
18617 \family typewriter
18618 ''
18619 \backslash
18620 ,'
18621 \family default
18622  or 
18623 \family typewriter
18624 '
18625 \backslash
18626 ,''
18627 \family default
18628  will look better.
18629 \end_layout
18630
18631 \begin_layout Enumerate
18632
18633 \size small
18634 Delete this space to maintain correct page references.
18635 \end_layout
18636
18637 \begin_layout Enumerate
18638
18639 \size small
18640 \emph on
18641 You might wish to put this between a pair of 
18642 \begin_inset Quotes eld
18643 \end_inset
18644
18645
18646 \family typewriter
18647 {}
18648 \family default
18649
18650 \begin_inset Quotes erd
18651 \end_inset
18652
18653 .
18654 \end_layout
18655
18656 \begin_layout Enumerate
18657
18658 \size small
18659 You ought to remove spaces in front of punctuation.
18660 \end_layout
18661
18662 \begin_layout Enumerate
18663
18664 \size small
18665 Could not execute LaTeX command.
18666 \end_layout
18667
18668 \begin_layout Enumerate
18669
18670 \size small
18671 Don't use 
18672 \family typewriter
18673
18674 \backslash
18675 /
18676 \family default
18677  in front of small punctuation.
18678 \end_layout
18679
18680 \begin_layout Enumerate
18681
18682 \family typewriter
18683 \size small
18684 $
18685 \backslash
18686 times$
18687 \family default
18688  may look prettier here.
18689 \end_layout
18690
18691 \begin_layout Enumerate
18692
18693 \size small
18694 \emph on
18695 Multiple spaces detected in output.
18696 \end_layout
18697
18698 \begin_layout Enumerate
18699
18700 \size small
18701 This text may be ignored.
18702 \end_layout
18703
18704 \begin_layout Enumerate
18705
18706 \size small
18707 Use 
18708 \family typewriter
18709
18710 \begin_inset Quotes eld
18711 \end_inset
18712
18713
18714 \family default
18715  to begin quotation, not 
18716 \family typewriter
18717 '
18718 \family default
18719 .
18720 \end_layout
18721
18722 \begin_layout Enumerate
18723
18724 \size small
18725 Use 
18726 \family typewriter
18727 '
18728 \family default
18729  to end quotation, not 
18730 \family typewriter
18731
18732 \begin_inset Quotes eld
18733 \end_inset
18734
18735
18736 \family default
18737 .
18738 \end_layout
18739
18740 \begin_layout Enumerate
18741
18742 \size small
18743 Don't mix quotes.
18744 \end_layout
18745
18746 \begin_layout Enumerate
18747
18748 \size small
18749 You should perhaps use 
18750 \begin_inset Quotes eld
18751 \end_inset
18752
18753
18754 \family typewriter
18755 cmd
18756 \family default
18757
18758 \begin_inset Quotes erd
18759 \end_inset
18760
18761  instead.
18762 \end_layout
18763
18764 \begin_layout Enumerate
18765
18766 \size small
18767 You should put a space in front of/after parenthesis.
18768 \end_layout
18769
18770 \begin_layout Enumerate
18771
18772 \size small
18773 You should avoid spaces in front of/after parenthesis.
18774 \end_layout
18775
18776 \begin_layout Enumerate
18777
18778 \size small
18779 \emph on
18780 You should not use punctuation in front of/after quotes.
18781 \end_layout
18782
18783 \begin_layout Enumerate
18784
18785 \size small
18786 Double space found.
18787 \end_layout
18788
18789 \begin_layout Enumerate
18790
18791 \size small
18792 You should put punctuation outside inner/inside display math mode.
18793 \end_layout
18794
18795 \begin_layout Enumerate
18796
18797 \size small
18798 You ought to not use primitive TeX in LaTeX code.
18799 \end_layout
18800
18801 \begin_layout Enumerate
18802
18803 \size small
18804 You should remove spaces in front of 
18805 \begin_inset Quotes eld
18806 \end_inset
18807
18808
18809 \family typewriter
18810 %s
18811 \family default
18812
18813 \begin_inset Quotes erd
18814 \end_inset
18815
18816
18817 \end_layout
18818
18819 \begin_layout Enumerate
18820
18821 \size small
18822 \begin_inset Quotes eld
18823 \end_inset
18824
18825
18826 \family typewriter
18827 %s
18828 \family default
18829
18830 \begin_inset Quotes erd
18831 \end_inset
18832
18833  is normally not followed by 
18834 \begin_inset Quotes eld
18835 \end_inset
18836
18837
18838 \family typewriter
18839 %c
18840 \family default
18841
18842 \begin_inset Quotes erd
18843 \end_inset
18844
18845 .
18846 \end_layout
18847
18848 \begin_layout Standard
18849 In later versions of LyX, we hope to provide a more complete interface to
18850  this tool (and it's smaller cousin 
18851 \family typewriter
18852 lacheck
18853 \family default
18854 ) to exploit the full power of it.
18855  But it's not exactly useless as it is now: go try it on one of your existing
18856  documents of a certain length and be surprised.
18857 \end_layout
18858
18859 \begin_layout Section
18860 Version Control in LyX
18861 \end_layout
18862
18863 \begin_layout Standard
18864 by
18865 \noun on
18866  Lars Gullik Bjønnes 
18867 \noun default
18868 and 
18869 \noun on
18870 Pavel Sanda
18871 \end_layout
18872
18873 \begin_layout Subsection
18874 Introduction
18875 \end_layout
18876
18877 \begin_layout Standard
18878 A friend of mine wanted to try LyX for a group project.
18879  When he didn't find support for version control or file locking, he dropped
18880  it.
18881  This angered me a bit, so I thought that I should at least make support
18882  for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18883  This has been done.
18884  LyX now supports some of the most basic RCS/CVS/SVN commands.
18885  If you need something a bit more sophisticated you will have to do that
18886  manually in a terminal.
18887 \end_layout
18888
18889 \begin_layout Standard
18890 Before you begin to use the version control features in LyX, you should
18891  be familiar with RCS/CVS/SVN usage before start using it under LyX.
18892  Also note that CVS support 
18893 \change_deleted 3 1288125350
18894 was
18895 \change_inserted 3 1288125359
18896 is not as good as
18897 \change_deleted 3 1288125367
18898  obsoloted by introducing
18899 \change_unchanged
18900  subversion support so we advice using SVN instead.
18901  Good place to start with Subversion is SVN Book
18902 \begin_inset Foot
18903 status open
18904
18905 \begin_layout Plain Layout
18906 \begin_inset CommandInset href
18907 LatexCommand href
18908 target "http://svnbook.red-bean.com/"
18909
18910 \end_inset
18911
18912
18913 \end_layout
18914
18915 \end_inset
18916
18917 .
18918  In case of RCS you should read 
18919 \begin_inset Quotes eld
18920 \end_inset
18921
18922 rcsintro
18923 \begin_inset Quotes erd
18924 \end_inset
18925
18926  (a man file, read it with 
18927 \family typewriter
18928 man rcsintro
18929 \family default
18930 ).
18931  This file describes all the basic features of RCS.
18932  You should especially notice the comment about a RCS directory, and the
18933  notion of a master RCS file (the file ending in 
18934 \family typewriter
18935 ,v
18936 \family default
18937 ).
18938 \end_layout
18939
18940 \begin_layout Standard
18941 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18942  package—no guarantees are made for older versions.
18943  Most of the log messages are not currently displayed after operations 
18944 \change_deleted 3 1288125419
18945 -
18946 \change_inserted 3 1288125419
18947
18948 \change_unchanged
18949  you can check them in Messages pane if unsure.
18950 \end_layout
18951
18952 \begin_layout Standard
18953 For introducing your own external commands consult vc-command in the manual
18954  of LyX functions.
18955 \end_layout
18956
18957 \begin_layout Subsection
18958 RCS commands in LyX
18959 \end_layout
18960
18961 \begin_layout Standard
18962 The following sections describe the RCS commands supported by LyX.
18963  You can find them in the 
18964 \family sans
18965 File\SpecialChar \menuseparator
18966 Version
18967 \begin_inset space ~
18968 \end_inset
18969
18970 Control
18971 \family default
18972  submenu.
18973  LyX was tested against RCS 5.7.
18974 \end_layout
18975
18976 \begin_layout Subsubsection
18977
18978 \family sans
18979 Register
18980 \end_layout
18981
18982 \begin_layout Standard
18983 If your document is not under revision control, this is the only item shown
18984  in the menu.
18985  And if it is under revision control, the 
18986 \family sans
18987 Register
18988 \family default
18989  item is not visible.
18990  
18991 \end_layout
18992
18993 \begin_layout Standard
18994 This command registers your document with RCS (unless you are under the
18995  directory managed by CVS)\SpecialChar \@.
18996  You are asked interactively to supply an initial
18997  description of the document.
18998  The document is now set in Read-Only mode and you have to 
18999 \family sans
19000 Check
19001 \begin_inset space ~
19002 \end_inset
19003
19004 Out
19005 \begin_inset space ~
19006 \end_inset
19007
19008 For
19009 \begin_inset space ~
19010 \end_inset
19011
19012 Edit
19013 \family default
19014 , before making any changes to it.
19015  A document under revision control has a 
19016 \begin_inset Quotes eld
19017 \end_inset
19018
19019 [RCS:<version> <locker>]
19020 \begin_inset Quotes erd
19021 \end_inset
19022
19023  item tagged to the filename in the minibuffer.
19024 \end_layout
19025
19026 \begin_layout Standard
19027 RCS command that is run: 
19028 \family typewriter
19029 ci -q -u -i -t-"<initial description>" <file-name>
19030 \end_layout
19031
19032 \begin_layout Standard
19033 Read 
19034 \family typewriter
19035 man ci
19036 \family default
19037  to understand the switches.
19038  
19039 \end_layout
19040
19041 \begin_layout Subsubsection
19042
19043 \family sans
19044 Check In Changes
19045 \end_layout
19046
19047 \begin_layout Standard
19048 When you are finished editing a file, you check in your changes.
19049  When you do this, you are asked for a description of the changes.
19050  This is stored in the history log.
19051  The version number is bumped, your changes are applied to the master RCS
19052  file, the document is unlocked and set to Read-Only mode.
19053  
19054 \end_layout
19055
19056 \begin_layout Standard
19057 RCS command: 
19058 \family typewriter
19059 ci -q -u -m"<description>" <file-name>
19060 \end_layout
19061
19062 \begin_layout Subsubsection
19063
19064 \family sans
19065 Check Out For Edit
19066 \end_layout
19067
19068 \begin_layout Standard
19069 By doing this you lock the document so that only you can edit it.
19070  This will also make the document Read-Write only for you.
19071  You will usually continue editing for a while and when you are finished
19072  you check in your changes.
19073  The status line is changed to reflect that you have locked the file.
19074  
19075 \end_layout
19076
19077 \begin_layout Standard
19078 RCS command: 
19079 \family typewriter
19080 co -q -l <file-name>
19081 \end_layout
19082
19083 \begin_layout Subsubsection
19084
19085 \family sans
19086 Revert To Repository Version
19087 \end_layout
19088
19089 \begin_layout Standard
19090 This will discard all changes made to the document since the last check
19091  in.
19092  You get a warning before changes are discarded.
19093 \end_layout
19094
19095 \begin_layout Standard
19096 RCS command: 
19097 \family typewriter
19098 co -f -u<version> <file-name>
19099 \end_layout
19100
19101 \begin_layout Subsubsection
19102
19103 \family sans
19104 Undo Last Checkin
19105 \end_layout
19106
19107 \begin_layout Standard
19108 This makes as if the last check in never happened.
19109  No changes are made to the document loaded into LyX, but the last version
19110  is removed from the master RCS file.
19111  
19112 \end_layout
19113
19114 \begin_layout Standard
19115 RCS command: 
19116 \family typewriter
19117 rcs -o<version> <file-name>
19118 \end_layout
19119
19120 \begin_layout Subsubsection
19121
19122 \family sans
19123 Show History
19124 \end_layout
19125
19126 \begin_layout Standard
19127 This shows the complete history of the RCS document.
19128  The output of 
19129 \family typewriter
19130 rlog <file-name>
19131 \family default
19132  is shown in a browser.
19133  See 
19134 \family typewriter
19135 man rlog
19136 \family default
19137  for more info.
19138 \end_layout
19139
19140 \begin_layout Subsubsection
19141 Revision info
19142 \end_layout
19143
19144 \begin_layout Standard
19145 LyX supports RCS version number information (only), see 
19146 \begin_inset CommandInset ref
19147 LatexCommand ref
19148 reference "sub:VCS-Revision-Information"
19149
19150 \end_inset
19151
19152  for details.
19153 \end_layout
19154
19155 \begin_layout Subsection
19156 CVS commands in LyX
19157 \end_layout
19158
19159 \begin_layout Standard
19160
19161 \change_inserted 3 1288247612
19162 A subset of 
19163 \change_unchanged
19164 CVS
19165 \change_inserted 3 1288247626
19166  operations
19167 \change_unchanged
19168  is 
19169 \change_deleted 3 1288243981
19170 now partially 
19171 \change_unchanged
19172 supported by LyX.
19173  You can find the commands in the 
19174 \family sans
19175 File\SpecialChar \menuseparator
19176 Version
19177 \begin_inset space ~
19178 \end_inset
19179
19180 Control
19181 \family default
19182  submenu.
19183  
19184 \change_inserted 3 1288244251
19185 The version control system SVN is more powerful
19186 \change_deleted 3 1288244024
19187 Focus of the development moved to SVN support
19188 \change_unchanged
19189 , so please use it instead of CVS if possible.
19190 \end_layout
19191
19192 \begin_layout Subsubsection
19193
19194 \change_inserted 3 1288247508
19195
19196 \family sans
19197 General CVS usage
19198 \end_layout
19199
19200 \begin_layout Standard
19201
19202 \change_inserted 3 1288250722
19203 If you start from scratch with CVS you have to create your repository and
19204  checkout the working copy with external tools.
19205  If you're using a client-server setup you may need to login before doing
19206  the first repository checkout.
19207 \end_layout
19208
19209 \begin_layout Standard
19210
19211 \change_inserted 3 1288334713
19212 If your documents are under revision control and others are using the same
19213  repository problems arise when different changes to the same document at
19214  the same location happen.
19215  Standard CVS repositories doesn't operate with a file locking mechanism.
19216  This may be surprising, but conflicts only occur if people disagree on
19217  the proper content of the same part of a document.
19218  So, if co-workers are used to communicate regularly, these conflicts occur
19219  rarely.
19220  If they don't communicate they have a fundamental problem anyway.
19221  Nevertheless some people like to work with so called 
19222 \begin_inset Quotes eld
19223 \end_inset
19224
19225 reserved checkouts
19226 \begin_inset Quotes erd
19227 \end_inset
19228
19229 .
19230  If they do so the working copy of all files is readonly when checked out
19231  first and the user starts editing after using a special command to make
19232  the working copy writable.
19233  When the changes are checked in the working copy returns to readonly state.
19234  With LyX one has to edit the 
19235 \begin_inset Flex Code
19236 status collapsed
19237
19238 \begin_layout Plain Layout
19239
19240 \change_inserted 3 1288249115
19241 .cvsrc
19242 \change_unchanged
19243
19244 \end_layout
19245
19246 \end_inset
19247
19248  file and add the line 
19249 \begin_inset Flex Code
19250 status collapsed
19251
19252 \begin_layout Plain Layout
19253
19254 \change_inserted 3 1288249133
19255 cvs -r
19256 \change_unchanged
19257
19258 \end_layout
19259
19260 \end_inset
19261
19262  to work with reserved checkouts.
19263  The benefit is the possibility to see who is using a writable copy of some
19264  document.
19265  It's not guaranteed only one user makes a copy writable.
19266 \end_layout
19267
19268 \begin_layout Standard
19269
19270 \change_inserted 3 1288335184
19271 LyX tries to guess if you're using reserved or non-reserved checkouts.
19272  If your working copy is readonly or it is writable and an additional copy
19273  of your document exists in the CVS/Base sub-directory a reserved otherwise
19274  a non-reserved checkout is assumed.
19275  When a reserved checkout is detected you have to use 
19276 \begin_inset Flex MenuItem
19277 status collapsed
19278
19279 \begin_layout Plain Layout
19280
19281 \change_inserted 3 1288250009
19282 Check Out
19283 \change_unchanged
19284
19285 \end_layout
19286
19287 \end_inset
19288
19289  to make your working copy writable if it's readonly.
19290  After doing so the 
19291 \begin_inset Flex MenuItem
19292 status collapsed
19293
19294 \begin_layout Plain Layout
19295
19296 \change_inserted 3 1288250087
19297 Check In
19298 \change_unchanged
19299
19300 \end_layout
19301
19302 \end_inset
19303
19304  operation is possible and that makes your working copy readonly again after
19305  transferring your changes to the repository.
19306 \change_unchanged
19307
19308 \end_layout
19309
19310 \begin_layout Standard
19311
19312 \change_inserted 3 1288334864
19313 More information about CVS can be found here 
19314 \begin_inset Flex URL
19315 status collapsed
19316
19317 \begin_layout Plain Layout
19318
19319 \change_inserted 3 1288247651
19320
19321 http://www.nongnu.org/cvs
19322 \end_layout
19323
19324 \end_inset
19325
19326  and here 
19327 \begin_inset Flex URL
19328 status collapsed
19329
19330 \begin_layout Plain Layout
19331
19332 \change_inserted 3 1288249216
19333
19334 http://ximbiot.com/cvs
19335 \change_unchanged
19336
19337 \end_layout
19338
19339 \end_inset
19340
19341 .
19342 \end_layout
19343
19344 \begin_layout Standard
19345
19346 \change_inserted 3 1288334912
19347 Read 
19348 \family typewriter
19349 man cvs
19350 \family default
19351  to understand the sub-commands and the switches mentioned below.
19352 \end_layout
19353
19354 \begin_layout Subsubsection
19355
19356 \family sans
19357 Register
19358 \end_layout
19359
19360 \begin_layout Standard
19361 If your document is not under revision control, this is the only item shown
19362  in the menu.
19363  And if it is under revision control, the 
19364 \family sans
19365 \bar under
19366 R
19367 \bar default
19368 egister
19369 \family default
19370  item is not visible.
19371  
19372 \end_layout
19373
19374 \begin_layout Standard
19375 This command registers in CVS your document 
19376 \change_deleted 3 1288340087
19377 ONLY
19378 \change_inserted 3 1288340119
19379
19380 \emph on
19381
19382 \begin_inset Flex Strong
19383 status collapsed
19384
19385 \begin_layout Plain Layout
19386
19387 \change_inserted 3 1288340119
19388
19389 \emph on
19390 only
19391 \change_unchanged
19392
19393 \end_layout
19394
19395 \end_inset
19396
19397
19398 \change_unchanged
19399
19400 \emph default
19401  in case you have already the documents directory under CVS control (in
19402  particular 
19403 \family typewriter
19404 CVS/Entries
19405 \family default
19406  file exists).
19407  This means you have to 
19408 \change_inserted 3 1288244315
19409 create or 
19410 \change_unchanged
19411 checkout the archive by yourself
19412 \change_inserted 3 1288250891
19413  using external tools
19414 \change_unchanged
19415 .
19416  
19417 \change_inserted 3 1288340303
19418 (In case you forget that step LyX registers the document with RCS.)
19419 \change_unchanged
19420
19421 \end_layout
19422
19423 \begin_layout Standard
19424 Then you are asked interactively to supply an initial description of the
19425  document.
19426  Don't forget that registered file is not yet 
19427 \change_deleted 3 1288335206
19428 commited
19429 \change_inserted 3 1288335207
19430 checked in
19431 \change_unchanged
19432 .
19433 \end_layout
19434
19435 \begin_layout Standard
19436 CVS command that is run: 
19437 \family typewriter
19438 cvs -q add -m
19439 \change_deleted 3 1288125821
19440
19441 \begin_inset Quotes erd
19442 \end_inset
19443
19444
19445 \change_inserted 3 1288125838
19446 "
19447 \change_unchanged
19448 <entered message>" 
19449 \change_deleted 3 1288125821
19450
19451 \begin_inset Quotes eld
19452 \end_inset
19453
19454
19455 \change_inserted 3 1288125844
19456 "
19457 \change_unchanged
19458 <file-name>
19459 \change_deleted 3 1288125847
19460
19461 \begin_inset Quotes erd
19462 \end_inset
19463
19464
19465 \change_inserted 3 1288125847
19466 "
19467 \change_unchanged
19468
19469 \end_layout
19470
19471 \begin_layout Standard
19472
19473 \change_deleted 3 1288334858
19474 Read 
19475 \family typewriter
19476 man svn
19477 \family default
19478  to understand the switches.
19479 \change_inserted 3 1288333847
19480
19481 \end_layout
19482
19483 \begin_layout Standard
19484
19485 \change_inserted 3 1288334097
19486 The term 
19487 \family typewriter
19488 "<file-name>"
19489 \family default
19490  above and for all other CVS commands is an abbreviation for 
19491 \begin_inset Quotes eld
19492 \end_inset
19493
19494 change the current working directory to file location and use the file name
19495  without path component as argument
19496 \begin_inset Quotes erd
19497 \end_inset
19498
19499 .
19500
19501 \change_deleted 3 1288333847
19502  
19503 \change_unchanged
19504
19505 \end_layout
19506
19507 \begin_layout Subsubsection
19508
19509 \family sans
19510 Check In Changes
19511 \end_layout
19512
19513 \begin_layout Standard
19514 When you are finished editing a file, you commit your changes.
19515  When you do this
19516 \change_inserted 3 1288250244
19517  and you had changed the document
19518 \change_unchanged
19519 , you are asked for a description of the changes.
19520  After that changes are 
19521 \change_deleted 3 1288335277
19522 commited
19523 \change_inserted 3 1288335294
19524 written to the repository
19525 \change_unchanged
19526 .
19527
19528 \change_inserted 3 1288339925
19529  In case you didn't change the document and a reserved checkout is detected
19530  the reservation made on 
19531 \begin_inset Flex MenuItem
19532 status collapsed
19533
19534 \begin_layout Plain Layout
19535
19536 \change_inserted 3 1288250359
19537 Check Out
19538 \change_unchanged
19539
19540 \end_layout
19541
19542 \end_inset
19543
19544  is undone.
19545 \change_unchanged
19546
19547 \end_layout
19548
19549 \begin_layout Labeling
19550 \labelwidthstring 00.00.0000
19551
19552 \change_inserted 3 1288250487
19553 CVS
19554 \begin_inset space ~
19555 \end_inset
19556
19557 command: 
19558 \begin_inset space ~
19559 \end_inset
19560
19561
19562 \begin_inset Newline newline
19563 \end_inset
19564
19565
19566 \begin_inset Flex Code
19567 status collapsed
19568
19569 \begin_layout Plain Layout
19570
19571 \change_inserted 3 1288250469
19572 cvs 
19573 \family typewriter
19574 -q commit -m"<description>" "<file-name>"
19575 \end_layout
19576
19577 \end_inset
19578
19579  or
19580 \begin_inset Newline newline
19581 \end_inset
19582
19583
19584 \begin_inset Flex Code
19585 status collapsed
19586
19587 \begin_layout Plain Layout
19588
19589 \change_inserted 3 1288250960
19590 cvs -q unedit 
19591 \family typewriter
19592 "<file-name>"
19593 \change_unchanged
19594
19595 \end_layout
19596
19597 \end_inset
19598
19599
19600 \change_deleted 3 1288250529
19601 CVS command: 
19602 \family typewriter
19603 cvs -q commit -m"<description>" "<file-name>"
19604 \change_unchanged
19605
19606 \end_layout
19607
19608 \begin_layout Subsubsection
19609
19610 \change_inserted 3 1288246619
19611
19612 \family sans
19613 Check Out Changes
19614 \end_layout
19615
19616 \begin_layout Standard
19617
19618 \change_inserted 3 1288249364
19619 When you are sharing a repository with others, you may have to incorporate
19620  their changes into your working copy.
19621 \end_layout
19622
19623 \begin_layout Standard
19624
19625 \change_inserted 3 1288250585
19626 CVS command: 
19627 \family typewriter
19628 cvs -q update "<file-name>"
19629 \end_layout
19630
19631 \begin_layout Standard
19632
19633 \change_inserted 3 1288334180
19634 If a readonly checkout is detected the working copy is made writable and
19635  reserved.
19636 \end_layout
19637
19638 \begin_layout Standard
19639
19640 \change_inserted 3 1288250685
19641 CVS command: 
19642 \family typewriter
19643 cvs -q edit "<file-name>"
19644 \end_layout
19645
19646 \begin_layout Subsubsection
19647
19648 \family sans
19649 Revert To Repository Version
19650 \end_layout
19651
19652 \begin_layout Standard
19653 This will discard all changes made to the document since the last check
19654  in.
19655  You get a warning before changes are discarded.
19656  Firstly the file is deleted, secondly CVS update command is run.
19657 \end_layout
19658
19659 \begin_layout Standard
19660 CVS command: 
19661 \family typewriter
19662 cvs 
19663 \change_inserted 3 1288246762
19664 -q 
19665 \change_unchanged
19666 update 
19667 \change_deleted 3 1288125856
19668
19669 \begin_inset Quotes eld
19670 \end_inset
19671
19672
19673 \change_inserted 3 1288125856
19674 "
19675 \change_unchanged
19676 <file-name>
19677 \change_deleted 3 1288125856
19678
19679 \begin_inset Quotes erd
19680 \end_inset
19681
19682
19683 \change_inserted 3 1288251381
19684 "
19685 \end_layout
19686
19687 \begin_layout Standard
19688
19689 \change_inserted 3 1288334211
19690 If a reserved checkout is detected and the working copy has no changes only
19691  the reservation is undone.
19692 \end_layout
19693
19694 \begin_layout Standard
19695
19696 \change_inserted 3 1288251440
19697 CVS command: 
19698 \family typewriter
19699 cvs -q unedit "<file-name>"
19700 \change_unchanged
19701
19702 \end_layout
19703
19704 \begin_layout Subsubsection
19705
19706 \change_inserted 3 1288126016
19707 Update of the local directory checkout from repository
19708 \end_layout
19709
19710 \begin_layout Standard
19711
19712 \change_inserted 3 1288339359
19713 Once your documents gets more complex, containing sub-documents and pictures,
19714  including external 
19715 \begin_inset Flex Code
19716 status collapsed
19717
19718 \begin_layout Plain Layout
19719
19720 \change_inserted 3 1288126016
19721 .tex
19722 \end_layout
19723
19724 \end_inset
19725
19726  files and so on using version control becomes more complicated.
19727  LyX supports updating the whole tree in which resides the document.
19728  This become especially useful once you cooperate with people which neither
19729  have detailed knowledge about CVS usage nor they have ambition to commit
19730  additional material to the repository.
19731  You have to organize the files structure so that all external files are
19732  in the same directory or subdirectories of the document.
19733  It's good practice anyway to store multipart documents in an extra directory.
19734 \change_unchanged
19735
19736 \end_layout
19737
19738 \begin_layout Standard
19739
19740 \change_inserted 3 1288341358
19741 The 
19742 \begin_inset Flex Code
19743 status collapsed
19744
19745 \begin_layout Plain Layout
19746
19747 \change_inserted 3 1288126016
19748 Update local directory from repository
19749 \end_layout
19750
19751 \end_inset
19752
19753  command updates the whole directory.
19754  If local changes are detected user is warned before update starts.
19755  In case of merge conflicts both versions of the conflicting document parts
19756  are placed in the final document.
19757  You have to review and correct the result of the merge.
19758  You'll find the conflicts enclosed in pairs of 
19759 \begin_inset Flex Code
19760 status collapsed
19761
19762 \begin_layout Plain Layout
19763
19764 \change_inserted 3 1288341002
19765 <<<<<<<
19766 \change_unchanged
19767
19768 \end_layout
19769
19770 \end_inset
19771
19772  and 
19773 \begin_inset Flex Code
19774 status collapsed
19775
19776 \begin_layout Plain Layout
19777
19778 \change_inserted 3 1288340987
19779 >>>>>>>
19780 \change_unchanged
19781
19782 \end_layout
19783
19784 \end_inset
19785
19786  separated by 
19787 \begin_inset Flex Code
19788 status collapsed
19789
19790 \begin_layout Plain Layout
19791
19792 \change_inserted 3 1288341043
19793 =======
19794 \change_unchanged
19795
19796 \end_layout
19797
19798 \end_inset
19799
19800 .
19801  The first part is your version as before the update operation with the
19802  document name prepended.
19803  The second one is the repository version with the version number after
19804  the sequence of 
19805 \begin_inset Flex Code
19806 status collapsed
19807
19808 \begin_layout Plain Layout
19809
19810 \change_inserted 3 1288341281
19811 >
19812 \change_unchanged
19813
19814 \end_layout
19815
19816 \end_inset
19817
19818  signs.
19819 \change_unchanged
19820
19821 \end_layout
19822
19823 \begin_layout Labeling
19824 \labelwidthstring 00.00.0000
19825
19826 \change_inserted 3 1288340598
19827 CVS
19828 \begin_inset space ~
19829 \end_inset
19830
19831 commands: 
19832 \begin_inset space ~
19833 \end_inset
19834
19835
19836 \begin_inset Newline newline
19837 \end_inset
19838
19839
19840 \begin_inset Flex Code
19841 status collapsed
19842
19843 \begin_layout Plain Layout
19844
19845 \change_inserted 3 1288334066
19846 cd $path; cvs diff 
19847 \family typewriter
19848 "."
19849 \change_unchanged
19850
19851 \end_layout
19852
19853 \end_inset
19854
19855  (Ask if changes are detected.)
19856 \begin_inset Newline newline
19857 \end_inset
19858
19859
19860 \begin_inset Flex Code
19861 status collapsed
19862
19863 \begin_layout Plain Layout
19864
19865 \change_inserted 3 1288334063
19866 cd $path; cvs -q update 
19867 \family typewriter
19868 "."
19869 \change_unchanged
19870
19871 \end_layout
19872
19873 \end_inset
19874
19875
19876 \end_layout
19877
19878 \begin_layout Standard
19879
19880 \change_inserted 3 1288126016
19881 where 
19882 \begin_inset Flex Code
19883 status collapsed
19884
19885 \begin_layout Plain Layout
19886
19887 \change_inserted 3 1288126016
19888 $path
19889 \end_layout
19890
19891 \end_inset
19892
19893  stands for the path to the document.
19894 \end_layout
19895
19896 \begin_layout Subsubsection
19897
19898 \family sans
19899 Show History
19900 \end_layout
19901
19902 \begin_layout Standard
19903 This shows the complete history of the CVS document.
19904  The output of 
19905 \family typewriter
19906 cvs log 
19907 \change_deleted 3 1288125861
19908
19909 \begin_inset Quotes eld
19910 \end_inset
19911
19912
19913 \change_inserted 3 1288125861
19914 "
19915 \change_unchanged
19916 <file-name>
19917 \change_deleted 3 1288125864
19918
19919 \begin_inset Quotes erd
19920 \end_inset
19921
19922
19923 \change_inserted 3 1288125864
19924 "
19925 \change_unchanged
19926
19927 \family default
19928  is shown in a browser.
19929 \end_layout
19930
19931 \begin_layout Subsection
19932 SVN commands in LyX
19933 \end_layout
19934
19935 \begin_layout Standard
19936 SVN is now partially supported by LyX.
19937  You can find the commands in the 
19938 \family sans
19939 File\SpecialChar \menuseparator
19940 Version
19941 \begin_inset space ~
19942 \end_inset
19943
19944 Control
19945 \family default
19946  submenu.
19947  Please note that if you use password protected access to repository via
19948  ssh, you will be asked in terminal window.
19949  LyX was tested against SVN 1.5 and 1.6
19950 \begin_inset Foot
19951 status open
19952
19953 \begin_layout Plain Layout
19954 Most of the commands will work with 1.4 too, see 
19955 \begin_inset CommandInset ref
19956 LatexCommand ref
19957 reference "sub:SVN-Repo-Update"
19958
19959 \end_inset
19960
19961 .
19962 \end_layout
19963
19964 \end_inset
19965
19966
19967 \end_layout
19968
19969 \begin_layout Subsubsection
19970
19971 \family sans
19972 Register
19973 \end_layout
19974
19975 \begin_layout Standard
19976 If your document is not under revision control, this is the only item shown
19977  in the menu.
19978  And if it is under revision control, the 
19979 \family sans
19980 \bar under
19981 R
19982 \bar default
19983 egister
19984 \family default
19985  item is not visible.
19986  
19987 \end_layout
19988
19989 \begin_layout Standard
19990 This command registers in SVN your document ONLY in case you have already
19991  the documents directory under SVN control (in particular 
19992 \family typewriter
19993 .svn/entries
19994 \family default
19995  file exists).
19996  This means you have to checkout the archive by yourself.
19997  
19998 \end_layout
19999
20000 \begin_layout Standard
20001 Then you are asked interactively to supply an initial description of the
20002  document.
20003  Don't forget that registered file is not yet commited.
20004 \end_layout
20005
20006 \begin_layout Standard
20007 SVN command that is run: 
20008 \family typewriter
20009 svn add -q 
20010 \begin_inset Quotes eld
20011 \end_inset
20012
20013 <file-name>
20014 \begin_inset Quotes erd
20015 \end_inset
20016
20017
20018 \end_layout
20019
20020 \begin_layout Standard
20021 Read 
20022 \family typewriter
20023 man svn
20024 \family default
20025  to understand the switches.
20026  
20027 \end_layout
20028
20029 \begin_layout Subsubsection
20030
20031 \family sans
20032 Check In Changes
20033 \end_layout
20034
20035 \begin_layout Standard
20036 When you are finished editing a file, you commit your changes.
20037  When you do this, you are asked for a description of the changes.
20038  After that changes are commited.
20039 \end_layout
20040
20041 \begin_layout Standard
20042 SVN command:
20043 \begin_inset Foot
20044 status collapsed
20045
20046 \begin_layout Plain Layout
20047 In case locking is not enabled.
20048  See Section 
20049 \begin_inset CommandInset ref
20050 LatexCommand ref
20051 reference "subsec:SVN-File-Locking"
20052
20053 \end_inset
20054
20055 .
20056 \end_layout
20057
20058 \end_inset
20059
20060  
20061 \family typewriter
20062 svn commit -q -m"<description>" <file-name>
20063 \end_layout
20064
20065 \begin_layout Subsubsection
20066
20067 \family sans
20068 Check Out For Edit
20069 \end_layout
20070
20071 \begin_layout Standard
20072 Updates the changes of this file from the repository.
20073  Be sure you understand SVN merging and conflicts resolving before using
20074  this function, because all conflicts has to be resolved manually by you!
20075 \end_layout
20076
20077 \begin_layout Standard
20078 SVN command:
20079 \begin_inset Foot
20080 status collapsed
20081
20082 \begin_layout Plain Layout
20083 Ditto.
20084 \end_layout
20085
20086 \end_inset
20087
20088  
20089 \family typewriter
20090 svn update --non-interactive 
20091 \begin_inset Quotes eld
20092 \end_inset
20093
20094 <file-name>
20095 \begin_inset Quotes erd
20096 \end_inset
20097
20098
20099 \end_layout
20100
20101 \begin_layout Subsubsection
20102
20103 \family sans
20104 Revert To Repository Version
20105 \end_layout
20106
20107 \begin_layout Standard
20108 This will discard all changes made to the document since the last check
20109  in.
20110  You get a warning before changes are discarded.
20111  
20112 \end_layout
20113
20114 \begin_layout Standard
20115 SVN command: 
20116 \family typewriter
20117 svn revert -q 
20118 \begin_inset Quotes eld
20119 \end_inset
20120
20121 <file-name>
20122 \begin_inset Quotes erd
20123 \end_inset
20124
20125
20126 \end_layout
20127
20128 \begin_layout Subsubsection
20129 \begin_inset CommandInset label
20130 LatexCommand label
20131 name "sub:SVN-Repo-Update"
20132
20133 \end_inset
20134
20135 Update of the local directory checkout from repository
20136 \begin_inset Foot
20137 status collapsed
20138
20139 \begin_layout Plain Layout
20140 Note that this command will work only with subversion 
20141 \begin_inset Formula $\geqq1.5$
20142 \end_inset
20143
20144
20145 \end_layout
20146
20147 \end_inset
20148
20149
20150 \end_layout
20151
20152 \begin_layout Standard
20153 All the commands above have one shortcomming - they deal with the current
20154  document only.
20155  Once your document contains pictures, includes external 
20156 \begin_inset Flex Code
20157 status collapsed
20158
20159 \begin_layout Plain Layout
20160 .tex
20161 \end_layout
20162
20163 \end_inset
20164
20165  files and so on administration becomes more complicated.
20166  LyX now supports updating the whole tree in which resides the document
20167 \begin_inset Foot
20168 status collapsed
20169
20170 \begin_layout Plain Layout
20171 One need to organize the files structure so that all external files are
20172  in the same directory or subdirectories of the document.
20173  
20174 \end_layout
20175
20176 \end_inset
20177
20178 .
20179  This become especially useful once you cooperate with people which neither
20180  know about subversion management nor they have ambition to commit additional
20181  material to the repository.
20182  
20183 \end_layout
20184
20185 \begin_layout Standard
20186 \begin_inset Flex Code
20187 status collapsed
20188
20189 \begin_layout Plain Layout
20190 Update local directory from repository
20191 \end_layout
20192
20193 \end_inset
20194
20195  command updates the whole directory and in case of merge conflicts local
20196  version of the files are left, so no unintended data loss occurs.
20197  If local changes are detected user is warned before update starts.
20198 \end_layout
20199
20200 \begin_layout Labeling
20201 \labelwidthstring 00.00.0000
20202 SVN
20203 \begin_inset space ~
20204 \end_inset
20205
20206 commands: 
20207 \begin_inset space ~
20208 \end_inset
20209
20210
20211 \begin_inset Newline newline
20212 \end_inset
20213
20214
20215 \begin_inset Flex Code
20216 status collapsed
20217
20218 \begin_layout Plain Layout
20219 svn diff $path
20220 \end_layout
20221
20222 \end_inset
20223
20224  (Ask if changes are detected.)
20225 \begin_inset Newline newline
20226 \end_inset
20227
20228
20229 \begin_inset Flex Code
20230 status collapsed
20231
20232 \begin_layout Plain Layout
20233 svn update --accept mine-full $path
20234 \end_layout
20235
20236 \end_inset
20237
20238
20239 \end_layout
20240
20241 \begin_layout Standard
20242 where 
20243 \begin_inset Flex Code
20244 status collapsed
20245
20246 \begin_layout Plain Layout
20247 $path
20248 \end_layout
20249
20250 \end_inset
20251
20252  stands for the path to the document.
20253 \end_layout
20254
20255 \begin_layout Subsubsection
20256
20257 \family sans
20258 Show History
20259 \end_layout
20260
20261 \begin_layout Standard
20262 This shows the complete history of the SVN document.
20263  The output of 
20264 \family typewriter
20265 svn log 
20266 \begin_inset Quotes eld
20267 \end_inset
20268
20269 <file-name>
20270 \begin_inset Quotes erd
20271 \end_inset
20272
20273
20274 \family default
20275  is shown in a browser.
20276 \end_layout
20277
20278 \begin_layout Subsubsection
20279 File Locking
20280 \begin_inset CommandInset label
20281 LatexCommand label
20282 name "subsec:SVN-File-Locking"
20283
20284 \end_inset
20285
20286
20287 \end_layout
20288
20289 \begin_layout Standard
20290 The file exchange through various revision control systems brings the problem
20291  of merge conflicts in case two different users try to edit the same (parts
20292  of) document.
20293  When such a conflict happens it needs manual resolving and one reasonable
20294  alternative is to provide some kind of locking mechanism, which guarantees
20295  that only one user is allowed to edit file at the given time.
20296 \end_layout
20297
20298 \begin_layout Standard
20299 SVN has two such mechanisms to provide mutual exclusivity for file access
20300  - locks and automatic setting of write permissions (see sec.
20301  
20302 \begin_inset CommandInset ref
20303 LatexCommand ref
20304 reference "subsec:Automatical-Locking-Property"
20305
20306 \end_inset
20307
20308 ) based on 
20309 \begin_inset Flex Code
20310 status collapsed
20311
20312 \begin_layout Plain Layout
20313 svn:needs-lock
20314 \end_layout
20315
20316 \end_inset
20317
20318  file svn property
20319 \begin_inset Foot
20320 status open
20321
20322 \begin_layout Plain Layout
20323 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20324 \end_layout
20325
20326 \end_inset
20327
20328 .
20329  If this property is detected for a given document LyX starts to use SVN
20330  locks for document editing automatically and the whole check-in/out mechanism
20331  switches to the same regimen as for RCS.
20332  This in particular means there are two different modes of file use in LyX:
20333 \end_layout
20334
20335 \begin_layout Itemize
20336 Unlocked state.
20337  The loaded file is in the read-only mode.
20338  For editing on needs to check-out.
20339  
20340 \emph on
20341 Check-out
20342 \emph default
20343  consists of updating from the repository and gaining write lock.
20344  If the lock is not possible to obtain, we remain in unlocked state.
20345 \end_layout
20346
20347 \begin_layout Itemize
20348 Locked state.
20349  The loaded file is in the 'normal' edit mode.
20350  No other user is allowed to edit the file.
20351  
20352 \emph on
20353 Check-in
20354 \emph default
20355  consists of commiting changes and releasing write-lock.
20356  If no changes have been made to the document, no commit will be produced
20357 \begin_inset Foot
20358 status collapsed
20359
20360 \begin_layout Plain Layout
20361 Don't be puzzled by the fact that you will be asked for commit message anyway.
20362 \end_layout
20363
20364 \end_inset
20365
20366  and only the write-lock will be released.
20367 \end_layout
20368
20369 \begin_layout Standard
20370 SVN commands:
20371 \end_layout
20372
20373 \begin_layout Labeling
20374 \labelwidthstring 00.00.0000
20375 Check-in:
20376 \family typewriter
20377  svn commit -q -m"<description>" "<file-name>"
20378 \begin_inset Newline newline
20379 \end_inset
20380
20381 svn unlock "<file-name>"
20382 \end_layout
20383
20384 \begin_layout Labeling
20385 \labelwidthstring 00.00.0000
20386 Check-out: 
20387 \family typewriter
20388 svn update "<file-name>"
20389 \begin_inset Newline newline
20390 \end_inset
20391
20392 svn lock "<file-name>"
20393 \end_layout
20394
20395 \begin_layout Subsubsection
20396
20397 \family typewriter
20398 \begin_inset CommandInset label
20399 LatexCommand label
20400 name "subsec:Automatical-Locking-Property"
20401
20402 \end_inset
20403
20404
20405 \family default
20406 Automatic Locking Property
20407 \end_layout
20408
20409 \begin_layout Standard
20410 The above mentioned automatic setting of write permissions of the .lyx file
20411  can be set through
20412 \family sans
20413 \bar under
20414  F
20415 \bar default
20416 ile\SpecialChar \menuseparator
20417
20418 \bar under
20419 V
20420 \bar default
20421 ersion
20422 \begin_inset space ~
20423 \end_inset
20424
20425 Control\SpecialChar \menuseparator
20426
20427 \bar under
20428 T
20429 \bar default
20430 oggle locking property
20431 \family default
20432 .
20433  This command is active only when the file is not locked on the svn server
20434  (i.e.
20435  you need to check-out before proceeding).
20436 \end_layout
20437
20438 \begin_layout Labeling
20439 \labelwidthstring 00.00.0000
20440 SVN
20441 \begin_inset space ~
20442 \end_inset
20443
20444 commands:
20445 \end_layout
20446
20447 \begin_layout Labeling
20448 \labelwidthstring 00.00.0000
20449 Set:
20450 \family typewriter
20451  svn propset svn:needs-lock ON "<file-name>"
20452 \end_layout
20453
20454 \begin_layout Labeling
20455 \labelwidthstring 00.00.0000
20456 Unset: 
20457 \family typewriter
20458 svn propdel svn:needs-lock "<file-name>"
20459 \end_layout
20460
20461 \begin_layout Subsubsection
20462 \begin_inset CommandInset label
20463 LatexCommand label
20464 name "sub:VCS-Revision-Information"
20465
20466 \end_inset
20467
20468 Revision Information in Documents
20469 \end_layout
20470
20471 \begin_layout Standard
20472 There are more possibilities how to activate revision information in our
20473  document.
20474 \end_layout
20475
20476 \begin_layout Itemize
20477 LyX supports directly:
20478 \end_layout
20479
20480 \begin_deeper
20481 \begin_layout Itemize
20482 tree revision information (
20483 \begin_inset Flex Code
20484 status collapsed
20485
20486 \begin_layout Plain Layout
20487 vcs-tree-revision
20488 \end_layout
20489
20490 \end_inset
20491
20492 ).
20493  The result is the output of the 
20494 \begin_inset Flex Code
20495 status collapsed
20496
20497 \begin_layout Plain Layout
20498 svnversion
20499 \end_layout
20500
20501 \end_inset
20502
20503  command, the following table gives you an idea, how to read the results.
20504 \end_layout
20505
20506 \begin_layout Standard
20507 \align center
20508 \begin_inset Tabular
20509 <lyxtabular version="3" rows="6" columns="2">
20510 <features tabularvalignment="middle">
20511 <column alignment="center" valignment="top" width="0">
20512 <column alignment="center" valignment="top" width="0">
20513 <row>
20514 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20515 \begin_inset Text
20516
20517 \begin_layout Plain Layout
20518 Output
20519 \end_layout
20520
20521 \end_inset
20522 </cell>
20523 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20524 \begin_inset Text
20525
20526 \begin_layout Plain Layout
20527 Meaning
20528 \end_layout
20529
20530 \end_inset
20531 </cell>
20532 </row>
20533 <row>
20534 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20535 \begin_inset Text
20536
20537 \begin_layout Plain Layout
20538 4123:4168
20539 \end_layout
20540
20541 \end_inset
20542 </cell>
20543 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20544 \begin_inset Text
20545
20546 \begin_layout Plain Layout
20547 mixed revision working copy
20548 \end_layout
20549
20550 \end_inset
20551 </cell>
20552 </row>
20553 <row>
20554 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20555 \begin_inset Text
20556
20557 \begin_layout Plain Layout
20558 4168M
20559 \end_layout
20560
20561 \end_inset
20562 </cell>
20563 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20564 \begin_inset Text
20565
20566 \begin_layout Plain Layout
20567 modified working copy
20568 \end_layout
20569
20570 \end_inset
20571 </cell>
20572 </row>
20573 <row>
20574 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20575 \begin_inset Text
20576
20577 \begin_layout Plain Layout
20578 4123S
20579 \end_layout
20580
20581 \end_inset
20582 </cell>
20583 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20584 \begin_inset Text
20585
20586 \begin_layout Plain Layout
20587 switched working copy
20588 \end_layout
20589
20590 \end_inset
20591 </cell>
20592 </row>
20593 <row>
20594 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20595 \begin_inset Text
20596
20597 \begin_layout Plain Layout
20598 4123P
20599 \end_layout
20600
20601 \end_inset
20602 </cell>
20603 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20604 \begin_inset Text
20605
20606 \begin_layout Plain Layout
20607 partial working copy, from a sparse checkout
20608 \end_layout
20609
20610 \end_inset
20611 </cell>
20612 </row>
20613 <row>
20614 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20615 \begin_inset Text
20616
20617 \begin_layout Plain Layout
20618 4123:4168MS
20619 \end_layout
20620
20621 \end_inset
20622 </cell>
20623 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20624 \begin_inset Text
20625
20626 \begin_layout Plain Layout
20627 mixed revision, modified, switched working copy
20628 \end_layout
20629
20630 \end_inset
20631 </cell>
20632 </row>
20633 </lyxtabular>
20634
20635 \end_inset
20636
20637
20638 \end_layout
20639
20640 \begin_layout Itemize
20641 file revision information.
20642  The result comes from parsing the output of 
20643 \begin_inset Flex Code
20644 status collapsed
20645
20646 \begin_layout Plain Layout
20647 svn
20648 \begin_inset space ~
20649 \end_inset
20650
20651 info
20652 \begin_inset space ~
20653 \end_inset
20654
20655 --xml
20656 \begin_inset space ~
20657 \end_inset
20658
20659 file.lyx
20660 \end_layout
20661
20662 \end_inset
20663
20664 .
20665  Supported flags are:
20666 \end_layout
20667
20668 \begin_deeper
20669 \begin_layout Itemize
20670 version number of the last commit (
20671 \begin_inset Flex Code
20672 status collapsed
20673
20674 \begin_layout Plain Layout
20675 vcs-revision
20676 \end_layout
20677
20678 \end_inset
20679
20680 )
20681 \end_layout
20682
20683 \begin_layout Itemize
20684 author of the last commit (
20685 \begin_inset Flex Code
20686 status collapsed
20687
20688 \begin_layout Plain Layout
20689 vcs-author
20690 \end_layout
20691
20692 \end_inset
20693
20694 )
20695 \end_layout
20696
20697 \begin_layout Itemize
20698 date of the last commit (
20699 \begin_inset Flex Code
20700 status collapsed
20701
20702 \begin_layout Plain Layout
20703 vcs-date
20704 \end_layout
20705
20706 \end_inset
20707
20708 )
20709 \end_layout
20710
20711 \begin_layout Itemize
20712 time of the last commit (
20713 \begin_inset Flex Code
20714 status collapsed
20715
20716 \begin_layout Plain Layout
20717 vcs-time
20718 \end_layout
20719
20720 \end_inset
20721
20722 )
20723 \end_layout
20724
20725 \end_deeper
20726 \begin_layout Standard
20727 You can obtain this info via InsetInfo (e.g.
20728  
20729 \begin_inset Flex Code
20730 status collapsed
20731
20732 \begin_layout Plain Layout
20733 info-insert buffer vcs-date
20734 \end_layout
20735
20736 \end_inset
20737
20738 ).
20739  The information will be available only when you have the file stored under
20740  svn managment (i.e.
20741  the 
20742 \begin_inset Flex Code
20743 status collapsed
20744
20745 \begin_layout Plain Layout
20746 .svn
20747 \end_layout
20748
20749 \end_inset
20750
20751  directory is available with your document).
20752 \end_layout
20753
20754 \end_deeper
20755 \begin_layout Itemize
20756 Another---a hacking one---possibility is to use svn keywords
20757 \begin_inset Foot
20758 status collapsed
20759
20760 \begin_layout Plain Layout
20761 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20762 \end_layout
20763
20764 \end_inset
20765
20766 .
20767  In short -- you set file keywords property (e.g.
20768  
20769 \family sans
20770 svn propset svn:keywords 'Rev' file.lyx
20771 \family default
20772 ) and then paste keyword TeX code
20773 \begin_inset Foot
20774 status collapsed
20775
20776 \begin_layout Plain Layout
20777 This is an easy way how to ensure that LyX won't break the line in the middle
20778  of keyword tag.
20779 \end_layout
20780
20781 \end_inset
20782
20783  tag in your document (e.g.
20784  
20785 \begin_inset ERT
20786 status open
20787
20788 \begin_layout Plain Layout
20789
20790 $Rev$
20791 \end_layout
20792
20793 \end_inset
20794
20795 ).
20796  This way svn client will automatically substitute revision number (e.g.
20797  
20798 \begin_inset ERT
20799 status open
20800
20801 \begin_layout Plain Layout
20802
20803 $Rev: 59 $
20804 \end_layout
20805
20806 \end_inset
20807
20808 ) after each update and commit.
20809  There are more problems with this approach.
20810  Firstly, the '$' character is used in TeX world for math equations, so
20811  any occurence of math formula 
20812 \begin_inset Formula $Rev$
20813 \end_inset
20814
20815  become 
20816 \begin_inset Formula $Rev:59$
20817 \end_inset
20818
20819  in your LyX document.
20820  Similarly for other keywords like Id, Date, Author, etc.
20821  Secondly svn output is dependent on your locales, so its very easy that
20822  svn would produce some problematic strings once Date is used.
20823  Thirdly you get the whole 'Rev: 59' string in your document instead of
20824  the plain number.
20825  Until subversion implements user's custom keywords it will be hard to use
20826  this approach reliably or let LyX to support it directly.
20827 \end_layout
20828
20829 \begin_layout Subsection
20830 SVN and Windows Environment
20831 \end_layout
20832
20833 \begin_layout Quote
20834 My inclination is to say that if the user cannot figure out the command
20835  line operations on their own fairly quickly, they would be well advised
20836  to use TortoiseSVN.
20837  ---P.
20838  A.
20839  Rubin
20840 \end_layout
20841
20842 \begin_layout Subsubsection
20843 Preparation
20844 \end_layout
20845
20846 \begin_layout Standard
20847 In addition to installing LyX, and having access to a Subversion repository,
20848  the user will need to install the Subversion client program.
20849  A Windows installer for the client program is available from 
20850 \begin_inset CommandInset href
20851 LatexCommand href
20852 name "CollabNet"
20853 target "http://www.collab.net/nonav/downloads/subversion/"
20854
20855 \end_inset
20856
20857 .
20858  The user may also want to install 
20859 \begin_inset CommandInset href
20860 LatexCommand href
20861 name "TortoiseSVN"
20862 target "http://tortoisesvn.tigris.org/"
20863
20864 \end_inset
20865
20866 , which integrates Subversion operations into the context (rightclick) menu
20867  of Windows Explorer.
20868  Operations done outside LyX will typically be more convenient using the
20869  Explorer context menu.
20870  Note that TortoiseSVN is not a replacement for the client program, which
20871  is what LyX itself will use.
20872 \end_layout
20873
20874 \begin_layout Subsubsection
20875 Bringing a document under Subversion control
20876 \end_layout
20877
20878 \begin_layout Standard
20879 Before a LyX document can be brought under version control in Subversion,
20880  its parent directory needs to be under version control.
20881  If the document is being added to a project already in the repository,
20882  this is accomplished by checking the project out to the directory where
20883  the new document will be placed.
20884  If the project itself is not yet under version control (for instance, if
20885  this document starts a new project), the directory must be imported into
20886  the repository.
20887  This is done outside LyX.
20888  Both import and checkout are easily accomplished from the Explorer context
20889  menu using TortoiseSVN, or alternatively can be done using the command
20890  line client at a DOS prompt.
20891  The procedure for importing the project using TortoiseSVN is described
20892  below, assuming an existing repository and a new project being started
20893  in 
20894 \family typewriter
20895 C:
20896 \backslash
20897 new project
20898 \family default
20899 .
20900  For information on using the Subversion client program, run 
20901 \family typewriter
20902 svn --help 
20903 \family default
20904 in a DOS shell.
20905 \end_layout
20906
20907 \begin_layout Enumerate
20908 Locate 
20909 \family typewriter
20910 C:
20911 \backslash
20912 new project 
20913 \family default
20914 in Windows Explorer, right click it, and select 
20915 \family typewriter
20916 TortoiseSVN > Repo-browser
20917 \family default
20918 .
20919  If necessary, adjust the URL for the repository, then click OK.
20920 \end_layout
20921
20922 \begin_layout Enumerate
20923 Right click the level of the repository under which you want to place the
20924  new project folder (typically the top level) and click 
20925 \family typewriter
20926 Create folder\SpecialChar \ldots{}
20927
20928 \family default
20929  Supply a name for the project folder and click OK.
20930  Add a message for the log file if desired, then click OK again.
20931  The new project folder should appear in the repository.
20932  Finally, click OK again to exit the repository browser.
20933 \end_layout
20934
20935 \begin_layout Enumerate
20936 Once again right click 
20937 \family typewriter
20938 C:
20939 \backslash
20940 new project
20941 \family default
20942 , this time selecting SVN Checkout\SpecialChar \ldots{}
20943  Select the URL of the project folder
20944  you just created in the repository, and set the checkout directory to 
20945 \family typewriter
20946 C:
20947 \backslash
20948 new project.
20949
20950 \family default
20951  Click OK.
20952  You will be warned about a non-empty folder; click OK to proceed.
20953  You should now have a 
20954 \family typewriter
20955 .svn
20956 \family default
20957  directory under 
20958 \family typewriter
20959 C:
20960 \backslash
20961 new project.
20962 \end_layout
20963
20964 \begin_layout Enumerate
20965 Create or open your document in LyX and click 
20966 \family sans
20967 \bar under
20968 F
20969 \bar default
20970 ile\SpecialChar \menuseparator
20971
20972 \bar under
20973 V
20974 \bar default
20975 ersion
20976 \begin_inset space ~
20977 \end_inset
20978
20979 Control\SpecialChar \menuseparator
20980
20981 \bar under
20982 R
20983 \bar default
20984 egister.
20985  
20986 \family default
20987 Add a log message and click OK to commit the document to version control.
20988 \end_layout
20989
20990 \begin_layout Standard
20991 From this point onward, you should have full functionality in the 
20992 \family sans
20993 \bar under
20994 F
20995 \bar default
20996 ile\SpecialChar \menuseparator
20997
20998 \bar under
20999 V
21000 \bar default
21001 ersion
21002 \begin_inset space ~
21003 \end_inset
21004
21005 Control
21006 \family default
21007  menu.
21008  You also have the option of checking the document in and out, viewing its
21009  history, etc.
21010  using the TortoiseSVN context menu in Windows Explorer or the Subversion
21011  client program from a command prompt.
21012 \end_layout
21013
21014 \begin_layout Subsubsection
21015 SSH tu
21016 \change_inserted 3 1288376976
21017 n
21018 \change_unchanged
21019 nel used with SVN under Windows
21020 \end_layout
21021
21022 \begin_layout Standard
21023 Compared with Linux setting up svn client to communicate over ssh under
21024  Windows is a rather troublesome task.
21025  We will at least offer some hints how to setup the client side but prior
21026  knowledge about ssh and the Windows command line is needed, also be prepared
21027  for a great deal of frustration\SpecialChar \ldots{}
21028
21029 \end_layout
21030
21031 \begin_layout Enumerate
21032 Get a svn client for windows, as described in the previous sections.
21033  When it is a fresh install run some svn command (e.g.
21034  
21035 \begin_inset Flex Code
21036 status collapsed
21037
21038 \begin_layout Plain Layout
21039 svn --version
21040 \end_layout
21041
21042 \end_inset
21043
21044 ) to create config files, which you will need to change later on.
21045 \end_layout
21046
21047 \begin_layout Enumerate
21048 Choose a ssh client for Windows.
21049  There are several possibilities, we will use the one from Putty tools
21050 \begin_inset Foot
21051 status open
21052
21053 \begin_layout Plain Layout
21054 \begin_inset Flex URL
21055 status collapsed
21056
21057 \begin_layout Plain Layout
21058
21059 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21060 \end_layout
21061
21062 \end_inset
21063
21064
21065 \end_layout
21066
21067 \end_inset
21068
21069 .
21070  You will need to set the connection up so that the client doesn't ask for
21071  any password from you.
21072  To keep things easy we will use only keys without any additional password
21073  protection etc.
21074 \end_layout
21075
21076 \begin_deeper
21077 \begin_layout Enumerate
21078 Generate keys by 
21079 \begin_inset Flex Code
21080 status collapsed
21081
21082 \begin_layout Plain Layout
21083 puttygen
21084 \end_layout
21085
21086 \end_inset
21087
21088 .
21089  Save your private .ppk key file and put the public one on the server side.
21090  If the SVN server runs on Linux, note that the format of the public key
21091  is not compatible with Linux openssh and you will need to direcly copy-paste
21092  the key from the “
21093 \emph on
21094 Public key for pasting into OpenSSH authorized_keys file
21095 \emph default
21096 :” edit field into the server's 
21097 \begin_inset Flex Code
21098 status collapsed
21099
21100 \begin_layout Plain Layout
21101 ~/.ssh/authorized_keys
21102 \end_layout
21103
21104 \end_inset
21105
21106
21107 \begin_inset Flex Code
21108 status collapsed
21109
21110 \begin_layout Plain Layout
21111 authorized_keys2
21112 \end_layout
21113
21114 \end_inset
21115
21116  file.
21117 \end_layout
21118
21119 \begin_layout Enumerate
21120 Get the Putty's 
21121 \begin_inset Flex Code
21122 status collapsed
21123
21124 \begin_layout Plain Layout
21125 plink
21126 \end_layout
21127
21128 \end_inset
21129
21130 .
21131  In the SVN config file
21132 \begin_inset Foot
21133 status collapsed
21134
21135 \begin_layout Plain Layout
21136 Exact path depends on Windows version, usually somewhere around 
21137 \begin_inset Flex Code
21138 status collapsed
21139
21140 \begin_layout Plain Layout
21141 c:
21142 \backslash
21143 Documents and Settings
21144 \backslash
21145 user
21146 \backslash
21147 Application Data
21148 \backslash
21149 Subversion
21150 \backslash
21151 config
21152 \end_layout
21153
21154 \end_inset
21155
21156  / 
21157 \begin_inset Flex Code
21158 status collapsed
21159
21160 \begin_layout Plain Layout
21161 AppData
21162 \backslash
21163 Roaming
21164 \backslash
21165 Subversion
21166 \end_layout
21167
21168 \end_inset
21169
21170 .
21171 \end_layout
21172
21173 \end_inset
21174
21175 , section [tunnels], setup ssh command, e.g.
21176  
21177 \begin_inset Flex Code
21178 status collapsed
21179
21180 \begin_layout Plain Layout
21181 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21182 \end_layout
21183
21184 \end_inset
21185
21186 .
21187 \begin_inset Foot
21188 status collapsed
21189
21190 \begin_layout Plain Layout
21191 It will usually take a lot of time to get exact command right and it depends
21192  on many things.
21193  For example do not have some remote server saved as a default session in
21194  Putty etc.
21195  If things fail, try to connect via plink without SVN first.
21196 \end_layout
21197
21198 \end_inset
21199
21200
21201 \end_layout
21202
21203 \end_deeper
21204 \begin_layout Enumerate
21205 Checkout the SVN archive, e.g.
21206  
21207 \begin_inset Flex Code
21208 status collapsed
21209
21210 \begin_layout Plain Layout
21211 svn co svn+ssh://user@server/repository_path
21212 \end_layout
21213
21214 \end_inset
21215
21216 .
21217 \end_layout
21218
21219 \begin_layout Subsubsection
21220 End-of-Line Conversions
21221 \end_layout
21222
21223 \begin_layout Standard
21224 When the collsraborators are mixing Linux and Windows environments, LyX
21225  will use different line endings inside the .lyx files.
21226  This is not a problem as far as LyX functionality is concerned, but the
21227  commit diffs will be huge and merge-conflicts prone.
21228  Fortunately SVN itself knows
21229 \begin_inset Foot
21230 status collapsed
21231
21232 \begin_layout Plain Layout
21233 \begin_inset Flex URL
21234 status collapsed
21235
21236 \begin_layout Plain Layout
21237
21238 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21239 \end_layout
21240
21241 \end_inset
21242
21243
21244 \end_layout
21245
21246 \end_inset
21247
21248  how to deal with CR/LF problems when switching .lyx files to the 
21249 \begin_inset Flex Code
21250 status collapsed
21251
21252 \begin_layout Plain Layout
21253 native
21254 \end_layout
21255
21256 \end_inset
21257
21258  mode.
21259 \begin_inset Foot
21260 status collapsed
21261
21262 \begin_layout Plain Layout
21263 For the lazy guys: 
21264 \begin_inset Flex Code
21265 status collapsed
21266
21267 \begin_layout Plain Layout
21268 svn propset svn:eol-style native FILE_NAME
21269 \end_layout
21270
21271 \end_inset
21272
21273
21274 \end_layout
21275
21276 \end_inset
21277
21278
21279 \end_layout
21280
21281 \begin_layout Subsection
21282 Further tuning
21283 \end_layout
21284
21285 \begin_layout Standard
21286 With the recent addition of the vc-command function LyX power users are
21287  allowed to create their own commands for revision control.
21288 \end_layout
21289
21290 \begin_layout Standard
21291 As an example you can see how two TortoiseSVN commands could be integrated
21292  directly:
21293 \end_layout
21294
21295 \begin_layout Description
21296 Commit: 
21297 \begin_inset Flex Code
21298 status collapsed
21299
21300 \begin_layout Plain Layout
21301 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21302 \end_layout
21303
21304 \end_inset
21305
21306
21307 \end_layout
21308
21309 \begin_layout Description
21310 Revert: 
21311 \begin_inset Flex Code
21312 status collapsed
21313
21314 \begin_layout Plain Layout
21315 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21316 \end_layout
21317
21318 \end_inset
21319
21320
21321 \end_layout
21322
21323 \begin_layout Subsection
21324 Version control and Document comparison
21325 \end_layout
21326
21327 \begin_layout Standard
21328 One of the typical uses of version control is to inspect the changes between
21329  revisions, usually by creating 
21330 \begin_inset Flex Code
21331 status collapsed
21332
21333 \begin_layout Plain Layout
21334 diff
21335 \end_layout
21336
21337 \end_inset
21338
21339  dumps.
21340  While this is useful for plain text files, it is much less useful in the
21341  case of LyX files, which have more complicated structure.
21342  Hence we provide binding to the Document comparison feature.
21343  They are two ways of calling this feature - either by direct call of 
21344 \begin_inset Flex Code
21345 status collapsed
21346
21347 \begin_layout Plain Layout
21348 VC_COMPARE
21349 \end_layout
21350
21351 \end_inset
21352
21353  LyX function (for details see LyX functions manual) or by icon/menu item
21354  
21355 \begin_inset Flex MenuItem
21356 status collapsed
21357
21358 \begin_layout Plain Layout
21359 Compare with older revision...
21360 \end_layout
21361
21362 \end_inset
21363
21364 .
21365  One can either compare two chosen revisions of the document or he can simply
21366  compare the current version of edited text with older revisions (where
21367  '
21368 \begin_inset Flex MenuItem
21369 status collapsed
21370
21371 \begin_layout Plain Layout
21372 0
21373 \end_layout
21374
21375 \end_inset
21376
21377 ' revisions back means comparison of the edited file with last commited
21378  revision).
21379  
21380 \end_layout
21381
21382 \begin_layout Standard
21383 This feature is supported for SVN and RCS though due to the more complicated
21384  versioning scheme of RCS there is a constraint -- when addressing the revisions
21385  in dialog, numbers always point to the last number in RCS revision number,
21386  i.e.
21387  '35' in '1.2.35'.
21388 \end_layout
21389
21390 \begin_layout Section
21391 Literate Programming
21392 \end_layout
21393
21394 \begin_layout Standard
21395 Updated by 
21396 \noun on
21397 Kayvan Sylvan 
21398 \noun default
21399 (kayvan@sylvan.com)
21400 \noun on
21401
21402 \noun default
21403 original documentation written by 
21404 \noun on
21405 Edmar Wienskoski Jr.
21406
21407 \noun default
21408  (edmar-w-jr@technologist.com)
21409 \end_layout
21410
21411 \begin_layout Subsection
21412 Introduction
21413 \end_layout
21414
21415 \begin_layout Standard
21416 The main purpose of this documentation is to show you how to use LyX for
21417  literate programming, where it is assumed that you are familiar with this
21418  programming technique, and know what 
21419 \begin_inset Quotes eld
21420 \end_inset
21421
21422 tangling
21423 \begin_inset Quotes erd
21424 \end_inset
21425
21426  and 
21427 \begin_inset Quotes eld
21428 \end_inset
21429
21430 weaving
21431 \begin_inset Quotes erd
21432 \end_inset
21433
21434  means.
21435  If that is not the case, please follow the web links provided in the following
21436  sections.
21437  There is a lot of good documentation out there covering old development
21438  history to the latest tools tips.
21439 \end_layout
21440
21441 \begin_layout Standard
21442 It is also assumed that you are familiar with LyX itself to a point that
21443  you are comfortable changing your LyX preferences, and X resources file.
21444  If that is not the case please refer to other LyX documentation to cover
21445  your specific needs.
21446 \end_layout
21447
21448 \begin_layout Subsection
21449 Literate Programming
21450 \end_layout
21451
21452 \begin_layout Standard
21453 From the Literate Programming FAQ: 
21454 \end_layout
21455
21456 \begin_layout Quotation
21457 Literate programming is the combination of documentation and source together
21458  in a fashion suited for reading by human beings.
21459  In fact, literate programs should be enjoyable reading, even inviting!
21460  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21461  and documentation in a single file.
21462  Literate programming tools then parse the file to produce either readable
21463  documentation or compilable source.
21464  The WEB style of literate programming was created by D.
21465 \begin_inset space \thinspace{}
21466 \end_inset
21467
21468 E.
21469  Knuth during the development of his TeX typesetting software.
21470  
21471 \end_layout
21472
21473 \begin_layout Standard
21474 Another excerpt says:
21475 \end_layout
21476
21477 \begin_layout Quotation
21478
21479 \emph on
21480 How is literate programming different from verbose commenting?
21481 \end_layout
21482
21483 \begin_layout Quotation
21484 There are three distinguishing characteristics.
21485  In order of importance, they are: 
21486 \end_layout
21487
21488 \begin_deeper
21489 \begin_layout Itemize
21490 flexible order of elaboration 
21491 \end_layout
21492
21493 \begin_layout Itemize
21494 automatic support for browsing 
21495 \end_layout
21496
21497 \begin_layout Itemize
21498 typeset documentation, especially diagrams and mathematics 
21499 \end_layout
21500
21501 \end_deeper
21502 \begin_layout Standard
21503 Now that I sparked your curiosity, take a look in the references.
21504 \end_layout
21505
21506 \begin_layout Subsubsection
21507 References
21508 \end_layout
21509
21510 \begin_layout Standard
21511 The complete Literate Programming FAQ can be found at:
21512 \end_layout
21513
21514 \begin_layout Quote
21515 Literate Programming FAQ 
21516 \begin_inset Flex URL
21517 status collapsed
21518
21519 \begin_layout Plain Layout
21520
21521 http://www.literateprogramming.com/lpfaq.pdf
21522 \end_layout
21523
21524 \end_inset
21525
21526
21527 \end_layout
21528
21529 \begin_layout Standard
21530 The FAQ lists 23 (twenty three!) different literate programming tools.
21531  Where some are specialized or 
21532 \begin_inset Quotes eld
21533 \end_inset
21534
21535 tailored
21536 \begin_inset Quotes erd
21537 \end_inset
21538
21539  for particular programming languages, while other have general scope.
21540  I selected 
21541 \noun on
21542 Noweb
21543 \noun default
21544  for my own use for several reasons:
21545 \end_layout
21546
21547 \begin_layout Itemize
21548 It can generate the documentation either in LaTeX or HTML.
21549 \end_layout
21550
21551 \begin_layout Itemize
21552 It has a open architecture, i.
21553 \begin_inset space \thinspace{}
21554 \end_inset
21555
21556 g.
21557 \begin_inset space \space{}
21558 \end_inset
21559
21560 it is easy to plug in new filters and to perform special processing that
21561  you may need.
21562  
21563 \end_layout
21564
21565 \begin_layout Itemize
21566 There is a good selection of filters available already (the HTML is one
21567  of them).
21568 \end_layout
21569
21570 \begin_layout Itemize
21571 It is free.
21572 \end_layout
21573
21574 \begin_layout Standard
21575 The Noweb web page can be found at: 
21576 \end_layout
21577
21578 \begin_layout Quote
21579 Noweb home page 
21580 \begin_inset Flex URL
21581 status collapsed
21582
21583 \begin_layout Plain Layout
21584
21585 http://www.cs.virginia.edu/~nr/noweb/
21586 \end_layout
21587
21588 \end_inset
21589
21590
21591 \end_layout
21592
21593 \begin_layout Standard
21594 Starting from there you can reach many other interesting links and even
21595  some literate program examples.
21596 \end_layout
21597
21598 \begin_layout Subsection
21599 LyX and Literate Programming
21600 \end_layout
21601
21602 \begin_layout Standard
21603 The LyX support for Literate Programming is provided by using the generic
21604  LyX converters mechanism.
21605  This support is provided in a 
21606 \begin_inset Quotes eld
21607 \end_inset
21608
21609 Noweb independent
21610 \begin_inset Quotes erd
21611 \end_inset
21612
21613  way, i.
21614 \begin_inset space \thinspace{}
21615 \end_inset
21616
21617 g.
21618 \begin_inset space \space{}
21619 \end_inset
21620
21621 you will be able to use this new LyX feature with some other literate programmin
21622 g tool of your choice by just changing your LyX preferences.
21623 \end_layout
21624
21625 \begin_layout Subsubsection
21626 Generating documents and code (weaving and tangling)
21627 \end_layout
21628
21629 \begin_layout Paragraph
21630 Selecting the document class
21631 \end_layout
21632
21633 \begin_layout Standard
21634 If you have installed Noweb and LyX successfully, whenever you open a new
21635  document or try to change the document class of an existing one, you will
21636  find that there are three new document classes available:
21637 \end_layout
21638
21639 \begin_layout Itemize
21640 Article (Noweb)
21641 \end_layout
21642
21643 \begin_layout Itemize
21644 Book (Noweb)
21645 \end_layout
21646
21647 \begin_layout Itemize
21648 Report (Noweb)
21649 \end_layout
21650
21651 \begin_layout Standard
21652 You must select one of them to create your literate documents from.
21653  
21654 \end_layout
21655
21656 \begin_layout Standard
21657 Note that literate documents are not limited to these three classes.
21658  New classes can be generated from other styles like letter or in combination
21659  with other class variations like Article (AMS).
21660  If you have special needs that cannot be covered by one of the existing
21661  classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21662  will arrange to insert a new entry, or teach you how to do it.
21663 \begin_inset Foot
21664 status collapsed
21665
21666 \begin_layout Plain Layout
21667 It is very simple, it involves the creation of a file with four lines, and
21668  re-running of the auto configuration.
21669 \end_layout
21670
21671 \end_inset
21672
21673  Moreover, if you use a literate tool other than Noweb you may need to create
21674  a new set of document classes for it.
21675 \end_layout
21676
21677 \begin_layout Paragraph
21678 Typing code in
21679 \end_layout
21680
21681 \begin_layout Standard
21682 LyX enables you to write code with a layout named 
21683 \noun on
21684 Scrap
21685 \noun default
21686 .
21687 \begin_inset Foot
21688 status collapsed
21689
21690 \begin_layout Plain Layout
21691 The equivalent Noweb term is 
21692 \begin_inset Quotes eld
21693 \end_inset
21694
21695 Chunk
21696 \begin_inset Quotes erd
21697 \end_inset
21698
21699 .
21700  For historical reasons, I got used to the term 
21701 \begin_inset Quotes eld
21702 \end_inset
21703
21704 scrap
21705 \begin_inset Quotes erd
21706 \end_inset
21707
21708  introduced by other literate tool named Nuweb, which I used for many years
21709  before rendering myself to Noweb.
21710 \end_layout
21711
21712 \end_inset
21713
21714  Noweb delimits scraps like this:
21715 \end_layout
21716
21717 \begin_layout LyX-Code
21718 <<My scrap>>=
21719 \end_layout
21720
21721 \begin_layout LyX-Code
21722   code
21723 \end_layout
21724
21725 \begin_layout LyX-Code
21726   more code
21727 \end_layout
21728
21729 \begin_layout LyX-Code
21730   even more code
21731 \end_layout
21732
21733 \begin_layout LyX-Code
21734   @
21735 \end_layout
21736
21737 \begin_layout Standard
21738 The problem is that whatever is written in between the << and the 
21739 \family typewriter
21740 @
21741 \family default
21742  must be taken literally, i.
21743 \begin_inset space \thinspace{}
21744 \end_inset
21745
21746 g.
21747 \begin_inset space \space{}
21748 \end_inset
21749
21750 LyX should be prevented from making any special interpretation of what has
21751  been written.
21752  This is handled by a special layout named Scrap, that works like a normal
21753  paragraph but has a free spacing capability.
21754 \end_layout
21755
21756 \begin_layout Standard
21757 The down side of the Scrap paragraph layout is that consecutive paragraphs
21758  of code will be spaced with one empty line in the source code and also
21759  in the printed documentation.
21760  The work around is to enter each line of code within a single Scrap, with
21761  a newline (ctrl-return).
21762  The example above will look like this:
21763 \begin_inset Foot
21764 status collapsed
21765
21766 \begin_layout Plain Layout
21767 If you have a printed version of this document you will not see any difference
21768  between the previous example and this one.
21769 \end_layout
21770
21771 \end_inset
21772
21773
21774 \end_layout
21775
21776 \begin_layout LyX-Code
21777 <<My scrap>>=
21778 \begin_inset Newline newline
21779 \end_inset
21780
21781   code
21782 \begin_inset Newline newline
21783 \end_inset
21784
21785   more code
21786 \begin_inset Newline newline
21787 \end_inset
21788
21789   even more code
21790 \begin_inset Newline newline
21791 \end_inset
21792
21793   @
21794 \end_layout
21795
21796 \begin_layout Standard
21797 This layout works fine.
21798  The only real inconvenience is that you have to type ctrl-return instead
21799  of a plain return.
21800 \begin_inset Foot
21801 status collapsed
21802
21803 \begin_layout Plain Layout
21804 It is in my list of 
21805 \begin_inset Quotes eld
21806 \end_inset
21807
21808 improvements
21809 \begin_inset Quotes erd
21810 \end_inset
21811
21812  to fix that.
21813 \end_layout
21814
21815 \end_inset
21816
21817
21818 \end_layout
21819
21820 \begin_layout Standard
21821 As a special note, you can also use the 
21822 \begin_inset Quotes eld
21823 \end_inset
21824
21825 %def
21826 \begin_inset Quotes erd
21827 \end_inset
21828
21829  construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21830 rence:
21831 \end_layout
21832
21833 \begin_layout LyX-Code
21834 <<My scrap>>=
21835 \begin_inset Newline newline
21836 \end_inset
21837
21838   def some_function(args):
21839 \begin_inset Newline newline
21840 \end_inset
21841
21842     "This is the doc string for this function."
21843 \begin_inset Newline newline
21844 \end_inset
21845
21846     print "My args: ", args
21847 \end_layout
21848
21849 \begin_layout LyX-Code
21850 @ %def some_function
21851 \end_layout
21852
21853 \begin_layout Standard
21854 For an example of this usage and the resulting cross-reference output, look
21855  at the Literate python program in 
21856 \emph on
21857 LIBDIR/examples/listerrors.lyx
21858 \emph default
21859  which should make this all clear.
21860 \end_layout
21861
21862 \begin_layout Paragraph
21863 Generating the documentation
21864 \end_layout
21865
21866 \begin_layout Standard
21867 At this point you already have a new document file with a proper document
21868  class, and with some code and text on it.
21869  How do I print it? The answer is simple, you select 
21870 \family sans
21871 View\SpecialChar \menuseparator
21872 DVI,
21873 \family default
21874  etc.
21875  Just like you would do for a plain document.
21876  No special procedure is required.
21877 \end_layout
21878
21879 \begin_layout Standard
21880 To help orientate you, I will now explain what happens inside LyX:
21881 \end_layout
21882
21883 \begin_layout Enumerate
21884 When the 
21885 \family sans
21886 Update\SpecialChar \menuseparator
21887 DVI
21888 \family default
21889  menu option is chosen, a LaTeX file is generated.
21890  
21891 \end_layout
21892
21893 \begin_deeper
21894 \begin_layout Standard
21895 If the document is of any literate class the generated file will be named
21896  with an extension name defined by the 
21897 \begin_inset Quotes eld
21898 \end_inset
21899
21900 literate
21901 \begin_inset Quotes erd
21902 \end_inset
21903
21904  format (defined in the Preferences panel), otherwise the file will have
21905  the usual 
21906 \family typewriter
21907 .tex
21908 \family default
21909  extension.
21910 \end_layout
21911
21912 \end_deeper
21913 \begin_layout Enumerate
21914 Note that the only difference so far is in the name of the file, no special
21915  processing is required by LyX.
21916  Given that you formatted the code using the Scrap layout that, by itself,
21917  takes care of the business.
21918 \end_layout
21919
21920 \begin_layout Enumerate
21921 If the document is of any literate class LyX will then use the internal
21922  LyX to Noweb converter, followed by the Noweb to LaTeX converter
21923 \begin_inset Foot
21924 status collapsed
21925
21926 \begin_layout Plain Layout
21927 The converters are defined in the 
21928 \family sans
21929 Tools\SpecialChar \menuseparator
21930 Preferences
21931 \family default
21932  panel, under the 
21933 \begin_inset Quotes eld
21934 \end_inset
21935
21936 Conversion
21937 \begin_inset Quotes erd
21938 \end_inset
21939
21940  tab.
21941  See section 
21942 \emph on
21943 Converters
21944 \emph default
21945  of the 
21946 \emph on
21947 Customization
21948 \emph default
21949  manual for general information about converters.
21950 \end_layout
21951
21952 \end_inset
21953
21954  to generate the LaTeX file.
21955 \end_layout
21956
21957 \begin_deeper
21958 \begin_layout Standard
21959 Otherwise it will just skip this step.
21960 \end_layout
21961
21962 \end_deeper
21963 \begin_layout Enumerate
21964 Finally, LaTeX is invoked and the regular post processing continues as in
21965  a plain document.
21966 \end_layout
21967
21968 \begin_layout Standard
21969 Independence from a particular 
21970 \begin_inset Quotes eld
21971 \end_inset
21972
21973 literate tool
21974 \begin_inset Quotes erd
21975 \end_inset
21976
21977  is easily achieved by changing the commands that are run by the various
21978  converters.
21979 \end_layout
21980
21981 \begin_layout Paragraph
21982 Generating the code
21983 \end_layout
21984
21985 \begin_layout Standard
21986 When the build menu option is chosen or the corresponding button in the
21987  toolbar is pressed, a LaTeX file is generated just like step 1 above.
21988  Next, LyX invokes the 
21989 \family typewriter
21990 Noweb->Program
21991 \family default
21992  converter.
21993  This converter needs to be defined by the user and is not installed by
21994  default, though the Program format is.
21995  This converter (like any other converter) will have two parts:
21996 \end_layout
21997
21998 \begin_layout Enumerate
21999 The converter program itself.
22000  This program performs the conversion from the one format to the other (in
22001  this case, from the Noweb format to the Program pseudo-format).
22002 \end_layout
22003
22004 \begin_layout Enumerate
22005 The error log parser.
22006  This is a program whose sole purpose is to rewrite error messages in a
22007  format that LyX understands.
22008  This makes it possible for LyX to place error boxes in the right places
22009  in the file buffer.
22010 \end_layout
22011
22012 \begin_layout Standard
22013 The first part, the 
22014 \begin_inset Quotes eld
22015 \end_inset
22016
22017 Converter
22018 \begin_inset Quotes erd
22019 \end_inset
22020
22021  setting, should be set to 
22022 \begin_inset Quotes eld
22023 \end_inset
22024
22025
22026 \family typewriter
22027 build-script $$i
22028 \family default
22029
22030 \begin_inset Quotes erd
22031 \end_inset
22032
22033 .
22034  This basically means that LyX will call 
22035 \begin_inset Quotes eld
22036 \end_inset
22037
22038 build-script
22039 \begin_inset Quotes erd
22040 \end_inset
22041
22042  (a program or script) with the name of the Noweb file (normally a file
22043  in the LyX temp directory).
22044  
22045 \end_layout
22046
22047 \begin_layout Standard
22048 This is an implementation of 
22049 \begin_inset Quotes eld
22050 \end_inset
22051
22052 build-script
22053 \begin_inset Quotes erd
22054 \end_inset
22055
22056  that you can place in a directory on your path:
22057 \end_layout
22058
22059 \begin_layout LyX-Code
22060 #!/bin/sh
22061 \end_layout
22062
22063 \begin_layout LyX-Code
22064 #
22065 \end_layout
22066
22067 \begin_layout LyX-Code
22068 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
22069 \end_layout
22070
22071 \begin_layout Standard
22072 The next part of the converter setting is the 
22073 \begin_inset Quotes eld
22074 \end_inset
22075
22076 Flags
22077 \begin_inset Quotes erd
22078 \end_inset
22079
22080  which is to be set to 
22081 \begin_inset Quotes eld
22082 \end_inset
22083
22084
22085 \family typewriter
22086 parselog=listerrors
22087 \family default
22088
22089 \begin_inset Quotes erd
22090 \end_inset
22091
22092 .
22093  This will run any errors that are generated by the 
22094 \begin_inset Quotes eld
22095 \end_inset
22096
22097 build-script
22098 \begin_inset Quotes erd
22099 \end_inset
22100
22101  process through the 
22102 \begin_inset Quotes eld
22103 \end_inset
22104
22105 listerrors
22106 \begin_inset Quotes erd
22107 \end_inset
22108
22109  program.
22110 \end_layout
22111
22112 \begin_layout Standard
22113 The converter code looks in 
22114 \emph on
22115 MYLYXDIR/scripts
22116 \emph default
22117  first, then in 
22118 \emph on
22119 LIBDIR/scripts
22120 \emph default
22121  then on the path for the 
22122 \begin_inset Quotes eld
22123 \end_inset
22124
22125 listerrors
22126 \begin_inset Quotes erd
22127 \end_inset
22128
22129  program.
22130 \end_layout
22131
22132 \begin_layout Standard
22133 The build will normally take place in LyX's temporary directory, so the
22134  files produced by the conversion will be in that directory.
22135  LyX will copy out what it regards as the `main' file, but the 
22136 \family typewriter
22137 Noweb->Program
22138 \family default
22139  conversion may produce several files, and so most of these would then be
22140  deleted when LyX was closed.
22141  The present solution is to use a `copier',
22142 \begin_inset Foot
22143 status collapsed
22144
22145 \begin_layout Plain Layout
22146 See section 
22147 \emph on
22148 Copiers
22149 \emph default
22150  of the 
22151 \emph on
22152 Customization
22153 \emph default
22154  manual for information on these.
22155 \end_layout
22156
22157 \end_inset
22158
22159  in this case, the 
22160 \family typewriter
22161 ext_copy.py
22162 \family default
22163  script in its default mode, so that the entire contents of the temporary
22164  directory is copied.
22165  More will get copied than is needed, to be sure, but nothing will be lost.
22166  If, however, you know what extensions the generated files will have, this
22167  can be improved by using the 
22168 \family typewriter
22169 -e
22170 \family default
22171  option to 
22172 \family typewriter
22173 ext_copy
22174 \family default
22175 .
22176  This option takes a comma-separated list of extensions to copy.
22177  So, for example, if the conversion will generate only files with the extensions
22178  
22179 \family typewriter
22180 .c
22181 \family default
22182  and 
22183 \family typewriter
22184 .h
22185 \family default
22186 , then the correct definition would be:
22187 \end_layout
22188
22189 \begin_layout LyX-Code
22190 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
22191 \end_layout
22192
22193 \begin_layout Standard
22194 The result will be that only files with these two extensions will be copied
22195  out.
22196 \end_layout
22197
22198 \begin_layout Paragraph
22199 Build instructions in the document
22200 \end_layout
22201
22202 \begin_layout Standard
22203 The last piece of the integration between LyX and noweb is the 
22204 \begin_inset Quotes eld
22205 \end_inset
22206
22207 build-script
22208 \begin_inset Quotes erd
22209 \end_inset
22210
22211  scrap.
22212  Generally, the instructions for building your program should be embedded
22213  in a scrap of its own.
22214  The noweb-specific 
22215 \begin_inset Quotes eld
22216 \end_inset
22217
22218 build-script
22219 \begin_inset Quotes erd
22220 \end_inset
22221
22222  above uses the notangle command to look for this scrap (called 
22223 \begin_inset Quotes eld
22224 \end_inset
22225
22226 build-script
22227 \begin_inset Quotes erd
22228 \end_inset
22229
22230 ) and runs its contents through 
22231 \begin_inset Quotes eld
22232 \end_inset
22233
22234 sh
22235 \begin_inset Quotes erd
22236 \end_inset
22237
22238 .
22239 \end_layout
22240
22241 \begin_layout Standard
22242 Typically, such a scrap would look something like this:
22243 \end_layout
22244
22245 \begin_layout LyX-Code
22246 <<build-script>>=
22247 \begin_inset Newline newline
22248 \end_inset
22249
22250 #!/bin/sh
22251 \begin_inset Newline newline
22252 \end_inset
22253
22254
22255 \begin_inset Newline newline
22256 \end_inset
22257
22258 if [ -z "${NOWEB_SOURCE}" ]
22259 \begin_inset Newline newline
22260 \end_inset
22261
22262 then
22263 \begin_inset Newline newline
22264 \end_inset
22265
22266   NOWEB_SOURCE=myfile.nw
22267 \begin_inset Newline newline
22268 \end_inset
22269
22270 fi
22271 \begin_inset Newline newline
22272 \end_inset
22273
22274 [...
22275  code to extract files ...]
22276 \begin_inset Newline newline
22277 \end_inset
22278
22279 [...
22280  code to compile files ...]
22281 \begin_inset Newline newline
22282 \end_inset
22283
22284 @
22285 \end_layout
22286
22287 \begin_layout Standard
22288 Look in 
22289 \emph on
22290 LIBDIR/examples/listerrors.lyx
22291 \emph default
22292  or in 
22293 \emph on
22294 LIBDIR/examples/Literate.lyx
22295 \emph default
22296  which implement two versions of the 
22297 \begin_inset Quotes eld
22298 \end_inset
22299
22300 listerrors
22301 \begin_inset Quotes erd
22302 \end_inset
22303
22304  program for some illustrations of how all of these pieces go together or
22305  in 
22306 \emph on
22307 LIBDIR/examples/noweb2lyx.lyx.
22308
22309 \emph default
22310  Interestingly, these three files show off the language-indepence of the
22311  LyX literate programming support since they are written in Python, C and
22312  Perl respectively.
22313 \end_layout
22314
22315 \begin_layout Subsubsection
22316 Configuring LyX
22317 \end_layout
22318
22319 \begin_layout Standard
22320 All the Literate Programming support is configured by the 
22321 \family sans
22322 Tools\SpecialChar \menuseparator
22323 Preferences
22324 \family default
22325  panel in the 
22326 \begin_inset Quotes eld
22327 \end_inset
22328
22329 Conversion
22330 \begin_inset Quotes erd
22331 \end_inset
22332
22333  tab.
22334  The important parts are:
22335 \end_layout
22336
22337 \begin_layout Description
22338 the
22339 \begin_inset space ~
22340 \end_inset
22341
22342
22343 \begin_inset Quotes eld
22344 \end_inset
22345
22346 literate
22347 \begin_inset Quotes erd
22348 \end_inset
22349
22350
22351 \begin_inset space ~
22352 \end_inset
22353
22354 format Set up via the Formats tab, this is where the Noweb-specific pieces
22355  are set up.
22356  The 
22357 \family sans
22358 GUI Name
22359 \family default
22360  is set to 
22361 \family typewriter
22362 NoWeb
22363 \family default
22364 , the file extension is set to 
22365 \family typewriter
22366 .nw
22367 \family default
22368 .
22369  This tells LyX to create a file with a 
22370 \family typewriter
22371 .nw
22372 \family default
22373  extension in the first step of the conversion process.
22374 \end_layout
22375
22376 \begin_layout Description
22377 the
22378 \begin_inset space ~
22379 \end_inset
22380
22381
22382 \family sans
22383 Program
22384 \family default
22385
22386 \begin_inset space ~
22387 \end_inset
22388
22389 format This is an empty format whose sole purpose is to be the endpoint
22390  of a conversion (which then allows us to set up a converter for it).
22391 \end_layout
22392
22393 \begin_layout Description
22394
22395 \family sans
22396 NoWeb
22397 \family default
22398 ->
22399 \family sans
22400 LaTeX
22401 \family default
22402  This converter performs the 
22403 \begin_inset Quotes eld
22404 \end_inset
22405
22406 weaving
22407 \begin_inset Quotes erd
22408 \end_inset
22409
22410  of the literate document.
22411  For Noweb, it is set to 
22412 \begin_inset Quotes eld
22413 \end_inset
22414
22415
22416 \family typewriter
22417 noweave -delay -index $$i > $$o
22418 \family default
22419
22420 \begin_inset Quotes erd
22421 \end_inset
22422
22423
22424 \end_layout
22425
22426 \begin_layout Description
22427
22428 \family sans
22429 NoWeb
22430 \family default
22431 ->
22432 \family sans
22433 Program
22434 \family default
22435  This performs the 
22436 \begin_inset Quotes eld
22437 \end_inset
22438
22439 tangling step
22440 \begin_inset Quotes erd
22441 \end_inset
22442
22443 .
22444  As stated above, the Converter is set to 
22445 \begin_inset Quotes eld
22446 \end_inset
22447
22448
22449 \family typewriter
22450 build-script $$i
22451 \family default
22452
22453 \begin_inset Quotes erd
22454 \end_inset
22455
22456 , with Flags set to 
22457 \begin_inset Quotes eld
22458 \end_inset
22459
22460
22461 \family typewriter
22462 originaldir,parselog=listerrors
22463 \family default
22464
22465 \begin_inset Quotes erd
22466 \end_inset
22467
22468 .
22469 \end_layout
22470
22471 \begin_layout Subsubsection
22472 Debug extensions
22473 \end_layout
22474
22475 \begin_layout Standard
22476 There is also a new function implemented in the LyX server, the 
22477 \begin_inset Quotes eld
22478 \end_inset
22479
22480 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22481  
22482 \end_layout
22483
22484 \begin_layout Standard
22485 When debugging code with ddd/gdb, it is possible to invoke a text editor
22486  at the current execution position with a single key stroke.
22487  The default ddd configuration for that is shift-ctrl-V.
22488  It happens that you can define the editor command line invocation in ddd
22489  by accessing the 
22490 \family sans
22491 Edit\SpecialChar \menuseparator
22492 Preferences\SpecialChar \menuseparator
22493 Helpers
22494 \family default
22495  dialog and changing the "Edit Sources" entry.
22496 \end_layout
22497
22498 \begin_layout Standard
22499 I take advantage of the new created LyX server function and this ddd feature,
22500  and set 
22501 \begin_inset Quotes eld
22502 \end_inset
22503
22504 Edit Sources
22505 \begin_inset Quotes erd
22506 \end_inset
22507
22508  to:
22509 \end_layout
22510
22511 \begin_layout LyX-Code
22512 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22513 \end_layout
22514
22515 \begin_layout Standard
22516 With this, whenever you are using ddd and find a point in the program that
22517  you want to edit, you just press shift-ctrl-V (in the ddd window), and
22518  ddd you forward this information to LyX through the LyX server and then
22519  the LyX window will show the same file with the cursor at the same position
22520  ddd was pointing to.
22521  No more guessing or long scrolling to locate a point in the program back
22522  from debugging !
22523 \end_layout
22524
22525 \begin_layout Standard
22526 Note however that you must enable the LyX server to get this feature working
22527  (it is disabled by default).
22528  You can enable it in 
22529 \family sans
22530 Preferences
22531 \family default
22532  (tabs 
22533 \family sans
22534 Inputs
22535 \family default
22536
22537 \family sans
22538 Paths
22539 \family default
22540 ) by entering in the 
22541 \family sans
22542 LyXserver pipe
22543 \family default
22544  a path like 
22545 \begin_inset Quotes eld
22546 \end_inset
22547
22548
22549 \family typewriter
22550 /home/<your-home-directory>/.lyx/lyxpipe
22551 \family default
22552
22553 \begin_inset Quotes erd
22554 \end_inset
22555
22556
22557 \end_layout
22558
22559 \begin_layout Standard
22560 Read the LyX server documentation in the 
22561 \emph on
22562 Customization Manual
22563 \emph default
22564  for further information.
22565 \end_layout
22566
22567 \begin_layout Subsubsection
22568 Toolbar extensions
22569 \end_layout
22570
22571 \begin_layout Standard
22572 There are six new buttons that can be added to your LyX toolbar.
22573  Five of these buttons are short cuts to layout styles: 
22574 \family sans
22575 Standard
22576 \family default
22577
22578 \family sans
22579 Section
22580 \family default
22581
22582 \family sans
22583 LaTeX
22584 \family default
22585
22586 \family sans
22587 LyX-Code
22588 \family default
22589 , and 
22590 \family sans
22591 Scrap
22592 \family default
22593 .
22594  The last one is a short cut to the 
22595 \begin_inset Quotes eld
22596 \end_inset
22597
22598 Build Program
22599 \begin_inset Quotes erd
22600 \end_inset
22601
22602  File menu entry.
22603  
22604 \end_layout
22605
22606 \begin_layout Standard
22607 LyX has a range of buttons that are available for tool bar customization.
22608  In my toolbar I like to combine the six short cuts above with two more:
22609  One for 
22610 \family sans
22611 View
22612 \family default
22613 \SpecialChar \menuseparator
22614
22615 \family sans
22616 Update
22617 \family default
22618 \SpecialChar \menuseparator
22619
22620 \family sans
22621 DVI
22622 \family default
22623  and the other for 
22624 \family sans
22625 View\SpecialChar \menuseparator
22626 DVI
22627 \family default
22628  File menu entries.
22629  Here is how it looks like:
22630 \end_layout
22631
22632 \begin_layout LyX-Code
22633 Toolbar
22634 \end_layout
22635
22636 \begin_layout LyX-Code
22637   Layouts
22638 \end_layout
22639
22640 \begin_layout LyX-Code
22641   Icon "layout Standard"
22642 \end_layout
22643
22644 \begin_layout LyX-Code
22645   Icon "layout Section"
22646 \end_layout
22647
22648 \begin_layout LyX-Code
22649   Icon "layout LaTeX"
22650 \end_layout
22651
22652 \begin_layout LyX-Code
22653   Icon "layout LyX-Code"
22654 \end_layout
22655
22656 \begin_layout LyX-Code
22657   Icon "layout Scrap"
22658 \end_layout
22659
22660 \begin_layout LyX-Code
22661   Separator
22662 \end_layout
22663
22664 \begin_layout LyX-Code
22665   Icon "buffer-view"
22666 \end_layout
22667
22668 \begin_layout LyX-Code
22669   Icon "buffer-typeset"
22670 \end_layout
22671
22672 \begin_layout LyX-Code
22673   Icon "build-program"
22674 \end_layout
22675
22676 \begin_layout LyX-Code
22677   Separator
22678 \end_layout
22679
22680 \begin_layout LyX-Code
22681 .
22682 \end_layout
22683
22684 \begin_layout LyX-Code
22685 .
22686 \end_layout
22687
22688 \begin_layout LyX-Code
22689 .
22690 \end_layout
22691
22692 \begin_layout LyX-Code
22693 End
22694 \end_layout
22695
22696 \begin_layout Subsubsection
22697 Colors customization
22698 \end_layout
22699
22700 \begin_layout Standard
22701 There are a number of colors in LyX that can be customized in 
22702 \family sans
22703 Preferences
22704 \family default
22705 .
22706  One of the things that bothers people is the LaTeX font color.
22707  The default color is red, since the scraps uses LaTeX font, and there is
22708  a lot of scraps in literate documents, you may get tired of seeing everything
22709  in red.
22710  You can change it by going to the tabs 
22711 \family sans
22712 Look&Feel
22713 \family default
22714
22715 \family sans
22716 Colors.
22717 \end_layout
22718
22719 \begin_layout Standard
22720 The next thing is the visible presence of the newline character in the screen.
22721  You can choose the color of this particular character and make it blend
22722  in the background.
22723  I recommend you choosing a color that is close to the background but not
22724  equal, that way you still can see it is there, but it is not bothering
22725  you anymore.
22726  
22727 \end_layout
22728
22729 \begin_layout Chapter
22730 Secrets of the LaTeX Masters
22731 \begin_inset CommandInset label
22732 LatexCommand label
22733 name "cha:secrets"
22734
22735 \end_inset
22736
22737
22738 \end_layout
22739
22740 \begin_layout Standard
22741 Though LyX is a powerful tool, it cannot hope to support everything that
22742  can be done with pure TeX/LaTeX.
22743  However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22744  as long as you are not afraid to use that 
22745 \begin_inset Quotes eld
22746 \end_inset
22747
22748 TeX
22749 \begin_inset Quotes erd
22750 \end_inset
22751
22752  button on the toolbar or add things to the LaTeX preamble.
22753  This section lists some tips, tricks, and otherwise cool ideas to give
22754  your document that extra little flair.
22755  
22756 \emph on
22757 Do try this at home
22758 \emph default
22759 , just start with something a little smaller and less important than your
22760  dissertation!
22761 \end_layout
22762
22763 \begin_layout Standard
22764 Most ideas in this section require less common files in your LaTeX installation.
22765  If you have a system like TeXLive, most will already be available.
22766  A few, however, will need to be downloaded from one of the CTAN archives.
22767  Often, there are several ways to do something, or several LaTeX style files
22768  which do the same thing.
22769  We do not endorse one choice over another, we simply claim that we have
22770  done a particular task with a particular file.
22771  Put on your wizard hat, keep an eye out for dragons, and let us begin.
22772 \end_layout
22773
22774 \begin_layout Section
22775 Multiple Columns
22776 \end_layout
22777
22778 \begin_layout Standard
22779 by 
22780 \noun on
22781 Lars Gullik Bjønnes
22782 \end_layout
22783
22784 \begin_layout Subsection
22785 Purpose
22786 \end_layout
22787
22788 \begin_layout Standard
22789 The aim for this chapter
22790 \begin_inset Foot
22791 status collapsed
22792
22793 \begin_layout Plain Layout
22794 Editor's note: Lars' original chapter was a masterful description of how
22795  to use the 
22796 \family typewriter
22797 multicol
22798 \family default
22799  package.
22800  However, it was too long to flow smoothly in this document.
22801  I have therefore chosen to excerpt the most important sections here (sorry,
22802  Lars); you can read the original chapter (and more of the story!) in the
22803  example file 
22804 \family typewriter
22805 examples/multicol.lyx
22806 \family default
22807 .
22808  — mer
22809 \end_layout
22810
22811 \end_inset
22812
22813  is to show how the LaTeX package 
22814 \family typewriter
22815 multicol
22816 \family default
22817  can be used in a LyX document.
22818  As LyX doesn't support the 
22819 \family typewriter
22820 multicol
22821 \family default
22822  package natively yet, we have to use some small hacks.
22823  By reading this section it should be obvious how to do this.
22824 \end_layout
22825
22826 \begin_layout Subsection
22827 Limitations 
22828 \end_layout
22829
22830 \begin_layout Standard
22831 The 
22832 \family typewriter
22833 multicol
22834 \family default
22835  package allows switching between one and multicolumn format on the same
22836  page.
22837  Footnotes are handled correctly (for the most part), but will be placed
22838  at the bottom of the page and not under each column.
22839  LaTeX's float mechanism, however, is partly disabled in the current implementat
22840 ion.
22841  At the moment only page-wide floats can be used within the scope of the
22842  environment.
22843 \end_layout
22844
22845 \begin_layout Subsection
22846 Examples
22847 \end_layout
22848
22849 \begin_layout Subsubsection
22850 Two columns
22851 \end_layout
22852
22853 \begin_layout Standard
22854 If you want to have two columns in your text, you have use LaTeX mode to
22855  insert 
22856 \family typewriter
22857
22858 \backslash
22859 begin{multicols}{2}
22860 \family default
22861  at the point where you want the two column layout to start, and then 
22862 \family typewriter
22863
22864 \backslash
22865 end{multicols}
22866 \family default
22867  where you want it to end.
22868  Like this:
22869 \end_layout
22870
22871 \begin_layout Standard
22872 \begin_inset ERT
22873 status open
22874
22875 \begin_layout Plain Layout
22876
22877
22878 \backslash
22879 begin{multicols}{2}
22880 \end_layout
22881
22882 \end_inset
22883
22884
22885 \end_layout
22886
22887 \begin_layout Standard
22888 \noindent
22889
22890 \series bold
22891 \size small
22892 The Adventure of the Empty House
22893 \series default
22894
22895 \begin_inset Newline newline
22896 \end_inset
22897
22898 by 
22899 \noun on
22900 Sir Arthur Conan Doyle
22901 \end_layout
22902
22903 \begin_layout Standard
22904
22905 \size small
22906 It was in the spring of the year 1894 that all London was interested, and
22907  the fashionable world dismayed, by the murder of the Honourable Ronald
22908  Adair under most unusual and inexplicable circumstances.
22909  The public has already learned those particulars of the crime which came
22910  out in the police investigation, but a good deal was suppressed upon that
22911  occasion, since the case for the prosecution was so overwhelmingly strong
22912  that it was not necessary to bring forward all the facts.
22913  Only now, at the end of nearly ten years, am I allowed to supply those
22914  missing links which make up the whole of that remarkable chain.
22915  The crime was of interest in itself, but that interest was as nothing to
22916  me compared to the inconceivable sequel, which afforded me the greatest
22917  shock and surprise of any event in my adventurous life.
22918  Even now, after this long interval, I find myself thrilling as I think
22919  of it, and feeling once more that sudden flood of joy, amazement, and increduli
22920 ty which utterly submerged my mind.
22921  Let me say to that public, which has shown some interest in those glimpses
22922  which I have occasionally given them of the thoughts and actions of a very
22923  remarkable man, that they are not to blame me if I have not shared my knowledge
22924  with them, for I should have considered it my first duty to do so, had
22925  I not been barred by a positive prohibition from his own lips, which was
22926  only withdrawn upon the third of last month.
22927 \end_layout
22928
22929 \begin_layout Standard
22930 \begin_inset ERT
22931 status open
22932
22933 \begin_layout Plain Layout
22934
22935
22936 \backslash
22937 end{multicols}
22938 \end_layout
22939
22940 \end_inset
22941
22942
22943 \end_layout
22944
22945 \begin_layout Subsubsection
22946 Multiple columns
22947 \end_layout
22948
22949 \begin_layout Standard
22950 The same pattern is used when you want more than two columns:
22951 \end_layout
22952
22953 \begin_layout Standard
22954 \begin_inset ERT
22955 status open
22956
22957 \begin_layout Plain Layout
22958
22959
22960 \backslash
22961 begin{multicols}{3}
22962 \end_layout
22963
22964 \end_inset
22965
22966
22967 \end_layout
22968
22969 \begin_layout Standard
22970
22971 \size footnotesize
22972 It can be imagined that my close intimacy with Sherlock Holmes had interested
22973  me deeply in crime, and that after his disappearance I never failed to
22974  read with care the various problems which came before the public.
22975  And I even attempted, more than once, for my own private satisfaction,
22976  to employ his methods in their solution, though with indifferent success.
22977  There was none, however, which appealed to me like this tragedy of Ronald
22978  Adair.
22979  As I read the evidence at the inquest, which led up to a verdict of willful
22980  murder against some person or persons unknown, I realized more clearly
22981  than I had ever done the loss which the community had sustained by the
22982  death of Sherlock Holmes.
22983  There were points about this strange business which would, I was sure,
22984  have specially appealed to him, and the efforts of the police would have
22985  been supplemented, or more probably anticipated, by the trained observation
22986  and the alert mind of the first criminal agent in Europe.
22987  All day, as I drove upon my round, I turned over the case in my mind and
22988  found no explanation which appeared to me to be adequate.
22989  At the risk of telling a twice-told tale, I will recapitulate the facts
22990  as they were known to the public at the conclusion of the inquest.
22991 \end_layout
22992
22993 \begin_layout Standard
22994 \begin_inset ERT
22995 status open
22996
22997 \begin_layout Plain Layout
22998
22999
23000 \backslash
23001 end{multicols}
23002 \end_layout
23003
23004 \end_inset
23005
23006
23007 \end_layout
23008
23009 \begin_layout Standard
23010 You can have more than 3 columns if you want to, but that might not be very
23011  pleasant for the eye.
23012 \end_layout
23013
23014 \begin_layout Subsubsection
23015 Columns inside columns
23016 \end_layout
23017
23018 \begin_layout Standard
23019 You can even have columns inside columns:
23020 \end_layout
23021
23022 \begin_layout Standard
23023 \begin_inset ERT
23024 status open
23025
23026 \begin_layout Plain Layout
23027
23028
23029 \backslash
23030 begin{multicols}{2}
23031 \end_layout
23032
23033 \end_inset
23034
23035
23036 \end_layout
23037
23038 \begin_layout Standard
23039
23040 \size footnotesize
23041 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
23042  at that time governor of one of the Australian colonies.
23043  Adair's mother had returned from Australia to undergo the operation for
23044  cataract, and she, her son Ronald, and her daughter Hilda were living together
23045  at 427 Park Lane.
23046 \end_layout
23047
23048 \begin_layout Standard
23049 \begin_inset ERT
23050 status open
23051
23052 \begin_layout Plain Layout
23053
23054
23055 \backslash
23056 begin{multicols}{2}
23057 \end_layout
23058
23059 \end_inset
23060
23061
23062 \end_layout
23063
23064 \begin_layout Standard
23065
23066 \size footnotesize
23067 The youth moved in the best society–had, so far as was known, no enemies
23068  and no particular vices.
23069  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
23070  had been broken off by mutual consent some months before, and there was
23071  no sign that it had left any very profound feeling behind it.
23072  For the rest {sic} the man's life moved in a narrow and conventional circle,
23073  for his habits were quiet and his nature unemotional.
23074  Yet it was upon this easy-going young aristocrat that death came, in most
23075  strange and unexpected form, between the hours of ten and eleven-twenty
23076  on the night of March 30, 1894.
23077 \end_layout
23078
23079 \begin_layout Standard
23080 \begin_inset ERT
23081 status open
23082
23083 \begin_layout Plain Layout
23084
23085
23086 \backslash
23087 end{multicols}
23088 \end_layout
23089
23090 \end_inset
23091
23092
23093 \end_layout
23094
23095 \begin_layout Standard
23096
23097 \size footnotesize
23098 Ronald Adair was fond of cards–playing continually, but never for such stakes
23099  as would hurt him.
23100  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
23101  It was shown that, after dinner on the day of his death, he had played
23102  a rubber of whist at the latter club.
23103  He had also played there in the afternoon.
23104
23105 \size default
23106  
23107 \size footnotesize
23108 The evidence of those who had played with him– Mr.
23109  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
23110  and that there was a fairly equal fall of the cards.
23111  Adair might have lost five pounds, but not more.
23112  His fortune was a considerable one, and such a loss could not in any way
23113  affect him.
23114  He had played nearly every day at one club or other, but he was a cautious
23115  player, and usually rose a winner.
23116  It came out in evidence that, in partnership with Colonel Moran, he had
23117  actually won as much as four hundred and twenty pounds in a sitting, some
23118  weeks before, from Godfrey Milner and Lord Balmoral.
23119  So much for his recent history as it came out at the inquest.
23120 \end_layout
23121
23122 \begin_layout Standard
23123 \begin_inset ERT
23124 status open
23125
23126 \begin_layout Plain Layout
23127
23128
23129 \backslash
23130 end{multicols}
23131 \end_layout
23132
23133 \end_inset
23134
23135
23136 \end_layout
23137
23138 \begin_layout Standard
23139 Please do read the file 
23140 \family typewriter
23141 examples/multicol.lyx
23142 \family default
23143  for more advanced examples including column and header spacing, vertical
23144  separator lines, and more.
23145 \end_layout
23146
23147 \begin_layout Section
23148 Numbering in the 
23149 \family sans
23150 Enumerate
23151 \family default
23152  Paragraph Environment
23153 \begin_inset Argument
23154 status collapsed
23155
23156 \begin_layout Plain Layout
23157 Numbering in Enumerate
23158 \end_layout
23159
23160 \end_inset
23161
23162
23163 \end_layout
23164
23165 \begin_layout Standard
23166 by 
23167 \noun on
23168 John Weiss
23169 \end_layout
23170
23171 \begin_layout Standard
23172 \begin_inset VSpace bigskip
23173 \end_inset
23174
23175
23176 \end_layout
23177
23178 \begin_layout Standard
23179 \noindent
23180 The default numbering for the 
23181 \family sans
23182 Enumerate
23183 \family default
23184  paragraph environment begins with Arabic numbers and ends with uppercase
23185  letters.
23186  Suppose, however, you wanted a different type of numbering scheme.
23187  Here's a quickie example of how to change the numbering scheme:
23188 \end_layout
23189
23190 \begin_layout LyX-Code
23191
23192 \backslash
23193 renewcommand{
23194 \backslash
23195 labelenumi}{
23196 \backslash
23197 Roman{enumi}.}
23198 \end_layout
23199
23200 \begin_layout LyX-Code
23201
23202 \backslash
23203 renewcommand{
23204 \backslash
23205 labelenumii}{
23206 \backslash
23207 Alph{enumii}.}
23208 \end_layout
23209
23210 \begin_layout LyX-Code
23211
23212 \backslash
23213 renewcommand{
23214 \backslash
23215 labelenumiii}{
23216 \backslash
23217 arabic{enumiii}.}
23218 \end_layout
23219
23220 \begin_layout LyX-Code
23221
23222 \backslash
23223 renewcommand{
23224 \backslash
23225 labelenumiv}{
23226 \backslash
23227 alph{enumiv}.)}
23228 \end_layout
23229
23230 \begin_layout Standard
23231 \SpecialChar \ldots{}
23232  which changes the numbering scheme to uppercase Roman numerals, uppercase
23233  letters, Arabic numbers, and lowercase letter.
23234 \end_layout
23235
23236 \begin_layout Standard
23237 Additionally, the previous example also adds a little bit extra to the numbering
23238  scheme.
23239  For example, the first level label actually looks like: 
23240 \begin_inset Quotes eld
23241 \end_inset
23242
23243 I.
23244 \begin_inset Quotes erd
23245 \end_inset
23246
23247 .
23248  For ease of reading, we'll describe what the numbering schemes look like
23249  using a notation something like this: <
23250 \begin_inset Quotes eld
23251 \end_inset
23252
23253 I.
23254 \begin_inset Quotes erd
23255 \end_inset
23256
23257 ,
23258 \begin_inset space ~
23259 \end_inset
23260
23261
23262 \begin_inset Quotes erd
23263 \end_inset
23264
23265 A.
23266 \begin_inset Quotes erd
23267 \end_inset
23268
23269 ,
23270 \begin_inset space ~
23271 \end_inset
23272
23273
23274 \begin_inset Quotes erd
23275 \end_inset
23276
23277 1.
23278 \begin_inset Quotes erd
23279 \end_inset
23280
23281 ,
23282 \begin_inset space ~
23283 \end_inset
23284
23285
23286 \begin_inset Quotes eld
23287 \end_inset
23288
23289 a.)
23290 \begin_inset Quotes erd
23291 \end_inset
23292
23293 >.
23294  
23295 \end_layout
23296
23297 \begin_layout Standard
23298 As you can see in the example, there is a label command for each nesting
23299  level, 
23300 \family typewriter
23301
23302 \backslash
23303 labelenumi
23304 \family default
23305  \SpecialChar \ldots{}
23306  
23307 \family typewriter
23308
23309 \backslash
23310 labelenumiv
23311 \family default
23312 , as well as a counter, 
23313 \family typewriter
23314 enumi
23315 \family default
23316  \SpecialChar \ldots{}
23317  
23318 \family typewriter
23319 enumiv
23320 \family default
23321 .
23322  There are also five 
23323 \begin_inset Quotes eld
23324 \end_inset
23325
23326 number printing
23327 \begin_inset Quotes erd
23328 \end_inset
23329
23330  commands, 
23331 \family typewriter
23332
23333 \backslash
23334 arabic{}
23335 \family default
23336
23337 \family typewriter
23338
23339 \backslash
23340 roman{}
23341 \family default
23342
23343 \family typewriter
23344
23345 \backslash
23346 Roman{}
23347 \family default
23348
23349 \family typewriter
23350
23351 \backslash
23352 alph{}
23353 \family default
23354 , and 
23355 \family typewriter
23356
23357 \backslash
23358 Alph{}
23359 \family default
23360 , each of which take one counter as an argument.
23361  You can add characters before or after these, but there's no need to add
23362  spaces.
23363 \end_layout
23364
23365 \begin_layout Standard
23366 You can get really fancy with these.
23367  For example:
23368 \end_layout
23369
23370 \begin_layout LyX-Code
23371
23372 \backslash
23373 renewcommand{
23374 \backslash
23375 labelenumi}{
23376 \backslash
23377 #
23378 \backslash
23379 Alph{enumi}
23380 \backslash
23381 #}
23382 \end_layout
23383
23384 \begin_layout LyX-Code
23385
23386 \backslash
23387 renewcommand{
23388 \backslash
23389 labelenumii}{
23390 \backslash
23391 Alph{enumi}.
23392 \backslash
23393 arabic{enumii}}
23394 \end_layout
23395
23396 \begin_layout LyX-Code
23397
23398 \backslash
23399 renewcommand{
23400 \backslash
23401 labelenumiii}{
23402 \backslash
23403 alph{enumiii}+}
23404 \end_layout
23405
23406 \begin_layout LyX-Code
23407
23408 \backslash
23409 renewcommand{
23410 \backslash
23411 labelenumiv}{(
23412 \backslash
23413 roman{enumiv})}
23414 \end_layout
23415
23416 \begin_layout Standard
23417 produces the somewhat out of hand numbering scheme: <
23418 \begin_inset Quotes eld
23419 \end_inset
23420
23421 #A#
23422 \begin_inset Quotes erd
23423 \end_inset
23424
23425 ,
23426 \begin_inset space ~
23427 \end_inset
23428
23429
23430 \begin_inset Quotes erd
23431 \end_inset
23432
23433 A.1
23434 \begin_inset Quotes erd
23435 \end_inset
23436
23437 ,
23438 \begin_inset space ~
23439 \end_inset
23440
23441
23442 \begin_inset Quotes erd
23443 \end_inset
23444
23445 a+
23446 \begin_inset Quotes erd
23447 \end_inset
23448
23449 ,
23450 \begin_inset space ~
23451 \end_inset
23452
23453
23454 \begin_inset Quotes eld
23455 \end_inset
23456
23457 (i)
23458 \begin_inset Quotes erd
23459 \end_inset
23460
23461 >.
23462  
23463 \end_layout
23464
23465 \begin_layout Section
23466 Dropped Capitals
23467 \end_layout
23468
23469 \begin_layout Standard
23470 by 
23471 \noun on
23472 Mike Ressler
23473 \end_layout
23474
23475 \begin_layout Standard
23476 \begin_inset VSpace bigskip
23477 \end_inset
23478
23479
23480 \end_layout
23481
23482 \begin_layout Standard
23483 \noindent
23484 \begin_inset ERT
23485 status collapsed
23486
23487 \begin_layout Plain Layout
23488
23489
23490 \backslash
23491 newfont{
23492 \backslash
23493 tmpfont}{cmr17 scaled 2500}{
23494 \backslash
23495 tmpfont T}
23496 \backslash
23497 vspace*{-8.4ex}
23498 \end_layout
23499
23500 \end_inset
23501
23502
23503 \end_layout
23504
23505 \begin_layout Standard
23506 \noindent
23507 \begin_inset ERT
23508 status open
23509
23510 \begin_layout Plain Layout
23511
23512
23513 \backslash
23514 hangindent=3.3em 
23515 \backslash
23516 hangafter=-3
23517 \end_layout
23518
23519 \end_inset
23520
23521  hose of you who like the style of old books probably also like 
23522 \begin_inset Quotes eld
23523 \end_inset
23524
23525 dropped capitals
23526 \begin_inset Quotes erd
23527 \end_inset
23528
23529 —those large capital letters which begin each new chapter or section.
23530  Implementing them with plain LyX/LaTeX is straightforward (assuming you
23531  know some plain TeX!) but does require a lot of work and many iterations,
23532  as you can see by all the ugly TeX-mode stuff at the beginning of this
23533  paragraph.
23534 \end_layout
23535
23536 \begin_layout Standard
23537 \begin_inset ERT
23538 status open
23539
23540 \begin_layout Plain Layout
23541
23542
23543 \backslash
23544 verb+
23545 \backslash
23546 bigdrop{-1em}{3}{ptmri}{T}+
23547 \end_layout
23548
23549 \end_inset
23550
23551 here is a much easier way of doing this, of course.
23552  The 
23553 \family typewriter
23554 dropcaps
23555 \family default
23556  (or the newer 
23557 \family typewriter
23558 dropping
23559 \family default
23560 ) package from CTAN allows a simple way to add such letters to your documents.
23561  Since this package is not a standard part of TeXLive, I can't demonstrate
23562  it within this document, but if you copy this paragraph to a new document,
23563  delete the 
23564 \begin_inset Quotes eld
23565 \end_inset
23566
23567
23568 \family typewriter
23569
23570 \backslash
23571 verb
23572 \family default
23573
23574 \begin_inset Quotes erd
23575 \end_inset
23576
23577  and the pluses from the TeX code at the beginning of the paragraph, and
23578  add 
23579 \family typewriter
23580
23581 \backslash
23582 usepackage{dropcaps}
23583 \family default
23584  to your LaTeX preamble, you will get a nice Times Roman Italic 
23585 \begin_inset Quotes eld
23586 \end_inset
23587
23588 T
23589 \begin_inset Quotes erd
23590 \end_inset
23591
23592 , whose height is three lines of text and which protrudes 1 em into the
23593  margin.
23594  (Make certain you have copied 
23595 \begin_inset Quotes eld
23596 \end_inset
23597
23598
23599 \family typewriter
23600 dropcaps.sty
23601 \family default
23602
23603 \begin_inset Quotes erd
23604 \end_inset
23605
23606  into a directory where TeX can see it.) The first argument is the amount
23607  of indentation; in this case the negative sign moves it into the margin.
23608  The second argument is the height of the letter in number of lines of text.
23609  The third argument is the font name: virtually anything which has a tfm
23610  file should work (wade through the 
23611 \family typewriter
23612 .../texmf/fonts/tfm
23613 \family default
23614  directory for possibilities).
23615  My personal favorite is 
23616 \begin_inset Quotes eld
23617 \end_inset
23618
23619
23620 \family typewriter
23621 yinit
23622 \family default
23623
23624 \begin_inset Quotes erd
23625 \end_inset
23626
23627 , a fancy German font specifically designed for dropped capitals.
23628  The fourth argument is the letter (or letters) to be dropped.
23629  The 
23630 \family typewriter
23631 dropping
23632 \family default
23633  package also offers the 
23634 \family typewriter
23635
23636 \backslash
23637 bigdrop
23638 \family default
23639  command, as well as a slightly simplified 
23640 \family typewriter
23641
23642 \backslash
23643 dropping
23644 \family default
23645  command.
23646 \end_layout
23647
23648 \begin_layout Section
23649 Non-standard Paragraph Shapes
23650 \end_layout
23651
23652 \begin_layout Standard
23653 by 
23654 \noun on
23655 Mike Ressler
23656 \end_layout
23657
23658 \begin_layout Standard
23659 \begin_inset VSpace bigskip
23660 \end_inset
23661
23662
23663 \end_layout
23664
23665 \begin_layout Standard
23666 \begin_inset ERT
23667 status collapsed
23668
23669 \begin_layout Plain Layout
23670
23671
23672 \backslash
23673 begin{sloppypar}
23674 \end_layout
23675
23676 \end_inset
23677
23678
23679 \end_layout
23680
23681 \begin_layout Standard
23682 \begin_inset ERT
23683 status collapsed
23684
23685 \begin_layout Plain Layout
23686
23687
23688 \backslash
23689 newdimen
23690 \backslash
23691 varunit 
23692 \end_layout
23693
23694 \begin_layout Plain Layout
23695
23696
23697 \backslash
23698 setlength{
23699 \backslash
23700 varunit}{4.5in}
23701 \end_layout
23702
23703 \end_inset
23704
23705
23706 \end_layout
23707
23708 \begin_layout Standard
23709 \noindent
23710 \begin_inset ERT
23711 status collapsed
23712
23713 \begin_layout Plain Layout
23714
23715
23716 \backslash
23717 parshape 19 0.45
23718 \backslash
23719 varunit 0.332
23720 \backslash
23721 varunit
23722 \end_layout
23723
23724 \begin_layout Plain Layout
23725
23726 0.40
23727 \backslash
23728 varunit 0.300
23729 \backslash
23730 varunit
23731 \end_layout
23732
23733 \begin_layout Plain Layout
23734
23735 0.35
23736 \backslash
23737 varunit 0.293
23738 \backslash
23739 varunit
23740 \end_layout
23741
23742 \begin_layout Plain Layout
23743
23744 0.30
23745 \backslash
23746 varunit 0.300
23747 \backslash
23748 varunit
23749 \end_layout
23750
23751 \begin_layout Plain Layout
23752
23753 0.25
23754 \backslash
23755 varunit 0.317
23756 \backslash
23757 varunit
23758 \end_layout
23759
23760 \begin_layout Plain Layout
23761
23762 0.20
23763 \backslash
23764 varunit 0.342
23765 \backslash
23766 varunit
23767 \end_layout
23768
23769 \begin_layout Plain Layout
23770
23771 0.15
23772 \backslash
23773 varunit 0.373
23774 \backslash
23775 varunit
23776 \end_layout
23777
23778 \begin_layout Plain Layout
23779
23780 0.10
23781 \backslash
23782 varunit 0.410
23783 \backslash
23784 varunit
23785 \end_layout
23786
23787 \begin_layout Plain Layout
23788
23789 0.05
23790 \backslash
23791 varunit 0.453
23792 \backslash
23793 varunit
23794 \end_layout
23795
23796 \begin_layout Plain Layout
23797
23798 0.00
23799 \backslash
23800 varunit 0.500
23801 \backslash
23802 varunit
23803 \end_layout
23804
23805 \begin_layout Plain Layout
23806
23807 0.05
23808 \backslash
23809 varunit 0.453
23810 \backslash
23811 varunit
23812 \end_layout
23813
23814 \begin_layout Plain Layout
23815
23816 0.10
23817 \backslash
23818 varunit 0.410
23819 \backslash
23820 varunit
23821 \end_layout
23822
23823 \begin_layout Plain Layout
23824
23825 0.15
23826 \backslash
23827 varunit 0.373
23828 \backslash
23829 varunit
23830 \end_layout
23831
23832 \begin_layout Plain Layout
23833
23834 0.20
23835 \backslash
23836 varunit 0.342
23837 \backslash
23838 varunit
23839 \end_layout
23840
23841 \begin_layout Plain Layout
23842
23843 0.25
23844 \backslash
23845 varunit 0.317
23846 \backslash
23847 varunit
23848 \end_layout
23849
23850 \begin_layout Plain Layout
23851
23852 0.30
23853 \backslash
23854 varunit 0.300
23855 \backslash
23856 varunit
23857 \end_layout
23858
23859 \begin_layout Plain Layout
23860
23861 0.35
23862 \backslash
23863 varunit 0.293
23864 \backslash
23865 varunit
23866 \end_layout
23867
23868 \begin_layout Plain Layout
23869
23870 0.40
23871 \backslash
23872 varunit 0.300
23873 \backslash
23874 varunit
23875 \end_layout
23876
23877 \begin_layout Plain Layout
23878
23879 0.45
23880 \backslash
23881 varunit 0.332
23882 \backslash
23883 varunit
23884 \end_layout
23885
23886 \begin_layout Plain Layout
23887
23888 \end_layout
23889
23890 \end_inset
23891
23892 There are times when the tyranny of rectangular paragraphs must be overthrown.
23893  In such situations, a call to the delightful plain TeX command 
23894 \family typewriter
23895
23896 \backslash
23897 parshape
23898 \family default
23899  is called for.
23900  As you can see, completely arbitrary shapes can be laid out with a suitable
23901  set of linelength definitions.
23902  While this parshape may look a bit silly and useless, one could conceive
23903  of situations such as finely tuned dropped capitals, word wrapping around
23904  non-rectangular graphics, etc.
23905  which will benefit from such handcrafting.
23906 \end_layout
23907
23908 \begin_layout Standard
23909 \begin_inset VSpace bigskip
23910 \end_inset
23911
23912
23913 \end_layout
23914
23915 \begin_layout Standard
23916 The syntax is 
23917 \family typewriter
23918
23919 \backslash
23920 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23921  #nindent #nlength
23922 \family default
23923 , where 
23924 \family typewriter
23925 numlines
23926 \family default
23927  is the number of lines of text which define the paragraph.
23928  If there turn out to be fewer lines, the shape is truncated; if there are
23929  more, the excess lines have the same dimensions as the last line of the
23930  definition.
23931  The 
23932 \family typewriter
23933 #nindent
23934 \family default
23935  and 
23936 \family typewriter
23937 #nlength
23938 \family default
23939  entries specify the indentation of the line from the left margin, and the
23940  length of the line as measured from that point.
23941  The shape applies only to the current paragraph; everything is reset to
23942  normal for the next paragraph.
23943 \end_layout
23944
23945 \begin_layout Standard
23946 \begin_inset ERT
23947 status collapsed
23948
23949 \begin_layout Plain Layout
23950
23951
23952 \backslash
23953 end{sloppypar}
23954 \end_layout
23955
23956 \end_inset
23957
23958
23959 \end_layout
23960
23961 \begin_layout Section
23962 Summary
23963 \end_layout
23964
23965 \begin_layout Standard
23966 As you can see, the examples in this section range from the useful to the
23967  whimsical.
23968  While I don't expect that anyone will ever need the paragraph shape demonstrate
23969 d in the last section, the important point is that you can do almost anything
23970  you want in LyX if you are willing to figure out how to do it in TeX and
23971  LaTeX.
23972  TeX is a fantastically powerful typesetting system and all that power is
23973  available to you since LyX uses it as its backend.
23974  Happy LyXing!
23975 \end_layout
23976
23977 \end_body
23978 \end_document