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