]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
avoid float-conversion warning and simplify size computation
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 474
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 % extra space for tables
37 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
38 \end_preamble
39 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
40 \use_default_options false
41 \begin_modules
42 logicalmkup
43 theorems-ams
44 theorems-ams-extended
45 multicol
46 shapepar
47 \end_modules
48 \maintain_unincluded_children false
49 \begin_local_layout
50 Format 7
51 InsetLayout CharStyle:MenuItem
52 LyxType               charstyle
53 LabelString           menu
54 LatexType             command
55 LatexName             menuitem
56 Font
57 Family              Sans
58 EndFont
59 Preamble
60 \newcommand*{\menuitem}[1]{{\sffamily #1}}
61 EndPreamble
62 End
63 \end_local_layout
64 \language english
65 \language_package default
66 \inputencoding auto
67 \fontencoding global
68 \font_roman default
69 \font_sans default
70 \font_typewriter default
71 \font_math auto
72 \font_default_family default
73 \use_non_tex_fonts false
74 \font_sc false
75 \font_osf false
76 \font_sf_scale 100
77 \font_tt_scale 100
78 \graphics default
79 \default_output_format default
80 \output_sync 0
81 \bibtex_command default
82 \index_command default
83 \paperfontsize 12
84 \spacing single
85 \use_hyperref true
86 \pdf_title "LyX's Additional Features manual"
87 \pdf_author "LyX Team"
88 \pdf_subject "LyX's additional features documentation"
89 \pdf_keywords "LyX, Documentation, Additional"
90 \pdf_bookmarks true
91 \pdf_bookmarksnumbered true
92 \pdf_bookmarksopen false
93 \pdf_bookmarksopenlevel 1
94 \pdf_breaklinks false
95 \pdf_pdfborder false
96 \pdf_colorlinks true
97 \pdf_backref false
98 \pdf_pdfusetitle false
99 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
100 \papersize a4paper
101 \use_geometry false
102 \use_package amsmath 1
103 \use_package amssymb 1
104 \use_package cancel 0
105 \use_package esint 0
106 \use_package mathdots 1
107 \use_package mathtools 0
108 \use_package mhchem 1
109 \use_package stackrel 0
110 \use_package stmaryrd 0
111 \use_package undertilde 0
112 \cite_engine basic
113 \cite_engine_type default
114 \biblio_style plain
115 \use_bibtopic false
116 \use_indices false
117 \paperorientation portrait
118 \suppress_date false
119 \justification true
120 \use_refstyle 0
121 \notefontcolor #0000ff
122 \index Index
123 \shortcut idx
124 \color #008000
125 \end_index
126 \secnumdepth 3
127 \tocdepth 3
128 \paragraph_separation indent
129 \paragraph_indentation default
130 \quotes_language english
131 \papercolumns 1
132 \papersides 2
133 \paperpagestyle headings
134 \tracking_changes true
135 \output_changes false
136 \html_math_output 0
137 \html_css_as_file 0
138 \html_be_strict true
139 \author 711066561 "Enrico Forestieri" 
140 \end_header
141
142 \begin_body
143
144 \begin_layout Title
145 Additional LyX Features
146 \end_layout
147
148 \begin_layout Subtitle
149 Version 2.1.x
150 \end_layout
151
152 \begin_layout Author
153 by the LyX Team
154 \begin_inset Foot
155 status collapsed
156
157 \begin_layout Plain Layout
158 \noindent
159 Principal maintainer of this file is
160 \noun on
161  Richard Heck
162 \noun default
163 .
164  If you have comments or error corrections, please send them to the LyX
165  Documentation mailing list, 
166 \begin_inset Flex Code
167 status collapsed
168
169 \begin_layout Plain Layout
170 \noindent
171 <lyx-docs@lists.lyx.org>
172 \end_layout
173
174 \end_inset
175
176 .
177 \end_layout
178
179 \end_inset
180
181
182 \end_layout
183
184 \begin_layout Standard
185 \begin_inset CommandInset toc
186 LatexCommand tableofcontents
187
188 \end_inset
189
190
191 \end_layout
192
193 \begin_layout Chapter
194 Introduction
195 \end_layout
196
197 \begin_layout Standard
198 This manual is essentially Part II of the 
199 \emph on
200 User's Guide\SpecialChar \@.
201
202 \emph default
203  The reason for separating the two documents is simple: the 
204 \emph on
205 User's Guide
206 \emph default
207  is already quite lengthy, and it contains information on all of the basic
208  features one needs to know in order to prepare most documents.
209  However, the LyX Team has worked to make LyX extensible through various
210  configuration files and external packages.
211  That means that if you want to support the Fizzwizzle LaTeX package, you
212  can create a layout file (or module) for it without having to alter LyX
213  itself.
214  We've already had contributions of several new features this way, and some
215  of them are documented here.
216  There are also some more `advanced' features, such as how to control the
217  presentation of bibliographies and how to work with multi-part documents,
218  that are not covered in the 
219 \emph on
220 User's Guide
221 \emph default
222  and are discussed here.
223 \end_layout
224
225 \begin_layout Standard
226 This manual also documents some special features, like fax support, version
227  control, and SGML support, which require additional software to work properly.
228  There is also a chapter on LyX's support for HTML.
229  And lastly, there's a chapter of LaTeX tools and tips, things you can use
230  to spruce up your documents by directly using the powerful features of
231  LaTeX.
232  After all, LyX 
233 \emph on
234 is
235 \emph default
236  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
237 \end_layout
238
239 \begin_layout Standard
240 If you haven't read the 
241 \emph on
242 Introduction
243 \emph default
244  yet, you are definitely in the wrong manual.
245  The 
246 \emph on
247 Introduction
248 \emph default
249  is the first place to go, since it describes the notation and format of
250  all of the manuals.
251  You should also be thoroughly familiar with the 
252 \emph on
253 User's Guide
254 \emph default
255  and all of the basic features of LyX before attempting to read this one.
256 \end_layout
257
258 \begin_layout Standard
259 Since many of the topics in this manual depend heavily on LyX's interaction
260  with LaTeX, this first chapter covers the inner workings of LyX and how
261  to direct LyX to generate exactly the LaTeX code you want.
262  It is obviously for more seasoned LyX users.
263 \end_layout
264
265 \begin_layout Chapter
266 LyX and LaTeX
267 \end_layout
268
269 \begin_layout Section
270 How LyX Uses LaTeX
271 \end_layout
272
273 \begin_layout Standard
274 This chapter is for both TeX-nicians and the LaTeX-curious.
275  In it, we'll explain how LyX and LaTeX work together to produce printable
276  output.
277  This is the only place in any of the manuals where we assume you know something
278  about LaTeX.
279 \end_layout
280
281 \begin_layout Standard
282 At one time, LyX was called a 
283 \begin_inset Quotes eld
284 \end_inset
285
286 WYSIWYM frontend to LaTeX,
287 \begin_inset Quotes erd
288 \end_inset
289
290  but that's no longer true.
291  There are frontends to LaTeX out there.
292 \begin_inset Foot
293 status collapsed
294
295 \begin_layout Plain Layout
296 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
297  There are also the LaTeX modes for vi and emacs, of course.
298 \end_layout
299
300 \end_inset
301
302  These are basically text editors with the ability to run LaTeX and mark
303  any errors in the file you're editing.
304  Although LyX 
305 \emph on
306 is
307 \emph default
308  an editor, and it 
309 \emph on
310 does
311 \emph default
312  run LaTeX, and it also indicates errors in the file, it also does much,
313  much more.
314  For one thing, you don't need to know LaTeX to use LyX effectively.
315  And LyX has added its own extensions to LaTeX.
316  Try the following sometime: select 
317 \begin_inset Flex MenuItem
318 status collapsed
319
320 \begin_layout Plain Layout
321 Export\SpecialChar \menuseparator
322 LaTeX
323 \end_layout
324
325 \end_inset
326
327  from the 
328 \begin_inset Flex MenuItem
329 status collapsed
330
331 \begin_layout Plain Layout
332 File
333 \end_layout
334
335 \end_inset
336
337  menu (or 
338 \begin_inset Flex MenuItem
339 status collapsed
340
341 \begin_layout Plain Layout
342 View\SpecialChar \menuseparator
343 Source
344 \begin_inset space ~
345 \end_inset
346
347 Pane
348 \end_layout
349
350 \end_inset
351
352 ), then look at the preamble of the resulting 
353 \begin_inset Flex Code
354 status collapsed
355
356 \begin_layout Plain Layout
357 .tex
358 \end_layout
359
360 \end_inset
361
362  file.
363  You'll notice a variety of new macros defined specifically by LyX.
364  These macros are defined automatically, according to the features you use
365  in the document.
366 \end_layout
367
368 \begin_layout Standard
369 There are several commands that automatically invoke LaTeX.
370  They are:
371 \end_layout
372
373 \begin_layout Itemize
374 \begin_inset Flex MenuItem
375 status collapsed
376
377 \begin_layout Plain Layout
378 Document\SpecialChar \menuseparator
379 View
380 \end_layout
381
382 \end_inset
383
384
385 \end_layout
386
387 \begin_layout Itemize
388 \begin_inset Flex MenuItem
389 status collapsed
390
391 \begin_layout Plain Layout
392 Document\SpecialChar \menuseparator
393 Update
394 \end_layout
395
396 \end_inset
397
398
399 \end_layout
400
401 \begin_layout Itemize
402 \begin_inset Flex MenuItem
403 status collapsed
404
405 \begin_layout Plain Layout
406 File\SpecialChar \menuseparator
407 Print
408 \end_layout
409
410 \end_inset
411
412
413 \end_layout
414
415 \begin_layout Itemize
416 \begin_inset Flex MenuItem
417 status collapsed
418
419 \begin_layout Plain Layout
420 File\SpecialChar \menuseparator
421 Fax
422 \end_layout
423
424 \end_inset
425
426
427 \end_layout
428
429 \begin_layout Standard
430 They will only invoke LaTeX if the file has changed since the last time
431  LaTeX was run.
432  
433 \end_layout
434
435 \begin_layout Standard
436 When LyX runs LaTeX on the file you're editing, it performs these steps:
437 \end_layout
438
439 \begin_layout Enumerate
440 Convert the document to LaTeX and save to a file with the extension 
441 \begin_inset Flex Code
442 status collapsed
443
444 \begin_layout Plain Layout
445 .tex
446 \end_layout
447
448 \end_inset
449
450  in place of 
451 \begin_inset Flex Code
452 status collapsed
453
454 \begin_layout Plain Layout
455 .lyx
456 \end_layout
457
458 \end_inset
459
460 .
461 \end_layout
462
463 \begin_layout Enumerate
464 Run LaTeX on the 
465 \begin_inset Flex Code
466 status collapsed
467
468 \begin_layout Plain Layout
469 .tex
470 \end_layout
471
472 \end_inset
473
474  file (maybe several times), and run any other commands (such as 
475 \begin_inset Flex Code
476 status collapsed
477
478 \begin_layout Plain Layout
479 bibtex
480 \end_layout
481
482 \end_inset
483
484  or 
485 \begin_inset Flex Code
486 status collapsed
487
488 \begin_layout Plain Layout
489 makeindex
490 \end_layout
491
492 \end_inset
493
494 ) needed to compile the LaTeX file.
495 \end_layout
496
497 \begin_layout Enumerate
498 If there are any errors, show the error log.
499 \end_layout
500
501 \begin_layout Standard
502 If you have run LaTeX using 
503 \begin_inset Flex MenuItem
504 status collapsed
505
506 \begin_layout Plain Layout
507 View
508 \bar under
509 \SpecialChar \menuseparator
510
511 \bar default
512 DVI
513 \end_layout
514
515 \end_inset
516
517 , LyX then runs a DVI viewer to display the DVI-file.
518  If you have used 
519 \begin_inset Flex MenuItem
520 status collapsed
521
522 \begin_layout Plain Layout
523 View
524 \bar under
525 \SpecialChar \menuseparator
526
527 \bar default
528 PostScript
529 \end_layout
530
531 \end_inset
532
533 , LyX performs further steps:
534 \end_layout
535
536 \begin_layout Itemize
537 Run 
538 \begin_inset Flex Code
539 status collapsed
540
541 \begin_layout Plain Layout
542 dvips
543 \end_layout
544
545 \end_inset
546
547  to convert the DVI file to PostScript.
548 \end_layout
549
550 \begin_layout Itemize
551 Run a PostScript viewer, such as 
552 \begin_inset Flex Code
553 status collapsed
554
555 \begin_layout Plain Layout
556 ghostview
557 \end_layout
558
559 \end_inset
560
561 , to display the PostScript file.
562 \end_layout
563
564 \begin_layout Standard
565 LyX does similar things when viewing, or exporting, other formats.
566 \end_layout
567
568 \begin_layout Section
569 Translating LaTeX files into LyX
570 \end_layout
571
572 \begin_layout Standard
573 You can import a LaTeX file into LyX by using the 
574 \begin_inset Flex MenuItem
575 status collapsed
576
577 \begin_layout Plain Layout
578 File\SpecialChar \menuseparator
579 Import\SpecialChar \menuseparator
580 LaTeX
581 \end_layout
582
583 \end_inset
584
585  command in LyX.
586  This will call a program named 
587 \begin_inset Flex Code
588 status collapsed
589
590 \begin_layout Plain Layout
591 tex2lyx
592 \end_layout
593
594 \end_inset
595
596  which will create a file 
597 \begin_inset Flex Code
598 status collapsed
599
600 \begin_layout Plain Layout
601 foo.lyx
602 \end_layout
603
604 \end_inset
605
606  from the file 
607 \begin_inset Flex Code
608 status collapsed
609
610 \begin_layout Plain Layout
611 foo.tex
612 \end_layout
613
614 \end_inset
615
616 .
617  LyX will then open that file.
618 \begin_inset Foot
619 status collapsed
620
621 \begin_layout Plain Layout
622 \begin_inset Flex Code
623 status collapsed
624
625 \begin_layout Plain Layout
626 tex2lyx
627 \end_layout
628
629 \end_inset
630
631  can also be run from the command line, of course.
632 \end_layout
633
634 \end_inset
635
636
637 \end_layout
638
639 \begin_layout Standard
640 \begin_inset Flex Code
641 status collapsed
642
643 \begin_layout Plain Layout
644 tex2lyx
645 \end_layout
646
647 \end_inset
648
649  will translate most legal LaTeX, but not everything.
650  It will put things it doesn't understand into TeX code, so after translating
651  a file with 
652 \begin_inset Flex Code
653 status collapsed
654
655 \begin_layout Plain Layout
656 tex2lyx
657 \end_layout
658
659 \end_inset
660
661 , you can look for TeX code and hand-edit it until it looks right.
662 \end_layout
663
664 \begin_layout Standard
665 If you don't know what TeX code is, read the next section.
666 \end_layout
667
668 \begin_layout Section
669 \begin_inset CommandInset label
670 LatexCommand label
671 name "sec:Inserting-TeX-Code"
672
673 \end_inset
674
675 Inserting TeX Code into LyX Documents 
676 \end_layout
677
678 \begin_layout Standard
679 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
680  You can always insert TeX code into any LyX document.
681  LyX cannot, and will never be able to, display every possible LaTeX construct.
682  If ever you need to insert LaTeX commands into your LyX document, you can
683  use the 
684 \begin_inset Flex Code
685 status collapsed
686
687 \begin_layout Plain Layout
688 TeX Code
689 \end_layout
690
691 \end_inset
692
693  box, which you can insert into your document with 
694 \begin_inset Flex MenuItem
695 status collapsed
696
697 \begin_layout Plain Layout
698 Insert\SpecialChar \menuseparator
699 TeX Code
700 \end_layout
701
702 \end_inset
703
704  or the keyboard shortcut 
705 \begin_inset Info
706 type  "shortcut"
707 arg   "ert-insert"
708 \end_inset
709
710 .
711 \end_layout
712
713 \begin_layout Standard
714 Here's an example of inserting LaTeX commands in a LyX document.
715  The code looks like this:
716 \end_layout
717
718 \begin_layout LyX-Code
719
720 \backslash
721 begin{tabular}{ll}
722 \begin_inset Newline newline
723 \end_inset
724
725
726 \backslash
727 begin{minipage}{5cm}
728 \begin_inset Newline newline
729 \end_inset
730
731 This is an example of a minipage environment.
732  You 
733 \begin_inset Newline newline
734 \end_inset
735
736 can put nearly everything in it, even (non-floating) 
737 \begin_inset Newline newline
738 \end_inset
739
740 figures and tables.
741  
742 \begin_inset Newline newline
743 \end_inset
744
745
746 \backslash
747 end{minipage}
748 \begin_inset Newline newline
749 \end_inset
750
751 &
752 \begin_inset Newline newline
753 \end_inset
754
755
756 \backslash
757 begin{minipage}{5cm}
758 \begin_inset Newline newline
759 \end_inset
760
761
762 \backslash
763 begin{verbatim}
764 \begin_inset Newline newline
765 \end_inset
766
767
768 \backslash
769 begin{minipage}{5cm}
770 \begin_inset Newline newline
771 \end_inset
772
773 This ...
774  
775 \begin_inset Newline newline
776 \end_inset
777
778
779 \backslash
780 end{minipage}
781 \begin_inset Newline newline
782 \end_inset
783
784
785 \backslash
786 end{verbatim}
787 \begin_inset Newline newline
788 \end_inset
789
790
791 \backslash
792 end{minipage}
793 \begin_inset Newline newline
794 \end_inset
795
796
797 \backslash
798 end{tabular}
799 \end_layout
800
801 \begin_layout LyX-Code
802
803 \end_layout
804
805 \begin_layout Standard
806 The 
807 \begin_inset Flex Code
808 status collapsed
809
810 \begin_layout Plain Layout
811 TeX Code
812 \end_layout
813
814 \end_inset
815
816  box containing this text is directly after this paragraph.
817  Those of you reading the manual in LyX will only see the TeX code inset.
818  Those reading a printed version of the manuals will see the actual results:
819 \begin_inset VSpace bigskip
820 \end_inset
821
822
823 \end_layout
824
825 \begin_layout Standard
826 \begin_inset ERT
827 status open
828
829 \begin_layout Plain Layout
830
831
832 \backslash
833 begin{tabular}{ll}
834 \end_layout
835
836 \begin_layout Plain Layout
837
838
839 \backslash
840 begin{minipage}{5cm}
841 \end_layout
842
843 \begin_layout Plain Layout
844
845 This is an example of a minipage environment.
846  You can put nearly everything in it, even (non-floating) figures and tables.
847  
848 \end_layout
849
850 \begin_layout Plain Layout
851
852
853 \backslash
854 end{minipage}
855 \end_layout
856
857 \begin_layout Plain Layout
858
859 &
860 \end_layout
861
862 \begin_layout Plain Layout
863
864
865 \backslash
866 begin{minipage}{5cm}
867 \end_layout
868
869 \begin_layout Plain Layout
870
871
872 \backslash
873 begin{verbatim}
874 \end_layout
875
876 \begin_layout Plain Layout
877
878
879 \backslash
880 begin{minipage}{5cm}
881 \end_layout
882
883 \begin_layout Plain Layout
884
885 This ...
886  
887 \end_layout
888
889 \begin_layout Plain Layout
890
891
892 \backslash
893 end{minipage}
894 \end_layout
895
896 \begin_layout Plain Layout
897
898
899 \backslash
900 end{verbatim}
901 \end_layout
902
903 \begin_layout Plain Layout
904
905
906 \backslash
907 end{minipage}
908 \end_layout
909
910 \begin_layout Plain Layout
911
912
913 \backslash
914 end{tabular}
915 \end_layout
916
917 \end_inset
918
919
920 \begin_inset VSpace bigskip
921 \end_inset
922
923
924 \end_layout
925
926 \begin_layout Standard
927 In addition to using TeX code, you can also create a separate file containing
928  some complex LaTeX structure and then use 
929 \begin_inset Flex MenuItem
930 status collapsed
931
932 \begin_layout Plain Layout
933 Insert\SpecialChar \menuseparator
934 Child
935 \begin_inset space ~
936 \end_inset
937
938 Document
939 \end_layout
940
941 \end_inset
942
943  to include your file (you should select the type 
944 \begin_inset Flex Code
945 status collapsed
946
947 \begin_layout Plain Layout
948 Input
949 \end_layout
950
951 \end_inset
952
953 ).
954  We recommend that you only do this if you have a 
955 \begin_inset Flex Code
956 status collapsed
957
958 \begin_layout Plain Layout
959 .tex
960 \end_layout
961
962 \end_inset
963
964  file which you 
965 \emph on
966 know
967 \emph default
968  works already.
969  Otherwise, you'll have a big job tracking down LaTeX errors.
970 \end_layout
971
972 \begin_layout Standard
973 There are a few last points to emphasize:
974 \end_layout
975
976 \begin_layout Itemize
977 LyX 
978 \emph on
979 does not
980 \emph default
981  check if your LaTeX code is correct.
982 \end_layout
983
984 \begin_layout Itemize
985 Beware of reinventing the wheel.
986 \end_layout
987
988 \begin_layout Standard
989 On that last point, LyX does have quite a few features tucked into it, and
990  more are coming.
991  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
992  feature before you decide you have to do it by hand.
993  Moreover, there are numerous LaTeX packages out there to do all sorts of
994  things, from labels to envelopes to fancy multipage tables.
995  Check out 
996 \begin_inset CommandInset href
997 LatexCommand href
998 name "CTAN"
999 target "http://www.ctan.org/"
1000
1001 \end_inset
1002
1003  for details.
1004 \end_layout
1005
1006 \begin_layout Standard
1007 If you do need to do some wild and fancy things within your document, be
1008  sure to check out a good LaTeX book for assistance.
1009  There are a number of them listed in the bibliography of the 
1010 \emph on
1011 User's Guide
1012 \emph default
1013 .
1014 \end_layout
1015
1016 \begin_layout Section
1017 LyX and the LaTeX Preamble
1018 \end_layout
1019
1020 \begin_layout Subsection
1021 About the LaTeX Preamble
1022 \end_layout
1023
1024 \begin_layout Standard
1025 If you already know LaTeX, there is no need to explain here what the preamble
1026  is good for.
1027  If you don't, the following will give you some ideas—we recommend again
1028  that you consult a LaTeX book for further information.
1029  In any case, you should read the points below, because they explain what
1030  you can do and what you don't need to do in the LaTeX preamble of a LyX
1031  document.
1032 \end_layout
1033
1034 \begin_layout Standard
1035 The LaTeX preamble comes at the very beginning of a document, 
1036 \emph on
1037 before
1038 \emph default
1039  the text.
1040  It serves to:
1041 \end_layout
1042
1043 \begin_layout Itemize
1044 Declare the document class.
1045  
1046 \begin_inset Newline newline
1047 \end_inset
1048
1049 LyX already does this for you.
1050  If you're a seasoned LaTeX-nician, and you have a custom document class
1051  you want to use, check out the 
1052 \emph on
1053 Customization Manual
1054 \emph default
1055  for information on how to make LyX interface to it.
1056 \end_layout
1057
1058 \begin_layout Itemize
1059 Declare the usage of packages.
1060  
1061 \begin_inset Newline newline
1062 \end_inset
1063
1064 LaTeX packages provide special commands, which are only available within
1065  a document when the package has been declared in the preamble.
1066  In addition to providing special commands, the inclusion of a package can
1067  change the document.
1068  For example, the package 
1069 \begin_inset Flex Code
1070 status collapsed
1071
1072 \begin_layout Plain Layout
1073 indentfirst
1074 \end_layout
1075
1076 \end_inset
1077
1078  forces all paragraphs to be indented.
1079  There are other packages for labels, envelopes, margins, etc.
1080  
1081 \end_layout
1082
1083 \begin_layout Itemize
1084 Set counters, variables, lengths and widths.
1085  
1086 \begin_inset Newline newline
1087 \end_inset
1088
1089 There are several LaTeX counters and variables that 
1090 \emph on
1091 must
1092 \emph default
1093  be set globally from within the preamble in order to have the desired effect.
1094  (There are variables that you can set and reset inside the document, too.)
1095  Margins are a good example of something that must be set in the preamble.
1096  Another example is the label format for lists.
1097  You can actually set these just about anywhere, but it's best to do it
1098  just once, inside the preamble.
1099 \end_layout
1100
1101 \begin_layout Itemize
1102 Declare user defined commands (with 
1103 \begin_inset Flex Code
1104 status collapsed
1105
1106 \begin_layout Plain Layout
1107
1108 \backslash
1109 newcommand
1110 \end_layout
1111
1112 \end_inset
1113
1114  or 
1115 \begin_inset Flex Code
1116 status collapsed
1117
1118 \begin_layout Plain Layout
1119
1120 \backslash
1121 renewcommand
1122 \end_layout
1123
1124 \end_inset
1125
1126 ).
1127 \begin_inset Newline newline
1128 \end_inset
1129
1130 These are abbreviations for LaTeX commands which appear very often inside
1131  a document.
1132  Although the preamble is a good place to declare such commands, they 
1133 \emph on
1134 can
1135 \emph default
1136  be declared anywhere (before they are used for the first time, of course).
1137  This can be useful if there is a lot of raw LaTeX code in your document,
1138  which normally should not be the case.
1139 \end_layout
1140
1141 \begin_layout Standard
1142 LyX adds its own set of definitions to the preamble of the 
1143 \begin_inset Flex Code
1144 status collapsed
1145
1146 \begin_layout Plain Layout
1147 .tex
1148 \end_layout
1149
1150 \end_inset
1151
1152  file it produces.
1153  This makes LaTeX files generated by LyX portable.
1154 \end_layout
1155
1156 \begin_layout Subsection
1157 Changing the Preamble
1158 \end_layout
1159
1160 \begin_layout Standard
1161 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1162  can't change them without patching LyX itself.
1163  You can, however, add your own stuff to the preamble by selecting 
1164 \begin_inset Flex MenuItem
1165 status collapsed
1166
1167 \begin_layout Plain Layout
1168 LaTeX
1169 \begin_inset space ~
1170 \end_inset
1171
1172 Preamble
1173 \end_layout
1174
1175 \end_inset
1176
1177  in the 
1178 \begin_inset Flex MenuItem
1179 status collapsed
1180
1181 \begin_layout Plain Layout
1182 Document\SpecialChar \menuseparator
1183 Settings
1184 \end_layout
1185
1186 \end_inset
1187
1188  dialog.
1189  LyX adds anything in the 
1190 \begin_inset Flex MenuItem
1191 status collapsed
1192
1193 \begin_layout Plain Layout
1194 Preamble
1195 \end_layout
1196
1197 \end_inset
1198
1199  dialog to its own built-in preamble.
1200  Before adding your own declarations in the preamble, you should make sure
1201  that LyX doesn't already support what you want to do.
1202  (Remember what we said about reinventing the wheel?) Also, 
1203 \emph on
1204 make sure your preamble code is correct
1205 \emph default
1206 .
1207  LyX doesn't check it for you.
1208  If there is an error, you're likely to get an error like 
1209 \begin_inset Quotes eld
1210 \end_inset
1211
1212
1213 \begin_inset Flex Code
1214 status collapsed
1215
1216 \begin_layout Plain Layout
1217 Missing 
1218 \backslash
1219 begin{document}
1220 \end_layout
1221
1222 \end_inset
1223
1224
1225 \begin_inset Quotes erd
1226 \end_inset
1227
1228 .
1229  If you see this error, check your preamble.
1230 \end_layout
1231
1232 \begin_layout Subsection
1233 Examples
1234 \end_layout
1235
1236 \begin_layout Standard
1237 Here are some examples of what you can add to a preamble, and what they
1238  do.
1239 \end_layout
1240
1241 \begin_layout Subsubsection
1242 Example #1: Offsets
1243 \end_layout
1244
1245 \begin_layout Standard
1246 There are two variables under LaTeX that control page position: 
1247 \begin_inset Flex Code
1248 status collapsed
1249
1250 \begin_layout Plain Layout
1251
1252 \backslash
1253 hoffset
1254 \end_layout
1255
1256 \end_inset
1257
1258  and 
1259 \begin_inset Flex Code
1260 status collapsed
1261
1262 \begin_layout Plain Layout
1263
1264 \backslash
1265 voffset
1266 \end_layout
1267
1268 \end_inset
1269
1270 .
1271  Their names should be self-explanatory.
1272  These variables are useful if you think for a moment about computer labels.
1273  Sometimes, the size of a print medium and the area of the medium that you
1274  can actually print on aren't the same.
1275  This is where 
1276 \begin_inset Flex Code
1277 status collapsed
1278
1279 \begin_layout Plain Layout
1280
1281 \backslash
1282 hoffset
1283 \end_layout
1284
1285 \end_inset
1286
1287  and 
1288 \begin_inset Flex Code
1289 status collapsed
1290
1291 \begin_layout Plain Layout
1292
1293 \backslash
1294 voffset
1295 \end_layout
1296
1297 \end_inset
1298
1299  come in.
1300 \end_layout
1301
1302 \begin_layout Standard
1303 The default values for 
1304 \begin_inset Flex Code
1305 status collapsed
1306
1307 \begin_layout Plain Layout
1308
1309 \backslash
1310 hoffset
1311 \end_layout
1312
1313 \end_inset
1314
1315  and 
1316 \begin_inset Flex Code
1317 status collapsed
1318
1319 \begin_layout Plain Layout
1320
1321 \backslash
1322 voffset
1323 \end_layout
1324
1325 \end_inset
1326
1327  are both 0
1328 \begin_inset space \thinspace{}
1329 \end_inset
1330
1331 points, i.
1332 \begin_inset space \thinspace{}
1333 \end_inset
1334
1335 e.
1336 \begin_inset space \space{}
1337 \end_inset
1338
1339 the page isn't shifted.
1340  Unfortunately, some DVI drivers always seem to shift the page.
1341  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1342  If you're using LyX on a system that you don't personally maintain, and
1343  your sysadmin is a doofus, 
1344 \begin_inset Flex Code
1345 status collapsed
1346
1347 \begin_layout Plain Layout
1348
1349 \backslash
1350 hoffset
1351 \end_layout
1352
1353 \end_inset
1354
1355  and 
1356 \begin_inset Flex Code
1357 status collapsed
1358
1359 \begin_layout Plain Layout
1360
1361 \backslash
1362 voffset
1363 \end_layout
1364
1365 \end_inset
1366
1367  can save the day.
1368  Suppose your left and top margins are always 0.5
1369 \begin_inset space \thinspace{}
1370 \end_inset
1371
1372 inches too big.
1373  You can add this to the preamble:
1374 \end_layout
1375
1376 \begin_layout LyX-Code
1377
1378 \backslash
1379 setlength{
1380 \backslash
1381 hoffset}{-0.5 in}
1382 \end_layout
1383
1384 \begin_layout LyX-Code
1385
1386 \backslash
1387 setlength{
1388 \backslash
1389 voffset}{-0.5 in}
1390 \end_layout
1391
1392 \begin_layout Standard
1393 and your margins should now be correct.
1394 \end_layout
1395
1396 \begin_layout Subsubsection
1397 Example #2: Labels
1398 \end_layout
1399
1400 \begin_layout Standard
1401 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1402  There's a rather nice package, available at your nearest CTAN archive,
1403  for printing sheets of labels: 
1404 \begin_inset Flex Code
1405 status collapsed
1406
1407 \begin_layout Plain Layout
1408 labels.sty
1409 \end_layout
1410
1411 \end_inset
1412
1413 .
1414  Now, your system may not have this package installed by default.
1415  We leave that up to you to check.
1416  You'll also want to read the documentation for it; we're not going to do
1417  that for you.
1418  Since this is an example, however, we'll give you an example of how you
1419  use this package.
1420 \end_layout
1421
1422 \begin_layout Standard
1423 First, make sure you're using the 
1424 \begin_inset Flex Code
1425 status collapsed
1426
1427 \begin_layout Plain Layout
1428 article
1429 \end_layout
1430
1431 \end_inset
1432
1433  document class.
1434  Next, you need to put the following in your preamble:
1435 \end_layout
1436
1437 \begin_layout LyX-Code
1438
1439 \backslash
1440 usepackage{labels}
1441 \end_layout
1442
1443 \begin_layout LyX-Code
1444
1445 \backslash
1446 LabelCols=3
1447 \end_layout
1448
1449 \begin_layout LyX-Code
1450
1451 \backslash
1452 LabelRows=7
1453 \end_layout
1454
1455 \begin_layout LyX-Code
1456
1457 \backslash
1458 LeftBorder=8mm
1459 \end_layout
1460
1461 \begin_layout LyX-Code
1462
1463 \backslash
1464 RightBorder=8mm
1465 \end_layout
1466
1467 \begin_layout LyX-Code
1468
1469 \backslash
1470 TopBorder=9mm
1471 \end_layout
1472
1473 \begin_layout LyX-Code
1474
1475 \backslash
1476 BottomBorder=2mm
1477 \end_layout
1478
1479 \begin_layout Standard
1480 This sets things up for Avery label sheets, stock #5360.
1481  You're now ready to print labels, but you'll need to insert LaTeX code,
1482  placing the commands 
1483 \begin_inset Flex Code
1484 status collapsed
1485
1486 \begin_layout Plain Layout
1487
1488 \backslash
1489 begin{labels}
1490 \end_layout
1491
1492 \end_inset
1493
1494  and 
1495 \begin_inset Flex Code
1496 status collapsed
1497
1498 \begin_layout Plain Layout
1499
1500 \backslash
1501 end{labels}
1502 \end_layout
1503
1504 \end_inset
1505
1506  around each label text.
1507  This and other special features of 
1508 \begin_inset Flex Code
1509 status collapsed
1510
1511 \begin_layout Plain Layout
1512 labels.sty
1513 \end_layout
1514
1515 \end_inset
1516
1517  are explained in its documentation.
1518 \end_layout
1519
1520 \begin_layout Standard
1521 Someday, someone may write a LyX layout file to support this package directly.
1522  Maybe that someone is you.
1523 \end_layout
1524
1525 \begin_layout Subsubsection
1526 Example #3: Paragraph Indentation
1527 \end_layout
1528
1529 \begin_layout Standard
1530 Americans are trained to indent the first line of 
1531 \emph on
1532 every
1533 \emph default
1534  paragraph.
1535  As with all of their other weird quirks, most Americans will whine and
1536  moan until they can have their way and indent the first line of all paragraphs.
1537  (Yes, we're joking.
1538  (We are?) 
1539 \emph on
1540 Yeah
1541 \emph default
1542 , we are.)
1543 \end_layout
1544
1545 \begin_layout Standard
1546 Of course, this behavior isn't standard typography.
1547  In books, you typically only indent the first line of a paragraph 
1548 \emph on
1549 if
1550 \emph default
1551  it follows another one.
1552  The idea behind indenting the first line of a paragraph is to distinguish
1553  neighboring paragraphs from one another.
1554  If there is no previous paragraph—for example, if it follows a figure or
1555  is the first paragraph in a section—then there is no need for indentation.
1556  
1557 \end_layout
1558
1559 \begin_layout Standard
1560 If you're a typical American (we're still joking!), though, you don't care
1561  about such esoteric things; you want your indentation! Add this to the
1562  preamble:
1563 \end_layout
1564
1565 \begin_layout LyX-Code
1566
1567 \backslash
1568 usepackage{indentfirst}
1569 \end_layout
1570
1571 \begin_layout Standard
1572 If your TeX distribution isn't braindead, you'll have this package, and
1573  all of your paragraphs will get the indentation the Founding Fathers intended
1574  they should have.
1575 \end_layout
1576
1577 \begin_layout Subsubsection
1578 Example #4: This Document
1579 \end_layout
1580
1581 \begin_layout Standard
1582 You can also check out the preamble of this document to get an idea of some
1583  of the advanced things you can do.
1584 \end_layout
1585
1586 \begin_layout Section
1587 LyX and LaTeX Errors
1588 \end_layout
1589
1590 \begin_layout Standard
1591 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1592  going.
1593  It then uses the logfile from the LaTeX run to do a post-mortem.
1594  After analyzing the logfile, LyX displays a dialog listing the errors.
1595  Clicking on any one of them will take you to the position in your LyX file
1596  where the error occurred.
1597 \begin_inset Foot
1598 status collapsed
1599
1600 \begin_layout Plain Layout
1601 Well, usually.
1602  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1603  right line.
1604  There are also cases where LaTeX reports the error on one line, but the
1605  actual error is earlier.
1606  This is not unlike forgetting a closing brace in a program: You'll get
1607  an error, but only later.
1608 \end_layout
1609
1610 \end_inset
1611
1612
1613 \end_layout
1614
1615 \begin_layout Standard
1616 Some folks also like to look at the log file directly: It is available from
1617  
1618 \begin_inset Flex MenuItem
1619 status collapsed
1620
1621 \begin_layout Plain Layout
1622 Document
1623 \bar under
1624 \SpecialChar \menuseparator
1625
1626 \bar default
1627 Latex
1628 \begin_inset space ~
1629 \end_inset
1630
1631 Log
1632 \end_layout
1633
1634 \end_inset
1635
1636 .
1637  There are some fairly common error messages and warnings.
1638  We'll cover those here.
1639  You should look at a good LaTeX book for a complete listing.
1640 \end_layout
1641
1642 \begin_layout Itemize
1643 \begin_inset Flex Code
1644 status collapsed
1645
1646 \begin_layout Plain Layout
1647 LaTeX Warning
1648 \end_layout
1649
1650 \end_inset
1651
1652
1653 \begin_inset Newline newline
1654 \end_inset
1655
1656 Anything beginning with these words is a warning message for the purpose
1657  of 
1658 \begin_inset Quotes eld
1659 \end_inset
1660
1661 debugging
1662 \begin_inset Quotes erd
1663 \end_inset
1664
1665  the LaTeX code itself.
1666  You'll get messages like this if you added or changed cross-references
1667  or bibliography entries, in which case, LaTeX is trying to tell you that
1668  you need to make another run.
1669  You can by-and-large ignore these.
1670 \end_layout
1671
1672 \begin_layout Itemize
1673 \begin_inset Flex Code
1674 status collapsed
1675
1676 \begin_layout Plain Layout
1677 LaTeX Font Warning
1678 \end_layout
1679
1680 \end_inset
1681
1682
1683 \begin_inset Newline newline
1684 \end_inset
1685
1686 Another warning message, this time about fonts which LaTeX couldn't find.
1687  The rest of the message will often say something about a replacement font
1688  that LaTeX used.
1689  You can safely ignore these, too.
1690 \end_layout
1691
1692 \begin_layout Itemize
1693 \begin_inset Flex Code
1694 status collapsed
1695
1696 \begin_layout Plain Layout
1697 Overfull 
1698 \backslash
1699 hbox
1700 \end_layout
1701
1702 \end_inset
1703
1704
1705 \begin_inset Newline newline
1706 \end_inset
1707
1708 LaTeX absolutely 
1709 \emph on
1710 loves
1711 \emph default
1712  to spew these out.
1713  They are warnings about lines that were too long and run past the right
1714  margin.
1715  Almost always, this is unnoticeable in the final output.
1716  (It can be just a point or two.) Or, only one or two characters extend past
1717  the margin.
1718  LaTeX seems to generate at least one of these messages for just about any
1719  document you write.
1720 \begin_inset Newline newline
1721 \end_inset
1722
1723 You can ignore these messages.
1724  Your eyes will tell you if there's a problem with something that's too
1725  wide; just look at the output.
1726 \begin_inset Foot
1727 status collapsed
1728
1729 \begin_layout Plain Layout
1730 You can also enable the `draft' option in 
1731 \begin_inset Flex MenuItem
1732 status collapsed
1733
1734 \begin_layout Plain Layout
1735 Document
1736 \bar under
1737 \SpecialChar \menuseparator
1738
1739 \bar default
1740 Settings
1741 \end_layout
1742
1743 \end_inset
1744
1745 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1746 \end_layout
1747
1748 \end_inset
1749
1750
1751 \end_layout
1752
1753 \begin_layout Itemize
1754 \begin_inset Flex Code
1755 status collapsed
1756
1757 \begin_layout Plain Layout
1758 Underfull 
1759 \backslash
1760 hbox
1761 \end_layout
1762
1763 \end_inset
1764
1765
1766 \begin_inset Newline newline
1767 \end_inset
1768
1769 Not quite as common as its cousin.
1770  LaTeX seems to like to print lines that are a bit too wide as opposed to
1771  ones that are a bit too narrow.
1772  We have no idea why.
1773 \end_layout
1774
1775 \begin_layout Itemize
1776 \begin_inset Flex Code
1777 status collapsed
1778
1779 \begin_layout Plain Layout
1780 Overfull 
1781 \backslash
1782 vbox
1783 \end_layout
1784
1785 \end_inset
1786
1787  and 
1788 \begin_inset Flex Code
1789 status collapsed
1790
1791 \begin_layout Plain Layout
1792 Underfull 
1793 \backslash
1794 vbox
1795 \end_layout
1796
1797 \end_inset
1798
1799
1800 \begin_inset Newline newline
1801 \end_inset
1802
1803 Warnings about troubles breaking the page.
1804  Once again, just look at the output.
1805  Your eyes will tell you where something has gone wrong.
1806 \end_layout
1807
1808 \begin_layout Itemize
1809 \begin_inset Flex Code
1810 status collapsed
1811
1812 \begin_layout Plain Layout
1813 LaTeX Error: File 
1814 \begin_inset Quotes els
1815 \end_inset
1816
1817 Xxxx
1818 \begin_inset Quotes ers
1819 \end_inset
1820
1821  not found
1822 \end_layout
1823
1824 \end_inset
1825
1826
1827 \begin_inset Newline newline
1828 \end_inset
1829
1830 The file 
1831 \begin_inset Quotes eld
1832 \end_inset
1833
1834 Xxxx
1835 \begin_inset Quotes erd
1836 \end_inset
1837
1838  isn't installed on this system.
1839  This usually appears because some package your document needs isn't installed.
1840  If you didn't touch the preamble or didn't use the 
1841 \begin_inset Flex Code
1842 status collapsed
1843
1844 \begin_layout Plain Layout
1845
1846 \backslash
1847 usepackage{}
1848 \end_layout
1849
1850 \end_inset
1851
1852  command, then one of the packages LyX tried to load is missing.
1853  Use 
1854 \begin_inset Flex MenuItem
1855 status collapsed
1856
1857 \begin_layout Plain Layout
1858 Help\SpecialChar \menuseparator
1859 LaTeX Configuration
1860 \end_layout
1861
1862 \end_inset
1863
1864  to get a list of packages that LyX knows about.
1865  This file is updated whenever you reconfigure LyX (using 
1866 \begin_inset Flex MenuItem
1867 status collapsed
1868
1869 \begin_layout Plain Layout
1870 Tools\SpecialChar \menuseparator
1871 Reconfigure
1872 \end_layout
1873
1874 \end_inset
1875
1876 ) and tells you which packages have been detected and what they do.
1877 \begin_inset Newline newline
1878 \end_inset
1879
1880 If you did use the 
1881 \begin_inset Flex Code
1882 status collapsed
1883
1884 \begin_layout Plain Layout
1885
1886 \backslash
1887 usepackage{}
1888 \end_layout
1889
1890 \end_inset
1891
1892  command and the package in question isn't installed, then you'll need to
1893  install it yourself.
1894 \end_layout
1895
1896 \begin_layout Itemize
1897 \begin_inset Flex Code
1898 status collapsed
1899
1900 \begin_layout Plain Layout
1901 LaTeX Error: Unknown option
1902 \end_layout
1903
1904 \end_inset
1905
1906
1907 \begin_inset Newline newline
1908 \end_inset
1909
1910 Error messages beginning with this are trying to tell you that you specified
1911  a bad or undefined option to a package.
1912  Check the package's documentation.
1913 \end_layout
1914
1915 \begin_layout Itemize
1916 \begin_inset Flex Code
1917 status collapsed
1918
1919 \begin_layout Plain Layout
1920 Undefined control sequence
1921 \end_layout
1922
1923 \end_inset
1924
1925
1926 \begin_inset Newline newline
1927 \end_inset
1928
1929 If you've inserted LaTeX code into your document, but made a typo, you'll
1930  get one of these.
1931  You may have forgotten to load a package.
1932  In any case, this error message usually means that you used an undefined
1933  command.
1934  
1935 \end_layout
1936
1937 \begin_layout Standard
1938 There are other error and warning messages.
1939  Some are self-explanatory.
1940  These are usually LaTeX messages.
1941  Others are downright cryptic.
1942  These are usually TeX error messages, and we really have 
1943 \emph on
1944 no clue
1945 \emph default
1946  what they mean or how to decipher them.
1947  No-one does.
1948 \end_layout
1949
1950 \begin_layout Standard
1951 There's a general sequence you should follow if you get error messages:
1952 \end_layout
1953
1954 \begin_layout Enumerate
1955 Look at the LaTeX code you inserted for typos.
1956 \end_layout
1957
1958 \begin_layout Enumerate
1959 If there are no typos, check that you used the command(s) correctly.
1960 \end_layout
1961
1962 \begin_layout Enumerate
1963 If you get a bunch of error boxes piled up at the very top of the document—and
1964  especially if you see a 
1965 \begin_inset Quotes eld
1966 \end_inset
1967
1968
1969 \begin_inset Flex Code
1970 status collapsed
1971
1972 \begin_layout Plain Layout
1973 Missing 
1974 \backslash
1975 begin{document}
1976 \end_layout
1977
1978 \end_inset
1979
1980
1981 \begin_inset Quotes erd
1982 \end_inset
1983
1984  error—it means that there are errors in the preamble.
1985  Start debugging your preamble.
1986 \end_layout
1987
1988 \begin_layout Enumerate
1989 If you didn't add anything to the preamble and didn't add any LaTeX code
1990  to the document, the first suspect is your LaTeX distribution itself.
1991  Check for missing packages and install them.
1992 \end_layout
1993
1994 \begin_layout Enumerate
1995 Okay, so there are no missing packages.
1996  Did you use any of the fine-tuning options in LyX? Specifically, did you
1997  
1998 \emph on
1999 misuse
2000 \emph default
2001  any of them, like trying to manually insert lots of 
2002 \begin_inset Flex Code
2003 status collapsed
2004
2005 \begin_layout Plain Layout
2006 Protected
2007 \begin_inset space ~
2008 \end_inset
2009
2010 Blanks
2011 \end_layout
2012
2013 \end_inset
2014
2015
2016 \begin_inset Flex Code
2017 status collapsed
2018
2019 \begin_layout Plain Layout
2020 Linebreaks
2021 \end_layout
2022
2023 \end_inset
2024
2025 , or 
2026 \begin_inset Flex Code
2027 status collapsed
2028
2029 \begin_layout Plain Layout
2030 Pagebreaks
2031 \end_layout
2032
2033 \end_inset
2034
2035 ? Did you try to kludge something together with these instead of using the
2036  appropriate paragraph environment?
2037 \end_layout
2038
2039 \begin_layout Enumerate
2040 All right, you didn't use any of the fine-tuning options, you played by
2041  the rules.
2042  Did you try to pull a fancy maneuver? Did you do something funky inside
2043  a table or an equation, like inserting a graphic into a table cell?
2044 \end_layout
2045
2046 \begin_layout Enumerate
2047 Do you have long sections of text where LaTeX cannot find a place to break
2048  a line? By default, LaTeX is rather strict about how much extra inter-word
2049  spacing it will add in order to break a line.
2050  Preferably, you should rework the paragraph to avoid the problem.
2051  If this isn't an option, you can wrap your text in 
2052 \begin_inset Flex Code
2053 status collapsed
2054
2055 \begin_layout Plain Layout
2056
2057 \backslash
2058 sloppypar
2059 \end_layout
2060
2061 \end_inset
2062
2063  to make LaTeX's line breaking more, well, sloppy.
2064 \end_layout
2065
2066 \begin_layout Enumerate
2067 Did you go overboard with the nesting? LyX (currently) doesn't check to
2068  make sure you're in the limits for nesting environments.
2069  If you nested a bunch of environments to the 
2070 \begin_inset Formula $17^{\mathrm{th}}$
2071 \end_inset
2072
2073  level, that's the problem.
2074  (The limit in LaTeX is five.)
2075 \end_layout
2076
2077 \begin_layout Enumerate
2078 Okay, you didn't get any error messages, but your output looks awful.
2079  If you have a table or figure that's too wide or long for the page, you
2080  need to:
2081 \end_layout
2082
2083 \begin_deeper
2084 \begin_layout Enumerate
2085 rescale the figure so it fits.
2086 \end_layout
2087
2088 \begin_layout Enumerate
2089 trim down the table so it fits.
2090 \end_layout
2091
2092 \end_deeper
2093 \begin_layout Enumerate
2094 If something else is wrong with the output, and you didn't try to pull anything
2095  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2096 \end_layout
2097
2098 \begin_layout Standard
2099 If all this doesn't help—well, then 
2100 \emph on
2101 perhaps
2102 \emph default
2103  you might have found a bug in LyX\SpecialChar \ldots{}
2104 .
2105 \end_layout
2106
2107 \begin_layout Chapter
2108 Supplemental Tools
2109 \end_layout
2110
2111 \begin_layout Section
2112 Customizing Bibliographies with BibTeX
2113 \end_layout
2114
2115 \begin_layout Standard
2116 The most basic information about how to use BibTeX with LyX is contained
2117  in the section 
2118 \emph on
2119 Bibliography databases (BibTeX)
2120 \emph default
2121  of the 
2122 \emph on
2123 User's Guide
2124 \emph default
2125 .
2126  The following subsections explain special bibliography features supported
2127  by LyX.
2128 \end_layout
2129
2130 \begin_layout Subsection
2131 Alternative Citation Styles
2132 \end_layout
2133
2134 \begin_layout Standard
2135 Standard BibTeX uses numbers (e.
2136 \begin_inset space \thinspace{}
2137 \end_inset
2138
2139 g.
2140 \begin_inset space \space{}
2141 \end_inset
2142
2143
2144 \begin_inset Quotes eld
2145 \end_inset
2146
2147 [12]
2148 \begin_inset Quotes erd
2149 \end_inset
2150
2151 ) to refer to a cited work.
2152  However, in many scientific disciplines, other citation styles are in use.
2153  The most common one is the author-year style (e.
2154 \begin_inset space \thinspace{}
2155 \end_inset
2156
2157 g.
2158 \begin_inset space \space{}
2159 \end_inset
2160
2161
2162 \begin_inset Quotes eld
2163 \end_inset
2164
2165 Knuth 1984a
2166 \begin_inset Quotes erd
2167 \end_inset
2168
2169 ).
2170  LyX supports two packages that provide this style, 
2171 \begin_inset Flex Code
2172 status collapsed
2173
2174 \begin_layout Plain Layout
2175 natbib
2176 \end_layout
2177
2178 \end_inset
2179
2180  and 
2181 \begin_inset Flex Code
2182 status collapsed
2183
2184 \begin_layout Plain Layout
2185 jurabib
2186 \end_layout
2187
2188 \end_inset
2189
2190 .
2191  Both packages have their pros and cons, which cannot be listed in detail.
2192  If you only want to have simple author-year (or author-numerical) style,
2193  or if you want to use one of the countless style files for 
2194 \begin_inset Flex Code
2195 status collapsed
2196
2197 \begin_layout Plain Layout
2198 natbib
2199 \end_layout
2200
2201 \end_inset
2202
2203 , then the established 
2204 \begin_inset Flex Code
2205 status collapsed
2206
2207 \begin_layout Plain Layout
2208 natbib
2209 \end_layout
2210
2211 \end_inset
2212
2213  package is probably your choice.
2214  If you need special features like short title references, ibidem etc., you
2215  might consider the 
2216 \begin_inset Flex Code
2217 status collapsed
2218
2219 \begin_layout Plain Layout
2220 jurabib
2221 \end_layout
2222
2223 \end_inset
2224
2225  package.
2226 \end_layout
2227
2228 \begin_layout Standard
2229 The handling of both packages in LyX is basically the same.
2230  Go to 
2231 \begin_inset Flex MenuItem
2232 status collapsed
2233
2234 \begin_layout Plain Layout
2235 Document\SpecialChar \menuseparator
2236 Settings
2237 \end_layout
2238
2239 \end_inset
2240
2241  and select under 
2242 \begin_inset Flex MenuItem
2243 status collapsed
2244
2245 \begin_layout Plain Layout
2246 Bibliography
2247 \end_layout
2248
2249 \end_inset
2250
2251  the option 
2252 \begin_inset Flex MenuItem
2253 status collapsed
2254
2255 \begin_layout Plain Layout
2256 Natbib
2257 \end_layout
2258
2259 \end_inset
2260
2261  or 
2262 \begin_inset Flex MenuItem
2263 status collapsed
2264
2265 \begin_layout Plain Layout
2266 Jurabib
2267 \end_layout
2268
2269 \end_inset
2270
2271 .
2272  With both packages, you will get some extra features in the citation dialog
2273  and you can select the style of the reference (
2274 \begin_inset Quotes eld
2275 \end_inset
2276
2277 Knuth 1984
2278 \begin_inset Quotes erd
2279 \end_inset
2280
2281
2282 \begin_inset Quotes eld
2283 \end_inset
2284
2285 Knuth (1984)
2286 \begin_inset Quotes erd
2287 \end_inset
2288
2289
2290 \begin_inset Quotes eld
2291 \end_inset
2292
2293 Knuth, 1984
2294 \begin_inset Quotes erd
2295 \end_inset
2296
2297
2298 \begin_inset Quotes eld
2299 \end_inset
2300
2301 1984
2302 \begin_inset Quotes erd
2303 \end_inset
2304
2305  etc.).
2306  Note that both packages need specifically designed style files.
2307  They both ship their own, but there are lots of additional style files,
2308  and there is even an interactive style file builder
2309 \begin_inset Foot
2310 status collapsed
2311
2312 \begin_layout Plain Layout
2313 See 
2314 \begin_inset Flex URL
2315 status open
2316
2317 \begin_layout Plain Layout
2318
2319 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2320 \end_layout
2321
2322 \end_inset
2323
2324
2325 \end_layout
2326
2327 \end_inset
2328
2329  for 
2330 \begin_inset Flex Code
2331 status collapsed
2332
2333 \begin_layout Plain Layout
2334 natbib
2335 \end_layout
2336
2337 \end_inset
2338
2339 .
2340 \end_layout
2341
2342 \begin_layout Subsection
2343 Sectioned Bibliographies
2344 \end_layout
2345
2346 \begin_layout Standard
2347 Sometimes you might need to divide your bibliography into several sections.
2348  If you are for instance a historian, the possibility to separate sources
2349  and scientific works is most likely a 
2350 \begin_inset Quotes eld
2351 \end_inset
2352
2353 must have
2354 \begin_inset Quotes erd
2355 \end_inset
2356
2357 .
2358  Unfortunately, BibTeX itself does not allow you to do this.
2359  But with the help of some LaTeX packages, BibTeX can be extended to fit
2360  your needs.
2361 \end_layout
2362
2363 \begin_layout Standard
2364 LyX provides native support for one of these packages, 
2365 \family typewriter
2366 bibtopic
2367 \family default
2368 .
2369 \begin_inset Foot
2370 status collapsed
2371
2372 \begin_layout Plain Layout
2373 Available from 
2374 \begin_inset Flex URL
2375 status open
2376
2377 \begin_layout Plain Layout
2378
2379 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2380 \end_layout
2381
2382 \end_inset
2383
2384
2385 \end_layout
2386
2387 \end_inset
2388
2389  The advantage of this package (compared to other packages like 
2390 \family typewriter
2391 multibib
2392 \family default
2393 ) is that you don't need to define new citation commands.
2394  Instead, you need to prepare different bibliographic databases which include
2395  the entries for the different sections of the bibliography.
2396  For example: If you want to divide your bibliography into the sections
2397  
2398 \begin_inset Quotes eld
2399 \end_inset
2400
2401 Sources
2402 \begin_inset Quotes erd
2403 \end_inset
2404
2405  and 
2406 \begin_inset Quotes eld
2407 \end_inset
2408
2409 Scientific works
2410 \begin_inset Quotes erd
2411 \end_inset
2412
2413 , you first need to create two bibliographic databases, e.
2414 \begin_inset space \thinspace{}
2415 \end_inset
2416
2417 g.
2418 \begin_inset space \space{}
2419 \end_inset
2420
2421
2422 \begin_inset Flex Code
2423 status collapsed
2424
2425 \begin_layout Plain Layout
2426 sources.bib
2427 \end_layout
2428
2429 \end_inset
2430
2431  and 
2432 \begin_inset Flex Code
2433 status collapsed
2434
2435 \begin_layout Plain Layout
2436 scientific.bib
2437 \end_layout
2438
2439 \end_inset
2440
2441 .
2442  
2443 \end_layout
2444
2445 \begin_layout Standard
2446 Go to 
2447 \begin_inset Flex MenuItem
2448 status collapsed
2449
2450 \begin_layout Plain Layout
2451 Document\SpecialChar \menuseparator
2452 Settings
2453 \end_layout
2454
2455 \end_inset
2456
2457  and check under 
2458 \begin_inset Flex MenuItem
2459 status collapsed
2460
2461 \begin_layout Plain Layout
2462 Bibliography
2463 \end_layout
2464
2465 \end_inset
2466
2467  the option 
2468 \begin_inset Flex MenuItem
2469 status collapsed
2470
2471 \begin_layout Plain Layout
2472 Sectioned bibliography
2473 \end_layout
2474
2475 \end_inset
2476
2477 .
2478  Now you can insert multiple BibTeX bibliographies, one for each section
2479  of your bibliography.
2480  Returning to our example: Insert the BibTeX bibliography 
2481 \begin_inset Flex Code
2482 status collapsed
2483
2484 \begin_layout Plain Layout
2485 sources.bib
2486 \end_layout
2487
2488 \end_inset
2489
2490  and a second one for the database 
2491 \begin_inset Flex Code
2492 status collapsed
2493
2494 \begin_layout Plain Layout
2495 scientific.bib
2496 \end_layout
2497
2498 \end_inset
2499
2500 .
2501  You are free to use the same or different styles for each section.
2502  Additionally, you can choose if the bibliography section should contain
2503  
2504 \begin_inset Quotes eld
2505 \end_inset
2506
2507 all cited references
2508 \begin_inset Quotes erd
2509 \end_inset
2510
2511  of the specified database(s) (which is the default), 
2512 \begin_inset Quotes eld
2513 \end_inset
2514
2515 all uncited references
2516 \begin_inset Quotes erd
2517 \end_inset
2518
2519  or even 
2520 \begin_inset Quotes eld
2521 \end_inset
2522
2523 all references
2524 \begin_inset Quotes erd
2525 \end_inset
2526
2527 .
2528  This might be useful if you would like to separate your bibliography into
2529  three sections: 
2530 \begin_inset Quotes eld
2531 \end_inset
2532
2533 Cited sources
2534 \begin_inset Quotes erd
2535 \end_inset
2536
2537
2538 \begin_inset Quotes eld
2539 \end_inset
2540
2541 Uncited sources
2542 \begin_inset Quotes erd
2543 \end_inset
2544
2545 , and 
2546 \begin_inset Quotes eld
2547 \end_inset
2548
2549 Scientific works
2550 \begin_inset Quotes erd
2551 \end_inset
2552
2553 .
2554  The titles for the sections can be added as ordinary sections or subsections.
2555  Since 
2556 \begin_inset Flex Code
2557 status collapsed
2558
2559 \begin_layout Plain Layout
2560 bibtopic
2561 \end_layout
2562
2563 \end_inset
2564
2565  removes the bibliography title, you have to manually re-add that, too (as
2566  a chapter* or section*, for instance).
2567 \end_layout
2568
2569 \begin_layout Subsection
2570 Multiple Bibliographies
2571 \end_layout
2572
2573 \begin_layout Standard
2574 Multiple bibliographies, e.
2575 \begin_inset space \thinspace{}
2576 \end_inset
2577
2578 g.
2579 \begin_inset space \space{}
2580 \end_inset
2581
2582 a bibliography for each section or chapter of the document, are not supported
2583  by BibTeX itself.
2584  But the 
2585 \begin_inset Flex Code
2586 status collapsed
2587
2588 \begin_layout Plain Layout
2589 bibtopic
2590 \end_layout
2591
2592 \end_inset
2593
2594  package, which is used for the creation of sectioned bibliographies in
2595  LyX (see the previous section), provides an easy way to solve this task,
2596  if you are willing to use some 
2597 \begin_inset Flex MenuItem
2598 status collapsed
2599
2600 \begin_layout Plain Layout
2601 TeX Code
2602 \end_layout
2603
2604 \end_inset
2605
2606  (see section
2607 \begin_inset space ~
2608 \end_inset
2609
2610
2611 \begin_inset CommandInset ref
2612 LatexCommand ref
2613 reference "sec:Inserting-TeX-Code"
2614
2615 \end_inset
2616
2617 ).
2618 \begin_inset Foot
2619 status collapsed
2620
2621 \begin_layout Plain Layout
2622 An alternative approach is to use the 
2623 \begin_inset Flex Code
2624 status collapsed
2625
2626 \begin_layout Plain Layout
2627 chapterbib
2628 \end_layout
2629
2630 \end_inset
2631
2632  or 
2633 \begin_inset Flex Code
2634 status collapsed
2635
2636 \begin_layout Plain Layout
2637 bibunits
2638 \end_layout
2639
2640 \end_inset
2641
2642  package, respectively.
2643 \end_layout
2644
2645 \end_inset
2646
2647
2648 \end_layout
2649
2650 \begin_layout Standard
2651 First go to 
2652 \begin_inset Flex MenuItem
2653 status collapsed
2654
2655 \begin_layout Plain Layout
2656 Document\SpecialChar \menuseparator
2657 Settings
2658 \end_layout
2659
2660 \end_inset
2661
2662  and under 
2663 \begin_inset Flex MenuItem
2664 status collapsed
2665
2666 \begin_layout Plain Layout
2667 Bibliography
2668 \end_layout
2669
2670 \end_inset
2671
2672  check 
2673 \begin_inset Flex MenuItem
2674 status collapsed
2675
2676 \begin_layout Plain Layout
2677 Sectioned bibliography
2678 \end_layout
2679
2680 \end_inset
2681
2682 .
2683  In the document, you have to enclose the sections, which shall contain
2684  their own bibliography (including the BibTeX bibliography itself), between
2685  
2686 \begin_inset Flex Code
2687 status collapsed
2688
2689 \begin_layout Plain Layout
2690
2691 \backslash
2692 begin{btUnit}
2693 \end_layout
2694
2695 \end_inset
2696
2697  and 
2698 \begin_inset Flex Code
2699 status collapsed
2700
2701 \begin_layout Plain Layout
2702
2703 \backslash
2704 end{btUnit}
2705 \end_layout
2706
2707 \end_inset
2708
2709  (those commands have to be inserted as TeX code).
2710  The bibliography will contain all references that have been cited in the
2711  current 
2712 \begin_inset Flex Code
2713 status collapsed
2714
2715 \begin_layout Plain Layout
2716 btUnit
2717 \end_layout
2718
2719 \end_inset
2720
2721 .
2722  
2723 \series bold
2724 Note:
2725 \series default
2726  If you are using this approach, then every citation reference has to be
2727  inside some 
2728 \begin_inset Flex Code
2729 status collapsed
2730
2731 \begin_layout Plain Layout
2732 btUnit
2733 \end_layout
2734
2735 \end_inset
2736
2737 .
2738  Also, the 
2739 \begin_inset Flex Code
2740 status collapsed
2741
2742 \begin_layout Plain Layout
2743 btUnit
2744 \end_layout
2745
2746 \end_inset
2747
2748 s cannot be nested.
2749 \end_layout
2750
2751 \begin_layout Section
2752 Multipart Documents
2753 \end_layout
2754
2755 \begin_layout Subsection
2756 General Operation
2757 \end_layout
2758
2759 \begin_layout Standard
2760 When you are working on a large file with many sections, it is often convenient
2761  to break up the document into several files, or perhaps you have something
2762  where a table may change from time to time, but the preceding text does
2763  not.
2764  In these cases, you should seriously consider using multipart documents.
2765  For example, scientific papers often have five major sections: the introduction
2766 , observations, results, discussion, and conclusion.
2767  Each of these could be its own separate LyX file, with one 
2768 \begin_inset Quotes eld
2769 \end_inset
2770
2771 master
2772 \begin_inset Quotes erd
2773 \end_inset
2774
2775  file which contains the title, authors, abstract, references, etc., plus
2776  the five included files.
2777  It is important to note that each of these files is a full LyX file which
2778  can be formatted and printed on its own, as well as included in a master
2779  file.
2780  Each of these files must have the same document class, however—don't attempt
2781  to mix book classes with article classes.
2782  You may also include LaTeX files; however, these files must not have their
2783  own preamble (i.
2784 \begin_inset space \thinspace{}
2785 \end_inset
2786
2787 e.
2788 \begin_inset space \space{}
2789 \end_inset
2790
2791 everything up to and including the 
2792 \begin_inset Flex Code
2793 status collapsed
2794
2795 \begin_layout Plain Layout
2796
2797 \backslash
2798 begin{document}
2799 \end_layout
2800
2801 \end_inset
2802
2803  line as well as the 
2804 \begin_inset Flex Code
2805 status collapsed
2806
2807 \begin_layout Plain Layout
2808
2809 \backslash
2810 end{document}
2811 \end_layout
2812
2813 \end_inset
2814
2815  line must be deleted) or else errors will be generated when you try to
2816  make a DVI file.
2817 \end_layout
2818
2819 \begin_layout Standard
2820 LyX allows you to include files quite easily with 
2821 \begin_inset Flex MenuItem
2822 status collapsed
2823
2824 \begin_layout Plain Layout
2825 Insert\SpecialChar \menuseparator
2826 ChiId
2827 \begin_inset space ~
2828 \end_inset
2829
2830 Document
2831 \end_layout
2832
2833 \end_inset
2834
2835 .
2836  When you click on this selection a small box is inserted into the file
2837  at the current cursor location.
2838  Clicking on the box raises a dialog which allows you to select the file
2839  to be included, and the method of its inclusion.
2840  
2841 \end_layout
2842
2843 \begin_layout Standard
2844 The file selection box should by now be obvious.
2845  The three inclusion methods are 
2846 \begin_inset Quotes eld
2847 \end_inset
2848
2849 include
2850 \begin_inset Quotes erd
2851 \end_inset
2852
2853
2854 \begin_inset Quotes eld
2855 \end_inset
2856
2857 input
2858 \begin_inset Quotes erd
2859 \end_inset
2860
2861 , and 
2862 \begin_inset Quotes eld
2863 \end_inset
2864
2865 verbatim
2866 \begin_inset Quotes erd
2867 \end_inset
2868
2869 .
2870  The difference between 
2871 \begin_inset Quotes eld
2872 \end_inset
2873
2874 include
2875 \begin_inset Quotes erd
2876 \end_inset
2877
2878  and 
2879 \begin_inset Quotes eld
2880 \end_inset
2881
2882 input
2883 \begin_inset Quotes erd
2884 \end_inset
2885
2886  is really only meaningful to LaTeXperts, but the practical difference is
2887  that files that are 
2888 \begin_inset Quotes eld
2889 \end_inset
2890
2891 included
2892 \begin_inset Quotes erd
2893 \end_inset
2894
2895  are typeset beginning on a new page, while files that are 
2896 \begin_inset Quotes eld
2897 \end_inset
2898
2899 inputted
2900 \begin_inset Quotes erd
2901 \end_inset
2902
2903  are typeset starting on the current page.
2904 \end_layout
2905
2906 \begin_layout Standard
2907 Generally, the master file is converted into a full LaTeX file before typesettin
2908 g, while the included files are converted to LaTeX files that do not have
2909  all the preamble information.
2910 \end_layout
2911
2912 \begin_layout Standard
2913
2914 \begin_inset Quotes eld
2915 \end_inset
2916
2917 verbatim
2918 \begin_inset Quotes erd
2919 \end_inset
2920
2921  included file allows you to include a file typeset exactly as it appears
2922  in the file, i.
2923 \begin_inset space \thinspace{}
2924 \end_inset
2925
2926 e.
2927 \begin_inset space \space{}
2928 \end_inset
2929
2930 in 
2931 \begin_inset Flex Code
2932 status collapsed
2933
2934 \begin_layout Plain Layout
2935 verbatim
2936 \end_layout
2937
2938 \end_inset
2939
2940  mode, with the characters set in a fixed-width typewriter font.
2941  Normally, spaces in this file are invisible, though two consecutive spaces
2942  are conserved, unlike LyX's normal treatment of spaces.
2943  However, setting the 
2944 \begin_inset Flex MenuItem
2945 status collapsed
2946
2947 \begin_layout Plain Layout
2948 Mark
2949 \begin_inset space ~
2950 \end_inset
2951
2952 spaces
2953 \begin_inset space ~
2954 \end_inset
2955
2956 in
2957 \begin_inset space ~
2958 \end_inset
2959
2960 output
2961 \end_layout
2962
2963 \end_inset
2964
2965  checkbox typesets a mark to unambiguously define the presence of a space.
2966  
2967 \end_layout
2968
2969 \begin_layout Subsection
2970 Cross-References Between Files
2971 \end_layout
2972
2973 \begin_layout Standard
2974 \begin_inset Box Shadowbox
2975 position "t"
2976 hor_pos "c"
2977 has_inner_box 1
2978 inner_pos "t"
2979 use_parbox 0
2980 use_makebox 0
2981 width "100col%"
2982 special "none"
2983 height "1in"
2984 height_special "totalheight"
2985 status open
2986
2987 \begin_layout Plain Layout
2988 This section is somewhat out of date.
2989  Need to describe default master documents and how children are opened when
2990  the master is.
2991  [[FIXME]]
2992 \end_layout
2993
2994 \end_inset
2995
2996
2997 \end_layout
2998
2999 \begin_layout Standard
3000 It is possible to set up cross-references between the different files.
3001  First, open all the files in question: let's call them A and B in a two
3002  file example, where B is included in A.
3003  Let's say you insert a label in A, then want to reference it in B.
3004  Open the cross-reference dialog whilst in document B, and you can select
3005  the 
3006 \begin_inset Quotes eld
3007 \end_inset
3008
3009 buffer
3010 \begin_inset Quotes erd
3011 \end_inset
3012
3013  to use.
3014 \end_layout
3015
3016 \begin_layout Subsection
3017 Bibliography Lists in all Subdocuments
3018 \end_layout
3019
3020 \begin_layout Standard
3021 \begin_inset Box Frameless
3022 position "t"
3023 hor_pos "c"
3024 has_inner_box 1
3025 inner_pos "t"
3026 use_parbox 0
3027 use_makebox 0
3028 width "100col%"
3029 special "none"
3030 height "1in"
3031 height_special "totalheight"
3032 status open
3033
3034 \begin_layout Plain Layout
3035 This section also needs updating.
3036  There is now material about this on the wiki, and it could be copied here.
3037 \end_layout
3038
3039 \end_inset
3040
3041
3042 \end_layout
3043
3044 \begin_layout Standard
3045 Copy the bibliography list with all entries to all subdocuments and transform
3046  them to a comment.
3047  This way LyX will find the 
3048 \begin_inset Flex Code
3049 status collapsed
3050
3051 \begin_layout Plain Layout
3052 .bib
3053 \end_layout
3054
3055 \end_inset
3056
3057 -files and you can easily insert references without making the bibliography
3058  list visible.
3059 \end_layout
3060
3061 \begin_layout Standard
3062 As the bibliography list is in a comment, LaTeX won't use it and the references
3063  will look like this: [?], instead of like this: [1].
3064  One solution is to use the LaTeX-package 
3065 \begin_inset Flex Code
3066 status collapsed
3067
3068 \begin_layout Plain Layout
3069 comment
3070 \end_layout
3071
3072 \end_inset
3073
3074  that will only include comments by processing the files separately.
3075  To do this, add in the LaTeX preamble of every subdocument the following:
3076 \end_layout
3077
3078 \begin_layout LyX-Code
3079
3080 \backslash
3081 usepackage{comment}
3082 \end_layout
3083
3084 \begin_layout LyX-Code
3085
3086 \backslash
3087 includecomment{comment}
3088 \end_layout
3089
3090 \begin_layout Standard
3091 See also 
3092 \begin_inset Flex URL
3093 status collapsed
3094
3095 \begin_layout Plain Layout
3096
3097 http://wiki.lyx.org/FAQ/Unsorted#toc31
3098 \end_layout
3099
3100 \end_inset
3101
3102 .
3103 \end_layout
3104
3105 \begin_layout Section
3106 LyX Archives
3107 \end_layout
3108
3109 \begin_layout Standard
3110 Users sometimes need to be able to 
3111 \begin_inset Quotes eld
3112 \end_inset
3113
3114 bundle
3115 \begin_inset Quotes erd
3116 \end_inset
3117
3118  a LyX file together with all the images (and other files) on which it depends,
3119  either for sending to a publisher or for sharing with a co-author.
3120  LyX 2.0 includes a Python script (
3121 \begin_inset Flex Code
3122 status collapsed
3123
3124 \begin_layout Plain Layout
3125 lyxpak.py
3126 \end_layout
3127
3128 \end_inset
3129
3130 ) that automates this process.
3131  To use it, you must have either the 
3132 \begin_inset Flex Code
3133 status collapsed
3134
3135 \begin_layout Plain Layout
3136 zipfile
3137 \end_layout
3138
3139 \end_inset
3140
3141  or 
3142 \begin_inset Flex Code
3143 status collapsed
3144
3145 \begin_layout Plain Layout
3146 tarfile
3147 \end_layout
3148
3149 \end_inset
3150
3151  python modules installed on your system.
3152  By default, the script prefers the 
3153 \begin_inset Flex Code
3154 status collapsed
3155
3156 \begin_layout Plain Layout
3157 gzip
3158 \end_layout
3159
3160 \end_inset
3161
3162 -compressed 
3163 \begin_inset Flex Code
3164 status collapsed
3165
3166 \begin_layout Plain Layout
3167 tar
3168 \end_layout
3169
3170 \end_inset
3171
3172  format on Unix-like systems and the 
3173 \begin_inset Flex Code
3174 status collapsed
3175
3176 \begin_layout Plain Layout
3177 zip
3178 \end_layout
3179
3180 \end_inset
3181
3182  format on Windows.
3183 \end_layout
3184
3185 \begin_layout Standard
3186 LyX's configuration process will set the script up to export a `LyX Archive',
3187  and this format will then be available under 
3188 \begin_inset Flex Code
3189 status collapsed
3190
3191 \begin_layout Plain Layout
3192 File\SpecialChar \menuseparator
3193 Export
3194 \end_layout
3195
3196 \end_inset
3197
3198 .
3199 \end_layout
3200
3201 \begin_layout Standard
3202 Independently of the platform, the generation of a particular archive format
3203  can be forced by adding either the 
3204 \begin_inset Flex Code
3205 status collapsed
3206
3207 \begin_layout Plain Layout
3208 -t
3209 \end_layout
3210
3211 \end_inset
3212
3213  (for the 
3214 \begin_inset Flex Code
3215 status collapsed
3216
3217 \begin_layout Plain Layout
3218 tar
3219 \end_layout
3220
3221 \end_inset
3222
3223  format) or 
3224 \begin_inset Flex Code
3225 status collapsed
3226
3227 \begin_layout Plain Layout
3228 -z
3229 \end_layout
3230
3231 \end_inset
3232
3233  (for the 
3234 \begin_inset Flex Code
3235 status collapsed
3236
3237 \begin_layout Plain Layout
3238 zip
3239 \end_layout
3240
3241 \end_inset
3242
3243  format) switch to the 
3244 \begin_inset Flex Code
3245 status collapsed
3246
3247 \begin_layout Plain Layout
3248 LyX\SpecialChar \menuseparator
3249 LyX Archive
3250 \end_layout
3251
3252 \end_inset
3253
3254  converter in 
3255 \begin_inset Flex Code
3256 status collapsed
3257
3258 \begin_layout Plain Layout
3259 Tools\SpecialChar \menuseparator
3260 Preferences\SpecialChar \menuseparator
3261 File Handling\SpecialChar \menuseparator
3262 Converters
3263 \end_layout
3264
3265 \end_inset
3266
3267 .
3268  (Make sure you add the switch after the script name, not before it.)
3269 \end_layout
3270
3271 \begin_layout Section
3272 Fancy Headers and Footers
3273 \end_layout
3274
3275 \begin_layout Standard
3276 The default page layout is rather plain; for an 
3277 \begin_inset Flex Code
3278 status collapsed
3279
3280 \begin_layout Plain Layout
3281 article
3282 \end_layout
3283
3284 \end_inset
3285
3286  document class, all you get is a centered page number at the bottom of
3287  the page.
3288  This document uses KOMA-script's book class, so it appears to be a bit
3289  fancier.
3290  But to really put on a show, you need to set the document page style to
3291  
3292 \begin_inset Quotes eld
3293 \end_inset
3294
3295 fancy
3296 \begin_inset Quotes erd
3297 \end_inset
3298
3299 , as mentioned in the 
3300 \emph on
3301 User Guide
3302 \emph default
3303 .
3304  This section describes the LaTeX code you need to insert in your LaTeX
3305  preamble in order to get the desired effects.
3306 \end_layout
3307
3308 \begin_layout Standard
3309 For more information on fancy headers, see the 
3310 \begin_inset Flex Code
3311 status collapsed
3312
3313 \begin_layout Plain Layout
3314 fancyhdr
3315 \end_layout
3316
3317 \end_inset
3318
3319  package documentation.
3320  (
3321 \begin_inset Flex URL
3322 status collapsed
3323
3324 \begin_layout Plain Layout
3325
3326 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3327 \end_layout
3328
3329 \end_inset
3330
3331 )
3332 \end_layout
3333
3334 \begin_layout Standard
3335 The page header is divided into three fields, not surprisingly labeled 
3336 \begin_inset Quotes eld
3337 \end_inset
3338
3339 left
3340 \begin_inset Quotes erd
3341 \end_inset
3342
3343
3344 \begin_inset Quotes eld
3345 \end_inset
3346
3347 center
3348 \begin_inset Quotes erd
3349 \end_inset
3350
3351 , and 
3352 \begin_inset Quotes eld
3353 \end_inset
3354
3355 right
3356 \begin_inset Quotes erd
3357 \end_inset
3358
3359 .
3360  The footer is also divided into these three fields.
3361  The LaTeX commands to set these fields in the simplest manner are 
3362 \begin_inset Flex Code
3363 status collapsed
3364
3365 \begin_layout Plain Layout
3366
3367 \backslash
3368 lhead
3369 \end_layout
3370
3371 \end_inset
3372
3373
3374 \begin_inset Flex Code
3375 status collapsed
3376
3377 \begin_layout Plain Layout
3378
3379 \backslash
3380 chead
3381 \end_layout
3382
3383 \end_inset
3384
3385
3386 \begin_inset Flex Code
3387 status collapsed
3388
3389 \begin_layout Plain Layout
3390
3391 \backslash
3392 rhead
3393 \end_layout
3394
3395 \end_inset
3396
3397
3398 \begin_inset Flex Code
3399 status collapsed
3400
3401 \begin_layout Plain Layout
3402
3403 \backslash
3404 lfoot
3405 \end_layout
3406
3407 \end_inset
3408
3409 , etc.
3410  Suppose you wish to put your name in the upper left hand corner of each
3411  page.
3412  Simply insert the following command in the preamble: 
3413 \end_layout
3414
3415 \begin_layout Standard
3416
3417 \family typewriter
3418
3419 \backslash
3420 lhead{John Q.
3421  DocWriter}
3422 \end_layout
3423
3424 \begin_layout Standard
3425 You will now see your name in the upper left.
3426  If a field has a default entry that you would like to get rid of (often
3427  the page number appears in the central footer) simply include a command
3428  with a blank argument, e.
3429 \begin_inset space \thinspace{}
3430 \end_inset
3431
3432 g.:
3433 \end_layout
3434
3435 \begin_layout Standard
3436
3437 \family typewriter
3438
3439 \backslash
3440 cfoot{}
3441 \end_layout
3442
3443 \begin_layout Standard
3444 Let's get really fancy: lets put the section number with the word 
3445 \begin_inset Quotes eld
3446 \end_inset
3447
3448 Section
3449 \begin_inset Quotes erd
3450 \end_inset
3451
3452  (e.
3453 \begin_inset space \thinspace{}
3454 \end_inset
3455
3456 g.
3457 \begin_inset space \space{}
3458 \end_inset
3459
3460 Section 3) in the upper left, the page number (e.
3461 \begin_inset space \thinspace{}
3462 \end_inset
3463
3464 g.
3465 \begin_inset space \space{}
3466 \end_inset
3467
3468 Page 4) in the upper right, your name in the lower left, and the date in
3469  the lower right.
3470  The following commands should now appear in the preamble:
3471 \end_layout
3472
3473 \begin_layout Standard
3474
3475 \family typewriter
3476
3477 \backslash
3478 lhead{Section 
3479 \backslash
3480 thesection}
3481 \end_layout
3482
3483 \begin_layout Standard
3484
3485 \family typewriter
3486
3487 \backslash
3488 chead{}
3489 \end_layout
3490
3491 \begin_layout Standard
3492
3493 \family typewriter
3494
3495 \backslash
3496 rhead{Page 
3497 \backslash
3498 thepage}
3499 \end_layout
3500
3501 \begin_layout Standard
3502
3503 \family typewriter
3504
3505 \backslash
3506 lfoot{John Q.
3507  DocWriter}
3508 \end_layout
3509
3510 \begin_layout Standard
3511
3512 \family typewriter
3513
3514 \backslash
3515 cfoot{}
3516 \end_layout
3517
3518 \begin_layout Standard
3519
3520 \family typewriter
3521
3522 \backslash
3523 rfoot{
3524 \backslash
3525 today}
3526 \end_layout
3527
3528 \begin_layout Standard
3529 The commands 
3530 \begin_inset Flex Code
3531 status collapsed
3532
3533 \begin_layout Plain Layout
3534
3535 \backslash
3536 thesection
3537 \end_layout
3538
3539 \end_inset
3540
3541  and 
3542 \begin_inset Flex Code
3543 status collapsed
3544
3545 \begin_layout Plain Layout
3546
3547 \backslash
3548 thepage
3549 \end_layout
3550
3551 \end_inset
3552
3553  access LaTeX's section and page counters, and so print out the current
3554  section and page numbers.
3555  
3556 \begin_inset Flex Code
3557 status collapsed
3558
3559 \begin_layout Plain Layout
3560
3561 \backslash
3562 today
3563 \end_layout
3564
3565 \end_inset
3566
3567  simply prints out today's date.
3568 \end_layout
3569
3570 \begin_layout Standard
3571 The thicknesses of the horizontal rules drawn beneath the header and above
3572  the footer can also be modified.
3573  If you don't want one of the rules, set its thickness to 0.
3574  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3575  Use commands
3576 \family typewriter
3577  
3578 \family default
3579 like 
3580 \begin_inset Flex Code
3581 status collapsed
3582
3583 \begin_layout Plain Layout
3584
3585 \backslash
3586 renewcommand{
3587 \backslash
3588 headrulewidth}{0.4pt}
3589 \end_layout
3590
3591 \end_inset
3592
3593  and 
3594 \begin_inset Flex Code
3595 status collapsed
3596
3597 \begin_layout Plain Layout
3598
3599 \backslash
3600 renewcommand{
3601 \backslash
3602 footrulewidth}{0.4pt}
3603 \end_layout
3604
3605 \end_inset
3606
3607  to set the thicknesses.
3608 \end_layout
3609
3610 \begin_layout Standard
3611 You can switch the header/footer settings on and off for individual pages
3612  using commands like 
3613 \begin_inset Flex Code
3614 status collapsed
3615
3616 \begin_layout Plain Layout
3617
3618 \backslash
3619 thispagestyle{empty}
3620 \end_layout
3621
3622 \end_inset
3623
3624
3625 \begin_inset Flex Code
3626 status collapsed
3627
3628 \begin_layout Plain Layout
3629
3630 \backslash
3631 thispagestyle{plain}
3632 \end_layout
3633
3634 \end_inset
3635
3636 , and 
3637 \begin_inset Flex Code
3638 status collapsed
3639
3640 \begin_layout Plain Layout
3641
3642 \backslash
3643 thispagestyle{fancy}
3644 \end_layout
3645
3646 \end_inset
3647
3648 .
3649  Simply insert them in the text on the page you want changed and mark them
3650  as TeX code.
3651  In fact, title pages are marked as plain by default, while following pages
3652  are marked fancy when using the global fancy setting.
3653 \end_layout
3654
3655 \begin_layout Standard
3656 As a final example, it is possible to include an image in the header or
3657  footer.
3658  Suppose you want to put a company logo in the upper lefthand corner.
3659  You might try something like
3660 \end_layout
3661
3662 \begin_layout Standard
3663
3664 \family typewriter
3665
3666 \backslash
3667 lhead{
3668 \backslash
3669 resizebox{1in}{!}{
3670 \backslash
3671 includegraphics{logo.eps}}}
3672 \end_layout
3673
3674 \begin_layout Standard
3675 \noindent
3676 (you may need to preface this with 
3677 \begin_inset Flex Code
3678 status collapsed
3679
3680 \begin_layout Plain Layout
3681 \noindent
3682
3683 \backslash
3684 usepackage{graphics}
3685 \end_layout
3686
3687 \end_inset
3688
3689  if you don't include graphics elsewhere in your document).
3690 \end_layout
3691
3692 \begin_layout Section
3693 Itemize Bullet Selection
3694 \begin_inset CommandInset label
3695 LatexCommand label
3696 name "sec:bullet"
3697
3698 \end_inset
3699
3700
3701 \end_layout
3702
3703 \begin_layout Standard
3704 by
3705 \noun on
3706  Allan Rae
3707 \end_layout
3708
3709 \begin_layout Subsection
3710 Introduction
3711 \end_layout
3712
3713 \begin_layout Standard
3714 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3715  Using this dialog you can easily specify what bullet shape to use at each
3716  level of an itemized list.
3717  These settings are document-wide so you won't be able to specify different
3718  sets of bullets for different paragraphs.
3719 \begin_inset Foot
3720 status collapsed
3721
3722 \begin_layout Plain Layout
3723 Well, actually you can but you'll have to do it by hand.
3724 \end_layout
3725
3726 \end_inset
3727
3728
3729 \end_layout
3730
3731 \begin_layout Subsection
3732 How it looks
3733 \end_layout
3734
3735 \begin_layout Standard
3736 Open the dialog by selecting the 
3737 \begin_inset Flex MenuItem
3738 status collapsed
3739
3740 \begin_layout Plain Layout
3741 Document\SpecialChar \menuseparator
3742 Settings
3743 \end_layout
3744
3745 \end_inset
3746
3747  menu item and then select the 
3748 \begin_inset Flex MenuItem
3749 status collapsed
3750
3751 \begin_layout Plain Layout
3752 Bullets
3753 \end_layout
3754
3755 \end_inset
3756
3757  tab.
3758 \end_layout
3759
3760 \begin_layout Standard
3761 The dialog provides you with a table of bullet shapes.
3762  A column of buttons on the left of the table provides access to the six
3763  different panels of bullet shapes.
3764  The row of buttons across the top is used to select which bullet depth
3765  you are changing.
3766  A text entry under the table shows the currently selected bullet shape's
3767  LaTeX equivalent and this can be edited if desired.
3768  If you do modify the text you will also need to specify any needed packages
3769  in the LaTeX preamble.
3770 \end_layout
3771
3772 \begin_layout Standard
3773 The six panels are divided up by the packages they require.
3774  The following table shows the mappings from button name to LaTeX package.
3775 \end_layout
3776
3777 \begin_layout Standard
3778 \align center
3779 \begin_inset Tabular
3780 <lyxtabular version="3" rows="7" columns="2">
3781 <features rotate="0" tabularvalignment="middle">
3782 <column alignment="center" valignment="top" width="0pt">
3783 <column alignment="center" valignment="top" width="0pt">
3784 <row>
3785 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3786 \begin_inset Text
3787
3788 \begin_layout Plain Layout
3789
3790 \family roman
3791 \series medium
3792 \shape up
3793 \size normal
3794 \emph off
3795 \bar no
3796 \noun off
3797 \color none
3798 Button
3799 \end_layout
3800
3801 \end_inset
3802 </cell>
3803 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3804 \begin_inset Text
3805
3806 \begin_layout Plain Layout
3807
3808 \family roman
3809 \series medium
3810 \shape up
3811 \size normal
3812 \emph off
3813 \bar no
3814 \noun off
3815 \color none
3816 Packages Required
3817 \end_layout
3818
3819 \end_inset
3820 </cell>
3821 </row>
3822 <row>
3823 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3824 \begin_inset Text
3825
3826 \begin_layout Plain Layout
3827
3828 \family sans
3829 \series medium
3830 \shape up
3831 \size normal
3832 \emph off
3833 \bar no
3834 \noun off
3835 \color none
3836 Standard
3837 \end_layout
3838
3839 \end_inset
3840 </cell>
3841 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3842 \begin_inset Text
3843
3844 \begin_layout Plain Layout
3845
3846 \series medium
3847 \shape up
3848 \size normal
3849 \emph off
3850 \bar no
3851 \noun off
3852 \color none
3853 base LaTeX
3854 \end_layout
3855
3856 \end_inset
3857 </cell>
3858 </row>
3859 <row>
3860 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3861 \begin_inset Text
3862
3863 \begin_layout Plain Layout
3864
3865 \family sans
3866 \series medium
3867 \shape up
3868 \size normal
3869 \emph off
3870 \bar no
3871 \noun off
3872 \color none
3873 Maths
3874 \end_layout
3875
3876 \end_inset
3877 </cell>
3878 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3879 \begin_inset Text
3880
3881 \begin_layout Plain Layout
3882
3883 \family typewriter
3884 \series medium
3885 \shape up
3886 \size normal
3887 \emph off
3888 \bar no
3889 \noun off
3890 \color none
3891 amssymb.sty
3892 \end_layout
3893
3894 \end_inset
3895 </cell>
3896 </row>
3897 <row>
3898 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3899 \begin_inset Text
3900
3901 \begin_layout Plain Layout
3902
3903 \family sans
3904 \series medium
3905 \shape up
3906 \size normal
3907 \emph off
3908 \bar no
3909 \noun off
3910 \color none
3911 Ding1
3912 \end_layout
3913
3914 \end_inset
3915 </cell>
3916 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3917 \begin_inset Text
3918
3919 \begin_layout Plain Layout
3920
3921 \family typewriter
3922 \series medium
3923 \shape up
3924 \size normal
3925 \emph off
3926 \bar no
3927 \noun off
3928 \color none
3929 pifont.sty
3930 \end_layout
3931
3932 \end_inset
3933 </cell>
3934 </row>
3935 <row>
3936 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3937 \begin_inset Text
3938
3939 \begin_layout Plain Layout
3940
3941 \family sans
3942 \series medium
3943 \shape up
3944 \size normal
3945 \emph off
3946 \bar no
3947 \noun off
3948 \color none
3949 Ding2
3950 \end_layout
3951
3952 \end_inset
3953 </cell>
3954 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3955 \begin_inset Text
3956
3957 \begin_layout Plain Layout
3958
3959 \family typewriter
3960 \series medium
3961 \shape up
3962 \size normal
3963 \emph off
3964 \bar no
3965 \noun off
3966 \color none
3967 pifont.sty
3968 \end_layout
3969
3970 \end_inset
3971 </cell>
3972 </row>
3973 <row>
3974 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3975 \begin_inset Text
3976
3977 \begin_layout Plain Layout
3978
3979 \family sans
3980 \series medium
3981 \shape up
3982 \size normal
3983 \emph off
3984 \bar no
3985 \noun off
3986 \color none
3987 Ding3
3988 \end_layout
3989
3990 \end_inset
3991 </cell>
3992 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3993 \begin_inset Text
3994
3995 \begin_layout Plain Layout
3996
3997 \family typewriter
3998 \series medium
3999 \shape up
4000 \size normal
4001 \emph off
4002 \bar no
4003 \noun off
4004 \color none
4005 pifont.sty
4006 \end_layout
4007
4008 \end_inset
4009 </cell>
4010 </row>
4011 <row>
4012 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4013 \begin_inset Text
4014
4015 \begin_layout Plain Layout
4016
4017 \family sans
4018 \series medium
4019 \shape up
4020 \size normal
4021 \emph off
4022 \bar no
4023 \noun off
4024 \color none
4025 Ding4
4026 \end_layout
4027
4028 \end_inset
4029 </cell>
4030 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4031 \begin_inset Text
4032
4033 \begin_layout Plain Layout
4034
4035 \family typewriter
4036 \series medium
4037 \shape up
4038 \size normal
4039 \emph off
4040 \bar no
4041 \noun off
4042 \color none
4043 pifont.sty
4044 \end_layout
4045
4046 \end_inset
4047 </cell>
4048 </row>
4049 </lyxtabular>
4050
4051 \end_inset
4052
4053
4054 \end_layout
4055
4056 \begin_layout Standard
4057 LyX doesn't stop you using bullets from packages you don't have.
4058  If you get errors from LaTeX when you try to view or print the file, then
4059  it is likely you are missing a package.
4060 \begin_inset Foot
4061 status collapsed
4062
4063 \begin_layout Plain Layout
4064 LyX doesn't restrict your use since you may be editing locally and exporting
4065  elsewhere.
4066 \end_layout
4067
4068 \end_inset
4069
4070
4071 \end_layout
4072
4073 \begin_layout Subsection
4074 How to use it
4075 \end_layout
4076
4077 \begin_layout Standard
4078 Select which bullet depth you want to change then select the bullet shape
4079  and size.
4080  Any changes will not be visible in LyX, but are visible when viewing the
4081  document.
4082 \end_layout
4083
4084 \begin_layout Standard
4085 You can reset a bullet shape to the default simply by clicking your right
4086  mouse button on the appropriate bullet depth button.
4087 \begin_inset Foot
4088 status collapsed
4089
4090 \begin_layout Plain Layout
4091 If you 
4092 \emph on
4093 really
4094 \emph default
4095  want to have multiple sets of paragraphs with different sets of bullets
4096  in each, then you're going to have to get your hands dirty with TeX code.
4097  The bullet selection dialog can help though because it provides you with
4098  the LaTeX code for a wide range of bullet shapes.
4099  To make your own custom paragraphs you have the following options:
4100 \end_layout
4101
4102 \begin_layout Plain Layout
4103 \begin_inset ERT
4104 status open
4105
4106 \begin_layout Plain Layout
4107
4108
4109 \backslash
4110 let
4111 \backslash
4112 savelabelitemi=
4113 \backslash
4114 labelitemi
4115 \end_layout
4116
4117 \end_inset
4118
4119
4120 \end_layout
4121
4122 \begin_layout Plain Layout
4123 \begin_inset ERT
4124 status open
4125
4126 \begin_layout Plain Layout
4127
4128
4129 \backslash
4130 renewcommand
4131 \backslash
4132 labelitemi[0]{
4133 \backslash
4134 small
4135 \backslash
4136 (
4137 \backslash
4138 sharp
4139 \backslash
4140 )}
4141 \end_layout
4142
4143 \end_inset
4144
4145
4146 \end_layout
4147
4148 \begin_layout Itemize
4149 Use the LaTeX command 
4150 \begin_inset Flex Code
4151 status collapsed
4152
4153 \begin_layout Plain Layout
4154
4155 \backslash
4156 renewcommand{}{}
4157 \end_layout
4158
4159 \end_inset
4160
4161  to specify a new bullet shape for a given depth.
4162  You'll also need to save the current bullet shape so you can restore it
4163  again afterwards.
4164  In this itemized list the following LaTeX code was used to change the bullet
4165  used for the first depth.
4166 \end_layout
4167
4168 \begin_deeper
4169 \begin_layout LyX-Code
4170
4171 \backslash
4172 let
4173 \backslash
4174 savelabelitemi=
4175 \backslash
4176 labelitemi 
4177 \end_layout
4178
4179 \begin_layout LyX-Code
4180
4181 \backslash
4182 renewcommand
4183 \backslash
4184 labelitemi[0]{
4185 \backslash
4186 small
4187 \backslash
4188 (
4189 \backslash
4190 sharp
4191 \backslash
4192 )}
4193 \end_layout
4194
4195 \end_deeper
4196 \begin_layout Itemize
4197 Note that the itemize depth is specified in Roman numerals as part of the
4198  
4199 \family typewriter
4200
4201 \backslash
4202 labelitem
4203 \family default
4204  command.
4205 \end_layout
4206
4207 \begin_layout Itemize
4208 \begin_inset ERT
4209 status open
4210
4211 \begin_layout Plain Layout
4212
4213 [
4214 \backslash
4215 (
4216 \backslash
4217 star
4218 \backslash
4219 )]
4220 \end_layout
4221
4222 \end_inset
4223
4224  Specify each individual entry by starting each item with the bullet shape
4225  enclosed in square brackets and set as 
4226 \begin_inset Flex MenuItem
4227 status collapsed
4228
4229 \begin_layout Plain Layout
4230 TeX Code
4231 \end_layout
4232
4233 \end_inset
4234
4235 .
4236  For example, this item was started with 
4237 \begin_inset Flex Code
4238 status collapsed
4239
4240 \begin_layout Plain Layout
4241 [
4242 \backslash
4243 (
4244 \backslash
4245 star
4246 \backslash
4247 )]
4248 \end_layout
4249
4250 \end_inset
4251
4252 .
4253 \end_layout
4254
4255 \begin_layout Plain Layout
4256 \begin_inset ERT
4257 status open
4258
4259 \begin_layout Plain Layout
4260
4261
4262 \backslash
4263 renewcommand
4264 \backslash
4265 labelitemi[0]{
4266 \backslash
4267 savelabelitemi}
4268 \end_layout
4269
4270 \end_inset
4271
4272
4273 \end_layout
4274
4275 \begin_layout Plain Layout
4276 You'll also need to revert the labelitem back to its previous setting for
4277  the global bullet shape settings to remain in effect.
4278  The way used here was:
4279 \end_layout
4280
4281 \begin_layout LyX-Code
4282
4283 \backslash
4284 renewcommand
4285 \backslash
4286 labelitemi[0]{
4287 \backslash
4288 savelabelitemi}
4289 \end_layout
4290
4291 \end_inset
4292
4293
4294 \end_layout
4295
4296 \begin_layout Chapter
4297 LyX and the World Wide Web
4298 \end_layout
4299
4300 \begin_layout Standard
4301 LyX has long supported the export of documents to various web-friendly formats,
4302  such as HTML.
4303  Before verson 2.0, however, HTML export was always accomplished by the use
4304  of external converters.
4305 \begin_inset Foot
4306 status collapsed
4307
4308 \begin_layout Plain Layout
4309 For details on the use of external converters with LyX, see the 
4310 \emph on
4311 Converters
4312 \emph default
4313  section of the Customization manual.
4314 \end_layout
4315
4316 \end_inset
4317
4318  These fall into two large groups: there are converters that use LaTeX as
4319  an intermediate format, such as 
4320 \begin_inset Flex Code
4321 status collapsed
4322
4323 \begin_layout Plain Layout
4324 htlatex
4325 \end_layout
4326
4327 \end_inset
4328
4329
4330 \begin_inset Flex Code
4331 status collapsed
4332
4333 \begin_layout Plain Layout
4334 html2latex
4335 \end_layout
4336
4337 \end_inset
4338
4339 , and 
4340 \begin_inset Flex Code
4341 status collapsed
4342
4343 \begin_layout Plain Layout
4344 plastex
4345 \end_layout
4346
4347 \end_inset
4348
4349 , relying upon LyX to produce the LaTeX; and there is a converter that works
4350  directly on LyX files, 
4351 \begin_inset Flex Code
4352 status collapsed
4353
4354 \begin_layout Plain Layout
4355 eLyXer
4356 \end_layout
4357
4358 \end_inset
4359
4360 .
4361  All of these have different advantages and disadvantages.
4362  
4363 \end_layout
4364
4365 \begin_layout Standard
4366 The LaTeX-based converters have the advantage that, in principle, they know
4367  everything about the exported document that LaTeX does.
4368  Such converters do not care, for example, if a certain block of code was
4369  produced by LyX or was Evil Red Text.
4370  These converters know about 
4371 \begin_inset Flex Code
4372 status collapsed
4373
4374 \begin_layout Plain Layout
4375 aux
4376 \end_layout
4377
4378 \end_inset
4379
4380  files, counters, and references, and can often make use of the 
4381 \begin_inset Flex Code
4382 status collapsed
4383
4384 \begin_layout Plain Layout
4385 bbl
4386 \end_layout
4387
4388 \end_inset
4389
4390  files generated by BibTeX.
4391  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4392  said that only TeX itself understands TeX---and LaTeX-based converters
4393  will often choke on what seem to be quite simple constructs; complex ones
4394  can throw them completely, and as of this writing, for example, the 
4395 \emph on
4396 Embedded Objects
4397 \emph default
4398  manual will not export with 
4399 \begin_inset Flex Code
4400 status collapsed
4401
4402 \begin_layout Plain Layout
4403 htlatex
4404 \end_layout
4405
4406 \end_inset
4407
4408 , though the others will.
4409  The other issue concerns how math is handled.
4410  These converters typically convert the formulae into little pictures that
4411  are then linked from the HTML document.
4412  Since these are actually generated by LaTeX, they are accurate.
4413  But they do not scale well, and just getting them to look as if they are
4414  actually meant to be in your document---so that the font sizes seem to
4415  be roughly the same---can be a challenge.
4416 \end_layout
4417
4418 \begin_layout Standard
4419 Alex Fernandez's 
4420 \begin_inset Flex Code
4421 status collapsed
4422
4423 \begin_layout Plain Layout
4424 eLyXer
4425 \end_layout
4426
4427 \end_inset
4428
4429  (
4430 \begin_inset CommandInset href
4431 LatexCommand href
4432 name "http://elyxer.nongnu.org/"
4433 target "http://elyxer.nongnu.org/"
4434
4435 \end_inset
4436
4437 ) solves some of these problems.
4438  In particular, the formulae it produces scale perfectly, since it renders
4439  math using a combination of HTML and CSS rather than converting the formulae
4440  to images.
4441  But even moderately complex formula are rendered less well than with 
4442 \begin_inset Flex Code
4443 status collapsed
4444
4445 \begin_layout Plain Layout
4446 htlatex
4447 \end_layout
4448
4449 \end_inset
4450
4451 ; this reflects the limitations of HTML.
4452 \begin_inset Foot
4453 status collapsed
4454
4455 \begin_layout Plain Layout
4456 That said, 
4457 \begin_inset Flex Code
4458 status collapsed
4459
4460 \begin_layout Plain Layout
4461 eLyXer
4462 \end_layout
4463
4464 \end_inset
4465
4466  can also use jsMath and MathJax for equations, but this setting is only
4467  available globally and requires one to have access to a server that runs
4468  the backend.
4469 \end_layout
4470
4471 \end_inset
4472
4473  More importantly (as of version 1.1.1, at least), 
4474 \begin_inset Flex Code
4475 status collapsed
4476
4477 \begin_layout Plain Layout
4478 eLyXer
4479 \end_layout
4480
4481 \end_inset
4482
4483  has limited support for math macros and no support for user-defined paragraph
4484  or character styles.
4485  These limitations make 
4486 \begin_inset Flex Code
4487 status collapsed
4488
4489 \begin_layout Plain Layout
4490 eLyXer
4491 \end_layout
4492
4493 \end_inset
4494
4495  unsuitable for many of the documents LyX users produce.
4496  In principle, of course, these problems could be solved, but the LyX developers
4497  have decided to follow a different path and have made LyX itself capable
4498  of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4499  plaintext.
4500 \end_layout
4501
4502 \begin_layout Standard
4503 As of this writing, XHTML output remains under development and should probably
4504  be regarded as 
4505 \begin_inset Quotes eld
4506 \end_inset
4507
4508 experimental
4509 \begin_inset Quotes erd
4510 \end_inset
4511
4512 .
4513 \begin_inset Foot
4514 status collapsed
4515
4516 \begin_layout Plain Layout
4517 The file 
4518 \begin_inset Flex Code
4519 status collapsed
4520
4521 \begin_layout Plain Layout
4522 development/HTML.notes
4523 \end_layout
4524
4525 \end_inset
4526
4527 , which can be found in the LyX source tree or 
4528 \begin_inset CommandInset href
4529 LatexCommand href
4530 name "accessed online"
4531 target "http://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
4532
4533 \end_inset
4534
4535 , usually contains up-to-date information about the state of XHTML output.
4536  See also the list of XHTML bugs on 
4537 \begin_inset CommandInset href
4538 LatexCommand href
4539 name "the bug tracker"
4540 target "http://www.lyx.org/trac/query?status=reopened&status=assigned&status=new&max=0&component=xhtml+export&order=id&col=id&col=summary&col=reporter&col=keywords&keywords=%21%7Efixedintrunk&desc=1"
4541
4542 \end_inset
4543
4544 .
4545 \end_layout
4546
4547 \end_inset
4548
4549  Still, the developers have chosen this approach because it has several
4550  potential advantages over the other two.
4551 \end_layout
4552
4553 \begin_layout Standard
4554 These advantages are primarily due to the fact that the XHTML output routines,
4555  since they are part of LyX, know everything LyX knows about the document
4556  being exported.
4557 \begin_inset Foot
4558 status collapsed
4559
4560 \begin_layout Plain Layout
4561 Another advantage is that, since these routines are internal to LyX, they
4562  are immune to changes in LyX's file format, or to changes in the semantics
4563  of existing insets.
4564 \end_layout
4565
4566 \end_inset
4567
4568  So they know about the table of contents (as displayed in the outline),
4569  about the counters associated with different paragraph styles, and about
4570  user-defined styles.
4571  The XHTML output routines know what LyX knows about internationalization,
4572  too, so they will output 
4573 \begin_inset Quotes eld
4574 \end_inset
4575
4576 Chapter 1
4577 \begin_inset Quotes erd
4578 \end_inset
4579
4580  or 
4581 \begin_inset Quotes eld
4582 \end_inset
4583
4584
4585 \lang ngerman
4586 Kapitel
4587 \lang english
4588  1
4589 \begin_inset Quotes erd
4590 \end_inset
4591
4592 , depending upon the language in effect at the time.
4593  
4594 \end_layout
4595
4596 \begin_layout Standard
4597 Quite generally, the output routines know what LyX knows about document
4598  layout, that is, about how the document is to be rendered on screen.
4599  We use this information when we output the document as XHTML.
4600  In particular, LyX 
4601 \emph on
4602 automatically
4603 \emph default
4604  generates CSS style information corresponding to the layout information
4605  it uses to render the document on screen: if section headings are supposed
4606  to be sans-serif and bold as seen in LyX, then (by default) they will be
4607  sans-serif and bold when viewed in a web browser, too.
4608  And this is true not just for pre-defined styles, like Section, but for
4609  any style, including user-defined styles.
4610  Indeed, the XHTML output routines make no distinction between user-defined
4611  paragraph and character styles and LyX's own pre-defined styles: in each
4612  case, everything LyX knows about the styles is contained in the layout
4613  files.
4614  And much the same is true as regards pre-defined textual insets, such as
4615  footnotes, and various custom insets.
4616  
4617 \end_layout
4618
4619 \begin_layout Standard
4620 The result is that XHTML output can be customized and extended in exactly
4621  the same way LaTeX output can be customized and extended: through layout
4622  files and modules.
4623  See chapter five of the 
4624 \emph on
4625 Customization 
4626 \emph default
4627 manual for the details.
4628 \end_layout
4629
4630 \begin_layout Standard
4631 The remainder of this chapter contains more detailed information on XHTML
4632  output, its limitations, and ways to work around those limitations.
4633 \end_layout
4634
4635 \begin_layout Section
4636 Math Output in XHTML
4637 \end_layout
4638
4639 \begin_layout Standard
4640 LyX offers four choices for how math is rendered.
4641  These have various advantages and disadvantages:
4642 \end_layout
4643
4644 \begin_layout Itemize
4645 MathML
4646 \begin_inset Newline newline
4647 \end_inset
4648
4649 MathML is a dialect of XML designed specifically for mathematics on the
4650  web, and it typically renders very well in browsers that support it.
4651  The disadvantage is that not all browsers support MathML, and support is
4652  not complete even in the Gecko-based browsers, such as Firefox.
4653 \begin_inset Newline newline
4654 \end_inset
4655
4656 If LyX is unable to render a formula as MathML---for example, if the formula
4657  uses the 
4658 \begin_inset Flex Code
4659 status collapsed
4660
4661 \begin_layout Plain Layout
4662 xymatrix
4663 \end_layout
4664
4665 \end_inset
4666
4667  package or ERT---then it will instead output the formula as an image.
4668  
4669 \end_layout
4670
4671 \begin_layout Itemize
4672 HTML
4673 \begin_inset Newline newline
4674 \end_inset
4675
4676 As mentioned above, 
4677 \begin_inset Flex Code
4678 status collapsed
4679
4680 \begin_layout Plain Layout
4681 elyxer
4682 \end_layout
4683
4684 \end_inset
4685
4686  outputs math as HTML, styled by CSS.
4687 \begin_inset Foot
4688 status collapsed
4689
4690 \begin_layout Plain Layout
4691 LyX has borrowed some of the CSS for its HTML output from 
4692 \begin_inset Flex Code
4693 status collapsed
4694
4695 \begin_layout Plain Layout
4696 elyxer
4697 \end_layout
4698
4699 \end_inset
4700
4701 .
4702 \end_layout
4703
4704 \end_inset
4705
4706  For simple formulae, this can work quite well, though with more complicated
4707  formulae it tends to break down.
4708  Still, this method has the advantage that it is very widely supported and
4709  so it may be appropriate for documents that contain only a little, fairly
4710  simple math.
4711 \begin_inset Newline newline
4712 \end_inset
4713
4714 If Lyx is unable to render a formula as HTML---for example, if the formula
4715  uses the 
4716 \begin_inset Flex Code
4717 status collapsed
4718
4719 \begin_layout Plain Layout
4720 xymatrix
4721 \end_layout
4722
4723 \end_inset
4724
4725  package or ERT---then it will instead output the formula as an image.
4726  
4727 \end_layout
4728
4729 \begin_layout Itemize
4730 Images
4731 \begin_inset Newline newline
4732 \end_inset
4733
4734 Like 
4735 \begin_inset Flex Code
4736 status collapsed
4737
4738 \begin_layout Plain Layout
4739 htlatex
4740 \end_layout
4741
4742 \end_inset
4743
4744 , LyX will output formulae as images, the very same images, in fact, that
4745  are used for instant preview.
4746 \begin_inset Foot
4747 status collapsed
4748
4749 \begin_layout Plain Layout
4750 Instant preview does 
4751 \emph on
4752 not 
4753 \emph default
4754 have to be on for images to be output, however.
4755 \end_layout
4756
4757 \end_inset
4758
4759  The advantage to this method is that the images are simply generated by
4760  LaTeX, so they are very accurate.
4761  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4762  so they do not scale terribly well, and one cannot copy them, etc.
4763  (As of this writing, there are also problems about equation numbering.
4764  See 
4765 \begin_inset CommandInset href
4766 LatexCommand href
4767 name "bug 6894"
4768 target "http://www.lyx.org/trac/ticket/6894"
4769
4770 \end_inset
4771
4772 .)
4773 \begin_inset Newline newline
4774 \end_inset
4775
4776 The size of the images can be controlled by setting the 
4777 \begin_inset Quotes eld
4778 \end_inset
4779
4780 Math Images Scaling
4781 \begin_inset Quotes erd
4782 \end_inset
4783
4784  parameter under 
4785 \begin_inset Flex MenuItem
4786 status collapsed
4787
4788 \begin_layout Plain Layout
4789 Document\SpecialChar \menuseparator
4790 Settings\SpecialChar \menuseparator
4791 Output
4792 \end_layout
4793
4794 \end_inset
4795
4796 .
4797 \begin_inset Foot
4798 status collapsed
4799
4800 \begin_layout Plain Layout
4801 For those who want to know, this controls the resolution of the image in
4802  dots per inch and is based upon a default of 75 dpi.
4803 \end_layout
4804
4805 \end_inset
4806
4807
4808 \begin_inset Newline newline
4809 \end_inset
4810
4811 If LyX for some reason fails to create an image for a formula (e.g., if a
4812  required LaTeX package is not installed), then it will fall back to outputing
4813  the raw LaTeX.
4814 \end_layout
4815
4816 \begin_layout Itemize
4817 LaTeX
4818 \begin_inset Newline newline
4819 \end_inset
4820
4821 Finally, LyX will happily output math as LaTeX.
4822  As well as being the output of last resort, this method can be used with
4823  such tools as 
4824 \begin_inset CommandInset href
4825 LatexCommand href
4826 name "jsMath"
4827 target "http://www.math.union.edu/~dpvc/jsMath/"
4828
4829 \end_inset
4830
4831 , which uses JavaScript to render LaTeX embedded in HTML documents.
4832  LyX wraps the LaTeX in either a 
4833 \begin_inset Flex Code
4834 status collapsed
4835
4836 \begin_layout Plain Layout
4837 span
4838 \end_layout
4839
4840 \end_inset
4841
4842  (for inline formulas) or 
4843 \begin_inset Flex Code
4844 status collapsed
4845
4846 \begin_layout Plain Layout
4847 div
4848 \end_layout
4849
4850 \end_inset
4851
4852  (for displayed formulas) with 
4853 \begin_inset Flex Code
4854 status collapsed
4855
4856 \begin_layout Plain Layout
4857 class='math'
4858 \end_layout
4859
4860 \end_inset
4861
4862 , as is required for jsMath.
4863 \end_layout
4864
4865 \begin_layout Standard
4866 One of these output methods must be selected under 
4867 \begin_inset Flex MenuItem
4868 status collapsed
4869
4870 \begin_layout Plain Layout
4871 Document\SpecialChar \menuseparator
4872 Settings\SpecialChar \menuseparator
4873 Output
4874 \end_layout
4875
4876 \end_inset
4877
4878 .
4879  By default, LyX outputs MathML.
4880  This is a document-wide setting, therefore.
4881 \end_layout
4882
4883 \begin_layout Standard
4884 Eventually, LyX will offer the user the option to select an alternate output
4885  method for a particular inset, say, one that isn't being rendered very
4886  well by MathML.
4887 \begin_inset Foot
4888 status collapsed
4889
4890 \begin_layout Plain Layout
4891 That said, since LyX falls back to images if the inset contains ERT, then
4892  one can force output as an image by putting some harmless ERT into the
4893  math, for example: 
4894 \begin_inset Formula $a=b\relax$
4895 \end_inset
4896
4897 .
4898 \end_layout
4899
4900 \end_inset
4901
4902
4903 \end_layout
4904
4905 \begin_layout Section
4906 Bibliography and Citations
4907 \end_layout
4908
4909 \begin_layout Standard
4910 XHTML output fully supports bibliographies and citations.
4911  
4912 \end_layout
4913
4914 \begin_layout Standard
4915 Citation labels are generated by the same machinery that generates LyX's
4916  on-screen labels, so the labels will look in the output much as they do
4917  in LyX, though better.
4918  If you are using numerical citations, then LyX will output numerical labels,
4919  such as [1] or [17], rather than simply showing the citation key in square
4920  brackets, as it does on-screen.
4921  If you are using author-year citations, then LyX will add lowercase letters
4922  to the years, just as BibTeX does, if it finds more than one citation for
4923  a given author-year combination.
4924  The labels will be printed with the bibliography entries.
4925  Note that there is, at present, no way to customize the appearance of the
4926  labels, for example, to choose between square brackets and parentheses.
4927 \end_layout
4928
4929 \begin_layout Standard
4930 Bibliography output is handled by the same machinery that handles the presentati
4931 on of reference information in the citation dialog, so you will see in the
4932  XHTML output pretty much what you would see if you were to look at a given
4933  entry in the citation dialog.
4934  The formatting can be customized in your layout file or, preferably, in
4935  a module.
4936  See the 
4937 \emph on
4938 Customization
4939 \emph default
4940  manual for the details.
4941 \end_layout
4942
4943 \begin_layout Standard
4944 The main defect at present is that cross-referenced information is printed
4945  with every entry with which it is associated.
4946  So you can see things like this:
4947 \end_layout
4948
4949 \begin_layout Quote
4950 Jason Stanley, 
4951 \begin_inset Quotes eld
4952 \end_inset
4953
4954 Context and Logical Form
4955 \begin_inset Quotes erd
4956 \end_inset
4957
4958 , in 
4959 \emph on
4960 Language in Context: Selected Essays
4961 \emph default
4962  (Oxford: Oxford University Press, 2007), pp.
4963  30--68.
4964 \end_layout
4965
4966 \begin_layout Quote
4967 Jason Stanley, 
4968 \begin_inset Quotes eld
4969 \end_inset
4970
4971 Semantics in Context
4972 \begin_inset Quotes erd
4973 \end_inset
4974
4975 , in 
4976 \emph on
4977 Language in Context: Selected Essays
4978 \emph default
4979  (Oxford: Oxford University Press, 2007), pp.
4980  201--30.
4981 \end_layout
4982
4983 \begin_layout Standard
4984 This should be fixed before long.
4985 \end_layout
4986
4987 \begin_layout Standard
4988 There is no support at present for sectioned bibliographies.
4989  If you have multiple bibliographies, then LyX will print the same bibliography
4990  over and over.
4991 \end_layout
4992
4993 \begin_layout Section
4994 Indexes
4995 \end_layout
4996
4997 \begin_layout Standard
4998 LyX will happily export indexes as XHTML, but with certain limitations at
4999  the moment.
5000 \end_layout
5001
5002 \begin_layout Standard
5003 Index export will be most reliable when you do not attempt to use the fancy
5004  constructs that are described in the section on indexes in the 
5005 \emph on
5006 User's Guide
5007 \emph default
5008 .
5009 \begin_inset Foot
5010 status collapsed
5011
5012 \begin_layout Plain Layout
5013 The main issue here is that LyX itself does not really handle these.
5014  It just lets you enter what you would have to enter in raw LaTeX.
5015 \end_layout
5016
5017 \end_inset
5018
5019  We'll describe how they are handled using the subsection headings from
5020  that section.
5021 \end_layout
5022
5023 \begin_layout Itemize
5024 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5025  these, but the entries must be separated by 
5026 \begin_inset Quotes eld
5027 \end_inset
5028
5029  ! 
5030 \begin_inset Quotes erd
5031 \end_inset
5032
5033 , that is, there must be spaces around the exclamation point.
5034  This is because it is otherwise too difficult to check for escaped exclamation
5035  points, ones in math, and so forth.
5036 \end_layout
5037
5038 \begin_layout Itemize
5039 Page Ranges: There is no support at all for page ranges, since these make
5040  no sense with XHMTL.
5041  Instead, you will just get two index entries, one at either end.
5042 \end_layout
5043
5044 \begin_layout Itemize
5045 Cross-referencing: There is no support for cross-referencing.
5046  If LyX finds an entry containing the 
5047 \begin_inset Quotes eld
5048 \end_inset
5049
5050 |see\SpecialChar \ldots{}
5051
5052 \begin_inset Quotes erd
5053 \end_inset
5054
5055  construct, it is just dropped, and the rest is treated as an ordinary index
5056  entry.
5057 \end_layout
5058
5059 \begin_layout Itemize
5060 Index Entry Order: LyX does support attempts to fix the sorting order.
5061  It will take what is before the first `@' it finds and use that for sorting,
5062  taking what follows the first `@' to be the actual entry.
5063  At present, LyX does not check for escaped `@', so do not try to index
5064  email addresses.
5065 \end_layout
5066
5067 \begin_layout Itemize
5068 Index Entry Layout: You can format entries by using the text style dialog,
5069  or by using any other method available within LyX itself.
5070  There is no support for constructs like: 
5071 \begin_inset Quotes eld
5072 \end_inset
5073
5074 entry|textbf
5075 \begin_inset Quotes erd
5076 \end_inset
5077
5078 .
5079  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5080  and everything that follows it.
5081 \end_layout
5082
5083 \begin_layout Itemize
5084 Multiple Indexes: There is no support for multiple indexes.
5085  Rather, all index entries will be printed as one large index.
5086  To avoid our printing several versions of the index, we print only the
5087  main index, so make sure you have one.
5088 \end_layout
5089
5090 \begin_layout Section
5091 Nomenclature and Glossary
5092 \end_layout
5093
5094 \begin_layout Standard
5095 There is at present no support for glossaries.
5096  Adding it would be fairly trivial, and welcome.
5097 \end_layout
5098
5099 \begin_layout Chapter
5100 The LyX Server
5101 \end_layout
5102
5103 \begin_layout Section
5104 Introduction
5105 \end_layout
5106
5107 \begin_layout Standard
5108 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5109  and retrieve information about the LyX internal state.
5110  This is only intended for advanced users, but they should find it useful.
5111  It is by writing to the LyX server, for example, that bibliography managers,
5112  such as JabRef, are able to 
5113 \begin_inset Quotes eld
5114 \end_inset
5115
5116 push
5117 \begin_inset Quotes erd
5118 \end_inset
5119
5120  citations to LyX.
5121 \end_layout
5122
5123 \begin_layout Section
5124 Starting the LyX Server
5125 \end_layout
5126
5127 \begin_layout Standard
5128 The LyX server works through the use of a pair of named pipes.
5129  These are usually located in 
5130 \begin_inset Flex Code
5131 status collapsed
5132
5133 \begin_layout Plain Layout
5134 UserDir
5135 \end_layout
5136
5137 \end_inset
5138
5139 , (except on Windows, where 
5140 \emph on
5141 local
5142 \emph default
5143  named pipes are special objects located in 
5144 \begin_inset Flex Code
5145 status collapsed
5146
5147 \begin_layout Plain Layout
5148
5149 \backslash
5150
5151 \backslash
5152 .
5153 \backslash
5154 pipe
5155 \end_layout
5156
5157 \end_inset
5158
5159 ) and have the names 
5160 \begin_inset Quotes eld
5161 \end_inset
5162
5163
5164 \begin_inset Flex Code
5165 status collapsed
5166
5167 \begin_layout Plain Layout
5168 lyxpipe.in
5169 \end_layout
5170
5171 \end_inset
5172
5173
5174 \begin_inset Quotes erd
5175 \end_inset
5176
5177  and 
5178 \begin_inset Quotes eld
5179 \end_inset
5180
5181
5182 \begin_inset Flex Code
5183 status collapsed
5184
5185 \begin_layout Plain Layout
5186 lyxpipe.out
5187 \end_layout
5188
5189 \end_inset
5190
5191
5192 \begin_inset Quotes erd
5193 \end_inset
5194
5195 .
5196  External programs write into 
5197 \begin_inset Flex Code
5198 status collapsed
5199
5200 \begin_layout Plain Layout
5201 lyxpipe.in
5202 \end_layout
5203
5204 \end_inset
5205
5206  and read back data from 
5207 \begin_inset Flex Code
5208 status collapsed
5209
5210 \begin_layout Plain Layout
5211 lyxpipe.out
5212 \end_layout
5213
5214 \end_inset
5215
5216 .
5217  The stem of the pipe names can be defined in the 
5218 \begin_inset Flex MenuItem
5219 status collapsed
5220
5221 \begin_layout Plain Layout
5222 Tools\SpecialChar \menuseparator
5223 Preferences
5224 \end_layout
5225
5226 \end_inset
5227
5228  dialog, for example 
5229 \begin_inset Flex Code
5230 status collapsed
5231
5232 \begin_layout Plain Layout
5233 "/home/myhome/lyxpipe"
5234 \end_layout
5235
5236 \end_inset
5237
5238 , or 
5239 \begin_inset Flex Code
5240 status collapsed
5241
5242 \begin_layout Plain Layout
5243 "
5244 \backslash
5245
5246 \backslash
5247 .
5248 \backslash
5249 pipe
5250 \backslash
5251 lyxpipe"
5252 \end_layout
5253
5254 \end_inset
5255
5256  on Windows (
5257 \change_deleted 711066561 1405258697
5258 but
5259 \change_inserted 711066561 1405258701
5260 where
5261 \change_unchanged
5262  any working path 
5263 \change_inserted 711066561 1405258613
5264 instead of lyxpipe 
5265 \change_unchanged
5266 can be used
5267 \change_inserted 711066561 1405258962
5268 , for example 
5269 \begin_inset Flex Code
5270 status collapsed
5271
5272 \begin_layout Plain Layout
5273
5274 \change_inserted 711066561 1405258868
5275 "
5276 \backslash
5277
5278 \backslash
5279 .
5280 \backslash
5281 pipe
5282 \backslash
5283 my
5284 \backslash
5285 lyx
5286 \backslash
5287 pipe"
5288 \change_unchanged
5289
5290 \end_layout
5291
5292 \end_inset
5293
5294  would also work
5295 \change_unchanged
5296 ).
5297  You 
5298 \emph on
5299 must
5300 \emph default
5301  configure this manually in order for the server to start.
5302 \end_layout
5303
5304 \begin_layout Standard
5305 LyX will add the '
5306 \begin_inset Flex Code
5307 status collapsed
5308
5309 \begin_layout Plain Layout
5310 .in
5311 \end_layout
5312
5313 \end_inset
5314
5315 ' and '
5316 \begin_inset Flex Code
5317 status collapsed
5318
5319 \begin_layout Plain Layout
5320 .out
5321 \end_layout
5322
5323 \end_inset
5324
5325 ' to create the pipes.
5326  If one of the pipes already exists, LyX will assume that another LyX process
5327  is already running and will not start the server.
5328  On POSIX (Unix like) systems, if for some other reason, an unused 
5329 \begin_inset Quotes eld
5330 \end_inset
5331
5332 stale
5333 \begin_inset Quotes erd
5334 \end_inset
5335
5336  pipe is left in existence when LyX closes, then LyX will try to delete
5337  it.
5338  If this fails for some reason, you will need to delete the pipes manually
5339  and then restart LyX.
5340  On Windows, pipes are deleted by the OS on program termination or crash,
5341  so 
5342 \begin_inset Quotes eld
5343 \end_inset
5344
5345 stale
5346 \begin_inset Quotes erd
5347 \end_inset
5348
5349  pipes should not be possible.
5350 \end_layout
5351
5352 \begin_layout Standard
5353 To have several LyX processes with servers at the same time, you have to
5354  use different configurations, perhaps by using separate user directories,
5355  each with its own 
5356 \begin_inset Flex Code
5357 status collapsed
5358
5359 \begin_layout Plain Layout
5360 preferences
5361 \end_layout
5362
5363 \end_inset
5364
5365  file, for each process.
5366 \end_layout
5367
5368 \begin_layout Standard
5369 If you are developing a client program, you might find it useful to enable
5370  debugging information from the LyX server.
5371  Do this by starting LyX as 
5372 \begin_inset Flex Code
5373 status collapsed
5374
5375 \begin_layout Plain Layout
5376 lyx -dbg lyxserver
5377 \end_layout
5378
5379 \end_inset
5380
5381 .
5382 \end_layout
5383
5384 \begin_layout Standard
5385 You can find a complete example client written in C
5386 \change_inserted 711066561 1405258366
5387 ++
5388 \change_unchanged
5389  in the source distribution as 
5390 \begin_inset Flex Code
5391 status collapsed
5392
5393 \begin_layout Plain Layout
5394 development/lyxserver/server_monitor.c
5395 \change_inserted 711066561 1405258386
5396 pp
5397 \change_unchanged
5398
5399 \end_layout
5400
5401 \end_inset
5402
5403 .
5404 \end_layout
5405
5406 \begin_layout Standard
5407 Another useful tool is the command-line based client
5408 \change_inserted 711066561 1405258403
5409  
5410 \change_unchanged
5411 found in 
5412 \begin_inset Flex Code
5413 status collapsed
5414
5415 \begin_layout Plain Layout
5416 src/client/lyxclient
5417 \end_layout
5418
5419 \end_inset
5420
5421 .
5422 \end_layout
5423
5424 \begin_layout Section
5425 Normal communication
5426 \end_layout
5427
5428 \begin_layout Standard
5429 To issue a LyX call, the client writes a line of ASCII text into the input
5430  pipe.
5431  This line has the following format:
5432 \end_layout
5433
5434 \begin_layout Quote
5435 LYXCMD:
5436 \emph on
5437 clientname
5438 \emph default
5439 :
5440 \emph on
5441 function
5442 \emph default
5443 :
5444 \emph on
5445 argument
5446 \end_layout
5447
5448 \begin_layout Description
5449 clientname is a name that the client can choose arbitrarily.
5450  Its only use is that LyX will echo it if it sends an answer—so a client
5451  can dispatch results from different requesters.
5452 \end_layout
5453
5454 \begin_layout Description
5455 function is the function you want LyX to perform.
5456  It is the same as the commands you'd use in the minibuffer.
5457 \end_layout
5458
5459 \begin_layout Description
5460 argument is an optional argument which is meaningful only to some functions
5461  (for instance, the 
5462 \begin_inset Quotes eld
5463 \end_inset
5464
5465 self-insert
5466 \begin_inset Quotes erd
5467 \end_inset
5468
5469  LFUN will insert the argument as text at the cursor position).
5470 \end_layout
5471
5472 \begin_layout Standard
5473 The answer from LyX will arrive in the output pipe and be of the form
5474 \end_layout
5475
5476 \begin_layout Quote
5477 INFO:
5478 \emph on
5479 clientname
5480 \emph default
5481 :
5482 \emph on
5483 function
5484 \emph default
5485 :
5486 \emph on
5487 data
5488 \end_layout
5489
5490 \begin_layout Standard
5491 where 
5492 \emph on
5493 clientname
5494 \emph default
5495  and 
5496 \emph on
5497 function
5498 \emph default
5499  are just echoed from the command request, while 
5500 \emph on
5501 data
5502 \emph default
5503  is more or less useful information filled according to how the command
5504  execution worked out.
5505  Some commands, such as 
5506 \begin_inset Quotes eld
5507 \end_inset
5508
5509 font-state
5510 \begin_inset Quotes erd
5511 \end_inset
5512
5513 , will return information about the internal state of LyX, while other will
5514  return an empty data-response.
5515  This means that the command execution went fine.
5516 \end_layout
5517
5518 \begin_layout Standard
5519 In case of errors, the response from LyX will have this form
5520 \end_layout
5521
5522 \begin_layout Quote
5523 ERROR:
5524 \emph on
5525 clientname
5526 \emph default
5527 :
5528 \emph on
5529 function
5530 \emph default
5531 :
5532 \emph on
5533 error message
5534 \end_layout
5535
5536 \begin_layout Standard
5537 where the 
5538 \emph on
5539 error message
5540 \emph default
5541  should contain an explanation of why the command failed.
5542 \end_layout
5543
5544 \begin_layout Standard
5545 Examples:
5546 \end_layout
5547
5548 \begin_layout LyX-Code
5549 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5550 \begin_inset Newline newline
5551 \end_inset
5552
5553 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5554 \begin_inset Newline newline
5555 \end_inset
5556
5557 read a <~/.lyxpipe.out
5558 \begin_inset Newline newline
5559 \end_inset
5560
5561 echo $a
5562 \end_layout
5563
5564 \begin_layout Subsection
5565 AppleScript (Mac OS X)
5566 \end_layout
5567
5568 \begin_layout Standard
5569 Since LyX 2.1, LyX supports basic interactions with AppleScript for normal
5570  communication through the command run.
5571  This command takes a direct argument (the 
5572 \series bold
5573 function
5574 \series default
5575  to perform) and an optional argument.
5576  It either returns the output of the function or triggers an error with
5577  the error message and code.
5578 \end_layout
5579
5580 \begin_layout Standard
5581 Example:
5582 \end_layout
5583
5584 \begin_layout LyX-Code
5585 tell application "LyX"
5586 \end_layout
5587
5588 \begin_layout LyX-Code
5589   try
5590 \end_layout
5591
5592 \begin_layout LyX-Code
5593     -- Stores the current file name into f
5594 \end_layout
5595
5596 \begin_layout LyX-Code
5597     set f to (run "server-get-filename" with argument "")
5598 \end_layout
5599
5600 \begin_layout LyX-Code
5601     on error the error_message number the error_number
5602 \end_layout
5603
5604 \begin_layout LyX-Code
5605       display dialog "Error: " & the error_number & ".
5606  " ¬
5607 \end_layout
5608
5609 \begin_layout LyX-Code
5610               & the error_message buttons {"OK"} default button 1
5611 \end_layout
5612
5613 \begin_layout LyX-Code
5614   end try
5615 \end_layout
5616
5617 \begin_layout LyX-Code
5618 end tell
5619 \end_layout
5620
5621 \begin_layout Section
5622 Notification
5623 \end_layout
5624
5625 \begin_layout Standard
5626 LyX can notify clients of events going on asynchronously.
5627  Currently it will only do this if the user binds a key sequence with the
5628  function 
5629 \begin_inset Quotes eld
5630 \end_inset
5631
5632 notify
5633 \begin_inset Quotes erd
5634 \end_inset
5635
5636 .
5637  The format of the string LyX sends is as follows:
5638 \end_layout
5639
5640 \begin_layout Quote
5641 \begin_inset Flex Code
5642 status collapsed
5643
5644 \begin_layout Plain Layout
5645 NOTIFY:
5646 \end_layout
5647
5648 \end_inset
5649
5650
5651 \emph on
5652 key-sequence
5653 \end_layout
5654
5655 \begin_layout Standard
5656 where 
5657 \emph on
5658 key-sequence
5659 \emph default
5660  is the printed representation of the key sequence that was actually typed
5661  by the user.
5662 \end_layout
5663
5664 \begin_layout Standard
5665 This mechanism can be used to extend LyX's command set and implement macros.
5666  Bind some key sequence to 
5667 \begin_inset Quotes eld
5668 \end_inset
5669
5670 notify
5671 \begin_inset Quotes erd
5672 \end_inset
5673
5674 .
5675  Then start a client that listens on the output pipe, dispatches the command
5676  according to the sequence, and starts a function that may use LyX calls
5677  and LyX requests to issue a command or a series of commands to LyX.
5678 \end_layout
5679
5680 \begin_layout Section
5681 The simple LyX Server Protocol
5682 \end_layout
5683
5684 \begin_layout Standard
5685 LyX implements a simple protocol that can be used for session management.
5686  All messages are of the form
5687 \end_layout
5688
5689 \begin_layout Quote
5690 LYXSRV:
5691 \emph on
5692 clientname
5693 \emph default
5694 :
5695 \emph on
5696 protocol message
5697 \end_layout
5698
5699 \begin_layout Standard
5700 where 
5701 \emph on
5702 protocol message
5703 \emph default
5704  can be 
5705 \begin_inset Quotes eld
5706 \end_inset
5707
5708 hello
5709 \begin_inset Quotes erd
5710 \end_inset
5711
5712  or 
5713 \begin_inset Quotes eld
5714 \end_inset
5715
5716 bye
5717 \begin_inset Quotes erd
5718 \end_inset
5719
5720 .
5721  If 
5722 \begin_inset Quotes eld
5723 \end_inset
5724
5725 hello
5726 \begin_inset Quotes erd
5727 \end_inset
5728
5729  is received from a client, LyX will report back to inform the client that
5730  it's listening to it's messages, while 
5731 \begin_inset Quotes eld
5732 \end_inset
5733
5734 bye
5735 \begin_inset Quotes erd
5736 \end_inset
5737
5738  sent from LyX will inform clients that LyX is closing.
5739 \end_layout
5740
5741 \begin_layout Section
5742 Reverse DVI/PDF search
5743 \end_layout
5744
5745 \begin_layout Standard
5746 Some DVI/PDF viewers
5747 \begin_inset Foot
5748 status collapsed
5749
5750 \begin_layout Plain Layout
5751 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux
5752 \change_inserted 711066561 1405273809
5753 , Qpdfview on Unix
5754 \change_unchanged
5755 , Skim on Mac OSX and SumatraPDF on Windows.
5756 \end_layout
5757
5758 \end_inset
5759
5760  provide 
5761 \emph on
5762 reverse search
5763 \emph default
5764  facility (also called 
5765 \emph on
5766 inverse search
5767 \emph default
5768 ).
5769  This means that you can tell LyX to put the cursor to a specific line in
5770  the document by clicking at the respective position in the DVI/PDF output.
5771  To achieve this, the viewer must be able to communicate with LyX.
5772  This is done via the LyX server either by using the named pipe (
5773 \emph on
5774 lyxpipe
5775 \emph default
5776 ), or the UNIX domain socket (
5777 \emph on
5778 lyxsocket
5779 \emph default
5780 ) that LyX creates in its temporary directory (this is the way the 
5781 \begin_inset Flex Code
5782 status collapsed
5783
5784 \begin_layout Plain Layout
5785 lyxclient
5786 \end_layout
5787
5788 \end_inset
5789
5790  program communicates with LyX).
5791  In some cases, you need a helper script that mediates between the viewer
5792  and LyX, in others, the viewer can communicate with LyX directly.
5793  This depends on the selected viewer and on your operating system.
5794  The same applies to the way viewers need to be configured and the way the
5795  reverse search is actually performed.
5796  In what follows, we will thus describe how to setup reverse search for
5797  specific viewers.
5798  Before we turn to this, though, we will explain what needs to be done generally
5799  to enable reverse search in the DVI/PDF output.
5800 \end_layout
5801
5802 \begin_layout Subsection
5803 Automatic setup
5804 \begin_inset CommandInset label
5805 LatexCommand label
5806 name "sub:rev-search"
5807
5808 \end_inset
5809
5810
5811 \end_layout
5812
5813 \begin_layout Standard
5814 In most cases LyX will do the work for you by enabling the option 
5815 \begin_inset Flex MenuItem
5816 status collapsed
5817
5818 \begin_layout Plain Layout
5819 Synchronize with Output
5820 \end_layout
5821
5822 \end_inset
5823
5824  in the menu 
5825 \begin_inset Flex MenuItem
5826 status collapsed
5827
5828 \begin_layout Plain Layout
5829 Document\SpecialChar \menuseparator
5830 Settings\SpecialChar \menuseparator
5831 Output
5832 \end_layout
5833
5834 \end_inset
5835
5836 .
5837  In such a case LyX will automatically insert the necessary SyncTeX macro
5838  (for PDF) or load the srcltx package (for DVI) respectively.
5839  This option can be easily reached also on 
5840 \begin_inset Flex Code
5841 status collapsed
5842
5843 \begin_layout Plain Layout
5844 View/Update
5845 \end_layout
5846
5847 \end_inset
5848
5849  Toolbar.
5850 \end_layout
5851
5852 \begin_layout Standard
5853 If you need a different setting, you can select or input a custom macro
5854  from the drop down box just below 
5855 \begin_inset Flex MenuItem
5856 status collapsed
5857
5858 \begin_layout Plain Layout
5859 Document\SpecialChar \menuseparator
5860 Settings\SpecialChar \menuseparator
5861 Output\SpecialChar \menuseparator
5862 Synchronize with Output
5863 \end_layout
5864
5865 \end_inset
5866
5867 .
5868 \end_layout
5869
5870 \begin_layout Standard
5871 Note that the method 
5872 \begin_inset Flex Code
5873 status collapsed
5874
5875 \begin_layout Plain Layout
5876
5877 \backslash
5878 synctex=1
5879 \end_layout
5880
5881 \end_inset
5882
5883  enables gzip compression.
5884  If your viewer does not support it, you should instead use 
5885 \begin_inset Flex Code
5886 status collapsed
5887
5888 \begin_layout Plain Layout
5889
5890 \backslash
5891 synctex=-1
5892 \end_layout
5893
5894 \end_inset
5895
5896 .
5897 \end_layout
5898
5899 \begin_layout Standard
5900 Please a
5901 \change_deleted 711066561 1405259326
5902 ö
5903 \change_inserted 711066561 1405259326
5904 l
5905 \change_unchanged
5906 so note that including the 
5907 \begin_inset Flex Code
5908 status collapsed
5909
5910 \begin_layout Plain Layout
5911 srcltx
5912 \end_layout
5913
5914 \end_inset
5915
5916  package or 
5917 \begin_inset Flex Code
5918 status collapsed
5919
5920 \begin_layout Plain Layout
5921 src-specials
5922 \end_layout
5923
5924 \end_inset
5925
5926  sometimes has an undesired impact on the typesetting.
5927  Thus, you should switch output synchronization off for the final typesetting
5928  if you use the 
5929 \begin_inset Flex Code
5930 status collapsed
5931
5932 \begin_layout Plain Layout
5933 srcltx
5934 \end_layout
5935
5936 \end_inset
5937
5938  package or 
5939 \begin_inset Flex Code
5940 status collapsed
5941
5942 \begin_layout Plain Layout
5943 src-specials
5944 \end_layout
5945
5946 \end_inset
5947
5948 .
5949  
5950 \end_layout
5951
5952 \begin_layout Standard
5953 In case you need some more special settings that are not covered by the
5954  automatic settings, read the next section about how to set up output synchroniz
5955 ation manually.
5956  If the automatic setup suits your needs, you can readily jump to section
5957 \begin_inset space ~
5958 \end_inset
5959
5960
5961 \begin_inset CommandInset ref
5962 LatexCommand ref
5963 reference "sub:configuring-viewers"
5964
5965 \end_inset
5966
5967 , where the necessary configuration steps in your viewer -- needed both
5968  with the automatic and the manual setup -- are described.
5969 \end_layout
5970
5971 \begin_layout Subsection
5972 Manual setup
5973 \end_layout
5974
5975 \begin_layout Standard
5976 LaTeX provides several different methods for reverse search.
5977  Some are built-in in the 
5978 \begin_inset Flex Code
5979 status collapsed
5980
5981 \begin_layout Plain Layout
5982 latex/pdflatex
5983 \end_layout
5984
5985 \end_inset
5986
5987  program, some are provided by external packages.
5988  Your choice depends on whether your LaTeX distribution already provides
5989  a given method (the built-in methods are rather new) and whether your viewer
5990  can cope with it.
5991  The available methods are described in the following.
5992 \end_layout
5993
5994 \begin_layout Subsubsection*
5995 Built-in DVI-search via src-specials (DVI only) 
5996 \end_layout
5997
5998 \begin_layout Standard
5999 This method provides the DVI file with the necessary information for reverse
6000  search.
6001  It is available in LaTeX since quite some time (any somewhat recent LaTeX
6002  distribution should include it), and it works reliably.
6003  To enable it, change the 
6004 \begin_inset Flex MenuItem
6005 status collapsed
6006
6007 \begin_layout Plain Layout
6008 LaT
6009 \begin_inset ERT
6010 status collapsed
6011
6012 \begin_layout Plain Layout
6013
6014 {}
6015 \end_layout
6016
6017 \end_inset
6018
6019 eX (plain)->DVI
6020 \end_layout
6021
6022 \end_inset
6023
6024  or 
6025 \begin_inset Flex MenuItem
6026 status collapsed
6027
6028 \begin_layout Plain Layout
6029 LaT
6030 \begin_inset ERT
6031 status collapsed
6032
6033 \begin_layout Plain Layout
6034
6035 {}
6036 \end_layout
6037
6038 \end_inset
6039
6040 eX (plain)->DraftDVI
6041 \end_layout
6042
6043 \end_inset
6044
6045  converter in 
6046 \begin_inset Flex MenuItem
6047 status collapsed
6048
6049 \begin_layout Plain Layout
6050 Preferences\SpecialChar \menuseparator
6051 File Handling\SpecialChar \menuseparator
6052 Converters
6053 \end_layout
6054
6055 \end_inset
6056
6057  to 
6058 \begin_inset Flex Code
6059 status collapsed
6060
6061 \begin_layout Plain Layout
6062 latex -src-specials $$i
6063 \end_layout
6064
6065 \end_inset
6066
6067 .
6068  If this doesn't work, check if your TeX engine needs different options
6069  (the syntax might differ in some distributions).
6070 \end_layout
6071
6072 \begin_layout Subsubsection*
6073 External Packages (PDFSync and scrltx) 
6074 \end_layout
6075
6076 \begin_layout Standard
6077 The packages 
6078 \emph on
6079 pdfsync
6080 \emph default
6081  and 
6082 \emph on
6083 scrltx
6084 \emph default
6085  provide reverse search facility for PDF output (via pdflatex) and DVI output,
6086  respectively.
6087  In order to enable it, load the packages in the LyX preamble: 
6088 \end_layout
6089
6090 \begin_layout Itemize
6091 \begin_inset Flex Code
6092 status collapsed
6093
6094 \begin_layout Plain Layout
6095
6096 \backslash
6097 usepackage{pdfsync}
6098 \end_layout
6099
6100 \end_inset
6101
6102  for reverse PDF search,
6103 \end_layout
6104
6105 \begin_layout Itemize
6106 \begin_inset Flex Code
6107 status collapsed
6108
6109 \begin_layout Plain Layout
6110
6111 \backslash
6112 usepackage[active]{srcltx}
6113 \end_layout
6114
6115 \end_inset
6116
6117  for reverse DVI search.
6118 \end_layout
6119
6120 \begin_layout Standard
6121 If you want to be able to perform both DVI and PDF reverse searches, you
6122  can also insert in the preamble the following lines
6123 \end_layout
6124
6125 \begin_layout LyX-Code
6126
6127 \backslash
6128 usepackage{ifpdf}
6129 \begin_inset Newline newline
6130 \end_inset
6131
6132
6133 \backslash
6134 ifpdf
6135 \begin_inset Newline newline
6136 \end_inset
6137
6138   
6139 \backslash
6140 usepackage{pdfsync}
6141 \begin_inset Newline newline
6142 \end_inset
6143
6144
6145 \backslash
6146 else
6147 \begin_inset Newline newline
6148 \end_inset
6149
6150   
6151 \backslash
6152 usepackage[active]{srcltx}
6153 \begin_inset Newline newline
6154 \end_inset
6155
6156
6157 \backslash
6158 fi
6159 \end_layout
6160
6161 \begin_layout Standard
6162 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6163  right package will be used.
6164 \end_layout
6165
6166 \begin_layout Standard
6167 Note that PDFSync might affect the output layout of your document.
6168  It is therefore advised to disable PDFsync for final documents.
6169 \end_layout
6170
6171 \begin_layout Subsubsection*
6172 Built-in reverse search via SyncTeX (DVI and PDF) 
6173 \end_layout
6174
6175 \begin_layout Standard
6176 Recent versions of 
6177 \begin_inset Flex Code
6178 status collapsed
6179
6180 \begin_layout Plain Layout
6181 (pdf)latex
6182 \end_layout
6183
6184 \end_inset
6185
6186  have built-in support for both PDF and DVI reverse search.
6187  This so-called 
6188 \emph on
6189 SyncTeX
6190 \emph default
6191  facility is basically the result of the integration of the PDFSync package
6192  to the pdftex program and its merge with the 
6193 \emph on
6194 scr-specials
6195 \emph default
6196  approach.
6197  You need at least TeXLive 2008 or a recent MikTeX distribution in order
6198  to use it
6199 \begin_inset Foot
6200 status collapsed
6201
6202 \begin_layout Plain Layout
6203 For some reason, MikTeX does not understand/obey the command LyX inserts
6204  into the preamble when you check the "Enable Forward/Reverse Search" button
6205  in the toolbar and does not generate the necessary info.
6206 \end_layout
6207
6208 \begin_layout Plain Layout
6209 The generation of the required info can be forced by changing the converter
6210  "LaTeX (pdflatex) -> PDF (pdflatex)" in Preferences->File handling->Converters
6211  from the default "pdflatex $$i" to "pdflatex -synctex=1 $$i" (i.e., by adding
6212  the -synctex=1 switch).
6213 \end_layout
6214
6215 \end_inset
6216
6217 .
6218  Also note that only a few PDF viewers (
6219 \change_inserted 711066561 1405273879
6220 Okular and Qpdfview on Unix, 
6221 \change_unchanged
6222 Skim on the Mac, SumatraPDF on Windows) already provide SyncTeX support.
6223 \end_layout
6224
6225 \begin_layout Standard
6226 To enable SyncTeX for DVI output, change the 
6227 \begin_inset Flex MenuItem
6228 status collapsed
6229
6230 \begin_layout Plain Layout
6231 LaT
6232 \begin_inset ERT
6233 status collapsed
6234
6235 \begin_layout Plain Layout
6236
6237 {}
6238 \end_layout
6239
6240 \end_inset
6241
6242 eX (plain) -> DVI
6243 \end_layout
6244
6245 \end_inset
6246
6247  or 
6248 \begin_inset Flex MenuItem
6249 status collapsed
6250
6251 \begin_layout Plain Layout
6252 LaT
6253 \begin_inset ERT
6254 status collapsed
6255
6256 \begin_layout Plain Layout
6257
6258 {}
6259 \end_layout
6260
6261 \end_inset
6262
6263 eX (plain) -> DraftDVI
6264 \end_layout
6265
6266 \end_inset
6267
6268  converter in 
6269 \begin_inset Flex MenuItem
6270 status collapsed
6271
6272 \begin_layout Plain Layout
6273 Preferences\SpecialChar \menuseparator
6274 File Handling\SpecialChar \menuseparator
6275 Converters
6276 \end_layout
6277
6278 \end_inset
6279
6280  to 
6281 \begin_inset Flex Code
6282 status collapsed
6283
6284 \begin_layout Plain Layout
6285 latex -synctex=1 $$i
6286 \end_layout
6287
6288 \end_inset
6289
6290 , and for PDF output, change the 
6291 \begin_inset Flex MenuItem
6292 status collapsed
6293
6294 \begin_layout Plain Layout
6295 LaT
6296 \begin_inset ERT
6297 status collapsed
6298
6299 \begin_layout Plain Layout
6300
6301 {}
6302 \end_layout
6303
6304 \end_inset
6305
6306 eX (pdflatex) -> PDF (pdflatex)
6307 \end_layout
6308
6309 \end_inset
6310
6311  or converter to 
6312 \begin_inset Flex Code
6313 status collapsed
6314
6315 \begin_layout Plain Layout
6316 pdflatex -synctex=1 $$i
6317 \end_layout
6318
6319 \end_inset
6320
6321 .
6322  Check the documentation of your viewer whether the viewer needs to be configure
6323 d for the use with SyncTeX.
6324 \begin_inset Foot
6325 status collapsed
6326
6327 \begin_layout Plain Layout
6328 Note that the option 
6329 \begin_inset Flex Code
6330 status collapsed
6331
6332 \begin_layout Plain Layout
6333 -synctex=1
6334 \end_layout
6335
6336 \end_inset
6337
6338  option enables gzip compression.
6339  If your viewer does not support it, you should instead use 
6340 \begin_inset Flex Code
6341 status collapsed
6342
6343 \begin_layout Plain Layout
6344 -synctex=-1
6345 \end_layout
6346
6347 \end_inset
6348
6349 .
6350 \end_layout
6351
6352 \end_inset
6353
6354
6355 \end_layout
6356
6357 \begin_layout Subsection
6358 Configuring and using specific viewers
6359 \begin_inset CommandInset label
6360 LatexCommand label
6361 name "sub:configuring-viewers"
6362
6363 \end_inset
6364
6365
6366 \end_layout
6367
6368 \begin_layout Subsubsection*
6369 Xdvi (all platforms)
6370 \end_layout
6371
6372 \begin_layout Standard
6373 If you use 
6374 \begin_inset Flex Code
6375 status collapsed
6376
6377 \begin_layout Plain Layout
6378 xdvi
6379 \end_layout
6380
6381 \end_inset
6382
6383 , you don't need to do anything else for performing a reverse DVI search,
6384  as LyX already provides the necessary hooks for automatically using the
6385  
6386 \begin_inset Flex Code
6387 status collapsed
6388
6389 \begin_layout Plain Layout
6390 lyxclient
6391 \end_layout
6392
6393 \end_inset
6394
6395  program.
6396  Just setup your document as described above (reverse search is triggered
6397  by Ctrl-click or Alt-click on Mac OSX, respectively).
6398 \end_layout
6399
6400 \begin_layout Standard
6401 However, if for whatever reason you want to use the named pipe instead of
6402  the socket for communicating with LyX, simply change the DVI viewer in
6403  
6404 \begin_inset Flex MenuItem
6405 status collapsed
6406
6407 \begin_layout Plain Layout
6408 Preferences\SpecialChar \menuseparator
6409 File Handling\SpecialChar \menuseparator
6410 File formats
6411 \end_layout
6412
6413 \end_inset
6414
6415  to
6416 \begin_inset Foot
6417 status collapsed
6418
6419 \begin_layout Plain Layout
6420 On Mac OSX you have to use 
6421 \begin_inset Flex Code
6422 status collapsed
6423
6424 \begin_layout Plain Layout
6425 DISPLAY=:0.0 xdvi -editor "lyxeditor.sh %f %l"
6426 \end_layout
6427
6428 \end_inset
6429
6430
6431 \end_layout
6432
6433 \end_inset
6434
6435  
6436 \begin_inset Flex Code
6437 status collapsed
6438
6439 \begin_layout Plain Layout
6440 xdvi -editor "lyxeditor.sh %f %l"
6441 \end_layout
6442
6443 \end_inset
6444
6445 , where 
6446 \begin_inset Flex Code
6447 status collapsed
6448
6449 \begin_layout Plain Layout
6450 lyxeditor.sh
6451 \end_layout
6452
6453 \end_inset
6454
6455  is a suitable script.
6456  For example, a minimal shell script is the following one:
6457 \end_layout
6458
6459 \begin_layout LyX-Code
6460 #!/bin/sh
6461 \begin_inset Newline newline
6462 \end_inset
6463
6464 LYXPIPE="/path/to/lyxpipe"
6465 \begin_inset Newline newline
6466 \end_inset
6467
6468 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6469 \begin_inset Newline newline
6470 \end_inset
6471
6472 echo "$COMMAND" > "${LYXPIPE}".in || exit
6473 \begin_inset Newline newline
6474 \end_inset
6475
6476 read TMP < "${LYXPIPE}".out || exit
6477 \end_layout
6478
6479 \begin_layout Standard
6480 where 
6481 \begin_inset Flex Code
6482 status collapsed
6483
6484 \begin_layout Plain Layout
6485 /path/to/lyxpipe
6486 \end_layout
6487
6488 \end_inset
6489
6490  is the Ly
6491 \begin_inset ERT
6492 status collapsed
6493
6494 \begin_layout Plain Layout
6495
6496 {}
6497 \end_layout
6498
6499 \end_inset
6500
6501 XServer pipe path specified in 
6502 \begin_inset Flex MenuItem
6503 status collapsed
6504
6505 \begin_layout Plain Layout
6506 Preferences\SpecialChar \menuseparator
6507 Paths
6508 \end_layout
6509
6510 \end_inset
6511
6512 .
6513 \begin_inset Foot
6514 status collapsed
6515
6516 \begin_layout Plain Layout
6517 In the 
6518 \begin_inset Flex Code
6519 status collapsed
6520
6521 \begin_layout Plain Layout
6522 development/tools
6523 \end_layout
6524
6525 \end_inset
6526
6527  folder of a source distribution you can find a 
6528 \begin_inset Flex Code
6529 status collapsed
6530
6531 \begin_layout Plain Layout
6532 lyxeditor
6533 \end_layout
6534
6535 \end_inset
6536
6537  script which is able to locate the 
6538 \emph on
6539 lyxpipe
6540 \emph default
6541  based on your preferences.
6542 \end_layout
6543
6544 \end_inset
6545
6546
6547 \end_layout
6548
6549 \begin_layout Subsubsection*
6550 MacDviX (Mac OSX)
6551 \end_layout
6552
6553 \begin_layout Standard
6554 At the end of 
6555 \begin_inset Flex Code
6556 status collapsed
6557
6558 \begin_layout Plain Layout
6559 /Applications/MacDviX_Folder/calleditor.script
6560 \end_layout
6561
6562 \end_inset
6563
6564 , add the following lines:
6565 \end_layout
6566
6567 \begin_layout LyX-Code
6568 /Applications/Ly
6569 \begin_inset ERT
6570 status collapsed
6571
6572 \begin_layout Plain Layout
6573
6574 {}
6575 \end_layout
6576
6577 \end_inset
6578
6579 X.app/Contents/MacOS/lyxeditor "$2" $1
6580 \begin_inset Newline newline
6581 \end_inset
6582
6583 exit 1
6584 \end_layout
6585
6586 \begin_layout Standard
6587 Modify the lines accordingly if you install LyX somewhere else than in the
6588  Applications folder.
6589 \end_layout
6590
6591 \begin_layout Standard
6592 Reverse search is triggered by Alt-click (OPTION-click).
6593 \end_layout
6594
6595 \begin_layout Subsubsection*
6596 Skim (Mac OSX)
6597 \end_layout
6598
6599 \begin_layout Standard
6600 Enter 
6601 \begin_inset Flex Code
6602 status collapsed
6603
6604 \begin_layout Plain Layout
6605 open -a Skim.app $$i
6606 \end_layout
6607
6608 \end_inset
6609
6610  to the viewer setting in 
6611 \begin_inset Flex MenuItem
6612 status collapsed
6613
6614 \begin_layout Plain Layout
6615 Preferences\SpecialChar \menuseparator
6616 File Handling\SpecialChar \menuseparator
6617 File formats\SpecialChar \menuseparator
6618 PDF (pdflatex)
6619 \end_layout
6620
6621 \end_inset
6622
6623 , and then in 
6624 \begin_inset Flex MenuItem
6625 status collapsed
6626
6627 \begin_layout Plain Layout
6628 Skim\SpecialChar \menuseparator
6629 Preferences\SpecialChar \menuseparator
6630 Sync
6631 \end_layout
6632
6633 \end_inset
6634
6635  choose 
6636 \begin_inset Flex MenuItem
6637 status collapsed
6638
6639 \begin_layout Plain Layout
6640 custom
6641 \end_layout
6642
6643 \end_inset
6644
6645  preset and enter command 
6646 \begin_inset Flex MenuItem
6647 status collapsed
6648
6649 \begin_layout Plain Layout
6650 /Applications/LyX.app/Contents/MacOS/lyxeditor
6651 \end_layout
6652
6653 \end_inset
6654
6655 .
6656 \end_layout
6657
6658 \begin_layout Standard
6659 Reverse search is triggered by COMMAND-SHIFT-click
6660 \end_layout
6661
6662 \begin_layout Subsubsection*
6663 Okular (KDE)
6664 \end_layout
6665
6666 \begin_layout Standard
6667 Go to 
6668 \begin_inset Flex MenuItem
6669 status collapsed
6670
6671 \begin_layout Plain Layout
6672 Settings\SpecialChar \menuseparator
6673 Configure Okular\SpecialChar \ldots{}
6674 \SpecialChar \menuseparator
6675 Editor
6676 \end_layout
6677
6678 \end_inset
6679
6680 , select 
6681 \begin_inset Quotes eld
6682 \end_inset
6683
6684 Custom Text Editor
6685 \begin_inset Quotes erd
6686 \end_inset
6687
6688  and add the command 
6689 \begin_inset Flex Code
6690 status collapsed
6691
6692 \begin_layout Plain Layout
6693 lyxclient -g %f %l
6694 \end_layout
6695
6696 \end_inset
6697
6698 .
6699 \end_layout
6700
6701 \begin_layout Standard
6702 Reverse search is triggered by SHIFT-click.
6703 \change_inserted 711066561 1405259853
6704
6705 \end_layout
6706
6707 \begin_layout Subsubsection*
6708
6709 \change_inserted 711066561 1405273730
6710 Qpdfview (Unix)
6711 \end_layout
6712
6713 \begin_layout Standard
6714
6715 \change_inserted 711066561 1405263147
6716 Qpdfview supports SyncTeX since version 0.3.5.
6717  Go to 
6718 \begin_inset Flex MenuItem
6719 status collapsed
6720
6721 \begin_layout Plain Layout
6722
6723 \change_inserted 711066561 1405260331
6724 Edit\SpecialChar \menuseparator
6725 Settings\SpecialChar \ldots{}
6726 \SpecialChar \menuseparator
6727 Behavior
6728 \change_unchanged
6729
6730 \end_layout
6731
6732 \end_inset
6733
6734 , click on the input field of the 
6735 \begin_inset Quotes eld
6736 \end_inset
6737
6738 Source editor
6739 \begin_inset Quotes erd
6740 \end_inset
6741
6742  item and add the command 
6743 \begin_inset Flex Code
6744 status collapsed
6745
6746 \begin_layout Plain Layout
6747
6748 \change_inserted 711066561 1405260473
6749 lyxclient -g %1 %2
6750 \change_unchanged
6751
6752 \end_layout
6753
6754 \end_inset
6755
6756 .
6757 \end_layout
6758
6759 \begin_layout Standard
6760
6761 \change_inserted 711066561 1405260506
6762 Reverse search is triggered by double-click.
6763 \change_unchanged
6764
6765 \end_layout
6766
6767 \begin_layout Subsubsection*
6768 YAP (Windows)
6769 \end_layout
6770
6771 \begin_layout Standard
6772 Launch yap, choose its 
6773 \begin_inset Flex MenuItem
6774 status collapsed
6775
6776 \begin_layout Plain Layout
6777 View\SpecialChar \menuseparator
6778 Options
6779 \end_layout
6780
6781 \end_inset
6782
6783  menu and select the 
6784 \begin_inset Quotes eld
6785 \end_inset
6786
6787 Inverse DVI Search
6788 \begin_inset Quotes erd
6789 \end_inset
6790
6791  tab.
6792  Click on the 
6793 \begin_inset Quotes eld
6794 \end_inset
6795
6796 New\SpecialChar \ldots{}
6797
6798 \begin_inset Quotes erd
6799 \end_inset
6800
6801  button and, in the window that opens, enter 
6802 \begin_inset Quotes eld
6803 \end_inset
6804
6805 LyX Editor
6806 \begin_inset Quotes erd
6807 \end_inset
6808
6809  (or any other name you like) in the 
6810 \begin_inset Quotes eld
6811 \end_inset
6812
6813 Name:
6814 \begin_inset Quotes erd
6815 \end_inset
6816
6817  field.
6818  Now click on the button labeled 
6819 \begin_inset Quotes eld
6820 \end_inset
6821
6822 \SpecialChar \ldots{}
6823
6824 \begin_inset Quotes erd
6825 \end_inset
6826
6827  to open a file dialog and navigate to the directory containing the batch
6828  file 
6829 \begin_inset Flex Code
6830 status collapsed
6831
6832 \begin_layout Plain Layout
6833 lyxeditor.bat
6834 \end_layout
6835
6836 \end_inset
6837
6838  (see below).
6839  Select 
6840 \begin_inset Flex Code
6841 status collapsed
6842
6843 \begin_layout Plain Layout
6844 lyxeditor.bat
6845 \end_layout
6846
6847 \end_inset
6848
6849  and then specify the program arguments as 
6850 \begin_inset Flex Code
6851 status collapsed
6852
6853 \begin_layout Plain Layout
6854 %f %l
6855 \end_layout
6856
6857 \end_inset
6858
6859 .
6860  The 
6861 \begin_inset Flex Code
6862 status collapsed
6863
6864 \begin_layout Plain Layout
6865 lyxeditor.bat
6866 \end_layout
6867
6868 \end_inset
6869
6870  wrapper is used for communicating with LyX through the 
6871 \emph on
6872 lyxpipe
6873 \emph default
6874  and is as follows:
6875 \end_layout
6876
6877 \begin_layout LyX-Code
6878 @echo off
6879 \begin_inset Newline newline
6880 \end_inset
6881
6882 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6883 \backslash
6884
6885 \backslash
6886 .
6887 \backslash
6888 pipe
6889 \backslash
6890 lyxpipe.in
6891 \begin_inset Newline newline
6892 \end_inset
6893
6894 type 
6895 \backslash
6896
6897 \backslash
6898 .
6899 \backslash
6900 pipe
6901 \backslash
6902 lyxpipe.out
6903 \end_layout
6904
6905 \begin_layout Standard
6906 Make sure that the LyXServer pipe path you specified in LyX is 
6907 \begin_inset Flex Code
6908 status collapsed
6909
6910 \begin_layout Plain Layout
6911
6912 \backslash
6913
6914 \backslash
6915 .
6916 \backslash
6917 pipe
6918 \backslash
6919 lyxpipe
6920 \end_layout
6921
6922 \end_inset
6923
6924 , otherwise change the 
6925 \begin_inset Flex Code
6926 status collapsed
6927
6928 \begin_layout Plain Layout
6929 lyxeditor.bat
6930 \end_layout
6931
6932 \end_inset
6933
6934  wrapper accordingly.
6935 \end_layout
6936
6937 \begin_layout Standard
6938 In yap, reverse search is triggered by double-click.
6939 \end_layout
6940
6941 \begin_layout Subsubsection*
6942 SumatraPDF (Windows)
6943 \end_layout
6944
6945 \begin_layout Standard
6946 In order to use SumatraPDF for inverse search, enter 
6947 \begin_inset Flex Code
6948 status collapsed
6949
6950 \begin_layout Plain Layout
6951 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6952 \end_layout
6953
6954 \end_inset
6955
6956  in the viewer setting in 
6957 \begin_inset Flex MenuItem
6958 status collapsed
6959
6960 \begin_layout Plain Layout
6961 Preferences\SpecialChar \menuseparator
6962 File Handling\SpecialChar \menuseparator
6963 File formats\SpecialChar \menuseparator
6964 PDF (pdflatex)
6965 \end_layout
6966
6967 \end_inset
6968
6969 , where 
6970 \begin_inset Flex Code
6971 status collapsed
6972
6973 \begin_layout Plain Layout
6974 lyxeditor.bat
6975 \end_layout
6976
6977 \end_inset
6978
6979  is the previous wrapper.
6980  If SumatraPDF.exe is not in your command PATH, use its full file name.
6981 \end_layout
6982
6983 \begin_layout Standard
6984 Reverse search is triggered by double-click.
6985 \end_layout
6986
6987 \begin_layout Subsubsection*
6988 YAP (Cygwin)
6989 \end_layout
6990
6991 \begin_layout Standard
6992 First of all, make sure that yap is your default DVI viewer in the Windows
6993  environment, then launch it, choose its 
6994 \begin_inset Flex MenuItem
6995 status collapsed
6996
6997 \begin_layout Plain Layout
6998 View\SpecialChar \menuseparator
6999 Options
7000 \end_layout
7001
7002 \end_inset
7003
7004  menu and select the 
7005 \begin_inset Quotes eld
7006 \end_inset
7007
7008 Inverse DVI Search
7009 \begin_inset Quotes erd
7010 \end_inset
7011
7012  tab.
7013  Click on the 
7014 \begin_inset Quotes eld
7015 \end_inset
7016
7017 New\SpecialChar \ldots{}
7018
7019 \begin_inset Quotes erd
7020 \end_inset
7021
7022  button and, in the window that opens, enter 
7023 \begin_inset Quotes eld
7024 \end_inset
7025
7026 LyX Editor
7027 \begin_inset Quotes erd
7028 \end_inset
7029
7030  (or any other name you like) in the 
7031 \begin_inset Quotes eld
7032 \end_inset
7033
7034 Name:
7035 \begin_inset Quotes erd
7036 \end_inset
7037
7038  field.
7039  Now click on the button labeled 
7040 \begin_inset Quotes eld
7041 \end_inset
7042
7043 \SpecialChar \ldots{}
7044
7045 \begin_inset Quotes erd
7046 \end_inset
7047
7048  to open a file dialog and navigate to the directory containing the 
7049 \begin_inset Flex Code
7050 status collapsed
7051
7052 \begin_layout Plain Layout
7053 lyxeditor.exe
7054 \end_layout
7055
7056 \end_inset
7057
7058  program (which is installed by default on Cygwin along with the LyX executable).
7059  Select 
7060 \begin_inset Flex Code
7061 status collapsed
7062
7063 \begin_layout Plain Layout
7064 lyxeditor.exe
7065 \end_layout
7066
7067 \end_inset
7068
7069  and then specify the program arguments as 
7070 \begin_inset Flex Code
7071 status collapsed
7072
7073 \begin_layout Plain Layout
7074 -g %f %l
7075 \end_layout
7076
7077 \end_inset
7078
7079 .
7080  In this way, you will be using the 
7081 \emph on
7082 lyxsocket
7083 \emph default
7084  for communicating with LyX.
7085  If, for whatever reason, you want to use the 
7086 \emph on
7087 lyxpipe
7088 \emph default
7089 , omit the 
7090 \begin_inset Flex Code
7091 status collapsed
7092
7093 \begin_layout Plain Layout
7094 -g
7095 \end_layout
7096
7097 \end_inset
7098
7099  option and be sure to specify the LyXServer pipe path in the LyX preferences.
7100 \end_layout
7101
7102 \begin_layout Standard
7103 In yap, reverse search is triggered by double-click.
7104 \end_layout
7105
7106 \begin_layout Subsubsection*
7107 SumatraPDF (Cygwin)
7108 \end_layout
7109
7110 \begin_layout Standard
7111 In order to use SumatraPDF for inverse search, enter 
7112 \begin_inset Flex Code
7113 status collapsed
7114
7115 \begin_layout Plain Layout
7116 SumatraPDF -inverse-search "lyxeditor -g %f %l"
7117 \end_layout
7118
7119 \end_inset
7120
7121  in the viewer setting in 
7122 \begin_inset Flex MenuItem
7123 status collapsed
7124
7125 \begin_layout Plain Layout
7126 Preferences\SpecialChar \menuseparator
7127 File Handling\SpecialChar \menuseparator
7128 File formats\SpecialChar \menuseparator
7129 PDF (pdflatex)
7130 \end_layout
7131
7132 \end_inset
7133
7134 .
7135  If SumatraPDF.exe is not in your command PATH, use its full posix path.
7136  The 
7137 \begin_inset Flex Code
7138 status collapsed
7139
7140 \begin_layout Plain Layout
7141 -g
7142 \end_layout
7143
7144 \end_inset
7145
7146  enables communication via the 
7147 \emph on
7148 lyxsocket
7149 \emph default
7150 .
7151  Again, omit the 
7152 \begin_inset Flex Code
7153 status collapsed
7154
7155 \begin_layout Plain Layout
7156 -g
7157 \end_layout
7158
7159 \end_inset
7160
7161  option if you want to use the 
7162 \emph on
7163 lyxpipe
7164 \emph default
7165 , and be sure to specify the LyXServer pipe path in the LyX preferences.
7166 \end_layout
7167
7168 \begin_layout Standard
7169 Reverse search is triggered by double-click.
7170 \end_layout
7171
7172 \begin_layout Section
7173 Forward search
7174 \end_layout
7175
7176 \begin_layout Standard
7177 Forward search is, as the name implies, in a sense the 
7178 \begin_inset Quotes eld
7179 \end_inset
7180
7181 opposite
7182 \begin_inset Quotes erd
7183 \end_inset
7184
7185  of reverse search.
7186  It allows you to let the viewer jump to a given position from within LyX.
7187  If forward search is set up (as described in what follows), you can put
7188  the cursor anywhere in your LyX document, and hit 
7189 \begin_inset Flex MenuItem
7190 status collapsed
7191
7192 \begin_layout Plain Layout
7193 Navigate\SpecialChar \menuseparator
7194 Forward search
7195 \end_layout
7196
7197 \end_inset
7198
7199  (or select 
7200 \begin_inset Flex MenuItem
7201 status collapsed
7202
7203 \begin_layout Plain Layout
7204 Forward search
7205 \end_layout
7206
7207 \end_inset
7208
7209  in the context menu via right mouse click), and then the viewer will jump
7210  to that position as well.
7211  This implies, of course, that your viewer supports this function.
7212 \end_layout
7213
7214 \begin_layout Standard
7215 To make forward search possible, you first need to provide the generated
7216  output PDF/DVI file with additional information about the TeX sources.
7217  This can be done via the methods described in the section 
7218 \begin_inset CommandInset ref
7219 LatexCommand ref
7220 reference "sub:rev-search"
7221
7222 \end_inset
7223
7224 .
7225 \end_layout
7226
7227 \begin_layout Standard
7228 Additionally, you need to configure LyX for using your viewers in 
7229 \begin_inset Flex MenuItem
7230 status collapsed
7231
7232 \begin_layout Plain Layout
7233 Tools\SpecialChar \menuseparator
7234 Preferences\SpecialChar \menuseparator
7235 Output\SpecialChar \menuseparator
7236 General
7237 \end_layout
7238
7239 \end_inset
7240
7241 .
7242  We provide a range of tested configurations for some viewers, which you
7243  can select from the drop down list.
7244  If none of these configurations suits you, you have to find out and enter
7245  a suitable configuration yourself.
7246  The definition syntax uses the following placeholders:
7247 \end_layout
7248
7249 \begin_layout Itemize
7250 \noindent
7251 \begin_inset Flex Code
7252 status collapsed
7253
7254 \begin_layout Plain Layout
7255 $$n
7256 \end_layout
7257
7258 \end_inset
7259
7260 : row number
7261 \end_layout
7262
7263 \begin_layout Itemize
7264 \noindent
7265 \begin_inset Flex Code
7266 status collapsed
7267
7268 \begin_layout Plain Layout
7269 $$t
7270 \end_layout
7271
7272 \end_inset
7273
7274 : name of the (temporary) exported .tex file (without path)
7275 \end_layout
7276
7277 \begin_layout Itemize
7278 \noindent
7279 \begin_inset Flex Code
7280 status collapsed
7281
7282 \begin_layout Plain Layout
7283 $$f
7284 \end_layout
7285
7286 \end_inset
7287
7288 : name of the (temporary) exported .tex file (including path)
7289 \end_layout
7290
7291 \begin_layout Itemize
7292 \noindent
7293 \begin_inset Flex Code
7294 status collapsed
7295
7296 \begin_layout Plain Layout
7297 $$o
7298 \end_layout
7299
7300 \end_inset
7301
7302 : name of the exported output file (either dvi or pdf, depending on which
7303  one exists in the temporary directory)
7304 \end_layout
7305
7306 \begin_layout Standard
7307 Note that only some of the viewers provide full forward search functionality,
7308  among them yap, xdvi, okular
7309 \begin_inset Foot
7310 status collapsed
7311
7312 \begin_layout Plain Layout
7313 You might want to set 
7314 \begin_inset Flex Code
7315 status collapsed
7316
7317 \begin_layout Plain Layout
7318 okular --unique
7319 \end_layout
7320
7321 \end_inset
7322
7323  in 
7324 \begin_inset Flex MenuItem
7325 status collapsed
7326
7327 \begin_layout Plain Layout
7328 Tools\SpecialChar \menuseparator
7329 Preferences\SpecialChar \menuseparator
7330 File Handling\SpecialChar \menuseparator
7331 File
7332 \begin_inset space ~
7333 \end_inset
7334
7335 Formats
7336 \end_layout
7337
7338 \end_inset
7339
7340
7341 \end_layout
7342
7343 \end_inset
7344
7345
7346 \change_inserted 711066561 1405264317
7347 , qpdfview
7348 \change_unchanged
7349  and Sumatra
7350 \change_deleted 711066561 1405264282
7351  
7352 \change_unchanged
7353 PDF
7354 \begin_inset Foot
7355 status collapsed
7356
7357 \begin_layout Plain Layout
7358
7359 \change_deleted 711066561 1405264216
7360 For 
7361 \change_unchanged
7362 Sumatra
7363 \change_inserted 711066561 1405264265
7364 PDF can also use DDE commands through the external program
7365 \change_unchanged
7366  CMCDDE
7367 \change_deleted 711066561 1405264271
7368  is needed
7369 \change_unchanged
7370  --- downloadable from 
7371 \begin_inset CommandInset href
7372 LatexCommand href
7373 target "ftp://ftp2.commence.com/pub/freebies/"
7374
7375 \end_inset
7376
7377
7378 \end_layout
7379
7380 \end_inset
7381
7382 .
7383  While many of the widespread PDF viewers (most notably Adobe Reader) do
7384  not support forward search at all, some other viewers -- e.
7385 \begin_inset space \thinspace{}
7386 \end_inset
7387
7388 g.
7389  evince and xpdf -- allow at least to reload the document and jump to a
7390  specific page of the file, so you can at least navigate 
7391 \begin_inset Quotes eld
7392 \end_inset
7393
7394 near
7395 \begin_inset Quotes erd
7396 \end_inset
7397
7398 .
7399  This latter functionality is provided by an external call of synctex (see
7400  the predefined example configurations).
7401  
7402 \end_layout
7403
7404 \begin_layout Standard
7405 Forward search works both with DVI and PDF output.
7406  LyX simply checks which preview format you have used before (i.
7407 \begin_inset space \thinspace{}
7408 \end_inset
7409
7410 e., which format is already there in the temporary directory) and chooses
7411  the appropriate configuration for the respective format.
7412 \end_layout
7413
7414 \begin_layout Chapter
7415 Special Document Classes
7416 \end_layout
7417
7418 \begin_layout Section
7419 A&A Paper
7420 \end_layout
7421
7422 \begin_layout Standard
7423 by 
7424 \noun on
7425 Peter Sütterlin
7426 \end_layout
7427
7428 \begin_layout Subsection
7429 Introduction
7430 \end_layout
7431
7432 \begin_layout Standard
7433 This section describes how LyX can be used to write articles for submission
7434  to the scientific journal 
7435 \emph on
7436 Astronomy and Astrophysics
7437 \emph default
7438  (www.edpsciences.fr/aa/ 
7439 \begin_inset Flex URL
7440 status collapsed
7441
7442 \begin_layout Plain Layout
7443
7444 http://www.edpsciences.fr/aa/
7445 \end_layout
7446
7447 \end_inset
7448
7449 ) using Version 5.01 of the document class 
7450 \family typewriter
7451 aa.cls
7452 \family default
7453 .
7454  This package can be downloaded from the ftp site
7455 \end_layout
7456
7457 \begin_layout Standard
7458 \begin_inset VSpace medskip
7459 \end_inset
7460
7461
7462 \end_layout
7463
7464 \begin_layout Standard
7465 \align center
7466 \begin_inset Flex URL
7467 status collapsed
7468
7469 \begin_layout Plain Layout
7470
7471 ftp://ftp.edpsciences.org/pub/aa/readme.html
7472 \end_layout
7473
7474 \end_inset
7475
7476
7477 \end_layout
7478
7479 \begin_layout Standard
7480 \begin_inset VSpace medskip
7481 \end_inset
7482
7483
7484 \end_layout
7485
7486 \begin_layout Standard
7487 A manual comes together with that package, and this text is not meant to
7488  replace the original manual but is merely a short guide in how to realize
7489  the correct form of your paper.
7490  
7491 \end_layout
7492
7493 \begin_layout Standard
7494 Please note that the publisher of the journal was changed from Springer
7495  to EDP Sciences starting January 1, 2001.
7496  That change involved also some slight changes to the style files, namely
7497  the removal of the thesaurus command.
7498  The LyX class aa supports the newest version of these style files, V 5.01.
7499  If you have an older version installed, please upgrade.
7500  For compatibility, the old (version 4) layout has been kept as 
7501 \family sans
7502 article (A&A V4)
7503 \family default
7504 .
7505  Please refer to the comments in 
7506 \family typewriter
7507 LyXDir/layouts/aapaper.layout
7508 \family default
7509 .
7510 \end_layout
7511
7512 \begin_layout Subsection
7513 Getting started
7514 \end_layout
7515
7516 \begin_layout Standard
7517 It is recommended you start from the example template distributed with LyX.
7518  If you are not using a template, note the following settings:
7519 \end_layout
7520
7521 \begin_layout Itemize
7522 Select 
7523 \family sans
7524 article (A&A)
7525 \family default
7526  in the 
7527 \family sans
7528 Document\SpecialChar \menuseparator
7529 Settings
7530 \family default
7531  dialog (OK, that one was obvious).
7532 \end_layout
7533
7534 \begin_layout Itemize
7535 Don't change the option 
7536 \family sans
7537 Page
7538 \begin_inset space ~
7539 \end_inset
7540
7541 style
7542 \family default
7543 : Leave it set to 
7544 \family sans
7545 default
7546 \family default
7547 .
7548  The whole layout is done by the macros, you shouldn't change anything.
7549 \end_layout
7550
7551 \begin_layout Subsection
7552 The header block
7553 \end_layout
7554
7555 \begin_layout Standard
7556 First thing to enter is the header information.
7557  It consists of seven entries, of which some are optional.
7558  They are
7559 \end_layout
7560
7561 \begin_layout Itemize
7562
7563 \family sans
7564 Title
7565 \family default
7566 : [required] 
7567 \end_layout
7568
7569 \begin_layout Itemize
7570
7571 \family sans
7572 Subtitle
7573 \family default
7574 : [optional] 
7575 \end_layout
7576
7577 \begin_layout Itemize
7578
7579 \family sans
7580 Author
7581 \family default
7582 : [required]
7583 \end_layout
7584
7585 \begin_layout Itemize
7586
7587 \family sans
7588 Address
7589 \family default
7590 : [required]
7591 \end_layout
7592
7593 \begin_layout Itemize
7594
7595 \family sans
7596 Offprints
7597 \family default
7598 : [optional] if more than one author: whom to contact for offprint requests.
7599 \end_layout
7600
7601 \begin_layout Itemize
7602
7603 \family sans
7604 Mail
7605 \family default
7606 : [optional] mail address for contacts.
7607 \end_layout
7608
7609 \begin_layout Itemize
7610
7611 \family sans
7612 Date
7613 \family default
7614 : [required].
7615  Suggested format is 
7616 \family typewriter
7617 Received: <date>; Accepted <date> 
7618 \end_layout
7619
7620 \begin_layout Standard
7621 There is no need to issue the 
7622 \family typewriter
7623
7624 \backslash
7625 maketitle
7626 \family default
7627  command, this is done automatically by LyX when the header is finished.
7628  Although the order of the single header entries doesn't matter it is advised
7629  to keep the above sequence, just to get the best optics and meets the layout
7630  of the real document.
7631 \end_layout
7632
7633 \begin_layout Standard
7634 If you want to place footnotes in the header block, e.
7635 \begin_inset space \thinspace{}
7636 \end_inset
7637
7638 g.
7639 \begin_inset space \space{}
7640 \end_inset
7641
7642 to state your present address, just use the standard footnote via the menu
7643  
7644 \family sans
7645 Insert\SpecialChar \menuseparator
7646 Footnote.
7647
7648 \family default
7649  LyX will automagically use the term 
7650 \family typewriter
7651
7652 \backslash
7653 thanks{}
7654 \family default
7655  in that case.
7656 \end_layout
7657
7658 \begin_layout Standard
7659 In addition to these topics, the macros use three additional LaTeX commands
7660  that have no counterpart in LyX:
7661 \end_layout
7662
7663 \begin_layout Itemize
7664
7665 \family typewriter
7666
7667 \backslash
7668 and
7669 \family default
7670  to separate different names for more than one author and institute, respectivel
7671 y.
7672 \end_layout
7673
7674 \begin_layout Itemize
7675
7676 \family typewriter
7677
7678 \backslash
7679 inst{<nr>}
7680 \family default
7681 to mark corresponding author/institute pairs.
7682  The institutes are numbered sequentially as they appear in the 
7683 \family sans
7684 Address
7685 \family default
7686  field, so you have to put a marker to each author.
7687 \end_layout
7688
7689 \begin_layout Itemize
7690
7691 \family typewriter
7692
7693 \backslash
7694 email{address}
7695 \family default
7696  to supply an email address for fast contact.
7697 \end_layout
7698
7699 \begin_layout Standard
7700 In all cases, the appropriate command has to be entered in LyX and marked
7701  as LaTeX code.
7702  See the examples.
7703  
7704 \end_layout
7705
7706 \begin_layout Subsection
7707 The abstract
7708 \end_layout
7709
7710 \begin_layout Standard
7711 The abstract should immediately follow the header block.
7712  With version 5 the abstract environment was changed to a command, and there
7713  is now a resctriction to only one paragraph.
7714  In addition, it should contain an entry with the keywords.
7715  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7716  command 
7717 \family typewriter
7718
7719 \backslash
7720 keywords{}
7721 \family default
7722  by hand and mark it as LaTeX code.
7723  Refer to the example paper.
7724 \end_layout
7725
7726 \begin_layout Subsection
7727 Supported environments
7728 \end_layout
7729
7730 \begin_layout Standard
7731 The A&A paper layout supports the following environments for structuring
7732  your text:
7733 \end_layout
7734
7735 \begin_layout Itemize
7736
7737 \family sans
7738 Standard
7739 \end_layout
7740
7741 \begin_layout Itemize
7742
7743 \family sans
7744 Section
7745 \end_layout
7746
7747 \begin_layout Itemize
7748
7749 \family sans
7750 Subsection
7751 \end_layout
7752
7753 \begin_layout Itemize
7754
7755 \family sans
7756 Subsubsection
7757 \end_layout
7758
7759 \begin_layout Itemize
7760
7761 \family sans
7762 Itemize
7763 \end_layout
7764
7765 \begin_layout Itemize
7766
7767 \family sans
7768 Enumerate
7769 \end_layout
7770
7771 \begin_layout Itemize
7772
7773 \family sans
7774 Description
7775 \end_layout
7776
7777 \begin_layout Itemize
7778
7779 \family sans
7780 Caption
7781 \end_layout
7782
7783 \begin_layout Itemize
7784
7785 \family sans
7786 Abstract
7787 \end_layout
7788
7789 \begin_layout Itemize
7790
7791 \family sans
7792 Acknowledgment
7793 \end_layout
7794
7795 \begin_layout Itemize
7796
7797 \family sans
7798 Bibliography
7799 \end_layout
7800
7801 \begin_layout Itemize
7802
7803 \family sans
7804 LaTeX
7805 \end_layout
7806
7807 \begin_layout Subsection
7808 Commands not supported by LyX
7809 \end_layout
7810
7811 \begin_layout Standard
7812 Some commands are not yet supported by the 
7813 \family sans
7814 paper (A&A)
7815 \family default
7816  layout for LyX.
7817  Some have already been mentioned.
7818  For the sake of completeness, they are listed all together here:
7819 \end_layout
7820
7821 \begin_layout Itemize
7822
7823 \family typewriter
7824
7825 \backslash
7826 and
7827 \end_layout
7828
7829 \begin_layout Itemize
7830
7831 \family typewriter
7832
7833 \backslash
7834 email
7835 \end_layout
7836
7837 \begin_layout Itemize
7838
7839 \family typewriter
7840
7841 \backslash
7842 appendix
7843 \end_layout
7844
7845 \begin_layout Itemize
7846
7847 \family typewriter
7848
7849 \backslash
7850 authorrunning
7851 \end_layout
7852
7853 \begin_layout Itemize
7854
7855 \family typewriter
7856
7857 \backslash
7858 inst{}
7859 \end_layout
7860
7861 \begin_layout Itemize
7862
7863 \family typewriter
7864
7865 \backslash
7866 keywords{}
7867 \end_layout
7868
7869 \begin_layout Itemize
7870
7871 \family typewriter
7872
7873 \backslash
7874 object{}
7875 \end_layout
7876
7877 \begin_layout Itemize
7878
7879 \family typewriter
7880
7881 \backslash
7882 titlerunning{}
7883 \end_layout
7884
7885 \begin_layout Standard
7886 If you want to use any of these commands, you have to enter them yourself.
7887  
7888 \series bold
7889 Do not forget to mark them as LaTeX code!
7890 \end_layout
7891
7892 \begin_layout Subsection
7893 Figure and Table Floats
7894 \end_layout
7895
7896 \begin_layout Standard
7897 LyX provides support for the necessary float environments 
7898 \family sans
7899 figure, figure*, table
7900 \family default
7901  and 
7902 \family sans
7903 table*
7904 \family default
7905 , therefore we won't tell much about it here.
7906  Refer to the 
7907 \emph on
7908 User's
7909 \begin_inset space ~
7910 \end_inset
7911
7912 Guide
7913 \emph default
7914 .
7915  Just remember that tables should be left-aligned.
7916  For that, select the table and change the alignment in 
7917 \family sans
7918 Edit\SpecialChar \menuseparator
7919 Paragraph
7920 \begin_inset space ~
7921 \end_inset
7922
7923 Settings.
7924 \end_layout
7925
7926 \begin_layout Standard
7927 There is only one special thing: the figures with caption besides the figure.
7928  To create such a figure, you have to do the following:
7929 \end_layout
7930
7931 \begin_layout Enumerate
7932 Create a wide figure float: 
7933 \family sans
7934 Insert\SpecialChar \menuseparator
7935 Float\SpecialChar \menuseparator
7936 Figure
7937 \family default
7938 , then right click in the figure and select 
7939 \family sans
7940 \bar under
7941 S
7942 \bar default
7943 pan
7944 \begin_inset space ~
7945 \end_inset
7946
7947 columns
7948 \family default
7949 .
7950 \end_layout
7951
7952 \begin_layout Enumerate
7953 Enter your caption text.
7954 \end_layout
7955
7956 \begin_layout Enumerate
7957 Press 
7958 \family sans
7959 Return
7960 \family default
7961  to move the cursor above the caption.
7962 \end_layout
7963
7964 \begin_layout Enumerate
7965 Insert your figure
7966 \end_layout
7967
7968 \begin_layout Enumerate
7969 Position the cursor behind the figure and insert a horizontal fill: 
7970 \family sans
7971 Insert\SpecialChar \menuseparator
7972 Special
7973 \begin_inset space ~
7974 \end_inset
7975
7976 Character\SpecialChar \menuseparator
7977 Horizontal
7978 \begin_inset space ~
7979 \end_inset
7980
7981 Fill
7982 \family default
7983 .
7984 \end_layout
7985
7986 \begin_layout Enumerate
7987 Switch to LaTeX mode: 
7988 \family sans
7989 M-c
7990 \begin_inset space ~
7991 \end_inset
7992
7993 t
7994 \family default
7995 .
7996 \end_layout
7997
7998 \begin_layout Enumerate
7999 Enter 
8000 \family typewriter
8001
8002 \backslash
8003 parbox[b]{55mm}{
8004 \family default
8005 .
8006  
8007 \series bold
8008 Do not close the brace!
8009 \end_layout
8010
8011 \begin_layout Enumerate
8012 Position the cursor behind the caption text, switch to LaTeX mode and insert
8013  the closing brace: 
8014 \family sans
8015 M-c
8016 \begin_inset space ~
8017 \end_inset
8018
8019 t
8020 \family default
8021  
8022 \family typewriter
8023 }
8024 \family default
8025 .
8026 \end_layout
8027
8028 \begin_layout Standard
8029 Also, refer to the figures in the example paper.
8030 \end_layout
8031
8032 \begin_layout Subsection
8033 Referee layout
8034 \end_layout
8035
8036 \begin_layout Standard
8037 For submission, the paper has to be formated in a special double-spacing
8038  layout.
8039  For this purpose, you have to give the option 
8040 \family typewriter
8041 referee
8042 \family default
8043  to the documentclass.
8044  This must be done using the extra class options field in the 
8045 \family sans
8046 Document\SpecialChar \menuseparator
8047 Settings
8048 \family default
8049  dialog.
8050  Just enter the string 
8051 \family typewriter
8052 referee
8053 \family default
8054  there.
8055 \end_layout
8056
8057 \begin_layout Subsection
8058 The example paper
8059 \end_layout
8060
8061 \begin_layout Standard
8062 The 
8063 \family sans
8064 Examples
8065 \family default
8066  directory contains an example paper written with LyX.
8067  It is the example paper from the original macro package, translated to
8068  LyX.
8069  Use it for inspiration, and compare the original LaTeX code with LyX way
8070  of writing.
8071 \end_layout
8072
8073 \begin_layout Section
8074 AASTeX
8075 \end_layout
8076
8077 \begin_layout Standard
8078 by 
8079 \noun on
8080 Mike Ressler
8081 \end_layout
8082
8083 \begin_layout Subsection
8084 Introduction
8085 \end_layout
8086
8087 \begin_layout Standard
8088 AASTeX is a set of macros produced by the American Astronomical Society
8089  to facilitate electronic manuscript submission to the three journals they
8090  publish: the Astrophysical Journal (including the Letters and Supplement),
8091  the Astronomical Journal, and the Publications of the Astronomical Society
8092  of the Pacific.
8093  LyX has proven to be an excellent tool for generating these documents,
8094  especially given its equation, citation, and figure handling capabilities.
8095  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
8096  is the version described here, or higher.
8097  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
8098  incompatible with LyX.
8099  The AASTeX package may be downloaded from the AASTeX Web site
8100 \end_layout
8101
8102 \begin_layout Standard
8103 \begin_inset VSpace medskip
8104 \end_inset
8105
8106
8107 \end_layout
8108
8109 \begin_layout Standard
8110 \align center
8111 \begin_inset Flex URL
8112 status collapsed
8113
8114 \begin_layout Plain Layout
8115
8116 http://www.journals.uchicago.edu/AAS/AASTeX
8117 \end_layout
8118
8119 \end_inset
8120
8121
8122 \end_layout
8123
8124 \begin_layout Standard
8125 \begin_inset VSpace medskip
8126 \end_inset
8127
8128
8129 \end_layout
8130
8131 \begin_layout Standard
8132 A complete user guide is contained in that package and you should familiarize
8133  yourself with it thoroughly before embarking on writing a paper in LyX.
8134  LyX will not reduce the need to figure out all the AASTeX commands, it
8135  will only reduce the drudgery of typing everything in.
8136  It is your responsibility to ensure that the final exported LaTeX document
8137  conforms completely to the requirements of the journal to which you are
8138  submitting your paper.
8139 \end_layout
8140
8141 \begin_layout Subsection
8142 Starting a New Paper
8143 \end_layout
8144
8145 \begin_layout Standard
8146 I strongly suggest that you start with the AASTeX template file.
8147  Click on 
8148 \family sans
8149 File\SpecialChar \menuseparator
8150 New from
8151 \family default
8152  
8153 \family sans
8154 Template
8155 \family default
8156 , enter the new file name, then choose the 
8157 \family typewriter
8158 aastex.lyx
8159 \family default
8160  template.
8161  This will show the most common fields found in a manuscript.
8162  Simply overwrite the existing text (including the brackets, 
8163 \family typewriter
8164 <>
8165 \family default
8166 ) with the correct information.
8167  Many of the AASTeX commands and environments can be implemented directly
8168  in LyX, but some cannot: most noticeably 
8169 \family typewriter
8170
8171 \backslash
8172 altaffilmark
8173 \family default
8174  and 
8175 \family typewriter
8176
8177 \backslash
8178 altaffiltext
8179 \family default
8180 , which should stick out like a sore thumb if you actually just opened the
8181  template file.
8182  For commands such as these, the LaTeX code must be entered directly and
8183  marked as such.
8184  Such commands are referred to as TeX code, or Evil Red Text.
8185  I tried to minimize the amount of TeX code needed in an AASTeX document,
8186  but there is still a bit more required than any of us would like.
8187 \end_layout
8188
8189 \begin_layout Subsection
8190 Finishing Your Paper
8191 \end_layout
8192
8193 \begin_layout Standard
8194 When the paper is finished to your satisfaction and previews/prints correctly,
8195  there are a few 
8196 \begin_inset Quotes eld
8197 \end_inset
8198
8199 postprocessing
8200 \begin_inset Quotes erd
8201 \end_inset
8202
8203  actions which need to be done before you submit it to the journals.
8204  
8205 \end_layout
8206
8207 \begin_layout Enumerate
8208 Export your paper as a LaTeX file (
8209 \family sans
8210 File\SpecialChar \menuseparator
8211 Export\SpecialChar \menuseparator
8212 LaTeX
8213 \family default
8214 ).
8215  
8216 \end_layout
8217
8218 \begin_layout Enumerate
8219 Edit the resulting 
8220 \family typewriter
8221 .tex
8222 \family default
8223  file with your favorite text editor
8224 \end_layout
8225
8226 \begin_deeper
8227 \begin_layout Enumerate
8228 remove the comment lines before the 
8229 \family typewriter
8230
8231 \backslash
8232 documentclass
8233 \family default
8234  command
8235 \end_layout
8236
8237 \begin_layout Enumerate
8238 remove the 
8239 \family typewriter
8240
8241 \backslash
8242 usepackage...{fontenc}
8243 \family default
8244  line if it appears (usually just after 
8245 \family typewriter
8246
8247 \backslash
8248 documentclass
8249 \family default
8250 }; also remove the 
8251 \family typewriter
8252
8253 \backslash
8254 secnumdepth
8255 \family default
8256  line if it appears.
8257 \end_layout
8258
8259 \begin_layout Enumerate
8260 remove everything between (and including) the 
8261 \family typewriter
8262
8263 \backslash
8264 makeatletter
8265 \family default
8266  and 
8267 \family typewriter
8268
8269 \backslash
8270 makeatother
8271 \family default
8272  commands, except for any commands you specifically put into the LaTeX preamble
8273  (which should appear immediately after the 
8274 \begin_inset Quotes eld
8275 \end_inset
8276
8277 User specified LaTeX commands
8278 \begin_inset Quotes erd
8279 \end_inset
8280
8281  comment in the 
8282 \family typewriter
8283 .tex
8284 \family default
8285  file).
8286 \end_layout
8287
8288 \end_deeper
8289 \begin_layout Enumerate
8290 Run the resulting file through LaTeX to make sure it still processes correctly.
8291 \end_layout
8292
8293 \begin_layout Enumerate
8294 Reread the journal requirements to make sure your filenames and formats
8295  are correct.
8296 \end_layout
8297
8298 \begin_layout Enumerate
8299 Submit it.
8300 \end_layout
8301
8302 \begin_layout Subsection
8303 Comments On Specific Commands
8304 \end_layout
8305
8306 \begin_layout Standard
8307 I will not describe the detailed usage of the individual AASTeX commands:
8308  the AASTeX User Guide (
8309 \family typewriter
8310 aasguide.tex
8311 \family default
8312 ) gives a good description of each.
8313  Thus it's probably easiest for me to go down the list as found in the guide
8314  and offer comments where necessary.
8315  So let's begin \SpecialChar \ldots{}
8316
8317 \end_layout
8318
8319 \begin_layout Subsubsection
8320 Things that work as expected
8321 \end_layout
8322
8323 \begin_layout Standard
8324 Because they work as you might expect, I simply list them and the section
8325  they are found in: 
8326 \family typewriter
8327
8328 \backslash
8329 documentclass
8330 \family default
8331  (2.1.1), 
8332 \family typewriter
8333
8334 \backslash
8335 begin{document}
8336 \family default
8337  (2.2), 
8338 \family typewriter
8339
8340 \backslash
8341 title
8342 \family default
8343  (2.3), 
8344 \family typewriter
8345
8346 \backslash
8347 author
8348 \family default
8349  (2.3), 
8350 \family typewriter
8351
8352 \backslash
8353 affil
8354 \family default
8355  (2.3), 
8356 \family typewriter
8357
8358 \backslash
8359 abstract
8360 \family default
8361  (2.4), 
8362 \family typewriter
8363
8364 \backslash
8365 keywords
8366 \family default
8367  (2.5), 
8368 \family typewriter
8369
8370 \backslash
8371 section
8372 \family default
8373  (2.7), 
8374 \family typewriter
8375
8376 \backslash
8377 subsection
8378 \family default
8379  (2.7), 
8380 \family typewriter
8381
8382 \backslash
8383 subsubsection
8384 \family default
8385  (2.7), 
8386 \family typewriter
8387
8388 \backslash
8389 paragraph
8390 \family default
8391  (2.7), 
8392 \family typewriter
8393
8394 \backslash
8395 facility
8396 \family default
8397  (2.10), 
8398 \family typewriter
8399
8400 \backslash
8401 begin{displaymath}
8402 \family default
8403  (2.12), 
8404 \family typewriter
8405
8406 \backslash
8407 begin{equation}
8408 \family default
8409  (2.12), 
8410 \family typewriter
8411
8412 \backslash
8413 begin{eqnarray}
8414 \family default
8415  (2.12), 
8416 \family typewriter
8417
8418 \backslash
8419 begin{mathletters}
8420 \family default
8421  (2.12), 
8422 \family typewriter
8423
8424 \backslash
8425 begin{thebibliography}
8426 \family default
8427  (2.13.1), 
8428 \family typewriter
8429
8430 \backslash
8431 bibitem
8432 \family default
8433  (2.13.2), all the cite commands and their variations (2.13.2), the generic
8434  graphicx figure commands (2.14.1), 
8435 \family typewriter
8436
8437 \backslash
8438 begin{table}
8439 \family default
8440  (2.15.4), 
8441 \family typewriter
8442
8443 \backslash
8444 begin{tabular}
8445 \family default
8446  (2.15.4), 
8447 \family typewriter
8448
8449 \backslash
8450 caption
8451 \family default
8452  (2.15.4), 
8453 \family typewriter
8454
8455 \backslash
8456 label
8457 \family default
8458  (2.15.4, amongst other places), 
8459 \family typewriter
8460
8461 \backslash
8462 tablerefs
8463 \family default
8464  (2.15.5), 
8465 \family typewriter
8466
8467 \backslash
8468 tablecomments
8469 \family default
8470  (2.15.5), 
8471 \family typewriter
8472
8473 \backslash
8474 url
8475 \family default
8476  (2.17.4), 
8477 \family typewriter
8478
8479 \backslash
8480 end{document}
8481 \family default
8482  (2.18).
8483 \end_layout
8484
8485 \begin_layout Standard
8486 The following style options also work correctly: 
8487 \family typewriter
8488 longabstract
8489 \family default
8490  (2.4), 
8491 \family typewriter
8492 preprint
8493 \family default
8494  (3.2.1), 
8495 \family typewriter
8496 preprint2
8497 \family default
8498  (3.2.2), 
8499 \family typewriter
8500 eqsecnum
8501 \family default
8502  (3.3), 
8503 \family typewriter
8504 flushrt
8505 \family default
8506  (3.4).
8507  Simply put them in the 
8508 \family sans
8509 Options
8510 \family default
8511  box in 
8512 \family sans
8513 Layout\SpecialChar \menuseparator
8514 Document
8515 \family default
8516 .
8517 \end_layout
8518
8519 \begin_layout Subsubsection
8520 Things that work, but require more comment
8521 \end_layout
8522
8523 \begin_layout Standard
8524 The following items work, but require a little more discussion:
8525 \end_layout
8526
8527 \begin_layout Itemize
8528 These items are reserved for use by the journal editors, but you can put
8529  them into the LaTeX preamble if you feel compelled to do so: 
8530 \family typewriter
8531
8532 \backslash
8533 received
8534 \family default
8535
8536 \family typewriter
8537
8538 \backslash
8539 revised
8540 \family default
8541
8542 \family typewriter
8543
8544 \backslash
8545 accepted
8546 \family default
8547
8548 \family typewriter
8549
8550 \backslash
8551 ccc
8552 \family default
8553
8554 \family typewriter
8555
8556 \backslash
8557 cpright
8558 \family default
8559  (all from 2.1.3)
8560 \end_layout
8561
8562 \begin_layout Itemize
8563 These items may be placed in the LaTeX preamble, and are included as blanks
8564  in the template file: 
8565 \family typewriter
8566
8567 \backslash
8568 slugcomment
8569 \family default
8570  (2.1.4), 
8571 \family typewriter
8572
8573 \backslash
8574 shorttitle
8575 \family default
8576  (2.1.5), 
8577 \family typewriter
8578
8579 \backslash
8580 shortauthors
8581 \family default
8582  (2.1.5)
8583 \end_layout
8584
8585 \begin_layout Itemize
8586
8587 \family typewriter
8588
8589 \backslash
8590 email
8591 \family default
8592  (2.3) – can only be used 
8593 \begin_inset Quotes eld
8594 \end_inset
8595
8596 standalone
8597 \begin_inset Quotes erd
8598 \end_inset
8599
8600 , not in the middle of a paragraph.
8601  Use TeX code if you need to embed it.
8602 \end_layout
8603
8604 \begin_layout Itemize
8605
8606 \family typewriter
8607
8608 \backslash
8609 and
8610 \family default
8611  (2.3) – will have extra {} after it.
8612  This should not cause an error.
8613 \end_layout
8614
8615 \begin_layout Itemize
8616
8617 \family typewriter
8618
8619 \backslash
8620 notetoeditor
8621 \family default
8622  (2.6) – can only be used 
8623 \begin_inset Quotes eld
8624 \end_inset
8625
8626 standalone
8627 \begin_inset Quotes erd
8628 \end_inset
8629
8630 , not in the middle of a paragraph.
8631  Use TeX code if you need to embed it.
8632 \end_layout
8633
8634 \begin_layout Itemize
8635
8636 \family typewriter
8637
8638 \backslash
8639 placetable
8640 \family default
8641  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8642  hand
8643 \end_layout
8644
8645 \begin_layout Itemize
8646
8647 \family typewriter
8648
8649 \backslash
8650 placefigure
8651 \family default
8652  (2.8) – same as for 
8653 \family typewriter
8654
8655 \backslash
8656 placetable
8657 \end_layout
8658
8659 \begin_layout Itemize
8660
8661 \family typewriter
8662
8663 \backslash
8664 acknowledgements
8665 \family default
8666  (2.9) – will have extra {} after it.
8667  This should not cause an error.
8668 \end_layout
8669
8670 \begin_layout Itemize
8671
8672 \family typewriter
8673
8674 \backslash
8675 appendix
8676 \family default
8677  (2.11) – will have extra {} after it.
8678  This should not cause an error.
8679 \end_layout
8680
8681 \begin_layout Itemize
8682
8683 \family typewriter
8684
8685 \backslash
8686 figcaption
8687 \family default
8688  (2.14.2) – you can insert an optional filename argument by placing the cursor
8689  at the beginning of the text and selecting 
8690 \family sans
8691 Insert\SpecialChar \menuseparator
8692 Short Title
8693 \family default
8694 .
8695  
8696 \begin_inset Quotes eld
8697 \end_inset
8698
8699 Short Title
8700 \begin_inset Quotes erd
8701 \end_inset
8702
8703  inserts an optional argument of the type needed by 
8704 \family typewriter
8705
8706 \backslash
8707 figcaption
8708 \family default
8709 .
8710  Hopefully it will be renamed someday.
8711 \end_layout
8712
8713 \begin_layout Itemize
8714
8715 \family typewriter
8716
8717 \backslash
8718 objectname
8719 \family default
8720  (2.17.1) – same as 
8721 \family typewriter
8722
8723 \backslash
8724 figcaption
8725 \family default
8726  for the catalog ID optional parameter
8727 \end_layout
8728
8729 \begin_layout Itemize
8730
8731 \family typewriter
8732
8733 \backslash
8734 dataset
8735 \family default
8736  (2.17.1) – same as 
8737 \family typewriter
8738
8739 \backslash
8740 figcaption
8741 \family default
8742  for the catalog ID optional parameter
8743 \end_layout
8744
8745 \begin_layout Subsubsection
8746 Things not implemented, use TeX code
8747 \end_layout
8748
8749 \begin_layout Standard
8750
8751 \family typewriter
8752
8753 \backslash
8754 altaffilmark
8755 \family default
8756  (2.3), 
8757 \family typewriter
8758
8759 \backslash
8760 altaffiltext
8761 \family default
8762  (2.3), 
8763 \family typewriter
8764
8765 \backslash
8766 eqnum
8767 \family default
8768  (2.12), 
8769 \family typewriter
8770
8771 \backslash
8772 setcounter{equation}
8773 \family default
8774  (2.12), Journal name abbreviations (2.13.4), 
8775 \family typewriter
8776
8777 \backslash
8778 figurenum
8779 \family default
8780  (2.14.1), 
8781 \family typewriter
8782
8783 \backslash
8784 epsscale
8785 \family default
8786  (2.14.1), 
8787 \family typewriter
8788
8789 \backslash
8790 plotone
8791 \family default
8792  (2.14.1), 
8793 \family typewriter
8794
8795 \backslash
8796 plottwo
8797 \family default
8798  (2.14.1), 
8799 \family typewriter
8800
8801 \backslash
8802 tablenum
8803 \family default
8804  (2.15.4), 
8805 \family typewriter
8806
8807 \backslash
8808 tableline
8809 \family default
8810  (2.15.4, insert it as the first element in the lefthand cell after where
8811  you want it.
8812  Don't use any of LyX's rules in the table), 
8813 \family typewriter
8814
8815 \backslash
8816 tablenotemark
8817 \family default
8818  (2.15.5), 
8819 \family typewriter
8820
8821 \backslash
8822 tablenotetext
8823 \family default
8824  (2.15.5), much of Misc (2.17, except 
8825 \family typewriter
8826
8827 \backslash
8828 objectname
8829 \family default
8830
8831 \family typewriter
8832
8833 \backslash
8834 dataset
8835 \family default
8836
8837 \family typewriter
8838
8839 \backslash
8840 url
8841 \family default
8842 , and 
8843 \family typewriter
8844
8845 \backslash
8846 email
8847 \family default
8848 ; see above), 
8849 \family typewriter
8850
8851 \backslash
8852 singlespace
8853 \family default
8854  (3.1), 
8855 \family typewriter
8856
8857 \backslash
8858 doublespace
8859 \family default
8860  (3.1), 
8861 \family typewriter
8862
8863 \backslash
8864 onecolumn
8865 \family default
8866  (3.2), 
8867 \family typewriter
8868
8869 \backslash
8870 twocolumn
8871 \family default
8872  (3.2)
8873 \end_layout
8874
8875 \begin_layout Subsubsection
8876 Things that cannot be implemented
8877 \end_layout
8878
8879 \begin_layout Standard
8880 \SpecialChar \ldots{}
8881  at least in any meaningful sort of way, so I suggest ignoring them.
8882  They are the references environment (2.13.3), and the deluxetable environment
8883  (2.15).
8884  If you really, really need to use deluxetable, I suggest editing it in
8885  a separate file with a text editor, then using 
8886 \family sans
8887 Insert\SpecialChar \menuseparator
8888 Child
8889 \begin_inset space ~
8890 \end_inset
8891
8892 Document
8893 \family default
8894  to include it in your LyX document.
8895  See the 
8896 \family typewriter
8897 aas_sample.lyx
8898 \family default
8899  file to see an example of this.
8900 \end_layout
8901
8902 \begin_layout Subsection
8903 FAQs, Tips, Tricks, and Other Ruminations
8904 \end_layout
8905
8906 \begin_layout Subsubsection
8907 Getting LyX and AASTeX to cooperate
8908 \end_layout
8909
8910 \begin_layout Standard
8911 It can be a bit tricky to get LyX to recognize a new layout and document
8912  class.
8913  When all else fails, do this:
8914 \end_layout
8915
8916 \begin_layout Enumerate
8917 Make certain that LaTeX can find AASTeX.
8918  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8919  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8920 \family typewriter
8921 sample.tex
8922 \family default
8923 .
8924 \end_layout
8925
8926 \begin_layout Enumerate
8927 Make certain that 
8928 \family typewriter
8929 aastex.layout
8930 \family default
8931  appears in LyX's 
8932 \family typewriter
8933 layouts
8934 \family default
8935  folder
8936 \end_layout
8937
8938 \begin_layout Enumerate
8939 Rerun 
8940 \family sans
8941 Tools\SpecialChar \menuseparator
8942 Reconfigure
8943 \family default
8944  in LyX, then restart LyX.
8945 \end_layout
8946
8947 \begin_layout Enumerate
8948 Open a regular new file, not from a template.
8949  Does AASTeX appear in the class list in 
8950 \family sans
8951 Document\SpecialChar \menuseparator
8952 Settings
8953 \family default
8954 ?
8955 \end_layout
8956
8957 \begin_layout Standard
8958 If you get a warning from an existing AASTeX document about not being able
8959  to find the AASTeX layout or a message about 
8960 \begin_inset Quotes eld
8961 \end_inset
8962
8963 You should not mix title layouts with normal ones
8964 \begin_inset Quotes erd
8965 \end_inset
8966
8967 , things haven't been installed correctly.
8968 \end_layout
8969
8970 \begin_layout Subsubsection
8971 LaTeX error processing a table 
8972 \end_layout
8973
8974 \begin_layout Standard
8975 LyX, by default, attempts to center the table caption/title.
8976  This seems to produce a bad interaction in AASTeX so you should click somewhere
8977  in the caption/title, then select 
8978 \family sans
8979 Edit\SpecialChar \menuseparator
8980 Paragraph
8981 \begin_inset space ~
8982 \end_inset
8983
8984 Settings
8985 \family default
8986 , then set the 
8987 \family sans
8988 Alignment
8989 \family default
8990  to 
8991 \family sans
8992 Block
8993 \family default
8994 .
8995  This took care of it for me.
8996 \end_layout
8997
8998 \begin_layout Subsubsection
8999 References
9000 \end_layout
9001
9002 \begin_layout Standard
9003 A couple of things: 1) I have noticed some funny spacing in the reference
9004  entries in the text.
9005  When you enter the bibliography item data, make sure their is 
9006 \emph on
9007 no
9008 \emph default
9009  space between the last author and the parenthesis setting off the year;
9010  
9011 \emph on
9012 e.
9013 \begin_inset space \thinspace{}
9014 \end_inset
9015
9016 g.
9017 \begin_inset space \space{}
9018 \end_inset
9019
9020
9021 \emph default
9022 type 
9023 \family typewriter
9024 Ressler(1992)
9025 \family default
9026 , not 
9027 \family typewriter
9028 Ressler (1992)
9029 \family default
9030 .
9031  2) Entering the references at all is not obvious.
9032  The easiest thing is to start typing your first reference at the end of
9033  the document, then mark it as type 
9034 \family sans
9035 References
9036 \family default
9037 .
9038  That will put a small gray box in front of what you just typed.
9039  Click on the box to fill in the rest of the information.
9040  For new references, go to the end of an existing reference and press return.
9041  That will create a new line with its own box, etc.
9042 \end_layout
9043
9044 \begin_layout Subsubsection
9045 Including EPS files
9046 \end_layout
9047
9048 \begin_layout Standard
9049 Even though AASTeX provides its own figure commands (
9050 \family typewriter
9051
9052 \backslash
9053 plotone
9054 \family default
9055 , for example), I much prefer LaTeX's standard figure commands (with the
9056  default graphicx).
9057  You can insert the 
9058 \family typewriter
9059
9060 \backslash
9061 plotone
9062 \family default
9063 , etc.
9064 \begin_inset space ~
9065 \end_inset
9066
9067 commands as TeX code into a Figure Float box if you desire, but I never
9068  have much luck getting the layout right.
9069  With the standard graphics, LyX will insert a 
9070 \family typewriter
9071
9072 \backslash
9073 usepackage{graphicx}
9074 \family default
9075  command into the LaTeX preamble and handle the figures in the standard
9076  LaTeX2e way, interspersing the figures in the text.
9077  I believe ApJ accepts figures exactly this way now; AJ might still use
9078  the 
9079 \begin_inset Quotes eld
9080 \end_inset
9081
9082 stack everything at the end
9083 \begin_inset Quotes erd
9084 \end_inset
9085
9086  technique.
9087 \end_layout
9088
9089 \begin_layout Subsubsection
9090 Things I could have done, but didn't
9091 \end_layout
9092
9093 \begin_layout Standard
9094 There are a few 
9095 \begin_inset Quotes eld
9096 \end_inset
9097
9098 pretty
9099 \begin_inset Quotes erd
9100 \end_inset
9101
9102  things I could have implemented, but chose not to.
9103  For instance, I saw no point in double-spacing the text in the LyX window,
9104  even though it is double-spaced in the paper manuscript.
9105  Also, I chose not to make separate layouts for the preprint and preprint2
9106  styles.
9107  Since I assume you will spend most of your time in the plain manuscript
9108  mode anyway, I decided not to chew up more disk space with this.
9109  
9110 \end_layout
9111
9112 \begin_layout Subsection
9113 Final Caveat
9114 \end_layout
9115
9116 \begin_layout Standard
9117 Your mileage may vary.
9118  I've now had papers published by both ApJ and AJ that have had 98% of the
9119  effort done in LyX; the last 2% was the LaTeX post-processing and a few
9120  cleanups.
9121  I have had no trouble with the submission process, and I'm sure the journals
9122  were never aware that there might be a difference.
9123  So, go forth and publish!
9124 \end_layout
9125
9126 \begin_layout Section
9127 AMS LaTeX
9128 \end_layout
9129
9130 \begin_layout Standard
9131 by 
9132 \noun on
9133 David Johnson
9134 \noun default
9135 ; updated by 
9136 \noun on
9137 Richard Heck
9138 \end_layout
9139
9140 \begin_layout Standard
9141 \begin_inset VSpace bigskip
9142 \end_inset
9143
9144
9145 \end_layout
9146
9147 \begin_layout Standard
9148 \noindent
9149 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
9150  papers to be submitted to American Mathematical Society publications.
9151  The layouts are not tailored to a specific journal, but easily can be.
9152  You should refer to the AMS documentation for specific instructions for
9153  each journal (usually it will entail only changing a single line in the
9154  TeX output).
9155  That documentation is available on the Web at 
9156 \begin_inset Flex URL
9157 status open
9158
9159 \begin_layout Plain Layout
9160
9161 http://www.ams.org
9162 \end_layout
9163
9164 \end_inset
9165
9166  or by ftp at 
9167 \begin_inset Flex URL
9168 status open
9169
9170 \begin_layout Plain Layout
9171
9172 ftp://ftp.ams.org/pub/tex/amslatex/
9173 \end_layout
9174
9175 \end_inset
9176
9177 .
9178  These layouts are appropriate, and useful, for any mathematical writing.
9179  
9180 \end_layout
9181
9182 \begin_layout Standard
9183 There are two basic AMS LaTeX layouts: 
9184 \end_layout
9185
9186 \begin_layout Itemize
9187 amsart: The standard AMS article format.
9188 \end_layout
9189
9190 \begin_layout Itemize
9191 amsbook: the standard AMS book (really, monograph) format.
9192  
9193 \end_layout
9194
9195 \begin_layout Standard
9196 The layouts themselves contain only the minimum necessary to use the AMS
9197  classes.
9198  They do not, in particular, contain any of the `theorem' environments used
9199  for setting theorems, lemmas, and the like.
9200  These are contained, instead, in the 
9201 \begin_inset Flex Code
9202 status collapsed
9203
9204 \begin_layout Plain Layout
9205 Theorems (AMS)
9206 \end_layout
9207
9208 \end_inset
9209
9210  module, which is loaded by default when you select one of the AMS classes.
9211  (It can also be used with other classes and can be removed, if you would
9212  rather use something else.) Less commonly used environments are in the 
9213 \begin_inset Flex Code
9214 status collapsed
9215
9216 \begin_layout Plain Layout
9217 Theorems (AMS-Extended)
9218 \end_layout
9219
9220 \end_inset
9221
9222  module, which must be loaded manually.
9223 \end_layout
9224
9225 \begin_layout Standard
9226 By default, theorems and the like are numbered consecutively throughout
9227  the document, but this may be modified by loading the module 
9228 \begin_inset Flex Code
9229 status collapsed
9230
9231 \begin_layout Plain Layout
9232 Theorems (Order by Section)
9233 \end_layout
9234
9235 \end_inset
9236
9237  or, if you are using 
9238 \begin_inset Flex Code
9239 status collapsed
9240
9241 \begin_layout Plain Layout
9242 book (AMS)
9243 \end_layout
9244
9245 \end_inset
9246
9247 , the module 
9248 \begin_inset Flex Code
9249 status collapsed
9250
9251 \begin_layout Plain Layout
9252 Theorems (Order by Chapter)
9253 \end_layout
9254
9255 \end_inset
9256
9257 .
9258  These will number the results as 
9259 \begin_inset Formula $n.m$
9260 \end_inset
9261
9262 , where the first number refers to the section (or chapter) and the second
9263  refers to the total number of results so far in that section (or chapter).
9264  Many environments are also available unnumbered.
9265  These are indicated by an asterisk at the end.
9266  If you happen to want 
9267 \emph on
9268 only
9269 \emph default
9270  unnumbered results, the module 
9271 \begin_inset Flex Code
9272 status collapsed
9273
9274 \begin_layout Plain Layout
9275 Theorems (Starred)
9276 \end_layout
9277
9278 \end_inset
9279
9280  provides that option.
9281 \end_layout
9282
9283 \begin_layout Standard
9284 Note that these modules do not 
9285 \emph on
9286 have
9287 \emph default
9288  to be used with the AMS classes.
9289  It is perfectly possible to use the 
9290 \begin_inset Flex Code
9291 status collapsed
9292
9293 \begin_layout Plain Layout
9294 Theorems (AMS)
9295 \end_layout
9296
9297 \end_inset
9298
9299  module, and the others mentioned, with other classes, such as 
9300 \begin_inset Flex Code
9301 status collapsed
9302
9303 \begin_layout Plain Layout
9304 article
9305 \end_layout
9306
9307 \end_inset
9308
9309
9310 \begin_inset Flex Code
9311 status collapsed
9312
9313 \begin_layout Plain Layout
9314 report
9315 \end_layout
9316
9317 \end_inset
9318
9319
9320 \begin_inset Flex Code
9321 status collapsed
9322
9323 \begin_layout Plain Layout
9324 book (KOMA-script)
9325 \end_layout
9326
9327 \end_inset
9328
9329 , and so forth.
9330 \end_layout
9331
9332 \begin_layout Subsection
9333 What these layouts provide
9334 \end_layout
9335
9336 \begin_layout Standard
9337 There is a long list of included environments provided by these layouts.
9338  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9339  variety of `theorem' environments.
9340  However, the AMS recommends the environments that are available in LyX.
9341  
9342 \end_layout
9343
9344 \begin_layout Standard
9345 The following environments—as well as the standard environments, such as
9346  
9347 \begin_inset Flex Noun
9348 status collapsed
9349
9350 \begin_layout Plain Layout
9351 section
9352 \end_layout
9353
9354 \end_inset
9355
9356
9357 \begin_inset Flex Noun
9358 status collapsed
9359
9360 \begin_layout Plain Layout
9361 bibliography
9362 \end_layout
9363
9364 \end_inset
9365
9366
9367 \begin_inset Flex Noun
9368 status collapsed
9369
9370 \begin_layout Plain Layout
9371 title
9372 \end_layout
9373
9374 \end_inset
9375
9376
9377 \begin_inset Flex Noun
9378 status collapsed
9379
9380 \begin_layout Plain Layout
9381 author
9382 \end_layout
9383
9384 \end_inset
9385
9386 , and 
9387 \begin_inset Flex Noun
9388 status collapsed
9389
9390 \begin_layout Plain Layout
9391 date
9392 \end_layout
9393
9394 \end_inset
9395
9396 —are provided by 
9397 \begin_inset Flex Code
9398 status collapsed
9399
9400 \begin_layout Plain Layout
9401 article (AMS)
9402 \end_layout
9403
9404 \end_inset
9405
9406  and 
9407 \begin_inset Flex Code
9408 status collapsed
9409
9410 \begin_layout Plain Layout
9411 book (AMS)
9412 \end_layout
9413
9414 \end_inset
9415
9416 :
9417 \end_layout
9418
9419 \begin_layout Description
9420 Address This should be the author's permanent address.
9421 \end_layout
9422
9423 \begin_layout Description
9424 Current
9425 \begin_inset space ~
9426 \end_inset
9427
9428 Address This should be the author's temporary address at the time of submission,
9429  if different from the Address.
9430 \end_layout
9431
9432 \begin_layout Description
9433 Email Author's e-mail address
9434 \end_layout
9435
9436 \begin_layout Description
9437 URL Author's Web address, if desired.
9438 \end_layout
9439
9440 \begin_layout Description
9441 Keywords Key words or phrases used to identify specific topics discussed
9442  in the paper.
9443 \end_layout
9444
9445 \begin_layout Description
9446 Subjectclass These refer to the AMS Subject Classifications, published and
9447  described in 
9448 \emph on
9449 Mathematical Reviews
9450 \emph default
9451 .
9452  These are also available online at the AMS cites listed above.
9453 \end_layout
9454
9455 \begin_layout Description
9456 Thanks
9457 \end_layout
9458
9459 \begin_layout Description
9460 Dedicatory
9461 \end_layout
9462
9463 \begin_layout Description
9464 Translator
9465 \end_layout
9466
9467 \begin_layout Standard
9468 The following environments are provided by both the 
9469 \begin_inset Flex Code
9470 status collapsed
9471
9472 \begin_layout Plain Layout
9473 Theorems
9474 \end_layout
9475
9476 \end_inset
9477
9478  and 
9479 \begin_inset Flex Code
9480 status collapsed
9481
9482 \begin_layout Plain Layout
9483 Theorems (AMS)
9484 \end_layout
9485
9486 \end_inset
9487
9488  modules, in the latter case in both starred (unnumbered) and unstarred
9489  (numbered) versions.
9490  These same environments are provided only in the starred versions by the
9491  
9492 \begin_inset Flex Code
9493 status collapsed
9494
9495 \begin_layout Plain Layout
9496 Theorems (Starred)
9497 \end_layout
9498
9499 \end_inset
9500
9501  module:
9502 \end_layout
9503
9504 \begin_layout Theorem
9505 This is typically used for the statements of major results.
9506  
9507 \end_layout
9508
9509 \begin_layout Corollary*
9510 This is used for statements which follow fairly directly from previous statement
9511 s.
9512  Again, these can be major results.
9513  
9514 \end_layout
9515
9516 \begin_layout Lemma
9517 These are smaller results needed to prove other statements.
9518 \end_layout
9519
9520 \begin_layout Proposition
9521 These are less major results which (hopefully) add to the general theory
9522  being discussed.
9523 \end_layout
9524
9525 \begin_layout Conjecture
9526 These are statements provided without justification, which the author does
9527  not know how to prove, but which seem to be true (to the author, at least).
9528 \end_layout
9529
9530 \begin_layout Definition*
9531 Guess what this is for.
9532  The font is different for this environment than for the previous ones.
9533  
9534 \end_layout
9535
9536 \begin_layout Example*
9537 Used for examples illustrating proven results.
9538 \end_layout
9539
9540 \begin_layout Problem
9541 It's not really known what this is for.
9542  You should figure it out.
9543 \end_layout
9544
9545 \begin_layout Exercise*
9546 Write a description for this one.
9547 \end_layout
9548
9549 \begin_layout Remark
9550 This environment is also a type of theorem, usually a lesser sort of observation.
9551 \end_layout
9552
9553 \begin_layout Claim*
9554 Often used in the course of giving a proof of a larger result.
9555 \end_layout
9556
9557 \begin_layout Case
9558 Generally, these are used to break up long arguments, using specific instances
9559  of some condition.
9560  
9561 \end_layout
9562
9563 \begin_layout Case
9564 The numbering scheme for cases is on its own, not together with other numbered
9565  statements.
9566  
9567 \end_layout
9568
9569 \begin_layout Proof
9570 At the end of this environment, a QED symbol (usually a square, but it can
9571  vary with different styles) is placed.
9572  If you want to have other environments within this one—for example, Case
9573  environments—and have the QED symbol appear only after them, then the other
9574  environments need to be nested within the proof environment.
9575  See the section 
9576 \emph on
9577 Nesting Environments
9578 \emph default
9579  of the 
9580 \emph on
9581 User's Guide
9582 \emph default
9583  for information on nesting.
9584 \end_layout
9585
9586 \begin_layout Standard
9587 And these environments are provided by 
9588 \begin_inset Flex Code
9589 status collapsed
9590
9591 \begin_layout Plain Layout
9592 Theorems (AMS-Extended)
9593 \end_layout
9594
9595 \end_inset
9596
9597 :
9598 \end_layout
9599
9600 \begin_layout Criterion*
9601 A required condition.
9602 \end_layout
9603
9604 \begin_layout Algorithm*
9605 A general procedure to be used.
9606 \end_layout
9607
9608 \begin_layout Axiom*
9609 This is a property or statement taken as true within the system being discussed.
9610 \end_layout
9611
9612 \begin_layout Condition*
9613 Sometimes used to state a condition assumed within the present context of
9614  discussion.
9615 \end_layout
9616
9617 \begin_layout Note*
9618 Similar to a Remark.
9619 \end_layout
9620
9621 \begin_layout Notation*
9622 Used for the explanation of, yes, notation.
9623 \end_layout
9624
9625 \begin_layout Summary
9626 Do we really need to tell you? 
9627 \end_layout
9628
9629 \begin_layout Acknowledgement*
9630 Acknowledgement.
9631 \end_layout
9632
9633 \begin_layout Conclusion*
9634 Sometimes used at the end of a long train of argument.
9635 \end_layout
9636
9637 \begin_layout Fact
9638 Used in a way similar to Proposition, though perhaps lower on the scale.
9639 \end_layout
9640
9641 \begin_layout Standard
9642 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9643  fonts packages.
9644  They need to be available on your system in order to use these environments.
9645 \end_layout
9646
9647 \begin_layout Section
9648 AGU journals (
9649 \family sans
9650 aguplus
9651 \family default
9652 )
9653 \end_layout
9654
9655 \begin_layout Standard
9656 by 
9657 \shape smallcaps
9658 Martin Vermeer
9659 \end_layout
9660
9661 \begin_layout Subsection
9662 Description
9663 \end_layout
9664
9665 \begin_layout Standard
9666 These are the layout files for some of the journals of the American Geophysical
9667  Society.
9668  It is assumed that you have both the AGU's own class files and AGUplus
9669  installed (everything to be found at
9670 \begin_inset Flex URL
9671 status collapsed
9672
9673 \begin_layout Plain Layout
9674
9675 ftp://ftp.agu.org/journals/latex/journals
9676 \end_layout
9677
9678 \end_inset
9679
9680 ).
9681 \end_layout
9682
9683 \begin_layout Subsection
9684 New styles
9685 \end_layout
9686
9687 \begin_layout Standard
9688 Redefined are 
9689 \family sans
9690 Paragraph
9691 \family default
9692
9693 \family sans
9694 Paragraph*
9695 \family default
9696 .
9697  They are still called this in the LyX GUI, though their LaTeX equivalents
9698  in the AGU classes are 
9699 \family sans
9700 Subsubsubsection
9701 \family default
9702  and 
9703 \family sans
9704 Subsubsubsection*
9705 \family default
9706 .
9707 \end_layout
9708
9709 \begin_layout Standard
9710 Newly defined styles are 
9711 \family sans
9712 Left_Header
9713 \family default
9714
9715 \family sans
9716 Right_Header
9717 \family default
9718
9719 \family sans
9720 Received
9721 \family default
9722
9723 \family sans
9724 Revised
9725 \family default
9726
9727 \family sans
9728 Accepted
9729 \family default
9730
9731 \family sans
9732 CCC
9733 \family default
9734
9735 \family sans
9736 PaperId
9737 \family default
9738
9739 \family sans
9740 AuthorAddr
9741 \family default
9742
9743 \family sans
9744 SlugComment
9745 \family default
9746 .
9747  These are mostly manuscript attributes and defined in the AGU class documentati
9748 on.
9749 \end_layout
9750
9751 \begin_layout Standard
9752 I suspect this is still badly incomplete.
9753 \end_layout
9754
9755 \begin_layout Subsection
9756 New floats
9757 \end_layout
9758
9759 \begin_layout Standard
9760
9761 \family sans
9762 Planotable
9763 \family default
9764  and 
9765 \family sans
9766 Plate
9767 \family default
9768 .
9769  We also have a new 
9770 \family sans
9771 Table_Caption
9772 \family default
9773 .
9774 \end_layout
9775
9776 \begin_layout Subsection
9777 Supported journals
9778 \end_layout
9779
9780 \begin_layout Itemize
9781
9782 \emph on
9783 Journal of Geophysical Research
9784 \emph default
9785
9786 \family typewriter
9787 jgrga.layout
9788 \family default
9789  — Martin Vermeer
9790 \end_layout
9791
9792 \begin_layout Standard
9793 Add your own, it isn't so hard! Look at the 
9794 \family typewriter
9795 jgrga.layout
9796 \family default
9797  example and 
9798 \family typewriter
9799 aguplus.inc
9800 \family default
9801 .
9802 \end_layout
9803
9804 \begin_layout Subsection
9805 Bugs and things to remember
9806 \end_layout
9807
9808 \begin_layout Standard
9809 In order to use the new layouts, you must remember to do the following for
9810  a new document:
9811 \end_layout
9812
9813 \begin_layout Enumerate
9814
9815 \emph on
9816 Turn off babel
9817 \emph default
9818 .
9819  This can be done in the 
9820 \family sans
9821 Layout\SpecialChar \menuseparator
9822 Document
9823 \family default
9824  or 
9825 \family sans
9826 Document\SpecialChar \menuseparator
9827 Settings
9828 \family default
9829  menu item.
9830  (AGU articles are always in English, right? So 
9831 \emph on
9832 don't
9833 \emph default
9834  choose a language.)
9835 \end_layout
9836
9837 \begin_layout Enumerate
9838 Enter 
9839 \family typewriter
9840 jgrga
9841 \family default
9842  into the document's 
9843 \family sans
9844 Extra Options
9845 \family default
9846  field.
9847  (Yes, this is a bug.)
9848 \end_layout
9849
9850 \begin_layout Enumerate
9851 Make sure you use the 
9852 \family typewriter
9853 agu.bst
9854 \family default
9855  bibliography style, by entering 
9856 \family sans
9857 agu
9858 \family default
9859  into the second field of the BibTeX inset.
9860  None of the standard styles will do.
9861 \end_layout
9862
9863 \begin_layout Section
9864 Broadway
9865 \end_layout
9866
9867 \begin_layout Standard
9868 by 
9869 \shape smallcaps
9870 Garst Reese
9871 \end_layout
9872
9873 \begin_layout Subsection
9874 Introduction
9875 \end_layout
9876
9877 \begin_layout Standard
9878 Broadway is for writing plays.
9879  The format is more decorative than Hollywood, and much less standardized.
9880  This format should be suitable for workshops.
9881 \end_layout
9882
9883 \begin_layout Subsection
9884 Special problems
9885 \end_layout
9886
9887 \begin_layout Standard
9888 The same as in Hollywood.
9889 \end_layout
9890
9891 \begin_layout Subsection
9892 Special features
9893 \end_layout
9894
9895 \begin_layout Standard
9896 Insert the 
9897 \family sans
9898 Speaker
9899 \family default
9900  names as labels then cross-reference the label to insert the name.
9901  The cross-reference dialog will show the current cast of characters.
9902 \end_layout
9903
9904 \begin_layout Subsection
9905 Paper size and Margins
9906 \end_layout
9907
9908 \begin_layout Standard
9909 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9910 \end_layout
9911
9912 \begin_layout Subsection
9913 Environments
9914 \end_layout
9915
9916 \begin_layout Standard
9917 The following environments are available.
9918  You can use broadway.bind to get the bind keys shown at the right.
9919 \end_layout
9920
9921 \begin_layout Itemize
9922
9923 \family sans
9924 Standard
9925 \begin_inset Newline newline
9926 \end_inset
9927
9928
9929 \family default
9930 You should not have to use this, but it is here for anything that does not
9931  fit otherwise.
9932 \end_layout
9933
9934 \begin_layout Itemize
9935
9936 \family sans
9937 Narrative
9938 \begin_inset space \hfill{}
9939 \end_inset
9940
9941 M-z n
9942 \begin_inset Newline newline
9943 \end_inset
9944
9945
9946 \family default
9947 Used to describe stage setting and the action.
9948  First use of speaker names in all CAPs.
9949 \end_layout
9950
9951 \begin_layout Itemize
9952
9953 \family sans
9954 ACT
9955 \begin_inset space \hfill{}
9956 \end_inset
9957
9958 M-z a
9959 \begin_inset Newline newline
9960 \end_inset
9961
9962
9963 \family default
9964 Automatically numbered.
9965  On screen it will be arabic, but will print as Roman.
9966 \end_layout
9967
9968 \begin_layout Itemize
9969
9970 \family sans
9971 ACT*
9972 \begin_inset space \hfill{}
9973 \end_inset
9974
9975 M-z S at
9976 \begin_inset Newline newline
9977 \end_inset
9978
9979
9980 \family default
9981 Subtitle for 
9982 \family sans
9983 ACT.
9984
9985 \family default
9986  It is just centered text.
9987 \end_layout
9988
9989 \begin_layout Itemize
9990
9991 \family sans
9992 SCENE
9993 \begin_inset space \hfill{}
9994 \end_inset
9995
9996 M-z S-S
9997 \begin_inset Newline newline
9998 \end_inset
9999
10000
10001 \family default
10002 Not automatically numbered.
10003  You supply the number.
10004  This is because I couldn't figure out how.
10005 \end_layout
10006
10007 \begin_layout Itemize
10008
10009 \family sans
10010 AT_RISE:
10011 \begin_inset space \hfill{}
10012 \end_inset
10013
10014 M-z S-R
10015 \begin_inset Newline newline
10016 \end_inset
10017
10018
10019 \family default
10020 A special case of Narrative to describe the setting and action as the curtain
10021  rises.
10022 \end_layout
10023
10024 \begin_layout Itemize
10025
10026 \family sans
10027 Speaker
10028 \begin_inset space \hfill{}
10029 \end_inset
10030
10031 M-z s
10032 \begin_inset Newline newline
10033 \end_inset
10034
10035
10036 \family default
10037 The speaker's (actor's) title, centered in all CAPS.
10038 \end_layout
10039
10040 \begin_layout Itemize
10041
10042 \family sans
10043 Parenthetical
10044 \begin_inset space \hfill{}
10045 \end_inset
10046
10047 M-z p
10048 \begin_inset Newline newline
10049 \end_inset
10050
10051
10052 \family default
10053 Instructions to the speaker.
10054  The parentheses are automatically inserted.
10055  The ( will appear on screen, but both will be in the printed play.
10056  This environment is only used within 
10057 \family sans
10058 Dialogue
10059 \family default
10060 .
10061 \end_layout
10062
10063 \begin_layout Itemize
10064
10065 \family sans
10066 Dialogue
10067 \begin_inset space \hfill{}
10068 \end_inset
10069
10070 M-z d
10071 \begin_inset Newline newline
10072 \end_inset
10073
10074
10075 \family default
10076 What the Speaker says.
10077 \end_layout
10078
10079 \begin_layout Itemize
10080
10081 \family sans
10082 CURTAIN
10083 \begin_inset space \hfill{}
10084 \end_inset
10085
10086 M-z S-C
10087 \begin_inset Newline newline
10088 \end_inset
10089
10090
10091 \family default
10092 The curtain comes down.
10093 \end_layout
10094
10095 \begin_layout Itemize
10096
10097 \family sans
10098 Title
10099 \begin_inset space \hfill{}
10100 \end_inset
10101
10102 M-z S-T
10103 \end_layout
10104
10105 \begin_layout Itemize
10106
10107 \family sans
10108 Author
10109 \begin_inset space \hfill{}
10110 \end_inset
10111
10112 M-z S-A
10113 \end_layout
10114
10115 \begin_layout Itemize
10116
10117 \family sans
10118 Right_Address
10119 \begin_inset space \hfill{}
10120 \end_inset
10121
10122 M-z r
10123 \end_layout
10124
10125 \begin_layout Standard
10126 Hello there.
10127 \end_layout
10128
10129 \begin_layout Section
10130 Dinbrief
10131 \end_layout
10132
10133 \begin_layout Standard
10134 The document class 
10135 \family sans
10136 dinbrief
10137 \family default
10138  can be used to type letters according to German conventions.
10139  A template file is included in 
10140 \family typewriter
10141 .../lyx/share/templates
10142 \family default
10143  for you to use as a starting point.
10144 \end_layout
10145
10146 \begin_layout Section
10147 EGS journals (
10148 \family sans
10149 egs
10150 \family default
10151 )
10152 \end_layout
10153
10154 \begin_layout Standard
10155 by 
10156 \shape smallcaps
10157 Martin Vermeer
10158 \end_layout
10159
10160 \begin_layout Subsection
10161 Description
10162 \end_layout
10163
10164 \begin_layout Standard
10165 This is the layout file for the European Geophysical Society journals.
10166  The needed 
10167 \family typewriter
10168 egs.cls
10169 \family default
10170  can be downloaded from the web site of the EGS under 
10171 \begin_inset Flex URL
10172 status collapsed
10173
10174 \begin_layout Plain Layout
10175
10176 www.copernicus.org
10177 \end_layout
10178
10179 \end_inset
10180
10181 .
10182 \end_layout
10183
10184 \begin_layout Subsection
10185 New styles
10186 \end_layout
10187
10188 \begin_layout Standard
10189
10190 \family sans
10191 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
10192  Accepted
10193 \family default
10194
10195 \family sans
10196 Offsets
10197 \family default
10198 .
10199  The current layout file is unfortunately very unmodular and would benefit
10200  from using the various 
10201 \family typewriter
10202 std*.inc
10203 \family default
10204  file inclusions.
10205 \end_layout
10206
10207 \begin_layout Section
10208 Elsevier Journals
10209 \end_layout
10210
10211 \begin_layout Standard
10212 See the LyX template file 
10213 \family typewriter
10214 elsarticle.lyx
10215 \family default
10216 .
10217  It contains all infos you need.
10218 \end_layout
10219
10220 \begin_layout Section
10221 Foils [aka 
10222 \family sans
10223 FoilTeX
10224 \family default
10225 ]
10226 \begin_inset CommandInset label
10227 LatexCommand label
10228 name "sec:foiltex"
10229
10230 \end_inset
10231
10232
10233 \end_layout
10234
10235 \begin_layout Standard
10236 by 
10237 \noun on
10238 Allan Rae
10239 \end_layout
10240
10241 \begin_layout Subsection
10242 Introduction
10243 \end_layout
10244
10245 \begin_layout Standard
10246 This section describes how to use LyX to make slides for overhead projectors.
10247  There are two document classes that can do this: the default slides class
10248  and the 
10249 \family sans
10250 FoilTeX
10251 \family default
10252  slides class.
10253  This section documents the latter.
10254 \end_layout
10255
10256 \begin_layout Standard
10257 I'm going to say this again, nice and clear, so that there's no misunderstanding
10258 :
10259 \end_layout
10260
10261 \begin_layout Standard
10262 \begin_inset VSpace bigskip
10263 \end_inset
10264
10265
10266 \end_layout
10267
10268 \begin_layout Standard
10269 \align center
10270
10271 \size large
10272 This section documents the class 
10273 \begin_inset Quotes eld
10274 \end_inset
10275
10276
10277 \family sans
10278 slides (FoilTeX)
10279 \family default
10280
10281 \begin_inset Quotes erd
10282 \end_inset
10283
10284  
10285 \emph on
10286 only.
10287 \end_layout
10288
10289 \begin_layout Standard
10290 \begin_inset VSpace bigskip
10291 \end_inset
10292
10293
10294 \end_layout
10295
10296 \begin_layout Standard
10297 If you're looking for the documentation for 
10298 \begin_inset Quotes eld
10299 \end_inset
10300
10301
10302 \family sans
10303 slides (default)
10304 \family default
10305
10306 \begin_inset Quotes erd
10307 \end_inset
10308
10309 , check out section
10310 \begin_inset space ~
10311 \end_inset
10312
10313
10314 \begin_inset CommandInset ref
10315 LatexCommand ref
10316 reference "sec:slitex"
10317
10318 \end_inset
10319
10320 .
10321  If your machine doesn't have the 
10322 \family sans
10323 foils
10324 \family default
10325  class [
10326 \begin_inset Quotes eld
10327 \end_inset
10328
10329
10330 \family sans
10331 slides (FoilTeX)
10332 \family default
10333
10334 \begin_inset Quotes erd
10335 \end_inset
10336
10337 ] installed, you'll probably have to use the default 
10338 \family sans
10339 slides
10340 \family default
10341  class, which isn't quite as good as 
10342 \family sans
10343 foils.
10344 \end_layout
10345
10346 \begin_layout Standard
10347 The 
10348 \family sans
10349 foils
10350 \family default
10351  class is designed for use with version 2.1 of the 
10352 \family sans
10353 foils.cls
10354 \family default
10355  LaTeX class file which is now an integral part of LaTeX2e.
10356 \end_layout
10357
10358 \begin_layout Subsection
10359 Getting Started
10360 \end_layout
10361
10362 \begin_layout Standard
10363 Obviously, to use this document class, you need to select 
10364 \begin_inset Quotes eld
10365 \end_inset
10366
10367
10368 \family sans
10369 slides (FoilTeX)
10370 \family default
10371
10372 \begin_inset Quotes erd
10373 \end_inset
10374
10375  from the 
10376 \family sans
10377 Class
10378 \family default
10379  entry in the 
10380 \family sans
10381 Document
10382 \begin_inset space ~
10383 \end_inset
10384
10385 Layout
10386 \family default
10387  dialog.
10388  There are some settings in the 
10389 \family sans
10390 Document
10391 \begin_inset space ~
10392 \end_inset
10393
10394 Layout
10395 \family default
10396  dialog that you should know about that are specific to this class:
10397 \end_layout
10398
10399 \begin_layout Itemize
10400 Don't change the options 
10401 \family sans
10402 Sides
10403 \family default
10404  and 
10405 \family sans
10406 Columns
10407 \family default
10408  on the 
10409 \family sans
10410 Document
10411 \begin_inset space ~
10412 \end_inset
10413
10414 Layout
10415 \family default
10416  dialog.
10417  They're ignored by the 
10418 \family sans
10419 foils
10420 \family default
10421  class.
10422 \end_layout
10423
10424 \begin_layout Itemize
10425 The default font size is 20
10426 \begin_inset space \thinspace{}
10427 \end_inset
10428
10429 pt with the other options being 17
10430 \begin_inset space \thinspace{}
10431 \end_inset
10432
10433 pt, 25
10434 \begin_inset space \thinspace{}
10435 \end_inset
10436
10437 pt and 30
10438 \begin_inset space \thinspace{}
10439 \end_inset
10440
10441 pt.
10442 \end_layout
10443
10444 \begin_layout Itemize
10445 The default font is 
10446 \family sans
10447 sans
10448 \family default
10449  
10450 \family sans
10451 serif
10452 \family default
10453  but all math equations are still typeset in the usual roman font.
10454 \end_layout
10455
10456 \begin_layout Itemize
10457
10458 \family sans
10459 FoilTeX
10460 \family default
10461  supports A4 and Letter paper sizes as well as a special size for working
10462  with 35
10463 \begin_inset space \thinspace{}
10464 \end_inset
10465
10466 mm slides.
10467  It doesn't support A5, B5, legal or executive paper sizes.
10468 \end_layout
10469
10470 \begin_layout Itemize
10471 Don't bother changing the 
10472 \family sans
10473 Float Placement
10474 \family default
10475  settings because they are ignored anyway.
10476  All floats appear where they are defined in the text.
10477 \end_layout
10478
10479 \begin_layout Itemize
10480 The 
10481 \family sans
10482 Pagestyle
10483 \family default
10484  setting behaves a bit differently for this class.
10485  
10486 \family sans
10487 FoilTeX
10488 \family default
10489  provides extensive footer and header capabilities including a user-defined
10490  logo.
10491  See section
10492 \begin_inset space ~
10493 \end_inset
10494
10495
10496 \begin_inset CommandInset ref
10497 LatexCommand ref
10498 reference "sec:foilfoot"
10499
10500 \end_inset
10501
10502  for more details.
10503  The title page is treated differently to all other pages in the document
10504  and is 
10505 \emph on
10506 always
10507 \emph default
10508  unnumbered and 
10509 \emph on
10510 always
10511 \emph default
10512  has the logo centered at the bottom of the page (if one is defined).
10513  The possible page style choices and what they do are as follows:
10514 \end_layout
10515
10516 \begin_deeper
10517 \begin_layout Labeling
10518 \labelwidthstring MMMMMMM
10519
10520 \family sans
10521 \series bold
10522 empty
10523 \family default
10524 \series default
10525  The final output contains no page numbers, or other headers or footers
10526  (except footnotes of course).
10527  
10528 \end_layout
10529
10530 \begin_layout Labeling
10531 \labelwidthstring MMMMMMM
10532
10533 \family sans
10534 \series bold
10535 plain
10536 \family default
10537 \series default
10538  The final output contains page numbers centered at the bottom of the page.
10539  No other headings or footers (other than footnotes).
10540 \end_layout
10541
10542 \begin_layout Labeling
10543 \labelwidthstring MMMMMMM
10544
10545 \series bold
10546 foilheadings
10547 \series default
10548  Page numbers in lower right corner.
10549  Additional headers and footers are also shown.
10550  This is also the default.
10551 \end_layout
10552
10553 \begin_layout Labeling
10554 \labelwidthstring MMMMMMM
10555
10556 \series bold
10557 fancy
10558 \series default
10559  Gives you access to the 
10560 \family sans
10561 fancyheadings
10562 \family default
10563  package although its use with 
10564 \family sans
10565 FoilTeX
10566 \family default
10567  is discouraged by the writer of the 
10568 \family sans
10569 FoilTeX
10570 \family default
10571  package because of some potential page layout clashes.
10572 \end_layout
10573
10574 \end_deeper
10575 \begin_layout Subsubsection
10576 Extra Options
10577 \end_layout
10578
10579 \begin_layout Standard
10580 The following options may be used in the extra class options in the 
10581 \family sans
10582 Document\SpecialChar \menuseparator
10583 Settings
10584 \family default
10585  dialog.
10586 \end_layout
10587
10588 \begin_layout Labeling
10589 \labelwidthstring MMMMMMx
10590
10591 \series bold
10592 35mmSlide
10593 \series default
10594  This sets up the page layout for 7.33
10595 \begin_inset space \thinspace{}
10596 \end_inset
10597
10598 in by 11
10599 \begin_inset space \thinspace{}
10600 \end_inset
10601
10602 in paper, which is about the same aspect ratio as a 35
10603 \begin_inset space \thinspace{}
10604 \end_inset
10605
10606 mm slide, making it a bit easier to work with this medium.
10607 \end_layout
10608
10609 \begin_layout Labeling
10610 \labelwidthstring MMMMMMx
10611
10612 \series bold
10613 headrule
10614 \series default
10615  Places a rule across the page below the header on every page except the
10616  title page.
10617 \end_layout
10618
10619 \begin_layout Labeling
10620 \labelwidthstring MMMMMMx
10621
10622 \series bold
10623 footrule
10624 \series default
10625  Places a rule across the page above the footer on every page except the
10626  title page.
10627 \end_layout
10628
10629 \begin_layout Labeling
10630 \labelwidthstring MMMMMMx
10631
10632 \series bold
10633 dvips
10634 \series default
10635  This is automatically set each time you create a new 
10636 \family sans
10637 foils
10638 \family default
10639  document.
10640  This option tells 
10641 \family sans
10642 FoilTeX
10643 \family default
10644  to use the dvips driver to rotate those pages that are set as landscape
10645  foils.
10646 \end_layout
10647
10648 \begin_layout Labeling
10649 \labelwidthstring MMMMMMx
10650
10651 \series bold
10652 landscape
10653 \series default
10654  Simply changes the page dimensions to those of a landscape page but doesn't
10655  do any rotation.
10656  Thus if you use this option you need to use an external program to rotate
10657  each page or feed your paper through your printer as landscape.
10658  Note that this option effectively reverses the roles of the 
10659 \family sans
10660 Foilhead
10661 \family default
10662  and 
10663 \family sans
10664 Rotatefoilhead
10665 \family default
10666  environments (don't worry these are described in the next section).
10667 \end_layout
10668
10669 \begin_layout Labeling
10670 \labelwidthstring MMMMMMx
10671
10672 \series bold
10673 leqno
10674 \series default
10675  Equation numbers on the left.
10676 \end_layout
10677
10678 \begin_layout Labeling
10679 \labelwidthstring MMMMMMx
10680
10681 \series bold
10682 fleqn
10683 \series default
10684  Flush-left equations.
10685 \end_layout
10686
10687 \begin_layout Subsection
10688 Supported Environments
10689 \end_layout
10690
10691 \begin_layout Standard
10692 Most of the environments commonly supported in other classes are also supported
10693  by the 
10694 \family sans
10695 foils
10696 \family default
10697  class.
10698  There are several additional environments provided by 
10699 \family sans
10700 FoilTeX
10701 \family default
10702  as well as a couple added by LyX.
10703  The following environments are shared with other classes:
10704 \end_layout
10705
10706 \begin_layout Standard
10707 \begin_inset Flex Multiple Columns
10708 status open
10709
10710 \begin_layout Itemize
10711
10712 \family sans
10713 Standard
10714 \end_layout
10715
10716 \begin_layout Itemize
10717
10718 \family sans
10719 Itemize
10720 \end_layout
10721
10722 \begin_layout Itemize
10723
10724 \family sans
10725 Enumerate
10726 \end_layout
10727
10728 \begin_layout Itemize
10729
10730 \family sans
10731 Description
10732 \end_layout
10733
10734 \begin_layout Itemize
10735
10736 \family sans
10737 List
10738 \end_layout
10739
10740 \begin_layout Itemize
10741
10742 \family sans
10743 LyX-Code
10744 \end_layout
10745
10746 \begin_layout Itemize
10747
10748 \family sans
10749 Verse
10750 \end_layout
10751
10752 \begin_layout Itemize
10753
10754 \family sans
10755 Quote
10756 \end_layout
10757
10758 \begin_layout Itemize
10759
10760 \family sans
10761 Quotation
10762 \end_layout
10763
10764 \begin_layout Itemize
10765
10766 \family sans
10767 Title
10768 \end_layout
10769
10770 \begin_layout Itemize
10771
10772 \family sans
10773 Author
10774 \end_layout
10775
10776 \begin_layout Itemize
10777
10778 \family sans
10779 Date
10780 \end_layout
10781
10782 \begin_layout Itemize
10783
10784 \family sans
10785 Abstract
10786 \end_layout
10787
10788 \begin_layout Itemize
10789
10790 \family sans
10791 Bibliography
10792 \end_layout
10793
10794 \begin_layout Itemize
10795
10796 \family sans
10797 Address
10798 \end_layout
10799
10800 \begin_layout Itemize
10801
10802 \family sans
10803 RightAddress
10804 \end_layout
10805
10806 \begin_layout Itemize
10807
10808 \family sans
10809 Caption
10810 \end_layout
10811
10812 \begin_layout Itemize
10813
10814 \family sans
10815 Comment
10816 \end_layout
10817
10818 \end_inset
10819
10820
10821 \end_layout
10822
10823 \begin_layout Standard
10824 That is, all the major environments apart from the sectioning environments.
10825  Since foils are essentially self-contained sections, with a title and body,
10826  
10827 \family sans
10828 FoilTeX
10829 \family default
10830  provides specific commands for starting new foils and these are:
10831 \end_layout
10832
10833 \begin_layout Itemize
10834
10835 \family sans
10836 Foilhead
10837 \end_layout
10838
10839 \begin_layout Itemize
10840
10841 \family sans
10842 Rotatefoilhead
10843 \end_layout
10844
10845 \begin_layout Standard
10846 LyX also provides slightly modified versions of these two environments called:
10847 \end_layout
10848
10849 \begin_layout Itemize
10850
10851 \family sans
10852 ShortFoilhead
10853 \end_layout
10854
10855 \begin_layout Itemize
10856
10857 \family sans
10858 ShortRotatefoilhead
10859 \end_layout
10860
10861 \begin_layout Standard
10862 and the differences will be explained in the next section.
10863 \end_layout
10864
10865 \begin_layout Standard
10866 Since foils are often used in presenting ideas or new theorems and such
10867  
10868 \family sans
10869 FoilTeX
10870 \family default
10871  also provides a comprehensive box of goodies for presenting them:
10872 \end_layout
10873
10874 \begin_layout Standard
10875 \begin_inset Flex Multiple Columns
10876 status open
10877
10878 \begin_layout Itemize
10879
10880 \family sans
10881 Theorem
10882 \end_layout
10883
10884 \begin_layout Itemize
10885
10886 \family sans
10887 Lemma
10888 \end_layout
10889
10890 \begin_layout Itemize
10891
10892 \family sans
10893 Corollary
10894 \end_layout
10895
10896 \begin_layout Itemize
10897
10898 \family sans
10899 Proposition
10900 \end_layout
10901
10902 \begin_layout Itemize
10903
10904 \family sans
10905 Definition
10906 \end_layout
10907
10908 \begin_layout Itemize
10909
10910 \family sans
10911 Proof
10912 \end_layout
10913
10914 \begin_layout Itemize
10915
10916 \family sans
10917 Theorem*
10918 \end_layout
10919
10920 \begin_layout Itemize
10921
10922 \family sans
10923 Lemma*
10924 \end_layout
10925
10926 \begin_layout Itemize
10927
10928 \family sans
10929 Corollary*
10930 \end_layout
10931
10932 \begin_layout Itemize
10933
10934 \family sans
10935 Proposition*
10936 \end_layout
10937
10938 \begin_layout Itemize
10939
10940 \family sans
10941 Definition*
10942 \end_layout
10943
10944 \end_inset
10945
10946
10947 \end_layout
10948
10949 \begin_layout Standard
10950 The starred versions are unnumbered while the unstarred versions are numbered.
10951  There are also two list environments added by LyX and these are:
10952 \end_layout
10953
10954 \begin_layout Itemize
10955
10956 \family sans
10957 TickList
10958 \end_layout
10959
10960 \begin_layout Itemize
10961
10962 \family sans
10963 CrossList
10964 \end_layout
10965
10966 \begin_layout Standard
10967
10968 \family sans
10969 FoilTeX
10970 \family default
10971  provides some powerful header and footer capabilities that are best set
10972  in the preamble although they may be set at any point in a document.
10973  If you want to change these settings in your document the best place to
10974  do so is at the very top of a foil, i.
10975 \begin_inset space \thinspace{}
10976 \end_inset
10977
10978 e.
10979 \emph on
10980
10981 \begin_inset space \space{}
10982 \end_inset
10983
10984
10985 \emph default
10986 straight after the foilhead.
10987 \end_layout
10988
10989 \begin_layout Standard
10990 For this purpose, the following command styles are provided [
10991 \shape smallcaps
10992 Martin Vermeer
10993 \shape default
10994 ]:
10995 \end_layout
10996
10997 \begin_layout Standard
10998 \begin_inset Flex Multiple Columns
10999 status open
11000
11001 \begin_layout Itemize
11002
11003 \family sans
11004 My
11005 \begin_inset space ~
11006 \end_inset
11007
11008 Logo
11009 \end_layout
11010
11011 \begin_layout Itemize
11012
11013 \family sans
11014 Restriction
11015 \end_layout
11016
11017 \begin_layout Itemize
11018
11019 \family sans
11020 Right
11021 \begin_inset space ~
11022 \end_inset
11023
11024 Footer
11025 \end_layout
11026
11027 \begin_layout Itemize
11028
11029 \family sans
11030 Right
11031 \begin_inset space ~
11032 \end_inset
11033
11034 Header
11035 \end_layout
11036
11037 \begin_layout Itemize
11038
11039 \family sans
11040 Left
11041 \begin_inset space ~
11042 \end_inset
11043
11044 Header
11045 \end_layout
11046
11047 \begin_deeper
11048 \begin_layout Plain Layout
11049 \begin_inset space ~
11050 \end_inset
11051
11052
11053 \end_layout
11054
11055 \end_deeper
11056 \end_inset
11057
11058
11059 \end_layout
11060
11061 \begin_layout Standard
11062 There are also a few commands provided by 
11063 \family sans
11064 FoilTeX
11065 \family default
11066  that aren't directly supported by LyX but I'll tell you what they do and
11067  how to use them in section
11068 \begin_inset space ~
11069 \end_inset
11070
11071
11072 \begin_inset CommandInset ref
11073 LatexCommand ref
11074 reference "sec:unsuppfoils"
11075
11076 \end_inset
11077
11078 .
11079 \end_layout
11080
11081 \begin_layout Subsection
11082 Building a Set of Foils
11083 \end_layout
11084
11085 \begin_layout Standard
11086 This section will give a simple introduction to using the different environments
11087  to build a set of foils.
11088  If you want to see an example set of foils, take a look at the 
11089 \family typewriter
11090 Foils.lyx
11091 \family default
11092  file you find in LyX's 
11093 \family typewriter
11094 examples
11095 \family default
11096  folder.
11097 \end_layout
11098
11099 \begin_layout Subsubsection
11100 Give It a Title Page
11101 \end_layout
11102
11103 \begin_layout Standard
11104 Unlike other classes that provide 
11105 \family sans
11106 Title
11107 \family default
11108
11109 \family sans
11110 Author
11111 \family default
11112
11113 \family sans
11114 Date
11115 \family default
11116  and 
11117 \family sans
11118 Abstract
11119 \family default
11120  environments, 
11121 \family sans
11122 foils
11123 \family default
11124  creates the title on a page of its own.
11125  If you leave out the 
11126 \family sans
11127 Date
11128 \family default
11129  environment LaTeX will substitute the current date (every time you regenerate
11130  the output).
11131 \end_layout
11132
11133 \begin_layout Subsubsection
11134 Start a New Foil
11135 \end_layout
11136
11137 \begin_layout Standard
11138 As I mentioned earlier, there are four ways of starting a new foil.
11139  For portrait foils you should use 
11140 \family sans
11141 Foilhead
11142 \family default
11143  or 
11144 \family sans
11145 ShortFoilhead.
11146
11147 \family default
11148  The difference between these two environments is the amount of space between
11149  the title of the foil (the foilhead) and the body of the foil.
11150 \end_layout
11151
11152 \begin_layout Standard
11153 Landscape foils are generated using the 
11154 \family sans
11155 Rotatefoilhead
11156 \family default
11157  and 
11158 \family sans
11159 ShortRotatefoilhead
11160 \family default
11161  environments.
11162  Again the only difference is the spacing between foilhead and body.
11163  Both of the short versions have 0.5
11164 \begin_inset space ~
11165 \end_inset
11166
11167 inches less separation between the foilhead and the body.
11168  
11169 \end_layout
11170
11171 \begin_layout Standard
11172 One problem with the support for landscape foils is the requirement that
11173  you have to use the 
11174 \family typewriter
11175 dvips
11176 \family default
11177  driver to generate the PostScript output otherwise the foils won't be rotated.
11178  It is possible to get landscape foils even if you haven't got the 
11179 \family typewriter
11180 dvips
11181 \family default
11182  driver provided you can feed your foils sideways through your printer ;-)
11183 \end_layout
11184
11185 \begin_layout Subsubsection
11186 Theorems, Lemmas, Proofs and more
11187 \end_layout
11188
11189 \begin_layout Standard
11190 Due to a small bug in LyX you can't have two of the same type of these environme
11191 nts directly following each other.
11192  They must be separated by something.
11193  If you try, you will just be extending the previous environment as if you
11194  had merged the two environments together.
11195  So, how do you get around this problem? The simplest option is to insert
11196  some text between the two environments or add a 
11197 \family sans
11198 LaTeX
11199 \family default
11200  environment between the two with just a 
11201 \begin_inset Quotes eld
11202 \end_inset
11203
11204
11205 \family typewriter
11206 %
11207 \family default
11208
11209 \begin_inset Quotes erd
11210 \end_inset
11211
11212  in it.
11213  This will force LyX to produce two separate environments and hence the
11214  correct LaTeX output.
11215  An example is provided in the example file included with the LyX distribution.
11216  Remember, this problem only occurs if you are trying to place two of the
11217  same type of theorem-like environments one directly after the other.
11218 \end_layout
11219
11220 \begin_layout Subsubsection
11221 Lists
11222 \end_layout
11223
11224 \begin_layout Standard
11225 You get all the commonly supported list styles found in other classes as
11226  well as two new ones.
11227  I'll only describe the new ones here.
11228  If you want to find out more about the other list environments check out
11229  the 
11230 \emph on
11231 User's Guide.
11232
11233 \emph default
11234  If you intend to use itemized lists you might also want to read about the
11235  
11236 \family sans
11237 Itemize
11238 \begin_inset space ~
11239 \end_inset
11240
11241 Bullet
11242 \begin_inset space ~
11243 \end_inset
11244
11245 Selection
11246 \family default
11247  dialog described above in section
11248 \begin_inset space ~
11249 \end_inset
11250
11251
11252 \begin_inset CommandInset ref
11253 LatexCommand ref
11254 reference "sec:bullet"
11255
11256 \end_inset
11257
11258 .
11259 \end_layout
11260
11261 \begin_layout Standard
11262 The two new list styles, 
11263 \family sans
11264 TickList
11265 \family default
11266  and 
11267 \family sans
11268 CrossList
11269 \family default
11270 , are designed to make it easier for you to create lists of do's and don'ts
11271  or right and wrong by providing dedicated environments that use a tick
11272  or a cross as the label of the list.
11273  These lists are in fact dedicated variants of the 
11274 \family sans
11275 Itemize
11276 \family default
11277  environment.
11278  They do however require that you have the 
11279 \family typewriter
11280 psnfss
11281 \family default
11282  packages installed.
11283 \end_layout
11284
11285 \begin_layout Subsubsection
11286 Figures and Tables
11287 \end_layout
11288
11289 \begin_layout Standard
11290
11291 \family sans
11292 FoilTeX
11293 \family default
11294  redefines the floating tables and figures so that they appear exactly where
11295  they are in the text rather than pushing them to the top of the page or
11296  to some user specified location.
11297  In fact if you change the float placement settings they are simply ignored.
11298 \end_layout
11299
11300 \begin_layout Subsubsection
11301 Page Headers and Footers
11302 \begin_inset CommandInset label
11303 LatexCommand label
11304 name "sec:foilfoot"
11305
11306 \end_inset
11307
11308
11309 \end_layout
11310
11311 \begin_layout Standard
11312
11313 \family sans
11314 My
11315 \begin_inset space ~
11316 \end_inset
11317
11318 Logo
11319 \family default
11320  and 
11321 \family sans
11322 Restriction
11323 \family default
11324  are two commands used to control the left-footer text string.
11325  The first is meant to allow you to include a graphic logo on your foils
11326  and defaults to 
11327 \begin_inset Quotes eld
11328 \end_inset
11329
11330 -Typeset by 
11331 \family sans
11332 FoilTeX
11333 \family default
11334 -
11335 \begin_inset Quotes erd
11336 \end_inset
11337
11338 .
11339  While the second is meant to provide a classification for the audience,
11340  
11341 \emph on
11342 e.
11343 \begin_inset space \thinspace{}
11344 \end_inset
11345
11346 g.
11347 \emph default
11348
11349 \begin_inset space \space{}
11350 \end_inset
11351
11352 Confidential.
11353  It is empty by default.
11354 \end_layout
11355
11356 \begin_layout Standard
11357 The remaining page corners can be filled by 
11358 \family sans
11359 Right
11360 \begin_inset space ~
11361 \end_inset
11362
11363 Footer
11364 \family default
11365  (which defaults to page numbers), 
11366 \family sans
11367 Right
11368 \begin_inset space ~
11369 \end_inset
11370
11371 Header
11372 \family default
11373  (top right) and 
11374 \family sans
11375 Left
11376 \begin_inset space ~
11377 \end_inset
11378
11379 Header
11380 \family default
11381  (top left).
11382 \end_layout
11383
11384 \begin_layout Subsection
11385 Unsupported 
11386 \family sans
11387 FoilTeX
11388 \family default
11389  Goodies
11390 \begin_inset CommandInset label
11391 LatexCommand label
11392 name "sec:unsuppfoils"
11393
11394 \end_inset
11395
11396
11397 \end_layout
11398
11399 \begin_layout Standard
11400 All the commands mentioned below need to be set in a 
11401 \family sans
11402 LaTeX
11403 \family default
11404  environment or as 
11405 \family sans
11406 TeX
11407 \family default
11408  within another environment.
11409 \end_layout
11410
11411 \begin_layout Subsubsection
11412 Lengths
11413 \end_layout
11414
11415 \begin_layout Standard
11416 All lengths are adjusted using the 
11417 \family typewriter
11418
11419 \backslash
11420 setlength{
11421 \family default
11422 \emph on
11423 lengthname
11424 \family typewriter
11425 \emph default
11426 }{
11427 \family default
11428 \emph on
11429 newlength
11430 \family typewriter
11431 \emph default
11432 }
11433 \family default
11434  command.
11435  Where 
11436 \emph on
11437 lengthname
11438 \emph default
11439  should be replaced by the name given to the length you want to change and
11440  
11441 \emph on
11442 newlength
11443 \emph default
11444  is the length value.
11445  All lengths should be specified in units of length such as inches (
11446 \family typewriter
11447 in
11448 \family default
11449 ), millimeters (
11450 \family typewriter
11451 mm
11452 \family default
11453 ) or points (
11454 \family typewriter
11455 pt
11456 \family default
11457 ) or relative to some document or font-based length such as 
11458 \family typewriter
11459
11460 \backslash
11461 textwidth
11462 \family default
11463 .
11464  
11465 \end_layout
11466
11467 \begin_layout Standard
11468 It's possible to change the spacing between a foilhead and the body of the
11469  foil by adjusting the length specified by 
11470 \family typewriter
11471
11472 \backslash
11473 foilheadskip
11474 \family default
11475 .
11476  For example, to make 
11477 \emph on
11478 all
11479 \emph default
11480  foilheads 0.5
11481 \begin_inset space \space{}
11482 \end_inset
11483
11484 in closer to their bodies put the following in the preamble: 
11485 \family typewriter
11486
11487 \backslash
11488 setlength{
11489 \backslash
11490 foilheadskip}{-0.5in}
11491 \end_layout
11492
11493 \begin_layout Standard
11494 The spacings around floats can be adjusted by setting these lengths:
11495 \end_layout
11496
11497 \begin_layout Labeling
11498 \labelwidthstring MMMMMMMMMMM
11499
11500 \family typewriter
11501
11502 \backslash
11503 abovefloatskip
11504 \family default
11505  Separation between the text and the top of the float
11506 \end_layout
11507
11508 \begin_layout Labeling
11509 \labelwidthstring MMMMMMMMMMM
11510
11511 \family typewriter
11512
11513 \backslash
11514 abovecaptionskip
11515 \family default
11516  Separation between the float and the caption
11517 \end_layout
11518
11519 \begin_layout Labeling
11520 \labelwidthstring MMMMMMMMMMM
11521
11522 \family typewriter
11523
11524 \backslash
11525 belowcaptionskip
11526 \family default
11527  Separation between the caption and the following text
11528 \end_layout
11529
11530 \begin_layout Labeling
11531 \labelwidthstring MMMMMMMMMMM
11532
11533 \family typewriter
11534
11535 \backslash
11536 captionwidth
11537 \family default
11538  You can make the captions narrower than the surrounding text by adjusting
11539  this length.
11540  Best done relative to 
11541 \family typewriter
11542
11543 \backslash
11544 textwidth
11545 \family default
11546 .
11547 \end_layout
11548
11549 \begin_layout Standard
11550 There are also several title page related lengths that you may find useful
11551  if you have a long title or several authors:
11552 \end_layout
11553
11554 \begin_layout Labeling
11555 \labelwidthstring MMMMMMMMMMM
11556
11557 \family typewriter
11558
11559 \backslash
11560 abovetitleskip
11561 \family default
11562  Separation from headers to 
11563 \family sans
11564 Title
11565 \end_layout
11566
11567 \begin_layout Labeling
11568 \labelwidthstring MMMMMMMMMMM
11569
11570 \family typewriter
11571
11572 \backslash
11573 titleauthorskip
11574 \family default
11575  between 
11576 \family sans
11577 Title
11578 \family default
11579  and 
11580 \family sans
11581 Author
11582 \family default
11583  environments
11584 \end_layout
11585
11586 \begin_layout Labeling
11587 \labelwidthstring MMMMMMMMMMM
11588
11589 \family typewriter
11590
11591 \backslash
11592 authorauthorskip
11593 \family default
11594  between multiple 
11595 \family sans
11596 Author
11597 \family default
11598  lines
11599 \end_layout
11600
11601 \begin_layout Labeling
11602 \labelwidthstring MMMMMMMMMMM
11603
11604 \family typewriter
11605
11606 \backslash
11607 authordateskip
11608 \family default
11609  between the 
11610 \family sans
11611 Author
11612 \family default
11613  and the 
11614 \family sans
11615 Date
11616 \end_layout
11617
11618 \begin_layout Labeling
11619 \labelwidthstring MMMMMMMMMMM
11620
11621 \family typewriter
11622
11623 \backslash
11624 dateabstractskip
11625 \family default
11626  between the 
11627 \family sans
11628 Date
11629 \family default
11630  and the 
11631 \family sans
11632 Abstract
11633 \end_layout
11634
11635 \begin_layout Standard
11636 The last length related command affects all the list environments.
11637  If you place 
11638 \family typewriter
11639
11640 \backslash
11641 zerolistvertdimens
11642 \family default
11643  
11644 \emph on
11645 inside
11646 \emph default
11647  a list environment then all the vertical spacing between the list items
11648  is removed.
11649  Note that this is a command not a length so it doesn't require 
11650 \family typewriter
11651
11652 \backslash
11653 setlength
11654 \family default
11655  like the stuff mentioned above.
11656 \end_layout
11657
11658 \begin_layout Subsubsection
11659 Headers and Footers
11660 \end_layout
11661
11662 \begin_layout Standard
11663 The 
11664 \family typewriter
11665
11666 \backslash
11667 LogoOn
11668 \family default
11669  and 
11670 \family typewriter
11671
11672 \backslash
11673 LogoOff
11674 \family default
11675  commands control whether the logo in the 
11676 \family sans
11677 MyLogo
11678 \family default
11679  definition appear on a given page.
11680  If you put 
11681 \family typewriter
11682
11683 \backslash
11684 LogoOff
11685 \family default
11686  in the preamble then none of the foils will have the logo on them.
11687  If you don't want the logo on a particular page place the 
11688 \family typewriter
11689
11690 \backslash
11691 LogoOff
11692 \family default
11693  directly after the foilhead of that page and the 
11694 \family typewriter
11695
11696 \backslash
11697 LogoOn
11698 \family default
11699  directly after the next foilhead.
11700 \end_layout
11701
11702 \begin_layout Standard
11703 If you decide to use the 
11704 \family sans
11705 fancy
11706 \family default
11707  page style setting in the 
11708 \family sans
11709 Document
11710 \begin_inset space ~
11711 \end_inset
11712
11713 Layout
11714 \family default
11715  dialog you should probably add 
11716 \family typewriter
11717
11718 \backslash
11719 let
11720 \backslash
11721 headwidth
11722 \backslash
11723 textwidth
11724 \family default
11725  to your preamble so headers and footers on landscape pages are correctly
11726  placed when rotated.
11727  This is due to some clashes between the page layouts provided by the 
11728 \family sans
11729 fancyheadings
11730 \family default
11731  package and the 
11732 \family sans
11733 foils
11734 \family default
11735  class.
11736 \end_layout
11737
11738 \begin_layout Section
11739 Hollywood (Hollywood spec scripts)
11740 \end_layout
11741
11742 \begin_layout Standard
11743 by 
11744 \shape smallcaps
11745 Garst Reese
11746 \end_layout
11747
11748 \begin_layout Subsection
11749 Introduction
11750 \end_layout
11751
11752 \begin_layout Standard
11753 Getting the format of a Hollywood script right is a 
11754 \begin_inset Quotes eld
11755 \end_inset
11756
11757 rite of passage.
11758 \begin_inset Quotes erd
11759 \end_inset
11760
11761  It is designed to make the readers focus on content and to be easy and
11762  familiar for the actors to read.
11763  Each page of a script should be one minute of film.
11764  Nothing goes in a script that you cannot see or hear on screen.
11765  The courier 12 pt font should be used throughout.
11766  No italics.
11767 \end_layout
11768
11769 \begin_layout Subsection
11770 Special problems
11771 \end_layout
11772
11773 \begin_layout Standard
11774 Speakers' lines should NEVER break in mid-sentence.
11775  If a speaker's lines continue over a page break, repeat the 
11776 \family sans
11777 Speaker
11778 \family default
11779  title followed by (Cont'd).
11780 \end_layout
11781
11782 \begin_layout Subsection
11783 Special features
11784 \end_layout
11785
11786 \begin_layout Standard
11787 Insert the 
11788 \family sans
11789 Speaker
11790 \family default
11791  names as labels then cross-reference the label to insert the name.
11792  The cross-reference dialog will show the current cast of characters.
11793  You can use this to insert the speaker name in narratives also.
11794 \end_layout
11795
11796 \begin_layout Subsection
11797 Paper size and Margins
11798 \end_layout
11799
11800 \begin_layout Standard
11801 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11802 \end_layout
11803
11804 \begin_layout Subsection
11805 Environments
11806 \end_layout
11807
11808 \begin_layout Standard
11809 The following environments are available.
11810  You can use hollywood.bind to get the bind keys shown at the right.
11811 \end_layout
11812
11813 \begin_layout Itemize
11814
11815 \family sans
11816 Standard
11817 \begin_inset Newline newline
11818 \end_inset
11819
11820
11821 \family default
11822 Used where nothing else works.
11823  Try to avoid it.
11824 \end_layout
11825
11826 \begin_layout Itemize
11827
11828 \family sans
11829 FADE_IN
11830 \family default
11831 :
11832 \begin_inset space \hfill{}
11833 \end_inset
11834
11835
11836 \family sans
11837 M-z S-I
11838 \family default
11839
11840 \begin_inset Newline newline
11841 \end_inset
11842
11843 Usually followed by something like 
11844 \begin_inset Quotes eld
11845 \end_inset
11846
11847 on Sally waking up.
11848 \begin_inset Quotes erd
11849 \end_inset
11850
11851
11852 \end_layout
11853
11854 \begin_layout Itemize
11855
11856 \family sans
11857 INT:
11858 \begin_inset space \hfill{}
11859 \end_inset
11860
11861 M-z i
11862 \begin_inset Newline newline
11863 \end_inset
11864
11865
11866 \family default
11867 Introduces a new INTERIOR camera set-up.
11868  Always followed by DAY or NIGHT, or something similar to define the lighting
11869  required.
11870  Everthing on this line in CAPS.
11871 \end_layout
11872
11873 \begin_layout Itemize
11874
11875 \family sans
11876 EXT:
11877 \begin_inset space \hfill{}
11878 \end_inset
11879
11880 M-z e
11881 \begin_inset Newline newline
11882 \end_inset
11883
11884
11885 \family default
11886 Introduces a new EXTERIOR camera set-up.
11887  Everthing on this line in CAPS.
11888 \end_layout
11889
11890 \begin_layout Itemize
11891
11892 \family sans
11893 Speaker
11894 \begin_inset space \hfill{}
11895 \end_inset
11896
11897 M-z s
11898 \begin_inset Newline newline
11899 \end_inset
11900
11901
11902 \family default
11903 The character speaking.
11904 \end_layout
11905
11906 \begin_layout Itemize
11907
11908 \family sans
11909 Parenthetical
11910 \begin_inset space \hfill{}
11911 \end_inset
11912
11913 M-z p
11914 \begin_inset Newline newline
11915 \end_inset
11916
11917
11918 \family default
11919 Instructions to the speaker.
11920  The () are automatically inserted, but only the ( will show in LyX.
11921  Both will be printed.
11922 \end_layout
11923
11924 \begin_layout Itemize
11925
11926 \family sans
11927 Dialogue
11928 \begin_inset space \hfill{}
11929 \end_inset
11930
11931 M-z d
11932 \begin_inset Newline newline
11933 \end_inset
11934
11935
11936 \family default
11937 What the 
11938 \family sans
11939 Speaker
11940 \family default
11941  says.
11942 \end_layout
11943
11944 \begin_layout Itemize
11945
11946 \family sans
11947 Transition
11948 \begin_inset space \hfill{}
11949 \end_inset
11950
11951 M-z t
11952 \begin_inset Newline newline
11953 \end_inset
11954
11955
11956 \family default
11957 Camera movement instruction.
11958  e.
11959 \begin_inset space \thinspace{}
11960 \end_inset
11961
11962 g.
11963 \begin_inset space \space{}
11964 \end_inset
11965
11966 CUT TO:
11967 \end_layout
11968
11969 \begin_layout Itemize
11970
11971 \family sans
11972 FADE OUT:
11973 \begin_inset space \hfill{}
11974 \end_inset
11975
11976 M-z S-I
11977 \end_layout
11978
11979 \begin_layout Itemize
11980
11981 \family sans
11982 Author
11983 \begin_inset space \hfill{}
11984 \end_inset
11985
11986 M-z S-A
11987 \end_layout
11988
11989 \begin_layout Itemize
11990
11991 \family sans
11992 Title
11993 \begin_inset space \hfill{}
11994 \end_inset
11995
11996 M-z S-T
11997 \end_layout
11998
11999 \begin_layout Itemize
12000
12001 \family sans
12002 Right_Address
12003 \begin_inset space \hfill{}
12004 \end_inset
12005
12006 M-z r
12007 \end_layout
12008
12009 \begin_layout Subsection
12010 Script jargon
12011 \end_layout
12012
12013 \begin_layout Itemize
12014 (O.S) — off screen
12015 \end_layout
12016
12017 \begin_layout Itemize
12018 (V.0) — voice over
12019 \end_layout
12020
12021 \begin_layout Itemize
12022 b.
12023 \begin_inset space \thinspace{}
12024 \end_inset
12025
12026 g.
12027  — background
12028 \end_layout
12029
12030 \begin_layout Itemize
12031 C.U.
12032  — close-up
12033 \end_layout
12034
12035 \begin_layout Itemize
12036 PAN — camera movement
12037 \end_layout
12038
12039 \begin_layout Itemize
12040 INSERT — cut to close-up of
12041 \end_layout
12042
12043 \begin_layout Section
12044 ijmpc and ijmpd
12045 \end_layout
12046
12047 \begin_layout Standard
12048 by 
12049 \noun on
12050 Panayotis Papasotiriou
12051 \end_layout
12052
12053 \begin_layout Subsection
12054 Overview
12055 \end_layout
12056
12057 \begin_layout Standard
12058 The ijmpc package is a set of macros that facilitates electronic manuscript
12059  submission to the 
12060 \emph on
12061 International Journal of Modern Physics C
12062 \emph default
12063 .
12064  Similarly, the ijmpd package is for creating manuscripts to be submitted
12065  to the 
12066 \emph on
12067 International Journal of Modern Physics D
12068 \emph default
12069 .
12070  Both journals are published by World Scientific.
12071  The corresponding document classes are named 
12072 \family typewriter
12073 ws-ijmpc.cls
12074 \family default
12075  and 
12076 \family typewriter
12077 ws-ijmpd.cls
12078 \family default
12079 , respectively.
12080  These files, together with instructions for the authors, can be downloaded
12081  from the sites 
12082 \begin_inset Flex URL
12083 status collapsed
12084
12085 \begin_layout Plain Layout
12086
12087 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
12088 \end_layout
12089
12090 \end_inset
12091
12092  and 
12093 \begin_inset Flex URL
12094 status collapsed
12095
12096 \begin_layout Plain Layout
12097
12098 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
12099 \end_layout
12100
12101 \end_inset
12102
12103 .
12104  Both packages are modified versions of the standard 
12105 \begin_inset Quotes eld
12106 \end_inset
12107
12108 article
12109 \begin_inset Quotes erd
12110 \end_inset
12111
12112  package, and they are almost (but not exactly) identical.
12113  Most of their features are supported by LyX.
12114  I have used LyX successfully to write articles submitted to both journals
12115  without any problem.
12116 \end_layout
12117
12118 \begin_layout Subsection
12119 Writing a paper
12120 \end_layout
12121
12122 \begin_layout Standard
12123 As usual, the easiest way to write a paper is to start with a template.
12124  Click on 
12125 \family sans
12126 File\SpecialChar \menuseparator
12127 New from
12128 \family default
12129  
12130 \family sans
12131 \bar under
12132 T
12133 \bar default
12134 emplate
12135 \family default
12136 , then choose the 
12137 \family typewriter
12138 ijmpc.lyx
12139 \family default
12140  or 
12141 \family typewriter
12142 ijmpd.lyx
12143 \family default
12144  template.
12145  This will give an (almost) empty document that includes the most common
12146  fields found in a manuscript.
12147  Simply overwrite the existing text (including the brackets, 
12148 \family typewriter
12149 <>
12150 \family default
12151 ) with your text.
12152  You should keep in mind the following remarks.
12153 \end_layout
12154
12155 \begin_layout Enumerate
12156 LyX won't let you change the font size and the page style of the document,
12157  because such modifications are not allowed by both packages.
12158 \end_layout
12159
12160 \begin_layout Enumerate
12161 The language of the document should not be changed.
12162  Before previewing your paper, be sure that the babel package is not used.
12163  To do this, click on 
12164 \family sans
12165 Tools\SpecialChar \menuseparator
12166 Preferences
12167 \family default
12168 , select the 
12169 \family sans
12170 Lang Opts
12171 \family default
12172  tab, deselect the 
12173 \family sans
12174 Use babel
12175 \family default
12176  checkbox in the language settings, and click on 
12177 \family sans
12178 Apply
12179 \family default
12180  (or 
12181 \family sans
12182 Save
12183 \family default
12184 , if you wish to make this change permanent).
12185 \end_layout
12186
12187 \begin_layout Enumerate
12188 The 
12189 \begin_inset Quotes eld
12190 \end_inset
12191
12192 Keywords
12193 \begin_inset Quotes erd
12194 \end_inset
12195
12196  style must be used to define keywords.
12197 \end_layout
12198
12199 \begin_layout Enumerate
12200 The ijmpc package provides a style named 
12201 \begin_inset Quotes eld
12202 \end_inset
12203
12204 Classification Codes
12205 \begin_inset Quotes erd
12206 \end_inset
12207
12208 , which can be used to define classification codes, such as PACS numbers.
12209  Note that this facility is not supported by the ijmpd package.
12210 \end_layout
12211
12212 \begin_layout Enumerate
12213 Several new environments are available: 
12214 \begin_inset Quotes eld
12215 \end_inset
12216
12217 Definition
12218 \begin_inset Quotes erd
12219 \end_inset
12220
12221
12222 \begin_inset Quotes eld
12223 \end_inset
12224
12225 Step
12226 \begin_inset Quotes erd
12227 \end_inset
12228
12229
12230 \begin_inset Quotes eld
12231 \end_inset
12232
12233 Example
12234 \begin_inset Quotes erd
12235 \end_inset
12236
12237
12238 \begin_inset Quotes eld
12239 \end_inset
12240
12241 Remark
12242 \begin_inset Quotes erd
12243 \end_inset
12244
12245
12246 \begin_inset Quotes eld
12247 \end_inset
12248
12249 Notation
12250 \begin_inset Quotes erd
12251 \end_inset
12252
12253
12254 \begin_inset Quotes eld
12255 \end_inset
12256
12257 Theorem
12258 \begin_inset Quotes erd
12259 \end_inset
12260
12261
12262 \begin_inset Quotes eld
12263 \end_inset
12264
12265 Proof
12266 \begin_inset Quotes erd
12267 \end_inset
12268
12269
12270 \begin_inset Quotes eld
12271 \end_inset
12272
12273 Corollary
12274 \begin_inset Quotes erd
12275 \end_inset
12276
12277
12278 \begin_inset Quotes eld
12279 \end_inset
12280
12281 Lemma
12282 \begin_inset Quotes erd
12283 \end_inset
12284
12285
12286 \begin_inset Quotes eld
12287 \end_inset
12288
12289 Proposition
12290 \begin_inset Quotes erd
12291 \end_inset
12292
12293
12294 \begin_inset Quotes eld
12295 \end_inset
12296
12297 Prop
12298 \begin_inset Quotes erd
12299 \end_inset
12300
12301
12302 \begin_inset Quotes eld
12303 \end_inset
12304
12305 Question
12306 \begin_inset Quotes erd
12307 \end_inset
12308
12309
12310 \begin_inset Quotes eld
12311 \end_inset
12312
12313 Claim
12314 \begin_inset Quotes erd
12315 \end_inset
12316
12317 , and 
12318 \begin_inset Quotes eld
12319 \end_inset
12320
12321 Conjecture
12322 \begin_inset Quotes erd
12323 \end_inset
12324
12325 .
12326  Their use is more or less obvious.
12327  LyX supports all these environments; it will use the proper label, text
12328  style, and numbering scheme for each of them.
12329 \end_layout
12330
12331 \begin_layout Enumerate
12332 Both packages use basic citations; the natbib package should not be used.
12333  In LyX, citation references are shown as usual; in the output, citations
12334  are shown as superscripts.
12335  If you want to use a citation as normal text, you should use the 
12336 \family typewriter
12337 refcite
12338 \family default
12339  command, e.
12340 \begin_inset space \thinspace{}
12341 \end_inset
12342
12343 g.
12344 \begin_inset space \space{}
12345 \end_inset
12346
12347
12348 \begin_inset Quotes eld
12349 \end_inset
12350
12351 See Ref.
12352 \begin_inset space \space{}
12353 \end_inset
12354
12355
12356 \family typewriter
12357
12358 \backslash
12359 refcite{key}
12360 \family default
12361
12362 \begin_inset Quotes erd
12363 \end_inset
12364
12365 .
12366 \end_layout
12367
12368 \begin_layout Enumerate
12369 There is no 
12370 \begin_inset Quotes eld
12371 \end_inset
12372
12373 Acknowledgments
12374 \begin_inset Quotes erd
12375 \end_inset
12376
12377  section in both packages.
12378  To put acknowledgments, just use the 
12379 \begin_inset Quotes eld
12380 \end_inset
12381
12382 Section*
12383 \begin_inset Quotes erd
12384 \end_inset
12385
12386  environment.
12387 \end_layout
12388
12389 \begin_layout Enumerate
12390 Appendices may be added to the paper, 
12391 \emph on
12392 after
12393 \emph default
12394  the Acknowledgments and 
12395 \shape italic
12396 before
12397 \shape default
12398  the References.
12399  LyX provides a special environment, called 
12400 \begin_inset Quotes eld
12401 \end_inset
12402
12403 Appendices Section
12404 \begin_inset Quotes erd
12405 \end_inset
12406
12407  which marks the beginning of the appendices.
12408  This environment should be left blank; it just sends a LaTeX command, but
12409  nothing is really printed.
12410  In LyX, the word 
12411 \begin_inset Quotes eld
12412 \end_inset
12413
12414 Appendix
12415 \begin_inset Quotes erd
12416 \end_inset
12417
12418  is printed with blue letters, as a signal that all sections after that
12419  point are appendices.
12420  To write an appendix, use the 
12421 \begin_inset Quotes eld
12422 \end_inset
12423
12424 Appendix
12425 \begin_inset Quotes erd
12426 \end_inset
12427
12428  environment.
12429  LyX will number each appendix with capital letters, as required by both
12430  journals.
12431  Note that 
12432 \begin_inset Quotes eld
12433 \end_inset
12434
12435 Appendices Section
12436 \begin_inset Quotes erd
12437 \end_inset
12438
12439  
12440 \emph on
12441 must
12442 \emph default
12443  be present before the first appendix; if not, all appendices will be numbered
12444  as normal sections in the output.
12445 \end_layout
12446
12447 \begin_layout Enumerate
12448 The ijmpc and the ijmpd packages use the 
12449 \family typewriter
12450 tbl
12451 \family default
12452  command to implement table captions.
12453  As a result, a table created by LyX is printed correctly, but its caption
12454  is ignored.
12455  However, you can use some TeX code to overcome this problem, so that captions
12456  are printed as expected.
12457  To do so, create a float table as usual, remove the caption, and replace
12458  it with the TeX code 
12459 \family typewriter
12460
12461 \backslash
12462 tbl{
12463 \emph on
12464 your table caption
12465 \emph default
12466 }{
12467 \family default
12468  (sic); you must also the TeX code 
12469 \family typewriter
12470 }
12471 \family default
12472  immediately after the tabular material.
12473  Study the example table included in the template files to see how this
12474  trick is implemented.
12475  Alternatively, If you need table captions, you should implement the whole
12476  table float in a 
12477 \family typewriter
12478 .tex
12479 \family default
12480  file, then include this file to the LyX document (
12481 \family sans
12482 Insert\SpecialChar \menuseparator
12483 File\SpecialChar \menuseparator
12484 Child
12485 \begin_inset space ~
12486 \end_inset
12487
12488 Document
12489 \family default
12490 ).
12491  Details on how to create a table float can be found in the files 
12492 \family typewriter
12493 ws-ijmpc.tex
12494 \family default
12495  and 
12496 \family typewriter
12497 ws-ijmpd.tex
12498 \family default
12499 , included in the corresponding packages.
12500 \end_layout
12501
12502 \begin_layout Subsection
12503 Preparing a paper for submission
12504 \end_layout
12505
12506 \begin_layout Standard
12507 Before you submit your paper you must export the LyX document as a LaTeX
12508  file (
12509 \family sans
12510 File\SpecialChar \menuseparator
12511 Export\SpecialChar \menuseparator
12512 LaTeX
12513 \family default
12514 )
12515 \begin_inset Foot
12516 status open
12517
12518 \begin_layout Plain Layout
12519 Actually you have the choice between LaTeX (plain) and pdflatex.
12520  If you intend to use pdflatex to prepare the paper, you should use the
12521  pdflatex option so that included graphics are converted to PDF format,
12522  ready for use by pdflatex.
12523 \end_layout
12524
12525 \end_inset
12526
12527 , then make the following changes to the resulting 
12528 \family typewriter
12529 .tex
12530 \family default
12531  file.
12532 \end_layout
12533
12534 \begin_layout Enumerate
12535 Remove the comment lines before the 
12536 \family typewriter
12537
12538 \backslash
12539 documentclass
12540 \family default
12541  command.
12542 \end_layout
12543
12544 \begin_layout Enumerate
12545 Remove everything between (and including) the 
12546 \family typewriter
12547
12548 \backslash
12549 makeatletter
12550 \family default
12551  and 
12552 \family typewriter
12553
12554 \backslash
12555 makeatother
12556 \family default
12557  commands, except for any commands you specifically put into the LaTeX preamble.
12558 \end_layout
12559
12560 \begin_layout Standard
12561 The modified 
12562 \family typewriter
12563 .tex
12564 \family default
12565  file should be saved and processed through LaTeX as many times as necessary.
12566  You may also want to check the resulting 
12567 \family typewriter
12568 .dvi
12569 \family default
12570  document.
12571 \end_layout
12572
12573 \begin_layout Subsection
12574 Use of TeX code
12575 \end_layout
12576
12577 \begin_layout Standard
12578 The use of TeX code is reduced to two commands, which must be placed at
12579  the top of the document.
12580  If you started writing your paper by using the 
12581 \family typewriter
12582 ijmpc.lyx
12583 \family default
12584  or the 
12585 \family typewriter
12586 ijmpd.lyx
12587 \family default
12588  template, the TeX code needed is already in its place; you usually don't
12589  need to delete it.
12590  You may only modify the first TeX code to specify the information printed
12591  to the top of odd and even pages (authors' names and short paper's title,
12592  respectively).
12593  This TeX code must have the form 
12594 \family typewriter
12595
12596 \backslash
12597 markboth{Authors' Names}{Short Paper's Title}
12598 \family default
12599 .
12600 \end_layout
12601
12602 \begin_layout Section
12603 iopart
12604 \end_layout
12605
12606 \begin_layout Standard
12607 by 
12608 \noun on
12609 Uwe Stöhr
12610 \end_layout
12611
12612 \begin_layout Subsection
12613 Overview
12614 \end_layout
12615
12616 \begin_layout Standard
12617 The iopart package provides a document class to create electronic manuscript
12618  submission to the journals published by the Institute of Physics.
12619  Instructions for the authors how to create a paper using the iopart class
12620  can be downloaded together with the iopart package from the site 
12621 \begin_inset Flex URL
12622 status collapsed
12623
12624 \begin_layout Plain Layout
12625
12626 ftp://ftp.iop.org/pub/journals/latex2e
12627 \end_layout
12628
12629 \end_inset
12630
12631 .
12632 \end_layout
12633
12634 \begin_layout Subsection
12635 Writing a paper
12636 \end_layout
12637
12638 \begin_layout Standard
12639 The easiest way to write a paper is to start with the file 
12640 \emph on
12641 IOP-article.lyx
12642 \emph default
12643  that is available in LyX's examples files folder.
12644  Open this file, save it under a new name, and start writing.
12645  The example file explains how to use the special text environments.
12646  Here are the most important advices:
12647 \end_layout
12648
12649 \begin_layout Itemize
12650 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12651  two options 
12652 \family sans
12653 Use AMS math package
12654 \family default
12655  in the document settings under 
12656 \family sans
12657 Math Options
12658 \family default
12659  are not used!
12660 \end_layout
12661
12662 \begin_layout Itemize
12663
12664 \size normal
12665 The title environment defines the kind of your paper.
12666  So use one of the following environments for the title:
12667 \end_layout
12668
12669 \begin_deeper
12670 \begin_layout Itemize
12671
12672 \family sans
12673 \size normal
12674 Title
12675 \family default
12676  for a Paper
12677 \end_layout
12678
12679 \begin_layout Itemize
12680
12681 \family sans
12682 \size normal
12683 Review
12684 \family default
12685  for a Review
12686 \end_layout
12687
12688 \begin_layout Itemize
12689
12690 \family sans
12691 \size normal
12692 Topical
12693 \family default
12694  for a Topical review
12695 \end_layout
12696
12697 \begin_layout Itemize
12698
12699 \family sans
12700 \size normal
12701 Comment
12702 \family default
12703  for a Comment
12704 \end_layout
12705
12706 \begin_layout Itemize
12707
12708 \family sans
12709 \size normal
12710 Note
12711 \family default
12712  for a Note
12713 \end_layout
12714
12715 \begin_layout Itemize
12716
12717 \family sans
12718 \size normal
12719 Paper
12720 \family default
12721  for a Paper (same as Title)
12722 \end_layout
12723
12724 \begin_layout Itemize
12725
12726 \family sans
12727 \size normal
12728 Prelim
12729 \family default
12730  for a Preliminary communication
12731 \end_layout
12732
12733 \begin_layout Itemize
12734
12735 \family sans
12736 \size normal
12737 Rapid
12738 \family default
12739  for a Rapid communication
12740 \end_layout
12741
12742 \begin_layout Itemize
12743
12744 \family sans
12745 \size normal
12746 Letter
12747 \family default
12748  for a Letter to the editor
12749 \end_layout
12750
12751 \end_deeper
12752 \begin_layout Itemize
12753
12754 \size normal
12755 All title environments except of 
12756 \family sans
12757 Letter
12758 \family default
12759  can have an optional short title.
12760 \end_layout
12761
12762 \begin_layout Itemize
12763 There is a general title environment 
12764 \family sans
12765 Article
12766 \family default
12767  which is not directly supported by the LyX.
12768  This can be used as TeX code when your document doesn't fit into one of
12769  the other title types.
12770 \end_layout
12771
12772 \begin_layout Standard
12773 For more informations like hints for special table and formula formatting,
12774  look at the IOP author guidelines.
12775 \end_layout
12776
12777 \begin_layout Section
12778 Kluwer
12779 \end_layout
12780
12781 \begin_layout Standard
12782 by 
12783 \noun on
12784 Panayotis Papasotiriou
12785 \end_layout
12786
12787 \begin_layout Subsection
12788 Overview
12789 \end_layout
12790
12791 \begin_layout Standard
12792 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12793  that facilitates electronic manuscript submission to the journals they
12794  publish.
12795  Most known of them (at least in my domain of interest) are 
12796 \emph on
12797 Astrophysics and Space Science
12798 \emph default
12799  and 
12800 \emph on
12801 Solar Physics
12802 \emph default
12803 , but there are many others (see a complete list at 
12804 \begin_inset Flex URL
12805 status open
12806
12807 \begin_layout Plain Layout
12808
12809 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12810 \end_layout
12811
12812 \end_inset
12813
12814 ).
12815  The Kluwer package may be downloaded from the site 
12816 \begin_inset Flex URL
12817 status collapsed
12818
12819 \begin_layout Plain Layout
12820
12821 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12822 \end_layout
12823
12824 \end_inset
12825
12826 .
12827  A complete user guide is contained in that package (but it can also be
12828  downloaded separately).
12829 \end_layout
12830
12831 \begin_layout Standard
12832 LyX supports many features of the package but not everything.
12833  However, the TeX code needed is reduced to some 
12834 \begin_inset Quotes eld
12835 \end_inset
12836
12837 peculiar
12838 \begin_inset Quotes erd
12839 \end_inset
12840
12841  commands of the package (see
12842 \begin_inset space ~
12843 \end_inset
12844
12845
12846 \begin_inset CommandInset ref
12847 LatexCommand ref
12848 reference "subsec:kluwer_peculiarities"
12849
12850 \end_inset
12851
12852 ).
12853  I have recently used LyX to write an article submitted to the 
12854 \emph on
12855 Astrophysics and Space Science
12856 \emph default
12857  without any problem.
12858 \end_layout
12859
12860 \begin_layout Subsection
12861 Writing a paper
12862 \end_layout
12863
12864 \begin_layout Standard
12865 The easiest way to write a paper is to start with the Kluwer template file.
12866  Click on 
12867 \family sans
12868 File\SpecialChar \menuseparator
12869 New from
12870 \family default
12871  
12872 \family sans
12873 Template
12874 \family default
12875 , then choose the 
12876 \family typewriter
12877 kluwer.lyx
12878 \family default
12879  template.
12880  This will give an (almost) empty document that includes the most common
12881  fields found in a manuscript and a short description of their use.
12882  As in most templates, simply overwrite the existing text (including the
12883  brackets, 
12884 \family typewriter
12885 <>
12886 \family default
12887 ) with the correct information.
12888 \end_layout
12889
12890 \begin_layout Subsection
12891 Preparing a paper for submission
12892 \end_layout
12893
12894 \begin_layout Standard
12895 As in the AASTeX package, before you submit your paper to a journal you
12896  must 
12897 \begin_inset Quotes eld
12898 \end_inset
12899
12900 postprocess
12901 \begin_inset Quotes erd
12902 \end_inset
12903
12904  it as follows.
12905 \end_layout
12906
12907 \begin_layout Enumerate
12908 Export your paper as a LaTeX file.
12909  To do this, click on 
12910 \family sans
12911 File\SpecialChar \menuseparator
12912 Export\SpecialChar \menuseparator
12913 LaTeX
12914 \family default
12915 .
12916  
12917 \end_layout
12918
12919 \begin_layout Enumerate
12920 Edit the resulting 
12921 \family typewriter
12922 .tex
12923 \family default
12924  file with a text editor and make the following changes
12925 \end_layout
12926
12927 \begin_deeper
12928 \begin_layout Enumerate
12929 remove the comment lines before the 
12930 \family typewriter
12931
12932 \backslash
12933 documentclass
12934 \family default
12935  command,
12936 \end_layout
12937
12938 \begin_layout Enumerate
12939 remove everything between (and including) the 
12940 \family typewriter
12941
12942 \backslash
12943 makeatletter
12944 \family default
12945  and 
12946 \family typewriter
12947
12948 \backslash
12949 makeatother
12950 \family default
12951  commands, except for any commands you specifically put into the LaTeX preamble.
12952 \end_layout
12953
12954 \begin_layout Standard
12955 Save the resulting 
12956 \family typewriter
12957 .tex
12958 \family default
12959  file.
12960 \end_layout
12961
12962 \end_deeper
12963 \begin_layout Enumerate
12964 Run the 
12965 \family typewriter
12966 .tex
12967 \family default
12968  file through LaTeX as many times as necessary (usually up to three).
12969 \end_layout
12970
12971 \begin_layout Enumerate
12972 View the resulting 
12973 \family typewriter
12974 .dvi
12975 \family default
12976  document using, e.
12977 \begin_inset space \thinspace{}
12978 \end_inset
12979
12980 g.
12981 \begin_inset space \space{}
12982 \end_inset
12983
12984
12985 \family sans
12986 xdvi
12987 \family default
12988 , and check if everything is OK (it should, if you didn't make any mistake).
12989 \end_layout
12990
12991 \begin_layout Subsection
12992 \begin_inset Quotes eld
12993 \end_inset
12994
12995 Peculiarities
12996 \begin_inset Quotes erd
12997 \end_inset
12998
12999  of the Kluwer package
13000 \begin_inset CommandInset label
13001 LatexCommand label
13002 name "subsec:kluwer_peculiarities"
13003
13004 \end_inset
13005
13006
13007 \end_layout
13008
13009 \begin_layout Standard
13010 The Kluwer package has the following 
13011 \begin_inset Quotes eld
13012 \end_inset
13013
13014 peculiarities
13015 \begin_inset Quotes erd
13016 \end_inset
13017
13018 .
13019 \end_layout
13020
13021 \begin_layout Enumerate
13022 It is possible to write multiple articles in the same LaTeX file
13023 \begin_inset Foot
13024 status collapsed
13025
13026 \begin_layout Plain Layout
13027 I can't imagine any good reason to do this.
13028 \end_layout
13029
13030 \end_inset
13031
13032 .
13033  Each article must be included in the environment 
13034 \begin_inset Quotes eld
13035 \end_inset
13036
13037 article
13038 \begin_inset Quotes erd
13039 \end_inset
13040
13041 .
13042  Unfortunately, this environment cannot be omitted, even if you write just
13043  one article.
13044  Therefore, each article starts with the command 
13045 \family typewriter
13046
13047 \backslash
13048 begin{article}
13049 \family default
13050  and, obviously, ends with the command 
13051 \family typewriter
13052
13053 \backslash
13054 end{article}
13055 \family default
13056 .
13057  Although this can be implemented in LyX, I didn't included it, since it
13058  looks ugly and can confuse the novice user.
13059  Therefore, you need to enter them directly and mark them as LaTeX code
13060  (the well-known 
13061 \begin_inset Quotes eld
13062 \end_inset
13063
13064 TeX code
13065 \begin_inset Quotes erd
13066 \end_inset
13067
13068 ).
13069 \end_layout
13070
13071 \begin_layout Enumerate
13072 Information given at the beginning of the article (i.
13073 \begin_inset space \thinspace{}
13074 \end_inset
13075
13076 e.
13077 \begin_inset space \space{}
13078 \end_inset
13079
13080 title, subtitle, author, institution, running title, running author, abstract
13081  and keywords) must be included in an environment called 
13082 \begin_inset Quotes eld
13083 \end_inset
13084
13085 opening
13086 \begin_inset Quotes erd
13087 \end_inset
13088
13089 .
13090  This is not implemented in LyX, so you must enter title, subtitle etc.
13091 \begin_inset space ~
13092 \end_inset
13093
13094 between two TeX code lines (
13095 \family typewriter
13096
13097 \backslash
13098 begin{opening}
13099 \family default
13100  and 
13101 \family typewriter
13102
13103 \backslash
13104 end{opening}
13105 \family default
13106 ).
13107 \end_layout
13108
13109 \begin_layout Enumerate
13110 According to the user manual, the label of each bibliography item must be
13111  written as 
13112 \family typewriter
13113
13114 \backslash
13115 protect
13116 \backslash
13117 citeauthoryear{
13118 \family default
13119 \emph on
13120 author(s)
13121 \family typewriter
13122 \emph default
13123 }{
13124 \family default
13125 \emph on
13126 year
13127 \family typewriter
13128 \emph default
13129 }
13130 \family default
13131 .
13132 \end_layout
13133
13134 \begin_layout Standard
13135 The 
13136 \family typewriter
13137 kluwer.lyx
13138 \family default
13139  template takes care of all these 
13140 \begin_inset Quotes eld
13141 \end_inset
13142
13143 peculiarities
13144 \begin_inset Quotes erd
13145 \end_inset
13146
13147 .
13148  If you start a new paper using this template you don't need to do anything
13149  special.
13150  Just 
13151 \end_layout
13152
13153 \begin_layout Enumerate
13154 don't delete the TeX code included in the template, and
13155 \end_layout
13156
13157 \begin_layout Enumerate
13158 copy the example bibliography item included in the template and modify it
13159  as necessary to enter new bibliography items.
13160 \end_layout
13161
13162 \begin_layout Section
13163 Koma-Script
13164 \end_layout
13165
13166 \begin_layout Standard
13167 by 
13168 \noun on
13169 Bernd Rellermeyer
13170 \end_layout
13171
13172 \begin_layout Subsection
13173 Overview
13174 \end_layout
13175
13176 \begin_layout Standard
13177 The LyX document classes 
13178 \emph on
13179 article (koma-script)
13180 \emph default
13181
13182 \emph on
13183 report (koma-script)
13184 \emph default
13185
13186 \emph on
13187 book
13188 \emph default
13189  
13190 \emph on
13191 (koma-script)
13192 \emph default
13193 , and 
13194 \emph on
13195 letter
13196 \emph default
13197  
13198 \emph on
13199 (koma-script)
13200 \emph default
13201  correspond to the LaTeX document classes 
13202 \family typewriter
13203 scrartcl.cls
13204 \family default
13205
13206 \family typewriter
13207 scrreprt.cls
13208 \family default
13209
13210 \family typewriter
13211 scrbook.cls
13212 \family default
13213 , and 
13214 \family typewriter
13215 scrlettr.cls
13216 \family default
13217 , resp.
13218 \begin_inset space ~
13219 \end_inset
13220
13221 of the Koma-Script family.
13222  They are replacements for the standard document classes 
13223 \family typewriter
13224 article.cls
13225 \family default
13226
13227 \family typewriter
13228 report.cls
13229 \family default
13230
13231 \family typewriter
13232 book.cls
13233 \family default
13234  and 
13235 \family typewriter
13236 letter.cls
13237 \family default
13238 , resp., and fit better to European typography conventions in a number of
13239  points.
13240 \end_layout
13241
13242 \begin_layout Itemize
13243 Standard character size is 11pt in 
13244 \emph on
13245 article (koma-script)
13246 \emph default
13247
13248 \emph on
13249 report (koma-script)
13250 \emph default
13251 , and 
13252 \emph on
13253 book (koma-script)
13254 \emph default
13255 , and 12pt in 
13256 \emph on
13257 letter (koma-script)
13258 \emph default
13259 .
13260 \end_layout
13261
13262 \begin_layout Itemize
13263 Headings, labels of the description environment, and a number of elements
13264  of the 
13265 \emph on
13266 letter (koma-script)
13267 \emph default
13268  document class are set in a bold sans serif font.
13269 \begin_inset Foot
13270 status collapsed
13271
13272 \begin_layout Plain Layout
13273 There is a big difference between the bold sans serif old cm fonts and new
13274  ec fonts, especially in the appearance of headings.
13275  In comparison, the ec bold sans serif fonts look a bit thin.
13276  Here the LaTeX package 
13277 \family typewriter
13278 cmsd.sty by
13279 \family default
13280  
13281 \shape smallcaps
13282 Walter Schmidt
13283 \shape default
13284  helps to produce the 
13285 \begin_inset Quotes eld
13286 \end_inset
13287
13288 usual
13289 \begin_inset Quotes erd
13290 \end_inset
13291
13292  appearance when using the ec fonts.
13293 \end_layout
13294
13295 \end_inset
13296
13297  The numbering of chapter headings is made in the same way as the numbering
13298  of section headings, that is without the extra line 
13299 \begin_inset Quotes eld
13300 \end_inset
13301
13302 Chapter\SpecialChar \ldots{}
13303
13304 \begin_inset Quotes erd
13305 \end_inset
13306
13307 .
13308  In addition, the appearance of the headings can be modified by using a
13309  number of options (in LyX to be entered in the field 
13310 \family sans
13311 Extra
13312 \begin_inset space ~
13313 \end_inset
13314
13315 Options
13316 \family default
13317  of the dialog 
13318 \family sans
13319 Layout\SpecialChar \menuseparator
13320 Document
13321 \family default
13322 ).
13323  
13324 \end_layout
13325
13326 \begin_layout Itemize
13327 The main means in the Koma-Script document classes to design the type area
13328  are the options 
13329 \family sans
13330 BCOR
13331 \family default
13332  and 
13333 \family sans
13334 DIV
13335 \family default
13336  (in LyX to be entered in the extra class options field in the dialog 
13337 \family sans
13338 Document\SpecialChar \menuseparator
13339 Settings
13340 \family default
13341 ).
13342  They make a clearer modification of page margins possible as do the options
13343  of the dialog 
13344 \family sans
13345 Document\SpecialChar \menuseparator
13346 Settings
13347 \family default
13348 .
13349  
13350 \end_layout
13351
13352 \begin_layout Itemize
13353 The LaTeX document classes of the Koma-Script family define a number of
13354  additional commands.
13355  Those part of it which makes sense in LyX is implemented in corresponding
13356  paragraph types.
13357 \end_layout
13358
13359 \begin_layout Standard
13360 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13361  can be found in the Koma-Script documentation 
13362 \emph on
13363 scrguide
13364 \emph default
13365  (German) and 
13366 \emph on
13367 scrguien
13368 \emph default
13369  (English).
13370 \end_layout
13371
13372 \begin_layout Subsection
13373 article (koma-script), report (koma-script), and book (koma-script)
13374 \end_layout
13375
13376 \begin_layout Standard
13377 The document classes 
13378 \emph on
13379 article (koma-script)
13380 \emph default
13381
13382 \emph on
13383 report (koma-script)
13384 \emph default
13385 , and 
13386 \emph on
13387 book
13388 \emph default
13389  
13390 \emph on
13391 (koma-script)
13392 \emph default
13393  are implemented in the layout files 
13394 \family typewriter
13395 scrartcl.layout
13396 \family default
13397
13398 \family typewriter
13399 scrreprt.layout
13400 \family default
13401 , and 
13402 \family typewriter
13403 scrbook.layout
13404 \family default
13405 , resp.
13406  They contain all the paragraph types of the corresponding standard document
13407  classes 
13408 \emph on
13409 article
13410 \emph default
13411
13412 \emph on
13413 report
13414 \emph default
13415 , and 
13416 \emph on
13417 book
13418 \emph default
13419 , resp., partly modified, with the exception of the LyX specific 
13420 \family sans
13421 List
13422 \family default
13423 -type, which is replaced by the new 
13424 \family sans
13425 Labeling
13426 \family default
13427 -type having the same functionality.
13428  Beside the 
13429 \family sans
13430 Labeling
13431 \family default
13432 -Type there is a number of new paragraph types added.
13433  They are 
13434 \emph on
13435 not
13436 \emph default
13437  part of 
13438 \emph on
13439 letter (koma-script)
13440 \emph default
13441 .
13442 \end_layout
13443
13444 \begin_layout Itemize
13445
13446 \family sans
13447 Addpart, Addchap
13448 \family default
13449
13450 \family sans
13451 Addsec
13452 \family default
13453 : are equivalents to 
13454 \family sans
13455 Part*, Chapter*
13456 \family default
13457  and 
13458 \family sans
13459 Section*
13460 \family default
13461 , resp., additionally inserting an entry in the table of contents.
13462  
13463 \family sans
13464 Addpart
13465 \family default
13466  and 
13467 \family sans
13468 Addchap
13469 \family default
13470  are not contained in 
13471 \emph on
13472 article (koma-script)
13473 \emph default
13474 .
13475 \end_layout
13476
13477 \begin_layout Itemize
13478
13479 \family sans
13480 Addchap*
13481 \family default
13482
13483 \family sans
13484 Addsec*
13485 \family default
13486 : behave exactly as 
13487 \family sans
13488 Addchap
13489 \family default
13490  and 
13491 \family sans
13492 Addsec
13493 \family default
13494 , resp., additionally clearing running heads.
13495  
13496 \family sans
13497 Addchap*
13498 \family default
13499  is not contained in 
13500 \emph on
13501 article (koma-script)
13502 \emph default
13503 .
13504 \begin_inset Foot
13505 status collapsed
13506
13507 \begin_layout Plain Layout
13508 There is also an 
13509 \family typewriter
13510
13511 \backslash
13512 addpart*
13513 \family default
13514  command in 
13515 \emph on
13516 book (koma-script)
13517 \emph default
13518  and in 
13519 \emph on
13520 report (koma-script)
13521 \emph default
13522 , but since this is identical to 
13523 \family sans
13524 Part*
13525 \family default
13526 , is has not been implemented in LyX.
13527 \end_layout
13528
13529 \end_inset
13530
13531
13532 \end_layout
13533
13534 \begin_layout Itemize
13535
13536 \family sans
13537 Minisec
13538 \family default
13539 : generates a heading directly above the following paragraph in the standard
13540  character size without affecting the structure of the document.
13541 \end_layout
13542
13543 \begin_layout Itemize
13544
13545 \family sans
13546 Captionabove
13547 \family default
13548  and 
13549 \family sans
13550 Captionbelow
13551 \family default
13552  are special captions which respect the different space settings needed
13553  for captions placed above or below an element (if you follow strict typographic
13554  rules, you might want to place table captions always above the table).
13555  You can also use the class option 
13556 \family typewriter
13557 tablecaptionsabove
13558 \family default
13559 , which will switch 
13560 \family sans
13561 caption
13562 \family default
13563  to 
13564 \family sans
13565 captionabove
13566 \family default
13567  for tables and 
13568 \family sans
13569 captionbelow
13570 \family default
13571  for figures.
13572  You need at least Koma-Script version 2.8q to use this.
13573 \end_layout
13574
13575 \begin_layout Itemize
13576
13577 \family sans
13578 Dictum
13579 \family default
13580 : can be used to set a bonmot, e.
13581 \begin_inset space \thinspace{}
13582 \end_inset
13583
13584 g.
13585 \begin_inset space \space{}
13586 \end_inset
13587
13588 at the beginning of a chapter.
13589  If you use the optional argument (
13590 \family sans
13591 Insert\SpecialChar \menuseparator
13592 Short
13593 \begin_inset space ~
13594 \end_inset
13595
13596 Title
13597 \family default
13598 ), you can insert the dictum's author there.
13599  Dictum and author are separated by a line.
13600  You need at least Koma-Script version 2.8q to use this.
13601  
13602 \family sans
13603 Dictum
13604 \family default
13605  is not contained in 
13606 \emph on
13607 article (koma-script)
13608 \emph default
13609 .
13610 \end_layout
13611
13612 \begin_layout Standard
13613 The following types, together with the standard types 
13614 \family sans
13615 Title
13616 \family default
13617
13618 \family sans
13619 Author
13620 \family default
13621 , and 
13622 \family sans
13623 Date
13624 \family default
13625 , form the title area of the document.
13626  They must be entered ahead of the first 
13627 \begin_inset Quotes eld
13628 \end_inset
13629
13630 ordinary
13631 \begin_inset Quotes erd
13632 \end_inset
13633
13634  paragraph.
13635 \begin_inset Foot
13636 status collapsed
13637
13638 \begin_layout Plain Layout
13639 The corresponding LaTeX commands must appear before the 
13640 \family typewriter
13641
13642 \backslash
13643 maketitle
13644 \family default
13645  command.
13646 \end_layout
13647
13648 \end_inset
13649
13650  When such a type is used more than once, the latter usage overwrites the
13651  former one, that means, for every type only the latest usage is valid.
13652  The order of the different types however has, like 
13653 \family sans
13654 Title
13655 \family default
13656
13657 \family sans
13658 Author
13659 \family default
13660 , and 
13661 \family sans
13662 Date
13663 \family default
13664 , no effect on the appearance of the produced document.
13665 \end_layout
13666
13667 \begin_layout Itemize
13668
13669 \family sans
13670 Subject
13671 \family default
13672 : produces a centered paragraph above the ordinary title (
13673 \family sans
13674 Title
13675 \family default
13676
13677 \family sans
13678 Author
13679 \family default
13680
13681 \family sans
13682 Date
13683 \family default
13684 ) for the subject of the document.
13685 \end_layout
13686
13687 \begin_layout Itemize
13688
13689 \family sans
13690 Publishers
13691 \family default
13692 : produces a centered paragraph below the ordinary title (
13693 \family sans
13694 Title
13695 \family default
13696
13697 \family sans
13698 Author
13699 \family default
13700
13701 \family sans
13702 Date
13703 \family default
13704 ) for the publishers' name.
13705 \end_layout
13706
13707 \begin_layout Itemize
13708
13709 \family sans
13710 Dedication
13711 \family default
13712 : in 
13713 \emph on
13714 report (koma-script)
13715 \emph default
13716  and 
13717 \emph on
13718 book (koma-script)
13719 \emph default
13720  produces a centered paragraph on its own page behind the title page, or
13721  in 
13722 \emph on
13723 article (koma-script)
13724 \emph default
13725  produces a centered paragraph below the ordinary title (
13726 \family sans
13727 Title
13728 \family default
13729
13730 \family sans
13731 Author
13732 \family default
13733
13734 \family sans
13735 Date
13736 \family default
13737
13738 \family sans
13739 Publishers
13740 \family default
13741 ) for a dedication.
13742 \end_layout
13743
13744 \begin_layout Itemize
13745
13746 \family sans
13747 Titlehead
13748 \family default
13749 : produces a left aligned paragraph above the ordinary title (
13750 \family sans
13751 Title
13752 \family default
13753
13754 \family sans
13755 Author
13756 \family default
13757
13758 \family sans
13759 Date
13760 \family default
13761
13762 \family sans
13763 Subject
13764 \family default
13765 ) for a document`s head.
13766 \end_layout
13767
13768 \begin_layout Itemize
13769
13770 \family sans
13771 Uppertitleback
13772 \family default
13773 : produces in a double-sided print in 
13774 \emph on
13775 report (koma-script)
13776 \emph default
13777  and 
13778 \emph on
13779 book (koma-script)
13780 \emph default
13781  a left-aligned paragraph at the top of the title page`s back or has no
13782  effect in a single-sided print or in 
13783 \emph on
13784 article (koma-script)
13785 \emph default
13786 .
13787 \end_layout
13788
13789 \begin_layout Itemize
13790
13791 \family sans
13792 Lowertitleback
13793 \family default
13794 : produces in a double-sided print in 
13795 \emph on
13796 report (koma-script)
13797 \emph default
13798  and 
13799 \emph on
13800 book (koma-script)
13801 \emph default
13802  a left-aligned paragraph at the bottom of the title page`s back or has
13803  no effect in a single-sided print or in 
13804 \emph on
13805 article (koma-script)
13806 \emph default
13807 .
13808 \end_layout
13809
13810 \begin_layout Itemize
13811
13812 \family sans
13813 Extratitle
13814 \family default
13815 : produces a special 
13816 \begin_inset Quotes eld
13817 \end_inset
13818
13819 dirty
13820 \begin_inset Quotes erd
13821 \end_inset
13822
13823  page ahead of the actual document containing a paragraph without special
13824  formatting.
13825 \end_layout
13826
13827 \begin_layout Standard
13828 The layout files for the document classes 
13829 \emph on
13830 article (koma-script)
13831 \emph default
13832
13833 \emph on
13834 report (koma-script)
13835 \emph default
13836 , and 
13837 \emph on
13838 book (koma-script)
13839 \emph default
13840  do include the file 
13841 \family typewriter
13842 scrmacros.inc
13843 \family default
13844 .
13845  This is thought of as a place to define your own types.
13846  Copy scrmacros
13847 \family typewriter
13848 .inc
13849 \family default
13850  in your personal layout directory and edit the file!
13851 \end_layout
13852
13853 \begin_layout Subsection
13854 letter (koma-script)
13855 \end_layout
13856
13857 \begin_layout Standard
13858 \noindent
13859 The document class 
13860 \emph on
13861 letter (koma-script)
13862 \emph default
13863  is implemented in the layout file 
13864 \family typewriter
13865 scrlettr.layout
13866 \family default
13867 .
13868  It contains all the paragraph types of the corresponding standard document
13869  class 
13870 \emph on
13871 letter
13872 \emph default
13873 , partly modified, with the exception of the LyX specific types 
13874 \family sans
13875 LyX-Code
13876 \family default
13877  and 
13878 \family sans
13879 Comment
13880 \family default
13881  and the 
13882 \family sans
13883 List
13884 \family default
13885  type, which is replaced by the new 
13886 \family sans
13887 Labeling
13888 \family default
13889  type.
13890  In addition, it contains, in contrast to the standard document class, the
13891  standard types 
13892 \family sans
13893 LaTeX
13894 \family default
13895
13896 \family sans
13897 Quotation
13898 \family default
13899
13900 \family sans
13901 Quote
13902 \family default
13903 , and 
13904 \family sans
13905 Verse
13906 \family default
13907 .
13908  Furthermore, there are a number of new letter specific types.
13909 \end_layout
13910
13911 \begin_layout Standard
13912 The appearance of the letter produced by this document class can be controlled
13913  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13914 \begin_inset Foot
13915 status collapsed
13916
13917 \begin_layout Plain Layout
13918 For example, the standard appearance of the letter`s heading, consisting
13919  of name and address, is quite self-willed.
13920  An 
13921 \begin_inset Quotes eld
13922 \end_inset
13923
13924 ordinary
13925 \begin_inset Quotes erd
13926 \end_inset
13927
13928  heading is produced by the following LaTeX commands in the preamble:
13929 \end_layout
13930
13931 \begin_layout LyX-Code
13932
13933 \backslash
13934 firsthead{
13935 \backslash
13936 parbox[b]{
13937 \backslash
13938 textwidth}
13939 \end_layout
13940
13941 \begin_layout LyX-Code
13942   {
13943 \backslash
13944 ignorespaces 
13945 \backslash
13946 fromname
13947 \backslash
13948
13949 \backslash
13950  
13951 \backslash
13952 ignorespaces 
13953 \backslash
13954 fromaddress}} 
13955 \end_layout
13956
13957 \begin_layout LyX-Code
13958
13959 \backslash
13960 nexthead{
13961 \backslash
13962 parbox[b]{
13963 \backslash
13964 textwidth}
13965 \end_layout
13966
13967 \begin_layout LyX-Code
13968   {
13969 \backslash
13970 ignorespaces 
13971 \backslash
13972 fromname 
13973 \backslash
13974 hfill 
13975 \backslash
13976 ignorespaces 
13977 \backslash
13978 pagename
13979 \backslash
13980  
13981 \backslash
13982 thepage}}
13983 \end_layout
13984
13985 \end_inset
13986
13987  A detailed German description of such LaTeX commands can be found in the
13988  Koma-Script documentation 
13989 \emph on
13990 scrguide
13991 \emph default
13992 .
13993  With it, the letter's author can produce his personal letter layout.
13994 \end_layout
13995
13996 \begin_layout Standard
13997 The types 
13998 \family sans
13999 Letter
14000 \family default
14001  and 
14002 \family sans
14003 Opening
14004 \family default
14005  define the beginning of the letter and must be used in every letter.
14006  To emphasize them in the LyX document class, they are marked with the letter
14007  
14008 \shape italic
14009 L
14010 \shape default
14011  or 
14012 \shape italic
14013 O
14014 \shape default
14015 , resp.
14016 \begin_inset space ~
14017 \end_inset
14018
14019 in the left margin.
14020  It is possible to write any number of letters in one file.
14021  An 
14022 \family sans
14023 Opening
14024 \family default
14025  type produces a new letter using the same addressee and a 
14026 \family sans
14027 Letter
14028 \family default
14029  type produces a new addressee.
14030  The types 
14031 \family sans
14032 Closing
14033 \family default
14034
14035 \family sans
14036 PS
14037 \family default
14038
14039 \family sans
14040 CC
14041 \family default
14042 , and 
14043 \family sans
14044 Encl
14045 \family default
14046  are ordinary paragraph types and can also be used several times in one
14047  and the same letter.
14048 \end_layout
14049
14050 \begin_layout Itemize
14051
14052 \family sans
14053 Letter
14054 \family default
14055 : produces a paragraph for the addressee and implicitly defines the beginning
14056  of the letter.
14057 \end_layout
14058
14059 \begin_layout Itemize
14060
14061 \family sans
14062 Opening
14063 \family default
14064 : produces a paragraph for the form of address and implicitly produces a
14065  new letter.
14066 \end_layout
14067
14068 \begin_layout Itemize
14069
14070 \family sans
14071 Closing
14072 \family default
14073 : produces a paragraph for a close.
14074 \end_layout
14075
14076 \begin_layout Itemize
14077
14078 \family sans
14079 PS
14080 \family default
14081 : produces a paragraph for a postscript.
14082 \end_layout
14083
14084 \begin_layout Itemize
14085
14086 \family sans
14087 CC
14088 \family default
14089 : produces a paragraph for a distribution list.
14090 \end_layout
14091
14092 \begin_layout Itemize
14093
14094 \family sans
14095 Encl
14096 \family default
14097 : produces a paragraph for enclosures.
14098 \end_layout
14099
14100 \begin_layout Standard
14101 The types 
14102 \family sans
14103 Name
14104 \family default
14105
14106 \family sans
14107 Signature
14108 \family default
14109
14110 \family sans
14111 Address
14112 \family default
14113
14114 \family sans
14115 Telephone
14116 \family default
14117
14118 \family sans
14119 Place
14120 \family default
14121
14122 \family sans
14123 Backaddress
14124 \family default
14125
14126 \family sans
14127 Specialmail
14128 \family default
14129
14130 \family sans
14131 Location
14132 \family default
14133
14134 \family sans
14135 Title
14136 \family default
14137 , and 
14138 \family sans
14139 Subject
14140 \family default
14141  are input types provided with a label to enter information, which will
14142  be processed by the document class.
14143 \begin_inset Foot
14144 status open
14145
14146 \begin_layout Plain Layout
14147 It could be seen as a matter of inconsequence, that the types 
14148 \family sans
14149 Letter
14150 \family default
14151  and 
14152 \family sans
14153 Opening
14154 \family default
14155  described above are not such input types as well.
14156  Because of the special meaning of those types, however, I have implemented
14157  them as ordinary paragraph types with a one letter mark in the left margin.
14158  Moreover, it would affect my feeling of symmetry, if the 
14159 \family sans
14160 Opening
14161 \family default
14162  type and the 
14163 \family sans
14164 Closing
14165 \family default
14166  type had such a serious different appearance.
14167 \end_layout
14168
14169 \end_inset
14170
14171  The types must be used ahead of the corresponding 
14172 \family sans
14173 Opening
14174 \family default
14175  type.
14176 \end_layout
14177
14178 \begin_layout Standard
14179 An implementation of these types in a WYSIWYG fashion does not seem to make
14180  sense, because the real appearance of the produced letter does not only
14181  depend on the usage of the particular type, but also on other factors.
14182  For example, a signature entered in the 
14183 \family sans
14184 Signature
14185 \family default
14186  type will in the standard behavior appear in the produced letter only,
14187  when in the same letter also a 
14188 \family sans
14189 Closing
14190 \family default
14191  type is used.
14192  The entered value of the 
14193 \family sans
14194 Telephone
14195 \family default
14196  type will in the standard behavior not appear in the produced letter at
14197  all.
14198  The possibility to design the letter`s heading freely is already indicated
14199  in a footnote above.
14200 \end_layout
14201
14202 \begin_layout Standard
14203 The input types can also be used as empty paragraphs.
14204  This makes sense e.
14205 \begin_inset space \thinspace{}
14206 \end_inset
14207
14208 g.
14209 \begin_inset space \space{}
14210 \end_inset
14211
14212 for the 
14213 \family sans
14214 Signature
14215 \family default
14216  type.
14217  If the 
14218 \family sans
14219 Signature
14220 \family default
14221  type is not used at all, in the standard behavior the value of the 
14222 \family sans
14223 Name
14224 \family default
14225  type is used as signature, whereas if an empty 
14226 \family sans
14227 Signature
14228 \family default
14229  type is used, no signature value is defined.
14230 \end_layout
14231
14232 \begin_layout Standard
14233 By using the input types it is possible to write a letter template, containing
14234  filled input types with your personal dates (name, address, etc.) and empty
14235  input types for other dates you want to enter.
14236 \end_layout
14237
14238 \begin_layout Itemize
14239
14240 \family sans
14241 Name
14242 \family default
14243 : sender's name, in the standard behavior appears as a centered paragraph
14244  in small caps in the letter`s heading.
14245 \end_layout
14246
14247 \begin_layout Itemize
14248
14249 \family sans
14250 Signature
14251 \family default
14252 : sender's signature, in the standard behavior appears below the 
14253 \family sans
14254 Closing
14255 \family default
14256  type.
14257  If no 
14258 \family sans
14259 Signature
14260 \family default
14261  type is used, the value of the 
14262 \family sans
14263 Name
14264 \family default
14265  type appears instead.
14266 \end_layout
14267
14268 \begin_layout Itemize
14269
14270 \family sans
14271 Address
14272 \family default
14273 : sender's address, in the standard behavior appears in a centered paragraph
14274  in the letter`s heading below the sender's name.
14275 \end_layout
14276
14277 \begin_layout Itemize
14278
14279 \family sans
14280 Telephone
14281 \family default
14282 : sender's telephone number, in the standard behavior only sets the LaTeX
14283  variable 
14284 \family typewriter
14285
14286 \backslash
14287 telephonenum
14288 \family default
14289 .
14290 \end_layout
14291
14292 \begin_layout Itemize
14293
14294 \family sans
14295 Place
14296 \family default
14297 : place of the letter`s making.
14298 \end_layout
14299
14300 \begin_layout Itemize
14301
14302 \family sans
14303 Date
14304 \family default
14305 : date of the letter`s making.
14306  
14307 \family sans
14308 Place
14309 \family default
14310  and 
14311 \family sans
14312 Date
14313 \family default
14314 , in the standard behavior, produce the place and the date in a right-aligned
14315  line below the addressee's field.
14316  If an empty 
14317 \family sans
14318 Date
14319 \family default
14320  type is used, neither place nor date appear, independent of the value of
14321  the 
14322 \family sans
14323 Place
14324 \family default
14325  type.
14326  If no 
14327 \family sans
14328 Date
14329 \family default
14330  type is used, the date of the letter `s production is used.
14331 \end_layout
14332
14333 \begin_layout Itemize
14334
14335 \family sans
14336 Backaddress
14337 \family default
14338 : sender`s back address, in the standard behavior appears above the addressee's
14339  field in a small sans serif font.
14340 \end_layout
14341
14342 \begin_layout Itemize
14343
14344 \family sans
14345 Specialmail
14346 \family default
14347 : special mail information, in the standard behavior appears underlined
14348  above the addressee's field below the back address.
14349 \end_layout
14350
14351 \begin_layout Itemize
14352
14353 \family sans
14354 Location
14355 \family default
14356 : additional information, in the standard behavior appears on right side
14357  below the addressee`s field.
14358 \end_layout
14359
14360 \begin_layout Itemize
14361
14362 \family sans
14363 Title
14364 \family default
14365 : the letter's title, in the standard behavior appears in a big, bold, sans
14366  serif font above the subject.
14367 \end_layout
14368
14369 \begin_layout Itemize
14370
14371 \family sans
14372 Subject
14373 \family default
14374 : the letter's subject, in the standard behavior appears in a bold font
14375  above the 
14376 \family sans
14377 Opening
14378 \family default
14379  paragraph.
14380 \end_layout
14381
14382 \begin_layout Standard
14383 The types 
14384 \family sans
14385 Yourref
14386 \family default
14387
14388 \family sans
14389 Yourmail
14390 \family default
14391
14392 \family sans
14393 Myref
14394 \family default
14395
14396 \family sans
14397 Customer
14398 \family default
14399 , and 
14400 \family sans
14401 Invoice
14402 \family default
14403  produce a business letter like line above the 
14404 \family sans
14405 Title
14406 \family default
14407  line containing the fields 
14408 \begin_inset Quotes eld
14409 \end_inset
14410
14411 Your ref.
14412 \begin_inset Quotes erd
14413 \end_inset
14414
14415
14416 \begin_inset Quotes eld
14417 \end_inset
14418
14419 Your letter of
14420 \begin_inset Quotes erd
14421 \end_inset
14422
14423
14424 \begin_inset Quotes eld
14425 \end_inset
14426
14427 Our ref.
14428 \begin_inset Quotes erd
14429 \end_inset
14430
14431
14432 \begin_inset Quotes eld
14433 \end_inset
14434
14435 Customer no.
14436 \begin_inset Quotes erd
14437 \end_inset
14438
14439
14440 \begin_inset Quotes eld
14441 \end_inset
14442
14443 Invoice no.
14444 \begin_inset Quotes erd
14445 \end_inset
14446
14447 , and 
14448 \begin_inset Quotes eld
14449 \end_inset
14450
14451 Date
14452 \begin_inset Quotes erd
14453 \end_inset
14454
14455 .
14456  For the date field, the value of the 
14457 \family sans
14458 Date
14459 \family default
14460  type is used.
14461  If one of these 
14462 \begin_inset Quotes eld
14463 \end_inset
14464
14465 business letter types
14466 \begin_inset Quotes erd
14467 \end_inset
14468
14469  is used, the value of the 
14470 \family sans
14471 Place
14472 \family default
14473  type however does not appear, but only the LaTeX variable 
14474 \family typewriter
14475
14476 \backslash
14477 fromplace
14478 \family default
14479  is set.
14480  The ordinary output of place and date in a right-aligned line below the
14481  addressee`s field is suppressed.
14482  The types are implemented as input types provided with a label and must
14483  be used ahead of the corresponding 
14484 \family sans
14485 Opening
14486 \family default
14487  type.
14488 \end_layout
14489
14490 \begin_layout Itemize
14491
14492 \family sans
14493 Yourref
14494 \family default
14495 : Your ref.
14496 \end_layout
14497
14498 \begin_layout Itemize
14499
14500 \family sans
14501 Yourmail
14502 \family default
14503 : Your letter of.
14504 \end_layout
14505
14506 \begin_layout Itemize
14507
14508 \family sans
14509 Myref
14510 \family default
14511 : Our ref.
14512 \end_layout
14513
14514 \begin_layout Itemize
14515
14516 \family sans
14517 Customer
14518 \family default
14519 : Customer no.
14520 \end_layout
14521
14522 \begin_layout Itemize
14523
14524 \family sans
14525 Invoice
14526 \family default
14527 : Invoice no.
14528 \end_layout
14529
14530 \begin_layout Subsection
14531 The new letter class: letter (koma-script v.2)
14532 \end_layout
14533
14534 \begin_layout Standard
14535 by 
14536 \noun on
14537 Jürgen Spitzmüller
14538 \end_layout
14539
14540 \begin_layout Standard
14541 \begin_inset VSpace medskip
14542 \end_inset
14543
14544
14545 \end_layout
14546
14547 \begin_layout Standard
14548 \noindent
14549 Koma-Script version 2.8 has introduced a new letter class 
14550 \family typewriter
14551 scrlttr2
14552 \family default
14553  which supersedes the now unsupported 
14554 \family typewriter
14555 scrlettr
14556 \family default
14557 .
14558  It has — on the LaTeX side — a completely new interface and is not compatible
14559  with the old class.
14560  Therefore, LyX supports both, though it is recommended you use the new
14561  class.
14562 \end_layout
14563
14564 \begin_layout Standard
14565 This class covers the same functionality as 
14566 \emph on
14567 letter (koma-script),
14568 \emph default
14569  and a few more.
14570  The basic items are 
14571 \family sans
14572 Address
14573 \family default
14574  (receiver's address, same as 
14575 \family sans
14576 Letter
14577 \family default
14578  in the old layout), 
14579 \family sans
14580 Opening
14581 \family default
14582 , and 
14583 \family sans
14584 Closing
14585 \family default
14586 .
14587  
14588 \family sans
14589 NextAddress
14590 \family default
14591  will start a new letter (i.
14592 \begin_inset space \thinspace{}
14593 \end_inset
14594
14595 e.
14596 \begin_inset space \space{}
14597 \end_inset
14598
14599 you can write several letters per document).
14600  New elements are sender's 
14601 \family sans
14602 E-Mail
14603 \family default
14604
14605 \family sans
14606 URL
14607 \family default
14608
14609 \family sans
14610 Fax
14611 \family default
14612
14613 \family sans
14614 Bank
14615 \family default
14616  and the possibility to use a 
14617 \family sans
14618 Logo
14619 \family default
14620  (via 
14621 \family sans
14622 Insert\SpecialChar \menuseparator
14623 Graphics
14624 \family default
14625 ) in the header.
14626 \end_layout
14627
14628 \begin_layout Standard
14629 The biggest improvement is, though, that the letter's layout is configurable
14630  to meet almost any needs.
14631  This can be done via the preamble or with a special style file (Letter
14632  Class Option, extension 
14633 \family typewriter
14634 *.lco
14635 \family default
14636 ), that will be read in as a class option.
14637 \begin_inset Foot
14638 status collapsed
14639
14640 \begin_layout Plain Layout
14641 The KOMA package comes with some default 
14642 \family typewriter
14643 *.lco
14644 \family default
14645  files.
14646  There is, for instance, a 
14647 \family typewriter
14648 DIN.lco
14649 \family default
14650  file that follows german typesetting rules, or a 
14651 \family typewriter
14652 KOMAold.lco
14653 \family default
14654  that provides the default layout of the old 
14655 \family typewriter
14656 scrlettr
14657 \family default
14658  class.
14659  The latter can be loaded with the class option 
14660 \family typewriter
14661 KOMAold
14662 \family default
14663 , inserted via the 
14664 \family sans
14665 \bar under
14666 L
14667 \bar default
14668 ayout\SpecialChar \menuseparator
14669
14670 \bar under
14671 D
14672 \bar default
14673 ocument\SpecialChar \menuseparator
14674 Extra Options
14675 \family default
14676  field.
14677 \end_layout
14678
14679 \end_inset
14680
14681  Have a look at the 
14682 \emph on
14683 koma-letter2
14684 \emph default
14685  template that is included in LyX for examples.
14686  A detailed description is to be found in the Koma-Script documentation
14687  (
14688 \emph on
14689 scrguide
14690 \emph default
14691 ).
14692 \end_layout
14693
14694 \begin_layout Subsection
14695 Problems
14696 \end_layout
14697
14698 \begin_layout Standard
14699 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14700  some problems.
14701 \end_layout
14702
14703 \begin_layout Itemize
14704 The chapter number of a 
14705 \family sans
14706 Chapter
14707 \family default
14708  type appears on a line of its own above the chapter heading instead of
14709  appearing in the same line ahead of it.
14710  The cause for that is the LyX internal behavior for the labeltype 
14711 \family sans
14712 Counter_Chapter
14713 \family default
14714  in the layout file.
14715 \end_layout
14716
14717 \begin_layout Itemize
14718 The headings of the types 
14719 \family sans
14720 Addchap
14721 \family default
14722  and 
14723 \family sans
14724 Addsec
14725 \family default
14726  are only put in the 
14727 \begin_inset Quotes eld
14728 \end_inset
14729
14730 true
14731 \begin_inset Quotes erd
14732 \end_inset
14733
14734  LaTeX table of contents, but not in the LyX table of contents (
14735 \family sans
14736 Document\SpecialChar \menuseparator
14737 Table
14738 \begin_inset space ~
14739 \end_inset
14740
14741 of
14742 \begin_inset space ~
14743 \end_inset
14744
14745 Contents
14746 \family default
14747 ).
14748 \end_layout
14749
14750 \begin_layout Itemize
14751 The paragraphs in a 
14752 \emph on
14753 letter
14754 \emph default
14755  document class appear in a skip separation mode, not indented.
14756  This is the standard behavior, no special LaTeX commands are needed for
14757  that.
14758  But in the 
14759 \family sans
14760 Document\SpecialChar \menuseparator
14761 Settings
14762 \family default
14763  dialog the corresponding radio button indicates 
14764 \family sans
14765 Indent
14766 \family default
14767 .
14768  A 
14769 \family sans
14770 Skip
14771 \family default
14772  value always has the effect that extra LaTeX commands are inserted in the
14773  document to produce the gap, which is not what is wanted in this case.
14774 \end_layout
14775
14776 \begin_layout Section
14777 Memoir
14778 \end_layout
14779
14780 \begin_layout Standard
14781 By 
14782 \noun on
14783 Jürgen Spitzmüller
14784 \end_layout
14785
14786 \begin_layout Subsection
14787 Overview
14788 \end_layout
14789
14790 \begin_layout Standard
14791 Memoir is a very powerful and constantly evolving class.
14792  It has been designed with regard to fictional and non-fictional literature.
14793  Its aim is to let the user have maximum control over the typesetting of
14794  his document.
14795  Memoir is based on the standard book class, but it can also emulate the
14796  article class (see below).
14797 \end_layout
14798
14799 \begin_layout Standard
14800 Peter Wilson, the developer of Memoir, is known as the author of lots of
14801  useful packages in the LaTeX world.
14802  Most of them have been merged with Memoir.
14803  Therefore, it is much easier to layout the table of contents, appendices,
14804  chapter designs and such.
14805  LyX, though, does not support all of these goodies natively.
14806  Some of them might be added to forthcoming releases
14807 \begin_inset Foot
14808 status collapsed
14809
14810 \begin_layout Plain Layout
14811 You are invited to send suggestions to 
14812 \begin_inset Flex URL
14813 status collapsed
14814
14815 \begin_layout Plain Layout
14816
14817 lyx-devel@lists.lyx.org
14818 \end_layout
14819
14820 \end_inset
14821
14822 .
14823 \end_layout
14824
14825 \end_inset
14826
14827 , lots will probably never be supported, due to the limitations of LyX's
14828  framework.
14829  Of course you can still use all features with the help of some native LaTeX
14830  commands (TeX code
14831 \begin_inset Foot
14832 status collapsed
14833
14834 \begin_layout Plain Layout
14835 Cf.
14836 \begin_inset ERT
14837 status collapsed
14838
14839 \begin_layout Plain Layout
14840
14841
14842 \backslash
14843  
14844 \end_layout
14845
14846 \end_inset
14847
14848 section
14849 \begin_inset space ~
14850 \end_inset
14851
14852
14853 \begin_inset CommandInset ref
14854 LatexCommand ref
14855 reference "sec:Inserting-TeX-Code"
14856
14857 \end_inset
14858
14859  for details.
14860 \end_layout
14861
14862 \end_inset
14863
14864 ).
14865  In this section, we can only list those features that are natively supported
14866  by LyX.
14867  For detailed descriptions (and for the rest of features) we recommend you
14868  have a look at the detailed manual of the Memoir class
14869 \begin_inset Foot
14870 status collapsed
14871
14872 \begin_layout Plain Layout
14873 Cf.
14874 \begin_inset ERT
14875 status collapsed
14876
14877 \begin_layout Plain Layout
14878
14879
14880 \backslash
14881  
14882 \end_layout
14883
14884 \end_inset
14885
14886
14887 \begin_inset Flex URL
14888 status collapsed
14889
14890 \begin_layout Plain Layout
14891
14892 CTAN:/macros/latex/memoir/memman.pdf
14893 \end_layout
14894
14895 \end_inset
14896
14897 .
14898 \end_layout
14899
14900 \end_inset
14901
14902 , which is not only a user guide for the class, but also both a comprehensive
14903  description on good typesetting and a superb example for good typesetting
14904  itself.
14905 \end_layout
14906
14907 \begin_layout Subsection
14908 Basic features and restrictions
14909 \end_layout
14910
14911 \begin_layout Standard
14912 Memoir supports basically all features of the standard book classes.
14913  There are, however, some differences, as follows:
14914 \end_layout
14915
14916 \begin_layout Description
14917 Font
14918 \begin_inset space ~
14919 \end_inset
14920
14921 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14922 \end_layout
14923
14924 \begin_layout Description
14925 Page
14926 \begin_inset space ~
14927 \end_inset
14928
14929 style: The fancy page style is not supported, due to a command clash between
14930  Memoir and the fancyhdr package (they both define a command with the same
14931  name, which confuses LaTeX).
14932  Instead, Memoir comes with a number of its own page styles (see 
14933 \family sans
14934 Layout\SpecialChar \menuseparator
14935 Document\SpecialChar \menuseparator
14936 Page
14937 \begin_inset space ~
14938 \end_inset
14939
14940 Style
14941 \family default
14942 ).
14943  If you want to use these for the chapter pages, you have to use the command
14944  
14945 \family typewriter
14946
14947 \backslash
14948 chapterstyle
14949 \family default
14950  in the main text or in preamble (e.
14951 \begin_inset space \thinspace{}
14952 \end_inset
14953
14954 g.
14955 \begin_inset space \space{}
14956 \end_inset
14957
14958
14959 \family typewriter
14960
14961 \backslash
14962 chapterstyle{companion}
14963 \family default
14964 ).
14965 \end_layout
14966
14967 \begin_layout Description
14968 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14969  optional argument in the standard classes.
14970  With this, you can specify an alternative version of the title for the
14971  table of contents and the headers (for instance, if the title is too long).
14972  In LyX, you can do this via 
14973 \family sans
14974 Insert\SpecialChar \menuseparator
14975 Short
14976 \begin_inset space ~
14977 \end_inset
14978
14979 Title
14980 \family default
14981  at the beginning of a chapter/section.
14982  Memoir features a second optional argument and thus separates the table
14983  of contents from the header.
14984  You can define three variants of a title with this: one for the main text,
14985  one for the table of contents, and one for the headers.
14986  Simply insert two optional arguments if you need this feature, the first
14987  one containing the short title for the Table of Contents, the second one
14988  containing an alternative short title for the headers.
14989 \end_layout
14990
14991 \begin_layout Description
14992 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14993  of contents, the list of figures and the list of table start a new page
14994  automatically.
14995  Memoir does not follow this route.
14996  You have to insert a page break yourself, if you want to have one.
14997 \end_layout
14998
14999 \begin_layout Description
15000 Titlepage: For some unknown reason, Memoir uses pagination on the title
15001  page (in the standard classes, title pages are 
15002 \begin_inset Quotes eld
15003 \end_inset
15004
15005 empty
15006 \begin_inset Quotes erd
15007 \end_inset
15008
15009 ).
15010  If you want an empty title page, type 
15011 \family typewriter
15012
15013 \backslash
15014 aliaspagestyle{title}{empty}
15015 \family default
15016  in the preamble.
15017 \end_layout
15018
15019 \begin_layout Description
15020 Article: With the class option 
15021 \emph on
15022 article
15023 \emph default
15024  (to be inserted in 
15025 \family sans
15026 Layout\SpecialChar \menuseparator
15027 Document\SpecialChar \menuseparator
15028 Extra
15029 \begin_inset space ~
15030 \end_inset
15031
15032 Options
15033 \family default
15034 ), you can emulate article style.
15035  That is, counters (footnotes, figures, tables etc.) will not be reset on
15036  new chapters, chapters don't start a new page (but are—in contrary to 
15037 \begin_inset Quotes eld
15038 \end_inset
15039
15040 real
15041 \begin_inset Quotes erd
15042 \end_inset
15043
15044  article classes—still allowed), parts, though, use their own page, as in
15045  book.
15046 \end_layout
15047
15048 \begin_layout Description
15049 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
15050  font commands, which have been used in the old LaTeX version 2.09 (e.
15051 \begin_inset space \thinspace{}
15052 \end_inset
15053
15054 g.
15055 \begin_inset space \space{}
15056 \end_inset
15057
15058
15059 \family typewriter
15060
15061 \backslash
15062 rm
15063 \family default
15064
15065 \family typewriter
15066
15067 \backslash
15068 it
15069 \family default
15070 ).
15071  It produces an error and stops LaTeX whenever such a command appears.
15072  The class option 
15073 \emph on
15074 oldfontcommands
15075 \emph default
15076  reallows the commands and spits out warnings instead (which does at least
15077  not stop LaTeX).
15078  Since a lot of packages and particularly BibTeX style files are still using
15079  those commands, we have decided to use this option by default.
15080 \end_layout
15081
15082 \begin_layout Subsection
15083 Extra features
15084 \end_layout
15085
15086 \begin_layout Standard
15087 We will only describe the features supported by LyX (which is not much currently
15088 ).
15089  Please consult the Memoir manual
15090 \begin_inset Foot
15091 status collapsed
15092
15093 \begin_layout Plain Layout
15094 Cf.
15095 \begin_inset ERT
15096 status collapsed
15097
15098 \begin_layout Plain Layout
15099
15100
15101 \backslash
15102  
15103 \end_layout
15104
15105 \end_inset
15106
15107
15108 \begin_inset Flex URL
15109 status collapsed
15110
15111 \begin_layout Plain Layout
15112
15113 CTAN:/macros/latex/memoir/memman.pdf
15114 \end_layout
15115
15116 \end_inset
15117
15118 .
15119 \end_layout
15120
15121 \end_inset
15122
15123  for details.
15124 \end_layout
15125
15126 \begin_layout Description
15127 Abstract: You may wonder why an abstract is an extra feature.
15128  Well, it is in book class.
15129  Usually books don't have abstracts.
15130  Memoir, however, has.
15131  You can use it wherever and how often you like.
15132 \end_layout
15133
15134 \begin_layout Description
15135 Chapterprecis: You may know this older typesetting style: The contents of
15136  a chapter are summarized below the title and also in the table of contents
15137  (e.
15138 \begin_inset space \thinspace{}
15139 \end_inset
15140
15141 g.
15142 \begin_inset space \space{}
15143 \end_inset
15144
15145
15146 \emph on
15147 Our hero arrives in Troia; he loses some friends; he finds others
15148 \emph default
15149 ).
15150  Chapterprecis does exactly this.
15151  It is therefore only sensible below a chapter.
15152 \end_layout
15153
15154 \begin_layout Description
15155 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
15156  The epigraph environment provides an elegant way of typesetting such a
15157  motto.
15158  The motto itself (text) and its author (source) are divided by a short
15159  line.
15160  Unfortunately, we have to fool LyX a bit here again, since the environment
15161  needs two arguments (text and source).
15162  In this case, we have to use curly brackets (in TeX mode) between the two
15163  arguments: 
15164 \emph on
15165 <smart slogan>
15166 \emph default
15167  
15168 \family typewriter
15169 }{
15170 \family default
15171  
15172 \emph on
15173 <author of the slogan>.
15174 \end_layout
15175
15176 \begin_layout Description
15177 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
15178  complex figurative poems).
15179  LyX can only support a few of them.
15180  One is poemtitle, which is a centered title for poems, which will also
15181  be added to the table of contents (verse is the standard environment for
15182  poems.
15183  Memoir has some enhanced versions of verse, but you need to use TeX code,
15184  because they have to be nested inside regular verse environments, which
15185  is not possible with LyX).
15186 \end_layout
15187
15188 \begin_layout Description
15189 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
15190 \end_layout
15191
15192 \begin_layout Section
15193 Article (mwart), book (mwbk) and report (mwrep)
15194 \begin_inset Argument status
15195 status collapsed
15196
15197 \begin_layout Plain Layout
15198 The 
15199 \family typewriter
15200 mw
15201 \family default
15202  Classes
15203 \end_layout
15204
15205 \end_inset
15206
15207
15208 \end_layout
15209
15210 \begin_layout Standard
15211 by 
15212 \noun on
15213 Tomasz Luczak
15214 \end_layout
15215
15216 \begin_layout Standard
15217 The LyX document classes 
15218 \emph on
15219 article (mwart)
15220 \emph default
15221
15222 \emph on
15223 report (mwrep)
15224 \emph default
15225  and 
15226 \emph on
15227 book
15228 \emph default
15229  
15230 \emph on
15231 (mwbk)
15232 \emph default
15233  correspond to the LaTeX document classes 
15234 \family typewriter
15235 mwart.cls
15236 \family default
15237
15238 \family typewriter
15239 mwrep.cls
15240 \family default
15241  and 
15242 \family typewriter
15243 mwbk.cls
15244 \family default
15245 , resp.
15246  They are replacements for the standard document classes 
15247 \family typewriter
15248 article.cls
15249 \family default
15250
15251 \family typewriter
15252 report.cls
15253 \family default
15254  and 
15255 \family typewriter
15256 book.cls
15257 \family default
15258 , resp., and fit better to Polish typography conventions in a number of points.
15259  
15260 \end_layout
15261
15262 \begin_layout Standard
15263 Basic differences:
15264 \end_layout
15265
15266 \begin_layout Itemize
15267 Unnumbered titles (with star, e.
15268 \begin_inset space \thinspace{}
15269 \end_inset
15270
15271 g.
15272 \begin_inset space \space{}
15273 \end_inset
15274
15275
15276 \family sans
15277 Section*
15278 \family default
15279 ) are added into table of contents,
15280 \end_layout
15281
15282 \begin_layout Itemize
15283 Additional page styles:
15284 \end_layout
15285
15286 \begin_deeper
15287 \begin_layout Description
15288 uheadings header with separated lines,
15289 \end_layout
15290
15291 \begin_layout Description
15292 myheadings custom header, contents headers via commands: 
15293 \family typewriter
15294
15295 \backslash
15296 markright
15297 \family default
15298  and 
15299 \family typewriter
15300
15301 \backslash
15302 markboth
15303 \family default
15304 ,
15305 \end_layout
15306
15307 \begin_layout Description
15308 myuheadings custom header with separated lines,
15309 \end_layout
15310
15311 \begin_layout Description
15312 outer page number is placed on outer side of page
15313 \end_layout
15314
15315 \end_deeper
15316 \begin_layout Itemize
15317 Options 
15318 \end_layout
15319
15320 \begin_deeper
15321 \begin_layout Description
15322 rmheadings serif titles — default,
15323 \end_layout
15324
15325 \begin_layout Description
15326 sfheadings sansserif titles,
15327 \end_layout
15328
15329 \begin_layout Description
15330 authortitle on title page first placed is author next title — default,
15331 \end_layout
15332
15333 \begin_layout Description
15334 titleauthor on title page first placed is title next author,
15335 \end_layout
15336
15337 \begin_layout Description
15338 withmarginpar reserve place on page for margins.
15339 \end_layout
15340
15341 \end_deeper
15342 \begin_layout Section
15343 Paper
15344 \end_layout
15345
15346 \begin_layout Standard
15347 The document class 
15348 \family sans
15349 paper
15350 \family default
15351  provides an alternative to the standard 
15352 \family sans
15353 article
15354 \family default
15355  class.
15356  It provides similar functionality, but you might prefer this layout with
15357  sans serif sections, headings, and more.
15358 \end_layout
15359
15360 \begin_layout Section
15361 RevTeX4
15362 \end_layout
15363
15364 \begin_layout Standard
15365 by 
15366 \noun on
15367 Amir Karger
15368 \end_layout
15369
15370 \begin_layout Standard
15371 \begin_inset VSpace bigskip
15372 \end_inset
15373
15374
15375 \end_layout
15376
15377 \begin_layout Standard
15378 \noindent
15379 The 
15380 \family sans
15381 Revtex
15382 \begin_inset space ~
15383 \end_inset
15384
15385 4
15386 \family default
15387  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15388 \begin_inset Formula $\beta$
15389 \end_inset
15390
15391  release of May, 1999) class.
15392 \end_layout
15393
15394 \begin_layout Standard
15395 LyX has a 
15396 \family sans
15397 Revtex
15398 \family default
15399  textclass, which works with RevTeX 3.1.
15400  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15401  That means that it doesn't interact very well with LyX, which requires
15402  LaTeX2e, although it has been kludged to work.
15403  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15404  LyX with the 
15405 \family sans
15406 RevTeX
15407 \begin_inset space ~
15408 \end_inset
15409
15410 4
15411 \family default
15412  textclass should also be pretty easy to use.
15413 \end_layout
15414
15415 \begin_layout Standard
15416 These documents are supposed to be used in 
15417 \emph on
15418 addition
15419 \emph default
15420  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15421  macros, and assume you'll know what to put in the preamble if necessary.
15422 \end_layout
15423
15424 \begin_layout Subsection
15425 Installation
15426 \end_layout
15427
15428 \begin_layout Standard
15429 All you need to do is install RevTeX 4, as described in the package's README
15430  file.
15431  The package can be found at The RevTeX 4 Web Site 
15432 \begin_inset Flex URL
15433 status collapsed
15434
15435 \begin_layout Plain Layout
15436
15437 http://publish.aps.org/revtex4/
15438 \end_layout
15439
15440 \end_inset
15441
15442 .
15443  Install it somewhere that LaTeX can see it.
15444  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15445  (i.
15446 \begin_inset space \thinspace{}
15447 \end_inset
15448
15449 e.
15450 \begin_inset space \space{}
15451 \end_inset
15452
15453 not the directory where you installed the class file.) Then, if you reconfigure
15454  LyX, it will find the class file and let you use the RevTeX4 textclass.
15455 \end_layout
15456
15457 \begin_layout Standard
15458 Probably the easiest way to get started is either to import a RevTeX 4 document
15459  using 
15460 \family typewriter
15461 tex2lyx
15462 \family default
15463 , or to use the 
15464 \family sans
15465 Revtex
15466 \begin_inset space ~
15467 \end_inset
15468
15469 4
15470 \family default
15471  template, found in the templates directory.
15472 \end_layout
15473
15474 \begin_layout Subsection
15475 Preamble Matter
15476 \end_layout
15477
15478 \begin_layout Standard
15479 Optional arguments to 
15480 \family typewriter
15481
15482 \backslash
15483 documentclass
15484 \family default
15485 , like 
15486 \begin_inset Quotes eld
15487 \end_inset
15488
15489 preprint
15490 \begin_inset Quotes erd
15491 \end_inset
15492
15493  and 
15494 \begin_inset Quotes eld
15495 \end_inset
15496
15497 aps
15498 \begin_inset Quotes erd
15499 \end_inset
15500
15501 , go in the 
15502 \family sans
15503 E
15504 \bar under
15505 x
15506 \bar default
15507 tra
15508 \begin_inset space ~
15509 \end_inset
15510
15511 Options
15512 \family default
15513  field in the 
15514 \family sans
15515 Document
15516 \begin_inset space ~
15517 \end_inset
15518
15519 Layout
15520 \family default
15521  dialog, as usual.
15522  Remember that in RevTeX, at least one optional argument is required! 
15523 \end_layout
15524
15525 \begin_layout Standard
15526 Other preamble matter, like 
15527 \family typewriter
15528
15529 \backslash
15530 draft
15531 \family default
15532  etc.
15533 \begin_inset space ~
15534 \end_inset
15535
15536 goes in the 
15537 \family sans
15538 LaTeX
15539 \begin_inset space ~
15540 \end_inset
15541
15542 Preamble
15543 \family default
15544  dialog, also as usual.
15545 \end_layout
15546
15547 \begin_layout Subsection
15548 Layouts
15549 \end_layout
15550
15551 \begin_layout Standard
15552 The layouts basically correspond to the commands in RevTeX4.0.
15553  For example, the Email layout corresponds to 
15554 \family typewriter
15555
15556 \backslash
15557 email{}
15558 \family default
15559 .
15560  Note that (at least as of RevTeX 4.0 Beta), the 
15561 \family sans
15562 Address
15563 \family default
15564  and 
15565 \family sans
15566 Affiliation
15567 \family default
15568  layouts are exactly equivalent, so you shouldn't need to use both.
15569 \begin_inset Foot
15570 status collapsed
15571
15572 \begin_layout Plain Layout
15573 In case you're curious, both were included so that 
15574 \family typewriter
15575 tex2lyx
15576 \family default
15577  would be able to translate both 
15578 \family typewriter
15579
15580 \backslash
15581 address
15582 \family default
15583  and 
15584 \family typewriter
15585
15586 \backslash
15587 affiliation
15588 \family default
15589 .
15590 \end_layout
15591
15592 \end_inset
15593
15594
15595 \end_layout
15596
15597 \begin_layout Subsection
15598 Important Notes
15599 \end_layout
15600
15601 \begin_layout Standard
15602 There are a couple of important unique aspects of RevTeX 4 which might cause
15603  bugs that will be even more confusing in LyX.
15604 \end_layout
15605
15606 \begin_layout Standard
15607 In RevTeX, the 
15608 \family typewriter
15609
15610 \backslash
15611 thanks
15612 \family default
15613  command goes 
15614 \emph on
15615 outside
15616 \emph default
15617  the 
15618 \family typewriter
15619
15620 \backslash
15621 author
15622 \family default
15623  command.
15624  The LyX equivalent is that there is a separate Thanks layout.
15625  Do 
15626 \emph on
15627 not
15628 \emph default
15629  write footnotes in the 
15630 \family sans
15631 Author
15632 \family default
15633  layout, or weird things may happen.
15634  See the RevTeX 4 documentation for more details.
15635 \end_layout
15636
15637 \begin_layout Standard
15638 Also, the 
15639 \family sans
15640 Author
15641 \begin_inset space ~
15642 \end_inset
15643
15644 Email
15645 \family default
15646
15647 \family sans
15648 Author
15649 \begin_inset space ~
15650 \end_inset
15651
15652 URL
15653 \family default
15654 , and 
15655 \family sans
15656 Thanks
15657 \family default
15658  layouts must be placed 
15659 \emph on
15660 in between
15661 \emph default
15662  the 
15663 \family sans
15664 Author
15665 \family default
15666  layout and the corresponding 
15667 \family sans
15668 Address
15669 \family default
15670  (or equivalent 
15671 \family sans
15672 Affiliation
15673 \family default
15674 ) layout.
15675  If you put the 
15676 \family sans
15677 Thanks
15678 \family default
15679  after the 
15680 \family sans
15681 Address
15682 \family default
15683 , the LaTeX won't compile.
15684 \end_layout
15685
15686 \begin_layout Subsection
15687 Drawbacks
15688 \end_layout
15689
15690 \begin_layout Standard
15691 The main problem with this layout is that you can't use the optional arguments
15692  to layouts like Email and Title.
15693  (The problem is not unique to this layout; you can't use optional arguments
15694  to the Section layouts either.) This means that after you export that file
15695  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15696  need to edit the LaTeX file with a text editor to add the optional arguments
15697  to set, e.
15698 \begin_inset space \thinspace{}
15699 \end_inset
15700
15701 g.
15702 \begin_inset space \space{}
15703 \end_inset
15704
15705 the running title for the page headers.
15706  Lacking these layouts makes the 
15707 \family typewriter
15708
15709 \backslash
15710 altaffiliation
15711 \family default
15712  (and the equivalent 
15713 \family typewriter
15714
15715 \backslash
15716 altaddress
15717 \family default
15718 ) useless, so the corresponding layouts don't exist, and will have to be
15719  added by hand.
15720 \begin_inset Foot
15721 status collapsed
15722
15723 \begin_layout Plain Layout
15724
15725 \emph on
15726 Note from JMarc:
15727 \emph default
15728  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15729  has not been updated yet to take advantage of it.
15730 \end_layout
15731
15732 \end_inset
15733
15734  
15735 \end_layout
15736
15737 \begin_layout Section
15738 Springer Journals (
15739 \family sans
15740 svjour
15741 \family default
15742 )
15743 \end_layout
15744
15745 \begin_layout Standard
15746 by 
15747 \noun on
15748 Martin Vermeer
15749 \end_layout
15750
15751 \begin_layout Subsection
15752 Description
15753 \end_layout
15754
15755 \begin_layout Standard
15756 These are the layout files for some of the journal formats used by Springer
15757  Verlag and listed on 
15758 \begin_inset Flex URL
15759 status collapsed
15760
15761 \begin_layout Plain Layout
15762
15763 http://www.springer.de/author/tex/help-journals.html
15764 \end_layout
15765
15766 \end_inset
15767
15768 , where you should also go to fetch the class files (yes, these are LaTeX2e
15769  now!).
15770  It is a modular system: the things common to all journals are implemented
15771  in 
15772 \family typewriter
15773 svjour.inc
15774 \family default
15775 , which journal-specific layout files (such as, e.
15776 \begin_inset space \thinspace{}
15777 \end_inset
15778
15779 g.
15780 \begin_inset space \space{}
15781 \end_inset
15782
15783
15784 \family typewriter
15785 svjog.layout
15786 \family default
15787  for Journal of Geodesy) can include.
15788 \end_layout
15789
15790 \begin_layout Standard
15791 This means that implementing support for any other Springer journal on this
15792  list is as simple as writing your own 
15793 \family typewriter
15794 sv
15795 \family default
15796 <myjournal>
15797 \family typewriter
15798 .layout
15799 \family default
15800  file following the outline given in 
15801 \family typewriter
15802 svjog.layout
15803 \family default
15804 .
15805  
15806 \end_layout
15807
15808 \begin_layout Standard
15809 It is reasonably well tested only for the Journal of Geodesy.
15810  
15811 \family typewriter
15812 svjour
15813 \family default
15814  and 
15815 \family typewriter
15816 svjog
15817 \family default
15818  come with the standard LyX distribution.
15819  Install the relevant class file (downloaded from Springer) in a proper
15820  directory, reconfigure LaTeX (in the teTeX case by running 
15821 \family typewriter
15822 texhash
15823 \family default
15824 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15825  and it should work.
15826 \end_layout
15827
15828 \begin_layout Subsection
15829 New styles
15830 \end_layout
15831
15832 \begin_layout Standard
15833 A large number of theorem-like styles — 
15834 \family sans
15835 Claim, Conjecture,
15836 \family default
15837  
15838 \family sans
15839 \SpecialChar \ldots{}
15840 Theorem
15841 \family default
15842 .
15843 \end_layout
15844
15845 \begin_layout Standard
15846
15847 \family sans
15848 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15849  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15850 \family default
15851 .
15852  See the Springer class file documentation for details.
15853 \end_layout
15854
15855 \begin_layout Subsection
15856 Supported journals
15857 \end_layout
15858
15859 \begin_layout Itemize
15860
15861 \emph on
15862 Journal of Geodesy
15863 \emph default
15864
15865 \family typewriter
15866 svjog.layout
15867 \family default
15868  — Martin Vermeer
15869 \end_layout
15870
15871 \begin_layout Itemize
15872
15873 \emph on
15874 Probability Theory and Related Fields
15875 \emph default
15876
15877 \family typewriter
15878 svprobth.layout
15879 \family default
15880  — Jean-Marc Lasgouttes
15881 \end_layout
15882
15883 \begin_layout Standard
15884 Add your own, it isn't so hard!
15885 \end_layout
15886
15887 \begin_layout Subsection
15888 Credits
15889 \end_layout
15890
15891 \begin_layout Standard
15892 These files are partly based on the older 
15893 \family typewriter
15894 ejour2.layout
15895 \family default
15896 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15897  file from Springer.
15898  All this, and the 
15899 \family typewriter
15900 ejour2
15901 \family default
15902  layout, are now defunct.
15903  Jean-Marc Lasgouttes helped out big in making me find my way around the
15904  LyX layout file mechanism.
15905 \end_layout
15906
15907 \begin_layout Subsection
15908 Bugs
15909 \end_layout
15910
15911 \begin_layout Standard
15912 Probably.
15913  But probably less than in the old hacked-LaTeX 
15914 \family typewriter
15915 ejour2
15916 \family default
15917 .
15918 \end_layout
15919
15920 \begin_layout Standard
15921 Limitations e.
15922 \begin_inset space \thinspace{}
15923 \end_inset
15924
15925 g.: does not display the number for theorem-like layouts, just #.
15926 \end_layout
15927
15928 \begin_layout Section
15929 Slides [aka 
15930 \noun on
15931 SliTeX
15932 \noun default
15933 ]
15934 \begin_inset CommandInset label
15935 LatexCommand label
15936 name "sec:slitex"
15937
15938 \end_inset
15939
15940
15941 \end_layout
15942
15943 \begin_layout Standard
15944 by 
15945 \noun on
15946 John Weiss
15947 \noun default
15948  
15949 \end_layout
15950
15951 \begin_layout Subsection
15952 Introduction
15953 \end_layout
15954
15955 \begin_layout Standard
15956 This section describes how to use LyX to make slides for overhead projectors.
15957  There are two document classes that can do this: the default slides class
15958  and the 
15959 \family sans
15960 FoilTeX
15961 \family default
15962  slides class.
15963  This section documents the former.
15964 \end_layout
15965
15966 \begin_layout Standard
15967 I'm going to say this again, nice and clear, so that there's no misunderstanding
15968 :
15969 \end_layout
15970
15971 \begin_layout Standard
15972 \begin_inset VSpace bigskip
15973 \end_inset
15974
15975
15976 \end_layout
15977
15978 \begin_layout Standard
15979 \align center
15980
15981 \size large
15982 This section documents the class 
15983 \begin_inset Quotes eld
15984 \end_inset
15985
15986
15987 \family sans
15988 slides (default)
15989 \family default
15990
15991 \begin_inset Quotes erd
15992 \end_inset
15993
15994  
15995 \emph on
15996 only.
15997 \end_layout
15998
15999 \begin_layout Standard
16000 \begin_inset VSpace bigskip
16001 \end_inset
16002
16003
16004 \end_layout
16005
16006 \begin_layout Standard
16007 If you're looking for the documentation for 
16008 \begin_inset Quotes eld
16009 \end_inset
16010
16011
16012 \family sans
16013 slides (FoilTeX)
16014 \family default
16015
16016 \begin_inset Quotes erd
16017 \end_inset
16018
16019 , check out section
16020 \begin_inset space ~
16021 \end_inset
16022
16023
16024 \begin_inset CommandInset ref
16025 LatexCommand ref
16026 reference "sec:foiltex"
16027
16028 \end_inset
16029
16030 .
16031  The 
16032 \family sans
16033 foils
16034 \family default
16035  class [
16036 \begin_inset Quotes eld
16037 \end_inset
16038
16039
16040 \family sans
16041 slides (FoilTeX)
16042 \family default
16043
16044 \begin_inset Quotes erd
16045 \end_inset
16046
16047 ] is actually somewhat better than the default 
16048 \family sans
16049 slides
16050 \family default
16051  class,
16052 \begin_inset Foot
16053 status collapsed
16054
16055 \begin_layout Plain Layout
16056 \SpecialChar \ldots{}
16057 or so I've been told repeatedly by its advocates.
16058  Having never used it, I have no idea if this claim is true or not.
16059 \end_layout
16060
16061 \end_inset
16062
16063  which this section documents.
16064 \end_layout
16065
16066 \begin_layout Standard
16067 This class is the LaTeX2e improvement of the old 
16068 \noun on
16069 SliTeX
16070 \noun default
16071  package.
16072  Every LaTeX2e distribution includes this class [which I'll just refer to
16073  as 
16074 \begin_inset Quotes eld
16075 \end_inset
16076
16077
16078 \family sans
16079 slides
16080 \family default
16081
16082 \begin_inset Quotes erd
16083 \end_inset
16084
16085  from now on], so you're bound to have it.
16086  As I noted earlier, there are other classes, such as 
16087 \family sans
16088 foils
16089 \family default
16090 , which also produce slides for overhead projectors and do a better job
16091  at it.
16092  However, there are some things which 
16093 \family sans
16094 slides
16095 \family default
16096  can do which the others can't, such as generate overlays.
16097  Read on to learn more!
16098 \end_layout
16099
16100 \begin_layout Subsection
16101 Getting Started
16102 \begin_inset CommandInset label
16103 LatexCommand label
16104 name "sec:slidesetup"
16105
16106 \end_inset
16107
16108
16109 \end_layout
16110
16111 \begin_layout Standard
16112 Obviously, to use this document class, you need to select 
16113 \begin_inset Quotes eld
16114 \end_inset
16115
16116
16117 \family sans
16118 slides (default)
16119 \family default
16120
16121 \begin_inset Quotes erd
16122 \end_inset
16123
16124  from the class list in the 
16125 \family sans
16126 Document\SpecialChar \menuseparator
16127 Settings
16128 \family default
16129  dialog.
16130  There are some other special things you should know about this class:
16131 \end_layout
16132
16133 \begin_layout Itemize
16134 Don't bother changing the options 
16135 \family sans
16136 Sides and Columns
16137 \family default
16138 .
16139  They're not supported by the 
16140 \family sans
16141 slides
16142 \family default
16143  class, anyways.
16144 \end_layout
16145
16146 \begin_layout Itemize
16147 The option 
16148 \family sans
16149 Page
16150 \begin_inset space ~
16151 \end_inset
16152
16153 style
16154 \family default
16155  behaves a bit differently for this class.
16156  The possible choices and what they do are as follows:
16157 \end_layout
16158
16159 \begin_deeper
16160 \begin_layout Description
16161
16162 \family sans
16163 plain
16164 \family default
16165  The final output contains page numbers in the lower right corner.
16166 \end_layout
16167
16168 \begin_layout Description
16169
16170 \family sans
16171 headings
16172 \family default
16173  Like 
16174 \family sans
16175 plain
16176 \family default
16177 , but also prints out any time markers you've put in.
16178  This is the default.
16179 \end_layout
16180
16181 \begin_layout Description
16182
16183 \family sans
16184 empty
16185 \family default
16186  The final output contains no page numbers, time markers, or alignment markers.
16187 \end_layout
16188
16189 \end_deeper
16190 \begin_layout Itemize
16191 The 
16192 \family sans
16193 slides
16194 \family default
16195  class has an extra option: 
16196 \family typewriter
16197 clock
16198 \family default
16199 .
16200  To use it, put 
16201 \begin_inset Quotes eld
16202 \end_inset
16203
16204
16205 \family typewriter
16206 clock
16207 \family default
16208
16209 \begin_inset Quotes erd
16210 \end_inset
16211
16212  in the extra class options.
16213 \end_layout
16214
16215 \begin_deeper
16216 \begin_layout Standard
16217 Using this options allows you to add time markers to 
16218 \family sans
16219 Note
16220 \family default
16221 s.
16222  See section
16223 \begin_inset space ~
16224 \end_inset
16225
16226
16227 \begin_inset CommandInset ref
16228 LatexCommand ref
16229 reference "sec:slideNote"
16230
16231 \end_inset
16232
16233  for more details.
16234 \end_layout
16235
16236 \end_deeper
16237 \begin_layout Standard
16238 You can also use the template file 
16239 \begin_inset Quotes eld
16240 \end_inset
16241
16242
16243 \family typewriter
16244 slides.lyx
16245 \family default
16246
16247 \begin_inset Quotes erd
16248 \end_inset
16249
16250  to automatically set up a document to use the 
16251 \family sans
16252 slides
16253 \family default
16254  class [using 
16255 \family sans
16256 File\SpecialChar \menuseparator
16257 New
16258 \begin_inset space ~
16259 \end_inset
16260
16261 from
16262 \begin_inset space ~
16263 \end_inset
16264
16265 Template
16266 \family default
16267  to open your new document].
16268  The template file also contains some examples of the special paragraph
16269  environments used by this class.
16270  I'll describe those next.
16271 \end_layout
16272
16273 \begin_layout Subsection
16274 Paragraph Environments
16275 \end_layout
16276
16277 \begin_layout Subsubsection
16278 Supported Environments
16279 \end_layout
16280
16281 \begin_layout Standard
16282 The first thing you'll notice when you start up a new 
16283 \family sans
16284 slides
16285 \family default
16286  document is the font size and type: it's the equivalent of the size 
16287 \begin_inset Quotes eld
16288 \end_inset
16289
16290
16291 \family sans
16292 Largest
16293 \family default
16294
16295 \begin_inset Quotes erd
16296 \end_inset
16297
16298  in the 
16299 \family sans
16300 Sans
16301 \begin_inset space ~
16302 \end_inset
16303
16304 Serif
16305 \family default
16306  font.
16307  This is also what's used in the output.
16308  Think of this as a 
16309 \begin_inset Quotes eld
16310 \end_inset
16311
16312 visual cue
16313 \begin_inset Quotes erd
16314 \end_inset
16315
16316  to remind you that this is a slide.
16317  Your final slides will use a larger font; ergo, you'll have less space.
16318  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16319 \end_layout
16320
16321 \begin_layout Standard
16322 The next thing that becomes obvious is the changes to the paragraph environment
16323  pull-down box [at the far-left end of the toolbar].
16324  Most of the paragraph environments you're used to seeing are missing.
16325  There are also five new ones.
16326  That's because the 
16327 \family sans
16328 slides
16329 \family default
16330  class itself only supports certain paragraph environments:
16331 \end_layout
16332
16333 \begin_layout Itemize
16334
16335 \family sans
16336 Standard
16337 \end_layout
16338
16339 \begin_layout Itemize
16340
16341 \family sans
16342 Itemize
16343 \end_layout
16344
16345 \begin_layout Itemize
16346
16347 \family sans
16348 Enumerate
16349 \end_layout
16350
16351 \begin_layout Itemize
16352
16353 \family sans
16354 Description
16355 \end_layout
16356
16357 \begin_layout Itemize
16358
16359 \family sans
16360 List
16361 \end_layout
16362
16363 \begin_layout Itemize
16364
16365 \family sans
16366 Quotation
16367 \end_layout
16368
16369 \begin_layout Itemize
16370
16371 \family sans
16372 Quote
16373 \end_layout
16374
16375 \begin_layout Itemize
16376
16377 \family sans
16378 Verse
16379 \end_layout
16380
16381 \begin_layout Itemize
16382
16383 \family sans
16384 Caption
16385 \end_layout
16386
16387 \begin_layout Itemize
16388
16389 \family sans
16390 LyX-Code
16391 \end_layout
16392
16393 \begin_layout Itemize
16394
16395 \family sans
16396 Comment
16397 \end_layout
16398
16399 \begin_layout Standard
16400 All of the other standard environments, including the section-heading environmen
16401 ts, aren't used in the 
16402 \family sans
16403 slides
16404 \family default
16405  class.
16406 \end_layout
16407
16408 \begin_layout Standard
16409 On the other hand, you'll notice the following new environments:
16410 \end_layout
16411
16412 \begin_layout Itemize
16413
16414 \family sans
16415 Slide
16416 \end_layout
16417
16418 \begin_layout Itemize
16419
16420 \family sans
16421 Overlay
16422 \end_layout
16423
16424 \begin_layout Itemize
16425
16426 \family sans
16427 Note
16428 \end_layout
16429
16430 \begin_layout Itemize
16431
16432 \family sans
16433 InvisibleText
16434 \end_layout
16435
16436 \begin_layout Itemize
16437
16438 \family sans
16439 VisibleText
16440 \end_layout
16441
16442 \begin_layout Standard
16443 These five are kind of quirky, due to a 
16444 \begin_inset Quotes eld
16445 \end_inset
16446
16447 feature
16448 \begin_inset Quotes erd
16449 \end_inset
16450
16451  in LyX.
16452  You see, LyX doesn't permit you to nest any other paragraph environment
16453  into an empty environment.
16454  Now, that's fine and dandy, but it means that you wouldn't be able to start
16455  a slide with anything except plain text.
16456  To deal with this, I've performed a little 
16457 \begin_inset Quotes eld
16458 \end_inset
16459
16460 LaTeX magic.
16461 \begin_inset Quotes erd
16462 \end_inset
16463
16464  
16465 \end_layout
16466
16467 \begin_layout Subsubsection
16468 Quirks of the New Environments
16469 \begin_inset CommandInset label
16470 LatexCommand label
16471 name "sec:slideQuirk"
16472
16473 \end_inset
16474
16475
16476 \end_layout
16477
16478 \begin_layout Standard
16479 All five of the new paragraph environments are somewhat quirky due to inherent
16480  limitiations in the current version of LyX.
16481  As I just mentioned, LyX forbids environments that begin with another environme
16482 nt.
16483  To get around this, the 
16484 \family sans
16485 Slide
16486 \family default
16487  environment isn't a paragraph environment as described in the 
16488 \emph on
16489 User's Guide
16490 \emph default
16491 .
16492  
16493 \end_layout
16494
16495 \begin_layout Standard
16496 You should consider 
16497 \family sans
16498 Slide
16499 \family default
16500
16501 \family sans
16502 Overlay
16503 \family default
16504 , and 
16505 \family sans
16506 Note
16507 \family default
16508  to be 
16509 \begin_inset Quotes eld
16510 \end_inset
16511
16512 pseudo-environments.
16513 \begin_inset Quotes erd
16514 \end_inset
16515
16516  They look like a section heading or a 
16517 \begin_inset Quotes eld
16518 \end_inset
16519
16520
16521 \family sans
16522 Caption
16523 \family default
16524 ,
16525 \begin_inset Quotes erd
16526 \end_inset
16527
16528  but really begin a [and, if necessary, end the previous] paragraph environment.
16529  Likewise, treat 
16530 \family sans
16531 InvisibleText
16532 \family default
16533  and 
16534 \family sans
16535 VisibleText
16536 \family default
16537  as 
16538 \begin_inset Quotes eld
16539 \end_inset
16540
16541 pseudo-commands.
16542 \begin_inset Quotes erd
16543 \end_inset
16544
16545  These two perform some action.
16546 \end_layout
16547
16548 \begin_layout Standard
16549 A common feature of all five environments, 
16550 \family sans
16551 Slide
16552 \family default
16553
16554 \family sans
16555 Overlay
16556 \family default
16557
16558 \family sans
16559 Note
16560 \family default
16561
16562 \family sans
16563 InvisibleText
16564 \family default
16565  and 
16566 \family sans
16567 VisibleText
16568 \family default
16569 , is a rather long-ish label.
16570  The text following this label — ordinarily the contents of the paragraph
16571  environment — is utterly irrelevant for 
16572 \family sans
16573 Slide
16574 \family default
16575
16576 \family sans
16577 Overlay
16578 \family default
16579
16580 \family sans
16581 Note
16582 \family default
16583
16584 \family sans
16585 InvisibleText
16586 \family default
16587  and 
16588 \family sans
16589 VisibleText
16590 \family default
16591 .
16592  LyX completely ignores it.
16593  In fact, you can leave these five environments completely empty.
16594  
16595 \end_layout
16596
16597 \begin_layout Standard
16598 While you don't 
16599 \emph on
16600 have
16601 \emph default
16602  to put any text after the rather long-ish label, you might want to.
16603  This could be a short description of the contents of the 
16604 \family sans
16605 Slide
16606 \family default
16607 , for example.
16608  In that case, enter your descriptive comment and hit 
16609 \family sans
16610 Return
16611 \family default
16612  as you normally would.
16613 \end_layout
16614
16615 \begin_layout Standard
16616 If, on the other hand, you don't want to enter any descriptive text, you'll
16617  hit another LyX quirk.
16618  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16619  environment until you put something in the old one.
16620  So, do this:
16621 \end_layout
16622
16623 \begin_layout Itemize
16624 Start entering the text that will 
16625 \emph on
16626 follow
16627 \emph default
16628  the new 
16629 \family sans
16630 Slide
16631 \family default
16632
16633 \family sans
16634 Overlay
16635 \family default
16636
16637 \family sans
16638 Note
16639 \family default
16640
16641 \family sans
16642 InvisibleText
16643 \family default
16644  or 
16645 \family sans
16646 VisibleText
16647 \family default
16648 .
16649  
16650 \end_layout
16651
16652 \begin_layout Itemize
16653 Now move to the beginning of that paragraph.
16654  
16655 \end_layout
16656
16657 \begin_layout Itemize
16658 Next, hit 
16659 \family sans
16660 Return
16661 \family default
16662 .
16663  
16664 \end_layout
16665
16666 \begin_layout Itemize
16667 Finally, change this new, empty paragraph to a 
16668 \family sans
16669 Slide
16670 \family default
16671
16672 \family sans
16673 Overlay
16674 \family default
16675
16676 \family sans
16677 Note
16678 \family default
16679
16680 \family sans
16681 InvisibleText
16682 \family default
16683  or 
16684 \family sans
16685 VisibleText
16686 \family default
16687 .
16688  
16689 \end_layout
16690
16691 \begin_layout Standard
16692 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16693
16694 \end_layout
16695
16696 \begin_layout Subsection
16697 Making a Presentation with 
16698 \family sans
16699 Slide
16700 \family default
16701
16702 \family sans
16703 Overlay
16704 \family default
16705  and 
16706 \family sans
16707 Note
16708 \end_layout
16709
16710 \begin_layout Subsubsection
16711 Using the 
16712 \family sans
16713 Slide
16714 \family default
16715  Environment
16716 \end_layout
16717
16718 \begin_layout Standard
16719 If you're expecting this section to teach you how to actually make a presentatio
16720 n, you'll be sorely disappointed.
16721  Naturally, I'll describe all of the ways the 
16722 \family sans
16723 slides
16724 \family default
16725  class can assist you in preparing the materials for a presentation.
16726  Filling in the contents, however, is up to you.
16727  [Then again, that 
16728 \emph on
16729 is
16730 \emph default
16731  the LyX philosophy.]
16732 \end_layout
16733
16734 \begin_layout Standard
16735 Choosing the 
16736 \family sans
16737 Slide
16738 \family default
16739  environment [in the manner described in section
16740 \begin_inset space ~
16741 \end_inset
16742
16743
16744 \begin_inset CommandInset ref
16745 LatexCommand ref
16746 reference "sec:slideQuirk"
16747
16748 \end_inset
16749
16750 ] tells LyX to begin a new slide [duh].
16751  The label for this environment/
16752 \begin_inset Quotes erd
16753 \end_inset
16754
16755 pseudo-command
16756 \begin_inset Quotes erd
16757 \end_inset
16758
16759  is an 
16760 \begin_inset Quotes eld
16761 \end_inset
16762
16763 ASCII line,
16764 \begin_inset Quotes erd
16765 \end_inset
16766
16767  in cool blue, followed by the label, 
16768 \begin_inset Quotes eld
16769 \end_inset
16770
16771 NewSlide:
16772 \begin_inset Quotes erd
16773 \end_inset
16774
16775 .
16776  Any text or paragraph environments that follow this one go on the new slide.
16777  It's that simple.
16778 \end_layout
16779
16780 \begin_layout Standard
16781 Slides are probably the only time you'll need to forcibly end pages in LyX
16782  (this can be specified in the 
16783 \family sans
16784 Paragraph Layout
16785 \family default
16786  dialog).
16787  In fact, you'll want to, once you finish entering the contents of one slide.
16788  If you've entered more text than can physically fit on a slide, the extra
16789  overflows onto a new slide.
16790  I don't recommend doing this, however, since the overflow slide won't have
16791  any page number on it.
16792  Furthermore, it may interfere with any 
16793 \family sans
16794 Overlay
16795 \family default
16796  you've made to accompany the oversized 
16797 \family sans
16798 Slide
16799 \family default
16800 .
16801 \end_layout
16802
16803 \begin_layout Standard
16804 The 
16805 \family sans
16806 Overlay
16807 \family default
16808  and 
16809 \family sans
16810 Note
16811 \family default
16812  environments work the same way as the 
16813 \family sans
16814 Slide
16815 \family default
16816  environment.
16817  They both create an 
16818 \begin_inset Quotes eld
16819 \end_inset
16820
16821 ASCII line
16822 \begin_inset Quotes erd
16823 \end_inset
16824
16825  followed by a label [
16826 \begin_inset Quotes eld
16827 \end_inset
16828
16829 NewOverlay:
16830 \begin_inset Quotes erd
16831 \end_inset
16832
16833  and 
16834 \begin_inset Quotes eld
16835 \end_inset
16836
16837 NewNote:
16838 \begin_inset Quotes erd
16839 \end_inset
16840
16841 , respectively].
16842  The color is a stunning magenta instead of blue, and the 
16843 \begin_inset Quotes eld
16844 \end_inset
16845
16846 ASCII line
16847 \begin_inset Quotes erd
16848 \end_inset
16849
16850  will look different, in style and in length.
16851  The label fonts of all three also differ from one another.
16852 \end_layout
16853
16854 \begin_layout Standard
16855 As with a 
16856 \family sans
16857 Slide
16858 \family default
16859 , if the contents of a 
16860 \family sans
16861 Note
16862 \family default
16863  or 
16864 \family sans
16865 Overlay
16866 \family default
16867  exceed the physical size of a slide or sheet of paper, the extra will overflow
16868  onto a new sheet.
16869  Again, you should avoid this.
16870  It defeats the whole purpose of 
16871 \family sans
16872 Note
16873 \family default
16874 s and 
16875 \family sans
16876 Overlay
16877 \family default
16878 s.
16879 \end_layout
16880
16881 \begin_layout Subsubsection
16882 Using 
16883 \family sans
16884 Overlay
16885 \family default
16886  with 
16887 \family sans
16888 Slide
16889 \end_layout
16890
16891 \begin_layout Standard
16892 The idea behind an 
16893 \family sans
16894 Overlay
16895 \family default
16896  is a slide that sits atop another slide.
16897  Perhaps you wish to discuss a figure on the main 
16898 \family sans
16899 Slide
16900 \family default
16901  before displaying the text associated with it.
16902  One way to accomplish this is tape a flap of dark paper over the part of
16903  the 
16904 \family sans
16905 Slide
16906 \family default
16907  you want to display later.
16908  This method fails, however, if you wish to overlap one graph with another,
16909  for example.
16910  You would then have to fumble while speaking to align the two separate,
16911  overlapping 
16912 \family sans
16913 Slide
16914 \family default
16915 s to align the two graphs.
16916  The use of an 
16917 \family sans
16918 Overlay
16919 \family default
16920  environment in both cases makes life much easier.
16921 \end_layout
16922
16923 \begin_layout Standard
16924 Each 
16925 \family sans
16926 Overlay
16927 \family default
16928  receives the page number of its 
16929 \begin_inset Quotes eld
16930 \end_inset
16931
16932 parent
16933 \begin_inset Quotes erd
16934 \end_inset
16935
16936  
16937 \family sans
16938 Slide
16939 \family default
16940 , appended by 
16941 \begin_inset Quotes eld
16942 \end_inset
16943
16944
16945 \family typewriter
16946 -a
16947 \family default
16948
16949 \begin_inset Quotes erd
16950 \end_inset
16951
16952 .
16953 \begin_inset Foot
16954 status collapsed
16955
16956 \begin_layout Plain Layout
16957 Presumably, mutliple 
16958 \family sans
16959 Overlay
16960 \family default
16961 s would have 
16962 \begin_inset Quotes eld
16963 \end_inset
16964
16965
16966 \family typewriter
16967 -a
16968 \family default
16969
16970 \begin_inset Quotes erd
16971 \end_inset
16972
16973
16974 \begin_inset Quotes eld
16975 \end_inset
16976
16977
16978 \family typewriter
16979 -b
16980 \family default
16981
16982 \begin_inset Quotes erd
16983 \end_inset
16984
16985
16986 \begin_inset Quotes eld
16987 \end_inset
16988
16989
16990 \family typewriter
16991 -c
16992 \family default
16993
16994 \begin_inset Quotes erd
16995 \end_inset
16996
16997 , etc.
16998 \begin_inset space ~
16999 \end_inset
17000
17001 appended to the page number of the parent 
17002 \family sans
17003 Slide
17004 \family default
17005 .
17006  
17007 \end_layout
17008
17009 \end_inset
17010
17011  Clearly, you want the contents of both the 
17012 \family sans
17013 Slide
17014 \family default
17015  and the 
17016 \family sans
17017 Overlay
17018 \family default
17019  to each fit on a single physical slide! You should probably consider an
17020  
17021 \family sans
17022 Overlay
17023 \family default
17024  as 
17025 \begin_inset Quotes eld
17026 \end_inset
17027
17028 part of
17029 \begin_inset Quotes erd
17030 \end_inset
17031
17032  a 
17033 \family sans
17034 Slide
17035 \family default
17036 .
17037  Indeed, the LyX 
17038 \family sans
17039 slides
17040 \family default
17041  class provides a visual cue for this: the label at the start of an 
17042 \family sans
17043 Overlay
17044 \family default
17045  is shorter than that at the start of a 
17046 \family sans
17047 Slide
17048 \family default
17049 .
17050  Lastly, when you generate printable output, you'll find alignment markers
17051  in all four corners of both the 
17052 \family sans
17053 Overlay
17054 \family default
17055  page and its parent 
17056 \family sans
17057 Slide
17058 \family default
17059 .
17060  These will assist you in lining up the two physical slides.
17061 \end_layout
17062
17063 \begin_layout Standard
17064 The major problem in overlaying two slides is aligning the contents of the
17065  two transparencies.
17066  How much space should you leave for that graph on the second slide? Worse
17067  still, what if you want a graph and a sentence on second slide, but there
17068  is text on the main transparency that goes in between them? You could try
17069  and insert vertical space of the right size.
17070  The better way is to use 
17071 \family sans
17072 InvisibleText
17073 \family default
17074  and 
17075 \family sans
17076 VisibleText
17077 \family default
17078 .
17079 \end_layout
17080
17081 \begin_layout Standard
17082 As their names imply, 
17083 \family sans
17084 InvisibleText
17085 \family default
17086  and 
17087 \family sans
17088 VisibleText
17089 \family default
17090  are two command-like paragraph environments that make all subsequent text
17091  invisible and visible, respectively.
17092  Note from section
17093 \begin_inset space ~
17094 \end_inset
17095
17096
17097 \begin_inset CommandInset ref
17098 LatexCommand ref
17099 reference "sec:slideQuirk"
17100
17101 \end_inset
17102
17103  that you don't place anything 
17104 \emph on
17105 into
17106 \emph default
17107  these two environments, however.
17108  When you create an 
17109 \family sans
17110 InvisibleText
17111 \family default
17112 , it inserts a centered, sky-blue label into the page reading 
17113 \begin_inset Quotes eld
17114 \end_inset
17115
17116 <Invisible Text Follows>
17117 \begin_inset Quotes erd
17118 \end_inset
17119
17120 .
17121  For paragraphs following this label, the parts of the 
17122 \family sans
17123 Slide
17124 \family default
17125  [or 
17126 \family sans
17127 Overlay
17128 \family default
17129 ; it doesn't matter which] where they would be contain instead blank space.
17130  
17131 \end_layout
17132
17133 \begin_layout Standard
17134 For 
17135 \family sans
17136 VisibleText
17137 \family default
17138 , the corresponding centered label is 
17139 \begin_inset Quotes eld
17140 \end_inset
17141
17142 <Visible Text Follows>
17143 \begin_inset Quotes erd
17144 \end_inset
17145
17146  in blazing green.
17147  Paragraphs following this label behave normally.
17148  Note that the beginning of a new 
17149 \family sans
17150 Slide
17151 \family default
17152
17153 \family sans
17154 Overlay
17155 \family default
17156 , or 
17157 \family sans
17158 Note
17159 \family default
17160  automatically shuts off an 
17161 \family sans
17162 InvisibleText
17163 \family default
17164 .
17165  It's therefore not necessary to use 
17166 \family sans
17167 VisibleText
17168 \family default
17169  at the end of a 
17170 \family sans
17171 Slide
17172 \family default
17173 .
17174 \end_layout
17175
17176 \begin_layout Standard
17177 By now, it should be obvious how to create overlay transparencies using
17178  the proper combination of 
17179 \family sans
17180 InvisibleText
17181 \family default
17182  and 
17183 \family sans
17184 VisibleText
17185 \family default
17186  on a 
17187 \family sans
17188 Slide
17189 \family default
17190  and 
17191 \family sans
17192 Overlay
17193 \family default
17194 :
17195 \end_layout
17196
17197 \begin_layout Enumerate
17198 Create a 
17199 \family sans
17200 Slide
17201 \family default
17202 , including everything that will appear on it, whether on the main slide
17203  or on the 
17204 \family sans
17205 Overlay
17206 \family default
17207 .
17208 \end_layout
17209
17210 \begin_layout Enumerate
17211 Before each figure or paragraph that will appear only on the 
17212 \family sans
17213 Overlay
17214 \family default
17215 , insert an 
17216 \family sans
17217 InvisibleText
17218 \family default
17219  environment.
17220  If necessary, insert a 
17221 \family sans
17222 VisibleText
17223 \family default
17224  environment after the 
17225 \family sans
17226 Overlay
17227 \family default
17228 -only text.
17229 \end_layout
17230
17231 \begin_layout Enumerate
17232 Start an 
17233 \family sans
17234 Overlay
17235 \family default
17236  immediately following the 
17237 \family sans
17238 Slide
17239 \family default
17240 .
17241 \end_layout
17242
17243 \begin_layout Enumerate
17244 Copy the contents of this 
17245 \family sans
17246 Slide
17247 \family default
17248  into the 
17249 \family sans
17250 Overlay
17251 \family default
17252 .
17253 \end_layout
17254
17255 \begin_layout Enumerate
17256 Within the 
17257 \family sans
17258 Overlay
17259 \family default
17260 , change all of the 
17261 \family sans
17262 InvisibleText
17263 \family default
17264  lines to 
17265 \family sans
17266 VisibleText
17267 \family default
17268  and vice-versa.
17269 \end_layout
17270
17271 \begin_layout Standard
17272 That's it.
17273  You've just made an 
17274 \family sans
17275 Overlay
17276 \family default
17277 .
17278 \end_layout
17279
17280 \begin_layout Standard
17281 There's one problem with the way I've designed the LyX 
17282 \family sans
17283 slides
17284 \family default
17285  class: you can't make text in the middle of a paragraph invisible, nor
17286  make text in the middle of an invisible paragraph visible again.
17287  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17288 \begin_inset Foot
17289 status collapsed
17290
17291 \begin_layout Plain Layout
17292 The commands of interest are: 
17293 \end_layout
17294
17295 \begin_layout Itemize
17296
17297 \family typewriter
17298 {
17299 \backslash
17300 invisible \SpecialChar \ldots{}
17301  }
17302 \end_layout
17303
17304 \begin_layout Itemize
17305
17306 \family typewriter
17307 {
17308 \backslash
17309 visible \SpecialChar \ldots{}
17310  }
17311 \end_layout
17312
17313 \begin_layout Plain Layout
17314 \SpecialChar \ldots{}
17315 and need to be marked as TeX.
17316  The text whose 
17317 \begin_inset Quotes eld
17318 \end_inset
17319
17320 visibility
17321 \begin_inset Quotes erd
17322 \end_inset
17323
17324  you wish to change goes in between the brackets [and after the 
17325 \family typewriter
17326
17327 \backslash
17328 invisible
17329 \family default
17330  or 
17331 \family typewriter
17332
17333 \backslash
17334 visible
17335 \family default
17336  command].
17337  If you don't know how to mark text as TeX, see the appropriate section
17338  of the 
17339 \emph on
17340 User's Guide
17341 \emph default
17342 .
17343 \end_layout
17344
17345 \end_inset
17346
17347
17348 \end_layout
17349
17350 \begin_layout Subsubsection
17351 Using 
17352 \family sans
17353 Note
17354 \family default
17355  with 
17356 \family sans
17357 Slide
17358 \family default
17359
17360 \begin_inset CommandInset label
17361 LatexCommand label
17362 name "sec:slideNote"
17363
17364 \end_inset
17365
17366
17367 \end_layout
17368
17369 \begin_layout Standard
17370 Like an 
17371 \family sans
17372 Overlay
17373 \family default
17374 , a 
17375 \family sans
17376 Note
17377 \family default
17378  is associated with a 
17379 \begin_inset Quotes eld
17380 \end_inset
17381
17382 parent
17383 \begin_inset Quotes erd
17384 \end_inset
17385
17386  
17387 \family sans
17388 Slide
17389 \family default
17390 .
17391  Here, too, the LyX 
17392 \family sans
17393 slides
17394 \family default
17395  class provides visual cues.
17396  The label for a 
17397 \family sans
17398 Note
17399 \family default
17400  is shorter than that of a 
17401 \family sans
17402 Slide
17403 \family default
17404  [yet longer than that of an 
17405 \family sans
17406 Overlay
17407 \family default
17408 ] and, like the label of an 
17409 \family sans
17410 Overlay
17411 \family default
17412  is shockingly magenta.
17413  Additionally, the printed 
17414 \family sans
17415 Note
17416 \family default
17417  has the page number of its 
17418 \begin_inset Quotes eld
17419 \end_inset
17420
17421 parent
17422 \begin_inset Quotes erd
17423 \end_inset
17424
17425  
17426 \family sans
17427 Slide
17428 \family default
17429 , appended by 
17430 \begin_inset Quotes eld
17431 \end_inset
17432
17433
17434 \family typewriter
17435 -
17436 \family default
17437 1
17438 \begin_inset Quotes erd
17439 \end_inset
17440
17441
17442 \begin_inset Quotes eld
17443 \end_inset
17444
17445
17446 \family typewriter
17447 -
17448 \family default
17449 2
17450 \begin_inset Quotes erd
17451 \end_inset
17452
17453
17454 \begin_inset Quotes eld
17455 \end_inset
17456
17457
17458 \family typewriter
17459 -
17460 \family default
17461 3
17462 \begin_inset Quotes erd
17463 \end_inset
17464
17465 , etc.
17466  You can have multiple 
17467 \family sans
17468 Note
17469 \family default
17470 s associated with a single 
17471 \family sans
17472 Slide
17473 \family default
17474 , and, as with 
17475 \family sans
17476 Slide
17477 \family default
17478  and 
17479 \family sans
17480 Overlay
17481 \family default
17482 , you'll probably want to break up long 
17483 \family sans
17484 Note
17485 \family default
17486 s so that they fit on a single sheet of paper.
17487 \end_layout
17488
17489 \begin_layout Standard
17490 The purpose of a 
17491 \family sans
17492 Note
17493 \family default
17494  is obvious: it contains anything additional you might want to say about
17495  a 
17496 \family sans
17497 Slide
17498 \family default
17499 .
17500  It could also be used as a sheet of reminders for a particular 
17501 \family sans
17502 Slide
17503 \family default
17504 .
17505  In the case of the latter, you might want to make use of time markers.
17506  Currently, the LyX 
17507 \family sans
17508 slides
17509 \family default
17510  class has no 
17511 \begin_inset Quotes eld
17512 \end_inset
17513
17514 native
17515 \begin_inset Quotes erd
17516 \end_inset
17517
17518  support for time markers, a 
17519 \noun on
17520 SliTeX
17521 \noun default
17522  feature.
17523  So, you'll have to resort to using the LaTeX codes.
17524 \end_layout
17525
17526 \begin_layout Standard
17527 To use time markers, you'll need to specify the extra class option 
17528 \begin_inset Quotes eld
17529 \end_inset
17530
17531
17532 \family typewriter
17533 clock
17534 \family default
17535
17536 \begin_inset Quotes erd
17537 \end_inset
17538
17539  [see section
17540 \begin_inset space ~
17541 \end_inset
17542
17543
17544 \begin_inset CommandInset ref
17545 LatexCommand ref
17546 reference "sec:slidesetup"
17547
17548 \end_inset
17549
17550 ].
17551  This option turns on timing marks, which will appear in the lower-left-hand
17552  corner of every 
17553 \family sans
17554 Note
17555 \family default
17556  you generate.
17557  To set what appears in the time marker, you use the LaTeX commands 
17558 \begin_inset Quotes eld
17559 \end_inset
17560
17561
17562 \family typewriter
17563
17564 \backslash
17565 settime{}
17566 \family default
17567
17568 \begin_inset Quotes erd
17569 \end_inset
17570
17571  and 
17572 \begin_inset Quotes eld
17573 \end_inset
17574
17575
17576 \family typewriter
17577
17578 \backslash
17579 addtime{}
17580 \family default
17581
17582 \begin_inset Quotes erd
17583 \end_inset
17584
17585 .
17586  The arguments of both commands are time measured in seconds.
17587  
17588 \begin_inset Quotes eld
17589 \end_inset
17590
17591
17592 \family typewriter
17593
17594 \backslash
17595 settime{}
17596 \family default
17597
17598 \begin_inset Quotes erd
17599 \end_inset
17600
17601  sets the time marker to a given time.
17602  
17603 \begin_inset Quotes eld
17604 \end_inset
17605
17606
17607 \family typewriter
17608
17609 \backslash
17610 addtime{}
17611 \family default
17612
17613 \begin_inset Quotes erd
17614 \end_inset
17615
17616  increments the time marker by the specified amount.
17617  Using time markers and 
17618 \family sans
17619 Note
17620 \family default
17621 s in this fashion, you can remind yourself how much time to spend on a particula
17622
17623 \family sans
17624 Slide
17625 \family default
17626 .
17627 \end_layout
17628
17629 \begin_layout Standard
17630 There's one last feature to describe.
17631  Clearly, you'd like to print out all of your 
17632 \family sans
17633 Slide
17634 \family default
17635 s and 
17636 \family sans
17637 Overlay
17638 \family default
17639 s on transparencies while printing all of your 
17640 \family sans
17641 Note
17642 \family default
17643 s on plain paper.
17644  However, a 
17645 \family sans
17646 Note
17647 \family default
17648  
17649 \emph on
17650 must
17651 \emph default
17652  follow the 
17653 \family sans
17654 Slide
17655 \family default
17656  with which it is associated.
17657  What's a person to do?
17658 \end_layout
17659
17660 \begin_layout Standard
17661 Luckily, there are two LaTeX commands that allow you to select what to print
17662  out.
17663  Both must be placed into the preamble of your document.
17664  The command 
17665 \begin_inset Quotes eld
17666 \end_inset
17667
17668
17669 \family typewriter
17670
17671 \backslash
17672 onlyslides{
17673 \backslash
17674 slides}
17675 \family default
17676
17677 \begin_inset Quotes erd
17678 \end_inset
17679
17680  will cause the output to contain only the 
17681 \family sans
17682 Slide
17683 \family default
17684 s and 
17685 \family sans
17686 Overlay
17687 \family default
17688 s.
17689  Correspondingly, the command 
17690 \begin_inset Quotes eld
17691 \end_inset
17692
17693
17694 \family typewriter
17695
17696 \backslash
17697 onlynotes{
17698 \backslash
17699 notes}
17700 \family default
17701
17702 \begin_inset Quotes erd
17703 \end_inset
17704
17705  prevents the output of anything but 
17706 \family sans
17707 Note
17708 \family default
17709 s.
17710  I'd advise placing both commands in the preamble and initially comment
17711  both out.
17712  You can then preview your entire presentation as you write.
17713  When you're done writing, you can then uncomment one of the two to select
17714  what you want to print.
17715  I like to uncomment 
17716 \begin_inset Quotes eld
17717 \end_inset
17718
17719
17720 \family typewriter
17721
17722 \backslash
17723 onlyslides{
17724 \backslash
17725 slides}
17726 \family default
17727
17728 \begin_inset Quotes erd
17729 \end_inset
17730
17731  , print to a file with 
17732 \begin_inset Quotes eld
17733 \end_inset
17734
17735
17736 \family typewriter
17737 -slides
17738 \family default
17739
17740 \begin_inset Quotes erd
17741 \end_inset
17742
17743  in its name, comment it back out, then uncomment 
17744 \begin_inset Quotes eld
17745 \end_inset
17746
17747
17748 \family typewriter
17749
17750 \backslash
17751 onlynotes{
17752 \backslash
17753 notes}
17754 \family default
17755
17756 \begin_inset Quotes erd
17757 \end_inset
17758
17759  and print to a 
17760 \begin_inset Quotes eld
17761 \end_inset
17762
17763
17764 \family typewriter
17765 *-notes.ps
17766 \family default
17767
17768 \begin_inset Quotes erd
17769 \end_inset
17770
17771  file.
17772  I can then send either file to a printer, loading transparencies or plain
17773  paper as appropriate.
17774 \end_layout
17775
17776 \begin_layout Standard
17777 You can also provide other arguments to the 
17778 \begin_inset Quotes eld
17779 \end_inset
17780
17781
17782 \family typewriter
17783
17784 \backslash
17785 onlyslides{}
17786 \family default
17787
17788 \begin_inset Quotes erd
17789 \end_inset
17790
17791  and 
17792 \begin_inset Quotes eld
17793 \end_inset
17794
17795
17796 \family typewriter
17797
17798 \backslash
17799 onlynotes{}
17800 \family default
17801
17802 \begin_inset Quotes erd
17803 \end_inset
17804
17805  commands.
17806  See a good LaTeX book for details.
17807 \end_layout
17808
17809 \begin_layout Subsection
17810 The 
17811 \family sans
17812 slides
17813 \family default
17814  Class Template File
17815 \end_layout
17816
17817 \begin_layout Standard
17818 I have also provided a template file, 
17819 \begin_inset Quotes eld
17820 \end_inset
17821
17822
17823 \family typewriter
17824 slides.lyx
17825 \family default
17826
17827 \begin_inset Quotes erd
17828 \end_inset
17829
17830 , with the 
17831 \family sans
17832 slides
17833 \family default
17834  class.
17835  To use it, begin your new presentation with 
17836 \family sans
17837 \bar under
17838 F
17839 \bar default
17840 ile\SpecialChar \menuseparator
17841 New
17842 \begin_inset space ~
17843 \end_inset
17844
17845 from
17846 \begin_inset space ~
17847 \end_inset
17848
17849
17850 \bar under
17851 T
17852 \bar default
17853 emplate
17854 \family default
17855 .
17856  Your new LyX presentation file will contain an example 
17857 \family sans
17858 Slide
17859 \family default
17860  – 
17861 \family sans
17862 Overlay
17863 \family default
17864  – 
17865 \family sans
17866 Note
17867 \family default
17868  triplet.
17869  The 
17870 \family sans
17871 Slide
17872 \family default
17873  and 
17874 \family sans
17875 Overlay
17876 \family default
17877  additionally contain an example of the use of 
17878 \family sans
17879 InvisibleText
17880 \family default
17881  and 
17882 \family sans
17883 VisibleText
17884 \family default
17885 .
17886  Lastly, the preamble will contain:
17887 \end_layout
17888
17889 \begin_layout LyX-Code
17890 % Uncomment to print out only slides and overlays
17891 \end_layout
17892
17893 \begin_layout LyX-Code
17894 %
17895 \end_layout
17896
17897 \begin_layout LyX-Code
17898 %
17899 \backslash
17900 onlyslides{
17901 \backslash
17902 slides}
17903 \begin_inset Newline newline
17904 \end_inset
17905
17906  
17907 \end_layout
17908
17909 \begin_layout LyX-Code
17910 % Uncomment to print out only notes
17911 \end_layout
17912
17913 \begin_layout LyX-Code
17914 %
17915 \end_layout
17916
17917 \begin_layout LyX-Code
17918 %
17919 \backslash
17920 onlynotes{
17921 \backslash
17922 notes}
17923 \end_layout
17924
17925 \begin_layout Standard
17926 One final thing: I created this class to support the LaTeX2e 
17927 \begin_inset Quotes eld
17928 \end_inset
17929
17930
17931 \noun on
17932 SliTeX
17933 \noun default
17934  emulation
17935 \begin_inset Quotes erd
17936 \end_inset
17937
17938  class, one of the built-in LaTeX2e classes.
17939  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17940  built-in slide class.
17941  It's here if you want it or need it.
17942  There exist other LaTeX2e classes for creating presentations, such as the
17943  
17944 \family sans
17945 Foils
17946 \family default
17947  class [see section
17948 \begin_inset space ~
17949 \end_inset
17950
17951
17952 \begin_inset CommandInset ref
17953 LatexCommand ref
17954 reference "sec:foiltex"
17955
17956 \end_inset
17957
17958 ] or the 
17959 \begin_inset Quotes eld
17960 \end_inset
17961
17962
17963 \family typewriter
17964 seminar
17965 \family default
17966
17967 \begin_inset Quotes erd
17968 \end_inset
17969
17970  package [present on some TeX distributions].
17971  The latter is not yet supported under LyX.
17972 \begin_inset Foot
17973 status collapsed
17974
17975 \begin_layout Plain Layout
17976 Perhaps you can take on the task\SpecialChar \ldots{}
17977
17978 \end_layout
17979
17980 \end_inset
17981
17982  I know nothing about these other classes.
17983  Try them out to see what sort of alternative they provide.
17984 \end_layout
17985
17986 \begin_layout Chapter
17987 LyX Features needing Extra Software
17988 \end_layout
17989
17990 \begin_layout Section
17991 Checking TeX
17992 \end_layout
17993
17994 \begin_layout Standard
17995 by 
17996 \noun on
17997 Asger Alstrup
17998 \end_layout
17999
18000 \begin_layout Subsection
18001 Introduction
18002 \end_layout
18003
18004 \begin_layout Standard
18005 If you have the 
18006 \family typewriter
18007 chktex
18008 \family default
18009  program installed
18010 \begin_inset Foot
18011 status collapsed
18012
18013 \begin_layout Plain Layout
18014
18015 \family typewriter
18016 chktex
18017 \family default
18018  is not yet available when you are using the LaTeX distribution MiKTeX.
18019 \end_layout
18020
18021 \end_inset
18022
18023 , you'll find in the 
18024 \family sans
18025 Tools
18026 \family default
18027  menu the entry: 
18028 \family sans
18029 Check
18030 \begin_inset space ~
18031 \end_inset
18032
18033 TeX
18034 \family default
18035 .
18036  You can get 
18037 \family typewriter
18038 chktex
18039 \family default
18040  from CTAN,
18041 \begin_inset Newline newline
18042 \end_inset
18043
18044
18045 \begin_inset CommandInset href
18046 LatexCommand href
18047 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
18048
18049 \end_inset
18050
18051 .
18052 \end_layout
18053
18054 \begin_layout Standard
18055 The 
18056 \family sans
18057 ChkTeX
18058 \family default
18059  package is a program that was written by 
18060 \begin_inset Flex Noun
18061 status collapsed
18062
18063 \begin_layout Plain Layout
18064 Jens T.
18065 \begin_inset space ~
18066 \end_inset
18067
18068 Berger Thielemann
18069 \end_layout
18070
18071 \end_inset
18072
18073  in frustration because some constructs in LaTeX are sometimes non-intuitive,
18074  and easy to forget.
18075  The program runs over your LaTeX file, checks the integrity of the file,
18076  and flags some common errors.
18077  In other technical words, it is 
18078 \family typewriter
18079 lint
18080 \family default
18081  for LaTeX.
18082 \end_layout
18083
18084 \begin_layout Standard
18085 Well, what is a syntax checker doing in LyX which is supposed to produce
18086  correct LaTeX anyways? The answer is simple: Just as 
18087 \family typewriter
18088 Lint
18089 \family default
18090  not only checks the 
18091 \emph on
18092 syntax
18093 \emph default
18094  of C programs, but also does 
18095 \emph on
18096 semantic
18097 \emph default
18098  checks for type-errors, 
18099 \family sans
18100 ChkTeX
18101 \family default
18102  catches some common 
18103 \emph on
18104 typographic
18105 \emph default
18106  errors, in addition to the syntactical ones.
18107  Specifically, 
18108 \family sans
18109 ChkTeX
18110 \family default
18111  is capable of detecting several common errors, such as
18112 \end_layout
18113
18114 \begin_layout Itemize
18115 Ellipsis detection:
18116 \begin_inset Newline newline
18117 \end_inset
18118
18119 Use \SpecialChar \ldots{}
18120  instead of ...
18121 \end_layout
18122
18123 \begin_layout Itemize
18124 No space in front of/after parenthesis:
18125 \begin_inset Newline newline
18126 \end_inset
18127
18128 ( wrong spacing )
18129 \end_layout
18130
18131 \begin_layout Itemize
18132 Enforcement of normal space after common abbreviations:
18133 \begin_inset Newline newline
18134 \end_inset
18135
18136 e.
18137 \begin_inset space \thinspace{}
18138 \end_inset
18139
18140 g.
18141 \begin_inset space \space{}
18142 \end_inset
18143
18144 is too wide spacing.
18145 \end_layout
18146
18147 \begin_layout Itemize
18148 Enforcement of end-of-sentence space when the last sentence ends with a
18149  capital letter:
18150 \begin_inset Newline newline
18151 \end_inset
18152
18153 This is a TEST.
18154  And this is wrong spacing.
18155 \end_layout
18156
18157 \begin_layout Itemize
18158 Space in front of labels and similar commands:
18159 \begin_inset Newline newline
18160 \end_inset
18161
18162 The label should stick right up to the text to avoid falling to a wrong
18163  page.
18164  
18165 \begin_inset CommandInset label
18166 LatexCommand label
18167 name "sec:chktex"
18168
18169 \end_inset
18170
18171  
18172 \begin_inset Foot
18173 status collapsed
18174
18175 \begin_layout Plain Layout
18176 This footnote is in danger of falling off to a wrong page
18177 \end_layout
18178
18179 \end_inset
18180
18181  The label is separated too much.
18182 \end_layout
18183
18184 \begin_layout Itemize
18185 Space in front of references, instead of hard spaces:
18186 \begin_inset Newline newline
18187 \end_inset
18188
18189 If you have bad luck, the text will break right between the referenced text
18190  and reference number, and that's a pity.
18191  See section 
18192 \begin_inset CommandInset ref
18193 LatexCommand ref
18194 reference "sec:chktex"
18195
18196 \end_inset
18197
18198 .
18199 \end_layout
18200
18201 \begin_layout Itemize
18202 Use of 
18203 \begin_inset Quotes eld
18204 \end_inset
18205
18206 x
18207 \begin_inset Quotes erd
18208 \end_inset
18209
18210  instead of 
18211 \begin_inset Formula $\times$
18212 \end_inset
18213
18214  between numbers:
18215 \begin_inset Newline newline
18216 \end_inset
18217
18218 2x2 looks cheap compared to 
18219 \begin_inset Formula $2\times2$
18220 \end_inset
18221
18222 .
18223 \end_layout
18224
18225 \begin_layout Standard
18226 and more \SpecialChar \ldots{}
18227  It is an invaluable tool when you are 
18228 \begin_inset Quotes eld
18229 \end_inset
18230
18231 finishing up
18232 \begin_inset Quotes erd
18233 \end_inset
18234
18235  your document before printing, and you should run it right after the obligatory
18236  spelling check, and before you go fine tuning the typesetting.
18237 \end_layout
18238
18239 \begin_layout Subsection
18240 How to use it
18241 \end_layout
18242
18243 \begin_layout Standard
18244 If you have the program installed, usage is as simple as choosing 
18245 \family sans
18246 Tools\SpecialChar \menuseparator
18247 Check
18248 \begin_inset space ~
18249 \end_inset
18250
18251 TeX
18252 \family default
18253 .
18254  This will make LyX generate a LaTeX file of your document, start 
18255 \family sans
18256 ChkTeX
18257 \family default
18258  to check it, and then make LyX insert 
18259 \begin_inset Quotes eld
18260 \end_inset
18261
18262 error boxes
18263 \begin_inset Quotes erd
18264 \end_inset
18265
18266  with the warnings from 
18267 \family sans
18268 ChkTeX
18269 \family default
18270 , if there were any.
18271  The warnings will be placed close to the point of the mistake, and you
18272  can quickly find them by using the 
18273 \family sans
18274 Navigate\SpecialChar \menuseparator
18275 Error
18276 \family default
18277  menu item, or the shortcut key 
18278 \family sans
18279 C-g
18280 \family default
18281  from the default 
18282 \family typewriter
18283 cua
18284 \family default
18285  bind file.
18286  Open the error boxes by clicking on them with the mouse, or use the shortcut
18287  key 
18288 \family sans
18289 C-i
18290 \family default
18291  from 
18292 \family typewriter
18293 cua
18294 \family default
18295  bindings, or the corresponding 
18296 \family sans
18297 C-o
18298 \family default
18299  for the alternate 
18300 \family typewriter
18301 emacs
18302 \family default
18303  bind file.
18304  Read the warning and correct the mistake, if it is a mistake.
18305  If you have trouble understanding what the warning is about, you can safely
18306  ignore it.
18307  Remember that there is a hidden layer between the document on screen and
18308  the technical details in invoking 
18309 \family sans
18310 ChkTeX
18311 \family default
18312 , and this gap can make some warnings seem arcane or just plain silly.
18313 \end_layout
18314
18315 \begin_layout Standard
18316 This document is an excellent testing bed for the feature, and it should
18317  provide quite a few warnings for you to fiddle with.
18318  Since computers are only so smart, expect most of the warnings to be false
18319  alarms, though.
18320 \end_layout
18321
18322 \begin_layout Subsection
18323 How to fine tune it
18324 \end_layout
18325
18326 \begin_layout Standard
18327 Sometimes, you'll find that 
18328 \family sans
18329 ChkTeX
18330 \family default
18331  makes more noise than suits your mood.
18332  Then you can choose not to use it, wait until your mood changes, or try
18333  to customize 
18334 \family sans
18335 ChkTeX
18336 \family default
18337  to get better along with you.
18338 \end_layout
18339
18340 \begin_layout Standard
18341 Although 
18342 \family sans
18343 ChkTeX
18344 \family default
18345  
18346 \emph on
18347 is
18348 \emph default
18349  very configurable and extensible, you should not expect to solve all problems
18350  with 
18351 \family sans
18352 ChkTeX
18353 \family default
18354  in LyX this way.
18355  Since LyX has to generate a somewhat special LaTeX file to be able to match
18356  the line numbers from the 
18357 \family sans
18358 ChkTeX
18359 \family default
18360  output
18361 \begin_inset Foot
18362 status collapsed
18363
18364 \begin_layout Plain Layout
18365 You can inspect the specific output from 
18366 \family sans
18367 chktex
18368 \family default
18369  by using 
18370 \family sans
18371 Document\SpecialChar \menuseparator
18372 LaTeX
18373 \begin_inset space ~
18374 \end_inset
18375
18376 Log
18377 \family default
18378  right after a 
18379 \family sans
18380 chktex
18381 \family default
18382  run.
18383 \end_layout
18384
18385 \end_inset
18386
18387  to the internal document structure, some of the warnings will not appear
18388  correctly.
18389  There are two things you can do about this:
18390 \end_layout
18391
18392 \begin_layout Itemize
18393 Fine tune the 
18394 \family sans
18395 ChkTeX
18396 \family default
18397  invocation command line in 
18398 \begin_inset Flex MenuItem
18399 status collapsed
18400
18401 \begin_layout Plain Layout
18402 Tools\SpecialChar \menuseparator
18403 Preferences\SpecialChar \menuseparator
18404 Output\SpecialChar \menuseparator
18405 LaTeX\SpecialChar \menuseparator
18406 CheckTeX command
18407 \end_layout
18408
18409 \end_inset
18410
18411 , or the global 
18412 \family sans
18413 ChkTeX
18414 \family default
18415  installation configuration file (usually with the file 
18416 \family typewriter
18417 chktexrc
18418 \family default
18419 ).
18420  See below to learn what warnings can be enabled and disabled on the command
18421  line.
18422 \end_layout
18423
18424 \begin_layout Itemize
18425 Export your document as a raw LaTeX file using 
18426 \family sans
18427 File\SpecialChar \menuseparator
18428 Export\SpecialChar \menuseparator
18429 LaTeX
18430 \family default
18431  and run 
18432 \family typewriter
18433 chktex
18434 \family default
18435  manually on that.
18436  Invoked in this way, it can be a hassle to find the corresponding place
18437  in the document inside LyX, but with a little patience, you should be able
18438  to do it.
18439 \end_layout
18440
18441 \begin_layout Standard
18442 Here follows the warning messages that can be enabled and disabled in 
18443 \family sans
18444 Preferences
18445 \family default
18446 .
18447  Use 
18448 \family typewriter
18449 -n#
18450 \family default
18451  to disable a warning, and 
18452 \family typewriter
18453 -w#
18454 \family default
18455  to enable a warning.
18456  The emphasized entries are disabled by default, because the default is
18457  "
18458 \family typewriter
18459 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18460 \family default
18461 ".
18462 \end_layout
18463
18464 \begin_layout Standard
18465 Notice that you should only use the options that enable and disable warnings,
18466  because LyX relies on some of the other command line parameters to be set
18467  in a specific way to have a chance to communicate with 
18468 \family typewriter
18469 chktex
18470 \family default
18471 .
18472 \end_layout
18473
18474 \begin_layout Enumerate
18475
18476 \size small
18477 \emph on
18478 Command terminated with space.
18479 \end_layout
18480
18481 \begin_layout Enumerate
18482
18483 \size small
18484 Non-breaking space (
18485 \begin_inset Quotes eld
18486 \end_inset
18487
18488
18489 \family typewriter
18490 ~
18491 \family default
18492
18493 \begin_inset Quotes erd
18494 \end_inset
18495
18496 ) should have been used.
18497 \end_layout
18498
18499 \begin_layout Enumerate
18500
18501 \size small
18502 \emph on
18503 You should enclose the previous parenthesis with 
18504 \begin_inset Quotes eld
18505 \end_inset
18506
18507
18508 \family typewriter
18509 {}
18510 \family default
18511
18512 \begin_inset Quotes erd
18513 \end_inset
18514
18515 .
18516 \end_layout
18517
18518 \begin_layout Enumerate
18519
18520 \size small
18521 Italic correction (
18522 \begin_inset Quotes eld
18523 \end_inset
18524
18525
18526 \family typewriter
18527
18528 \backslash
18529 /
18530 \family default
18531
18532 \begin_inset Quotes erd
18533 \end_inset
18534
18535 ) found in non-italic buffer.
18536 \end_layout
18537
18538 \begin_layout Enumerate
18539
18540 \size small
18541 Italic correction (
18542 \begin_inset Quotes eld
18543 \end_inset
18544
18545
18546 \family typewriter
18547
18548 \backslash
18549 /
18550 \family default
18551
18552 \begin_inset Quotes erd
18553 \end_inset
18554
18555 ) found more than once.
18556 \end_layout
18557
18558 \begin_layout Enumerate
18559
18560 \size small
18561 \emph on
18562 No italic correction (
18563 \begin_inset Quotes eld
18564 \end_inset
18565
18566
18567 \family typewriter
18568
18569 \backslash
18570 /
18571 \family default
18572
18573 \begin_inset Quotes erd
18574 \end_inset
18575
18576 ) found.
18577 \end_layout
18578
18579 \begin_layout Enumerate
18580
18581 \size small
18582 Accent command 
18583 \begin_inset Quotes eld
18584 \end_inset
18585
18586
18587 \family typewriter
18588 cmd
18589 \family default
18590
18591 \begin_inset Quotes erd
18592 \end_inset
18593
18594  needs use of 
18595 \begin_inset Quotes eld
18596 \end_inset
18597
18598
18599 \family typewriter
18600 cmd
18601 \family default
18602
18603 \begin_inset Quotes erd
18604 \end_inset
18605
18606 .
18607 \end_layout
18608
18609 \begin_layout Enumerate
18610
18611 \size small
18612 Wrong length of dash may have been used.
18613 \end_layout
18614
18615 \begin_layout Enumerate
18616
18617 \size small
18618 \emph on
18619 \begin_inset Quotes eld
18620 \end_inset
18621
18622
18623 \family typewriter
18624 %s
18625 \family default
18626
18627 \begin_inset Quotes erd
18628 \end_inset
18629
18630  expected, found 
18631 \begin_inset Quotes eld
18632 \end_inset
18633
18634
18635 \family typewriter
18636 %s
18637 \family default
18638
18639 \begin_inset Quotes erd
18640 \end_inset
18641
18642 .
18643 \end_layout
18644
18645 \begin_layout Enumerate
18646
18647 \size small
18648 Solo 
18649 \begin_inset Quotes eld
18650 \end_inset
18651
18652
18653 \family typewriter
18654 %s
18655 \family default
18656
18657 \begin_inset Quotes erd
18658 \end_inset
18659
18660  found.
18661 \end_layout
18662
18663 \begin_layout Enumerate
18664
18665 \size small
18666 You should use 
18667 \begin_inset Quotes eld
18668 \end_inset
18669
18670
18671 \family typewriter
18672 %s
18673 \family default
18674
18675 \begin_inset Quotes erd
18676 \end_inset
18677
18678  to achieve an ellipsis.
18679 \end_layout
18680
18681 \begin_layout Enumerate
18682
18683 \size small
18684 Inter-word spacing (
18685 \begin_inset Quotes eld
18686 \end_inset
18687
18688
18689 \family typewriter
18690
18691 \backslash
18692
18693 \family default
18694  
18695 \begin_inset Quotes eld
18696 \end_inset
18697
18698 ) should perhaps be used.
18699 \end_layout
18700
18701 \begin_layout Enumerate
18702
18703 \size small
18704 Inter-sentence spacing (
18705 \begin_inset Quotes eld
18706 \end_inset
18707
18708
18709 \family typewriter
18710
18711 \backslash
18712 @
18713 \family default
18714
18715 \begin_inset Quotes erd
18716 \end_inset
18717
18718 ) should perhaps be used.
18719 \end_layout
18720
18721 \begin_layout Enumerate
18722
18723 \size small
18724 Could not find argument for command.
18725 \end_layout
18726
18727 \begin_layout Enumerate
18728
18729 \size small
18730 No match found for 
18731 \begin_inset Quotes eld
18732 \end_inset
18733
18734
18735 \family typewriter
18736 %s
18737 \family default
18738
18739 \begin_inset Quotes erd
18740 \end_inset
18741
18742 .
18743 \end_layout
18744
18745 \begin_layout Enumerate
18746
18747 \size small
18748 Math mode still on at end of LaTeX file.
18749 \end_layout
18750
18751 \begin_layout Enumerate
18752
18753 \size small
18754 Number of 
18755 \begin_inset Quotes eld
18756 \end_inset
18757
18758
18759 \family typewriter
18760 char
18761 \family default
18762
18763 \begin_inset Quotes erd
18764 \end_inset
18765
18766  doesn't match the number of 
18767 \begin_inset Quotes eld
18768 \end_inset
18769
18770
18771 \family typewriter
18772 char
18773 \family default
18774
18775 \begin_inset Quotes erd
18776 \end_inset
18777
18778 .
18779 \end_layout
18780
18781 \begin_layout Enumerate
18782
18783 \size small
18784 You should use either 
18785 \family typewriter
18786
18787 \begin_inset Quotes eld
18788 \end_inset
18789
18790
18791 \family default
18792  or 
18793 \family typewriter
18794
18795 \begin_inset Quotes erd
18796 \end_inset
18797
18798
18799 \family default
18800  as an alternative to 
18801 \begin_inset Quotes eld
18802 \end_inset
18803
18804
18805 \family typewriter
18806 "
18807 \family default
18808
18809 \begin_inset Quotes erd
18810 \end_inset
18811
18812 .
18813 \end_layout
18814
18815 \begin_layout Enumerate
18816
18817 \size small
18818 You should use "
18819 \family typewriter
18820 '
18821 \family default
18822 " (ASCII 39) instead of "
18823 \family typewriter
18824 ´
18825 \family default
18826 " (ASCII 180).
18827 \end_layout
18828
18829 \begin_layout Enumerate
18830
18831 \size small
18832 User-specified pattern found.
18833 \end_layout
18834
18835 \begin_layout Enumerate
18836
18837 \size small
18838 This command might not be intended.
18839 \end_layout
18840
18841 \begin_layout Enumerate
18842
18843 \size small
18844 \emph on
18845 Comment displayed.
18846 \end_layout
18847
18848 \begin_layout Enumerate
18849
18850 \size small
18851 Either 
18852 \family typewriter
18853 ''
18854 \backslash
18855 ,'
18856 \family default
18857  or 
18858 \family typewriter
18859 '
18860 \backslash
18861 ,''
18862 \family default
18863  will look better.
18864 \end_layout
18865
18866 \begin_layout Enumerate
18867
18868 \size small
18869 Delete this space to maintain correct page references.
18870 \end_layout
18871
18872 \begin_layout Enumerate
18873
18874 \size small
18875 \emph on
18876 You might wish to put this between a pair of 
18877 \begin_inset Quotes eld
18878 \end_inset
18879
18880
18881 \family typewriter
18882 {}
18883 \family default
18884
18885 \begin_inset Quotes erd
18886 \end_inset
18887
18888 .
18889 \end_layout
18890
18891 \begin_layout Enumerate
18892
18893 \size small
18894 You ought to remove spaces in front of punctuation.
18895 \end_layout
18896
18897 \begin_layout Enumerate
18898
18899 \size small
18900 Could not execute LaTeX command.
18901 \end_layout
18902
18903 \begin_layout Enumerate
18904
18905 \size small
18906 Don't use 
18907 \family typewriter
18908
18909 \backslash
18910 /
18911 \family default
18912  in front of small punctuation.
18913 \end_layout
18914
18915 \begin_layout Enumerate
18916
18917 \family typewriter
18918 \size small
18919 $
18920 \backslash
18921 times$
18922 \family default
18923  may look prettier here.
18924 \end_layout
18925
18926 \begin_layout Enumerate
18927
18928 \size small
18929 \emph on
18930 Multiple spaces detected in output.
18931 \end_layout
18932
18933 \begin_layout Enumerate
18934
18935 \size small
18936 This text may be ignored.
18937 \end_layout
18938
18939 \begin_layout Enumerate
18940
18941 \size small
18942 Use 
18943 \family typewriter
18944
18945 \begin_inset Quotes eld
18946 \end_inset
18947
18948
18949 \family default
18950  to begin quotation, not 
18951 \family typewriter
18952 '
18953 \family default
18954 .
18955 \end_layout
18956
18957 \begin_layout Enumerate
18958
18959 \size small
18960 Use 
18961 \family typewriter
18962 '
18963 \family default
18964  to end quotation, not 
18965 \family typewriter
18966
18967 \begin_inset Quotes eld
18968 \end_inset
18969
18970
18971 \family default
18972 .
18973 \end_layout
18974
18975 \begin_layout Enumerate
18976
18977 \size small
18978 Don't mix quotes.
18979 \end_layout
18980
18981 \begin_layout Enumerate
18982
18983 \size small
18984 You should perhaps use 
18985 \begin_inset Quotes eld
18986 \end_inset
18987
18988
18989 \family typewriter
18990 cmd
18991 \family default
18992
18993 \begin_inset Quotes erd
18994 \end_inset
18995
18996  instead.
18997 \end_layout
18998
18999 \begin_layout Enumerate
19000
19001 \size small
19002 You should put a space in front of/after parenthesis.
19003 \end_layout
19004
19005 \begin_layout Enumerate
19006
19007 \size small
19008 You should avoid spaces in front of/after parenthesis.
19009 \end_layout
19010
19011 \begin_layout Enumerate
19012
19013 \size small
19014 \emph on
19015 You should not use punctuation in front of/after quotes.
19016 \end_layout
19017
19018 \begin_layout Enumerate
19019
19020 \size small
19021 Double space found.
19022 \end_layout
19023
19024 \begin_layout Enumerate
19025
19026 \size small
19027 You should put punctuation outside inner/inside display math mode.
19028 \end_layout
19029
19030 \begin_layout Enumerate
19031
19032 \size small
19033 You ought to not use primitive TeX in LaTeX code.
19034 \end_layout
19035
19036 \begin_layout Enumerate
19037
19038 \size small
19039 You should remove spaces in front of 
19040 \begin_inset Quotes eld
19041 \end_inset
19042
19043
19044 \family typewriter
19045 %s
19046 \family default
19047
19048 \begin_inset Quotes erd
19049 \end_inset
19050
19051
19052 \end_layout
19053
19054 \begin_layout Enumerate
19055
19056 \size small
19057 \begin_inset Quotes eld
19058 \end_inset
19059
19060
19061 \family typewriter
19062 %s
19063 \family default
19064
19065 \begin_inset Quotes erd
19066 \end_inset
19067
19068  is normally not followed by 
19069 \begin_inset Quotes eld
19070 \end_inset
19071
19072
19073 \family typewriter
19074 %c
19075 \family default
19076
19077 \begin_inset Quotes erd
19078 \end_inset
19079
19080 .
19081 \end_layout
19082
19083 \begin_layout Standard
19084 In later versions of LyX, we hope to provide a more complete interface to
19085  this tool (and it's smaller cousin 
19086 \family typewriter
19087 lacheck
19088 \family default
19089 ) to exploit the full power of it.
19090  But it's not exactly useless as it is now: go try it on one of your existing
19091  documents of a certain length and be surprised.
19092 \end_layout
19093
19094 \begin_layout Section
19095 Version Control in LyX
19096 \end_layout
19097
19098 \begin_layout Standard
19099 by
19100 \noun on
19101  Lars Gullik Bjønnes 
19102 \noun default
19103 and 
19104 \noun on
19105 Pavel Sanda
19106 \end_layout
19107
19108 \begin_layout Subsection
19109 Introduction
19110 \end_layout
19111
19112 \begin_layout Standard
19113 LyX supports some of the most basic RCS/CVS/SVN/GIT commands.
19114  If you need something a bit more sophisticated you will have to do that
19115  manually in a terminal.
19116 \end_layout
19117
19118 \begin_layout Standard
19119 Also note that CVS support is not as good as subversion support so we advise
19120  using SVN instead.
19121  A good place to start learning Subversion is SVN Book
19122 \begin_inset Foot
19123 status open
19124
19125 \begin_layout Plain Layout
19126 \begin_inset CommandInset href
19127 LatexCommand href
19128 target "http://svnbook.red-bean.com/"
19129
19130 \end_inset
19131
19132
19133 \end_layout
19134
19135 \end_inset
19136
19137 .
19138  In the case of RCS you should read 
19139 \begin_inset Quotes eld
19140 \end_inset
19141
19142 rcsintro
19143 \begin_inset Quotes erd
19144 \end_inset
19145
19146  (a man file, read it with 
19147 \family typewriter
19148 man rcsintro
19149 \family default
19150 ).
19151  This file describes all the basic features of RCS.
19152  You should especially notice the comment about a RCS directory, and the
19153  notion of a master RCS file (the file ending in 
19154 \family typewriter
19155 ,v
19156 \family default
19157 ).
19158 \end_layout
19159
19160 \begin_layout Standard
19161 Before you begin to use the version control features in LyX, you should
19162  be familiar with RCS/CVS/SVN/GIT usage.
19163  The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
19164  package — no guarantees are made for older versions.
19165  Most of the log messages are not currently displayed after operations —
19166  you can check them in the Messages pane if unsure.
19167  Regular users of version control will appreciate VC toolbar, which can
19168  be enabled via 
19169 \family sans
19170 View\SpecialChar \menuseparator
19171 Toolbars\SpecialChar \menuseparator
19172 Version
19173 \begin_inset space ~
19174 \end_inset
19175
19176 Control
19177 \family default
19178 .
19179 \end_layout
19180
19181 \begin_layout Standard
19182 For introducing your own external commands consult vc-command in the manual
19183  of LyX functions.
19184 \end_layout
19185
19186 \begin_layout Subsection
19187 RCS commands in LyX
19188 \end_layout
19189
19190 \begin_layout Standard
19191 The following sections describe the RCS commands supported by LyX.
19192  You can find them in the 
19193 \family sans
19194 File\SpecialChar \menuseparator
19195 Version
19196 \begin_inset space ~
19197 \end_inset
19198
19199 Control
19200 \family default
19201  submenu.
19202  LyX was tested against RCS 5.7/5.8
19203 \begin_inset Foot
19204 status open
19205
19206 \begin_layout Plain Layout
19207 Note that old DOS / MS Windows builds (5.7) need to setup environment variables
19208  in order to work properly with LyX.
19209  In particular time zone (TZ) should be set and more importantly RCSINIT
19210  in order to change default archive location ("SET RCSINIT=-x,v/") --- LyX
19211  expects archive to be found in file.lyx,v within the original document directory.
19212  See also README shipped with Windows RCS binaries.
19213 \end_layout
19214
19215 \end_inset
19216
19217 .
19218 \end_layout
19219
19220 \begin_layout Subsubsection
19221
19222 \family sans
19223 Register
19224 \end_layout
19225
19226 \begin_layout Standard
19227 If your document is not under revision control, this is the only item shown
19228  in the menu.
19229  And if it is under revision control, the 
19230 \family sans
19231 Register
19232 \family default
19233  item is not visible.
19234  
19235 \end_layout
19236
19237 \begin_layout Standard
19238 This command registers your document with RCS (unless you are under the
19239  directory managed by CVS)\SpecialChar \@.
19240  You are asked interactively to supply an initial
19241  description of the document.
19242  The document is now set in Read-Only mode and you have to 
19243 \family sans
19244 Check
19245 \begin_inset space ~
19246 \end_inset
19247
19248 Out
19249 \begin_inset space ~
19250 \end_inset
19251
19252 For
19253 \begin_inset space ~
19254 \end_inset
19255
19256 Edit
19257 \family default
19258 , before making any changes to it.
19259  A document under revision control has a 
19260 \begin_inset Quotes eld
19261 \end_inset
19262
19263 [RCS:<version> <locker>]
19264 \begin_inset Quotes erd
19265 \end_inset
19266
19267  item tagged to the filename in the minibuffer.
19268 \end_layout
19269
19270 \begin_layout Standard
19271 RCS command that is run: 
19272 \family typewriter
19273 ci -q -u -i -t-"<initial description>" <file-name>
19274 \end_layout
19275
19276 \begin_layout Standard
19277 Read 
19278 \family typewriter
19279 man ci
19280 \family default
19281  to understand the switches.
19282  
19283 \end_layout
19284
19285 \begin_layout Subsubsection
19286
19287 \family sans
19288 Check In Changes
19289 \end_layout
19290
19291 \begin_layout Standard
19292 When you are finished editing a file, you check in your changes.
19293  When you do this, you are asked for a description of the changes.
19294  This is stored in the history log.
19295  The version number is bumped, your changes are applied to the master RCS
19296  file, the document is unlocked and set to Read-Only mode.
19297 \end_layout
19298
19299 \begin_layout Standard
19300 RCS command: 
19301 \family typewriter
19302 ci -q -u -m"<description>" <file-name>
19303 \end_layout
19304
19305 \begin_layout Subsubsection
19306
19307 \family sans
19308 Check Out For Edit
19309 \end_layout
19310
19311 \begin_layout Standard
19312 By doing this you lock the document so that only you can edit it.
19313  This will also make the document Read-Write only for you.
19314  You will usually continue editing for a while and when you are finished
19315  you check in your changes.
19316  The status line is changed to reflect that you have locked the file.
19317 \end_layout
19318
19319 \begin_layout Standard
19320 RCS command: 
19321 \family typewriter
19322 co -q -l <file-name>
19323 \end_layout
19324
19325 \begin_layout Subsubsection
19326
19327 \family sans
19328 Revert To Repository Version
19329 \end_layout
19330
19331 \begin_layout Standard
19332 This will discard all changes made to the document since the last check
19333  in.
19334  You get a warning before changes are discarded.
19335 \end_layout
19336
19337 \begin_layout Standard
19338 RCS command: 
19339 \family typewriter
19340 co -f -u<version> <file-name>
19341 \end_layout
19342
19343 \begin_layout Subsubsection
19344
19345 \family sans
19346 Copy
19347 \end_layout
19348
19349 \begin_layout Standard
19350 This will create a copy of the current document.
19351  Since RCS does not support copy operations natively, the version history
19352  is not preserved, and the copy is added as a new file.
19353  It requires a clean document without any changes since the last checkin.
19354  You are asked for a file name and a description of the copy operation.
19355  After that the copy is created, both locally and in the repository.
19356  If the parent directories of the copied and original document differ, all
19357  relative paths of included files of the copy are adjusted (like in 
19358 \family sans
19359 File\SpecialChar \menuseparator
19360 Save As
19361 \family default
19362 \SpecialChar \ldots{}
19363 ).
19364  Finally, the copy is loaded instead of the original document.
19365 \end_layout
19366
19367 \begin_layout Labeling
19368 \labelwidthstring 00.00.0000
19369 RCS
19370 \begin_inset space ~
19371 \end_inset
19372
19373 commands: 
19374 \begin_inset space ~
19375 \end_inset
19376
19377
19378 \begin_inset Newline newline
19379 \end_inset
19380
19381 Copy 
19382 \begin_inset Flex Code
19383 status collapsed
19384
19385 \begin_layout Plain Layout
19386
19387 \family typewriter
19388 \begin_inset Quotes eld
19389 \end_inset
19390
19391 <file-name>
19392 \begin_inset Quotes erd
19393 \end_inset
19394
19395
19396 \end_layout
19397
19398 \end_inset
19399
19400  to 
19401 \begin_inset Flex Code
19402 status collapsed
19403
19404 \begin_layout Plain Layout
19405
19406 \family typewriter
19407 \begin_inset Quotes eld
19408 \end_inset
19409
19410 <new-file-name>
19411 \begin_inset Quotes erd
19412 \end_inset
19413
19414
19415 \end_layout
19416
19417 \end_inset
19418
19419
19420 \begin_inset Newline newline
19421 \end_inset
19422
19423
19424 \begin_inset Flex Code
19425 status collapsed
19426
19427 \begin_layout Plain Layout
19428 ci -q -u 
19429 \family typewriter
19430 -i 
19431 \begin_inset Quotes eld
19432 \end_inset
19433
19434 <new-file-name>
19435 \begin_inset Quotes erd
19436 \end_inset
19437
19438
19439 \end_layout
19440
19441 \end_inset
19442
19443
19444 \end_layout
19445
19446 \begin_layout Subsubsection
19447
19448 \family sans
19449 Undo Last Checkin
19450 \end_layout
19451
19452 \begin_layout Standard
19453 This makes as if the last check in never happened.
19454  No changes are made to the document loaded into LyX, but the last version
19455  is removed from the master RCS file.
19456 \end_layout
19457
19458 \begin_layout Standard
19459 RCS command: 
19460 \family typewriter
19461 rcs -o<version> <file-name>
19462 \end_layout
19463
19464 \begin_layout Subsubsection
19465
19466 \family sans
19467 Show History
19468 \end_layout
19469
19470 \begin_layout Standard
19471 This shows the complete history of the RCS document.
19472  The output of 
19473 \family typewriter
19474 rlog <file-name>
19475 \family default
19476  is shown in a browser.
19477  See 
19478 \family typewriter
19479 man rlog
19480 \family default
19481  for more info.
19482 \end_layout
19483
19484 \begin_layout Subsubsection
19485 Revision info
19486 \end_layout
19487
19488 \begin_layout Standard
19489 LyX supports RCS version number, author name, date and time of last commit.
19490  All those are extracted from 
19491 \family typewriter
19492 rlog -r <file-name>
19493 \family default
19494 .
19495  See 
19496 \begin_inset CommandInset ref
19497 LatexCommand ref
19498 reference "sub:VCS-Revision-Information"
19499
19500 \end_inset
19501
19502  for details.
19503 \end_layout
19504
19505 \begin_layout Subsection
19506 CVS commands in LyX
19507 \end_layout
19508
19509 \begin_layout Standard
19510 A subset of CVS operations is supported by LyX.
19511  You can find the commands in the 
19512 \family sans
19513 File\SpecialChar \menuseparator
19514 Version
19515 \begin_inset space ~
19516 \end_inset
19517
19518 Control
19519 \family default
19520  submenu.
19521  The version control system SVN is more powerful, so please use it instead
19522  of CVS if possible.
19523 \end_layout
19524
19525 \begin_layout Subsubsection
19526
19527 \family sans
19528 General CVS usage
19529 \end_layout
19530
19531 \begin_layout Standard
19532 If you start from scratch with CVS you have to create your repository and
19533  checkout the working copy with external tools.
19534  If you're using a client-server setup you may need to login before doing
19535  the first repository checkout.
19536 \end_layout
19537
19538 \begin_layout Standard
19539 If your documents are under revision control and others are using the same
19540  repository problems arise when different changes to the same document at
19541  the same location happen.
19542  Standard CVS repositories don't operate with a file locking mechanism.
19543  This may be surprising, but conflicts only occur if people disagree on
19544  the proper content of the same part of a document.
19545  So, if co-workers are used to communicate regularly, these conflicts occur
19546  rarely.
19547  If they don't communicate they have a fundamental problem anyway.
19548  Nevertheless some people like to work with so called 
19549 \begin_inset Quotes eld
19550 \end_inset
19551
19552 reserved checkouts
19553 \begin_inset Quotes erd
19554 \end_inset
19555
19556 .
19557  If they do so the working copy of all files is readonly when checked out
19558  first and the user starts editing after using a special command to make
19559  the working copy writable.
19560  When the changes are checked in the working copy returns to readonly state.
19561  With LyX one has to edit the 
19562 \begin_inset Flex Code
19563 status collapsed
19564
19565 \begin_layout Plain Layout
19566 .cvsrc
19567 \end_layout
19568
19569 \end_inset
19570
19571  file and add the line 
19572 \begin_inset Flex Code
19573 status collapsed
19574
19575 \begin_layout Plain Layout
19576 cvs -r
19577 \end_layout
19578
19579 \end_inset
19580
19581  to work with reserved checkouts.
19582  The benefit is the possibility to see who is using a writable copy of some
19583  document.
19584  It's not guaranteed only one user makes a copy writable.
19585 \end_layout
19586
19587 \begin_layout Standard
19588 LyX tries to guess if you're using reserved or non-reserved checkouts.
19589  If your working copy is readonly or it is writable and an additional copy
19590  of your document exists in the CVS/Base sub-directory a reserved otherwise
19591  a non-reserved checkout is assumed.
19592  When a reserved checkout is detected you have to use 
19593 \begin_inset Flex MenuItem
19594 status collapsed
19595
19596 \begin_layout Plain Layout
19597 Check Out
19598 \end_layout
19599
19600 \end_inset
19601
19602  to make your working copy writable if it's readonly.
19603  After doing so the 
19604 \begin_inset Flex MenuItem
19605 status collapsed
19606
19607 \begin_layout Plain Layout
19608 Check In
19609 \end_layout
19610
19611 \end_inset
19612
19613  operation is possible and that makes your working copy readonly again after
19614  transferring your changes to the repository.
19615 \end_layout
19616
19617 \begin_layout Standard
19618 More information about CVS can be found here 
19619 \begin_inset Flex URL
19620 status collapsed
19621
19622 \begin_layout Plain Layout
19623
19624 http://www.nongnu.org/cvs
19625 \end_layout
19626
19627 \end_inset
19628
19629  and here 
19630 \begin_inset Flex URL
19631 status collapsed
19632
19633 \begin_layout Plain Layout
19634
19635 http://ximbiot.com/cvs
19636 \end_layout
19637
19638 \end_inset
19639
19640 .
19641 \end_layout
19642
19643 \begin_layout Standard
19644 Read 
19645 \family typewriter
19646 man cvs
19647 \family default
19648  to understand the sub-commands and the switches mentioned below.
19649 \end_layout
19650
19651 \begin_layout Subsubsection
19652
19653 \family sans
19654 Register
19655 \end_layout
19656
19657 \begin_layout Standard
19658 If your document is not under revision control, this is the only item shown
19659  in the menu.
19660  And if it is under revision control, the 
19661 \family sans
19662 \bar under
19663 R
19664 \bar default
19665 egister
19666 \family default
19667  item is not visible.
19668  
19669 \end_layout
19670
19671 \begin_layout Standard
19672 This command registers in CVS your document 
19673 \begin_inset Flex Strong
19674 status collapsed
19675
19676 \begin_layout Plain Layout
19677
19678 \emph on
19679 only
19680 \end_layout
19681
19682 \end_inset
19683
19684  in the case you have already the documents directory under CVS control
19685  (in particular 
19686 \family typewriter
19687 CVS/Entries
19688 \family default
19689  file exists).
19690  This means you have to create or checkout the archive by yourself using
19691  external tools.
19692  (In case you forget that step LyX registers the document with RCS.)
19693 \end_layout
19694
19695 \begin_layout Standard
19696 Then you are asked interactively to supply an initial description of the
19697  document.
19698  Don't forget that registered file is not yet checked in.
19699 \end_layout
19700
19701 \begin_layout Standard
19702 CVS command that is run: 
19703 \family typewriter
19704 cvs -q add -m"<entered message>" "<file-name>"
19705 \end_layout
19706
19707 \begin_layout Standard
19708 The term 
19709 \family typewriter
19710 "<file-name>"
19711 \family default
19712  above and for all other CVS commands is an abbreviation for 
19713 \begin_inset Quotes eld
19714 \end_inset
19715
19716 change the current working directory to file location and use the file name
19717  without path component as argument
19718 \begin_inset Quotes erd
19719 \end_inset
19720
19721 .
19722 \end_layout
19723
19724 \begin_layout Subsubsection
19725
19726 \family sans
19727 Check In Changes
19728 \end_layout
19729
19730 \begin_layout Standard
19731 When you are finished editing a file, you commit your changes.
19732  When you do this and you had changed the document, you are asked for a
19733  description of the changes.
19734  After that changes are written to the repository.
19735  In case you didn't change the document and a reserved checkout is detected
19736  the reservation made on 
19737 \begin_inset Flex MenuItem
19738 status collapsed
19739
19740 \begin_layout Plain Layout
19741 Check Out
19742 \end_layout
19743
19744 \end_inset
19745
19746  is undone.
19747 \end_layout
19748
19749 \begin_layout Labeling
19750 \labelwidthstring 00.00.0000
19751 CVS
19752 \begin_inset space ~
19753 \end_inset
19754
19755 command: 
19756 \begin_inset space ~
19757 \end_inset
19758
19759
19760 \begin_inset Newline newline
19761 \end_inset
19762
19763
19764 \begin_inset Flex Code
19765 status collapsed
19766
19767 \begin_layout Plain Layout
19768 cvs 
19769 \family typewriter
19770 -q commit -m"<description>" "<file-name>"
19771 \end_layout
19772
19773 \end_inset
19774
19775  or
19776 \begin_inset Newline newline
19777 \end_inset
19778
19779
19780 \begin_inset Flex Code
19781 status collapsed
19782
19783 \begin_layout Plain Layout
19784 cvs -q unedit 
19785 \family typewriter
19786 "<file-name>"
19787 \end_layout
19788
19789 \end_inset
19790
19791
19792 \end_layout
19793
19794 \begin_layout Subsubsection
19795
19796 \family sans
19797 Check Out Changes
19798 \end_layout
19799
19800 \begin_layout Standard
19801 When you are sharing a repository with others, you may have to incorporate
19802  their changes into your working copy.
19803 \end_layout
19804
19805 \begin_layout Standard
19806 CVS command: 
19807 \family typewriter
19808 cvs -q update "<file-name>"
19809 \end_layout
19810
19811 \begin_layout Standard
19812 If a readonly checkout is detected the working copy is made writable and
19813  reserved.
19814 \end_layout
19815
19816 \begin_layout Standard
19817 CVS command: 
19818 \family typewriter
19819 cvs -q edit "<file-name>"
19820 \end_layout
19821
19822 \begin_layout Subsubsection
19823
19824 \family sans
19825 Revert To Repository Version
19826 \end_layout
19827
19828 \begin_layout Standard
19829 This will discard all changes made to the document since the last check
19830  in.
19831  You get a warning before changes are discarded.
19832  Firstly the file is deleted, secondly CVS update command is run.
19833 \end_layout
19834
19835 \begin_layout Standard
19836 CVS command: 
19837 \family typewriter
19838 cvs -q update "<file-name>"
19839 \end_layout
19840
19841 \begin_layout Standard
19842 If a reserved checkout is detected and the working copy has no changes only
19843  the reservation is undone.
19844 \end_layout
19845
19846 \begin_layout Standard
19847 CVS command: 
19848 \family typewriter
19849 cvs -q unedit "<file-name>"
19850 \end_layout
19851
19852 \begin_layout Subsubsection
19853
19854 \family sans
19855 Copy
19856 \end_layout
19857
19858 \begin_layout Standard
19859 This will create a copy of the current document.
19860  Since CVS does not support copy operations natively, the version history
19861  is not preserved, and the copy is added as a new file.
19862  It requires a clean document without any changes since the last checkin.
19863  You are asked for a file name and a description of the copy operation.
19864  After that the copy is created, both locally and in the repository.
19865  If the parent directories of the copied and original document differ, all
19866  relative paths of included files of the copy are adjusted (like in 
19867 \family sans
19868 File\SpecialChar \menuseparator
19869 Save As
19870 \family default
19871 \SpecialChar \ldots{}
19872 ).
19873  Finally, the copy is loaded instead of the original document.
19874 \end_layout
19875
19876 \begin_layout Labeling
19877 \labelwidthstring 00.00.0000
19878 CVS
19879 \begin_inset space ~
19880 \end_inset
19881
19882 commands: 
19883 \begin_inset space ~
19884 \end_inset
19885
19886
19887 \begin_inset Newline newline
19888 \end_inset
19889
19890 Copy 
19891 \begin_inset Flex Code
19892 status collapsed
19893
19894 \begin_layout Plain Layout
19895
19896 \family typewriter
19897 \begin_inset Quotes eld
19898 \end_inset
19899
19900 <file-name>
19901 \begin_inset Quotes erd
19902 \end_inset
19903
19904
19905 \end_layout
19906
19907 \end_inset
19908
19909  to 
19910 \begin_inset Flex Code
19911 status collapsed
19912
19913 \begin_layout Plain Layout
19914
19915 \family typewriter
19916 \begin_inset Quotes eld
19917 \end_inset
19918
19919 <new-file-name>
19920 \begin_inset Quotes erd
19921 \end_inset
19922
19923
19924 \end_layout
19925
19926 \end_inset
19927
19928
19929 \begin_inset Newline newline
19930 \end_inset
19931
19932
19933 \begin_inset Flex Code
19934 status collapsed
19935
19936 \begin_layout Plain Layout
19937 cvs -q add 
19938 \family typewriter
19939
19940 \begin_inset Quotes eld
19941 \end_inset
19942
19943 <new-file-name>
19944 \begin_inset Quotes erd
19945 \end_inset
19946
19947
19948 \end_layout
19949
19950 \end_inset
19951
19952
19953 \end_layout
19954
19955 \begin_layout Subsubsection
19956
19957 \family sans
19958 Rename
19959 \end_layout
19960
19961 \begin_layout Standard
19962 This will rename the current document.
19963  Since CVS does not support rename operations natively, the version history
19964  is not preserved, the renamed document is added as a new file, and the
19965  original document is deleted.
19966  It requires a clean document without any changes since the last checkin.
19967  You are asked for a file name and a description of the rename operation.
19968  After that the document is renamed, both locally and in the repository.
19969  If the parent directories of the new and old file names differ, all relative
19970  paths of included files are adjusted (like in 
19971 \family sans
19972 File\SpecialChar \menuseparator
19973 Save As
19974 \family default
19975 \SpecialChar \ldots{}
19976 ).
19977  Finally, the document is reloaded using the new name.
19978 \end_layout
19979
19980 \begin_layout Labeling
19981 \labelwidthstring 00.00.0000
19982 CVS
19983 \begin_inset space ~
19984 \end_inset
19985
19986 commands: 
19987 \begin_inset space ~
19988 \end_inset
19989
19990
19991 \begin_inset Newline newline
19992 \end_inset
19993
19994 Rename 
19995 \begin_inset Flex Code
19996 status collapsed
19997
19998 \begin_layout Plain Layout
19999
20000 \family typewriter
20001 \begin_inset Quotes eld
20002 \end_inset
20003
20004 <file-name>
20005 \begin_inset Quotes erd
20006 \end_inset
20007
20008
20009 \end_layout
20010
20011 \end_inset
20012
20013  to 
20014 \begin_inset Flex Code
20015 status collapsed
20016
20017 \begin_layout Plain Layout
20018
20019 \family typewriter
20020 \begin_inset Quotes eld
20021 \end_inset
20022
20023 <new-file-name>
20024 \begin_inset Quotes erd
20025 \end_inset
20026
20027
20028 \end_layout
20029
20030 \end_inset
20031
20032
20033 \begin_inset Newline newline
20034 \end_inset
20035
20036
20037 \begin_inset Flex Code
20038 status collapsed
20039
20040 \begin_layout Plain Layout
20041 cvs -q add 
20042 \family typewriter
20043
20044 \begin_inset Quotes eld
20045 \end_inset
20046
20047 <new-file-name>
20048 \begin_inset Quotes erd
20049 \end_inset
20050
20051
20052 \end_layout
20053
20054 \end_inset
20055
20056
20057 \begin_inset Newline newline
20058 \end_inset
20059
20060
20061 \begin_inset Flex Code
20062 status collapsed
20063
20064 \begin_layout Plain Layout
20065 cvs -q remove 
20066 \family typewriter
20067
20068 \begin_inset Quotes eld
20069 \end_inset
20070
20071 <file-name>
20072 \begin_inset Quotes erd
20073 \end_inset
20074
20075
20076 \end_layout
20077
20078 \end_inset
20079
20080
20081 \end_layout
20082
20083 \begin_layout Subsubsection
20084 Update of the local directory checkout from repository
20085 \end_layout
20086
20087 \begin_layout Standard
20088 Once your documents gets more complex, containing sub-documents and pictures,
20089  including external 
20090 \begin_inset Flex Code
20091 status collapsed
20092
20093 \begin_layout Plain Layout
20094 .tex
20095 \end_layout
20096
20097 \end_inset
20098
20099  files and so on using version control becomes more complicated.
20100  LyX supports updating the whole tree in which resides the document.
20101  This become especially useful once you cooperate with people which neither
20102  have detailed knowledge about CVS usage nor they have ambition to commit
20103  additional material to the repository.
20104  You have to organize the files structure so that all external files are
20105  in the same directory or subdirectories of the document.
20106  It's good practice anyway to store multipart documents in an extra directory.
20107 \end_layout
20108
20109 \begin_layout Standard
20110 The 
20111 \begin_inset Flex Code
20112 status collapsed
20113
20114 \begin_layout Plain Layout
20115 Update local directory from repository
20116 \end_layout
20117
20118 \end_inset
20119
20120  command updates the whole directory.
20121  If local changes are detected user is warned before update starts.
20122  In case of merge conflicts both versions of the conflicting document parts
20123  are placed in the final document.
20124  You have to review and correct the result of the merge.
20125  You'll find the conflicts enclosed in pairs of 
20126 \begin_inset Flex Code
20127 status collapsed
20128
20129 \begin_layout Plain Layout
20130 <<<<<<<
20131 \end_layout
20132
20133 \end_inset
20134
20135  and 
20136 \begin_inset Flex Code
20137 status collapsed
20138
20139 \begin_layout Plain Layout
20140 >>>>>>>
20141 \end_layout
20142
20143 \end_inset
20144
20145  separated by 
20146 \begin_inset Flex Code
20147 status collapsed
20148
20149 \begin_layout Plain Layout
20150 =======
20151 \end_layout
20152
20153 \end_inset
20154
20155 .
20156  The first part is your version as before the update operation with the
20157  document name prepended.
20158  The second one is the repository version with the version number after
20159  the sequence of 
20160 \begin_inset Flex Code
20161 status collapsed
20162
20163 \begin_layout Plain Layout
20164 >
20165 \end_layout
20166
20167 \end_inset
20168
20169  signs.
20170 \end_layout
20171
20172 \begin_layout Labeling
20173 \labelwidthstring 00.00.0000
20174 CVS
20175 \begin_inset space ~
20176 \end_inset
20177
20178 commands: 
20179 \begin_inset space ~
20180 \end_inset
20181
20182
20183 \begin_inset Newline newline
20184 \end_inset
20185
20186
20187 \begin_inset Flex Code
20188 status collapsed
20189
20190 \begin_layout Plain Layout
20191 cd $path; cvs diff 
20192 \family typewriter
20193 "."
20194 \end_layout
20195
20196 \end_inset
20197
20198  (Ask if changes are detected.)
20199 \begin_inset Newline newline
20200 \end_inset
20201
20202
20203 \begin_inset Flex Code
20204 status collapsed
20205
20206 \begin_layout Plain Layout
20207 cd $path; cvs -q update 
20208 \family typewriter
20209 "."
20210 \end_layout
20211
20212 \end_inset
20213
20214
20215 \end_layout
20216
20217 \begin_layout Standard
20218 where 
20219 \begin_inset Flex Code
20220 status collapsed
20221
20222 \begin_layout Plain Layout
20223 $path
20224 \end_layout
20225
20226 \end_inset
20227
20228  stands for the path to the document.
20229 \end_layout
20230
20231 \begin_layout Subsubsection
20232
20233 \family sans
20234 Show History
20235 \end_layout
20236
20237 \begin_layout Standard
20238 This shows the complete history of the CVS document.
20239  The output of 
20240 \family typewriter
20241 cvs log "<file-name>"
20242 \family default
20243  is shown in a browser.
20244 \end_layout
20245
20246 \begin_layout Subsubsection
20247 Revision info
20248 \end_layout
20249
20250 \begin_layout Standard
20251 LyX supports CVS version number, author name, date and time of last commit.
20252  All those are extracted from 
20253 \family typewriter
20254 cvs log -r <file-name>
20255 \family default
20256 .
20257  See 
20258 \begin_inset CommandInset ref
20259 LatexCommand ref
20260 reference "sub:VCS-Revision-Information"
20261
20262 \end_inset
20263
20264  for details.
20265 \end_layout
20266
20267 \begin_layout Subsection
20268 SVN commands in LyX
20269 \end_layout
20270
20271 \begin_layout Standard
20272 SVN is now partially supported by LyX.
20273  You can find the commands in the 
20274 \family sans
20275 File\SpecialChar \menuseparator
20276 Version
20277 \begin_inset space ~
20278 \end_inset
20279
20280 Control
20281 \family default
20282  submenu.
20283  Please note that if you use password protected access to repository via
20284  ssh, you will be asked in terminal window.
20285  LyX was tested against SVN 1.5, 1.6, 1.7 and 1.8
20286 \begin_inset Foot
20287 status open
20288
20289 \begin_layout Plain Layout
20290 Most of the commands will work with 1.4 too, see 
20291 \begin_inset CommandInset ref
20292 LatexCommand ref
20293 reference "sub:SVN-Repo-Update"
20294
20295 \end_inset
20296
20297 .
20298  There seems to be currently unresolved permissions problem under SVN 1.8
20299  with reverting changes when file is locked.
20300 \end_layout
20301
20302 \end_inset
20303
20304
20305 \end_layout
20306
20307 \begin_layout Subsubsection
20308
20309 \family sans
20310 Register
20311 \end_layout
20312
20313 \begin_layout Standard
20314 If your document is not under revision control, this is the only item shown
20315  in the menu.
20316  And if it is under revision control, the 
20317 \family sans
20318 \bar under
20319 R
20320 \bar default
20321 egister
20322 \family default
20323  item is not visible.
20324 \end_layout
20325
20326 \begin_layout Standard
20327 This command registers in SVN your document ONLY in case you have already
20328  the documents directory under SVN control (in particular 
20329 \family typewriter
20330 .svn/entries
20331 \family default
20332  file exists).
20333  This means you have to checkout the archive by yourself.
20334 \end_layout
20335
20336 \begin_layout Standard
20337 Then you are asked interactively to supply an initial description of the
20338  document.
20339  Don't forget that registered file is not yet commited.
20340 \end_layout
20341
20342 \begin_layout Standard
20343 SVN command that is run: 
20344 \family typewriter
20345 svn add -q 
20346 \begin_inset Quotes eld
20347 \end_inset
20348
20349 <file-name>
20350 \begin_inset Quotes erd
20351 \end_inset
20352
20353
20354 \end_layout
20355
20356 \begin_layout Standard
20357 Read 
20358 \family typewriter
20359 man svn
20360 \family default
20361  to understand the switches.
20362 \end_layout
20363
20364 \begin_layout Subsubsection
20365
20366 \family sans
20367 Check In Changes
20368 \end_layout
20369
20370 \begin_layout Standard
20371 When you are finished editing a file, you commit your changes.
20372  When you do this, you are asked for a description of the changes.
20373  After that changes are commited.
20374 \end_layout
20375
20376 \begin_layout Standard
20377 SVN command:
20378 \begin_inset Foot
20379 status collapsed
20380
20381 \begin_layout Plain Layout
20382 In case locking is not enabled.
20383  See Section 
20384 \begin_inset CommandInset ref
20385 LatexCommand ref
20386 reference "subsec:SVN-File-Locking"
20387
20388 \end_inset
20389
20390 .
20391 \end_layout
20392
20393 \end_inset
20394
20395  
20396 \family typewriter
20397 svn commit -q -m"<description>" <file-name>
20398 \end_layout
20399
20400 \begin_layout Subsubsection
20401
20402 \family sans
20403 Check Out For Edit
20404 \end_layout
20405
20406 \begin_layout Standard
20407 Updates the changes of this file from the repository.
20408  Be sure you understand SVN merging and conflicts resolving before using
20409  this function, because all conflicts has to be resolved manually by you!
20410 \end_layout
20411
20412 \begin_layout Standard
20413 SVN command:
20414 \begin_inset Foot
20415 status collapsed
20416
20417 \begin_layout Plain Layout
20418 Ditto.
20419 \end_layout
20420
20421 \end_inset
20422
20423  
20424 \family typewriter
20425 svn update --non-interactive 
20426 \begin_inset Quotes eld
20427 \end_inset
20428
20429 <file-name>
20430 \begin_inset Quotes erd
20431 \end_inset
20432
20433
20434 \end_layout
20435
20436 \begin_layout Subsubsection
20437
20438 \family sans
20439 Revert To Repository Version
20440 \end_layout
20441
20442 \begin_layout Standard
20443 This will discard all changes made to the document since the last check
20444  in.
20445  You get a warning before changes are discarded.
20446 \end_layout
20447
20448 \begin_layout Standard
20449 SVN command: 
20450 \family typewriter
20451 svn revert -q 
20452 \begin_inset Quotes eld
20453 \end_inset
20454
20455 <file-name>
20456 \begin_inset Quotes erd
20457 \end_inset
20458
20459
20460 \end_layout
20461
20462 \begin_layout Subsubsection
20463
20464 \family sans
20465 Copy
20466 \end_layout
20467
20468 \begin_layout Standard
20469 This will create a copy of the current document including the version history.
20470  It requires a clean document without any changes since the last checkin.
20471  You are asked for a file name and a description of the copy operation.
20472  After that the copy is created, both locally and in the repository.
20473  If the parent directories of the copied and original document differ, all
20474  relative paths of included files of the copy are adjusted (like in 
20475 \family sans
20476 File\SpecialChar \menuseparator
20477 Save As
20478 \family default
20479 \SpecialChar \ldots{}
20480 ).
20481  Finally, the copy is loaded instead of the original document.
20482 \end_layout
20483
20484 \begin_layout Labeling
20485 \labelwidthstring 00.00.0000
20486 SVN
20487 \begin_inset space ~
20488 \end_inset
20489
20490 commands: 
20491 \begin_inset space ~
20492 \end_inset
20493
20494
20495 \begin_inset Newline newline
20496 \end_inset
20497
20498
20499 \begin_inset Flex Code
20500 status collapsed
20501
20502 \begin_layout Plain Layout
20503 svn copy -q 
20504 \family typewriter
20505
20506 \begin_inset Quotes eld
20507 \end_inset
20508
20509 <file-name>
20510 \begin_inset Quotes erd
20511 \end_inset
20512
20513  
20514 \begin_inset Quotes eld
20515 \end_inset
20516
20517 <new-file-name>
20518 \begin_inset Quotes erd
20519 \end_inset
20520
20521
20522 \end_layout
20523
20524 \end_inset
20525
20526
20527 \begin_inset Newline newline
20528 \end_inset
20529
20530
20531 \begin_inset Flex Code
20532 status collapsed
20533
20534 \begin_layout Plain Layout
20535 svn commit
20536 \end_layout
20537
20538 \end_inset
20539
20540
20541 \end_layout
20542
20543 \begin_layout Subsubsection
20544
20545 \family sans
20546 Rename
20547 \end_layout
20548
20549 \begin_layout Standard
20550 This will rename the current document including the version history.
20551  It requires a clean document without any changes since the last checkin.
20552  You are asked for a file name and a description of the rename operation.
20553  After that the document is renamed, both locally and in the repository.
20554  If the parent directories of the new and old file names differ, all relative
20555  paths of included files are adjusted (like in 
20556 \family sans
20557 File\SpecialChar \menuseparator
20558 Save As
20559 \family default
20560 \SpecialChar \ldots{}
20561 ).
20562  Finally, the document is reloaded using the new name.
20563 \end_layout
20564
20565 \begin_layout Labeling
20566 \labelwidthstring 00.00.0000
20567 SVN
20568 \begin_inset space ~
20569 \end_inset
20570
20571 commands: 
20572 \begin_inset space ~
20573 \end_inset
20574
20575
20576 \begin_inset Newline newline
20577 \end_inset
20578
20579
20580 \begin_inset Flex Code
20581 status collapsed
20582
20583 \begin_layout Plain Layout
20584 svn move -q 
20585 \family typewriter
20586
20587 \begin_inset Quotes eld
20588 \end_inset
20589
20590 <file-name>
20591 \begin_inset Quotes erd
20592 \end_inset
20593
20594  
20595 \begin_inset Quotes eld
20596 \end_inset
20597
20598 <new-file-name>
20599 \begin_inset Quotes erd
20600 \end_inset
20601
20602
20603 \end_layout
20604
20605 \end_inset
20606
20607
20608 \begin_inset Newline newline
20609 \end_inset
20610
20611
20612 \begin_inset Flex Code
20613 status collapsed
20614
20615 \begin_layout Plain Layout
20616 svn commit
20617 \end_layout
20618
20619 \end_inset
20620
20621
20622 \end_layout
20623
20624 \begin_layout Subsubsection
20625 \begin_inset CommandInset label
20626 LatexCommand label
20627 name "sub:SVN-Repo-Update"
20628
20629 \end_inset
20630
20631 Update of the local directory checkout from repository
20632 \begin_inset Foot
20633 status collapsed
20634
20635 \begin_layout Plain Layout
20636 Note that this command will work only with subversion 
20637 \begin_inset Formula $\geqq1.5$
20638 \end_inset
20639
20640
20641 \end_layout
20642
20643 \end_inset
20644
20645
20646 \end_layout
20647
20648 \begin_layout Standard
20649 All the commands above have one shortcomming - they deal with the current
20650  document only.
20651  Once your document contains pictures, includes external 
20652 \begin_inset Flex Code
20653 status collapsed
20654
20655 \begin_layout Plain Layout
20656 .tex
20657 \end_layout
20658
20659 \end_inset
20660
20661  files and so on administration becomes more complicated.
20662  LyX now supports updating the whole tree in which resides the document
20663 \begin_inset Foot
20664 status collapsed
20665
20666 \begin_layout Plain Layout
20667 One need to organize the files structure so that all external files are
20668  in the same directory or subdirectories of the document.
20669  
20670 \end_layout
20671
20672 \end_inset
20673
20674 .
20675  This become especially useful once you cooperate with people which neither
20676  know about subversion management nor they have ambition to commit additional
20677  material to the repository.
20678  
20679 \end_layout
20680
20681 \begin_layout Standard
20682 \begin_inset Flex Code
20683 status collapsed
20684
20685 \begin_layout Plain Layout
20686 Update local directory from repository
20687 \end_layout
20688
20689 \end_inset
20690
20691  command updates the whole directory and in case of merge conflicts local
20692  version of the files are left, so no unintended data loss occurs.
20693  If local changes are detected user is warned before update starts.
20694 \end_layout
20695
20696 \begin_layout Labeling
20697 \labelwidthstring 00.00.0000
20698 SVN
20699 \begin_inset space ~
20700 \end_inset
20701
20702 commands: 
20703 \begin_inset space ~
20704 \end_inset
20705
20706
20707 \begin_inset Newline newline
20708 \end_inset
20709
20710
20711 \begin_inset Flex Code
20712 status collapsed
20713
20714 \begin_layout Plain Layout
20715 svn diff $path
20716 \end_layout
20717
20718 \end_inset
20719
20720  (Ask if changes are detected.)
20721 \begin_inset Newline newline
20722 \end_inset
20723
20724
20725 \begin_inset Flex Code
20726 status collapsed
20727
20728 \begin_layout Plain Layout
20729 svn update --accept mine-full $path
20730 \end_layout
20731
20732 \end_inset
20733
20734
20735 \end_layout
20736
20737 \begin_layout Standard
20738 where 
20739 \begin_inset Flex Code
20740 status collapsed
20741
20742 \begin_layout Plain Layout
20743 $path
20744 \end_layout
20745
20746 \end_inset
20747
20748  stands for the path to the document.
20749 \end_layout
20750
20751 \begin_layout Subsubsection
20752
20753 \family sans
20754 Show History
20755 \end_layout
20756
20757 \begin_layout Standard
20758 This shows the complete history of the SVN document.
20759  The output of 
20760 \family typewriter
20761 svn log 
20762 \begin_inset Quotes eld
20763 \end_inset
20764
20765 <file-name>
20766 \begin_inset Quotes erd
20767 \end_inset
20768
20769
20770 \family default
20771  is shown in a browser.
20772 \end_layout
20773
20774 \begin_layout Subsubsection
20775 File Locking
20776 \begin_inset CommandInset label
20777 LatexCommand label
20778 name "subsec:SVN-File-Locking"
20779
20780 \end_inset
20781
20782
20783 \end_layout
20784
20785 \begin_layout Standard
20786 The file exchange through various revision control systems brings the problem
20787  of merge conflicts in case two different users try to edit the same (parts
20788  of) document.
20789  When such a conflict happens it needs manual resolving and one reasonable
20790  alternative is to provide some kind of locking mechanism, which guarantees
20791  that only one user is allowed to edit file at the given time.
20792 \end_layout
20793
20794 \begin_layout Standard
20795 SVN has two such mechanisms to provide mutual exclusivity for file access
20796  - locks and automatic setting of write permissions (see sec.
20797  
20798 \begin_inset CommandInset ref
20799 LatexCommand ref
20800 reference "subsec:Automatical-Locking-Property"
20801
20802 \end_inset
20803
20804 ) based on 
20805 \begin_inset Flex Code
20806 status collapsed
20807
20808 \begin_layout Plain Layout
20809 svn:needs-lock
20810 \end_layout
20811
20812 \end_inset
20813
20814  file svn property
20815 \begin_inset Foot
20816 status open
20817
20818 \begin_layout Plain Layout
20819 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20820 \end_layout
20821
20822 \end_inset
20823
20824 .
20825  If this property is detected for a given document LyX starts to use SVN
20826  locks for document editing automatically and the whole check-in/out mechanism
20827  switches to the same regimen as for RCS.
20828  This in particular means there are two different modes of file use in LyX:
20829 \end_layout
20830
20831 \begin_layout Itemize
20832 Unlocked state.
20833  The loaded file is in the read-only mode.
20834  For editing on needs to check-out.
20835  
20836 \emph on
20837 Check-out
20838 \emph default
20839  consists of updating from the repository and gaining write lock.
20840  If the lock is not possible to obtain, we remain in unlocked state.
20841 \end_layout
20842
20843 \begin_layout Itemize
20844 Locked state.
20845  The loaded file is in the 'normal' edit mode.
20846  No other user is allowed to edit the file.
20847  
20848 \emph on
20849 Check-in
20850 \emph default
20851  consists of commiting changes and releasing write-lock.
20852  If no changes have been made to the document, no commit will be produced
20853 \begin_inset Foot
20854 status collapsed
20855
20856 \begin_layout Plain Layout
20857 Don't be puzzled by the fact that you will be asked for commit message anyway.
20858 \end_layout
20859
20860 \end_inset
20861
20862  and only the write-lock will be released.
20863 \end_layout
20864
20865 \begin_layout Standard
20866 SVN commands:
20867 \end_layout
20868
20869 \begin_layout Labeling
20870 \labelwidthstring 00.00.0000
20871 Check-in:
20872 \family typewriter
20873  svn commit -q -m"<description>" "<file-name>"
20874 \begin_inset Newline newline
20875 \end_inset
20876
20877 svn unlock "<file-name>"
20878 \end_layout
20879
20880 \begin_layout Labeling
20881 \labelwidthstring 00.00.0000
20882 Check-out: 
20883 \family typewriter
20884 svn update "<file-name>"
20885 \begin_inset Newline newline
20886 \end_inset
20887
20888 svn lock "<file-name>"
20889 \end_layout
20890
20891 \begin_layout Subsubsection
20892
20893 \family typewriter
20894 \begin_inset CommandInset label
20895 LatexCommand label
20896 name "subsec:Automatical-Locking-Property"
20897
20898 \end_inset
20899
20900
20901 \family default
20902 Automatic Locking Property
20903 \end_layout
20904
20905 \begin_layout Standard
20906 The above mentioned automatic setting of write permissions of the .lyx file
20907  can be set through
20908 \family sans
20909 \bar under
20910  F
20911 \bar default
20912 ile\SpecialChar \menuseparator
20913
20914 \bar under
20915 V
20916 \bar default
20917 ersion
20918 \begin_inset space ~
20919 \end_inset
20920
20921 Control\SpecialChar \menuseparator
20922
20923 \bar under
20924 T
20925 \bar default
20926 oggle locking property
20927 \family default
20928 .
20929  This command is active only when the file is not locked on the svn server
20930  (i.e.
20931  you need to check-out before proceeding).
20932 \end_layout
20933
20934 \begin_layout Labeling
20935 \labelwidthstring 00.00.0000
20936 SVN
20937 \begin_inset space ~
20938 \end_inset
20939
20940 commands:
20941 \end_layout
20942
20943 \begin_layout Labeling
20944 \labelwidthstring 00.00.0000
20945 Set:
20946 \family typewriter
20947  svn propset svn:needs-lock ON "<file-name>"
20948 \end_layout
20949
20950 \begin_layout Labeling
20951 \labelwidthstring 00.00.0000
20952 Unset: 
20953 \family typewriter
20954 svn propdel svn:needs-lock "<file-name>"
20955 \end_layout
20956
20957 \begin_layout Subsubsection
20958 \begin_inset CommandInset label
20959 LatexCommand label
20960 name "sub:VCS-Revision-Information"
20961
20962 \end_inset
20963
20964 Revision Information in Documents
20965 \end_layout
20966
20967 \begin_layout Standard
20968 There are more possibilities how to activate revision information in our
20969  document.
20970 \end_layout
20971
20972 \begin_layout Itemize
20973 LyX supports directly:
20974 \end_layout
20975
20976 \begin_deeper
20977 \begin_layout Itemize
20978 tree revision information (
20979 \begin_inset Flex Code
20980 status collapsed
20981
20982 \begin_layout Plain Layout
20983 vcs-tree-revision
20984 \end_layout
20985
20986 \end_inset
20987
20988 ).
20989  The result is the output of the 
20990 \begin_inset Flex Code
20991 status collapsed
20992
20993 \begin_layout Plain Layout
20994 svnversion
20995 \end_layout
20996
20997 \end_inset
20998
20999  command, the following table gives you an idea, how to read the results.
21000 \end_layout
21001
21002 \begin_layout Standard
21003 \align center
21004 \begin_inset Tabular
21005 <lyxtabular version="3" rows="6" columns="2">
21006 <features rotate="0" tabularvalignment="middle">
21007 <column alignment="center" valignment="top">
21008 <column alignment="center" valignment="top">
21009 <row>
21010 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
21011 \begin_inset Text
21012
21013 \begin_layout Plain Layout
21014 Output
21015 \end_layout
21016
21017 \end_inset
21018 </cell>
21019 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
21020 \begin_inset Text
21021
21022 \begin_layout Plain Layout
21023 Meaning
21024 \end_layout
21025
21026 \end_inset
21027 </cell>
21028 </row>
21029 <row>
21030 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
21031 \begin_inset Text
21032
21033 \begin_layout Plain Layout
21034 4123:4168
21035 \end_layout
21036
21037 \end_inset
21038 </cell>
21039 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
21040 \begin_inset Text
21041
21042 \begin_layout Plain Layout
21043 mixed revision working copy
21044 \end_layout
21045
21046 \end_inset
21047 </cell>
21048 </row>
21049 <row>
21050 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
21051 \begin_inset Text
21052
21053 \begin_layout Plain Layout
21054 4168M
21055 \end_layout
21056
21057 \end_inset
21058 </cell>
21059 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
21060 \begin_inset Text
21061
21062 \begin_layout Plain Layout
21063 modified working copy
21064 \end_layout
21065
21066 \end_inset
21067 </cell>
21068 </row>
21069 <row>
21070 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
21071 \begin_inset Text
21072
21073 \begin_layout Plain Layout
21074 4123S
21075 \end_layout
21076
21077 \end_inset
21078 </cell>
21079 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
21080 \begin_inset Text
21081
21082 \begin_layout Plain Layout
21083 switched working copy
21084 \end_layout
21085
21086 \end_inset
21087 </cell>
21088 </row>
21089 <row>
21090 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
21091 \begin_inset Text
21092
21093 \begin_layout Plain Layout
21094 4123P
21095 \end_layout
21096
21097 \end_inset
21098 </cell>
21099 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
21100 \begin_inset Text
21101
21102 \begin_layout Plain Layout
21103 partial working copy, from a sparse checkout
21104 \end_layout
21105
21106 \end_inset
21107 </cell>
21108 </row>
21109 <row>
21110 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
21111 \begin_inset Text
21112
21113 \begin_layout Plain Layout
21114 4123:4168MS
21115 \end_layout
21116
21117 \end_inset
21118 </cell>
21119 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
21120 \begin_inset Text
21121
21122 \begin_layout Plain Layout
21123 mixed revision, modified, switched working copy
21124 \end_layout
21125
21126 \end_inset
21127 </cell>
21128 </row>
21129 </lyxtabular>
21130
21131 \end_inset
21132
21133
21134 \end_layout
21135
21136 \begin_layout Itemize
21137 file revision information.
21138  The result comes from parsing the output of 
21139 \begin_inset Flex Code
21140 status collapsed
21141
21142 \begin_layout Plain Layout
21143 svn
21144 \begin_inset space ~
21145 \end_inset
21146
21147 info
21148 \begin_inset space ~
21149 \end_inset
21150
21151 --xml
21152 \begin_inset space ~
21153 \end_inset
21154
21155 file.lyx
21156 \end_layout
21157
21158 \end_inset
21159
21160 .
21161  Supported flags are:
21162 \end_layout
21163
21164 \begin_deeper
21165 \begin_layout Itemize
21166 version number of the last commit (
21167 \begin_inset Flex Code
21168 status collapsed
21169
21170 \begin_layout Plain Layout
21171 vcs-revision
21172 \end_layout
21173
21174 \end_inset
21175
21176 )
21177 \end_layout
21178
21179 \begin_layout Itemize
21180 author of the last commit (
21181 \begin_inset Flex Code
21182 status collapsed
21183
21184 \begin_layout Plain Layout
21185 vcs-author
21186 \end_layout
21187
21188 \end_inset
21189
21190 )
21191 \end_layout
21192
21193 \begin_layout Itemize
21194 date of the last commit (
21195 \begin_inset Flex Code
21196 status collapsed
21197
21198 \begin_layout Plain Layout
21199 vcs-date
21200 \end_layout
21201
21202 \end_inset
21203
21204 )
21205 \end_layout
21206
21207 \begin_layout Itemize
21208 time of the last commit (
21209 \begin_inset Flex Code
21210 status collapsed
21211
21212 \begin_layout Plain Layout
21213 vcs-time
21214 \end_layout
21215
21216 \end_inset
21217
21218 )
21219 \end_layout
21220
21221 \end_deeper
21222 \begin_layout Standard
21223 You can obtain this info via InsetInfo (e.g.
21224  
21225 \begin_inset Flex Code
21226 status collapsed
21227
21228 \begin_layout Plain Layout
21229 info-insert buffer vcs-date
21230 \end_layout
21231
21232 \end_inset
21233
21234 ).
21235  The information will be available only when you have the file stored under
21236  svn managment (i.e.
21237  the 
21238 \begin_inset Flex Code
21239 status collapsed
21240
21241 \begin_layout Plain Layout
21242 .svn
21243 \end_layout
21244
21245 \end_inset
21246
21247  directory is available with your document).
21248 \end_layout
21249
21250 \end_deeper
21251 \begin_layout Itemize
21252 Another---a hacking one---possibility is to use svn keywords
21253 \begin_inset Foot
21254 status collapsed
21255
21256 \begin_layout Plain Layout
21257 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
21258 \end_layout
21259
21260 \end_inset
21261
21262 .
21263  In short -- you set file keywords property (e.g.
21264  
21265 \family sans
21266 svn propset svn:keywords 'Rev' file.lyx
21267 \family default
21268 ) and then paste keyword TeX code
21269 \begin_inset Foot
21270 status collapsed
21271
21272 \begin_layout Plain Layout
21273 This is an easy way how to ensure that LyX won't break the line in the middle
21274  of keyword tag.
21275 \end_layout
21276
21277 \end_inset
21278
21279  tag in your document (e.g.
21280  
21281 \begin_inset ERT
21282 status open
21283
21284 \begin_layout Plain Layout
21285
21286 $Rev$
21287 \end_layout
21288
21289 \end_inset
21290
21291 ).
21292  This way svn client will automatically substitute revision number (e.g.
21293  
21294 \begin_inset ERT
21295 status open
21296
21297 \begin_layout Plain Layout
21298
21299 $Rev: 59 $
21300 \end_layout
21301
21302 \end_inset
21303
21304 ) after each update and commit.
21305  There are more problems with this approach.
21306  Firstly, the '$' character is used in TeX world for math equations, so
21307  any occurence of math formula 
21308 \begin_inset Formula $Rev$
21309 \end_inset
21310
21311  become 
21312 \begin_inset Formula $Rev:59$
21313 \end_inset
21314
21315  in your LyX document.
21316  Similarly for other keywords like Id, Date, Author, etc.
21317  Secondly svn output is dependent on your locales, so its very easy that
21318  svn would produce some problematic strings once Date is used.
21319  Thirdly you get the whole 'Rev: 59' string in your document instead of
21320  the plain number.
21321  Until subversion implements user's custom keywords it will be hard to use
21322  this approach reliably or let LyX to support it directly.
21323 \end_layout
21324
21325 \begin_layout Subsection
21326 SVN and Windows Environment
21327 \end_layout
21328
21329 \begin_layout Quote
21330 My inclination is to say that if the user cannot figure out the command
21331  line operations on their own fairly quickly, they would be well advised
21332  to use TortoiseSVN.
21333  ---P.
21334  A.
21335  Rubin
21336 \end_layout
21337
21338 \begin_layout Subsubsection
21339 Preparation
21340 \end_layout
21341
21342 \begin_layout Standard
21343 In addition to installing LyX, and having access to a Subversion repository,
21344  the user will need to install the Subversion client program.
21345  A Windows installer for the client program is available from 
21346 \begin_inset CommandInset href
21347 LatexCommand href
21348 name "CollabNet"
21349 target "http://www.collab.net/nonav/downloads/subversion/"
21350
21351 \end_inset
21352
21353 .
21354  The user may also want to install 
21355 \begin_inset CommandInset href
21356 LatexCommand href
21357 name "TortoiseSVN"
21358 target "http://tortoisesvn.tigris.org/"
21359
21360 \end_inset
21361
21362 , which integrates Subversion operations into the context (rightclick) menu
21363  of Windows Explorer.
21364  Operations done outside LyX will typically be more convenient using the
21365  Explorer context menu.
21366  Note that TortoiseSVN is not a replacement for the client program, which
21367  is what LyX itself will use.
21368 \end_layout
21369
21370 \begin_layout Subsubsection
21371 Bringing a document under Subversion control
21372 \end_layout
21373
21374 \begin_layout Standard
21375 Before a LyX document can be brought under version control in Subversion,
21376  its parent directory needs to be under version control.
21377  If the document is being added to a project already in the repository,
21378  this is accomplished by checking the project out to the directory where
21379  the new document will be placed.
21380  If the project itself is not yet under version control (for instance, if
21381  this document starts a new project), the directory must be imported into
21382  the repository.
21383  This is done outside LyX.
21384  Both import and checkout are easily accomplished from the Explorer context
21385  menu using TortoiseSVN, or alternatively can be done using the command
21386  line client at a DOS prompt.
21387  The procedure for importing the project using TortoiseSVN is described
21388  below, assuming an existing repository and a new project being started
21389  in 
21390 \family typewriter
21391 C:
21392 \backslash
21393 new project
21394 \family default
21395 .
21396  For information on using the Subversion client program, run 
21397 \family typewriter
21398 svn --help 
21399 \family default
21400 in a DOS shell.
21401 \end_layout
21402
21403 \begin_layout Enumerate
21404 Locate 
21405 \family typewriter
21406 C:
21407 \backslash
21408 new project 
21409 \family default
21410 in Windows Explorer, right click it, and select 
21411 \family sans
21412 TortoiseSVN\SpecialChar \menuseparator
21413 Repo-browser
21414 \family default
21415 .
21416  If necessary, adjust the URL for the repository, then click OK.
21417 \end_layout
21418
21419 \begin_layout Enumerate
21420 Right click the level of the repository under which you want to place the
21421  new project folder (typically the top level) and click 
21422 \family sans
21423 Create folder
21424 \family default
21425  Supply a name for the project folder and click OK.
21426  Add a message for the log file if desired, then click OK again.
21427  The new project folder should appear in the repository.
21428  Finally, click OK again to exit the repository browser.
21429 \end_layout
21430
21431 \begin_layout Enumerate
21432 Once again right click 
21433 \family typewriter
21434 C:
21435 \backslash
21436 new project
21437 \family default
21438 , this time selecting SVN Checkout\SpecialChar \ldots{}
21439  Select the URL of the project folder
21440  you just created in the repository, and set the checkout directory to 
21441 \family typewriter
21442 C:
21443 \backslash
21444 new project.
21445
21446 \family default
21447  Click OK.
21448  You will be warned about a non-empty folder; click OK to proceed.
21449  You should now have a 
21450 \family typewriter
21451 .svn
21452 \family default
21453  directory under 
21454 \family typewriter
21455 C:
21456 \backslash
21457 new project.
21458 \end_layout
21459
21460 \begin_layout Enumerate
21461 Create or open your document in LyX and click 
21462 \family sans
21463 File\SpecialChar \menuseparator
21464 Version
21465 \begin_inset space ~
21466 \end_inset
21467
21468 Control\SpecialChar \menuseparator
21469 Register.
21470  
21471 \family default
21472 Add a log message and click OK to commit the document to version control.
21473 \end_layout
21474
21475 \begin_layout Standard
21476 From this point onward, you should have full functionality in the 
21477 \family sans
21478 File\SpecialChar \menuseparator
21479 Version
21480 \begin_inset space ~
21481 \end_inset
21482
21483 Control
21484 \family default
21485  menu.
21486  You also have the option of checking the document in and out, viewing its
21487  history, etc.
21488  using the TortoiseSVN context menu in Windows Explorer or the Subversion
21489  client program from a command prompt.
21490 \end_layout
21491
21492 \begin_layout Subsubsection
21493 SSH tunnel used with SVN under Windows
21494 \end_layout
21495
21496 \begin_layout Standard
21497 Compared with Linux setting up an svn client to communicate over ssh under
21498  Windows is a rather troublesome task.
21499  We will at least offer some hints how to setup the client side but prior
21500  knowledge about ssh and the Windows command line is needed, also be prepared
21501  for a great deal of frustration\SpecialChar \ldots{}
21502
21503 \end_layout
21504
21505 \begin_layout Enumerate
21506 Get an svn client for windows, as described in the previous sections.
21507  When it is a fresh install run some svn command (e.g.
21508  
21509 \begin_inset Flex Code
21510 status collapsed
21511
21512 \begin_layout Plain Layout
21513 svn --version
21514 \end_layout
21515
21516 \end_inset
21517
21518 ) to create config files, which you will need to change later on.
21519 \end_layout
21520
21521 \begin_layout Enumerate
21522 Choose an ssh client for Windows.
21523  There are several possibilities, we will use the one from Putty tools
21524 \begin_inset Foot
21525 status collapsed
21526
21527 \begin_layout Plain Layout
21528 \begin_inset Flex URL
21529 status collapsed
21530
21531 \begin_layout Plain Layout
21532
21533 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21534 \end_layout
21535
21536 \end_inset
21537
21538
21539 \end_layout
21540
21541 \end_inset
21542
21543 .
21544  You will need to set the connection up so that the client doesn't ask for
21545  any password from you.
21546  To keep things easy we will use only keys without any additional password
21547  protection etc.
21548 \end_layout
21549
21550 \begin_deeper
21551 \begin_layout Enumerate
21552 Generate keys by 
21553 \begin_inset Flex Code
21554 status collapsed
21555
21556 \begin_layout Plain Layout
21557 puttygen
21558 \end_layout
21559
21560 \end_inset
21561
21562 .
21563  Save your private .ppk key file and put the public one on the server side.
21564  If the SVN server runs on Linux, note that the format of the public key
21565  is not compatible with Linux openssh and you will need to direcly copy-paste
21566  the key from the “
21567 \emph on
21568 Public key for pasting into OpenSSH authorized_keys file
21569 \emph default
21570 :” edit field into the server's 
21571 \begin_inset Flex Code
21572 status collapsed
21573
21574 \begin_layout Plain Layout
21575 ~/.ssh/authorized_keys
21576 \end_layout
21577
21578 \end_inset
21579
21580  / 
21581 \begin_inset Flex Code
21582 status collapsed
21583
21584 \begin_layout Plain Layout
21585 authorized_keys2
21586 \end_layout
21587
21588 \end_inset
21589
21590  file.
21591 \end_layout
21592
21593 \begin_layout Enumerate
21594 Get the Putty's 
21595 \begin_inset Flex Code
21596 status collapsed
21597
21598 \begin_layout Plain Layout
21599 plink
21600 \end_layout
21601
21602 \end_inset
21603
21604 .
21605  In the SVN config file
21606 \begin_inset Foot
21607 status collapsed
21608
21609 \begin_layout Plain Layout
21610 Exact path depends on Windows version, usually somewhere around 
21611 \begin_inset Flex Code
21612 status collapsed
21613
21614 \begin_layout Plain Layout
21615 c:
21616 \backslash
21617 Documents and Settings
21618 \backslash
21619 user
21620 \backslash
21621 Application Data
21622 \backslash
21623 Subversion
21624 \backslash
21625 config
21626 \end_layout
21627
21628 \end_inset
21629
21630  / 
21631 \begin_inset Flex Code
21632 status collapsed
21633
21634 \begin_layout Plain Layout
21635 AppData
21636 \backslash
21637 Roaming
21638 \backslash
21639 Subversion
21640 \end_layout
21641
21642 \end_inset
21643
21644 .
21645 \end_layout
21646
21647 \end_inset
21648
21649 , section [tunnels], setup ssh command, e.g.
21650  
21651 \begin_inset Flex Code
21652 status collapsed
21653
21654 \begin_layout Plain Layout
21655 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21656 \end_layout
21657
21658 \end_inset
21659
21660 .
21661 \begin_inset Foot
21662 status collapsed
21663
21664 \begin_layout Plain Layout
21665 It will usually take a lot of time to get exact command right and it depends
21666  on many things.
21667  For example do not have some remote server saved as a default session in
21668  Putty etc.
21669  If things fail, try to connect via plink without SVN first.
21670 \end_layout
21671
21672 \end_inset
21673
21674
21675 \end_layout
21676
21677 \end_deeper
21678 \begin_layout Enumerate
21679 Checkout the SVN archive, e.
21680 \begin_inset space \thinspace{}
21681 \end_inset
21682
21683 g.
21684 \begin_inset Newline newline
21685 \end_inset
21686
21687
21688 \begin_inset Flex Code
21689 status collapsed
21690
21691 \begin_layout Plain Layout
21692 svn co svn+ssh://user@server/repository_path
21693 \end_layout
21694
21695 \end_inset
21696
21697 .
21698 \end_layout
21699
21700 \begin_layout Subsubsection
21701 End-of-Line Conversions
21702 \end_layout
21703
21704 \begin_layout Standard
21705 When the collaborators are mixing Linux and Windows environments, LyX will
21706  use different line endings inside the .lyx files.
21707  This is not a problem as far as LyX functionality is concerned, but the
21708  commit diffs will be huge and merge-conflicts prone.
21709  Fortunately SVN itself knows
21710 \begin_inset Foot
21711 status collapsed
21712
21713 \begin_layout Plain Layout
21714 \begin_inset Flex URL
21715 status collapsed
21716
21717 \begin_layout Plain Layout
21718
21719 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21720 \end_layout
21721
21722 \end_inset
21723
21724
21725 \end_layout
21726
21727 \end_inset
21728
21729  how to deal with CR/LF problems when switching .lyx files to the 
21730 \begin_inset Flex Code
21731 status collapsed
21732
21733 \begin_layout Plain Layout
21734 native
21735 \end_layout
21736
21737 \end_inset
21738
21739  mode.
21740 \begin_inset Foot
21741 status collapsed
21742
21743 \begin_layout Plain Layout
21744 For the lazy guys: 
21745 \begin_inset Flex Code
21746 status collapsed
21747
21748 \begin_layout Plain Layout
21749 svn propset svn:eol-style native FILE_NAME
21750 \end_layout
21751
21752 \end_inset
21753
21754
21755 \end_layout
21756
21757 \end_inset
21758
21759
21760 \end_layout
21761
21762 \begin_layout Subsection
21763 GIT commands in LyX
21764 \end_layout
21765
21766 \begin_layout Standard
21767 A minimal subset of GIT commands is now supported by LyX.
21768  You can find the commands in the 
21769 \family sans
21770 File\SpecialChar \menuseparator
21771 Version
21772 \begin_inset space ~
21773 \end_inset
21774
21775 Control
21776 \family default
21777  submenu.
21778  Please note that if you use password protected access to repository via
21779  ssh, you will be asked in terminal window.
21780  LyX was tested against GIT 1.7.
21781 \begin_inset Foot
21782 status open
21783
21784 \begin_layout Plain Layout
21785 Windows users please note that you need to ensure that git is on the path.
21786  This can be set from within LyX at 
21787 \family sans
21788 Tools\SpecialChar \menuseparator
21789 Preferences\SpecialChar \menuseparator
21790 Paths\SpecialChar \menuseparator
21791 PATH prefix
21792 \family default
21793 .
21794 \end_layout
21795
21796 \end_inset
21797
21798
21799 \end_layout
21800
21801 \begin_layout Standard
21802 One big difference of GIT and the other supported version control systems
21803  is the distributed nature of GIT: With traditional version control systems
21804  there is one central server which hosts the repository.
21805  Users commit their changes to the server, and get updates made by other
21806  users from it.
21807  With GIT, users commit to a local repository.
21808  The local repository can be synchronized with one or more remote repositories
21809  using the 
21810 \begin_inset Flex Code
21811 status collapsed
21812
21813 \begin_layout Plain Layout
21814 pull
21815 \end_layout
21816
21817 \end_inset
21818
21819  and 
21820 \begin_inset Flex Code
21821 status collapsed
21822
21823 \begin_layout Plain Layout
21824 push
21825 \end_layout
21826
21827 \end_inset
21828
21829  GIT commands.
21830  LyX does not interact in any way with remote GIT repositories.
21831  It works exclusively with the local repository in a very similar way as
21832  with a central CVS or SVN repository.
21833  If you use remote GIT repositories you need to do the 
21834 \begin_inset Flex Code
21835 status collapsed
21836
21837 \begin_layout Plain Layout
21838 pull
21839 \end_layout
21840
21841 \end_inset
21842
21843  and 
21844 \begin_inset Flex Code
21845 status collapsed
21846
21847 \begin_layout Plain Layout
21848 push
21849 \end_layout
21850
21851 \end_inset
21852
21853  operations with your favourite GIT client.
21854 \end_layout
21855
21856 \begin_layout Subsubsection
21857
21858 \family sans
21859 Register
21860 \end_layout
21861
21862 \begin_layout Standard
21863 If your document is not under revision control, this is the only item shown
21864  in the menu.
21865  And if it is under revision control, the 
21866 \family sans
21867 \bar under
21868 R
21869 \bar default
21870 egister
21871 \family default
21872  item is not visible.
21873 \end_layout
21874
21875 \begin_layout Standard
21876 This command registers in GIT your document ONLY in case you have already
21877  the documents directory under GIT control (in particular 
21878 \family typewriter
21879 .git/index
21880 \family default
21881  file exists).
21882  This means you have to checkout the archive by yourself.
21883 \end_layout
21884
21885 \begin_layout Standard
21886 Then you are asked interactively to supply an initial description of the
21887  document.
21888  Don't forget that registered file is not yet commited.
21889 \end_layout
21890
21891 \begin_layout Standard
21892 GIT command that is run: 
21893 \family typewriter
21894 git add 
21895 \begin_inset Quotes eld
21896 \end_inset
21897
21898 <file-name>
21899 \begin_inset Quotes erd
21900 \end_inset
21901
21902
21903 \end_layout
21904
21905 \begin_layout Standard
21906 Read 
21907 \family typewriter
21908 man git
21909 \family default
21910  to understand the switches.
21911 \end_layout
21912
21913 \begin_layout Subsubsection
21914
21915 \family sans
21916 Check In Changes
21917 \end_layout
21918
21919 \begin_layout Standard
21920 When you are finished editing a file, you commit your changes.
21921  When you do this, you are asked for a description of the changes.
21922  After that changes are commited.
21923 \end_layout
21924
21925 \begin_layout Standard
21926 GIT command: 
21927 \family typewriter
21928 git commit -q -m"<description>" <file-name>
21929 \end_layout
21930
21931 \begin_layout Subsubsection
21932
21933 \family sans
21934 Revert To Repository Version
21935 \end_layout
21936
21937 \begin_layout Standard
21938 This will discard all changes made to the document since the last check
21939  in.
21940  You get a warning before changes are discarded.
21941 \end_layout
21942
21943 \begin_layout Standard
21944 GIT command: 
21945 \family typewriter
21946 git checkout -q 
21947 \begin_inset Quotes eld
21948 \end_inset
21949
21950 <file-name>
21951 \begin_inset Quotes erd
21952 \end_inset
21953
21954
21955 \end_layout
21956
21957 \begin_layout Subsubsection
21958
21959 \family sans
21960 Rename
21961 \end_layout
21962
21963 \begin_layout Standard
21964 This will rename the current document including the version history.
21965  It requires a clean document without any changes since the last checkin.
21966  You are asked for a file name and a description of the rename operation.
21967  After that the document is renamed, both locally and in the repository.
21968  If the parent directories of the new and old file names differ, all relative
21969  paths of included files are adjusted (like in 
21970 \family sans
21971 File\SpecialChar \menuseparator
21972 Save As
21973 \family default
21974 \SpecialChar \ldots{}
21975 ).
21976  Finally, the document is reloaded using the new name.
21977 \end_layout
21978
21979 \begin_layout Labeling
21980 \labelwidthstring 00.00.0000
21981 GIT
21982 \begin_inset space ~
21983 \end_inset
21984
21985 commands: 
21986 \begin_inset space ~
21987 \end_inset
21988
21989
21990 \begin_inset Newline newline
21991 \end_inset
21992
21993
21994 \begin_inset Flex Code
21995 status collapsed
21996
21997 \begin_layout Plain Layout
21998 git mv 
21999 \family typewriter
22000
22001 \begin_inset Quotes eld
22002 \end_inset
22003
22004 <file-name>
22005 \begin_inset Quotes erd
22006 \end_inset
22007
22008  
22009 \begin_inset Quotes eld
22010 \end_inset
22011
22012 <new-file-name>
22013 \begin_inset Quotes erd
22014 \end_inset
22015
22016
22017 \end_layout
22018
22019 \end_inset
22020
22021
22022 \begin_inset Newline newline
22023 \end_inset
22024
22025
22026 \begin_inset Flex Code
22027 status collapsed
22028
22029 \begin_layout Plain Layout
22030 git commit
22031 \end_layout
22032
22033 \end_inset
22034
22035
22036 \end_layout
22037
22038 \begin_layout Subsubsection
22039
22040 \family sans
22041 Show History
22042 \end_layout
22043
22044 \begin_layout Standard
22045 This shows the complete history of the GIT document.
22046  The output of 
22047 \family typewriter
22048 git log 
22049 \begin_inset Quotes eld
22050 \end_inset
22051
22052 <file-name>
22053 \begin_inset Quotes erd
22054 \end_inset
22055
22056
22057 \family default
22058  is shown in a browser.
22059 \end_layout
22060
22061 \begin_layout Subsubsection
22062 Version Info
22063 \end_layout
22064
22065 \begin_layout Standard
22066 LyX supports GIT hash number of the last commit to the file, author name,
22067  date and time of last commit.
22068  All those are extracted from 
22069 \family typewriter
22070 git log -n 1 --pretty=format:%H%n%an%n%ai
22071 \family default
22072 .
22073  Tree version information is obtained via 
22074 \family typewriter
22075 git describe --abbrev --dirty --long
22076 \family default
22077 .
22078  See 
22079 \begin_inset CommandInset ref
22080 LatexCommand ref
22081 reference "sub:VCS-Revision-Information"
22082
22083 \end_inset
22084
22085  for other details.
22086 \end_layout
22087
22088 \begin_layout Subsection
22089 Further tuning
22090 \end_layout
22091
22092 \begin_layout Standard
22093 With the recent addition of the vc-command function LyX power users are
22094  allowed to create their own commands for revision control.
22095 \end_layout
22096
22097 \begin_layout Standard
22098 As an example you can see how two TortoiseSVN commands could be integrated
22099  directly:
22100 \end_layout
22101
22102 \begin_layout Description
22103 Commit: 
22104 \begin_inset Flex Code
22105 status collapsed
22106
22107 \begin_layout Plain Layout
22108 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
22109 \end_layout
22110
22111 \end_inset
22112
22113
22114 \end_layout
22115
22116 \begin_layout Description
22117 Revert: 
22118 \begin_inset Flex Code
22119 status collapsed
22120
22121 \begin_layout Plain Layout
22122 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
22123 \end_layout
22124
22125 \end_inset
22126
22127
22128 \end_layout
22129
22130 \begin_layout Subsection
22131 Version control and Document comparison
22132 \end_layout
22133
22134 \begin_layout Standard
22135 One of the typical uses of version control is to inspect the changes between
22136  revisions, usually by creating 
22137 \begin_inset Flex Code
22138 status collapsed
22139
22140 \begin_layout Plain Layout
22141 diff
22142 \end_layout
22143
22144 \end_inset
22145
22146  dumps.
22147  While this is useful for plain text files, it is much less useful in the
22148  case of LyX files, which have more a complicated structure.
22149  Hence we provide binding to the Document comparison feature.
22150  There are two ways of calling this feature - either by direct call of 
22151 \begin_inset Flex Code
22152 status collapsed
22153
22154 \begin_layout Plain Layout
22155 VC_COMPARE
22156 \end_layout
22157
22158 \end_inset
22159
22160  LyX function (for details see LyX functions manual) or by icon/menu item
22161  
22162 \begin_inset Flex MenuItem
22163 status collapsed
22164
22165 \begin_layout Plain Layout
22166 Compare with older revision...
22167 \end_layout
22168
22169 \end_inset
22170
22171 .
22172  One can either compare two chosen revisions of the document or he can simply
22173  compare the current version of edited text with older revisions (where
22174  '
22175 \begin_inset Flex MenuItem
22176 status collapsed
22177
22178 \begin_layout Plain Layout
22179 0
22180 \end_layout
22181
22182 \end_inset
22183
22184 ' revisions back means comparison of the edited file with last commited
22185  revision).
22186  
22187 \end_layout
22188
22189 \begin_layout Standard
22190 This feature is supported for SVN and RCS though due to the more complicated
22191  versioning scheme of RCS there is a constraint -- when addressing the revisions
22192  in dialog, numbers always point to the last number in RCS revision number,
22193  i.e.
22194  '35' in '1.2.35'.
22195  We don't currently support GIT addressing of revisions, one can just compare
22196  edited document with its revision X steps backs, where X is addressed as
22197  HEAD~X.
22198 \end_layout
22199
22200 \begin_layout Section
22201 Literate Programming
22202 \end_layout
22203
22204 \begin_layout Standard
22205 Updated by 
22206 \noun on
22207 Kayvan Sylvan 
22208 \noun default
22209 (kayvan@sylvan.com)
22210 \noun on
22211
22212 \noun default
22213 original documentation written by 
22214 \noun on
22215 Edmar Wienskoski Jr.
22216
22217 \noun default
22218  (edmar-w-jr@technologist.com)
22219 \end_layout
22220
22221 \begin_layout Subsection
22222 Introduction
22223 \end_layout
22224
22225 \begin_layout Standard
22226 The main purpose of this documentation is to show you how to use LyX for
22227  literate programming, where it is assumed that you are familiar with this
22228  programming technique, and know what 
22229 \begin_inset Quotes eld
22230 \end_inset
22231
22232 tangling
22233 \begin_inset Quotes erd
22234 \end_inset
22235
22236  and 
22237 \begin_inset Quotes eld
22238 \end_inset
22239
22240 weaving
22241 \begin_inset Quotes erd
22242 \end_inset
22243
22244  means.
22245  If that is not the case, please follow the web links provided in the following
22246  sections.
22247  There is a lot of good documentation out there covering old development
22248  history to the latest tools tips.
22249 \end_layout
22250
22251 \begin_layout Standard
22252 It is also assumed that you are familiar with LyX itself to a point that
22253  you are comfortable changing your LyX preferences, and X resources file.
22254  If that is not the case please refer to other LyX documentation to cover
22255  your specific needs.
22256 \end_layout
22257
22258 \begin_layout Subsection
22259 Literate Programming
22260 \end_layout
22261
22262 \begin_layout Standard
22263 From the Literate Programming FAQ: 
22264 \end_layout
22265
22266 \begin_layout Quotation
22267 Literate programming is the combination of documentation and source together
22268  in a fashion suited for reading by human beings.
22269  In fact, literate programs should be enjoyable reading, even inviting!
22270  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
22271  and documentation in a single file.
22272  Literate programming tools then parse the file to produce either readable
22273  documentation or compilable source.
22274  The WEB style of literate programming was created by D.
22275 \begin_inset space \thinspace{}
22276 \end_inset
22277
22278 E.
22279  Knuth during the development of his TeX typesetting software.
22280  
22281 \end_layout
22282
22283 \begin_layout Standard
22284 Another excerpt says:
22285 \end_layout
22286
22287 \begin_layout Quotation
22288
22289 \emph on
22290 How is literate programming different from verbose commenting?
22291 \end_layout
22292
22293 \begin_layout Quotation
22294 There are three distinguishing characteristics.
22295  In order of importance, they are: 
22296 \end_layout
22297
22298 \begin_deeper
22299 \begin_layout Itemize
22300 flexible order of elaboration 
22301 \end_layout
22302
22303 \begin_layout Itemize
22304 automatic support for browsing 
22305 \end_layout
22306
22307 \begin_layout Itemize
22308 typeset documentation, especially diagrams and mathematics 
22309 \end_layout
22310
22311 \end_deeper
22312 \begin_layout Standard
22313 Now that I sparked your curiosity, take a look in the references.
22314 \end_layout
22315
22316 \begin_layout Subsubsection
22317 References
22318 \end_layout
22319
22320 \begin_layout Standard
22321 The complete Literate Programming FAQ can be found at:
22322 \end_layout
22323
22324 \begin_layout Quote
22325 Literate Programming FAQ 
22326 \begin_inset Flex URL
22327 status collapsed
22328
22329 \begin_layout Plain Layout
22330
22331 http://www.literateprogramming.com/lpfaq.pdf
22332 \end_layout
22333
22334 \end_inset
22335
22336
22337 \end_layout
22338
22339 \begin_layout Standard
22340 The FAQ lists 23 (twenty three!) different literate programming tools.
22341  Where some are specialized or 
22342 \begin_inset Quotes eld
22343 \end_inset
22344
22345 tailored
22346 \begin_inset Quotes erd
22347 \end_inset
22348
22349  for particular programming languages, while other have general scope.
22350  I selected 
22351 \noun on
22352 Noweb
22353 \noun default
22354  for my own use for several reasons:
22355 \end_layout
22356
22357 \begin_layout Itemize
22358 It can generate the documentation either in LaTeX or HTML.
22359 \end_layout
22360
22361 \begin_layout Itemize
22362 It has a open architecture, i.
22363 \begin_inset space \thinspace{}
22364 \end_inset
22365
22366 e.
22367 \begin_inset space \space{}
22368 \end_inset
22369
22370 it is easy to plug in new filters and to perform special processing that
22371  you may need.
22372  
22373 \end_layout
22374
22375 \begin_layout Itemize
22376 There is a good selection of filters available already (the HTML is one
22377  of them).
22378 \end_layout
22379
22380 \begin_layout Itemize
22381 It is free.
22382 \end_layout
22383
22384 \begin_layout Standard
22385 The Noweb web page can be found at: 
22386 \end_layout
22387
22388 \begin_layout Quote
22389 Noweb home page 
22390 \begin_inset Flex URL
22391 status collapsed
22392
22393 \begin_layout Plain Layout
22394
22395 http://www.cs.virginia.edu/~nr/noweb/
22396 \end_layout
22397
22398 \end_inset
22399
22400
22401 \end_layout
22402
22403 \begin_layout Standard
22404 Starting from there you can reach many other interesting links and even
22405  some literate program examples.
22406 \end_layout
22407
22408 \begin_layout Subsection
22409 LyX and Literate Programming with Noweb
22410 \end_layout
22411
22412 \begin_layout Standard
22413 The LyX support for Literate Programming is provided by using the generic
22414  LyX converters mechanism.
22415  This support is provided in a 
22416 \begin_inset Quotes eld
22417 \end_inset
22418
22419 Noweb independent
22420 \begin_inset Quotes erd
22421 \end_inset
22422
22423  way, i.
22424 \begin_inset space \thinspace{}
22425 \end_inset
22426
22427 e.
22428 \begin_inset space \space{}
22429 \end_inset
22430
22431 you will be able to use this new LyX feature with some other literate programmin
22432 g tool of your choice by just changing your LyX preferences.
22433 \end_layout
22434
22435 \begin_layout Subsubsection
22436 Generating documents and code (weaving and tangling)
22437 \end_layout
22438
22439 \begin_layout Paragraph
22440 Using the noweb module
22441 \end_layout
22442
22443 \begin_layout Standard
22444 If you have installed Noweb and LyX successfully, whenever you open a new
22445  document, after you have chosen its document class, use the Document->Settings
22446  menu to add the 
22447 \begin_inset Quotes eld
22448 \end_inset
22449
22450 noweb
22451 \begin_inset Quotes erd
22452 \end_inset
22453
22454  module.
22455  If Noweb is correctly installed, when you click on the 
22456 \begin_inset Quotes eld
22457 \end_inset
22458
22459 Modules
22460 \begin_inset Quotes erd
22461 \end_inset
22462
22463  link, you will see the 
22464 \begin_inset Quotes eld
22465 \end_inset
22466
22467 noweb
22468 \begin_inset Quotes erd
22469 \end_inset
22470
22471  module in the available list and you can add it to your document.
22472 \end_layout
22473
22474 \begin_layout Paragraph
22475 Typing code in
22476 \end_layout
22477
22478 \begin_layout Standard
22479 LyX enables you to write code with a layout named 
22480 \begin_inset Flex Noun
22481 status collapsed
22482
22483 \begin_layout Plain Layout
22484 Chunk
22485 \end_layout
22486
22487 \end_inset
22488
22489 .
22490  Noweb delimits chunks like this:
22491 \end_layout
22492
22493 \begin_layout LyX-Code
22494 <<My code>>=
22495 \end_layout
22496
22497 \begin_layout LyX-Code
22498   code
22499 \end_layout
22500
22501 \begin_layout LyX-Code
22502   more code
22503 \end_layout
22504
22505 \begin_layout LyX-Code
22506   even more code
22507 \end_layout
22508
22509 \begin_layout LyX-Code
22510   @
22511 \end_layout
22512
22513 \begin_layout Standard
22514 The problem is that whatever is written in between the << and the 
22515 \family typewriter
22516 @
22517 \family default
22518  must be taken literally, i.
22519 \begin_inset space \thinspace{}
22520 \end_inset
22521
22522 e.
22523 \begin_inset space \space{}
22524 \end_inset
22525
22526 LyX should be prevented from making any special interpretation of what has
22527  been written.
22528  This is also handled by 
22529 \begin_inset Flex Noun
22530 status collapsed
22531
22532 \begin_layout Plain Layout
22533 Chunk
22534 \end_layout
22535
22536 \end_inset
22537
22538 , that works like a normal paragraph but has a free spacing capability.
22539 \end_layout
22540
22541 \begin_layout Standard
22542 As a special note, you can also use the 
22543 \begin_inset Quotes eld
22544 \end_inset
22545
22546 %def
22547 \begin_inset Quotes erd
22548 \end_inset
22549
22550  construct of Noweb in your chunks to add items to Noweb's identifier cross-refe
22551 rence:
22552 \end_layout
22553
22554 \begin_layout LyX-Code
22555 <<My chunk>>=
22556 \end_layout
22557
22558 \begin_layout LyX-Code
22559 def some_function(args):
22560 \end_layout
22561
22562 \begin_layout LyX-Code
22563    "This is the doc string for this function."
22564 \end_layout
22565
22566 \begin_layout LyX-Code
22567    print "My args: ", args
22568 \end_layout
22569
22570 \begin_layout LyX-Code
22571 @ %def some_function
22572 \end_layout
22573
22574 \begin_layout Standard
22575 For an example of this usage and the resulting cross-reference output, look
22576  at the Literate python program in 
22577 \emph on
22578 LIBDIR/examples/listerrors.lyx
22579 \emph default
22580  which should make this all clear.
22581 \end_layout
22582
22583 \begin_layout Paragraph
22584 Generating the documentation
22585 \end_layout
22586
22587 \begin_layout Standard
22588 At this point you already have a new document file with a proper document
22589  class, and with some code and text on it.
22590  How do I print it? The answer is simple, you select 
22591 \family sans
22592 View\SpecialChar \menuseparator
22593 DVI,
22594 \family default
22595  etc.
22596  Just like you would do for a plain document.
22597  No special procedure is required.
22598 \end_layout
22599
22600 \begin_layout Standard
22601 To help orientate you, I will now explain what happens inside LyX:
22602 \end_layout
22603
22604 \begin_layout Enumerate
22605 When the 
22606 \family sans
22607 Update\SpecialChar \menuseparator
22608 DVI
22609 \family default
22610  menu option is chosen, a LaTeX file is generated.
22611  
22612 \end_layout
22613
22614 \begin_deeper
22615 \begin_layout Standard
22616 If the document is of any literate class the generated file will be named
22617  with an extension name defined by the 
22618 \begin_inset Quotes eld
22619 \end_inset
22620
22621 literate
22622 \begin_inset Quotes erd
22623 \end_inset
22624
22625  format (defined in the Preferences panel), otherwise the file will have
22626  the usual 
22627 \family typewriter
22628 .tex
22629 \family default
22630  extension.
22631 \end_layout
22632
22633 \end_deeper
22634 \begin_layout Enumerate
22635 Note that the only difference so far is in the name of the file, no special
22636  processing is required by LyX.
22637  Given that you formatted the code using the 
22638 \begin_inset Flex Noun
22639 status collapsed
22640
22641 \begin_layout Plain Layout
22642 Chunk
22643 \end_layout
22644
22645 \end_inset
22646
22647  layout that, by itself, takes care of the business.
22648 \end_layout
22649
22650 \begin_layout Enumerate
22651 If the document is of any literate class LyX will then use the internal
22652  LyX to Noweb converter, followed by the Noweb to LaTeX converter
22653 \begin_inset Foot
22654 status collapsed
22655
22656 \begin_layout Plain Layout
22657 The converters are defined in the 
22658 \family sans
22659 Tools\SpecialChar \menuseparator
22660 Preferences
22661 \family default
22662  panel, under the 
22663 \begin_inset Quotes eld
22664 \end_inset
22665
22666 Conversion
22667 \begin_inset Quotes erd
22668 \end_inset
22669
22670  tab.
22671  See section 
22672 \emph on
22673 Converters
22674 \emph default
22675  of the 
22676 \emph on
22677 Customization
22678 \emph default
22679  manual for general information about converters.
22680 \end_layout
22681
22682 \end_inset
22683
22684  to generate the LaTeX file.
22685 \end_layout
22686
22687 \begin_deeper
22688 \begin_layout Standard
22689 Otherwise it will just skip this step.
22690 \end_layout
22691
22692 \end_deeper
22693 \begin_layout Enumerate
22694 Finally, LaTeX is invoked and the regular post processing continues as in
22695  a plain document.
22696 \end_layout
22697
22698 \begin_layout Standard
22699 Independence from a particular 
22700 \begin_inset Quotes eld
22701 \end_inset
22702
22703 literate tool
22704 \begin_inset Quotes erd
22705 \end_inset
22706
22707  is easily achieved by changing the commands that are run by the various
22708  converters.
22709 \end_layout
22710
22711 \begin_layout Paragraph
22712 Generating the code
22713 \end_layout
22714
22715 \begin_layout Standard
22716 When the build menu option is chosen or the corresponding button in the
22717  toolbar is pressed, a LaTeX file is generated just like step 1 above.
22718  Next, LyX invokes the 
22719 \family typewriter
22720 Noweb->Program
22721 \family default
22722  converter.
22723  This converter needs to be defined by the user and is not installed by
22724  default, though the Program format is.
22725  This converter (like any other converter) will have two parts:
22726 \end_layout
22727
22728 \begin_layout Enumerate
22729 The converter program itself.
22730  This program performs the conversion from the one format to the other (in
22731  this case, from the Noweb format to the Program pseudo-format).
22732 \end_layout
22733
22734 \begin_layout Enumerate
22735 The error log parser.
22736  This is a program whose sole purpose is to rewrite error messages in a
22737  format that LyX understands.
22738  This makes it possible for LyX to place error boxes in the right places
22739  in the file buffer.
22740 \end_layout
22741
22742 \begin_layout Standard
22743 The first part, the 
22744 \begin_inset Quotes eld
22745 \end_inset
22746
22747 Converter
22748 \begin_inset Quotes erd
22749 \end_inset
22750
22751  setting, should be set to
22752 \begin_inset Newline newline
22753 \end_inset
22754
22755
22756 \begin_inset Quotes eld
22757 \end_inset
22758
22759
22760 \family typewriter
22761 build-script $$i
22762 \family default
22763  $$r
22764 \begin_inset Quotes erd
22765 \end_inset
22766
22767 .
22768 \begin_inset Newline newline
22769 \end_inset
22770
22771 This basically means that LyX will call 
22772 \begin_inset Quotes eld
22773 \end_inset
22774
22775 build-script
22776 \begin_inset Quotes erd
22777 \end_inset
22778
22779  (a program or script) with the name of the Noweb file (normally a file
22780  in the LyX temp directory) and the directory path of the original LyX file.
22781  
22782 \end_layout
22783
22784 \begin_layout Standard
22785 This is an implementation of 
22786 \begin_inset Quotes eld
22787 \end_inset
22788
22789 build-script
22790 \begin_inset Quotes erd
22791 \end_inset
22792
22793  that you can place in a directory on your path:
22794 \end_layout
22795
22796 \begin_layout Standard
22797 \begin_inset VSpace defskip
22798 \end_inset
22799
22800
22801 \end_layout
22802
22803 \begin_layout Standard
22804 \begin_inset Newpage pagebreak
22805 \end_inset
22806
22807
22808 \end_layout
22809
22810 \begin_layout Standard
22811
22812 \family sans
22813 #!/bin/sh
22814 \end_layout
22815
22816 \begin_layout Standard
22817
22818 \family sans
22819 #
22820 \end_layout
22821
22822 \begin_layout Standard
22823
22824 \family sans
22825 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
22826 \end_layout
22827
22828 \begin_layout Standard
22829 \begin_inset VSpace defskip
22830 \end_inset
22831
22832
22833 \end_layout
22834
22835 \begin_layout Standard
22836 The next part of the converter setting is the 
22837 \begin_inset Quotes eld
22838 \end_inset
22839
22840 Flags
22841 \begin_inset Quotes erd
22842 \end_inset
22843
22844  which is to be set to
22845 \begin_inset Newline newline
22846 \end_inset
22847
22848
22849 \begin_inset Quotes eld
22850 \end_inset
22851
22852
22853 \family typewriter
22854 parselog=$$s/scripts/listerrors
22855 \family default
22856
22857 \begin_inset Quotes erd
22858 \end_inset
22859
22860 .
22861 \begin_inset Newline newline
22862 \end_inset
22863
22864 This will run any errors that are generated by the 
22865 \begin_inset Quotes eld
22866 \end_inset
22867
22868 build-script
22869 \begin_inset Quotes erd
22870 \end_inset
22871
22872  process through the 
22873 \begin_inset Quotes eld
22874 \end_inset
22875
22876 listerrors
22877 \begin_inset Quotes erd
22878 \end_inset
22879
22880  program.
22881 \end_layout
22882
22883 \begin_layout Standard
22884 The build will normally take place in LyX's temporary directory, so the
22885  files produced by the conversion will be in that directory.
22886  LyX will copy out what it regards as the `main' file, but the 
22887 \family typewriter
22888 Noweb->Program
22889 \family default
22890  conversion may produce several files, and so most of these would then be
22891  deleted when LyX was closed.
22892  This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
22893  the build-script chunk can place the generated files in that location.
22894 \end_layout
22895
22896 \begin_layout Paragraph
22897 Build instructions in the document
22898 \end_layout
22899
22900 \begin_layout Standard
22901 The last piece of the integration between LyX and noweb is the 
22902 \begin_inset Quotes eld
22903 \end_inset
22904
22905 build-script
22906 \begin_inset Quotes erd
22907 \end_inset
22908
22909  chunk.
22910  Generally, the instructions for building your program should be embedded
22911  in a chunk of its own.
22912  The noweb-specific 
22913 \begin_inset Quotes eld
22914 \end_inset
22915
22916 build-script
22917 \begin_inset Quotes erd
22918 \end_inset
22919
22920  above uses the notangle command to look for this chunk (called 
22921 \begin_inset Quotes eld
22922 \end_inset
22923
22924 build-script
22925 \begin_inset Quotes erd
22926 \end_inset
22927
22928 ) and runs its contents through 
22929 \begin_inset Quotes eld
22930 \end_inset
22931
22932 sh
22933 \begin_inset Quotes erd
22934 \end_inset
22935
22936 .
22937 \end_layout
22938
22939 \begin_layout Standard
22940 Typically, such a chunk would look something like this:
22941 \end_layout
22942
22943 \begin_layout LyX-Code
22944 <<build-script>>=
22945 \end_layout
22946
22947 \begin_layout LyX-Code
22948 #!/bin/sh
22949 \begin_inset Newline newline
22950 \end_inset
22951
22952 if [ -z "${NOWEB_SOURCE}" ]
22953 \begin_inset Newline newline
22954 \end_inset
22955
22956 then
22957 \end_layout
22958
22959 \begin_layout LyX-Code
22960 NOWEB_SOURCE=myfile.nw
22961 \begin_inset Newline newline
22962 \end_inset
22963
22964 fi
22965 \begin_inset Newline newline
22966 \end_inset
22967
22968 [...
22969  code to extract files ...
22970  use NOWEB_OUTPUT_DIR here ...]
22971 \begin_inset Newline newline
22972 \end_inset
22973
22974 [...
22975  code to compile files ...]
22976 \begin_inset Newline newline
22977 \end_inset
22978
22979 @
22980 \end_layout
22981
22982 \begin_layout Standard
22983 Look in 
22984 \emph on
22985 LIBDIR/examples/listerrors.lyx
22986 \emph default
22987  or in 
22988 \emph on
22989 LIBDIR/examples/Literate.lyx
22990 \emph default
22991  which implement two versions of the 
22992 \begin_inset Quotes eld
22993 \end_inset
22994
22995 listerrors
22996 \begin_inset Quotes erd
22997 \end_inset
22998
22999  program for some illustrations of how all of these pieces go together or
23000  in 
23001 \emph on
23002 LIBDIR/examples/noweb2lyx.lyx.
23003
23004 \emph default
23005  Interestingly, these three files show off the language-indepence of the
23006  LyX literate programming support since they are written in Python, C and
23007  Perl respectively.
23008 \end_layout
23009
23010 \begin_layout Subsubsection
23011 Configuring LyX
23012 \end_layout
23013
23014 \begin_layout Standard
23015 All the Literate Programming support is configured by the 
23016 \family sans
23017 Tools\SpecialChar \menuseparator
23018 Preferences
23019 \family default
23020  panel in the 
23021 \begin_inset Quotes eld
23022 \end_inset
23023
23024 File Handling
23025 \begin_inset Quotes erd
23026 \end_inset
23027
23028  tab.
23029  The important parts are:
23030 \end_layout
23031
23032 \begin_layout Description
23033 the
23034 \begin_inset space ~
23035 \end_inset
23036
23037
23038 \begin_inset Quotes eld
23039 \end_inset
23040
23041 NoWeb
23042 \begin_inset Quotes erd
23043 \end_inset
23044
23045
23046 \begin_inset space ~
23047 \end_inset
23048
23049 format Set up via the File Formats tab, this is where the Noweb-specific
23050  pieces are set up.
23051  The 
23052 \family sans
23053 GUI Name
23054 \family default
23055  is set to 
23056 \family typewriter
23057 NoWeb
23058 \family default
23059 , the file extension is set to 
23060 \family typewriter
23061 .nw
23062 \family default
23063 .
23064  This tells LyX to create a file with a 
23065 \family typewriter
23066 .nw
23067 \family default
23068  extension in the first step of the conversion process.
23069 \end_layout
23070
23071 \begin_layout Description
23072 the
23073 \begin_inset space ~
23074 \end_inset
23075
23076
23077 \family sans
23078 Program
23079 \family default
23080
23081 \begin_inset space ~
23082 \end_inset
23083
23084 format This is an empty format whose sole purpose is to be the endpoint
23085  of a conversion (which then allows us to set up a converter for it).
23086 \end_layout
23087
23088 \begin_layout Description
23089
23090 \family sans
23091 NoWeb
23092 \family default
23093 ->
23094 \family sans
23095 LaTeX
23096 \family default
23097  This converter performs the 
23098 \begin_inset Quotes eld
23099 \end_inset
23100
23101 weaving
23102 \begin_inset Quotes erd
23103 \end_inset
23104
23105  of the literate document.
23106  For Noweb, it is set to 
23107 \begin_inset Quotes eld
23108 \end_inset
23109
23110
23111 \family typewriter
23112 noweave -delay -index $$i > $$o
23113 \family default
23114
23115 \begin_inset Quotes erd
23116 \end_inset
23117
23118
23119 \end_layout
23120
23121 \begin_layout Description
23122
23123 \family sans
23124 NoWeb
23125 \family default
23126 ->
23127 \family sans
23128 Program
23129 \family default
23130  This performs the 
23131 \begin_inset Quotes eld
23132 \end_inset
23133
23134 tangling step
23135 \begin_inset Quotes erd
23136 \end_inset
23137
23138 .
23139  As stated above, the Converter is set to 
23140 \begin_inset Quotes eld
23141 \end_inset
23142
23143
23144 \family typewriter
23145 build-script $$i
23146 \family default
23147  $$r
23148 \begin_inset Quotes erd
23149 \end_inset
23150
23151 , with Flags set to
23152 \begin_inset Newline newline
23153 \end_inset
23154
23155
23156 \begin_inset Quotes eld
23157 \end_inset
23158
23159
23160 \family typewriter
23161 parselog=$$s/scripts/listerrors
23162 \family default
23163
23164 \begin_inset Quotes erd
23165 \end_inset
23166
23167 .
23168 \end_layout
23169
23170 \begin_layout Subsubsection
23171 Debug extensions
23172 \end_layout
23173
23174 \begin_layout Standard
23175 There is also a new function implemented in the LyX server, the 
23176 \begin_inset Quotes eld
23177 \end_inset
23178
23179 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
23180  
23181 \end_layout
23182
23183 \begin_layout Standard
23184 When debugging code with ddd/gdb, it is possible to invoke a text editor
23185  at the current execution position with a single key stroke.
23186  The default ddd configuration for that is shift-ctrl-V.
23187  It happens that you can define the editor command line invocation in ddd
23188  by accessing the 
23189 \family sans
23190 Edit\SpecialChar \menuseparator
23191 Preferences\SpecialChar \menuseparator
23192 Helpers
23193 \family default
23194  dialog and changing the "Edit Sources" entry.
23195 \end_layout
23196
23197 \begin_layout Standard
23198 I take advantage of the newly created LyX server function and this ddd feature,
23199  and set 
23200 \begin_inset Quotes eld
23201 \end_inset
23202
23203 Edit Sources
23204 \begin_inset Quotes erd
23205 \end_inset
23206
23207  to:
23208 \end_layout
23209
23210 \begin_layout Standard
23211 \begin_inset VSpace defskip
23212 \end_inset
23213
23214
23215 \end_layout
23216
23217 \begin_layout Standard
23218
23219 \family sans
23220 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
23221 \end_layout
23222
23223 \begin_layout Standard
23224 \begin_inset VSpace defskip
23225 \end_inset
23226
23227
23228 \end_layout
23229
23230 \begin_layout Standard
23231 With this, whenever you are using ddd and find a point in the program that
23232  you want to edit, you just press shift-ctrl-V (in the ddd window), and
23233  ddd will forward this information to LyX through the LyX server and then
23234  the LyX window will show the same file with the cursor at the same position
23235  ddd was pointing to.
23236  No more guessing or long scrolling to locate a point in the program back
23237  from debugging !
23238 \end_layout
23239
23240 \begin_layout Standard
23241 Note however that you must enable the LyX server to get this feature working
23242  (it is disabled by default).
23243  You can enable it in 
23244 \family sans
23245 Preferences
23246 \family default
23247  (tabs 
23248 \family sans
23249 Inputs
23250 \family default
23251
23252 \family sans
23253 Paths
23254 \family default
23255 ) by entering in the 
23256 \family sans
23257 LyXserver pipe
23258 \family default
23259  a path like 
23260 \begin_inset Quotes eld
23261 \end_inset
23262
23263
23264 \family typewriter
23265 /home/<your-home-directory>/.lyx/lyxpipe
23266 \family default
23267
23268 \begin_inset Quotes erd
23269 \end_inset
23270
23271
23272 \end_layout
23273
23274 \begin_layout Standard
23275 Read the LyX server documentation in the 
23276 \emph on
23277 Customization Manual
23278 \emph default
23279  for further information.
23280 \end_layout
23281
23282 \begin_layout Subsubsection
23283 Toolbar extensions
23284 \end_layout
23285
23286 \begin_layout Standard
23287 There are six new buttons that can be added to your LyX toolbar.
23288  Five of these buttons are short cuts to layout styles: 
23289 \family sans
23290 Standard
23291 \family default
23292
23293 \family sans
23294 Section
23295 \family default
23296
23297 \family sans
23298 LaTeX
23299 \family default
23300
23301 \family sans
23302 LyX-Code
23303 \family default
23304 , and 
23305 \family sans
23306 Chunk
23307 \family default
23308 .
23309  The last one is a short cut to the 
23310 \begin_inset Quotes eld
23311 \end_inset
23312
23313 Build Program
23314 \begin_inset Quotes erd
23315 \end_inset
23316
23317  File menu entry.
23318  
23319 \end_layout
23320
23321 \begin_layout Standard
23322 LyX has a range of buttons that are available for tool bar customization.
23323  In my toolbar I like to combine the six short cuts above with two more:
23324  One for 
23325 \family sans
23326 Document
23327 \family default
23328 \SpecialChar \menuseparator
23329
23330 \family sans
23331 Update
23332 \family default
23333 \SpecialChar \menuseparator
23334
23335 \family sans
23336 DVI
23337 \family default
23338  and the other for 
23339 \family sans
23340 Document\SpecialChar \menuseparator
23341 View\SpecialChar \menuseparator
23342 DVI
23343 \family default
23344  File menu entries.
23345  Here is how it looks like:
23346 \end_layout
23347
23348 \begin_layout LyX-Code
23349 Toolbar
23350 \end_layout
23351
23352 \begin_layout LyX-Code
23353   Layouts
23354 \end_layout
23355
23356 \begin_layout LyX-Code
23357   Icon "layout Standard"
23358 \end_layout
23359
23360 \begin_layout LyX-Code
23361   Icon "layout Section"
23362 \end_layout
23363
23364 \begin_layout LyX-Code
23365   Icon "layout LaTeX"
23366 \end_layout
23367
23368 \begin_layout LyX-Code
23369   Icon "layout LyX-Code"
23370 \end_layout
23371
23372 \begin_layout LyX-Code
23373   Icon "layout Chunk"
23374 \end_layout
23375
23376 \begin_layout LyX-Code
23377   Separator
23378 \end_layout
23379
23380 \begin_layout LyX-Code
23381   Icon "buffer-view"
23382 \end_layout
23383
23384 \begin_layout LyX-Code
23385   Icon "buffer-typeset"
23386 \end_layout
23387
23388 \begin_layout LyX-Code
23389   Icon "build-program"
23390 \end_layout
23391
23392 \begin_layout LyX-Code
23393   Separator
23394 \end_layout
23395
23396 \begin_layout LyX-Code
23397 .
23398 \end_layout
23399
23400 \begin_layout LyX-Code
23401 .
23402 \end_layout
23403
23404 \begin_layout LyX-Code
23405 .
23406 \end_layout
23407
23408 \begin_layout LyX-Code
23409 End
23410 \end_layout
23411
23412 \begin_layout Subsubsection
23413 Colors customization
23414 \end_layout
23415
23416 \begin_layout Standard
23417 There are a number of colors in LyX that can be customized in 
23418 \family sans
23419 Preferences
23420 \family default
23421 .
23422  One of the things that bothers people is the LaTeX font color.
23423  The default color is red, since the chunks uses LaTeX font, and there is
23424  a lot of chunks in literate documents, you may get tired of seeing everything
23425  in red.
23426  You can change it by going to the tabs 
23427 \family sans
23428 Look&Feel
23429 \family default
23430
23431 \family sans
23432 Colors.
23433 \end_layout
23434
23435 \begin_layout Standard
23436 The next thing is the visible presence of the newline character in the screen.
23437  You can choose the color of this particular character and make it blend
23438  in the background.
23439  I recommend you choosing a color that is close to the background but not
23440  equal, that way you still can see it is there, but it is not bothering
23441  you anymore.
23442 \end_layout
23443
23444 \begin_layout Subsection
23445 LyX and knitr/Sweave
23446 \end_layout
23447
23448 \begin_layout Standard
23449 Support for 
23450 \family sans
23451 knitr
23452 \family default
23453  and 
23454 \family sans
23455 Sweave
23456 \family default
23457  is documented in the 
23458 \emph on
23459 knitr.lyx
23460 \emph default
23461  example file and in the Sweave manual (menu 
23462 \family sans
23463 Help\SpecialChar \menuseparator
23464 Specific Manuals
23465 \family default
23466 ).
23467 \end_layout
23468
23469 \begin_layout Chapter
23470 Special features
23471 \end_layout
23472
23473 \begin_layout Standard
23474 You can do everything with LyX that you can do with LaTeX.
23475  However, LyX cannot support every LaTeX feature directly.
23476  But you can always use TeX Code.
23477  This chapter shows you some more special things you might want to use.
23478  For other special things you can do with figures, tables, floats, boxes
23479  and notes, have a look at the 
23480 \emph on
23481 Embedded
23482 \begin_inset space ~
23483 \end_inset
23484
23485 Objects
23486 \emph default
23487  manual.
23488 \end_layout
23489
23490 \begin_layout Section
23491 Multiple Text Columns
23492 \end_layout
23493
23494 \begin_layout Standard
23495 This feature is independent of the option 
23496 \family sans
23497 Two-column document
23498 \family default
23499  in the document settings under 
23500 \family sans
23501 Text Layout
23502 \family default
23503 .
23504  If you want to have 2
23505 \begin_inset space ~
23506 \end_inset
23507
23508 columns for the whole document, it is recommended to use the 
23509 \family sans
23510 Two-column document
23511 \family default
23512  option.
23513  For all other cases use this feature.
23514 \end_layout
23515
23516 \begin_layout Standard
23517 To use multiple text columns in your document, you have to load the module
23518  
23519 \family sans
23520 Multiple Columns
23521 \family default
23522  (menu 
23523 \family sans
23524 Document\SpecialChar \menuseparator
23525 Settings\SpecialChar \menuseparator
23526 Modules
23527 \family default
23528 ) and must have the LaTeX-package 
23529 \series bold
23530 multicol
23531 \series default
23532  installed.
23533 \end_layout
23534
23535 \begin_layout Standard
23536 Footnotes within multiple columns will be placed at the bottom of the page
23537  and not under each column.
23538  Within the different columns you can use everything, with the limitation
23539  that for floats you need to use the float option 
23540 \family sans
23541 Span columns
23542 \family default
23543 .
23544 \end_layout
23545
23546 \begin_layout Subsection
23547 Basics
23548 \end_layout
23549
23550 \begin_layout Standard
23551 If you want to have 2
23552 \begin_inset space ~
23553 \end_inset
23554
23555 columns in your text, insert a multicolumn inset via the menu 
23556 \family sans
23557 Insert\SpecialChar \menuseparator
23558 Custom
23559 \begin_inset space ~
23560 \end_inset
23561
23562 Insets\SpecialChar \menuseparator
23563 Multiple
23564 \begin_inset space ~
23565 \end_inset
23566
23567 Columns
23568 \family default
23569  where the columns should start.
23570  Write all text that should be printed in 2
23571 \begin_inset space ~
23572 \end_inset
23573
23574 columns into this inset.
23575 \end_layout
23576
23577 \begin_layout Standard
23578 Here is an example:
23579 \end_layout
23580
23581 \begin_layout Standard
23582 \noindent
23583 \begin_inset Flex Multiple Columns
23584 status open
23585
23586 \begin_layout Plain Layout
23587 \noindent
23588
23589 \series bold
23590 \size small
23591 The Adventure of the Empty House
23592 \series default
23593
23594 \begin_inset Newline newline
23595 \end_inset
23596
23597 by Sir Arthur Conan Doyle
23598 \end_layout
23599
23600 \begin_layout Plain Layout
23601
23602 \size small
23603 It was in the spring of the year 1894 that all London was interested, and
23604  the fashionable world dismayed, by the murder of the Honourable Ronald
23605  Adair under most unusual and inexplicable circumstances.
23606  The public has already learned those particulars of the crime which came
23607  out in the police investigation, but a good deal was suppressed upon that
23608  occasion, since the case for the prosecution was so overwhelmingly strong
23609  that it was not necessary to bring forward all the facts.
23610  Only now, at the end of nearly ten years, am I allowed to supply those
23611  missing links which make up the whole of that remarkable chain.
23612  The crime was of interest in itself, but that interest was as nothing to
23613  me compared to the inconceivable sequel, which afforded me the greatest
23614  shock and surprise of any event in my adventurous life.
23615  Even now, after this long interval, I find myself thrilling as I think
23616  of it, and feeling once more that sudden flood of joy, amazement, and increduli
23617 ty which utterly submerged my mind.
23618  Let me say to that public, which has shown some interest in those glimpses
23619  which I have occasionally given them of the thoughts and actions of a very
23620  remarkable man, that they are not to blame me if I have not shared my knowledge
23621  with them, for I should have considered it my first duty to do so, had
23622  I not been barred by a positive prohibition from his own lips, which was
23623  only withdrawn upon the third of last month.
23624 \end_layout
23625
23626 \end_inset
23627
23628
23629 \end_layout
23630
23631 \begin_layout Standard
23632 To get 3 or more columns, set the cursor into the multicolumn inset and
23633  use the menu 
23634 \family sans
23635 Insert\SpecialChar \menuseparator
23636 Number
23637 \begin_inset space ~
23638 \end_inset
23639
23640 of
23641 \begin_inset space ~
23642 \end_inset
23643
23644 Columns
23645 \family default
23646 .
23647  The number of the desired columns is written into that inset (for 3
23648 \begin_inset space ~
23649 \end_inset
23650
23651 columns write 
23652 \begin_inset Quotes eld
23653 \end_inset
23654
23655 3
23656 \begin_inset Quotes erd
23657 \end_inset
23658
23659 ).
23660 \begin_inset Newline newline
23661 \end_inset
23662
23663 Here is an example with 3
23664 \begin_inset space ~
23665 \end_inset
23666
23667 columns:
23668 \end_layout
23669
23670 \begin_layout Standard
23671 \begin_inset Flex Multiple Columns
23672 status open
23673
23674 \begin_layout Plain Layout
23675
23676 \size footnotesize
23677 \begin_inset Argument 1
23678 status open
23679
23680 \begin_layout Plain Layout
23681 3
23682 \end_layout
23683
23684 \end_inset
23685
23686 It can be imagined that my close intimacy with Sherlock Holmes had interested
23687  me deeply in crime, and that after his disappearance I never failed to
23688  read with care the various problems which came before the public.
23689  And I even attempted, more than once, for my own private satisfaction,
23690  to employ his methods in their solution, though with indifferent success.
23691  There was none, however, which appealed to me like this tragedy of Ronald
23692  Adair.
23693  As I read the evidence at the inquest, which led up to a verdict of willful
23694  murder against some person or persons unknown, I realized more clearly
23695  than I had ever done the loss which the community had sustained by the
23696  death of Sherlock Holmes.
23697  There were points about this strange business which would, I was sure,
23698  have specially appealed to him, and the efforts of the police would have
23699  been supplemented, or more probably anticipated, by the trained observation
23700  and the alert mind of the first criminal agent in Europe.
23701  All day, as I drove upon my round, I turned over the case in my mind and
23702  found no explanation which appeared to me to be adequate.
23703  At the risk of telling a twice-told tale, I will recapitulate the facts
23704  as they were known to the public at the conclusion of the inquest.
23705 \end_layout
23706
23707 \end_inset
23708
23709
23710 \end_layout
23711
23712 \begin_layout Standard
23713 You can have up to 10
23714 \begin_inset space ~
23715 \end_inset
23716
23717 columns if you want to, but that might not be very pleasant for the readers
23718  of your document.
23719 \end_layout
23720
23721 \begin_layout Standard
23722 \begin_inset Newpage newpage
23723 \end_inset
23724
23725
23726 \end_layout
23727
23728 \begin_layout Subsection
23729 Columns inside Columns
23730 \end_layout
23731
23732 \begin_layout Standard
23733 You can also have columns inside columns:
23734 \end_layout
23735
23736 \begin_layout Standard
23737 \begin_inset Flex Multiple Columns
23738 status open
23739
23740 \begin_layout Plain Layout
23741
23742 \size footnotesize
23743 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
23744  at that time governor of one of the Australian colonies.
23745  Adair's mother had returned from Australia to undergo the operation for
23746  cataract, and she, her son Ronald, and her daughter Hilda were living together
23747  at 427 Park Lane.
23748 \end_layout
23749
23750 \begin_layout Plain Layout
23751 \begin_inset Flex Multiple Columns
23752 status open
23753
23754 \begin_layout Plain Layout
23755
23756 \size footnotesize
23757 The youth moved in the best society–had, so far as was known, no enemies
23758  and no particular vices.
23759  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
23760  had been broken off by mutual consent some months before, and there was
23761  no sign that it had left any very profound feeling behind it.
23762  For the rest {sic} the man's life moved in a narrow and conventional circle,
23763  for his habits were quiet and his nature unemotional.
23764  Yet it was upon this easy-going young aristocrat that death came, in most
23765  strange and unexpected form, between the hours of ten and eleven-twenty
23766  on the night of March 30, 1894.
23767 \end_layout
23768
23769 \end_inset
23770
23771
23772 \end_layout
23773
23774 \begin_layout Plain Layout
23775
23776 \size footnotesize
23777 Ronald Adair was fond of cards–playing continually, but never for such stakes
23778  as would hurt him.
23779  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
23780  It was shown that, after dinner on the day of his death, he had played
23781  a rubber of whist at the latter club.
23782  He had also played there in the afternoon.
23783
23784 \size default
23785  
23786 \size footnotesize
23787 The evidence of those who had played with him– Mr.
23788  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
23789  and that there was a fairly equal fall of the cards.
23790  Adair might have lost five pounds, but not more.
23791  His fortune was a considerable one, and such a loss could not in any way
23792  affect him.
23793  He had played nearly every day at one club or other, but he was a cautious
23794  player, and usually rose a winner.
23795  It came out in evidence that, in partnership with Colonel Moran, he had
23796  actually won as much as four hundred and twenty pounds in a sitting, some
23797  weeks before, from Godfrey Milner and Lord Balmoral.
23798  So much for his recent history as it came out at the inquest.
23799 \end_layout
23800
23801 \end_inset
23802
23803
23804 \end_layout
23805
23806 \begin_layout Subsection
23807 Advanced Examples
23808 \end_layout
23809
23810 \begin_layout Standard
23811 The examples in this section show some more special features of multiple
23812  columns.
23813 \end_layout
23814
23815 \begin_layout Standard
23816 For more features of multiple columns, have a look at the documentation
23817  of the LaTeX-package 
23818 \series bold
23819 multicol
23820 \series default
23821
23822 \begin_inset CommandInset citation
23823 LatexCommand cite
23824 key "multicol"
23825
23826 \end_inset
23827
23828 .
23829 \end_layout
23830
23831 \begin_layout Subsubsection
23832 Preface
23833 \end_layout
23834
23835 \begin_layout Standard
23836 To add a preface text for multiple columns, set the cursor into the multicolumn
23837  inset and use the menu 
23838 \family sans
23839 Insert\SpecialChar \menuseparator
23840 Preface
23841 \family default
23842 .
23843  Write your preface text into that inset.
23844 \begin_inset Newline newline
23845 \end_inset
23846
23847 This is an example with some preface text:
23848 \end_layout
23849
23850 \begin_layout Standard
23851 \begin_inset VSpace bigskip
23852 \end_inset
23853
23854
23855 \end_layout
23856
23857 \begin_layout Standard
23858 \begin_inset Flex Multiple Columns
23859 status open
23860
23861 \begin_layout Plain Layout
23862 \begin_inset Argument 2
23863 status open
23864
23865 \begin_layout Plain Layout
23866 And the story continues and continues and continues and continues\SpecialChar \ldots{}
23867
23868 \end_layout
23869
23870 \end_inset
23871
23872
23873 \size small
23874 On the evening of the crime, he returned from the club exactly at ten.
23875  His mother and sister were out spending the evening with a relation.
23876  The servant deposed that she heard him enter the front room on the second
23877  floor, generally used as his sitting-room.
23878  She had lit a fire there, and as it smoked she had opened the window.
23879  No sound was heard from the room until eleven-twenty, the hour of the return
23880  of Lady Maynooth and her daughter.
23881  Desiring to say good-night, she attempted to enter her son's room.
23882  The door was locked on the inside, and no answer could be got to their
23883  cries and knocking.
23884  Help was obtained, and the door forced.
23885  The unfortunate young man was found lying near the table.
23886  His head had been horribly mutilated by an expanding revolver bullet, but
23887  no weapon of any sort was to be found in the room.
23888 \end_layout
23889
23890 \end_inset
23891
23892
23893 \end_layout
23894
23895 \begin_layout Standard
23896 You can also use a section heading as the preface if you use a section command
23897  as TeX Code.
23898  For example the command
23899 \end_layout
23900
23901 \begin_layout Standard
23902
23903 \series bold
23904
23905 \backslash
23906 subsection{subsection title}
23907 \end_layout
23908
23909 \begin_layout Standard
23910 creates a subsection.
23911  In this example the preface is a subsubsection:
23912 \end_layout
23913
23914 \begin_layout Standard
23915 \begin_inset Flex Multiple Columns
23916 status open
23917
23918 \begin_layout Plain Layout
23919 \begin_inset Argument 2
23920 status open
23921
23922 \begin_layout Plain Layout
23923 \begin_inset ERT
23924 status collapsed
23925
23926 \begin_layout Plain Layout
23927
23928
23929 \backslash
23930 subsubsection{
23931 \end_layout
23932
23933 \end_inset
23934
23935 This is a subsubsection heading as a preface
23936 \begin_inset ERT
23937 status collapsed
23938
23939 \begin_layout Plain Layout
23940
23941 }
23942 \end_layout
23943
23944 \end_inset
23945
23946
23947 \end_layout
23948
23949 \end_inset
23950
23951
23952 \size small
23953 A minute examination of the circumstances served only to make the case more
23954  complex.
23955  In the first place, no reason could be given why the young man should have
23956  fastened the door upon the inside.
23957  There was the possibility that the murderer had done this, and had afterwards
23958  escaped by the window.
23959  The drop was at least twenty feet, however, and a bed of crocuses in full
23960  bloom lay beneath.
23961  Neither the flowers nor the earth showed any sign of having been disturbed,
23962  nor were there any marks upon the narrow strip of grass which separated
23963  the house from the road.
23964  Apparently, therefore, it was the young man himself who had fastened the
23965  door.
23966  But how did he come by his death? No one could have climbed up to the window
23967  without leaving traces.
23968  Suppose a man had fired through the window, he would indeed be a remarkable
23969  shot who could with a revolver inflict so deadly a wound.
23970  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
23971  a hundred yards of the house.
23972  No one had heard a shot.
23973 \end_layout
23974
23975 \end_inset
23976
23977
23978 \end_layout
23979
23980 \begin_layout Standard
23981 If there is less vertical space than 6
23982 \begin_inset space ~
23983 \end_inset
23984
23985 text lines is left on the page at the beginning of the multiple columns,
23986  a page break will be inserted before the multiple columns.
23987  Depending on the number of lines of the preface text, you might want to
23988  change this space.
23989  This is done by setting the cursor into the mulitcolumn inset behind the
23990  preface (if there is any) and using the menu 
23991 \family sans
23992 Insert\SpecialChar \menuseparator
23993 Space
23994 \begin_inset space ~
23995 \end_inset
23996
23997 Before
23998 \begin_inset space ~
23999 \end_inset
24000
24001 Page
24002 \begin_inset space ~
24003 \end_inset
24004
24005 Break
24006 \family default
24007 .
24008  Insert into that inset the amount of space like e.
24009 \begin_inset space \thinspace{}
24010 \end_inset
24011
24012 g.
24013 \begin_inset space \space{}
24014 \end_inset
24015
24016
24017 \begin_inset Quotes eld
24018 \end_inset
24019
24020 5cm
24021 \begin_inset Quotes erd
24022 \end_inset
24023
24024 .
24025 \begin_inset Newline newline
24026 \end_inset
24027
24028 In this example the space is set to 7
24029 \begin_inset space ~
24030 \end_inset
24031
24032 text lines by using 
24033 \begin_inset Quotes eld
24034 \end_inset
24035
24036 7
24037 \backslash
24038 baselineskip
24039 \begin_inset Quotes erd
24040 \end_inset
24041
24042  (where the command 
24043 \series bold
24044
24045 \backslash
24046 baselineskip
24047 \series default
24048  needs to be inserted as TeX code):
24049 \end_layout
24050
24051 \begin_layout Standard
24052 \begin_inset Flex Multiple Columns
24053 status open
24054
24055 \begin_layout Plain Layout
24056 \begin_inset Argument 3
24057 status open
24058
24059 \begin_layout Plain Layout
24060 7
24061 \begin_inset ERT
24062 status collapsed
24063
24064 \begin_layout Plain Layout
24065
24066
24067 \backslash
24068 baselineskip
24069 \end_layout
24070
24071 \end_inset
24072
24073
24074 \end_layout
24075
24076 \end_inset
24077
24078
24079 \size small
24080 On the evening of the crime, he returned from the club exactly at ten.
24081  His mother and sister were out spending the evening with a relation.
24082  The servant deposed that she heard him enter the front room on the second
24083  floor, generally used as his sitting-room.
24084  She had lit a fire there, and as it smoked she had opened the window.
24085  No sound was heard from the room until eleven-twenty, the hour of the return
24086  of Lady Maynooth and her daughter.
24087  Desiring to say good-night, she attempted to enter her son's room.
24088  The door was locked on the inside, and no answer could be got to their
24089  cries and knocking.
24090  Help was obtained, and the door forced.
24091  The unfortunate young man was found lying near the table.
24092  His head had been horribly mutilated by an expanding revolver bullet, but
24093  no weapon of any sort was to be found in the room.
24094 \end_layout
24095
24096 \end_inset
24097
24098
24099 \end_layout
24100
24101 \begin_layout Subsubsection
24102 Surrounding Space
24103 \end_layout
24104
24105 \begin_layout Standard
24106 The amount of space before and after multiple columns can be changed by
24107  changing the length 
24108 \series bold
24109
24110 \backslash
24111 multicolsep
24112 \series default
24113 .
24114  For example the command
24115 \end_layout
24116
24117 \begin_layout Standard
24118
24119 \series bold
24120
24121 \backslash
24122 setlength{
24123 \backslash
24124 multicolsep}{3cm}
24125 \end_layout
24126
24127 \begin_layout Standard
24128 in TeX Code changes its value to 3
24129 \begin_inset space \thinspace{}
24130 \end_inset
24131
24132 cm.
24133  The change must be made before the multiple columns' start.
24134  The predefined value is 13
24135 \begin_inset space \thinspace{}
24136 \end_inset
24137
24138 pt.
24139 \end_layout
24140
24141 \begin_layout Standard
24142 For this example 
24143 \series bold
24144
24145 \backslash
24146 multicolsep
24147 \series default
24148  was set to 2.5
24149 \begin_inset space \thinspace{}
24150 \end_inset
24151
24152 cm:
24153 \end_layout
24154
24155 \begin_layout Standard
24156 \begin_inset ERT
24157 status open
24158
24159 \begin_layout Plain Layout
24160
24161
24162 \backslash
24163 setlength{
24164 \backslash
24165 multicolsep}{2.5cm}
24166 \end_layout
24167
24168 \end_inset
24169
24170
24171 \end_layout
24172
24173 \begin_layout Standard
24174 \begin_inset Flex Multiple Columns
24175 status open
24176
24177 \begin_layout Plain Layout
24178
24179 \size small
24180 All day I turned these facts over in my mind, endeavouring to hit upon some
24181  theory which could reconcile them all, and to find that line of least resistanc
24182 e which my poor friend had declared to be the starting-point of every investigat
24183 ion.
24184  I confess that I made little progress.
24185  In the evening I strolled across the Park, and found myself about six o'clock
24186  at the Oxford Street end of Park Lane.
24187  A group of loafers upon the pavements, all staring up at a particular window,
24188  directed me to the house which I had come to see.
24189  A tall, thin man with coloured glasses, whom I strongly suspected of being
24190  a plain-clothes detective, was pointing out some theory of his own, while
24191  the others crowded round to listen to what he said.
24192  I got as near him as I could, but his observations seemed to me to be absurd,
24193  so I withdrew again in some disgust.
24194  As I did so I struck against an elderly, deformed man, who had been behind
24195  me, and I knocked down several books which he was carrying.
24196 \end_layout
24197
24198 \end_inset
24199
24200
24201 \end_layout
24202
24203 \begin_layout Standard
24204 \begin_inset Note Greyedout
24205 status open
24206
24207 \begin_layout Plain Layout
24208
24209 \series bold
24210 Note:
24211 \series default
24212  The values you set with 
24213 \series bold
24214
24215 \backslash
24216 setlength
24217 \series default
24218  will be used for all following multiple columns until you change them again.
24219 \end_layout
24220
24221 \end_inset
24222
24223
24224 \end_layout
24225
24226 \begin_layout Standard
24227 \begin_inset ERT
24228 status collapsed
24229
24230 \begin_layout Plain Layout
24231
24232
24233 \backslash
24234 setlength{
24235 \backslash
24236 multicolsep}{13pt}
24237 \end_layout
24238
24239 \end_inset
24240
24241
24242 \begin_inset Note Note
24243 status collapsed
24244
24245 \begin_layout Plain Layout
24246 go back to the default
24247 \end_layout
24248
24249 \end_inset
24250
24251
24252 \end_layout
24253
24254 \begin_layout Standard
24255 \begin_inset Newpage newpage
24256 \end_inset
24257
24258
24259 \end_layout
24260
24261 \begin_layout Subsubsection
24262 Column Breaks
24263 \end_layout
24264
24265 \begin_layout Standard
24266 A column break can be forced by inserting the command 
24267 \series bold
24268
24269 \backslash
24270 columnbreak{}
24271 \series default
24272  as TeX-Code to that position in the text where the column should be broken.
24273  Note that this leads in most cases to whitespace in the text.
24274 \begin_inset Newline newline
24275 \end_inset
24276
24277 Here is an example:
24278 \end_layout
24279
24280 \begin_layout Standard
24281 \begin_inset Flex Multiple Columns
24282 status open
24283
24284 \begin_layout Plain Layout
24285
24286 \size small
24287 \begin_inset Quotes eld
24288 \end_inset
24289
24290 You're surprised to see me, sir,
24291 \begin_inset Quotes erd
24292 \end_inset
24293
24294  said he, in a strange, croaking voice.
24295 \end_layout
24296
24297 \begin_layout Plain Layout
24298
24299 \size small
24300 I acknowledged that I was.
24301 \end_layout
24302
24303 \begin_layout Plain Layout
24304
24305 \size small
24306 \begin_inset Quotes eld
24307 \end_inset
24308
24309 Well, I've a conscience, sir, and when I chanced to see you go into this
24310  house, as I came hobbling after you, I thought to myself, I'll just step
24311  in and see that kind gentleman, and tell him that if I was a bit gruff
24312  in my manner there was not any harm meant, and that I am much obliged to
24313  him for picking up my books.
24314 \begin_inset Quotes erd
24315 \end_inset
24316
24317
24318 \end_layout
24319
24320 \begin_layout Plain Layout
24321
24322 \size small
24323 \begin_inset Quotes eld
24324 \end_inset
24325
24326 You make too much of a trifle,
24327 \begin_inset Quotes erd
24328 \end_inset
24329
24330  said I.
24331  
24332 \begin_inset Quotes eld
24333 \end_inset
24334
24335 May I ask how you knew who I was?
24336 \begin_inset Quotes erd
24337 \end_inset
24338
24339  AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED.
24340 \begin_inset ERT
24341 status collapsed
24342
24343 \begin_layout Plain Layout
24344
24345
24346 \backslash
24347 columnbreak{}
24348 \end_layout
24349
24350 \end_inset
24351
24352
24353 \end_layout
24354
24355 \begin_layout Plain Layout
24356
24357 \size small
24358 \begin_inset Quotes eld
24359 \end_inset
24360
24361 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24362  you'll find my little bookshop at the corner of Church Street, and very
24363  happy to see you, I am sure.
24364  Maybe you collect yourself, sir.
24365  Here's 
24366 \noun on
24367 British
24368 \begin_inset space ~
24369 \end_inset
24370
24371 Birds
24372 \noun default
24373 , and 
24374 \noun on
24375 Catullus
24376 \noun default
24377 , and 
24378 \noun on
24379 The Holy War
24380 \noun default
24381 --a bargain, every one of them.
24382  With five volumes you could just fill that gap on that second shelf.
24383  It looks untidy, does it not, sir?
24384 \begin_inset Quotes erd
24385 \end_inset
24386
24387
24388 \end_layout
24389
24390 \end_inset
24391
24392
24393 \end_layout
24394
24395 \begin_layout Subsubsection
24396 Column Separation
24397 \end_layout
24398
24399 \begin_layout Standard
24400 The width of the columns is automatically calculated, but you can modify
24401  the space between the columns.
24402  This is done by changing the length 
24403 \series bold
24404
24405 \backslash
24406 columnsep
24407 \series default
24408 .
24409  Its predefined value is 10
24410 \begin_inset space \thinspace{}
24411 \end_inset
24412
24413 pt.
24414  Here is an example where 
24415 \series bold
24416
24417 \backslash
24418 columnsep
24419 \series default
24420  is set to 3
24421 \begin_inset space \thinspace{}
24422 \end_inset
24423
24424 cm:
24425 \end_layout
24426
24427 \begin_layout Standard
24428 \begin_inset ERT
24429 status open
24430
24431 \begin_layout Plain Layout
24432
24433
24434 \backslash
24435 setlength{
24436 \backslash
24437 columnsep}{3cm}
24438 \end_layout
24439
24440 \end_inset
24441
24442
24443 \end_layout
24444
24445 \begin_layout Standard
24446 \begin_inset Flex Multiple Columns
24447 status open
24448
24449 \begin_layout Plain Layout
24450
24451 \size small
24452 My observations of No.
24453 \begin_inset space \space{}
24454 \end_inset
24455
24456 427 Park Lane did little to clear up the problem in which I was interested.
24457  The house was separated from the street by a low wall and railing, the
24458  whole not more than five feet high.
24459  It was perfectly easy, therefore, for anyone to get into the garden, but
24460  the window was entirely inaccessible, since there was no water pipe or
24461  anything which could help the most active man to climb it.
24462  More puzzled than ever, I retraced my steps to Kensington.
24463  I had not been in my study five minutes when the maid entered to say that
24464  a person desired to see me.
24465  To my astonishment it was none other than my strange old book collector,
24466  his sharp, wizened face peering out from a frame of white hair, and his
24467  precious volumes, a dozen of them at least, wedged under his right arm.
24468 \end_layout
24469
24470 \end_inset
24471
24472
24473 \end_layout
24474
24475 \begin_layout Standard
24476 \begin_inset ERT
24477 status collapsed
24478
24479 \begin_layout Plain Layout
24480
24481
24482 \backslash
24483 setlength{
24484 \backslash
24485 columnsep}{10pt}
24486 \end_layout
24487
24488 \end_inset
24489
24490
24491 \begin_inset Note Note
24492 status collapsed
24493
24494 \begin_layout Plain Layout
24495 go back to the default
24496 \end_layout
24497
24498 \end_inset
24499
24500
24501 \end_layout
24502
24503 \begin_layout Subsubsection
24504 Vertical Lines
24505 \end_layout
24506
24507 \begin_layout Standard
24508 Between the columns a rule with a width of the length 
24509 \series bold
24510
24511 \backslash
24512 columnseprule
24513 \series default
24514  is placed.
24515  If this rule width is set to 0
24516 \begin_inset space \thinspace{}
24517 \end_inset
24518
24519 pt (this is the default), the rule is suppressed.
24520  In the following example the rule is 2
24521 \begin_inset space \thinspace{}
24522 \end_inset
24523
24524 pt wide:
24525 \end_layout
24526
24527 \begin_layout Standard
24528 \begin_inset ERT
24529 status open
24530
24531 \begin_layout Plain Layout
24532
24533
24534 \backslash
24535 setlength{
24536 \backslash
24537 columnseprule}{2pt}
24538 \end_layout
24539
24540 \end_inset
24541
24542
24543 \end_layout
24544
24545 \begin_layout Standard
24546 \begin_inset Flex Multiple Columns
24547 status open
24548
24549 \begin_layout Plain Layout
24550
24551 \size small
24552 \begin_inset Quotes eld
24553 \end_inset
24554
24555 You're surprised to see me, sir,
24556 \begin_inset Quotes erd
24557 \end_inset
24558
24559  said he, in a strange, croaking voice.
24560 \end_layout
24561
24562 \begin_layout Plain Layout
24563
24564 \size small
24565 I acknowledged that I was.
24566 \end_layout
24567
24568 \begin_layout Plain Layout
24569
24570 \size small
24571 \begin_inset Quotes eld
24572 \end_inset
24573
24574 Well, I've a conscience, sir, and when I chanced to see you go into this
24575  house, as I came hobbling after you, I thought to myself, I'll just step
24576  in and see that kind gentleman, and tell him that if I was a bit gruff
24577  in my manner there was not any harm meant, and that I am much obliged to
24578  him for picking up my books.
24579 \begin_inset Quotes erd
24580 \end_inset
24581
24582
24583 \end_layout
24584
24585 \begin_layout Plain Layout
24586
24587 \size small
24588 \begin_inset Quotes eld
24589 \end_inset
24590
24591 You make too much of a trifle,
24592 \begin_inset Quotes erd
24593 \end_inset
24594
24595  said I.
24596  
24597 \begin_inset Quotes eld
24598 \end_inset
24599
24600 May I ask how you knew who I was?
24601 \begin_inset Quotes erd
24602 \end_inset
24603
24604
24605 \end_layout
24606
24607 \begin_layout Plain Layout
24608
24609 \size small
24610 \begin_inset Quotes eld
24611 \end_inset
24612
24613 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24614  you'll find my little bookshop at the corner of Church Street, and very
24615  happy to see you, I am sure.
24616  Maybe you collect yourself, sir.
24617  Here's 
24618 \noun on
24619 British
24620 \begin_inset space ~
24621 \end_inset
24622
24623 Birds
24624 \noun default
24625 , and 
24626 \noun on
24627 Catullus
24628 \noun default
24629 , and 
24630 \noun on
24631 The Holy War
24632 \noun default
24633 --a bargain, every one of them.
24634  With five volumes you could just fill that gap on that second shelf.
24635  It looks untidy, does it not, sir?
24636 \begin_inset Quotes erd
24637 \end_inset
24638
24639
24640 \end_layout
24641
24642 \end_inset
24643
24644
24645 \end_layout
24646
24647 \begin_layout Standard
24648 \begin_inset VSpace defskip
24649 \end_inset
24650
24651
24652 \end_layout
24653
24654 \begin_layout Standard
24655 The rule can be colored by redefining the command 
24656 \series bold
24657
24658 \backslash
24659 columnseprulecolor
24660 \series default
24661 .
24662  This is done by inserting the command
24663 \begin_inset Newline newline
24664 \end_inset
24665
24666
24667 \series bold
24668
24669 \backslash
24670 renewcommand{
24671 \backslash
24672 columnseprulecolor}{
24673 \backslash
24674 color{red}}
24675 \series default
24676
24677 \begin_inset Newline newline
24678 \end_inset
24679
24680 as TeX-Code before the multicolumn inset.
24681  Replace 
24682 \series bold
24683 red
24684 \series default
24685  in this command by a color of your choice.
24686  You can use all pre- and self-defined colors.
24687  See the 
24688 \emph on
24689 EmbeddedObjects
24690 \emph default
24691  manual, section 
24692 \emph on
24693 Colored
24694 \begin_inset space ~
24695 \end_inset
24696
24697 Tables
24698 \emph default
24699  for more information about pre- and self-defined colors.
24700  To go back to the default color insert the command
24701 \begin_inset Newline newline
24702 \end_inset
24703
24704
24705 \series bold
24706
24707 \backslash
24708 renewcommand{
24709 \backslash
24710 columnseprulecolor}{
24711 \backslash
24712 normalcolor}
24713 \series default
24714
24715 \begin_inset Newline newline
24716 \end_inset
24717
24718 Here is the example with a cyan rule and 1
24719 \begin_inset space \thinspace{}
24720 \end_inset
24721
24722 cm column separation:
24723 \end_layout
24724
24725 \begin_layout Standard
24726 \begin_inset ERT
24727 status open
24728
24729 \begin_layout Plain Layout
24730
24731
24732 \backslash
24733 setlength{
24734 \backslash
24735 columnsep}{1cm}
24736 \end_layout
24737
24738 \begin_layout Plain Layout
24739
24740
24741 \backslash
24742 renewcommand{
24743 \backslash
24744 columnseprulecolor}{
24745 \backslash
24746 color{cyan}}
24747 \end_layout
24748
24749 \end_inset
24750
24751
24752 \end_layout
24753
24754 \begin_layout Standard
24755 \begin_inset Flex Multiple Columns
24756 status open
24757
24758 \begin_layout Plain Layout
24759
24760 \size small
24761 \begin_inset Quotes eld
24762 \end_inset
24763
24764 You're surprised to see me, sir,
24765 \begin_inset Quotes erd
24766 \end_inset
24767
24768  said he, in a strange, croaking voice.
24769 \end_layout
24770
24771 \begin_layout Plain Layout
24772
24773 \size small
24774 I acknowledged that I was.
24775 \end_layout
24776
24777 \begin_layout Plain Layout
24778
24779 \size small
24780 \begin_inset Quotes eld
24781 \end_inset
24782
24783 Well, I've a conscience, sir, and when I chanced to see you go into this
24784  house, as I came hobbling after you, I thought to myself, I'll just step
24785  in and see that kind gentleman, and tell him that if I was a bit gruff
24786  in my manner there was not any harm meant, and that I am much obliged to
24787  him for picking up my books.
24788 \begin_inset Quotes erd
24789 \end_inset
24790
24791
24792 \end_layout
24793
24794 \begin_layout Plain Layout
24795
24796 \size small
24797 \begin_inset Quotes eld
24798 \end_inset
24799
24800 You make too much of a trifle,
24801 \begin_inset Quotes erd
24802 \end_inset
24803
24804  said I.
24805  
24806 \begin_inset Quotes eld
24807 \end_inset
24808
24809 May I ask how you knew who I was?
24810 \begin_inset Quotes erd
24811 \end_inset
24812
24813
24814 \end_layout
24815
24816 \begin_layout Plain Layout
24817
24818 \size small
24819 \begin_inset Quotes eld
24820 \end_inset
24821
24822 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
24823  you'll find my little bookshop at the corner of Church Street, and very
24824  happy to see you, I am sure.
24825  Maybe you collect yourself, sir.
24826  Here's 
24827 \noun on
24828 British
24829 \begin_inset space ~
24830 \end_inset
24831
24832 Birds
24833 \noun default
24834 , and 
24835 \noun on
24836 Catullus
24837 \noun default
24838 , and 
24839 \noun on
24840 The Holy War
24841 \noun default
24842 --a bargain, every one of them.
24843  With five volumes you could just fill that gap on that second shelf.
24844  It looks untidy, does it not, sir?
24845 \begin_inset Quotes erd
24846 \end_inset
24847
24848
24849 \end_layout
24850
24851 \end_inset
24852
24853
24854 \end_layout
24855
24856 \begin_layout Standard
24857 \begin_inset ERT
24858 status collapsed
24859
24860 \begin_layout Plain Layout
24861
24862
24863 \backslash
24864 setlength{
24865 \backslash
24866 columnseprule}{0pt}
24867 \end_layout
24868
24869 \begin_layout Plain Layout
24870
24871
24872 \backslash
24873 renewcommand{
24874 \backslash
24875 columnseprulecolor}{
24876 \backslash
24877 normalcolor}
24878 \end_layout
24879
24880 \end_inset
24881
24882
24883 \begin_inset Note Note
24884 status collapsed
24885
24886 \begin_layout Plain Layout
24887 go back to the default
24888 \end_layout
24889
24890 \end_inset
24891
24892
24893 \end_layout
24894
24895 \begin_layout Section
24896 Non-standard Paragraph Shapes
24897 \end_layout
24898
24899 \begin_layout Standard
24900 \noindent
24901 LaTeX as well as any other text processor uses by default rectangular paragraphs.
24902  For special cases like for example posters, invitation cards or poems you
24903  can modify the paragraph shape to one of your choice.
24904  This can be done by using the LaTeX-package 
24905 \series bold
24906 shapepar
24907 \series default
24908  which is loaded by using in the document settings the module 
24909 \family sans
24910 Custom paragraph shapes
24911 \family default
24912 .
24913 \end_layout
24914
24915 \begin_layout Subsection
24916 Predefined shapes
24917 \end_layout
24918
24919 \begin_layout Standard
24920
24921 \series bold
24922 shapepar
24923 \series default
24924  provides the following shapes:
24925 \end_layout
24926
24927 \begin_layout Standard
24928 \begin_inset Tabular
24929 <lyxtabular version="3" rows="13" columns="3">
24930 <features rotate="0" booktabs="true" islongtable="true" longtabularalignment="center">
24931 <column alignment="center" valignment="middle" width="16col%">
24932 <column alignment="center" valignment="middle" width="40col%">
24933 <column alignment="center" valignment="middle" width="35col%">
24934 <row endhead="true">
24935 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24936 \begin_inset Text
24937
24938 \begin_layout Plain Layout
24939 Name
24940 \end_layout
24941
24942 \end_inset
24943 </cell>
24944 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
24945 \begin_inset Text
24946
24947 \begin_layout Plain Layout
24948 Description
24949 \end_layout
24950
24951 \end_inset
24952 </cell>
24953 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
24954 \begin_inset Text
24955
24956 \begin_layout Plain Layout
24957 Annotation
24958 \end_layout
24959
24960 \end_inset
24961 </cell>
24962 </row>
24963 <row>
24964 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24965 \begin_inset Text
24966
24967 \begin_layout Plain Layout
24968 CDlabel
24969 \end_layout
24970
24971 \end_inset
24972 </cell>
24973 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
24974 \begin_inset Text
24975
24976 \begin_layout Plain Layout
24977 Circle with circular hole (in the size of a CD/DVD)
24978 \end_layout
24979
24980 \end_inset
24981 </cell>
24982 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
24983 \begin_inset Text
24984
24985 \begin_layout Plain Layout
24986 Cannot be scaled, take care there is not too much text
24987 \end_layout
24988
24989 \end_inset
24990 </cell>
24991 </row>
24992 <row>
24993 <cell alignment="center" valignment="top" topline="true" usebox="none">
24994 \begin_inset Text
24995
24996 \begin_layout Plain Layout
24997 Circle
24998 \end_layout
24999
25000 \end_inset
25001 </cell>
25002 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25003 \begin_inset Text
25004
25005 \begin_layout Plain Layout
25006 Circle
25007 \end_layout
25008
25009 \end_inset
25010 </cell>
25011 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25012 \begin_inset Text
25013
25014 \begin_layout Plain Layout
25015 Fragile, calculation might fail
25016 \end_layout
25017
25018 \end_inset
25019 </cell>
25020 </row>
25021 <row>
25022 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25023 \begin_inset Text
25024
25025 \begin_layout Plain Layout
25026 Diamond
25027 \end_layout
25028
25029 \end_inset
25030 </cell>
25031 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25032 \begin_inset Text
25033
25034 \begin_layout Plain Layout
25035 Rhomboid (symbolizing a 
25036 \begin_inset Quotes eld
25037 \end_inset
25038
25039 diamond
25040 \begin_inset Quotes erd
25041 \end_inset
25042
25043 )
25044 \end_layout
25045
25046 \end_inset
25047 </cell>
25048 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25049 \begin_inset Text
25050
25051 \begin_layout Plain Layout
25052 -
25053 \end_layout
25054
25055 \end_inset
25056 </cell>
25057 </row>
25058 <row>
25059 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25060 \begin_inset Text
25061
25062 \begin_layout Plain Layout
25063 Heart
25064 \end_layout
25065
25066 \end_inset
25067 </cell>
25068 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25069 \begin_inset Text
25070
25071 \begin_layout Plain Layout
25072 Heart-like shape
25073 \end_layout
25074
25075 \end_inset
25076 </cell>
25077 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25078 \begin_inset Text
25079
25080 \begin_layout Plain Layout
25081 -
25082 \end_layout
25083
25084 \end_inset
25085 </cell>
25086 </row>
25087 <row>
25088 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25089 \begin_inset Text
25090
25091 \begin_layout Plain Layout
25092 Hexagon
25093 \end_layout
25094
25095 \end_inset
25096 </cell>
25097 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25098 \begin_inset Text
25099
25100 \begin_layout Plain Layout
25101 Hexagon
25102 \end_layout
25103
25104 \end_inset
25105 </cell>
25106 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25107 \begin_inset Text
25108
25109 \begin_layout Plain Layout
25110 -
25111 \end_layout
25112
25113 \end_inset
25114 </cell>
25115 </row>
25116 <row>
25117 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25118 \begin_inset Text
25119
25120 \begin_layout Plain Layout
25121 Nut
25122 \end_layout
25123
25124 \end_inset
25125 </cell>
25126 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25127 \begin_inset Text
25128
25129 \begin_layout Plain Layout
25130 Nut for bolt (hexagon with circular hole)
25131 \end_layout
25132
25133 \end_inset
25134 </cell>
25135 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25136 \begin_inset Text
25137
25138 \begin_layout Plain Layout
25139 -
25140 \end_layout
25141
25142 \end_inset
25143 </cell>
25144 </row>
25145 <row>
25146 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25147 \begin_inset Text
25148
25149 \begin_layout Plain Layout
25150 Square
25151 \end_layout
25152
25153 \end_inset
25154 </cell>
25155 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25156 \begin_inset Text
25157
25158 \begin_layout Plain Layout
25159 Square
25160 \end_layout
25161
25162 \end_inset
25163 </cell>
25164 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25165 \begin_inset Text
25166
25167 \begin_layout Plain Layout
25168 -
25169 \end_layout
25170
25171 \end_inset
25172 </cell>
25173 </row>
25174 <row>
25175 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25176 \begin_inset Text
25177
25178 \begin_layout Plain Layout
25179 Star
25180 \end_layout
25181
25182 \end_inset
25183 </cell>
25184 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25185 \begin_inset Text
25186
25187 \begin_layout Plain Layout
25188 Five-point star
25189 \end_layout
25190
25191 \end_inset
25192 </cell>
25193 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
25194 \begin_inset Text
25195
25196 \begin_layout Plain Layout
25197 -
25198 \end_layout
25199
25200 \end_inset
25201 </cell>
25202 </row>
25203 <row>
25204 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25205 \begin_inset Text
25206
25207 \begin_layout Plain Layout
25208 Candle
25209 \end_layout
25210
25211 \end_inset
25212 </cell>
25213 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25214 \begin_inset Text
25215
25216 \begin_layout Plain Layout
25217 Burning candle
25218 \end_layout
25219
25220 \end_inset
25221 </cell>
25222 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25223 \begin_inset Text
25224
25225 \begin_layout Plain Layout
25226 -
25227 \end_layout
25228
25229 \end_inset
25230 </cell>
25231 </row>
25232 <row>
25233 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25234 \begin_inset Text
25235
25236 \begin_layout Plain Layout
25237 Drop down/up
25238 \end_layout
25239
25240 \end_inset
25241 </cell>
25242 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25243 \begin_inset Text
25244
25245 \begin_layout Plain Layout
25246 Normal/reversed rain drop
25247 \end_layout
25248
25249 \end_inset
25250 </cell>
25251 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25252 \begin_inset Text
25253
25254 \begin_layout Plain Layout
25255 Fragile, calculation might fail
25256 \end_layout
25257
25258 \end_inset
25259 </cell>
25260 </row>
25261 <row>
25262 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25263 \begin_inset Text
25264
25265 \begin_layout Plain Layout
25266 TeX
25267 \end_layout
25268
25269 \end_inset
25270 </cell>
25271 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
25272 \begin_inset Text
25273
25274 \begin_layout Plain Layout
25275 The TeX logo
25276 \end_layout
25277
25278 \end_inset
25279 </cell>
25280 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
25281 \begin_inset Text
25282
25283 \begin_layout Plain Layout
25284 -
25285 \end_layout
25286
25287 \end_inset
25288 </cell>
25289 </row>
25290 <row>
25291 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25292 \begin_inset Text
25293
25294 \begin_layout Plain Layout
25295 Triangle up/down/
25296 \begin_inset Newline newline
25297 \end_inset
25298
25299 left/right
25300 \end_layout
25301
25302 \end_inset
25303 </cell>
25304 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
25305 \begin_inset Text
25306
25307 \begin_layout Plain Layout
25308 Triangles in different orientations
25309 \end_layout
25310
25311 \end_inset
25312 </cell>
25313 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
25314 \begin_inset Text
25315
25316 \begin_layout Plain Layout
25317 -
25318 \end_layout
25319
25320 \end_inset
25321 </cell>
25322 </row>
25323 </lyxtabular>
25324
25325 \end_inset
25326
25327
25328 \end_layout
25329
25330 \begin_layout Standard
25331 To use a shape for your paragraph, simply select it in LyX's pull-down box
25332  for environments in the toolbar.
25333 \end_layout
25334
25335 \begin_layout Standard
25336 \begin_inset Newpage newpage
25337 \end_inset
25338
25339
25340 \end_layout
25341
25342 \begin_layout Standard
25343 Here is an example paragraph in the shape of a nut:
25344 \end_layout
25345
25346 \begin_layout Standard
25347 \begin_inset VSpace bigskip
25348 \end_inset
25349
25350
25351 \end_layout
25352
25353 \begin_layout Nut
25354
25355 \lang latin
25356 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25357  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25358  voluptua.
25359  At vero eos et accusam et justo duo dolores et ea rebum.
25360  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25361  sit amet.
25362  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25363  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25364  voluptua.
25365 \end_layout
25366
25367 \begin_layout Standard
25368 \begin_inset VSpace bigskip
25369 \end_inset
25370
25371
25372 \end_layout
25373
25374 \begin_layout Standard
25375 \begin_inset Note Greyedout
25376 status open
25377
25378 \begin_layout Plain Layout
25379
25380 \series bold
25381 Note
25382 \series default
25383 : shapepar paragraphs cannot run over a page break.
25384 \end_layout
25385
25386 \end_inset
25387
25388
25389 \end_layout
25390
25391 \begin_layout Standard
25392 \begin_inset VSpace bigskip
25393 \end_inset
25394
25395
25396 \end_layout
25397
25398 \begin_layout Standard
25399
25400 \series bold
25401 shapepar
25402 \series default
25403  takes care that the shape will always be preserved, no matter how much
25404  text is in the paragraph.
25405  Therefore the paragraph size changes with the amount of contained text.
25406  This can lead to paragraph sizes exceeding the page margins.
25407  To demonstrate the size scaling, here is the same example paragraph but
25408  with twice as much text:
25409 \end_layout
25410
25411 \begin_layout Standard
25412 \begin_inset Newpage newpage
25413 \end_inset
25414
25415
25416 \end_layout
25417
25418 \begin_layout Nut
25419
25420 \lang latin
25421 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25422  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25423  voluptua.
25424  At vero eos et accusam et justo duo dolores et ea rebum.
25425  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25426  sit amet.
25427  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25428  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25429  voluptua.
25430  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25431  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25432  voluptua.
25433  At vero eos et accusam et justo duo dolores et ea rebum.
25434  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25435  sit amet.
25436  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25437  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25438  voluptua.
25439 \end_layout
25440
25441 \begin_layout Standard
25442 \begin_inset VSpace bigskip
25443 \end_inset
25444
25445
25446 \end_layout
25447
25448 \begin_layout Standard
25449 An exception is the shape 
25450 \family sans
25451 CDlabel
25452 \family default
25453 .
25454  It cannot be scaled because it must fit the size of a CD/DVD.
25455  Therefore the amount of text that fits into the shape is limited.
25456 \begin_inset Newline newline
25457 \end_inset
25458
25459 The 
25460 \family sans
25461 drop
25462 \family default
25463  shapes and the 
25464 \family sans
25465 circle
25466 \family default
25467  shape are fragile, meaning that the calculation of their size can fail,
25468  depending on the amount of text.
25469  You will then get the LaTeX error 
25470 \begin_inset Quotes eld
25471 \end_inset
25472
25473 Arithmetic overflow
25474 \begin_inset Quotes erd
25475 \end_inset
25476
25477 .
25478  In this case one can try to remove or add some text; if nothing works one
25479  has to use another shape.
25480 \end_layout
25481
25482 \begin_layout Standard
25483 \begin_inset VSpace bigskip
25484 \end_inset
25485
25486
25487 \end_layout
25488
25489 \begin_layout Standard
25490 For shapes with tips you will maybe see that LaTeX's hyphenation routine
25491  fails for text in the tips.
25492  Therefore it is often necessary to add hyphenation points 
25493 \family sans
25494 (
25495 \begin_inset Info
25496 type  "shortcut"
25497 arg   "specialchar-insert hyphenation"
25498 \end_inset
25499
25500
25501 \family default
25502 ) to the corresponding text parts.
25503 \end_layout
25504
25505 \begin_layout Standard
25506 \begin_inset VSpace bigskip
25507 \end_inset
25508
25509
25510 \end_layout
25511
25512 \begin_layout Standard
25513 Shapepar paragraphs are either always centered or placed on the page so
25514  that their left border touches the left page margin.
25515  You can therefore not use the paragraph dialog to align such paragraphs.
25516  A solution is to put the paragraph into a minipage or parbox and align
25517  the box.
25518  The problem is hereby to find the right width for the box.
25519  Because if it is too wide and you center the box, the paragraph is not
25520  centered too because it sticks at the left side of the box.
25521  So you might have to play a bit with the width until it fits.
25522  Here are two heart-shaped paragraphs, the first one is not aligned, the
25523  second one is right-aligned:
25524 \end_layout
25525
25526 \begin_layout Standard
25527 \begin_inset Newpage newpage
25528 \end_inset
25529
25530
25531 \end_layout
25532
25533 \begin_layout Heart
25534 \noindent
25535
25536 \lang latin
25537 Lo\SpecialChar \-
25538 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25539  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25540  voluptua.
25541  At vero eos et accusam et justo duo dolores et ea rebum.
25542  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25543  sit amet.
25544 \end_layout
25545
25546 \begin_layout Standard
25547 \begin_inset VSpace bigskip
25548 \end_inset
25549
25550
25551 \end_layout
25552
25553 \begin_layout Standard
25554 \noindent
25555 \align right
25556 \begin_inset Box Frameless
25557 position "t"
25558 hor_pos "c"
25559 has_inner_box 1
25560 inner_pos "t"
25561 use_parbox 1
25562 use_makebox 0
25563 width "42col%"
25564 special "none"
25565 height "1in"
25566 height_special "totalheight"
25567 status open
25568
25569 \begin_layout Heart
25570 \noindent
25571
25572 \lang latin
25573 Lo\SpecialChar \-
25574 rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25575  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25576  voluptua.
25577  At vero eos et accusam et justo duo dolores et ea rebum.
25578  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25579  sit amet.
25580 \end_layout
25581
25582 \end_inset
25583
25584
25585 \end_layout
25586
25587 \begin_layout Subsection
25588 Custom shapes
25589 \end_layout
25590
25591 \begin_layout Standard
25592 You can define any shape you want.
25593  Doing this manually is a lot of work because every coordinate must be specified.
25594  But there is a way to let the computer calculate the coordinates:
25595 \end_layout
25596
25597 \begin_layout Enumerate
25598 Install the program 
25599 \begin_inset CommandInset href
25600 LatexCommand href
25601 name "Jpgfdraw"
25602 target "http://www.ctan.org/tex-archive/graphics/jpgfdraw"
25603
25604 \end_inset
25605
25606 .
25607 \end_layout
25608
25609 \begin_layout Enumerate
25610 In 
25611 \family sans
25612 Jpgfdraw
25613 \family default
25614  go to the menu 
25615 \family sans
25616 Te
25617 \begin_inset ERT
25618 status collapsed
25619
25620 \begin_layout Plain Layout
25621
25622 {}
25623 \end_layout
25624
25625 \end_inset
25626
25627 X/LaT
25628 \begin_inset ERT
25629 status collapsed
25630
25631 \begin_layout Plain Layout
25632
25633 {}
25634 \end_layout
25635
25636 \end_inset
25637
25638 eX\SpecialChar \menuseparator
25639 Settings\SpecialChar \menuseparator
25640 Set Normal Size
25641 \family default
25642  and select the font size you are using in your document.
25643  For example this document uses the size 12
25644 \begin_inset space \thinspace{}
25645 \end_inset
25646
25647 pt.
25648 \end_layout
25649
25650 \begin_layout Enumerate
25651 Draw a shape.
25652 \end_layout
25653
25654 \begin_layout Enumerate
25655 Use the menu 
25656 \family sans
25657 Te
25658 \begin_inset ERT
25659 status collapsed
25660
25661 \begin_layout Plain Layout
25662
25663 {}
25664 \end_layout
25665
25666 \end_inset
25667
25668 X/LaT
25669 \begin_inset ERT
25670 status collapsed
25671
25672 \begin_layout Plain Layout
25673
25674 {}
25675 \end_layout
25676
25677 \end_inset
25678
25679 eX\SpecialChar \menuseparator
25680 Shapepar
25681 \family default
25682  to export the shape to coordinates.
25683  In the appearing dialog use either the outline of your shape for the coordinate
25684 s or the path itself.
25685 \begin_inset Foot
25686 status collapsed
25687
25688 \begin_layout Plain Layout
25689 For more information see 
25690 \begin_inset CommandInset href
25691 LatexCommand href
25692 target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html"
25693
25694 \end_inset
25695
25696
25697 \end_layout
25698
25699 \end_inset
25700
25701
25702 \end_layout
25703
25704 \begin_layout Standard
25705 The coordinates are written into a TeX-file.
25706  To use it for your LyX document
25707 \end_layout
25708
25709 \begin_layout Enumerate
25710 Place the cursor before the first character of your paragraph (or into a
25711  new empty one).
25712 \end_layout
25713
25714 \begin_layout Enumerate
25715 Open in LyX the menu 
25716 \family sans
25717 Insert\SpecialChar \menuseparator
25718 File\SpecialChar \menuseparator
25719 Child
25720 \begin_inset space ~
25721 \end_inset
25722
25723 Document
25724 \family default
25725 , select the file and use 
25726 \family sans
25727 Input
25728 \family default
25729  as 
25730 \family sans
25731 Include Type.
25732 \end_layout
25733
25734 \begin_layout Standard
25735 \begin_inset VSpace defskip
25736 \end_inset
25737
25738
25739 \end_layout
25740
25741 \begin_layout Standard
25742 \begin_inset Note Greyedout
25743 status open
25744
25745 \begin_layout Plain Layout
25746
25747 \series bold
25748 Note
25749 \series default
25750 : The changed shape only applies to the current paragraph; everything is
25751  reset to normal for the next paragraph.
25752  Therefore the shape definition file must be input into every paragraph
25753  with the desired shape.
25754 \end_layout
25755
25756 \end_inset
25757
25758
25759 \end_layout
25760
25761 \begin_layout Standard
25762 \begin_inset VSpace bigskip
25763 \end_inset
25764
25765
25766 \end_layout
25767
25768 \begin_layout Standard
25769 Here is an example:
25770 \end_layout
25771
25772 \begin_layout Standard
25773 \begin_inset VSpace bigskip
25774 \end_inset
25775
25776
25777 \end_layout
25778
25779 \begin_layout Standard
25780 \begin_inset CommandInset include
25781 LatexCommand input
25782 filename "SpecialParagraphShape.tex"
25783
25784 \end_inset
25785
25786
25787 \lang latin
25788 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25789  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25790  voluptua.
25791  At vero eos et accusam et justo duo dolores et ea rebum.
25792  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
25793  sit amet.
25794  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
25795  eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
25796  voluptua.
25797 \end_layout
25798
25799 \begin_layout Standard
25800 \begin_inset VSpace bigskip
25801 \end_inset
25802
25803
25804 \end_layout
25805
25806 \begin_layout Standard
25807
25808 \series bold
25809 A tip:
25810 \series default
25811  to draw complexer shapes in 
25812 \family sans
25813 Jpgfdraw
25814 \family default
25815  you can draw the shape in a program of your choice and import the resulting
25816  image to 
25817 \family sans
25818 Jpgfdraw
25819 \family default
25820 .
25821  Then you only need to draw a line or spline along the outline of the image.
25822 \end_layout
25823
25824 \begin_layout Standard
25825 \begin_inset VSpace bigskip
25826 \end_inset
25827
25828
25829 \end_layout
25830
25831 \begin_layout Standard
25832 The module 
25833 \family sans
25834 Custom paragraph shapes
25835 \family default
25836  also provides the two commands 
25837 \family sans
25838 shapepar
25839 \family default
25840  and 
25841 \family sans
25842 Shapepar
25843 \family default
25844  which can be used to define custom shapes coordinate by coordinate.
25845 \begin_inset Foot
25846 status collapsed
25847
25848 \begin_layout Plain Layout
25849 These commands are internally used for all shapes described here.
25850 \end_layout
25851
25852 \end_inset
25853
25854  For information how these styles are used and about further customization
25855  possibilities, have a look at the documentation of the package 
25856 \series bold
25857 shapepar
25858 \series default
25859
25860 \begin_inset CommandInset citation
25861 LatexCommand cite
25862 key "shapepar"
25863
25864 \end_inset
25865
25866 .
25867 \end_layout
25868
25869 \begin_layout Bibliography
25870 \begin_inset CommandInset bibitem
25871 LatexCommand bibitem
25872 key "multicol"
25873
25874 \end_inset
25875
25876 Documentation of the LaTeX-package 
25877 \begin_inset CommandInset href
25878 LatexCommand href
25879 name "multicol"
25880 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
25881
25882 \end_inset
25883
25884
25885 \end_layout
25886
25887 \begin_layout Bibliography
25888 \begin_inset CommandInset bibitem
25889 LatexCommand bibitem
25890 key "shapepar"
25891
25892 \end_inset
25893
25894 Documentation of the LaTeX-package 
25895 \begin_inset CommandInset href
25896 LatexCommand href
25897 name "shapepar"
25898 target "http://mirrors.ctan.org/macros/latex/contrib/shapepar/shapepar.pdf"
25899
25900 \end_inset
25901
25902
25903 \end_layout
25904
25905 \end_body
25906 \end_document