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