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