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