]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
Fix InPreamble. I must have committed an incomplete patch.
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
2 \lyxformat 390
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 \cite_engine basic
111 \use_bibtopic false
112 \use_indices false
113 \paperorientation portrait
114 \suppress_date false
115 \index Index
116 \shortcut idx
117 \color #008000
118 \end_index
119 \secnumdepth 3
120 \tocdepth 3
121 \paragraph_separation indent
122 \paragraph_indentation default
123 \quotes_language english
124 \papercolumns 1
125 \papersides 2
126 \paperpagestyle headings
127 \tracking_changes true
128 \output_changes false
129 \html_math_output 0
130 \html_be_strict true
131 \author 1 "ab" 
132 \author 2 "bbb" 
133 \end_header
134
135 \begin_body
136
137 \begin_layout Title
138 Additional LyX Features
139 \end_layout
140
141 \begin_layout Author
142 by the LyX Team
143 \begin_inset Foot
144 status collapsed
145
146 \begin_layout Plain Layout
147 \noindent
148 Principal maintainer of this file is
149 \noun on
150  Richard Heck
151 \noun default
152 .
153  If you have comments or error corrections, please send them to the LyX
154  Documentation mailing list, 
155 \begin_inset Flex CharStyle:Code
156 status collapsed
157
158 \begin_layout Plain Layout
159 \noindent
160 <lyx-docs@lists.lyx.org>
161 \end_layout
162
163 \end_inset
164
165 .
166 \end_layout
167
168 \end_inset
169
170  
171 \end_layout
172
173 \begin_layout Standard
174 \begin_inset CommandInset toc
175 LatexCommand tableofcontents
176
177 \end_inset
178
179
180 \end_layout
181
182 \begin_layout Chapter
183 Introduction
184 \end_layout
185
186 \begin_layout Standard
187 This manual is essentially Part II of the 
188 \emph on
189 User's Guide\SpecialChar \@.
190
191 \emph default
192  The reason for separating this document out is simple: the 
193 \emph on
194 User's Guide
195 \emph default
196  is already quite lengthy, and it contains information on all of the basic
197  features one needs to know in order to prepare most documents.
198  However, the LyX Team has worked to make LyX extensible through various
199  configuration files and external packages.
200  That means that if you want to support the Fizzwizzle LaTeX package, you
201  can create a layout file (or module) for it without having to alter LyX
202  itself.
203  We've already had contributions of several new features this way, and some
204  of them are documented here.
205  There are also some more `advanced' features, such as how to control the
206  presentation of bibliographies and how to work with multi-part documents,
207  that are not covered in the 
208 \emph on
209 User's Guide
210 \emph default
211  and are discussed here.
212 \end_layout
213
214 \begin_layout Standard
215 This manual also documents some special features, like fax support, version
216  control, and SGML support, which require additional software to work properly.
217  There is also a chapter on LyX's support for HTML.
218  And lastly, there's a chapter of LaTeX tools and tips, things you can use
219  to spruce up your documents by directly using the powerful features of
220  LaTeX.
221  After all, LyX 
222 \emph on
223 is
224 \emph default
225  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
226 \end_layout
227
228 \begin_layout Standard
229 If you haven't read the 
230 \emph on
231 Introduction
232 \emph default
233  yet, you are definitely in the wrong manual.
234  The 
235 \emph on
236 Introduction
237 \emph default
238  is the first place to go, since it describes the notation and format of
239  all of the manuals.
240  You should also be thoroughly familiar with the 
241 \emph on
242 User's Guide
243 \emph default
244  and all of the basic features of LyX before attempting to read this one.
245 \end_layout
246
247 \begin_layout Standard
248 Since many of the topics in this manual depend heavily on LyX's interaction
249  with LaTeX, this first chapter covers the inner workings of LyX and how
250  to direct LyX to generate exactly the LaTeX code you want.
251  It is obviously for more seasoned LyX users.
252 \end_layout
253
254 \begin_layout Chapter
255 LyX and LaTeX
256 \end_layout
257
258 \begin_layout Section
259 How LyX Uses LaTeX
260 \end_layout
261
262 \begin_layout Standard
263 This chapter is for both TeX-nicians and the LaTeX-curious.
264  In it, we'll explain how LyX and LaTeX work together to produce printable
265  output.
266  This is the only place in any of the manuals where we assume you know something
267  about LaTeX.
268 \end_layout
269
270 \begin_layout Standard
271 At one time, LyX was called a 
272 \begin_inset Quotes eld
273 \end_inset
274
275 WYSIWYM frontend to LaTeX,
276 \begin_inset Quotes erd
277 \end_inset
278
279  but that's no longer true.
280  There are frontends to LaTeX out there.
281 \begin_inset Foot
282 status collapsed
283
284 \begin_layout Plain Layout
285 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
286  There are also the LaTeX modes for vi and emacs, of course.
287 \end_layout
288
289 \end_inset
290
291  These are basically text editors with the ability to run LaTeX and mark
292  any errors in the file you're editing.
293  Although LyX 
294 \emph on
295 is
296 \emph default
297  an editor, and it 
298 \emph on
299 does
300 \emph default
301  run LaTeX, and it also indicates errors in the file, it also does much,
302  much more.
303  For one thing, you don't need to know LaTeX to use LyX effectively.
304  And LyX has added its own extensions to LaTeX.
305  Try the following sometime: select 
306 \begin_inset Flex CharStyle:MenuItem
307 status collapsed
308
309 \begin_layout Plain Layout
310 Export\SpecialChar \menuseparator
311 LaTeX
312 \end_layout
313
314 \end_inset
315
316  from the 
317 \begin_inset Flex CharStyle:MenuItem
318 status collapsed
319
320 \begin_layout Plain Layout
321 File
322 \end_layout
323
324 \end_inset
325
326  menu (or 
327 \begin_inset Flex CharStyle:MenuItem
328 status collapsed
329
330 \begin_layout Plain Layout
331 View\SpecialChar \menuseparator
332 Source
333 \end_layout
334
335 \end_inset
336
337 ), then look at the preamble of the resulting 
338 \begin_inset Flex CharStyle:Code
339 status collapsed
340
341 \begin_layout Plain Layout
342 .tex
343 \end_layout
344
345 \end_inset
346
347  file.
348  You'll notice a variety of new macros defined specifically by LyX.
349  These macros are defined automatically, according to the features you use
350  in the document.
351 \end_layout
352
353 \begin_layout Standard
354 There are several commands that automatically invoke LaTeX.
355  They are:
356 \end_layout
357
358 \begin_layout Itemize
359 \begin_inset Flex CharStyle:MenuItem
360 status collapsed
361
362 \begin_layout Plain Layout
363 View\SpecialChar \menuseparator
364 Format
365 \end_layout
366
367 \end_inset
368
369
370 \end_layout
371
372 \begin_layout Itemize
373 \begin_inset Flex CharStyle:MenuItem
374 status collapsed
375
376 \begin_layout Plain Layout
377 View\SpecialChar \menuseparator
378 Update\SpecialChar \menuseparator
379 Format
380 \end_layout
381
382 \end_inset
383
384
385 \end_layout
386
387 \begin_layout Itemize
388 \begin_inset Flex CharStyle:MenuItem
389 status collapsed
390
391 \begin_layout Plain Layout
392 File\SpecialChar \menuseparator
393 Print
394 \end_layout
395
396 \end_inset
397
398
399 \end_layout
400
401 \begin_layout Itemize
402 \begin_inset Flex CharStyle:MenuItem
403 status collapsed
404
405 \begin_layout Plain Layout
406 File\SpecialChar \menuseparator
407 Fax
408 \end_layout
409
410 \end_inset
411
412
413 \end_layout
414
415 \begin_layout Standard
416 They will only invoke LaTeX if the file has changed since the last time
417  LaTeX was run.
418  
419 \end_layout
420
421 \begin_layout Standard
422 When LyX runs LaTeX on the file you're editing, it performs these steps:
423 \end_layout
424
425 \begin_layout Enumerate
426 Convert the document to LaTeX and save to a file with the extension 
427 \begin_inset Flex CharStyle:Code
428 status collapsed
429
430 \begin_layout Plain Layout
431 .tex
432 \end_layout
433
434 \end_inset
435
436  in place of 
437 \begin_inset Flex CharStyle:Code
438 status collapsed
439
440 \begin_layout Plain Layout
441 .lyx
442 \end_layout
443
444 \end_inset
445
446 .
447 \end_layout
448
449 \begin_layout Enumerate
450 Run LaTeX on the 
451 \begin_inset Flex CharStyle:Code
452 status collapsed
453
454 \begin_layout Plain Layout
455 .tex
456 \end_layout
457
458 \end_inset
459
460  file (maybe several times), and run any other commands (such as 
461 \begin_inset Flex CharStyle:Code
462 status collapsed
463
464 \begin_layout Plain Layout
465 bibtex
466 \end_layout
467
468 \end_inset
469
470  or 
471 \begin_inset Flex CharStyle:Code
472 status collapsed
473
474 \begin_layout Plain Layout
475 makeindex
476 \end_layout
477
478 \end_inset
479
480 ) needed to compile the LaTeX file.
481 \end_layout
482
483 \begin_layout Enumerate
484 If there are any errors, show the error log.
485 \end_layout
486
487 \begin_layout Standard
488 If you've run LaTeX using 
489 \begin_inset Flex CharStyle:MenuItem
490 status collapsed
491
492 \begin_layout Plain Layout
493 View
494 \bar under
495 \SpecialChar \menuseparator
496
497 \bar default
498 DVI
499 \end_layout
500
501 \end_inset
502
503 , LyX then runs a DVI viewer to display the DVI-file.
504  If you've used 
505 \begin_inset Flex CharStyle:MenuItem
506 status collapsed
507
508 \begin_layout Plain Layout
509 View
510 \bar under
511 \SpecialChar \menuseparator
512
513 \bar default
514 PostScript
515 \end_layout
516
517 \end_inset
518
519 , LyX performs further steps:
520 \end_layout
521
522 \begin_layout Itemize
523 Run 
524 \begin_inset Flex CharStyle:Code
525 status collapsed
526
527 \begin_layout Plain Layout
528 dvips
529 \end_layout
530
531 \end_inset
532
533  to convert the DVI file to PostScript.
534 \end_layout
535
536 \begin_layout Itemize
537 Run a PostScript viewer, such as 
538 \begin_inset Flex CharStyle:Code
539 status collapsed
540
541 \begin_layout Plain Layout
542 ghostview
543 \end_layout
544
545 \end_inset
546
547 , to display the PostScript file.
548 \end_layout
549
550 \begin_layout Standard
551 LyX does similar things when viewing, or exporting, other formats.
552 \end_layout
553
554 \begin_layout Section
555 Translating LaTeX files into LyX
556 \end_layout
557
558 \begin_layout Standard
559 You can import a LaTeX file into LyX by using the 
560 \begin_inset Flex CharStyle:MenuItem
561 status collapsed
562
563 \begin_layout Plain Layout
564 File\SpecialChar \menuseparator
565 Import\SpecialChar \menuseparator
566 LaTeX
567 \end_layout
568
569 \end_inset
570
571  command in LyX.
572  This will call a program named 
573 \begin_inset Flex CharStyle:Code
574 status collapsed
575
576 \begin_layout Plain Layout
577 tex2lyx
578 \end_layout
579
580 \end_inset
581
582  which will create a file 
583 \begin_inset Flex CharStyle:Code
584 status collapsed
585
586 \begin_layout Plain Layout
587 foo.lyx
588 \end_layout
589
590 \end_inset
591
592  from the file 
593 \begin_inset Flex CharStyle:Code
594 status collapsed
595
596 \begin_layout Plain Layout
597 foo.tex
598 \end_layout
599
600 \end_inset
601
602 .
603  LyX will then open that file.
604 \begin_inset Foot
605 status collapsed
606
607 \begin_layout Plain Layout
608 \begin_inset Flex CharStyle:Code
609 status collapsed
610
611 \begin_layout Plain Layout
612 tex2lyx
613 \end_layout
614
615 \end_inset
616
617  can also be run from the command line, of course.
618 \end_layout
619
620 \end_inset
621
622
623 \end_layout
624
625 \begin_layout Standard
626 \begin_inset Flex CharStyle:Code
627 status collapsed
628
629 \begin_layout Plain Layout
630 tex2lyx
631 \end_layout
632
633 \end_inset
634
635  will translate most legal LaTeX, but not everything.
636  It will put things it doesn't understand into TeX code, so after translating
637  a file with 
638 \begin_inset Flex CharStyle:Code
639 status collapsed
640
641 \begin_layout Plain Layout
642 tex2lyx
643 \end_layout
644
645 \end_inset
646
647 , you can look for TeX code and hand-edit it until it looks right.
648 \end_layout
649
650 \begin_layout Standard
651 If you don't know what TeX code is, read the next section.
652 \end_layout
653
654 \begin_layout Section
655 \begin_inset CommandInset label
656 LatexCommand label
657 name "sec:Inserting-TeX-Code"
658
659 \end_inset
660
661 Inserting TeX Code into LyX Documents 
662 \end_layout
663
664 \begin_layout Standard
665 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
666  You can always insert TeX code into any LyX document.
667  LyX cannot, and will never be able to, display every possible LaTeX construct.
668  If ever you need to insert LaTeX commands into your LyX document, you can
669  use the 
670 \begin_inset Flex CharStyle:Code
671 status collapsed
672
673 \begin_layout Plain Layout
674 TeX Code
675 \end_layout
676
677 \end_inset
678
679  box, which you can insert into your document with 
680 \begin_inset Flex CharStyle:MenuItem
681 status collapsed
682
683 \begin_layout Plain Layout
684 Insert\SpecialChar \menuseparator
685 TeX Code
686 \end_layout
687
688 \end_inset
689
690 .
691 \end_layout
692
693 \begin_layout Standard
694 Here's an example of inserting LaTeX commands in a LyX document.
695  The code looks like this:
696 \end_layout
697
698 \begin_layout LyX-Code
699
700 \backslash
701 begin{tabular}{ll}
702 \begin_inset Newline newline
703 \end_inset
704
705
706 \backslash
707 begin{minipage}{5cm}
708 \begin_inset Newline newline
709 \end_inset
710
711 This is an example for a minipage environment.
712  You 
713 \begin_inset Newline newline
714 \end_inset
715
716 can put nearly everything in it, even (non-floating) 
717 \begin_inset Newline newline
718 \end_inset
719
720 figures and tables.
721  
722 \begin_inset Newline newline
723 \end_inset
724
725
726 \backslash
727 end{minipage}
728 \begin_inset Newline newline
729 \end_inset
730
731 &
732 \begin_inset Newline newline
733 \end_inset
734
735
736 \backslash
737 begin{minipage}{5cm}
738 \begin_inset Newline newline
739 \end_inset
740
741
742 \backslash
743 begin{verbatim}
744 \begin_inset Newline newline
745 \end_inset
746
747
748 \backslash
749 begin{minipage}{5cm}
750 \begin_inset Newline newline
751 \end_inset
752
753 This ...
754  
755 \begin_inset Newline newline
756 \end_inset
757
758
759 \backslash
760 end{minipage}
761 \begin_inset Newline newline
762 \end_inset
763
764
765 \backslash
766 end{verbatim}
767 \begin_inset Newline newline
768 \end_inset
769
770
771 \backslash
772 end{minipage}
773 \begin_inset Newline newline
774 \end_inset
775
776
777 \backslash
778 end{tabular}
779 \end_layout
780
781 \begin_layout LyX-Code
782
783 \end_layout
784
785 \begin_layout Standard
786 The 
787 \begin_inset Flex CharStyle:Code
788 status collapsed
789
790 \begin_layout Plain Layout
791 TeX Code
792 \end_layout
793
794 \end_inset
795
796  box containing this text is directly after this paragraph.
797  Those of you reading the manual in LyX will only see the TeX code inset.
798  Those reading a printed version of the manuals will see the actual results:
799 \end_layout
800
801 \begin_layout Standard
802 \begin_inset ERT
803 status collapsed
804
805 \begin_layout Plain Layout
806
807
808 \backslash
809 begin{tabular}{ll}
810 \end_layout
811
812 \begin_layout Plain Layout
813
814
815 \backslash
816 begin{minipage}{5cm}
817 \end_layout
818
819 \begin_layout Plain Layout
820
821 This is an example for a minipage environment.
822  You can put nearly everything in it, even (non-floating) figures and tables.
823  
824 \end_layout
825
826 \begin_layout Plain Layout
827
828
829 \backslash
830 end{minipage}
831 \end_layout
832
833 \begin_layout Plain Layout
834
835 &
836 \end_layout
837
838 \begin_layout Plain Layout
839
840
841 \backslash
842 begin{minipage}{5cm}
843 \end_layout
844
845 \begin_layout Plain Layout
846
847
848 \backslash
849 begin{verbatim}
850 \end_layout
851
852 \begin_layout Plain Layout
853
854
855 \backslash
856 begin{minipage}{5cm}
857 \end_layout
858
859 \begin_layout Plain Layout
860
861 This ...
862  
863 \end_layout
864
865 \begin_layout Plain Layout
866
867
868 \backslash
869 end{minipage}
870 \end_layout
871
872 \begin_layout Plain Layout
873
874
875 \backslash
876 end{verbatim}
877 \end_layout
878
879 \begin_layout Plain Layout
880
881
882 \backslash
883 end{minipage}
884 \end_layout
885
886 \begin_layout Plain Layout
887
888
889 \backslash
890 end{tabular}
891 \end_layout
892
893 \end_inset
894
895
896 \end_layout
897
898 \begin_layout Standard
899 In addition to using TeX code, you can also create a separate file containing
900  some complex LaTeX structure and then use 
901 \begin_inset Flex CharStyle:MenuItem
902 status collapsed
903
904 \begin_layout Plain Layout
905 Insert\SpecialChar \menuseparator
906 Child
907 \begin_inset space ~
908 \end_inset
909
910 Document
911 \end_layout
912
913 \end_inset
914
915  to include your file (you should select the type 
916 \begin_inset Flex CharStyle:Code
917 status collapsed
918
919 \begin_layout Plain Layout
920 Input
921 \end_layout
922
923 \end_inset
924
925 ).
926  We recommend that you only do this if you have a 
927 \begin_inset Flex CharStyle:Code
928 status collapsed
929
930 \begin_layout Plain Layout
931 .tex
932 \end_layout
933
934 \end_inset
935
936  file which you 
937 \emph on
938 know
939 \emph default
940  works already.
941  Otherwise, you'll have a big job tracking down LaTeX errors.
942 \end_layout
943
944 \begin_layout Standard
945 There are a few last points to emphasize:
946 \end_layout
947
948 \begin_layout Itemize
949 LyX 
950 \emph on
951 does not
952 \emph default
953  check if your LaTeX code is correct.
954 \end_layout
955
956 \begin_layout Itemize
957 Beware reinventing the wheel.
958 \end_layout
959
960 \begin_layout Standard
961 On that last point, LyX does have quite a few features tucked into it, and
962  more are coming.
963  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
964  feature before you decide you have to do it by hand.
965  Moreover, there are numerous LaTeX packages out there to do all sorts of
966  things, from labels to envelopes to fancy multipage tables.
967  Check out 
968 \begin_inset CommandInset href
969 LatexCommand href
970 name "CTAN"
971 target "http://www.ctan.org/"
972
973 \end_inset
974
975  for details, and see chapter 
976 \begin_inset CommandInset ref
977 LatexCommand ref
978 reference "cha:secrets"
979
980 \end_inset
981
982 .
983 \end_layout
984
985 \begin_layout Standard
986 If you do need to do some wild and fancy things within your document, be
987  sure to check out a good LaTeX book for assistance.
988  There are a number of them listed in the bibliography of the 
989 \emph on
990 User's Guide
991 \emph default
992 .
993 \end_layout
994
995 \begin_layout Section
996 LyX and the LaTeX Preamble
997 \end_layout
998
999 \begin_layout Subsection
1000 About the LaTeX Preamble
1001 \end_layout
1002
1003 \begin_layout Standard
1004 If you already know LaTeX, there is no need to explain here what the preamble
1005  is good for.
1006  If you don't, the following will give you some ideas—we recommend again
1007  that you consult a LaTeX book for further information.
1008  In any case, you should read the points below, because they explain what
1009  you can do and what you don't need to do in the LaTeX preamble of a LyX
1010  document.
1011 \end_layout
1012
1013 \begin_layout Standard
1014 The LaTeX preamble comes at the very beginning of a document, 
1015 \emph on
1016 before
1017 \emph default
1018  the text.
1019  It serves to:
1020 \end_layout
1021
1022 \begin_layout Itemize
1023 Declare the document class.
1024  
1025 \begin_inset Newline newline
1026 \end_inset
1027
1028 LyX already does this for you.
1029  If you're a seasoned LaTeX-nician, and you have a custom document class
1030  you want to use, check out the 
1031 \emph on
1032 Customization Manual
1033 \emph default
1034  for information on how to make LyX interface to it.
1035 \end_layout
1036
1037 \begin_layout Itemize
1038 Declare the usage of packages.
1039  
1040 \begin_inset Newline newline
1041 \end_inset
1042
1043 LaTeX packages provide special commands, which are only available within
1044  a document when the package has been declared in the preamble.
1045  For example, the package 
1046 \begin_inset Flex CharStyle:Code
1047 status collapsed
1048
1049 \begin_layout Plain Layout
1050 indentfirst
1051 \end_layout
1052
1053 \end_inset
1054
1055  forces all paragraphs to be indented.
1056  There are other packages for labels, envelopes, margins, etc.
1057  
1058 \end_layout
1059
1060 \begin_layout Itemize
1061 Set counters, variables, lengths and widths.
1062  
1063 \begin_inset Newline newline
1064 \end_inset
1065
1066 There are several LaTeX counters and variables which 
1067 \emph on
1068 must
1069 \emph default
1070  be set globally from within the preamble in order to have the desired effect.
1071  (There are variables which you can set and reset inside the document, too.)
1072  Margins are a good example of something which must be set in the preamble.
1073  Another example is the label format for lists.
1074  You can actually set these just about anywhere, but it's best to do it
1075  just once, inside the preamble.
1076 \end_layout
1077
1078 \begin_layout Itemize
1079 Declare user defined commands (with 
1080 \begin_inset Flex CharStyle:Code
1081 status collapsed
1082
1083 \begin_layout Plain Layout
1084
1085 \backslash
1086 newcommand
1087 \end_layout
1088
1089 \end_inset
1090
1091  or 
1092 \begin_inset Flex CharStyle:Code
1093 status collapsed
1094
1095 \begin_layout Plain Layout
1096
1097 \backslash
1098 renewcommand
1099 \end_layout
1100
1101 \end_inset
1102
1103 ).
1104 \begin_inset Newline newline
1105 \end_inset
1106
1107 These are abbreviations for LaTeX commands which appear very often inside
1108  a document.
1109  Although the preamble is a good place to declare such commands, they 
1110 \emph on
1111 can
1112 \emph default
1113  be declared anywhere (before they are used for the first time, of course).
1114  This can be useful if there is a lot of raw LaTeX code in your document,
1115  which normally should not be the case.
1116 \end_layout
1117
1118 \begin_layout Standard
1119 LyX adds its own set of definitions to the preamble of the 
1120 \begin_inset Flex CharStyle:Code
1121 status collapsed
1122
1123 \begin_layout Plain Layout
1124 .tex
1125 \end_layout
1126
1127 \end_inset
1128
1129  file it produces.
1130  This makes LaTeX files generated by LyX portable.
1131 \end_layout
1132
1133 \begin_layout Subsection
1134 Changing the Preamble
1135 \end_layout
1136
1137 \begin_layout Standard
1138 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1139  can't change them without patching LyX itself.
1140  You can, however, add your own stuff to the preamble by selecting 
1141 \begin_inset Flex CharStyle:MenuItem
1142 status collapsed
1143
1144 \begin_layout Plain Layout
1145 LaTeX
1146 \begin_inset space ~
1147 \end_inset
1148
1149 Preamble
1150 \end_layout
1151
1152 \end_inset
1153
1154  in the 
1155 \begin_inset Flex CharStyle:MenuItem
1156 status collapsed
1157
1158 \begin_layout Plain Layout
1159 Document\SpecialChar \menuseparator
1160 Settings
1161 \end_layout
1162
1163 \end_inset
1164
1165  dialog.
1166  LyX adds anything in the 
1167 \begin_inset Flex CharStyle:MenuItem
1168 status collapsed
1169
1170 \begin_layout Plain Layout
1171 Preamble
1172 \end_layout
1173
1174 \end_inset
1175
1176  dialog to its own built-in preamble.
1177  Before adding your own declarations in the preamble, you should make sure
1178  that LyX doesn't already support what you want to do.
1179  (Remember what we said about reinventing the wheel?) Also, 
1180 \emph on
1181 make sure your preamble code is correct
1182 \emph default
1183 .
1184  LyX doesn't check it for you.
1185  If there is an error, you're likely to get an error like 
1186 \begin_inset Quotes eld
1187 \end_inset
1188
1189
1190 \begin_inset Flex CharStyle:Code
1191 status collapsed
1192
1193 \begin_layout Plain Layout
1194 Missing 
1195 \backslash
1196 begin{document}
1197 \end_layout
1198
1199 \end_inset
1200
1201
1202 \begin_inset Quotes erd
1203 \end_inset
1204
1205 .
1206  If you see this error, check your preamble.
1207 \end_layout
1208
1209 \begin_layout Subsection
1210 Examples
1211 \end_layout
1212
1213 \begin_layout Standard
1214 Here are some examples of what you can add to a preamble, and what they
1215  do.
1216 \end_layout
1217
1218 \begin_layout Subsubsection
1219 Example #1: Offsets
1220 \end_layout
1221
1222 \begin_layout Standard
1223 There are two variables under LaTeX that control page position: 
1224 \begin_inset Flex CharStyle:Code
1225 status collapsed
1226
1227 \begin_layout Plain Layout
1228
1229 \backslash
1230 hoffset
1231 \end_layout
1232
1233 \end_inset
1234
1235  and 
1236 \begin_inset Flex CharStyle:Code
1237 status collapsed
1238
1239 \begin_layout Plain Layout
1240
1241 \backslash
1242 voffset
1243 \end_layout
1244
1245 \end_inset
1246
1247 .
1248  Their names should be self-explanatory.
1249  These variables are useful if you think for a moment about computer labels.
1250  Sometimes, the size of a print medium and the area of the medium that you
1251  can actually print on aren't the same.
1252  This is where 
1253 \begin_inset Flex CharStyle:Code
1254 status collapsed
1255
1256 \begin_layout Plain Layout
1257
1258 \backslash
1259 hoffset
1260 \end_layout
1261
1262 \end_inset
1263
1264  and 
1265 \begin_inset Flex CharStyle:Code
1266 status collapsed
1267
1268 \begin_layout Plain Layout
1269
1270 \backslash
1271 voffset
1272 \end_layout
1273
1274 \end_inset
1275
1276  come in.
1277 \end_layout
1278
1279 \begin_layout Standard
1280 The default values for 
1281 \begin_inset Flex CharStyle:Code
1282 status collapsed
1283
1284 \begin_layout Plain Layout
1285
1286 \backslash
1287 hoffset
1288 \end_layout
1289
1290 \end_inset
1291
1292  and 
1293 \begin_inset Flex CharStyle:Code
1294 status collapsed
1295
1296 \begin_layout Plain Layout
1297
1298 \backslash
1299 voffset
1300 \end_layout
1301
1302 \end_inset
1303
1304  are both 0
1305 \begin_inset space \thinspace{}
1306 \end_inset
1307
1308 points, i.
1309 \begin_inset space \thinspace{}
1310 \end_inset
1311
1312 g.
1313 \begin_inset space \space{}
1314 \end_inset
1315
1316 the page isn't shifted.
1317  Unfortunately, some DVI drivers always seem to shift the page.
1318  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1319  If you're using LyX on a system that you don't personally maintain, and
1320  your sysadmin is a doofus, 
1321 \begin_inset Flex CharStyle:Code
1322 status collapsed
1323
1324 \begin_layout Plain Layout
1325
1326 \backslash
1327 hoffset
1328 \end_layout
1329
1330 \end_inset
1331
1332  and 
1333 \begin_inset Flex CharStyle:Code
1334 status collapsed
1335
1336 \begin_layout Plain Layout
1337
1338 \backslash
1339 voffset
1340 \end_layout
1341
1342 \end_inset
1343
1344  can save the day.
1345  Suppose you're left and top margins are always 0.5
1346 \begin_inset space \thinspace{}
1347 \end_inset
1348
1349 inches too big.
1350  You can add this to the preamble:
1351 \end_layout
1352
1353 \begin_layout LyX-Code
1354
1355 \backslash
1356 setlength{
1357 \backslash
1358 hoffset}{-0.5 in}
1359 \end_layout
1360
1361 \begin_layout LyX-Code
1362
1363 \backslash
1364 setlength{
1365 \backslash
1366 voffset}{-0.5 in}
1367 \end_layout
1368
1369 \begin_layout Standard
1370 and your margins should now be correct.
1371 \end_layout
1372
1373 \begin_layout Subsubsection
1374 Example #2: Labels
1375 \end_layout
1376
1377 \begin_layout Standard
1378 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1379  There's a rather nice package, available at your nearest CTAN archive,
1380  for printing sheets of labels: 
1381 \begin_inset Flex CharStyle:Code
1382 status collapsed
1383
1384 \begin_layout Plain Layout
1385 labels.sty
1386 \end_layout
1387
1388 \end_inset
1389
1390 .
1391  Now, your system may not have this package installed by default.
1392  We leave that up to you to check.
1393  You'll also want to read the documentation for it; we're not going to do
1394  that for you.
1395  Since this is an example, however, we'll give you an example of how you
1396  use this package.
1397 \end_layout
1398
1399 \begin_layout Standard
1400 First, make sure you're using the 
1401 \begin_inset Flex CharStyle:Code
1402 status collapsed
1403
1404 \begin_layout Plain Layout
1405 article
1406 \end_layout
1407
1408 \end_inset
1409
1410  document class.
1411  Next, you need to put the following in your preamble:
1412 \end_layout
1413
1414 \begin_layout LyX-Code
1415
1416 \backslash
1417 usepackage{labels}
1418 \end_layout
1419
1420 \begin_layout LyX-Code
1421
1422 \backslash
1423 LabelCols=3
1424 \end_layout
1425
1426 \begin_layout LyX-Code
1427
1428 \backslash
1429 LabelRows=7
1430 \end_layout
1431
1432 \begin_layout LyX-Code
1433
1434 \backslash
1435 LeftBorder=8mm
1436 \end_layout
1437
1438 \begin_layout LyX-Code
1439
1440 \backslash
1441 RightBorder=8mm
1442 \end_layout
1443
1444 \begin_layout LyX-Code
1445
1446 \backslash
1447 TopBorder=9mm
1448 \end_layout
1449
1450 \begin_layout LyX-Code
1451
1452 \backslash
1453 BottomBorder=2mm
1454 \end_layout
1455
1456 \begin_layout Standard
1457 This sets things up for Avery label sheets, stock #5360.
1458  You're now ready to print labels, but you'll need to insert LaTeX code,
1459  placing the commands 
1460 \begin_inset Flex CharStyle:Code
1461 status collapsed
1462
1463 \begin_layout Plain Layout
1464
1465 \backslash
1466 begin{labels}
1467 \end_layout
1468
1469 \end_inset
1470
1471  and 
1472 \begin_inset Flex CharStyle:Code
1473 status collapsed
1474
1475 \begin_layout Plain Layout
1476
1477 \backslash
1478 end{labels}
1479 \end_layout
1480
1481 \end_inset
1482
1483  around each label text.
1484  This and other special features of 
1485 \begin_inset Flex CharStyle:Code
1486 status collapsed
1487
1488 \begin_layout Plain Layout
1489 labels.sty
1490 \end_layout
1491
1492 \end_inset
1493
1494  are explained in its documentation.
1495 \end_layout
1496
1497 \begin_layout Standard
1498 Someday, someone may write a LyX layout file to support this package directly.
1499  Maybe that someone is you.
1500 \end_layout
1501
1502 \begin_layout Subsubsection
1503 Example #3: Paragraph Indentation
1504 \end_layout
1505
1506 \begin_layout Standard
1507 Americans are trained to indent the first line of 
1508 \emph on
1509 every
1510 \emph default
1511  paragraph.
1512  As with all of their other weird quirks, most Americans will whine and
1513  moan until they can have their way and indent the first line of all paragraphs.
1514  (Yes, we're joking.
1515  (We are?) 
1516 \emph on
1517 Yeah
1518 \emph default
1519 , we are.)
1520 \end_layout
1521
1522 \begin_layout Standard
1523 Of course, this behavior isn't standard typography.
1524  In books, you typically only indent the first line of a paragraph 
1525 \emph on
1526 if
1527 \emph default
1528  it follows another one.
1529  The idea behind indenting the first line of a paragraph is to distinguish
1530  neighboring paragraphs from one another.
1531  If there is no previous paragraph—for example, if it follows a figure or
1532  is the first paragraph in a section—then there is no need for indentation.
1533  
1534 \end_layout
1535
1536 \begin_layout Standard
1537 If you're a typical American (we're still joking!), though, you don't care
1538  about such esoteric things; you want your indentation! Add this to the
1539  preamble:
1540 \end_layout
1541
1542 \begin_layout LyX-Code
1543
1544 \backslash
1545 usepackage{indentfirst}
1546 \end_layout
1547
1548 \begin_layout Standard
1549 If your TeX distribution isn't braindead, you'll have this package, and
1550  all of your paragraphs will get the indentation the Founding Fathers intended
1551  they should have.
1552 \end_layout
1553
1554 \begin_layout Subsubsection
1555 Example #4: This Document
1556 \end_layout
1557
1558 \begin_layout Standard
1559 You can also check out the preamble of this document to get an idea of some
1560  of the advanced things you can do.
1561  Also, there are more examples and an assortment of LaTeX 
1562 \begin_inset Quotes eld
1563 \end_inset
1564
1565 dirty tricks
1566 \begin_inset Quotes erd
1567 \end_inset
1568
1569  given in Chapter
1570 \begin_inset space ~
1571 \end_inset
1572
1573
1574 \begin_inset CommandInset ref
1575 LatexCommand ref
1576 reference "cha:secrets"
1577
1578 \end_inset
1579
1580 .
1581  
1582 \end_layout
1583
1584 \begin_layout Section
1585 LyX and LaTeX Errors
1586 \end_layout
1587
1588 \begin_layout Standard
1589 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1590  going.
1591  It then uses the logfile from the LaTeX run to do a post-mortem.
1592  After analyzing the logfile,LyX displays a dialog listing the errors.
1593  Clicking on any one of them will take you to the position in your LyX file
1594  where the error occurred.
1595 \begin_inset Foot
1596 status collapsed
1597
1598 \begin_layout Plain Layout
1599 Well, usually.
1600  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1601  right line.
1602  There are also cases where LaTeX reports the error on one line, but the
1603  actual error is earlier.
1604  This is not unlike forgetting a closing brace in a program: You'll get
1605  an error, but only later.
1606 \end_layout
1607
1608 \end_inset
1609
1610
1611 \end_layout
1612
1613 \begin_layout Standard
1614 Some folks also like to look at the log file directly: It is available from
1615  
1616 \begin_inset Flex CharStyle:MenuItem
1617 status collapsed
1618
1619 \begin_layout Plain Layout
1620 Document
1621 \bar under
1622 \SpecialChar \menuseparator
1623
1624 \bar default
1625 Latex
1626 \begin_inset space ~
1627 \end_inset
1628
1629 Log
1630 \end_layout
1631
1632 \end_inset
1633
1634 .
1635  There are some fairly common error messages and warnings.
1636  We'll cover those here.
1637  You should look at a good LaTeX book for a complete listing.
1638 \end_layout
1639
1640 \begin_layout Itemize
1641 \begin_inset Flex CharStyle:Code
1642 status collapsed
1643
1644 \begin_layout Plain Layout
1645 LaTeX Warning
1646 \end_layout
1647
1648 \end_inset
1649
1650
1651 \begin_inset Newline newline
1652 \end_inset
1653
1654 Anything beginning with these words is a warning message for the purpose
1655  of 
1656 \begin_inset Quotes eld
1657 \end_inset
1658
1659 debugging
1660 \begin_inset Quotes erd
1661 \end_inset
1662
1663  the LaTeX code itself.
1664  You'll get messages like this if you added or changed cross-references
1665  or bibliography entries, in which case, LaTeX is trying to tell you that
1666  you need to make another run.
1667  You can by-and-large ignore these.
1668 \end_layout
1669
1670 \begin_layout Itemize
1671 \begin_inset Flex CharStyle:Code
1672 status collapsed
1673
1674 \begin_layout Plain Layout
1675 LaTeX Font Warning
1676 \end_layout
1677
1678 \end_inset
1679
1680
1681 \begin_inset Newline newline
1682 \end_inset
1683
1684 Another warning message, this time about fonts which LaTeX couldn't find.
1685  The rest of the message will often say something about a replacement font
1686  that LaTeX used.
1687  You can safely ignore these, too.
1688 \end_layout
1689
1690 \begin_layout Itemize
1691 \begin_inset Flex CharStyle:Code
1692 status collapsed
1693
1694 \begin_layout Plain Layout
1695 Overfull 
1696 \backslash
1697 hbox
1698 \end_layout
1699
1700 \end_inset
1701
1702
1703 \begin_inset Newline newline
1704 \end_inset
1705
1706 LaTeX absolutely 
1707 \emph on
1708 loves
1709 \emph default
1710  to spew these out.
1711  They are warnings about lines that were too long and run past the right
1712  margin.
1713  Almost always, this is unnoticeable in the final output.
1714  (It can be just a point or two.) Or, only one or two characters extend past
1715  the margin.
1716  LaTeX seems to generate at least one of these messages for just about any
1717  document you write.
1718 \begin_inset Newline newline
1719 \end_inset
1720
1721 You can ignore these messages.
1722  Your eyes will tell you if there's a problem with something that's too
1723  wide; just look at the output.
1724 \begin_inset Foot
1725 status collapsed
1726
1727 \begin_layout Plain Layout
1728 You can also enable the `draft' option in 
1729 \begin_inset Flex CharStyle:MenuItem
1730 status collapsed
1731
1732 \begin_layout Plain Layout
1733 Document
1734 \bar under
1735 \SpecialChar \menuseparator
1736
1737 \bar default
1738 Settings
1739 \end_layout
1740
1741 \end_inset
1742
1743 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1744 \end_layout
1745
1746 \end_inset
1747
1748
1749 \end_layout
1750
1751 \begin_layout Itemize
1752 \begin_inset Flex CharStyle:Code
1753 status collapsed
1754
1755 \begin_layout Plain Layout
1756 Underfull 
1757 \backslash
1758 hbox
1759 \end_layout
1760
1761 \end_inset
1762
1763
1764 \begin_inset Newline newline
1765 \end_inset
1766
1767 Not quite as common as its cousin.
1768  LaTeX seems to like to print lines that are a bit too wide as opposed to
1769  ones that are a bit too narrow.
1770  We have no idea why.
1771 \end_layout
1772
1773 \begin_layout Itemize
1774 \begin_inset Flex CharStyle:Code
1775 status collapsed
1776
1777 \begin_layout Plain Layout
1778 Overfull 
1779 \backslash
1780 vbox
1781 \end_layout
1782
1783 \end_inset
1784
1785  and 
1786 \begin_inset Flex CharStyle:Code
1787 status collapsed
1788
1789 \begin_layout Plain Layout
1790 Underfull 
1791 \backslash
1792 vbox
1793 \end_layout
1794
1795 \end_inset
1796
1797
1798 \begin_inset Newline newline
1799 \end_inset
1800
1801 Warnings about troubles breaking the page.
1802  Once again, just look at the output.
1803  Your eyes will tell you where something has gone wrong.
1804 \end_layout
1805
1806 \begin_layout Itemize
1807 \begin_inset Flex CharStyle:Code
1808 status collapsed
1809
1810 \begin_layout Plain Layout
1811  LaTeX Error: File 
1812 \begin_inset Quotes els
1813 \end_inset
1814
1815 Xxxx
1816 \begin_inset Quotes ers
1817 \end_inset
1818
1819  not found
1820 \end_layout
1821
1822 \end_inset
1823
1824
1825 \begin_inset Newline newline
1826 \end_inset
1827
1828 The file 
1829 \begin_inset Quotes eld
1830 \end_inset
1831
1832 Xxxx
1833 \begin_inset Quotes erd
1834 \end_inset
1835
1836  isn't installed on this system.
1837  This usually appears because some package your document needs isn't installed.
1838  If you didn't touch the preamble or didn't use the 
1839 \begin_inset Flex CharStyle:Code
1840 status collapsed
1841
1842 \begin_layout Plain Layout
1843
1844 \backslash
1845 usepackage{}
1846 \end_layout
1847
1848 \end_inset
1849
1850  command, then one of the packages LyX tried to load is missing.
1851  Use 
1852 \begin_inset Flex CharStyle:MenuItem
1853 status collapsed
1854
1855 \begin_layout Plain Layout
1856 Help\SpecialChar \menuseparator
1857 LaTeX Configuration
1858 \end_layout
1859
1860 \end_inset
1861
1862  to get a list of packages that LyX knows about.
1863  This file is updated whenever you reconfigure LyX (using 
1864 \begin_inset Flex CharStyle:MenuItem
1865 status collapsed
1866
1867 \begin_layout Plain Layout
1868 Tools\SpecialChar \menuseparator
1869 Reconfigure
1870 \end_layout
1871
1872 \end_inset
1873
1874 ) and tells you which packages have been detected and what they do.
1875 \begin_inset Newline newline
1876 \end_inset
1877
1878 If you did use the 
1879 \begin_inset Flex CharStyle:Code
1880 status collapsed
1881
1882 \begin_layout Plain Layout
1883
1884 \backslash
1885 usepackage{}
1886 \end_layout
1887
1888 \end_inset
1889
1890  command and the package in question isn't installed, then you'll need to
1891  install it yourself.
1892 \end_layout
1893
1894 \begin_layout Itemize
1895 \begin_inset Flex CharStyle:Code
1896 status collapsed
1897
1898 \begin_layout Plain Layout
1899 LaTeX Error: Unknown option
1900 \end_layout
1901
1902 \end_inset
1903
1904
1905 \begin_inset Newline newline
1906 \end_inset
1907
1908 Error messages beginning with this are trying to tell you that you specified
1909  a bad or undefined option to a package.
1910  Check the package's documentation.
1911 \end_layout
1912
1913 \begin_layout Itemize
1914 \begin_inset Flex CharStyle:Code
1915 status collapsed
1916
1917 \begin_layout Plain Layout
1918 Undefined control sequence
1919 \end_layout
1920
1921 \end_inset
1922
1923
1924 \begin_inset Newline newline
1925 \end_inset
1926
1927 If you've inserted LaTeX code into your document, but made a typo, you'll
1928  get one of these.
1929  You may have forgotten to load a package.
1930  In any case, this error message usually means that you used an undefined
1931  command.
1932  
1933 \end_layout
1934
1935 \begin_layout Standard
1936 There are other error and warning messages.
1937  Some are self-explanatory.
1938  These are usually LaTeX messages.
1939  Others are downright cryptic.
1940  These are usually TeX error messages, and we really have 
1941 \emph on
1942 no clue
1943 \emph default
1944  what they mean or how to decipher them.
1945  No-one does.
1946 \end_layout
1947
1948 \begin_layout Standard
1949 There's a general sequence you should follow if you get error messages:
1950 \end_layout
1951
1952 \begin_layout Enumerate
1953 Look at the LaTeX code you inserted for typos.
1954 \end_layout
1955
1956 \begin_layout Enumerate
1957 If there are no typos, check that you used the command(s) correctly.
1958 \end_layout
1959
1960 \begin_layout Enumerate
1961 If you get a bunch of error boxes piled up at the very top of the document—and
1962  especially if you see a 
1963 \begin_inset Quotes eld
1964 \end_inset
1965
1966
1967 \begin_inset Flex CharStyle:Code
1968 status collapsed
1969
1970 \begin_layout Plain Layout
1971 Missing 
1972 \backslash
1973 begin{document}
1974 \end_layout
1975
1976 \end_inset
1977
1978
1979 \begin_inset Quotes erd
1980 \end_inset
1981
1982  error—it means that there are errors in the preamble.
1983  Start debugging your preamble.
1984 \end_layout
1985
1986 \begin_layout Enumerate
1987 If you didn't add anything to the preamble and didn't add any LaTeX code
1988  to the document, the first suspect is your LaTeX distribution itself.
1989  Check for missing packages and install them.
1990 \end_layout
1991
1992 \begin_layout Enumerate
1993 Okay, so there are no missing packages.
1994  Did you use any of the fine-tuning options in LyX? Specifically, did you
1995  
1996 \emph on
1997 misuse
1998 \emph default
1999  any of them, like trying to manually insert lots of 
2000 \begin_inset Flex CharStyle:Code
2001 status collapsed
2002
2003 \begin_layout Plain Layout
2004 Protected
2005 \begin_inset space ~
2006 \end_inset
2007
2008 Blanks
2009 \end_layout
2010
2011 \end_inset
2012
2013
2014 \begin_inset Flex CharStyle:Code
2015 status collapsed
2016
2017 \begin_layout Plain Layout
2018 Linebreaks
2019 \end_layout
2020
2021 \end_inset
2022
2023 , or 
2024 \begin_inset Flex CharStyle:Code
2025 status collapsed
2026
2027 \begin_layout Plain Layout
2028 Pagebreaks
2029 \end_layout
2030
2031 \end_inset
2032
2033 ? Did you try to kludge something together with these instead of using the
2034  appropriate paragraph environment?
2035 \end_layout
2036
2037 \begin_layout Enumerate
2038 All right, you didn't use any of the fine-tuning options, you played by
2039  the rules.
2040  Did you try to pull a fancy maneuver? Did you do something funky inside
2041  a table or an equation, like inserting a graphic into a table cell?
2042 \end_layout
2043
2044 \begin_layout Enumerate
2045 Do you have long sections of text where LaTeX cannot find a place to break
2046  a line? By default, LaTeX is rather strict about how much extra inter-word
2047  spacing it will add in order to break a line.
2048  Preferably, you should rework the paragraph to avoid the problem.
2049  If this isn't an option, you can wrap your text in 
2050 \begin_inset Flex CharStyle:Code
2051 status collapsed
2052
2053 \begin_layout Plain Layout
2054
2055 \backslash
2056 sloppypar
2057 \end_layout
2058
2059 \end_inset
2060
2061  to make LaTeX's line breaking more, well, sloppy.
2062 \end_layout
2063
2064 \begin_layout Enumerate
2065 Did you go overboard with the nesting? LyX (currently) doesn't check to
2066  make sure you're in the limits for nesting environments.
2067  If you nested a bunch of environments to the 
2068 \begin_inset Formula $17^{\mathrm{th}}$
2069 \end_inset
2070
2071  level, that's the problem.
2072  (The limit in LaTeX is five.)
2073 \end_layout
2074
2075 \begin_layout Enumerate
2076 Okay, you didn't get any error messages, but your output looks awful.
2077  If you have a table or figure that's too wide or long for the page, you
2078  need to:
2079 \end_layout
2080
2081 \begin_deeper
2082 \begin_layout Enumerate
2083 rescale the figure so it fits.
2084 \end_layout
2085
2086 \begin_layout Enumerate
2087 trim down the table so it fits.
2088 \end_layout
2089
2090 \end_deeper
2091 \begin_layout Enumerate
2092 If something else is wrong with the output, and you didn't try to pull anything
2093  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2094 \end_layout
2095
2096 \begin_layout Standard
2097 If all this doesn't help—well, then 
2098 \emph on
2099 perhaps
2100 \emph default
2101  you might have found a bug in LyX\SpecialChar \ldots{}
2102 .
2103 \end_layout
2104
2105 \begin_layout Chapter
2106 Supplemental Tools
2107 \end_layout
2108
2109 \begin_layout Section
2110 Customizing Bibliographies with BibTeX
2111 \end_layout
2112
2113 \begin_layout Standard
2114 The most basic information about how to use BibTeX with LyX is contained
2115  in the section 
2116 \emph on
2117 Bibliography databases (BibTeX)
2118 \emph default
2119  of the 
2120 \emph on
2121 User's Guide
2122 \emph default
2123 .
2124  The following subsections explain special bibliography features supported
2125  by LyX.
2126 \end_layout
2127
2128 \begin_layout Subsection
2129 Alternative Citation Styles
2130 \end_layout
2131
2132 \begin_layout Standard
2133 Standard BibTeX uses numbers (e.
2134 \begin_inset space \thinspace{}
2135 \end_inset
2136
2137 g.
2138 \begin_inset space \space{}
2139 \end_inset
2140
2141
2142 \begin_inset Quotes eld
2143 \end_inset
2144
2145 [12]
2146 \begin_inset Quotes erd
2147 \end_inset
2148
2149 ) to refer to a cited work.
2150  However, in many scientific disciplines, other citation styles are in use.
2151  The most common one is the author-year style (e.
2152 \begin_inset space \thinspace{}
2153 \end_inset
2154
2155 g.
2156 \begin_inset space \space{}
2157 \end_inset
2158
2159
2160 \begin_inset Quotes eld
2161 \end_inset
2162
2163 Knuth 1984a
2164 \begin_inset Quotes erd
2165 \end_inset
2166
2167 ).
2168  LyX supports two packages that provide this style, 
2169 \begin_inset Flex CharStyle:Code
2170 status collapsed
2171
2172 \begin_layout Plain Layout
2173 natbib
2174 \end_layout
2175
2176 \end_inset
2177
2178  and 
2179 \begin_inset Flex CharStyle:Code
2180 status collapsed
2181
2182 \begin_layout Plain Layout
2183 jurabib
2184 \end_layout
2185
2186 \end_inset
2187
2188 .
2189  Both packages have their pros and cons, which cannot be listed in detail.
2190  If you only want to have simple author-year (or author-numerical) style,
2191  or if you want to use one of the countless style files for 
2192 \begin_inset Flex CharStyle:Code
2193 status collapsed
2194
2195 \begin_layout Plain Layout
2196 natbib
2197 \end_layout
2198
2199 \end_inset
2200
2201 , than the established 
2202 \begin_inset Flex CharStyle:Code
2203 status collapsed
2204
2205 \begin_layout Plain Layout
2206 natbib
2207 \end_layout
2208
2209 \end_inset
2210
2211  package is probably your choice.
2212  If you need special features like short title references, ibidem etc., you
2213  might consider the 
2214 \begin_inset Flex CharStyle:Code
2215 status collapsed
2216
2217 \begin_layout Plain Layout
2218 jurabib
2219 \end_layout
2220
2221 \end_inset
2222
2223  package.
2224 \end_layout
2225
2226 \begin_layout Standard
2227 The handling of both packages in LyX is basically the same.
2228  Go to 
2229 \begin_inset Flex CharStyle:MenuItem
2230 status collapsed
2231
2232 \begin_layout Plain Layout
2233 Document\SpecialChar \menuseparator
2234 Settings
2235 \end_layout
2236
2237 \end_inset
2238
2239  and select under 
2240 \begin_inset Flex CharStyle:MenuItem
2241 status collapsed
2242
2243 \begin_layout Plain Layout
2244 Bibliography
2245 \end_layout
2246
2247 \end_inset
2248
2249  the option 
2250 \begin_inset Flex CharStyle:MenuItem
2251 status collapsed
2252
2253 \begin_layout Plain Layout
2254 Natbib
2255 \end_layout
2256
2257 \end_inset
2258
2259  or 
2260 \begin_inset Flex CharStyle:MenuItem
2261 status collapsed
2262
2263 \begin_layout Plain Layout
2264 Jurabib
2265 \end_layout
2266
2267 \end_inset
2268
2269 .
2270  With both packages, you will get some extra features in the citation dialog
2271  and you can select the style of the reference (
2272 \begin_inset Quotes eld
2273 \end_inset
2274
2275 Knuth 1984
2276 \begin_inset Quotes erd
2277 \end_inset
2278
2279
2280 \begin_inset Quotes eld
2281 \end_inset
2282
2283 Knuth (1984)
2284 \begin_inset Quotes erd
2285 \end_inset
2286
2287
2288 \begin_inset Quotes eld
2289 \end_inset
2290
2291 Knuth, 1984
2292 \begin_inset Quotes erd
2293 \end_inset
2294
2295
2296 \begin_inset Quotes eld
2297 \end_inset
2298
2299 1984
2300 \begin_inset Quotes erd
2301 \end_inset
2302
2303  etc.).
2304  Note that both packages need specifically designed style files.
2305  They both ship their own, but there are lots of additional style files,
2306  and there is even an interactive style file builder
2307 \begin_inset Foot
2308 status collapsed
2309
2310 \begin_layout Plain Layout
2311 See 
2312 \begin_inset Flex URL
2313 status open
2314
2315 \begin_layout Plain Layout
2316
2317 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2318 \end_layout
2319
2320 \end_inset
2321
2322
2323 \end_layout
2324
2325 \end_inset
2326
2327  for 
2328 \begin_inset Flex CharStyle:Code
2329 status collapsed
2330
2331 \begin_layout Plain Layout
2332 natbib
2333 \end_layout
2334
2335 \end_inset
2336
2337 .
2338 \end_layout
2339
2340 \begin_layout Subsection
2341 Sectioned Bibliographies
2342 \end_layout
2343
2344 \begin_layout Standard
2345 Sometimes you might need to divide your bibliography into several sections.
2346  If you are for instance a historian, the possibility to separate sources
2347  and scientific works is most likely a 
2348 \begin_inset Quotes eld
2349 \end_inset
2350
2351 must have
2352 \begin_inset Quotes erd
2353 \end_inset
2354
2355 .
2356  Unfortunately, BibTeX itself does not allow you to do this.
2357  But with the help of some LaTeX packages, BibTeX can be extended to fit
2358  your needs.
2359 \end_layout
2360
2361 \begin_layout Standard
2362 LyX provides native support for one of these packages, 
2363 \family typewriter
2364 bibtopic
2365 \family default
2366 .
2367 \begin_inset Foot
2368 status collapsed
2369
2370 \begin_layout Plain Layout
2371 Available from 
2372 \begin_inset Flex URL
2373 status open
2374
2375 \begin_layout Plain Layout
2376
2377 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2378 \end_layout
2379
2380 \end_inset
2381
2382
2383 \end_layout
2384
2385 \end_inset
2386
2387  The advantage of this package (compared to other packages like 
2388 \family typewriter
2389 multibib
2390 \family default
2391 ) is that you don't need to define new citation commands.
2392  Instead, you need to prepare different bibliographic databases which include
2393  the entries for the different sections of the bibliography.
2394  For example: If you want to divide your bibliography into the sections
2395  
2396 \begin_inset Quotes eld
2397 \end_inset
2398
2399 Sources
2400 \begin_inset Quotes erd
2401 \end_inset
2402
2403  and 
2404 \begin_inset Quotes eld
2405 \end_inset
2406
2407 Scientific works
2408 \begin_inset Quotes erd
2409 \end_inset
2410
2411 , you first need to create two bibliographic databases, e.
2412 \begin_inset space \thinspace{}
2413 \end_inset
2414
2415 g.
2416 \begin_inset space \space{}
2417 \end_inset
2418
2419
2420 \begin_inset Flex CharStyle:Code
2421 status collapsed
2422
2423 \begin_layout Plain Layout
2424 sources.bib
2425 \end_layout
2426
2427 \end_inset
2428
2429  and 
2430 \begin_inset Flex CharStyle:Code
2431 status collapsed
2432
2433 \begin_layout Plain Layout
2434 scientific.bib
2435 \end_layout
2436
2437 \end_inset
2438
2439 .
2440  
2441 \end_layout
2442
2443 \begin_layout Standard
2444 Go to 
2445 \begin_inset Flex CharStyle:MenuItem
2446 status collapsed
2447
2448 \begin_layout Plain Layout
2449 Document\SpecialChar \menuseparator
2450 Settings
2451 \end_layout
2452
2453 \end_inset
2454
2455  and check under 
2456 \begin_inset Flex CharStyle:MenuItem
2457 status collapsed
2458
2459 \begin_layout Plain Layout
2460 Bibliography
2461 \end_layout
2462
2463 \end_inset
2464
2465  the option 
2466 \begin_inset Flex CharStyle:MenuItem
2467 status collapsed
2468
2469 \begin_layout Plain Layout
2470 Sectioned bibliography
2471 \end_layout
2472
2473 \end_inset
2474
2475 .
2476  Now you can insert multiple BibTeX bibliographies, one for each section
2477  of your bibliography.
2478  Returning to our example: Insert the BibTeX bibliography 
2479 \begin_inset Flex CharStyle:Code
2480 status collapsed
2481
2482 \begin_layout Plain Layout
2483 sources.bib
2484 \end_layout
2485
2486 \end_inset
2487
2488  and a second one for the database 
2489 \begin_inset Flex CharStyle:Code
2490 status collapsed
2491
2492 \begin_layout Plain Layout
2493 scientific.bib
2494 \end_layout
2495
2496 \end_inset
2497
2498 .
2499  You are free to use the same or different styles for each section.
2500  Additionally, you can chose if the bibliography section should contain
2501  
2502 \begin_inset Quotes eld
2503 \end_inset
2504
2505 all cited references
2506 \begin_inset Quotes erd
2507 \end_inset
2508
2509  of the specified database(s) (which is the default), 
2510 \begin_inset Quotes eld
2511 \end_inset
2512
2513 all uncited references
2514 \begin_inset Quotes erd
2515 \end_inset
2516
2517  or even 
2518 \begin_inset Quotes eld
2519 \end_inset
2520
2521 all references
2522 \begin_inset Quotes erd
2523 \end_inset
2524
2525 .
2526  This might be useful if you would like to separate your bibliography into
2527  three sections: 
2528 \begin_inset Quotes eld
2529 \end_inset
2530
2531 Cited sources
2532 \begin_inset Quotes erd
2533 \end_inset
2534
2535
2536 \begin_inset Quotes eld
2537 \end_inset
2538
2539 Uncited sources
2540 \begin_inset Quotes erd
2541 \end_inset
2542
2543 , and 
2544 \begin_inset Quotes eld
2545 \end_inset
2546
2547 Scientific works
2548 \begin_inset Quotes erd
2549 \end_inset
2550
2551 .
2552  The titles for the sections can be added as ordinary sections or subsections.
2553  Since 
2554 \begin_inset Flex CharStyle:Code
2555 status collapsed
2556
2557 \begin_layout Plain Layout
2558 bibtopic
2559 \end_layout
2560
2561 \end_inset
2562
2563  removes the bibliography title, you have manually re-add that, too (as
2564  a chapter* or section*, for instance).
2565 \end_layout
2566
2567 \begin_layout Subsection
2568 Multiple Bibliographies
2569 \end_layout
2570
2571 \begin_layout Standard
2572 Multiple bibliographies, e.
2573 \begin_inset space \thinspace{}
2574 \end_inset
2575
2576 g.
2577 \begin_inset space \space{}
2578 \end_inset
2579
2580 a bibliography for each section or chapter of the document, are not supported
2581  by BibTeX itself.
2582  But the 
2583 \begin_inset Flex CharStyle:Code
2584 status collapsed
2585
2586 \begin_layout Plain Layout
2587 bibtopic
2588 \end_layout
2589
2590 \end_inset
2591
2592  package, which is used for the creation of sectioned bibliographies in
2593  LyX (see the previous section), provides an easy way to solve this task,
2594  if you are willing to use some 
2595 \begin_inset Flex CharStyle:MenuItem
2596 status collapsed
2597
2598 \begin_layout Plain Layout
2599 TeX Code
2600 \end_layout
2601
2602 \end_inset
2603
2604  (see section
2605 \begin_inset space ~
2606 \end_inset
2607
2608
2609 \begin_inset CommandInset ref
2610 LatexCommand ref
2611 reference "sec:Inserting-TeX-Code"
2612
2613 \end_inset
2614
2615 ).
2616 \begin_inset Foot
2617 status collapsed
2618
2619 \begin_layout Plain Layout
2620 An alternative approach is to use the 
2621 \begin_inset Flex CharStyle:Code
2622 status collapsed
2623
2624 \begin_layout Plain Layout
2625 chapterbib
2626 \end_layout
2627
2628 \end_inset
2629
2630  or 
2631 \begin_inset Flex CharStyle:Code
2632 status collapsed
2633
2634 \begin_layout Plain Layout
2635 bibunits
2636 \end_layout
2637
2638 \end_inset
2639
2640  package, respectively.
2641 \end_layout
2642
2643 \end_inset
2644
2645
2646 \end_layout
2647
2648 \begin_layout Standard
2649 First go to 
2650 \begin_inset Flex CharStyle:MenuItem
2651 status collapsed
2652
2653 \begin_layout Plain Layout
2654 Document\SpecialChar \menuseparator
2655 Settings
2656 \end_layout
2657
2658 \end_inset
2659
2660  and under 
2661 \begin_inset Flex CharStyle:MenuItem
2662 status collapsed
2663
2664 \begin_layout Plain Layout
2665 Bibliography
2666 \end_layout
2667
2668 \end_inset
2669
2670  check 
2671 \begin_inset Flex CharStyle:MenuItem
2672 status collapsed
2673
2674 \begin_layout Plain Layout
2675 Sectioned bibliography
2676 \end_layout
2677
2678 \end_inset
2679
2680 .
2681  In the document, you have to enclose the sections, which shall contain
2682  their own bibliography (including the BibTeX bibliography itself), between
2683  
2684 \begin_inset Flex CharStyle:Code
2685 status collapsed
2686
2687 \begin_layout Plain Layout
2688
2689 \backslash
2690 begin{btUnit}
2691 \end_layout
2692
2693 \end_inset
2694
2695  and 
2696 \begin_inset Flex CharStyle:Code
2697 status collapsed
2698
2699 \begin_layout Plain Layout
2700
2701 \backslash
2702 end{btUnit}
2703 \end_layout
2704
2705 \end_inset
2706
2707  (those commands have to be inserted as TeX code).
2708  The bibliography will contain all references which have been cited in the
2709  current 
2710 \begin_inset Flex CharStyle:Code
2711 status collapsed
2712
2713 \begin_layout Plain Layout
2714 btUnit
2715 \end_layout
2716
2717 \end_inset
2718
2719 .
2720  
2721 \series bold
2722 Note:
2723 \series default
2724  If you are using this approach, then every citation reference has to be
2725  inside some 
2726 \begin_inset Flex CharStyle:Code
2727 status collapsed
2728
2729 \begin_layout Plain Layout
2730 btUnit
2731 \end_layout
2732
2733 \end_inset
2734
2735 .
2736  Also, the 
2737 \begin_inset Flex CharStyle:Code
2738 status collapsed
2739
2740 \begin_layout Plain Layout
2741 btUnit
2742 \end_layout
2743
2744 \end_inset
2745
2746 s cannot be nested.
2747 \end_layout
2748
2749 \begin_layout Section
2750 Multipart Documents
2751 \end_layout
2752
2753 \begin_layout Subsection
2754 General Operation
2755 \end_layout
2756
2757 \begin_layout Standard
2758 When you are working on a large file with many sections, it is often convenient
2759  to break up the document into several files, or perhaps you have something
2760  where a table may change from time to time, but the preceding text does
2761  not.
2762  In these cases, you should seriously consider using multipart documents.
2763  For example, scientific papers often have five major sections: the introduction
2764 , observations, results, discussion, and conclusion.
2765  Each of these could be its own separate LyX file, with one 
2766 \begin_inset Quotes eld
2767 \end_inset
2768
2769 master
2770 \begin_inset Quotes erd
2771 \end_inset
2772
2773  file which contains the title, authors, abstract, references, etc., plus
2774  the five included files.
2775  It is important to note that each of these files is a full LyX file which
2776  can be formatted and printed on its own, as well as included in a master
2777  file.
2778  Each of these files must have the same document class, however—don't attempt
2779  to mix book classes with article classes.
2780  You may also include LaTeX files; however, these files must not have their
2781  own preamble (i.
2782 \begin_inset space \thinspace{}
2783 \end_inset
2784
2785 g.
2786 \begin_inset space \space{}
2787 \end_inset
2788
2789 everything up to and including the 
2790 \begin_inset Flex CharStyle:Code
2791 status collapsed
2792
2793 \begin_layout Plain Layout
2794
2795 \backslash
2796 begin{document}
2797 \end_layout
2798
2799 \end_inset
2800
2801  line as well as the 
2802 \begin_inset Flex CharStyle:Code
2803 status collapsed
2804
2805 \begin_layout Plain Layout
2806
2807 \backslash
2808 end{document}
2809 \end_layout
2810
2811 \end_inset
2812
2813  line must be deleted) or else errors will be generated when you try to
2814  make a DVI file.
2815 \end_layout
2816
2817 \begin_layout Standard
2818 LyX allows you to include files quite easily with 
2819 \begin_inset Flex CharStyle:MenuItem
2820 status collapsed
2821
2822 \begin_layout Plain Layout
2823 Insert\SpecialChar \menuseparator
2824 ChiId
2825 \begin_inset space ~
2826 \end_inset
2827
2828 Document
2829 \end_layout
2830
2831 \end_inset
2832
2833 .
2834  When you click on this selection a small box is inserted into the file
2835  at the current cursor location.
2836  Clicking on the box raises a dialog which allows you to select the file
2837  to be included, and the method of its inclusion.
2838  
2839 \end_layout
2840
2841 \begin_layout Standard
2842 The file selection box should by now be obvious.
2843  The three inclusion methods are 
2844 \begin_inset Quotes eld
2845 \end_inset
2846
2847 include
2848 \begin_inset Quotes erd
2849 \end_inset
2850
2851
2852 \begin_inset Quotes eld
2853 \end_inset
2854
2855 input
2856 \begin_inset Quotes erd
2857 \end_inset
2858
2859 , and 
2860 \begin_inset Quotes eld
2861 \end_inset
2862
2863 verbatim
2864 \begin_inset Quotes erd
2865 \end_inset
2866
2867 .
2868  The difference between 
2869 \begin_inset Quotes eld
2870 \end_inset
2871
2872 include
2873 \begin_inset Quotes erd
2874 \end_inset
2875
2876  and 
2877 \begin_inset Quotes eld
2878 \end_inset
2879
2880 input
2881 \begin_inset Quotes erd
2882 \end_inset
2883
2884  is really only meaningful to LaTeXperts, but the practical difference is
2885  that files which are 
2886 \begin_inset Quotes eld
2887 \end_inset
2888
2889 included
2890 \begin_inset Quotes erd
2891 \end_inset
2892
2893  are typeset beginning on a new page, while files which are 
2894 \begin_inset Quotes eld
2895 \end_inset
2896
2897 inputted
2898 \begin_inset Quotes erd
2899 \end_inset
2900
2901  are typeset starting on the current page.
2902 \end_layout
2903
2904 \begin_layout Standard
2905 Generally, the master file is converted into a full LaTeX file before typesettin
2906 g, while the included files are converted to LaTeX files which do not have
2907  all the preamble information.
2908 \end_layout
2909
2910 \begin_layout Standard
2911
2912 \begin_inset Quotes eld
2913 \end_inset
2914
2915 verbatim
2916 \begin_inset Quotes erd
2917 \end_inset
2918
2919  included file allows you to include a file typeset exactly as it appears
2920  in the file, i.
2921 \begin_inset space \thinspace{}
2922 \end_inset
2923
2924 g.
2925 \begin_inset space \space{}
2926 \end_inset
2927
2928 in 
2929 \begin_inset Flex CharStyle:Code
2930 status collapsed
2931
2932 \begin_layout Plain Layout
2933 verbatim
2934 \end_layout
2935
2936 \end_inset
2937
2938  mode, with the characters set in a fixed-width typewriter font.
2939  Normally, spaces in this file are invisible, though two consecutive spaces
2940  are conserved, unlike LyX's normal treatment of spaces.
2941  However, setting the 
2942 \begin_inset Flex CharStyle:MenuItem
2943 status collapsed
2944
2945 \begin_layout Plain Layout
2946 Mark
2947 \begin_inset space ~
2948 \end_inset
2949
2950 spaces
2951 \begin_inset space ~
2952 \end_inset
2953
2954 in
2955 \begin_inset space ~
2956 \end_inset
2957
2958 output
2959 \end_layout
2960
2961 \end_inset
2962
2963  checkbox typesets a mark to unambiguously define the presence of a space.
2964  
2965 \end_layout
2966
2967 \begin_layout Subsection
2968 Cross-References Between Files
2969 \end_layout
2970
2971 \begin_layout Standard
2972 \begin_inset Box Shadowbox
2973 position "t"
2974 hor_pos "c"
2975 has_inner_box 1
2976 inner_pos "t"
2977 use_parbox 0
2978 width "100col%"
2979 special "none"
2980 height "1in"
2981 height_special "totalheight"
2982 status open
2983
2984 \begin_layout Plain Layout
2985 This section is somewhat out of date.
2986  Need to describe default master documents and how children are opened when
2987  the master is.
2988  [[FIXME]]
2989 \end_layout
2990
2991 \end_inset
2992
2993
2994 \end_layout
2995
2996 \begin_layout Standard
2997 It is possible to set up cross-references between the different files.
2998  First, open all the files in question: let's call them A and B in a two
2999  file example, where B is included in A.
3000  Let's say you insert a label in A, then want to reference it in B.
3001  Open the cross-reference dialog in whilst in document B, and you can select
3002  the 
3003 \begin_inset Quotes eld
3004 \end_inset
3005
3006 buffer
3007 \begin_inset Quotes erd
3008 \end_inset
3009
3010  to use.
3011 \end_layout
3012
3013 \begin_layout Subsection
3014 Bibliography Lists in all Subdocuments
3015 \end_layout
3016
3017 \begin_layout Standard
3018 \begin_inset Box Frameless
3019 position "t"
3020 hor_pos "c"
3021 has_inner_box 1
3022 inner_pos "t"
3023 use_parbox 0
3024 width "100col%"
3025 special "none"
3026 height "1in"
3027 height_special "totalheight"
3028 status open
3029
3030 \begin_layout Plain Layout
3031 This section also needs updating.
3032  There is now material about this on the wiki, and it could be copied here.
3033 \end_layout
3034
3035 \end_inset
3036
3037
3038 \end_layout
3039
3040 \begin_layout Standard
3041 Copy the bibliography list with all entries to all subdocuments and transform
3042  them to a comment.
3043  This way LyX will find the 
3044 \begin_inset Flex CharStyle:Code
3045 status collapsed
3046
3047 \begin_layout Plain Layout
3048 .bib
3049 \end_layout
3050
3051 \end_inset
3052
3053 -files and you can easily insert references without making the bibliography
3054  list visible.
3055 \end_layout
3056
3057 \begin_layout Standard
3058 As the bibliography list is in a comment, LaTeX won't use use it and the
3059  references will look like this: [?], instead of like this: [1].
3060  One solution is to use the LaTeX-package 
3061 \begin_inset Flex CharStyle:Code
3062 status collapsed
3063
3064 \begin_layout Plain Layout
3065 comment
3066 \end_layout
3067
3068 \end_inset
3069
3070  that will only include comments by processing the files separately.
3071  To do this, add in the LaTeX preamble of every subdocument the following:
3072 \end_layout
3073
3074 \begin_layout LyX-Code
3075
3076 \backslash
3077 usepackage{comment}
3078 \end_layout
3079
3080 \begin_layout LyX-Code
3081
3082 \backslash
3083 includecomment{comment}
3084 \end_layout
3085
3086 \begin_layout Standard
3087 See also 
3088 \begin_inset Flex URL
3089 status collapsed
3090
3091 \begin_layout Plain Layout
3092
3093 http://wiki.lyx.org/FAQ/Unsorted#toc31
3094 \end_layout
3095
3096 \end_inset
3097
3098 .
3099 \end_layout
3100
3101 \begin_layout Section
3102 Fancy Headers and Footers
3103 \end_layout
3104
3105 \begin_layout Standard
3106 The default page layout is rather plain; for an 
3107 \begin_inset Flex CharStyle:Code
3108 status collapsed
3109
3110 \begin_layout Plain Layout
3111 article
3112 \end_layout
3113
3114 \end_inset
3115
3116  document class, all you get is a centered page number at the bottom of
3117  the page.
3118  This document uses KOMA-script's book class, so it appears to be a bit
3119  fancier.
3120  But to really put on a show, you need to set the document page style to
3121  
3122 \begin_inset Quotes eld
3123 \end_inset
3124
3125 fancy
3126 \begin_inset Quotes erd
3127 \end_inset
3128
3129 , as mentioned in the 
3130 \emph on
3131 User Guide
3132 \emph default
3133 .
3134  This section describes the LaTeX code you need to insert in your LaTeX
3135  preamble in order to get the desired effects.
3136 \end_layout
3137
3138 \begin_layout Standard
3139 For more information on fancy headers, see the 
3140 \begin_inset Flex CharStyle:Code
3141 status collapsed
3142
3143 \begin_layout Plain Layout
3144 fancyhdr
3145 \end_layout
3146
3147 \end_inset
3148
3149  package documentation.
3150  (
3151 \begin_inset Flex URL
3152 status collapsed
3153
3154 \begin_layout Plain Layout
3155
3156 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3157 \end_layout
3158
3159 \end_inset
3160
3161 )
3162 \end_layout
3163
3164 \begin_layout Standard
3165 The page header is divided into three fields, not surprisingly labeled 
3166 \begin_inset Quotes eld
3167 \end_inset
3168
3169 left
3170 \begin_inset Quotes erd
3171 \end_inset
3172
3173
3174 \begin_inset Quotes eld
3175 \end_inset
3176
3177 center
3178 \begin_inset Quotes erd
3179 \end_inset
3180
3181 , and 
3182 \begin_inset Quotes eld
3183 \end_inset
3184
3185 right
3186 \begin_inset Quotes erd
3187 \end_inset
3188
3189 .
3190  The footer is also divided into these three fields.
3191  The LaTeX commands to set these fields in the simplest manner are 
3192 \begin_inset Flex CharStyle:Code
3193 status collapsed
3194
3195 \begin_layout Plain Layout
3196
3197 \backslash
3198 lhead
3199 \end_layout
3200
3201 \end_inset
3202
3203
3204 \begin_inset Flex CharStyle:Code
3205 status collapsed
3206
3207 \begin_layout Plain Layout
3208
3209 \backslash
3210 chead
3211 \end_layout
3212
3213 \end_inset
3214
3215
3216 \begin_inset Flex CharStyle:Code
3217 status collapsed
3218
3219 \begin_layout Plain Layout
3220
3221 \backslash
3222 rhead
3223 \end_layout
3224
3225 \end_inset
3226
3227
3228 \begin_inset Flex CharStyle:Code
3229 status collapsed
3230
3231 \begin_layout Plain Layout
3232
3233 \backslash
3234 lfoot
3235 \end_layout
3236
3237 \end_inset
3238
3239 , etc.
3240  Suppose you wish to put your name in the upper left hand corner of each
3241  page.
3242  Simply insert the following command in the preamble: 
3243 \end_layout
3244
3245 \begin_layout Standard
3246
3247 \family typewriter
3248
3249 \backslash
3250 lhead{John Q.
3251  DocWriter}
3252 \end_layout
3253
3254 \begin_layout Standard
3255 You will now see your name in the upper left.
3256  If a field has a default entry that you would like to get rid of (often
3257  the page number appears in the central footer, simply include a command
3258  with a blank argument, e.
3259 \begin_inset space \thinspace{}
3260 \end_inset
3261
3262 g.:
3263 \end_layout
3264
3265 \begin_layout Standard
3266
3267 \family typewriter
3268
3269 \backslash
3270 cfoot{}
3271 \end_layout
3272
3273 \begin_layout Standard
3274 Let's get really fancy: lets put the section number with the word 
3275 \begin_inset Quotes eld
3276 \end_inset
3277
3278 Section
3279 \begin_inset Quotes erd
3280 \end_inset
3281
3282  (e.
3283 \begin_inset space \thinspace{}
3284 \end_inset
3285
3286 g.
3287 \begin_inset space \space{}
3288 \end_inset
3289
3290 Section 3) in the upper left, the page number (e.
3291 \begin_inset space \thinspace{}
3292 \end_inset
3293
3294 g.
3295 \begin_inset space \space{}
3296 \end_inset
3297
3298 Page 4) in the upper right, your name in the lower left, and the date in
3299  the lower right.
3300  The following commands should now appear in the preamble:
3301 \end_layout
3302
3303 \begin_layout Standard
3304
3305 \family typewriter
3306
3307 \backslash
3308 lhead{Section 
3309 \backslash
3310 thesection}
3311 \end_layout
3312
3313 \begin_layout Standard
3314
3315 \family typewriter
3316
3317 \backslash
3318 chead{}
3319 \end_layout
3320
3321 \begin_layout Standard
3322
3323 \family typewriter
3324
3325 \backslash
3326 rhead{Page 
3327 \backslash
3328 thepage}
3329 \end_layout
3330
3331 \begin_layout Standard
3332
3333 \family typewriter
3334
3335 \backslash
3336 lfoot{John Q.
3337  DocWriter}
3338 \end_layout
3339
3340 \begin_layout Standard
3341
3342 \family typewriter
3343
3344 \backslash
3345 cfoot{}
3346 \end_layout
3347
3348 \begin_layout Standard
3349
3350 \family typewriter
3351
3352 \backslash
3353 rfoot{
3354 \backslash
3355 today}
3356 \end_layout
3357
3358 \begin_layout Standard
3359 The commands 
3360 \begin_inset Flex CharStyle:Code
3361 status collapsed
3362
3363 \begin_layout Plain Layout
3364
3365 \backslash
3366 thesection
3367 \end_layout
3368
3369 \end_inset
3370
3371  and 
3372 \begin_inset Flex CharStyle:Code
3373 status collapsed
3374
3375 \begin_layout Plain Layout
3376
3377 \backslash
3378 thepage
3379 \end_layout
3380
3381 \end_inset
3382
3383  access LaTeX's section and page counters, and so print out the current
3384  section and page numbers.
3385  
3386 \begin_inset Flex CharStyle:Code
3387 status collapsed
3388
3389 \begin_layout Plain Layout
3390
3391 \backslash
3392 today
3393 \end_layout
3394
3395 \end_inset
3396
3397  simply prints out today's date.
3398 \end_layout
3399
3400 \begin_layout Standard
3401 The thicknesses of the horizontal rules drawn beneath the header and above
3402  the footer can also be modified.
3403  If you don't want one of the rules, set its thickness to 0.
3404  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3405  Use commands
3406 \family typewriter
3407  
3408 \family default
3409 like 
3410 \begin_inset Flex CharStyle:Code
3411 status collapsed
3412
3413 \begin_layout Plain Layout
3414
3415 \backslash
3416 renewcommand{
3417 \backslash
3418 headrulewidth}{0.4pt}
3419 \end_layout
3420
3421 \end_inset
3422
3423  and 
3424 \begin_inset Flex CharStyle:Code
3425 status collapsed
3426
3427 \begin_layout Plain Layout
3428
3429 \backslash
3430 renewcommand{
3431 \backslash
3432 footrulewidth}{0.4pt}
3433 \end_layout
3434
3435 \end_inset
3436
3437  to set the thicknesses.
3438 \end_layout
3439
3440 \begin_layout Standard
3441 You can switch the header/footer settings on and off for individual pages
3442  using commands like 
3443 \begin_inset Flex CharStyle:Code
3444 status collapsed
3445
3446 \begin_layout Plain Layout
3447
3448 \backslash
3449 thispagestyle{empty}
3450 \end_layout
3451
3452 \end_inset
3453
3454
3455 \begin_inset Flex CharStyle:Code
3456 status collapsed
3457
3458 \begin_layout Plain Layout
3459
3460 \backslash
3461 thispagestyle{plain}
3462 \end_layout
3463
3464 \end_inset
3465
3466 , and 
3467 \begin_inset Flex CharStyle:Code
3468 status collapsed
3469
3470 \begin_layout Plain Layout
3471
3472 \backslash
3473 thispagestyle{fancy}
3474 \end_layout
3475
3476 \end_inset
3477
3478 .
3479  Simply insert them in the text on the page you want changed and mark them
3480  as TeX code.
3481  In fact, title pages are marked as plain by default, while following pages
3482  are marked fancy when using the global fancy setting.
3483 \end_layout
3484
3485 \begin_layout Standard
3486 As a final example, it is possible to include an image in the header or
3487  footer.
3488  Suppose you want to put a company logo in the upper lefthand corner.
3489  You might try something like
3490 \end_layout
3491
3492 \begin_layout Standard
3493
3494 \family typewriter
3495
3496 \backslash
3497 lhead{
3498 \backslash
3499 resizebox{1in}{!}{
3500 \backslash
3501 includegraphics{logo.eps}}}
3502 \end_layout
3503
3504 \begin_layout Standard
3505 \noindent
3506 (you may need to preface this with 
3507 \begin_inset Flex CharStyle:Code
3508 status collapsed
3509
3510 \begin_layout Plain Layout
3511 \noindent
3512
3513 \backslash
3514 usepackage{graphics}
3515 \end_layout
3516
3517 \end_inset
3518
3519  if you don't include graphics elsewhere in your document).
3520 \end_layout
3521
3522 \begin_layout Section
3523 Itemize Bullet Selection
3524 \begin_inset CommandInset label
3525 LatexCommand label
3526 name "sec:bullet"
3527
3528 \end_inset
3529
3530
3531 \end_layout
3532
3533 \begin_layout Standard
3534 by
3535 \noun on
3536  Allan Rae
3537 \end_layout
3538
3539 \begin_layout Subsection
3540 Introduction
3541 \end_layout
3542
3543 \begin_layout Standard
3544 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3545  Using this dialog you can easily specify what bullet shape to use at each
3546  level of an itemized list.
3547  These settings are document-wide so you won't be able to specify different
3548  sets of bullets for different paragraphs.
3549 \begin_inset Foot
3550 status collapsed
3551
3552 \begin_layout Plain Layout
3553 Well, actually you can but you'll have to do it by hand.
3554 \end_layout
3555
3556 \end_inset
3557
3558
3559 \end_layout
3560
3561 \begin_layout Subsection
3562 How it looks
3563 \end_layout
3564
3565 \begin_layout Standard
3566 Open the dialog by selecting the 
3567 \begin_inset Flex CharStyle:MenuItem
3568 status collapsed
3569
3570 \begin_layout Plain Layout
3571 Document\SpecialChar \menuseparator
3572 Settings
3573 \end_layout
3574
3575 \end_inset
3576
3577  menu item and then select the 
3578 \begin_inset Flex CharStyle:MenuItem
3579 status collapsed
3580
3581 \begin_layout Plain Layout
3582 Bullets
3583 \end_layout
3584
3585 \end_inset
3586
3587  tab.
3588 \end_layout
3589
3590 \begin_layout Standard
3591 The dialog provides you with a table of bullet shapes.
3592  A column of buttons on the left of the table provides access to the six
3593  different panels of bullet shapes.
3594  The row of buttons across the top is used to select which bullet depth
3595  you are changing.
3596  A text entry under the table shows the currently selected bullet shape's
3597  LaTeX equivalent and this can be edited if desired.
3598  If you do modify the text you will also need to specify any needed packages
3599  in the LaTeX preamble.
3600 \end_layout
3601
3602 \begin_layout Standard
3603 The six panels are divided up by the packages they require.
3604  The following table shows the mappings from button name to LaTeX packages.
3605 \end_layout
3606
3607 \begin_layout Standard
3608 \align center
3609 \begin_inset Tabular
3610 <lyxtabular version="3" rows="7" columns="2">
3611 <features tabularvalignment="middle">
3612 <column alignment="center" valignment="top" width="0pt">
3613 <column alignment="center" valignment="top" width="0pt">
3614 <row>
3615 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3616 \begin_inset Text
3617
3618 \begin_layout Plain Layout
3619
3620 \family roman
3621 \series medium
3622 \shape up
3623 \size normal
3624 \emph off
3625 \bar no
3626 \noun off
3627 \color none
3628 Button
3629 \end_layout
3630
3631 \end_inset
3632 </cell>
3633 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3634 \begin_inset Text
3635
3636 \begin_layout Plain Layout
3637
3638 \family roman
3639 \series medium
3640 \shape up
3641 \size normal
3642 \emph off
3643 \bar no
3644 \noun off
3645 \color none
3646 Packages Required
3647 \end_layout
3648
3649 \end_inset
3650 </cell>
3651 </row>
3652 <row>
3653 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3654 \begin_inset Text
3655
3656 \begin_layout Plain Layout
3657
3658 \family sans
3659 \series medium
3660 \shape up
3661 \size normal
3662 \emph off
3663 \bar no
3664 \noun off
3665 \color none
3666 Standard
3667 \end_layout
3668
3669 \end_inset
3670 </cell>
3671 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3672 \begin_inset Text
3673
3674 \begin_layout Plain Layout
3675
3676 \series medium
3677 \shape up
3678 \size normal
3679 \emph off
3680 \bar no
3681 \noun off
3682 \color none
3683 base LaTeX
3684 \end_layout
3685
3686 \end_inset
3687 </cell>
3688 </row>
3689 <row>
3690 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3691 \begin_inset Text
3692
3693 \begin_layout Plain Layout
3694
3695 \family sans
3696 \series medium
3697 \shape up
3698 \size normal
3699 \emph off
3700 \bar no
3701 \noun off
3702 \color none
3703 Maths
3704 \end_layout
3705
3706 \end_inset
3707 </cell>
3708 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3709 \begin_inset Text
3710
3711 \begin_layout Plain Layout
3712
3713 \family typewriter
3714 \series medium
3715 \shape up
3716 \size normal
3717 \emph off
3718 \bar no
3719 \noun off
3720 \color none
3721 amssymb.sty
3722 \end_layout
3723
3724 \end_inset
3725 </cell>
3726 </row>
3727 <row>
3728 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3729 \begin_inset Text
3730
3731 \begin_layout Plain Layout
3732
3733 \family sans
3734 \series medium
3735 \shape up
3736 \size normal
3737 \emph off
3738 \bar no
3739 \noun off
3740 \color none
3741 Ding1
3742 \end_layout
3743
3744 \end_inset
3745 </cell>
3746 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3747 \begin_inset Text
3748
3749 \begin_layout Plain Layout
3750
3751 \family typewriter
3752 \series medium
3753 \shape up
3754 \size normal
3755 \emph off
3756 \bar no
3757 \noun off
3758 \color none
3759 pifont.sty
3760 \end_layout
3761
3762 \end_inset
3763 </cell>
3764 </row>
3765 <row>
3766 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3767 \begin_inset Text
3768
3769 \begin_layout Plain Layout
3770
3771 \family sans
3772 \series medium
3773 \shape up
3774 \size normal
3775 \emph off
3776 \bar no
3777 \noun off
3778 \color none
3779 Ding2
3780 \end_layout
3781
3782 \end_inset
3783 </cell>
3784 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3785 \begin_inset Text
3786
3787 \begin_layout Plain Layout
3788
3789 \family typewriter
3790 \series medium
3791 \shape up
3792 \size normal
3793 \emph off
3794 \bar no
3795 \noun off
3796 \color none
3797 pifont.sty
3798 \end_layout
3799
3800 \end_inset
3801 </cell>
3802 </row>
3803 <row>
3804 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3805 \begin_inset Text
3806
3807 \begin_layout Plain Layout
3808
3809 \family sans
3810 \series medium
3811 \shape up
3812 \size normal
3813 \emph off
3814 \bar no
3815 \noun off
3816 \color none
3817 Ding3
3818 \end_layout
3819
3820 \end_inset
3821 </cell>
3822 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3823 \begin_inset Text
3824
3825 \begin_layout Plain Layout
3826
3827 \family typewriter
3828 \series medium
3829 \shape up
3830 \size normal
3831 \emph off
3832 \bar no
3833 \noun off
3834 \color none
3835 pifont.sty
3836 \end_layout
3837
3838 \end_inset
3839 </cell>
3840 </row>
3841 <row>
3842 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3843 \begin_inset Text
3844
3845 \begin_layout Plain Layout
3846
3847 \family sans
3848 \series medium
3849 \shape up
3850 \size normal
3851 \emph off
3852 \bar no
3853 \noun off
3854 \color none
3855 Ding4
3856 \end_layout
3857
3858 \end_inset
3859 </cell>
3860 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3861 \begin_inset Text
3862
3863 \begin_layout Plain Layout
3864
3865 \family typewriter
3866 \series medium
3867 \shape up
3868 \size normal
3869 \emph off
3870 \bar no
3871 \noun off
3872 \color none
3873 pifont.sty
3874 \end_layout
3875
3876 \end_inset
3877 </cell>
3878 </row>
3879 </lyxtabular>
3880
3881 \end_inset
3882
3883
3884 \end_layout
3885
3886 \begin_layout Standard
3887 LyX doesn't stop you using bullets from packages you don't have.
3888  If you get errors from LaTeX when you try to view or print the file, then
3889  it is likely you are missing a package.
3890 \begin_inset Foot
3891 status collapsed
3892
3893 \begin_layout Plain Layout
3894 LyX doesn't restrict your use since you may be editing locally and exporting
3895  elsewhere.
3896 \end_layout
3897
3898 \end_inset
3899
3900
3901 \end_layout
3902
3903 \begin_layout Subsection
3904 How to use it
3905 \end_layout
3906
3907 \begin_layout Standard
3908 Select which bullet depth you want to change then select the bullet shape
3909  and size.
3910  Any changes will not be visible in LyX, but are visible when viewing the
3911  document.
3912 \end_layout
3913
3914 \begin_layout Standard
3915 You can reset a bullet shape to the default simply by clicking your right
3916  mouse button on the appropriate bullet depth button.
3917 \begin_inset Foot
3918 status collapsed
3919
3920 \begin_layout Plain Layout
3921 If you 
3922 \emph on
3923 really
3924 \emph default
3925  want to have multiple sets of paragraphs with different sets of bullets
3926  in each, then you're going to have to get your hands dirty with TeX code.
3927  The bullet selection dialog can help though because it provides you with
3928  the LaTeX code for a wide range of bullet shapes.
3929  To make your own custom paragraphs you have the following options:
3930 \end_layout
3931
3932 \begin_layout Plain Layout
3933 \begin_inset ERT
3934 status open
3935
3936 \begin_layout Plain Layout
3937
3938
3939 \backslash
3940 let
3941 \backslash
3942 savelabelitemi=
3943 \backslash
3944 labelitemi
3945 \end_layout
3946
3947 \end_inset
3948
3949
3950 \end_layout
3951
3952 \begin_layout Plain Layout
3953 \begin_inset ERT
3954 status open
3955
3956 \begin_layout Plain Layout
3957
3958
3959 \backslash
3960 renewcommand
3961 \backslash
3962 labelitemi[0]{
3963 \backslash
3964 small
3965 \backslash
3966 (
3967 \backslash
3968 sharp
3969 \backslash
3970 )}
3971 \end_layout
3972
3973 \end_inset
3974
3975
3976 \end_layout
3977
3978 \begin_layout Itemize
3979 Use the LaTeX command 
3980 \begin_inset Flex CharStyle:Code
3981 status collapsed
3982
3983 \begin_layout Plain Layout
3984
3985 \backslash
3986 renewcommand{}{}
3987 \end_layout
3988
3989 \end_inset
3990
3991  to specify a new bullet shape for a given depth.
3992  You'll also need to save the current bullet shape so you can restore it
3993  again afterwards.
3994  In this itemized list the following LaTeX code was used to change the bullet
3995  used for the first depth.
3996 \end_layout
3997
3998 \begin_deeper
3999 \begin_layout LyX-Code
4000
4001 \backslash
4002 let
4003 \backslash
4004 savelabelitemi=
4005 \backslash
4006 labelitemi 
4007 \end_layout
4008
4009 \begin_layout LyX-Code
4010
4011 \backslash
4012 renewcommand
4013 \backslash
4014 labelitemi[0]{
4015 \backslash
4016 small
4017 \backslash
4018 (
4019 \backslash
4020 sharp
4021 \backslash
4022 )}
4023 \end_layout
4024
4025 \end_deeper
4026 \begin_layout Itemize
4027 Note that the itemize depth is specified in Roman numerals as part of the
4028  
4029 \family typewriter
4030
4031 \backslash
4032 labelitem
4033 \family default
4034  command.
4035 \end_layout
4036
4037 \begin_layout Itemize
4038 \begin_inset ERT
4039 status open
4040
4041 \begin_layout Plain Layout
4042
4043 [
4044 \backslash
4045 (
4046 \backslash
4047 star
4048 \backslash
4049 )]
4050 \end_layout
4051
4052 \end_inset
4053
4054  Specify each individual entry by starting each item with the bullet shape
4055  enclosed in square brackets and set as 
4056 \begin_inset Flex CharStyle:MenuItem
4057 status collapsed
4058
4059 \begin_layout Plain Layout
4060 TeX Code
4061 \end_layout
4062
4063 \end_inset
4064
4065 .
4066  For example, this item was started with 
4067 \begin_inset Flex CharStyle:Code
4068 status collapsed
4069
4070 \begin_layout Plain Layout
4071 [
4072 \backslash
4073 (
4074 \backslash
4075 star
4076 \backslash
4077 )]
4078 \end_layout
4079
4080 \end_inset
4081
4082 .
4083 \end_layout
4084
4085 \begin_layout Plain Layout
4086 \begin_inset ERT
4087 status open
4088
4089 \begin_layout Plain Layout
4090
4091
4092 \backslash
4093 renewcommand
4094 \backslash
4095 labelitemi[0]{
4096 \backslash
4097 savelabelitemi}
4098 \end_layout
4099
4100 \end_inset
4101
4102
4103 \end_layout
4104
4105 \begin_layout Plain Layout
4106 You'll also need to revert the labelitem back to its previous setting for
4107  the global bullet shape settings to remain in effect.
4108  The way used here was:
4109 \end_layout
4110
4111 \begin_layout LyX-Code
4112
4113 \backslash
4114 renewcommand
4115 \backslash
4116 labelitemi[0]{
4117 \backslash
4118 savelabelitemi}
4119 \end_layout
4120
4121 \end_inset
4122
4123
4124 \end_layout
4125
4126 \begin_layout Chapter
4127 LyX and the World Wide Web
4128 \end_layout
4129
4130 \begin_layout Standard
4131 LyX has long supported the export of documents to various web-friendly formats,
4132  such as HTML.
4133  Before verson 1.7, however, HTML export was always accomplished by the use
4134  of external converters.
4135 \begin_inset Foot
4136 status collapsed
4137
4138 \begin_layout Plain Layout
4139 For details on the use of external converters with LyX, see the 
4140 \size normal
4141 \emph on
4142 Converters
4143 \emph default
4144  section of the Customization manual.
4145 \end_layout
4146
4147 \end_inset
4148
4149  These fall into two large groups: there are converters that use LaTeX as
4150  an intermediate format, such as 
4151 \begin_inset Flex CharStyle:Code
4152 status collapsed
4153
4154 \begin_layout Plain Layout
4155 htlatex
4156 \end_layout
4157
4158 \end_inset
4159
4160
4161 \begin_inset Flex CharStyle:Code
4162 status collapsed
4163
4164 \begin_layout Plain Layout
4165 html2latex
4166 \end_layout
4167
4168 \end_inset
4169
4170 , and 
4171 \begin_inset Flex CharStyle:Code
4172 status collapsed
4173
4174 \begin_layout Plain Layout
4175 plastex
4176 \end_layout
4177
4178 \end_inset
4179
4180 , relying upon LyX to produce the LaTeX; and there is a converter that works
4181  directly on LyX files, 
4182 \begin_inset Flex CharStyle:Code
4183 status collapsed
4184
4185 \begin_layout Plain Layout
4186 eLyXer
4187 \end_layout
4188
4189 \end_inset
4190
4191 .
4192  All of these have different advantages and disadvantages.
4193  
4194 \end_layout
4195
4196 \begin_layout Standard
4197 The LaTeX-based converters have the advantage that, in principle, they know
4198  everything about the exported document that LaTeX does.
4199  Such converters do not care, for example, if a certain block of code was
4200  produced by LyX or was Evil Red Text.
4201  They know about 
4202 \begin_inset Flex CharStyle:Code
4203 status collapsed
4204
4205 \begin_layout Plain Layout
4206 aux
4207 \end_layout
4208
4209 \end_inset
4210
4211  files, counters, and references, and can often make use of the 
4212 \begin_inset Flex CharStyle:Code
4213 status collapsed
4214
4215 \begin_layout Plain Layout
4216 bbl
4217 \end_layout
4218
4219 \end_inset
4220
4221  files generated by BibTeX.
4222  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4223  said that only TeX itself understands TeX---and LaTeX-based converters
4224  will often choke on what seem to be quite simple constructs; complex ones
4225  can throw them completely, and as of this writing, for example, the 
4226 \emph on
4227 Embedded Objects
4228 \emph default
4229  manual will not export with 
4230 \begin_inset Flex CharStyle:Code
4231 status collapsed
4232
4233 \begin_layout Plain Layout
4234 htlatex
4235 \end_layout
4236
4237 \end_inset
4238
4239 , though the others will.
4240  The other issue concerns how math is handled.
4241  These converters typically convert the formulae into little pictures that
4242  are then linked from the HTML document.
4243  Since these are actually generated by LaTeX, they are accurate.
4244  But they do not scale well, and just getting them to look as if they are
4245  actually meant to be in your document---so that the font sizes seem to
4246  be roughly the same---can be a challenge.
4247 \end_layout
4248
4249 \begin_layout Standard
4250 Alex Fernandez's 
4251 \begin_inset Flex CharStyle:Code
4252 status collapsed
4253
4254 \begin_layout Plain Layout
4255 eLyXer
4256 \end_layout
4257
4258 \end_inset
4259
4260  solves some of these problems.
4261  In particular, its rendering of math tends to look better than 
4262 \begin_inset Flex CharStyle:Code
4263 status collapsed
4264
4265 \begin_layout Plain Layout
4266 htlatex
4267 \end_layout
4268
4269 \end_inset
4270
4271 's, at least in simpler cases, since it renders math using a neat combination
4272  of HTML and CSS rather than converting the formulae to images.
4273  But more complex formula tend to be rendered less well than with 
4274 \begin_inset Flex CharStyle:Code
4275 status collapsed
4276
4277 \begin_layout Plain Layout
4278 htlatex
4279 \end_layout
4280
4281 \end_inset
4282
4283 , since there is no reasonable way of scaling parentheses in HTML, for example.
4284  More importantly (as of version 0.39, at least), 
4285 \begin_inset Flex CharStyle:Code
4286 status collapsed
4287
4288 \begin_layout Plain Layout
4289 eLyXer
4290 \end_layout
4291
4292 \end_inset
4293
4294  has no support for math macros, for user-defined paragraph or character
4295  styles, or for tables of contents and figures.
4296  These limitations make 
4297 \begin_inset Flex CharStyle:Code
4298 status collapsed
4299
4300 \begin_layout Plain Layout
4301 eLyXer
4302 \end_layout
4303
4304 \end_inset
4305
4306  unsuitable for many of the documents more advanced LyX users would produce.
4307  In principle, of course, all of these problems could be solved, but the
4308  LyX developers have decided to follow a different path and made LyX itself
4309  capable of writing XHTML, just as it is capable of writing LaTeX, DocBook,
4310  and plaintext.
4311 \end_layout
4312
4313 \begin_layout Standard
4314 As of this writing, XHTML output remains under development and should probably
4315  be regarded as 
4316 \begin_inset Quotes eld
4317 \end_inset
4318
4319 experimental
4320 \begin_inset Quotes erd
4321 \end_inset
4322
4323 .
4324 \begin_inset Foot
4325 status collapsed
4326
4327 \begin_layout Plain Layout
4328 The file 
4329 \begin_inset Flex CharStyle:Code
4330 status collapsed
4331
4332 \begin_layout Plain Layout
4333 development/HTML.notes
4334 \end_layout
4335
4336 \end_inset
4337
4338 , which can be found in the LyX source tree or 
4339 \begin_inset CommandInset href
4340 LatexCommand href
4341 name "accessed online"
4342 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4343
4344 \end_inset
4345
4346 , usually contains up-to-date information about the state of XHTML output.
4347 \end_layout
4348
4349 \end_inset
4350
4351  Still, the developers have chosen this approach because it has several
4352  potential advantages over the other two.
4353 \end_layout
4354
4355 \begin_layout Standard
4356 These advantages are primarily due to the fact that the XHTML output routines,
4357  since they are part of LyX, know everything LyX knows about the document
4358  being exported.
4359 \begin_inset Foot
4360 status collapsed
4361
4362 \begin_layout Plain Layout
4363 Another advantege is that, since these routines are internal to LyX, they
4364  are immune to changes in LyX's file format, or to changes in the semantics
4365  of existing insets.
4366 \end_layout
4367
4368 \end_inset
4369
4370  So they know about the table of contents (as displayed in the Outline),
4371  about the counters associated with different paragraph styles, and about
4372  user-defined styles.
4373  The XHTML output routines know what LyX knows about internationalization,
4374  too, so they will output 
4375 \begin_inset Quotes eld
4376 \end_inset
4377
4378 Chapter 1
4379 \begin_inset Quotes erd
4380 \end_inset
4381
4382  or 
4383 \begin_inset Quotes eld
4384 \end_inset
4385
4386
4387 \lang ngerman
4388 Kapitel
4389 \lang english
4390  1
4391 \begin_inset Quotes erd
4392 \end_inset
4393
4394 , depending upon the language in effect at the time.
4395  
4396 \end_layout
4397
4398 \begin_layout Standard
4399 Quite generally, the output routines know everything LyX knows about document
4400  layout, that is, about the document is to be rendered on screen.
4401  We can use this information when we output the document as XHTML.
4402  In particular, LyX 
4403 \emph on
4404 automatically
4405 \emph default
4406  generates CSS style information corresponding to the layout information
4407  it uses to render the document on screen: if section headings are supposed
4408  to be sans-serif and bold as seen in LyX, then (by default) they will be
4409  sans-serif and bold when viewed in a web browser, too.
4410  And this is true not just for pre-defined styles, like Section, but for
4411  any style, including user-defined styles.
4412   Indeed, the XHTML output routines make no distinction between user-defined
4413  paragraph and character styles and LyX's own pre-defined styles: in each
4414  case, everything LyX knows about the styles is contained in the layout
4415  files.
4416  And much the same is true as regards pre-defined textual insets, such as
4417  footnotes, and custom versions.
4418  
4419 \end_layout
4420
4421 \begin_layout Standard
4422 The result is that XHTML output can be customized and extended in 
4423 \emph on
4424 exactly
4425 \emph default
4426  the same way LaTeX output can be customized and extended: through layout
4427  files and modules.
4428  See chapter five of the 
4429 \emph on
4430 Customization 
4431 \emph default
4432 manual for the details.
4433 \end_layout
4434
4435 \begin_layout Standard
4436 As for math, LyX renders math using MathML.
4437  This has advantages and disadvantages.
4438  The advantage is that MathML is a dialect of XML designed specifically
4439  for mathematics on the web, and it typically renders very well in browsers
4440  that support it.
4441  The first disadvantage is that not all browsers support MathML, and support
4442  is not complete even in the Gecko-based browsers, such as Firefox.
4443  A second disadvantage, as compared to rendering math by images, is that
4444  LyX can only output MathML for LaTeX constructs that it knows about, which
4445  means that the use of ERT in math---e.g., the command 
4446 \begin_inset Flex CharStyle:Code
4447 status collapsed
4448
4449 \begin_layout Plain Layout
4450
4451 \backslash
4452 BGassert
4453 \end_layout
4454
4455 \end_inset
4456
4457  from the 
4458 \begin_inset Flex CharStyle:Code
4459 status collapsed
4460
4461 \begin_layout Plain Layout
4462 begriff.sty
4463 \end_layout
4464
4465 \end_inset
4466
4467  package---will produce nothing helpful.
4468  Eventually, therefore, LyX will offer the user the option to use MathML
4469  or images, and it will offer this choice on a case by case basis.
4470 \end_layout
4471
4472 \begin_layout Standard
4473 The remainder of this chapter contains more detailed information on XHTML
4474  output, its limitations, and ways around those limitations.
4475 \end_layout
4476
4477 \begin_layout Standard
4478 \begin_inset Note Note
4479 status open
4480
4481 \begin_layout Plain Layout
4482 This is very incomplete at this point!
4483 \end_layout
4484
4485 \end_inset
4486
4487
4488 \end_layout
4489
4490 \begin_layout Section
4491 Bibliography and Citations
4492 \end_layout
4493
4494 \begin_layout Standard
4495 XHTML output fully supports bibliographies and citations.
4496  
4497 \end_layout
4498
4499 \begin_layout Standard
4500 Citation labels are generated by exactly the same machinery that generates
4501  LyX's on-screen labels, so the labels will look in the output much as they
4502  do in LyX, though better.
4503  If you are using numerical citations, then LyX will output numerical labels,
4504  such as [1] or [17], rather than simply showing the citation key in square
4505  brackets, as it does on-screen.
4506  If you are using author-year citations, then LyX will add lowercase letters
4507  to the years, just as BibTeX does, if it finds more than one citation for
4508  a given author-year combination.
4509  The labels will be printed with the bibliography entries.
4510  Note that there is, at present, no way to customize the appearance of the
4511  labels, for example, to choose between square brackets and parentheses.
4512 \end_layout
4513
4514 \begin_layout Standard
4515 Bibliography output is handled by the same machinery that handles the presentati
4516 on of reference information in the citation dialog, so you will see in the
4517  XHTML output pretty much what you would see if you were to look at a given
4518  entry in the citation dialog.
4519  The formatting can be customized in your layout file or, preferably, in
4520  a module.
4521  See Section 
4522 \begin_inset CommandInset ref
4523 LatexCommand ref
4524 reference "sub:Citation-format-description"
4525
4526 \end_inset
4527
4528  of the 
4529 \emph on
4530 Customization
4531 \emph default
4532  manual for the details.
4533 \end_layout
4534
4535 \begin_layout Standard
4536 The other significant defect is that cross-referenced information is printed
4537  with every entry with which it is associated.
4538  So you can see things like this:
4539 \end_layout
4540
4541 \begin_layout Quote
4542 Jason Stanley, 
4543 \begin_inset Quotes eld
4544 \end_inset
4545
4546 Context and Logical Form
4547 \begin_inset Quotes erd
4548 \end_inset
4549
4550 , in 
4551 \emph on
4552 Language in Context: Selected Essays
4553 \emph default
4554  (Oxford: Oxford University Press, 2007), pp.
4555  30--68.
4556 \end_layout
4557
4558 \begin_layout Quote
4559 Jason Stanley, 
4560 \begin_inset Quotes eld
4561 \end_inset
4562
4563 Semantics in Context
4564 \begin_inset Quotes erd
4565 \end_inset
4566
4567 , in 
4568 \emph on
4569 Language in Context: Selected Essays
4570 \emph default
4571  (Oxford: Oxford University Press, 2007), pp.
4572  201--30.
4573 \end_layout
4574
4575 \begin_layout Standard
4576 This should be fixed before long.
4577 \end_layout
4578
4579 \begin_layout Standard
4580 There is no support at present for sectioned bibliographies.
4581  If you have multiple bibliographies, then LyX will print the same bibliography
4582  over and over.
4583 \end_layout
4584
4585 \begin_layout Section
4586 Indexes
4587 \end_layout
4588
4589 \begin_layout Standard
4590 LyX will happily export indexes as XHTML, but with certain limitations at
4591  the moment.
4592 \end_layout
4593
4594 \begin_layout Standard
4595 Index export will be most reliable when you do not attempt to use the fancy
4596  constructs that are described in the section on indexes in the 
4597 \emph on
4598 User's Guide
4599 \emph default
4600 .
4601 \begin_inset Foot
4602 status collapsed
4603
4604 \begin_layout Plain Layout
4605 The main issue here is that LyX itself does not really handle these.
4606  It just lets you enter what you would have to enter in raw LaTeX.
4607 \end_layout
4608
4609 \end_inset
4610
4611  We'll describe how they are handled using the subsection headings from
4612  that section.
4613 \end_layout
4614
4615 \begin_layout Itemize
4616 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4617  these, but the entries must be separated by 
4618 \begin_inset Quotes eld
4619 \end_inset
4620
4621  ! 
4622 \begin_inset Quotes erd
4623 \end_inset
4624
4625 , that is, there must be spaces around the exclamation point.
4626  This is because it is otherwise too difficult to check for escaped exclamation
4627  points, ones in math, and so forth.
4628 \end_layout
4629
4630 \begin_layout Itemize
4631 Page Ranges: There is no support at all for page ranges, since these make
4632  no sense with XHMTL.
4633  Instead, you will just get two index entries, one at either end.
4634 \end_layout
4635
4636 \begin_layout Itemize
4637 Cross-referencing: There is no support for cross-referencing.
4638  If LyX finds an entry containing the 
4639 \begin_inset Quotes eld
4640 \end_inset
4641
4642 |see\SpecialChar \ldots{}
4643
4644 \begin_inset Quotes erd
4645 \end_inset
4646
4647  construct, it is just dropped, and the rest is treated as an ordinary index
4648  entry.
4649 \end_layout
4650
4651 \begin_layout Itemize
4652 Index Entry Order: LyX does support attempts to fix the sorting order.
4653  It will take what is before the first `@' it finds and use that for sorting,
4654  taking what follows the first `@' to be the actual entry.
4655  At present, LyX does not check for escaped `@', so do not try to index
4656  email addresses.
4657 \end_layout
4658
4659 \begin_layout Itemize
4660 Index Entry Layout: You can format entries by using the text style dialog,
4661  or by using any other method available within LyX itself.
4662  There is no support for constructs like: 
4663 \begin_inset Quotes eld
4664 \end_inset
4665
4666 entry|textbf
4667 \begin_inset Quotes erd
4668 \end_inset
4669
4670 .
4671  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
4672  and everything that follows it.
4673 \end_layout
4674
4675 \begin_layout Itemize
4676 Multiple Indexes: There is no support for multiple indexes.
4677  Rather, all index entries will be printed as one large index.
4678  To avoid our printing several versions of the index, we print only the
4679  main index, so make sure you have one.
4680 \end_layout
4681
4682 \begin_layout Section
4683 Nomenclature and Glossary
4684 \end_layout
4685
4686 \begin_layout Standard
4687 There is at present no support for glossaries.
4688 \end_layout
4689
4690 \begin_layout Chapter
4691 The LyX Server
4692 \end_layout
4693
4694 \begin_layout Section
4695 Introduction
4696 \end_layout
4697
4698 \begin_layout Standard
4699 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4700  and retrieve information about the LyX internal state.
4701  This is only intended for advanced users, but they should find it useful.
4702  It is by writing to the LyX server, for example, that bibliography managers,
4703  such as JabRef, are able to 
4704 \begin_inset Quotes eld
4705 \end_inset
4706
4707 push
4708 \begin_inset Quotes erd
4709 \end_inset
4710
4711  citations to LyX.
4712 \end_layout
4713
4714 \begin_layout Section
4715 Starting the LyX Server
4716 \end_layout
4717
4718 \begin_layout Standard
4719 The LyX server works through the use of a pair of named pipes.
4720  These are usually located in 
4721 \begin_inset Flex CharStyle:Code
4722 status collapsed
4723
4724 \begin_layout Plain Layout
4725 UserDir
4726 \end_layout
4727
4728 \end_inset
4729
4730 , (except on Windows, where 
4731 \emph on
4732 local
4733 \emph default
4734  named pipes are special objects located in 
4735 \begin_inset Flex CharStyle:Code
4736 status collapsed
4737
4738 \begin_layout Plain Layout
4739
4740 \backslash
4741
4742 \backslash
4743 .
4744 \backslash
4745 pipe
4746 \end_layout
4747
4748 \end_inset
4749
4750 ) and have the names 
4751 \begin_inset Quotes eld
4752 \end_inset
4753
4754
4755 \begin_inset Flex CharStyle:Code
4756 status collapsed
4757
4758 \begin_layout Plain Layout
4759 lyxpipe.in
4760 \end_layout
4761
4762 \end_inset
4763
4764
4765 \begin_inset Quotes erd
4766 \end_inset
4767
4768  and 
4769 \begin_inset Quotes eld
4770 \end_inset
4771
4772
4773 \begin_inset Flex CharStyle:Code
4774 status collapsed
4775
4776 \begin_layout Plain Layout
4777 lyxpipe.out
4778 \end_layout
4779
4780 \end_inset
4781
4782
4783 \begin_inset Quotes erd
4784 \end_inset
4785
4786 .
4787  External programs write into 
4788 \begin_inset Flex CharStyle:Code
4789 status collapsed
4790
4791 \begin_layout Plain Layout
4792 lyxpipe.in
4793 \end_layout
4794
4795 \end_inset
4796
4797  and read back data from 
4798 \begin_inset Flex CharStyle:Code
4799 status collapsed
4800
4801 \begin_layout Plain Layout
4802 lyxpipe.out
4803 \end_layout
4804
4805 \end_inset
4806
4807 .
4808  The stem of the pipe names can be defined in the 
4809 \begin_inset Flex CharStyle:MenuItem
4810 status collapsed
4811
4812 \begin_layout Plain Layout
4813 Tools\SpecialChar \menuseparator
4814 Preferences
4815 \end_layout
4816
4817 \end_inset
4818
4819  dialog, for example 
4820 \begin_inset Flex CharStyle:Code
4821 status collapsed
4822
4823 \begin_layout Plain Layout
4824 "/home/myhome/lyxpipe"
4825 \end_layout
4826
4827 \end_inset
4828
4829 , or 
4830 \begin_inset Flex CharStyle:Code
4831 status collapsed
4832
4833 \begin_layout Plain Layout
4834 "
4835 \backslash
4836
4837 \backslash
4838 .
4839 \backslash
4840 pipe
4841 \backslash
4842 lyxpipe"
4843 \end_layout
4844
4845 \end_inset
4846
4847  on Windows.
4848  You 
4849 \emph on
4850 must
4851 \emph default
4852  configure this manually in order for the server to start.
4853 \end_layout
4854
4855 \begin_layout Standard
4856 LyX will add the '
4857 \begin_inset Flex CharStyle:Code
4858 status collapsed
4859
4860 \begin_layout Plain Layout
4861 .in
4862 \end_layout
4863
4864 \end_inset
4865
4866 ' and '
4867 \begin_inset Flex CharStyle:Code
4868 status collapsed
4869
4870 \begin_layout Plain Layout
4871 .out
4872 \end_layout
4873
4874 \end_inset
4875
4876 ' to create the pipes.
4877  If one of the pipes already exists, LyX will assume that another LyX process
4878  is already running and will not start the server.
4879  On POSIX (Unix like) systems, if for some other reason, an unused 
4880 \begin_inset Quotes eld
4881 \end_inset
4882
4883 stale
4884 \begin_inset Quotes erd
4885 \end_inset
4886
4887  pipe is left in existence when LyX closes, then LyX will try to delete
4888  it.
4889  If this fails for some reason, you will need to delete the pipes manually
4890  and then restart LyX.
4891  On Windows, pipes are deleted by the OS on program termination or crash,
4892  so 
4893 \begin_inset Quotes eld
4894 \end_inset
4895
4896 stale
4897 \begin_inset Quotes erd
4898 \end_inset
4899
4900  pipes should not be possible.
4901 \end_layout
4902
4903 \begin_layout Standard
4904 To have several LyX processes with servers at the same time, you have to
4905  use different configurations, perhaps by using separate user directories,
4906  each with its own 
4907 \begin_inset Flex CharStyle:Code
4908 status collapsed
4909
4910 \begin_layout Plain Layout
4911 preferences
4912 \end_layout
4913
4914 \end_inset
4915
4916  file, for each process.
4917 \end_layout
4918
4919 \begin_layout Standard
4920 If you are developing a client program, you might find it useful to enable
4921  debugging information from the LyX server.
4922  Do this by starting LyX as 
4923 \begin_inset Flex CharStyle:Code
4924 status collapsed
4925
4926 \begin_layout Plain Layout
4927 lyx -dbg lyxserver
4928 \end_layout
4929
4930 \end_inset
4931
4932 .
4933 \end_layout
4934
4935 \begin_layout Standard
4936 You can find a complete example client written in C in the source distribution
4937  as 
4938 \begin_inset Flex CharStyle:Code
4939 status collapsed
4940
4941 \begin_layout Plain Layout
4942 development/lyxserver/server_monitor.c
4943 \end_layout
4944
4945 \end_inset
4946
4947 .
4948 \end_layout
4949
4950 \begin_layout Standard
4951 Another useful tool is command-line based client you will find in 
4952 \begin_inset Flex CharStyle:Code
4953 status collapsed
4954
4955 \begin_layout Plain Layout
4956 src/client/lyxclient
4957 \end_layout
4958
4959 \end_inset
4960
4961 .
4962 \end_layout
4963
4964 \begin_layout Section
4965 Normal communication
4966 \end_layout
4967
4968 \begin_layout Standard
4969 To issue a LyX call, the client writes a line of ASCII text into the input
4970  pipe.
4971  This line has the following format:
4972 \end_layout
4973
4974 \begin_layout Quote
4975 LYXCMD:
4976 \emph on
4977 clientname
4978 \emph default
4979 :
4980 \emph on
4981 function
4982 \emph default
4983 :
4984 \emph on
4985 argument
4986 \end_layout
4987
4988 \begin_layout Description
4989 clientname is a name that the client can choose arbitrarily.
4990  Its only use is that LyX will echo it if it sends an answer—so a client
4991  can dispatch results from different requesters.
4992 \end_layout
4993
4994 \begin_layout Description
4995 function is the function you want LyX to perform.
4996  It is the same as the commands you'd use in the minibuffer.
4997 \end_layout
4998
4999 \begin_layout Description
5000 argument is an optional argument which is meaningful only to some functions
5001  (for instance, the 
5002 \begin_inset Quotes eld
5003 \end_inset
5004
5005 self-insert
5006 \begin_inset Quotes erd
5007 \end_inset
5008
5009  LFUN will insert the argument as text at the cursor position).
5010 \end_layout
5011
5012 \begin_layout Standard
5013 The answer from LyX will arrive in the output pipe and be of the form
5014 \end_layout
5015
5016 \begin_layout Quote
5017 INFO:
5018 \emph on
5019 clientname
5020 \emph default
5021 :
5022 \emph on
5023 function
5024 \emph default
5025 :
5026 \emph on
5027 data
5028 \end_layout
5029
5030 \begin_layout Standard
5031 where 
5032 \emph on
5033 clientname
5034 \emph default
5035  and 
5036 \emph on
5037 function
5038 \emph default
5039  are just echoed from the command request, while 
5040 \emph on
5041 data
5042 \emph default
5043  is more or less useful information filled according to how the command
5044  execution worked out.
5045  Some commands, such as 
5046 \begin_inset Quotes eld
5047 \end_inset
5048
5049 font-state
5050 \begin_inset Quotes erd
5051 \end_inset
5052
5053 , will return information about the internal state of LyX, while other will
5054  return an empty data-response.
5055  This means that the command execution went fine.
5056 \end_layout
5057
5058 \begin_layout Standard
5059 In case of errors, the response from LyX will have this form
5060 \end_layout
5061
5062 \begin_layout Quote
5063 ERROR:
5064 \emph on
5065 clientname
5066 \emph default
5067 :
5068 \emph on
5069 function
5070 \emph default
5071 :
5072 \emph on
5073 error message
5074 \end_layout
5075
5076 \begin_layout Standard
5077 where the 
5078 \emph on
5079 error message
5080 \emph default
5081  should contain an explanation of why the command failed.
5082 \end_layout
5083
5084 \begin_layout Standard
5085 Examples:
5086 \end_layout
5087
5088 \begin_layout LyX-Code
5089 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5090 \begin_inset Newline newline
5091 \end_inset
5092
5093 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5094 \begin_inset Newline newline
5095 \end_inset
5096
5097 read a <~/.lyxpipe.out
5098 \begin_inset Newline newline
5099 \end_inset
5100
5101 echo $a
5102 \end_layout
5103
5104 \begin_layout Section
5105 Notification
5106 \end_layout
5107
5108 \begin_layout Standard
5109 LyX can notify clients of events going on asynchronously.
5110  Currently it will only do this if the user binds a key sequence with the
5111  function 
5112 \begin_inset Quotes eld
5113 \end_inset
5114
5115 notify
5116 \begin_inset Quotes erd
5117 \end_inset
5118
5119 .
5120  The format of the string LyX sends is as follows:
5121 \end_layout
5122
5123 \begin_layout Quote
5124 \begin_inset Flex CharStyle:Code
5125 status collapsed
5126
5127 \begin_layout Plain Layout
5128 NOTIFY:
5129 \end_layout
5130
5131 \end_inset
5132
5133
5134 \emph on
5135 key-sequence
5136 \end_layout
5137
5138 \begin_layout Standard
5139 where 
5140 \emph on
5141 key-sequence
5142 \emph default
5143  is the printed representation of the key sequence that was actually typed
5144  by the user.
5145 \end_layout
5146
5147 \begin_layout Standard
5148 This mechanism can be used to extend LyX's command set and implement macros.
5149  Bind some key sequence to 
5150 \begin_inset Quotes eld
5151 \end_inset
5152
5153 notify
5154 \begin_inset Quotes erd
5155 \end_inset
5156
5157 .
5158  Then start a client that listens on the output pipe, dispatches the command
5159  according to the sequence, and starts a function that may use LyX calls
5160  and LyX requests to issue a command or a series of commands to LyX.
5161 \end_layout
5162
5163 \begin_layout Section
5164 The simple LyX Server Protocol
5165 \end_layout
5166
5167 \begin_layout Standard
5168 LyX implements a simple protocol that can be used for session management.
5169  All messages are of the form
5170 \end_layout
5171
5172 \begin_layout Quote
5173 LYXSRV:
5174 \emph on
5175 clientname
5176 \emph default
5177 :
5178 \emph on
5179 protocol message
5180 \end_layout
5181
5182 \begin_layout Standard
5183 where 
5184 \emph on
5185 protocol message
5186 \emph default
5187  can be 
5188 \begin_inset Quotes eld
5189 \end_inset
5190
5191 hello
5192 \begin_inset Quotes erd
5193 \end_inset
5194
5195  or 
5196 \begin_inset Quotes eld
5197 \end_inset
5198
5199 bye
5200 \begin_inset Quotes erd
5201 \end_inset
5202
5203 .
5204  If 
5205 \begin_inset Quotes eld
5206 \end_inset
5207
5208 hello
5209 \begin_inset Quotes erd
5210 \end_inset
5211
5212  is received from a client, LyX will report back to inform the client that
5213  it's listening to it's messages, while 
5214 \begin_inset Quotes eld
5215 \end_inset
5216
5217 bye
5218 \begin_inset Quotes erd
5219 \end_inset
5220
5221  sent from LyX will inform clients that LyX is closing.
5222 \end_layout
5223
5224 \begin_layout Section
5225 Reverse DVI/PDF search
5226 \end_layout
5227
5228 \begin_layout Standard
5229 Some DVI/PDF viewers
5230 \begin_inset Foot
5231 status collapsed
5232
5233 \begin_layout Plain Layout
5234 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5235  Skim on Mac OSX and SumatraPDF on Windows.
5236 \end_layout
5237
5238 \end_inset
5239
5240  provide 
5241 \emph on
5242 reverse search
5243 \emph default
5244  facility (also called 
5245 \emph on
5246 inverse search
5247 \emph default
5248 ).
5249  This means that you can tell LyX to put the cursor to a specific line in
5250  the document by clicking at the respective position in the DVI/PDF output.
5251  To achieve this, the viewer must be able to communicate with LyX.
5252  This is done via the LyX server either by using the named pipe (
5253 \emph on
5254 lyxpipe
5255 \emph default
5256 ), or the UNIX domain socket (
5257 \emph on
5258 lyxsocket
5259 \emph default
5260 ) that LyX creates in its temporary directory (this is the way the 
5261 \begin_inset Flex CharStyle:Code
5262 status collapsed
5263
5264 \begin_layout Plain Layout
5265 lyxclient
5266 \end_layout
5267
5268 \end_inset
5269
5270  program communicates with LyX).
5271  In some cases, you need a helper script that mediates between the viewer
5272  and LyX, in others, the viewer can communicate with LyX directly.
5273  This depends on the selected viewer and on your operating system.
5274  The same applies to the way viewers need to be configured and the way the
5275  reverse search is actually performed.
5276  In what follows, we will thus describe how to setup reverse search for
5277  specific viewers.
5278  Before we turn to this, though, we will explain what needs to be done generally
5279  to enable reverse search in the DVI/PDF output.
5280 \end_layout
5281
5282 \begin_layout Subsection
5283
5284 \change_inserted 2 1274788899
5285 \begin_inset CommandInset label
5286 LatexCommand label
5287 name "sub:rev-search"
5288
5289 \end_inset
5290
5291 Automatical enabling
5292 \end_layout
5293
5294 \begin_layout Standard
5295
5296 \change_inserted 2 1274789582
5297 In most cases LyX will do the work for you by enabling 
5298 \begin_inset Flex CharStyle:MenuItem
5299 status collapsed
5300
5301 \begin_layout Plain Layout
5302
5303 \change_inserted 2 1274789026
5304 Document\SpecialChar \menuseparator
5305 Output\SpecialChar \menuseparator
5306 Output Sync
5307 \end_layout
5308
5309 \end_inset
5310
5311 .
5312  In such a case LyX will automatically insert SyncTeX macro (for PDF) or
5313  srcltx package (for DVI) respectively.
5314  This option can be easily reached also on 
5315 \begin_inset Flex CharStyle:Code
5316 status collapsed
5317
5318 \begin_layout Plain Layout
5319
5320 \change_inserted 2 1274789582
5321 View/update
5322 \change_unchanged
5323
5324 \end_layout
5325
5326 \end_inset
5327
5328  Toolbar.
5329 \end_layout
5330
5331 \begin_layout Standard
5332
5333 \change_inserted 2 1274789534
5334 Plase note that including 
5335 \begin_inset Flex CharStyle:Code
5336 status collapsed
5337
5338 \begin_layout Plain Layout
5339
5340 \change_inserted 2 1274789498
5341 srcltx
5342 \change_unchanged
5343
5344 \end_layout
5345
5346 \end_inset
5347
5348  package or 
5349 \begin_inset Flex CharStyle:Code
5350 status collapsed
5351
5352 \begin_layout Plain Layout
5353
5354 \change_inserted 2 1274789484
5355 src-specials
5356 \change_unchanged
5357
5358 \end_layout
5359
5360 \end_inset
5361
5362  sometimes have an impact on the typeset and you should switch them off
5363  for the final typesets.
5364 \change_unchanged
5365
5366 \end_layout
5367
5368 \begin_layout Standard
5369
5370 \change_inserted 2 1274789340
5371 You can also define custom macro in preferences and in case you need some
5372  special tweaks read the next section about manual enabling.
5373  
5374 \change_unchanged
5375
5376 \end_layout
5377
5378 \begin_layout Subsection
5379
5380 \change_inserted 2 1274788680
5381 Manual enabling
5382 \change_unchanged
5383
5384 \end_layout
5385
5386 \begin_layout Standard
5387 LaTeX provides several different methods for reverse search.
5388  Some are built-in in the 
5389 \begin_inset Flex CharStyle:Code
5390 status collapsed
5391
5392 \begin_layout Plain Layout
5393 latex/pdflatex
5394 \end_layout
5395
5396 \end_inset
5397
5398  program, some are provided by external packages.
5399  Your choice depends on whether your LaTeX distribution already provides
5400  a given method (the built-in methods are rather new) and whether your viewer
5401  can cope with it.
5402  The available methods are described in the following.
5403 \change_inserted 2 1274788557
5404
5405 \end_layout
5406
5407 \begin_layout Subsubsection*
5408 Built-in DVI-search via src-specials (DVI only) 
5409 \end_layout
5410
5411 \begin_layout Standard
5412 This method provides the DVI file with the necessary information for reverse
5413  search.
5414  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5415  distribution should include it), and it works reliably.
5416  To enable it, change the 
5417 \begin_inset Flex CharStyle:MenuItem
5418 status collapsed
5419
5420 \begin_layout Plain Layout
5421 LaT
5422 \begin_inset ERT
5423 status collapsed
5424
5425 \begin_layout Plain Layout
5426
5427 {}
5428 \end_layout
5429
5430 \end_inset
5431
5432 eX (plain)->DVI
5433 \end_layout
5434
5435 \end_inset
5436
5437  or 
5438 \begin_inset Flex CharStyle:MenuItem
5439 status collapsed
5440
5441 \begin_layout Plain Layout
5442 LaT
5443 \begin_inset ERT
5444 status collapsed
5445
5446 \begin_layout Plain Layout
5447
5448 {}
5449 \end_layout
5450
5451 \end_inset
5452
5453 eX (plain)->DraftDVI
5454 \end_layout
5455
5456 \end_inset
5457
5458  converter in 
5459 \begin_inset Flex CharStyle:MenuItem
5460 status collapsed
5461
5462 \begin_layout Plain Layout
5463 Preferences\SpecialChar \menuseparator
5464 File Handling\SpecialChar \menuseparator
5465 Converters
5466 \end_layout
5467
5468 \end_inset
5469
5470  to 
5471 \begin_inset Flex CharStyle:Code
5472 status collapsed
5473
5474 \begin_layout Plain Layout
5475 latex -src-specials $$i
5476 \end_layout
5477
5478 \end_inset
5479
5480 .
5481  If this doesn't work, check if your TeX engine needs different options
5482  (the syntax might differ in some distributions).
5483 \end_layout
5484
5485 \begin_layout Subsubsection*
5486 External Packages (PDFSync and scrltx) 
5487 \end_layout
5488
5489 \begin_layout Standard
5490 The packages 
5491 \emph on
5492 pdfsync
5493 \emph default
5494  and 
5495 \emph on
5496 scrltx
5497 \emph default
5498  provide reverse search facility for PDF output (via pdflatex) and DVI output,
5499  respectively.
5500  In order to enable it, load the packages in the LyX preamble: 
5501 \end_layout
5502
5503 \begin_layout Itemize
5504 \begin_inset Flex CharStyle:Code
5505 status collapsed
5506
5507 \begin_layout Plain Layout
5508
5509 \backslash
5510 usepackage{pdfsync}
5511 \end_layout
5512
5513 \end_inset
5514
5515  for reverse PDF search,
5516 \end_layout
5517
5518 \begin_layout Itemize
5519  
5520 \begin_inset Flex CharStyle:Code
5521 status collapsed
5522
5523 \begin_layout Plain Layout
5524
5525 \backslash
5526 usepackage[active]{srcltx}
5527 \end_layout
5528
5529 \end_inset
5530
5531  for reverse DVI search.
5532 \end_layout
5533
5534 \begin_layout Standard
5535 If you want to be able to perform both DVI and PDF reverse searches, you
5536  can also insert in the preamble the following lines
5537 \end_layout
5538
5539 \begin_layout LyX-Code
5540
5541 \backslash
5542 usepackage{ifpdf}
5543 \begin_inset Newline newline
5544 \end_inset
5545
5546
5547 \backslash
5548 ifpdf
5549 \begin_inset Newline newline
5550 \end_inset
5551
5552   
5553 \backslash
5554 usepackage{pdfsync}
5555 \begin_inset Newline newline
5556 \end_inset
5557
5558
5559 \backslash
5560 else
5561 \begin_inset Newline newline
5562 \end_inset
5563
5564   
5565 \backslash
5566 usepackage[active]{srcltx}
5567 \begin_inset Newline newline
5568 \end_inset
5569
5570
5571 \backslash
5572 fi
5573 \end_layout
5574
5575 \begin_layout Standard
5576 This way, you can preview the file as either DVI or PDF (pdflatex) and the
5577  right package will be used.
5578 \end_layout
5579
5580 \begin_layout Standard
5581 Note that PDFSync might affect the output layout of your document.
5582  It is therefore advised to disable PDFsync for final documents.
5583 \end_layout
5584
5585 \begin_layout Subsubsection*
5586 Built-in reverse search via SyncTeX (DVI and PDF) 
5587 \end_layout
5588
5589 \begin_layout Standard
5590 Recent versions of 
5591 \begin_inset Flex CharStyle:Code
5592 status collapsed
5593
5594 \begin_layout Plain Layout
5595 (pdf)latex
5596 \end_layout
5597
5598 \end_inset
5599
5600  have built-in support for both PDF and DVI reverse search.
5601  This so-called 
5602 \emph on
5603 SyncTeX
5604 \emph default
5605  facility is basically the result of the integration of the PDFSync package
5606  to the pdftex program and its merge with the 
5607 \emph on
5608 scr-specials
5609 \emph default
5610  approach.
5611  You need at least TeXLive 2008 or a recent MikTeX distribution in order
5612  to use it.
5613  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
5614  already provide SyncTeX support.
5615 \end_layout
5616
5617 \begin_layout Standard
5618 To enable SyncTeX for DVI output, change the 
5619 \begin_inset Flex CharStyle:MenuItem
5620 status collapsed
5621
5622 \begin_layout Plain Layout
5623 LaT
5624 \begin_inset ERT
5625 status collapsed
5626
5627 \begin_layout Plain Layout
5628
5629 {}
5630 \end_layout
5631
5632 \end_inset
5633
5634 eX (plain) -> DVI
5635 \end_layout
5636
5637 \end_inset
5638
5639  or 
5640 \begin_inset Flex CharStyle:MenuItem
5641 status collapsed
5642
5643 \begin_layout Plain Layout
5644 LaT
5645 \begin_inset ERT
5646 status collapsed
5647
5648 \begin_layout Plain Layout
5649
5650 {}
5651 \end_layout
5652
5653 \end_inset
5654
5655 eX (plain) -> DraftDVI
5656 \end_layout
5657
5658 \end_inset
5659
5660  converter in 
5661 \begin_inset Flex CharStyle:MenuItem
5662 status collapsed
5663
5664 \begin_layout Plain Layout
5665 Preferences\SpecialChar \menuseparator
5666 File Handling\SpecialChar \menuseparator
5667 Converters
5668 \end_layout
5669
5670 \end_inset
5671
5672  to 
5673 \begin_inset Flex CharStyle:Code
5674 status collapsed
5675
5676 \begin_layout Plain Layout
5677 latex -synctex=1 $$i
5678 \end_layout
5679
5680 \end_inset
5681
5682 , and for PDF output, change the 
5683 \begin_inset Flex CharStyle:MenuItem
5684 status collapsed
5685
5686 \begin_layout Plain Layout
5687 LaT
5688 \begin_inset ERT
5689 status collapsed
5690
5691 \begin_layout Plain Layout
5692
5693 {}
5694 \end_layout
5695
5696 \end_inset
5697
5698 eX (pdflatex) -> PDF (pdflatex)
5699 \end_layout
5700
5701 \end_inset
5702
5703  or converter to 
5704 \begin_inset Flex CharStyle:Code
5705 status collapsed
5706
5707 \begin_layout Plain Layout
5708 pdflatex -synctex=1 $$i
5709 \end_layout
5710
5711 \end_inset
5712
5713 .
5714  Check the documentation of your viewer whether the viewer needs to be configure
5715 d for the use with SyncTeX.
5716 \begin_inset Foot
5717 status collapsed
5718
5719 \begin_layout Plain Layout
5720 The 
5721 \begin_inset Flex CharStyle:Code
5722 status collapsed
5723
5724 \begin_layout Plain Layout
5725 -synctex=1
5726 \end_layout
5727
5728 \end_inset
5729
5730  option enables gzip compression.
5731  If your viewer does not support it, you should instead use 
5732 \begin_inset Flex CharStyle:Code
5733 status collapsed
5734
5735 \begin_layout Plain Layout
5736 -synctex=-1
5737 \end_layout
5738
5739 \end_inset
5740
5741 .
5742 \end_layout
5743
5744 \end_inset
5745
5746
5747 \end_layout
5748
5749 \begin_layout Subsection
5750 Configuring and using specific viewers
5751 \end_layout
5752
5753 \begin_layout Subsubsection*
5754 Xdvi (all platforms)
5755 \end_layout
5756
5757 \begin_layout Standard
5758 If you use 
5759 \begin_inset Flex CharStyle:Code
5760 status collapsed
5761
5762 \begin_layout Plain Layout
5763 xdvi
5764 \end_layout
5765
5766 \end_inset
5767
5768 , you don't need to do anything else for performing a reverse DVI search,
5769  as LyX already provides the necessary hooks for automatically using the
5770  
5771 \begin_inset Flex CharStyle:Code
5772 status collapsed
5773
5774 \begin_layout Plain Layout
5775 lyxclient
5776 \end_layout
5777
5778 \end_inset
5779
5780  program.
5781  Just setup your document as described above (reverse search is triggered
5782  by Ctrl-click or Alt-click on Mac OSX, respectively).
5783 \end_layout
5784
5785 \begin_layout Standard
5786 However, if for whatever reason you want to use the named pipe instead of
5787  the socket for communicating with LyX, simply change the DVI viewer in
5788  
5789 \begin_inset Flex CharStyle:MenuItem
5790 status collapsed
5791
5792 \begin_layout Plain Layout
5793 Preferences\SpecialChar \menuseparator
5794 File Handling\SpecialChar \menuseparator
5795 File formats
5796 \end_layout
5797
5798 \end_inset
5799
5800  to
5801 \begin_inset Foot
5802 status collapsed
5803
5804 \begin_layout Plain Layout
5805 On Mac OSX you have to use 
5806 \begin_inset Flex CharStyle:Code
5807 status collapsed
5808
5809 \begin_layout Plain Layout
5810 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
5811 \end_layout
5812
5813 \end_inset
5814
5815
5816 \end_layout
5817
5818 \end_inset
5819
5820  
5821 \begin_inset Flex CharStyle:Code
5822 status collapsed
5823
5824 \begin_layout Plain Layout
5825 xdvi -editor 'lyxeditor.sh %f %l'
5826 \end_layout
5827
5828 \end_inset
5829
5830 , where 
5831 \begin_inset Flex CharStyle:Code
5832 status collapsed
5833
5834 \begin_layout Plain Layout
5835 lyxeditor.sh
5836 \end_layout
5837
5838 \end_inset
5839
5840  is a suitable script.
5841  For example, a minimal shell script is the following one:
5842 \end_layout
5843
5844 \begin_layout LyX-Code
5845 #!/bin/sh
5846 \begin_inset Newline newline
5847 \end_inset
5848
5849 LYXPIPE="/path/to/lyxpipe"
5850 \begin_inset Newline newline
5851 \end_inset
5852
5853 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
5854 \begin_inset Newline newline
5855 \end_inset
5856
5857 echo "$COMMAND" > "${LYXPIPE}".in || exit
5858 \begin_inset Newline newline
5859 \end_inset
5860
5861 read < "${LYXPIPE}".out || exit
5862 \end_layout
5863
5864 \begin_layout Standard
5865 where 
5866 \begin_inset Flex CharStyle:Code
5867 status collapsed
5868
5869 \begin_layout Plain Layout
5870 /path/to/lyxpipe
5871 \end_layout
5872
5873 \end_inset
5874
5875  is the Ly
5876 \begin_inset ERT
5877 status collapsed
5878
5879 \begin_layout Plain Layout
5880
5881 {}
5882 \end_layout
5883
5884 \end_inset
5885
5886 XServer pipe path specified in 
5887 \begin_inset Flex CharStyle:MenuItem
5888 status collapsed
5889
5890 \begin_layout Plain Layout
5891 Preferences\SpecialChar \menuseparator
5892 Paths
5893 \end_layout
5894
5895 \end_inset
5896
5897 .
5898 \begin_inset Foot
5899 status collapsed
5900
5901 \begin_layout Plain Layout
5902 In the 
5903 \begin_inset Flex CharStyle:Code
5904 status collapsed
5905
5906 \begin_layout Plain Layout
5907 development/tools
5908 \end_layout
5909
5910 \end_inset
5911
5912  folder of a source distribution you can find a 
5913 \begin_inset Flex CharStyle:Code
5914 status collapsed
5915
5916 \begin_layout Plain Layout
5917 lyxeditor
5918 \end_layout
5919
5920 \end_inset
5921
5922  script which is able to locate the 
5923 \emph on
5924 lyxpipe
5925 \emph default
5926  based on your preferences.
5927 \end_layout
5928
5929 \end_inset
5930
5931
5932 \end_layout
5933
5934 \begin_layout Subsubsection*
5935 MacDviX (Mac OSX)
5936 \end_layout
5937
5938 \begin_layout Standard
5939 At the end of 
5940 \begin_inset Flex CharStyle:Code
5941 status collapsed
5942
5943 \begin_layout Plain Layout
5944 /Applications/MacDviX_Folder/calleditor.script
5945 \end_layout
5946
5947 \end_inset
5948
5949 , add the following lines:
5950 \end_layout
5951
5952 \begin_layout LyX-Code
5953 /Applications/Ly
5954 \begin_inset ERT
5955 status collapsed
5956
5957 \begin_layout Plain Layout
5958
5959 {}
5960 \end_layout
5961
5962 \end_inset
5963
5964 X.app/Contents/MacOS/lyxeditor "$2" $1
5965 \begin_inset Newline newline
5966 \end_inset
5967
5968 exit 1
5969 \end_layout
5970
5971 \begin_layout Standard
5972 Modify the lines accordingly if you install LyX somewhere else than in the
5973  Applications folder.
5974 \end_layout
5975
5976 \begin_layout Standard
5977 Reverse search is triggered by Alt-click (OPTION-click).
5978 \end_layout
5979
5980 \begin_layout Subsubsection*
5981 Skim (Mac OSX)
5982 \end_layout
5983
5984 \begin_layout Standard
5985 Enter 
5986 \begin_inset Flex CharStyle:Code
5987 status collapsed
5988
5989 \begin_layout Plain Layout
5990 open -a Skim.app $$i
5991 \end_layout
5992
5993 \end_inset
5994
5995  to the viewer setting in 
5996 \begin_inset Flex CharStyle:MenuItem
5997 status collapsed
5998
5999 \begin_layout Plain Layout
6000 Preferences\SpecialChar \menuseparator
6001 File Handling\SpecialChar \menuseparator
6002 File formats\SpecialChar \menuseparator
6003 PDF (pdflatex)
6004 \end_layout
6005
6006 \end_inset
6007
6008 , and then in 
6009 \begin_inset Flex CharStyle:MenuItem
6010 status collapsed
6011
6012 \begin_layout Plain Layout
6013 Skim\SpecialChar \menuseparator
6014 Preferences\SpecialChar \menuseparator
6015 Sync
6016 \end_layout
6017
6018 \end_inset
6019
6020  select Ly
6021 \begin_inset ERT
6022 status collapsed
6023
6024 \begin_layout Plain Layout
6025
6026 {}
6027 \end_layout
6028
6029 \end_inset
6030
6031 X.
6032 \end_layout
6033
6034 \begin_layout Standard
6035 Reverse search is triggered by COMMAND-SHIFT-click
6036 \end_layout
6037
6038 \begin_layout Subsubsection*
6039 Okular (KDE)
6040 \end_layout
6041
6042 \begin_layout Standard
6043 Go to 
6044 \begin_inset Flex CharStyle:MenuItem
6045 status collapsed
6046
6047 \begin_layout Plain Layout
6048 Settings\SpecialChar \menuseparator
6049 Configure Okular\SpecialChar \ldots{}
6050 \SpecialChar \menuseparator
6051 Editor
6052 \end_layout
6053
6054 \end_inset
6055
6056 , select 
6057 \begin_inset Quotes eld
6058 \end_inset
6059
6060 Custom Text Editor
6061 \begin_inset Quotes erd
6062 \end_inset
6063
6064  and add the command 
6065 \begin_inset Flex CharStyle:Code
6066 status collapsed
6067
6068 \begin_layout Plain Layout
6069 lyxclient -g %f %l
6070 \end_layout
6071
6072 \end_inset
6073
6074 .
6075 \end_layout
6076
6077 \begin_layout Standard
6078 Reverse search is triggered by SHIFT-click.
6079 \end_layout
6080
6081 \begin_layout Subsubsection*
6082 YAP (Windows)
6083 \end_layout
6084
6085 \begin_layout Standard
6086 Launch yap, choose its 
6087 \begin_inset Flex CharStyle:MenuItem
6088 status collapsed
6089
6090 \begin_layout Plain Layout
6091 View\SpecialChar \menuseparator
6092 Options
6093 \end_layout
6094
6095 \end_inset
6096
6097  menu and select the 
6098 \begin_inset Quotes eld
6099 \end_inset
6100
6101 Inverse DVI Search
6102 \begin_inset Quotes erd
6103 \end_inset
6104
6105  tab.
6106  Click on the 
6107 \begin_inset Quotes eld
6108 \end_inset
6109
6110 New\SpecialChar \ldots{}
6111
6112 \begin_inset Quotes erd
6113 \end_inset
6114
6115  button and, in the window that opens, enter 
6116 \begin_inset Quotes eld
6117 \end_inset
6118
6119 LyX Editor
6120 \begin_inset Quotes erd
6121 \end_inset
6122
6123  (or any other name you like) in the 
6124 \begin_inset Quotes eld
6125 \end_inset
6126
6127 Name:
6128 \begin_inset Quotes erd
6129 \end_inset
6130
6131  field.
6132  Now click on the button labeled 
6133 \begin_inset Quotes eld
6134 \end_inset
6135
6136 \SpecialChar \ldots{}
6137
6138 \begin_inset Quotes erd
6139 \end_inset
6140
6141  to open a file dialog and navigate to the directory containing the batch
6142  file 
6143 \begin_inset Flex CharStyle:Code
6144 status collapsed
6145
6146 \begin_layout Plain Layout
6147 lyxeditor.bat
6148 \end_layout
6149
6150 \end_inset
6151
6152  (see below).
6153  Select 
6154 \begin_inset Flex CharStyle:Code
6155 status collapsed
6156
6157 \begin_layout Plain Layout
6158 lyxeditor.bat
6159 \end_layout
6160
6161 \end_inset
6162
6163  and then specify the program arguments as 
6164 \begin_inset Flex CharStyle:Code
6165 status collapsed
6166
6167 \begin_layout Plain Layout
6168 %f %l
6169 \end_layout
6170
6171 \end_inset
6172
6173 .
6174  The 
6175 \begin_inset Flex CharStyle:Code
6176 status collapsed
6177
6178 \begin_layout Plain Layout
6179 lyxeditor.bat
6180 \end_layout
6181
6182 \end_inset
6183
6184  wrapper is used for communicating with LyX through the 
6185 \emph on
6186 lyxpipe
6187 \emph default
6188  and is as follows:
6189 \end_layout
6190
6191 \begin_layout LyX-Code
6192 @echo off
6193 \begin_inset Newline newline
6194 \end_inset
6195
6196 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6197 \backslash
6198
6199 \backslash
6200 .
6201 \backslash
6202 pipe
6203 \backslash
6204 lyxpipe.in
6205 \begin_inset Newline newline
6206 \end_inset
6207
6208 type 
6209 \backslash
6210
6211 \backslash
6212 .
6213 \backslash
6214 pipe
6215 \backslash
6216 lyxpipe.out
6217 \end_layout
6218
6219 \begin_layout Standard
6220 Make sure that the LyXServer pipe path you specified in LyX is 
6221 \begin_inset Flex CharStyle:Code
6222 status collapsed
6223
6224 \begin_layout Plain Layout
6225
6226 \backslash
6227
6228 \backslash
6229 .
6230 \backslash
6231 pipe
6232 \backslash
6233 lyxpipe
6234 \end_layout
6235
6236 \end_inset
6237
6238 , otherwise change the 
6239 \begin_inset Flex CharStyle:Code
6240 status collapsed
6241
6242 \begin_layout Plain Layout
6243 lyxeditor.bat
6244 \end_layout
6245
6246 \end_inset
6247
6248  wrapper accordingly.
6249 \end_layout
6250
6251 \begin_layout Standard
6252 In yap, reverse search is triggered by double-click.
6253 \end_layout
6254
6255 \begin_layout Subsubsection*
6256 SumatraPDF (Windows)
6257 \end_layout
6258
6259 \begin_layout Standard
6260 In order to use SumatraPDF for inverse search, enter 
6261 \begin_inset Flex CharStyle:Code
6262 status collapsed
6263
6264 \begin_layout Plain Layout
6265 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6266 \end_layout
6267
6268 \end_inset
6269
6270  in the viewer setting in 
6271 \begin_inset Flex CharStyle:MenuItem
6272 status collapsed
6273
6274 \begin_layout Plain Layout
6275 Preferences\SpecialChar \menuseparator
6276 File Handling\SpecialChar \menuseparator
6277 File formats\SpecialChar \menuseparator
6278 PDF (pdflatex)
6279 \end_layout
6280
6281 \end_inset
6282
6283 , where 
6284 \begin_inset Flex CharStyle:Code
6285 status collapsed
6286
6287 \begin_layout Plain Layout
6288 lyxeditor.bat
6289 \end_layout
6290
6291 \end_inset
6292
6293  is the previous wrapper.
6294  If SumatraPDF.exe is not in your command PATH, use its full file name.
6295 \end_layout
6296
6297 \begin_layout Standard
6298 Reverse search is triggered by double-click.
6299 \end_layout
6300
6301 \begin_layout Subsubsection*
6302 YAP (Cygwin)
6303 \end_layout
6304
6305 \begin_layout Standard
6306 First of all, make sure that yap is your default DVI viewer in the Windows
6307  environment, then launch it, choose its 
6308 \begin_inset Flex CharStyle:MenuItem
6309 status collapsed
6310
6311 \begin_layout Plain Layout
6312 View\SpecialChar \menuseparator
6313 Options
6314 \end_layout
6315
6316 \end_inset
6317
6318  menu and select the 
6319 \begin_inset Quotes eld
6320 \end_inset
6321
6322 Inverse DVI Search
6323 \begin_inset Quotes erd
6324 \end_inset
6325
6326  tab.
6327  Click on the 
6328 \begin_inset Quotes eld
6329 \end_inset
6330
6331 New\SpecialChar \ldots{}
6332
6333 \begin_inset Quotes erd
6334 \end_inset
6335
6336  button and, in the window that opens, enter 
6337 \begin_inset Quotes eld
6338 \end_inset
6339
6340 LyX Editor
6341 \begin_inset Quotes erd
6342 \end_inset
6343
6344  (or any other name you like) in the 
6345 \begin_inset Quotes eld
6346 \end_inset
6347
6348 Name:
6349 \begin_inset Quotes erd
6350 \end_inset
6351
6352  field.
6353  Now click on the button labeled 
6354 \begin_inset Quotes eld
6355 \end_inset
6356
6357 \SpecialChar \ldots{}
6358
6359 \begin_inset Quotes erd
6360 \end_inset
6361
6362  to open a file dialog and navigate to the directory containing the 
6363 \begin_inset Flex CharStyle:Code
6364 status collapsed
6365
6366 \begin_layout Plain Layout
6367 lyxeditor.exe
6368 \end_layout
6369
6370 \end_inset
6371
6372  program (which is installed by default on Cygwin along with the LyX executable).
6373  Select 
6374 \begin_inset Flex CharStyle:Code
6375 status collapsed
6376
6377 \begin_layout Plain Layout
6378 lyxeditor.exe
6379 \end_layout
6380
6381 \end_inset
6382
6383  and then specify the program arguments as 
6384 \begin_inset Flex CharStyle:Code
6385 status collapsed
6386
6387 \begin_layout Plain Layout
6388 -g %f %l
6389 \end_layout
6390
6391 \end_inset
6392
6393 .
6394  In this way, you will be using the 
6395 \emph on
6396 lyxsocket
6397 \emph default
6398  for communicating with LyX.
6399  If, for whatever reason, you want to use the 
6400 \emph on
6401 lyxpipe
6402 \emph default
6403 , omit the 
6404 \begin_inset Flex CharStyle:Code
6405 status collapsed
6406
6407 \begin_layout Plain Layout
6408 -g
6409 \end_layout
6410
6411 \end_inset
6412
6413  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6414 \end_layout
6415
6416 \begin_layout Standard
6417 In yap, reverse search is triggered by double-click.
6418 \end_layout
6419
6420 \begin_layout Subsubsection*
6421 SumatraPDF (Cygwin)
6422 \end_layout
6423
6424 \begin_layout Standard
6425 In order to use SumatraPDF for inverse search, enter 
6426 \begin_inset Flex CharStyle:Code
6427 status collapsed
6428
6429 \begin_layout Plain Layout
6430 SumatraPDF.sh
6431 \end_layout
6432
6433 \end_inset
6434
6435  in the viewer setting in 
6436 \begin_inset Flex CharStyle:MenuItem
6437 status collapsed
6438
6439 \begin_layout Plain Layout
6440 Preferences\SpecialChar \menuseparator
6441 File Handling\SpecialChar \menuseparator
6442 File formats\SpecialChar \menuseparator
6443 PDF (pdflatex)
6444 \end_layout
6445
6446 \end_inset
6447
6448 , where 
6449 \begin_inset Flex CharStyle:Code
6450 status collapsed
6451
6452 \begin_layout Plain Layout
6453 SumatraPDF.sh
6454 \end_layout
6455
6456 \end_inset
6457
6458  is the following script (to be placed in your command PATH, 
6459 \begin_inset Flex CharStyle:Code
6460 status collapsed
6461
6462 \begin_layout Plain Layout
6463 /usr/local/bin
6464 \end_layout
6465
6466 \end_inset
6467
6468  being the best choice):
6469 \end_layout
6470
6471 \begin_layout LyX-Code
6472 #!/bin/bash
6473 \begin_inset Newline newline
6474 \end_inset
6475
6476 cd $(dirname $1)
6477 \begin_inset Newline newline
6478 \end_inset
6479
6480 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6481 \end_layout
6482
6483 \begin_layout Standard
6484 This wrapper script is needed because SumatraPDF is a native Windows application
6485  and does not understand the posix paths used by the Cygwin version of LyX.
6486  If SumatraPDF.exe is not in your command PATH, use its full posix path in
6487  the script above.
6488  The 
6489 \begin_inset Flex CharStyle:Code
6490 status collapsed
6491
6492 \begin_layout Plain Layout
6493 -g
6494 \end_layout
6495
6496 \end_inset
6497
6498  enables communication via the 
6499 \emph on
6500 lyxsocket
6501 \emph default
6502 .
6503  Again, omit the 
6504 \begin_inset Flex CharStyle:Code
6505 status collapsed
6506
6507 \begin_layout Plain Layout
6508 -g
6509 \end_layout
6510
6511 \end_inset
6512
6513  option if you want to use the 
6514 \emph on
6515 lyxpipe
6516 \emph default
6517 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6518 \end_layout
6519
6520 \begin_layout Standard
6521 Reverse search is triggered by double-click.
6522 \change_inserted 1 1271453423
6523
6524 \end_layout
6525
6526 \begin_layout Section
6527
6528 \change_inserted 1 1271453442
6529 Forward search
6530 \end_layout
6531
6532 \begin_layout Standard
6533
6534 \change_inserted 1 1271454338
6535 To make forward search possible you need to provide generated output PDF/DVI
6536  file with additional information about TeX sources.
6537  This can be done via the methods described in the section 
6538 \begin_inset CommandInset ref
6539 LatexCommand ref
6540 reference "sub:rev-search"
6541
6542 \end_inset
6543
6544 .
6545 \end_layout
6546
6547 \begin_layout Standard
6548
6549 \change_inserted 1 1271454479
6550 Secondly you need to configure LyX for using your viewers in 
6551 \begin_inset Flex CharStyle:MenuItem
6552 status collapsed
6553
6554 \begin_layout Plain Layout
6555
6556 \change_inserted 1 1271453866
6557 Preferences\SpecialChar \menuseparator
6558 Output\SpecialChar \menuseparator
6559 General
6560 \end_layout
6561
6562 \end_inset
6563
6564 .
6565  Only some of the viewers allows this operation --- yap, xdvi, okular, Sumatra
6566  PDF
6567 \begin_inset Foot
6568 status collapsed
6569
6570 \begin_layout Plain Layout
6571
6572 \change_inserted 1 1271454273
6573 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
6574 ip
6575 \change_unchanged
6576
6577 \end_layout
6578
6579 \end_inset
6580
6581 .
6582  Some other viewers allow at least reloading and positioning to particular
6583  page of the file --- Evince or xpdf --- for these cases you can use external
6584  call of synctex.
6585  Please study the prepared examples in the Preferences dialog.
6586 \change_unchanged
6587
6588 \end_layout
6589
6590 \begin_layout Chapter
6591 Special Document Classes
6592 \end_layout
6593
6594 \begin_layout Section
6595 A&A Paper
6596 \end_layout
6597
6598 \begin_layout Standard
6599 by 
6600 \noun on
6601 Peter Sütterlin
6602 \end_layout
6603
6604 \begin_layout Subsection
6605 Introduction
6606 \end_layout
6607
6608 \begin_layout Standard
6609 This section describes how LyX can be used to write articles for submission
6610  to the scientific journal 
6611 \emph on
6612 Astronomy and Astrophysics
6613 \emph default
6614  (www.edpsciences.fr/aa/ 
6615 \begin_inset Flex URL
6616 status collapsed
6617
6618 \begin_layout Plain Layout
6619
6620 http://www.edpsciences.fr/aa/
6621 \end_layout
6622
6623 \end_inset
6624
6625 ) using Version 5.01 of the document class 
6626 \family typewriter
6627 aa.cls
6628 \family default
6629 .
6630  This package can be downloaded from the ftp site
6631 \end_layout
6632
6633 \begin_layout Standard
6634 \begin_inset VSpace medskip
6635 \end_inset
6636
6637
6638 \end_layout
6639
6640 \begin_layout Standard
6641 \align center
6642 \begin_inset Flex URL
6643 status collapsed
6644
6645 \begin_layout Plain Layout
6646
6647 ftp://ftp.edpsciences.org/pub/aa/readme.html
6648 \end_layout
6649
6650 \end_inset
6651
6652
6653 \end_layout
6654
6655 \begin_layout Standard
6656 \begin_inset VSpace medskip
6657 \end_inset
6658
6659
6660 \end_layout
6661
6662 \begin_layout Standard
6663 A manual comes together with that package, and this text is not meant to
6664  replace the original manual but merely a short guide how to realize the
6665  correct form of your paper.
6666  
6667 \end_layout
6668
6669 \begin_layout Standard
6670 Please note that the publisher of the journal was changed from Springer
6671  to EDP Sciences starting January 1, 2001.
6672  That change implicated also some slight changes of the style files, namely
6673  the removal of the thesaurus command.
6674  The LyX class aa supports the newest version of these style files, V 5.01.
6675  If you have an older version installed, please upgrade.
6676  For compatibility, the old (version 4) layout has been kept as 
6677 \family sans
6678 article (A&A V4)
6679 \family default
6680 .
6681  Please refer to the comments in 
6682 \family typewriter
6683 LyXDir/layouts/aapaper.layout
6684 \family default
6685 .
6686 \end_layout
6687
6688 \begin_layout Subsection
6689 Getting started
6690 \end_layout
6691
6692 \begin_layout Standard
6693 It is recommended you start from the example template distributed with LyX.
6694  If you are not using a template, note the following settings:
6695 \end_layout
6696
6697 \begin_layout Itemize
6698 Select 
6699 \family sans
6700 article (A&A)
6701 \family default
6702  in the 
6703 \family sans
6704 Document\SpecialChar \menuseparator
6705 Settings
6706 \family default
6707  dialog (OK, that one was obvious).
6708 \end_layout
6709
6710 \begin_layout Itemize
6711 Don't change the option 
6712 \family sans
6713 Page
6714 \begin_inset space ~
6715 \end_inset
6716
6717 style
6718 \family default
6719 : Leave it set to 
6720 \family sans
6721 default
6722 \family default
6723 .
6724  The whole layout is done by the macros, you shouldn't change anything.
6725 \end_layout
6726
6727 \begin_layout Subsection
6728 The header block
6729 \end_layout
6730
6731 \begin_layout Standard
6732 First thing to enter is the header information.
6733  It consists of seven entries, of which some are optional.
6734  They are
6735 \end_layout
6736
6737 \begin_layout Itemize
6738
6739 \family sans
6740 Title
6741 \family default
6742 : [required] 
6743 \end_layout
6744
6745 \begin_layout Itemize
6746
6747 \family sans
6748 Subtitle
6749 \family default
6750 : [optional] 
6751 \end_layout
6752
6753 \begin_layout Itemize
6754
6755 \family sans
6756 Author
6757 \family default
6758 : [required]
6759 \end_layout
6760
6761 \begin_layout Itemize
6762
6763 \family sans
6764 Address
6765 \family default
6766 : [required]
6767 \end_layout
6768
6769 \begin_layout Itemize
6770
6771 \family sans
6772 Offprints
6773 \family default
6774 : [optional] if more than one author: whom to contact for offprint requests.
6775 \end_layout
6776
6777 \begin_layout Itemize
6778
6779 \family sans
6780 Mail
6781 \family default
6782 : [optional] mail address for contacts.
6783 \end_layout
6784
6785 \begin_layout Itemize
6786
6787 \family sans
6788 Date
6789 \family default
6790 : [required].
6791  Suggested format is 
6792 \family typewriter
6793 Received: <date>; Accepted <date> 
6794 \end_layout
6795
6796 \begin_layout Standard
6797 There is no need to issue the 
6798 \family typewriter
6799
6800 \backslash
6801 maketitle
6802 \family default
6803  command, this is done automatically by LyX when the header is finished.
6804  Although the order of the single header entries doesn't matter it is advised
6805  to keep the above sequence, just to get the best optics and meets the layout
6806  of the real document.
6807 \end_layout
6808
6809 \begin_layout Standard
6810 If you want to place footnotes in the header block, e.
6811 \begin_inset space \thinspace{}
6812 \end_inset
6813
6814 g.
6815 \begin_inset space \space{}
6816 \end_inset
6817
6818 to state your present address, just use the standard footnote via the menu
6819  
6820 \family sans
6821 Insert\SpecialChar \menuseparator
6822 Footnote.
6823
6824 \family default
6825  LyX will automagically use the term 
6826 \family typewriter
6827
6828 \backslash
6829 thanks{}
6830 \family default
6831  in that case.
6832 \end_layout
6833
6834 \begin_layout Standard
6835 In addition to these topics, the macros use three additional LaTeX commands
6836  that have no counterpart in LyX:
6837 \end_layout
6838
6839 \begin_layout Itemize
6840
6841 \family typewriter
6842
6843 \backslash
6844 and
6845 \family default
6846  to separate different names for more than one author and institute, respectivel
6847 y.
6848 \end_layout
6849
6850 \begin_layout Itemize
6851
6852 \family typewriter
6853
6854 \backslash
6855 inst{<nr>}
6856 \family default
6857 to mark corresponding author/institute pairs.
6858  The institutes are numbered sequentially as they appear in the 
6859 \family sans
6860 Address
6861 \family default
6862  field, so you have to put a marker to each author.
6863 \end_layout
6864
6865 \begin_layout Itemize
6866
6867 \family typewriter
6868
6869 \backslash
6870 email{address}
6871 \family default
6872  to supply an email address for fast contact.
6873 \end_layout
6874
6875 \begin_layout Standard
6876 In all cases, the appropriate command has to be entered in LyX and marked
6877  as LaTeX code.
6878  See the examples.
6879  
6880 \end_layout
6881
6882 \begin_layout Subsection
6883 The abstract
6884 \end_layout
6885
6886 \begin_layout Standard
6887 The abstract should immediately follow the header block.
6888  With version 5 the abstract environment was changed to a command, and there
6889  is now a resctriction to only one paragraph.
6890  In addition, it should contain an entry with the keywords.
6891  This is not yet implemented for LyX, therefore you have to enter the LaTeX
6892  command 
6893 \family typewriter
6894
6895 \backslash
6896 keywords{}
6897 \family default
6898  by hand and mark it as LaTeX code.
6899  Refer to the example paper.
6900 \end_layout
6901
6902 \begin_layout Subsection
6903 Supported environments
6904 \end_layout
6905
6906 \begin_layout Standard
6907 The A&A paper layout supports the following environments for structuring
6908  your text:
6909 \end_layout
6910
6911 \begin_layout Itemize
6912
6913 \family sans
6914 Standard
6915 \end_layout
6916
6917 \begin_layout Itemize
6918
6919 \family sans
6920 Section
6921 \end_layout
6922
6923 \begin_layout Itemize
6924
6925 \family sans
6926 Subsection
6927 \end_layout
6928
6929 \begin_layout Itemize
6930
6931 \family sans
6932 Subsubsection
6933 \end_layout
6934
6935 \begin_layout Itemize
6936
6937 \family sans
6938 Itemize
6939 \end_layout
6940
6941 \begin_layout Itemize
6942
6943 \family sans
6944 Enumerate
6945 \end_layout
6946
6947 \begin_layout Itemize
6948
6949 \family sans
6950 Description
6951 \end_layout
6952
6953 \begin_layout Itemize
6954
6955 \family sans
6956 Caption
6957 \end_layout
6958
6959 \begin_layout Itemize
6960
6961 \family sans
6962 Abstract
6963 \end_layout
6964
6965 \begin_layout Itemize
6966
6967 \family sans
6968 Acknowledgment
6969 \end_layout
6970
6971 \begin_layout Itemize
6972
6973 \family sans
6974 Bibliography
6975 \end_layout
6976
6977 \begin_layout Itemize
6978
6979 \family sans
6980 LaTeX
6981 \end_layout
6982
6983 \begin_layout Subsection
6984 Commands not supported by LyX
6985 \end_layout
6986
6987 \begin_layout Standard
6988 Some commands are not yet supported by the 
6989 \family sans
6990 paper (A&A)
6991 \family default
6992  layout for LyX.
6993  Some have already been mentioned.
6994  For the sake of completeness, they are listed all together here:
6995 \end_layout
6996
6997 \begin_layout Itemize
6998
6999 \family typewriter
7000
7001 \backslash
7002 and
7003 \end_layout
7004
7005 \begin_layout Itemize
7006
7007 \family typewriter
7008
7009 \backslash
7010 email
7011 \end_layout
7012
7013 \begin_layout Itemize
7014
7015 \family typewriter
7016
7017 \backslash
7018 appendix
7019 \end_layout
7020
7021 \begin_layout Itemize
7022
7023 \family typewriter
7024
7025 \backslash
7026 authorrunning
7027 \end_layout
7028
7029 \begin_layout Itemize
7030
7031 \family typewriter
7032
7033 \backslash
7034 inst{}
7035 \end_layout
7036
7037 \begin_layout Itemize
7038
7039 \family typewriter
7040
7041 \backslash
7042 keywords{}
7043 \end_layout
7044
7045 \begin_layout Itemize
7046
7047 \family typewriter
7048
7049 \backslash
7050 object{}
7051 \end_layout
7052
7053 \begin_layout Itemize
7054
7055 \family typewriter
7056
7057 \backslash
7058 titlerunning{}
7059 \end_layout
7060
7061 \begin_layout Standard
7062 If you want to use any of these commands, you have to enter them yourself.
7063  
7064 \series bold
7065 Do not forget to mark them as LaTeX code!
7066 \end_layout
7067
7068 \begin_layout Subsection
7069 Figure and Table Floats
7070 \end_layout
7071
7072 \begin_layout Standard
7073 LyX provides support for the necessary float environments 
7074 \family sans
7075 figure, figure*, table
7076 \family default
7077  and 
7078 \family sans
7079 table*
7080 \family default
7081 , therefore we won't tell much about it here.
7082  Refer to the 
7083 \emph on
7084 User's
7085 \begin_inset space ~
7086 \end_inset
7087
7088 Guide
7089 \emph default
7090 .
7091  Just remember that tables should be left-aligned.
7092  For that, select the table and change the alignment in 
7093 \family sans
7094 Edit\SpecialChar \menuseparator
7095 Paragraph
7096 \begin_inset space ~
7097 \end_inset
7098
7099 Settings.
7100 \end_layout
7101
7102 \begin_layout Standard
7103 There is only one special thing: the figures with caption besides the figure.
7104  To create such a figure, you have to do the following:
7105 \end_layout
7106
7107 \begin_layout Enumerate
7108 Create a wide figure float: 
7109 \family sans
7110 Insert\SpecialChar \menuseparator
7111 Float\SpecialChar \menuseparator
7112 Figure
7113 \family default
7114 , then right click in the figure and select 
7115 \family sans
7116 \bar under
7117 S
7118 \bar default
7119 pan
7120 \begin_inset space ~
7121 \end_inset
7122
7123 columns
7124 \family default
7125 .
7126 \end_layout
7127
7128 \begin_layout Enumerate
7129 Enter your caption text.
7130 \end_layout
7131
7132 \begin_layout Enumerate
7133 Press 
7134 \family sans
7135 Return
7136 \family default
7137  to move the cursor above the caption.
7138 \end_layout
7139
7140 \begin_layout Enumerate
7141 Insert your figure
7142 \end_layout
7143
7144 \begin_layout Enumerate
7145 Position the cursor behind the figure and insert a horizontal fill: 
7146 \family sans
7147 Insert\SpecialChar \menuseparator
7148 Special
7149 \begin_inset space ~
7150 \end_inset
7151
7152 Character\SpecialChar \menuseparator
7153 Horizontal
7154 \begin_inset space ~
7155 \end_inset
7156
7157 Fill
7158 \family default
7159 .
7160 \end_layout
7161
7162 \begin_layout Enumerate
7163 Switch to LaTeX mode: 
7164 \family sans
7165 M-c
7166 \begin_inset space ~
7167 \end_inset
7168
7169 t
7170 \family default
7171 .
7172 \end_layout
7173
7174 \begin_layout Enumerate
7175 Enter 
7176 \family typewriter
7177
7178 \backslash
7179 parbox[b]{55mm}{
7180 \family default
7181 .
7182  
7183 \series bold
7184 Do not close the brace!
7185 \end_layout
7186
7187 \begin_layout Enumerate
7188 Position the cursor behind the caption text, switch to LaTeX mode and insert
7189  the closing brace: 
7190 \family sans
7191 M-c
7192 \begin_inset space ~
7193 \end_inset
7194
7195 t
7196 \family default
7197  
7198 \family typewriter
7199 }
7200 \family default
7201 .
7202 \end_layout
7203
7204 \begin_layout Standard
7205 Also, refer to the figures in the example paper.
7206 \end_layout
7207
7208 \begin_layout Subsection
7209 Referee layout
7210 \end_layout
7211
7212 \begin_layout Standard
7213 For submission, the paper has to be formated in a special double-spacing
7214  layout.
7215  For this purpose, you have to give the option 
7216 \family typewriter
7217 referee
7218 \family default
7219  to the documentclass.
7220  This must be done using the extra class options field in the 
7221 \family sans
7222 Document\SpecialChar \menuseparator
7223 Settings
7224 \family default
7225  dialog.
7226  Just enter the string 
7227 \family typewriter
7228 referee
7229 \family default
7230  there.
7231 \end_layout
7232
7233 \begin_layout Subsection
7234 The example paper
7235 \end_layout
7236
7237 \begin_layout Standard
7238 The 
7239 \family sans
7240 Examples
7241 \family default
7242  directory contains an example paper written with LyX.
7243  It is the example paper from the original macro package, translated to
7244  LyX.
7245  Use it for inspiration, and compare the original LaTeX code with LyX way
7246  of writing.
7247 \end_layout
7248
7249 \begin_layout Section
7250 AASTeX
7251 \end_layout
7252
7253 \begin_layout Standard
7254 by 
7255 \noun on
7256 Mike Ressler
7257 \end_layout
7258
7259 \begin_layout Subsection
7260 Introduction
7261 \end_layout
7262
7263 \begin_layout Standard
7264 AASTeX is a set of macros produced by the American Astronomical Society
7265  to facilitate electronic manuscript submission to the three journals they
7266  publish: the Astrophysical Journal (including the Letters and Supplement),
7267  the Astronomical Journal, and the Publications of the Astronomical Society
7268  of the Pacific.
7269  LyX has proven to be an excellent tool for generating these documents,
7270  especially given its equation, citation, and figure handling capabilities.
7271  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7272  is the version described here, or higher.
7273  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7274  incompatible with LyX.
7275  The AASTeX package may be downloaded from the AASTeX Web site
7276 \end_layout
7277
7278 \begin_layout Standard
7279 \begin_inset VSpace medskip
7280 \end_inset
7281
7282
7283 \end_layout
7284
7285 \begin_layout Standard
7286 \align center
7287 \begin_inset Flex URL
7288 status collapsed
7289
7290 \begin_layout Plain Layout
7291
7292 http://www.journals.uchicago.edu/AAS/AASTeX
7293 \end_layout
7294
7295 \end_inset
7296
7297
7298 \end_layout
7299
7300 \begin_layout Standard
7301 \begin_inset VSpace medskip
7302 \end_inset
7303
7304
7305 \end_layout
7306
7307 \begin_layout Standard
7308 A complete user guide is contained in that package and you should familiarize
7309  yourself with it thoroughly before embarking on writing a paper in LyX.
7310  LyX will not reduce the need to figure out all the AASTeX commands, it
7311  will only reduce the drudgery of typing everything in.
7312  It is your responsibility to ensure that the final exported LaTeX document
7313  conforms completely to the requirements of the journal to which you are
7314  submitting your paper.
7315 \end_layout
7316
7317 \begin_layout Subsection
7318 Starting a New Paper
7319 \end_layout
7320
7321 \begin_layout Standard
7322 I strongly suggest that you start with the AASTeX template file.
7323  Click on 
7324 \family sans
7325 File\SpecialChar \menuseparator
7326 New from
7327 \family default
7328  
7329 \family sans
7330 Template
7331 \family default
7332 , enter the new file name, then choose the 
7333 \family typewriter
7334 aastex.lyx
7335 \family default
7336  template.
7337  This will show the most common fields found in a manuscript.
7338  Simply overwrite the existing text (including the brackets, 
7339 \family typewriter
7340 <>
7341 \family default
7342 ) with the correct information.
7343  Many of the AASTeX commands and environments can be implemented directly
7344  in LyX, but some cannot: most noticeably 
7345 \family typewriter
7346
7347 \backslash
7348 altaffilmark
7349 \family default
7350  and 
7351 \family typewriter
7352
7353 \backslash
7354 altaffiltext
7355 \family default
7356 , which should stick out like a sore thumb if you actually just opened the
7357  template file.
7358  For commands such as these, the LaTeX code must be entered directly and
7359  marked as such.
7360  Such commands are referred to as TeX code, or Evil Red Text.
7361  I tried to minimize the amount of TeX code needed in an AASTeX document,
7362  but there is still a bit more required than any of us would like.
7363 \end_layout
7364
7365 \begin_layout Subsection
7366 Finishing Your Paper
7367 \end_layout
7368
7369 \begin_layout Standard
7370 When the paper is finished to your satisfaction and previews/prints correctly,
7371  there are a few 
7372 \begin_inset Quotes eld
7373 \end_inset
7374
7375 postprocessing
7376 \begin_inset Quotes erd
7377 \end_inset
7378
7379  actions which need to be done before you submit it to the journals.
7380  
7381 \end_layout
7382
7383 \begin_layout Enumerate
7384 Export your paper as a LaTeX file (
7385 \family sans
7386 File\SpecialChar \menuseparator
7387 Export\SpecialChar \menuseparator
7388 LaTeX
7389 \family default
7390 ).
7391  
7392 \end_layout
7393
7394 \begin_layout Enumerate
7395 Edit the resulting 
7396 \family typewriter
7397 .tex
7398 \family default
7399  file with your favorite text editor
7400 \end_layout
7401
7402 \begin_deeper
7403 \begin_layout Enumerate
7404 remove the comment lines before the 
7405 \family typewriter
7406
7407 \backslash
7408 documentclass
7409 \family default
7410  command
7411 \end_layout
7412
7413 \begin_layout Enumerate
7414 remove the 
7415 \family typewriter
7416
7417 \backslash
7418 usepackage...{fontenc}
7419 \family default
7420  line if it appears (usually just after 
7421 \family typewriter
7422
7423 \backslash
7424 documentclass
7425 \family default
7426 }; also remove the 
7427 \family typewriter
7428
7429 \backslash
7430 secnumdepth
7431 \family default
7432  line if it appears.
7433 \end_layout
7434
7435 \begin_layout Enumerate
7436 remove everything between (and including) the 
7437 \family typewriter
7438
7439 \backslash
7440 makeatletter
7441 \family default
7442  and 
7443 \family typewriter
7444
7445 \backslash
7446 makeatother
7447 \family default
7448  commands, except for any commands you specifically put into the LaTeX preamble
7449  (which should appear immediately after the 
7450 \begin_inset Quotes eld
7451 \end_inset
7452
7453 User specified LaTeX commands
7454 \begin_inset Quotes erd
7455 \end_inset
7456
7457  comment in the 
7458 \family typewriter
7459 .tex
7460 \family default
7461  file).
7462 \end_layout
7463
7464 \end_deeper
7465 \begin_layout Enumerate
7466 Run the resulting file through LaTeX to make sure it still processes correctly.
7467 \end_layout
7468
7469 \begin_layout Enumerate
7470 Reread the journal requirements to make sure your filenames and formats
7471  are correct.
7472 \end_layout
7473
7474 \begin_layout Enumerate
7475 Submit it.
7476 \end_layout
7477
7478 \begin_layout Subsection
7479 Comments On Specific Commands
7480 \end_layout
7481
7482 \begin_layout Standard
7483 I will not describe the detailed usage of the individual AASTeX commands:
7484  the AASTeX User Guide (
7485 \family typewriter
7486 aasguide.tex
7487 \family default
7488 ) gives a good description of each.
7489  Thus it's probably easiest for me to go down the list as found in the guide
7490  and offer comments where necessary.
7491  So let's begin \SpecialChar \ldots{}
7492
7493 \end_layout
7494
7495 \begin_layout Subsubsection
7496 Things that work as expected
7497 \end_layout
7498
7499 \begin_layout Standard
7500 \begin_inset ERT
7501 status open
7502
7503 \begin_layout Plain Layout
7504
7505
7506 \backslash
7507 begin{sloppypar}
7508 \end_layout
7509
7510 \end_inset
7511
7512
7513 \end_layout
7514
7515 \begin_layout Standard
7516 Because they work as you might expect, I simply list them and the section
7517  they are found in: 
7518 \family typewriter
7519
7520 \backslash
7521 documentclass
7522 \family default
7523  (2.1.1), 
7524 \family typewriter
7525
7526 \backslash
7527 begin{document}
7528 \family default
7529  (2.2), 
7530 \family typewriter
7531
7532 \backslash
7533 title
7534 \family default
7535  (2.3), 
7536 \family typewriter
7537
7538 \backslash
7539 author
7540 \family default
7541  (2.3), 
7542 \family typewriter
7543
7544 \backslash
7545 affil
7546 \family default
7547  (2.3), 
7548 \family typewriter
7549
7550 \backslash
7551 abstract
7552 \family default
7553  (2.4), 
7554 \family typewriter
7555
7556 \backslash
7557 keywords
7558 \family default
7559  (2.5), 
7560 \family typewriter
7561
7562 \backslash
7563 section
7564 \family default
7565  (2.7), 
7566 \family typewriter
7567
7568 \backslash
7569 subsection
7570 \family default
7571  (2.7), 
7572 \family typewriter
7573
7574 \backslash
7575 subsubsection
7576 \family default
7577  (2.7), 
7578 \family typewriter
7579
7580 \backslash
7581 paragraph
7582 \family default
7583  (2.7), 
7584 \family typewriter
7585
7586 \backslash
7587 facility
7588 \family default
7589  (2.10), 
7590 \family typewriter
7591
7592 \backslash
7593 begin{displaymath}
7594 \family default
7595  (2.12), 
7596 \family typewriter
7597
7598 \backslash
7599 begin{equation}
7600 \family default
7601  (2.12), 
7602 \family typewriter
7603
7604 \backslash
7605 begin{eqnarray}
7606 \family default
7607  (2.12), 
7608 \family typewriter
7609
7610 \backslash
7611 begin{mathletters}
7612 \family default
7613  (2.12), 
7614 \family typewriter
7615
7616 \backslash
7617 begin{thebibliography}
7618 \family default
7619  (2.13.1), 
7620 \family typewriter
7621
7622 \backslash
7623 bibitem
7624 \family default
7625  (2.13.2), all the cite commands and their variations (2.13.2), the generic
7626  graphicx figure commands (2.14.1), 
7627 \family typewriter
7628
7629 \backslash
7630 begin{table}
7631 \family default
7632  (2.15.4), 
7633 \family typewriter
7634
7635 \backslash
7636 begin{tabular}
7637 \family default
7638  (2.15.4), 
7639 \family typewriter
7640
7641 \backslash
7642 caption
7643 \family default
7644  (2.15.4), 
7645 \family typewriter
7646
7647 \backslash
7648 label
7649 \family default
7650  (2.15.4, amongst other places), 
7651 \family typewriter
7652
7653 \backslash
7654 tablerefs
7655 \family default
7656  (2.15.5), 
7657 \family typewriter
7658
7659 \backslash
7660 tablecomments
7661 \family default
7662  (2.15.5), 
7663 \family typewriter
7664
7665 \backslash
7666 url
7667 \family default
7668  (2.17.4), 
7669 \family typewriter
7670
7671 \backslash
7672 end{document}
7673 \family default
7674  (2.18).
7675 \end_layout
7676
7677 \begin_layout Standard
7678 The following style options also work correctly: 
7679 \family typewriter
7680 longabstract
7681 \family default
7682  (2.4), 
7683 \family typewriter
7684 preprint
7685 \family default
7686  (3.2.1), 
7687 \family typewriter
7688 preprint2
7689 \family default
7690  (3.2.2), 
7691 \family typewriter
7692 eqsecnum
7693 \family default
7694  (3.3), 
7695 \family typewriter
7696 flushrt
7697 \family default
7698  (3.4).
7699  Simply put them in the 
7700 \family sans
7701 Options
7702 \family default
7703  box in 
7704 \family sans
7705 Layout\SpecialChar \menuseparator
7706 Document
7707 \family default
7708 .
7709 \end_layout
7710
7711 \begin_layout Standard
7712 \begin_inset ERT
7713 status open
7714
7715 \begin_layout Plain Layout
7716
7717
7718 \backslash
7719 end{sloppypar}
7720 \end_layout
7721
7722 \end_inset
7723
7724
7725 \end_layout
7726
7727 \begin_layout Subsubsection
7728 Things that work, but require more comment
7729 \end_layout
7730
7731 \begin_layout Standard
7732 The following items work, but require a little more discussion:
7733 \end_layout
7734
7735 \begin_layout Itemize
7736 These items are reserved for use by the journal editors, but you can put
7737  them into the LaTeX preamble if you feel compelled to do so: 
7738 \family typewriter
7739
7740 \backslash
7741 received
7742 \family default
7743
7744 \family typewriter
7745
7746 \backslash
7747 revised
7748 \family default
7749
7750 \family typewriter
7751
7752 \backslash
7753 accepted
7754 \family default
7755
7756 \family typewriter
7757
7758 \backslash
7759 ccc
7760 \family default
7761
7762 \family typewriter
7763
7764 \backslash
7765 cpright
7766 \family default
7767  (all from 2.1.3)
7768 \end_layout
7769
7770 \begin_layout Itemize
7771 These items may be placed in the LaTeX preamble, and are included as blanks
7772  in the template file: 
7773 \family typewriter
7774
7775 \backslash
7776 slugcomment
7777 \family default
7778  (2.1.4), 
7779 \family typewriter
7780
7781 \backslash
7782 shorttitle
7783 \family default
7784  (2.1.5), 
7785 \family typewriter
7786
7787 \backslash
7788 shortauthors
7789 \family default
7790  (2.1.5)
7791 \end_layout
7792
7793 \begin_layout Itemize
7794
7795 \family typewriter
7796
7797 \backslash
7798 email
7799 \family default
7800  (2.3) – can only be used 
7801 \begin_inset Quotes eld
7802 \end_inset
7803
7804 standalone
7805 \begin_inset Quotes erd
7806 \end_inset
7807
7808 , not in the middle of a paragraph.
7809  Use TeX code if you need to embed it.
7810 \end_layout
7811
7812 \begin_layout Itemize
7813
7814 \family typewriter
7815
7816 \backslash
7817 and
7818 \family default
7819  (2.3) – will have extra {} after it.
7820  This should not cause an error.
7821 \end_layout
7822
7823 \begin_layout Itemize
7824
7825 \family typewriter
7826
7827 \backslash
7828 notetoeditor
7829 \family default
7830  (2.6) – can only be used 
7831 \begin_inset Quotes eld
7832 \end_inset
7833
7834 standalone
7835 \begin_inset Quotes erd
7836 \end_inset
7837
7838 , not in the middle of a paragraph.
7839  Use TeX code if you need to embed it.
7840 \end_layout
7841
7842 \begin_layout Itemize
7843
7844 \family typewriter
7845
7846 \backslash
7847 placetable
7848 \family default
7849  (2.8) – can't insert a cross-reference tag, you must type the tag name by
7850  hand
7851 \end_layout
7852
7853 \begin_layout Itemize
7854
7855 \family typewriter
7856
7857 \backslash
7858 placefigure
7859 \family default
7860  (2.8) – same as for 
7861 \family typewriter
7862
7863 \backslash
7864 placetable
7865 \end_layout
7866
7867 \begin_layout Itemize
7868
7869 \family typewriter
7870
7871 \backslash
7872 acknowledgements
7873 \family default
7874  (2.9) – will have extra {} after it.
7875  This should not cause an error.
7876 \end_layout
7877
7878 \begin_layout Itemize
7879
7880 \family typewriter
7881
7882 \backslash
7883 appendix
7884 \family default
7885  (2.11) – will have extra {} after it.
7886  This should not cause an error.
7887 \end_layout
7888
7889 \begin_layout Itemize
7890
7891 \family typewriter
7892
7893 \backslash
7894 figcaption
7895 \family default
7896  (2.14.2) – you can insert an optional filename argument by placing the cursor
7897  at the beginning of the text and selecting 
7898 \family sans
7899 Insert\SpecialChar \menuseparator
7900 Short Title
7901 \family default
7902 .
7903  
7904 \begin_inset Quotes eld
7905 \end_inset
7906
7907 Short Title
7908 \begin_inset Quotes erd
7909 \end_inset
7910
7911  inserts an optional argument of the type needed by 
7912 \family typewriter
7913
7914 \backslash
7915 figcaption
7916 \family default
7917 .
7918  Hopefully it will be renamed someday.
7919 \end_layout
7920
7921 \begin_layout Itemize
7922
7923 \family typewriter
7924
7925 \backslash
7926 objectname
7927 \family default
7928  (2.17.1) – same as 
7929 \family typewriter
7930
7931 \backslash
7932 figcaption
7933 \family default
7934  for the catalog ID optional parameter
7935 \end_layout
7936
7937 \begin_layout Itemize
7938
7939 \family typewriter
7940
7941 \backslash
7942 dataset
7943 \family default
7944  (2.17.1) – same as 
7945 \family typewriter
7946
7947 \backslash
7948 figcaption
7949 \family default
7950  for the catalog ID optional parameter
7951 \end_layout
7952
7953 \begin_layout Subsubsection
7954 Things not implemented, use TeX code
7955 \end_layout
7956
7957 \begin_layout Standard
7958 \begin_inset ERT
7959 status open
7960
7961 \begin_layout Plain Layout
7962
7963
7964 \backslash
7965 begin{sloppypar}
7966 \end_layout
7967
7968 \end_inset
7969
7970
7971 \end_layout
7972
7973 \begin_layout Standard
7974
7975 \family typewriter
7976
7977 \backslash
7978 altaffilmark
7979 \family default
7980  (2.3), 
7981 \family typewriter
7982
7983 \backslash
7984 altaffiltext
7985 \family default
7986  (2.3), 
7987 \family typewriter
7988
7989 \backslash
7990 eqnum
7991 \family default
7992  (2.12), 
7993 \family typewriter
7994
7995 \backslash
7996 setcounter{equation}
7997 \family default
7998  (2.12), Journal name abbreviations (2.13.4), 
7999 \family typewriter
8000
8001 \backslash
8002 figurenum
8003 \family default
8004  (2.14.1), 
8005 \family typewriter
8006
8007 \backslash
8008 epsscale
8009 \family default
8010  (2.14.1), 
8011 \family typewriter
8012
8013 \backslash
8014 plotone
8015 \family default
8016  (2.14.1), 
8017 \family typewriter
8018
8019 \backslash
8020 plottwo
8021 \family default
8022  (2.14.1), 
8023 \family typewriter
8024
8025 \backslash
8026 tablenum
8027 \family default
8028  (2.15.4), 
8029 \family typewriter
8030
8031 \backslash
8032 tableline
8033 \family default
8034  (2.15.4, insert it as the first element in the lefthand cell after where
8035  you want it.
8036  Don't use any of LyX's rules in the table), 
8037 \family typewriter
8038
8039 \backslash
8040 tablenotemark
8041 \family default
8042  (2.15.5), 
8043 \family typewriter
8044
8045 \backslash
8046 tablenotetext
8047 \family default
8048  (2.15.5), much of Misc (2.17, except 
8049 \family typewriter
8050
8051 \backslash
8052 objectname
8053 \family default
8054
8055 \family typewriter
8056
8057 \backslash
8058 dataset
8059 \family default
8060
8061 \family typewriter
8062
8063 \backslash
8064 url
8065 \family default
8066 , and 
8067 \family typewriter
8068
8069 \backslash
8070 email
8071 \family default
8072 ; see above), 
8073 \family typewriter
8074
8075 \backslash
8076 singlespace
8077 \family default
8078  (3.1), 
8079 \family typewriter
8080
8081 \backslash
8082 doublespace
8083 \family default
8084  (3.1), 
8085 \family typewriter
8086
8087 \backslash
8088 onecolumn
8089 \family default
8090  (3.2), 
8091 \family typewriter
8092
8093 \backslash
8094 twocolumn
8095 \family default
8096  (3.2)
8097 \end_layout
8098
8099 \begin_layout Standard
8100 \begin_inset ERT
8101 status open
8102
8103 \begin_layout Plain Layout
8104
8105
8106 \backslash
8107 end{sloppypar}
8108 \end_layout
8109
8110 \end_inset
8111
8112
8113 \end_layout
8114
8115 \begin_layout Subsubsection
8116 Things that cannot be implemented
8117 \end_layout
8118
8119 \begin_layout Standard
8120 \SpecialChar \ldots{}
8121  at least in any meaningful sort of way, so I suggest ignoring them.
8122  They are the references environment (2.13.3), and the deluxetable environment
8123  (2.15).
8124  If you really, really need to use deluxetable, I suggest editing it in
8125  a separate file with a text editor, then using 
8126 \family sans
8127 Insert\SpecialChar \menuseparator
8128 Child
8129 \begin_inset space ~
8130 \end_inset
8131
8132 Document
8133 \family default
8134  to include it in your LyX document.
8135  See the 
8136 \family typewriter
8137 aas_sample.lyx
8138 \family default
8139  file to see an example of this.
8140 \end_layout
8141
8142 \begin_layout Subsection
8143 FAQs, Tips, Tricks, and Other Ruminations
8144 \end_layout
8145
8146 \begin_layout Subsubsection
8147 Getting LyX and AASTeX to cooperate
8148 \end_layout
8149
8150 \begin_layout Standard
8151 It can be a bit tricky to get LyX to recognize a new layout and document
8152  class.
8153  When all else fails, do this:
8154 \end_layout
8155
8156 \begin_layout Enumerate
8157 Make certain that LaTeX can find AASTeX.
8158  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8159  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8160 \family typewriter
8161 sample.tex
8162 \family default
8163 .
8164 \end_layout
8165
8166 \begin_layout Enumerate
8167 Make certain that 
8168 \family typewriter
8169 aastex.layout
8170 \family default
8171  appears in LyX's 
8172 \family typewriter
8173 layouts
8174 \family default
8175  folder
8176 \end_layout
8177
8178 \begin_layout Enumerate
8179 Rerun 
8180 \family sans
8181 Tools\SpecialChar \menuseparator
8182 Reconfigure
8183 \family default
8184  in LyX, then restart LyX.
8185 \end_layout
8186
8187 \begin_layout Enumerate
8188 Open a regular new file, not from a template.
8189  Does AASTeX appear in the class list in 
8190 \family sans
8191 Document\SpecialChar \menuseparator
8192 Settings
8193 \family default
8194 ?
8195 \end_layout
8196
8197 \begin_layout Standard
8198 If you get a warning from an existing AASTeX document about not being able
8199  to find the AASTeX layout or a message about 
8200 \begin_inset Quotes eld
8201 \end_inset
8202
8203 You should not mix title layouts with normal ones
8204 \begin_inset Quotes erd
8205 \end_inset
8206
8207 , things haven't been installed correctly.
8208 \end_layout
8209
8210 \begin_layout Subsubsection
8211 LaTeX error processing a table 
8212 \end_layout
8213
8214 \begin_layout Standard
8215 LyX, by default, attempts to center the table caption/title.
8216  This seems to produce a bad interaction in AASTeX so you should click somewhere
8217  in the caption/title, then select 
8218 \family sans
8219 Edit\SpecialChar \menuseparator
8220 Paragraph
8221 \begin_inset space ~
8222 \end_inset
8223
8224 Settings
8225 \family default
8226 , then set the 
8227 \family sans
8228 Alignment
8229 \family default
8230  to 
8231 \family sans
8232 Block
8233 \family default
8234 .
8235  This took care of it for me.
8236 \end_layout
8237
8238 \begin_layout Subsubsection
8239 References
8240 \end_layout
8241
8242 \begin_layout Standard
8243 A couple of things: 1) I have noticed some funny spacing in the reference
8244  entries in the text.
8245  When you enter the bibliography item data, make sure their is 
8246 \emph on
8247 no
8248 \emph default
8249  space between the last author and the parenthesis setting off the year;
8250  
8251 \emph on
8252 e.
8253 \begin_inset space \thinspace{}
8254 \end_inset
8255
8256 g.
8257 \begin_inset space \space{}
8258 \end_inset
8259
8260
8261 \emph default
8262 type 
8263 \family typewriter
8264 Ressler(1992)
8265 \family default
8266 , not 
8267 \family typewriter
8268 Ressler (1992)
8269 \family default
8270 .
8271  2) Entering the references at all is not obvious.
8272  The easiest thing is to start typing your first reference at the end of
8273  the document, then mark it as type 
8274 \family sans
8275 References
8276 \family default
8277 .
8278  That will put a small gray box in front of what you just typed.
8279  Click on the box to fill in the rest of the information.
8280  For new references, go to the end of an existing reference and press return.
8281  That will create a new line with its own box, etc.
8282 \end_layout
8283
8284 \begin_layout Subsubsection
8285 Including EPS files
8286 \end_layout
8287
8288 \begin_layout Standard
8289 Even though AASTeX provides its own figure commands (
8290 \family typewriter
8291
8292 \backslash
8293 plotone
8294 \family default
8295 , for example), I much prefer LaTeX's standard figure commands (with the
8296  default graphicx).
8297  You can insert the 
8298 \family typewriter
8299
8300 \backslash
8301 plotone
8302 \family default
8303 , etc.
8304 \begin_inset space ~
8305 \end_inset
8306
8307 commands as TeX code into a Figure Float box if you desire, but I never
8308  have much luck getting the layout right.
8309  With the standard graphics, LyX will insert a 
8310 \family typewriter
8311
8312 \backslash
8313 usepackage{graphicx}
8314 \family default
8315  command into the LaTeX preamble and handle the figures in the standard
8316  LaTeX2e way, interspersing the figures in the text.
8317  I believe ApJ accepts figures exactly this way now; AJ might still use
8318  the 
8319 \begin_inset Quotes eld
8320 \end_inset
8321
8322 stack everything at the end
8323 \begin_inset Quotes erd
8324 \end_inset
8325
8326  technique.
8327 \end_layout
8328
8329 \begin_layout Subsubsection
8330 Things I could have done, but didn't
8331 \end_layout
8332
8333 \begin_layout Standard
8334 There are a few 
8335 \begin_inset Quotes eld
8336 \end_inset
8337
8338 pretty
8339 \begin_inset Quotes erd
8340 \end_inset
8341
8342  things I could have implemented, but chose not to.
8343  For instance, I saw no point in double-spacing the text in the LyX window,
8344  even though it is double-spaced in the paper manuscript.
8345  Also, I chose not to make separate layouts for the preprint and preprint2
8346  styles.
8347  Since I assume you will spend most of your time in the plain manuscript
8348  mode anyway, I decided not to chew up more disk space with this.
8349  
8350 \end_layout
8351
8352 \begin_layout Subsection
8353 Final Caveat
8354 \end_layout
8355
8356 \begin_layout Standard
8357 Your mileage may vary.
8358  I've now had papers published by both ApJ and AJ that have had 98% of the
8359  effort done in LyX; the last 2% was the LaTeX post-processing and a few
8360  cleanups.
8361  I have had no trouble with the submission process, and I'm sure the journals
8362  were never aware that there might be a difference.
8363  So, go forth and publish!
8364 \end_layout
8365
8366 \begin_layout Section
8367 AMS LaTeX
8368 \end_layout
8369
8370 \begin_layout Standard
8371 by 
8372 \noun on
8373 David Johnson; updated by Richard Heck
8374 \end_layout
8375
8376 \begin_layout Standard
8377 \begin_inset VSpace bigskip
8378 \end_inset
8379
8380
8381 \end_layout
8382
8383 \begin_layout Standard
8384 \noindent
8385 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8386  papers to be submitted to American Mathematical Society publications.
8387  The layouts are not tailored to a specific journal, but easily can be.
8388  You should refer to the AMS documentation for specific instructions for
8389  each journal (usually it will entail only changing a single line in the
8390  TeX output).
8391  That documentation is available on the Web at 
8392 \begin_inset Flex URL
8393 status open
8394
8395 \begin_layout Plain Layout
8396
8397 http://www.ams.org
8398 \end_layout
8399
8400 \end_inset
8401
8402  or by ftp at 
8403 \begin_inset Flex URL
8404 status open
8405
8406 \begin_layout Plain Layout
8407
8408 ftp://ftp.ams.org/pub/tex/amslatex/
8409 \end_layout
8410
8411 \end_inset
8412
8413 .
8414  These layouts are appropriate, and useful, for any mathematical writing.
8415  
8416 \end_layout
8417
8418 \begin_layout Standard
8419 There are two basic AMS LaTeX layouts: 
8420 \end_layout
8421
8422 \begin_layout Itemize
8423 amsart: The standard AMS article format.
8424 \end_layout
8425
8426 \begin_layout Itemize
8427 amsbook: the standard AMS book (really, monograph) format.
8428  
8429 \end_layout
8430
8431 \begin_layout Standard
8432 The layouts themselves contain only the minimum necessary to use the AMS
8433  classes.
8434  They do not, in particular, contain any of the `theorem' environments used
8435  for setting theorems, lemmas, and the like.
8436  These are contained, instead, in the 
8437 \begin_inset Flex CharStyle:Code
8438 status collapsed
8439
8440 \begin_layout Plain Layout
8441 Theorems (AMS)
8442 \end_layout
8443
8444 \end_inset
8445
8446  module, which is loaded by default when when you select one of the AMS
8447  classes.
8448  (It can also be used with other classes and can be removed, if you would
8449  rather use something else.) Less commonly used environments are in the 
8450 \begin_inset Flex CharStyle:Code
8451 status collapsed
8452
8453 \begin_layout Plain Layout
8454 Theorems (AMS-Extended)
8455 \end_layout
8456
8457 \end_inset
8458
8459  module, which must be loaded manually.
8460 \end_layout
8461
8462 \begin_layout Standard
8463 By default, theorems and the like are numbered consecutively throughout
8464  the document, but this may be modified by loading the module 
8465 \begin_inset Flex CharStyle:Code
8466 status collapsed
8467
8468 \begin_layout Plain Layout
8469 Theorems (Order by Section)
8470 \end_layout
8471
8472 \end_inset
8473
8474  or, if you are using 
8475 \begin_inset Flex CharStyle:Code
8476 status collapsed
8477
8478 \begin_layout Plain Layout
8479 book (AMS)
8480 \end_layout
8481
8482 \end_inset
8483
8484 , the module 
8485 \begin_inset Flex CharStyle:Code
8486 status collapsed
8487
8488 \begin_layout Plain Layout
8489 Theorems (Order by Chapter)
8490 \end_layout
8491
8492 \end_inset
8493
8494 .
8495  These will number the results as 
8496 \begin_inset Formula $n.m$
8497 \end_inset
8498
8499 , where the first number refers to the section (or chapter) and the second
8500  refers to the total number of results so far in that section (or chapter).
8501  Many environments are also available unnumbered.
8502  These are indicated by an asterisk at the end.
8503  If you happen to want 
8504 \emph on
8505 only
8506 \emph default
8507  unnumbered results, the module 
8508 \begin_inset Flex CharStyle:Code
8509 status collapsed
8510
8511 \begin_layout Plain Layout
8512 Theorems (Starred)
8513 \end_layout
8514
8515 \end_inset
8516
8517  provides that option.
8518 \end_layout
8519
8520 \begin_layout Standard
8521 Note that these modules do not 
8522 \emph on
8523 have
8524 \emph default
8525  to be used with the AMS classes.
8526  It is perfectly possible to use the 
8527 \begin_inset Flex CharStyle:Code
8528 status collapsed
8529
8530 \begin_layout Plain Layout
8531 Theorems (AMS)
8532 \end_layout
8533
8534 \end_inset
8535
8536  module, and the others mentioned, with other classes, such as 
8537 \begin_inset Flex CharStyle:Code
8538 status collapsed
8539
8540 \begin_layout Plain Layout
8541 article
8542 \end_layout
8543
8544 \end_inset
8545
8546
8547 \begin_inset Flex CharStyle:Code
8548 status collapsed
8549
8550 \begin_layout Plain Layout
8551 report
8552 \end_layout
8553
8554 \end_inset
8555
8556
8557 \begin_inset Flex CharStyle:Code
8558 status collapsed
8559
8560 \begin_layout Plain Layout
8561 book (KOMA-script)
8562 \end_layout
8563
8564 \end_inset
8565
8566 , and so forth.
8567 \end_layout
8568
8569 \begin_layout Subsection
8570 What these layouts provide
8571 \end_layout
8572
8573 \begin_layout Standard
8574 There is a long list of included environments provided by these layouts.
8575  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
8576  variety of `theorem' environments.
8577  However, the AMS recommends the environments that are available in LyX.
8578  
8579 \end_layout
8580
8581 \begin_layout Standard
8582 The following environments—as well as the standard environments, such as
8583  
8584 \begin_inset Flex CharStyle:Noun
8585 status collapsed
8586
8587 \begin_layout Plain Layout
8588 section
8589 \end_layout
8590
8591 \end_inset
8592
8593
8594 \begin_inset Flex CharStyle:Noun
8595 status collapsed
8596
8597 \begin_layout Plain Layout
8598 bibliography
8599 \end_layout
8600
8601 \end_inset
8602
8603
8604 \begin_inset Flex CharStyle:Noun
8605 status collapsed
8606
8607 \begin_layout Plain Layout
8608 title
8609 \end_layout
8610
8611 \end_inset
8612
8613
8614 \begin_inset Flex CharStyle:Noun
8615 status collapsed
8616
8617 \begin_layout Plain Layout
8618 author
8619 \end_layout
8620
8621 \end_inset
8622
8623 , and 
8624 \begin_inset Flex CharStyle:Noun
8625 status collapsed
8626
8627 \begin_layout Plain Layout
8628 date
8629 \end_layout
8630
8631 \end_inset
8632
8633 —are provided by 
8634 \begin_inset Flex CharStyle:Code
8635 status collapsed
8636
8637 \begin_layout Plain Layout
8638 article (AMS)
8639 \end_layout
8640
8641 \end_inset
8642
8643  and 
8644 \begin_inset Flex CharStyle:Code
8645 status collapsed
8646
8647 \begin_layout Plain Layout
8648 book (AMS)
8649 \end_layout
8650
8651 \end_inset
8652
8653 :
8654 \end_layout
8655
8656 \begin_layout Description
8657 Address This should be the author's permanent address.
8658 \end_layout
8659
8660 \begin_layout Description
8661 Current
8662 \begin_inset space ~
8663 \end_inset
8664
8665 Address This should be the author's temporary address at the time of submission,
8666  if different from the Address.
8667 \end_layout
8668
8669 \begin_layout Description
8670 Email Author's e-mail address
8671 \end_layout
8672
8673 \begin_layout Description
8674 URL Author's Web address, if desired.
8675 \end_layout
8676
8677 \begin_layout Description
8678 Keywords Key words or phrases used to identify specific topics discussed
8679  in the paper.
8680 \end_layout
8681
8682 \begin_layout Description
8683 Subjectclass These refer to the AMS Subject Classifications, published and
8684  described in 
8685 \emph on
8686 Mathematical Reviews
8687 \emph default
8688 .
8689  These are also available online at the AMS cites listed above.
8690 \end_layout
8691
8692 \begin_layout Description
8693 Thanks
8694 \end_layout
8695
8696 \begin_layout Description
8697 Dedicatory
8698 \end_layout
8699
8700 \begin_layout Description
8701 Translator
8702 \end_layout
8703
8704 \begin_layout Standard
8705 The following environments are provided by both the 
8706 \begin_inset Flex CharStyle:Code
8707 status collapsed
8708
8709 \begin_layout Plain Layout
8710 Theorems
8711 \end_layout
8712
8713 \end_inset
8714
8715  and 
8716 \begin_inset Flex CharStyle:Code
8717 status collapsed
8718
8719 \begin_layout Plain Layout
8720 Theorems (AMS)
8721 \end_layout
8722
8723 \end_inset
8724
8725  modules, in the latter case in both starred (unnumbered) and unstarred
8726  (numbered) versions.
8727  These same environments are provided only in the starred versions by the
8728  
8729 \begin_inset Flex CharStyle:Code
8730 status collapsed
8731
8732 \begin_layout Plain Layout
8733 Theorems (Starred)
8734 \end_layout
8735
8736 \end_inset
8737
8738  module:
8739 \end_layout
8740
8741 \begin_layout Theorem
8742 This is typically used for the statements of major results.
8743  
8744 \end_layout
8745
8746 \begin_layout Corollary*
8747 This is used for statements which follow fairly directly from previous statement
8748 s.
8749  Again, these can be major results.
8750  
8751 \end_layout
8752
8753 \begin_layout Lemma
8754 These are smaller results needed to prove other statements.
8755 \end_layout
8756
8757 \begin_layout Proposition
8758 These are less major results which (hopefully) add to the general theory
8759  being discussed.
8760 \end_layout
8761
8762 \begin_layout Conjecture
8763 These are statements provided without justification, which the author does
8764  not know how to prove, but which seem to be true (to the author, at least).
8765 \end_layout
8766
8767 \begin_layout Definition*
8768 Guess what this is for.
8769  The font is different for this environment than for the previous ones.
8770  
8771 \end_layout
8772
8773 \begin_layout Example*
8774 Used for examples illustrating proven results.
8775 \end_layout
8776
8777 \begin_layout Problem
8778 It's not really known what this is for.
8779  You should figure it out.
8780 \end_layout
8781
8782 \begin_layout Exercise*
8783 Write a description for this one.
8784 \end_layout
8785
8786 \begin_layout Remark
8787 This environment is also a type of theorem, usually a lesser sort of observation.
8788 \end_layout
8789
8790 \begin_layout Claim*
8791 Often used in the course of giving a proof of a larger result.
8792 \end_layout
8793
8794 \begin_layout Case
8795 Generally, these are used to break up long arguments, using specific instances
8796  of some condition.
8797  
8798 \end_layout
8799
8800 \begin_layout Case
8801 The numbering scheme for cases is on its own, not together with other numbered
8802  statements.
8803  
8804 \end_layout
8805
8806 \begin_layout Proof
8807 At the end of this environment, a QED symbol (usually a square, but it can
8808  vary with different styles) is placed.
8809  If you want to have other environments within this one—for example, Case
8810  environments—and have the QED symbol appear only after them, then the other
8811  environments need to be nested within the proof environment.
8812  See the section 
8813 \emph on
8814 Nesting Environments
8815 \emph default
8816  of the 
8817 \emph on
8818 User's Guide
8819 \emph default
8820  for information on nesting.
8821 \end_layout
8822
8823 \begin_layout Standard
8824 And these environments are provided by 
8825 \begin_inset Flex CharStyle:Code
8826 status collapsed
8827
8828 \begin_layout Plain Layout
8829 Theorems (AMS-Extended)
8830 \end_layout
8831
8832 \end_inset
8833
8834 :
8835 \end_layout
8836
8837 \begin_layout Criterion*
8838 A required condition.
8839 \end_layout
8840
8841 \begin_layout Algorithm*
8842 A general procedure to be used.
8843 \end_layout
8844
8845 \begin_layout Axiom*
8846 This is a property or statement taken as true within the system being discussed.
8847 \end_layout
8848
8849 \begin_layout Condition*
8850 Sometimes used to state a condition assumed within the present context of
8851  discussion.
8852 \end_layout
8853
8854 \begin_layout Note*
8855 Similar to a Remark.
8856 \end_layout
8857
8858 \begin_layout Notation*
8859 Used for the explanation of, yes, notation.
8860 \end_layout
8861
8862 \begin_layout Summary
8863 Do we really need to tell you? 
8864 \end_layout
8865
8866 \begin_layout Acknowledgement*
8867 Acknowledgement.
8868 \end_layout
8869
8870 \begin_layout Conclusion*
8871 Sometimes used at the end of a long train of argument.
8872 \end_layout
8873
8874 \begin_layout Fact
8875 Used in a way similar to Proposition, though perhaps lower on the scale.
8876 \end_layout
8877
8878 \begin_layout Standard
8879 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
8880  fonts packages.
8881  They need to be available on your system in order to use these environments.
8882 \end_layout
8883
8884 \begin_layout Section
8885 AGU journals (
8886 \family sans
8887 aguplus
8888 \family default
8889 )
8890 \end_layout
8891
8892 \begin_layout Standard
8893 by 
8894 \shape smallcaps
8895 Martin Vermeer
8896 \end_layout
8897
8898 \begin_layout Subsection
8899 Description
8900 \end_layout
8901
8902 \begin_layout Standard
8903 These are the layout files for some of the journals of the American Geophysical
8904  Society.
8905  It is assumed that you have both the AGU's own class files and AGUplus
8906  installed (everything to be found at
8907 \begin_inset Flex URL
8908 status collapsed
8909
8910 \begin_layout Plain Layout
8911
8912 ftp://ftp.agu.org/journals/latex/journals
8913 \end_layout
8914
8915 \end_inset
8916
8917 ).
8918 \end_layout
8919
8920 \begin_layout Subsection
8921 New styles
8922 \end_layout
8923
8924 \begin_layout Standard
8925 Redefined are 
8926 \family sans
8927 Paragraph
8928 \family default
8929
8930 \family sans
8931 Paragraph*
8932 \family default
8933 .
8934  They are still called this in the LyX GUI, though their LaTeX equivalents
8935  in the AGU classes are 
8936 \family sans
8937 Subsubsubsection
8938 \family default
8939  and 
8940 \family sans
8941 Subsubsubsection*
8942 \family default
8943 .
8944 \end_layout
8945
8946 \begin_layout Standard
8947 Newly defined styles are 
8948 \family sans
8949 Left_Header
8950 \family default
8951
8952 \family sans
8953 Right_Header
8954 \family default
8955
8956 \family sans
8957 Received
8958 \family default
8959
8960 \family sans
8961 Revised
8962 \family default
8963
8964 \family sans
8965 Accepted
8966 \family default
8967
8968 \family sans
8969 CCC
8970 \family default
8971
8972 \family sans
8973 PaperId
8974 \family default
8975
8976 \family sans
8977 AuthorAddr
8978 \family default
8979
8980 \family sans
8981 SlugComment
8982 \family default
8983 .
8984  These are mostly manuscript attributes and defined in the AGU class documentati
8985 on.
8986 \end_layout
8987
8988 \begin_layout Standard
8989 I suspect this is still badly incomplete.
8990 \end_layout
8991
8992 \begin_layout Subsection
8993 New floats
8994 \end_layout
8995
8996 \begin_layout Standard
8997
8998 \family sans
8999 Planotable
9000 \family default
9001  and 
9002 \family sans
9003 Plate
9004 \family default
9005 .
9006  We also have a new 
9007 \family sans
9008 Table_Caption
9009 \family default
9010 .
9011 \end_layout
9012
9013 \begin_layout Subsection
9014 Supported journals
9015 \end_layout
9016
9017 \begin_layout Itemize
9018
9019 \emph on
9020 Journal of Geophysical Research
9021 \emph default
9022
9023 \family typewriter
9024 jgrga.layout
9025 \family default
9026  — Martin Vermeer
9027 \end_layout
9028
9029 \begin_layout Standard
9030 Add your own, it isn't so hard! Look at the 
9031 \family typewriter
9032 jgrga.layout
9033 \family default
9034  example and 
9035 \family typewriter
9036 aguplus.inc
9037 \family default
9038 .
9039 \end_layout
9040
9041 \begin_layout Subsection
9042 Bugs and things to remember
9043 \end_layout
9044
9045 \begin_layout Standard
9046 In order to use the new layouts, you must remember to do the following for
9047  a new document:
9048 \end_layout
9049
9050 \begin_layout Enumerate
9051
9052 \emph on
9053 Turn off babel
9054 \emph default
9055 .
9056  This can be done in the 
9057 \family sans
9058 Layout\SpecialChar \menuseparator
9059 Document
9060 \family default
9061  or 
9062 \family sans
9063 Document\SpecialChar \menuseparator
9064 Settings
9065 \family default
9066  menu item.
9067  (AGU articles are always in English, right? So 
9068 \emph on
9069 don't
9070 \emph default
9071  choose a language.)
9072 \end_layout
9073
9074 \begin_layout Enumerate
9075 Enter 
9076 \family typewriter
9077 jgrga
9078 \family default
9079  into the document's 
9080 \family sans
9081 Extra Options
9082 \family default
9083  field.
9084  (Yes, this is a bug.)
9085 \end_layout
9086
9087 \begin_layout Enumerate
9088 Make sure you use the 
9089 \family typewriter
9090 agu.bst
9091 \family default
9092  bibliography style, by entering 
9093 \family sans
9094 agu
9095 \family default
9096  into the second field of the BibTeX inset.
9097  None of the standard styles will do.
9098 \end_layout
9099
9100 \begin_layout Section
9101 Broadway
9102 \end_layout
9103
9104 \begin_layout Standard
9105 by 
9106 \shape smallcaps
9107 Garst Reese
9108 \end_layout
9109
9110 \begin_layout Subsection
9111 Introduction
9112 \end_layout
9113
9114 \begin_layout Standard
9115 Broadway is for writing plays.
9116  The format is more decorative than Hollywood, and much less standardized.
9117  This format should be suitable for workshops.
9118 \end_layout
9119
9120 \begin_layout Subsection
9121 Special problems
9122 \end_layout
9123
9124 \begin_layout Standard
9125 The same as in Hollywood.
9126 \end_layout
9127
9128 \begin_layout Subsection
9129 Special features
9130 \end_layout
9131
9132 \begin_layout Standard
9133 Insert the 
9134 \family sans
9135 Speaker
9136 \family default
9137  names as labels then cross-reference the label to insert the name.
9138  The cross-reference dialog will show the current cast of characters.
9139 \end_layout
9140
9141 \begin_layout Subsection
9142 Paper size and Margins
9143 \end_layout
9144
9145 \begin_layout Standard
9146 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9147 \end_layout
9148
9149 \begin_layout Subsection
9150 Environments
9151 \end_layout
9152
9153 \begin_layout Standard
9154 The following environments are available.
9155  You can use broadway.bind to get the bind keys shown at the right.
9156 \end_layout
9157
9158 \begin_layout Itemize
9159
9160 \family sans
9161 Standard
9162 \begin_inset Newline newline
9163 \end_inset
9164
9165
9166 \family default
9167 You should not have to use this, but it is here for anything that does not
9168  fit otherwise.
9169 \end_layout
9170
9171 \begin_layout Itemize
9172
9173 \family sans
9174 Narrative
9175 \begin_inset space \hfill{}
9176 \end_inset
9177
9178 M-z n
9179 \begin_inset Newline newline
9180 \end_inset
9181
9182
9183 \family default
9184 Used to describe stage setting and the action.
9185  First use of speaker names in all CAPs.
9186 \end_layout
9187
9188 \begin_layout Itemize
9189
9190 \family sans
9191 ACT
9192 \begin_inset space \hfill{}
9193 \end_inset
9194
9195 M-z a
9196 \begin_inset Newline newline
9197 \end_inset
9198
9199
9200 \family default
9201 Automatically numbered.
9202  On screen it will be arabic, but will print as Roman.
9203 \end_layout
9204
9205 \begin_layout Itemize
9206
9207 \family sans
9208 ACT*
9209 \begin_inset space \hfill{}
9210 \end_inset
9211
9212 M-z S at
9213 \begin_inset Newline newline
9214 \end_inset
9215
9216
9217 \family default
9218 Subtitle for 
9219 \family sans
9220 ACT.
9221
9222 \family default
9223  It is just centered text.
9224 \end_layout
9225
9226 \begin_layout Itemize
9227
9228 \family sans
9229 SCENE
9230 \begin_inset space \hfill{}
9231 \end_inset
9232
9233 M-z S-S
9234 \begin_inset Newline newline
9235 \end_inset
9236
9237
9238 \family default
9239 Not automatically numbered.
9240  You supply the number.
9241  This is because I couldn't figure out how.
9242 \end_layout
9243
9244 \begin_layout Itemize
9245
9246 \family sans
9247 AT_RISE:
9248 \begin_inset space \hfill{}
9249 \end_inset
9250
9251 M-z S-R
9252 \begin_inset Newline newline
9253 \end_inset
9254
9255
9256 \family default
9257 A special case of Narrative to describe the setting and action as the curtain
9258  rises.
9259 \end_layout
9260
9261 \begin_layout Itemize
9262
9263 \family sans
9264 Speaker
9265 \begin_inset space \hfill{}
9266 \end_inset
9267
9268 M-z s
9269 \begin_inset Newline newline
9270 \end_inset
9271
9272
9273 \family default
9274 The speaker's (actor's) title, centered in all CAPS.
9275 \end_layout
9276
9277 \begin_layout Itemize
9278
9279 \family sans
9280 Parenthetical
9281 \begin_inset space \hfill{}
9282 \end_inset
9283
9284 M-z p
9285 \begin_inset Newline newline
9286 \end_inset
9287
9288
9289 \family default
9290 Instructions to the speaker.
9291  The parentheses are automatically inserted.
9292  The ( will appear on screen, but both will be in the printed play.
9293  This environment is only used within 
9294 \family sans
9295 Dialogue
9296 \family default
9297 .
9298 \end_layout
9299
9300 \begin_layout Itemize
9301
9302 \family sans
9303 Dialogue
9304 \begin_inset space \hfill{}
9305 \end_inset
9306
9307 M-z d
9308 \begin_inset Newline newline
9309 \end_inset
9310
9311
9312 \family default
9313 What the Speaker says.
9314 \end_layout
9315
9316 \begin_layout Itemize
9317
9318 \family sans
9319 CURTAIN
9320 \begin_inset space \hfill{}
9321 \end_inset
9322
9323 M-z S-C
9324 \begin_inset Newline newline
9325 \end_inset
9326
9327
9328 \family default
9329 The curtain comes down.
9330 \end_layout
9331
9332 \begin_layout Itemize
9333
9334 \family sans
9335 Title
9336 \begin_inset space \hfill{}
9337 \end_inset
9338
9339 M-z S-T
9340 \end_layout
9341
9342 \begin_layout Itemize
9343
9344 \family sans
9345 Author
9346 \begin_inset space \hfill{}
9347 \end_inset
9348
9349 M-z S-A
9350 \end_layout
9351
9352 \begin_layout Itemize
9353
9354 \family sans
9355 Right_Address
9356 \begin_inset space \hfill{}
9357 \end_inset
9358
9359 M-z r
9360 \end_layout
9361
9362 \begin_layout Standard
9363 Hello there.
9364 \end_layout
9365
9366 \begin_layout Section
9367 Dinbrief
9368 \end_layout
9369
9370 \begin_layout Standard
9371 The document class 
9372 \family sans
9373 dinbrief
9374 \family default
9375  can be used to type letters according to German conventions.
9376  A template file is included in 
9377 \family typewriter
9378 .../lyx/share/templates
9379 \family default
9380  for you to use as a starting point.
9381 \end_layout
9382
9383 \begin_layout Section
9384 EGS journals (
9385 \family sans
9386 egs
9387 \family default
9388 )
9389 \end_layout
9390
9391 \begin_layout Standard
9392 by 
9393 \shape smallcaps
9394 Martin Vermeer
9395 \end_layout
9396
9397 \begin_layout Subsection
9398 Description
9399 \end_layout
9400
9401 \begin_layout Standard
9402 This is the layout file for the European Geophysical Society journals.
9403  The needed 
9404 \family typewriter
9405 egs.cls
9406 \family default
9407  can be downloaded from the web site of the EGS under 
9408 \begin_inset Flex URL
9409 status collapsed
9410
9411 \begin_layout Plain Layout
9412
9413 www.copernicus.org
9414 \end_layout
9415
9416 \end_inset
9417
9418 .
9419 \end_layout
9420
9421 \begin_layout Subsection
9422 New styles
9423 \end_layout
9424
9425 \begin_layout Standard
9426
9427 \family sans
9428 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9429  Accepted
9430 \family default
9431
9432 \family sans
9433 Offsets
9434 \family default
9435 .
9436  The current layout file is unfortunately very unmodular and would benefit
9437  from using the various 
9438 \family typewriter
9439 std*.inc
9440 \family default
9441  file inclusions.
9442 \end_layout
9443
9444 \begin_layout Section
9445 Elsevier Journals
9446 \end_layout
9447
9448 \begin_layout Standard
9449 By 
9450 \noun on
9451 Rod Pinna
9452 \end_layout
9453
9454 \begin_layout Standard
9455 Elsevier Science Publishers B.V.
9456  provides a standard LaTeX document class (
9457 \family typewriter
9458 elsart.cls
9459 \family default
9460 ) for submitting articles to their various journals.
9461  The style file can be downloaded directly from their web site: 
9462 \begin_inset Flex URL
9463 status collapsed
9464
9465 \begin_layout Plain Layout
9466
9467 http://authors.elsevier.com/
9468 \end_layout
9469
9470 \end_inset
9471
9472 .
9473  Instructions are supplied along with the class file, which details the
9474  requirements of the publishers.
9475  LyX includes package that allows for the use of this class, by a layout
9476  and a template file.
9477  Installation of the class file is the same as for any other LaTeX package;
9478  instructions are provided in the Elsevier documentation.
9479 \end_layout
9480
9481 \begin_layout Standard
9482 To make use of 
9483 \family typewriter
9484 elsart.cls
9485 \family default
9486 , a file 
9487 \family typewriter
9488 elsart.layout
9489 \family default
9490  is supplied.
9491  As the Elsevier class file is based mainly on the standard article class,
9492  most of the normal functionality is provided.
9493  The Elsevier class defines a number of mathematical environments, which
9494  are similar to the AMS environments.
9495  These commands are all described in the Elsevier documentation, and are
9496  available in LyX.
9497 \end_layout
9498
9499 \begin_layout Standard
9500 The easiest way to use the Elsevier style is to base documents on the included
9501  template file.
9502  It is best not to use options such as fancy headings or the geometry package,
9503  as elements such as these are defined by Elsevier in their style file.
9504  Ideally, no extra packages except those mentioned in the Elsevier documentation
9505  should be used.
9506  Essentially, Elsevier require as 
9507 \begin_inset Quotes eld
9508 \end_inset
9509
9510 clean
9511 \begin_inset Quotes erd
9512 \end_inset
9513
9514  a LaTeX file as possible, as their intention is to take the supplied file
9515  and replace the class file with one for the particular journal to which
9516  the paper has been submitted.
9517  This also means that not too much time should be spent on the formating
9518  of the document.
9519  When it comes to be published, this will change anyway.
9520  The rest of the usage for this layout is substantially the same as for
9521  the normal article class.
9522  For details of what Elsevier do and don't allow, refer to their documentation.
9523 \end_layout
9524
9525 \begin_layout Section
9526 Foils [aka 
9527 \family sans
9528 FoilTeX
9529 \family default
9530 ]
9531 \begin_inset CommandInset label
9532 LatexCommand label
9533 name "sec:foiltex"
9534
9535 \end_inset
9536
9537
9538 \end_layout
9539
9540 \begin_layout Standard
9541 by 
9542 \noun on
9543 Allan Rae
9544 \end_layout
9545
9546 \begin_layout Subsection
9547 Introduction
9548 \end_layout
9549
9550 \begin_layout Standard
9551 This section describes how to use LyX to make slides for overhead projectors.
9552  There are two document classes that can do this: the default slides class
9553  and the 
9554 \family sans
9555 FoilTeX
9556 \family default
9557  slides class.
9558  This section documents the latter.
9559 \end_layout
9560
9561 \begin_layout Standard
9562 I'm going to say this again, nice and clear, so that there's no misunderstanding
9563 :
9564 \end_layout
9565
9566 \begin_layout Standard
9567 \begin_inset VSpace bigskip
9568 \end_inset
9569
9570
9571 \end_layout
9572
9573 \begin_layout Standard
9574 \align center
9575
9576 \size large
9577 This section documents the class 
9578 \begin_inset Quotes eld
9579 \end_inset
9580
9581
9582 \family sans
9583 slides (FoilTeX)
9584 \family default
9585
9586 \begin_inset Quotes erd
9587 \end_inset
9588
9589  
9590 \emph on
9591 only.
9592 \end_layout
9593
9594 \begin_layout Standard
9595 \begin_inset VSpace bigskip
9596 \end_inset
9597
9598
9599 \end_layout
9600
9601 \begin_layout Standard
9602 If you're looking for the documentation for 
9603 \begin_inset Quotes eld
9604 \end_inset
9605
9606
9607 \family sans
9608 slides (default)
9609 \family default
9610
9611 \begin_inset Quotes erd
9612 \end_inset
9613
9614 , check out section
9615 \begin_inset space ~
9616 \end_inset
9617
9618
9619 \begin_inset CommandInset ref
9620 LatexCommand ref
9621 reference "sec:slitex"
9622
9623 \end_inset
9624
9625 .
9626  If your machine doesn't have the 
9627 \family sans
9628 foils
9629 \family default
9630  class [
9631 \begin_inset Quotes eld
9632 \end_inset
9633
9634
9635 \family sans
9636 slides (FoilTeX)
9637 \family default
9638
9639 \begin_inset Quotes erd
9640 \end_inset
9641
9642 ] installed, you'll probably have to use the default 
9643 \family sans
9644 slides
9645 \family default
9646  class, which isn't quite as good as 
9647 \family sans
9648 foils.
9649 \end_layout
9650
9651 \begin_layout Standard
9652 The 
9653 \family sans
9654 foils
9655 \family default
9656  class is designed for use with version 2.1 of the 
9657 \family sans
9658 foils.cls
9659 \family default
9660  LaTeX class file which is now an integral part of LaTeX2e.
9661 \end_layout
9662
9663 \begin_layout Subsection
9664 Getting Started
9665 \end_layout
9666
9667 \begin_layout Standard
9668 Obviously, to use this document class, you need to select 
9669 \begin_inset Quotes eld
9670 \end_inset
9671
9672
9673 \family sans
9674 slides (FoilTeX)
9675 \family default
9676
9677 \begin_inset Quotes erd
9678 \end_inset
9679
9680  from the 
9681 \family sans
9682 Class
9683 \family default
9684  entry in the 
9685 \family sans
9686 Document
9687 \begin_inset space ~
9688 \end_inset
9689
9690 Layout
9691 \family default
9692  dialog.
9693  There are some settings in the 
9694 \family sans
9695 Document
9696 \begin_inset space ~
9697 \end_inset
9698
9699 Layout
9700 \family default
9701  dialog that you should know about that are specific to this class:
9702 \end_layout
9703
9704 \begin_layout Itemize
9705 Don't change the options 
9706 \family sans
9707 Sides
9708 \family default
9709  and 
9710 \family sans
9711 Columns
9712 \family default
9713  on the 
9714 \family sans
9715 Document
9716 \begin_inset space ~
9717 \end_inset
9718
9719 Layout
9720 \family default
9721  dialog.
9722  They're ignored by the 
9723 \family sans
9724 foils
9725 \family default
9726  class.
9727 \end_layout
9728
9729 \begin_layout Itemize
9730 The default font size is 20
9731 \begin_inset space \thinspace{}
9732 \end_inset
9733
9734 pt with the other options being 17
9735 \begin_inset space \thinspace{}
9736 \end_inset
9737
9738 pt, 25
9739 \begin_inset space \thinspace{}
9740 \end_inset
9741
9742 pt and 30
9743 \begin_inset space \thinspace{}
9744 \end_inset
9745
9746 pt.
9747 \end_layout
9748
9749 \begin_layout Itemize
9750 The default font is 
9751 \family sans
9752 sans
9753 \family default
9754  
9755 \family sans
9756 serif
9757 \family default
9758  but all math equations are still typeset in the usual roman font.
9759 \end_layout
9760
9761 \begin_layout Itemize
9762
9763 \family sans
9764 FoilTeX
9765 \family default
9766  supports A4 and Letter paper sizes as well as a special size for working
9767  with 35
9768 \begin_inset space \thinspace{}
9769 \end_inset
9770
9771 mm slides.
9772  It doesn't support A5, B5, legal or executive paper sizes.
9773 \end_layout
9774
9775 \begin_layout Itemize
9776 Don't bother changing the 
9777 \family sans
9778 Float Placement
9779 \family default
9780  settings because they are ignored anyway.
9781  All floats appear where they are defined in the text.
9782 \end_layout
9783
9784 \begin_layout Itemize
9785 The 
9786 \family sans
9787 Pagestyle
9788 \family default
9789  setting behaves a bit differently for this class.
9790  
9791 \family sans
9792 FoilTeX
9793 \family default
9794  provides extensive footer and header capabilities including a user-defined
9795  logo.
9796  See section
9797 \begin_inset space ~
9798 \end_inset
9799
9800
9801 \begin_inset CommandInset ref
9802 LatexCommand ref
9803 reference "sec:foilfoot"
9804
9805 \end_inset
9806
9807  for more details.
9808  The title page is treated differently to all other pages in the document
9809  and is 
9810 \emph on
9811 always
9812 \emph default
9813  unnumbered and 
9814 \emph on
9815 always
9816 \emph default
9817  has the logo centered at the bottom of the page (if one is defined).
9818  The possible page style choices and what they do are as follows:
9819 \end_layout
9820
9821 \begin_deeper
9822 \begin_layout Labeling
9823 \labelwidthstring MMMMMMM
9824
9825 \family sans
9826 \series bold
9827 empty
9828 \family default
9829 \series default
9830  The final output contains no page numbers, or other headers or footers
9831  (except footnotes of course).
9832  
9833 \end_layout
9834
9835 \begin_layout Labeling
9836 \labelwidthstring MMMMMMM
9837
9838 \family sans
9839 \series bold
9840 plain
9841 \family default
9842 \series default
9843  The final output contains page numbers centered at the bottom of the page.
9844  No other headings or footers (other than footnotes).
9845 \end_layout
9846
9847 \begin_layout Labeling
9848 \labelwidthstring MMMMMMM
9849
9850 \series bold
9851 foilheadings
9852 \series default
9853  Page numbers in lower right corner.
9854  Additional headers and footers are also shown.
9855  This is also the default.
9856 \end_layout
9857
9858 \begin_layout Labeling
9859 \labelwidthstring MMMMMMM
9860
9861 \series bold
9862 fancy
9863 \series default
9864  Gives you access to the 
9865 \family sans
9866 fancyheadings
9867 \family default
9868  package although its use with 
9869 \family sans
9870 FoilTeX
9871 \family default
9872  is discouraged by the writer of the 
9873 \family sans
9874 FoilTeX
9875 \family default
9876  package because of some potential page layout clashes.
9877 \end_layout
9878
9879 \end_deeper
9880 \begin_layout Subsubsection
9881 Extra Options
9882 \end_layout
9883
9884 \begin_layout Standard
9885 The following options may be used in the extra class options in the 
9886 \family sans
9887 Document\SpecialChar \menuseparator
9888 Settings
9889 \family default
9890  dialog.
9891 \end_layout
9892
9893 \begin_layout Labeling
9894 \labelwidthstring MMMMMMx
9895
9896 \series bold
9897 35mmSlide
9898 \series default
9899  This sets up the page layout for 7.33
9900 \begin_inset space \thinspace{}
9901 \end_inset
9902
9903 in by 11
9904 \begin_inset space \thinspace{}
9905 \end_inset
9906
9907 in paper, which is about the same aspect ratio as a 35
9908 \begin_inset space \thinspace{}
9909 \end_inset
9910
9911 mm slide, making it a bit easier to work with this medium.
9912 \end_layout
9913
9914 \begin_layout Labeling
9915 \labelwidthstring MMMMMMx
9916
9917 \series bold
9918 headrule
9919 \series default
9920  Places a rule across the page below the header on every page except the
9921  title page.
9922 \end_layout
9923
9924 \begin_layout Labeling
9925 \labelwidthstring MMMMMMx
9926
9927 \series bold
9928 footrule
9929 \series default
9930  Places a rule across the page above the footer on every page except the
9931  title page.
9932 \end_layout
9933
9934 \begin_layout Labeling
9935 \labelwidthstring MMMMMMx
9936
9937 \series bold
9938 dvips
9939 \series default
9940  This is automatically set each time you create a new 
9941 \family sans
9942 foils
9943 \family default
9944  document.
9945  This option tells 
9946 \family sans
9947 FoilTeX
9948 \family default
9949  to use the dvips driver to rotate those pages that are set as landscape
9950  foils.
9951 \end_layout
9952
9953 \begin_layout Labeling
9954 \labelwidthstring MMMMMMx
9955
9956 \series bold
9957 landscape
9958 \series default
9959  Simply changes the page dimensions to those of a landscape page but doesn't
9960  do any rotation.
9961  Thus if you use this option you need to use an external program to rotate
9962  each page or feed your paper through your printer as landscape.
9963  Note that this option effectively reverses the roles of the 
9964 \family sans
9965 Foilhead
9966 \family default
9967  and 
9968 \family sans
9969 Rotatefoilhead
9970 \family default
9971  environments (don't worry these are described in the next section).
9972 \end_layout
9973
9974 \begin_layout Labeling
9975 \labelwidthstring MMMMMMx
9976
9977 \series bold
9978 leqno
9979 \series default
9980  Equation numbers on the left.
9981 \end_layout
9982
9983 \begin_layout Labeling
9984 \labelwidthstring MMMMMMx
9985
9986 \series bold
9987 fleqn
9988 \series default
9989  Flush-left equations.
9990 \end_layout
9991
9992 \begin_layout Subsection
9993 Supported Environments
9994 \end_layout
9995
9996 \begin_layout Standard
9997 Most of the environments commonly supported in other classes are also supported
9998  by the 
9999 \family sans
10000 foils
10001 \family default
10002  class.
10003  There are several additional environments provided by 
10004 \family sans
10005 FoilTeX
10006 \family default
10007  as well as a couple added by LyX.
10008  The following environments are shared with other classes:
10009 \end_layout
10010
10011 \begin_layout Standard
10012 \begin_inset ERT
10013 status open
10014
10015 \begin_layout Plain Layout
10016
10017
10018 \backslash
10019 begin{multicols}{2}
10020 \end_layout
10021
10022 \end_inset
10023
10024
10025 \end_layout
10026
10027 \begin_layout Itemize
10028
10029 \family sans
10030 Standard
10031 \end_layout
10032
10033 \begin_layout Itemize
10034
10035 \family sans
10036 Itemize
10037 \end_layout
10038
10039 \begin_layout Itemize
10040
10041 \family sans
10042 Enumerate
10043 \end_layout
10044
10045 \begin_layout Itemize
10046
10047 \family sans
10048 Description
10049 \end_layout
10050
10051 \begin_layout Itemize
10052
10053 \family sans
10054 List
10055 \end_layout
10056
10057 \begin_layout Itemize
10058
10059 \family sans
10060 LyX-Code
10061 \end_layout
10062
10063 \begin_layout Itemize
10064
10065 \family sans
10066 Verse
10067 \end_layout
10068
10069 \begin_layout Itemize
10070
10071 \family sans
10072 Quote
10073 \end_layout
10074
10075 \begin_layout Itemize
10076
10077 \family sans
10078 Quotation
10079 \end_layout
10080
10081 \begin_layout Itemize
10082
10083 \family sans
10084 Title
10085 \end_layout
10086
10087 \begin_layout Itemize
10088
10089 \family sans
10090 Author
10091 \end_layout
10092
10093 \begin_layout Itemize
10094
10095 \family sans
10096 Date
10097 \end_layout
10098
10099 \begin_layout Itemize
10100
10101 \family sans
10102 Abstract
10103 \end_layout
10104
10105 \begin_layout Itemize
10106
10107 \family sans
10108 Bibliography
10109 \end_layout
10110
10111 \begin_layout Itemize
10112
10113 \family sans
10114 Address
10115 \end_layout
10116
10117 \begin_layout Itemize
10118
10119 \family sans
10120 RightAddress
10121 \end_layout
10122
10123 \begin_layout Itemize
10124
10125 \family sans
10126 Caption
10127 \end_layout
10128
10129 \begin_layout Itemize
10130
10131 \family sans
10132 Comment
10133 \end_layout
10134
10135 \begin_layout Standard
10136 \begin_inset ERT
10137 status open
10138
10139 \begin_layout Plain Layout
10140
10141
10142 \backslash
10143 end{multicols}
10144 \end_layout
10145
10146 \end_inset
10147
10148
10149 \end_layout
10150
10151 \begin_layout Standard
10152 That is, all the major environments apart from the sectioning environments.
10153  Since foils are essentially self-contained sections, with a title and body,
10154  
10155 \family sans
10156 FoilTeX
10157 \family default
10158  provides specific commands for starting new foils and these are:
10159 \end_layout
10160
10161 \begin_layout Itemize
10162
10163 \family sans
10164 Foilhead
10165 \end_layout
10166
10167 \begin_layout Itemize
10168
10169 \family sans
10170 Rotatefoilhead
10171 \end_layout
10172
10173 \begin_layout Standard
10174 LyX also provides slightly modified versions of these two environments called:
10175 \end_layout
10176
10177 \begin_layout Itemize
10178
10179 \family sans
10180 ShortFoilhead
10181 \end_layout
10182
10183 \begin_layout Itemize
10184
10185 \family sans
10186 ShortRotatefoilhead
10187 \end_layout
10188
10189 \begin_layout Standard
10190 and the differences will be explained in the next section.
10191 \end_layout
10192
10193 \begin_layout Standard
10194 Since foils are often used in presenting ideas or new theorems and such
10195  
10196 \family sans
10197 FoilTeX
10198 \family default
10199  also provides a comprehensive box of goodies for presenting them:
10200 \end_layout
10201
10202 \begin_layout Standard
10203 \begin_inset ERT
10204 status open
10205
10206 \begin_layout Plain Layout
10207
10208
10209 \backslash
10210 begin{multicols}{2}
10211 \end_layout
10212
10213 \end_inset
10214
10215
10216 \end_layout
10217
10218 \begin_layout Itemize
10219
10220 \family sans
10221 Theorem
10222 \end_layout
10223
10224 \begin_layout Itemize
10225
10226 \family sans
10227 Lemma
10228 \end_layout
10229
10230 \begin_layout Itemize
10231
10232 \family sans
10233 Corollary
10234 \end_layout
10235
10236 \begin_layout Itemize
10237
10238 \family sans
10239 Proposition
10240 \end_layout
10241
10242 \begin_layout Itemize
10243
10244 \family sans
10245 Definition
10246 \end_layout
10247
10248 \begin_layout Itemize
10249
10250 \family sans
10251 Proof
10252 \end_layout
10253
10254 \begin_layout Itemize
10255
10256 \family sans
10257 Theorem*
10258 \end_layout
10259
10260 \begin_layout Itemize
10261
10262 \family sans
10263 Lemma*
10264 \end_layout
10265
10266 \begin_layout Itemize
10267
10268 \family sans
10269 Corollary*
10270 \end_layout
10271
10272 \begin_layout Itemize
10273
10274 \family sans
10275 Proposition*
10276 \end_layout
10277
10278 \begin_layout Itemize
10279
10280 \family sans
10281 Definition*
10282 \end_layout
10283
10284 \begin_layout Standard
10285 \begin_inset ERT
10286 status open
10287
10288 \begin_layout Plain Layout
10289
10290
10291 \backslash
10292 end{multicols}
10293 \end_layout
10294
10295 \end_inset
10296
10297
10298 \end_layout
10299
10300 \begin_layout Standard
10301 The starred versions are unnumbered while the unstarred versions are numbered.
10302  There are also two list environments added by LyX and these are:
10303 \end_layout
10304
10305 \begin_layout Itemize
10306
10307 \family sans
10308 TickList
10309 \end_layout
10310
10311 \begin_layout Itemize
10312
10313 \family sans
10314 CrossList
10315 \end_layout
10316
10317 \begin_layout Standard
10318
10319 \family sans
10320 FoilTeX
10321 \family default
10322  provides some powerful header and footer capabilities that are best set
10323  in the preamble although they may be set at any point in a document.
10324  If you want to change these settings in your document the best place to
10325  do so is at the very top of a foil, i.
10326 \begin_inset space \thinspace{}
10327 \end_inset
10328
10329 g.
10330 \emph on
10331
10332 \begin_inset space \space{}
10333 \end_inset
10334
10335
10336 \emph default
10337 straight after the foilhead.
10338 \end_layout
10339
10340 \begin_layout Standard
10341 For this purpose, the following command styles are provided [
10342 \shape smallcaps
10343 Martin Vermeer
10344 \shape default
10345 ]:
10346 \end_layout
10347
10348 \begin_layout Standard
10349 \begin_inset ERT
10350 status open
10351
10352 \begin_layout Plain Layout
10353
10354
10355 \backslash
10356 begin{multicols}{2}
10357 \end_layout
10358
10359 \end_inset
10360
10361
10362 \end_layout
10363
10364 \begin_layout Itemize
10365
10366 \family sans
10367 My
10368 \begin_inset space ~
10369 \end_inset
10370
10371 Logo
10372 \end_layout
10373
10374 \begin_layout Itemize
10375
10376 \family sans
10377 Restriction
10378 \end_layout
10379
10380 \begin_layout Itemize
10381
10382 \family sans
10383 Right
10384 \begin_inset space ~
10385 \end_inset
10386
10387 Footer
10388 \end_layout
10389
10390 \begin_layout Itemize
10391
10392 \family sans
10393 Right
10394 \begin_inset space ~
10395 \end_inset
10396
10397 Header
10398 \end_layout
10399
10400 \begin_layout Itemize
10401
10402 \family sans
10403 Left
10404 \begin_inset space ~
10405 \end_inset
10406
10407 Header
10408 \end_layout
10409
10410 \begin_deeper
10411 \begin_layout Standard
10412 \begin_inset space ~
10413 \end_inset
10414
10415
10416 \end_layout
10417
10418 \end_deeper
10419 \begin_layout Standard
10420 \begin_inset ERT
10421 status open
10422
10423 \begin_layout Plain Layout
10424
10425
10426 \backslash
10427 end{multicols}
10428 \end_layout
10429
10430 \end_inset
10431
10432
10433 \end_layout
10434
10435 \begin_layout Standard
10436 There are also a few commands provided by 
10437 \family sans
10438 FoilTeX
10439 \family default
10440  that aren't directly supported by LyX but I'll tell you what they do and
10441  how to use them in section
10442 \begin_inset space ~
10443 \end_inset
10444
10445
10446 \begin_inset CommandInset ref
10447 LatexCommand ref
10448 reference "sec:unsuppfoils"
10449
10450 \end_inset
10451
10452 .
10453 \end_layout
10454
10455 \begin_layout Subsection
10456 Building a Set of Foils
10457 \end_layout
10458
10459 \begin_layout Standard
10460 This section will give a simple introduction to using the different environments
10461  to build a set of foils.
10462  If you want to see an example set of foils, take a look at the 
10463 \family typewriter
10464 Foils.lyx
10465 \family default
10466  file you find in LyX's 
10467 \family typewriter
10468 examples
10469 \family default
10470  folder.
10471 \end_layout
10472
10473 \begin_layout Subsubsection
10474 Give It a Title Page
10475 \end_layout
10476
10477 \begin_layout Standard
10478 Unlike other classes that provide 
10479 \family sans
10480 Title
10481 \family default
10482
10483 \family sans
10484 Author
10485 \family default
10486
10487 \family sans
10488 Date
10489 \family default
10490  and 
10491 \family sans
10492 Abstract
10493 \family default
10494  environments, 
10495 \family sans
10496 foils
10497 \family default
10498  creates the title on a page of its own.
10499  If you leave out the 
10500 \family sans
10501 Date
10502 \family default
10503  environment LaTeX will substitute the current date (every time you regenerate
10504  the output).
10505 \end_layout
10506
10507 \begin_layout Subsubsection
10508 Start a New Foil
10509 \end_layout
10510
10511 \begin_layout Standard
10512 As I mentioned earlier, there are four ways of starting a new foil.
10513  For portrait foils you should use 
10514 \family sans
10515 Foilhead
10516 \family default
10517  or 
10518 \family sans
10519 ShortFoilhead.
10520
10521 \family default
10522  The difference between these two environments is the amount of space between
10523  the title of the foil (the foilhead) and the body of the foil.
10524 \end_layout
10525
10526 \begin_layout Standard
10527 Landscape foils are generated using the 
10528 \family sans
10529 Rotatefoilhead
10530 \family default
10531  and 
10532 \family sans
10533 ShortRotatefoilhead
10534 \family default
10535  environments.
10536  Again the only difference is the spacing between foilhead and body.
10537  Both of the short versions have 0.5 inches less separation between the foilhead
10538  and the body.
10539  
10540 \end_layout
10541
10542 \begin_layout Standard
10543 One problem with the support for landscape foils is the requirement that
10544  you have to use the 
10545 \family typewriter
10546 dvips
10547 \family default
10548  driver to generate the PostScript output otherwise the foils won't be rotated.
10549  It is possible to get landscape foils even if you haven't got the 
10550 \family typewriter
10551 dvips
10552 \family default
10553  driver provided you can feed your foils sideways through your printer ;-)
10554 \end_layout
10555
10556 \begin_layout Subsubsection
10557 Theorems, Lemmas, Proofs and more
10558 \end_layout
10559
10560 \begin_layout Standard
10561 Due to a small bug in LyX you can't have two of the same type of these environme
10562 nts directly following each other.
10563  They must be separated by something.
10564  If you try, you will just be extending the previous environment as if you
10565  had merged the two environments together.
10566  So, how do you get around this problem? The simplest option is to insert
10567  some text between the two environments or add a 
10568 \family sans
10569 LaTeX
10570 \family default
10571  environment between the two with just a 
10572 \begin_inset Quotes eld
10573 \end_inset
10574
10575
10576 \family typewriter
10577 %
10578 \family default
10579
10580 \begin_inset Quotes erd
10581 \end_inset
10582
10583  in it.
10584  This will force LyX to produce two separate environments and hence the
10585  correct LaTeX output.
10586  An example is provided in the example file included with the LyX distribution.
10587  Remember, this problem only occurs if you are trying to place two of the
10588  same type of theorem-like environments one directly after the other.
10589 \end_layout
10590
10591 \begin_layout Subsubsection
10592 Lists
10593 \end_layout
10594
10595 \begin_layout Standard
10596 You get all the commonly supported list styles found in other classes as
10597  well as two new ones.
10598  I'll only describe the new ones here.
10599  If you want to find out more about the other list environments check out
10600  the 
10601 \emph on
10602 User's Guide.
10603
10604 \emph default
10605  If you intend to use itemized lists you might also want to read about the
10606  
10607 \family sans
10608 Itemize
10609 \begin_inset space ~
10610 \end_inset
10611
10612 Bullet
10613 \begin_inset space ~
10614 \end_inset
10615
10616 Selection
10617 \family default
10618  dialog described above in section
10619 \begin_inset space ~
10620 \end_inset
10621
10622
10623 \begin_inset CommandInset ref
10624 LatexCommand ref
10625 reference "sec:bullet"
10626
10627 \end_inset
10628
10629 .
10630 \end_layout
10631
10632 \begin_layout Standard
10633 The two new list styles, 
10634 \family sans
10635 TickList
10636 \family default
10637  and 
10638 \family sans
10639 CrossList
10640 \family default
10641 , are designed to make it easier for you to create lists of do's and don'ts
10642  or right and wrong by providing dedicated environments that use a tick
10643  or a cross as the label of the list.
10644  These lists are in fact dedicated variants of the 
10645 \family sans
10646 Itemize
10647 \family default
10648  environment.
10649  They do however require that you have the 
10650 \family typewriter
10651 psnfss
10652 \family default
10653  packages installed.
10654 \end_layout
10655
10656 \begin_layout Subsubsection
10657 Figures and Tables
10658 \end_layout
10659
10660 \begin_layout Standard
10661
10662 \family sans
10663 FoilTeX
10664 \family default
10665  redefines the floating tables and figures so that they appear exactly where
10666  they are in the text rather than pushing them to the top of the page or
10667  to some user specified location.
10668  In fact if you change the float placement settings they are simply ignored.
10669 \end_layout
10670
10671 \begin_layout Subsubsection
10672 Page Headers and Footers
10673 \begin_inset CommandInset label
10674 LatexCommand label
10675 name "sec:foilfoot"
10676
10677 \end_inset
10678
10679
10680 \end_layout
10681
10682 \begin_layout Standard
10683
10684 \family sans
10685 My
10686 \begin_inset space ~
10687 \end_inset
10688
10689 Logo
10690 \family default
10691  and 
10692 \family sans
10693 Restriction
10694 \family default
10695  are two commands used to control the left-footer text string.
10696  The first is meant to allow you to include a graphic logo on your foils
10697  and defaults to 
10698 \begin_inset Quotes eld
10699 \end_inset
10700
10701 -Typeset by 
10702 \family sans
10703 FoilTeX
10704 \family default
10705 -
10706 \begin_inset Quotes erd
10707 \end_inset
10708
10709 .
10710  While the second is meant to provide a classification for the audience,
10711  
10712 \emph on
10713 e.
10714 \begin_inset space \thinspace{}
10715 \end_inset
10716
10717 g.
10718 \emph default
10719
10720 \begin_inset space \space{}
10721 \end_inset
10722
10723 Confidential.
10724  It is empty by default.
10725 \end_layout
10726
10727 \begin_layout Standard
10728 The remaining page corners can be filled by 
10729 \family sans
10730 Right
10731 \begin_inset space ~
10732 \end_inset
10733
10734 Footer
10735 \family default
10736  (which defaults to page numbers), 
10737 \family sans
10738 Right
10739 \begin_inset space ~
10740 \end_inset
10741
10742 Header
10743 \family default
10744  (top right) and 
10745 \family sans
10746 Left
10747 \begin_inset space ~
10748 \end_inset
10749
10750 Header
10751 \family default
10752  (top left).
10753 \end_layout
10754
10755 \begin_layout Subsection
10756 Unsupported 
10757 \family sans
10758 FoilTeX
10759 \family default
10760  Goodies
10761 \begin_inset CommandInset label
10762 LatexCommand label
10763 name "sec:unsuppfoils"
10764
10765 \end_inset
10766
10767
10768 \end_layout
10769
10770 \begin_layout Standard
10771 All the commands mentioned below need to be set in a 
10772 \family sans
10773 LaTeX
10774 \family default
10775  environment or as 
10776 \family sans
10777 TeX
10778 \family default
10779  within another environment.
10780 \end_layout
10781
10782 \begin_layout Subsubsection
10783 Lengths
10784 \end_layout
10785
10786 \begin_layout Standard
10787 All lengths are adjusted using the 
10788 \family typewriter
10789
10790 \backslash
10791 setlength{
10792 \family default
10793 \emph on
10794 lengthname
10795 \family typewriter
10796 \emph default
10797 }{
10798 \family default
10799 \emph on
10800 newlength
10801 \family typewriter
10802 \emph default
10803 }
10804 \family default
10805  command.
10806  Where 
10807 \emph on
10808 lengthname
10809 \emph default
10810  should be replaced by the name given to the length you want to change and
10811  
10812 \emph on
10813 newlength
10814 \emph default
10815  is the length value.
10816  All lengths should be specified in units of length such as inches (
10817 \family typewriter
10818 in
10819 \family default
10820 ), millimeters (
10821 \family typewriter
10822 mm
10823 \family default
10824 ) or points (
10825 \family typewriter
10826 pt
10827 \family default
10828 ) or relative to some document or font-based length such as 
10829 \family typewriter
10830
10831 \backslash
10832 textwidth
10833 \family default
10834 .
10835  
10836 \end_layout
10837
10838 \begin_layout Standard
10839 It's possible to change the spacing between a foilhead and the body of the
10840  foil by adjusting the length specified by 
10841 \family typewriter
10842
10843 \backslash
10844 foilheadskip
10845 \family default
10846 .
10847  For example, to make 
10848 \emph on
10849 all
10850 \emph default
10851  foilheads 0.5
10852 \begin_inset space \space{}
10853 \end_inset
10854
10855 in closer to their bodies put the following in the preamble: 
10856 \family typewriter
10857
10858 \backslash
10859 setlength{
10860 \backslash
10861 foilheadskip}{-0.5in}
10862 \end_layout
10863
10864 \begin_layout Standard
10865 The spacings around floats can be adjusted by setting these lengths:
10866 \end_layout
10867
10868 \begin_layout Labeling
10869 \labelwidthstring MMMMMMMMMMM
10870
10871 \family typewriter
10872
10873 \backslash
10874 abovefloatskip
10875 \family default
10876  Separation between the text and the top of the float
10877 \end_layout
10878
10879 \begin_layout Labeling
10880 \labelwidthstring MMMMMMMMMMM
10881
10882 \family typewriter
10883
10884 \backslash
10885 abovecaptionskip
10886 \family default
10887  Separation between the float and the caption
10888 \end_layout
10889
10890 \begin_layout Labeling
10891 \labelwidthstring MMMMMMMMMMM
10892
10893 \family typewriter
10894
10895 \backslash
10896 belowcaptionskip
10897 \family default
10898  Separation between the caption and the following text
10899 \end_layout
10900
10901 \begin_layout Labeling
10902 \labelwidthstring MMMMMMMMMMM
10903
10904 \family typewriter
10905
10906 \backslash
10907 captionwidth
10908 \family default
10909  You can make the captions narrower than the surrounding text by adjusting
10910  this length.
10911  Best done relative to 
10912 \family typewriter
10913
10914 \backslash
10915 textwidth
10916 \family default
10917 .
10918 \end_layout
10919
10920 \begin_layout Standard
10921 There are also several title page related lengths that you may find useful
10922  if you have a long title or several authors:
10923 \end_layout
10924
10925 \begin_layout Labeling
10926 \labelwidthstring MMMMMMMMMMM
10927
10928 \family typewriter
10929
10930 \backslash
10931 abovetitleskip
10932 \family default
10933  Separation from headers to 
10934 \family sans
10935 Title
10936 \end_layout
10937
10938 \begin_layout Labeling
10939 \labelwidthstring MMMMMMMMMMM
10940
10941 \family typewriter
10942
10943 \backslash
10944 titleauthorskip
10945 \family default
10946  between 
10947 \family sans
10948 Title
10949 \family default
10950  and 
10951 \family sans
10952 Author
10953 \family default
10954  environments
10955 \end_layout
10956
10957 \begin_layout Labeling
10958 \labelwidthstring MMMMMMMMMMM
10959
10960 \family typewriter
10961
10962 \backslash
10963 authorauthorskip
10964 \family default
10965  between multiple 
10966 \family sans
10967 Author
10968 \family default
10969  lines
10970 \end_layout
10971
10972 \begin_layout Labeling
10973 \labelwidthstring MMMMMMMMMMM
10974
10975 \family typewriter
10976
10977 \backslash
10978 authordateskip
10979 \family default
10980  between the 
10981 \family sans
10982 Author
10983 \family default
10984  and the 
10985 \family sans
10986 Date
10987 \end_layout
10988
10989 \begin_layout Labeling
10990 \labelwidthstring MMMMMMMMMMM
10991
10992 \family typewriter
10993
10994 \backslash
10995 dateabstractskip
10996 \family default
10997  between the 
10998 \family sans
10999 Date
11000 \family default
11001  and the 
11002 \family sans
11003 Abstract
11004 \end_layout
11005
11006 \begin_layout Standard
11007 The last length related command affects all the list environments.
11008  If you place 
11009 \family typewriter
11010
11011 \backslash
11012 zerolistvertdimens
11013 \family default
11014  
11015 \emph on
11016 inside
11017 \emph default
11018  a list environment then all the vertical spacing between the list items
11019  is removed.
11020  Note that this is a command not a length so it doesn't require 
11021 \family typewriter
11022
11023 \backslash
11024 setlength
11025 \family default
11026  like the stuff mentioned above.
11027 \end_layout
11028
11029 \begin_layout Subsubsection
11030 Headers and Footers
11031 \end_layout
11032
11033 \begin_layout Standard
11034 The 
11035 \family typewriter
11036
11037 \backslash
11038 LogoOn
11039 \family default
11040  and 
11041 \family typewriter
11042
11043 \backslash
11044 LogoOff
11045 \family default
11046  commands control whether the logo in the 
11047 \family sans
11048 MyLogo
11049 \family default
11050  definition appear on a given page.
11051  If you put 
11052 \family typewriter
11053
11054 \backslash
11055 LogoOff
11056 \family default
11057  in the preamble then none of the foils will have the logo on them.
11058  If you don't want the logo on a particular page place the 
11059 \family typewriter
11060
11061 \backslash
11062 LogoOff
11063 \family default
11064  directly after the foilhead of that page and the 
11065 \family typewriter
11066
11067 \backslash
11068 LogoOn
11069 \family default
11070  directly after the next foilhead.
11071 \end_layout
11072
11073 \begin_layout Standard
11074 If you decide to use the 
11075 \family sans
11076 fancy
11077 \family default
11078  page style setting in the 
11079 \family sans
11080 Document
11081 \begin_inset space ~
11082 \end_inset
11083
11084 Layout
11085 \family default
11086  dialog you should probably add 
11087 \family typewriter
11088
11089 \backslash
11090 let
11091 \backslash
11092 headwidth
11093 \backslash
11094 textwidth
11095 \family default
11096  to your preamble so headers and footers on landscape pages are correctly
11097  placed when rotated.
11098  This is due to some clashes between the page layouts provided by the 
11099 \family sans
11100 fancyheadings
11101 \family default
11102  package and the 
11103 \family sans
11104 foils
11105 \family default
11106  class.
11107 \end_layout
11108
11109 \begin_layout Section
11110 Hollywood (Hollywood spec scripts)
11111 \end_layout
11112
11113 \begin_layout Standard
11114 by 
11115 \shape smallcaps
11116 Garst Reese
11117 \end_layout
11118
11119 \begin_layout Subsection
11120 Introduction
11121 \end_layout
11122
11123 \begin_layout Standard
11124 Getting the format of a Hollywood script right is a 
11125 \begin_inset Quotes eld
11126 \end_inset
11127
11128 rite of passage.
11129 \begin_inset Quotes erd
11130 \end_inset
11131
11132  It is designed to make the readers focus on content and to be easy and
11133  familiar for the actors to read.
11134  Each page of a script should be one minute of film.
11135  Nothing goes in a script that you cannot see or hear on screen.
11136  The courier 12 pt font should be used throughout.
11137  No italics.
11138 \end_layout
11139
11140 \begin_layout Subsection
11141 Special problems
11142 \end_layout
11143
11144 \begin_layout Standard
11145 Speakers' lines should NEVER break in mid-sentence.
11146  If a speaker's lines continue over a page break, repeat the 
11147 \family sans
11148 Speaker
11149 \family default
11150  title followed by (Cont'd).
11151 \end_layout
11152
11153 \begin_layout Subsection
11154 Special features
11155 \end_layout
11156
11157 \begin_layout Standard
11158 Insert the 
11159 \family sans
11160 Speaker
11161 \family default
11162  names as labels then cross-reference the label to insert the name.
11163  The cross-reference dialog will show the current cast of characters.
11164  You can use this to insert the speaker name in narratives also.
11165 \end_layout
11166
11167 \begin_layout Subsection
11168 Paper size and Margins
11169 \end_layout
11170
11171 \begin_layout Standard
11172 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11173 \end_layout
11174
11175 \begin_layout Subsection
11176 Environments
11177 \end_layout
11178
11179 \begin_layout Standard
11180 The following environments are available.
11181  You can use hollywood.bind to get the bind keys shown at the right.
11182 \end_layout
11183
11184 \begin_layout Itemize
11185
11186 \family sans
11187 Standard
11188 \begin_inset Newline newline
11189 \end_inset
11190
11191
11192 \family default
11193 Used where nothing else works.
11194  Try to avoid it.
11195 \end_layout
11196
11197 \begin_layout Itemize
11198
11199 \family sans
11200 FADE_IN
11201 \family default
11202 :
11203 \begin_inset space \hfill{}
11204 \end_inset
11205
11206
11207 \family sans
11208 M-z S-I
11209 \family default
11210
11211 \begin_inset Newline newline
11212 \end_inset
11213
11214 Usually followed by something like 
11215 \begin_inset Quotes eld
11216 \end_inset
11217
11218 on Sally waking up.
11219 \begin_inset Quotes erd
11220 \end_inset
11221
11222
11223 \end_layout
11224
11225 \begin_layout Itemize
11226
11227 \family sans
11228 INT:
11229 \begin_inset space \hfill{}
11230 \end_inset
11231
11232 M-z i
11233 \begin_inset Newline newline
11234 \end_inset
11235
11236
11237 \family default
11238 Introduces a new INTERIOR camera set-up.
11239  Always followed by DAY or NIGHT, or something similar to define the lighting
11240  required.
11241  Everthing on this line in CAPS.
11242 \end_layout
11243
11244 \begin_layout Itemize
11245
11246 \family sans
11247 EXT:
11248 \begin_inset space \hfill{}
11249 \end_inset
11250
11251 M-z e
11252 \begin_inset Newline newline
11253 \end_inset
11254
11255
11256 \family default
11257 Introduces a new EXTERIOR camera set-up.
11258  Everthing on this line in CAPS.
11259 \end_layout
11260
11261 \begin_layout Itemize
11262
11263 \family sans
11264 Speaker
11265 \begin_inset space \hfill{}
11266 \end_inset
11267
11268 M-z s
11269 \begin_inset Newline newline
11270 \end_inset
11271
11272
11273 \family default
11274 The character speaking.
11275 \end_layout
11276
11277 \begin_layout Itemize
11278
11279 \family sans
11280 Parenthetical
11281 \begin_inset space \hfill{}
11282 \end_inset
11283
11284 M-z p
11285 \begin_inset Newline newline
11286 \end_inset
11287
11288
11289 \family default
11290 Instructions to the speaker.
11291  The () are automatically inserted, but only the ( will show in LyX.
11292  Both will be printed.
11293 \end_layout
11294
11295 \begin_layout Itemize
11296
11297 \family sans
11298 Dialogue
11299 \begin_inset space \hfill{}
11300 \end_inset
11301
11302 M-z d
11303 \begin_inset Newline newline
11304 \end_inset
11305
11306
11307 \family default
11308 What the 
11309 \family sans
11310 Speaker
11311 \family default
11312  says.
11313 \end_layout
11314
11315 \begin_layout Itemize
11316
11317 \family sans
11318 Transition
11319 \begin_inset space \hfill{}
11320 \end_inset
11321
11322 M-z t
11323 \begin_inset Newline newline
11324 \end_inset
11325
11326
11327 \family default
11328 Camera movement instruction.
11329  e.
11330 \begin_inset space \thinspace{}
11331 \end_inset
11332
11333 g.
11334 \begin_inset space \space{}
11335 \end_inset
11336
11337 CUT TO:
11338 \end_layout
11339
11340 \begin_layout Itemize
11341
11342 \family sans
11343 FADE OUT:
11344 \begin_inset space \hfill{}
11345 \end_inset
11346
11347 M-z S-I
11348 \end_layout
11349
11350 \begin_layout Itemize
11351
11352 \family sans
11353 Author
11354 \begin_inset space \hfill{}
11355 \end_inset
11356
11357 M-z S-A
11358 \end_layout
11359
11360 \begin_layout Itemize
11361
11362 \family sans
11363 Title
11364 \begin_inset space \hfill{}
11365 \end_inset
11366
11367 M-z S-T
11368 \end_layout
11369
11370 \begin_layout Itemize
11371
11372 \family sans
11373 Right_Address
11374 \begin_inset space \hfill{}
11375 \end_inset
11376
11377 M-z r
11378 \end_layout
11379
11380 \begin_layout Subsection
11381 Script jargon
11382 \end_layout
11383
11384 \begin_layout Itemize
11385 (O.S) — off screen
11386 \end_layout
11387
11388 \begin_layout Itemize
11389 (V.0) — voice over
11390 \end_layout
11391
11392 \begin_layout Itemize
11393 b.
11394 \begin_inset space \thinspace{}
11395 \end_inset
11396
11397 g.
11398  — background
11399 \end_layout
11400
11401 \begin_layout Itemize
11402 C.U.
11403  — close-up
11404 \end_layout
11405
11406 \begin_layout Itemize
11407 PAN — camera movement
11408 \end_layout
11409
11410 \begin_layout Itemize
11411 INSERT — cut to close-up of
11412 \end_layout
11413
11414 \begin_layout Section
11415 ijmpc and ijmpd
11416 \end_layout
11417
11418 \begin_layout Standard
11419 by 
11420 \noun on
11421 Panayotis Papasotiriou
11422 \end_layout
11423
11424 \begin_layout Subsection
11425 Overview
11426 \end_layout
11427
11428 \begin_layout Standard
11429 The ijmpc package is a set of macros that facilitates electronic manuscript
11430  submission to the 
11431 \emph on
11432 International Journal of Modern Physics C
11433 \emph default
11434 .
11435  Similarly, the ijmpd package is for creating manuscripts to be submitted
11436  to the 
11437 \emph on
11438 International Journal of Modern Physics D
11439 \emph default
11440 .
11441  Both journals are published by World Scientific.
11442  The corresponding document classes are named 
11443 \family typewriter
11444 ws-ijmpc.cls
11445 \family default
11446  and 
11447 \family typewriter
11448 ws-ijmpd.cls
11449 \family default
11450 , respectively.
11451  These files, together with instructions for the authors, can be downloaded
11452  from the sites 
11453 \begin_inset Flex URL
11454 status collapsed
11455
11456 \begin_layout Plain Layout
11457
11458 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11459 \end_layout
11460
11461 \end_inset
11462
11463  and 
11464 \begin_inset Flex URL
11465 status collapsed
11466
11467 \begin_layout Plain Layout
11468
11469 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11470 \end_layout
11471
11472 \end_inset
11473
11474 .
11475  Both packages are modified versions of the standard 
11476 \begin_inset Quotes eld
11477 \end_inset
11478
11479 article
11480 \begin_inset Quotes erd
11481 \end_inset
11482
11483  package, and they are almost (but not exactly) identical.
11484  Most of their features are supported by LyX.
11485  I have used LyX successfully to write articles submitted to both journals
11486  without any problem.
11487 \end_layout
11488
11489 \begin_layout Subsection
11490 Writing a paper
11491 \end_layout
11492
11493 \begin_layout Standard
11494 As usual, the easiest way to write a paper is to start with a template.
11495  Click on 
11496 \family sans
11497 File\SpecialChar \menuseparator
11498 New from
11499 \family default
11500  
11501 \family sans
11502 \bar under
11503 T
11504 \bar default
11505 emplate
11506 \family default
11507 , then choose the 
11508 \family typewriter
11509 ijmpc.lyx
11510 \family default
11511  or 
11512 \family typewriter
11513 ijmpd.lyx
11514 \family default
11515  template.
11516  This will give an (almost) empty document that includes the most common
11517  fields found in a manuscript.
11518  Simply overwrite the existing text (including the brackets, 
11519 \family typewriter
11520 <>
11521 \family default
11522 ) with your text.
11523  You should keep in mind the following remarks.
11524 \end_layout
11525
11526 \begin_layout Enumerate
11527 LyX won't let you change the font size and the page style of the document,
11528  because such modifications are not allowed by both packages.
11529 \end_layout
11530
11531 \begin_layout Enumerate
11532 The language of the document should not be changed.
11533  Before previewing your paper, be sure that the babel package is not used.
11534  To do this, click on 
11535 \family sans
11536 Tools\SpecialChar \menuseparator
11537 Preferences
11538 \family default
11539 , select the 
11540 \family sans
11541 Lang Opts
11542 \family default
11543  tab, deselect the 
11544 \family sans
11545 Use babel
11546 \family default
11547  checkbox in the language settings, and click on 
11548 \family sans
11549 Apply
11550 \family default
11551  (or 
11552 \family sans
11553 Save
11554 \family default
11555 , if you wish to make this change permanent).
11556 \end_layout
11557
11558 \begin_layout Enumerate
11559 The 
11560 \begin_inset Quotes eld
11561 \end_inset
11562
11563 Keywords
11564 \begin_inset Quotes erd
11565 \end_inset
11566
11567  style must be used to define keywords.
11568 \end_layout
11569
11570 \begin_layout Enumerate
11571 The ijmpc package provides a style named 
11572 \begin_inset Quotes eld
11573 \end_inset
11574
11575 Classification Codes
11576 \begin_inset Quotes erd
11577 \end_inset
11578
11579 , which can be used to define classification codes, such as PACS numbers.
11580  Note that this facility is not supported by the ijmpd package.
11581 \end_layout
11582
11583 \begin_layout Enumerate
11584 Several new environments are available: 
11585 \begin_inset Quotes eld
11586 \end_inset
11587
11588 Definition
11589 \begin_inset Quotes erd
11590 \end_inset
11591
11592
11593 \begin_inset Quotes eld
11594 \end_inset
11595
11596 Step
11597 \begin_inset Quotes erd
11598 \end_inset
11599
11600
11601 \begin_inset Quotes eld
11602 \end_inset
11603
11604 Example
11605 \begin_inset Quotes erd
11606 \end_inset
11607
11608
11609 \begin_inset Quotes eld
11610 \end_inset
11611
11612 Remark
11613 \begin_inset Quotes erd
11614 \end_inset
11615
11616
11617 \begin_inset Quotes eld
11618 \end_inset
11619
11620 Notation
11621 \begin_inset Quotes erd
11622 \end_inset
11623
11624
11625 \begin_inset Quotes eld
11626 \end_inset
11627
11628 Theorem
11629 \begin_inset Quotes erd
11630 \end_inset
11631
11632
11633 \begin_inset Quotes eld
11634 \end_inset
11635
11636 Proof
11637 \begin_inset Quotes erd
11638 \end_inset
11639
11640
11641 \begin_inset Quotes eld
11642 \end_inset
11643
11644 Corollary
11645 \begin_inset Quotes erd
11646 \end_inset
11647
11648
11649 \begin_inset Quotes eld
11650 \end_inset
11651
11652 Lemma
11653 \begin_inset Quotes erd
11654 \end_inset
11655
11656
11657 \begin_inset Quotes eld
11658 \end_inset
11659
11660 Proposition
11661 \begin_inset Quotes erd
11662 \end_inset
11663
11664
11665 \begin_inset Quotes eld
11666 \end_inset
11667
11668 Prop
11669 \begin_inset Quotes erd
11670 \end_inset
11671
11672
11673 \begin_inset Quotes eld
11674 \end_inset
11675
11676 Question
11677 \begin_inset Quotes erd
11678 \end_inset
11679
11680
11681 \begin_inset Quotes eld
11682 \end_inset
11683
11684 Claim
11685 \begin_inset Quotes erd
11686 \end_inset
11687
11688 , and 
11689 \begin_inset Quotes eld
11690 \end_inset
11691
11692 Conjecture
11693 \begin_inset Quotes erd
11694 \end_inset
11695
11696 .
11697  Their use is more or less obvious.
11698  LyX supports all these environments; it will use the proper label, text
11699  style, and numbering scheme for each of them.
11700 \end_layout
11701
11702 \begin_layout Enumerate
11703 Both packages use basic citations; the natbib package should not be used.
11704  In LyX, citation references are shown as usual; in the output, citations
11705  are shown as superscripts.
11706  If you want to use a citation as normal text, you should use the 
11707 \family typewriter
11708 refcite
11709 \family default
11710  command, e.
11711 \begin_inset space \thinspace{}
11712 \end_inset
11713
11714 g.
11715 \begin_inset space \space{}
11716 \end_inset
11717
11718
11719 \begin_inset Quotes eld
11720 \end_inset
11721
11722 See Ref.
11723 \begin_inset space \space{}
11724 \end_inset
11725
11726
11727 \family typewriter
11728
11729 \backslash
11730 refcite{key}
11731 \family default
11732
11733 \begin_inset Quotes erd
11734 \end_inset
11735
11736 .
11737 \end_layout
11738
11739 \begin_layout Enumerate
11740 There is no 
11741 \begin_inset Quotes eld
11742 \end_inset
11743
11744 Acknowledgments
11745 \begin_inset Quotes erd
11746 \end_inset
11747
11748  section in both packages.
11749  To put acknowledgments, just use the 
11750 \begin_inset Quotes eld
11751 \end_inset
11752
11753 Section*
11754 \begin_inset Quotes erd
11755 \end_inset
11756
11757  environment.
11758 \end_layout
11759
11760 \begin_layout Enumerate
11761 Appendices may be added to the paper, 
11762 \emph on
11763 after
11764 \emph default
11765  the Acknowledgments and 
11766 \shape italic
11767 before
11768 \shape default
11769  the References.
11770  LyX provides a special environment, called 
11771 \begin_inset Quotes eld
11772 \end_inset
11773
11774 Appendices Section
11775 \begin_inset Quotes erd
11776 \end_inset
11777
11778  which marks the beginning of the appendices.
11779  This environment should be left blank; it just sends a LaTeX command, but
11780  nothing is really printed.
11781  In LyX, the word 
11782 \begin_inset Quotes eld
11783 \end_inset
11784
11785 Appendix
11786 \begin_inset Quotes erd
11787 \end_inset
11788
11789  is printed with blue letters, as a signal that all sections after that
11790  point are appendices.
11791  To write an appendix, use the 
11792 \begin_inset Quotes eld
11793 \end_inset
11794
11795 Appendix
11796 \begin_inset Quotes erd
11797 \end_inset
11798
11799  environment.
11800  LyX will number each appendix with capital letters, as required by both
11801  journals.
11802  Note that 
11803 \begin_inset Quotes eld
11804 \end_inset
11805
11806 Appendices Section
11807 \begin_inset Quotes erd
11808 \end_inset
11809
11810  
11811 \emph on
11812 must
11813 \emph default
11814  be present before the first appendix; if not, all appendices will be numbered
11815  as normal sections in the output.
11816 \end_layout
11817
11818 \begin_layout Enumerate
11819 The ijmpc and the ijmpd packages use the 
11820 \family typewriter
11821 tbl
11822 \family default
11823  command to implement table captions.
11824  As a result, a table created by LyX is printed correctly, but its caption
11825  is ignored.
11826  However, you can use some TeX code to overpass this problem, so that captions
11827  are printed as expected.
11828  To do so, create a float table as usual, remove the caption, and replace
11829  it with the TeX code 
11830 \family typewriter
11831
11832 \backslash
11833 tbl{
11834 \emph on
11835 your table caption
11836 \emph default
11837 }{
11838 \family default
11839  (sic); you must also the TeX code 
11840 \family typewriter
11841 }
11842 \family default
11843  immediately after the tabular material.
11844  Study the example table included in the template files to see how this
11845  trick is implemented.
11846  Alternatively, If you need table captions, you should implement the whole
11847  table float in a 
11848 \family typewriter
11849 .tex
11850 \family default
11851  file, then include this file to the LyX document (
11852 \family sans
11853 Insert\SpecialChar \menuseparator
11854 File\SpecialChar \menuseparator
11855 Child
11856 \begin_inset space ~
11857 \end_inset
11858
11859 Document
11860 \family default
11861 ).
11862  Details on how to create a table float can be found in the files 
11863 \family typewriter
11864 ws-ijmpc.tex
11865 \family default
11866  and 
11867 \family typewriter
11868 ws-ijmpd.tex
11869 \family default
11870 , included in the corresponding packages.
11871 \end_layout
11872
11873 \begin_layout Subsection
11874 Preparing a paper for submission
11875 \end_layout
11876
11877 \begin_layout Standard
11878 Before you submit your paper you must export the LyX document as a LaTeX
11879  file (
11880 \family sans
11881 File\SpecialChar \menuseparator
11882 Export\SpecialChar \menuseparator
11883 LaTeX
11884 \family default
11885 )
11886 \begin_inset Foot
11887 status open
11888
11889 \begin_layout Plain Layout
11890 Actually you have the choice between LaTeX (plain) and pdflatex.
11891  If you intend to use pdflatex to prepare the paper, you should use the
11892  pdflatex option so that included graphics are converted to PDF format,
11893  ready for use by pdflatex.
11894 \end_layout
11895
11896 \end_inset
11897
11898 , then make the following changes to the resulting 
11899 \family typewriter
11900 .tex
11901 \family default
11902  file.
11903 \end_layout
11904
11905 \begin_layout Enumerate
11906 Remove the comment lines before the 
11907 \family typewriter
11908
11909 \backslash
11910 documentclass
11911 \family default
11912  command.
11913 \end_layout
11914
11915 \begin_layout Enumerate
11916 Remove everything between (and including) the 
11917 \family typewriter
11918
11919 \backslash
11920 makeatletter
11921 \family default
11922  and 
11923 \family typewriter
11924
11925 \backslash
11926 makeatother
11927 \family default
11928  commands, except for any commands you specifically put into the LaTeX preamble.
11929 \end_layout
11930
11931 \begin_layout Standard
11932 The modified 
11933 \family typewriter
11934 .tex
11935 \family default
11936  file should be saved and processed through LaTeX as many times as necessary.
11937  You may also want to check the resulting 
11938 \family typewriter
11939 .dvi
11940 \family default
11941  document.
11942 \end_layout
11943
11944 \begin_layout Subsection
11945 Use of TeX code
11946 \end_layout
11947
11948 \begin_layout Standard
11949 The use of TeX code is reduced to two commands, which must be placed at
11950  the top of the document.
11951  If you started writing your paper by using the 
11952 \family typewriter
11953 ijmpc.lyx
11954 \family default
11955  or the 
11956 \family typewriter
11957 ijmpd.lyx
11958 \family default
11959  template, the TeX code needed is already in its place; you usually don't
11960  need to delete it.
11961  You may only modify the first TeX code to specify the information printed
11962  to the top of odd and even pages (authors' names and short paper's title,
11963  respectively).
11964  This TeX code must have the form 
11965 \family typewriter
11966
11967 \backslash
11968 markboth{Authors' Names}{Short Paper's Title}
11969 \family default
11970 .
11971 \end_layout
11972
11973 \begin_layout Section
11974 iopart
11975 \end_layout
11976
11977 \begin_layout Standard
11978 by 
11979 \noun on
11980 Uwe Stöhr
11981 \end_layout
11982
11983 \begin_layout Subsection
11984 Overview
11985 \end_layout
11986
11987 \begin_layout Standard
11988 The iopart package provides a document class to create electronic manuscript
11989  submission to the journals published by the Institute of Physics.
11990  Instructions for the authors how to create a paper using the iopart class
11991  can be downloaded together with the iopart package from the site 
11992 \begin_inset Flex URL
11993 status collapsed
11994
11995 \begin_layout Plain Layout
11996
11997 ftp://ftp.iop.org/pub/journals/latex2e
11998 \end_layout
11999
12000 \end_inset
12001
12002 .
12003 \end_layout
12004
12005 \begin_layout Subsection
12006 Writing a paper
12007 \end_layout
12008
12009 \begin_layout Standard
12010 The easiest way to write a paper is to start with the file 
12011 \emph on
12012 IOP-article.lyx
12013 \emph default
12014  that is available in LyX's examples files folder.
12015  Open this file, save it under a new name, and start writing.
12016  The example file explains how to use the special text environments.
12017  Here are the most important advices:
12018 \end_layout
12019
12020 \begin_layout Itemize
12021 To be able to compile your document to a PDF, PS, or DVI, assure that the
12022  two options 
12023 \family sans
12024 Use AMS math package
12025 \family default
12026  in the document settings under 
12027 \family sans
12028 Math Options
12029 \family default
12030  are not used!
12031 \end_layout
12032
12033 \begin_layout Itemize
12034
12035 \size normal
12036 The title environment defines the kind of your paper.
12037  So use one of the following environments for the title:
12038 \end_layout
12039
12040 \begin_deeper
12041 \begin_layout Itemize
12042
12043 \family sans
12044 \size normal
12045 Title
12046 \family default
12047  for a Paper
12048 \end_layout
12049
12050 \begin_layout Itemize
12051
12052 \family sans
12053 \size normal
12054 Review
12055 \family default
12056  for a Review
12057 \end_layout
12058
12059 \begin_layout Itemize
12060
12061 \family sans
12062 \size normal
12063 Topical
12064 \family default
12065  for a Topical review
12066 \end_layout
12067
12068 \begin_layout Itemize
12069
12070 \family sans
12071 \size normal
12072 Comment
12073 \family default
12074  for a Comment
12075 \end_layout
12076
12077 \begin_layout Itemize
12078
12079 \family sans
12080 \size normal
12081 Note
12082 \family default
12083  for a Note
12084 \end_layout
12085
12086 \begin_layout Itemize
12087
12088 \family sans
12089 \size normal
12090 Paper
12091 \family default
12092  for a Paper (same as Title)
12093 \end_layout
12094
12095 \begin_layout Itemize
12096
12097 \family sans
12098 \size normal
12099 Prelim
12100 \family default
12101  for a Preliminary communication
12102 \end_layout
12103
12104 \begin_layout Itemize
12105
12106 \family sans
12107 \size normal
12108 Rapid
12109 \family default
12110  for a Rapid communication
12111 \end_layout
12112
12113 \begin_layout Itemize
12114
12115 \family sans
12116 \size normal
12117 Letter
12118 \family default
12119  for a Letter to the editor
12120 \end_layout
12121
12122 \end_deeper
12123 \begin_layout Itemize
12124
12125 \size normal
12126 All title environments except of 
12127 \family sans
12128 Letter
12129 \family default
12130  can have an optional short title.
12131 \end_layout
12132
12133 \begin_layout Itemize
12134 There is a general title environment 
12135 \family sans
12136 Article
12137 \family default
12138  which is not directly supported by the LyX.
12139  This can be used as TeX code when your document doesn't fit into one of
12140  the other title types.
12141 \end_layout
12142
12143 \begin_layout Standard
12144 For more informations like hints for special table and formula formatting,
12145  look at the IOP author guidelines.
12146 \end_layout
12147
12148 \begin_layout Section
12149 Kluwer
12150 \end_layout
12151
12152 \begin_layout Standard
12153 by 
12154 \noun on
12155 Panayotis Papasotiriou
12156 \end_layout
12157
12158 \begin_layout Subsection
12159 Overview
12160 \end_layout
12161
12162 \begin_layout Standard
12163 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12164  that facilitates electronic manuscript submission to the journals they
12165  publish.
12166  Most known of them (at least in my domain of interest) are 
12167 \emph on
12168 Astrophysics and Space Science
12169 \emph default
12170  and 
12171 \emph on
12172 Solar Physics
12173 \emph default
12174 , but there are many others (see a complete list at 
12175 \begin_inset Flex URL
12176 status collapsed
12177
12178 \begin_layout Plain Layout
12179
12180 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12181 \end_layout
12182
12183 \end_inset
12184
12185 ).
12186  The Kluwer package may be downloaded from the site 
12187 \begin_inset Flex URL
12188 status collapsed
12189
12190 \begin_layout Plain Layout
12191
12192 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12193 \end_layout
12194
12195 \end_inset
12196
12197 .
12198  A complete user guide is contained in that package (but it can also be
12199  downloaded separately).
12200 \end_layout
12201
12202 \begin_layout Standard
12203 LyX supports many features of the package but not everything.
12204  However, the TeX code needed is reduced to some 
12205 \begin_inset Quotes eld
12206 \end_inset
12207
12208 peculiar
12209 \begin_inset Quotes erd
12210 \end_inset
12211
12212  commands of the package (see
12213 \begin_inset space ~
12214 \end_inset
12215
12216
12217 \begin_inset CommandInset ref
12218 LatexCommand ref
12219 reference "subsec:kluwer_peculiarities"
12220
12221 \end_inset
12222
12223 ).
12224  I have recently used LyX to write an article submitted to the 
12225 \emph on
12226 Astrophysics and Space Science
12227 \emph default
12228  without any problem.
12229 \end_layout
12230
12231 \begin_layout Subsection
12232 Writing a paper
12233 \end_layout
12234
12235 \begin_layout Standard
12236 The easiest way to write a paper is to start with the Kluwer template file.
12237  Click on 
12238 \family sans
12239 File\SpecialChar \menuseparator
12240 New from
12241 \family default
12242  
12243 \family sans
12244 Template
12245 \family default
12246 , then choose the 
12247 \family typewriter
12248 kluwer.lyx
12249 \family default
12250  template.
12251  This will give an (almost) empty document that includes the most common
12252  fields found in a manuscript and a short description of their use.
12253  As in most templates, simply overwrite the existing text (including the
12254  brackets, 
12255 \family typewriter
12256 <>
12257 \family default
12258 ) with the correct information.
12259 \end_layout
12260
12261 \begin_layout Subsection
12262 Preparing a paper for submission
12263 \end_layout
12264
12265 \begin_layout Standard
12266 As in the AASTeX package, before you submit your paper to a journal you
12267  must 
12268 \begin_inset Quotes eld
12269 \end_inset
12270
12271 postprocess
12272 \begin_inset Quotes erd
12273 \end_inset
12274
12275  it as follows.
12276 \end_layout
12277
12278 \begin_layout Enumerate
12279 Export your paper as a LaTeX file.
12280  To do this, click on 
12281 \family sans
12282 File\SpecialChar \menuseparator
12283 Export\SpecialChar \menuseparator
12284 LaTeX
12285 \family default
12286 .
12287  
12288 \end_layout
12289
12290 \begin_layout Enumerate
12291 Edit the resulting 
12292 \family typewriter
12293 .tex
12294 \family default
12295  file with a text editor and make the following changes
12296 \end_layout
12297
12298 \begin_deeper
12299 \begin_layout Enumerate
12300 remove the comment lines before the 
12301 \family typewriter
12302
12303 \backslash
12304 documentclass
12305 \family default
12306  command,
12307 \end_layout
12308
12309 \begin_layout Enumerate
12310 remove everything between (and including) the 
12311 \family typewriter
12312
12313 \backslash
12314 makeatletter
12315 \family default
12316  and 
12317 \family typewriter
12318
12319 \backslash
12320 makeatother
12321 \family default
12322  commands, except for any commands you specifically put into the LaTeX preamble.
12323 \end_layout
12324
12325 \begin_layout Standard
12326 Save the resulting 
12327 \family typewriter
12328 .tex
12329 \family default
12330  file.
12331 \end_layout
12332
12333 \end_deeper
12334 \begin_layout Enumerate
12335 Run the 
12336 \family typewriter
12337 .tex
12338 \family default
12339  file through LaTeX as many times as necessary (usually up to three).
12340 \end_layout
12341
12342 \begin_layout Enumerate
12343 View the resulting 
12344 \family typewriter
12345 .dvi
12346 \family default
12347  document using, e.
12348 \begin_inset space \thinspace{}
12349 \end_inset
12350
12351 g.
12352 \begin_inset space \space{}
12353 \end_inset
12354
12355
12356 \family sans
12357 xdvi
12358 \family default
12359 , and check if everything is OK (it should, if you didn't make any mistake).
12360 \end_layout
12361
12362 \begin_layout Subsection
12363 \begin_inset Quotes eld
12364 \end_inset
12365
12366 Peculiarities
12367 \begin_inset Quotes erd
12368 \end_inset
12369
12370  of the Kluwer package
12371 \begin_inset CommandInset label
12372 LatexCommand label
12373 name "subsec:kluwer_peculiarities"
12374
12375 \end_inset
12376
12377
12378 \end_layout
12379
12380 \begin_layout Standard
12381 The Kluwer package has the following 
12382 \begin_inset Quotes eld
12383 \end_inset
12384
12385 peculiarities
12386 \begin_inset Quotes erd
12387 \end_inset
12388
12389 .
12390 \end_layout
12391
12392 \begin_layout Enumerate
12393 It is possible to write multiple articles in the same LaTeX file
12394 \begin_inset Foot
12395 status collapsed
12396
12397 \begin_layout Plain Layout
12398 I can't imagine any good reason to do this.
12399 \end_layout
12400
12401 \end_inset
12402
12403 .
12404  Each article must be included in the environment 
12405 \begin_inset Quotes eld
12406 \end_inset
12407
12408 article
12409 \begin_inset Quotes erd
12410 \end_inset
12411
12412 .
12413  Unfortunately, this environment cannot be omitted, even if you write just
12414  one article.
12415  Therefore, each article starts with the command 
12416 \family typewriter
12417
12418 \backslash
12419 begin{article}
12420 \family default
12421  and, obviously, ends with the command 
12422 \family typewriter
12423
12424 \backslash
12425 end{article}
12426 \family default
12427 .
12428  Although this can be implemented in LyX, I didn't included it, since it
12429  looks ugly and can confuse the novice user.
12430  Therefore, you need to enter them directly and mark them as LaTeX code
12431  (the well-known 
12432 \begin_inset Quotes eld
12433 \end_inset
12434
12435 TeX code
12436 \begin_inset Quotes erd
12437 \end_inset
12438
12439 ).
12440 \end_layout
12441
12442 \begin_layout Enumerate
12443 Information given at the beginning of the article (i.
12444 \begin_inset space \thinspace{}
12445 \end_inset
12446
12447 g.
12448 \begin_inset space \space{}
12449 \end_inset
12450
12451 title, subtitle, author, institution, running title, running author, abstract
12452  and keywords) must be included in an environment called 
12453 \begin_inset Quotes eld
12454 \end_inset
12455
12456 opening
12457 \begin_inset Quotes erd
12458 \end_inset
12459
12460 .
12461  This is not implemented in LyX, so you must enter title, subtitle etc.
12462 \begin_inset space ~
12463 \end_inset
12464
12465 between two TeX code lines (
12466 \family typewriter
12467
12468 \backslash
12469 begin{opening}
12470 \family default
12471  and 
12472 \family typewriter
12473
12474 \backslash
12475 end{opening}
12476 \family default
12477 ).
12478 \end_layout
12479
12480 \begin_layout Enumerate
12481 According to the user manual, the label of each bibliography item must be
12482  written as 
12483 \family typewriter
12484
12485 \backslash
12486 protect
12487 \backslash
12488 citeauthoryear{
12489 \family default
12490 \emph on
12491 author(s)
12492 \family typewriter
12493 \emph default
12494 }{
12495 \family default
12496 \emph on
12497 year
12498 \family typewriter
12499 \emph default
12500 }
12501 \family default
12502 .
12503 \end_layout
12504
12505 \begin_layout Standard
12506 The 
12507 \family typewriter
12508 kluwer.lyx
12509 \family default
12510  template takes care of all these 
12511 \begin_inset Quotes eld
12512 \end_inset
12513
12514 peculiarities
12515 \begin_inset Quotes erd
12516 \end_inset
12517
12518 .
12519  If you start a new paper using this template you don't need to do anything
12520  special.
12521  Just 
12522 \end_layout
12523
12524 \begin_layout Enumerate
12525 don't delete the TeX code included in the template, and
12526 \end_layout
12527
12528 \begin_layout Enumerate
12529 copy the example bibliography item included in the template and modify it
12530  as necessary to enter new bibliography items.
12531 \end_layout
12532
12533 \begin_layout Section
12534 Koma-Script
12535 \end_layout
12536
12537 \begin_layout Standard
12538 by 
12539 \noun on
12540 Bernd Rellermeyer
12541 \end_layout
12542
12543 \begin_layout Subsection
12544 Overview
12545 \end_layout
12546
12547 \begin_layout Standard
12548 The LyX document classes 
12549 \emph on
12550 article (koma-script)
12551 \emph default
12552
12553 \emph on
12554 report (koma-script)
12555 \emph default
12556
12557 \emph on
12558 book
12559 \emph default
12560  
12561 \emph on
12562 (koma-script)
12563 \emph default
12564 , and 
12565 \emph on
12566 letter
12567 \emph default
12568  
12569 \emph on
12570 (koma-script)
12571 \emph default
12572  correspond to the LaTeX document classes 
12573 \family typewriter
12574 scrartcl.cls
12575 \family default
12576
12577 \family typewriter
12578 scrreprt.cls
12579 \family default
12580
12581 \family typewriter
12582 scrbook.cls
12583 \family default
12584 , and 
12585 \family typewriter
12586 scrlettr.cls
12587 \family default
12588 , resp.
12589 \begin_inset space ~
12590 \end_inset
12591
12592 of the Koma-Script family.
12593  They are replacements for the standard document classes 
12594 \family typewriter
12595 article.cls
12596 \family default
12597
12598 \family typewriter
12599 report.cls
12600 \family default
12601
12602 \family typewriter
12603 book.cls
12604 \family default
12605  and 
12606 \family typewriter
12607 letter.cls
12608 \family default
12609 , resp., and fit better to European typography conventions in a number of
12610  points.
12611 \end_layout
12612
12613 \begin_layout Itemize
12614 Standard character size is 11pt in 
12615 \emph on
12616 article (koma-script)
12617 \emph default
12618
12619 \emph on
12620 report (koma-script)
12621 \emph default
12622 , and 
12623 \emph on
12624 book (koma-script)
12625 \emph default
12626 , and 12pt in 
12627 \emph on
12628 letter (koma-script)
12629 \emph default
12630 .
12631 \end_layout
12632
12633 \begin_layout Itemize
12634 Headings, labels of the description environment, and a number of elements
12635  of the 
12636 \emph on
12637 letter (koma-script)
12638 \emph default
12639  document class are set in a bold sans serif font.
12640 \begin_inset Foot
12641 status collapsed
12642
12643 \begin_layout Plain Layout
12644 There is a big difference between the bold sans serif old cm fonts and new
12645  ec fonts, especially in the appearance of headings.
12646  In comparison, the ec bold sans serif fonts look a bit thin.
12647  Here the LaTeX package 
12648 \family typewriter
12649 cmsd.sty by
12650 \family default
12651  
12652 \shape smallcaps
12653 Walter Schmidt
12654 \shape default
12655  helps to produce the 
12656 \begin_inset Quotes eld
12657 \end_inset
12658
12659 usual
12660 \begin_inset Quotes erd
12661 \end_inset
12662
12663  appearance when using the ec fonts.
12664 \end_layout
12665
12666 \end_inset
12667
12668  The numbering of chapter headings is made in the same way as the numbering
12669  of section headings, that is without the extra line 
12670 \begin_inset Quotes eld
12671 \end_inset
12672
12673 Chapter\SpecialChar \ldots{}
12674
12675 \begin_inset Quotes erd
12676 \end_inset
12677
12678 .
12679  In addition, the appearance of the headings can be modified by using a
12680  number of options (in LyX to be entered in the field 
12681 \family sans
12682 Extra
12683 \begin_inset space ~
12684 \end_inset
12685
12686 Options
12687 \family default
12688  of the dialog 
12689 \family sans
12690 Layout\SpecialChar \menuseparator
12691 Document
12692 \family default
12693 ).
12694  A detailed German description of these options can be found in the Koma-Script
12695  documentation 
12696 \emph on
12697 scrguide
12698 \emph default
12699 .
12700 \end_layout
12701
12702 \begin_layout Itemize
12703 The main means in the Koma-Script document classes to design the type area
12704  are the options 
12705 \family sans
12706 BCOR
12707 \family default
12708  and 
12709 \family sans
12710 DIV
12711 \family default
12712  (in LyX to be entered in the extra class options field in the dialog 
12713 \family sans
12714 Document\SpecialChar \menuseparator
12715 Settings
12716 \family default
12717 ).
12718  They make a clearer modification of page margins possible as do the options
12719  of the dialog 
12720 \family sans
12721 Document\SpecialChar \menuseparator
12722 Settings
12723 \family default
12724 .
12725  A detailed German description of these and other type area options can
12726  be found in the Koma-Script documentation 
12727 \emph on
12728 scrguide
12729 \emph default
12730 .
12731 \end_layout
12732
12733 \begin_layout Itemize
12734 The LaTeX document classes of the Koma-Script family define a number of
12735  additional commands.
12736  Those part of it which makes sense in LyX is implemented in corresponding
12737  paragraph types.
12738 \end_layout
12739
12740 \begin_layout Standard
12741 A detailed German description of the LaTeX document classes of the Koma-Script
12742  family can be found in the Koma-Script documentation 
12743 \emph on
12744 scrguide
12745 \emph default
12746 .
12747 \begin_inset Foot
12748 status collapsed
12749
12750 \begin_layout Plain Layout
12751 There is an English translation 
12752 \emph on
12753 screnggu
12754 \emph default
12755 , but it is not a complete one.
12756 \end_layout
12757
12758 \end_inset
12759
12760  The following sections describe only those aspects, which are relevant
12761  in LyX.
12762 \end_layout
12763
12764 \begin_layout Subsection
12765 article (koma-script), report (koma-script), and book (koma-script)
12766 \end_layout
12767
12768 \begin_layout Standard
12769 The document classes 
12770 \emph on
12771 article (koma-script)
12772 \emph default
12773
12774 \emph on
12775 report (koma-script)
12776 \emph default
12777 , and 
12778 \emph on
12779 book
12780 \emph default
12781  
12782 \emph on
12783 (koma-script)
12784 \emph default
12785  are implemented in the layout files 
12786 \family typewriter
12787 scrartcl.layout
12788 \family default
12789
12790 \family typewriter
12791 scrreprt.layout
12792 \family default
12793 , and 
12794 \family typewriter
12795 scrbook.layout
12796 \family default
12797 , resp.
12798  They contain all the paragraph types of the corresponding standard document
12799  classes 
12800 \emph on
12801 article
12802 \emph default
12803
12804 \emph on
12805 report
12806 \emph default
12807 , and 
12808 \emph on
12809 book
12810 \emph default
12811 , resp., partly modified, with the exception of the LyX specific 
12812 \family sans
12813 List
12814 \family default
12815 -type, which is replaced by the new 
12816 \family sans
12817 Labeling
12818 \family default
12819 -type having the same functionality.
12820  Beside the 
12821 \family sans
12822 Labeling
12823 \family default
12824 -Type there is a number of new paragraph types added.
12825  They are 
12826 \emph on
12827 not
12828 \emph default
12829  part of 
12830 \emph on
12831 letter (koma-script)
12832 \emph default
12833 .
12834 \end_layout
12835
12836 \begin_layout Itemize
12837
12838 \family sans
12839 Addpart, Addchap
12840 \family default
12841
12842 \family sans
12843 Addsec
12844 \family default
12845 : are equivalents to 
12846 \family sans
12847 Part*, Chapter*
12848 \family default
12849  and 
12850 \family sans
12851 Section*
12852 \family default
12853 , resp., additionally inserting an entry in the table of contents.
12854  
12855 \family sans
12856 Addpart
12857 \family default
12858  and 
12859 \family sans
12860 Addchap
12861 \family default
12862  are not contained in 
12863 \emph on
12864 article (koma-script)
12865 \emph default
12866 .
12867 \end_layout
12868
12869 \begin_layout Itemize
12870
12871 \family sans
12872 Addchap*
12873 \family default
12874
12875 \family sans
12876 Addsec*
12877 \family default
12878 : behave exactly as 
12879 \family sans
12880 Addchap
12881 \family default
12882  and 
12883 \family sans
12884 Addsec
12885 \family default
12886 , resp., additionally clearing running heads.
12887  
12888 \family sans
12889 Addchap*
12890 \family default
12891  is not contained in 
12892 \emph on
12893 article (koma-script)
12894 \emph default
12895 .
12896 \begin_inset Foot
12897 status collapsed
12898
12899 \begin_layout Plain Layout
12900 There is also an 
12901 \family typewriter
12902
12903 \backslash
12904 addpart*
12905 \family default
12906  command in 
12907 \emph on
12908 book (koma-script)
12909 \emph default
12910  and in 
12911 \emph on
12912 report (koma-script)
12913 \emph default
12914 , but since this is identical to 
12915 \family sans
12916 Part*
12917 \family default
12918 , is has not been implemented in LyX.
12919 \end_layout
12920
12921 \end_inset
12922
12923
12924 \end_layout
12925
12926 \begin_layout Itemize
12927
12928 \family sans
12929 Minisec
12930 \family default
12931 : generates a heading directly above the following paragraph in the standard
12932  character size without affecting the structure of the document.
12933 \end_layout
12934
12935 \begin_layout Itemize
12936
12937 \family sans
12938 Captionabove
12939 \family default
12940  and 
12941 \family sans
12942 Captionbelow
12943 \family default
12944  are special captions which respect the different space settings needed
12945  for captions placed above or below an element (if you follow strict typographic
12946  rules, you might want to place table captions always above the table).
12947  You can also use the class option 
12948 \family typewriter
12949 tablecaptionsabove
12950 \family default
12951 , which will switch 
12952 \family sans
12953 caption
12954 \family default
12955  to 
12956 \family sans
12957 captionabove
12958 \family default
12959  for tables and 
12960 \family sans
12961 captionbelow
12962 \family default
12963  for figures.
12964  You need at least Koma-Script version 2.8q to use this.
12965 \end_layout
12966
12967 \begin_layout Itemize
12968
12969 \family sans
12970 Dictum
12971 \family default
12972 : can be used to set a bonmot, e.
12973 \begin_inset space \thinspace{}
12974 \end_inset
12975
12976 g.
12977 \begin_inset space \space{}
12978 \end_inset
12979
12980 at the beginning of a chapter.
12981  If you use the optional argument (
12982 \family sans
12983 Insert\SpecialChar \menuseparator
12984 Short
12985 \begin_inset space ~
12986 \end_inset
12987
12988 Title
12989 \family default
12990 ), you can insert the dictum's author there.
12991  Dictum and author are separated by a line.
12992  You need at least Koma-Script version 2.8q to use this.
12993  
12994 \family sans
12995 Dictum
12996 \family default
12997  is not contained in 
12998 \emph on
12999 article (koma-script)
13000 \emph default
13001 .
13002 \end_layout
13003
13004 \begin_layout Standard
13005 The following types, together with the standard types 
13006 \family sans
13007 Title
13008 \family default
13009
13010 \family sans
13011 Author
13012 \family default
13013 , and 
13014 \family sans
13015 Date
13016 \family default
13017 , form the title area of the document.
13018  They must be entered ahead of the first 
13019 \begin_inset Quotes eld
13020 \end_inset
13021
13022 ordinary
13023 \begin_inset Quotes erd
13024 \end_inset
13025
13026  paragraph.
13027 \begin_inset Foot
13028 status collapsed
13029
13030 \begin_layout Plain Layout
13031 The corresponding LaTeX commands must appear before the 
13032 \family typewriter
13033
13034 \backslash
13035 maketitle
13036 \family default
13037  command.
13038 \end_layout
13039
13040 \end_inset
13041
13042  When such a type is used more than once, the latter usage overwrites the
13043  former one, that means, for every type only the latest usage is valid.
13044  The order of the different types however has, like 
13045 \family sans
13046 Title
13047 \family default
13048
13049 \family sans
13050 Author
13051 \family default
13052 , and 
13053 \family sans
13054 Date
13055 \family default
13056 , no effect on the appearance of the produced document.
13057 \end_layout
13058
13059 \begin_layout Itemize
13060
13061 \family sans
13062 Subject
13063 \family default
13064 : produces a centered paragraph above the ordinary title (
13065 \family sans
13066 Title
13067 \family default
13068
13069 \family sans
13070 Author
13071 \family default
13072
13073 \family sans
13074 Date
13075 \family default
13076 ) for the subject of the document.
13077 \end_layout
13078
13079 \begin_layout Itemize
13080
13081 \family sans
13082 Publishers
13083 \family default
13084 : produces a centered paragraph below the ordinary title (
13085 \family sans
13086 Title
13087 \family default
13088
13089 \family sans
13090 Author
13091 \family default
13092
13093 \family sans
13094 Date
13095 \family default
13096 ) for the publishers' name.
13097 \end_layout
13098
13099 \begin_layout Itemize
13100
13101 \family sans
13102 Dedication
13103 \family default
13104 : in 
13105 \emph on
13106 report (koma-script)
13107 \emph default
13108  and 
13109 \emph on
13110 book (koma-script)
13111 \emph default
13112  produces a centered paragraph on its own page behind the title page, or
13113  in 
13114 \emph on
13115 article (koma-script)
13116 \emph default
13117  produces a centered paragraph below the ordinary title (
13118 \family sans
13119 Title
13120 \family default
13121
13122 \family sans
13123 Author
13124 \family default
13125
13126 \family sans
13127 Date
13128 \family default
13129
13130 \family sans
13131 Publishers
13132 \family default
13133 ) for a dedication.
13134 \end_layout
13135
13136 \begin_layout Itemize
13137
13138 \family sans
13139 Titlehead
13140 \family default
13141 : produces a left aligned paragraph above the ordinary title (
13142 \family sans
13143 Title
13144 \family default
13145
13146 \family sans
13147 Author
13148 \family default
13149
13150 \family sans
13151 Date
13152 \family default
13153
13154 \family sans
13155 Subject
13156 \family default
13157 ) for a document`s head.
13158 \end_layout
13159
13160 \begin_layout Itemize
13161
13162 \family sans
13163 Uppertitleback
13164 \family default
13165 : produces in a double-sided print in 
13166 \emph on
13167 report (koma-script)
13168 \emph default
13169  and 
13170 \emph on
13171 book (koma-script)
13172 \emph default
13173  a left-aligned paragraph at the top of the title page`s back or has no
13174  effect in a single-sided print or in 
13175 \emph on
13176 article (koma-script)
13177 \emph default
13178 .
13179 \end_layout
13180
13181 \begin_layout Itemize
13182
13183 \family sans
13184 Lowertitleback
13185 \family default
13186 : produces in a double-sided print in 
13187 \emph on
13188 report (koma-script)
13189 \emph default
13190  and 
13191 \emph on
13192 book (koma-script)
13193 \emph default
13194  a left-aligned paragraph at the bottom of the title page`s back or has
13195  no effect in a single-sided print or in 
13196 \emph on
13197 article (koma-script)
13198 \emph default
13199 .
13200 \end_layout
13201
13202 \begin_layout Itemize
13203
13204 \family sans
13205 Extratitle
13206 \family default
13207 : produces a special 
13208 \begin_inset Quotes eld
13209 \end_inset
13210
13211 dirty
13212 \begin_inset Quotes erd
13213 \end_inset
13214
13215  page ahead of the actual document containing a paragraph without special
13216  formatting.
13217 \end_layout
13218
13219 \begin_layout Standard
13220 The layout files for the document classes 
13221 \emph on
13222 article (koma-script)
13223 \emph default
13224
13225 \emph on
13226 report (koma-script)
13227 \emph default
13228 , and 
13229 \emph on
13230 book (koma-script)
13231 \emph default
13232  do include the file 
13233 \family typewriter
13234 scrmacros.inc
13235 \family default
13236 .
13237  This is thought of as a place to define your own types.
13238  Copy scrmacros
13239 \family typewriter
13240 .inc
13241 \family default
13242  in your personal layout directory and edit the file!
13243 \end_layout
13244
13245 \begin_layout Subsection
13246 letter (koma-script)
13247 \end_layout
13248
13249 \begin_layout Standard
13250 \begin_inset ERT
13251 status open
13252
13253 \begin_layout Plain Layout
13254
13255
13256 \backslash
13257 begin{sloppypar}
13258 \end_layout
13259
13260 \end_inset
13261
13262
13263 \end_layout
13264
13265 \begin_layout Standard
13266 \noindent
13267 The document class 
13268 \emph on
13269 letter (koma-script)
13270 \emph default
13271  is implemented in the layout file 
13272 \family typewriter
13273 scrlettr.layout
13274 \family default
13275 .
13276  It contains all the paragraph types of the corresponding standard document
13277  class 
13278 \emph on
13279 letter
13280 \emph default
13281 , partly modified, with the exception of the LyX specific types 
13282 \family sans
13283 LyX-Code
13284 \family default
13285  and 
13286 \family sans
13287 Comment
13288 \family default
13289  and the 
13290 \family sans
13291 List
13292 \family default
13293  type, which is replaced by the new 
13294 \family sans
13295 Labeling
13296 \family default
13297  type.
13298  In addition, it contains, in contrast to the standard document class, the
13299  standard types 
13300 \family sans
13301 LaTeX
13302 \family default
13303
13304 \family sans
13305 Quotation
13306 \family default
13307
13308 \family sans
13309 Quote
13310 \family default
13311 , and 
13312 \family sans
13313 Verse
13314 \family default
13315 .
13316  Furthermore, there are a number of new letter specific types.
13317 \end_layout
13318
13319 \begin_layout Standard
13320 \begin_inset ERT
13321 status open
13322
13323 \begin_layout Plain Layout
13324
13325
13326 \backslash
13327 end{sloppypar}
13328 \end_layout
13329
13330 \end_inset
13331
13332
13333 \end_layout
13334
13335 \begin_layout Standard
13336 The appearance of the letter produced by this document class can be controlled
13337  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13338 \begin_inset Foot
13339 status collapsed
13340
13341 \begin_layout Plain Layout
13342 For example, the standard appearance of the letter`s heading, consisting
13343  of name and address, is quite self-willed.
13344  An 
13345 \begin_inset Quotes eld
13346 \end_inset
13347
13348 ordinary
13349 \begin_inset Quotes erd
13350 \end_inset
13351
13352  heading is produced by the following LaTeX commands in the preamble:
13353 \end_layout
13354
13355 \begin_layout LyX-Code
13356
13357 \backslash
13358 firsthead{
13359 \backslash
13360 parbox[b]{
13361 \backslash
13362 textwidth}
13363 \end_layout
13364
13365 \begin_layout LyX-Code
13366   {
13367 \backslash
13368 ignorespaces 
13369 \backslash
13370 fromname
13371 \backslash
13372
13373 \backslash
13374  
13375 \backslash
13376 ignorespaces 
13377 \backslash
13378 fromaddress}} 
13379 \end_layout
13380
13381 \begin_layout LyX-Code
13382
13383 \backslash
13384 nexthead{
13385 \backslash
13386 parbox[b]{
13387 \backslash
13388 textwidth}
13389 \end_layout
13390
13391 \begin_layout LyX-Code
13392   {
13393 \backslash
13394 ignorespaces 
13395 \backslash
13396 fromname 
13397 \backslash
13398 hfill 
13399 \backslash
13400 ignorespaces 
13401 \backslash
13402 pagename
13403 \backslash
13404  
13405 \backslash
13406 thepage}}
13407 \end_layout
13408
13409 \end_inset
13410
13411  A detailed German description of such LaTeX commands can be found in the
13412  Koma-Script documentation 
13413 \emph on
13414 scrguide
13415 \emph default
13416 .
13417  With it, the letter's author can produce his personal letter layout.
13418 \end_layout
13419
13420 \begin_layout Standard
13421 The types 
13422 \family sans
13423 Letter
13424 \family default
13425  and 
13426 \family sans
13427 Opening
13428 \family default
13429  define the beginning of the letter and must be used in every letter.
13430  To emphasize them in the LyX document class, they are marked with the letter
13431  
13432 \shape italic
13433 L
13434 \shape default
13435  or 
13436 \shape italic
13437 O
13438 \shape default
13439 , resp.
13440 \begin_inset space ~
13441 \end_inset
13442
13443 in the left margin.
13444  It is possible to write any number of letters in one file.
13445  An 
13446 \family sans
13447 Opening
13448 \family default
13449  type produces a new letter using the same addressee and a 
13450 \family sans
13451 Letter
13452 \family default
13453  type produces a new addressee.
13454  The types 
13455 \family sans
13456 Closing
13457 \family default
13458
13459 \family sans
13460 PS
13461 \family default
13462
13463 \family sans
13464 CC
13465 \family default
13466 , and 
13467 \family sans
13468 Encl
13469 \family default
13470  are ordinary paragraph types and can also be used several times in one
13471  and the same letter.
13472 \end_layout
13473
13474 \begin_layout Itemize
13475
13476 \family sans
13477 Letter
13478 \family default
13479 : produces a paragraph for the addressee and implicitly defines the beginning
13480  of the letter.
13481 \end_layout
13482
13483 \begin_layout Itemize
13484
13485 \family sans
13486 Opening
13487 \family default
13488 : produces a paragraph for the form of address and implicitly produces a
13489  new letter.
13490 \end_layout
13491
13492 \begin_layout Itemize
13493
13494 \family sans
13495 Closing
13496 \family default
13497 : produces a paragraph for a close.
13498 \end_layout
13499
13500 \begin_layout Itemize
13501
13502 \family sans
13503 PS
13504 \family default
13505 : produces a paragraph for a postscript.
13506 \end_layout
13507
13508 \begin_layout Itemize
13509
13510 \family sans
13511 CC
13512 \family default
13513 : produces a paragraph for a distribution list.
13514 \end_layout
13515
13516 \begin_layout Itemize
13517
13518 \family sans
13519 Encl
13520 \family default
13521 : produces a paragraph for enclosures.
13522 \end_layout
13523
13524 \begin_layout Standard
13525 The types 
13526 \family sans
13527 Name
13528 \family default
13529
13530 \family sans
13531 Signature
13532 \family default
13533
13534 \family sans
13535 Address
13536 \family default
13537
13538 \family sans
13539 Telephone
13540 \family default
13541
13542 \family sans
13543 Place
13544 \family default
13545
13546 \family sans
13547 Backaddress
13548 \family default
13549
13550 \family sans
13551 Specialmail
13552 \family default
13553
13554 \family sans
13555 Location
13556 \family default
13557
13558 \family sans
13559 Title
13560 \family default
13561 , and 
13562 \family sans
13563 Subject
13564 \family default
13565  are input types provided with a label to enter information, which will
13566  be processed by the document class.
13567 \begin_inset Foot
13568 status open
13569
13570 \begin_layout Plain Layout
13571 It could be seen as a matter of inconsequence, that the types 
13572 \family sans
13573 Letter
13574 \family default
13575  and 
13576 \family sans
13577 Opening
13578 \family default
13579  described above are not such input types as well.
13580  Because of the special meaning of those types, however, I have implemented
13581  them as ordinary paragraph types with a one letter mark in the left margin.
13582  Moreover, it would affect my feeling of symmetry, if the 
13583 \family sans
13584 Opening
13585 \family default
13586  type and the 
13587 \family sans
13588 Closing
13589 \family default
13590  type had such a serious different appearance.
13591 \end_layout
13592
13593 \end_inset
13594
13595  The types must be used ahead of the corresponding 
13596 \family sans
13597 Opening
13598 \family default
13599  type.
13600 \end_layout
13601
13602 \begin_layout Standard
13603 An implementation of these types in a WYSIWYG fashion does not seem to make
13604  sense, because the real appearance of the produced letter does not only
13605  depend on the usage of the particular type, but also on other factors.
13606  For example, a signature entered in the 
13607 \family sans
13608 Signature
13609 \family default
13610  type will in the standard behavior appear in the produced letter only,
13611  when in the same letter also a 
13612 \family sans
13613 Closing
13614 \family default
13615  type is used.
13616  The entered value of the 
13617 \family sans
13618 Telephone
13619 \family default
13620  type will in the standard behavior not appear in the produced letter at
13621  all.
13622  The possibility to design the letter`s heading freely is already indicated
13623  in a footnote above.
13624 \end_layout
13625
13626 \begin_layout Standard
13627 The input types can also be used as empty paragraphs.
13628  This makes sense e.
13629 \begin_inset space \thinspace{}
13630 \end_inset
13631
13632 g.
13633 \begin_inset space \space{}
13634 \end_inset
13635
13636 for the 
13637 \family sans
13638 Signature
13639 \family default
13640  type.
13641  If the 
13642 \family sans
13643 Signature
13644 \family default
13645  type is not used at all, in the standard behavior the value of the 
13646 \family sans
13647 Name
13648 \family default
13649  type is used as signature, whereas if an empty 
13650 \family sans
13651 Signature
13652 \family default
13653  type is used, no signature value is defined.
13654 \end_layout
13655
13656 \begin_layout Standard
13657 By using the input types it is possible to write a letter template, containing
13658  filled input types with your personal dates (name, address, etc.) and empty
13659  input types for other dates you want to enter.
13660 \end_layout
13661
13662 \begin_layout Itemize
13663
13664 \family sans
13665 Name
13666 \family default
13667 : sender's name, in the standard behavior appears as a centered paragraph
13668  in small caps in the letter`s heading.
13669 \end_layout
13670
13671 \begin_layout Itemize
13672
13673 \family sans
13674 Signature
13675 \family default
13676 : sender's signature, in the standard behavior appears below the 
13677 \family sans
13678 Closing
13679 \family default
13680  type.
13681  If no 
13682 \family sans
13683 Signature
13684 \family default
13685  type is used, the value of the 
13686 \family sans
13687 Name
13688 \family default
13689  type appears instead.
13690 \end_layout
13691
13692 \begin_layout Itemize
13693
13694 \family sans
13695 Address
13696 \family default
13697 : sender's address, in the standard behavior appears in a centered paragraph
13698  in the letter`s heading below the sender's name.
13699 \end_layout
13700
13701 \begin_layout Itemize
13702
13703 \family sans
13704 Telephone
13705 \family default
13706 : sender's telephone number, in the standard behavior only sets the LaTeX
13707  variable 
13708 \family typewriter
13709
13710 \backslash
13711 telephonenum
13712 \family default
13713 .
13714 \end_layout
13715
13716 \begin_layout Itemize
13717
13718 \family sans
13719 Place
13720 \family default
13721 : place of the letter`s making.
13722 \end_layout
13723
13724 \begin_layout Itemize
13725
13726 \family sans
13727 Date
13728 \family default
13729 : date of the letter`s making.
13730  
13731 \family sans
13732 Place
13733 \family default
13734  and 
13735 \family sans
13736 Date
13737 \family default
13738 , in the standard behavior, produce the place and the date in a right-aligned
13739  line below the addressee's field.
13740  If an empty 
13741 \family sans
13742 Date
13743 \family default
13744  type is used, neither place nor date appear, independent of the value of
13745  the 
13746 \family sans
13747 Place
13748 \family default
13749  type.
13750  If no 
13751 \family sans
13752 Date
13753 \family default
13754  type is used, the date of the letter `s production is used.
13755 \end_layout
13756
13757 \begin_layout Itemize
13758
13759 \family sans
13760 Backaddress
13761 \family default
13762 : sender`s back address, in the standard behavior appears above the addressee's
13763  field in a small sans serif font.
13764 \end_layout
13765
13766 \begin_layout Itemize
13767
13768 \family sans
13769 Specialmail
13770 \family default
13771 : special mail information, in the standard behavior appears underlined
13772  above the addressee's field below the back address.
13773 \end_layout
13774
13775 \begin_layout Itemize
13776
13777 \family sans
13778 Location
13779 \family default
13780 : additional information, in the standard behavior appears on right side
13781  below the addressee`s field.
13782 \end_layout
13783
13784 \begin_layout Itemize
13785
13786 \family sans
13787 Title
13788 \family default
13789 : the letter's title, in the standard behavior appears in a big, bold, sans
13790  serif font above the subject.
13791 \end_layout
13792
13793 \begin_layout Itemize
13794
13795 \family sans
13796 Subject
13797 \family default
13798 : the letter's subject, in the standard behavior appears in a bold font
13799  above the 
13800 \family sans
13801 Opening
13802 \family default
13803  paragraph.
13804 \end_layout
13805
13806 \begin_layout Standard
13807 The types 
13808 \family sans
13809 Yourref
13810 \family default
13811
13812 \family sans
13813 Yourmail
13814 \family default
13815
13816 \family sans
13817 Myref
13818 \family default
13819
13820 \family sans
13821 Customer
13822 \family default
13823 , and 
13824 \family sans
13825 Invoice
13826 \family default
13827  produce a business letter like line above the 
13828 \family sans
13829 Title
13830 \family default
13831  line containing the fields 
13832 \begin_inset Quotes eld
13833 \end_inset
13834
13835 Your ref.
13836 \begin_inset Quotes erd
13837 \end_inset
13838
13839
13840 \begin_inset Quotes eld
13841 \end_inset
13842
13843 Your letter of
13844 \begin_inset Quotes erd
13845 \end_inset
13846
13847
13848 \begin_inset Quotes eld
13849 \end_inset
13850
13851 Our ref.
13852 \begin_inset Quotes erd
13853 \end_inset
13854
13855
13856 \begin_inset Quotes eld
13857 \end_inset
13858
13859 Customer no.
13860 \begin_inset Quotes erd
13861 \end_inset
13862
13863
13864 \begin_inset Quotes eld
13865 \end_inset
13866
13867 Invoice no.
13868 \begin_inset Quotes erd
13869 \end_inset
13870
13871 , and 
13872 \begin_inset Quotes eld
13873 \end_inset
13874
13875 Date
13876 \begin_inset Quotes erd
13877 \end_inset
13878
13879 .
13880  For the date field, the value of the 
13881 \family sans
13882 Date
13883 \family default
13884  type is used.
13885  If one of these 
13886 \begin_inset Quotes eld
13887 \end_inset
13888
13889 business letter types
13890 \begin_inset Quotes erd
13891 \end_inset
13892
13893  is used, the value of the 
13894 \family sans
13895 Place
13896 \family default
13897  type however does not appear, but only the LaTeX variable 
13898 \family typewriter
13899
13900 \backslash
13901 fromplace
13902 \family default
13903  is set.
13904  The ordinary output of place and date in a right-aligned line below the
13905  addressee`s field is suppressed.
13906  The types are implemented as input types provided with a label and must
13907  be used ahead of the corresponding 
13908 \family sans
13909 Opening
13910 \family default
13911  type.
13912 \end_layout
13913
13914 \begin_layout Itemize
13915
13916 \family sans
13917 Yourref
13918 \family default
13919 : Your ref.
13920 \end_layout
13921
13922 \begin_layout Itemize
13923
13924 \family sans
13925 Yourmail
13926 \family default
13927 : Your letter of.
13928 \end_layout
13929
13930 \begin_layout Itemize
13931
13932 \family sans
13933 Myref
13934 \family default
13935 : Our ref.
13936 \end_layout
13937
13938 \begin_layout Itemize
13939
13940 \family sans
13941 Customer
13942 \family default
13943 : Customer no.
13944 \end_layout
13945
13946 \begin_layout Itemize
13947
13948 \family sans
13949 Invoice
13950 \family default
13951 : Invoice no.
13952 \end_layout
13953
13954 \begin_layout Subsection
13955 The new letter class: letter (koma-script v.2)
13956 \end_layout
13957
13958 \begin_layout Standard
13959 by 
13960 \noun on
13961 Jürgen Spitzmüller
13962 \end_layout
13963
13964 \begin_layout Standard
13965 \begin_inset VSpace medskip
13966 \end_inset
13967
13968
13969 \end_layout
13970
13971 \begin_layout Standard
13972 \noindent
13973 Koma-Script version 2.8 has introduced a new letter class 
13974 \family typewriter
13975 scrlttr2
13976 \family default
13977  which supersedes the now unsupported 
13978 \family typewriter
13979 scrlettr
13980 \family default
13981 .
13982  It has — on the LaTeX side — a completely new interface and is not compatible
13983  with the old class.
13984  Therefore, LyX supports both, though it is recommended to use the new class.
13985 \end_layout
13986
13987 \begin_layout Standard
13988 This class covers the same functionality as 
13989 \emph on
13990 letter (koma-script),
13991 \emph default
13992  and a few more.
13993  The basic items are 
13994 \family sans
13995 Address
13996 \family default
13997  (receiver's address, same as 
13998 \family sans
13999 Letter
14000 \family default
14001  in the old layout), 
14002 \family sans
14003 Opening
14004 \family default
14005 , and 
14006 \family sans
14007 Closing
14008 \family default
14009 .
14010  
14011 \family sans
14012 NextAddress
14013 \family default
14014  will start a new letter (i.
14015 \begin_inset space \thinspace{}
14016 \end_inset
14017
14018 g.
14019 \begin_inset space \space{}
14020 \end_inset
14021
14022 you can write several letters per document).
14023  New elements are sender's 
14024 \family sans
14025 E-Mail
14026 \family default
14027
14028 \family sans
14029 URL
14030 \family default
14031
14032 \family sans
14033 Fax
14034 \family default
14035
14036 \family sans
14037 Bank
14038 \family default
14039  and the possibility to use a 
14040 \family sans
14041 Logo
14042 \family default
14043  (via 
14044 \family sans
14045 Insert\SpecialChar \menuseparator
14046 Graphics
14047 \family default
14048 ) in the header.
14049 \end_layout
14050
14051 \begin_layout Standard
14052 The biggest improvement is, though, that the letter's layout is configurable
14053  at almost any needs.
14054  This can be done via the preamble or with a special style file (Letter
14055  Class Option, extension 
14056 \family typewriter
14057 *.lco
14058 \family default
14059 ), that will be read in as a class option.
14060 \begin_inset Foot
14061 status collapsed
14062
14063 \begin_layout Plain Layout
14064 The KOMA package comes with some default 
14065 \family typewriter
14066 *.lco
14067 \family default
14068  files.
14069  There is, for instance, a 
14070 \family typewriter
14071 DIN.lco
14072 \family default
14073  file that follows german typesetting rules, or a 
14074 \family typewriter
14075 KOMAold.lco
14076 \family default
14077  that provides the default layout of the old 
14078 \family typewriter
14079 scrlettr
14080 \family default
14081  class.
14082  The latter can be loaded with the class option 
14083 \family typewriter
14084 KOMAold
14085 \family default
14086 , inserted via the 
14087 \family sans
14088 \bar under
14089 L
14090 \bar default
14091 ayout\SpecialChar \menuseparator
14092
14093 \bar under
14094 D
14095 \bar default
14096 ocument\SpecialChar \menuseparator
14097 Extra Options
14098 \family default
14099  field.
14100 \end_layout
14101
14102 \end_inset
14103
14104  Have a look at the 
14105 \emph on
14106 koma-letter2
14107 \emph default
14108  template that is included in LyX for examples.
14109  A detailed description is to be found in the Koma-Script documentation
14110  (
14111 \emph on
14112 scrguide
14113 \emph default
14114 ).
14115 \end_layout
14116
14117 \begin_layout Subsection
14118 Problems
14119 \end_layout
14120
14121 \begin_layout Standard
14122 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14123  some problems.
14124 \end_layout
14125
14126 \begin_layout Itemize
14127 The chapter number of a 
14128 \family sans
14129 Chapter
14130 \family default
14131  type appears on a line of its own above the chapter heading instead of
14132  appearing in the same line ahead of it.
14133  The cause for that is the LyX internal behavior for the labeltype 
14134 \family sans
14135 Counter_Chapter
14136 \family default
14137  in the layout file.
14138 \end_layout
14139
14140 \begin_layout Itemize
14141 The headings of the types 
14142 \family sans
14143 Addchap
14144 \family default
14145  and 
14146 \family sans
14147 Addsec
14148 \family default
14149  are only put in the 
14150 \begin_inset Quotes eld
14151 \end_inset
14152
14153 true
14154 \begin_inset Quotes erd
14155 \end_inset
14156
14157  LaTeX table of contents, but not in the LyX table of contents (
14158 \family sans
14159 Document\SpecialChar \menuseparator
14160 Table
14161 \begin_inset space ~
14162 \end_inset
14163
14164 of
14165 \begin_inset space ~
14166 \end_inset
14167
14168 Contents
14169 \family default
14170 ).
14171 \end_layout
14172
14173 \begin_layout Itemize
14174 The paragraphs in a 
14175 \emph on
14176 letter
14177 \emph default
14178  document class appear in a skip separation mode, not indented.
14179  This is the standard behavior, no special LaTeX commands are needed for
14180  that.
14181  But in the 
14182 \family sans
14183 Document\SpecialChar \menuseparator
14184 Settings
14185 \family default
14186  dialog the corresponding radio button indicates 
14187 \family sans
14188 Indent
14189 \family default
14190 .
14191  A 
14192 \family sans
14193 Skip
14194 \family default
14195  value always has the effect that extra LaTeX commands are inserted in the
14196  document to produce the gap, which is not what is wanted in this case.
14197 \end_layout
14198
14199 \begin_layout Section
14200 Latex8 (IEEE Conference Papers)
14201 \end_layout
14202
14203 \begin_layout Standard
14204 by 
14205 \noun on
14206 Allan Rae
14207 \end_layout
14208
14209 \begin_layout Subsection
14210 Introduction
14211 \end_layout
14212
14213 \begin_layout Standard
14214 Since this class is specifically for writing submissions to IEEE sponsored
14215  conferences I strongly recommend that you get a copy of their Authors Kit.
14216  The 
14217 \family sans
14218 latex.sty
14219 \family default
14220  package and associated bibliography style file is included in the kit.
14221  The Authors Kit is usually sent out by email once your initial submission
14222  has been accepted.
14223  There is a lot of useful information in the Authors Kit explaining formatting
14224  restrictions and so on and I will assume you have read this since that
14225  means I don't have to repeat it all here.
14226 \end_layout
14227
14228 \begin_layout Subsection
14229 Getting Started
14230 \end_layout
14231
14232 \begin_layout Standard
14233 [AR\SpecialChar \@.
14234  more to come]
14235 \end_layout
14236
14237 \begin_layout Subsection
14238 Supported Environments
14239 \end_layout
14240
14241 \begin_layout Itemize
14242
14243 \family sans
14244 Standard
14245 \end_layout
14246
14247 \begin_layout Itemize
14248
14249 \family sans
14250 Title
14251 \end_layout
14252
14253 \begin_layout Itemize
14254
14255 \family sans
14256 Author
14257 \end_layout
14258
14259 \begin_layout Itemize
14260
14261 \family sans
14262 E-mail
14263 \end_layout
14264
14265 \begin_layout Itemize
14266
14267 \family sans
14268 Affiliation
14269 \end_layout
14270
14271 \begin_layout Itemize
14272
14273 \family sans
14274 Abstract
14275 \end_layout
14276
14277 \begin_layout Itemize
14278
14279 \family sans
14280 Section
14281 \end_layout
14282
14283 \begin_layout Itemize
14284
14285 \family sans
14286 SubSection
14287 \end_layout
14288
14289 \begin_layout Itemize
14290
14291 \family sans
14292 Caption
14293 \end_layout
14294
14295 \begin_layout Subsection
14296 Differences Between Screen and Paper
14297 \end_layout
14298
14299 \begin_layout Standard
14300 There are slight differences in appearance mainly with the presentation
14301  of section counters.
14302  On screen the trailing period of the section counter is missing but it
14303  will appear in the output so don't let this worry you.
14304 \end_layout
14305
14306 \begin_layout Section
14307 Memoir
14308 \end_layout
14309
14310 \begin_layout Standard
14311 By 
14312 \noun on
14313 Jürgen Spitzmüller
14314 \end_layout
14315
14316 \begin_layout Subsection
14317 Overview
14318 \end_layout
14319
14320 \begin_layout Standard
14321 Memoir is a very powerful and constantly evolving class.
14322  It has been designed with regard to fictional and non-fictional literature.
14323  Its aim is to let the user have maximum control over the typesetting of
14324  his document.
14325  Memoir is based on the standard book class, but it can also emulate the
14326  article class (see below).
14327 \end_layout
14328
14329 \begin_layout Standard
14330 Peter Wilson, the developer of Memoir, is known as the author of lots of
14331  useful packages in the LaTeX world.
14332  Most of them have been merged with Memoir.
14333  Therefore, it is much easier to layout the table of contents, appendices,
14334  chapter designs and such.
14335  LyX, though, does not support all of these goodies natively.
14336  Some of them might be added to forthcoming releases
14337 \begin_inset Foot
14338 status collapsed
14339
14340 \begin_layout Plain Layout
14341 You are invited to send suggestions to 
14342 \begin_inset Flex URL
14343 status collapsed
14344
14345 \begin_layout Plain Layout
14346
14347 lyx-devel@lists.lyx.org
14348 \end_layout
14349
14350 \end_inset
14351
14352 .
14353 \end_layout
14354
14355 \end_inset
14356
14357 , lots will probably never, due to the limitations of LyX's framework.
14358  Of course you can still use all features with the help of some native LaTeX
14359  commands (TeX code
14360 \begin_inset Foot
14361 status collapsed
14362
14363 \begin_layout Plain Layout
14364 Cf.
14365 \begin_inset ERT
14366 status collapsed
14367
14368 \begin_layout Plain Layout
14369
14370
14371 \backslash
14372  
14373 \end_layout
14374
14375 \end_inset
14376
14377 section
14378 \begin_inset space ~
14379 \end_inset
14380
14381
14382 \begin_inset CommandInset ref
14383 LatexCommand ref
14384 reference "sec:Inserting-TeX-Code"
14385
14386 \end_inset
14387
14388  for details.
14389 \end_layout
14390
14391 \end_inset
14392
14393 ).
14394  In this section, we can only list those features which are natively supported
14395  by LyX.
14396  For detailed descriptions (and for the rest of features) we are recommending
14397  to have a look at the detailed manual of the Memoir class
14398 \begin_inset Foot
14399 status collapsed
14400
14401 \begin_layout Plain Layout
14402 Cf.
14403 \begin_inset ERT
14404 status collapsed
14405
14406 \begin_layout Plain Layout
14407
14408
14409 \backslash
14410  
14411 \end_layout
14412
14413 \end_inset
14414
14415
14416 \begin_inset Flex URL
14417 status collapsed
14418
14419 \begin_layout Plain Layout
14420
14421 CTAN:/macros/latex/memoir/memman.pdf
14422 \end_layout
14423
14424 \end_inset
14425
14426 .
14427 \end_layout
14428
14429 \end_inset
14430
14431 , which is not only a user guide for the class, but also both a comprehensive
14432  description on good typesetting and a superb example for good typesetting
14433  itself.
14434 \end_layout
14435
14436 \begin_layout Subsection
14437 Basic features and restrictions
14438 \end_layout
14439
14440 \begin_layout Standard
14441 Memoir supports basically all features of the standard book classes.
14442  There are, however, some differences, as follows:
14443 \end_layout
14444
14445 \begin_layout Description
14446 Font
14447 \begin_inset space ~
14448 \end_inset
14449
14450 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14451 \end_layout
14452
14453 \begin_layout Description
14454 Page
14455 \begin_inset space ~
14456 \end_inset
14457
14458 style: The fancy page style is not supported, due to a command clash between
14459  Memoir and the fancyhdr package (they are both defining a command with
14460  the same name, which confuses LaTeX).
14461  Instead, Memoir comes with a bunch of own page styles (see 
14462 \family sans
14463 Layout\SpecialChar \menuseparator
14464 Document\SpecialChar \menuseparator
14465 Page
14466 \begin_inset space ~
14467 \end_inset
14468
14469 Style
14470 \family default
14471 ).
14472  If you want to use these for the chapter pages, you have to use the command
14473  
14474 \family typewriter
14475
14476 \backslash
14477 chapterstyle
14478 \family default
14479  in the main text or in preamble (e.
14480 \begin_inset space \thinspace{}
14481 \end_inset
14482
14483 g.
14484 \begin_inset space \space{}
14485 \end_inset
14486
14487
14488 \family typewriter
14489
14490 \backslash
14491 chapterstyle{companion}
14492 \family default
14493 ).
14494 \end_layout
14495
14496 \begin_layout Description
14497 Sectioning: Sectionings (chapter, section, subsection etc.) are coming with
14498  an optional argument in the standard classes.
14499  With this, you can specify an alternative version of the title for the
14500  table of contents and the headers (for instance, if the title is too long).
14501  In LyX, you can do this via 
14502 \family sans
14503 Insert\SpecialChar \menuseparator
14504 Short
14505 \begin_inset space ~
14506 \end_inset
14507
14508 Title
14509 \family default
14510  at the beginning of a chapter/section.
14511  Memoir features a second optional argument and thus separates the table
14512  of contents from the header.
14513  You can define three variants of a title with this: one for the main text,
14514  one for the table of contents, and one for the headers.
14515  Simply insert two optional arguments if you need this feature, the first
14516  one containing the short title for the Table of Contents, the second one
14517  containing an alternative short title for the headers.
14518 \end_layout
14519
14520 \begin_layout Description
14521 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14522  of contents, the list of figures and the list of table start a new page
14523  automatically.
14524  Memoir does not follow this route.
14525  You have to insert a page break yourself, if you want to have one.
14526 \end_layout
14527
14528 \begin_layout Description
14529 Titlepage: For some unknown reason, Memoir uses pagination on the title
14530  page (in the standard classes, title pages are 
14531 \begin_inset Quotes eld
14532 \end_inset
14533
14534 empty
14535 \begin_inset Quotes erd
14536 \end_inset
14537
14538 , i.
14539 \begin_inset space \thinspace{}
14540 \end_inset
14541
14542 g.
14543 \begin_inset space \space{}
14544 \end_inset
14545
14546 without pagina).
14547  If you want an empty title page, type 
14548 \family typewriter
14549
14550 \backslash
14551 aliaspagestyle{title}{empty}
14552 \family default
14553  in the preamble.
14554 \end_layout
14555
14556 \begin_layout Description
14557 Article: With the class option 
14558 \emph on
14559 article
14560 \emph default
14561  (to be inserted in 
14562 \family sans
14563 Layout\SpecialChar \menuseparator
14564 Document\SpecialChar \menuseparator
14565 Extra
14566 \begin_inset space ~
14567 \end_inset
14568
14569 Options
14570 \family default
14571 ), you can emulate article style.
14572  That is, counters (footnotes, figures, tables etc.) will not be reset on
14573  new chapters, chapters don't start a new page (but are—in contrary to 
14574 \begin_inset Quotes eld
14575 \end_inset
14576
14577 real
14578 \begin_inset Quotes erd
14579 \end_inset
14580
14581  article classes—still allowed), parts, though, use their own page, as in
14582  book.
14583 \end_layout
14584
14585 \begin_layout Description
14586 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14587  font commands, which have been used in the old LaTeX version 2.09 (e.
14588 \begin_inset space \thinspace{}
14589 \end_inset
14590
14591 g.
14592 \begin_inset space \space{}
14593 \end_inset
14594
14595
14596 \family typewriter
14597
14598 \backslash
14599 rm
14600 \family default
14601
14602 \family typewriter
14603
14604 \backslash
14605 it
14606 \family default
14607 ).
14608  It produces an error and stops LaTeX whenever such a command appears.
14609  The class option 
14610 \emph on
14611 oldfontcommands
14612 \emph default
14613  reallows the commands and spits out warnings instead (which does at least
14614  not stop LaTeX).
14615  Since a lot of packages and particularly BibTeX style files are still using
14616  those commands, we have decided to use this option by default.
14617 \end_layout
14618
14619 \begin_layout Subsection
14620 Extra features
14621 \end_layout
14622
14623 \begin_layout Standard
14624 We will only describe the features supported by LyX (which is not much currently
14625 ).
14626  Please consult the Memoir manual
14627 \begin_inset Foot
14628 status collapsed
14629
14630 \begin_layout Plain Layout
14631 Cf.
14632 \begin_inset ERT
14633 status collapsed
14634
14635 \begin_layout Plain Layout
14636
14637
14638 \backslash
14639  
14640 \end_layout
14641
14642 \end_inset
14643
14644
14645 \begin_inset Flex URL
14646 status collapsed
14647
14648 \begin_layout Plain Layout
14649
14650 CTAN:/macros/latex/memoir/memman.pdf
14651 \end_layout
14652
14653 \end_inset
14654
14655 .
14656 \end_layout
14657
14658 \end_inset
14659
14660  for details.
14661 \end_layout
14662
14663 \begin_layout Description
14664 Abstract: You may wonder why an abstract is an extra feature.
14665  Well, it is in book class.
14666  Usually books don't have abstracts.
14667  Memoir, however, has.
14668  You can use it wherever and how often you like.
14669 \end_layout
14670
14671 \begin_layout Description
14672 Chapterprecis: You may know this from belletristic: The contents of a chapter
14673  is shortly described below the title and also in the table of contents
14674  (e.
14675 \begin_inset space \thinspace{}
14676 \end_inset
14677
14678 g.
14679 \begin_inset space \space{}
14680 \end_inset
14681
14682
14683 \emph on
14684 Our hero arrives in Troia; he loses some friends; he finds others
14685 \emph default
14686 ).
14687  Chapterprecis does exactly this.
14688  It is therefore only sensible below a chapter.
14689 \end_layout
14690
14691 \begin_layout Description
14692 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14693  The epigraph environment provides an elegant way of typesetting such a
14694  motto.
14695  The motto itself (text) and its author (source) are divided by a short
14696  line.
14697  Unfortunately, we have to fool LyX a bit here again, since the environment
14698  needs two arguments (text and source).
14699  In this case, we have to use curly brackets (in TeX mode) between the two
14700  arguments: 
14701 \emph on
14702 <smart slogan>
14703 \emph default
14704  
14705 \family typewriter
14706 }{
14707 \family default
14708  
14709 \emph on
14710 <author of the slogan>.
14711 \end_layout
14712
14713 \begin_layout Description
14714 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14715  complex figurative poems).
14716  LyX can only support a few of them.
14717  One is poemtitle, which is a centered title for poems, which will also
14718  be added to the table of contents (verse is the standard environment for
14719  poems.
14720  Memoir has some enhanced versions of verse, but you need to use TeX code,
14721  because they have to be nested inside regular verse environments, which
14722  is not possible with LyX).
14723 \end_layout
14724
14725 \begin_layout Description
14726 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14727 \end_layout
14728
14729 \begin_layout Section
14730 Article (mwart), book (mwbk) and report (mwrep)
14731 \begin_inset OptArg
14732 status collapsed
14733
14734 \begin_layout Plain Layout
14735 The 
14736 \family typewriter
14737 mw
14738 \family default
14739  Classes
14740 \end_layout
14741
14742 \end_inset
14743
14744
14745 \end_layout
14746
14747 \begin_layout Standard
14748 by 
14749 \noun on
14750 Tomasz Luczak
14751 \end_layout
14752
14753 \begin_layout Standard
14754 The LyX document classes 
14755 \emph on
14756 article (mwart)
14757 \emph default
14758
14759 \emph on
14760 report (mwrep)
14761 \emph default
14762  and 
14763 \emph on
14764 book
14765 \emph default
14766  
14767 \emph on
14768 (mwbk)
14769 \emph default
14770  correspond to the LaTeX document classes 
14771 \family typewriter
14772 mwart.cls
14773 \family default
14774
14775 \family typewriter
14776 mwrep.cls
14777 \family default
14778  and 
14779 \family typewriter
14780 mwbk.cls
14781 \family default
14782 , resp.
14783  They are replacements for the standard document classes 
14784 \family typewriter
14785 article.cls
14786 \family default
14787
14788 \family typewriter
14789 report.cls
14790 \family default
14791  and 
14792 \family typewriter
14793 book.cls
14794 \family default
14795 , resp., and fit better to Polish typography conventions in a number of points.
14796  
14797 \end_layout
14798
14799 \begin_layout Standard
14800 Basic differences:
14801 \end_layout
14802
14803 \begin_layout Itemize
14804 Unnumbered titles (with star, e.
14805 \begin_inset space \thinspace{}
14806 \end_inset
14807
14808 g.
14809 \begin_inset space \space{}
14810 \end_inset
14811
14812
14813 \family sans
14814 Section*
14815 \family default
14816 ) are added into table of contents,
14817 \end_layout
14818
14819 \begin_layout Itemize
14820 Additional page styles:
14821 \end_layout
14822
14823 \begin_deeper
14824 \begin_layout Description
14825 uheadings header with separated lines,
14826 \end_layout
14827
14828 \begin_layout Description
14829 myheadings custom header, contents headers via commands: 
14830 \family typewriter
14831
14832 \backslash
14833 markright
14834 \family default
14835  and 
14836 \family typewriter
14837
14838 \backslash
14839 markboth
14840 \family default
14841 ,
14842 \end_layout
14843
14844 \begin_layout Description
14845 myuheadings custom header with separated lines,
14846 \end_layout
14847
14848 \begin_layout Description
14849 outer page number is placed on outer side of page
14850 \end_layout
14851
14852 \end_deeper
14853 \begin_layout Itemize
14854 Options 
14855 \end_layout
14856
14857 \begin_deeper
14858 \begin_layout Description
14859 rmheadings serif titles — default,
14860 \end_layout
14861
14862 \begin_layout Description
14863 sfheadings sansserif titles,
14864 \end_layout
14865
14866 \begin_layout Description
14867 authortitle on title page first placed is author next title — default,
14868 \end_layout
14869
14870 \begin_layout Description
14871 titleauthor on title page first placed is title next author,
14872 \end_layout
14873
14874 \begin_layout Description
14875 withmarginpar reserve place on page for margins.
14876 \end_layout
14877
14878 \end_deeper
14879 \begin_layout Section
14880 Paper
14881 \end_layout
14882
14883 \begin_layout Standard
14884 The document class 
14885 \family sans
14886 paper
14887 \family default
14888  provides an alternative to the standard 
14889 \family sans
14890 article
14891 \family default
14892  class.
14893  It provides similar functionality, but you might prefer this layout with
14894  sans serif sections, headings, and more.
14895 \end_layout
14896
14897 \begin_layout Section
14898 RevTeX4
14899 \end_layout
14900
14901 \begin_layout Standard
14902 by 
14903 \noun on
14904 Amir Karger
14905 \end_layout
14906
14907 \begin_layout Standard
14908 \begin_inset VSpace bigskip
14909 \end_inset
14910
14911
14912 \end_layout
14913
14914 \begin_layout Standard
14915 \noindent
14916 The 
14917 \family sans
14918 Revtex
14919 \begin_inset space ~
14920 \end_inset
14921
14922 4
14923 \family default
14924  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
14925 \begin_inset Formula $\beta$
14926 \end_inset
14927
14928  release of May, 1999) class.
14929 \end_layout
14930
14931 \begin_layout Standard
14932 LyX has a 
14933 \family sans
14934 Revtex
14935 \family default
14936  textclass, which works with RevTeX 3.1.
14937  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
14938  That means that it doesn't interact very well with LyX, which requires
14939  LaTeX2e, although it has been kludged to work.
14940  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
14941  LyX with the 
14942 \family sans
14943 RevTeX
14944 \begin_inset space ~
14945 \end_inset
14946
14947 4
14948 \family default
14949  textclass should also be pretty easy to use.
14950 \end_layout
14951
14952 \begin_layout Standard
14953 These documents are supposed to be used in 
14954 \emph on
14955 addition
14956 \emph default
14957  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
14958  macros, and assume you'll know what to put in the preamble if necessary.
14959 \end_layout
14960
14961 \begin_layout Subsection
14962 Installation
14963 \end_layout
14964
14965 \begin_layout Standard
14966 All you need to do is install RevTeX 4, as described in the package's README
14967  file.
14968  The package can be found at The RevTeX 4 Web Site 
14969 \begin_inset Flex URL
14970 status collapsed
14971
14972 \begin_layout Plain Layout
14973
14974 http://publish.aps.org/revtex4/
14975 \end_layout
14976
14977 \end_inset
14978
14979 .
14980  Install it somewhere that LaTeX can see it.
14981  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
14982  (i.
14983 \begin_inset space \thinspace{}
14984 \end_inset
14985
14986 g.
14987 \begin_inset space \space{}
14988 \end_inset
14989
14990 not the directory where you installed the class file.) Then, if you reconfigure
14991  LyX, it will find the class file and let you use the RevTeX4 textclass.
14992 \end_layout
14993
14994 \begin_layout Standard
14995 Probably the easiest way to get started is either to import a RevTeX 4 document
14996  using 
14997 \family typewriter
14998 tex2lyx
14999 \family default
15000 , or to use the 
15001 \family sans
15002 Revtex
15003 \begin_inset space ~
15004 \end_inset
15005
15006 4
15007 \family default
15008  template, found in the templates directory.
15009 \end_layout
15010
15011 \begin_layout Subsection
15012 Preamble Matter
15013 \end_layout
15014
15015 \begin_layout Standard
15016 Optional arguments to 
15017 \family typewriter
15018
15019 \backslash
15020 documentclass
15021 \family default
15022 , like 
15023 \begin_inset Quotes eld
15024 \end_inset
15025
15026 preprint
15027 \begin_inset Quotes erd
15028 \end_inset
15029
15030  and 
15031 \begin_inset Quotes eld
15032 \end_inset
15033
15034 aps
15035 \begin_inset Quotes erd
15036 \end_inset
15037
15038 , go in the 
15039 \family sans
15040 E
15041 \bar under
15042 x
15043 \bar default
15044 tra
15045 \begin_inset space ~
15046 \end_inset
15047
15048 Options
15049 \family default
15050  field in the 
15051 \family sans
15052 Document
15053 \begin_inset space ~
15054 \end_inset
15055
15056 Layout
15057 \family default
15058  dialog, as usual.
15059  Remember that in RevTeX, at least one optional argument is required! 
15060 \end_layout
15061
15062 \begin_layout Standard
15063 Other preamble matter, like 
15064 \family typewriter
15065
15066 \backslash
15067 draft
15068 \family default
15069  etc.
15070 \begin_inset space ~
15071 \end_inset
15072
15073 goes in the 
15074 \family sans
15075 LaTeX
15076 \begin_inset space ~
15077 \end_inset
15078
15079 Preamble
15080 \family default
15081  dialog, also as usual.
15082 \end_layout
15083
15084 \begin_layout Subsection
15085 Layouts
15086 \end_layout
15087
15088 \begin_layout Standard
15089 The layouts basically correspond to the commands in RevTeX4.0.
15090  For example, the Email layout corresponds to 
15091 \family typewriter
15092
15093 \backslash
15094 email{}
15095 \family default
15096 .
15097  Note that (at least as of RevTeX 4.0 Beta), the 
15098 \family sans
15099 Address
15100 \family default
15101  and 
15102 \family sans
15103 Affiliation
15104 \family default
15105  layouts are exactly equivalent, so you shouldn't need to use both.
15106 \begin_inset Foot
15107 status collapsed
15108
15109 \begin_layout Plain Layout
15110 In case you're curious, both were included so that 
15111 \family typewriter
15112 tex2lyx
15113 \family default
15114  would be able to translate both 
15115 \family typewriter
15116
15117 \backslash
15118 address
15119 \family default
15120  and 
15121 \family typewriter
15122
15123 \backslash
15124 affiliation
15125 \family default
15126 .
15127 \end_layout
15128
15129 \end_inset
15130
15131
15132 \end_layout
15133
15134 \begin_layout Subsection
15135 Important Notes
15136 \end_layout
15137
15138 \begin_layout Standard
15139 There are a couple of important unique aspects of RevTeX 4 which might cause
15140  bugs that will be even more confusing in LyX.
15141 \end_layout
15142
15143 \begin_layout Standard
15144 In RevTeX, the 
15145 \family typewriter
15146
15147 \backslash
15148 thanks
15149 \family default
15150  command goes 
15151 \emph on
15152 outside
15153 \emph default
15154  the 
15155 \family typewriter
15156
15157 \backslash
15158 author
15159 \family default
15160  command.
15161  The LyX equivalent is that there is a separate Thanks layout.
15162  Do 
15163 \emph on
15164 not
15165 \emph default
15166  write footnotes in the 
15167 \family sans
15168 Author
15169 \family default
15170  layout, or weird things may happen.
15171  See the RevTeX 4 documentation for more details.
15172 \end_layout
15173
15174 \begin_layout Standard
15175 Also, the 
15176 \family sans
15177 Author
15178 \begin_inset space ~
15179 \end_inset
15180
15181 Email
15182 \family default
15183
15184 \family sans
15185 Author
15186 \begin_inset space ~
15187 \end_inset
15188
15189 URL
15190 \family default
15191 , and 
15192 \family sans
15193 Thanks
15194 \family default
15195  layouts must be placed 
15196 \emph on
15197 in between
15198 \emph default
15199  the 
15200 \family sans
15201 Author
15202 \family default
15203  layout and the corresponding 
15204 \family sans
15205 Address
15206 \family default
15207  (or equivalent 
15208 \family sans
15209 Affiliation
15210 \family default
15211 ) layout.
15212  If you put the 
15213 \family sans
15214 Thanks
15215 \family default
15216  after the 
15217 \family sans
15218 Address
15219 \family default
15220 , the LaTeX won't compile.
15221 \end_layout
15222
15223 \begin_layout Subsection
15224 Drawbacks
15225 \end_layout
15226
15227 \begin_layout Standard
15228 The main problem with this layout is that you can't use the optional arguments
15229  to layouts like Email and Title.
15230  (The problem is not unique to this layout; you can't use optional arguments
15231  to the Section layouts either.) This means that after you export that file
15232  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15233  need to edit the LaTeX file with a text editor to add the optional arguments
15234  to set, e.
15235 \begin_inset space \thinspace{}
15236 \end_inset
15237
15238 g.
15239 \begin_inset space \space{}
15240 \end_inset
15241
15242 the running title for the page headers.
15243  Lacking these layouts makes the 
15244 \family typewriter
15245
15246 \backslash
15247 altaffiliation
15248 \family default
15249  (and the equivalent 
15250 \family typewriter
15251
15252 \backslash
15253 altaddress
15254 \family default
15255 ) useless, so the corresponding layouts don't exist, and will have to be
15256  added by hand.
15257 \begin_inset Foot
15258 status collapsed
15259
15260 \begin_layout Plain Layout
15261
15262 \emph on
15263 Note from JMarc:
15264 \emph default
15265  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15266  has not been updated yet to take advantage of it.
15267 \end_layout
15268
15269 \end_inset
15270
15271  
15272 \end_layout
15273
15274 \begin_layout Section
15275 Springer Journals (
15276 \family sans
15277 svjour
15278 \family default
15279 )
15280 \end_layout
15281
15282 \begin_layout Standard
15283 by 
15284 \noun on
15285 Martin Vermeer
15286 \end_layout
15287
15288 \begin_layout Subsection
15289 Description
15290 \end_layout
15291
15292 \begin_layout Standard
15293 These are the layout files for some of the journal formats used by Springer
15294  Verlag and listed on 
15295 \begin_inset Flex URL
15296 status collapsed
15297
15298 \begin_layout Plain Layout
15299
15300 http://www.springer.de/author/tex/help-journals.html
15301 \end_layout
15302
15303 \end_inset
15304
15305 , where you should also go to fetch the class files (yes, these are LaTeX2e
15306  now!).
15307  It is a modular system: the things common to all journals are implemented
15308  in 
15309 \family typewriter
15310 svjour.inc
15311 \family default
15312 , which journal-specific layout files (such as, e.
15313 \begin_inset space \thinspace{}
15314 \end_inset
15315
15316 g.
15317 \begin_inset space \space{}
15318 \end_inset
15319
15320
15321 \family typewriter
15322 svjog.layout
15323 \family default
15324  for Journal of Geodesy) can include.
15325 \end_layout
15326
15327 \begin_layout Standard
15328 This means that implementing support for any other Springer journal on this
15329  list is as simple as writing your own 
15330 \family typewriter
15331 sv
15332 \family default
15333 <myjournal>
15334 \family typewriter
15335 .layout
15336 \family default
15337  file following the outline given in 
15338 \family typewriter
15339 svjog.layout
15340 \family default
15341 .
15342  
15343 \end_layout
15344
15345 \begin_layout Standard
15346 It is reasonably well tested only for the Journal of Geodesy.
15347  
15348 \family typewriter
15349 svjour
15350 \family default
15351  and 
15352 \family typewriter
15353 svjog
15354 \family default
15355  come with the standard LyX distribution.
15356  Install the relevant class file (downloaded from Springer) in a proper
15357  directory, reconfigure LaTeX (in the teTeX case by running 
15358 \family typewriter
15359 texhash
15360 \family default
15361 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15362  and it should work.
15363 \end_layout
15364
15365 \begin_layout Subsection
15366 New styles
15367 \end_layout
15368
15369 \begin_layout Standard
15370 A large number of theorem-like styles — 
15371 \family sans
15372 Claim, Conjecture,
15373 \family default
15374  
15375 \family sans
15376 \SpecialChar \ldots{}
15377 Theorem
15378 \family default
15379 .
15380 \end_layout
15381
15382 \begin_layout Standard
15383
15384 \family sans
15385 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15386  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15387 \family default
15388 .
15389  See the Springer class file documentation for details.
15390 \end_layout
15391
15392 \begin_layout Subsection
15393 Supported journals
15394 \end_layout
15395
15396 \begin_layout Itemize
15397
15398 \emph on
15399 Journal of Geodesy
15400 \emph default
15401
15402 \family typewriter
15403 svjog.layout
15404 \family default
15405  — Martin Vermeer
15406 \end_layout
15407
15408 \begin_layout Itemize
15409
15410 \emph on
15411 Probability Theory and Related Fields
15412 \emph default
15413
15414 \family typewriter
15415 svprobth.layout
15416 \family default
15417  — Jean-Marc Lasgouttes
15418 \end_layout
15419
15420 \begin_layout Standard
15421 Add your own, it isn't so hard!
15422 \end_layout
15423
15424 \begin_layout Subsection
15425 Credits
15426 \end_layout
15427
15428 \begin_layout Standard
15429 These files are partly based on the older 
15430 \family typewriter
15431 ejour2.layout
15432 \family default
15433 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15434  file from Springer.
15435  All this, and the 
15436 \family typewriter
15437 ejour2
15438 \family default
15439  layout, are now defunct.
15440  Jean-Marc Lasgouttes helped out big in making me find my way around the
15441  LyX layout file mechanism.
15442 \end_layout
15443
15444 \begin_layout Subsection
15445 Bugs
15446 \end_layout
15447
15448 \begin_layout Standard
15449 Probably.
15450  But probably less than in the old hacked-LaTeX 
15451 \family typewriter
15452 ejour2
15453 \family default
15454 .
15455 \end_layout
15456
15457 \begin_layout Standard
15458 Limitations e.
15459 \begin_inset space \thinspace{}
15460 \end_inset
15461
15462 g.: does not display the number for theorem-like layouts, just #.
15463 \end_layout
15464
15465 \begin_layout Section
15466 Slides [aka 
15467 \noun on
15468 SliTeX
15469 \noun default
15470 ]
15471 \begin_inset CommandInset label
15472 LatexCommand label
15473 name "sec:slitex"
15474
15475 \end_inset
15476
15477
15478 \end_layout
15479
15480 \begin_layout Standard
15481 by 
15482 \noun on
15483 John Weiss
15484 \noun default
15485  
15486 \end_layout
15487
15488 \begin_layout Subsection
15489 Introduction
15490 \end_layout
15491
15492 \begin_layout Standard
15493 This section describes how to use LyX to make slides for overhead projectors.
15494  There are two document classes that can do this: the default slides class
15495  and the 
15496 \family sans
15497 FoilTeX
15498 \family default
15499  slides class.
15500  This section documents the former.
15501 \end_layout
15502
15503 \begin_layout Standard
15504 I'm going to say this again, nice and clear, so that there's no misunderstanding
15505 :
15506 \end_layout
15507
15508 \begin_layout Standard
15509 \begin_inset VSpace bigskip
15510 \end_inset
15511
15512
15513 \end_layout
15514
15515 \begin_layout Standard
15516 \align center
15517
15518 \size large
15519 This section documents the class 
15520 \begin_inset Quotes eld
15521 \end_inset
15522
15523
15524 \family sans
15525 slides (default)
15526 \family default
15527
15528 \begin_inset Quotes erd
15529 \end_inset
15530
15531  
15532 \emph on
15533 only.
15534 \end_layout
15535
15536 \begin_layout Standard
15537 \begin_inset VSpace bigskip
15538 \end_inset
15539
15540
15541 \end_layout
15542
15543 \begin_layout Standard
15544 If you're looking for the documentation for 
15545 \begin_inset Quotes eld
15546 \end_inset
15547
15548
15549 \family sans
15550 slides (FoilTeX)
15551 \family default
15552
15553 \begin_inset Quotes erd
15554 \end_inset
15555
15556 , check out section
15557 \begin_inset space ~
15558 \end_inset
15559
15560
15561 \begin_inset CommandInset ref
15562 LatexCommand ref
15563 reference "sec:foiltex"
15564
15565 \end_inset
15566
15567 .
15568  The 
15569 \family sans
15570 foils
15571 \family default
15572  class [
15573 \begin_inset Quotes eld
15574 \end_inset
15575
15576
15577 \family sans
15578 slides (FoilTeX)
15579 \family default
15580
15581 \begin_inset Quotes erd
15582 \end_inset
15583
15584 ] is actually somewhat better than the default 
15585 \family sans
15586 slides
15587 \family default
15588  class,
15589 \begin_inset Foot
15590 status collapsed
15591
15592 \begin_layout Plain Layout
15593 \SpecialChar \ldots{}
15594 or so I've been told repeatedly by its advocates.
15595  Having never used it, I have no idea if this claim is true or not.
15596 \end_layout
15597
15598 \end_inset
15599
15600  which this section documents.
15601 \end_layout
15602
15603 \begin_layout Standard
15604 This class is the LaTeX2e improvement of the old 
15605 \noun on
15606 SliTeX
15607 \noun default
15608  package.
15609  Every LaTeX2e distribution includes this class [which I'll just refer to
15610  as 
15611 \begin_inset Quotes eld
15612 \end_inset
15613
15614
15615 \family sans
15616 slides
15617 \family default
15618
15619 \begin_inset Quotes erd
15620 \end_inset
15621
15622  from now on], so you're bound to have it.
15623  As I noted earlier, there are other classes, such as 
15624 \family sans
15625 foils
15626 \family default
15627 , which also produce slides for overhead projectors and do a better job
15628  at it.
15629  However, there are some things which 
15630 \family sans
15631 slides
15632 \family default
15633  can do which the others can't, such as generate overlays.
15634  Read on to learn more!
15635 \end_layout
15636
15637 \begin_layout Subsection
15638 Getting Started
15639 \begin_inset CommandInset label
15640 LatexCommand label
15641 name "sec:slidesetup"
15642
15643 \end_inset
15644
15645
15646 \end_layout
15647
15648 \begin_layout Standard
15649 Obviously, to use this document class, you need to select 
15650 \begin_inset Quotes eld
15651 \end_inset
15652
15653
15654 \family sans
15655 slides (default)
15656 \family default
15657
15658 \begin_inset Quotes erd
15659 \end_inset
15660
15661  from the class list in the 
15662 \family sans
15663 Document\SpecialChar \menuseparator
15664 Settings
15665 \family default
15666  dialog.
15667  There are some other special things you should know about this class:
15668 \end_layout
15669
15670 \begin_layout Itemize
15671 Don't bother changing the options 
15672 \family sans
15673 Sides and Columns
15674 \family default
15675 .
15676  They're not supported by the 
15677 \family sans
15678 slides
15679 \family default
15680  class, anyways.
15681 \end_layout
15682
15683 \begin_layout Itemize
15684 The option 
15685 \family sans
15686 Page
15687 \begin_inset space ~
15688 \end_inset
15689
15690 style
15691 \family default
15692  behaves a bit differently for this class.
15693  The possible choices and what they do are as follows:
15694 \end_layout
15695
15696 \begin_deeper
15697 \begin_layout Description
15698
15699 \family sans
15700 plain
15701 \family default
15702  The final output contains page numbers in the lower right corner.
15703 \end_layout
15704
15705 \begin_layout Description
15706
15707 \family sans
15708 headings
15709 \family default
15710  Like 
15711 \family sans
15712 plain
15713 \family default
15714 , but also prints out any time markers you've put in.
15715  This is the default.
15716 \end_layout
15717
15718 \begin_layout Description
15719
15720 \family sans
15721 empty
15722 \family default
15723  The final output contains no page numbers, time markers, or alignment markers.
15724 \end_layout
15725
15726 \end_deeper
15727 \begin_layout Itemize
15728 The 
15729 \family sans
15730 slides
15731 \family default
15732  class has an extra option: 
15733 \family typewriter
15734 clock
15735 \family default
15736 .
15737  To use it, put 
15738 \begin_inset Quotes eld
15739 \end_inset
15740
15741
15742 \family typewriter
15743 clock
15744 \family default
15745
15746 \begin_inset Quotes erd
15747 \end_inset
15748
15749  in the extra class options.
15750 \end_layout
15751
15752 \begin_deeper
15753 \begin_layout Standard
15754 Using this options allows you to add time markers to 
15755 \family sans
15756 Note
15757 \family default
15758 s.
15759  See section
15760 \begin_inset space ~
15761 \end_inset
15762
15763
15764 \begin_inset CommandInset ref
15765 LatexCommand ref
15766 reference "sec:slideNote"
15767
15768 \end_inset
15769
15770  for more details.
15771 \end_layout
15772
15773 \end_deeper
15774 \begin_layout Standard
15775 You can also use the template file 
15776 \begin_inset Quotes eld
15777 \end_inset
15778
15779
15780 \family typewriter
15781 slides.lyx
15782 \family default
15783
15784 \begin_inset Quotes erd
15785 \end_inset
15786
15787  to automatically set up a document to use the 
15788 \family sans
15789 slides
15790 \family default
15791  class [using 
15792 \family sans
15793 File\SpecialChar \menuseparator
15794 New
15795 \begin_inset space ~
15796 \end_inset
15797
15798 from
15799 \begin_inset space ~
15800 \end_inset
15801
15802 Template
15803 \family default
15804  to open your new document].
15805  The template file also contains some examples of the special paragraph
15806  environments used by this class.
15807  I'll describe those next.
15808 \end_layout
15809
15810 \begin_layout Subsection
15811 Paragraph Environments
15812 \end_layout
15813
15814 \begin_layout Subsubsection
15815 Supported Environments
15816 \end_layout
15817
15818 \begin_layout Standard
15819 The first thing you'll notice when you start up a new 
15820 \family sans
15821 slides
15822 \family default
15823  document is the font size and type: it's the equivalent of the size 
15824 \begin_inset Quotes eld
15825 \end_inset
15826
15827
15828 \family sans
15829 Largest
15830 \family default
15831
15832 \begin_inset Quotes erd
15833 \end_inset
15834
15835  in the 
15836 \family sans
15837 Sans
15838 \begin_inset space ~
15839 \end_inset
15840
15841 Serif
15842 \family default
15843  font.
15844  This is also what's used in the output.
15845  Think of this as a 
15846 \begin_inset Quotes eld
15847 \end_inset
15848
15849 visual cue
15850 \begin_inset Quotes erd
15851 \end_inset
15852
15853  to remind you that this is a slide.
15854  Your final slides will use a larger font; ergo, you'll have less space.
15855  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
15856 \end_layout
15857
15858 \begin_layout Standard
15859 The next thing that becomes obvious is the changes to the paragraph environment
15860  pull-down box [at the far-left end of the toolbar].
15861  Most of the paragraph environments you're used to seeing are missing.
15862  There are also five new ones.
15863  That's because the 
15864 \family sans
15865 slides
15866 \family default
15867  class itself only supports certain paragraph environments:
15868 \end_layout
15869
15870 \begin_layout Itemize
15871
15872 \family sans
15873 Standard
15874 \end_layout
15875
15876 \begin_layout Itemize
15877
15878 \family sans
15879 Itemize
15880 \end_layout
15881
15882 \begin_layout Itemize
15883
15884 \family sans
15885 Enumerate
15886 \end_layout
15887
15888 \begin_layout Itemize
15889
15890 \family sans
15891 Description
15892 \end_layout
15893
15894 \begin_layout Itemize
15895
15896 \family sans
15897 List
15898 \end_layout
15899
15900 \begin_layout Itemize
15901
15902 \family sans
15903 Quotation
15904 \end_layout
15905
15906 \begin_layout Itemize
15907
15908 \family sans
15909 Quote
15910 \end_layout
15911
15912 \begin_layout Itemize
15913
15914 \family sans
15915 Verse
15916 \end_layout
15917
15918 \begin_layout Itemize
15919
15920 \family sans
15921 Caption
15922 \end_layout
15923
15924 \begin_layout Itemize
15925
15926 \family sans
15927 LyX-Code
15928 \end_layout
15929
15930 \begin_layout Itemize
15931
15932 \family sans
15933 Comment
15934 \end_layout
15935
15936 \begin_layout Standard
15937 All of the other standard environments, including the section-heading environmen
15938 ts, aren't used in the 
15939 \family sans
15940 slides
15941 \family default
15942  class.
15943 \end_layout
15944
15945 \begin_layout Standard
15946 On the other hand, you'll notice the following new environments:
15947 \end_layout
15948
15949 \begin_layout Itemize
15950
15951 \family sans
15952 Slide
15953 \end_layout
15954
15955 \begin_layout Itemize
15956
15957 \family sans
15958 Overlay
15959 \end_layout
15960
15961 \begin_layout Itemize
15962
15963 \family sans
15964 Note
15965 \end_layout
15966
15967 \begin_layout Itemize
15968
15969 \family sans
15970 InvisibleText
15971 \end_layout
15972
15973 \begin_layout Itemize
15974
15975 \family sans
15976 VisibleText
15977 \end_layout
15978
15979 \begin_layout Standard
15980 These five are kind of quirky, due to a 
15981 \begin_inset Quotes eld
15982 \end_inset
15983
15984 feature
15985 \begin_inset Quotes erd
15986 \end_inset
15987
15988  in LyX.
15989  You see, LyX doesn't permit you to nest any other paragraph environment
15990  into an empty environment.
15991  Now, that's fine and dandy, but it means that you wouldn't be able to start
15992  a slide with anything except plain text.
15993  To deal with this, I've performed a little 
15994 \begin_inset Quotes eld
15995 \end_inset
15996
15997 LaTeX magic.
15998 \begin_inset Quotes erd
15999 \end_inset
16000
16001  
16002 \end_layout
16003
16004 \begin_layout Subsubsection
16005 Quirks of the New Environments
16006 \begin_inset CommandInset label
16007 LatexCommand label
16008 name "sec:slideQuirk"
16009
16010 \end_inset
16011
16012
16013 \end_layout
16014
16015 \begin_layout Standard
16016 All five of the new paragraph environments are somewhat quirky due to inherent
16017  limitiations in the current version of LyX.
16018  As I just mentioned, LyX forbids environments that begin with another environme
16019 nt.
16020  To get around this, the 
16021 \family sans
16022 Slide
16023 \family default
16024  environment isn't a paragraph environment as described in the 
16025 \emph on
16026 User's Guide
16027 \emph default
16028 .
16029  
16030 \end_layout
16031
16032 \begin_layout Standard
16033 You should consider 
16034 \family sans
16035 Slide
16036 \family default
16037
16038 \family sans
16039 Overlay
16040 \family default
16041 , and 
16042 \family sans
16043 Note
16044 \family default
16045  to be 
16046 \begin_inset Quotes eld
16047 \end_inset
16048
16049 pseudo-environments.
16050 \begin_inset Quotes erd
16051 \end_inset
16052
16053  They look like a section heading or a 
16054 \begin_inset Quotes eld
16055 \end_inset
16056
16057
16058 \family sans
16059 Caption
16060 \family default
16061 ,
16062 \begin_inset Quotes erd
16063 \end_inset
16064
16065  but really begin a [and, if necessary, end the previous] paragraph environment.
16066  Likewise, treat 
16067 \family sans
16068 InvisibleText
16069 \family default
16070  and 
16071 \family sans
16072 VisibleText
16073 \family default
16074  as 
16075 \begin_inset Quotes eld
16076 \end_inset
16077
16078 pseudo-commands.
16079 \begin_inset Quotes erd
16080 \end_inset
16081
16082  These two perform some action.
16083 \end_layout
16084
16085 \begin_layout Standard
16086 A common feature of all five environments, 
16087 \family sans
16088 Slide
16089 \family default
16090
16091 \family sans
16092 Overlay
16093 \family default
16094
16095 \family sans
16096 Note
16097 \family default
16098
16099 \family sans
16100 InvisibleText
16101 \family default
16102  and 
16103 \family sans
16104 VisibleText
16105 \family default
16106 , is a rather long-ish label.
16107  The text following this label — ordinarily the contents of the paragraph
16108  environment — is utterly irrelevant for 
16109 \family sans
16110 Slide
16111 \family default
16112
16113 \family sans
16114 Overlay
16115 \family default
16116
16117 \family sans
16118 Note
16119 \family default
16120
16121 \family sans
16122 InvisibleText
16123 \family default
16124  and 
16125 \family sans
16126 VisibleText
16127 \family default
16128 .
16129  LyX completely ignores it.
16130  In fact, you can leave these five environments completely empty.
16131  
16132 \end_layout
16133
16134 \begin_layout Standard
16135 While you don't 
16136 \emph on
16137 have
16138 \emph default
16139  to put any text after the rather long-ish label, you might want to.
16140  This could be a short description of the contents of the 
16141 \family sans
16142 Slide
16143 \family default
16144 , for example.
16145  In that case, enter in your descriptive comment and hit 
16146 \family sans
16147 Return
16148 \family default
16149  as you normally would.
16150 \end_layout
16151
16152 \begin_layout Standard
16153 If, on the other hand, you don't want to enter in any descriptive text,
16154  you'll hit another LyX quirk.
16155  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16156  environment until you put something in the old one.
16157  So, do this:
16158 \end_layout
16159
16160 \begin_layout Itemize
16161 Start entering the text that will 
16162 \emph on
16163 follow
16164 \emph default
16165  the new 
16166 \family sans
16167 Slide
16168 \family default
16169
16170 \family sans
16171 Overlay
16172 \family default
16173
16174 \family sans
16175 Note
16176 \family default
16177
16178 \family sans
16179 InvisibleText
16180 \family default
16181  or 
16182 \family sans
16183 VisibleText
16184 \family default
16185 .
16186  
16187 \end_layout
16188
16189 \begin_layout Itemize
16190 Now move to the beginning of that paragraph.
16191  
16192 \end_layout
16193
16194 \begin_layout Itemize
16195 Next, hit 
16196 \family sans
16197 Return
16198 \family default
16199 .
16200  
16201 \end_layout
16202
16203 \begin_layout Itemize
16204 Finally, change this new, empty paragraph to a 
16205 \family sans
16206 Slide
16207 \family default
16208
16209 \family sans
16210 Overlay
16211 \family default
16212
16213 \family sans
16214 Note
16215 \family default
16216
16217 \family sans
16218 InvisibleText
16219 \family default
16220  or 
16221 \family sans
16222 VisibleText
16223 \family default
16224 .
16225  
16226 \end_layout
16227
16228 \begin_layout Standard
16229 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16230
16231 \end_layout
16232
16233 \begin_layout Subsection
16234 Making a Presentation with 
16235 \family sans
16236 Slide
16237 \family default
16238
16239 \family sans
16240 Overlay
16241 \family default
16242  and 
16243 \family sans
16244 Note
16245 \end_layout
16246
16247 \begin_layout Subsubsection
16248 Using the 
16249 \family sans
16250 Slide
16251 \family default
16252  Environment
16253 \end_layout
16254
16255 \begin_layout Standard
16256 If you're expecting this section to teach you how to actually make a presentatio
16257 n, you'll be sorely disappointed.
16258  Naturally, I'll describe all of the ways the 
16259 \family sans
16260 slides
16261 \family default
16262  class can assist you in preparing the materials for a presentation.
16263  Filling in the contents, however, is up to you.
16264  [Then again, that 
16265 \emph on
16266 is
16267 \emph default
16268  the LyX philosophy.]
16269 \end_layout
16270
16271 \begin_layout Standard
16272 Choosing the 
16273 \family sans
16274 Slide
16275 \family default
16276  environment [in the manner described in section
16277 \begin_inset space ~
16278 \end_inset
16279
16280
16281 \begin_inset CommandInset ref
16282 LatexCommand ref
16283 reference "sec:slideQuirk"
16284
16285 \end_inset
16286
16287 ] tells LyX to begin a new slide [duh].
16288  The label for this environment/
16289 \begin_inset Quotes erd
16290 \end_inset
16291
16292 pseudo-command
16293 \begin_inset Quotes erd
16294 \end_inset
16295
16296  is an 
16297 \begin_inset Quotes eld
16298 \end_inset
16299
16300 ASCII line,
16301 \begin_inset Quotes erd
16302 \end_inset
16303
16304  in cool blue, followed by the label, 
16305 \begin_inset Quotes eld
16306 \end_inset
16307
16308 NewSlide:
16309 \begin_inset Quotes erd
16310 \end_inset
16311
16312 .
16313  Any text or paragraph environments that follow this one go on the new slide.
16314  It's that simple.
16315 \end_layout
16316
16317 \begin_layout Standard
16318 Slides are probably the only time you'll need to forcibly end pages in LyX
16319  (this can be specified in the 
16320 \family sans
16321 Paragraph Layout
16322 \family default
16323  dialog).
16324  In fact, you'll want to, once you finish entering the contents of one slide.
16325  If you've entered more text than can physically fit on a slide, the extra
16326  overflows onto a new slide.
16327  I don't recommend doing this, however, since the overflow slide won't have
16328  any page number on it.
16329  Furthermore, it may interfere with any 
16330 \family sans
16331 Overlay
16332 \family default
16333  you've made to accompany the oversized 
16334 \family sans
16335 Slide
16336 \family default
16337 .
16338 \end_layout
16339
16340 \begin_layout Standard
16341 The 
16342 \family sans
16343 Overlay
16344 \family default
16345  and 
16346 \family sans
16347 Note
16348 \family default
16349  environments work the same way as the 
16350 \family sans
16351 Slide
16352 \family default
16353  environment.
16354  They both create an 
16355 \begin_inset Quotes eld
16356 \end_inset
16357
16358 ASCII line
16359 \begin_inset Quotes erd
16360 \end_inset
16361
16362  followed by a label [
16363 \begin_inset Quotes eld
16364 \end_inset
16365
16366 NewOverlay:
16367 \begin_inset Quotes erd
16368 \end_inset
16369
16370  and 
16371 \begin_inset Quotes eld
16372 \end_inset
16373
16374 NewNote:
16375 \begin_inset Quotes erd
16376 \end_inset
16377
16378 , respectively].
16379  The color is a stunning magenta instead of blue, and the 
16380 \begin_inset Quotes eld
16381 \end_inset
16382
16383 ASCII line
16384 \begin_inset Quotes erd
16385 \end_inset
16386
16387  will look different, in style and in length.
16388  The label fonts of all three also differ from one another.
16389 \end_layout
16390
16391 \begin_layout Standard
16392 As with a 
16393 \family sans
16394 Slide
16395 \family default
16396 , if the contents of a 
16397 \family sans
16398 Note
16399 \family default
16400  or 
16401 \family sans
16402 Overlay
16403 \family default
16404  exceed the physical size of a slide or sheet of paper, the extra will overflow
16405  onto a new sheet.
16406  Again, you should avoid this.
16407  It defeats the whole purpose of 
16408 \family sans
16409 Note
16410 \family default
16411 s and 
16412 \family sans
16413 Overlay
16414 \family default
16415 s.
16416 \end_layout
16417
16418 \begin_layout Subsubsection
16419 Using 
16420 \family sans
16421 Overlay
16422 \family default
16423  with 
16424 \family sans
16425 Slide
16426 \end_layout
16427
16428 \begin_layout Standard
16429 The idea behind an 
16430 \family sans
16431 Overlay
16432 \family default
16433  is a slide that sits atop another slide.
16434  Perhaps you wish to discuss a figure on the main 
16435 \family sans
16436 Slide
16437 \family default
16438  before displaying the text associated with it.
16439  One way to accomplish this is tape a flap of dark paper over the part of
16440  the 
16441 \family sans
16442 Slide
16443 \family default
16444  you want to display later.
16445  This method fails, however, if you wish to overlap one graph with another,
16446  for example.
16447  You would then have to fumble while speaking to align the two separate,
16448  overlapping 
16449 \family sans
16450 Slide
16451 \family default
16452 s to align the two graphs.
16453  The use of an 
16454 \family sans
16455 Overlay
16456 \family default
16457  environment in both cases makes life much easier.
16458 \end_layout
16459
16460 \begin_layout Standard
16461 Each 
16462 \family sans
16463 Overlay
16464 \family default
16465  receives the page number of its 
16466 \begin_inset Quotes eld
16467 \end_inset
16468
16469 parent
16470 \begin_inset Quotes erd
16471 \end_inset
16472
16473  
16474 \family sans
16475 Slide
16476 \family default
16477 , appended by 
16478 \begin_inset Quotes eld
16479 \end_inset
16480
16481
16482 \family typewriter
16483 -a
16484 \family default
16485
16486 \begin_inset Quotes erd
16487 \end_inset
16488
16489 .
16490 \begin_inset Foot
16491 status collapsed
16492
16493 \begin_layout Plain Layout
16494 Presumably, mutliple 
16495 \family sans
16496 Overlay
16497 \family default
16498 s would have 
16499 \begin_inset Quotes eld
16500 \end_inset
16501
16502
16503 \family typewriter
16504 -a
16505 \family default
16506
16507 \begin_inset Quotes erd
16508 \end_inset
16509
16510
16511 \begin_inset Quotes eld
16512 \end_inset
16513
16514
16515 \family typewriter
16516 -b
16517 \family default
16518
16519 \begin_inset Quotes erd
16520 \end_inset
16521
16522
16523 \begin_inset Quotes eld
16524 \end_inset
16525
16526
16527 \family typewriter
16528 -c
16529 \family default
16530
16531 \begin_inset Quotes erd
16532 \end_inset
16533
16534 , etc.
16535 \begin_inset space ~
16536 \end_inset
16537
16538 appended to the page number of the parent 
16539 \family sans
16540 Slide
16541 \family default
16542 .
16543  
16544 \end_layout
16545
16546 \end_inset
16547
16548  Clearly, you want the contents of both the 
16549 \family sans
16550 Slide
16551 \family default
16552  and the 
16553 \family sans
16554 Overlay
16555 \family default
16556  to each fit on a single physical slide! You should probably consider an
16557  
16558 \family sans
16559 Overlay
16560 \family default
16561  as 
16562 \begin_inset Quotes eld
16563 \end_inset
16564
16565 part of
16566 \begin_inset Quotes erd
16567 \end_inset
16568
16569  a 
16570 \family sans
16571 Slide
16572 \family default
16573 .
16574  Indeed, the LyX 
16575 \family sans
16576 slides
16577 \family default
16578  class provides a visual cue for this: the label at the start of an 
16579 \family sans
16580 Overlay
16581 \family default
16582  is shorter than that at the start of a 
16583 \family sans
16584 Slide
16585 \family default
16586 .
16587  Lastly, when you generate printable output, you'll find alignment markers
16588  in all four corners of both the 
16589 \family sans
16590 Overlay
16591 \family default
16592  page and its parent 
16593 \family sans
16594 Slide
16595 \family default
16596 .
16597  These will assist you in lining up the two physical slides.
16598 \end_layout
16599
16600 \begin_layout Standard
16601 The major problem in overlaying two slides is aligning the contents of the
16602  two transparencies.
16603  How much space should you leave for that graph on the second slide? Worse
16604  still, what if you want a graph and a sentence on second slide, but there
16605  is text on the main transparency that goes in between them? You could try
16606  and insert vertical space of the right size.
16607  The better way is to use 
16608 \family sans
16609 InvisibleText
16610 \family default
16611  and 
16612 \family sans
16613 VisibleText
16614 \family default
16615 .
16616 \end_layout
16617
16618 \begin_layout Standard
16619 As their names imply, 
16620 \family sans
16621 InvisibleText
16622 \family default
16623  and 
16624 \family sans
16625 VisibleText
16626 \family default
16627  are two command-like paragraph environments that make all subsequent text
16628  invisible and visible, respectively.
16629  Note from section
16630 \begin_inset space ~
16631 \end_inset
16632
16633
16634 \begin_inset CommandInset ref
16635 LatexCommand ref
16636 reference "sec:slideQuirk"
16637
16638 \end_inset
16639
16640  that you don't place anything 
16641 \emph on
16642 into
16643 \emph default
16644  these two environments, however.
16645  When you create an 
16646 \family sans
16647 InvisibleText
16648 \family default
16649 , it inserts a centered, sky-blue label into the page reading 
16650 \begin_inset Quotes eld
16651 \end_inset
16652
16653 <Invisible Text Follows>
16654 \begin_inset Quotes erd
16655 \end_inset
16656
16657 .
16658  For paragraphs following this label, the parts of the 
16659 \family sans
16660 Slide
16661 \family default
16662  [or 
16663 \family sans
16664 Overlay
16665 \family default
16666 ; it doesn't matter which] where they would be contain instead blank space.
16667  
16668 \end_layout
16669
16670 \begin_layout Standard
16671 For 
16672 \family sans
16673 VisibleText
16674 \family default
16675 , the corresponding centered label is 
16676 \begin_inset Quotes eld
16677 \end_inset
16678
16679 <Visible Text Follows>
16680 \begin_inset Quotes erd
16681 \end_inset
16682
16683  in blazing green.
16684  Paragraphs following this label behave normally.
16685  Note that the beginning of a new 
16686 \family sans
16687 Slide
16688 \family default
16689
16690 \family sans
16691 Overlay
16692 \family default
16693 , or 
16694 \family sans
16695 Note
16696 \family default
16697  automatically shuts off an 
16698 \family sans
16699 InvisibleText
16700 \family default
16701 .
16702  It's therefore not necessary to use 
16703 \family sans
16704 VisibleText
16705 \family default
16706  at the end of a 
16707 \family sans
16708 Slide
16709 \family default
16710 .
16711 \end_layout
16712
16713 \begin_layout Standard
16714 By now, it should be obvious how to create overlay transparencies using
16715  the proper combination of 
16716 \family sans
16717 InvisibleText
16718 \family default
16719  and 
16720 \family sans
16721 VisibleText
16722 \family default
16723  on a 
16724 \family sans
16725 Slide
16726 \family default
16727  and 
16728 \family sans
16729 Overlay
16730 \family default
16731 :
16732 \end_layout
16733
16734 \begin_layout Enumerate
16735 Create a 
16736 \family sans
16737 Slide
16738 \family default
16739 , including everything that will appear on it, whether on the main slide
16740  or on the 
16741 \family sans
16742 Overlay
16743 \family default
16744 .
16745 \end_layout
16746
16747 \begin_layout Enumerate
16748 Before each figure or paragraph that will appear only on the 
16749 \family sans
16750 Overlay
16751 \family default
16752 , insert an 
16753 \family sans
16754 InvisibleText
16755 \family default
16756  environment.
16757  If necessary, insert a 
16758 \family sans
16759 VisibleText
16760 \family default
16761  environment after the 
16762 \family sans
16763 Overlay
16764 \family default
16765 -only text.
16766 \end_layout
16767
16768 \begin_layout Enumerate
16769 Start an 
16770 \family sans
16771 Overlay
16772 \family default
16773  immediately following the 
16774 \family sans
16775 Slide
16776 \family default
16777 .
16778 \end_layout
16779
16780 \begin_layout Enumerate
16781 Copy the contents of this 
16782 \family sans
16783 Slide
16784 \family default
16785  into the 
16786 \family sans
16787 Overlay
16788 \family default
16789 .
16790 \end_layout
16791
16792 \begin_layout Enumerate
16793 Within the 
16794 \family sans
16795 Overlay
16796 \family default
16797 , change all of the 
16798 \family sans
16799 InvisibleText
16800 \family default
16801  lines to 
16802 \family sans
16803 VisibleText
16804 \family default
16805  and vice-versa.
16806 \end_layout
16807
16808 \begin_layout Standard
16809 That's it.
16810  You've just made an 
16811 \family sans
16812 Overlay
16813 \family default
16814 .
16815 \end_layout
16816
16817 \begin_layout Standard
16818 There's one problem with the way I've designed the LyX 
16819 \family sans
16820 slides
16821 \family default
16822  class: you can't make text in the middle of a paragraph invisible, nor
16823  make text in the middle of an invisible paragraph visible again.
16824  To accomplish this feat, you'll need to use some inlined LaTeX codes.
16825 \begin_inset Foot
16826 status collapsed
16827
16828 \begin_layout Plain Layout
16829 The commands of interest are: 
16830 \end_layout
16831
16832 \begin_layout Itemize
16833
16834 \family typewriter
16835 {
16836 \backslash
16837 invisible \SpecialChar \ldots{}
16838  }
16839 \end_layout
16840
16841 \begin_layout Itemize
16842
16843 \family typewriter
16844 {
16845 \backslash
16846 visible \SpecialChar \ldots{}
16847  }
16848 \end_layout
16849
16850 \begin_layout Plain Layout
16851 \SpecialChar \ldots{}
16852 and need to be marked as TeX.
16853  The text whose 
16854 \begin_inset Quotes eld
16855 \end_inset
16856
16857 visibility
16858 \begin_inset Quotes erd
16859 \end_inset
16860
16861  you wish to change goes in between the brackets [and after the 
16862 \family typewriter
16863
16864 \backslash
16865 invisible
16866 \family default
16867  or 
16868 \family typewriter
16869
16870 \backslash
16871 visible
16872 \family default
16873  command].
16874  If you don't know how to mark text as TeX, see the appropriate section
16875  of the 
16876 \emph on
16877 User's Guide
16878 \emph default
16879 .
16880 \end_layout
16881
16882 \end_inset
16883
16884
16885 \end_layout
16886
16887 \begin_layout Subsubsection
16888 Using 
16889 \family sans
16890 Note
16891 \family default
16892  with 
16893 \family sans
16894 Slide
16895 \family default
16896
16897 \begin_inset CommandInset label
16898 LatexCommand label
16899 name "sec:slideNote"
16900
16901 \end_inset
16902
16903
16904 \end_layout
16905
16906 \begin_layout Standard
16907 Like an 
16908 \family sans
16909 Overlay
16910 \family default
16911 , a 
16912 \family sans
16913 Note
16914 \family default
16915  is associated with a 
16916 \begin_inset Quotes eld
16917 \end_inset
16918
16919 parent
16920 \begin_inset Quotes erd
16921 \end_inset
16922
16923  
16924 \family sans
16925 Slide
16926 \family default
16927 .
16928  Here, too, the LyX 
16929 \family sans
16930 slides
16931 \family default
16932  class provides visual cues.
16933  The label for a 
16934 \family sans
16935 Note
16936 \family default
16937  is shorter than that of a 
16938 \family sans
16939 Slide
16940 \family default
16941  [yet longer than that of an 
16942 \family sans
16943 Overlay
16944 \family default
16945 ] and, like the label of an 
16946 \family sans
16947 Overlay
16948 \family default
16949  is shockingly magenta.
16950  Additionally, the printed 
16951 \family sans
16952 Note
16953 \family default
16954  has the page number of its 
16955 \begin_inset Quotes eld
16956 \end_inset
16957
16958 parent
16959 \begin_inset Quotes erd
16960 \end_inset
16961
16962  
16963 \family sans
16964 Slide
16965 \family default
16966 , appended by 
16967 \begin_inset Quotes eld
16968 \end_inset
16969
16970
16971 \family typewriter
16972 -
16973 \family default
16974 1
16975 \begin_inset Quotes erd
16976 \end_inset
16977
16978
16979 \begin_inset Quotes eld
16980 \end_inset
16981
16982
16983 \family typewriter
16984 -
16985 \family default
16986 2
16987 \begin_inset Quotes erd
16988 \end_inset
16989
16990
16991 \begin_inset Quotes eld
16992 \end_inset
16993
16994
16995 \family typewriter
16996 -
16997 \family default
16998 3
16999 \begin_inset Quotes erd
17000 \end_inset
17001
17002 , etc.
17003  You can have multiple 
17004 \family sans
17005 Note
17006 \family default
17007 s associated with a single 
17008 \family sans
17009 Slide
17010 \family default
17011 , and, as with 
17012 \family sans
17013 Slide
17014 \family default
17015  and 
17016 \family sans
17017 Overlay
17018 \family default
17019 , you'll probably want to break up long 
17020 \family sans
17021 Note
17022 \family default
17023 s so that they fit on a single sheet of paper.
17024 \end_layout
17025
17026 \begin_layout Standard
17027 The purpose of a 
17028 \family sans
17029 Note
17030 \family default
17031  is obvious: it contains anything additional you might want to say about
17032  a 
17033 \family sans
17034 Slide
17035 \family default
17036 .
17037  It could also be used as a sheet of reminders for a particular 
17038 \family sans
17039 Slide
17040 \family default
17041 .
17042  In the case of the latter, you might want to make use of time markers.
17043  Currently, the LyX 
17044 \family sans
17045 slides
17046 \family default
17047  class has no 
17048 \begin_inset Quotes eld
17049 \end_inset
17050
17051 native
17052 \begin_inset Quotes erd
17053 \end_inset
17054
17055  support for time markers, a 
17056 \noun on
17057 SliTeX
17058 \noun default
17059  feature.
17060  So, you'll have to resort to using the LaTeX codes.
17061 \end_layout
17062
17063 \begin_layout Standard
17064 To use time markers, you'll need to specify the extra class option 
17065 \begin_inset Quotes eld
17066 \end_inset
17067
17068
17069 \family typewriter
17070 clock
17071 \family default
17072
17073 \begin_inset Quotes erd
17074 \end_inset
17075
17076  [see section
17077 \begin_inset space ~
17078 \end_inset
17079
17080
17081 \begin_inset CommandInset ref
17082 LatexCommand ref
17083 reference "sec:slidesetup"
17084
17085 \end_inset
17086
17087 ].
17088  This option turns on timing marks, which will appear in the lower-left-hand
17089  corner of every 
17090 \family sans
17091 Note
17092 \family default
17093  you generate.
17094  To set what appears in the time marker, you use the LaTeX commands 
17095 \begin_inset Quotes eld
17096 \end_inset
17097
17098
17099 \family typewriter
17100
17101 \backslash
17102 settime{}
17103 \family default
17104
17105 \begin_inset Quotes erd
17106 \end_inset
17107
17108  and 
17109 \begin_inset Quotes eld
17110 \end_inset
17111
17112
17113 \family typewriter
17114
17115 \backslash
17116 addtime{}
17117 \family default
17118
17119 \begin_inset Quotes erd
17120 \end_inset
17121
17122 .
17123  The arguments of both commands are time measured in seconds.
17124  
17125 \begin_inset Quotes eld
17126 \end_inset
17127
17128
17129 \family typewriter
17130
17131 \backslash
17132 settime{}
17133 \family default
17134
17135 \begin_inset Quotes erd
17136 \end_inset
17137
17138  sets the time marker to a given time.
17139  
17140 \begin_inset Quotes eld
17141 \end_inset
17142
17143
17144 \family typewriter
17145
17146 \backslash
17147 addtime{}
17148 \family default
17149
17150 \begin_inset Quotes erd
17151 \end_inset
17152
17153  increments the time marker by the specified amount.
17154  Using time markers and 
17155 \family sans
17156 Note
17157 \family default
17158 s in this fashion, you can remind yourself how much time to spend on a particula
17159
17160 \family sans
17161 Slide
17162 \family default
17163 .
17164 \end_layout
17165
17166 \begin_layout Standard
17167 There's one last feature to describe.
17168  Clearly, you'd like to print out all of your 
17169 \family sans
17170 Slide
17171 \family default
17172 s and 
17173 \family sans
17174 Overlay
17175 \family default
17176 s on transparencies while printing all of your 
17177 \family sans
17178 Note
17179 \family default
17180 s on plain paper.
17181  However, a 
17182 \family sans
17183 Note
17184 \family default
17185  
17186 \emph on
17187 must
17188 \emph default
17189  follow the 
17190 \family sans
17191 Slide
17192 \family default
17193  with which it is associated.
17194  What's a person to do?
17195 \end_layout
17196
17197 \begin_layout Standard
17198 Luckily, there are two LaTeX commands that allow you to select what to print
17199  out.
17200  Both must be placed into the preamble of your document.
17201  The command 
17202 \begin_inset Quotes eld
17203 \end_inset
17204
17205
17206 \family typewriter
17207
17208 \backslash
17209 onlyslides{
17210 \backslash
17211 slides}
17212 \family default
17213
17214 \begin_inset Quotes erd
17215 \end_inset
17216
17217  will cause the output to contain only the 
17218 \family sans
17219 Slide
17220 \family default
17221 s and 
17222 \family sans
17223 Overlay
17224 \family default
17225 s.
17226  Correspondingly, the command 
17227 \begin_inset Quotes eld
17228 \end_inset
17229
17230
17231 \family typewriter
17232
17233 \backslash
17234 onlynotes{
17235 \backslash
17236 notes}
17237 \family default
17238
17239 \begin_inset Quotes erd
17240 \end_inset
17241
17242  prevents the output of anything but 
17243 \family sans
17244 Note
17245 \family default
17246 s.
17247  I'd advise placing both commands in the preamble and initially comment
17248  both out.
17249  You can then preview your entire presentation as you write.
17250  When you're done writing, you can then uncomment one of the two to select
17251  what you want to print.
17252  I like to uncomment 
17253 \begin_inset Quotes eld
17254 \end_inset
17255
17256
17257 \family typewriter
17258
17259 \backslash
17260 onlyslides{
17261 \backslash
17262 slides}
17263 \family default
17264
17265 \begin_inset Quotes erd
17266 \end_inset
17267
17268  , print to a file with 
17269 \begin_inset Quotes eld
17270 \end_inset
17271
17272
17273 \family typewriter
17274 -slides
17275 \family default
17276
17277 \begin_inset Quotes erd
17278 \end_inset
17279
17280  in its name, comment it back out, then uncomment 
17281 \begin_inset Quotes eld
17282 \end_inset
17283
17284
17285 \family typewriter
17286
17287 \backslash
17288 onlynotes{
17289 \backslash
17290 notes}
17291 \family default
17292
17293 \begin_inset Quotes erd
17294 \end_inset
17295
17296  and print to a 
17297 \begin_inset Quotes eld
17298 \end_inset
17299
17300
17301 \family typewriter
17302 *-notes.ps
17303 \family default
17304
17305 \begin_inset Quotes erd
17306 \end_inset
17307
17308  file.
17309  I can then send either file to a printer, loading transparencies or plain
17310  paper as appropriate.
17311 \end_layout
17312
17313 \begin_layout Standard
17314 You can also provide other arguments to the 
17315 \begin_inset Quotes eld
17316 \end_inset
17317
17318
17319 \family typewriter
17320
17321 \backslash
17322 onlyslides{}
17323 \family default
17324
17325 \begin_inset Quotes erd
17326 \end_inset
17327
17328  and 
17329 \begin_inset Quotes eld
17330 \end_inset
17331
17332
17333 \family typewriter
17334
17335 \backslash
17336 onlynotes{}
17337 \family default
17338
17339 \begin_inset Quotes erd
17340 \end_inset
17341
17342  commands.
17343  See a good LaTeX book for details.
17344 \end_layout
17345
17346 \begin_layout Subsection
17347 The 
17348 \family sans
17349 slides
17350 \family default
17351  Class Template File
17352 \end_layout
17353
17354 \begin_layout Standard
17355 I have also provided a template file, 
17356 \begin_inset Quotes eld
17357 \end_inset
17358
17359
17360 \family typewriter
17361 slides.lyx
17362 \family default
17363
17364 \begin_inset Quotes erd
17365 \end_inset
17366
17367 , with the 
17368 \family sans
17369 slides
17370 \family default
17371  class.
17372  To use it, begin your new presentation with 
17373 \family sans
17374 \bar under
17375 F
17376 \bar default
17377 ile\SpecialChar \menuseparator
17378 New
17379 \begin_inset space ~
17380 \end_inset
17381
17382 from
17383 \begin_inset space ~
17384 \end_inset
17385
17386
17387 \bar under
17388 T
17389 \bar default
17390 emplate
17391 \family default
17392 .
17393  Your new LyX presentation file will contain an example 
17394 \family sans
17395 Slide
17396 \family default
17397  – 
17398 \family sans
17399 Overlay
17400 \family default
17401  – 
17402 \family sans
17403 Note
17404 \family default
17405  triplet.
17406  The 
17407 \family sans
17408 Slide
17409 \family default
17410  and 
17411 \family sans
17412 Overlay
17413 \family default
17414  additionally contain an example of the use of 
17415 \family sans
17416 InvisibleText
17417 \family default
17418  and 
17419 \family sans
17420 VisibleText
17421 \family default
17422 .
17423  Lastly, the preamble will contain:
17424 \end_layout
17425
17426 \begin_layout LyX-Code
17427 % Uncomment to print out only slides and overlays
17428 \end_layout
17429
17430 \begin_layout LyX-Code
17431 %
17432 \end_layout
17433
17434 \begin_layout LyX-Code
17435 %
17436 \backslash
17437 onlyslides{
17438 \backslash
17439 slides}
17440 \begin_inset Newline newline
17441 \end_inset
17442
17443  
17444 \end_layout
17445
17446 \begin_layout LyX-Code
17447 % Uncomment to print out only notes
17448 \end_layout
17449
17450 \begin_layout LyX-Code
17451 %
17452 \end_layout
17453
17454 \begin_layout LyX-Code
17455 %
17456 \backslash
17457 onlynotes{
17458 \backslash
17459 notes}
17460 \end_layout
17461
17462 \begin_layout Standard
17463 One final thing: I created this class to support the LaTeX2e 
17464 \begin_inset Quotes eld
17465 \end_inset
17466
17467
17468 \noun on
17469 SliTeX
17470 \noun default
17471  emulation
17472 \begin_inset Quotes erd
17473 \end_inset
17474
17475  class, one of the built-in LaTeX2e classes.
17476  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17477  built-in slide class.
17478  It's here if you want it or need it.
17479  There exist other LaTeX2e classes for creating presentations, such as the
17480  
17481 \family sans
17482 Foils
17483 \family default
17484  class [see section
17485 \begin_inset space ~
17486 \end_inset
17487
17488
17489 \begin_inset CommandInset ref
17490 LatexCommand ref
17491 reference "sec:foiltex"
17492
17493 \end_inset
17494
17495 ] or the 
17496 \begin_inset Quotes eld
17497 \end_inset
17498
17499
17500 \family typewriter
17501 seminar
17502 \family default
17503
17504 \begin_inset Quotes erd
17505 \end_inset
17506
17507  package [present on some TeX distributions].
17508  The latter is not yet supported under LyX.
17509 \begin_inset Foot
17510 status collapsed
17511
17512 \begin_layout Plain Layout
17513 Perhaps you can take on the task\SpecialChar \ldots{}
17514
17515 \end_layout
17516
17517 \end_inset
17518
17519  I know nothing about these other classes.
17520  Try them out to see what sort of alternative they provide.
17521 \end_layout
17522
17523 \begin_layout Chapter
17524 LyX Features needing Extra Software
17525 \end_layout
17526
17527 \begin_layout Section
17528 Checking TeX
17529 \end_layout
17530
17531 \begin_layout Standard
17532 by 
17533 \noun on
17534 Asger Alstrup
17535 \end_layout
17536
17537 \begin_layout Subsection
17538 Introduction
17539 \end_layout
17540
17541 \begin_layout Standard
17542 If you have the 
17543 \family typewriter
17544 chktex
17545 \family default
17546  program installed
17547 \begin_inset Foot
17548 status collapsed
17549
17550 \begin_layout Plain Layout
17551
17552 \family typewriter
17553 chktex
17554 \family default
17555  is not yet available when you are using the LaTeX distribution MiKTeX.
17556 \end_layout
17557
17558 \end_inset
17559
17560 , you'll find in the 
17561 \family sans
17562 Tools
17563 \family default
17564  menu the entry: 
17565 \family sans
17566 Check
17567 \begin_inset space ~
17568 \end_inset
17569
17570 TeX
17571 \family default
17572 .
17573  You can get 
17574 \family typewriter
17575 chktex
17576 \family default
17577  it from CTAN, 
17578 \begin_inset CommandInset href
17579 LatexCommand href
17580 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17581
17582 \end_inset
17583
17584 .
17585 \end_layout
17586
17587 \begin_layout Standard
17588 The 
17589 \family sans
17590 ChkTeX
17591 \family default
17592  package is a program that was written by 
17593 \begin_inset Flex CharStyle:Noun
17594 status collapsed
17595
17596 \begin_layout Plain Layout
17597 Jens T.
17598 \begin_inset space ~
17599 \end_inset
17600
17601 Berger Thielemann
17602 \end_layout
17603
17604 \end_inset
17605
17606  in frustration because some constructs in LaTeX are sometimes non-intuitive,
17607  and easy to forget.
17608  The program runs over your LaTeX file, checks the integrity of the file,
17609  and flags some common errors.
17610  In other technical words, it is 
17611 \family typewriter
17612 lint
17613 \family default
17614  for LaTeX.
17615 \end_layout
17616
17617 \begin_layout Standard
17618 Well, what is a syntax checker doing in LyX which is supposed to produce
17619  correct LaTeX anyways? The answer is simple: Just as 
17620 \family typewriter
17621 Lint
17622 \family default
17623  not only checks the 
17624 \emph on
17625 syntax
17626 \emph default
17627  of C programs, but also does 
17628 \emph on
17629 semantic
17630 \emph default
17631  checks for type-errors, 
17632 \family sans
17633 ChkTeX
17634 \family default
17635  catches some common 
17636 \emph on
17637 typographic
17638 \emph default
17639  errors, in addition to the syntactical ones.
17640  Specifically, 
17641 \family sans
17642 ChkTeX
17643 \family default
17644  is capable of detecting several common errors, such as
17645 \end_layout
17646
17647 \begin_layout Itemize
17648 Ellipsis detection:
17649 \begin_inset Newline newline
17650 \end_inset
17651
17652 Use \SpecialChar \ldots{}
17653  instead of ...
17654 \end_layout
17655
17656 \begin_layout Itemize
17657 No space in front of/after parenthesis:
17658 \begin_inset Newline newline
17659 \end_inset
17660
17661 ( wrong spacing )
17662 \end_layout
17663
17664 \begin_layout Itemize
17665 Enforcement of normal space after common abbreviations:
17666 \begin_inset Newline newline
17667 \end_inset
17668
17669 e.
17670 \begin_inset space \thinspace{}
17671 \end_inset
17672
17673 g.
17674 \begin_inset space \space{}
17675 \end_inset
17676
17677 is too wide spacing.
17678 \end_layout
17679
17680 \begin_layout Itemize
17681 Enforcement of end-of-sentence space when the last sentence ends with a
17682  capital letter:
17683 \begin_inset Newline newline
17684 \end_inset
17685
17686 This is a TEST.
17687  And this is wrong spacing.
17688 \end_layout
17689
17690 \begin_layout Itemize
17691 Space in front of labels and similar commands:
17692 \begin_inset Newline newline
17693 \end_inset
17694
17695 The label should stick right up to the text to avoid falling to a wrong
17696  page.
17697  
17698 \begin_inset CommandInset label
17699 LatexCommand label
17700 name "sec:chktex"
17701
17702 \end_inset
17703
17704  
17705 \begin_inset Foot
17706 status collapsed
17707
17708 \begin_layout Plain Layout
17709 This footnote is in danger of falling off to a wrong page
17710 \end_layout
17711
17712 \end_inset
17713
17714  The label is separated too much.
17715 \end_layout
17716
17717 \begin_layout Itemize
17718 Space in front of references, instead of hard spaces:
17719 \begin_inset Newline newline
17720 \end_inset
17721
17722 In you are in bad luck, the text will break right between the referenced
17723  text and reference number, and that's a pity.
17724  See section 
17725 \begin_inset CommandInset ref
17726 LatexCommand ref
17727 reference "sec:chktex"
17728
17729 \end_inset
17730
17731 .
17732 \end_layout
17733
17734 \begin_layout Itemize
17735 Use of 
17736 \begin_inset Quotes eld
17737 \end_inset
17738
17739 x
17740 \begin_inset Quotes erd
17741 \end_inset
17742
17743  instead of 
17744 \begin_inset Formula $\times$
17745 \end_inset
17746
17747  between numbers:
17748 \begin_inset Newline newline
17749 \end_inset
17750
17751 2x2 looks cheap compared to 
17752 \begin_inset Formula $2\times2$
17753 \end_inset
17754
17755 .
17756 \end_layout
17757
17758 \begin_layout Standard
17759 and more \SpecialChar \ldots{}
17760  It is an invaluable tool when you are 
17761 \begin_inset Quotes eld
17762 \end_inset
17763
17764 finishing up
17765 \begin_inset Quotes erd
17766 \end_inset
17767
17768  your document before printing, and you should run it right after the obligatory
17769  spelling check, and before you go fine tuning the typesetting.
17770 \end_layout
17771
17772 \begin_layout Subsection
17773 How to use it
17774 \end_layout
17775
17776 \begin_layout Standard
17777 If you have the program installed, usage is as simple as choosing 
17778 \family sans
17779 Tools\SpecialChar \menuseparator
17780 Check
17781 \begin_inset space ~
17782 \end_inset
17783
17784 TeX
17785 \family default
17786 .
17787  This will make LyX generate a LaTeX file of your document, start 
17788 \family sans
17789 ChkTeX
17790 \family default
17791  to check it, and then make LyX insert 
17792 \begin_inset Quotes eld
17793 \end_inset
17794
17795 error boxes
17796 \begin_inset Quotes erd
17797 \end_inset
17798
17799  with the warnings from 
17800 \family sans
17801 ChkTeX
17802 \family default
17803 , if there were any.
17804  The warnings will be placed close to the point of the mistake, and you
17805  can quickly find them by using the 
17806 \family sans
17807 Navigate\SpecialChar \menuseparator
17808 Error
17809 \family default
17810  menu item, or the shortcut key 
17811 \family sans
17812 C-g
17813 \family default
17814  from the default 
17815 \family typewriter
17816 cua
17817 \family default
17818  bind file.
17819  Open the error boxes by clicking on them with the mouse, or use the shortcut
17820  key 
17821 \family sans
17822 C-i
17823 \family default
17824  from 
17825 \family typewriter
17826 cua
17827 \family default
17828  bindings, or the corresponding 
17829 \family sans
17830 C-o
17831 \family default
17832  for the alternate 
17833 \family typewriter
17834 emacs
17835 \family default
17836  bind file.
17837  Read the warning and correct the mistake, if it is a mistake.
17838  If you have trouble understanding what the warning is about, you can safely
17839  ignore it.
17840  Remember that there is a hidden layer between the document on screen and
17841  the technical details in invoking 
17842 \family sans
17843 ChkTeX
17844 \family default
17845 , and this gap can make some warnings seem arcane or just right down plain
17846  silly.
17847 \end_layout
17848
17849 \begin_layout Standard
17850 This document is an excellent testing bed for the feature, and it should
17851  provide quite a few warnings for you to fiddle with.
17852  Since computers are only so smart, expect most of the warnings to be false
17853  alarms, though.
17854 \end_layout
17855
17856 \begin_layout Subsection
17857 How to fine tune it
17858 \end_layout
17859
17860 \begin_layout Standard
17861 Sometimes, you'll find that 
17862 \family sans
17863 ChkTeX
17864 \family default
17865  makes more noise than suits your mood.
17866  Then you can choose not to use it, wait until your mood changes, or try
17867  to customize 
17868 \family sans
17869 ChkTeX
17870 \family default
17871  to get better along with you.
17872  Another choice in the most desperate situations is to use 
17873 \family sans
17874 View\SpecialChar \menuseparator
17875 Remove
17876 \begin_inset space ~
17877 \end_inset
17878
17879 All
17880 \begin_inset space ~
17881 \end_inset
17882
17883 Error
17884 \begin_inset space ~
17885 \end_inset
17886
17887 Boxes
17888 \family default
17889 , which will get rid of all warnings instantly.
17890 \end_layout
17891
17892 \begin_layout Standard
17893 Although 
17894 \family sans
17895 ChkTeX
17896 \family default
17897  
17898 \emph on
17899 is
17900 \emph default
17901  very configurable and extensible, you shouldn't expect to solve all problems
17902  with 
17903 \family sans
17904 ChkTeX
17905 \family default
17906  in LyX this way.
17907  Since LyX has to generate a somewhat special LaTeX file to be able to match
17908  the line numbers from the 
17909 \family sans
17910 ChkTeX
17911 \family default
17912  output
17913 \begin_inset Foot
17914 status collapsed
17915
17916 \begin_layout Plain Layout
17917 You can inspect the specific output from 
17918 \family sans
17919 chktex
17920 \family default
17921  by using 
17922 \family sans
17923 Edit\SpecialChar \menuseparator
17924 View
17925 \begin_inset space ~
17926 \end_inset
17927
17928 LaTeX
17929 \begin_inset space ~
17930 \end_inset
17931
17932 Log
17933 \family default
17934  right after a 
17935 \family sans
17936 chktex
17937 \family default
17938  run.
17939 \end_layout
17940
17941 \end_inset
17942
17943  to the internal document structure, some of the warnings will not seen
17944  to appear correctly.
17945  There are two things you can do about this:
17946 \end_layout
17947
17948 \begin_layout Itemize
17949 Fine tune the 
17950 \family sans
17951 ChkTeX
17952 \family default
17953  invocation command line in 
17954 \family sans
17955 Preferences
17956 \family default
17957  (tabs 
17958 \family sans
17959 Outputs
17960 \family default
17961
17962 \family sans
17963 Misc
17964 \family default
17965 ), or the global 
17966 \family sans
17967 ChkTeX
17968 \family default
17969  installation configuration file (usually with the file 
17970 \family typewriter
17971 chktexrc
17972 \family default
17973 ).
17974  See below to learn what warnings can be enabled and disabled on the command
17975  line.
17976  
17977 \end_layout
17978
17979 \begin_layout Itemize
17980 Export your document as a raw LaTeX file using 
17981 \family sans
17982 File\SpecialChar \menuseparator
17983 Export\SpecialChar \menuseparator
17984 LaTeX
17985 \family default
17986  and run 
17987 \family typewriter
17988 chktex
17989 \family default
17990  manually on that.
17991  Invoked in this way, it can be a hassle to find the corresponding place
17992  in the document inside LyX, but with a little patience, you should be able
17993  to do it.
17994 \end_layout
17995
17996 \begin_layout Standard
17997 Here follows the warning messages that can be enabled and disabled in 
17998 \family sans
17999 Preferences
18000 \family default
18001 .
18002  Use 
18003 \family typewriter
18004 -n#
18005 \family default
18006  to disable a warning, and 
18007 \family typewriter
18008 -w#
18009 \family default
18010  to enable a warning.
18011  The emphasized entries are disabled by default, because the default is
18012  "
18013 \family typewriter
18014 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18015 \family default
18016 ".
18017 \end_layout
18018
18019 \begin_layout Standard
18020 Notice that you should only use the options that enable and disable warnings,
18021  because LyX relies on some of the other command line parameters to be set
18022  in a specific way to have a chance to communicate with 
18023 \family typewriter
18024 chktex
18025 \family default
18026 .
18027 \end_layout
18028
18029 \begin_layout Enumerate
18030
18031 \size small
18032 \emph on
18033 Command terminated with space.
18034 \end_layout
18035
18036 \begin_layout Enumerate
18037
18038 \size small
18039 Non-breaking space (
18040 \begin_inset Quotes eld
18041 \end_inset
18042
18043
18044 \family typewriter
18045 ~
18046 \family default
18047
18048 \begin_inset Quotes erd
18049 \end_inset
18050
18051 ) should have been used.
18052 \end_layout
18053
18054 \begin_layout Enumerate
18055
18056 \size small
18057 \emph on
18058 You should enclose the previous parenthesis with 
18059 \begin_inset Quotes eld
18060 \end_inset
18061
18062
18063 \family typewriter
18064 {}
18065 \family default
18066
18067 \begin_inset Quotes erd
18068 \end_inset
18069
18070 .
18071 \end_layout
18072
18073 \begin_layout Enumerate
18074
18075 \size small
18076 Italic correction (
18077 \begin_inset Quotes eld
18078 \end_inset
18079
18080
18081 \family typewriter
18082
18083 \backslash
18084 /
18085 \family default
18086
18087 \begin_inset Quotes erd
18088 \end_inset
18089
18090 ) found in non-italic buffer.
18091 \end_layout
18092
18093 \begin_layout Enumerate
18094
18095 \size small
18096 Italic correction (
18097 \begin_inset Quotes eld
18098 \end_inset
18099
18100
18101 \family typewriter
18102
18103 \backslash
18104 /
18105 \family default
18106
18107 \begin_inset Quotes erd
18108 \end_inset
18109
18110 ) found more than once.
18111 \end_layout
18112
18113 \begin_layout Enumerate
18114
18115 \size small
18116 \emph on
18117 No italic correction (
18118 \begin_inset Quotes eld
18119 \end_inset
18120
18121
18122 \family typewriter
18123
18124 \backslash
18125 /
18126 \family default
18127
18128 \begin_inset Quotes erd
18129 \end_inset
18130
18131 ) found.
18132 \end_layout
18133
18134 \begin_layout Enumerate
18135
18136 \size small
18137 Accent command 
18138 \begin_inset Quotes eld
18139 \end_inset
18140
18141
18142 \family typewriter
18143 cmd
18144 \family default
18145
18146 \begin_inset Quotes erd
18147 \end_inset
18148
18149  needs use of 
18150 \begin_inset Quotes eld
18151 \end_inset
18152
18153
18154 \family typewriter
18155 cmd
18156 \family default
18157
18158 \begin_inset Quotes erd
18159 \end_inset
18160
18161 .
18162 \end_layout
18163
18164 \begin_layout Enumerate
18165
18166 \size small
18167 Wrong length of dash may have been used.
18168 \end_layout
18169
18170 \begin_layout Enumerate
18171
18172 \size small
18173 \emph on
18174 \begin_inset Quotes eld
18175 \end_inset
18176
18177
18178 \family typewriter
18179 %s
18180 \family default
18181
18182 \begin_inset Quotes erd
18183 \end_inset
18184
18185  expected, found 
18186 \begin_inset Quotes eld
18187 \end_inset
18188
18189
18190 \family typewriter
18191 %s
18192 \family default
18193
18194 \begin_inset Quotes erd
18195 \end_inset
18196
18197 .
18198 \end_layout
18199
18200 \begin_layout Enumerate
18201
18202 \size small
18203 Solo 
18204 \begin_inset Quotes eld
18205 \end_inset
18206
18207
18208 \family typewriter
18209 %s
18210 \family default
18211
18212 \begin_inset Quotes erd
18213 \end_inset
18214
18215  found.
18216 \end_layout
18217
18218 \begin_layout Enumerate
18219
18220 \size small
18221 You should use 
18222 \begin_inset Quotes eld
18223 \end_inset
18224
18225
18226 \family typewriter
18227 %s
18228 \family default
18229
18230 \begin_inset Quotes erd
18231 \end_inset
18232
18233  to achieve an ellipsis.
18234 \end_layout
18235
18236 \begin_layout Enumerate
18237
18238 \size small
18239 Inter-word spacing (
18240 \begin_inset Quotes eld
18241 \end_inset
18242
18243
18244 \family typewriter
18245
18246 \backslash
18247
18248 \family default
18249  
18250 \begin_inset Quotes eld
18251 \end_inset
18252
18253 ) should perhaps be used.
18254 \end_layout
18255
18256 \begin_layout Enumerate
18257
18258 \size small
18259 Inter-sentence spacing (
18260 \begin_inset Quotes eld
18261 \end_inset
18262
18263
18264 \family typewriter
18265
18266 \backslash
18267 @
18268 \family default
18269
18270 \begin_inset Quotes erd
18271 \end_inset
18272
18273 ) should perhaps be used.
18274 \end_layout
18275
18276 \begin_layout Enumerate
18277
18278 \size small
18279 Could not find argument for command.
18280 \end_layout
18281
18282 \begin_layout Enumerate
18283
18284 \size small
18285 No match found for 
18286 \begin_inset Quotes eld
18287 \end_inset
18288
18289
18290 \family typewriter
18291 %s
18292 \family default
18293
18294 \begin_inset Quotes erd
18295 \end_inset
18296
18297 .
18298 \end_layout
18299
18300 \begin_layout Enumerate
18301
18302 \size small
18303 Math mode still on at end of LaTeX file.
18304 \end_layout
18305
18306 \begin_layout Enumerate
18307
18308 \size small
18309 Number of 
18310 \begin_inset Quotes eld
18311 \end_inset
18312
18313
18314 \family typewriter
18315 char
18316 \family default
18317
18318 \begin_inset Quotes erd
18319 \end_inset
18320
18321  doesn't match the number of 
18322 \begin_inset Quotes eld
18323 \end_inset
18324
18325
18326 \family typewriter
18327 char
18328 \family default
18329
18330 \begin_inset Quotes erd
18331 \end_inset
18332
18333 .
18334 \end_layout
18335
18336 \begin_layout Enumerate
18337
18338 \size small
18339 You should use either 
18340 \family typewriter
18341
18342 \begin_inset Quotes eld
18343 \end_inset
18344
18345
18346 \family default
18347  or 
18348 \family typewriter
18349
18350 \begin_inset Quotes erd
18351 \end_inset
18352
18353
18354 \family default
18355  as an alternative to 
18356 \begin_inset Quotes eld
18357 \end_inset
18358
18359
18360 \family typewriter
18361 "
18362 \family default
18363
18364 \begin_inset Quotes erd
18365 \end_inset
18366
18367 .
18368 \end_layout
18369
18370 \begin_layout Enumerate
18371
18372 \size small
18373 You should use "
18374 \family typewriter
18375 '
18376 \family default
18377 " (ASCII 39) instead of "
18378 \family typewriter
18379 ´
18380 \family default
18381 " (ASCII 180).
18382 \end_layout
18383
18384 \begin_layout Enumerate
18385
18386 \size small
18387 User-specified pattern found.
18388 \end_layout
18389
18390 \begin_layout Enumerate
18391
18392 \size small
18393 This command might not be intended.
18394 \end_layout
18395
18396 \begin_layout Enumerate
18397
18398 \size small
18399 \emph on
18400 Comment displayed.
18401 \end_layout
18402
18403 \begin_layout Enumerate
18404
18405 \size small
18406 Either 
18407 \family typewriter
18408 ''
18409 \backslash
18410 ,'
18411 \family default
18412  or 
18413 \family typewriter
18414 '
18415 \backslash
18416 ,''
18417 \family default
18418  will look better.
18419 \end_layout
18420
18421 \begin_layout Enumerate
18422
18423 \size small
18424 Delete this space to maintain correct page references.
18425 \end_layout
18426
18427 \begin_layout Enumerate
18428
18429 \size small
18430 \emph on
18431 You might wish to put this between a pair of 
18432 \begin_inset Quotes eld
18433 \end_inset
18434
18435
18436 \family typewriter
18437 {}
18438 \family default
18439
18440 \begin_inset Quotes erd
18441 \end_inset
18442
18443 .
18444 \end_layout
18445
18446 \begin_layout Enumerate
18447
18448 \size small
18449 You ought to remove spaces in front of punctuation.
18450 \end_layout
18451
18452 \begin_layout Enumerate
18453
18454 \size small
18455 Could not execute LaTeX command.
18456 \end_layout
18457
18458 \begin_layout Enumerate
18459
18460 \size small
18461 Don't use 
18462 \family typewriter
18463
18464 \backslash
18465 /
18466 \family default
18467  in front of small punctuation.
18468 \end_layout
18469
18470 \begin_layout Enumerate
18471
18472 \family typewriter
18473 \size small
18474 $
18475 \backslash
18476 times$
18477 \family default
18478  may look prettier here.
18479 \end_layout
18480
18481 \begin_layout Enumerate
18482
18483 \size small
18484 \emph on
18485 Multiple spaces detected in output.
18486 \end_layout
18487
18488 \begin_layout Enumerate
18489
18490 \size small
18491 This text may be ignored.
18492 \end_layout
18493
18494 \begin_layout Enumerate
18495
18496 \size small
18497 Use 
18498 \family typewriter
18499
18500 \begin_inset Quotes eld
18501 \end_inset
18502
18503
18504 \family default
18505  to begin quotation, not 
18506 \family typewriter
18507 '
18508 \family default
18509 .
18510 \end_layout
18511
18512 \begin_layout Enumerate
18513
18514 \size small
18515 Use 
18516 \family typewriter
18517 '
18518 \family default
18519  to end quotation, not 
18520 \family typewriter
18521
18522 \begin_inset Quotes eld
18523 \end_inset
18524
18525
18526 \family default
18527 .
18528 \end_layout
18529
18530 \begin_layout Enumerate
18531
18532 \size small
18533 Don't mix quotes.
18534 \end_layout
18535
18536 \begin_layout Enumerate
18537
18538 \size small
18539 You should perhaps use 
18540 \begin_inset Quotes eld
18541 \end_inset
18542
18543
18544 \family typewriter
18545 cmd
18546 \family default
18547
18548 \begin_inset Quotes erd
18549 \end_inset
18550
18551  instead.
18552 \end_layout
18553
18554 \begin_layout Enumerate
18555
18556 \size small
18557 You should put a space in front of/after parenthesis.
18558 \end_layout
18559
18560 \begin_layout Enumerate
18561
18562 \size small
18563 You should avoid spaces in front of/after parenthesis.
18564 \end_layout
18565
18566 \begin_layout Enumerate
18567
18568 \size small
18569 \emph on
18570 You should not use punctuation in front of/after quotes.
18571 \end_layout
18572
18573 \begin_layout Enumerate
18574
18575 \size small
18576 Double space found.
18577 \end_layout
18578
18579 \begin_layout Enumerate
18580
18581 \size small
18582 You should put punctuation outside inner/inside display math mode.
18583 \end_layout
18584
18585 \begin_layout Enumerate
18586
18587 \size small
18588 You ought to not use primitive TeX in LaTeX code.
18589 \end_layout
18590
18591 \begin_layout Enumerate
18592
18593 \size small
18594 You should remove spaces in front of 
18595 \begin_inset Quotes eld
18596 \end_inset
18597
18598
18599 \family typewriter
18600 %s
18601 \family default
18602
18603 \begin_inset Quotes erd
18604 \end_inset
18605
18606
18607 \end_layout
18608
18609 \begin_layout Enumerate
18610
18611 \size small
18612 \begin_inset Quotes eld
18613 \end_inset
18614
18615
18616 \family typewriter
18617 %s
18618 \family default
18619
18620 \begin_inset Quotes erd
18621 \end_inset
18622
18623  is normally not followed by 
18624 \begin_inset Quotes eld
18625 \end_inset
18626
18627
18628 \family typewriter
18629 %c
18630 \family default
18631
18632 \begin_inset Quotes erd
18633 \end_inset
18634
18635 .
18636 \end_layout
18637
18638 \begin_layout Standard
18639 In later versions of LyX, we hope to provide a more complete interface to
18640  this tool (and it's smaller cousin 
18641 \family typewriter
18642 lacheck
18643 \family default
18644 ) to exploit the full power of it.
18645  But it's not exactly useless as it is now: go try it on one of your existing
18646  documents of a certain length and be surprised.
18647 \end_layout
18648
18649 \begin_layout Section
18650 Version Control in LyX
18651 \end_layout
18652
18653 \begin_layout Standard
18654 by
18655 \noun on
18656  Lars Gullik Bjønnes 
18657 \noun default
18658 and 
18659 \noun on
18660 Pavel Sanda
18661 \end_layout
18662
18663 \begin_layout Subsection
18664 Introduction
18665 \end_layout
18666
18667 \begin_layout Standard
18668 A friend of mine wanted to try LyX for a group project.
18669  When he didn't find support for version control or file locking, he dropped
18670  it.
18671  This angered me a bit, so I thought that I should at least make support
18672  for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18673  This has now been done.
18674  LyX now supports some of the most basic RCS commands.
18675  If you need to something a bit more sophisticated you will have to do that
18676  manually in a terminal.
18677 \end_layout
18678
18679 \begin_layout Standard
18680 Before you begin to use the version control features in LyX, you should
18681  read 
18682 \begin_inset Quotes eld
18683 \end_inset
18684
18685 rcsintro
18686 \begin_inset Quotes erd
18687 \end_inset
18688
18689  (a man file, read it with 
18690 \family typewriter
18691 man rcsintro
18692 \family default
18693 ).
18694  This file describes all the basic features of RCS.
18695  You should especially notice the comment about a RCS directory, and the
18696  notion of a master RCS file (the file ending in 
18697 \family typewriter
18698 ,v
18699 \family default
18700 ).
18701 \end_layout
18702
18703 \begin_layout Standard
18704 Later basic CVS/SVN support was added.
18705  You should be familiar with CVS/SVN usage before start using it under LyX.
18706  Most of the log messages are not currently displayed after operations -
18707  you can check them in Messages pane if unsure.
18708 \end_layout
18709
18710 \begin_layout Standard
18711 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18712  package—no guarantees are made for older versions.
18713 \end_layout
18714
18715 \begin_layout Standard
18716 For introducing your own external commands consult vc-command in the manual
18717  of LyX functions.
18718 \end_layout
18719
18720 \begin_layout Subsection
18721 RCS commands in LyX
18722 \end_layout
18723
18724 \begin_layout Standard
18725 The following sections describe the RCS commands supported by LyX.
18726  You can find them in the 
18727 \family sans
18728 File\SpecialChar \menuseparator
18729 Version
18730 \begin_inset space ~
18731 \end_inset
18732
18733 Control
18734 \family default
18735  submenu.
18736  LyX was tested against RCS 5.7.
18737 \end_layout
18738
18739 \begin_layout Subsubsection
18740
18741 \family sans
18742 Register
18743 \end_layout
18744
18745 \begin_layout Standard
18746 If your document is not under revision control, this is the only item shown
18747  in the menu.
18748  And if it is under revision control, the 
18749 \family sans
18750 Register
18751 \family default
18752  item is not visible.
18753  
18754 \end_layout
18755
18756 \begin_layout Standard
18757 This command registers your document with RCS (unless you are under the
18758  directory managed by CVS)\SpecialChar \@.
18759  You are asked interactively to supply an initial
18760  description of the document.
18761  The document is now set in Read-Only mode and you have to 
18762 \family sans
18763 Check
18764 \begin_inset space ~
18765 \end_inset
18766
18767 Out
18768 \begin_inset space ~
18769 \end_inset
18770
18771 For
18772 \begin_inset space ~
18773 \end_inset
18774
18775 Edit
18776 \family default
18777 , before making any changes to it.
18778  A document under revision control has a 
18779 \begin_inset Quotes eld
18780 \end_inset
18781
18782 [RCS:<version> <locker>]
18783 \begin_inset Quotes erd
18784 \end_inset
18785
18786  item tagged to the filename in the minibuffer.
18787 \end_layout
18788
18789 \begin_layout Standard
18790 RCS command that is run: 
18791 \family typewriter
18792 ci -q -u -i -t-"<initial description>" <file-name>
18793 \end_layout
18794
18795 \begin_layout Standard
18796 Read 
18797 \family typewriter
18798 man ci
18799 \family default
18800  to understand the switches.
18801  
18802 \end_layout
18803
18804 \begin_layout Subsubsection
18805
18806 \family sans
18807 Check In Changes
18808 \end_layout
18809
18810 \begin_layout Standard
18811 When you are finished editing a file, you check in your changes.
18812  When you do this, you are asked for a description of the changes.
18813  This is stored in the history log.
18814  The version number is bumped, your changes are applied to the master RCS
18815  file, the document is unlocked and set to Read-Only mode.
18816  
18817 \end_layout
18818
18819 \begin_layout Standard
18820 RCS command: 
18821 \family typewriter
18822 ci -q -u -m"<description>" <file-name>
18823 \end_layout
18824
18825 \begin_layout Subsubsection
18826
18827 \family sans
18828 Check Out For Edit
18829 \end_layout
18830
18831 \begin_layout Standard
18832 By doing this you lock the document so that only you can edit it.
18833  This will also make the document Read-Write only for you.
18834  You will usually continue editing for a while and when you are finished
18835  you check in your changes.
18836  The status line is changed to reflect that you have locked the file.
18837  
18838 \end_layout
18839
18840 \begin_layout Standard
18841 RCS command: 
18842 \family typewriter
18843 co -q -l <file-name>
18844 \end_layout
18845
18846 \begin_layout Subsubsection
18847
18848 \family sans
18849 Revert To Repository Version
18850 \end_layout
18851
18852 \begin_layout Standard
18853 This will discard all changes made to the document since the last check
18854  in.
18855  You get a warning before changes are discarded.
18856 \end_layout
18857
18858 \begin_layout Standard
18859 RCS command: 
18860 \family typewriter
18861 co -f -u<version> <file-name>
18862 \end_layout
18863
18864 \begin_layout Subsubsection
18865
18866 \family sans
18867 Undo Last Checkin
18868 \end_layout
18869
18870 \begin_layout Standard
18871 This makes as if the last check in never happened.
18872  No changes are made to the document loaded into LyX, but the last version
18873  is removed from the master RCS file.
18874  
18875 \end_layout
18876
18877 \begin_layout Standard
18878 RCS command: 
18879 \family typewriter
18880 rcs -o<version> <file-name>
18881 \end_layout
18882
18883 \begin_layout Subsubsection
18884
18885 \family sans
18886 Show History
18887 \end_layout
18888
18889 \begin_layout Standard
18890 This show the complete history of the RCS document.
18891  The output of 
18892 \family typewriter
18893 rlog <file-name>
18894 \family default
18895  is shown in a browser.
18896  See 
18897 \family typewriter
18898 man rlog
18899 \family default
18900  for more info.
18901 \end_layout
18902
18903 \begin_layout Subsubsection
18904 Revision info
18905 \end_layout
18906
18907 \begin_layout Standard
18908 LyX supports RCS version number information (only), see 
18909 \begin_inset CommandInset ref
18910 LatexCommand ref
18911 reference "sub:VCS-Revision-Information"
18912
18913 \end_inset
18914
18915  for details.
18916 \end_layout
18917
18918 \begin_layout Subsection
18919 CVS commands in LyX
18920 \end_layout
18921
18922 \begin_layout Standard
18923 CVS is now partially supported by LyX.
18924  You can find the commands in the 
18925 \family sans
18926 File\SpecialChar \menuseparator
18927 Version
18928 \begin_inset space ~
18929 \end_inset
18930
18931 Control
18932 \family default
18933  submenu.
18934  Focus of the development moved to SVN support, so please use it instead
18935  of CVS if possible.
18936 \end_layout
18937
18938 \begin_layout Subsubsection
18939
18940 \family sans
18941 Register
18942 \end_layout
18943
18944 \begin_layout Standard
18945 If your document is not under revision control, this is the only item shown
18946  in the menu.
18947  And if it is under revision control, the 
18948 \family sans
18949 \bar under
18950 R
18951 \bar default
18952 egister
18953 \family default
18954  item is not visible.
18955  
18956 \end_layout
18957
18958 \begin_layout Standard
18959 This command registers in CVS your document ONLY in case you have already
18960  the documents directory under CVS control (in particular 
18961 \family typewriter
18962 CVS/Entries
18963 \family default
18964  file exists).
18965  This means you have to checkout the archive by yourself.
18966  
18967 \end_layout
18968
18969 \begin_layout Standard
18970 Then you are asked interactively to supply an initial description of the
18971  document.
18972  Don't forget that registered file is not yet commited.
18973 \end_layout
18974
18975 \begin_layout Standard
18976 CVS command that is run: 
18977 \family typewriter
18978 cvs -q add -m
18979 \begin_inset Quotes erd
18980 \end_inset
18981
18982 <entered message>" 
18983 \begin_inset Quotes eld
18984 \end_inset
18985
18986 <file-name>
18987 \begin_inset Quotes erd
18988 \end_inset
18989
18990
18991 \end_layout
18992
18993 \begin_layout Standard
18994 Read 
18995 \family typewriter
18996 man svn
18997 \family default
18998  to understand the switches.
18999  
19000 \end_layout
19001
19002 \begin_layout Subsubsection
19003
19004 \family sans
19005 Check In Changes
19006 \end_layout
19007
19008 \begin_layout Standard
19009 When you are finished editing a file, you commit your changes.
19010  When you do this, you are asked for a description of the changes.
19011  After that changes are commited.
19012 \end_layout
19013
19014 \begin_layout Standard
19015 CVS command: 
19016 \family typewriter
19017 cvs -q commit -m"<description>" "<file-name>"
19018 \end_layout
19019
19020 \begin_layout Subsubsection
19021
19022 \family sans
19023 Revert To Repository Version
19024 \end_layout
19025
19026 \begin_layout Standard
19027 This will discard all changes made to the document since the last check
19028  in.
19029  You get a warning before changes are discarded.
19030  Firstly the file is deleted, secondly CVS update command is run.
19031 \end_layout
19032
19033 \begin_layout Standard
19034 CVS command: 
19035 \family typewriter
19036 cvs update 
19037 \begin_inset Quotes eld
19038 \end_inset
19039
19040 <file-name>
19041 \begin_inset Quotes erd
19042 \end_inset
19043
19044
19045 \end_layout
19046
19047 \begin_layout Subsubsection
19048
19049 \family sans
19050 Show History
19051 \end_layout
19052
19053 \begin_layout Standard
19054 This show the complete history of the CVS document.
19055  The output of 
19056 \family typewriter
19057 cvs log 
19058 \begin_inset Quotes eld
19059 \end_inset
19060
19061 <file-name>
19062 \begin_inset Quotes erd
19063 \end_inset
19064
19065
19066 \family default
19067  is shown in a browser.
19068 \end_layout
19069
19070 \begin_layout Subsection
19071 SVN commands in LyX
19072 \end_layout
19073
19074 \begin_layout Standard
19075 SVN is now partially supported by LyX.
19076  You can find the commands in the 
19077 \family sans
19078 File\SpecialChar \menuseparator
19079 Version
19080 \begin_inset space ~
19081 \end_inset
19082
19083 Control
19084 \family default
19085  submenu.
19086  Please note that if you use password protected access to repository via
19087  ssh, you will be asked in terminal window.
19088  LyX was tested against SVN 1.5 and 1.6
19089 \begin_inset Foot
19090 status collapsed
19091
19092 \begin_layout Plain Layout
19093 Most of the commands will work with 1.4 too, see 
19094 \begin_inset CommandInset ref
19095 LatexCommand ref
19096 reference "sub:SVN-Repo-Update"
19097
19098 \end_inset
19099
19100 .
19101 \end_layout
19102
19103 \end_inset
19104
19105
19106 \end_layout
19107
19108 \begin_layout Subsubsection
19109
19110 \family sans
19111 Register
19112 \end_layout
19113
19114 \begin_layout Standard
19115 If your document is not under revision control, this is the only item shown
19116  in the menu.
19117  And if it is under revision control, the 
19118 \family sans
19119 \bar under
19120 R
19121 \bar default
19122 egister
19123 \family default
19124  item is not visible.
19125  
19126 \end_layout
19127
19128 \begin_layout Standard
19129 This command registers in SVN your document ONLY in case you have already
19130  the documents directory under SVN control (in particular 
19131 \family typewriter
19132 .svn/entries
19133 \family default
19134  file exists).
19135  This means you have to checkout the archive by yourself.
19136  
19137 \end_layout
19138
19139 \begin_layout Standard
19140 Then you are asked interactively to supply an initial description of the
19141  document.
19142  Don't forget that registered file is not yet commited.
19143 \end_layout
19144
19145 \begin_layout Standard
19146 SVN command that is run: 
19147 \family typewriter
19148 svn add -q 
19149 \begin_inset Quotes eld
19150 \end_inset
19151
19152 <file-name>
19153 \begin_inset Quotes erd
19154 \end_inset
19155
19156
19157 \end_layout
19158
19159 \begin_layout Standard
19160 Read 
19161 \family typewriter
19162 man svn
19163 \family default
19164  to understand the switches.
19165  
19166 \end_layout
19167
19168 \begin_layout Subsubsection
19169
19170 \family sans
19171 Check In Changes
19172 \end_layout
19173
19174 \begin_layout Standard
19175 When you are finished editing a file, you commit your changes.
19176  When you do this, you are asked for a description of the changes.
19177  After that changes are commited.
19178 \end_layout
19179
19180 \begin_layout Standard
19181 SVN command:
19182 \begin_inset Foot
19183 status collapsed
19184
19185 \begin_layout Plain Layout
19186 In case locking is not enabled.
19187  See Section 
19188 \begin_inset CommandInset ref
19189 LatexCommand ref
19190 reference "subsec:SVN-File-Locking"
19191
19192 \end_inset
19193
19194 .
19195 \end_layout
19196
19197 \end_inset
19198
19199  
19200 \family typewriter
19201 svn commit -q -m"<description>" <file-name>
19202 \end_layout
19203
19204 \begin_layout Subsubsection
19205
19206 \family sans
19207 Check Out For Edit
19208 \end_layout
19209
19210 \begin_layout Standard
19211 Updates the changes of this file from the repository.
19212  Be sure you understand SVN merging and conflicts resolving before using
19213  this function, because all conflicts has to be resolved manually by you!
19214 \end_layout
19215
19216 \begin_layout Standard
19217 SVN command:
19218 \begin_inset Foot
19219 status collapsed
19220
19221 \begin_layout Plain Layout
19222 Ditto.
19223 \end_layout
19224
19225 \end_inset
19226
19227  
19228 \family typewriter
19229 svn update --non-interactive 
19230 \begin_inset Quotes eld
19231 \end_inset
19232
19233 <file-name>
19234 \begin_inset Quotes erd
19235 \end_inset
19236
19237
19238 \end_layout
19239
19240 \begin_layout Subsubsection
19241
19242 \family sans
19243 Revert To Repository Version
19244 \end_layout
19245
19246 \begin_layout Standard
19247 This will discard all changes made to the document since the last check
19248  in.
19249  You get a warning before changes are discarded.
19250  
19251 \end_layout
19252
19253 \begin_layout Standard
19254 SVN command: 
19255 \family typewriter
19256 svn revert -q 
19257 \begin_inset Quotes eld
19258 \end_inset
19259
19260 <file-name>
19261 \begin_inset Quotes erd
19262 \end_inset
19263
19264
19265 \end_layout
19266
19267 \begin_layout Subsubsection
19268 \begin_inset CommandInset label
19269 LatexCommand label
19270 name "sub:SVN-Repo-Update"
19271
19272 \end_inset
19273
19274 Update of the local directory checkout from repository
19275 \begin_inset Foot
19276 status collapsed
19277
19278 \begin_layout Plain Layout
19279 Note that this command will work only with subversion 
19280 \begin_inset Formula $\geqq1.5$
19281 \end_inset
19282
19283
19284 \end_layout
19285
19286 \end_inset
19287
19288
19289 \end_layout
19290
19291 \begin_layout Standard
19292 All the commands above have one shortcomming - they deal with the current
19293  document only.
19294  Once your document contains pictures, includes external 
19295 \begin_inset Flex CharStyle:Code
19296 status collapsed
19297
19298 \begin_layout Plain Layout
19299 .tex
19300 \end_layout
19301
19302 \end_inset
19303
19304  files and so on administration becomes more complicated.
19305  LyX now supports updating the whole tree in which resides the document
19306 \begin_inset Foot
19307 status collapsed
19308
19309 \begin_layout Plain Layout
19310 One need to organize the files structure so that all external files are
19311  in the same directory or subdirectories of the document.
19312  
19313 \end_layout
19314
19315 \end_inset
19316
19317 .
19318  This become especially useful once you cooperate with people which neither
19319  know about subversion management nor they have ambition to commit additional
19320  material to the repository.
19321  
19322 \end_layout
19323
19324 \begin_layout Standard
19325 \begin_inset Flex CharStyle:Code
19326 status collapsed
19327
19328 \begin_layout Plain Layout
19329 Update local directory from repository
19330 \end_layout
19331
19332 \end_inset
19333
19334  command updates the whole directory and in case of merge conflicts local
19335  version of the files are left, so no unintended data loss occurs.
19336  If local changes are detected user is warned before update starts.
19337 \end_layout
19338
19339 \begin_layout Labeling
19340 \labelwidthstring 00.00.0000
19341 SVN
19342 \begin_inset space ~
19343 \end_inset
19344
19345 commands: 
19346 \begin_inset space ~
19347 \end_inset
19348
19349
19350 \begin_inset Newline newline
19351 \end_inset
19352
19353
19354 \begin_inset Flex CharStyle:Code
19355 status collapsed
19356
19357 \begin_layout Plain Layout
19358 svn diff $path
19359 \end_layout
19360
19361 \end_inset
19362
19363  (Ask if changes are detected.)
19364 \begin_inset Newline newline
19365 \end_inset
19366
19367
19368 \begin_inset Flex CharStyle:Code
19369 status collapsed
19370
19371 \begin_layout Plain Layout
19372 svn update --accept mine-full $path
19373 \end_layout
19374
19375 \end_inset
19376
19377
19378 \end_layout
19379
19380 \begin_layout Standard
19381 where 
19382 \begin_inset Flex CharStyle:Code
19383 status collapsed
19384
19385 \begin_layout Plain Layout
19386 $path
19387 \end_layout
19388
19389 \end_inset
19390
19391  stands for the path to the document.
19392 \end_layout
19393
19394 \begin_layout Subsubsection
19395
19396 \family sans
19397 Show History
19398 \end_layout
19399
19400 \begin_layout Standard
19401 This show the complete history of the SVN document.
19402  The output of 
19403 \family typewriter
19404 svn log 
19405 \begin_inset Quotes eld
19406 \end_inset
19407
19408 <file-name>
19409 \begin_inset Quotes erd
19410 \end_inset
19411
19412
19413 \family default
19414  is shown in a browser.
19415 \end_layout
19416
19417 \begin_layout Subsubsection
19418 File Locking
19419 \begin_inset CommandInset label
19420 LatexCommand label
19421 name "subsec:SVN-File-Locking"
19422
19423 \end_inset
19424
19425
19426 \end_layout
19427
19428 \begin_layout Standard
19429 The file exchange through various revision control systems brings the problem
19430  of merge conflicts in case two different users try to edit the same (parts
19431  of) document.
19432  When such conflict happens it needs manual resolving and one reasonable
19433  alternative is to provide some kind of locking mechanism, which guarantees
19434  that only one user is allowed to edit file at the given time.
19435 \end_layout
19436
19437 \begin_layout Standard
19438 SVN has two mechanisms to provide such kind of mutual exclusivity for file
19439  access - locks and automatical setting of write permissions (see sec.
19440  
19441 \begin_inset CommandInset ref
19442 LatexCommand ref
19443 reference "subsec:Automatical-Locking-Property"
19444
19445 \end_inset
19446
19447 ) based on 
19448 \begin_inset Flex CharStyle:Code
19449 status collapsed
19450
19451 \begin_layout Plain Layout
19452 svn:needs-lock
19453 \end_layout
19454
19455 \end_inset
19456
19457  file svn property
19458 \begin_inset Foot
19459 status open
19460
19461 \begin_layout Plain Layout
19462 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
19463 \end_layout
19464
19465 \end_inset
19466
19467 .
19468  In a case this property is detected for a given document LyX starts to
19469  use SVN locks for document editing automatically and the whole check-in/out
19470  mechanism switches to the same regimen as for RCS.
19471  This in particular means there are two different modes how file is used
19472  in LyX:
19473 \end_layout
19474
19475 \begin_layout Itemize
19476 Unlocked state.
19477  The loaded file is in the read-only mode.
19478  For editation on needs to check-out.
19479  
19480 \emph on
19481 Check-out
19482 \emph default
19483  consists of update from repository and gaining write lock.
19484  If the lock is not possible to obtain, we remain in unlocked state.
19485 \end_layout
19486
19487 \begin_layout Itemize
19488 Locked state.
19489  The loaded file is in the 'normal' edit mode.
19490  No other user is allowed to edit the file.
19491  
19492 \emph on
19493 Check-in
19494 \emph default
19495  consists of commiting changes and releasing write-lock.
19496  If no changes have been made to the document, no commit will be produced
19497 \begin_inset Foot
19498 status collapsed
19499
19500 \begin_layout Plain Layout
19501 Don't be puzzled by the fact that you will be asked for commit message anyway.
19502 \end_layout
19503
19504 \end_inset
19505
19506  and only the write-lock will be released.
19507 \end_layout
19508
19509 \begin_layout Standard
19510 SVN commands:
19511 \end_layout
19512
19513 \begin_layout Labeling
19514 \labelwidthstring 00.00.0000
19515 Check-in:
19516 \family typewriter
19517  svn commit -q -m"<description>" "<file-name>"
19518 \begin_inset Newline newline
19519 \end_inset
19520
19521 svn unlock "<file-name>"
19522 \end_layout
19523
19524 \begin_layout Labeling
19525 \labelwidthstring 00.00.0000
19526 Check-out: 
19527 \family typewriter
19528 svn update "<file-name>"
19529 \begin_inset Newline newline
19530 \end_inset
19531
19532 svn lock "<file-name>"
19533 \end_layout
19534
19535 \begin_layout Subsubsection
19536
19537 \family typewriter
19538 \begin_inset CommandInset label
19539 LatexCommand label
19540 name "subsec:Automatical-Locking-Property"
19541
19542 \end_inset
19543
19544
19545 \family default
19546 Automatical Locking Property
19547 \end_layout
19548
19549 \begin_layout Standard
19550 The above mentioned automatical setting of write permissions of the .lyx
19551  file can be set through
19552 \family sans
19553 \bar under
19554  F
19555 \bar default
19556 ile\SpecialChar \menuseparator
19557
19558 \bar under
19559 V
19560 \bar default
19561 ersion
19562 \begin_inset space ~
19563 \end_inset
19564
19565 Control\SpecialChar \menuseparator
19566
19567 \bar under
19568 T
19569 \bar default
19570 oggle locking property
19571 \family default
19572 .
19573  This command is active only when the file is not locked on the svn server
19574  (i.e.
19575  you need to check-out before proceeding).
19576 \end_layout
19577
19578 \begin_layout Labeling
19579 \labelwidthstring 00.00.0000
19580 SVN
19581 \begin_inset space ~
19582 \end_inset
19583
19584 commands:
19585 \end_layout
19586
19587 \begin_layout Labeling
19588 \labelwidthstring 00.00.0000
19589 Set:
19590 \family typewriter
19591  svn propset svn:needs-lock ON "<file-name>"
19592 \end_layout
19593
19594 \begin_layout Labeling
19595 \labelwidthstring 00.00.0000
19596 Unset: 
19597 \family typewriter
19598 svn propdel svn:needs-lock "<file-name>"
19599 \end_layout
19600
19601 \begin_layout Subsubsection
19602 \begin_inset CommandInset label
19603 LatexCommand label
19604 name "sub:VCS-Revision-Information"
19605
19606 \end_inset
19607
19608 Revision Information in Documents
19609 \end_layout
19610
19611 \begin_layout Standard
19612 There are more possibilities how to activate revision information in our
19613  document.
19614 \end_layout
19615
19616 \begin_layout Itemize
19617 LyX supports directly:
19618 \end_layout
19619
19620 \begin_deeper
19621 \begin_layout Itemize
19622 tree revision information (
19623 \begin_inset Flex CharStyle:Code
19624 status collapsed
19625
19626 \begin_layout Plain Layout
19627 vcs-tree-revision
19628 \end_layout
19629
19630 \end_inset
19631
19632 ).
19633  The result is the output of the 
19634 \begin_inset Flex CharStyle:Code
19635 status collapsed
19636
19637 \begin_layout Plain Layout
19638 svnversion
19639 \end_layout
19640
19641 \end_inset
19642
19643  command, the following table gives you an idea, how to read the results.
19644 \end_layout
19645
19646 \begin_layout Standard
19647 \align center
19648 \begin_inset Tabular
19649 <lyxtabular version="3" rows="6" columns="2">
19650 <features tabularvalignment="middle">
19651 <column alignment="center" valignment="top" width="0">
19652 <column alignment="center" valignment="top" width="0">
19653 <row>
19654 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19655 \begin_inset Text
19656
19657 \begin_layout Plain Layout
19658 Output
19659 \end_layout
19660
19661 \end_inset
19662 </cell>
19663 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19664 \begin_inset Text
19665
19666 \begin_layout Plain Layout
19667 Meaning
19668 \end_layout
19669
19670 \end_inset
19671 </cell>
19672 </row>
19673 <row>
19674 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19675 \begin_inset Text
19676
19677 \begin_layout Plain Layout
19678 4123:4168
19679 \end_layout
19680
19681 \end_inset
19682 </cell>
19683 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19684 \begin_inset Text
19685
19686 \begin_layout Plain Layout
19687 mixed revision working copy
19688 \end_layout
19689
19690 \end_inset
19691 </cell>
19692 </row>
19693 <row>
19694 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19695 \begin_inset Text
19696
19697 \begin_layout Plain Layout
19698 4168M
19699 \end_layout
19700
19701 \end_inset
19702 </cell>
19703 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19704 \begin_inset Text
19705
19706 \begin_layout Plain Layout
19707 modified working copy
19708 \end_layout
19709
19710 \end_inset
19711 </cell>
19712 </row>
19713 <row>
19714 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19715 \begin_inset Text
19716
19717 \begin_layout Plain Layout
19718 4123S
19719 \end_layout
19720
19721 \end_inset
19722 </cell>
19723 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19724 \begin_inset Text
19725
19726 \begin_layout Plain Layout
19727 switched working copy
19728 \end_layout
19729
19730 \end_inset
19731 </cell>
19732 </row>
19733 <row>
19734 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19735 \begin_inset Text
19736
19737 \begin_layout Plain Layout
19738 4123P
19739 \end_layout
19740
19741 \end_inset
19742 </cell>
19743 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19744 \begin_inset Text
19745
19746 \begin_layout Plain Layout
19747 partial working copy, from a sparse checkout
19748 \end_layout
19749
19750 \end_inset
19751 </cell>
19752 </row>
19753 <row>
19754 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19755 \begin_inset Text
19756
19757 \begin_layout Plain Layout
19758 4123:4168MS
19759 \end_layout
19760
19761 \end_inset
19762 </cell>
19763 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19764 \begin_inset Text
19765
19766 \begin_layout Plain Layout
19767 mixed revision, modified, switched working copy
19768 \end_layout
19769
19770 \end_inset
19771 </cell>
19772 </row>
19773 </lyxtabular>
19774
19775 \end_inset
19776
19777
19778 \end_layout
19779
19780 \begin_layout Itemize
19781 file revision information.
19782  The result comes from parsing the output of 
19783 \begin_inset Flex CharStyle:Code
19784 status collapsed
19785
19786 \begin_layout Plain Layout
19787 svn
19788 \begin_inset space ~
19789 \end_inset
19790
19791 info
19792 \begin_inset space ~
19793 \end_inset
19794
19795 --xml
19796 \begin_inset space ~
19797 \end_inset
19798
19799 file.lyx
19800 \end_layout
19801
19802 \end_inset
19803
19804 .
19805  Supported flags are:
19806 \end_layout
19807
19808 \begin_deeper
19809 \begin_layout Itemize
19810 version number of the last commit (
19811 \begin_inset Flex CharStyle:Code
19812 status collapsed
19813
19814 \begin_layout Plain Layout
19815 vcs-revision
19816 \end_layout
19817
19818 \end_inset
19819
19820 )
19821 \end_layout
19822
19823 \begin_layout Itemize
19824 author of the last commit (
19825 \begin_inset Flex CharStyle:Code
19826 status collapsed
19827
19828 \begin_layout Plain Layout
19829 vcs-author
19830 \end_layout
19831
19832 \end_inset
19833
19834 )
19835 \end_layout
19836
19837 \begin_layout Itemize
19838 date of the last commit (
19839 \begin_inset Flex CharStyle:Code
19840 status collapsed
19841
19842 \begin_layout Plain Layout
19843 vcs-date
19844 \end_layout
19845
19846 \end_inset
19847
19848 )
19849 \end_layout
19850
19851 \begin_layout Itemize
19852 time of the last commit (
19853 \begin_inset Flex CharStyle:Code
19854 status collapsed
19855
19856 \begin_layout Plain Layout
19857 vcs-time
19858 \end_layout
19859
19860 \end_inset
19861
19862 )
19863 \end_layout
19864
19865 \end_deeper
19866 \begin_layout Standard
19867 You can obtain this info via InsetInfo (e.g.
19868  
19869 \begin_inset Flex CharStyle:Code
19870 status collapsed
19871
19872 \begin_layout Plain Layout
19873 info-insert buffer vcs-date
19874 \end_layout
19875
19876 \end_inset
19877
19878 ).
19879  The information will be available only when you have the file stored under
19880  svn managment (i.e.
19881  the 
19882 \begin_inset Flex CharStyle:Code
19883 status collapsed
19884
19885 \begin_layout Plain Layout
19886 .svn
19887 \end_layout
19888
19889 \end_inset
19890
19891  directory is available with your document).
19892 \end_layout
19893
19894 \end_deeper
19895 \begin_layout Itemize
19896 Another---a hacking one---possibility is to use svn keywords
19897 \begin_inset Foot
19898 status collapsed
19899
19900 \begin_layout Plain Layout
19901 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
19902 \end_layout
19903
19904 \end_inset
19905
19906 .
19907  In short -- you set file keywords property (e.g.
19908  
19909 \family sans
19910 svn propset svn:keywords 'Rev' file.lyx
19911 \family default
19912 ) and then paste keyword ERT
19913 \begin_inset Foot
19914 status collapsed
19915
19916 \begin_layout Plain Layout
19917 This is an easy way how to ensure that LyX won't break the line in the middle
19918  of keyword tag.
19919 \end_layout
19920
19921 \end_inset
19922
19923  tag in your document (e.g.
19924  
19925 \begin_inset ERT
19926 status open
19927
19928 \begin_layout Plain Layout
19929
19930 $Rev$
19931 \end_layout
19932
19933 \end_inset
19934
19935 ).
19936  This way svn client will automatically substitute revision number (e.g.
19937  
19938 \begin_inset ERT
19939 status open
19940
19941 \begin_layout Plain Layout
19942
19943 $Rev: 59 $
19944 \end_layout
19945
19946 \end_inset
19947
19948 ) after each update and commit.
19949  There are more problems with this approach.
19950  Firstly, the '$' character is used in TeX world for math equations, so
19951  any occurence of math formula 
19952 \begin_inset Formula $Rev$
19953 \end_inset
19954
19955  become 
19956 \begin_inset Formula $Rev:59$
19957 \end_inset
19958
19959  in your LyX document.
19960  Similarly for other keywords like Id, Date, Author, etc.
19961  Secondly svn output is dependent on your locales, so its very easy that
19962  svn would produce some problematic strings once Date is used.
19963  Thirdly you get the whole 'Rev: 59' string in your document instead of
19964  the plain number.
19965  Until subversion implements user's custom keywords it will be hard to use
19966  this approach reliably or let LyX to support it directly.
19967 \end_layout
19968
19969 \begin_layout Subsection
19970 SVN and Windows Environment
19971 \end_layout
19972
19973 \begin_layout Quote
19974 My inclination is to say that if the user cannot figure out the command
19975  line operations on their own fairly quickly, they would be well advised
19976  to use TortoiseSVN.
19977  ---P.
19978  A.
19979  Rubin
19980 \end_layout
19981
19982 \begin_layout Subsubsection
19983 Preparation
19984 \end_layout
19985
19986 \begin_layout Standard
19987 In addition to installing LyX, and having access to a Subversion repository,
19988  the user will need to install the Subversion client program.
19989  A Windows installer for the client program is available from 
19990 \begin_inset CommandInset href
19991 LatexCommand href
19992 name "CollabNet"
19993 target "http://www.collab.net/nonav/downloads/subversion/"
19994
19995 \end_inset
19996
19997 .
19998  The user may also want to install 
19999 \begin_inset CommandInset href
20000 LatexCommand href
20001 name "TortoiseSVN"
20002 target "http://tortoisesvn.tigris.org/"
20003
20004 \end_inset
20005
20006 , which integrates Subversion operations into the context (rightclick) menu
20007  of Windows Explorer.
20008  Operations done outside LyX will typically be more convenient using the
20009  Explorer context menu.
20010  Note that TortoiseSVN is not a replacement for the client program, which
20011  is what LyX itself will use.
20012 \end_layout
20013
20014 \begin_layout Subsubsection
20015 Bringing a document under Subversion control
20016 \end_layout
20017
20018 \begin_layout Standard
20019 Before a LyX document can be brought under version control in Subversion,
20020  its parent directory needs to be under version control.
20021  If the document is being added to a project already in the repository,
20022  this is accomplished by checking the project out to the directory where
20023  the new document will be placed.
20024  If the project itself is not yet under version control (for instance, if
20025  this document starts a new project), the directory must be imported into
20026  the repository.
20027  This is done outside LyX.
20028  Both import and checkout are easily accomplished from the Explorer context
20029  menu using TortoiseSVN, or alternatively can be done using the command
20030  line client at a DOS prompt.
20031  The procedure for importing the project using TortoiseSVN is described
20032  below, assuming an existing repository and a new project being started
20033  in 
20034 \family typewriter
20035 C:
20036 \backslash
20037 new project
20038 \family default
20039 .
20040  For information on using the Subversion client program, run 
20041 \family typewriter
20042 svn --help 
20043 \family default
20044 in a DOS shell.
20045 \end_layout
20046
20047 \begin_layout Enumerate
20048 Locate 
20049 \family typewriter
20050 C:
20051 \backslash
20052 new project 
20053 \family default
20054 in Windows Explorer, right click it, and select 
20055 \family typewriter
20056 TortoiseSVN > Repo-browser
20057 \family default
20058 .
20059  If necessary, adjust the URL for the repository, then click OK.
20060 \end_layout
20061
20062 \begin_layout Enumerate
20063 Right click the level of the repository under which you want to place the
20064  new project folder (typically the top level) and click 
20065 \family typewriter
20066 Create folder\SpecialChar \ldots{}
20067
20068 \family default
20069  Supply a name for the project folder and click OK.
20070  Add a message for the log file if desired, then click OK again.
20071  The new project folder should appear in the repository.
20072  Finally, click OK again to exit the repository browser.
20073 \end_layout
20074
20075 \begin_layout Enumerate
20076 Once again right click 
20077 \family typewriter
20078 C:
20079 \backslash
20080 new project
20081 \family default
20082 , this time selecting SVN Checkout\SpecialChar \ldots{}
20083  Select the URL of the project folder
20084  you just created in the repository, and set the checkout directory to 
20085 \family typewriter
20086 C:
20087 \backslash
20088 new project.
20089
20090 \family default
20091  Click OK.
20092  You will be warned about a non-empty folder; click OK to proceed.
20093  You should now have a 
20094 \family typewriter
20095 .svn
20096 \family default
20097  directory under 
20098 \family typewriter
20099 C:
20100 \backslash
20101 new project.
20102 \end_layout
20103
20104 \begin_layout Enumerate
20105 Create or open your document in LyX and click 
20106 \family sans
20107 \bar under
20108 F
20109 \bar default
20110 ile\SpecialChar \menuseparator
20111
20112 \bar under
20113 V
20114 \bar default
20115 ersion
20116 \begin_inset space ~
20117 \end_inset
20118
20119 Control\SpecialChar \menuseparator
20120
20121 \bar under
20122 R
20123 \bar default
20124 egister.
20125  
20126 \family default
20127 Add a log message and click OK to commit the document to version control.
20128 \end_layout
20129
20130 \begin_layout Standard
20131 From this point onward, you should have full functionality in the 
20132 \family sans
20133 \bar under
20134 F
20135 \bar default
20136 ile\SpecialChar \menuseparator
20137
20138 \bar under
20139 V
20140 \bar default
20141 ersion
20142 \begin_inset space ~
20143 \end_inset
20144
20145 Control
20146 \family default
20147  menu.
20148  You also have the option of checking the document in and out, viewing its
20149  history, etc.
20150  using the TortoiseSVN context menu in Windows Explorer or the Subversion
20151  client program from a command prompt.
20152 \end_layout
20153
20154 \begin_layout Subsubsection
20155 SSH tunel used with SVN under Windows
20156 \end_layout
20157
20158 \begin_layout Standard
20159 Compared to linux setting svn client to communicate over ssh under Windows
20160  is rather troublesome task.
20161  We will at least make some hints how to setup client side but former knowledge
20162  about ssh and Windows command line is needed, also be prepared for a great
20163  deal of frustration...
20164 \end_layout
20165
20166 \begin_layout Enumerate
20167 Get svn client for windows, as described in previous sections.
20168  When it is fresh install run some svn command (e.g.
20169  
20170 \begin_inset Flex CharStyle:Code
20171 status collapsed
20172
20173 \begin_layout Plain Layout
20174 svn --version
20175 \end_layout
20176
20177 \end_inset
20178
20179 ) to have created config files, which you will need to change later on.
20180 \end_layout
20181
20182 \begin_layout Enumerate
20183 Choose ssh client for Windows.
20184  There are more possibilities, we will use the one from Putty tools
20185 \begin_inset Foot
20186 status open
20187
20188 \begin_layout Plain Layout
20189 \begin_inset Flex URL
20190 status collapsed
20191
20192 \begin_layout Plain Layout
20193
20194 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20195 \end_layout
20196
20197 \end_inset
20198
20199
20200 \end_layout
20201
20202 \end_inset
20203
20204 .
20205  You will need to automatize connection, so client doesn't ask for any password
20206  from you.
20207  To keep things easy we will use only keys without any additional password
20208  protection etc.
20209 \end_layout
20210
20211 \begin_deeper
20212 \begin_layout Enumerate
20213 Generate keys by 
20214 \begin_inset Flex CharStyle:Code
20215 status collapsed
20216
20217 \begin_layout Plain Layout
20218 puttygen
20219 \end_layout
20220
20221 \end_inset
20222
20223 .
20224  Save your private .ppk key file and put the public one on the server side.
20225  In case the SVN server runs on linux, note that the format of the public
20226  key is not compatible with linux openssh and you will need to direcly copy-past
20227 e the key from the “
20228 \emph on
20229 Public key for pasting into OpenSSH authorized_keys file
20230 \emph default
20231 :” edit field into the server's 
20232 \begin_inset Flex CharStyle:Code
20233 status collapsed
20234
20235 \begin_layout Plain Layout
20236 ~/.ssh/authorized_keys
20237 \end_layout
20238
20239 \end_inset
20240
20241
20242 \begin_inset Flex CharStyle:Code
20243 status collapsed
20244
20245 \begin_layout Plain Layout
20246 authorized_keys2
20247 \end_layout
20248
20249 \end_inset
20250
20251  file.
20252 \end_layout
20253
20254 \begin_layout Enumerate
20255 Get the Putty's 
20256 \begin_inset Flex CharStyle:Code
20257 status collapsed
20258
20259 \begin_layout Plain Layout
20260 plink
20261 \end_layout
20262
20263 \end_inset
20264
20265 .
20266  In the SVN config file
20267 \begin_inset Foot
20268 status collapsed
20269
20270 \begin_layout Plain Layout
20271 Exact path depends on Windows version, usually somewhere around 
20272 \begin_inset Flex CharStyle:Code
20273 status collapsed
20274
20275 \begin_layout Plain Layout
20276 c:
20277 \backslash
20278 Documents and Settings
20279 \backslash
20280 user
20281 \backslash
20282 Application Data
20283 \backslash
20284 Subversion
20285 \backslash
20286 config
20287 \end_layout
20288
20289 \end_inset
20290
20291  / 
20292 \begin_inset Flex CharStyle:Code
20293 status collapsed
20294
20295 \begin_layout Plain Layout
20296 AppData
20297 \backslash
20298 Roaming
20299 \backslash
20300 Subversion
20301 \end_layout
20302
20303 \end_inset
20304
20305 .
20306 \end_layout
20307
20308 \end_inset
20309
20310 , section [tunnels], setup ssh command, e.g.
20311  
20312 \begin_inset Flex CharStyle:Code
20313 status collapsed
20314
20315 \begin_layout Plain Layout
20316 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20317 \end_layout
20318
20319 \end_inset
20320
20321 .
20322 \begin_inset Foot
20323 status collapsed
20324
20325 \begin_layout Plain Layout
20326 It will usually take a lot of time to get exact command right and it depends
20327  on many things.
20328  For example do not have some remote server saved as a default session in
20329  Putty etc.
20330  If things fail, try to connect via plink without SVN first.
20331 \end_layout
20332
20333 \end_inset
20334
20335
20336 \end_layout
20337
20338 \end_deeper
20339 \begin_layout Enumerate
20340 Checkout the SVN archive, e.g.
20341  
20342 \begin_inset Flex CharStyle:Code
20343 status collapsed
20344
20345 \begin_layout Plain Layout
20346 svn co svn+ssh://user@server/repository_path
20347 \end_layout
20348
20349 \end_inset
20350
20351 .
20352 \end_layout
20353
20354 \begin_layout Subsubsection
20355
20356 \change_inserted 1 1274738367
20357 End-of-Line Conversions
20358 \end_layout
20359
20360 \begin_layout Standard
20361
20362 \change_inserted 1 1274738433
20363 When the collsraborators are mixing Linux and Windows environments, LyX
20364  will use different line endings inside the .lyx files.
20365  This is not problem as far as LyX functionality is concerned, but the commit
20366  diffs will be huge and merge-conflicts prone.
20367  Fortunately SVN itself knows
20368 \begin_inset Foot
20369 status collapsed
20370
20371 \begin_layout Plain Layout
20372
20373 \change_inserted 1 1274738731
20374 \begin_inset Flex URL
20375 status collapsed
20376
20377 \begin_layout Plain Layout
20378
20379 \change_inserted 1 1274738731
20380
20381 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20382 \change_unchanged
20383
20384 \end_layout
20385
20386 \end_inset
20387
20388
20389 \change_unchanged
20390
20391 \end_layout
20392
20393 \end_inset
20394
20395  how to deal with CR/LF problems when switching .lyx files to the 
20396 \begin_inset Flex CharStyle:Code
20397 status collapsed
20398
20399 \begin_layout Plain Layout
20400
20401 \change_inserted 1 1274738399
20402 native
20403 \change_unchanged
20404
20405 \end_layout
20406
20407 \end_inset
20408
20409  mode.
20410 \begin_inset Foot
20411 status collapsed
20412
20413 \begin_layout Plain Layout
20414
20415 \change_inserted 1 1274738457
20416 For the lazy guys: 
20417 \begin_inset Flex CharStyle:Code
20418 status collapsed
20419
20420 \begin_layout Plain Layout
20421
20422 \change_inserted 1 1274738457
20423 svn propset svn:eol-style native FILE_NAME
20424 \change_unchanged
20425
20426 \end_layout
20427
20428 \end_inset
20429
20430
20431 \change_unchanged
20432
20433 \end_layout
20434
20435 \end_inset
20436
20437
20438 \end_layout
20439
20440 \begin_layout Subsection
20441 Further tuning
20442 \end_layout
20443
20444 \begin_layout Standard
20445 With the recent addition of the vc-command function LyX power users are
20446  allowed to create their own commands for revision control.
20447 \end_layout
20448
20449 \begin_layout Standard
20450 As an example you can see how two TortoiseSVN commands could be integrated
20451  directly:
20452 \end_layout
20453
20454 \begin_layout Description
20455 Commit: 
20456 \begin_inset Flex CharStyle:Code
20457 status collapsed
20458
20459 \begin_layout Plain Layout
20460 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
20461 \end_layout
20462
20463 \end_inset
20464
20465
20466 \end_layout
20467
20468 \begin_layout Description
20469 Revert: 
20470 \begin_inset Flex CharStyle:Code
20471 status collapsed
20472
20473 \begin_layout Plain Layout
20474 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
20475 \end_layout
20476
20477 \end_inset
20478
20479
20480 \end_layout
20481
20482 \begin_layout Section
20483 Literate Programming
20484 \end_layout
20485
20486 \begin_layout Standard
20487 Updated by 
20488 \noun on
20489 Kayvan Sylvan 
20490 \noun default
20491 (kayvan@sylvan.com)
20492 \noun on
20493
20494 \noun default
20495 original documentation written by 
20496 \noun on
20497 Edmar Wienskoski Jr.
20498
20499 \noun default
20500  (edmar-w-jr@technologist.com)
20501 \end_layout
20502
20503 \begin_layout Subsection
20504 Introduction
20505 \end_layout
20506
20507 \begin_layout Standard
20508 The main purpose of this documentation is to show you how to use LyX for
20509  literate programming.
20510  Where it is assumed that you are familiar with this programming technique,
20511  and know what 
20512 \begin_inset Quotes eld
20513 \end_inset
20514
20515 tangling
20516 \begin_inset Quotes erd
20517 \end_inset
20518
20519  and 
20520 \begin_inset Quotes eld
20521 \end_inset
20522
20523 weaving
20524 \begin_inset Quotes erd
20525 \end_inset
20526
20527  means.
20528  If that is not the case, please follow the web links provided in the following
20529  sections.
20530  There is a lot of good documentation out there covering old development
20531  history to the latest tools tips.
20532 \end_layout
20533
20534 \begin_layout Standard
20535 It is also assumed that you are familiar with LyX itself to a point that
20536  you are comfortable changing your LyX preferences, and X resources file.
20537  If that is not the case please refer to other LyX documentation to cover
20538  your specific needs.
20539 \end_layout
20540
20541 \begin_layout Subsection
20542 Literate Programming
20543 \end_layout
20544
20545 \begin_layout Standard
20546 From the Literate Programming FAQ: 
20547 \end_layout
20548
20549 \begin_layout Quotation
20550 Literate programming is the combination of documentation and source together
20551  in a fashion suited for reading by human beings.
20552  In fact, literate programs should be enjoyable reading, even inviting!
20553  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
20554  and documentation in a single file.
20555  Literate programming tools then parse the file to produce either readable
20556  documentation or compilable source.
20557  The WEB style of literate programming was created by D.
20558 \begin_inset space \thinspace{}
20559 \end_inset
20560
20561 g.
20562  Knuth during the development of his TeX typesetting software.
20563  
20564 \end_layout
20565
20566 \begin_layout Standard
20567 Another excerpt says:
20568 \end_layout
20569
20570 \begin_layout Quotation
20571
20572 \emph on
20573 How is literate programming different from verbose commenting?
20574 \end_layout
20575
20576 \begin_layout Quotation
20577 There are three distinguishing characteristics.
20578  In order of importance, they are: 
20579 \end_layout
20580
20581 \begin_deeper
20582 \begin_layout Itemize
20583 flexible order of elaboration 
20584 \end_layout
20585
20586 \begin_layout Itemize
20587 automatic support for browsing 
20588 \end_layout
20589
20590 \begin_layout Itemize
20591 typeset documentation, especially diagrams and mathematics 
20592 \end_layout
20593
20594 \end_deeper
20595 \begin_layout Standard
20596 Now that I sparked your curiosity, take a look in the references.
20597 \end_layout
20598
20599 \begin_layout Subsubsection
20600 References
20601 \end_layout
20602
20603 \begin_layout Standard
20604 The complete Literate Programming FAQ can be found at:
20605 \end_layout
20606
20607 \begin_layout Quote
20608 Literate Programming FAQ 
20609 \begin_inset Flex URL
20610 status collapsed
20611
20612 \begin_layout Plain Layout
20613
20614 http://shelob.ce.ttu.edu/daves/lpfaq/faq.html
20615 \end_layout
20616
20617 \end_inset
20618
20619
20620 \end_layout
20621
20622 \begin_layout Standard
20623 The FAQ lists 23 (twenty three!) different literate programming tools.
20624  Where some are specialized or 
20625 \begin_inset Quotes eld
20626 \end_inset
20627
20628 tailored
20629 \begin_inset Quotes erd
20630 \end_inset
20631
20632  for particular programming languages, while other have general scope.
20633  I selected 
20634 \noun on
20635 Noweb
20636 \noun default
20637  for my own use for several reasons:
20638 \end_layout
20639
20640 \begin_layout Itemize
20641 It can generate the documentation either in LaTeX or HTML.
20642 \end_layout
20643
20644 \begin_layout Itemize
20645 It has a open architecture, i.
20646 \begin_inset space \thinspace{}
20647 \end_inset
20648
20649 g.
20650 \begin_inset space \space{}
20651 \end_inset
20652
20653 it is easy to plug in new filters and to perform special processing that
20654  you may need.
20655  
20656 \end_layout
20657
20658 \begin_layout Itemize
20659 There is a good selection of filters available already (the HTML is one
20660  of them).
20661 \end_layout
20662
20663 \begin_layout Itemize
20664 It is free.
20665 \end_layout
20666
20667 \begin_layout Standard
20668 The Noweb web page can be found at: 
20669 \end_layout
20670
20671 \begin_layout Quote
20672 Noweb home page 
20673 \begin_inset Flex URL
20674 status collapsed
20675
20676 \begin_layout Plain Layout
20677
20678 http://www.cs.virginia.edu/~nr/noweb/
20679 \end_layout
20680
20681 \end_inset
20682
20683
20684 \end_layout
20685
20686 \begin_layout Standard
20687 Starting from there you can reach many other interesting links and even
20688  some literate program examples.
20689 \end_layout
20690
20691 \begin_layout Subsection
20692 LyX and Literate Programming
20693 \end_layout
20694
20695 \begin_layout Standard
20696 The LyX support for Literate Programming is provided by using the generic
20697  LyX converters mechanism.
20698  This support is provided in a 
20699 \begin_inset Quotes eld
20700 \end_inset
20701
20702 Noweb independent
20703 \begin_inset Quotes erd
20704 \end_inset
20705
20706  way, i.
20707 \begin_inset space \thinspace{}
20708 \end_inset
20709
20710 g.
20711 \begin_inset space \space{}
20712 \end_inset
20713
20714 you will be able to use this new LyX feature with some other literate programmin
20715 g tool of your choice by just changing your LyX preferences.
20716 \end_layout
20717
20718 \begin_layout Subsubsection
20719 Generating documents and code (weaving and tangling)
20720 \end_layout
20721
20722 \begin_layout Paragraph
20723 Selecting the document class
20724 \end_layout
20725
20726 \begin_layout Standard
20727 If you have installed Noweb and LyX successfully, whenever you open a new
20728  document or try to change the document class of an existing one, you will
20729  find that there are three new document classes available:
20730 \end_layout
20731
20732 \begin_layout Itemize
20733 Article (Noweb)
20734 \end_layout
20735
20736 \begin_layout Itemize
20737 Book (Noweb)
20738 \end_layout
20739
20740 \begin_layout Itemize
20741 Report (Noweb)
20742 \end_layout
20743
20744 \begin_layout Standard
20745 You must select one of them to create your literate documents from.
20746  
20747 \end_layout
20748
20749 \begin_layout Standard
20750 Note that literate documents are not limited to these three classes.
20751  New classes can be generated from other styles like letter or in combination
20752  with other class variations like Article (AMS).
20753  If you have special needs that cannot be covered by one of the existing
20754  classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
20755  will arrange to insert a new entry, or teach you how to do it.
20756 \begin_inset Foot
20757 status collapsed
20758
20759 \begin_layout Plain Layout
20760 It is very simple, it involves the creation of a file with four lines, and
20761  re-running of the auto configuration.
20762 \end_layout
20763
20764 \end_inset
20765
20766  Moreover, if you use a literate tool other than Noweb you may need to create
20767  a new set of document classes for it.
20768 \end_layout
20769
20770 \begin_layout Paragraph
20771 Typing code in
20772 \end_layout
20773
20774 \begin_layout Standard
20775 LyX enables you to write code with a layout named 
20776 \noun on
20777 Scrap
20778 \noun default
20779 .
20780 \begin_inset Foot
20781 status collapsed
20782
20783 \begin_layout Plain Layout
20784 The equivalent Noweb term is 
20785 \begin_inset Quotes eld
20786 \end_inset
20787
20788 Chunk
20789 \begin_inset Quotes erd
20790 \end_inset
20791
20792 .
20793  For historical reasons, I got used to the term 
20794 \begin_inset Quotes eld
20795 \end_inset
20796
20797 scrap
20798 \begin_inset Quotes erd
20799 \end_inset
20800
20801  introduced by other literate tool named Nuweb, which I used for many years
20802  before rendering myself to Noweb.
20803 \end_layout
20804
20805 \end_inset
20806
20807  Noweb delimits scraps like this:
20808 \end_layout
20809
20810 \begin_layout LyX-Code
20811 <<My scrap>>=
20812 \end_layout
20813
20814 \begin_layout LyX-Code
20815   code
20816 \end_layout
20817
20818 \begin_layout LyX-Code
20819   more code
20820 \end_layout
20821
20822 \begin_layout LyX-Code
20823   even more code
20824 \end_layout
20825
20826 \begin_layout LyX-Code
20827   @
20828 \end_layout
20829
20830 \begin_layout Standard
20831 The problem is that whatever is written in between the << and the 
20832 \family typewriter
20833 @
20834 \family default
20835  must be taken literally, i.
20836 \begin_inset space \thinspace{}
20837 \end_inset
20838
20839 g.
20840 \begin_inset space \space{}
20841 \end_inset
20842
20843 LyX should be prevented from making any special interpretation of what has
20844  been written.
20845  This is handled by a special layout named Scrap, that works like a normal
20846  paragraph but has a free spacing capability.
20847 \end_layout
20848
20849 \begin_layout Standard
20850 The down side of the Scrap paragraph layout is that consecutive paragraphs
20851  of code will be spaced with one empty line in the source code and also
20852  in the printed documentation.
20853  The work around is to enter each line of code within a single Scrap, with
20854  a newline (ctrl-return).
20855  The example above will look like this:
20856 \begin_inset Foot
20857 status collapsed
20858
20859 \begin_layout Plain Layout
20860 If you have a printed version of this document you will not see any difference
20861  between the previous example and this one.
20862 \end_layout
20863
20864 \end_inset
20865
20866
20867 \end_layout
20868
20869 \begin_layout LyX-Code
20870 <<My scrap>>=
20871 \begin_inset Newline newline
20872 \end_inset
20873
20874   code
20875 \begin_inset Newline newline
20876 \end_inset
20877
20878   more code
20879 \begin_inset Newline newline
20880 \end_inset
20881
20882   even more code
20883 \begin_inset Newline newline
20884 \end_inset
20885
20886   @
20887 \end_layout
20888
20889 \begin_layout Standard
20890 This layout works fine.
20891  The only real inconvenience is that you have to type ctrl-return instead
20892  of a plain return.
20893 \begin_inset Foot
20894 status collapsed
20895
20896 \begin_layout Plain Layout
20897 It is in my list of 
20898 \begin_inset Quotes eld
20899 \end_inset
20900
20901 improvements
20902 \begin_inset Quotes erd
20903 \end_inset
20904
20905  to fix that.
20906 \end_layout
20907
20908 \end_inset
20909
20910
20911 \end_layout
20912
20913 \begin_layout Standard
20914 As a special note, you can also use the 
20915 \begin_inset Quotes eld
20916 \end_inset
20917
20918 %def
20919 \begin_inset Quotes erd
20920 \end_inset
20921
20922  construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
20923 rence:
20924 \end_layout
20925
20926 \begin_layout LyX-Code
20927 <<My scrap>>=
20928 \begin_inset Newline newline
20929 \end_inset
20930
20931   def some_function(args):
20932 \begin_inset Newline newline
20933 \end_inset
20934
20935     "This is the doc string for this function."
20936 \begin_inset Newline newline
20937 \end_inset
20938
20939     print "My args: ", args
20940 \end_layout
20941
20942 \begin_layout LyX-Code
20943 @ %def some_function
20944 \end_layout
20945
20946 \begin_layout Standard
20947 For an example of this usage and the resulting cross-reference output, look
20948  at the Literate python program in 
20949 \emph on
20950 LIBDIR/examples/listerrors.lyx
20951 \emph default
20952  which should make this all clear.
20953 \end_layout
20954
20955 \begin_layout Paragraph
20956 Generating the documentation
20957 \end_layout
20958
20959 \begin_layout Standard
20960 At this point you already have a new document file with a proper document
20961  class, and with some code and text on it.
20962  How do I print it? The answer is simple, you select 
20963 \family sans
20964 View\SpecialChar \menuseparator
20965 DVI,
20966 \family default
20967  etc.
20968  Just like you would do for a plain document.
20969  No special procedure is required.
20970 \end_layout
20971
20972 \begin_layout Standard
20973 To help orientate you, I will now explain what happens inside LyX:
20974 \end_layout
20975
20976 \begin_layout Enumerate
20977 When the 
20978 \family sans
20979 Update\SpecialChar \menuseparator
20980 DVI
20981 \family default
20982  menu option is chosen, a LaTeX file is generated.
20983  
20984 \end_layout
20985
20986 \begin_deeper
20987 \begin_layout Standard
20988 If the document is of any literate class the generated file will be named
20989  with an extension name defined by the 
20990 \begin_inset Quotes eld
20991 \end_inset
20992
20993 literate
20994 \begin_inset Quotes erd
20995 \end_inset
20996
20997  format (defined in the Preferences panel), otherwise the file will have
20998  the usual 
20999 \family typewriter
21000 .tex
21001 \family default
21002  extension.
21003 \end_layout
21004
21005 \end_deeper
21006 \begin_layout Enumerate
21007 Note that the only difference so far is in the name of the file, no special
21008  processing is required by LyX.
21009  Given that you formatted the code using the Scrap layout that, by itself,
21010  takes care of the business.
21011 \end_layout
21012
21013 \begin_layout Enumerate
21014 If the document is of any literate class LyX will then use the internal
21015  LyX to Noweb converter, followed by the Noweb to LaTeX converter
21016 \begin_inset Foot
21017 status collapsed
21018
21019 \begin_layout Plain Layout
21020 The converters are defined in the 
21021 \family sans
21022 Tools\SpecialChar \menuseparator
21023 Preferences
21024 \family default
21025  panel, under the 
21026 \begin_inset Quotes eld
21027 \end_inset
21028
21029 Conversion
21030 \begin_inset Quotes erd
21031 \end_inset
21032
21033  tab.
21034  See section 
21035 \emph on
21036 Converters
21037 \emph default
21038  of the 
21039 \emph on
21040 Customization
21041 \emph default
21042  manual for general information about converters.
21043 \end_layout
21044
21045 \end_inset
21046
21047  to generate the LaTeX file.
21048 \end_layout
21049
21050 \begin_deeper
21051 \begin_layout Standard
21052 Otherwise it will just skip this step.
21053 \end_layout
21054
21055 \end_deeper
21056 \begin_layout Enumerate
21057 Finally, LaTeX is invoked and the regular post processing continues as in
21058  a plain document.
21059 \end_layout
21060
21061 \begin_layout Standard
21062 Independence from a particular 
21063 \begin_inset Quotes eld
21064 \end_inset
21065
21066 literate tool
21067 \begin_inset Quotes erd
21068 \end_inset
21069
21070  is easily achieved by changing the commands that are run by the various
21071  converters.
21072 \end_layout
21073
21074 \begin_layout Paragraph
21075 Generating the code
21076 \end_layout
21077
21078 \begin_layout Standard
21079 When the build menu option is chosen or the corresponding button in the
21080  toolbar is pressed, a LaTeX file is generated just like step 1 above.
21081  Next, LyX invokes the 
21082 \family typewriter
21083 Noweb->Program
21084 \family default
21085  converter.
21086  This converter needs to be defined by the user and is not installed by
21087  default, though the Program format is.
21088  This converter (like any other converter) will have two parts:
21089 \end_layout
21090
21091 \begin_layout Enumerate
21092 The converter program itself.
21093  This program performs the conversion from the one format to the other (in
21094  this case, from the Noweb format to the Program pseudo-format).
21095 \end_layout
21096
21097 \begin_layout Enumerate
21098 The error log parser.
21099  This is a program whose sole purpose is to rewrite error messages in a
21100  format that LyX understands.
21101  This makes it possible for LyX to place error boxes in the right places
21102  in the file buffer.
21103 \end_layout
21104
21105 \begin_layout Standard
21106 The first part, the 
21107 \begin_inset Quotes eld
21108 \end_inset
21109
21110 Converter
21111 \begin_inset Quotes erd
21112 \end_inset
21113
21114  setting, should be set to 
21115 \begin_inset Quotes eld
21116 \end_inset
21117
21118
21119 \family typewriter
21120 build-script $$i
21121 \family default
21122
21123 \begin_inset Quotes erd
21124 \end_inset
21125
21126 .
21127  This basically means that LyX will call 
21128 \begin_inset Quotes eld
21129 \end_inset
21130
21131 build-script
21132 \begin_inset Quotes erd
21133 \end_inset
21134
21135  (a program or script) with the name of the Noweb file (normally a file
21136  in the LyX temp directory).
21137  
21138 \end_layout
21139
21140 \begin_layout Standard
21141 This is an implementation of 
21142 \begin_inset Quotes eld
21143 \end_inset
21144
21145 build-script
21146 \begin_inset Quotes erd
21147 \end_inset
21148
21149  that you can place in a directory on your path:
21150 \end_layout
21151
21152 \begin_layout LyX-Code
21153 #!/bin/sh
21154 \end_layout
21155
21156 \begin_layout LyX-Code
21157 #
21158 \end_layout
21159
21160 \begin_layout LyX-Code
21161 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21162 \end_layout
21163
21164 \begin_layout Standard
21165 The next part of the converter setting is the 
21166 \begin_inset Quotes eld
21167 \end_inset
21168
21169 Flags
21170 \begin_inset Quotes erd
21171 \end_inset
21172
21173  which is to be set to 
21174 \begin_inset Quotes eld
21175 \end_inset
21176
21177
21178 \family typewriter
21179 parselog=listerrors
21180 \family default
21181
21182 \begin_inset Quotes erd
21183 \end_inset
21184
21185 .
21186  This will run any errors that are generated by the 
21187 \begin_inset Quotes eld
21188 \end_inset
21189
21190 build-script
21191 \begin_inset Quotes erd
21192 \end_inset
21193
21194  process through the 
21195 \begin_inset Quotes eld
21196 \end_inset
21197
21198 listerrors
21199 \begin_inset Quotes erd
21200 \end_inset
21201
21202  program.
21203 \end_layout
21204
21205 \begin_layout Standard
21206 The converter code looks in 
21207 \emph on
21208 MYLYXDIR/scripts
21209 \emph default
21210  first, then in 
21211 \emph on
21212 LIBDIR/scripts
21213 \emph default
21214  then on the path for the 
21215 \begin_inset Quotes eld
21216 \end_inset
21217
21218 listerrors
21219 \begin_inset Quotes erd
21220 \end_inset
21221
21222  program.
21223 \end_layout
21224
21225 \begin_layout Standard
21226 The build will normally take place in LyX's temporary directory, so the
21227  files produced by the conversion will be in that directory.
21228  LyX will copy out what it regards as the `main' file, but the 
21229 \family typewriter
21230 Noweb->Program
21231 \family default
21232  conversion may produce several files, and so most of these would then be
21233  deleted when LyX was closed.
21234  The present solution is to use a `copier',
21235 \begin_inset Foot
21236 status collapsed
21237
21238 \begin_layout Plain Layout
21239 See section 
21240 \emph on
21241 Copiers
21242 \emph default
21243  of the 
21244 \emph on
21245 Customization
21246 \emph default
21247  manual for information on these.
21248 \end_layout
21249
21250 \end_inset
21251
21252  in this case, the 
21253 \family typewriter
21254 ext_copy.py
21255 \family default
21256  script in its default mode, so that the entire contents of the temporary
21257  directory is copied.
21258  More will get copied than is needed, to be sure, but nothing will be lost.
21259  If, however, you know what extensions the generated files will have, this
21260  can be improved by using the 
21261 \family typewriter
21262 -e
21263 \family default
21264  option to 
21265 \family typewriter
21266 ext_copy
21267 \family default
21268 .
21269  This option takes a comma-separated list of extensions to copy.
21270  So, for example, if the conversion will generate only files with the extensions
21271  
21272 \family typewriter
21273 .c
21274 \family default
21275  and 
21276 \family typewriter
21277 .h
21278 \family default
21279 , then the correct definition would be:
21280 \end_layout
21281
21282 \begin_layout LyX-Code
21283 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21284 \end_layout
21285
21286 \begin_layout Standard
21287 The result will be that only files with these two extensions will be copied
21288  out.
21289 \end_layout
21290
21291 \begin_layout Paragraph
21292 Build instructions in the document
21293 \end_layout
21294
21295 \begin_layout Standard
21296 The last piece of the integration between LyX and noweb is the 
21297 \begin_inset Quotes eld
21298 \end_inset
21299
21300 build-script
21301 \begin_inset Quotes erd
21302 \end_inset
21303
21304  scrap.
21305  Generally, the instructions for building your program should be embedded
21306  in a scrap of its own.
21307  The noweb-specific 
21308 \begin_inset Quotes eld
21309 \end_inset
21310
21311 build-script
21312 \begin_inset Quotes erd
21313 \end_inset
21314
21315  above uses the notangle command to look for this scrap (called 
21316 \begin_inset Quotes eld
21317 \end_inset
21318
21319 build-script
21320 \begin_inset Quotes erd
21321 \end_inset
21322
21323 ) and runs its contents through 
21324 \begin_inset Quotes eld
21325 \end_inset
21326
21327 sh
21328 \begin_inset Quotes erd
21329 \end_inset
21330
21331 .
21332 \end_layout
21333
21334 \begin_layout Standard
21335 Typically, such a scrap would look something like this:
21336 \end_layout
21337
21338 \begin_layout LyX-Code
21339 <<build-script>>=
21340 \begin_inset Newline newline
21341 \end_inset
21342
21343 #!/bin/sh
21344 \begin_inset Newline newline
21345 \end_inset
21346
21347
21348 \begin_inset Newline newline
21349 \end_inset
21350
21351 if [ -z "${NOWEB_SOURCE}" ]
21352 \begin_inset Newline newline
21353 \end_inset
21354
21355 then
21356 \begin_inset Newline newline
21357 \end_inset
21358
21359   NOWEB_SOURCE=myfile.nw
21360 \begin_inset Newline newline
21361 \end_inset
21362
21363 fi
21364 \begin_inset Newline newline
21365 \end_inset
21366
21367 [...
21368  code to extract files ...]
21369 \begin_inset Newline newline
21370 \end_inset
21371
21372 [...
21373  code to compile files ...]
21374 \begin_inset Newline newline
21375 \end_inset
21376
21377 @
21378 \end_layout
21379
21380 \begin_layout Standard
21381 Look in 
21382 \emph on
21383 LIBDIR/examples/listerrors.lyx
21384 \emph default
21385  or in 
21386 \emph on
21387 LIBDIR/examples/Literate.lyx
21388 \emph default
21389  which implement two versions of the 
21390 \begin_inset Quotes eld
21391 \end_inset
21392
21393 listerrors
21394 \begin_inset Quotes erd
21395 \end_inset
21396
21397  program for some illustrations of how all of these pieces go together or
21398  in 
21399 \emph on
21400 LIBDIR/examples/noweb2lyx.lyx.
21401
21402 \emph default
21403  Interestingly, these three files show off the language-indepence of the
21404  LyX literate programming support since they are written in Python, C and
21405  Perl respectively.
21406 \end_layout
21407
21408 \begin_layout Subsubsection
21409 Configuring LyX
21410 \end_layout
21411
21412 \begin_layout Standard
21413 All the Literate Programming support is configured by the 
21414 \family sans
21415 Tools\SpecialChar \menuseparator
21416 Preferences
21417 \family default
21418  panel in the 
21419 \begin_inset Quotes eld
21420 \end_inset
21421
21422 Conversion
21423 \begin_inset Quotes erd
21424 \end_inset
21425
21426  tab.
21427  The important parts are:
21428 \end_layout
21429
21430 \begin_layout Description
21431 the
21432 \begin_inset space ~
21433 \end_inset
21434
21435
21436 \begin_inset Quotes eld
21437 \end_inset
21438
21439 literate
21440 \begin_inset Quotes erd
21441 \end_inset
21442
21443
21444 \begin_inset space ~
21445 \end_inset
21446
21447 format Set up via the Formats tab, this is where the Noweb-specific pieces
21448  are set up.
21449  The 
21450 \family sans
21451 GUI Name
21452 \family default
21453  is set to 
21454 \family typewriter
21455 NoWeb
21456 \family default
21457 , the file extension is set to 
21458 \family typewriter
21459 .nw
21460 \family default
21461 .
21462  This tells LyX to create a file with a 
21463 \family typewriter
21464 .nw
21465 \family default
21466  extension in the first step of the conversion process.
21467 \end_layout
21468
21469 \begin_layout Description
21470 the
21471 \begin_inset space ~
21472 \end_inset
21473
21474
21475 \family sans
21476 Program
21477 \family default
21478
21479 \begin_inset space ~
21480 \end_inset
21481
21482 format This is an empty format whose sole purpose is to be the endpoint
21483  of a conversion (which then allows us to set up a converter for it).
21484 \end_layout
21485
21486 \begin_layout Description
21487
21488 \family sans
21489 NoWeb
21490 \family default
21491 ->
21492 \family sans
21493 LaTeX
21494 \family default
21495  This converter performs the 
21496 \begin_inset Quotes eld
21497 \end_inset
21498
21499 weaving
21500 \begin_inset Quotes erd
21501 \end_inset
21502
21503  of the literate document.
21504  For Noweb, it is set to 
21505 \begin_inset Quotes eld
21506 \end_inset
21507
21508
21509 \family typewriter
21510 noweave -delay -index $$i > $$o
21511 \family default
21512
21513 \begin_inset Quotes erd
21514 \end_inset
21515
21516
21517 \end_layout
21518
21519 \begin_layout Description
21520
21521 \family sans
21522 NoWeb
21523 \family default
21524 ->
21525 \family sans
21526 Program
21527 \family default
21528  This performs the 
21529 \begin_inset Quotes eld
21530 \end_inset
21531
21532 tangling step
21533 \begin_inset Quotes erd
21534 \end_inset
21535
21536 .
21537  As stated above, the Converter is set to 
21538 \begin_inset Quotes eld
21539 \end_inset
21540
21541
21542 \family typewriter
21543 build-script $$i
21544 \family default
21545
21546 \begin_inset Quotes erd
21547 \end_inset
21548
21549 , with Flags set to 
21550 \begin_inset Quotes eld
21551 \end_inset
21552
21553
21554 \family typewriter
21555 originaldir,parselog=listerrors
21556 \family default
21557
21558 \begin_inset Quotes erd
21559 \end_inset
21560
21561 .
21562 \end_layout
21563
21564 \begin_layout Subsubsection
21565 Debug extensions
21566 \end_layout
21567
21568 \begin_layout Standard
21569 There is also a new function implemented in the LyX server, the 
21570 \begin_inset Quotes eld
21571 \end_inset
21572
21573 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
21574  
21575 \end_layout
21576
21577 \begin_layout Standard
21578 When debugging code with ddd/gdb, it is possible to invoke a text editor
21579  at the current execution position with a single key stroke.
21580  The default ddd configuration for that is shift-ctrl-V.
21581  It happens that you can define the editor command line invocation in ddd
21582  by accessing the 
21583 \family sans
21584 Edit\SpecialChar \menuseparator
21585 Preferences\SpecialChar \menuseparator
21586 Helpers
21587 \family default
21588  dialog and changing the "Edit Sources" entry.
21589 \end_layout
21590
21591 \begin_layout Standard
21592 I take advantage of the new created LyX server function and this ddd feature,
21593  and set 
21594 \begin_inset Quotes eld
21595 \end_inset
21596
21597 Edit Sources
21598 \begin_inset Quotes erd
21599 \end_inset
21600
21601  to:
21602 \end_layout
21603
21604 \begin_layout LyX-Code
21605 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
21606 \end_layout
21607
21608 \begin_layout Standard
21609 With this, whenever you are using ddd and find a point in the program that
21610  you want to edit, you just press shift-ctrl-V (in the ddd window), and
21611  ddd you forward this information to LyX through the LyX server and then
21612  the LyX window will show the same file with the cursor at the same position
21613  ddd was pointing to.
21614  No more guessing or long scrolling to locate a point in the program back
21615  from debugging !
21616 \end_layout
21617
21618 \begin_layout Standard
21619 Note however that you must enable the LyX server to get this feature working
21620  (it is disabled by default).
21621  You can enable it in 
21622 \family sans
21623 Preferences
21624 \family default
21625  (tabs 
21626 \family sans
21627 Inputs
21628 \family default
21629
21630 \family sans
21631 Paths
21632 \family default
21633 ) by entering in the 
21634 \family sans
21635 LyXserver pipe
21636 \family default
21637  a path like 
21638 \begin_inset Quotes eld
21639 \end_inset
21640
21641
21642 \family typewriter
21643 /home/<your-home-directory>/.lyx/lyxpipe
21644 \family default
21645
21646 \begin_inset Quotes erd
21647 \end_inset
21648
21649
21650 \end_layout
21651
21652 \begin_layout Standard
21653 Read the LyX server documentation in the 
21654 \emph on
21655 Customization Manual
21656 \emph default
21657  for further information.
21658 \end_layout
21659
21660 \begin_layout Subsubsection
21661 Toolbar extensions
21662 \end_layout
21663
21664 \begin_layout Standard
21665 There are six new buttons that can be added to your LyX toolbar.
21666  Five of these buttons are short cuts to layout styles: 
21667 \family sans
21668 Standard
21669 \family default
21670
21671 \family sans
21672 Section
21673 \family default
21674
21675 \family sans
21676 LaTeX
21677 \family default
21678
21679 \family sans
21680 LyX-Code
21681 \family default
21682 , and 
21683 \family sans
21684 Scrap
21685 \family default
21686 .
21687  The last one is a short cut to the 
21688 \begin_inset Quotes eld
21689 \end_inset
21690
21691 Build Program
21692 \begin_inset Quotes erd
21693 \end_inset
21694
21695  File menu entry.
21696  
21697 \end_layout
21698
21699 \begin_layout Standard
21700 LyX has a range of buttons that are available for tool bar customization.
21701  In my toolbar I like to combine the six short cuts above with two more:
21702  One for 
21703 \family sans
21704 View
21705 \family default
21706 \SpecialChar \menuseparator
21707
21708 \family sans
21709 Update
21710 \family default
21711 \SpecialChar \menuseparator
21712
21713 \family sans
21714 DVI
21715 \family default
21716  and the other for 
21717 \family sans
21718 View\SpecialChar \menuseparator
21719 DVI
21720 \family default
21721  File menu entries.
21722  Here is how it looks like:
21723 \end_layout
21724
21725 \begin_layout LyX-Code
21726 Toolbar
21727 \end_layout
21728
21729 \begin_layout LyX-Code
21730   Layouts
21731 \end_layout
21732
21733 \begin_layout LyX-Code
21734   Icon "layout Standard"
21735 \end_layout
21736
21737 \begin_layout LyX-Code
21738   Icon "layout Section"
21739 \end_layout
21740
21741 \begin_layout LyX-Code
21742   Icon "layout LaTeX"
21743 \end_layout
21744
21745 \begin_layout LyX-Code
21746   Icon "layout LyX-Code"
21747 \end_layout
21748
21749 \begin_layout LyX-Code
21750   Icon "layout Scrap"
21751 \end_layout
21752
21753 \begin_layout LyX-Code
21754   Separator
21755 \end_layout
21756
21757 \begin_layout LyX-Code
21758   Icon "buffer-view"
21759 \end_layout
21760
21761 \begin_layout LyX-Code
21762   Icon "buffer-typeset"
21763 \end_layout
21764
21765 \begin_layout LyX-Code
21766   Icon "build-program"
21767 \end_layout
21768
21769 \begin_layout LyX-Code
21770   Separator
21771 \end_layout
21772
21773 \begin_layout LyX-Code
21774 .
21775 \end_layout
21776
21777 \begin_layout LyX-Code
21778 .
21779 \end_layout
21780
21781 \begin_layout LyX-Code
21782 .
21783 \end_layout
21784
21785 \begin_layout LyX-Code
21786 End
21787 \end_layout
21788
21789 \begin_layout Subsubsection
21790 Colors customization
21791 \end_layout
21792
21793 \begin_layout Standard
21794 There are a number of colors in LyX that can be customized in 
21795 \family sans
21796 Preferences
21797 \family default
21798 .
21799  One of the things that bothers people is the LaTeX font color.
21800  The default color is red, since the scraps uses LaTeX font, and there is
21801  a lot of scraps in literate documents, you may get tired of seeing everything
21802  in red.
21803  You can change it by going to the tabs 
21804 \family sans
21805 Look&Feel
21806 \family default
21807
21808 \family sans
21809 Colors.
21810 \end_layout
21811
21812 \begin_layout Standard
21813 The next thing is the visible presence of the newline character in the screen.
21814  You can choose the color of this particular character and make it blend
21815  in the background.
21816  I recommend you choosing a color that is close to the background but not
21817  equal, that way you still can see it is there, but it is not bothering
21818  you anymore.
21819  
21820 \end_layout
21821
21822 \begin_layout Chapter
21823 Secrets of the LaTeX Masters
21824 \begin_inset CommandInset label
21825 LatexCommand label
21826 name "cha:secrets"
21827
21828 \end_inset
21829
21830
21831 \end_layout
21832
21833 \begin_layout Standard
21834 Though LyX is a powerful tool, it cannot hope to support everything that
21835  can be done with pure TeX/LaTeX.
21836  However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
21837  as long as you are not afraid to use that 
21838 \begin_inset Quotes eld
21839 \end_inset
21840
21841 TeX
21842 \begin_inset Quotes erd
21843 \end_inset
21844
21845  button on the toolbar or add things to the LaTeX preamble.
21846  This section lists some tips, tricks, and otherwise cool ideas to give
21847  your document that extra little flair.
21848  
21849 \emph on
21850 Do try this at home
21851 \emph default
21852 , just start with something a little smaller and less important than your
21853  dissertation!
21854 \end_layout
21855
21856 \begin_layout Standard
21857 Most ideas in this section require less common files in your LaTeX installation.
21858  If you have a system like teTeX, most will already be available.
21859  A few, however, will need to be downloaded from one of the CTAN archives.
21860  Often, there are several ways to do something, or several LaTeX style files
21861  which do the same thing.
21862  We do not endorse one choice over another, we simply claim that we have
21863  done a particular task with a particular file.
21864  Put on your wizard hat, keep an eye out for dragons, and let us begin.
21865 \end_layout
21866
21867 \begin_layout Section
21868 Multiple Columns
21869 \end_layout
21870
21871 \begin_layout Standard
21872 by 
21873 \noun on
21874 Lars Gullik Bjønnes
21875 \end_layout
21876
21877 \begin_layout Subsection
21878 Purpose
21879 \end_layout
21880
21881 \begin_layout Standard
21882 The aim for this chapter
21883 \begin_inset Foot
21884 status collapsed
21885
21886 \begin_layout Plain Layout
21887 Editor's note: Lars' original chapter was a masterful description of how
21888  to use the 
21889 \family typewriter
21890 multicol
21891 \family default
21892  package.
21893  However, it was too long to flow smoothly in this document.
21894  I have therefore chosen to excerpt the most important sections here (sorry,
21895  Lars); you can read the original chapter (and more of the story!) in the
21896  example file 
21897 \family typewriter
21898 examples/multicol.lyx
21899 \family default
21900 .
21901  — mer
21902 \end_layout
21903
21904 \end_inset
21905
21906  is to show how the LaTeX package 
21907 \family typewriter
21908 multicol
21909 \family default
21910  can be used in a LyX document.
21911  As LyX doesn't support the 
21912 \family typewriter
21913 multicol
21914 \family default
21915  package natively yet, we have to use some small hacks.
21916  By reading this section it should be obvious how to do this.
21917 \end_layout
21918
21919 \begin_layout Subsection
21920 Limitations 
21921 \end_layout
21922
21923 \begin_layout Standard
21924 The 
21925 \family typewriter
21926 multicol
21927 \family default
21928  package allows switching between one and multicolumn format on the same
21929  page.
21930  Footnotes are handled correctly (for the most part), but will be placed
21931  at the bottom of the page and not under each column.
21932  LaTeX's float mechanism, however, is partly disabled in the current implementat
21933 ion.
21934  At the moment only page-wide floats can be used within the scope of the
21935  environment.
21936 \end_layout
21937
21938 \begin_layout Subsection
21939 Examples
21940 \end_layout
21941
21942 \begin_layout Subsubsection
21943 Two columns
21944 \end_layout
21945
21946 \begin_layout Standard
21947 If you want to have two columns in your text, you have use LaTeX mode to
21948  insert 
21949 \family typewriter
21950
21951 \backslash
21952 begin{multicols}{2}
21953 \family default
21954  at the point where you want the two column layout to start, and then 
21955 \family typewriter
21956
21957 \backslash
21958 end{multicols}
21959 \family default
21960  where you want it to end.
21961  Like this:
21962 \end_layout
21963
21964 \begin_layout Standard
21965 \begin_inset ERT
21966 status open
21967
21968 \begin_layout Plain Layout
21969
21970
21971 \backslash
21972 begin{multicols}{2}
21973 \end_layout
21974
21975 \end_inset
21976
21977
21978 \end_layout
21979
21980 \begin_layout Standard
21981 \noindent
21982
21983 \series bold
21984 \size small
21985 The Adventure of the Empty House
21986 \series default
21987
21988 \begin_inset Newline newline
21989 \end_inset
21990
21991 by 
21992 \noun on
21993 Sir Arthur Conan Doyle
21994 \end_layout
21995
21996 \begin_layout Standard
21997
21998 \size small
21999 It was in the spring of the year 1894 that all London was interested, and
22000  the fashionable world dismayed, by the murder of the Honourable Ronald
22001  Adair under most unusual and inexplicable circumstances.
22002  The public has already learned those particulars of the crime which came
22003  out in the police investigation, but a good deal was suppressed upon that
22004  occasion, since the case for the prosecution was so overwhelmingly strong
22005  that it was not necessary to bring forward all the facts.
22006  Only now, at the end of nearly ten years, am I allowed to supply those
22007  missing links which make up the whole of that remarkable chain.
22008  The crime was of interest in itself, but that interest was as nothing to
22009  me compared to the inconceivable sequel, which afforded me the greatest
22010  shock and surprise of any event in my adventurous life.
22011  Even now, after this long interval, I find myself thrilling as I think
22012  of it, and feeling once more that sudden flood of joy, amazement, and increduli
22013 ty which utterly submerged my mind.
22014  Let me say to that public, which has shown some interest in those glimpses
22015  which I have occasionally given them of the thoughts and actions of a very
22016  remarkable man, that they are not to blame me if I have not shared my knowledge
22017  with them, for I should have considered it my first duty to do so, had
22018  I not been barred by a positive prohibition from his own lips, which was
22019  only withdrawn upon the third of last month.
22020 \end_layout
22021
22022 \begin_layout Standard
22023 \begin_inset ERT
22024 status open
22025
22026 \begin_layout Plain Layout
22027
22028
22029 \backslash
22030 end{multicols}
22031 \end_layout
22032
22033 \end_inset
22034
22035
22036 \end_layout
22037
22038 \begin_layout Subsubsection
22039 Multiple columns
22040 \end_layout
22041
22042 \begin_layout Standard
22043 The same pattern is used when you want more than two columns:
22044 \end_layout
22045
22046 \begin_layout Standard
22047 \begin_inset ERT
22048 status open
22049
22050 \begin_layout Plain Layout
22051
22052
22053 \backslash
22054 begin{multicols}{3}
22055 \end_layout
22056
22057 \end_inset
22058
22059
22060 \end_layout
22061
22062 \begin_layout Standard
22063
22064 \size footnotesize
22065 It can be imagined that my close intimacy with Sherlock Holmes had interested
22066  me deeply in crime, and that after his disappearance I never failed to
22067  read with care the various problems which came before the public.
22068  And I even attempted, more than once, for my own private satisfaction,
22069  to employ his methods in their solution, though with indifferent success.
22070  There was none, however, which appealed to me like this tragedy of Ronald
22071  Adair.
22072  As I read the evidence at the inquest, which led up to a verdict of willful
22073  murder against some person or persons unknown, I realized more clearly
22074  than I had ever done the loss which the community had sustained by the
22075  death of Sherlock Holmes.
22076  There were points about this strange business which would, I was sure,
22077  have specially appealed to him, and the efforts of the police would have
22078  been supplemented, or more probably anticipated, by the trained observation
22079  and the alert mind of the first criminal agent in Europe.
22080  All day, as I drove upon my round, I turned over the case in my mind and
22081  found no explanation which appeared to me to be adequate.
22082  At the risk of telling a twice-told tale, I will recapitulate the facts
22083  as they were known to the public at the conclusion of the inquest.
22084 \end_layout
22085
22086 \begin_layout Standard
22087 \begin_inset ERT
22088 status open
22089
22090 \begin_layout Plain Layout
22091
22092
22093 \backslash
22094 end{multicols}
22095 \end_layout
22096
22097 \end_inset
22098
22099
22100 \end_layout
22101
22102 \begin_layout Standard
22103 You can have more than 3 columns if you want to, but that might not be very
22104  pleasant for the eye.
22105 \end_layout
22106
22107 \begin_layout Subsubsection
22108 Columns inside columns
22109 \end_layout
22110
22111 \begin_layout Standard
22112 You can even have columns inside columns:
22113 \end_layout
22114
22115 \begin_layout Standard
22116 \begin_inset ERT
22117 status open
22118
22119 \begin_layout Plain Layout
22120
22121
22122 \backslash
22123 begin{multicols}{2}
22124 \end_layout
22125
22126 \end_inset
22127
22128
22129 \end_layout
22130
22131 \begin_layout Standard
22132
22133 \size footnotesize
22134 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22135  at that time governor of one of the Australian colonies.
22136  Adair's mother had returned from Australia to undergo the operation for
22137  cataract, and she, her son Ronald, and her daughter Hilda were living together
22138  at 427 Park Lane.
22139 \end_layout
22140
22141 \begin_layout Standard
22142 \begin_inset ERT
22143 status open
22144
22145 \begin_layout Plain Layout
22146
22147
22148 \backslash
22149 begin{multicols}{2}
22150 \end_layout
22151
22152 \end_inset
22153
22154
22155 \end_layout
22156
22157 \begin_layout Standard
22158
22159 \size footnotesize
22160 The youth moved in the best society–had, so far as was known, no enemies
22161  and no particular vices.
22162  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22163  had been broken off by mutual consent some months before, and there was
22164  no sign that it had left any very profound feeling behind it.
22165  For the rest {sic} the man's life moved in a narrow and conventional circle,
22166  for his habits were quiet and his nature unemotional.
22167  Yet it was upon this easy-going young aristocrat that death came, in most
22168  strange and unexpected form, between the hours of ten and eleven-twenty
22169  on the night of March 30, 1894.
22170 \end_layout
22171
22172 \begin_layout Standard
22173 \begin_inset ERT
22174 status open
22175
22176 \begin_layout Plain Layout
22177
22178
22179 \backslash
22180 end{multicols}
22181 \end_layout
22182
22183 \end_inset
22184
22185
22186 \end_layout
22187
22188 \begin_layout Standard
22189
22190 \size footnotesize
22191 Ronald Adair was fond of cards–playing continually, but never for such stakes
22192  as would hurt him.
22193  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22194  It was shown that, after dinner on the day of his death, he had played
22195  a rubber of whist at the latter club.
22196  He had also played there in the afternoon.
22197
22198 \size default
22199  
22200 \size footnotesize
22201 The evidence of those who had played with him– Mr.
22202  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22203  and that there was a fairly equal fall of the cards.
22204  Adair might have lost five pounds, but not more.
22205  His fortune was a considerable one, and such a loss could not in any way
22206  affect him.
22207  He had played nearly every day at one club or other, but he was a cautious
22208  player, and usually rose a winner.
22209  It came out in evidence that, in partnership with Colonel Moran, he had
22210  actually won as much as four hundred and twenty pounds in a sitting, some
22211  weeks before, from Godfrey Milner and Lord Balmoral.
22212  So much for his recent history as it came out at the inquest.
22213 \end_layout
22214
22215 \begin_layout Standard
22216 \begin_inset ERT
22217 status open
22218
22219 \begin_layout Plain Layout
22220
22221
22222 \backslash
22223 end{multicols}
22224 \end_layout
22225
22226 \end_inset
22227
22228
22229 \end_layout
22230
22231 \begin_layout Standard
22232 Please do read the file 
22233 \family typewriter
22234 examples/multicol.lyx
22235 \family default
22236  for more advanced examples including column and header spacing, vertical
22237  separator lines, and more.
22238 \end_layout
22239
22240 \begin_layout Section
22241 Numbering in the 
22242 \family sans
22243 Enumerate
22244 \family default
22245  Paragraph Environment
22246 \begin_inset OptArg
22247 status collapsed
22248
22249 \begin_layout Plain Layout
22250 Numbering in Enumerate
22251 \end_layout
22252
22253 \end_inset
22254
22255
22256 \end_layout
22257
22258 \begin_layout Standard
22259 by 
22260 \noun on
22261 John Weiss
22262 \end_layout
22263
22264 \begin_layout Standard
22265 \begin_inset VSpace bigskip
22266 \end_inset
22267
22268
22269 \end_layout
22270
22271 \begin_layout Standard
22272 \noindent
22273 The default numbering for the 
22274 \family sans
22275 Enumerate
22276 \family default
22277  paragraph environment begins with Arabic numbers and ends with uppercase
22278  letters.
22279  Suppose, however, you wanted a different type of numbering scheme.
22280  Here's a quickie example of how to change the numbering scheme:
22281 \end_layout
22282
22283 \begin_layout LyX-Code
22284
22285 \backslash
22286 renewcommand{
22287 \backslash
22288 labelenumi}{
22289 \backslash
22290 Roman{enumi}.}
22291 \end_layout
22292
22293 \begin_layout LyX-Code
22294
22295 \backslash
22296 renewcommand{
22297 \backslash
22298 labelenumii}{
22299 \backslash
22300 Alph{enumii}.}
22301 \end_layout
22302
22303 \begin_layout LyX-Code
22304
22305 \backslash
22306 renewcommand{
22307 \backslash
22308 labelenumiii}{
22309 \backslash
22310 arabic{enumiii}.}
22311 \end_layout
22312
22313 \begin_layout LyX-Code
22314
22315 \backslash
22316 renewcommand{
22317 \backslash
22318 labelenumiv}{
22319 \backslash
22320 alph{enumiv}.)}
22321 \end_layout
22322
22323 \begin_layout Standard
22324 \SpecialChar \ldots{}
22325  which changes the numbering scheme to uppercase Roman numerals, uppercase
22326  letters, Arabic numbers, and lowercase letter.
22327 \end_layout
22328
22329 \begin_layout Standard
22330 Additionally, the previous example also adds a little bit extra to the numbering
22331  scheme.
22332  For example, the first level label actually looks like: 
22333 \begin_inset Quotes eld
22334 \end_inset
22335
22336 I.
22337 \begin_inset Quotes erd
22338 \end_inset
22339
22340 .
22341  For ease of reading, we'll describe what the numbering schemes look like
22342  using a notation something like this: <
22343 \begin_inset Quotes eld
22344 \end_inset
22345
22346 I.
22347 \begin_inset Quotes erd
22348 \end_inset
22349
22350 ,
22351 \begin_inset space ~
22352 \end_inset
22353
22354
22355 \begin_inset Quotes erd
22356 \end_inset
22357
22358 A.
22359 \begin_inset Quotes erd
22360 \end_inset
22361
22362 ,
22363 \begin_inset space ~
22364 \end_inset
22365
22366
22367 \begin_inset Quotes erd
22368 \end_inset
22369
22370 1.
22371 \begin_inset Quotes erd
22372 \end_inset
22373
22374 ,
22375 \begin_inset space ~
22376 \end_inset
22377
22378
22379 \begin_inset Quotes eld
22380 \end_inset
22381
22382 a.)
22383 \begin_inset Quotes erd
22384 \end_inset
22385
22386 >.
22387  
22388 \end_layout
22389
22390 \begin_layout Standard
22391 As you can see in the example, there is a label command for each nesting
22392  level, 
22393 \family typewriter
22394
22395 \backslash
22396 labelenumi
22397 \family default
22398  \SpecialChar \ldots{}
22399  
22400 \family typewriter
22401
22402 \backslash
22403 labelenumiv
22404 \family default
22405 , as well as a counter, 
22406 \family typewriter
22407 enumi
22408 \family default
22409  \SpecialChar \ldots{}
22410  
22411 \family typewriter
22412 enumiv
22413 \family default
22414 .
22415  There are also five 
22416 \begin_inset Quotes eld
22417 \end_inset
22418
22419 number printing
22420 \begin_inset Quotes erd
22421 \end_inset
22422
22423  commands, 
22424 \family typewriter
22425
22426 \backslash
22427 arabic{}
22428 \family default
22429
22430 \family typewriter
22431
22432 \backslash
22433 roman{}
22434 \family default
22435
22436 \family typewriter
22437
22438 \backslash
22439 Roman{}
22440 \family default
22441
22442 \family typewriter
22443
22444 \backslash
22445 alph{}
22446 \family default
22447 , and 
22448 \family typewriter
22449
22450 \backslash
22451 Alph{}
22452 \family default
22453 , each of which take one counter as an argument.
22454  You can add characters before or after these, but there's no need to add
22455  spaces.
22456 \end_layout
22457
22458 \begin_layout Standard
22459 You can get really fancy with these.
22460  For example:
22461 \end_layout
22462
22463 \begin_layout LyX-Code
22464
22465 \backslash
22466 renewcommand{
22467 \backslash
22468 labelenumi}{
22469 \backslash
22470 #
22471 \backslash
22472 Alph{enumi}
22473 \backslash
22474 #}
22475 \end_layout
22476
22477 \begin_layout LyX-Code
22478
22479 \backslash
22480 renewcommand{
22481 \backslash
22482 labelenumii}{
22483 \backslash
22484 Alph{enumi}.
22485 \backslash
22486 arabic{enumii}}
22487 \end_layout
22488
22489 \begin_layout LyX-Code
22490
22491 \backslash
22492 renewcommand{
22493 \backslash
22494 labelenumiii}{
22495 \backslash
22496 alph{enumiii}+}
22497 \end_layout
22498
22499 \begin_layout LyX-Code
22500
22501 \backslash
22502 renewcommand{
22503 \backslash
22504 labelenumiv}{(
22505 \backslash
22506 roman{enumiv})}
22507 \end_layout
22508
22509 \begin_layout Standard
22510 produces the somewhat out of hand numbering scheme: <
22511 \begin_inset Quotes eld
22512 \end_inset
22513
22514 #A#
22515 \begin_inset Quotes erd
22516 \end_inset
22517
22518 ,
22519 \begin_inset space ~
22520 \end_inset
22521
22522
22523 \begin_inset Quotes erd
22524 \end_inset
22525
22526 A.1
22527 \begin_inset Quotes erd
22528 \end_inset
22529
22530 ,
22531 \begin_inset space ~
22532 \end_inset
22533
22534
22535 \begin_inset Quotes erd
22536 \end_inset
22537
22538 a+
22539 \begin_inset Quotes erd
22540 \end_inset
22541
22542 ,
22543 \begin_inset space ~
22544 \end_inset
22545
22546
22547 \begin_inset Quotes eld
22548 \end_inset
22549
22550 (i)
22551 \begin_inset Quotes erd
22552 \end_inset
22553
22554 >.
22555  
22556 \end_layout
22557
22558 \begin_layout Standard
22559
22560 \end_layout
22561
22562 \begin_layout Section
22563 Dropped Capitals
22564 \end_layout
22565
22566 \begin_layout Standard
22567 by 
22568 \noun on
22569 Mike Ressler
22570 \end_layout
22571
22572 \begin_layout Standard
22573 \begin_inset VSpace bigskip
22574 \end_inset
22575
22576
22577 \end_layout
22578
22579 \begin_layout Standard
22580 \noindent
22581 \begin_inset ERT
22582 status collapsed
22583
22584 \begin_layout Plain Layout
22585
22586
22587 \backslash
22588 newfont{
22589 \backslash
22590 tmpfont}{cmr17 scaled 2500}{
22591 \backslash
22592 tmpfont T}
22593 \backslash
22594 vspace*{-8.4ex}
22595 \end_layout
22596
22597 \end_inset
22598
22599
22600 \end_layout
22601
22602 \begin_layout Standard
22603 \noindent
22604 \begin_inset ERT
22605 status open
22606
22607 \begin_layout Plain Layout
22608
22609
22610 \backslash
22611 hangindent=3.3em 
22612 \backslash
22613 hangafter=-3
22614 \end_layout
22615
22616 \end_inset
22617
22618  hose of you who like the style of old books probably also like 
22619 \begin_inset Quotes eld
22620 \end_inset
22621
22622 dropped capitals
22623 \begin_inset Quotes erd
22624 \end_inset
22625
22626 —those large capital letters which begin each new chapter or section.
22627  Implementing them with plain LyX/LaTeX is straightforward (assuming you
22628  know some plain TeX!) but does require a lot of work and many iterations,
22629  as you can see by all the ugly TeX-mode stuff at the beginning of this
22630  paragraph.
22631 \end_layout
22632
22633 \begin_layout Standard
22634 \begin_inset ERT
22635 status open
22636
22637 \begin_layout Plain Layout
22638
22639
22640 \backslash
22641 verb+
22642 \backslash
22643 bigdrop{-1em}{3}{ptmri}{T}+
22644 \end_layout
22645
22646 \end_inset
22647
22648 here is a much easier way of doing this, of course.
22649  The 
22650 \family typewriter
22651 dropcaps
22652 \family default
22653  (or the newer 
22654 \family typewriter
22655 dropping
22656 \family default
22657 ) package from CTAN allows a simple way to add such letters to your documents.
22658  Since this package is not a standard part of teTeX, I can't demonstrate
22659  it within this document, but if you copy this paragraph to a new document,
22660  delete the 
22661 \begin_inset Quotes eld
22662 \end_inset
22663
22664
22665 \family typewriter
22666
22667 \backslash
22668 verb
22669 \family default
22670
22671 \begin_inset Quotes erd
22672 \end_inset
22673
22674  and the pluses from the TeX code at the beginning of the paragraph, and
22675  add 
22676 \family typewriter
22677
22678 \backslash
22679 usepackage{dropcaps}
22680 \family default
22681  to your LaTeX preamble, you will get a nice Times Roman Italic 
22682 \begin_inset Quotes eld
22683 \end_inset
22684
22685 T
22686 \begin_inset Quotes erd
22687 \end_inset
22688
22689 , whose height is three lines of text and which protrudes 1 em into the
22690  margin.
22691  (Make certain you have copied 
22692 \begin_inset Quotes eld
22693 \end_inset
22694
22695
22696 \family typewriter
22697 dropcaps.sty
22698 \family default
22699
22700 \begin_inset Quotes erd
22701 \end_inset
22702
22703  into a directory where TeX can see it.) The first argument is the amount
22704  of indentation; in this case the negative sign moves it into the margin.
22705  The second argument is the height of the letter in number of lines of text.
22706  The third argument is the font name: virtually anything which has a tfm
22707  file should work (wade through the 
22708 \family typewriter
22709 .../texmf/fonts/tfm
22710 \family default
22711  directory for possibilities).
22712  My personal favorite is 
22713 \begin_inset Quotes eld
22714 \end_inset
22715
22716
22717 \family typewriter
22718 yinit
22719 \family default
22720
22721 \begin_inset Quotes erd
22722 \end_inset
22723
22724 , a fancy German font specifically designed for dropped capitals.
22725  The fourth argument is the letter (or letters) to be dropped.
22726  The 
22727 \family typewriter
22728 dropping
22729 \family default
22730  package also offers the 
22731 \family typewriter
22732
22733 \backslash
22734 bigdrop
22735 \family default
22736  command, as well as a slightly simplified 
22737 \family typewriter
22738
22739 \backslash
22740 dropping
22741 \family default
22742  command.
22743 \end_layout
22744
22745 \begin_layout Section
22746 Non-standard Paragraph Shapes
22747 \end_layout
22748
22749 \begin_layout Standard
22750 by 
22751 \noun on
22752 Mike Ressler
22753 \end_layout
22754
22755 \begin_layout Standard
22756 \begin_inset VSpace bigskip
22757 \end_inset
22758
22759
22760 \end_layout
22761
22762 \begin_layout Standard
22763 \begin_inset ERT
22764 status collapsed
22765
22766 \begin_layout Plain Layout
22767
22768
22769 \backslash
22770 begin{sloppypar}
22771 \end_layout
22772
22773 \end_inset
22774
22775
22776 \end_layout
22777
22778 \begin_layout Standard
22779 \begin_inset ERT
22780 status collapsed
22781
22782 \begin_layout Plain Layout
22783
22784
22785 \backslash
22786 newdimen
22787 \backslash
22788 varunit 
22789 \end_layout
22790
22791 \begin_layout Plain Layout
22792
22793
22794 \backslash
22795 setlength{
22796 \backslash
22797 varunit}{4.5in}
22798 \end_layout
22799
22800 \end_inset
22801
22802
22803 \end_layout
22804
22805 \begin_layout Standard
22806 \noindent
22807 \begin_inset ERT
22808 status collapsed
22809
22810 \begin_layout Plain Layout
22811
22812
22813 \backslash
22814 parshape 19 0.45
22815 \backslash
22816 varunit 0.332
22817 \backslash
22818 varunit
22819 \end_layout
22820
22821 \begin_layout Plain Layout
22822
22823 0.40
22824 \backslash
22825 varunit 0.300
22826 \backslash
22827 varunit
22828 \end_layout
22829
22830 \begin_layout Plain Layout
22831
22832 0.35
22833 \backslash
22834 varunit 0.293
22835 \backslash
22836 varunit
22837 \end_layout
22838
22839 \begin_layout Plain Layout
22840
22841 0.30
22842 \backslash
22843 varunit 0.300
22844 \backslash
22845 varunit
22846 \end_layout
22847
22848 \begin_layout Plain Layout
22849
22850 0.25
22851 \backslash
22852 varunit 0.317
22853 \backslash
22854 varunit
22855 \end_layout
22856
22857 \begin_layout Plain Layout
22858
22859 0.20
22860 \backslash
22861 varunit 0.342
22862 \backslash
22863 varunit
22864 \end_layout
22865
22866 \begin_layout Plain Layout
22867
22868 0.15
22869 \backslash
22870 varunit 0.373
22871 \backslash
22872 varunit
22873 \end_layout
22874
22875 \begin_layout Plain Layout
22876
22877 0.10
22878 \backslash
22879 varunit 0.410
22880 \backslash
22881 varunit
22882 \end_layout
22883
22884 \begin_layout Plain Layout
22885
22886 0.05
22887 \backslash
22888 varunit 0.453
22889 \backslash
22890 varunit
22891 \end_layout
22892
22893 \begin_layout Plain Layout
22894
22895 0.00
22896 \backslash
22897 varunit 0.500
22898 \backslash
22899 varunit
22900 \end_layout
22901
22902 \begin_layout Plain Layout
22903
22904 0.05
22905 \backslash
22906 varunit 0.453
22907 \backslash
22908 varunit
22909 \end_layout
22910
22911 \begin_layout Plain Layout
22912
22913 0.10
22914 \backslash
22915 varunit 0.410
22916 \backslash
22917 varunit
22918 \end_layout
22919
22920 \begin_layout Plain Layout
22921
22922 0.15
22923 \backslash
22924 varunit 0.373
22925 \backslash
22926 varunit
22927 \end_layout
22928
22929 \begin_layout Plain Layout
22930
22931 0.20
22932 \backslash
22933 varunit 0.342
22934 \backslash
22935 varunit
22936 \end_layout
22937
22938 \begin_layout Plain Layout
22939
22940 0.25
22941 \backslash
22942 varunit 0.317
22943 \backslash
22944 varunit
22945 \end_layout
22946
22947 \begin_layout Plain Layout
22948
22949 0.30
22950 \backslash
22951 varunit 0.300
22952 \backslash
22953 varunit
22954 \end_layout
22955
22956 \begin_layout Plain Layout
22957
22958 0.35
22959 \backslash
22960 varunit 0.293
22961 \backslash
22962 varunit
22963 \end_layout
22964
22965 \begin_layout Plain Layout
22966
22967 0.40
22968 \backslash
22969 varunit 0.300
22970 \backslash
22971 varunit
22972 \end_layout
22973
22974 \begin_layout Plain Layout
22975
22976 0.45
22977 \backslash
22978 varunit 0.332
22979 \backslash
22980 varunit
22981 \end_layout
22982
22983 \begin_layout Plain Layout
22984
22985 \end_layout
22986
22987 \end_inset
22988
22989 There are times when the tyranny of rectangular paragraphs must be overthrown.
22990  In such situations, a call to the delightful plain TeX command 
22991 \family typewriter
22992
22993 \backslash
22994 parshape
22995 \family default
22996  is called for.
22997  As you can see, completely arbitrary shapes can be laid out with a suitable
22998  set of linelength definitions.
22999  While this parshape may look a bit silly and useless, one could conceive
23000  of situations such as finely tuned dropped capitals, word wrapping around
23001  non-rectangular graphics, etc.
23002  which will benefit from such handcrafting.
23003 \end_layout
23004
23005 \begin_layout Standard
23006 \begin_inset VSpace bigskip
23007 \end_inset
23008
23009
23010 \end_layout
23011
23012 \begin_layout Standard
23013 The syntax is 
23014 \family typewriter
23015
23016 \backslash
23017 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23018  #nindent #nlength
23019 \family default
23020 , where 
23021 \family typewriter
23022 numlines
23023 \family default
23024  is the number of lines of text which define the paragraph.
23025  If there turn out to be fewer lines, the shape is truncated; if there are
23026  more, the excess lines have the same dimensions as the last line of the
23027  definition.
23028  The 
23029 \family typewriter
23030 #nindent
23031 \family default
23032  and 
23033 \family typewriter
23034 #nlength
23035 \family default
23036  entries specify the indentation of the line from the left margin, and the
23037  length of the line as measured from that point.
23038  The shape applies only to the current paragraph; everything is reset to
23039  normal for the next paragraph.
23040 \end_layout
23041
23042 \begin_layout Standard
23043 \begin_inset ERT
23044 status collapsed
23045
23046 \begin_layout Plain Layout
23047
23048
23049 \backslash
23050 end{sloppypar}
23051 \end_layout
23052
23053 \end_inset
23054
23055
23056 \end_layout
23057
23058 \begin_layout Section
23059 Summary
23060 \end_layout
23061
23062 \begin_layout Standard
23063 As you can see, the examples in this section range from the useful to the
23064  whimsical.
23065  While I don't expect that anyone will ever need the paragraph shape demonstrate
23066 d in the last section, the important point is that you can do almost anything
23067  you want in LyX if you are willing to figure out how to do it in TeX and
23068  LaTeX.
23069  TeX is a fantastically powerful typesetting system and all that power is
23070  available to you since LyX uses it as its backend.
23071  Happy LyXing!
23072 \end_layout
23073
23074 \end_body
23075 \end_document