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