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