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